:0,j=O===z.row?z.col:q.width-1,J=O*$,M="";for(let D=H;D<=j;D++){if(_[J+D]===1)continue;let X=Zg6(q,D,O);if(!X)continue;if(X.width===2||X.width===3)continue;M+=X.char}w.push(M.replace(/\s+$/,""))}return w.join(` `)}function $C7(A,q,K,Y){let z=_C7(q);if(!z)return;let{start:w,end:_}=z,$=A.width,O=A.noSelect,H=Y?(j)=>K.withBackground(j,Y):(j)=>K.withInverse(j);for(let j=w.row;j<=_.row&&j{g56();o59={black:40,red:41,green:42,yellow:43,blue:44,magenta:45,cyan:46,white:47,blackBright:100,redBright:101,greenBright:102,yellowBright:103,blueBright:104,magentaBright:105,cyanBright:106,whiteBright:107}});function a59(A){let q={upArrow:A.name==="up",downArrow:A.name==="down",leftArrow:A.name==="left",rightArrow:A.name==="right",pageDown:A.name==="pagedown",pageUp:A.name==="pageup",wheelUp:A.name==="wheelup",wheelDown:A.name==="wheeldown",home:A.name==="home",end:A.name==="end",return:A.name==="return",escape:A.name==="escape",fn:A.fn,ctrl:A.ctrl,shift:A.shift,tab:A.name==="tab",backspace:A.name==="backspace",delete:A.name==="delete",meta:A.meta||A.name==="escape"||A.option},K=A.ctrl?A.name:A.sequence;if(K===void 0)K="";if(A.code&&!A.name)K="";if(K.startsWith("\x1B"))K=K.slice(1);let Y=!1;if(K.startsWith("[")&&K.endsWith("u")&&A.name)K=A.name==="space"?" ":A.name,Y=!0;if(K.startsWith("[27;")&&K.endsWith("~")&&A.name)K=A.name==="space"?" ":A.name,Y=!0;if(K.startsWith("O")&&K.length===2&&A.name&&A.name.length===1)K=A.name,Y=!0;if(!Y&&A.name&&qC7.includes(A.name))K="";if(K.length===1&&typeof K[0]==="string"&&K[0]>="A"&&K[0]<="Z")q.shift=!0;return[q,K]}var Vg6;var mM8=k(()=>{bM8();Vg6=class Vg6 extends Tb{keypress;key;input;constructor(A){super();let[q,K]=a59(A);this.keypress=A,this.key=q,this.input=K}}});var o06;var gM8=k(()=>{o06=class o06 extends Tb{type;constructor(A){super();this.type=A}}});class FM8{stdout;pending=[];sentinels=[];constructor(A){this.stdout=A}send(A){return new Promise((q)=>{this.pending.push({match:A.match,resolve:(K)=>q(K)}),this.stdout.write(A.request)})}flush(){return new Promise((A)=>{this.sentinels.push(A),this.stdout.write(s59)})}onResponse(A){let q=this.pending.findIndex((K)=>K.match(A));if(q!==-1){let[K]=this.pending.splice(q,1);K.resolve(A);return}if(A.type==="da1"&&this.sentinels.length>0){for(let K of this.pending.splice(0))K.resolve(void 0);for(let K of this.sentinels.splice(0))K()}}}var s59;var HC7=k(()=>{Zb();Tg();s59=AO("c")});var jC7,c56;var Ng6=k(()=>{jC7=e(W6(),1),c56=jC7.createContext(null)});function Oe(A){return AO(`?${A}h`)}function He(A){return AO(`?${A}l`)}var qO,JC7,MC7,DC7,a06,QM8,l56,Vb,vg6,Dj1,kg6,Eg6,je;var Je=k(()=>{Zb();qO={CURSOR_VISIBLE:25,ALT_SCREEN:47,ALT_SCREEN_CLEAR:1049,MOUSE_NORMAL:1000,MOUSE_BUTTON:1002,MOUSE_ANY:1003,MOUSE_SGR:1006,FOCUS_EVENTS:1004,BRACKETED_PASTE:2004,SYNCHRONIZED_UPDATE:2026};JC7=Oe(qO.SYNCHRONIZED_UPDATE),MC7=He(qO.SYNCHRONIZED_UPDATE),DC7=Oe(qO.BRACKETED_PASTE),a06=He(qO.BRACKETED_PASTE),QM8=Oe(qO.FOCUS_EVENTS),l56=He(qO.FOCUS_EVENTS),Vb=Oe(qO.CURSOR_VISIBLE),vg6=He(qO.CURSOR_VISIBLE),Dj1=Oe(qO.ALT_SCREEN_CLEAR),kg6=He(qO.ALT_SCREEN_CLEAR),Eg6=Oe(qO.MOUSE_NORMAL)+Oe(qO.MOUSE_BUTTON)+Oe(qO.MOUSE_SGR),je=He(qO.MOUSE_SGR)+He(qO.MOUSE_BUTTON)+He(qO.MOUSE_NORMAL)});var XC7={};m1(XC7,{stopCapturingEarlyInput:()=>Me,startCapturingEarlyInput:()=>t59,seedEarlyInput:()=>pM8,isCapturingEarlyInput:()=>q99,hasEarlyInput:()=>A99,consumeEarlyInput:()=>UM8});function t59(){if(!process.stdin.isTTY||s06)return;s06=!0,Nb="";try{process.stdin.setEncoding("utf8"),process.stdin.setRawMode(!0),process.stdin.ref(),Lg6=()=>{let A=process.stdin.read();while(A!==null){if(typeof A==="string")e59(A);A=process.stdin.read()}},process.stdin.on("readable",Lg6)}catch{s06=!1}}function e59(A){let q=0;while(q0){let z=kd(Nb);Nb=Nb.slice(0,-(z.length||1))}q++;continue}if(Y===27){q++;while(q=64&&A.charCodeAt(q)<=126))q++;if(q0}function pM8(A){Nb=A}function q99(){return s06}var Nb="",s06=!1,Lg6=null;var yg6=k(()=>{YR()});function _99(A,q,K,Y){if(q.some((z)=>z.kind==="key"||z.kind==="mouse"))k46();for(let z of q){if(z.kind==="response"){A.querier.onResponse(z.response);continue}if(z.kind==="mouse"){$99(A,z);continue}let w=z.sequence;if(w===oy7){A.handleTerminalFocus(!0);let $=new o06("terminalfocus");A.internal_eventEmitter.emit("terminalfocus",$);continue}if(w===ay7){A.handleTerminalFocus(!1);let $=new o06("terminalblur");A.internal_eventEmitter.emit("terminalblur",$);continue}if(!jj1())LM8(!0);if(z.name==="z"&&z.ctrl&&w99){A.handleSuspend();continue}A.handleInput(w);let _=new Vg6(z);A.internal_eventEmitter.emit("input",_)}}function $99(A,q){let K=A.props.selection,Y=q.col-1,z=q.row-1,w=(q.button&32)!==0;if((q.button&3)!==0)return;if(q.action==="press"){if(w)zC7(K,Y,z);else YC7(K,Y,z);A.props.onSelectionChange()}else{if(wC7(K),$e(K))A.props.onSelectionFinish();else if(K.anchor)A.props.onClickAt(Y,z);A.props.onSelectionChange()}}var Ng,PC7,K99="\t",Y99="\x1B[Z",z99="\x1B",w99,Xj1;var WC7=k(()=>{_j1();vM8();Oj1();Hj1();SM8();dS7();Mj1();bM8();BM8();mM8();gM8();HC7();Ng6();oJ8();Je();Zb();K9();Z8();Jj1();Q1();yg6();x1();G1();Ng=e(W6(),1),PC7=["iTerm.app","kitty","WezTerm","ghostty"],w99=process.platform!=="win32";Xj1=class Xj1 extends Ng.PureComponent{static displayName="InternalApp";static getDerivedStateFromError(A){return{error:A}}state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0};rawModeEnabledCount=0;internal_eventEmitter=new U56;keyParseState=tS7;incompleteEscapeTimer=null;NORMAL_TIMEOUT=50;PASTE_TIMEOUT=500;querier=new FM8(this.props.stdout);isRawModeSupported(){return this.props.stdin.isTTY}render(){return Ng.default.createElement(c56.Provider,{value:{columns:this.props.terminalColumns,rows:this.props.terminalRows}},Ng.default.createElement($j1.Provider,{value:{exit:this.handleExit}},Ng.default.createElement(l06.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC,internal_eventEmitter:this.internal_eventEmitter,internal_querier:this.querier}},Ng.default.createElement(i06.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious,focus:this.focus}},Ng.default.createElement(yS7,null,Ng.default.createElement(lS7,null,this.state.error?Ng.default.createElement(IM8,{error:this.state.error}):this.props.children))))))}componentDidMount(){if(this.props.stdout.isTTY&&!$1(process.env.CLAUDE_CODE_ACCESSIBILITY))this.props.stdout.write(vg6)}componentWillUnmount(){if(this.props.stdout.isTTY)this.props.stdout.write(Vb);if(this.incompleteEscapeTimer)clearTimeout(this.incompleteEscapeTimer),this.incompleteEscapeTimer=null;if(this.isRawModeSupported())this.handleSetRawMode(!1)}componentDidCatch(A){this.handleExit(A)}handleSetRawMode=(A)=>{let{stdin:q}=this.props;if(!this.isRawModeSupported())if(q===process.stdin)throw Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default. Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);else throw Error(`Raw mode is not supported on the stdin provided to Ink. Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(q.setEncoding("utf8"),A){if(this.rawModeEnabledCount===0){if(Me(),q.ref(),q.setRawMode(!0),q.addListener("readable",this.handleReadable),this.props.stdout.write(DC7),this.props.stdout.write(QM8),PC7.includes(YA.terminal??""))this.props.stdout.write(sy7)}this.rawModeEnabledCount++;return}if(--this.rawModeEnabledCount===0){if(PC7.includes(YA.terminal??""))this.props.stdout.write(S06);this.props.stdout.write(l56),this.props.stdout.write(a06),q.setRawMode(!1),q.removeListener("readable",this.handleReadable),q.unref()}};flushIncomplete=()=>{if(this.incompleteEscapeTimer=null,!this.keyParseState.incomplete)return;this.processInput(null)};processInput=(A)=>{let[q,K]=eS7(this.keyParseState,A);if(this.keyParseState=K,q.length>0)ic.discreteUpdates(_99,this,q,void 0,void 0);if(this.keyParseState.incomplete){if(this.incompleteEscapeTimer)clearTimeout(this.incompleteEscapeTimer);this.incompleteEscapeTimer=setTimeout(this.flushIncomplete,this.keyParseState.mode==="IN_PASTE"?this.PASTE_TIMEOUT:this.NORMAL_TIMEOUT)}};handleReadable=()=>{try{let A;while((A=this.props.stdin.read())!==null)this.processInput(A)}catch(A){$6(A);let{stdin:q}=this.props;if(this.rawModeEnabledCount>0&&!q.listeners("readable").includes(this.handleReadable))L("handleReadable: re-attaching stdin readable listener after error recovery",{level:"warn"}),q.addListener("readable",this.handleReadable)}};handleInput=(A)=>{if(A==="\x03"&&this.props.exitOnCtrlC)this.handleExit();if(A===z99&&this.state.activeFocusId)this.setState({activeFocusId:void 0});if(this.state.isFocusEnabled&&this.state.focusables.length>0){if(A===K99)this.focusNext();if(A===Y99)this.focusPrevious()}};handleExit=(A)=>{if(this.isRawModeSupported())this.handleSetRawMode(!1);this.props.onExit(A)};handleTerminalFocus=(A)=>{LM8(A)};handleSuspend=()=>{if(!this.isRawModeSupported())return;let A=this.rawModeEnabledCount;while(this.rawModeEnabledCount>0)this.handleSetRawMode(!1);if(this.props.stdout.isTTY)this.props.stdout.write(Vb+l56+je);this.internal_eventEmitter.emit("suspend");let q=()=>{for(let K=0;K{this.setState({isFocusEnabled:!0})};disableFocus=()=>{this.setState({isFocusEnabled:!1})};focus=(A)=>{this.setState((q)=>{if(!q.focusables.some((Y)=>Y?.id===A))return q;return{activeFocusId:A}})};focusNext=()=>{this.setState((A)=>{let q=A.focusables.find((Y)=>Y.isActive)?.id;return{activeFocusId:this.findNextFocusable(A)??q}})};focusPrevious=()=>{this.setState((A)=>{let q=A.focusables.findLast((Y)=>Y.isActive)?.id;return{activeFocusId:this.findPreviousFocusable(A)??q}})};addFocusable=(A,{autoFocus:q})=>{this.setState((K)=>{let Y=K.activeFocusId;if(!Y&&q)Y=A;return{activeFocusId:Y,focusables:[...K.focusables,{id:A,isActive:!0}]}})};removeFocusable=(A)=>{this.setState((q)=>({activeFocusId:q.activeFocusId===A?void 0:q.activeFocusId,focusables:q.focusables.filter((K)=>{return K.id!==A})}))};activateFocusable=(A)=>{this.setState((q)=>({focusables:q.focusables.map((K)=>{if(K.id!==A)return K;return{id:A,isActive:!0}})}))};deactivateFocusable=(A)=>{this.setState((q)=>({activeFocusId:q.activeFocusId===A?void 0:q.activeFocusId,focusables:q.focusables.map((K)=>{if(K.id!==A)return K;return{id:A,isActive:!1}})}))};findNextFocusable=(A)=>{let q=A.focusables.findIndex((K)=>{return K.id===A.activeFocusId});for(let K=q+1;K{let q=A.focusables.findIndex((K)=>{return K.id===A.activeFocusId});for(let K=q-1;K>=0;K--){let Y=A.focusables[K];if(Y?.isActive)return Y.id}return}}});function H99(){return process.platform==="win32"&&!!process.env.WT_SESSION}function j99(){if(process.env.TERM_PROGRAM==="mintty")return!0;if(process.platform==="win32"&&process.env.MSYSTEM)return!0;return!1}function J99(){if(H99())return!0;if(process.platform==="win32"&&process.env.TERM_PROGRAM==="vscode"&&process.env.TERM_PROGRAM_VERSION)return!0;if(j99())return!0;return!1}function dM8(){if(process.platform==="win32")if(J99())return mH1+gJ8+mJ8;else return mH1+O99;return mH1+gJ8+mJ8}var O99,Mv2;var ZC7=k(()=>{Zb();O99=AO(0,"f");Mv2=dM8()});function fC7(){if(!process.stdout.isTTY)return!1;if(process.env.WT_SESSION)return!1;if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return!0;let A=GC7.coerce(process.env.TERM_PROGRAM_VERSION);if(!A)return!1;if(process.env.TERM_PROGRAM==="ghostty")return dD(A.version,"1.2.0");if(process.env.TERM_PROGRAM==="iTerm.app")return dD(A.version,"3.6.6");return!1}function TC7(){let A=process.env.TERM_PROGRAM,q=process.env.TERM;if(A==="iTerm.app"||A==="WezTerm"||A==="WarpTerminal"||A==="ghostty"||A==="contour"||A==="vscode"||A==="alacritty")return!0;if(q?.includes("kitty")||process.env.KITTY_WINDOW_ID)return!0;if(q==="xterm-ghostty")return!0;if(q?.startsWith("foot"))return!0;if(q?.includes("alacritty"))return!0;if(process.env.ZED_TERM)return!0;if(process.env.WT_SESSION)return!0;let K=process.env.VTE_VERSION;if(K){if(parseInt(K,10)>=6800)return!0}return!1}function cM8(A,q){if(q.length===0)return;let K=JC7;for(let Y of q)switch(Y.type){case"stdout":K+=Y.content;break;case"clear":if(Y.count>0)K+=iy7(Y.count);break;case"clearTerminal":K+=dM8();break;case"cursorHide":K+=vg6;break;case"cursorShow":K+=Vb;break;case"cursorMove":K+=ly7(Y.x,Y.y);break;case"cursorTo":K+=cy7(Y.col);break;case"carriageReturn":K+="\r";break;case"hyperlink":K+=Yj1(Y.uri);break;case"style":K+=tf(Y.codes);break;case"styleStr":K+=Y.str;break}K+=MC7,A.stdout.write(K)}var GC7;var Pj1=k(()=>{u56();Zb();Je();Tg();ZC7();GC7=e(T06(),1)});function vg(){let A=YS.useContext(Rg6);if(!A)throw Error("useTerminalNotification must be used within TerminalWriteProvider");let q=YS.useCallback(({message:_,title:$})=>{let O=$?`${$}: ${_}`:_;A(Q0(Uj.ITERM2,` ${O}`))},[A]),K=YS.useCallback(({message:_,title:$,id:O})=>{A(Q0(Uj.KITTY,`i=${O}:d=0:p=title`,$)),A(Q0(Uj.KITTY,`i=${O}:p=body`,_)),A(Q0(Uj.KITTY,`i=${O}:d=1:a=focus`,""))},[A]),Y=YS.useCallback(({message:_,title:$})=>{A(Q0(Uj.GHOSTTY,"notify",$,_))},[A]),z=YS.useCallback(()=>{A(cc)},[A]),w=YS.useCallback((_,$)=>{if(!fC7())return;if(!_){A(Q0(Uj.ITERM2,F56.PROGRESS,Q56.CLEAR,""));return}let O=Math.max(0,Math.min(100,Math.round($??0)));switch(_){case"completed":A(Q0(Uj.ITERM2,F56.PROGRESS,Q56.CLEAR,""));break;case"error":A(Q0(Uj.ITERM2,F56.PROGRESS,Q56.ERROR,O));break;case"indeterminate":A(Q0(Uj.ITERM2,F56.PROGRESS,Q56.INDETERMINATE,""));break;case"running":A(Q0(Uj.ITERM2,F56.PROGRESS,Q56.SET,O));break;case null:break}},[A]);return YS.useMemo(()=>({notifyITerm2:q,notifyKitty:K,notifyGhostty:Y,notifyBell:z,progress:w}),[q,K,Y,z,w])}var YS,Rg6,VC7;var ac=k(()=>{y56();Tg();Pj1();YS=e(W6(),1),Rg6=YS.createContext(null),VC7=Rg6.Provider});function M99(){}var sc;var lM8=k(()=>{sc=M99});function iM8(A){if(A.length<=1)return A;let q=[],K=0;for(let Y of A){let z=Y.type;if(z==="stdout"){if(Y.content==="")continue}else if(z==="cursorMove"){if(Y.x===0&&Y.y===0)continue}else if(z==="clear"){if(Y.count===0)continue}if(K>0){let w=K-1,_=q[w],$=_.type;if(z==="cursorMove"&&$==="cursorMove"){q[w]={type:"cursorMove",x:_.x+Y.x,y:_.y+Y.y};continue}if(z==="cursorTo"&&$==="cursorTo"){q[w]=Y;continue}if((z==="style"||z==="styleStr")&&($==="style"||$==="styleStr")){q[w]=Y;continue}if(z==="hyperlink"&&$==="hyperlink"&&Y.uri===_.uri)continue;if(z==="cursorShow"&&$==="cursorHide"||z==="cursorHide"&&$==="cursorShow"){q.pop(),K--;continue}}q.push(Y),K++}return q}function De(A,q,K,Y,z){return{screen:m56(0,0,K,Y,z),viewport:{width:q,height:A},cursor:{x:0,y:0,visible:!0}}}var NC7=k(()=>{g56()});var Sg6;var nM8=k(()=>{Sg6=class Sg6 extends Tb{col;row;localCol=0;localRow=0;constructor(A,q){super();this.col=A,this.row=q}}});function vC7(A,q,K){let Y=kN.get(A);if(!Y)return null;if(q=Y.x+Y.width||K=Y.y+Y.height)return null;for(let z=A.childNodes.length-1;z>=0;z--){let w=A.childNodes[z];if(w.nodeName==="#text")continue;let _=vC7(w,q,K);if(_)return _}return A}function kC7(A,q,K){let Y=vC7(A,q,K)??void 0;if(!Y)return;let z=new Sg6(q,K);while(Y){if(Y.onClick){let w=kN.get(Y);if(w)z.localCol=q-w.x,z.localRow=K-w.y;if(Y.onClick(z),z.didStopImmediatePropagation())return}Y=Y.parentNode}}var EC7=k(()=>{Og6();nM8()});import{writeSync as i56}from"fs";class Cg6{options;log;terminal;scheduleRender;isUnmounted=!1;isPaused=!1;container;rootNode;renderer;stylePool;charPool;hyperlinkPool;exitPromise;restoreConsole;unsubscribeTTYHandlers;terminalColumns;terminalRows;currentNode=null;frontFrame;backFrame;lastPoolResetTime=performance.now();lastYogaResetTime=performance.now();selection=KC7();selectionBgCode;altScreenActive=!1;altScreenMouseTracking=!1;prevFrameContaminated=!1;constructor(A){this.options=A;if(KJ8(this),this.options.patchConsole)this.restoreConsole=this.patchConsole();if(this.terminal={stdout:A.stdout,stderr:A.stderr},this.terminalColumns=A.stdout.columns||80,this.terminalRows=A.stdout.rows||24,this.stylePool=new jM8,this.charPool=new eH1,this.hyperlinkPool=new Aj1,this.frontFrame=De(this.terminalRows,this.terminalColumns,this.stylePool,this.charPool,this.hyperlinkPool),this.backFrame=De(this.terminalRows,this.terminalColumns,this.stylePool,this.charPool,this.hyperlinkPool),this.log=new TM8({isTTY:A.stdout.isTTY||!1,stylePool:this.stylePool}),this.scheduleRender=Yy7(this.onRender,n06,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.unsubscribeExit=vJ6(this.unmount,{alwaysLast:!1}),A.stdout.isTTY)A.stdout.on("resize",this.handleResize),process.on("SIGCONT",this.handleResume),this.unsubscribeTTYHandlers=()=>{A.stdout.off("resize",this.handleResize),process.off("SIGCONT",this.handleResume)};this.rootNode=cH1("ink-root"),this.renderer=PM8(this.rootNode,this.stylePool),this.rootNode.onRender=this.scheduleRender,this.rootNode.onImmediateRender=this.onRender,this.rootNode.onComputeLayout=()=>{if(this.isUnmounted)return;if(this.rootNode.yogaNode)this.rootNode.yogaNode.setWidth(this.terminalColumns),this.rootNode.yogaNode.calculateLayout(this.terminalColumns)},this.container=ic.createContainer(this.rootNode,VJ8,null,!1,null,"id",sc,sc,sc,sc)}handleResume=()=>{if(!this.options.stdout.isTTY)return;if(this.altScreenActive){this.options.stdout.write(Dj1+"\x1B[2J\x1B[H"+(this.altScreenMouseTracking?Eg6:"")),this.resetFramesForAltScreen();return}this.frontFrame=De(this.frontFrame.viewport.height,this.frontFrame.viewport.width,this.stylePool,this.charPool,this.hyperlinkPool),this.backFrame=De(this.backFrame.viewport.height,this.backFrame.viewport.width,this.stylePool,this.charPool,this.hyperlinkPool),this.log.reset()};handleResize=()=>{if(this.terminalColumns=this.options.stdout.columns||80,this.terminalRows=this.options.stdout.rows||24,this.altScreenActive&&!this.isPaused&&this.options.stdout.isTTY)this.options.stdout.write(Dj1+"\x1B[2J\x1B[H"+(this.altScreenMouseTracking?Eg6:"")),this.resetFramesForAltScreen();if(this.currentNode!==null)this.render(this.currentNode)};resolveExitPromise=()=>{};rejectExitPromise=()=>{};unsubscribeExit=()=>{};enterAlternateScreen(){this.pause(),this.suspendStdin(),this.options.stdout.write((this.altScreenActive?je:"\x1B[?1049h")+"\x1B[?1004l\x1B[0m\x1B[?25h\x1B[2J\x1B[H")}exitAlternateScreen(){if(this.options.stdout.write("\x1B[2J\x1B[H"+(this.altScreenActive?Eg6:"\x1B[?1049l")+"\x1B[?25l"),this.resumeStdin(),this.altScreenActive)this.resetFramesForAltScreen();else this.repaint();this.resume(),this.options.stdout.write("\x1B[?1004h")}onRender(){if(this.isUnmounted||this.isPaused)return;Ig1();let A=performance.now(),q=this.options.stdout.columns||80,K=this.options.stdout.rows||24,Y=this.renderer({frontFrame:this.frontFrame,backFrame:this.backFrame,isTTY:this.options.stdout.isTTY,terminalWidth:q,terminalRows:K,altScreen:this.altScreenActive,prevFrameContaminated:this.prevFrameContaminated}),z=!1;if(this.altScreenActive){if(z=$e(this.selection),z)$C7(Y.screen,this.selection,this.stylePool,this.selectionBgCode);if(FR7()||z||this.prevFrameContaminated)Y.screen.damage={x:0,y:0,width:Y.screen.width,height:Y.screen.height}}let w=this.log.render(this.frontFrame,Y);if(this.backFrame=this.frontFrame,this.frontFrame=Y,A-this.lastPoolResetTime>300000)this.resetPools(),this.lastPoolResetTime=A;let _=300000,$=60000,O=A-this.lastYogaResetTime;if(O>_-$)dJ8();if(O>_){if(cJ8()){if(VR7(this.rootNode),this.rootNode.yogaNode)this.rootNode.yogaNode.setWidth(this.terminalColumns),this.rootNode.yogaNode.calculateLayout(this.terminalColumns);this.lastYogaResetTime=A}}let H=[];for(let j of w)if(j.type==="clearTerminal")H.push({desiredHeight:Y.screen.height,availableHeight:Y.viewport.height,reason:j.reason});cM8(this.terminal,iM8(w)),this.prevFrameContaminated=z,this.options.onFrame?.({durationMs:performance.now()-A,flickers:H})}pause(){ic.flushSyncFromReconciler(),this.onRender(),this.isPaused=!0}resume(){this.isPaused=!1,this.onRender()}repaint(){this.frontFrame=De(this.frontFrame.viewport.height,this.frontFrame.viewport.width,this.stylePool,this.charPool,this.hyperlinkPool),this.backFrame=De(this.backFrame.viewport.height,this.backFrame.viewport.width,this.stylePool,this.charPool,this.hyperlinkPool),this.log.reset()}setAltScreenActive(A,q=!1){if(this.altScreenActive===A)return;if(this.altScreenActive=A,this.altScreenMouseTracking=A&&q,A)this.resetFramesForAltScreen();else this.repaint()}get isAltScreenActive(){return this.altScreenActive}resetFramesForAltScreen(){let A=this.terminalRows,q=this.terminalColumns,K=()=>({screen:m56(q,A,this.stylePool,this.charPool,this.hyperlinkPool),viewport:{width:q,height:A+1},cursor:{x:0,y:0,visible:!0}});this.frontFrame=K(),this.backFrame=K(),this.log.reset(),this.prevFrameContaminated=!0}copySelection(){if(!$e(this.selection))return"";let A=uM8(this.selection,this.frontFrame.screen);if(A)this.options.stdout.write(ZM8(A));return xM8(this.selection),this.onRender(),A}writeSelectionToClipboard=()=>{if(!$e(this.selection))return"";let A=uM8(this.selection,this.frontFrame.screen);if(A)this.options.stdout.write(ZM8(A)),this.onAutoCopy?.(A);return A};onAutoCopy;clearTextSelection(){if(!$e(this.selection))return;xM8(this.selection),this.onRender()}hasTextSelection(){return $e(this.selection)}setSelectionBackground(A){this.selectionBgCode=A?OC7(A):void 0}dispatchClick(A,q){if(!this.altScreenActive)return;kC7(this.rootNode,A,q)}stdinListeners=[];wasRawMode=!1;suspendStdin(){let A=this.options.stdin;if(!A.isTTY)return;let q=A.listeners("readable");L(`[stdin] suspendStdin: removing ${q.length} readable listener(s), wasRawMode=${A.isRaw??!1}`),q.forEach((Y)=>{this.stdinListeners.push({event:"readable",listener:Y}),A.removeListener("readable",Y)});let K=A;if(K.isRaw&&K.setRawMode)K.setRawMode(!1),this.wasRawMode=!0}resumeStdin(){let A=this.options.stdin;if(!A.isTTY)return;if(this.stdinListeners.length===0&&!this.wasRawMode)L("[stdin] resumeStdin: called with no stored listeners and wasRawMode=false (possible desync)",{level:"warn"});if(L(`[stdin] resumeStdin: re-attaching ${this.stdinListeners.length} listener(s), wasRawMode=${this.wasRawMode}`),this.stdinListeners.forEach(({event:q,listener:K})=>{A.addListener(q,K)}),this.stdinListeners=[],this.wasRawMode){let q=A;if(q.setRawMode)q.setRawMode(!0);this.wasRawMode=!1}}writeRaw(A){this.options.stdout.write(A)}render(A){this.currentNode=A;let q=rM8.default.createElement(Xj1,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount,terminalColumns:this.terminalColumns,terminalRows:this.terminalRows,selection:this.selection,onSelectionChange:this.onRender,onSelectionFinish:this.writeSelectionToClipboard,onClickAt:this.dispatchClick},rM8.default.createElement(VC7,{value:this.writeRaw},A));ic.updateContainerSync(q,this.container,null,sc),ic.flushSyncWork()}unmount(A){if(this.isUnmounted)return;if(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole==="function")this.restoreConsole();this.unsubscribeTTYHandlers?.();let q=this.log.renderPreviousOutput_DEPRECATED(this.frontFrame);if(cM8(this.terminal,iM8(q)),this.options.stdout.isTTY){if(this.altScreenActive)i56(1,je),i56(1,kg6);i56(1,S06),i56(1,l56),i56(1,a06),i56(1,Vb),i56(1,zj1)}if(this.isUnmounted=!0,this.scheduleRender.cancel?.(),ic.updateContainerSync(null,this.container,null,sc),ic.flushSyncWork(),wP.delete(this.options.stdout),this.rootNode.yogaNode?.free(),this.rootNode.yogaNode=void 0,A instanceof Error)this.rejectExitPromise(A);else this.resolveExitPromise()}async waitUntilExit(){return this.exitPromise||=new Promise((A,q)=>{this.resolveExitPromise=A,this.rejectExitPromise=q}),this.exitPromise}resetLineCount(){if(this.options.stdout.isTTY)this.backFrame=this.frontFrame,this.frontFrame=De(this.frontFrame.viewport.height,this.frontFrame.viewport.width,this.stylePool,this.charPool,this.hyperlinkPool),this.log.reset()}resetPools(){this.charPool=new eH1,this.hyperlinkPool=new Aj1,AS7(this.frontFrame.screen,this.charPool,this.hyperlinkPool),this.backFrame.screen.charPool=this.charPool,this.backFrame.screen.hyperlinkPool=this.hyperlinkPool}patchConsole(){return $y7((A,q)=>{if(A==="stdout")L(`console.log: ${q}`);if(A==="stderr")$6(Error(`console.error: ${q}`))})}}var rM8;var LC7=k(()=>{zy7();Aq1();Oy7();oJ8();DS7();AM8();Xg6();Xg6();GS7();Vg();WC7();ac();x1();G1();lM8();Pj1();NC7();g56();BM8();EC7();Tg();Je();Zb();Tg();Jg6();Q1();vJ8();rM8=e(W6(),1)});import{Stream as D99}from"stream";async function yC7({stdout:A=process.stdout,stdin:q=process.stdin,stderr:K=process.stderr,exitOnCtrlC:Y=!0,patchConsole:z=!0,onFrame:w}={}){await pH1();let _=new Cg6({stdout:A,stdin:q,stderr:K,exitOnCtrlC:Y,patchConsole:z,onFrame:w});return wP.set(A,_),{render:($)=>_.render($),unmount:()=>_.unmount(),waitUntilExit:()=>_.waitUntilExit()}}var X99=(A,q)=>{let K=W99(q),Y={stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,exitOnCtrlC:!0,patchConsole:!0,...K},z=Z99(Y.stdout,()=>new Cg6(Y));return z.render(A),{rerender:z.render,unmount(){z.unmount()},waitUntilExit:z.waitUntilExit,cleanup:()=>wP.delete(Y.stdout)}},P99=async(A,q)=>{L("[render] initLayout starting"),await pH1(),L("[render] initLayout complete");let K=X99(A,q);return L(`[render] first ink render: ${Math.round(process.uptime()*1000)}ms since process start`),K},RC7,W99=(A={})=>{if(A instanceof D99)return{stdout:A,stdin:process.stdin};return A},Z99=(A,q)=>{let K=wP.get(A);if(!K)K=q(),wP.set(A,K);return K};var SC7=k(()=>{LC7();Jg6();Vg();G1();RC7=P99});import{spawnSync as G99}from"child_process";function oM8(){if(hg6===void 0)hg6=CC7();return hg6}function aM8(){return hg6=CC7(),hg6}function zS(A){if(A==="auto")return oM8();return A}function CC7(){if(process.platform==="darwin")return f99();return"dark"}function f99(){let A=G99("defaults",["read","-g","AppleInterfaceStyle"],{encoding:"utf8",timeout:1000});if(A.status===0&&A.stdout.trim()==="Dark")return"dark";return"light"}var hg6;var n56=()=>{};function T99(){return T1().theme}function V99(A){_8((q)=>({...q,theme:A}))}function Gj1({children:A,initialState:q,onThemeSave:K=V99}){let[Y,z]=kg.useState(q??T99),[w,_]=kg.useState(null),[$,O]=kg.useState(()=>(q??Y)==="auto"?oM8():"dark"),H=w??Y;Wj1.useEffect(()=>{},[H]);let j=H==="auto"?$:H,J=IC7.useMemo(()=>({themeSetting:Y,setThemeSetting:(M)=>{if(z(M),_(null),M==="auto")O(aM8());K?.(M)},setPreviewTheme:(M)=>{if(_(M),M==="auto")O(aM8())},savePreview:()=>{if(w!==null)z(w),_(null),K?.(w)},cancelPreview:()=>{if(w!==null)_(null)},currentTheme:j}),[Y,w,j,K]);return Wj1.default.createElement(Zj1.Provider,{value:J},A)}function G7(){let A=Y6(3),{currentTheme:q,setThemeSetting:K}=kg.useContext(Zj1),Y;if(A[0]!==q||A[1]!==K)Y=[q,K],A[0]=q,A[1]=K,A[2]=Y;else Y=A[2];return Y}function t06(){return kg.useContext(Zj1).themeSetting}function fj1(){let A=Y6(4),{setPreviewTheme:q,savePreview:K,cancelPreview:Y}=kg.useContext(Zj1),z;if(A[0]!==Y||A[1]!==K||A[2]!==q)z={setPreviewTheme:q,savePreview:K,cancelPreview:Y},A[0]=Y,A[1]=K,A[2]=q,A[3]=z;else z=A[3];return z}var Wj1,IC7,kg,hC7="dark",Zj1;var e06=k(()=>{K1();Q8();n56();Wj1=e(W6(),1),IC7=e(W6(),1),kg=e(W6(),1),Zj1=kg.createContext({themeSetting:hC7,setThemeSetting:()=>{},setPreviewTheme:()=>{},savePreview:()=>{},cancelPreview:()=>{},currentTheme:hC7})});function U0(A){switch(A){case"light":return N99;case"light-ansi":return v99;case"dark-ansi":return k99;case"light-daltonized":return E99;case"dark-daltonized":return y99;default:return L99}}function Tj1(A){let q=A.match(/rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)/);if(q){let K=parseInt(q[1],10),Y=parseInt(q[2],10),z=parseInt(q[3],10),w=R99.rgb(K,Y,z)("X");return w.slice(0,w.indexOf("X"))}return"\x1B[35m"}var sM8,Lk2,N99,v99,k99,E99,L99,y99,R99;var vb=k(()=>{iK();K9();sM8=["dark","light","light-daltonized","dark-daltonized","light-ansi","dark-ansi"],Lk2=["auto",...sM8],N99={autoAccept:"rgb(135,0,255)",bashBorder:"rgb(255,0,135)",claude:"rgb(215,119,87)",claudeShimmer:"rgb(245,149,117)",claudeBlue_FOR_SYSTEM_SPINNER:"rgb(87,105,247)",claudeBlueShimmer_FOR_SYSTEM_SPINNER:"rgb(117,135,255)",permission:"rgb(87,105,247)",permissionShimmer:"rgb(137,155,255)",planMode:"rgb(0,102,102)",ide:"rgb(71,130,200)",promptBorder:"rgb(153,153,153)",promptBorderShimmer:"rgb(183,183,183)",text:"rgb(0,0,0)",inverseText:"rgb(255,255,255)",inactive:"rgb(102,102,102)",inactiveShimmer:"rgb(142,142,142)",subtle:"rgb(175,175,175)",suggestion:"rgb(87,105,247)",remember:"rgb(0,0,255)",background:"rgb(0,153,153)",success:"rgb(44,122,57)",error:"rgb(171,43,63)",warning:"rgb(150,108,30)",merged:"rgb(135,0,255)",warningShimmer:"rgb(200,158,80)",diffAdded:"rgb(105,219,124)",diffRemoved:"rgb(255,168,180)",diffAddedDimmed:"rgb(199,225,203)",diffRemovedDimmed:"rgb(253,210,216)",diffAddedWord:"rgb(47,157,68)",diffRemovedWord:"rgb(209,69,75)",red_FOR_SUBAGENTS_ONLY:"rgb(220,38,38)",blue_FOR_SUBAGENTS_ONLY:"rgb(37,99,235)",green_FOR_SUBAGENTS_ONLY:"rgb(22,163,74)",yellow_FOR_SUBAGENTS_ONLY:"rgb(202,138,4)",purple_FOR_SUBAGENTS_ONLY:"rgb(147,51,234)",orange_FOR_SUBAGENTS_ONLY:"rgb(234,88,12)",pink_FOR_SUBAGENTS_ONLY:"rgb(219,39,119)",cyan_FOR_SUBAGENTS_ONLY:"rgb(8,145,178)",professionalBlue:"rgb(106,155,204)",chromeYellow:"rgb(251,188,4)",clawd_body:"rgb(215,119,87)",clawd_background:"rgb(0,0,0)",userMessageBackground:"rgb(240, 240, 240)",bashMessageBackgroundColor:"rgb(250, 245, 250)",memoryBackgroundColor:"rgb(230, 245, 250)",rate_limit_fill:"rgb(87,105,247)",rate_limit_empty:"rgb(39,47,111)",fastMode:"rgb(255,106,0)",fastModeShimmer:"rgb(255,150,50)",selectionBackground:"rgb(181,211,255)",rainbow_red:"rgb(235,95,87)",rainbow_orange:"rgb(245,139,87)",rainbow_yellow:"rgb(250,195,95)",rainbow_green:"rgb(145,200,130)",rainbow_blue:"rgb(130,170,220)",rainbow_indigo:"rgb(155,130,200)",rainbow_violet:"rgb(200,130,180)",rainbow_red_shimmer:"rgb(250,155,147)",rainbow_orange_shimmer:"rgb(255,185,137)",rainbow_yellow_shimmer:"rgb(255,225,155)",rainbow_green_shimmer:"rgb(185,230,180)",rainbow_blue_shimmer:"rgb(180,205,240)",rainbow_indigo_shimmer:"rgb(195,180,230)",rainbow_violet_shimmer:"rgb(230,180,210)"},v99={autoAccept:"ansi:magenta",bashBorder:"ansi:magenta",claude:"ansi:redBright",claudeShimmer:"ansi:yellowBright",claudeBlue_FOR_SYSTEM_SPINNER:"ansi:blue",claudeBlueShimmer_FOR_SYSTEM_SPINNER:"ansi:blueBright",permission:"ansi:blue",permissionShimmer:"ansi:blueBright",planMode:"ansi:cyan",ide:"ansi:blueBright",promptBorder:"ansi:white",promptBorderShimmer:"ansi:whiteBright",text:"ansi:black",inverseText:"ansi:white",inactive:"ansi:blackBright",inactiveShimmer:"ansi:white",subtle:"ansi:blackBright",suggestion:"ansi:blue",remember:"ansi:blue",background:"ansi:cyan",success:"ansi:green",error:"ansi:red",warning:"ansi:yellow",merged:"ansi:magenta",warningShimmer:"ansi:yellowBright",diffAdded:"ansi:green",diffRemoved:"ansi:red",diffAddedDimmed:"ansi:green",diffRemovedDimmed:"ansi:red",diffAddedWord:"ansi:greenBright",diffRemovedWord:"ansi:redBright",red_FOR_SUBAGENTS_ONLY:"ansi:red",blue_FOR_SUBAGENTS_ONLY:"ansi:blue",green_FOR_SUBAGENTS_ONLY:"ansi:green",yellow_FOR_SUBAGENTS_ONLY:"ansi:yellow",purple_FOR_SUBAGENTS_ONLY:"ansi:magenta",orange_FOR_SUBAGENTS_ONLY:"ansi:redBright",pink_FOR_SUBAGENTS_ONLY:"ansi:magentaBright",cyan_FOR_SUBAGENTS_ONLY:"ansi:cyan",professionalBlue:"ansi:blueBright",chromeYellow:"ansi:yellow",clawd_body:"ansi:redBright",clawd_background:"ansi:black",userMessageBackground:"ansi:white",bashMessageBackgroundColor:"ansi:whiteBright",memoryBackgroundColor:"ansi:white",rate_limit_fill:"ansi:yellow",rate_limit_empty:"ansi:black",fastMode:"ansi:red",fastModeShimmer:"ansi:redBright",selectionBackground:"ansi:blueBright",rainbow_red:"ansi:red",rainbow_orange:"ansi:redBright",rainbow_yellow:"ansi:yellow",rainbow_green:"ansi:green",rainbow_blue:"ansi:cyan",rainbow_indigo:"ansi:blue",rainbow_violet:"ansi:magenta",rainbow_red_shimmer:"ansi:redBright",rainbow_orange_shimmer:"ansi:yellow",rainbow_yellow_shimmer:"ansi:yellowBright",rainbow_green_shimmer:"ansi:greenBright",rainbow_blue_shimmer:"ansi:cyanBright",rainbow_indigo_shimmer:"ansi:blueBright",rainbow_violet_shimmer:"ansi:magentaBright"},k99={autoAccept:"ansi:magentaBright",bashBorder:"ansi:magentaBright",claude:"ansi:redBright",claudeShimmer:"ansi:yellowBright",claudeBlue_FOR_SYSTEM_SPINNER:"ansi:blueBright",claudeBlueShimmer_FOR_SYSTEM_SPINNER:"ansi:blueBright",permission:"ansi:blueBright",permissionShimmer:"ansi:blueBright",planMode:"ansi:cyanBright",ide:"ansi:blue",promptBorder:"ansi:white",promptBorderShimmer:"ansi:whiteBright",text:"ansi:whiteBright",inverseText:"ansi:black",inactive:"ansi:white",inactiveShimmer:"ansi:whiteBright",subtle:"ansi:white",suggestion:"ansi:blueBright",remember:"ansi:blueBright",background:"ansi:cyanBright",success:"ansi:greenBright",error:"ansi:redBright",warning:"ansi:yellowBright",merged:"ansi:magentaBright",warningShimmer:"ansi:yellowBright",diffAdded:"ansi:green",diffRemoved:"ansi:red",diffAddedDimmed:"ansi:green",diffRemovedDimmed:"ansi:red",diffAddedWord:"ansi:greenBright",diffRemovedWord:"ansi:redBright",red_FOR_SUBAGENTS_ONLY:"ansi:redBright",blue_FOR_SUBAGENTS_ONLY:"ansi:blueBright",green_FOR_SUBAGENTS_ONLY:"ansi:greenBright",yellow_FOR_SUBAGENTS_ONLY:"ansi:yellowBright",purple_FOR_SUBAGENTS_ONLY:"ansi:magentaBright",orange_FOR_SUBAGENTS_ONLY:"ansi:redBright",pink_FOR_SUBAGENTS_ONLY:"ansi:magentaBright",cyan_FOR_SUBAGENTS_ONLY:"ansi:cyanBright",professionalBlue:"rgb(106,155,204)",chromeYellow:"ansi:yellowBright",clawd_body:"ansi:redBright",clawd_background:"ansi:black",userMessageBackground:"ansi:blackBright",bashMessageBackgroundColor:"ansi:black",memoryBackgroundColor:"ansi:blackBright",rate_limit_fill:"ansi:yellow",rate_limit_empty:"ansi:white",fastMode:"ansi:redBright",fastModeShimmer:"ansi:redBright",selectionBackground:"ansi:blue",rainbow_red:"ansi:red",rainbow_orange:"ansi:redBright",rainbow_yellow:"ansi:yellow",rainbow_green:"ansi:green",rainbow_blue:"ansi:cyan",rainbow_indigo:"ansi:blue",rainbow_violet:"ansi:magenta",rainbow_red_shimmer:"ansi:redBright",rainbow_orange_shimmer:"ansi:yellow",rainbow_yellow_shimmer:"ansi:yellowBright",rainbow_green_shimmer:"ansi:greenBright",rainbow_blue_shimmer:"ansi:cyanBright",rainbow_indigo_shimmer:"ansi:blueBright",rainbow_violet_shimmer:"ansi:magentaBright"},E99={autoAccept:"rgb(135,0,255)",bashBorder:"rgb(0,102,204)",claude:"rgb(255,153,51)",claudeShimmer:"rgb(255,183,101)",claudeBlue_FOR_SYSTEM_SPINNER:"rgb(51,102,255)",claudeBlueShimmer_FOR_SYSTEM_SPINNER:"rgb(101,152,255)",permission:"rgb(51,102,255)",permissionShimmer:"rgb(101,152,255)",planMode:"rgb(51,102,102)",ide:"rgb(71,130,200)",promptBorder:"rgb(153,153,153)",promptBorderShimmer:"rgb(183,183,183)",text:"rgb(0,0,0)",inverseText:"rgb(255,255,255)",inactive:"rgb(102,102,102)",inactiveShimmer:"rgb(142,142,142)",subtle:"rgb(175,175,175)",suggestion:"rgb(51,102,255)",remember:"rgb(51,102,255)",background:"rgb(0,153,153)",success:"rgb(0,102,153)",error:"rgb(204,0,0)",warning:"rgb(255,153,0)",merged:"rgb(135,0,255)",warningShimmer:"rgb(255,183,50)",diffAdded:"rgb(153,204,255)",diffRemoved:"rgb(255,204,204)",diffAddedDimmed:"rgb(209,231,253)",diffRemovedDimmed:"rgb(255,233,233)",diffAddedWord:"rgb(51,102,204)",diffRemovedWord:"rgb(153,51,51)",red_FOR_SUBAGENTS_ONLY:"rgb(204,0,0)",blue_FOR_SUBAGENTS_ONLY:"rgb(0,102,204)",green_FOR_SUBAGENTS_ONLY:"rgb(0,204,0)",yellow_FOR_SUBAGENTS_ONLY:"rgb(255,204,0)",purple_FOR_SUBAGENTS_ONLY:"rgb(128,0,128)",orange_FOR_SUBAGENTS_ONLY:"rgb(255,128,0)",pink_FOR_SUBAGENTS_ONLY:"rgb(255,102,178)",cyan_FOR_SUBAGENTS_ONLY:"rgb(0,178,178)",professionalBlue:"rgb(106,155,204)",chromeYellow:"rgb(251,188,4)",clawd_body:"rgb(215,119,87)",clawd_background:"rgb(0,0,0)",userMessageBackground:"rgb(220, 220, 220)",bashMessageBackgroundColor:"rgb(250, 245, 250)",memoryBackgroundColor:"rgb(230, 245, 250)",rate_limit_fill:"rgb(51,102,255)",rate_limit_empty:"rgb(23,46,114)",fastMode:"rgb(255,106,0)",fastModeShimmer:"rgb(255,150,50)",selectionBackground:"rgb(181,211,255)",rainbow_red:"rgb(235,95,87)",rainbow_orange:"rgb(245,139,87)",rainbow_yellow:"rgb(250,195,95)",rainbow_green:"rgb(145,200,130)",rainbow_blue:"rgb(130,170,220)",rainbow_indigo:"rgb(155,130,200)",rainbow_violet:"rgb(200,130,180)",rainbow_red_shimmer:"rgb(250,155,147)",rainbow_orange_shimmer:"rgb(255,185,137)",rainbow_yellow_shimmer:"rgb(255,225,155)",rainbow_green_shimmer:"rgb(185,230,180)",rainbow_blue_shimmer:"rgb(180,205,240)",rainbow_indigo_shimmer:"rgb(195,180,230)",rainbow_violet_shimmer:"rgb(230,180,210)"},L99={autoAccept:"rgb(175,135,255)",bashBorder:"rgb(253,93,177)",claude:"rgb(215,119,87)",claudeShimmer:"rgb(235,159,127)",claudeBlue_FOR_SYSTEM_SPINNER:"rgb(147,165,255)",claudeBlueShimmer_FOR_SYSTEM_SPINNER:"rgb(177,195,255)",permission:"rgb(177,185,249)",permissionShimmer:"rgb(207,215,255)",planMode:"rgb(72,150,140)",ide:"rgb(71,130,200)",promptBorder:"rgb(136,136,136)",promptBorderShimmer:"rgb(166,166,166)",text:"rgb(255,255,255)",inverseText:"rgb(0,0,0)",inactive:"rgb(153,153,153)",inactiveShimmer:"rgb(193,193,193)",subtle:"rgb(80,80,80)",suggestion:"rgb(177,185,249)",remember:"rgb(177,185,249)",background:"rgb(0,204,204)",success:"rgb(78,186,101)",error:"rgb(255,107,128)",warning:"rgb(255,193,7)",merged:"rgb(175,135,255)",warningShimmer:"rgb(255,223,57)",diffAdded:"rgb(34,92,43)",diffRemoved:"rgb(122,41,54)",diffAddedDimmed:"rgb(71,88,74)",diffRemovedDimmed:"rgb(105,72,77)",diffAddedWord:"rgb(56,166,96)",diffRemovedWord:"rgb(179,89,107)",red_FOR_SUBAGENTS_ONLY:"rgb(220,38,38)",blue_FOR_SUBAGENTS_ONLY:"rgb(37,99,235)",green_FOR_SUBAGENTS_ONLY:"rgb(22,163,74)",yellow_FOR_SUBAGENTS_ONLY:"rgb(202,138,4)",purple_FOR_SUBAGENTS_ONLY:"rgb(147,51,234)",orange_FOR_SUBAGENTS_ONLY:"rgb(234,88,12)",pink_FOR_SUBAGENTS_ONLY:"rgb(219,39,119)",cyan_FOR_SUBAGENTS_ONLY:"rgb(8,145,178)",professionalBlue:"rgb(106,155,204)",chromeYellow:"rgb(251,188,4)",clawd_body:"rgb(215,119,87)",clawd_background:"rgb(0,0,0)",userMessageBackground:"rgb(55, 55, 55)",bashMessageBackgroundColor:"rgb(65, 60, 65)",memoryBackgroundColor:"rgb(55, 65, 70)",rate_limit_fill:"rgb(177,185,249)",rate_limit_empty:"rgb(80,83,112)",fastMode:"rgb(255,120,20)",fastModeShimmer:"rgb(255,165,70)",selectionBackground:"rgb(38,58,94)",rainbow_red:"rgb(235,95,87)",rainbow_orange:"rgb(245,139,87)",rainbow_yellow:"rgb(250,195,95)",rainbow_green:"rgb(145,200,130)",rainbow_blue:"rgb(130,170,220)",rainbow_indigo:"rgb(155,130,200)",rainbow_violet:"rgb(200,130,180)",rainbow_red_shimmer:"rgb(250,155,147)",rainbow_orange_shimmer:"rgb(255,185,137)",rainbow_yellow_shimmer:"rgb(255,225,155)",rainbow_green_shimmer:"rgb(185,230,180)",rainbow_blue_shimmer:"rgb(180,205,240)",rainbow_indigo_shimmer:"rgb(195,180,230)",rainbow_violet_shimmer:"rgb(230,180,210)"},y99={autoAccept:"rgb(175,135,255)",bashBorder:"rgb(51,153,255)",claude:"rgb(255,153,51)",claudeShimmer:"rgb(255,183,101)",claudeBlue_FOR_SYSTEM_SPINNER:"rgb(153,204,255)",claudeBlueShimmer_FOR_SYSTEM_SPINNER:"rgb(183,224,255)",permission:"rgb(153,204,255)",permissionShimmer:"rgb(183,224,255)",planMode:"rgb(102,153,153)",ide:"rgb(71,130,200)",promptBorder:"rgb(136,136,136)",promptBorderShimmer:"rgb(166,166,166)",text:"rgb(255,255,255)",inverseText:"rgb(0,0,0)",inactive:"rgb(153,153,153)",inactiveShimmer:"rgb(193,193,193)",subtle:"rgb(80,80,80)",suggestion:"rgb(153,204,255)",remember:"rgb(153,204,255)",background:"rgb(0,204,204)",success:"rgb(51,153,255)",error:"rgb(255,102,102)",warning:"rgb(255,204,0)",merged:"rgb(175,135,255)",warningShimmer:"rgb(255,234,50)",diffAdded:"rgb(0,68,102)",diffRemoved:"rgb(102,0,0)",diffAddedDimmed:"rgb(62,81,91)",diffRemovedDimmed:"rgb(62,44,44)",diffAddedWord:"rgb(0,119,179)",diffRemovedWord:"rgb(179,0,0)",red_FOR_SUBAGENTS_ONLY:"rgb(255,102,102)",blue_FOR_SUBAGENTS_ONLY:"rgb(102,178,255)",green_FOR_SUBAGENTS_ONLY:"rgb(102,255,102)",yellow_FOR_SUBAGENTS_ONLY:"rgb(255,255,102)",purple_FOR_SUBAGENTS_ONLY:"rgb(178,102,255)",orange_FOR_SUBAGENTS_ONLY:"rgb(255,178,102)",pink_FOR_SUBAGENTS_ONLY:"rgb(255,153,204)",cyan_FOR_SUBAGENTS_ONLY:"rgb(102,204,204)",professionalBlue:"rgb(106,155,204)",chromeYellow:"rgb(251,188,4)",clawd_body:"rgb(215,119,87)",clawd_background:"rgb(0,0,0)",userMessageBackground:"rgb(55, 55, 55)",bashMessageBackgroundColor:"rgb(65, 60, 65)",memoryBackgroundColor:"rgb(55, 65, 70)",rate_limit_fill:"rgb(153,204,255)",rate_limit_empty:"rgb(69,92,115)",fastMode:"rgb(255,120,20)",fastModeShimmer:"rgb(255,165,70)",selectionBackground:"rgb(38,58,94)",rainbow_red:"rgb(235,95,87)",rainbow_orange:"rgb(245,139,87)",rainbow_yellow:"rgb(250,195,95)",rainbow_green:"rgb(145,200,130)",rainbow_blue:"rgb(130,170,220)",rainbow_indigo:"rgb(155,130,200)",rainbow_violet:"rgb(200,130,180)",rainbow_red_shimmer:"rgb(250,155,147)",rainbow_orange_shimmer:"rgb(255,185,137)",rainbow_yellow_shimmer:"rgb(255,225,155)",rainbow_green_shimmer:"rgb(185,230,180)",rainbow_blue_shimmer:"rgb(180,205,240)",rainbow_indigo_shimmer:"rgb(195,180,230)",rainbow_violet_shimmer:"rgb(230,180,210)"};R99=YA.terminal==="Apple_Terminal"?new t78({level:2}):M1});function AW6(A,q){if(!A)return;if(A.startsWith("rgb(")||A.startsWith("#")||A.startsWith("ansi256(")||A.startsWith("ansi:"))return A;return q[A]}function S99(A){let q=Y6(33),K,Y,z,w,_,$,O,H,j;if(q[0]!==A)({borderColor:z,borderTopColor:$,borderBottomColor:Y,borderLeftColor:w,borderRightColor:_,backgroundColor:K,children:O,ref:H,...j}=A),q[0]=A,q[1]=K,q[2]=Y,q[3]=z,q[4]=w,q[5]=_,q[6]=$,q[7]=O,q[8]=H,q[9]=j;else K=q[1],Y=q[2],z=q[3],w=q[4],_=q[5],$=q[6],O=q[7],H=q[8],j=q[9];let[J]=G7(),M,D,X,P,W,Z;if(q[10]!==K||q[11]!==Y||q[12]!==z||q[13]!==w||q[14]!==_||q[15]!==$||q[16]!==J){let V=U0(J);D=AW6(z,V),W=AW6($,V),M=AW6(Y,V),X=AW6(w,V),P=AW6(_,V),Z=AW6(K,V),q[10]=K,q[11]=Y,q[12]=z,q[13]=w,q[14]=_,q[15]=$,q[16]=J,q[17]=M,q[18]=D,q[19]=X,q[20]=P,q[21]=W,q[22]=Z}else M=q[17],D=q[18],X=q[19],P=q[20],W=q[21],Z=q[22];let G=Z,f;if(q[23]!==O||q[24]!==H||q[25]!==G||q[26]!==M||q[27]!==D||q[28]!==X||q[29]!==P||q[30]!==W||q[31]!==j)f=bC7.default.createElement(bM,{ref:H,borderColor:D,borderTopColor:W,borderBottomColor:M,borderLeftColor:X,borderRightColor:P,backgroundColor:G,...j},O),q[23]=O,q[24]=H,q[25]=G,q[26]=M,q[27]=D,q[28]=X,q[29]=P,q[30]=W,q[31]=j,q[32]=f;else f=q[32];return f}var bC7,m;var xC7=k(()=>{K1();vb();e06();we();bC7=e(W6(),1);m=S99});function C99(A,q){if(!A)return;if(A.startsWith("rgb(")||A.startsWith("#")||A.startsWith("ansi256(")||A.startsWith("ansi:"))return A;return q[A]}function T(A){let q=Y6(15),{color:K,backgroundColor:Y,dimColor:z,bold:w,italic:_,underline:$,strikethrough:O,inverse:H,wrap:j,children:J}=A,M=z===void 0?!1:z,D=w===void 0?!1:w,X=_===void 0?!1:_,P=$===void 0?!1:$,W=O===void 0?!1:O,Z=H===void 0?!1:H,G=j===void 0?"wrap":j,[f]=G7(),V,N;if(q[0]!==K||q[1]!==M||q[2]!==f)N=U0(f),V=M?N.inactive:C99(K,N),q[0]=K,q[1]=M,q[2]=f,q[3]=V,q[4]=N;else V=q[3],N=q[4];let v=V,y=Y?N[Y]:void 0,R;if(q[5]!==D||q[6]!==J||q[7]!==Z||q[8]!==X||q[9]!==y||q[10]!==v||q[11]!==W||q[12]!==P||q[13]!==G)R=uC7.default.createElement(Cz,{color:v,backgroundColor:y,bold:D,italic:X,underline:P,strikethrough:W,inverse:Z,wrap:G},J),q[5]=D,q[6]=J,q[7]=Z,q[8]=X,q[9]=y,q[10]=v,q[11]=W,q[12]=P,q[13]=G,q[14]=R;else R=q[14];return R}var uC7;var Ig6=k(()=>{K1();vb();e06();d56();uC7=e(W6(),1)});var gC7=C((gk2,mC7)=>{var h99=g6("os"),BC7=g6("tty"),wS=UC6(),{env:_P}=process,Xe;if(wS("no-color")||wS("no-colors")||wS("color=false")||wS("color=never"))Xe=0;else if(wS("color")||wS("colors")||wS("color=true")||wS("color=always"))Xe=1;if("FORCE_COLOR"in _P)if(_P.FORCE_COLOR==="true")Xe=1;else if(_P.FORCE_COLOR==="false")Xe=0;else Xe=_P.FORCE_COLOR.length===0?1:Math.min(parseInt(_P.FORCE_COLOR,10),3);function tM8(A){if(A===0)return!1;return{level:A,hasBasic:!0,has256:A>=2,has16m:A>=3}}function eM8(A,q){if(Xe===0)return 0;if(wS("color=16m")||wS("color=full")||wS("color=truecolor"))return 3;if(wS("color=256"))return 2;if(A&&!q&&Xe===void 0)return 0;let K=Xe||0;if(_P.TERM==="dumb")return K;if(process.platform==="win32"){let Y=h99.release().split(".");if(Number(Y[0])>=10&&Number(Y[2])>=10586)return Number(Y[2])>=14931?3:2;return 1}if("CI"in _P){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((Y)=>(Y in _P))||_P.CI_NAME==="codeship")return 1;return K}if("TEAMCITY_VERSION"in _P)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(_P.TEAMCITY_VERSION)?1:0;if(_P.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in _P){let Y=parseInt((_P.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(_P.TERM_PROGRAM){case"iTerm.app":return Y>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(_P.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(_P.TERM))return 1;if("COLORTERM"in _P)return 1;return K}function I99(A){let q=eM8(A,A&&A.isTTY);return tM8(q)}mC7.exports={supportsColor:I99,stdout:tM8(eM8(!0,BC7.isatty(1))),stderr:tM8(eM8(!0,BC7.isatty(2)))}});var UC7=C((Fk2,QC7)=>{var b99=gC7(),qW6=UC6();function FC7(A){if(/^\d{3,4}$/.test(A)){let K=/(\d{1,2})(\d{2})/.exec(A);return{major:0,minor:parseInt(K[1],10),patch:parseInt(K[2],10)}}let q=(A||"").split(".").map((K)=>parseInt(K,10));return{major:q[0],minor:q[1],patch:q[2]}}function AD8(A){let{env:q}=process;if("FORCE_HYPERLINK"in q)return!(q.FORCE_HYPERLINK.length>0&&parseInt(q.FORCE_HYPERLINK,10)===0);if(qW6("no-hyperlink")||qW6("no-hyperlinks")||qW6("hyperlink=false")||qW6("hyperlink=never"))return!1;if(qW6("hyperlink=true")||qW6("hyperlink=always"))return!0;if("NETLIFY"in q)return!0;if(!b99.supportsColor(A))return!1;if(A&&!A.isTTY)return!1;if(process.platform==="win32")return!1;if("CI"in q)return!1;if("TEAMCITY_VERSION"in q)return!1;if("TERM_PROGRAM"in q){let K=FC7(q.TERM_PROGRAM_VERSION);switch(q.TERM_PROGRAM){case"iTerm.app":if(K.major===3)return K.minor>=1;return K.major>3;case"WezTerm":return K.major>=20200620;case"vscode":return K.major>1||K.major===1&&K.minor>=72}}if("VTE_VERSION"in q){if(q.VTE_VERSION==="0.50.0")return!1;let K=FC7(q.VTE_VERSION);return K.major>0||K.minor>=50}return!1}QC7.exports={supportsHyperlink:AD8,stdout:AD8(process.stdout),stderr:AD8(process.stderr)}});function ef(A){if(A?.stdoutSupported??qD8.default.stdout)return!0;let K=A?.env??process.env,Y=K.TERM_PROGRAM;if(Y&&pC7.includes(Y))return!0;let z=K.LC_TERMINAL;if(z&&pC7.includes(z))return!0;if(K.TERM?.includes("kitty"))return!0;return!1}var qD8,pC7;var tc=k(()=>{qD8=e(UC7(),1),pC7=["ghostty","Hyper","kitty","alacritty","iTerm.app","iTerm2"]});function d7(A){let q=Y6(5),{children:K,url:Y,fallback:z}=A,w=K??Y;if(ef()){let O;if(q[0]!==w||q[1]!==Y)O=Vj1.default.createElement(Cz,null,Vj1.default.createElement("ink-link",{href:Y},w)),q[0]=w,q[1]=Y,q[2]=O;else O=q[2];return O}let _=z??w,$;if(q[3]!==_)$=Vj1.default.createElement(Cz,null,_),q[3]=_,q[4]=$;else $=q[4];return $}var Vj1;var r56=k(()=>{K1();tc();d56();Vj1=e(W6(),1)});function KW6(){return{bold:!1,dim:!1,italic:!1,underline:"none",blink:!1,inverse:!1,hidden:!1,strikethrough:!1,overline:!1,fg:{type:"default"},bg:{type:"default"},underlineColor:{type:"default"}}}function dC7(A){if(A.length===0)return null;let q=A[0];if(q==="c")return{type:"reset"};if(q==="7")return{type:"cursor",action:{type:"save"}};if(q==="8")return{type:"cursor",action:{type:"restore"}};if(q==="D")return{type:"cursor",action:{type:"move",direction:"down",count:1}};if(q==="M")return{type:"cursor",action:{type:"move",direction:"up",count:1}};if(q==="E")return{type:"cursor",action:{type:"nextLine",count:1}};if(q==="H")return null;if("()".includes(q)&&A.length>=2)return null;return{type:"unknown",sequence:`\x1B${A}`}}function u99(A){if(A==="")return[{value:0,subparams:[],colon:!1}];let q=[],K={value:null,subparams:[],colon:!1},Y="",z=!1;for(let w=0;w<=A.length;w++){let _=A[w];if(_===";"||_===void 0){let $=Y===""?null:parseInt(Y,10);if(z){if($!==null)K.subparams.push($)}else K.value=$;q.push(K),K={value:null,subparams:[],colon:!1},Y="",z=!1}else if(_===":"){let $=Y===""?null:parseInt(Y,10);if(!z)K.value=$,K.colon=!0,z=!0;else if($!==null)K.subparams.push($);Y=""}else if(_>="0"&&_<="9")Y+=_}return q}function KD8(A,q){let K=A[q];if(!K)return null;if(K.colon&&K.subparams.length>=1){if(K.subparams[0]===5&&K.subparams.length>=2)return{index:K.subparams[1]};if(K.subparams[0]===2&&K.subparams.length>=4){let z=K.subparams.length>=5?1:0;return{r:K.subparams[1+z],g:K.subparams[2+z],b:K.subparams[3+z]}}}let Y=A[q+1];if(!Y)return null;if(Y.value===5&&A[q+2]?.value!==null&&A[q+2]?.value!==void 0)return{index:A[q+2].value};if(Y.value===2){let z=A[q+2]?.value,w=A[q+3]?.value,_=A[q+4]?.value;if(z!==null&&z!==void 0&&w!==null&&w!==void 0&&_!==null&&_!==void 0)return{r:z,g:w,b:_}}return null}function cC7(A,q){let K=u99(A),Y={...q},z=0;while(z=30&&_<=37){Y.fg={type:"named",name:Nj1[_-30]},z++;continue}if(_===39){Y.fg={type:"default"},z++;continue}if(_>=40&&_<=47){Y.bg={type:"named",name:Nj1[_-40]},z++;continue}if(_===49){Y.bg={type:"default"},z++;continue}if(_>=90&&_<=97){Y.fg={type:"named",name:Nj1[_-90+8]},z++;continue}if(_>=100&&_<=107){Y.bg={type:"named",name:Nj1[_-100+8]},z++;continue}if(_===38){let $=KD8(K,z);if($){Y.fg="index"in $?{type:"indexed",index:$.index}:{type:"rgb",...$},z+=w.colon?1:("index"in $)?3:5;continue}}if(_===48){let $=KD8(K,z);if($){Y.bg="index"in $?{type:"indexed",index:$.index}:{type:"rgb",...$},z+=w.colon?1:("index"in $)?3:5;continue}}if(_===58){let $=KD8(K,z);if($){Y.underlineColor="index"in $?{type:"indexed",index:$.index}:{type:"rgb",...$},z+=w.colon?1:("index"in $)?3:5;continue}}if(_===59){Y.underlineColor={type:"default"},z++;continue}z++}return Y}var Nj1,x99;var lC7=k(()=>{Nj1=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],x99=["none","single","double","curly","dotted","dashed"]});function B99(A){return A>=9728&&A<=9983||A>=9984&&A<=10175||A>=127744&&A<=129535||A>=129536&&A<=129791||A>=127456&&A<=127487}function m99(A){return A>=4352&&A<=4447||A>=11904&&A<=40959||A>=44032&&A<=55203||A>=63744&&A<=64255||A>=65040&&A<=65055||A>=65072&&A<=65135||A>=65280&&A<=65376||A>=65504&&A<=65510||A>=131072&&A<=196605||A>=196608&&A<=262141}function g99(A){let q=0;for(let K of A)if(q++,q>1)return!0;return!1}function F99(A){if(g99(A))return 2;let q=A.codePointAt(0);if(q===void 0)return 1;if(B99(q)||m99(q))return 2;return 1}function*iC7(A){for(let{segment:q}of hj().segment(A))yield{value:q,width:F99(q)}}function Q99(A){if(A==="")return[];return A.split(/[;:]/).map((q)=>q===""?0:parseInt(q,10))}function U99(A){let q=A.slice(2);if(q.length===0)return null;let K=q.charCodeAt(q.length-1),Y=q.slice(0,-1),z="",w=Y,_="";if(Y.length>0&&"?>=".includes(Y[0]))z=Y[0],w=Y.slice(1);let $=w.match(/([^0-9;:]+)$/);if($)_=$[1],w=w.slice(0,-_.length);let O=Q99(w),H=O[0]??1,j=O[1]??1;if(K===aO.SGR&&z==="")return{type:"sgr",params:w};if(K===aO.CUU)return{type:"cursor",action:{type:"move",direction:"up",count:H}};if(K===aO.CUD)return{type:"cursor",action:{type:"move",direction:"down",count:H}};if(K===aO.CUF)return{type:"cursor",action:{type:"move",direction:"forward",count:H}};if(K===aO.CUB)return{type:"cursor",action:{type:"move",direction:"back",count:H}};if(K===aO.CNL)return{type:"cursor",action:{type:"nextLine",count:H}};if(K===aO.CPL)return{type:"cursor",action:{type:"prevLine",count:H}};if(K===aO.CHA)return{type:"cursor",action:{type:"column",col:H}};if(K===aO.CUP||K===aO.HVP)return{type:"cursor",action:{type:"position",row:H,col:j}};if(K===aO.VPA)return{type:"cursor",action:{type:"row",row:H}};if(K===aO.ED)return{type:"erase",action:{type:"display",region:Uy7[O[0]??0]??"toEnd"}};if(K===aO.EL)return{type:"erase",action:{type:"line",region:py7[O[0]??0]??"toEnd"}};if(K===aO.ECH)return{type:"erase",action:{type:"chars",count:H}};if(K===aO.SU)return{type:"scroll",action:{type:"up",count:H}};if(K===aO.SD)return{type:"scroll",action:{type:"down",count:H}};if(K===aO.DECSTBM)return{type:"scroll",action:{type:"setRegion",top:H,bottom:j}};if(K===aO.SCOSC)return{type:"cursor",action:{type:"save"}};if(K===aO.SCORC)return{type:"cursor",action:{type:"restore"}};if(K===aO.DECSCUSR&&_===" ")return{type:"cursor",action:{type:"style",...BJ8[H]??BJ8[0]}};if(z==="?"&&(K===aO.SM||K===aO.RM)){let J=K===aO.SM;if(H===qO.CURSOR_VISIBLE)return{type:"cursor",action:J?{type:"show"}:{type:"hide"}};if(H===qO.ALT_SCREEN_CLEAR||H===qO.ALT_SCREEN)return{type:"mode",action:{type:"alternateScreen",enabled:J}};if(H===qO.BRACKETED_PASTE)return{type:"mode",action:{type:"bracketedPaste",enabled:J}};if(H===qO.MOUSE_NORMAL)return{type:"mode",action:{type:"mouseTracking",mode:J?"normal":"off"}};if(H===qO.MOUSE_BUTTON)return{type:"mode",action:{type:"mouseTracking",mode:J?"button":"off"}};if(H===qO.MOUSE_ANY)return{type:"mode",action:{type:"mouseTracking",mode:J?"any":"off"}};if(H===qO.FOCUS_EVENTS)return{type:"mode",action:{type:"focusEvents",enabled:J}}}return{type:"unknown",sequence:A}}function p99(A){if(A.length<2)return"unknown";if(A.charCodeAt(0)!==fg.ESC)return"unknown";let q=A.charCodeAt(1);if(q===91)return"csi";if(q===93)return"osc";if(q===79)return"ss3";return"esc"}class vj1{tokenizer=C06();style=KW6();inLink=!1;linkUrl;reset(){this.tokenizer.reset(),this.style=KW6(),this.inLink=!1,this.linkUrl=void 0}feed(A){let q=this.tokenizer.feed(A),K=[];for(let Y of q){let z=this.processToken(Y);K.push(...z)}return K}processToken(A){switch(A.type){case"text":return this.processText(A.value);case"sequence":return this.processSequence(A.value)}}processText(A){let q=[],K="";for(let Y of A)if(Y.charCodeAt(0)===fg.BEL){if(K){let z=[...iC7(K)];if(z.length>0)q.push({type:"text",graphemes:z,style:{...this.style}});K=""}q.push({type:"bell"})}else K+=Y;if(K){let Y=[...iC7(K)];if(Y.length>0)q.push({type:"text",graphemes:Y,style:{...this.style}})}return q}processSequence(A){switch(p99(A)){case"csi":{let K=U99(A);if(!K)return[];if(K.type==="sgr")return this.style=cC7(K.params,this.style),[];return[K]}case"osc":{let K=A.slice(2);if(K.endsWith("\x07"))K=K.slice(0,-1);else if(K.endsWith("\x1B\\"))K=K.slice(0,-2);let Y=XS7(K);if(Y){if(Y.type==="link")if(Y.action.type==="start")this.inLink=!0,this.linkUrl=Y.action.url;else this.inLink=!1,this.linkUrl=void 0;return[Y]}return[]}case"esc":{let K=A.slice(1),Y=dC7(K);return Y?[Y]:[]}case"ss3":return[{type:"unknown",sequence:A}];default:return[{type:"unknown",sequence:A}]}}}var nC7=k(()=>{y56();Zb();Je();Tg();lC7();gH1();YR()});var rC7=k(()=>{nC7()});function d99(A){let K=new vj1().feed(A),Y=[],z;for(let w of K){if(w.type==="link"){if(w.action.type==="start")z=w.action.url;else z=void 0;continue}if(w.type==="text"){let _=w.graphemes.map((H)=>H.value).join("");if(!_)continue;let $=c99(w.style);if(z)$.hyperlink=z;let O=Y[Y.length-1];if(O&&i99(O.props,$))O.text+=_;else Y.push({text:_,props:$})}}return Y}function c99(A){let q={};if(A.bold)q.bold=!0;if(A.dim)q.dim=!0;if(A.italic)q.italic=!0;if(A.underline!=="none")q.underline=!0;if(A.strikethrough)q.strikethrough=!0;if(A.inverse)q.inverse=!0;let K=oC7(A.fg);if(K)q.color=K;let Y=oC7(A.bg);if(Y)q.backgroundColor=Y;return q}function oC7(A){switch(A.type){case"named":return l99[A.name];case"indexed":return`ansi256(${A.index})`;case"rgb":return`rgb(${A.r},${A.g},${A.b})`;case"default":return}}function i99(A,q){return A.color===q.color&&A.backgroundColor===q.backgroundColor&&A.bold===q.bold&&A.dim===q.dim&&A.italic===q.italic&&A.underline===q.underline&&A.strikethrough===q.strikethrough&&A.inverse===q.inverse&&A.hyperlink===q.hyperlink}function n99(A){return A.color!==void 0||A.backgroundColor!==void 0||A.dim===!0||A.bold===!0||A.italic===!0||A.underline===!0||A.strikethrough===!0||A.inverse===!0||A.hyperlink!==void 0}function r99(A){return A.color!==void 0||A.backgroundColor!==void 0||A.dim===!0||A.bold===!0||A.italic===!0||A.underline===!0||A.strikethrough===!0||A.inverse===!0}function aC7(A){let q=Y6(14),K,Y,z,w;if(q[0]!==A)({bold:K,dim:z,children:Y,...w}=A),q[0]=A,q[1]=K,q[2]=Y,q[3]=z,q[4]=w;else K=q[1],Y=q[2],z=q[3],w=q[4];if(z){let $;if(q[5]!==Y||q[6]!==w)$=AT.default.createElement(Cz,{...w,dim:!0},Y),q[5]=Y,q[6]=w,q[7]=$;else $=q[7];return $}if(K){let $;if(q[8]!==Y||q[9]!==w)$=AT.default.createElement(Cz,{...w,bold:!0},Y),q[8]=Y,q[9]=w,q[10]=$;else $=q[10];return $}let _;if(q[11]!==Y||q[12]!==w)_=AT.default.createElement(Cz,{...w},Y),q[11]=Y,q[12]=w,q[13]=_;else _=q[13];return _}var AT,CK,l99;var sC7=k(()=>{K1();d56();r56();rC7();AT=e(W6(),1),CK=AT.default.memo(function(q){let K=Y6(12),{children:Y,dimColor:z}=q;if(typeof Y!=="string"){let H;if(K[0]!==Y||K[1]!==z)H=z?AT.default.createElement(Cz,{dim:!0},String(Y)):AT.default.createElement(Cz,null,String(Y)),K[0]=Y,K[1]=z,K[2]=H;else H=K[2];return H}if(Y==="")return null;let w,_;if(K[3]!==Y||K[4]!==z){_=Symbol.for("react.early_return_sentinel");A:{let H=d99(Y);if(H.length===0){_=null;break A}if(H.length===1&&!n99(H[0].props)){_=z?AT.default.createElement(Cz,{dim:!0},H[0].text):AT.default.createElement(Cz,null,H[0].text);break A}let j;if(K[7]!==z)j=(J,M)=>{let D=J.props.hyperlink;if(z)J.props.dim=!0;let X=r99(J.props);if(D)return X?AT.default.createElement(d7,{key:M,url:D},AT.default.createElement(aC7,{color:J.props.color,backgroundColor:J.props.backgroundColor,dim:J.props.dim,bold:J.props.bold,italic:J.props.italic,underline:J.props.underline,strikethrough:J.props.strikethrough,inverse:J.props.inverse},J.text)):AT.default.createElement(d7,{key:M,url:D},J.text);return X?AT.default.createElement(aC7,{key:M,color:J.props.color,backgroundColor:J.props.backgroundColor,dim:J.props.dim,bold:J.props.bold,italic:J.props.italic,underline:J.props.underline,strikethrough:J.props.strikethrough,inverse:J.props.inverse},J.text):J.text},K[7]=z,K[8]=j;else j=K[8];w=H.map(j)}K[3]=Y,K[4]=z,K[5]=w,K[6]=_}else w=K[5],_=K[6];if(_!==Symbol.for("react.early_return_sentinel"))return _;let $=w,O;if(K[9]!==$||K[10]!==z)O=z?AT.default.createElement(Cz,{dim:!0},$):AT.default.createElement(Cz,null,$),K[9]=$,K[10]=z,K[11]=O;else O=K[11];return O});l99={black:"ansi:black",red:"ansi:red",green:"ansi:green",yellow:"ansi:yellow",blue:"ansi:blue",magenta:"ansi:magenta",cyan:"ansi:cyan",white:"ansi:white",brightBlack:"ansi:blackBright",brightRed:"ansi:redBright",brightGreen:"ansi:greenBright",brightYellow:"ansi:yellowBright",brightBlue:"ansi:blueBright",brightMagenta:"ansi:magentaBright",brightCyan:"ansi:cyanBright",brightWhite:"ansi:whiteBright"}});function kj1(A){let q=Y6(6),{lines:K,width:Y}=A;if(K.length===0)return null;let z;if(q[0]!==K)z=K.join(` `),q[0]=K,q[1]=z;else z=q[1];let w;if(q[2]!==K.length||q[3]!==z||q[4]!==Y)w=tC7.default.createElement("ink-raw-ansi",{rawText:z,rawWidth:Y,rawHeight:K.length}),q[2]=K.length,q[3]=z,q[4]=Y,q[5]=w;else w=q[5];return w}var tC7;var eC7=k(()=>{K1();tC7=e(W6(),1)});function uM(A){let q=Y6(4),{count:K}=A,Y=K===void 0?1:K,z;if(q[0]!==Y)z=` `.repeat(Y),q[0]=Y,q[1]=z;else z=q[1];let w;if(q[2]!==z)w=Ah7.default.createElement("ink-text",null,z),q[2]=z,q[3]=w;else w=q[3];return w}var Ah7;var qh7=k(()=>{K1();Ah7=e(W6(),1)});function YD8(){let A=Y6(1),q;if(A[0]===Symbol.for("react.memo_cache_sentinel"))q=Kh7.default.createElement(bM,{flexGrow:1}),A[0]=q;else q=A[0];return q}var Kh7;var Yh7=k(()=>{K1();we();Kh7=e(W6(),1)});function ec(A){let q=Y6(8),K,Y,z;if(q[0]!==A)({children:Y,fromLeftEdge:z,...K}=A),q[0]=A,q[1]=K,q[2]=Y,q[3]=z;else K=q[1],Y=q[2],z=q[3];let w=z?"from-left-edge":!0,_;if(q[4]!==K||q[5]!==Y||q[6]!==w)_=zh7.default.createElement(bM,{...K,noSelect:w},Y),q[4]=K,q[5]=Y,q[6]=w,q[7]=_;else _=q[7];return _}var zh7;var wh7=k(()=>{K1();we();zh7=e(W6(),1)});var _h7,o99=()=>_h7.useContext(l06),Pe;var Ej1=k(()=>{Oj1();_h7=e(W6(),1),Pe=o99});var jh7=C((yE2,Hh7)=>{var a99="Expected a function",$h7=NaN,s99="[object Symbol]",t99=/^\s+|\s+$/g,e99=/^[-+]0x[0-9a-f]+$/i,AY9=/^0b[01]+$/i,qY9=/^0o[0-7]+$/i,KY9=parseInt,YY9=typeof global=="object"&&global&&global.Object===Object&&global,zY9=typeof self=="object"&&self&&self.Object===Object&&self,wY9=YY9||zY9||Function("return this")(),_Y9=Object.prototype,$Y9=_Y9.toString,OY9=Math.max,HY9=Math.min,zD8=function(){return wY9.Date.now()};function jY9(A,q,K){var Y,z,w,_,$,O,H=0,j=!1,J=!1,M=!0;if(typeof A!="function")throw TypeError(a99);if(q=Oh7(q)||0,wD8(K))j=!!K.leading,J="maxWait"in K,w=J?OY9(Oh7(K.maxWait)||0,q):w,M="trailing"in K?!!K.trailing:M;function D(v){var y=Y,R=z;return Y=z=void 0,H=v,_=A.apply(R,y),_}function X(v){return H=v,$=setTimeout(Z,q),j?D(v):_}function P(v){var y=v-O,R=v-H,h=q-y;return J?HY9(h,w-R):h}function W(v){var y=v-O,R=v-H;return O===void 0||y>=q||y<0||J&&R>=w}function Z(){var v=zD8();if(W(v))return G(v);$=setTimeout(Z,P(v))}function G(v){if($=void 0,M&&Y)return D(v);return Y=z=void 0,_}function f(){if($!==void 0)clearTimeout($);H=0,Y=O=z=$=void 0}function V(){return $===void 0?_:G(zD8())}function N(){var v=zD8(),y=W(v);if(Y=arguments,z=this,O=v,y){if($===void 0)return X(O);if(J)return $=setTimeout(Z,q),D(O)}if($===void 0)$=setTimeout(Z,q);return _}return N.cancel=f,N.flush=V,N}function wD8(A){var q=typeof A;return!!A&&(q=="object"||q=="function")}function JY9(A){return!!A&&typeof A=="object"}function MY9(A){return typeof A=="symbol"||JY9(A)&&$Y9.call(A)==s99}function Oh7(A){if(typeof A=="number")return A;if(MY9(A))return $h7;if(wD8(A)){var q=typeof A.valueOf=="function"?A.valueOf():A;A=wD8(q)?q+"":q}if(typeof A!="string")return A===0?A:+A;A=A.replace(t99,"");var K=AY9.test(A);return K||qY9.test(A)?KY9(A.slice(2),K?2:8):e99.test(A)?$h7:+A}Hh7.exports=jY9});function BM(A,q){let K=p0.useRef(A);Jh7(()=>{K.current=A},[A]),p0.useEffect(()=>{if(q===null)return;let Y=setInterval(()=>{K.current()},q);return()=>{clearInterval(Y)}},[q])}function Mh7(A){let q=p0.useRef(()=>{throw Error("Cannot call an event handler while rendering.")});return Jh7(()=>{q.current=A},[A]),p0.useCallback((...K)=>{var Y;return(Y=q.current)==null?void 0:Y.call(q,...K)},[q])}function DY9(A){let q=p0.useRef(A);q.current=A,p0.useEffect(()=>()=>{q.current()},[])}function YW6(A,q=500,K){let Y=p0.useRef();DY9(()=>{if(Y.current)Y.current.cancel()});let z=p0.useMemo(()=>{let w=_D8.default(A,q,K),_=(...$)=>{return w(...$)};return _.cancel=()=>{w.cancel()},_.isPending=()=>{return!!Y.current},_.flush=()=>{return w.flush()},_},[A,q,K]);return p0.useEffect(()=>{Y.current=_D8.default(A,q,K)},[A,q,K]),z}var p0,_D8,Jh7;var qT=k(()=>{p0=e(W6(),1),_D8=e(jh7(),1),Jh7=typeof window<"u"?p0.useLayoutEffect:p0.useEffect});var Lj1,XY9=(A,q={})=>{let{setRawMode:K,internal_exitOnCtrlC:Y,internal_eventEmitter:z}=Pe();Lj1.useLayoutEffect(()=>{if(q.isActive===!1)return;return K(!0),()=>{K(!1)}},[q.isActive,K]);let w=Mh7((_)=>{if(q.isActive===!1)return;let{input:$,key:O}=_;if(!($==="c"&&O.ctrl)||!Y)A($,O,_)});Lj1.useEffect(()=>{return z?.on("input",w),()=>{z?.removeListener("input",w)}},[z,w])},kA;var Dh7=k(()=>{Ej1();qT();Lj1=e(W6(),1),kA=XY9});var Xh7,PY9=()=>Xh7.useContext($j1),zW6;var $D8=k(()=>{vM8();Xh7=e(W6(),1),zW6=PY9});var Al,WY9=({isActive:A=!0,autoFocus:q=!1,id:K}={})=>{let{isRawModeSupported:Y,setRawMode:z}=Pe(),{activeId:w,add:_,remove:$,activate:O,deactivate:H,focus:j}=Al.useContext(i06),J=Al.useMemo(()=>{return K??Math.random().toString().slice(2,7)},[K]);return Al.useEffect(()=>{return _(J,{autoFocus:q}),()=>{$(J)}},[J,q]),Al.useEffect(()=>{if(A)O(J);else H(J)},[A,J]),Al.useLayoutEffect(()=>{if(!Y||!A)return;return z(!0),()=>{z(!1)}},[A]),{isFocused:Boolean(J)&&w===J,focus:j}},Ph7;var Wh7=k(()=>{Hj1();Ej1();Al=e(W6(),1),Ph7=WY9});var Zh7,ZY9=()=>{let A=Zh7.useContext(i06);return{enableFocus:A.enableFocus,disableFocus:A.disableFocus,focusNext:A.focusNext,focusPrevious:A.focusPrevious,focus:A.focus}},Gh7;var fh7=k(()=>{Hj1();Zh7=e(W6(),1),Gh7=ZY9});var GY9=(A)=>({width:A.yogaNode?.getComputedWidth()??0,height:A.yogaNode?.getComputedHeight()??0}),wW6;var Th7=k(()=>{wW6=GY9});function uA(A,q,K="foreground"){return(Y)=>{if(!A)return Y;if(A.startsWith("rgb(")||A.startsWith("#")||A.startsWith("ansi256(")||A.startsWith("ansi:"))return u06(Y,A,K);return u06(Y,U0(q)[A],K)}}var We=k(()=>{vb();m06()});function Ze(){let A=ql.useContext(c56),q=ql.useRef(null),K=ql.useRef({isVisible:!0}),Y=ql.useCallback((z)=>{q.current=z},[]);return ql.useLayoutEffect(()=>{let z=q.current;if(!z?.yogaNode||!A)return;let w=z.yogaNode.getComputedHeight(),_=A.rows,$=z.yogaNode.getComputedTop(),O=z.yogaNode.getParent(),H=O;while(O)$+=O.getComputedTop(),H=O,O=O.getParent();let j=H?.getComputedHeight()??0,J=$+w,M=j>_?1:0,D=Math.max(0,j-_)+M,X=D+_,P=J>D&&${Ng6();ql=e(W6(),1)});function Rj1(A){let q=yj1.useContext(Rg6);yj1.useEffect(()=>{if(A===null||!q)return;let K=lz(A);if(process.platform==="win32")process.title=K;else q(Q0(Uj.SET_TITLE_AND_ICON,K))},[A,q])}var yj1;var Vh7=k(()=>{uf();ac();Tg();yj1=e(W6(),1)});function mM(A=16){let q=_W6.useContext(r06),[K,{isVisible:Y}]=Ze(),[z,w]=_W6.useState(()=>q?.now()??0),_=Y&&A!==null;return _W6.useEffect(()=>{if(!q||!_)return;let $=q.now(),O=()=>{let H=q.now();if(H-$>=A)$=H,w(H)};return q.subscribe(O,!0)},[q,A,_]),[K,z]}var _W6;var Nh7=k(()=>{Mj1();bg6();_W6=e(W6(),1)});function vh7(A){let q=Eg.useContext(r06),[K,Y]=Eg.useState(()=>q?.now()??0);return Eg.useEffect(()=>{if(!q)return;let z=q.now(),w=()=>{let _=q.now();if(_-z>=A)z=_,Y(_)};return q.subscribe(w,!1)},[q,A]),K}function OD8(A,q){let K=Eg.useRef(A);K.current=A;let Y=Eg.useContext(r06);Eg.useEffect(()=>{if(!Y||q===null)return;let z=Y.now(),w=()=>{let _=Y.now();if(_-z>=q)z=_,K.current()};return Y.subscribe(w,!1)},[Y,q])}var Eg;var kh7=k(()=>{Mj1();Eg=e(W6(),1)});function Eh7(){HD8.useContext(l06);let A=wP.get(process.stdout);if(!A)return{copySelection:()=>"",clearSelection:()=>{},hasSelection:()=>!1};return{copySelection:()=>A.copySelection(),clearSelection:()=>A.clearTextSelection(),hasSelection:()=>A.hasTextSelection()}}var HD8;var Lh7=k(()=>{Oj1();Vg();HD8=e(W6(),1)});var xg6={};m1(xg6,{wrapText:()=>yE,useThemeSetting:()=>t06,useTheme:()=>G7,useTerminalViewport:()=>Ze,useTerminalTitle:()=>Rj1,useTerminalFocus:()=>V_,useStdin:()=>Pe,useSelection:()=>Eh7,usePreviewTheme:()=>fj1,useInterval:()=>OD8,useInput:()=>kA,useFocusManager:()=>Gh7,useFocus:()=>Ph7,useApp:()=>zW6,useAnimationTimer:()=>vh7,useAnimationFrame:()=>mM,render:()=>kb,measureElement:()=>wW6,createRoot:()=>fY9,color:()=>uA,ThemeProvider:()=>Gj1,Text:()=>T,TerminalFocusEvent:()=>o06,Spacer:()=>YD8,RawAnsi:()=>kj1,NoSelect:()=>ec,Newline:()=>uM,Link:()=>d7,InputEvent:()=>Vg6,EventEmitter:()=>U56,Event:()=>Tb,ClickEvent:()=>Sg6,Box:()=>m,BaseText:()=>Cz,BaseBox:()=>bM,Ansi:()=>CK});function Rh7(A){return yh7.createElement(Gj1,null,A)}async function kb(A,q){return RC7(Rh7(A),q)}async function fY9(A){let q=await yC7(A);return{...q,render:(K)=>q.render(Rh7(K))}}var yh7;var n6=k(()=>{SC7();e06();we();xC7();d56();Ig6();sC7();eC7();r56();qh7();Yh7();wh7();Dh7();$D8();Ej1();Wh7();fh7();Th7();e06();We();xH1();mM8();nM8();gM8();_j1();bg6();Tg6();Vh7();Nh7();kh7();Lh7();yh7=e(W6(),1)});function ug6(A){let q=A.split("+"),K={key:"",ctrl:!1,alt:!1,shift:!1,meta:!1};for(let Y of q){let z=Y.toLowerCase();switch(z){case"ctrl":case"control":K.ctrl=!0;break;case"alt":case"opt":case"option":K.alt=!0;break;case"shift":K.shift=!0;break;case"meta":case"cmd":case"command":K.meta=!0;break;case"esc":K.key="escape";break;case"return":K.key="enter";break;case"space":K.key=" ";break;case"↑":K.key="up";break;case"↓":K.key="down";break;case"←":K.key="left";break;case"→":K.key="right";break;default:K.key=z;break}}return K}function jD8(A){if(A===" ")return[ug6("space")];return A.trim().split(/\s+/).map(ug6)}function TY9(A){let q=[];if(A.ctrl)q.push("ctrl");if(A.alt)q.push("alt");if(A.shift)q.push("shift");if(A.meta)q.push("meta");let K=VY9(A.key);return q.push(K),q.join("+")}function VY9(A){switch(A){case"escape":return"Esc";case" ":return"Space";case"tab":return"tab";case"enter":return"Enter";case"backspace":return"Backspace";case"delete":return"Delete";case"up":return"↑";case"down":return"↓";case"left":return"←";case"right":return"→";case"pageup":return"PageUp";case"pagedown":return"PageDown";case"home":return"Home";case"end":return"End";default:return A}}function Sj1(A){return A.map(TY9).join(" ")}function Cj1(A){let q=[];for(let K of A)for(let[Y,z]of Object.entries(K.bindings))q.push({chord:jD8(Y),action:z,context:K.context});return q}function NY9(A){return{ctrl:A.ctrl,shift:A.shift,meta:A.meta}}function JD8(A,q){if(q.escape)return"escape";if(q.return)return"enter";if(q.tab)return"tab";if(q.backspace)return"backspace";if(q.delete)return"delete";if(q.upArrow)return"up";if(q.downArrow)return"down";if(q.leftArrow)return"left";if(q.rightArrow)return"right";if(q.pageUp)return"pageup";if(q.pageDown)return"pagedown";if(q.wheelUp)return"wheelup";if(q.wheelDown)return"wheeldown";if(q.home)return"home";if(q.end)return"end";if(A.length===1)return A.toLowerCase();return null}function Sh7(A,q){if(A.ctrl!==q.ctrl)return!1;if(A.shift!==q.shift)return!1;let K=q.alt||q.meta;if(A.meta!==K)return!1;return!0}function Ch7(A,q,K){if(JD8(A,q)!==K.key)return!1;let z=NY9(q);if(q.escape)return Sh7({...z,meta:!1},K);return Sh7(z,K)}function hj1(A,q,K){for(let Y=K.length-1;Y>=0;Y--){let z=K[Y];if(z&&z.action===A&&z.context===q)return Sj1(z.chord)}return}function vY9(A,q){let K=JD8(A,q);if(!K)return null;let Y=q.escape?!1:q.meta;return{key:K,ctrl:q.ctrl,alt:Y,shift:q.shift,meta:Y}}function Ij1(A,q){return A.key===q.key&&A.ctrl===q.ctrl&&A.shift===q.shift&&(A.alt||A.meta)===(q.alt||q.meta)}function kY9(A,q){if(A.length>=q.chord.length)return!1;for(let K=0;KK.includes(j.context));if($.some((j)=>j.chord.length>_.length&&kY9(_,j)))return{type:"chord_started",pending:_};let H;for(let j of $)if(EY9(_,j))H=j;if(H){if(H.action===null)return{type:"unbound"};return{type:"match",action:H.action}}if(z!==null)return{type:"chord_cancelled"};return{type:"none"}}var Bg6=()=>{};function xj1(A){let q=Y6(27),{bindings:K,pendingChordRef:Y,pendingChord:z,setPendingChord:w,activeContexts:_,registerActiveContext:$,unregisterActiveContext:O,handlerRegistryRef:H,children:j}=A,J;if(q[0]!==K)J=(v,y)=>hj1(v,y,K),q[0]=K,q[1]=J;else J=q[1];let M=J,D;if(q[2]!==H)D=(v)=>{let y=H.current;if(!y)return LY9;if(!y.has(v.action))y.set(v.action,new Set);return y.get(v.action).add(v),()=>{let R=y.get(v.action);if(R){if(R.delete(v),R.size===0)y.delete(v.action)}}},q[2]=H,q[3]=D;else D=q[3];let X=D,P;if(q[4]!==_||q[5]!==H)P=(v)=>{let y=H.current;if(!y)return!1;let R=y.get(v);if(!R||R.size===0)return!1;for(let h of R)if(_.has(h.context))return h.handler(),!0;return!1},q[4]=_,q[5]=H,q[6]=P;else P=q[6];let W=P,Z;if(q[7]!==K||q[8]!==Y)Z=(v,y,R)=>bj1(v,y,R,K,Y.current),q[7]=K,q[8]=Y,q[9]=Z;else Z=q[9];let G;if(q[10]!==M)G=(v,y)=>M(v,y),q[10]=M,q[11]=G;else G=q[11];let f;if(q[12]!==_||q[13]!==K||q[14]!==M||q[15]!==W||q[16]!==z||q[17]!==$||q[18]!==X||q[19]!==w||q[20]!==Z||q[21]!==G||q[22]!==O)f={resolve:Z,setPendingChord:w,getDisplayText:M,getPlatformDisplayText:G,bindings:K,pendingChord:z,activeContexts:_,registerActiveContext:$,unregisterActiveContext:O,registerHandler:X,invokeAction:W},q[12]=_,q[13]=K,q[14]=M,q[15]=W,q[16]=z,q[17]=$,q[18]=X,q[19]=w,q[20]=Z,q[21]=G,q[22]=O,q[23]=f;else f=q[23];let V=f,N;if(q[24]!==j||q[25]!==V)N=hh7.default.createElement(Ih7.Provider,{value:V},j),q[24]=j,q[25]=V,q[26]=N;else N=q[26];return N}function LY9(){}function EN(){return $W6.useContext(Ih7)}function uj1(A,q){let K=Y6(5),Y=q===void 0?!0:q,z=EN(),w,_;if(K[0]!==A||K[1]!==Y||K[2]!==z)w=()=>{if(!z||!Y)return;return z.registerActiveContext(A),()=>{z.unregisterActiveContext(A)}},_=[A,z,Y],K[0]=A,K[1]=Y,K[2]=z,K[3]=w,K[4]=_;else w=K[3],_=K[4];$W6.useLayoutEffect(w,_)}var hh7,$W6,Ih7;var Lg=k(()=>{K1();Bg6();hh7=e(W6(),1),$W6=e(W6(),1),Ih7=$W6.createContext(null)});function V8(A,q,K={}){let{context:Y="Global",isActive:z=!0}=K,w=EN();OW6.useEffect(()=>{if(!w||!z)return;return w.registerHandler({action:A,context:Y,handler:q})},[A,Y,q,w,z]);let _=OW6.useCallback(($,O,H)=>{if(!w)return;let j=[...w.activeContexts,Y,"Global"],J=[...new Set(j)],M=w.resolve($,O,J);switch(M.type){case"match":if(w.setPendingChord(null),M.action===A)q(),H.stopImmediatePropagation();break;case"chord_started":w.setPendingChord(M.pending),H.stopImmediatePropagation();break;case"chord_cancelled":w.setPendingChord(null);break;case"unbound":w.setPendingChord(null),H.stopImmediatePropagation();break;case"none":break}},[A,Y,q,w]);kA(_,{isActive:z})}function f7(A,q={}){let{context:K="Global",isActive:Y=!0}=q,z=EN();OW6.useEffect(()=>{if(!z||!Y)return;let _=[];for(let[$,O]of Object.entries(A))_.push(z.registerHandler({action:$,context:K,handler:O}));return()=>{for(let $ of _)$()}},[K,A,z,Y]);let w=OW6.useCallback((_,$,O)=>{if(!z)return;let H=[...z.activeContexts,K,"Global"],j=[...new Set(H)],J=z.resolve(_,$,j);switch(J.type){case"match":if(z.setPendingChord(null),J.action in A){let M=A[J.action];if(M)M(),O.stopImmediatePropagation()}break;case"chord_started":z.setPendingChord(J.pending),O.stopImmediatePropagation();break;case"chord_cancelled":z.setPendingChord(null);break;case"unbound":z.setPendingChord(null),O.stopImmediatePropagation();break;case"none":break}},[K,A,z]);kA(w,{isActive:Y})}var OW6;var H7=k(()=>{n6();Lg();OW6=e(W6(),1)});function Eb(A,q,K){let Y=Ge.useRef(0),z=Ge.useRef(void 0),w=Ge.useCallback(()=>{if(z.current)clearTimeout(z.current),z.current=void 0},[]);return Ge.useEffect(()=>{return()=>{w()}},[w]),Ge.useCallback(()=>{let _=Date.now();if(_-Y.current<=bh7&&z.current!==void 0)w(),A(!1),q();else K?.(),A(!0),w(),z.current=setTimeout(()=>{A(!1),z.current=void 0},bh7);Y.current=_},[A,q,K,w])}var Ge,bh7=800;var mg6=k(()=>{Ge=e(W6(),1)});function xh7(A,q,K){let{exit:Y}=zW6(),[z,w]=fe.useState({pending:!1,keyName:null}),_=fe.useMemo(()=>K??Y,[K,Y]),$=Eb((M)=>w({pending:M,keyName:"Ctrl-C"}),_),O=Eb((M)=>w({pending:M,keyName:"Ctrl-D"}),_),H=fe.useCallback(()=>{if(q?.())return;$()},[$,q]),j=fe.useCallback(()=>{O()},[O]),J=fe.useMemo(()=>({"app:interrupt":H,"app:exit":j}),[H,j]);return A(J,{context:"Global"}),z}var fe;var uh7=k(()=>{mg6();$D8();fe=e(W6(),1)});function z3(A,q){return xh7(f7,q,A)}var KO=k(()=>{uh7();H7()});function PA(){let A=Bh7.useContext(c56);if(!A)throw Error("useTerminalSize must be used within an Ink App component");return A}var Bh7;var xq=k(()=>{Ng6();Bh7=e(W6(),1)});function CE(A){let q=Y6(7),{width:K,color:Y,char:z,padding:w}=A,_=z===void 0?"─":z,$=w===void 0?0:w,{columns:O}=PA(),H=Math.max(0,(K??O)-$),j=!Y,J;if(q[0]!==_||q[1]!==H)J=_.repeat(H),q[0]=_,q[1]=H,q[2]=J;else J=q[2];let M;if(q[3]!==Y||q[4]!==j||q[5]!==J)M=mh7.default.createElement(T,{color:Y,dimColor:j},J),q[3]=Y,q[4]=j,q[5]=J,q[6]=M;else M=q[6];return M}var mh7;var gg6=k(()=>{K1();n6();xq();mh7=e(W6(),1)});function m9(A){let q=Y6(7),{children:K,color:Y}=A,z;if(q[0]!==Y)z=Bj1.default.createElement(CE,{color:Y}),q[0]=Y,q[1]=z;else z=q[1];let w;if(q[2]!==K)w=Bj1.default.createElement(m,{flexDirection:"column",paddingX:2},K),q[2]=K,q[3]=w;else w=q[3];let _;if(q[4]!==z||q[5]!==w)_=Bj1.default.createElement(m,{flexDirection:"column",paddingTop:1},z,w),q[4]=z,q[5]=w,q[6]=_;else _=q[6];return _}var Bj1;var $P=k(()=>{K1();n6();gg6();Bj1=e(W6(),1)});function J8(A){let q=Y6(9),{shortcut:K,action:Y,parens:z,bold:w}=A,_=z===void 0?!1:z,$=w===void 0?!1:w,O;if(q[0]!==$||q[1]!==K)O=$?mj1.default.createElement(Cz,{bold:!0},K):K,q[0]=$,q[1]=K,q[2]=O;else O=q[2];let H=O;if(_){let J;if(q[3]!==Y||q[4]!==H)J=mj1.default.createElement(Cz,null,"(",H," to ",Y,")"),q[3]=Y,q[4]=H,q[5]=J;else J=q[5];return J}let j;if(q[6]!==Y||q[7]!==H)j=mj1.default.createElement(Cz,null,H," to ",Y),q[6]=Y,q[7]=H,q[8]=j;else j=q[8];return j}var mj1;var JK=k(()=>{K1();d56();mj1=e(W6(),1)});function zK(A,q,K){let Y=EN(),z=Y?.getDisplayText(A,q),w=z===void 0,_=Y?"action_not_found":"no_context",$=gj1.useRef(!1);return gj1.useEffect(()=>{if(w&&!$.current)$.current=!0,c("tengu_keybinding_fallback_used",{action:A,context:q,fallback:K,reason:_})},[w,A,q,K,_]),w?K:z}var gj1;var LJ=k(()=>{Lg();B1();gj1=e(W6(),1)});function G8(A){let q=Y6(5),{action:K,context:Y,fallback:z,description:w,parens:_,bold:$}=A,O=zK(K,Y,z),H;if(q[0]!==$||q[1]!==w||q[2]!==_||q[3]!==O)H=MD8.createElement(J8,{shortcut:O,action:w,parens:_,bold:$}),q[0]=$,q[1]=w,q[2]=_,q[3]=O,q[4]=H;else H=q[4];return H}var MD8;var hK=k(()=>{K1();JK();LJ();MD8=e(W6(),1)});function e8(A){let q=Y6(5),{children:K}=A,Y,z;if(q[0]!==K){z=Symbol.for("react.early_return_sentinel");A:{let _=yg.Children.toArray(K);if(_.length===0){z=null;break A}Y=_.map(yY9)}q[0]=K,q[1]=Y,q[2]=z}else Y=q[1],z=q[2];if(z!==Symbol.for("react.early_return_sentinel"))return z;let w;if(q[3]!==Y)w=yg.default.createElement(yg.default.Fragment,null,Y),q[3]=Y,q[4]=w;else w=q[4];return w}function yY9(A,q){return yg.default.createElement(yg.default.Fragment,{key:yg.isValidElement(A)?A.key??q:q},q>0&&yg.default.createElement(T,{dimColor:!0}," · "),A)}var yg;var eq=k(()=>{K1();n6();yg=e(W6(),1)});function l8(A){let q=Y6(27),{title:K,subtitle:Y,children:z,onCancel:w,color:_,hideInputGuide:$,hideBorder:O,inputGuide:H,isCancelActive:j}=A,J=_===void 0?"permission":_,M=j===void 0?!0:j,D=z3(),X;if(q[0]!==M)X={context:"Confirmation",isActive:M},q[0]=M,q[1]=X;else X=q[1];V8("confirm:no",w,X);let P;if(q[2]!==D.keyName||q[3]!==D.pending)P=D.pending?LN.default.createElement(T,null,"Press ",D.keyName," again to exit"):LN.default.createElement(e8,null,LN.default.createElement(J8,{shortcut:"Enter",action:"confirm"}),LN.default.createElement(G8,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"})),q[2]=D.keyName,q[3]=D.pending,q[4]=P;else P=q[4];let W=P,Z;if(q[5]!==J||q[6]!==K)Z=LN.default.createElement(T,{bold:!0,color:J},K),q[5]=J,q[6]=K,q[7]=Z;else Z=q[7];let G;if(q[8]!==Y)G=Y&&LN.default.createElement(T,{dimColor:!0},Y),q[8]=Y,q[9]=G;else G=q[9];let f;if(q[10]!==Z||q[11]!==G)f=LN.default.createElement(m,{flexDirection:"column"},Z,G),q[10]=Z,q[11]=G,q[12]=f;else f=q[12];let V;if(q[13]!==z||q[14]!==f)V=LN.default.createElement(m,{flexDirection:"column",gap:1},f,z),q[13]=z,q[14]=f,q[15]=V;else V=q[15];let N;if(q[16]!==W||q[17]!==D||q[18]!==$||q[19]!==H)N=!$&&LN.default.createElement(m,{marginTop:1},LN.default.createElement(T,{dimColor:!0,italic:!0},H?H(D):W)),q[16]=W,q[17]=D,q[18]=$,q[19]=H,q[20]=N;else N=q[20];let v;if(q[21]!==V||q[22]!==N)v=LN.default.createElement(LN.default.Fragment,null,V,N),q[21]=V,q[22]=N,q[23]=v;else v=q[23];let y=v;if(O)return y;let R;if(q[24]!==J||q[25]!==y)R=LN.default.createElement(m9,{color:J},y),q[24]=J,q[25]=y,q[26]=R;else R=q[26];return R}var LN;var zq=k(()=>{K1();n6();KO();$P();JK();hK();eq();H7();LN=e(W6(),1)});var Fh7={};m1(Fh7,{hasIdeOnboardingDialogBeenShown:()=>gh7,IdeOnboardingDialog:()=>DD8});function DD8(A){let q=Y6(23),{onDone:K,installationStatus:Y}=A;RY9();let z;if(q[0]!==K)z={"confirm:yes":K,"confirm:no":K},q[0]=K,q[1]=z;else z=q[1];let w;if(q[2]===Symbol.for("react.memo_cache_sentinel"))w={context:"Confirmation"},q[2]=w;else w=q[2];f7(z,w);let _;if(q[3]!==Y?.ideType)_=Y?.ideType??HW6(),q[3]=Y?.ideType,q[4]=_;else _=q[4];let $=_,O=Lb($),H;if(q[5]!==$)H=sO($),q[5]=$,q[6]=H;else H=q[6];let j=H,J=Y?.installedVersion,M=O?"plugin":"extension",D=YA.platform==="darwin"?"Cmd+Option+K":"Ctrl+Alt+K",X;if(q[7]===Symbol.for("react.memo_cache_sentinel"))X=yJ.default.createElement(T,{color:"claude"},"✻ "),q[7]=X;else X=q[7];let P;if(q[8]!==j)P=yJ.default.createElement(yJ.default.Fragment,null,X,yJ.default.createElement(T,null,"Welcome to Claude Code for ",j)),q[8]=j,q[9]=P;else P=q[9];let W=J?`installed ${M} v${J}`:void 0,Z;if(q[10]===Symbol.for("react.memo_cache_sentinel"))Z=yJ.default.createElement(T,{color:"suggestion"},"⧉ open files"),q[10]=Z;else Z=q[10];let G;if(q[11]===Symbol.for("react.memo_cache_sentinel"))G=yJ.default.createElement(T,null,"• Claude has context of ",Z," ","and ",yJ.default.createElement(T,{color:"suggestion"},"⧉ selected lines")),q[11]=G;else G=q[11];let f;if(q[12]===Symbol.for("react.memo_cache_sentinel"))f=yJ.default.createElement(T,{color:"diffAddedWord"},"+11"),q[12]=f;else f=q[12];let V;if(q[13]===Symbol.for("react.memo_cache_sentinel"))V=yJ.default.createElement(T,null,"• Review Claude Code's changes"," ",f," ",yJ.default.createElement(T,{color:"diffRemovedWord"},"-22")," in the comfort of your IDE"),q[13]=V;else V=q[13];let N;if(q[14]===Symbol.for("react.memo_cache_sentinel"))N=yJ.default.createElement(T,null,"• Cmd+Esc",yJ.default.createElement(T,{dimColor:!0}," for Quick Launch")),q[14]=N;else N=q[14];let v;if(q[15]===Symbol.for("react.memo_cache_sentinel"))v=yJ.default.createElement(m,{flexDirection:"column",gap:1},G,V,N,yJ.default.createElement(T,null,"• ",D,yJ.default.createElement(T,{dimColor:!0}," to reference files or lines in your input"))),q[15]=v;else v=q[15];let y;if(q[16]!==K||q[17]!==P||q[18]!==W)y=yJ.default.createElement(l8,{title:P,subtitle:W,color:"ide",onCancel:K,hideInputGuide:!0},v),q[16]=K,q[17]=P,q[18]=W,q[19]=y;else y=q[19];let R;if(q[20]===Symbol.for("react.memo_cache_sentinel"))R=yJ.default.createElement(m,{paddingX:1},yJ.default.createElement(T,{dimColor:!0,italic:!0},"Press Enter to continue")),q[20]=R;else R=q[20];let h;if(q[21]!==y)h=yJ.default.createElement(yJ.default.Fragment,null,y,R),q[21]=y,q[22]=h;else h=q[22];return h}function gh7(){let A=T1(),q=pV.terminal||"unknown";return A.hasIdeOnboardingBeenShown?.[q]===!0}function RY9(){if(gh7())return;let A=pV.terminal||"unknown";_8((q)=>({...q,hasIdeOnboardingBeenShown:{...q.hasIdeOnboardingBeenShown,[A]:!0}}))}var yJ;var XD8=k(()=>{K1();n6();M$();K9();H7();Q8();ta();zq();yJ=e(W6(),1)});import{basename as SY9,join as PD8,resolve as WD8,sep as Qj1}from"path";import{createConnection as CY9}from"net";function lh7(A){try{return process.kill(A,0),!0}catch{return!1}}async function hY9(A){if(!lh7(A))return!1;if(!gM())return!0;if(process.ppid===A)return!0;return(await aQA(process.ppid,10)).includes(A)}function Uj1(A){if(!A)return!1;let q=jW6[A];return q&&q.ideKind==="vscode"}function Lb(A){if(!A)return!1;let q=jW6[A];return q&&q.ideKind==="jetbrains"}function HW6(){if(!gM())return null;return YA.terminal}async function pj1(){try{let A=await IY9();return(await Promise.all(A.map(async(K)=>{try{let z=(await P1().readdir(K)).filter((_)=>_.name.endsWith(".lock")),w=[];for(let _ of z){let $=PD8(K,_.name);try{let O=await P1().stat($);w.push({path:$,mtime:O.mtime})}catch{}}return w}catch(Y){return $6(Y),[]}}))).flat().sort((K,Y)=>Y.mtime.getTime()-K.mtime.getTime()).map((K)=>K.path)}catch(A){return $6(A),[]}}async function ih7(A){try{let q=await P1().readFile(A,{encoding:"utf-8"}),K=[],Y,z,w=!1,_=!1,$;try{let j=O8(q);if(j.workspaceFolders)K=j.workspaceFolders;Y=j.pid,z=j.ideName,w=j.transport==="ws",_=j.runningInWindows===!0,$=j.authToken}catch(j){K=q.split(` `).map((J)=>J.trim())}let O=A.split(Qj1).pop();if(!O)return null;let H=O.replace(".lock","");return{workspaceFolders:K,port:parseInt(H),pid:Y,ideName:z,useWebSocket:w,runningInWindows:_,authToken:$}}catch(q){return $6(q),null}}async function ZD8(A,q,K=500){try{return new Promise((Y)=>{let z=CY9({host:A,port:q,timeout:K});z.on("connect",()=>{z.destroy(),Y(!0)}),z.on("error",()=>{Y(!1)}),z.on("timeout",()=>{z.destroy(),Y(!1)})})}catch(Y){return!1}}async function IY9(){let A=[],q=P1(),K=c8(),Y=PD8(OA(),"ide");try{await q.stat(Y),A.push(Y)}catch{}if(K!=="wsl")return A;let z=process.env.USERPROFILE;if(!z)try{let w=FV("powershell.exe -Command '$env:USERPROFILE'");if(w)z=w.trim()}catch{L("Unable to get Windows USERPROFILE via PowerShell - IDE detection may be incomplete")}if(z){let _=new v06(process.env.WSL_DISTRO_NAME).toLocalPath(z),$=WD8(_,".claude","ide");try{await q.stat($),A.push($)}catch{}}try{let _=await q.readdir("/mnt/c/Users");for(let $ of _){if($.name==="Public"||$.name==="Default"||$.name==="Default User"||$.name==="All Users")continue;let O=PD8("/mnt/c/Users",$.name,".claude","ide");try{await q.stat(O),A.push(O)}catch{}}}catch(w){let _=w.code;if(_==="ENOENT"||_==="EACCES"||_==="EPERM")L(`WSL IDE lockfile path detection failed (${_}): ${D1(w)}`);else $6(w)}return A}async function bY9(){try{let A=await pj1();for(let q of A){let K=await ih7(q);if(!K){try{await P1().unlink(q)}catch(w){$6(w)}continue}let Y=await qI7(K.runningInWindows,K.port),z=!1;if(K.pid){if(!lh7(K.pid)){if(c8()!=="wsl")z=!0;else if(!await ZD8(Y,K.port))z=!0}}else if(!await ZD8(Y,K.port))z=!0;if(z)try{await P1().unlink(q)}catch(w){$6(w)}}}catch(A){$6(A)}}async function xY9(A){try{let q=await BY9(A);if(c("tengu_ext_installed",{}),!T1().diffTool)_8((Y)=>({...Y,diffTool:"auto"}));return{installed:!0,error:null,installedVersion:q,ideType:A}}catch(q){c("tengu_ext_install_error",{});let K=q instanceof Error?q.message:String(q);return $6(q),{installed:!1,error:K,installedVersion:null,ideType:A}}}async function Uh7(){if(Fj1)Fj1.abort();Fj1=g3();let A=Fj1.signal;await bY9();let q=Date.now();while(Date.now()-q<30000&&!A.aborted){let K=await MW6(!1);if(A.aborted)return null;if(K.length===1)return K[0];await new Promise((Y)=>setTimeout(Y,1000))}return null}async function MW6(A){let q=[];try{let K=process.env.CLAUDE_CODE_SSE_PORT,Y=K?parseInt(K):null,z=DA().normalize("NFC"),w=await pj1();for(let _ of w){let $=await ih7(_);if(!$)continue;if(c8()!=="wsl"&&gM()){if(!(Y!==null&&$.port===Y)){if(!($.pid?await hY9($.pid):!1))continue}}let O=!1;if($1(process.env.CLAUDE_CODE_IDE_SKIP_VALID_CHECK))O=!0;else if($.port===Y)O=!0;else O=$.workspaceFolders.some((M)=>{if(!M)return!1;let D=M;if(c8()==="wsl"&&$.runningInWindows&&process.env.WSL_DISTRO_NAME){if(!iL7(M,process.env.WSL_DISTRO_NAME))return!1;let P=WD8(D).normalize("NFC");if(z===P||z.startsWith(P+Qj1))return!0;D=new v06(process.env.WSL_DISTRO_NAME).toLocalPath(M)}let X=WD8(D).normalize("NFC");if(c8()==="windows"){let P=z.replace(/^[a-zA-Z]:/,(Z)=>Z.toUpperCase()),W=X.replace(/^[a-zA-Z]:/,(Z)=>Z.toUpperCase());return P===W||P.startsWith(W+Qj1)}return z===X||z.startsWith(X+Qj1)});if(!O&&!A)continue;let H=$.ideName??(gM()?sO(pV.terminal):"IDE"),j=await qI7($.runningInWindows,$.port),J;if($.useWebSocket)J=`ws://${j}:${$.port}`;else J=`http://${j}:${$.port}/sse`;q.push({url:J,name:H,workspaceFolders:$.workspaceFolders,port:$.port,isValid:O,authToken:$.authToken,ideRunningInWindows:$.runningInWindows})}if(!A&&Y){let _=q.filter(($)=>$.isValid&&$.port===Y);if(_.length===1)return _}}catch(K){$6(K)}return q}async function nh7(A){await A.notification({method:"ide_connected",params:{pid:process.pid}})}function dj1(A){return A.some((q)=>q.type==="connected"&&q.name==="ide")}async function ph7(A){if(Uj1(A)){let q=await rh7(A);if(q)try{if((await z7(q,["--list-extensions"],{env:fD8()})).stdout?.includes(uY9))return!0}catch{}}else if(Lb(A))return await dL7(A);return!1}async function BY9(A){if(Uj1(A)){let q=await rh7(A);if(q){let K=await mY9(q);if(!K||V06(K,dh7())){await new Promise((z)=>{setTimeout(z,500)});let Y=await z7(q,["--force","--install-extension","anthropic.claude-code"],{env:fD8()});if(Y.code!==0)throw Error(`${Y.code}: ${Y.error} ${Y.stderr}`);K=dh7()}return K}}return null}function fD8(){if(c8()==="linux")return{...process.env,DISPLAY:""};return}function dh7(){return{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.71",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-06T22:45:36Z"}.VERSION}async function mY9(A){let{stdout:q}=await W8(A,["--list-extensions","--show-versions"],{env:fD8()}),K=q?.split(` `)||[];for(let Y of K){let[z,w]=Y.split("@");if(z==="anthropic.claude-code"&&w)return w}return null}function gY9(){try{if(c8()!=="macos")return null;let q=process.ppid;for(let K=0;K<10;K++){if(!q||q===0||q===1)break;let Y=FV(`ps -o command= -p ${q}`)?.trim();if(Y){let w={"Visual Studio Code.app":"code","Cursor.app":"cursor","Windsurf.app":"windsurf","Visual Studio Code - Insiders.app":"code","VSCodium.app":"codium"},_="/Contents/MacOS/Electron";for(let[$,O]of Object.entries(w)){let H=Y.indexOf($+"/Contents/MacOS/Electron");if(H!==-1){let j=H+$.length;return Y.substring(0,j)+"/Contents/Resources/app/bin/"+O}}}let z=FV(`ps -o ppid= -p ${q}`)?.trim();if(!z)break;q=parseInt(z.trim())}return null}catch{return null}}async function rh7(A){let q=gY9();if(q)try{return await P1().stat(q),q}catch{}let K=c8()==="windows"?".cmd":"";switch(A){case"vscode":return"code"+K;case"cursor":return"cursor"+K;case"windsurf":return"windsurf"+K;default:break}return null}async function oh7(){return(await W8("cursor",["--version"])).code===0}async function ah7(){return(await W8("windsurf",["--version"])).code===0}async function sh7(){let A=await W8("code",["--help"]);return A.code===0&&Boolean(A.stdout?.includes("Visual Studio Code"))}async function FY9(){let A=[];try{let q=c8();if(q==="macos"){let Y=(await GY('ps aux | grep -E "Visual Studio Code|Code Helper|Cursor Helper|Windsurf Helper|IntelliJ IDEA|PyCharm|WebStorm|PhpStorm|RubyMine|CLion|GoLand|Rider|DataGrip|AppCode|DataSpell|Aqua|Gateway|Fleet|Android Studio" | grep -v grep',{shell:!0,reject:!1})).stdout??"";for(let[z,w]of Object.entries(jW6))for(let _ of w.processKeywordsMac)if(Y.includes(_)){A.push(z);break}}else if(q==="windows"){let z=((await GY('tasklist | findstr /I "Code.exe Cursor.exe Windsurf.exe idea64.exe pycharm64.exe webstorm64.exe phpstorm64.exe rubymine64.exe clion64.exe goland64.exe rider64.exe datagrip64.exe appcode.exe dataspell64.exe aqua64.exe gateway64.exe fleet.exe studio64.exe"',{shell:!0,reject:!1})).stdout??"").toLowerCase();for(let[w,_]of Object.entries(jW6))for(let $ of _.processKeywordsWindows)if(z.includes($.toLowerCase())){A.push(w);break}}else if(q==="linux"){let z=((await GY('ps aux | grep -E "code|cursor|windsurf|idea|pycharm|webstorm|phpstorm|rubymine|clion|goland|rider|datagrip|dataspell|aqua|gateway|fleet|android-studio" | grep -v grep',{shell:!0,reject:!1})).stdout??"").toLowerCase();for(let[w,_]of Object.entries(jW6))for(let $ of _.processKeywordsLinux)if(z.includes($)){if(w!=="vscode"){A.push(w);break}else if(!z.includes("cursor")&&!z.includes("appcode")){A.push(w);break}}}}catch(q){$6(q)}return A}async function TD8(){let A=await FY9();return GD8=A,A}async function th7(){if(GD8===null)return TD8();return GD8}function cj1(A){let q=A.find((K)=>K.type==="connected"&&K.name==="ide");return VD8(q)}function VD8(A){let q=A?.config;return q?.type==="sse-ide"||q?.type==="ws-ide"?q.ideName:gM()?sO(pV.terminal):null}function sO(A){if(!A)return"IDE";let q=jW6[A];if(q)return q.displayName;let K=ch7[A.toLowerCase().trim()];if(K)return K;let Y=A.split(" ")[0],z=Y?SY9(Y).toLowerCase():null;if(z){let w=ch7[z];if(w)return w;return Pb(z)}return Pb(A)}function yN(A){if(!A)return;let q=A.find((K)=>K.type==="connected"&&K.name==="ide");return q?.type==="connected"?q:void 0}async function eh7(A){try{await yb("closeAllDiffTabs",{},A)}catch(q){}}async function AI7(A,q,K,Y){Uh7().then(A);let z=T1().autoInstallIdeExtension??!0;if(!$1(process.env.CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL)&&z){let w=q??HW6();if(w){if(Uj1(w))ph7(w).then(async(_)=>{xY9(w).catch(($)=>{return{installed:!1,error:$.message||"Installation failed",installedVersion:null,ideType:w}}).then(($)=>{if(Y($),$?.installed)Uh7().then(A);if(!_&&$?.installed===!0&&!Qh7().hasIdeOnboardingDialogBeenShown())K()})});else if(Lb(w))ph7(w).then(async(_)=>{if(_&&!Qh7().hasIdeOnboardingDialogBeenShown())K()})}}}var Qh7=()=>(XD8(),W3(Fh7)),jW6,Fg6,JW6,gM,Fj1=null,uY9="anthropic.claude-code",GD8=null,ch7,qI7;var M$=k(()=>{K9();Z8();wI6();aq();Ef();Q8();B1();N06();Eq();Q1();Y7();x1();uK();d0();ej8();AJ8();G1();Qj();ta();a1();MA();jW6={cursor:{ideKind:"vscode",displayName:"Cursor",processKeywordsMac:["Cursor Helper","Cursor.app"],processKeywordsWindows:["cursor.exe"],processKeywordsLinux:["cursor"]},windsurf:{ideKind:"vscode",displayName:"Windsurf",processKeywordsMac:["Windsurf Helper","Windsurf.app"],processKeywordsWindows:["windsurf.exe"],processKeywordsLinux:["windsurf"]},vscode:{ideKind:"vscode",displayName:"VS Code",processKeywordsMac:["Visual Studio Code","Code Helper"],processKeywordsWindows:["code.exe"],processKeywordsLinux:["code"]},intellij:{ideKind:"jetbrains",displayName:"IntelliJ IDEA",processKeywordsMac:["IntelliJ IDEA"],processKeywordsWindows:["idea64.exe"],processKeywordsLinux:["idea","intellij"]},pycharm:{ideKind:"jetbrains",displayName:"PyCharm",processKeywordsMac:["PyCharm"],processKeywordsWindows:["pycharm64.exe"],processKeywordsLinux:["pycharm"]},webstorm:{ideKind:"jetbrains",displayName:"WebStorm",processKeywordsMac:["WebStorm"],processKeywordsWindows:["webstorm64.exe"],processKeywordsLinux:["webstorm"]},phpstorm:{ideKind:"jetbrains",displayName:"PhpStorm",processKeywordsMac:["PhpStorm"],processKeywordsWindows:["phpstorm64.exe"],processKeywordsLinux:["phpstorm"]},rubymine:{ideKind:"jetbrains",displayName:"RubyMine",processKeywordsMac:["RubyMine"],processKeywordsWindows:["rubymine64.exe"],processKeywordsLinux:["rubymine"]},clion:{ideKind:"jetbrains",displayName:"CLion",processKeywordsMac:["CLion"],processKeywordsWindows:["clion64.exe"],processKeywordsLinux:["clion"]},goland:{ideKind:"jetbrains",displayName:"GoLand",processKeywordsMac:["GoLand"],processKeywordsWindows:["goland64.exe"],processKeywordsLinux:["goland"]},rider:{ideKind:"jetbrains",displayName:"Rider",processKeywordsMac:["Rider"],processKeywordsWindows:["rider64.exe"],processKeywordsLinux:["rider"]},datagrip:{ideKind:"jetbrains",displayName:"DataGrip",processKeywordsMac:["DataGrip"],processKeywordsWindows:["datagrip64.exe"],processKeywordsLinux:["datagrip"]},appcode:{ideKind:"jetbrains",displayName:"AppCode",processKeywordsMac:["AppCode"],processKeywordsWindows:["appcode.exe"],processKeywordsLinux:["appcode"]},dataspell:{ideKind:"jetbrains",displayName:"DataSpell",processKeywordsMac:["DataSpell"],processKeywordsWindows:["dataspell64.exe"],processKeywordsLinux:["dataspell"]},aqua:{ideKind:"jetbrains",displayName:"Aqua",processKeywordsMac:[],processKeywordsWindows:["aqua64.exe"],processKeywordsLinux:[]},gateway:{ideKind:"jetbrains",displayName:"Gateway",processKeywordsMac:[],processKeywordsWindows:["gateway64.exe"],processKeywordsLinux:[]},fleet:{ideKind:"jetbrains",displayName:"Fleet",processKeywordsMac:[],processKeywordsWindows:["fleet.exe"],processKeywordsLinux:[]},androidstudio:{ideKind:"jetbrains",displayName:"Android Studio",processKeywordsMac:["Android Studio"],processKeywordsWindows:["studio64.exe"],processKeywordsLinux:["android-studio"]}};Fg6=T8(()=>{return Uj1(YA.terminal)}),JW6=T8(()=>{return Lb(pV.terminal)}),gM=T8(()=>{return Fg6()||JW6()||Boolean(process.env.FORCE_CODE_TERMINAL)});ch7={code:"VS Code",cursor:"Cursor",windsurf:"Windsurf",antigravity:"Antigravity",vi:"Vim",vim:"Vim",nano:"nano",notepad:"Notepad","start /wait notepad":"Notepad",emacs:"Emacs",subl:"Sublime Text",atom:"Atom"};qI7=T8(async(A,q)=>{if(process.env.CLAUDE_CODE_IDE_HOST_OVERRIDE)return process.env.CLAUDE_CODE_IDE_HOST_OVERRIDE;if(c8()!=="wsl"||!A)return"127.0.0.1";try{let K=await GY("ip route show | grep -i default",{shell:!0,reject:!1});if(K.exitCode===0&&K.stdout){let Y=K.stdout.match(/default via (\d+\.\d+\.\d+\.\d+)/);if(Y){let z=Y[1];if(await ZD8(z,q))return z}}}catch(K){}return"127.0.0.1"},(A,q)=>`${A}:${q}`)});function QY9(){let A=ag1();if(A!==void 0)return A;let q=process.env.CLAUDE_CODE_WEBSOCKET_AUTH_FILE_DESCRIPTOR;if(!q)return L("CLAUDE_CODE_WEBSOCKET_AUTH_FILE_DESCRIPTOR not set, no file descriptor token available",{level:"debug"}),C46(null),null;let K=parseInt(q,10);if(Number.isNaN(K))return L(`CLAUDE_CODE_WEBSOCKET_AUTH_FILE_DESCRIPTOR must be a valid file descriptor number, got: ${q}`,{level:"error"}),C46(null),null;try{let Y=P1(),z=process.platform==="darwin"||process.platform==="freebsd"?`/dev/fd/${K}`:`/proc/self/fd/${K}`,w=Y.readFileSync(z,{encoding:"utf8"}).trim();if(!w)return L("File descriptor contained empty token",{level:"error"}),C46(null),null;return L(`Successfully read token from file descriptor ${K}`),C46(w),w}catch(Y){return L(`Failed to read token from file descriptor ${K}: ${D1(Y)}`,{level:"error"}),C46(null),null}}function tZ(){let A=process.env.CLAUDE_CODE_SESSION_ACCESS_TOKEN;if(A)return A;return QY9()}function DW6(){let A=tZ();if(!A)return{};if(A.startsWith("sk-ant-sid")){let q={Cookie:`sessionKey=${A}`},K=process.env.CLAUDE_CODE_ORGANIZATION_UUID;if(K)q["X-Organization-Uuid"]=K;return q}return{Authorization:`Bearer ${A}`}}function Qg6(A){process.env.CLAUDE_CODE_SESSION_ACCESS_TOKEN=A}var _S=k(()=>{G1();Y7();Q1();MA()});function UY9(A){let q=A,K="",Y=0,z=10;while(q!==K&&Y=z)throw Error(`Unicode sanitization reached maximum iterations (${z}) for input: ${A.slice(0,100)}`);return q}function Te(A){if(typeof A==="string")return UY9(A);if(Array.isArray(A))return A.map(Te);if(A!==null&&typeof A==="object"){let q={};for(let[K,Y]of Object.entries(A))q[Te(K)]=Te(Y);return q}return A}var vD8=C((GR2,ij1)=>{/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var KI7,YI7,zI7,wI7,_I7,$I7,OI7,HI7,jI7,lj1,ND8,JI7,MI7,XW6,DI7,XI7,PI7,WI7,ZI7,GI7,fI7,TI7,VI7;(function(A){var q=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(Y){A(K(q,K(Y)))});else if(typeof ij1==="object"&&typeof GR2==="object")A(K(q,K(GR2)));else A(K(q));function K(Y,z){if(Y!==q)if(typeof Object.create==="function")Object.defineProperty(Y,"__esModule",{value:!0});else Y.__esModule=!0;return function(w,_){return Y[w]=z?z(w,_):_}}})(function(A){var q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(K,Y){K.__proto__=Y}||function(K,Y){for(var z in Y)if(Y.hasOwnProperty(z))K[z]=Y[z]};KI7=function(K,Y){q(K,Y);function z(){this.constructor=K}K.prototype=Y===null?Object.create(Y):(z.prototype=Y.prototype,new z)},YI7=Object.assign||function(K){for(var Y,z=1,w=arguments.length;z=0;H--)if(O=K[H])$=(_<3?O($):_>3?O(Y,z,$):O(Y,z))||$;return _>3&&$&&Object.defineProperty(Y,z,$),$},_I7=function(K,Y){return function(z,w){Y(z,w,K)}},$I7=function(K,Y){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(K,Y)},OI7=function(K,Y,z,w){function _($){return $ instanceof z?$:new z(function(O){O($)})}return new(z||(z=Promise))(function($,O){function H(M){try{J(w.next(M))}catch(D){O(D)}}function j(M){try{J(w.throw(M))}catch(D){O(D)}}function J(M){M.done?$(M.value):_(M.value).then(H,j)}J((w=w.apply(K,Y||[])).next())})},HI7=function(K,Y){var z={label:0,sent:function(){if($[0]&1)throw $[1];return $[1]},trys:[],ops:[]},w,_,$,O;return O={next:H(0),throw:H(1),return:H(2)},typeof Symbol==="function"&&(O[Symbol.iterator]=function(){return this}),O;function H(J){return function(M){return j([J,M])}}function j(J){if(w)throw TypeError("Generator is already executing.");while(z)try{if(w=1,_&&($=J[0]&2?_.return:J[0]?_.throw||(($=_.return)&&$.call(_),0):_.next)&&!($=$.call(_,J[1])).done)return $;if(_=0,$)J=[J[0]&2,$.value];switch(J[0]){case 0:case 1:$=J;break;case 4:return z.label++,{value:J[1],done:!1};case 5:z.label++,_=J[1],J=[0];continue;case 7:J=z.ops.pop(),z.trys.pop();continue;default:if(($=z.trys,!($=$.length>0&&$[$.length-1]))&&(J[0]===6||J[0]===2)){z=0;continue}if(J[0]===3&&(!$||J[1]>$[0]&&J[1]<$[3])){z.label=J[1];break}if(J[0]===6&&z.label<$[1]){z.label=$[1],$=J;break}if($&&z.label<$[2]){z.label=$[2],z.ops.push(J);break}if($[2])z.ops.pop();z.trys.pop();continue}J=Y.call(K,z)}catch(M){J=[6,M],_=0}finally{w=$=0}if(J[0]&5)throw J[1];return{value:J[0]?J[1]:void 0,done:!0}}},VI7=function(K,Y,z,w){if(w===void 0)w=z;K[w]=Y[z]},jI7=function(K,Y){for(var z in K)if(z!=="default"&&!Y.hasOwnProperty(z))Y[z]=K[z]},lj1=function(K){var Y=typeof Symbol==="function"&&Symbol.iterator,z=Y&&K[Y],w=0;if(z)return z.call(K);if(K&&typeof K.length==="number")return{next:function(){if(K&&w>=K.length)K=void 0;return{value:K&&K[w++],done:!K}}};throw TypeError(Y?"Object is not iterable.":"Symbol.iterator is not defined.")},ND8=function(K,Y){var z=typeof Symbol==="function"&&K[Symbol.iterator];if(!z)return K;var w=z.call(K),_,$=[],O;try{while((Y===void 0||Y-- >0)&&!(_=w.next()).done)$.push(_.value)}catch(H){O={error:H}}finally{try{if(_&&!_.done&&(z=w.return))z.call(w)}finally{if(O)throw O.error}}return $},JI7=function(){for(var K=[],Y=0;Y1||H(X,P)})}}function H(X,P){try{j(w[X](P))}catch(W){D($[0][3],W)}}function j(X){X.value instanceof XW6?Promise.resolve(X.value.v).then(J,M):D($[0][2],X)}function J(X){H("next",X)}function M(X){H("throw",X)}function D(X,P){if(X(P),$.shift(),$.length)H($[0][0],$[0][1])}},XI7=function(K){var Y,z;return Y={},w("next"),w("throw",function(_){throw _}),w("return"),Y[Symbol.iterator]=function(){return this},Y;function w(_,$){Y[_]=K[_]?function(O){return(z=!z)?{value:XW6(K[_](O)),done:_==="return"}:$?$(O):O}:$}},PI7=function(K){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var Y=K[Symbol.asyncIterator],z;return Y?Y.call(K):(K=typeof lj1==="function"?lj1(K):K[Symbol.iterator](),z={},w("next"),w("throw"),w("return"),z[Symbol.asyncIterator]=function(){return this},z);function w($){z[$]=K[$]&&function(O){return new Promise(function(H,j){O=K[$](O),_(H,j,O.done,O.value)})}}function _($,O,H,j){Promise.resolve(j).then(function(J){$({value:J,done:H})},O)}},WI7=function(K,Y){if(Object.defineProperty)Object.defineProperty(K,"raw",{value:Y});else K.raw=Y;return K},ZI7=function(K){if(K&&K.__esModule)return K;var Y={};if(K!=null){for(var z in K)if(Object.hasOwnProperty.call(K,z))Y[z]=K[z]}return Y.default=K,Y},GI7=function(K){return K&&K.__esModule?K:{default:K}},fI7=function(K,Y){if(!Y.has(K))throw TypeError("attempted to get private field on non-instance");return Y.get(K)},TI7=function(K,Y,z){if(!Y.has(K))throw TypeError("attempted to set private field on non-instance");return Y.set(K,z),z},A("__extends",KI7),A("__assign",YI7),A("__rest",zI7),A("__decorate",wI7),A("__param",_I7),A("__metadata",$I7),A("__awaiter",OI7),A("__generator",HI7),A("__exportStar",jI7),A("__createBinding",VI7),A("__values",lj1),A("__read",ND8),A("__spread",JI7),A("__spreadArrays",MI7),A("__await",XW6),A("__asyncGenerator",DI7),A("__asyncDelegator",XI7),A("__asyncValues",PI7),A("__makeTemplateObject",WI7),A("__importStar",ZI7),A("__importDefault",GI7),A("__classPrivateFieldGet",fI7),A("__classPrivateFieldSet",TI7)})});var kD8=C((NI7)=>{Object.defineProperty(NI7,"__esModule",{value:!0});NI7.MAX_HASHABLE_LENGTH=NI7.INIT=NI7.KEY=NI7.DIGEST_LENGTH=NI7.BLOCK_SIZE=void 0;NI7.BLOCK_SIZE=64;NI7.DIGEST_LENGTH=32;NI7.KEY=new Uint32Array([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]);NI7.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];NI7.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1});var LI7=C((kI7)=>{Object.defineProperty(kI7,"__esModule",{value:!0});kI7.RawSha256=void 0;var $S=kD8(),iY9=function(){function A(){this.state=Int32Array.from($S.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return A.prototype.update=function(q){if(this.finished)throw Error("Attempted to update an already finished hash.");var K=0,Y=q.byteLength;if(this.bytesHashed+=Y,this.bytesHashed*8>$S.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");while(Y>0)if(this.buffer[this.bufferLength++]=q[K++],Y--,this.bufferLength===$S.BLOCK_SIZE)this.hashBuffer(),this.bufferLength=0},A.prototype.digest=function(){if(!this.finished){var q=this.bytesHashed*8,K=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),Y=this.bufferLength;if(K.setUint8(this.bufferLength++,128),Y%$S.BLOCK_SIZE>=$S.BLOCK_SIZE-8){for(var z=this.bufferLength;z<$S.BLOCK_SIZE;z++)K.setUint8(z,0);this.hashBuffer(),this.bufferLength=0}for(var z=this.bufferLength;z<$S.BLOCK_SIZE-8;z++)K.setUint8(z,0);K.setUint32($S.BLOCK_SIZE-8,Math.floor(q/4294967296),!0),K.setUint32($S.BLOCK_SIZE-4,q),this.hashBuffer(),this.finished=!0}var w=new Uint8Array($S.DIGEST_LENGTH);for(var z=0;z<8;z++)w[z*4]=this.state[z]>>>24&255,w[z*4+1]=this.state[z]>>>16&255,w[z*4+2]=this.state[z]>>>8&255,w[z*4+3]=this.state[z]>>>0&255;return w},A.prototype.hashBuffer=function(){var q=this,K=q.buffer,Y=q.state,z=Y[0],w=Y[1],_=Y[2],$=Y[3],O=Y[4],H=Y[5],j=Y[6],J=Y[7];for(var M=0;M<$S.BLOCK_SIZE;M++){if(M<16)this.temp[M]=(K[M*4]&255)<<24|(K[M*4+1]&255)<<16|(K[M*4+2]&255)<<8|K[M*4+3]&255;else{var D=this.temp[M-2],X=(D>>>17|D<<15)^(D>>>19|D<<13)^D>>>10;D=this.temp[M-15];var P=(D>>>7|D<<25)^(D>>>18|D<<14)^D>>>3;this.temp[M]=(X+this.temp[M-7]|0)+(P+this.temp[M-16]|0)}var W=(((O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7))+(O&H^~O&j)|0)+(J+($S.KEY[M]+this.temp[M]|0)|0)|0,Z=((z>>>2|z<<30)^(z>>>13|z<<19)^(z>>>22|z<<10))+(z&w^z&_^w&_)|0;J=j,j=H,H=O,O=$+W|0,$=_,_=w,w=z,z=W+Z|0}Y[0]+=z,Y[1]+=w,Y[2]+=_,Y[3]+=$,Y[4]+=O,Y[5]+=H,Y[6]+=j,Y[7]+=J},A}();kI7.RawSha256=iY9});var SI7=C((yI7)=>{Object.defineProperty(yI7,"__esModule",{value:!0});yI7.toUtf8=yI7.fromUtf8=void 0;var nY9=(A)=>{let q=[];for(let K=0,Y=A.length;K>6|192,z&63|128);else if(K+1>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else q.push(z>>12|224,z>>6&63|128,z&63|128)}return Uint8Array.from(q)};yI7.fromUtf8=nY9;var rY9=(A)=>{let q="";for(let K=0,Y=A.length;K$.toString(16)).join("%");q+=decodeURIComponent(_)}else q+=String.fromCharCode((z&15)<<12|(A[++K]&63)<<6|A[++K]&63)}return q};yI7.toUtf8=rY9});var II7=C((CI7)=>{Object.defineProperty(CI7,"__esModule",{value:!0});CI7.toUtf8=CI7.fromUtf8=void 0;function aY9(A){return new TextEncoder().encode(A)}CI7.fromUtf8=aY9;function sY9(A){return new TextDecoder("utf-8").decode(A)}CI7.toUtf8=sY9});var ED8=C((uI7)=>{Object.defineProperty(uI7,"__esModule",{value:!0});uI7.toUtf8=uI7.fromUtf8=void 0;var bI7=SI7(),xI7=II7(),eY9=(A)=>typeof TextEncoder==="function"?(0,xI7.fromUtf8)(A):(0,bI7.fromUtf8)(A);uI7.fromUtf8=eY9;var Az9=(A)=>typeof TextDecoder==="function"?(0,xI7.toUtf8)(A):(0,bI7.toUtf8)(A);uI7.toUtf8=Az9});var FI7=C((mI7)=>{Object.defineProperty(mI7,"__esModule",{value:!0});mI7.convertToBuffer=void 0;var Kz9=ED8(),Yz9=typeof Buffer<"u"&&Buffer.from?function(A){return Buffer.from(A,"utf8")}:Kz9.fromUtf8;function zz9(A){if(A instanceof Uint8Array)return A;if(typeof A==="string")return Yz9(A);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(A)}mI7.convertToBuffer=zz9});var pI7=C((QI7)=>{Object.defineProperty(QI7,"__esModule",{value:!0});QI7.isEmptyData=void 0;function wz9(A){if(typeof A==="string")return A.length===0;return A.byteLength===0}QI7.isEmptyData=wz9});var lI7=C((dI7)=>{Object.defineProperty(dI7,"__esModule",{value:!0});dI7.numToUint8=void 0;function _z9(A){return new Uint8Array([(A&4278190080)>>24,(A&16711680)>>16,(A&65280)>>8,A&255])}dI7.numToUint8=_z9});var rI7=C((iI7)=>{Object.defineProperty(iI7,"__esModule",{value:!0});iI7.uint32ArrayFrom=void 0;function $z9(A){if(!Uint32Array.from){var q=new Uint32Array(A.length),K=0;while(K{Object.defineProperty(PW6,"__esModule",{value:!0});PW6.uint32ArrayFrom=PW6.numToUint8=PW6.isEmptyData=PW6.convertToBuffer=void 0;var Oz9=FI7();Object.defineProperty(PW6,"convertToBuffer",{enumerable:!0,get:function(){return Oz9.convertToBuffer}});var Hz9=pI7();Object.defineProperty(PW6,"isEmptyData",{enumerable:!0,get:function(){return Hz9.isEmptyData}});var jz9=lI7();Object.defineProperty(PW6,"numToUint8",{enumerable:!0,get:function(){return jz9.numToUint8}});var Jz9=rI7();Object.defineProperty(PW6,"uint32ArrayFrom",{enumerable:!0,get:function(){return Jz9.uint32ArrayFrom}})});var eI7=C((sI7)=>{Object.defineProperty(sI7,"__esModule",{value:!0});sI7.Sha256=void 0;var aI7=vD8(),rj1=kD8(),nj1=LI7(),LD8=oI7(),Dz9=function(){function A(q){this.secret=q,this.hash=new nj1.RawSha256,this.reset()}return A.prototype.update=function(q){if((0,LD8.isEmptyData)(q)||this.error)return;try{this.hash.update((0,LD8.convertToBuffer)(q))}catch(K){this.error=K}},A.prototype.digestSync=function(){if(this.error)throw this.error;if(this.outer){if(!this.outer.finished)this.outer.update(this.hash.digest());return this.outer.digest()}return this.hash.digest()},A.prototype.digest=function(){return aI7.__awaiter(this,void 0,void 0,function(){return aI7.__generator(this,function(q){return[2,this.digestSync()]})})},A.prototype.reset=function(){if(this.hash=new nj1.RawSha256,this.secret){this.outer=new nj1.RawSha256;var q=Xz9(this.secret),K=new Uint8Array(rj1.BLOCK_SIZE);K.set(q);for(var Y=0;Yrj1.BLOCK_SIZE){var K=new nj1.RawSha256;K.update(q),q=K.digest()}var Y=new Uint8Array(rj1.BLOCK_SIZE);return Y.set(q),Y}});var Ab7=C((yD8)=>{Object.defineProperty(yD8,"__esModule",{value:!0});var Pz9=vD8();Pz9.__exportStar(eI7(),yD8)});var jb7=C((xR2,Hb7)=>{var{defineProperty:oj1,getOwnPropertyDescriptor:Wz9,getOwnPropertyNames:Zz9}=Object,Gz9=Object.prototype.hasOwnProperty,aj1=(A,q)=>oj1(A,"name",{value:q,configurable:!0}),fz9=(A,q)=>{for(var K in q)oj1(A,K,{get:q[K],enumerable:!0})},Tz9=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of Zz9(q))if(!Gz9.call(A,z)&&z!==K)oj1(A,z,{get:()=>q[z],enumerable:!(Y=Wz9(q,z))||Y.enumerable})}return A},Vz9=(A)=>Tz9(oj1({},"__esModule",{value:!0}),A),qb7={};fz9(qb7,{AlgorithmId:()=>wb7,EndpointURLScheme:()=>zb7,FieldPosition:()=>_b7,HttpApiKeyAuthLocation:()=>Yb7,HttpAuthLocation:()=>Kb7,IniSectionType:()=>$b7,RequestHandlerProtocol:()=>Ob7,SMITHY_CONTEXT_KEY:()=>Lz9,getDefaultClientConfiguration:()=>kz9,resolveDefaultRuntimeConfig:()=>Ez9});Hb7.exports=Vz9(qb7);var Kb7=((A)=>{return A.HEADER="header",A.QUERY="query",A})(Kb7||{}),Yb7=((A)=>{return A.HEADER="header",A.QUERY="query",A})(Yb7||{}),zb7=((A)=>{return A.HTTP="http",A.HTTPS="https",A})(zb7||{}),wb7=((A)=>{return A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256",A})(wb7||{}),Nz9=aj1((A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>"sha256",checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>"md5",checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},"getChecksumConfiguration"),vz9=aj1((A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},"resolveChecksumRuntimeConfig"),kz9=aj1((A)=>{return Nz9(A)},"getDefaultClientConfiguration"),Ez9=aj1((A)=>{return vz9(A)},"resolveDefaultRuntimeConfig"),_b7=((A)=>{return A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER",A})(_b7||{}),Lz9="__smithy_context",$b7=((A)=>{return A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services",A})($b7||{}),Ob7=((A)=>{return A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0",A})(Ob7||{})});var Wb7=C((uR2,Pb7)=>{var{defineProperty:sj1,getOwnPropertyDescriptor:yz9,getOwnPropertyNames:Rz9}=Object,Sz9=Object.prototype.hasOwnProperty,Ve=(A,q)=>sj1(A,"name",{value:q,configurable:!0}),Cz9=(A,q)=>{for(var K in q)sj1(A,K,{get:q[K],enumerable:!0})},hz9=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of Rz9(q))if(!Sz9.call(A,z)&&z!==K)sj1(A,z,{get:()=>q[z],enumerable:!(Y=yz9(q,z))||Y.enumerable})}return A},Iz9=(A)=>hz9(sj1({},"__esModule",{value:!0}),A),Jb7={};Cz9(Jb7,{Field:()=>uz9,Fields:()=>Bz9,HttpRequest:()=>mz9,HttpResponse:()=>gz9,IHttpRequest:()=>Mb7.HttpRequest,getHttpHandlerExtensionConfiguration:()=>bz9,isValidHostname:()=>Xb7,resolveHttpHandlerRuntimeConfig:()=>xz9});Pb7.exports=Iz9(Jb7);var bz9=Ve((A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),xz9=Ve((A)=>{return{httpHandler:A.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),Mb7=jb7(),uz9=class{static{Ve(this,"Field")}constructor({name:A,kind:q=Mb7.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}},Bz9=class{constructor({fields:A=[],encoding:q="utf-8"}){this.entries={},A.forEach(this.setField.bind(this)),this.encoding=q}static{Ve(this,"Fields")}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}},mz9=class A{static{Ve(this,"HttpRequest")}constructor(q){this.method=q.method||"GET",this.hostname=q.hostname||"localhost",this.port=q.port,this.query=q.query||{},this.headers=q.headers||{},this.body=q.body,this.protocol=q.protocol?q.protocol.slice(-1)!==":"?`${q.protocol}:`:q.protocol:"https:",this.path=q.path?q.path.charAt(0)!=="/"?`/${q.path}`:q.path:"/",this.username=q.username,this.password=q.password,this.fragment=q.fragment}static clone(q){let K=new A({...q,headers:{...q.headers}});if(K.query)K.query=Db7(K.query);return K}static isInstance(q){if(!q)return!1;let K=q;return"method"in K&&"protocol"in K&&"hostname"in K&&"path"in K&&typeof K.query==="object"&&typeof K.headers==="object"}clone(){return A.clone(this)}};function Db7(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}Ve(Db7,"cloneQuery");var gz9=class{static{Ve(this,"HttpResponse")}constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}};function Xb7(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}Ve(Xb7,"isValidHostname")});var Tb7=C((FR2,fb7)=>{var{defineProperty:tj1,getOwnPropertyDescriptor:Fz9,getOwnPropertyNames:Qz9}=Object,Uz9=Object.prototype.hasOwnProperty,RD8=(A,q)=>tj1(A,"name",{value:q,configurable:!0}),pz9=(A,q)=>{for(var K in q)tj1(A,K,{get:q[K],enumerable:!0})},dz9=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of Qz9(q))if(!Uz9.call(A,z)&&z!==K)tj1(A,z,{get:()=>q[z],enumerable:!(Y=Fz9(q,z))||Y.enumerable})}return A},cz9=(A)=>dz9(tj1({},"__esModule",{value:!0}),A),Zb7={};pz9(Zb7,{escapeUri:()=>Gb7,escapeUriPath:()=>iz9});fb7.exports=cz9(Zb7);var Gb7=RD8((A)=>encodeURIComponent(A).replace(/[!'()*]/g,lz9),"escapeUri"),lz9=RD8((A)=>`%${A.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),iz9=RD8((A)=>A.split("/").map(Gb7).join("/"),"escapeUriPath")});var kb7=C((QR2,vb7)=>{var{defineProperty:ej1,getOwnPropertyDescriptor:nz9,getOwnPropertyNames:rz9}=Object,oz9=Object.prototype.hasOwnProperty,az9=(A,q)=>ej1(A,"name",{value:q,configurable:!0}),sz9=(A,q)=>{for(var K in q)ej1(A,K,{get:q[K],enumerable:!0})},tz9=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of rz9(q))if(!oz9.call(A,z)&&z!==K)ej1(A,z,{get:()=>q[z],enumerable:!(Y=nz9(q,z))||Y.enumerable})}return A},ez9=(A)=>tz9(ej1({},"__esModule",{value:!0}),A),Vb7={};sz9(Vb7,{buildQueryString:()=>Nb7});vb7.exports=ez9(Vb7);var SD8=Tb7();function Nb7(A){let q=[];for(let K of Object.keys(A).sort()){let Y=A[K];if(K=(0,SD8.escapeUri)(K),Array.isArray(Y))for(let z=0,w=Y.length;z{var Aw9=(A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]";qw9.isArrayBuffer=Aw9});var hD8=C((_w9)=>{var Yw9=Eb7(),CD8=g6("buffer"),zw9=(A,q=0,K=A.byteLength-q)=>{if(!Yw9.isArrayBuffer(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return CD8.Buffer.from(A,q,K)},ww9=(A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?CD8.Buffer.from(A,q):CD8.Buffer.from(A)};_w9.fromArrayBuffer=zw9;_w9.fromString=ww9});var Rb7=C((Lb7)=>{Object.defineProperty(Lb7,"__esModule",{value:!0});Lb7.fromBase64=void 0;var Hw9=hD8(),jw9=/^[A-Za-z0-9+/]*={0,2}$/,Jw9=(A)=>{if(A.length*3%4!==0)throw TypeError("Incorrect padding on base64 string.");if(!jw9.exec(A))throw TypeError("Invalid base64 string.");let q=(0,Hw9.fromString)(A,"base64");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength)};Lb7.fromBase64=Jw9});var hb7=C((Sb7)=>{Object.defineProperty(Sb7,"__esModule",{value:!0});Sb7.toBase64=void 0;var Mw9=hD8(),Dw9=Z2(),Xw9=(A)=>{let q;if(typeof A==="string")q=(0,Dw9.fromUtf8)(A);else q=A;if(typeof q!=="object"||typeof q.byteOffset!=="number"||typeof q.byteLength!=="number")throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,Mw9.fromArrayBuffer)(q.buffer,q.byteOffset,q.byteLength).toString("base64")};Sb7.toBase64=Xw9});var xb7=C((lR2,AJ1)=>{var{defineProperty:Ib7,getOwnPropertyDescriptor:Pw9,getOwnPropertyNames:Ww9}=Object,Zw9=Object.prototype.hasOwnProperty,ID8=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of Ww9(q))if(!Zw9.call(A,z)&&z!==K)Ib7(A,z,{get:()=>q[z],enumerable:!(Y=Pw9(q,z))||Y.enumerable})}return A},bb7=(A,q,K)=>(ID8(A,q,"default"),K&&ID8(K,q,"default")),Gw9=(A)=>ID8(Ib7({},"__esModule",{value:!0}),A),bD8={};AJ1.exports=Gw9(bD8);bb7(bD8,Rb7(),AJ1.exports);bb7(bD8,hb7(),AJ1.exports)});var uD8=C((iR2,Ub7)=>{var{defineProperty:KJ1,getOwnPropertyDescriptor:fw9,getOwnPropertyNames:Tw9}=Object,Vw9=Object.prototype.hasOwnProperty,Rg=(A,q)=>KJ1(A,"name",{value:q,configurable:!0}),Nw9=(A,q)=>{for(var K in q)KJ1(A,K,{get:q[K],enumerable:!0})},vw9=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of Tw9(q))if(!Vw9.call(A,z)&&z!==K)KJ1(A,z,{get:()=>q[z],enumerable:!(Y=fw9(q,z))||Y.enumerable})}return A},kw9=(A)=>vw9(KJ1({},"__esModule",{value:!0}),A),Bb7={};Nw9(Bb7,{FetchHttpHandler:()=>Lw9,keepAliveSupport:()=>qJ1,streamCollector:()=>Rw9});Ub7.exports=kw9(Bb7);var ub7=Wb7(),Ew9=kb7();function xD8(A,q){return new Request(A,q)}Rg(xD8,"createRequest");function mb7(A=0){return new Promise((q,K)=>{if(A)setTimeout(()=>{let Y=Error(`Request did not complete within ${A} ms`);Y.name="TimeoutError",K(Y)},A)})}Rg(mb7,"requestTimeout");var qJ1={supported:void 0},Lw9=class A{static{Rg(this,"FetchHttpHandler")}static create(q){if(typeof q?.handle==="function")return q;return new A(q)}constructor(q){if(typeof q==="function")this.configProvider=q().then((K)=>K||{});else this.config=q??{},this.configProvider=Promise.resolve(this.config);if(qJ1.supported===void 0)qJ1.supported=Boolean(typeof Request<"u"&&"keepalive"in xD8("https://[::1]"))}destroy(){}async handle(q,{abortSignal:K}={}){if(!this.config)this.config=await this.configProvider;let Y=this.config.requestTimeout,z=this.config.keepAlive===!0,w=this.config.credentials;if(K?.aborted){let Z=Error("Request aborted");return Z.name="AbortError",Promise.reject(Z)}let _=q.path,$=(0,Ew9.buildQueryString)(q.query||{});if($)_+=`?${$}`;if(q.fragment)_+=`#${q.fragment}`;let O="";if(q.username!=null||q.password!=null){let Z=q.username??"",G=q.password??"";O=`${Z}:${G}@`}let{port:H,method:j}=q,J=`${q.protocol}//${O}${q.hostname}${H?`:${H}`:""}${_}`,M=j==="GET"||j==="HEAD"?void 0:q.body,D={body:M,headers:new Headers(q.headers),method:j,credentials:w};if(this.config?.cache)D.cache=this.config.cache;if(M)D.duplex="half";if(typeof AbortController<"u")D.signal=K;if(qJ1.supported)D.keepalive=z;if(typeof this.config.requestInit==="function")Object.assign(D,this.config.requestInit(q));let X=Rg(()=>{},"removeSignalEventListener"),P=xD8(J,D),W=[fetch(P).then((Z)=>{let G=Z.headers,f={};for(let N of G.entries())f[N[0]]=N[1];if(Z.body==null)return Z.blob().then((N)=>({response:new ub7.HttpResponse({headers:f,reason:Z.statusText,statusCode:Z.status,body:N})}));return{response:new ub7.HttpResponse({headers:f,reason:Z.statusText,statusCode:Z.status,body:Z.body})}}),mb7(Y)];if(K)W.push(new Promise((Z,G)=>{let f=Rg(()=>{let V=Error("Request aborted");V.name="AbortError",G(V)},"onAbort");if(typeof K.addEventListener==="function"){let V=K;V.addEventListener("abort",f,{once:!0}),X=Rg(()=>V.removeEventListener("abort",f),"removeSignalEventListener")}else K.onabort=f}));return Promise.race(W).finally(X)}updateHttpClientConfig(q,K){this.config=void 0,this.configProvider=this.configProvider.then((Y)=>{return Y[q]=K,Y})}httpHandlerConfigs(){return this.config??{}}},yw9=xb7(),Rw9=Rg(async(A)=>{if(typeof Blob==="function"&&A instanceof Blob||A.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await A.arrayBuffer());return gb7(A)}return Fb7(A)},"streamCollector");async function gb7(A){let q=await Qb7(A),K=(0,yw9.fromBase64)(q);return new Uint8Array(K)}Rg(gb7,"collectBlob");async function Fb7(A){let q=[],K=A.getReader(),Y=!1,z=0;while(!Y){let{done:$,value:O}=await K.read();if(O)q.push(O),z+=O.length;Y=$}let w=new Uint8Array(z),_=0;for(let $ of q)w.set($,_),_+=$.length;return w}Rg(Fb7,"collectStream");function Qb7(A){return new Promise((q,K)=>{let Y=new FileReader;Y.onloadend=()=>{if(Y.readyState!==2)return K(Error("Reader aborted too early"));let z=Y.result??"",w=z.indexOf(","),_=w>-1?w+1:z.length;q(z.substring(_))},Y.onabort=()=>K(Error("Read aborted")),Y.onerror=()=>K(Y.error),Y.readAsDataURL(A)})}Rg(Qb7,"readToBase64")});var BD8=C((nR2,ab7)=>{var{defineProperty:YJ1,getOwnPropertyDescriptor:Sw9,getOwnPropertyNames:Cw9}=Object,hw9=Object.prototype.hasOwnProperty,zJ1=(A,q)=>YJ1(A,"name",{value:q,configurable:!0}),Iw9=(A,q)=>{for(var K in q)YJ1(A,K,{get:q[K],enumerable:!0})},bw9=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of Cw9(q))if(!hw9.call(A,z)&&z!==K)YJ1(A,z,{get:()=>q[z],enumerable:!(Y=Sw9(q,z))||Y.enumerable})}return A},xw9=(A)=>bw9(YJ1({},"__esModule",{value:!0}),A),pb7={};Iw9(pb7,{AlgorithmId:()=>ib7,EndpointURLScheme:()=>lb7,FieldPosition:()=>nb7,HttpApiKeyAuthLocation:()=>cb7,HttpAuthLocation:()=>db7,IniSectionType:()=>rb7,RequestHandlerProtocol:()=>ob7,SMITHY_CONTEXT_KEY:()=>Fw9,getDefaultClientConfiguration:()=>mw9,resolveDefaultRuntimeConfig:()=>gw9});ab7.exports=xw9(pb7);var db7=((A)=>{return A.HEADER="header",A.QUERY="query",A})(db7||{}),cb7=((A)=>{return A.HEADER="header",A.QUERY="query",A})(cb7||{}),lb7=((A)=>{return A.HTTP="http",A.HTTPS="https",A})(lb7||{}),ib7=((A)=>{return A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256",A})(ib7||{}),uw9=zJ1((A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>"sha256",checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>"md5",checksumConstructor:()=>A.md5});return{_checksumAlgorithms:q,addChecksumAlgorithm(K){this._checksumAlgorithms.push(K)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),Bw9=zJ1((A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},"resolveChecksumRuntimeConfig"),mw9=zJ1((A)=>{return{...uw9(A)}},"getDefaultClientConfiguration"),gw9=zJ1((A)=>{return{...Bw9(A)}},"resolveDefaultRuntimeConfig"),nb7=((A)=>{return A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER",A})(nb7||{}),Fw9="__smithy_context",rb7=((A)=>{return A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services",A})(rb7||{}),ob7=((A)=>{return A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0",A})(ob7||{})});var mD8=C((rR2,zx7)=>{var{defineProperty:wJ1,getOwnPropertyDescriptor:Qw9,getOwnPropertyNames:Uw9}=Object,pw9=Object.prototype.hasOwnProperty,Ne=(A,q)=>wJ1(A,"name",{value:q,configurable:!0}),dw9=(A,q)=>{for(var K in q)wJ1(A,K,{get:q[K],enumerable:!0})},cw9=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of Uw9(q))if(!pw9.call(A,z)&&z!==K)wJ1(A,z,{get:()=>q[z],enumerable:!(Y=Qw9(q,z))||Y.enumerable})}return A},lw9=(A)=>cw9(wJ1({},"__esModule",{value:!0}),A),sb7={};dw9(sb7,{Field:()=>ow9,Fields:()=>aw9,HttpRequest:()=>sw9,HttpResponse:()=>tw9,getHttpHandlerExtensionConfiguration:()=>iw9,isValidHostname:()=>Yx7,resolveHttpHandlerRuntimeConfig:()=>nw9});zx7.exports=lw9(sb7);var iw9=Ne((A)=>{let q=A.httpHandler;return{setHttpHandler(K){q=K},httpHandler(){return q},updateHttpClientConfig(K,Y){q.updateHttpClientConfig(K,Y)},httpHandlerConfigs(){return q.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),nw9=Ne((A)=>{return{httpHandler:A.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),rw9=BD8(),tb7=class{constructor({name:q,kind:K=rw9.FieldPosition.HEADER,values:Y=[]}){this.name=q,this.kind=K,this.values=Y}add(q){this.values.push(q)}set(q){this.values=q}remove(q){this.values=this.values.filter((K)=>K!==q)}toString(){return this.values.map((q)=>q.includes(",")||q.includes(" ")?`"${q}"`:q).join(", ")}get(){return this.values}};Ne(tb7,"Field");var ow9=tb7,eb7=class{constructor({fields:q=[],encoding:K="utf-8"}){this.entries={},q.forEach(this.setField.bind(this)),this.encoding=K}setField(q){this.entries[q.name.toLowerCase()]=q}getField(q){return this.entries[q.toLowerCase()]}removeField(q){delete this.entries[q.toLowerCase()]}getByType(q){return Object.values(this.entries).filter((K)=>K.kind===q)}};Ne(eb7,"Fields");var aw9=eb7,Ax7=class A{constructor(q){this.method=q.method||"GET",this.hostname=q.hostname||"localhost",this.port=q.port,this.query=q.query||{},this.headers=q.headers||{},this.body=q.body,this.protocol=q.protocol?q.protocol.slice(-1)!==":"?`${q.protocol}:`:q.protocol:"https:",this.path=q.path?q.path.charAt(0)!=="/"?`/${q.path}`:q.path:"/",this.username=q.username,this.password=q.password,this.fragment=q.fragment}static isInstance(q){if(!q)return!1;let K=q;return"method"in K&&"protocol"in K&&"hostname"in K&&"path"in K&&typeof K.query==="object"&&typeof K.headers==="object"}clone(){let q=new A({...this,headers:{...this.headers}});if(q.query)q.query=qx7(q.query);return q}};Ne(Ax7,"HttpRequest");var sw9=Ax7;function qx7(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}Ne(qx7,"cloneQuery");var Kx7=class{constructor(q){this.statusCode=q.statusCode,this.reason=q.reason,this.headers=q.headers||{},this.body=q.body}static isInstance(q){if(!q)return!1;let K=q;return typeof K.statusCode==="number"&&typeof K.headers==="object"}};Ne(Kx7,"HttpResponse");var tw9=Kx7;function Yx7(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}Ne(Yx7,"isValidHostname")});var Xx7=C((oR2,Dx7)=>{var{defineProperty:_J1,getOwnPropertyDescriptor:ew9,getOwnPropertyNames:A29}=Object,q29=Object.prototype.hasOwnProperty,$J1=(A,q)=>_J1(A,"name",{value:q,configurable:!0}),K29=(A,q)=>{for(var K in q)_J1(A,K,{get:q[K],enumerable:!0})},Y29=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of A29(q))if(!q29.call(A,z)&&z!==K)_J1(A,z,{get:()=>q[z],enumerable:!(Y=ew9(q,z))||Y.enumerable})}return A},z29=(A)=>Y29(_J1({},"__esModule",{value:!0}),A),wx7={};K29(wx7,{AlgorithmId:()=>Hx7,EndpointURLScheme:()=>Ox7,FieldPosition:()=>jx7,HttpApiKeyAuthLocation:()=>$x7,HttpAuthLocation:()=>_x7,IniSectionType:()=>Jx7,RequestHandlerProtocol:()=>Mx7,SMITHY_CONTEXT_KEY:()=>H29,getDefaultClientConfiguration:()=>$29,resolveDefaultRuntimeConfig:()=>O29});Dx7.exports=z29(wx7);var _x7=((A)=>{return A.HEADER="header",A.QUERY="query",A})(_x7||{}),$x7=((A)=>{return A.HEADER="header",A.QUERY="query",A})($x7||{}),Ox7=((A)=>{return A.HTTP="http",A.HTTPS="https",A})(Ox7||{}),Hx7=((A)=>{return A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256",A})(Hx7||{}),w29=$J1((A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>"sha256",checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>"md5",checksumConstructor:()=>A.md5});return{_checksumAlgorithms:q,addChecksumAlgorithm(K){this._checksumAlgorithms.push(K)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),_29=$J1((A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},"resolveChecksumRuntimeConfig"),$29=$J1((A)=>{return{...w29(A)}},"getDefaultClientConfiguration"),O29=$J1((A)=>{return{..._29(A)}},"resolveDefaultRuntimeConfig"),jx7=((A)=>{return A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER",A})(jx7||{}),H29="__smithy_context",Jx7=((A)=>{return A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services",A})(Jx7||{}),Mx7=((A)=>{return A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0",A})(Mx7||{})});var fx7=C((aR2,Gx7)=>{var{defineProperty:OJ1,getOwnPropertyDescriptor:j29,getOwnPropertyNames:J29}=Object,M29=Object.prototype.hasOwnProperty,Wx7=(A,q)=>OJ1(A,"name",{value:q,configurable:!0}),D29=(A,q)=>{for(var K in q)OJ1(A,K,{get:q[K],enumerable:!0})},X29=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of J29(q))if(!M29.call(A,z)&&z!==K)OJ1(A,z,{get:()=>q[z],enumerable:!(Y=j29(q,z))||Y.enumerable})}return A},P29=(A)=>X29(OJ1({},"__esModule",{value:!0}),A),Zx7={};D29(Zx7,{getSmithyContext:()=>W29,normalizeProvider:()=>Z29});Gx7.exports=P29(Zx7);var Px7=Xx7(),W29=Wx7((A)=>A[Px7.SMITHY_CONTEXT_KEY]||(A[Px7.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),Z29=Wx7((A)=>{if(typeof A==="function")return A;let q=Promise.resolve(A);return()=>q},"normalizeProvider")});var gD8=C((sR2,Vx7)=>{var{defineProperty:HJ1,getOwnPropertyDescriptor:G29,getOwnPropertyNames:f29}=Object,T29=Object.prototype.hasOwnProperty,V29=(A,q)=>HJ1(A,"name",{value:q,configurable:!0}),N29=(A,q)=>{for(var K in q)HJ1(A,K,{get:q[K],enumerable:!0})},v29=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of f29(q))if(!T29.call(A,z)&&z!==K)HJ1(A,z,{get:()=>q[z],enumerable:!(Y=G29(q,z))||Y.enumerable})}return A},k29=(A)=>v29(HJ1({},"__esModule",{value:!0}),A),Tx7={};N29(Tx7,{isArrayBuffer:()=>E29});Vx7.exports=k29(Tx7);var E29=V29((A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]","isArrayBuffer")});var Ex7=C((tR2,kx7)=>{var{defineProperty:jJ1,getOwnPropertyDescriptor:L29,getOwnPropertyNames:y29}=Object,R29=Object.prototype.hasOwnProperty,Nx7=(A,q)=>jJ1(A,"name",{value:q,configurable:!0}),S29=(A,q)=>{for(var K in q)jJ1(A,K,{get:q[K],enumerable:!0})},C29=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of y29(q))if(!R29.call(A,z)&&z!==K)jJ1(A,z,{get:()=>q[z],enumerable:!(Y=L29(q,z))||Y.enumerable})}return A},h29=(A)=>C29(jJ1({},"__esModule",{value:!0}),A),vx7={};S29(vx7,{fromArrayBuffer:()=>b29,fromString:()=>x29});kx7.exports=h29(vx7);var I29=gD8(),FD8=g6("buffer"),b29=Nx7((A,q=0,K=A.byteLength-q)=>{if(!(0,I29.isArrayBuffer)(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return FD8.Buffer.from(A,q,K)},"fromArrayBuffer"),x29=Nx7((A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?FD8.Buffer.from(A,q):FD8.Buffer.from(A)},"fromString")});var Ug6=C((eR2,Sx7)=>{var{defineProperty:JJ1,getOwnPropertyDescriptor:u29,getOwnPropertyNames:B29}=Object,m29=Object.prototype.hasOwnProperty,QD8=(A,q)=>JJ1(A,"name",{value:q,configurable:!0}),g29=(A,q)=>{for(var K in q)JJ1(A,K,{get:q[K],enumerable:!0})},F29=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of B29(q))if(!m29.call(A,z)&&z!==K)JJ1(A,z,{get:()=>q[z],enumerable:!(Y=u29(q,z))||Y.enumerable})}return A},Q29=(A)=>F29(JJ1({},"__esModule",{value:!0}),A),Lx7={};g29(Lx7,{fromUtf8:()=>Rx7,toUint8Array:()=>U29,toUtf8:()=>p29});Sx7.exports=Q29(Lx7);var yx7=Ex7(),Rx7=QD8((A)=>{let q=(0,yx7.fromString)(A,"utf8");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),U29=QD8((A)=>{if(typeof A==="string")return Rx7(A);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(A)},"toUint8Array"),p29=QD8((A)=>{if(typeof A==="string")return A;if(typeof A!=="object"||typeof A.byteOffset!=="number"||typeof A.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return(0,yx7.fromArrayBuffer)(A.buffer,A.byteOffset,A.byteLength).toString("utf8")},"toUtf8")});var Bx7=C((AS2,ux7)=>{var{defineProperty:MJ1,getOwnPropertyDescriptor:d29,getOwnPropertyNames:c29}=Object,l29=Object.prototype.hasOwnProperty,Cx7=(A,q)=>MJ1(A,"name",{value:q,configurable:!0}),i29=(A,q)=>{for(var K in q)MJ1(A,K,{get:q[K],enumerable:!0})},n29=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of c29(q))if(!l29.call(A,z)&&z!==K)MJ1(A,z,{get:()=>q[z],enumerable:!(Y=d29(q,z))||Y.enumerable})}return A},r29=(A)=>n29(MJ1({},"__esModule",{value:!0}),A),hx7={};i29(hx7,{fromHex:()=>bx7,toHex:()=>xx7});ux7.exports=r29(hx7);var Ix7={},UD8={};for(let A=0;A<256;A++){let q=A.toString(16).toLowerCase();if(q.length===1)q=`0${q}`;Ix7[A]=q,UD8[q]=A}function bx7(A){if(A.length%2!==0)throw Error("Hex encoded strings must have an even number length");let q=new Uint8Array(A.length/2);for(let K=0;K{var{defineProperty:DJ1,getOwnPropertyDescriptor:o29,getOwnPropertyNames:a29}=Object,s29=Object.prototype.hasOwnProperty,pD8=(A,q)=>DJ1(A,"name",{value:q,configurable:!0}),t29=(A,q)=>{for(var K in q)DJ1(A,K,{get:q[K],enumerable:!0})},e29=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of a29(q))if(!s29.call(A,z)&&z!==K)DJ1(A,z,{get:()=>q[z],enumerable:!(Y=o29(q,z))||Y.enumerable})}return A},A_9=(A)=>e29(DJ1({},"__esModule",{value:!0}),A),mx7={};t29(mx7,{escapeUri:()=>gx7,escapeUriPath:()=>K_9});Fx7.exports=A_9(mx7);var gx7=pD8((A)=>encodeURIComponent(A).replace(/[!'()*]/g,q_9),"escapeUri"),q_9=pD8((A)=>`%${A.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),K_9=pD8((A)=>A.split("/").map(gx7).join("/"),"escapeUriPath")});var _u7=C((KS2,wu7)=>{var{defineProperty:GJ1,getOwnPropertyDescriptor:Y_9,getOwnPropertyNames:z_9}=Object,w_9=Object.prototype.hasOwnProperty,FM=(A,q)=>GJ1(A,"name",{value:q,configurable:!0}),__9=(A,q)=>{for(var K in q)GJ1(A,K,{get:q[K],enumerable:!0})},$_9=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of z_9(q))if(!w_9.call(A,z)&&z!==K)GJ1(A,z,{get:()=>q[z],enumerable:!(Y=Y_9(q,z))||Y.enumerable})}return A},O_9=(A)=>$_9(GJ1({},"__esModule",{value:!0}),A),lx7={};__9(lx7,{SignatureV4:()=>u_9,clearCredentialCache:()=>E_9,createScope:()=>WJ1,getCanonicalHeaders:()=>iD8,getCanonicalQuery:()=>ex7,getPayloadHash:()=>ZJ1,getSigningKey:()=>tx7,moveHeadersToQuery:()=>Yu7,prepareRequest:()=>rD8});wu7.exports=O_9(lx7);var Ux7=fx7(),dD8=Ug6(),H_9="X-Amz-Algorithm",j_9="X-Amz-Credential",ix7="X-Amz-Date",J_9="X-Amz-SignedHeaders",M_9="X-Amz-Expires",nx7="X-Amz-Signature",rx7="X-Amz-Security-Token",ox7="authorization",ax7=ix7.toLowerCase(),D_9="date",X_9=[ox7,ax7,D_9],P_9=nx7.toLowerCase(),lD8="x-amz-content-sha256",W_9=rx7.toLowerCase(),Z_9={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},G_9=/^proxy-/,f_9=/^sec-/,cD8="AWS4-HMAC-SHA256",T_9="AWS4-HMAC-SHA256-PAYLOAD",V_9="UNSIGNED-PAYLOAD",N_9=50,sx7="aws4_request",v_9=604800,ve=Bx7(),k_9=Ug6(),WW6={},PJ1=[],WJ1=FM((A,q,K)=>`${A}/${q}/${K}/${sx7}`,"createScope"),tx7=FM(async(A,q,K,Y,z)=>{let w=await px7(A,q.secretAccessKey,q.accessKeyId),_=`${K}:${Y}:${z}:${(0,ve.toHex)(w)}:${q.sessionToken}`;if(_ in WW6)return WW6[_];PJ1.push(_);while(PJ1.length>N_9)delete WW6[PJ1.shift()];let $=`AWS4${q.secretAccessKey}`;for(let O of[K,Y,z,sx7])$=await px7(A,$,O);return WW6[_]=$},"getSigningKey"),E_9=FM(()=>{PJ1.length=0,Object.keys(WW6).forEach((A)=>{delete WW6[A]})},"clearCredentialCache"),px7=FM((A,q,K)=>{let Y=new A(q);return Y.update((0,k_9.toUint8Array)(K)),Y.digest()},"hmac"),iD8=FM(({headers:A},q,K)=>{let Y={};for(let z of Object.keys(A).sort()){if(A[z]==null)continue;let w=z.toLowerCase();if(w in Z_9||(q==null?void 0:q.has(w))||G_9.test(w)||f_9.test(w)){if(!K||K&&!K.has(w))continue}Y[w]=A[z].trim().replace(/\s+/g," ")}return Y},"getCanonicalHeaders"),pg6=Qx7(),ex7=FM(({query:A={}})=>{let q=[],K={};for(let Y of Object.keys(A).sort()){if(Y.toLowerCase()===P_9)continue;q.push(Y);let z=A[Y];if(typeof z==="string")K[Y]=`${(0,pg6.escapeUri)(Y)}=${(0,pg6.escapeUri)(z)}`;else if(Array.isArray(z))K[Y]=z.slice(0).reduce((w,_)=>w.concat([`${(0,pg6.escapeUri)(Y)}=${(0,pg6.escapeUri)(_)}`]),[]).sort().join("&")}return q.map((Y)=>K[Y]).filter((Y)=>Y).join("&")},"getCanonicalQuery"),L_9=gD8(),y_9=Ug6(),ZJ1=FM(async({headers:A,body:q},K)=>{for(let Y of Object.keys(A))if(Y.toLowerCase()===lD8)return A[Y];if(q==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof q==="string"||ArrayBuffer.isView(q)||(0,L_9.isArrayBuffer)(q)){let Y=new K;return Y.update((0,y_9.toUint8Array)(q)),(0,ve.toHex)(await Y.digest())}return V_9},"getPayloadHash"),dx7=Ug6(),Au7=class{format(q){let K=[];for(let w of Object.keys(q)){let _=(0,dx7.fromUtf8)(w);K.push(Uint8Array.from([_.byteLength]),_,this.formatHeaderValue(q[w]))}let Y=new Uint8Array(K.reduce((w,_)=>w+_.byteLength,0)),z=0;for(let w of K)Y.set(w,z),z+=w.byteLength;return Y}formatHeaderValue(q){switch(q.type){case"boolean":return Uint8Array.from([q.value?0:1]);case"byte":return Uint8Array.from([2,q.value]);case"short":let K=new DataView(new ArrayBuffer(3));return K.setUint8(0,3),K.setInt16(1,q.value,!1),new Uint8Array(K.buffer);case"integer":let Y=new DataView(new ArrayBuffer(5));return Y.setUint8(0,4),Y.setInt32(1,q.value,!1),new Uint8Array(Y.buffer);case"long":let z=new Uint8Array(9);return z[0]=5,z.set(q.value.bytes,1),z;case"binary":let w=new DataView(new ArrayBuffer(3+q.value.byteLength));w.setUint8(0,6),w.setUint16(1,q.value.byteLength,!1);let _=new Uint8Array(w.buffer);return _.set(q.value,3),_;case"string":let $=(0,dx7.fromUtf8)(q.value),O=new DataView(new ArrayBuffer(3+$.byteLength));O.setUint8(0,7),O.setUint16(1,$.byteLength,!1);let H=new Uint8Array(O.buffer);return H.set($,3),H;case"timestamp":let j=new Uint8Array(9);return j[0]=8,j.set(C_9.fromNumber(q.value.valueOf()).bytes,1),j;case"uuid":if(!S_9.test(q.value))throw Error(`Invalid UUID received: ${q.value}`);let J=new Uint8Array(17);return J[0]=9,J.set((0,ve.fromHex)(q.value.replace(/\-/g,"")),1),J}}};FM(Au7,"HeaderFormatter");var R_9=Au7,S_9=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,qu7=class A{constructor(q){if(this.bytes=q,q.byteLength!==8)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(q){if(q>9223372036854776000||q<-9223372036854776000)throw Error(`${q} is too large (or, if negative, too small) to represent as an Int64`);let K=new Uint8Array(8);for(let Y=7,z=Math.abs(Math.round(q));Y>-1&&z>0;Y--,z/=256)K[Y]=z;if(q<0)nD8(K);return new A(K)}valueOf(){let q=this.bytes.slice(0),K=q[0]&128;if(K)nD8(q);return parseInt((0,ve.toHex)(q),16)*(K?-1:1)}toString(){return String(this.valueOf())}};FM(qu7,"Int64");var C_9=qu7;function nD8(A){for(let q=0;q<8;q++)A[q]^=255;for(let q=7;q>-1;q--)if(A[q]++,A[q]!==0)break}FM(nD8,"negate");var h_9=FM((A,q)=>{A=A.toLowerCase();for(let K of Object.keys(q))if(A===K.toLowerCase())return!0;return!1},"hasHeader"),Ku7=FM(({headers:A,query:q,...K})=>({...K,headers:{...A},query:q?I_9(q):void 0}),"cloneRequest"),I_9=FM((A)=>Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{}),"cloneQuery"),Yu7=FM((A,q={})=>{var K;let{headers:Y,query:z={}}=typeof A.clone==="function"?A.clone():Ku7(A);for(let w of Object.keys(Y)){let _=w.toLowerCase();if(_.slice(0,6)==="x-amz-"&&!((K=q.unhoistableHeaders)==null?void 0:K.has(_)))z[w]=Y[w],delete Y[w]}return{...A,headers:Y,query:z}},"moveHeadersToQuery"),rD8=FM((A)=>{A=typeof A.clone==="function"?A.clone():Ku7(A);for(let q of Object.keys(A.headers))if(X_9.indexOf(q.toLowerCase())>-1)delete A.headers[q];return A},"prepareRequest"),b_9=FM((A)=>x_9(A).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),x_9=FM((A)=>{if(typeof A==="number")return new Date(A*1000);if(typeof A==="string"){if(Number(A))return new Date(Number(A)*1000);return new Date(A)}return A},"toDate"),zu7=class{constructor({applyChecksum:q,credentials:K,region:Y,service:z,sha256:w,uriEscapePath:_=!0}){this.headerFormatter=new R_9,this.service=z,this.sha256=w,this.uriEscapePath=_,this.applyChecksum=typeof q==="boolean"?q:!0,this.regionProvider=(0,Ux7.normalizeProvider)(Y),this.credentialProvider=(0,Ux7.normalizeProvider)(K)}async presign(q,K={}){let{signingDate:Y=new Date,expiresIn:z=3600,unsignableHeaders:w,unhoistableHeaders:_,signableHeaders:$,signingRegion:O,signingService:H}=K,j=await this.credentialProvider();this.validateResolvedCredentials(j);let J=O??await this.regionProvider(),{longDate:M,shortDate:D}=XJ1(Y);if(z>v_9)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let X=WJ1(D,J,H??this.service),P=Yu7(rD8(q),{unhoistableHeaders:_});if(j.sessionToken)P.query[rx7]=j.sessionToken;P.query[H_9]=cD8,P.query[j_9]=`${j.accessKeyId}/${X}`,P.query[ix7]=M,P.query[M_9]=z.toString(10);let W=iD8(P,w,$);return P.query[J_9]=cx7(W),P.query[nx7]=await this.getSignature(M,X,this.getSigningKey(j,J,D,H),this.createCanonicalRequest(P,W,await ZJ1(q,this.sha256))),P}async sign(q,K){if(typeof q==="string")return this.signString(q,K);else if(q.headers&&q.payload)return this.signEvent(q,K);else if(q.message)return this.signMessage(q,K);else return this.signRequest(q,K)}async signEvent({headers:q,payload:K},{signingDate:Y=new Date,priorSignature:z,signingRegion:w,signingService:_}){let $=w??await this.regionProvider(),{shortDate:O,longDate:H}=XJ1(Y),j=WJ1(O,$,_??this.service),J=await ZJ1({headers:{},body:K},this.sha256),M=new this.sha256;M.update(q);let D=(0,ve.toHex)(await M.digest()),X=[T_9,H,j,z,D,J].join(` `);return this.signString(X,{signingDate:Y,signingRegion:$,signingService:_})}async signMessage(q,{signingDate:K=new Date,signingRegion:Y,signingService:z}){return this.signEvent({headers:this.headerFormatter.format(q.message.headers),payload:q.message.body},{signingDate:K,signingRegion:Y,signingService:z,priorSignature:q.priorSignature}).then((_)=>{return{message:q.message,signature:_}})}async signString(q,{signingDate:K=new Date,signingRegion:Y,signingService:z}={}){let w=await this.credentialProvider();this.validateResolvedCredentials(w);let _=Y??await this.regionProvider(),{shortDate:$}=XJ1(K),O=new this.sha256(await this.getSigningKey(w,_,$,z));return O.update((0,dD8.toUint8Array)(q)),(0,ve.toHex)(await O.digest())}async signRequest(q,{signingDate:K=new Date,signableHeaders:Y,unsignableHeaders:z,signingRegion:w,signingService:_}={}){let $=await this.credentialProvider();this.validateResolvedCredentials($);let O=w??await this.regionProvider(),H=rD8(q),{longDate:j,shortDate:J}=XJ1(K),M=WJ1(J,O,_??this.service);if(H.headers[ax7]=j,$.sessionToken)H.headers[W_9]=$.sessionToken;let D=await ZJ1(H,this.sha256);if(!h_9(lD8,H.headers)&&this.applyChecksum)H.headers[lD8]=D;let X=iD8(H,z,Y),P=await this.getSignature(j,M,this.getSigningKey($,O,J,_),this.createCanonicalRequest(H,X,D));return H.headers[ox7]=`${cD8} Credential=${$.accessKeyId}/${M}, SignedHeaders=${cx7(X)}, Signature=${P}`,H}createCanonicalRequest(q,K,Y){let z=Object.keys(K).sort();return`${q.method} ${this.getCanonicalPath(q)} ${ex7(q)} ${z.map((w)=>`${w}:${K[w]}`).join(` `)} ${z.join(";")} ${Y}`}async createStringToSign(q,K,Y){let z=new this.sha256;z.update((0,dD8.toUint8Array)(Y));let w=await z.digest();return`${cD8} ${q} ${K} ${(0,ve.toHex)(w)}`}getCanonicalPath({path:q}){if(this.uriEscapePath){let K=[];for(let w of q.split("/")){if((w==null?void 0:w.length)===0)continue;if(w===".")continue;if(w==="..")K.pop();else K.push(w)}let Y=`${(q==null?void 0:q.startsWith("/"))?"/":""}${K.join("/")}${K.length>0&&(q==null?void 0:q.endsWith("/"))?"/":""}`;return(0,pg6.escapeUri)(Y).replace(/%2F/g,"/")}return q}async getSignature(q,K,Y,z){let w=await this.createStringToSign(q,K,z),_=new this.sha256(await Y);return _.update((0,dD8.toUint8Array)(w)),(0,ve.toHex)(await _.digest())}getSigningKey(q,K,Y,z){return tx7(this.sha256,q,Y,K,z||this.service)}validateResolvedCredentials(q){if(typeof q!=="object"||typeof q.accessKeyId!=="string"||typeof q.secretAccessKey!=="string")throw Error("Resolved credential object is not valid")}};FM(zu7,"SignatureV4");var u_9=zu7,XJ1=FM((A)=>{let q=b_9(A).replace(/[\-:]/g,"");return{longDate:q,shortDate:q.slice(0,8)}},"formatDate"),cx7=FM((A)=>Object.keys(A).sort().join(";"),"getCanonicalHeaderList")});var Ou7=C(($u7)=>{Object.defineProperty($u7,"__esModule",{value:!0});$u7.propertyProviderChain=$u7.createCredentialChain=void 0;var B_9=EM(),m_9=(...A)=>{let q=-1,Y=Object.assign(async(z)=>{let w=await $u7.propertyProviderChain(...A)(z);if(!w.expiration&&q!==-1)w.expiration=new Date(Date.now()+q);return w},{expireAfter(z){if(z<300000)throw Error("@aws-sdk/credential-providers - createCredentialChain(...).expireAfter(ms) may not be called with a duration lower than five minutes.");return q=z,Y}});return Y};$u7.createCredentialChain=m_9;var g_9=(...A)=>async(q)=>{if(A.length===0)throw new B_9.ProviderError("No providers in chain",{tryNextLink:!1});let K;for(let Y of A)try{return await Y(q)}catch(z){if(K=z,z?.tryNextLink)continue;throw z}throw K};$u7.propertyProviderChain=g_9});var KX8=C((l_9)=>{l_9.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(l_9.HttpAuthLocation||(l_9.HttpAuthLocation={}));l_9.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(l_9.HttpApiKeyAuthLocation||(l_9.HttpApiKeyAuthLocation={}));l_9.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(l_9.EndpointURLScheme||(l_9.EndpointURLScheme={}));l_9.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(l_9.AlgorithmId||(l_9.AlgorithmId={}));var Q_9=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>l_9.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>l_9.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},U_9=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},p_9=(A)=>{return Q_9(A)},d_9=(A)=>{return U_9(A)};l_9.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(l_9.FieldPosition||(l_9.FieldPosition={}));var c_9="__smithy_context";l_9.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(l_9.IniSectionType||(l_9.IniSectionType={}));l_9.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(l_9.RequestHandlerProtocol||(l_9.RequestHandlerProtocol={}));l_9.SMITHY_CONTEXT_KEY=c_9;l_9.getDefaultClientConfiguration=p_9;l_9.resolveDefaultRuntimeConfig=d_9});var cg6=C((GW6)=>{var Ju7=Qm(),$X8=MN(),zX8=KX8(),o_9=lO(),Hu7=JN();class Mu7{config;middlewareStack=Ju7.constructStack();initConfig;handlers;constructor(A){this.config=A}send(A,q,K){let Y=typeof q!=="function"?q:void 0,z=typeof q==="function"?q:K,w=Y===void 0&&this.config.cacheMiddleware===!0,_;if(w){if(!this.handlers)this.handlers=new WeakMap;let $=this.handlers;if($.has(A.constructor))_=$.get(A.constructor);else _=A.resolveMiddleware(this.middlewareStack,this.config,Y),$.set(A.constructor,_)}else delete this.handlers,_=A.resolveMiddleware(this.middlewareStack,this.config,Y);if(z)_(A).then(($)=>z(null,$.output),($)=>z($)).catch(()=>{});else return _(A).then(($)=>$.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var YX8="***SensitiveInformation***";function wX8(A,q){if(q==null)return q;let K=o_9.NormalizedSchema.of(A);if(K.getMergedTraits().sensitive)return YX8;if(K.isListSchema()){if(!!K.getValueSchema().getMergedTraits().sensitive)return YX8}else if(K.isMapSchema()){if(!!K.getKeySchema().getMergedTraits().sensitive||!!K.getValueSchema().getMergedTraits().sensitive)return YX8}else if(K.isStructSchema()&&typeof q==="object"){let Y=q,z={};for(let[w,_]of K.structIterator())if(Y[w]!=null)z[w]=wX8(_,Y[w]);return z}return q}class OX8{middlewareStack=Ju7.constructStack();schema;static classBuilder(){return new Du7}resolveMiddlewareWithContext(A,q,K,{middlewareFn:Y,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,smithyContext:O,additionalContext:H,CommandCtor:j}){for(let P of Y.bind(this)(j,A,q,K))this.middlewareStack.use(P);let J=A.concat(this.middlewareStack),{logger:M}=q,D={logger:M,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,[zX8.SMITHY_CONTEXT_KEY]:{commandInstance:this,...O},...H},{requestHandler:X}=q;return J.resolve((P)=>X.handle(P.request,K||{}),D)}}class Du7{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(A){this._init=A}ep(A){return this._ep=A,this}m(A){return this._middlewareFn=A,this}s(A,q,K={}){return this._smithyContext={service:A,operation:q,...K},this}c(A={}){return this._additionalContext=A,this}n(A,q){return this._clientName=A,this._commandName=q,this}f(A=(K)=>K,q=(K)=>K){return this._inputFilterSensitiveLog=A,this._outputFilterSensitiveLog=q,this}ser(A){return this._serializer=A,this}de(A){return this._deserializer=A,this}sc(A){return this._operationSchema=A,this._smithyContext.operationSchema=A,this}build(){let A=this,q;return q=class extends OX8{input;static getEndpointParameterInstructions(){return A._ep}constructor(...[K]){super();this.input=K??{},A._init(this),this.schema=A._operationSchema}resolveMiddleware(K,Y,z){let w=A._operationSchema,_=w?.[4]??w?.input,$=w?.[5]??w?.output;return this.resolveMiddlewareWithContext(K,Y,z,{CommandCtor:q,middlewareFn:A._middlewareFn,clientName:A._clientName,commandName:A._commandName,inputFilterSensitiveLog:A._inputFilterSensitiveLog??(w?wX8.bind(null,_):(O)=>O),outputFilterSensitiveLog:A._outputFilterSensitiveLog??(w?wX8.bind(null,$):(O)=>O),smithyContext:A._smithyContext,additionalContext:A._additionalContext})}serialize=A._serializer;deserialize=A._deserializer}}}var a_9="***SensitiveInformation***",s_9=(A,q)=>{for(let K of Object.keys(A)){let Y=A[K],z=async function(_,$,O){let H=new Y(_);if(typeof $==="function")this.send(H,$);else if(typeof O==="function"){if(typeof $!=="object")throw Error(`Expected http options but got ${typeof $}`);this.send(H,$||{},O)}else return this.send(H,$)},w=(K[0].toLowerCase()+K.slice(1)).replace(/Command$/,"");q.prototype[w]=z}};class ZW6 extends Error{$fault;$response;$retryable;$metadata;constructor(A){super(A.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=A.name,this.$fault=A.$fault,this.$metadata=A.$metadata}static isInstance(A){if(!A)return!1;let q=A;return ZW6.prototype.isPrototypeOf(q)||Boolean(q.$fault)&&Boolean(q.$metadata)&&(q.$fault==="client"||q.$fault==="server")}static[Symbol.hasInstance](A){if(!A)return!1;let q=A;if(this===ZW6)return ZW6.isInstance(A);if(ZW6.isInstance(A)){if(q.name&&this.name)return this.prototype.isPrototypeOf(A)||q.name===this.name;return this.prototype.isPrototypeOf(A)}return!1}}var Xu7=(A,q={})=>{Object.entries(q).filter(([,Y])=>Y!==void 0).forEach(([Y,z])=>{if(A[Y]==null||A[Y]==="")A[Y]=z});let K=A.message||A.Message||"UnknownError";return A.message=K,delete A.Message,A},Pu7=({output:A,parsedBody:q,exceptionCtor:K,errorCode:Y})=>{let z=e_9(A),w=z.httpStatusCode?z.httpStatusCode+"":void 0,_=new K({name:q?.code||q?.Code||Y||w||"UnknownError",$fault:"client",$metadata:z});throw Xu7(_,q)},t_9=(A)=>{return({output:q,parsedBody:K,errorCode:Y})=>{Pu7({output:q,parsedBody:K,exceptionCtor:A,errorCode:Y})}},e_9=(A)=>({httpStatusCode:A.statusCode,requestId:A.headers["x-amzn-requestid"]??A.headers["x-amzn-request-id"]??A.headers["x-amz-request-id"],extendedRequestId:A.headers["x-amz-id-2"],cfId:A.headers["x-amz-cf-id"]}),A$9=(A)=>{switch(A){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},ju7=!1,q$9=(A)=>{if(A&&!ju7&&parseInt(A.substring(1,A.indexOf(".")))<16)ju7=!0},K$9=(A)=>{let q=[];for(let K in zX8.AlgorithmId){let Y=zX8.AlgorithmId[K];if(A[Y]===void 0)continue;q.push({algorithmId:()=>Y,checksumConstructor:()=>A[Y]})}return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},Y$9=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},z$9=(A)=>{return{setRetryStrategy(q){A.retryStrategy=q},retryStrategy(){return A.retryStrategy}}},w$9=(A)=>{let q={};return q.retryStrategy=A.retryStrategy(),q},Wu7=(A)=>{return Object.assign(K$9(A),z$9(A))},_$9=Wu7,$$9=(A)=>{return Object.assign(Y$9(A),w$9(A))},O$9=(A)=>Array.isArray(A)?A:[A],Zu7=(A)=>{for(let K in A)if(A.hasOwnProperty(K)&&A[K]["#text"]!==void 0)A[K]=A[K]["#text"];else if(typeof A[K]==="object"&&A[K]!==null)A[K]=Zu7(A[K]);return A},H$9=(A)=>{return A!=null};class Gu7{trace(){}debug(){}info(){}warn(){}error(){}}function fu7(A,q,K){let Y,z,w;if(typeof q>"u"&&typeof K>"u")Y={},w=A;else if(Y=A,typeof q==="function")return z=q,w=K,M$9(Y,z,w);else w=q;for(let _ of Object.keys(w)){if(!Array.isArray(w[_])){Y[_]=w[_];continue}Tu7(Y,null,w,_)}return Y}var j$9=(A)=>{let q={};for(let[K,Y]of Object.entries(A||{}))q[K]=[,Y];return q},J$9=(A,q)=>{let K={};for(let Y in q)Tu7(K,A,q,Y);return K},M$9=(A,q,K)=>{return fu7(A,Object.entries(K).reduce((Y,[z,w])=>{if(Array.isArray(w))Y[z]=w;else if(typeof w==="function")Y[z]=[q,w()];else Y[z]=[q,w];return Y},{}))},Tu7=(A,q,K,Y)=>{if(q!==null){let _=K[Y];if(typeof _==="function")_=[,_];let[$=D$9,O=X$9,H=Y]=_;if(typeof $==="function"&&$(q[H])||typeof $!=="function"&&!!$)A[Y]=O(q[H]);return}let[z,w]=K[Y];if(typeof w==="function"){let _,$=z===void 0&&(_=w())!=null,O=typeof z==="function"&&!!z(void 0)||typeof z!=="function"&&!!z;if($)A[Y]=_;else if(O)A[Y]=w()}else{let _=z===void 0&&w!=null,$=typeof z==="function"&&!!z(w)||typeof z!=="function"&&!!z;if(_||$)A[Y]=w}},D$9=(A)=>A!=null,X$9=(A)=>A,P$9=(A)=>{if(A!==A)return"NaN";switch(A){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return A}},W$9=(A)=>A.toISOString().replace(".000Z","Z"),_X8=(A)=>{if(A==null)return{};if(Array.isArray(A))return A.filter((q)=>q!=null).map(_X8);if(typeof A==="object"){let q={};for(let K of Object.keys(A)){if(A[K]==null)continue;q[K]=_X8(A[K])}return q}return A};Object.defineProperty(GW6,"collectBody",{enumerable:!0,get:function(){return $X8.collectBody}});Object.defineProperty(GW6,"extendedEncodeURIComponent",{enumerable:!0,get:function(){return $X8.extendedEncodeURIComponent}});Object.defineProperty(GW6,"resolvedPath",{enumerable:!0,get:function(){return $X8.resolvedPath}});GW6.Client=Mu7;GW6.Command=OX8;GW6.NoOpLogger=Gu7;GW6.SENSITIVE_STRING=a_9;GW6.ServiceException=ZW6;GW6._json=_X8;GW6.convertMap=j$9;GW6.createAggregatedClient=s_9;GW6.decorateServiceException=Xu7;GW6.emitWarningIfUnsupportedVersion=q$9;GW6.getArrayIfSingleItem=O$9;GW6.getDefaultClientConfiguration=_$9;GW6.getDefaultExtensionConfiguration=Wu7;GW6.getValueFromTextNode=Zu7;GW6.isSerializableHeaderValue=H$9;GW6.loadConfigsForDefaultMode=A$9;GW6.map=fu7;GW6.resolveDefaultRuntimeConfig=$$9;GW6.serializeDateTime=W$9;GW6.serializeFloat=P$9;GW6.take=J$9;GW6.throwDefaultError=Pu7;GW6.withBaseException=t_9;Object.keys(Hu7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(GW6,A))Object.defineProperty(GW6,A,{enumerable:!0,get:function(){return Hu7[A]}})})});var jX8=C((Vu7)=>{Object.defineProperty(Vu7,"__esModule",{value:!0});Vu7.resolveHttpAuthSchemeConfig=Vu7.defaultCognitoIdentityHttpAuthSchemeProvider=Vu7.defaultCognitoIdentityHttpAuthSchemeParametersProvider=void 0;var Q$9=O$(),HX8=pZ(),U$9=async(A,q,K)=>{return{operation:(0,HX8.getSmithyContext)(q).operation,region:await(0,HX8.normalizeProvider)(A.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};Vu7.defaultCognitoIdentityHttpAuthSchemeParametersProvider=U$9;function p$9(A){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:A.region},propertiesExtractor:(q,K)=>({signingProperties:{config:q,context:K}})}}function fJ1(A){return{schemeId:"smithy.api#noAuth"}}var d$9=(A)=>{let q=[];switch(A.operation){case"GetCredentialsForIdentity":{q.push(fJ1(A));break}case"GetId":{q.push(fJ1(A));break}case"GetOpenIdToken":{q.push(fJ1(A));break}case"UnlinkIdentity":{q.push(fJ1(A));break}default:q.push(p$9(A))}return q};Vu7.defaultCognitoIdentityHttpAuthSchemeProvider=d$9;var c$9=(A)=>{let q=(0,Q$9.resolveAwsSdkSigV4Config)(A);return Object.assign(q,{authSchemePreference:(0,HX8.normalizeProvider)(A.authSchemePreference??[])})};Vu7.resolveHttpAuthSchemeConfig=c$9});var vu7=C((OS2,n$9)=>{n$9.exports={name:"@aws-sdk/client-cognito-identity",description:"AWS SDK for JavaScript Cognito Identity Client for Node.js, Browser and React Native",version:"3.936.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-cognito-identity","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo cognito-identity","test:e2e":"yarn g:vitest run -c vitest.config.e2e.mts --mode development","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.mts"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.936.0","@aws-sdk/credential-provider-node":"3.936.0","@aws-sdk/middleware-host-header":"3.936.0","@aws-sdk/middleware-logger":"3.936.0","@aws-sdk/middleware-recursion-detection":"3.936.0","@aws-sdk/middleware-user-agent":"3.936.0","@aws-sdk/region-config-resolver":"3.936.0","@aws-sdk/types":"3.936.0","@aws-sdk/util-endpoints":"3.936.0","@aws-sdk/util-user-agent-browser":"3.936.0","@aws-sdk/util-user-agent-node":"3.936.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.5","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.12","@smithy/middleware-retry":"^4.4.12","@smithy/middleware-serde":"^4.2.6","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.8","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.11","@smithy/util-defaults-mode-node":"^4.2.14","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0",tslib:"^2.6.2"},devDependencies:{"@aws-sdk/client-iam":"3.936.0","@tsconfig/node18":"18.2.4","@types/chai":"^4.2.11","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.8.3"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cognito-identity",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-cognito-identity"}}});var ku7=C((o$9)=>{var r$9=(A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]";o$9.isArrayBuffer=r$9});var MX8=C((AO9)=>{var s$9=ku7(),JX8=g6("buffer"),t$9=(A,q=0,K=A.byteLength-q)=>{if(!s$9.isArrayBuffer(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return JX8.Buffer.from(A,q,K)},e$9=(A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?JX8.Buffer.from(A,q):JX8.Buffer.from(A)};AO9.fromArrayBuffer=t$9;AO9.fromString=e$9});var yu7=C((Eu7)=>{Object.defineProperty(Eu7,"__esModule",{value:!0});Eu7.fromBase64=void 0;var YO9=MX8(),zO9=/^[A-Za-z0-9+/]*={0,2}$/,wO9=(A)=>{if(A.length*3%4!==0)throw TypeError("Incorrect padding on base64 string.");if(!zO9.exec(A))throw TypeError("Invalid base64 string.");let q=(0,YO9.fromString)(A,"base64");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength)};Eu7.fromBase64=wO9});var Cu7=C((Ru7)=>{Object.defineProperty(Ru7,"__esModule",{value:!0});Ru7.toBase64=void 0;var _O9=MX8(),$O9=Z2(),OO9=(A)=>{let q;if(typeof A==="string")q=(0,$O9.fromUtf8)(A);else q=A;if(typeof q!=="object"||typeof q.byteOffset!=="number"||typeof q.byteLength!=="number")throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,_O9.fromArrayBuffer)(q.buffer,q.byteOffset,q.byteLength).toString("base64")};Ru7.toBase64=OO9});var bu7=C((lg6)=>{var hu7=yu7(),Iu7=Cu7();Object.keys(hu7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(lg6,A))Object.defineProperty(lg6,A,{enumerable:!0,get:function(){return hu7[A]}})});Object.keys(Iu7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(lg6,A))Object.defineProperty(lg6,A,{enumerable:!0,get:function(){return Iu7[A]}})})});var au7=C((ru7)=>{Object.defineProperty(ru7,"__esModule",{value:!0});ru7.ruleSet=void 0;var cu7="required",eZ="fn",AG="argv",TW6="ref",xu7=!0,uu7="isSet",rg6="booleanEquals",fW6="error",Sg="endpoint",Kl="tree",DX8="PartitionResult",XX8="getAttr",ig6="stringEquals",Bu7={[cu7]:!1,type:"string"},mu7={[cu7]:!0,default:!1,type:"boolean"},gu7={[TW6]:"Endpoint"},lu7={[eZ]:rg6,[AG]:[{[TW6]:"UseFIPS"},!0]},iu7={[eZ]:rg6,[AG]:[{[TW6]:"UseDualStack"},!0]},QM={},ng6={[TW6]:"Region"},Fu7={[eZ]:XX8,[AG]:[{[TW6]:DX8},"supportsFIPS"]},nu7={[TW6]:DX8},Qu7={[eZ]:rg6,[AG]:[!0,{[eZ]:XX8,[AG]:[nu7,"supportsDualStack"]}]},Uu7=[lu7],pu7=[iu7],du7=[ng6],HO9={version:"1.0",parameters:{Region:Bu7,UseDualStack:mu7,UseFIPS:mu7,Endpoint:Bu7},rules:[{conditions:[{[eZ]:uu7,[AG]:[gu7]}],rules:[{conditions:Uu7,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:fW6},{conditions:pu7,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:fW6},{endpoint:{url:gu7,properties:QM,headers:QM},type:Sg}],type:Kl},{conditions:[{[eZ]:uu7,[AG]:du7}],rules:[{conditions:[{[eZ]:"aws.partition",[AG]:du7,assign:DX8}],rules:[{conditions:[lu7,iu7],rules:[{conditions:[{[eZ]:rg6,[AG]:[xu7,Fu7]},Qu7],rules:[{conditions:[{[eZ]:ig6,[AG]:[ng6,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:QM,headers:QM},type:Sg},{conditions:[{[eZ]:ig6,[AG]:[ng6,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:QM,headers:QM},type:Sg},{conditions:[{[eZ]:ig6,[AG]:[ng6,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:QM,headers:QM},type:Sg},{conditions:[{[eZ]:ig6,[AG]:[ng6,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:QM,headers:QM},type:Sg},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:QM,headers:QM},type:Sg}],type:Kl},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:fW6}],type:Kl},{conditions:Uu7,rules:[{conditions:[{[eZ]:rg6,[AG]:[Fu7,xu7]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:QM,headers:QM},type:Sg}],type:Kl},{error:"FIPS is enabled but this partition does not support FIPS",type:fW6}],type:Kl},{conditions:pu7,rules:[{conditions:[Qu7],rules:[{conditions:[{[eZ]:ig6,[AG]:["aws",{[eZ]:XX8,[AG]:[nu7,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:QM,headers:QM},type:Sg},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:QM,headers:QM},type:Sg}],type:Kl},{error:"DualStack is enabled but this partition does not support DualStack",type:fW6}],type:Kl},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:QM,headers:QM},type:Sg}],type:Kl}],type:Kl},{error:"Invalid Configuration: Missing Region",type:fW6}]};ru7.ruleSet=HO9});var eu7=C((su7)=>{Object.defineProperty(su7,"__esModule",{value:!0});su7.defaultEndpointResolver=void 0;var jO9=pm(),PX8=Ab(),JO9=au7(),MO9=new PX8.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),DO9=(A,q={})=>{return MO9.get(A,()=>(0,PX8.resolveEndpoint)(JO9.ruleSet,{endpointParams:A,logger:q.logger}))};su7.defaultEndpointResolver=DO9;PX8.customEndpointFunctions.aws=jO9.awsEndpointFunctions});var zB7=C((KB7)=>{Object.defineProperty(KB7,"__esModule",{value:!0});KB7.getRuntimeConfig=void 0;var XO9=O$(),PO9=Lc(),WO9=pw(),ZO9=cg6(),GO9=LR(),AB7=bu7(),qB7=Z2(),fO9=jX8(),TO9=eu7(),VO9=(A)=>{return{apiVersion:"2014-06-30",base64Decoder:A?.base64Decoder??AB7.fromBase64,base64Encoder:A?.base64Encoder??AB7.toBase64,disableHostPrefix:A?.disableHostPrefix??!1,endpointProvider:A?.endpointProvider??TO9.defaultEndpointResolver,extensions:A?.extensions??[],httpAuthSchemeProvider:A?.httpAuthSchemeProvider??fO9.defaultCognitoIdentityHttpAuthSchemeProvider,httpAuthSchemes:A?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(q)=>q.getIdentityProvider("aws.auth#sigv4"),signer:new XO9.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(q)=>q.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new WO9.NoAuthSigner}],logger:A?.logger??new ZO9.NoOpLogger,protocol:A?.protocol??new PO9.AwsJson1_1Protocol({defaultNamespace:"com.amazonaws.cognitoidentity",serviceTarget:"AWSCognitoIdentityService",awsQueryCompatible:!1}),serviceId:A?.serviceId??"Cognito Identity",urlParser:A?.urlParser??GO9.parseUrl,utf8Decoder:A?.utf8Decoder??qB7.fromUtf8,utf8Encoder:A?.utf8Encoder??qB7.toUtf8}};KB7.getRuntimeConfig=VO9});var JB7=C((HB7)=>{Object.defineProperty(HB7,"__esModule",{value:!0});HB7.getRuntimeConfig=void 0;var NO9=d2(),vO9=NO9.__importDefault(vu7()),wB7=O$(),kO9=i36(),_B7=Nc(),TJ1=NJ(),EO9=vc(),$B7=h0(),o56=HN(),OB7=$N(),LO9=kc(),yO9=lm(),RO9=zB7(),SO9=cg6(),CO9=Rc(),hO9=cg6(),IO9=(A)=>{(0,hO9.emitWarningIfUnsupportedVersion)(process.version);let q=(0,CO9.resolveDefaultsModeConfig)(A),K=()=>q().then(SO9.loadConfigsForDefaultMode),Y=(0,RO9.getRuntimeConfig)(A);(0,wB7.emitWarningIfUnsupportedVersion)(process.version);let z={profile:A?.profile,logger:Y.logger};return{...Y,...A,runtime:"node",defaultsMode:q,authSchemePreference:A?.authSchemePreference??(0,o56.loadConfig)(wB7.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,z),bodyLengthChecker:A?.bodyLengthChecker??LO9.calculateBodyLength,credentialDefaultProvider:A?.credentialDefaultProvider??kO9.defaultProvider,defaultUserAgentProvider:A?.defaultUserAgentProvider??(0,_B7.createDefaultUserAgentProvider)({serviceId:Y.serviceId,clientVersion:vO9.default.version}),maxAttempts:A?.maxAttempts??(0,o56.loadConfig)($B7.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,A),region:A?.region??(0,o56.loadConfig)(TJ1.NODE_REGION_CONFIG_OPTIONS,{...TJ1.NODE_REGION_CONFIG_FILE_OPTIONS,...z}),requestHandler:OB7.NodeHttpHandler.create(A?.requestHandler??K),retryMode:A?.retryMode??(0,o56.loadConfig)({...$B7.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await K()).retryMode||yO9.DEFAULT_RETRY_MODE},A),sha256:A?.sha256??EO9.Hash.bind(null,"sha256"),streamCollector:A?.streamCollector??OB7.streamCollector,useDualstackEndpoint:A?.useDualstackEndpoint??(0,o56.loadConfig)(TJ1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,z),useFipsEndpoint:A?.useFipsEndpoint??(0,o56.loadConfig)(TJ1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,z),userAgentAppId:A?.userAgentAppId??(0,o56.loadConfig)(_B7.NODE_APP_ID_CONFIG_OPTIONS,z)}};HB7.getRuntimeConfig=IO9});var PB7=C((gO9)=>{var bO9=KX8(),xO9=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},uO9=(A)=>{return{httpHandler:A.httpHandler()}};class MB7{name;kind;values;constructor({name:A,kind:q=bO9.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class DB7{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class VJ1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new VJ1({...A,headers:{...A.headers}});if(q.query)q.query=BO9(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return VJ1.clone(this)}}function BO9(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class XB7{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function mO9(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}gO9.Field=MB7;gO9.Fields=DB7;gO9.HttpRequest=VJ1;gO9.HttpResponse=XB7;gO9.getHttpHandlerExtensionConfiguration=xO9;gO9.isValidHostname=mO9;gO9.resolveHttpHandlerRuntimeConfig=uO9});var sB7=C((dX8)=>{var WB7=Dc(),iO9=Xc(),nO9=Pc(),ZB7=cm(),rO9=NJ(),NJ1=pw(),hE=lO(),oO9=Vc(),tO=qb(),GB7=h0(),lw=cg6(),fB7=jX8(),aO9=JB7(),TB7=Kb(),VB7=PB7(),sO9=(A)=>{return Object.assign(A,{useDualstackEndpoint:A.useDualstackEndpoint??!1,useFipsEndpoint:A.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"})},UH={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},tO9=(A)=>{let{httpAuthSchemes:q,httpAuthSchemeProvider:K,credentials:Y}=A;return{setHttpAuthScheme(z){let w=q.findIndex((_)=>_.schemeId===z.schemeId);if(w===-1)q.push(z);else q.splice(w,1,z)},httpAuthSchemes(){return q},setHttpAuthSchemeProvider(z){K=z},httpAuthSchemeProvider(){return K},setCredentials(z){Y=z},credentials(){return Y}}},eO9=(A)=>{return{httpAuthSchemes:A.httpAuthSchemes(),httpAuthSchemeProvider:A.httpAuthSchemeProvider(),credentials:A.credentials()}},AH9=(A,q)=>{let K=Object.assign(TB7.getAwsRegionExtensionConfiguration(A),lw.getDefaultExtensionConfiguration(A),VB7.getHttpHandlerExtensionConfiguration(A),tO9(A));return q.forEach((Y)=>Y.configure(K)),Object.assign(A,TB7.resolveAwsRegionExtensionConfiguration(K),lw.resolveDefaultRuntimeConfig(K),VB7.resolveHttpHandlerRuntimeConfig(K),eO9(K))};class kJ1 extends lw.Client{config;constructor(...[A]){let q=aO9.getRuntimeConfig(A||{});super(q);this.initConfig=q;let K=sO9(q),Y=ZB7.resolveUserAgentConfig(K),z=GB7.resolveRetryConfig(Y),w=rO9.resolveRegionConfig(z),_=WB7.resolveHostHeaderConfig(w),$=tO.resolveEndpointConfig(_),O=fB7.resolveHttpAuthSchemeConfig($),H=AH9(O,A?.extensions||[]);this.config=H,this.middlewareStack.use(hE.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(ZB7.getUserAgentPlugin(this.config)),this.middlewareStack.use(GB7.getRetryPlugin(this.config)),this.middlewareStack.use(oO9.getContentLengthPlugin(this.config)),this.middlewareStack.use(WB7.getHostHeaderPlugin(this.config)),this.middlewareStack.use(iO9.getLoggerPlugin(this.config)),this.middlewareStack.use(nO9.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(NJ1.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:fB7.defaultCognitoIdentityHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(j)=>new NJ1.DefaultIdentityProviderConfig({"aws.auth#sigv4":j.credentials})})),this.middlewareStack.use(NJ1.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var IE=class A extends lw.ServiceException{constructor(q){super(q);Object.setPrototypeOf(this,A.prototype)}},NB7=class A extends IE{name="InternalErrorException";$fault="server";constructor(q){super({name:"InternalErrorException",$fault:"server",...q});Object.setPrototypeOf(this,A.prototype)}},vB7=class A extends IE{name="InvalidParameterException";$fault="client";constructor(q){super({name:"InvalidParameterException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},kB7=class A extends IE{name="LimitExceededException";$fault="client";constructor(q){super({name:"LimitExceededException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},EB7=class A extends IE{name="NotAuthorizedException";$fault="client";constructor(q){super({name:"NotAuthorizedException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},LB7=class A extends IE{name="ResourceConflictException";$fault="client";constructor(q){super({name:"ResourceConflictException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},yB7=class A extends IE{name="TooManyRequestsException";$fault="client";constructor(q){super({name:"TooManyRequestsException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},RB7=class A extends IE{name="ResourceNotFoundException";$fault="client";constructor(q){super({name:"ResourceNotFoundException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},SB7=class A extends IE{name="ExternalServiceException";$fault="client";constructor(q){super({name:"ExternalServiceException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},CB7=class A extends IE{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(q){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},hB7=class A extends IE{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(q){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},IB7=class A extends IE{name="ConcurrentModificationException";$fault="client";constructor(q){super({name:"ConcurrentModificationException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},bB7="AllowClassicFlow",qH9="AccountId",KH9="AccessKeyId",YH9="AmbiguousRoleResolution",xB7="AllowUnauthenticatedIdentities",uB7="Credentials",zH9="CreationDate",wH9="ClientId",_H9="CognitoIdentityProvider",$H9="CreateIdentityPoolInput",OH9="CognitoIdentityProviderList",BB7="CognitoIdentityProviders",HH9="CreateIdentityPool",jH9="ConcurrentModificationException",JH9="CustomRoleArn",MH9="Claim",DH9="DeleteIdentities",XH9="DeleteIdentitiesInput",PH9="DescribeIdentityInput",WH9="DeleteIdentityPool",ZH9="DeleteIdentityPoolInput",GH9="DescribeIdentityPoolInput",fH9="DescribeIdentityPool",TH9="DeleteIdentitiesResponse",VH9="DescribeIdentity",EJ1="DeveloperProviderName",NH9="DeveloperUserAlreadyRegisteredException",mB7="DeveloperUserIdentifier",vH9="DeveloperUserIdentifierList",kH9="DestinationUserIdentifier",EH9="Expiration",LH9="ErrorCode",yH9="ExternalServiceException",RH9="GetCredentialsForIdentity",SH9="GetCredentialsForIdentityInput",CH9="GetCredentialsForIdentityResponse",hH9="GetId",IH9="GetIdInput",bH9="GetIdentityPoolRoles",xH9="GetIdentityPoolRolesInput",uH9="GetIdentityPoolRolesResponse",BH9="GetIdResponse",mH9="GetOpenIdToken",gH9="GetOpenIdTokenForDeveloperIdentity",FH9="GetOpenIdTokenForDeveloperIdentityInput",QH9="GetOpenIdTokenForDeveloperIdentityResponse",UH9="GetOpenIdTokenInput",pH9="GetOpenIdTokenResponse",dH9="GetPrincipalTagAttributeMap",cH9="GetPrincipalTagAttributeMapInput",lH9="GetPrincipalTagAttributeMapResponse",iH9="HideDisabled",nH9="Identities",rH9="IdentityDescription",oH9="InternalErrorException",KT="IdentityId",aH9="InvalidIdentityPoolConfigurationException",sH9="IdentityIdsToDelete",tH9="IdentitiesList",eH9="IdentityPool",Aj9="InvalidParameterException",OP="IdentityPoolId",qj9="IdentityPoolsList",WX8="IdentityPoolName",LJ1="IdentityProviderName",Kj9="IdentityPoolShortDescription",Yj9="IdentityProviderToken",gB7="IdentityPoolTags",zj9="IdentityPools",VW6="Logins",wj9="LookupDeveloperIdentity",_j9="LookupDeveloperIdentityInput",$j9="LookupDeveloperIdentityResponse",Oj9="LimitExceededException",Hj9="ListIdentities",jj9="ListIdentitiesInput",Jj9="ListIdentityPools",Mj9="ListIdentityPoolsInput",Dj9="ListIdentityPoolsResponse",Xj9="ListIdentitiesResponse",Pj9="LoginsMap",Wj9="LastModifiedDate",Zj9="ListTagsForResource",Gj9="ListTagsForResourceInput",fj9="ListTagsForResourceResponse",Tj9="LoginsToRemove",Vj9="MergeDeveloperIdentities",Nj9="MergeDeveloperIdentitiesInput",vj9="MergeDeveloperIdentitiesResponse",ZX8="MaxResults",kj9="MappingRulesList",Ej9="MappingRule",Lj9="MatchType",yj9="NotAuthorizedException",NW6="NextToken",FB7="OpenIdConnectProviderARNs",Rj9="OIDCToken",Sj9="ProviderName",yJ1="PrincipalTags",QB7="Roles",GX8="ResourceArn",Cj9="RoleARN",hj9="RulesConfiguration",Ij9="ResourceConflictException",bj9="RulesConfigurationType",UB7="RoleMappings",xj9="RoleMappingMap",uj9="RoleMapping",Bj9="ResourceNotFoundException",mj9="Rules",gj9="SetIdentityPoolRoles",Fj9="SetIdentityPoolRolesInput",Qj9="SecretKey",Uj9="SecretKeyString",pB7="SupportedLoginProviders",dB7="SamlProviderARNs",pj9="SetPrincipalTagAttributeMap",dj9="SetPrincipalTagAttributeMapInput",cj9="SetPrincipalTagAttributeMapResponse",lj9="ServerSideTokenCheck",ij9="SessionToken",nj9="SourceUserIdentifier",cB7="Token",rj9="TokenDuration",oj9="TagKeys",aj9="TooManyRequestsException",sj9="TagResource",tj9="TagResourceInput",ej9="TagResourceResponse",lB7="Tags",AJ9="Type",fX8="UseDefaults",qJ9="UnlinkDeveloperIdentity",KJ9="UnlinkDeveloperIdentityInput",YJ9="UnlinkIdentity",zJ9="UnprocessedIdentityIds",wJ9="UnprocessedIdentityIdList",_J9="UnlinkIdentityInput",$J9="UnprocessedIdentityId",OJ9="UpdateIdentityPool",HJ9="UntagResource",jJ9="UntagResourceInput",JJ9="UntagResourceResponse",MJ9="Value",Cg="client",Rb="error",hg="httpError",Sb="message",DJ9="server",iB7="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",iA="com.amazonaws.cognitoidentity",XJ9=[0,iA,Yj9,8,0],nB7=[0,iA,Rj9,8,0],PJ9=[0,iA,Uj9,8,0],WJ9=[3,iA,_H9,0,[Sj9,wH9,lj9],[0,0,2]],ZJ9=[-3,iA,jH9,{[Rb]:Cg,[hg]:400},[Sb],[0]];hE.TypeRegistry.for(iA).registerError(ZJ9,IB7);var GJ9=[3,iA,$H9,0,[WX8,xB7,bB7,pB7,EJ1,FB7,BB7,dB7,gB7],[0,2,2,128,0,64,()=>oB7,64,128]],fJ9=[3,iA,uB7,0,[KH9,Qj9,ij9,EH9],[0,[()=>PJ9,0],0,4]],TJ9=[3,iA,XH9,0,[sH9],[64]],VJ9=[3,iA,TH9,0,[zJ9],[()=>VM9]],NJ9=[3,iA,ZH9,0,[OP],[0]],vJ9=[3,iA,PH9,0,[KT],[0]],kJ9=[3,iA,GH9,0,[OP],[0]],EJ9=[-3,iA,NH9,{[Rb]:Cg,[hg]:400},[Sb],[0]];hE.TypeRegistry.for(iA).registerError(EJ9,hB7);var LJ9=[-3,iA,yH9,{[Rb]:Cg,[hg]:400},[Sb],[0]];hE.TypeRegistry.for(iA).registerError(LJ9,SB7);var yJ9=[3,iA,SH9,0,[KT,VW6,JH9],[0,[()=>og6,0],0]],RJ9=[3,iA,CH9,0,[KT,uB7],[0,[()=>fJ9,0]]],SJ9=[3,iA,xH9,0,[OP],[0]],CJ9=[3,iA,uH9,0,[OP,QB7,UB7],[0,128,()=>aB7]],hJ9=[3,iA,IH9,0,[qH9,OP,VW6],[0,0,[()=>og6,0]]],IJ9=[3,iA,BH9,0,[KT],[0]],bJ9=[3,iA,FH9,0,[OP,KT,VW6,yJ1,rj9],[0,0,[()=>og6,0],128,1]],xJ9=[3,iA,QH9,0,[KT,cB7],[0,[()=>nB7,0]]],uJ9=[3,iA,UH9,0,[KT,VW6],[0,[()=>og6,0]]],BJ9=[3,iA,pH9,0,[KT,cB7],[0,[()=>nB7,0]]],mJ9=[3,iA,cH9,0,[OP,LJ1],[0,0]],gJ9=[3,iA,lH9,0,[OP,LJ1,fX8,yJ1],[0,0,2,128]],rB7=[3,iA,rH9,0,[KT,VW6,zH9,Wj9],[0,64,4,4]],vJ1=[3,iA,eH9,0,[OP,WX8,xB7,bB7,pB7,EJ1,FB7,BB7,dB7,gB7],[0,0,2,2,128,0,64,()=>oB7,64,128]],FJ9=[3,iA,Kj9,0,[OP,WX8],[0,0]],QJ9=[-3,iA,oH9,{[Rb]:DJ9},[Sb],[0]];hE.TypeRegistry.for(iA).registerError(QJ9,NB7);var UJ9=[-3,iA,aH9,{[Rb]:Cg,[hg]:400},[Sb],[0]];hE.TypeRegistry.for(iA).registerError(UJ9,CB7);var pJ9=[-3,iA,Aj9,{[Rb]:Cg,[hg]:400},[Sb],[0]];hE.TypeRegistry.for(iA).registerError(pJ9,vB7);var dJ9=[-3,iA,Oj9,{[Rb]:Cg,[hg]:400},[Sb],[0]];hE.TypeRegistry.for(iA).registerError(dJ9,kB7);var cJ9=[3,iA,jj9,0,[OP,ZX8,NW6,iH9],[0,1,0,2]],lJ9=[3,iA,Xj9,0,[OP,nH9,NW6],[0,()=>GM9,0]],iJ9=[3,iA,Mj9,0,[ZX8,NW6],[1,0]],nJ9=[3,iA,Dj9,0,[zj9,NW6],[()=>fM9,0]],rJ9=[3,iA,Gj9,0,[GX8],[0]],oJ9=[3,iA,fj9,0,[lB7],[128]],aJ9=[3,iA,_j9,0,[OP,KT,mB7,ZX8,NW6],[0,0,0,1,0]],sJ9=[3,iA,$j9,0,[KT,vH9,NW6],[0,64,0]],tJ9=[3,iA,Ej9,0,[MH9,Lj9,MJ9,Cj9],[0,0,0,0]],eJ9=[3,iA,Nj9,0,[nj9,kH9,EJ1,OP],[0,0,0,0]],AM9=[3,iA,vj9,0,[KT],[0]],qM9=[-3,iA,yj9,{[Rb]:Cg,[hg]:403},[Sb],[0]];hE.TypeRegistry.for(iA).registerError(qM9,EB7);var KM9=[-3,iA,Ij9,{[Rb]:Cg,[hg]:409},[Sb],[0]];hE.TypeRegistry.for(iA).registerError(KM9,LB7);var YM9=[-3,iA,Bj9,{[Rb]:Cg,[hg]:404},[Sb],[0]];hE.TypeRegistry.for(iA).registerError(YM9,RB7);var zM9=[3,iA,uj9,0,[AJ9,YH9,hj9],[0,0,()=>wM9]],wM9=[3,iA,bj9,0,[mj9],[()=>TM9]],_M9=[3,iA,Fj9,0,[OP,QB7,UB7],[0,128,()=>aB7]],$M9=[3,iA,dj9,0,[OP,LJ1,fX8,yJ1],[0,0,2,128]],OM9=[3,iA,cj9,0,[OP,LJ1,fX8,yJ1],[0,0,2,128]],HM9=[3,iA,tj9,0,[GX8,lB7],[0,128]],jM9=[3,iA,ej9,0,[],[]],JM9=[-3,iA,aj9,{[Rb]:Cg,[hg]:429},[Sb],[0]];hE.TypeRegistry.for(iA).registerError(JM9,yB7);var MM9=[3,iA,KJ9,0,[KT,OP,EJ1,mB7],[0,0,0,0]],DM9=[3,iA,_J9,0,[KT,VW6,Tj9],[0,[()=>og6,0],64]],XM9=[3,iA,$J9,0,[KT,LH9],[0,0]],PM9=[3,iA,jJ9,0,[GX8,oj9],[0,64]],WM9=[3,iA,JJ9,0,[],[]],RJ1="unit",ZM9=[-3,iB7,"CognitoIdentityServiceException",0,[],[]];hE.TypeRegistry.for(iB7).registerError(ZM9,IE);var oB7=[1,iA,OH9,0,()=>WJ9],GM9=[1,iA,tH9,0,()=>rB7],fM9=[1,iA,qj9,0,()=>FJ9],TM9=[1,iA,kj9,0,()=>tJ9],VM9=[1,iA,wJ9,0,()=>XM9],og6=[2,iA,Pj9,0,[0,0],[()=>XJ9,0]],aB7=[2,iA,xj9,0,0,()=>zM9],NM9=[9,iA,HH9,0,()=>GJ9,()=>vJ1],vM9=[9,iA,DH9,0,()=>TJ9,()=>VJ9],kM9=[9,iA,WH9,0,()=>NJ9,()=>RJ1],EM9=[9,iA,VH9,0,()=>vJ9,()=>rB7],LM9=[9,iA,fH9,0,()=>kJ9,()=>vJ1],yM9=[9,iA,RH9,0,()=>yJ9,()=>RJ9],RM9=[9,iA,hH9,0,()=>hJ9,()=>IJ9],SM9=[9,iA,bH9,0,()=>SJ9,()=>CJ9],CM9=[9,iA,mH9,0,()=>uJ9,()=>BJ9],hM9=[9,iA,gH9,0,()=>bJ9,()=>xJ9],IM9=[9,iA,dH9,0,()=>mJ9,()=>gJ9],bM9=[9,iA,Hj9,0,()=>cJ9,()=>lJ9],xM9=[9,iA,Jj9,0,()=>iJ9,()=>nJ9],uM9=[9,iA,Zj9,0,()=>rJ9,()=>oJ9],BM9=[9,iA,wj9,0,()=>aJ9,()=>sJ9],mM9=[9,iA,Vj9,0,()=>eJ9,()=>AM9],gM9=[9,iA,gj9,0,()=>_M9,()=>RJ1],FM9=[9,iA,pj9,0,()=>$M9,()=>OM9],QM9=[9,iA,sj9,0,()=>HM9,()=>jM9],UM9=[9,iA,qJ9,0,()=>MM9,()=>RJ1],pM9=[9,iA,YJ9,0,()=>DM9,()=>RJ1],dM9=[9,iA,HJ9,0,()=>PM9,()=>WM9],cM9=[9,iA,OJ9,0,()=>vJ1,()=>vJ1];class TX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","CreateIdentityPool",{}).n("CognitoIdentityClient","CreateIdentityPoolCommand").sc(NM9).build(){}class VX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","DeleteIdentities",{}).n("CognitoIdentityClient","DeleteIdentitiesCommand").sc(vM9).build(){}class NX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","DeleteIdentityPool",{}).n("CognitoIdentityClient","DeleteIdentityPoolCommand").sc(kM9).build(){}class vX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","DescribeIdentity",{}).n("CognitoIdentityClient","DescribeIdentityCommand").sc(EM9).build(){}class kX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","DescribeIdentityPool",{}).n("CognitoIdentityClient","DescribeIdentityPoolCommand").sc(LM9).build(){}class EX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(yM9).build(){}class LX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(RM9).build(){}class yX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetIdentityPoolRoles",{}).n("CognitoIdentityClient","GetIdentityPoolRolesCommand").sc(SM9).build(){}class RX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetOpenIdToken",{}).n("CognitoIdentityClient","GetOpenIdTokenCommand").sc(CM9).build(){}class SX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetOpenIdTokenForDeveloperIdentity",{}).n("CognitoIdentityClient","GetOpenIdTokenForDeveloperIdentityCommand").sc(hM9).build(){}class CX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetPrincipalTagAttributeMap",{}).n("CognitoIdentityClient","GetPrincipalTagAttributeMapCommand").sc(IM9).build(){}class hX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","ListIdentities",{}).n("CognitoIdentityClient","ListIdentitiesCommand").sc(bM9).build(){}class SJ1 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","ListIdentityPools",{}).n("CognitoIdentityClient","ListIdentityPoolsCommand").sc(xM9).build(){}class IX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","ListTagsForResource",{}).n("CognitoIdentityClient","ListTagsForResourceCommand").sc(uM9).build(){}class bX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","LookupDeveloperIdentity",{}).n("CognitoIdentityClient","LookupDeveloperIdentityCommand").sc(BM9).build(){}class xX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","MergeDeveloperIdentities",{}).n("CognitoIdentityClient","MergeDeveloperIdentitiesCommand").sc(mM9).build(){}class uX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","SetIdentityPoolRoles",{}).n("CognitoIdentityClient","SetIdentityPoolRolesCommand").sc(gM9).build(){}class BX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","SetPrincipalTagAttributeMap",{}).n("CognitoIdentityClient","SetPrincipalTagAttributeMapCommand").sc(FM9).build(){}class mX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","TagResource",{}).n("CognitoIdentityClient","TagResourceCommand").sc(QM9).build(){}class gX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","UnlinkDeveloperIdentity",{}).n("CognitoIdentityClient","UnlinkDeveloperIdentityCommand").sc(UM9).build(){}class FX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","UnlinkIdentity",{}).n("CognitoIdentityClient","UnlinkIdentityCommand").sc(pM9).build(){}class QX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","UntagResource",{}).n("CognitoIdentityClient","UntagResourceCommand").sc(dM9).build(){}class UX8 extends lw.Command.classBuilder().ep(UH).m(function(A,q,K,Y){return[tO.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","UpdateIdentityPool",{}).n("CognitoIdentityClient","UpdateIdentityPoolCommand").sc(cM9).build(){}var lM9={CreateIdentityPoolCommand:TX8,DeleteIdentitiesCommand:VX8,DeleteIdentityPoolCommand:NX8,DescribeIdentityCommand:vX8,DescribeIdentityPoolCommand:kX8,GetCredentialsForIdentityCommand:EX8,GetIdCommand:LX8,GetIdentityPoolRolesCommand:yX8,GetOpenIdTokenCommand:RX8,GetOpenIdTokenForDeveloperIdentityCommand:SX8,GetPrincipalTagAttributeMapCommand:CX8,ListIdentitiesCommand:hX8,ListIdentityPoolsCommand:SJ1,ListTagsForResourceCommand:IX8,LookupDeveloperIdentityCommand:bX8,MergeDeveloperIdentitiesCommand:xX8,SetIdentityPoolRolesCommand:uX8,SetPrincipalTagAttributeMapCommand:BX8,TagResourceCommand:mX8,UnlinkDeveloperIdentityCommand:gX8,UnlinkIdentityCommand:FX8,UntagResourceCommand:QX8,UpdateIdentityPoolCommand:UX8};class pX8 extends kJ1{}lw.createAggregatedClient(lM9,pX8);var iM9=NJ1.createPaginator(kJ1,SJ1,"NextToken","NextToken","MaxResults"),nM9={AUTHENTICATED_ROLE:"AuthenticatedRole",DENY:"Deny"},rM9={ACCESS_DENIED:"AccessDenied",INTERNAL_SERVER_ERROR:"InternalServerError"},oM9={CONTAINS:"Contains",EQUALS:"Equals",NOT_EQUAL:"NotEqual",STARTS_WITH:"StartsWith"},aM9={RULES:"Rules",TOKEN:"Token"};Object.defineProperty(dX8,"$Command",{enumerable:!0,get:function(){return lw.Command}});Object.defineProperty(dX8,"__Client",{enumerable:!0,get:function(){return lw.Client}});dX8.AmbiguousRoleResolutionType=nM9;dX8.CognitoIdentity=pX8;dX8.CognitoIdentityClient=kJ1;dX8.CognitoIdentityServiceException=IE;dX8.ConcurrentModificationException=IB7;dX8.CreateIdentityPoolCommand=TX8;dX8.DeleteIdentitiesCommand=VX8;dX8.DeleteIdentityPoolCommand=NX8;dX8.DescribeIdentityCommand=vX8;dX8.DescribeIdentityPoolCommand=kX8;dX8.DeveloperUserAlreadyRegisteredException=hB7;dX8.ErrorCode=rM9;dX8.ExternalServiceException=SB7;dX8.GetCredentialsForIdentityCommand=EX8;dX8.GetIdCommand=LX8;dX8.GetIdentityPoolRolesCommand=yX8;dX8.GetOpenIdTokenCommand=RX8;dX8.GetOpenIdTokenForDeveloperIdentityCommand=SX8;dX8.GetPrincipalTagAttributeMapCommand=CX8;dX8.InternalErrorException=NB7;dX8.InvalidIdentityPoolConfigurationException=CB7;dX8.InvalidParameterException=vB7;dX8.LimitExceededException=kB7;dX8.ListIdentitiesCommand=hX8;dX8.ListIdentityPoolsCommand=SJ1;dX8.ListTagsForResourceCommand=IX8;dX8.LookupDeveloperIdentityCommand=bX8;dX8.MappingRuleMatchType=oM9;dX8.MergeDeveloperIdentitiesCommand=xX8;dX8.NotAuthorizedException=EB7;dX8.ResourceConflictException=LB7;dX8.ResourceNotFoundException=RB7;dX8.RoleMappingType=aM9;dX8.SetIdentityPoolRolesCommand=uX8;dX8.SetPrincipalTagAttributeMapCommand=BX8;dX8.TagResourceCommand=mX8;dX8.TooManyRequestsException=yB7;dX8.UnlinkDeveloperIdentityCommand=gX8;dX8.UnlinkIdentityCommand=FX8;dX8.UntagResourceCommand=QX8;dX8.UpdateIdentityPoolCommand=UX8;dX8.paginateListIdentityPools=iM9});var lX8=C((CJ1)=>{var cX8=sB7();Object.defineProperty(CJ1,"CognitoIdentityClient",{enumerable:!0,get:function(){return cX8.CognitoIdentityClient}});Object.defineProperty(CJ1,"GetCredentialsForIdentityCommand",{enumerable:!0,get:function(){return cX8.GetCredentialsForIdentityCommand}});Object.defineProperty(CJ1,"GetIdCommand",{enumerable:!0,get:function(){return cX8.GetIdCommand}})});var nX8=C((iD9)=>{var hJ1=EM();function tB7(A){return Promise.all(Object.keys(A).reduce((q,K)=>{let Y=A[K];if(typeof Y==="string")q.push([K,Y]);else q.push(Y().then((z)=>[K,z]));return q},[])).then((q)=>q.reduce((K,[Y,z])=>{return K[Y]=z,K},{}))}function eB7(A){return async(q)=>{A.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");let{GetCredentialsForIdentityCommand:K,CognitoIdentityClient:Y}=await Promise.resolve().then(function(){return lX8()}),z=(H)=>A.clientConfig?.[H]??A.parentClientConfig?.[H]??q?.callerClientConfig?.[H],{Credentials:{AccessKeyId:w=FD9(A.logger),Expiration:_,SecretKey:$=UD9(A.logger),SessionToken:O}=QD9(A.logger)}=await(A.client??new Y(Object.assign({},A.clientConfig??{},{region:z("region"),profile:z("profile"),userAgentAppId:z("userAgentAppId")}))).send(new K({CustomRoleArn:A.customRoleArn,IdentityId:A.identityId,Logins:A.logins?await tB7(A.logins):void 0}));return{identityId:A.identityId,accessKeyId:w,secretAccessKey:$,sessionToken:O,expiration:_}}}function FD9(A){throw new hJ1.CredentialsProviderError("Response from Amazon Cognito contained no access key ID",{logger:A})}function QD9(A){throw new hJ1.CredentialsProviderError("Response from Amazon Cognito contained no credentials",{logger:A})}function UD9(A){throw new hJ1.CredentialsProviderError("Response from Amazon Cognito contained no secret key",{logger:A})}var iX8="IdentityIds";class Am7{dbName;constructor(A="aws:cognito-identity-ids"){this.dbName=A}getItem(A){return this.withObjectStore("readonly",(q)=>{let K=q.get(A);return new Promise((Y)=>{K.onerror=()=>Y(null),K.onsuccess=()=>Y(K.result?K.result.value:null)})}).catch(()=>null)}removeItem(A){return this.withObjectStore("readwrite",(q)=>{let K=q.delete(A);return new Promise((Y,z)=>{K.onerror=()=>z(K.error),K.onsuccess=()=>Y()})})}setItem(A,q){return this.withObjectStore("readwrite",(K)=>{let Y=K.put({id:A,value:q});return new Promise((z,w)=>{Y.onerror=()=>w(Y.error),Y.onsuccess=()=>z()})})}getDb(){let A=self.indexedDB.open(this.dbName,1);return new Promise((q,K)=>{A.onsuccess=()=>{q(A.result)},A.onerror=()=>{K(A.error)},A.onblocked=()=>{K(Error("Unable to access DB"))},A.onupgradeneeded=()=>{let Y=A.result;Y.onerror=()=>{K(Error("Failed to create object store"))},Y.createObjectStore(iX8,{keyPath:"id"})}})}withObjectStore(A,q){return this.getDb().then((K)=>{let Y=K.transaction(iX8,A);return Y.oncomplete=()=>K.close(),new Promise((z,w)=>{Y.onerror=()=>w(Y.error),z(q(Y.objectStore(iX8)))}).catch((z)=>{throw K.close(),z})})}}class qm7{store;constructor(A={}){this.store=A}getItem(A){if(A in this.store)return this.store[A];return null}removeItem(A){delete this.store[A]}setItem(A,q){this.store[A]=q}}var pD9=new qm7;function dD9(){if(typeof self==="object"&&self.indexedDB)return new Am7;if(typeof window==="object"&&window.localStorage)return window.localStorage;return pD9}function cD9({accountId:A,cache:q=dD9(),client:K,clientConfig:Y,customRoleArn:z,identityPoolId:w,logins:_,userIdentifier:$=!_||Object.keys(_).length===0?"ANONYMOUS":void 0,logger:O,parentClientConfig:H}){O?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");let j=$?`aws:cognito-identity-credentials:${w}:${$}`:void 0,J=async(M)=>{let{GetIdCommand:D,CognitoIdentityClient:X}=await Promise.resolve().then(function(){return lX8()}),P=(G)=>Y?.[G]??H?.[G]??M?.callerClientConfig?.[G],W=K??new X(Object.assign({},Y??{},{region:P("region"),profile:P("profile"),userAgentAppId:P("userAgentAppId")})),Z=j&&await q.getItem(j);if(!Z){let{IdentityId:G=lD9(O)}=await W.send(new D({AccountId:A,IdentityPoolId:w,Logins:_?await tB7(_):void 0}));if(Z=G,j)Promise.resolve(q.setItem(j,Z)).catch(()=>{})}return J=eB7({client:W,customRoleArn:z,logins:_,identityId:Z}),J(M)};return(M)=>J(M).catch(async(D)=>{if(j)Promise.resolve(q.removeItem(j)).catch(()=>{});throw D})}function lD9(A){throw new hJ1.CredentialsProviderError("Response from Amazon Cognito contained no identity ID",{logger:A})}iD9.fromCognitoIdentity=eB7;iD9.fromCognitoIdentityPool=cD9});var zm7=C((Km7)=>{Object.defineProperty(Km7,"__esModule",{value:!0});Km7.fromCognitoIdentity=void 0;var oD9=nX8(),aD9=(A)=>(0,oD9.fromCognitoIdentity)({...A});Km7.fromCognitoIdentity=aD9});var $m7=C((wm7)=>{Object.defineProperty(wm7,"__esModule",{value:!0});wm7.fromCognitoIdentityPool=void 0;var sD9=nX8(),tD9=(A)=>(0,sD9.fromCognitoIdentityPool)({...A});wm7.fromCognitoIdentityPool=tD9});var jm7=C((Om7)=>{Object.defineProperty(Om7,"__esModule",{value:!0});Om7.fromContainerMetadata=void 0;var eD9=L36(),AX9=(A)=>{return A?.logger?.debug("@smithy/credential-provider-imds","fromContainerMetadata"),(0,eD9.fromContainerMetadata)(A)};Om7.fromContainerMetadata=AX9});var Dm7=C((Jm7)=>{Object.defineProperty(Jm7,"__esModule",{value:!0});Jm7.fromEnv=void 0;var qX9=bw1(),KX9=(A)=>(0,qX9.fromEnv)(A);Jm7.fromEnv=KX9});var Wm7=C((Xm7)=>{Object.defineProperty(Xm7,"__esModule",{value:!0});Xm7.fromIni=void 0;var YX9=nw8(),zX9=(A={})=>(0,YX9.fromIni)({...A});Xm7.fromIni=zX9});var fm7=C((Zm7)=>{Object.defineProperty(Zm7,"__esModule",{value:!0});Zm7.fromInstanceMetadata=void 0;var wX9=ON(),_X9=L36(),$X9=(A)=>{return A?.logger?.debug("@smithy/credential-provider-imds","fromInstanceMetadata"),async()=>(0,_X9.fromInstanceMetadata)(A)().then((q)=>(0,wX9.setCredentialFeature)(q,"CREDENTIALS_IMDS","0"))};Zm7.fromInstanceMetadata=$X9});var Nm7=C((Tm7)=>{Object.defineProperty(Tm7,"__esModule",{value:!0});Tm7.fromLoginCredentials=void 0;var OX9=Ew8(),HX9=(A)=>(0,OX9.fromLoginCredentials)({...A});Tm7.fromLoginCredentials=HX9});var rX8=C((vm7)=>{Object.defineProperty(vm7,"__esModule",{value:!0});vm7.fromNodeProviderChain=void 0;var jX9=i36(),JX9=(A={})=>(0,jX9.defaultProvider)({...A});vm7.fromNodeProviderChain=JX9});var ym7=C((Em7)=>{Object.defineProperty(Em7,"__esModule",{value:!0});Em7.fromProcess=void 0;var MX9=y_1(),DX9=(A)=>(0,MX9.fromProcess)(A);Em7.fromProcess=DX9});var Cm7=C((Rm7)=>{Object.defineProperty(Rm7,"__esModule",{value:!0});Rm7.fromSSO=void 0;var XX9=D_1(),PX9=(A={})=>{return(0,XX9.fromSSO)({...A})};Rm7.fromSSO=PX9});var Im7=C((IJ1)=>{Object.defineProperty(IJ1,"__esModule",{value:!0});IJ1.STSClient=IJ1.AssumeRoleCommand=void 0;var hm7=L_1();Object.defineProperty(IJ1,"AssumeRoleCommand",{enumerable:!0,get:function(){return hm7.AssumeRoleCommand}});Object.defineProperty(IJ1,"STSClient",{enumerable:!0,get:function(){return hm7.STSClient}})});var um7=C((Ig)=>{var ZX9=Ig&&Ig.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),GX9=Ig&&Ig.__setModuleDefault||(Object.create?function(A,q){Object.defineProperty(A,"default",{enumerable:!0,value:q})}:function(A,q){A.default=q}),fX9=Ig&&Ig.__importStar||function(){var A=function(q){return A=Object.getOwnPropertyNames||function(K){var Y=[];for(var z in K)if(Object.prototype.hasOwnProperty.call(K,z))Y[Y.length]=z;return Y},A(q)};return function(q){if(q&&q.__esModule)return q;var K={};if(q!=null){for(var Y=A(q),z=0;z{let Y;return async(z={})=>{let{callerClientConfig:w}=z,_=A.clientConfig?.profile??w?.profile,$=A.logger??w?.logger;$?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");let O={...A.params,RoleSessionName:A.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(O?.SerialNumber){if(!A.mfaCodeProvider)throw new bm7.CredentialsProviderError("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:$});O.TokenCode=await A.mfaCodeProvider(O?.SerialNumber)}let{AssumeRoleCommand:H,STSClient:j}=await Promise.resolve().then(()=>fX9(Im7()));if(!Y){let M=typeof q==="function"?q():void 0,D=[A.masterCredentials,A.clientConfig?.credentials,void w?.credentials,w?.credentialDefaultProvider?.(),M],X="STS client default credentials";if(D[0])X="options.masterCredentials";else if(D[1])X="options.clientConfig.credentials";else if(D[2])throw X="caller client's credentials",Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");else if(D[3])X="caller client's credentialDefaultProvider";else if(D[4])X="AWS SDK default credentials";let P=[A.clientConfig?.region,w?.region,await K?.({profile:_}),VX9],W="default partition's default region";if(P[0])W="options.clientConfig.region";else if(P[1])W="caller client's region";else if(P[2])W="file or env region";let Z=[xm7(A.clientConfig?.requestHandler),xm7(w?.requestHandler)],G="STS default requestHandler";if(Z[0])G="options.clientConfig.requestHandler";else if(Z[1])G="caller client's requestHandler";$?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${W}=${await(0,TX9.normalizeProvider)(bJ1(P))()}, ${X}, ${G}.`),Y=new j({userAgentAppId:w?.userAgentAppId,...A.clientConfig,credentials:bJ1(D),logger:$,profile:_,region:bJ1(P),requestHandler:bJ1(Z)})}if(A.clientPlugins)for(let M of A.clientPlugins)Y.middlewareStack.use(M);let{Credentials:J}=await Y.send(new H(O));if(!J||!J.AccessKeyId||!J.SecretAccessKey)throw new bm7.CredentialsProviderError(`Invalid response from STS.assumeRole call with role ${O.RoleArn}`,{logger:$});return{accessKeyId:J.AccessKeyId,secretAccessKey:J.SecretAccessKey,sessionToken:J.SessionToken,expiration:J.Expiration,credentialScope:J.CredentialScope}}};Ig.fromTemporaryCredentials=NX9;var xm7=(A)=>{return A?.metadata?.handlerProtocol==="h2"?void 0:A},bJ1=(A)=>{for(let q of A)if(q!==void 0)return q}});var gm7=C((Bm7)=>{Object.defineProperty(Bm7,"__esModule",{value:!0});Bm7.fromTemporaryCredentials=void 0;var vX9=NJ(),kX9=HN(),EX9=rX8(),LX9=um7(),yX9=(A)=>{return(0,LX9.fromTemporaryCredentials)(A,EX9.fromNodeProviderChain,async({profile:q=process.env.AWS_PROFILE})=>(0,kX9.loadConfig)({environmentVariableSelector:(K)=>K.AWS_REGION,configFileSelector:(K)=>{return K.region},default:()=>{return}},{...vX9.NODE_REGION_CONFIG_FILE_OPTIONS,profile:q})())};Bm7.fromTemporaryCredentials=yX9});var Um7=C((Fm7)=>{Object.defineProperty(Fm7,"__esModule",{value:!0});Fm7.fromTokenFile=void 0;var RX9=RB6(),SX9=(A={})=>(0,RX9.fromTokenFile)({...A});Fm7.fromTokenFile=SX9});var cm7=C((pm7)=>{Object.defineProperty(pm7,"__esModule",{value:!0});pm7.fromWebToken=void 0;var CX9=RB6(),hX9=(A)=>(0,CX9.fromWebToken)({...A});pm7.fromWebToken=hX9});var oX8=C((c0)=>{Object.defineProperty(c0,"__esModule",{value:!0});c0.fromHttp=void 0;var RN=d2();RN.__exportStar(Ou7(),c0);RN.__exportStar(zm7(),c0);RN.__exportStar($m7(),c0);RN.__exportStar(jm7(),c0);RN.__exportStar(Dm7(),c0);var IX9=w21();Object.defineProperty(c0,"fromHttp",{enumerable:!0,get:function(){return IX9.fromHttp}});RN.__exportStar(Wm7(),c0);RN.__exportStar(fm7(),c0);RN.__exportStar(Nm7(),c0);RN.__exportStar(rX8(),c0);RN.__exportStar(ym7(),c0);RN.__exportStar(Cm7(),c0);RN.__exportStar(gm7(),c0);RN.__exportStar(Um7(),c0);RN.__exportStar(cm7(),c0)});import xX9 from"assert";var lm7,im7,nm7,rm7,uX9=()=>Promise.resolve().then(() => e(oX8(),1)).then(({fromNodeProviderChain:A})=>A({clientConfig:{requestHandler:new im7.FetchHttpHandler({requestInit:(q)=>{return{...q}}})}})).catch((A)=>{throw Error(`Failed to import '@aws-sdk/credential-providers'.You can provide a custom \`providerChainResolver\` in the client options if your runtime does not have access to '@aws-sdk/credential-providers': \`new AnthropicBedrock({ providerChainResolver })\` Original error: ${A.message}`)}),om7=async(A,q)=>{xX9(A.method,"Expected request method property to be set");let K=await(q.providerChainResolver?q.providerChainResolver():uX9()),Y=await BX9(()=>{if(q.awsAccessKey)process.env.AWS_ACCESS_KEY_ID=q.awsAccessKey;if(q.awsSecretKey)process.env.AWS_SECRET_ACCESS_KEY=q.awsSecretKey;if(q.awsSessionToken)process.env.AWS_SESSION_TOKEN=q.awsSessionToken},()=>K()),z=new rm7.SignatureV4({service:"bedrock",region:q.regionName,credentials:Y,sha256:lm7.Sha256}),w=new URL(q.url),_=!A.headers?{}:(Symbol.iterator in A.headers)?Object.fromEntries(Array.from(A.headers).map((H)=>[...H])):{...A.headers};delete _.connection,_.host=w.hostname;let $=new nm7.HttpRequest({method:A.method.toUpperCase(),protocol:w.protocol,path:w.pathname,headers:_,body:A.body});return(await z.sign($)).headers},BX9=async(A,q)=>{let K={...process.env};try{return A(),await q()}finally{process.env=K}};var am7=k(()=>{lm7=e(Ab7(),1),im7=e(uD8(),1),nm7=e(mD8(),1),rm7=e(_u7(),1)});var sX8=C((US2,uJ1)=>{/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var sm7,tm7,em7,Ag7,qg7,Kg7,Yg7,zg7,wg7,xJ1,aX8,_g7,$g7,vW6,Og7,Hg7,jg7,Jg7,Mg7,Dg7,Xg7,Pg7,Wg7;(function(A){var q=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(Y){A(K(q,K(Y)))});else if(typeof uJ1==="object"&&typeof US2==="object")A(K(q,K(US2)));else A(K(q));function K(Y,z){if(Y!==q)if(typeof Object.create==="function")Object.defineProperty(Y,"__esModule",{value:!0});else Y.__esModule=!0;return function(w,_){return Y[w]=z?z(w,_):_}}})(function(A){var q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(K,Y){K.__proto__=Y}||function(K,Y){for(var z in Y)if(Y.hasOwnProperty(z))K[z]=Y[z]};sm7=function(K,Y){q(K,Y);function z(){this.constructor=K}K.prototype=Y===null?Object.create(Y):(z.prototype=Y.prototype,new z)},tm7=Object.assign||function(K){for(var Y,z=1,w=arguments.length;z=0;H--)if(O=K[H])$=(_<3?O($):_>3?O(Y,z,$):O(Y,z))||$;return _>3&&$&&Object.defineProperty(Y,z,$),$},qg7=function(K,Y){return function(z,w){Y(z,w,K)}},Kg7=function(K,Y){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(K,Y)},Yg7=function(K,Y,z,w){function _($){return $ instanceof z?$:new z(function(O){O($)})}return new(z||(z=Promise))(function($,O){function H(M){try{J(w.next(M))}catch(D){O(D)}}function j(M){try{J(w.throw(M))}catch(D){O(D)}}function J(M){M.done?$(M.value):_(M.value).then(H,j)}J((w=w.apply(K,Y||[])).next())})},zg7=function(K,Y){var z={label:0,sent:function(){if($[0]&1)throw $[1];return $[1]},trys:[],ops:[]},w,_,$,O;return O={next:H(0),throw:H(1),return:H(2)},typeof Symbol==="function"&&(O[Symbol.iterator]=function(){return this}),O;function H(J){return function(M){return j([J,M])}}function j(J){if(w)throw TypeError("Generator is already executing.");while(z)try{if(w=1,_&&($=J[0]&2?_.return:J[0]?_.throw||(($=_.return)&&$.call(_),0):_.next)&&!($=$.call(_,J[1])).done)return $;if(_=0,$)J=[J[0]&2,$.value];switch(J[0]){case 0:case 1:$=J;break;case 4:return z.label++,{value:J[1],done:!1};case 5:z.label++,_=J[1],J=[0];continue;case 7:J=z.ops.pop(),z.trys.pop();continue;default:if(($=z.trys,!($=$.length>0&&$[$.length-1]))&&(J[0]===6||J[0]===2)){z=0;continue}if(J[0]===3&&(!$||J[1]>$[0]&&J[1]<$[3])){z.label=J[1];break}if(J[0]===6&&z.label<$[1]){z.label=$[1],$=J;break}if($&&z.label<$[2]){z.label=$[2],z.ops.push(J);break}if($[2])z.ops.pop();z.trys.pop();continue}J=Y.call(K,z)}catch(M){J=[6,M],_=0}finally{w=$=0}if(J[0]&5)throw J[1];return{value:J[0]?J[1]:void 0,done:!0}}},Wg7=function(K,Y,z,w){if(w===void 0)w=z;K[w]=Y[z]},wg7=function(K,Y){for(var z in K)if(z!=="default"&&!Y.hasOwnProperty(z))Y[z]=K[z]},xJ1=function(K){var Y=typeof Symbol==="function"&&Symbol.iterator,z=Y&&K[Y],w=0;if(z)return z.call(K);if(K&&typeof K.length==="number")return{next:function(){if(K&&w>=K.length)K=void 0;return{value:K&&K[w++],done:!K}}};throw TypeError(Y?"Object is not iterable.":"Symbol.iterator is not defined.")},aX8=function(K,Y){var z=typeof Symbol==="function"&&K[Symbol.iterator];if(!z)return K;var w=z.call(K),_,$=[],O;try{while((Y===void 0||Y-- >0)&&!(_=w.next()).done)$.push(_.value)}catch(H){O={error:H}}finally{try{if(_&&!_.done&&(z=w.return))z.call(w)}finally{if(O)throw O.error}}return $},_g7=function(){for(var K=[],Y=0;Y1||H(X,P)})}}function H(X,P){try{j(w[X](P))}catch(W){D($[0][3],W)}}function j(X){X.value instanceof vW6?Promise.resolve(X.value.v).then(J,M):D($[0][2],X)}function J(X){H("next",X)}function M(X){H("throw",X)}function D(X,P){if(X(P),$.shift(),$.length)H($[0][0],$[0][1])}},Hg7=function(K){var Y,z;return Y={},w("next"),w("throw",function(_){throw _}),w("return"),Y[Symbol.iterator]=function(){return this},Y;function w(_,$){Y[_]=K[_]?function(O){return(z=!z)?{value:vW6(K[_](O)),done:_==="return"}:$?$(O):O}:$}},jg7=function(K){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var Y=K[Symbol.asyncIterator],z;return Y?Y.call(K):(K=typeof xJ1==="function"?xJ1(K):K[Symbol.iterator](),z={},w("next"),w("throw"),w("return"),z[Symbol.asyncIterator]=function(){return this},z);function w($){z[$]=K[$]&&function(O){return new Promise(function(H,j){O=K[$](O),_(H,j,O.done,O.value)})}}function _($,O,H,j){Promise.resolve(j).then(function(J){$({value:J,done:H})},O)}},Jg7=function(K,Y){if(Object.defineProperty)Object.defineProperty(K,"raw",{value:Y});else K.raw=Y;return K},Mg7=function(K){if(K&&K.__esModule)return K;var Y={};if(K!=null){for(var z in K)if(Object.hasOwnProperty.call(K,z))Y[z]=K[z]}return Y.default=K,Y},Dg7=function(K){return K&&K.__esModule?K:{default:K}},Xg7=function(K,Y){if(!Y.has(K))throw TypeError("attempted to get private field on non-instance");return Y.get(K)},Pg7=function(K,Y,z){if(!Y.has(K))throw TypeError("attempted to set private field on non-instance");return Y.set(K,z),z},A("__extends",sm7),A("__assign",tm7),A("__rest",em7),A("__decorate",Ag7),A("__param",qg7),A("__metadata",Kg7),A("__awaiter",Yg7),A("__generator",zg7),A("__exportStar",wg7),A("__createBinding",Wg7),A("__values",xJ1),A("__read",aX8),A("__spread",_g7),A("__spreadArrays",$g7),A("__await",vW6),A("__asyncGenerator",Og7),A("__asyncDelegator",Hg7),A("__asyncValues",jg7),A("__makeTemplateObject",Jg7),A("__importStar",Mg7),A("__importDefault",Dg7),A("__classPrivateFieldGet",Xg7),A("__classPrivateFieldSet",Pg7)})});var fg7=C((Zg7)=>{Object.defineProperty(Zg7,"__esModule",{value:!0});Zg7.convertToBuffer=void 0;var mX9=ED8(),gX9=typeof Buffer<"u"&&Buffer.from?function(A){return Buffer.from(A,"utf8")}:mX9.fromUtf8;function FX9(A){if(A instanceof Uint8Array)return A;if(typeof A==="string")return gX9(A);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(A)}Zg7.convertToBuffer=FX9});var Ng7=C((Tg7)=>{Object.defineProperty(Tg7,"__esModule",{value:!0});Tg7.isEmptyData=void 0;function QX9(A){if(typeof A==="string")return A.length===0;return A.byteLength===0}Tg7.isEmptyData=QX9});var Eg7=C((vg7)=>{Object.defineProperty(vg7,"__esModule",{value:!0});vg7.numToUint8=void 0;function UX9(A){return new Uint8Array([(A&4278190080)>>24,(A&16711680)>>16,(A&65280)>>8,A&255])}vg7.numToUint8=UX9});var Rg7=C((Lg7)=>{Object.defineProperty(Lg7,"__esModule",{value:!0});Lg7.uint32ArrayFrom=void 0;function pX9(A){if(!Uint32Array.from){var q=new Uint32Array(A.length),K=0;while(K{Object.defineProperty(kW6,"__esModule",{value:!0});kW6.uint32ArrayFrom=kW6.numToUint8=kW6.isEmptyData=kW6.convertToBuffer=void 0;var dX9=fg7();Object.defineProperty(kW6,"convertToBuffer",{enumerable:!0,get:function(){return dX9.convertToBuffer}});var cX9=Ng7();Object.defineProperty(kW6,"isEmptyData",{enumerable:!0,get:function(){return cX9.isEmptyData}});var lX9=Eg7();Object.defineProperty(kW6,"numToUint8",{enumerable:!0,get:function(){return lX9.numToUint8}});var iX9=Rg7();Object.defineProperty(kW6,"uint32ArrayFrom",{enumerable:!0,get:function(){return iX9.uint32ArrayFrom}})});var bg7=C((hg7)=>{Object.defineProperty(hg7,"__esModule",{value:!0});hg7.AwsCrc32=void 0;var Sg7=sX8(),eX8=tX8(),Cg7=BJ1(),rX9=function(){function A(){this.crc32=new Cg7.Crc32}return A.prototype.update=function(q){if((0,eX8.isEmptyData)(q))return;this.crc32.update((0,eX8.convertToBuffer)(q))},A.prototype.digest=function(){return Sg7.__awaiter(this,void 0,void 0,function(){return Sg7.__generator(this,function(q){return[2,(0,eX8.numToUint8)(this.crc32.digest())]})})},A.prototype.reset=function(){this.crc32=new Cg7.Crc32},A}();hg7.AwsCrc32=rX9});var BJ1=C((AP8)=>{Object.defineProperty(AP8,"__esModule",{value:!0});AP8.AwsCrc32=AP8.Crc32=AP8.crc32=void 0;var oX9=sX8(),aX9=tX8();function sX9(A){return new xg7().update(A).digest()}AP8.crc32=sX9;var xg7=function(){function A(){this.checksum=4294967295}return A.prototype.update=function(q){var K,Y;try{for(var z=oX9.__values(q),w=z.next();!w.done;w=z.next()){var _=w.value;this.checksum=this.checksum>>>8^eX9[(this.checksum^_)&255]}}catch($){K={error:$}}finally{try{if(w&&!w.done&&(Y=z.return))Y.call(z)}finally{if(K)throw K.error}}return this},A.prototype.digest=function(){return(this.checksum^4294967295)>>>0},A}();AP8.Crc32=xg7;var tX9=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],eX9=(0,aX9.uint32ArrayFrom)(tX9),AP9=bg7();Object.defineProperty(AP8,"AwsCrc32",{enumerable:!0,get:function(){return AP9.AwsCrc32}})});var Ug7=C((tS2,Qg7)=>{var{defineProperty:mJ1,getOwnPropertyDescriptor:zP9,getOwnPropertyNames:wP9}=Object,_P9=Object.prototype.hasOwnProperty,ug7=(A,q)=>mJ1(A,"name",{value:q,configurable:!0}),$P9=(A,q)=>{for(var K in q)mJ1(A,K,{get:q[K],enumerable:!0})},OP9=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of wP9(q))if(!_P9.call(A,z)&&z!==K)mJ1(A,z,{get:()=>q[z],enumerable:!(Y=zP9(q,z))||Y.enumerable})}return A},HP9=(A)=>OP9(mJ1({},"__esModule",{value:!0}),A),Bg7={};$P9(Bg7,{fromHex:()=>gg7,toHex:()=>Fg7});Qg7.exports=HP9(Bg7);var mg7={},qP8={};for(let A=0;A<256;A++){let q=A.toString(16).toLowerCase();if(q.length===1)q=`0${q}`;mg7[A]=q,qP8[q]=A}function gg7(A){if(A.length%2!==0)throw Error("Hex encoded strings must have an even number length");let q=new Uint8Array(A.length/2);for(let K=0;K{var{defineProperty:FJ1,getOwnPropertyDescriptor:jP9,getOwnPropertyNames:JP9}=Object,MP9=Object.prototype.hasOwnProperty,Yl=(A,q)=>FJ1(A,"name",{value:q,configurable:!0}),DP9=(A,q)=>{for(var K in q)FJ1(A,K,{get:q[K],enumerable:!0})},XP9=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of JP9(q))if(!MP9.call(A,z)&&z!==K)FJ1(A,z,{get:()=>q[z],enumerable:!(Y=jP9(q,z))||Y.enumerable})}return A},PP9=(A)=>XP9(FJ1({},"__esModule",{value:!0}),A),dg7={};DP9(dg7,{EventStreamCodec:()=>RP9,HeaderMarshaller:()=>ig7,Int64:()=>gJ1,MessageDecoderStream:()=>SP9,MessageEncoderStream:()=>CP9,SmithyMessageDecoderStream:()=>hP9,SmithyMessageEncoderStream:()=>IP9});AF7.exports=PP9(dg7);var WP9=BJ1(),a56=Ug7(),cg7=class A{constructor(q){if(this.bytes=q,q.byteLength!==8)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(q){if(q>9223372036854776000||q<-9223372036854776000)throw Error(`${q} is too large (or, if negative, too small) to represent as an Int64`);let K=new Uint8Array(8);for(let Y=7,z=Math.abs(Math.round(q));Y>-1&&z>0;Y--,z/=256)K[Y]=z;if(q<0)KP8(K);return new A(K)}valueOf(){let q=this.bytes.slice(0),K=q[0]&128;if(K)KP8(q);return parseInt((0,a56.toHex)(q),16)*(K?-1:1)}toString(){return String(this.valueOf())}};Yl(cg7,"Int64");var gJ1=cg7;function KP8(A){for(let q=0;q<8;q++)A[q]^=255;for(let q=7;q>-1;q--)if(A[q]++,A[q]!==0)break}Yl(KP8,"negate");var lg7=class{constructor(q,K){this.toUtf8=q,this.fromUtf8=K}format(q){let K=[];for(let w of Object.keys(q)){let _=this.fromUtf8(w);K.push(Uint8Array.from([_.byteLength]),_,this.formatHeaderValue(q[w]))}let Y=new Uint8Array(K.reduce((w,_)=>w+_.byteLength,0)),z=0;for(let w of K)Y.set(w,z),z+=w.byteLength;return Y}formatHeaderValue(q){switch(q.type){case"boolean":return Uint8Array.from([q.value?0:1]);case"byte":return Uint8Array.from([2,q.value]);case"short":let K=new DataView(new ArrayBuffer(3));return K.setUint8(0,3),K.setInt16(1,q.value,!1),new Uint8Array(K.buffer);case"integer":let Y=new DataView(new ArrayBuffer(5));return Y.setUint8(0,4),Y.setInt32(1,q.value,!1),new Uint8Array(Y.buffer);case"long":let z=new Uint8Array(9);return z[0]=5,z.set(q.value.bytes,1),z;case"binary":let w=new DataView(new ArrayBuffer(3+q.value.byteLength));w.setUint8(0,6),w.setUint16(1,q.value.byteLength,!1);let _=new Uint8Array(w.buffer);return _.set(q.value,3),_;case"string":let $=this.fromUtf8(q.value),O=new DataView(new ArrayBuffer(3+$.byteLength));O.setUint8(0,7),O.setUint16(1,$.byteLength,!1);let H=new Uint8Array(O.buffer);return H.set($,3),H;case"timestamp":let j=new Uint8Array(9);return j[0]=8,j.set(gJ1.fromNumber(q.value.valueOf()).bytes,1),j;case"uuid":if(!EP9.test(q.value))throw Error(`Invalid UUID received: ${q.value}`);let J=new Uint8Array(17);return J[0]=9,J.set((0,a56.fromHex)(q.value.replace(/\-/g,"")),1),J}}parse(q){let K={},Y=0;while(Y{var{defineProperty:QJ1,getOwnPropertyDescriptor:bP9,getOwnPropertyNames:xP9}=Object,uP9=Object.prototype.hasOwnProperty,EW6=(A,q)=>QJ1(A,"name",{value:q,configurable:!0}),BP9=(A,q)=>{for(var K in q)QJ1(A,K,{get:q[K],enumerable:!0})},mP9=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of xP9(q))if(!uP9.call(A,z)&&z!==K)QJ1(A,z,{get:()=>q[z],enumerable:!(Y=bP9(q,z))||Y.enumerable})}return A},gP9=(A)=>mP9(QJ1({},"__esModule",{value:!0}),A),KF7={};BP9(KF7,{EventStreamMarshaller:()=>_F7,eventStreamSerdeProvider:()=>FP9});$F7.exports=gP9(KF7);var ag6=qF7();function YF7(A){let q=0,K=0,Y=null,z=null,w=EW6(($)=>{if(typeof $!=="number")throw Error("Attempted to allocate an event message where size was not a number: "+$);q=$,K=4,Y=new Uint8Array($),new DataView(Y.buffer).setUint32(0,$,!1)},"allocateMessage"),_=EW6(async function*(){let $=A[Symbol.asyncIterator]();while(!0){let{value:O,done:H}=await $.next();if(H){if(!q)return;else if(q===K)yield Y;else throw Error("Truncated event message received.");return}let j=O.length,J=0;while(Jnew _F7(A),"eventStreamSerdeProvider")});var XF7=C((qC2,DF7)=>{var{defineProperty:UJ1,getOwnPropertyDescriptor:QP9,getOwnPropertyNames:UP9}=Object,pP9=Object.prototype.hasOwnProperty,YP8=(A,q)=>UJ1(A,"name",{value:q,configurable:!0}),dP9=(A,q)=>{for(var K in q)UJ1(A,K,{get:q[K],enumerable:!0})},cP9=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of UP9(q))if(!pP9.call(A,z)&&z!==K)UJ1(A,z,{get:()=>q[z],enumerable:!(Y=QP9(q,z))||Y.enumerable})}return A},lP9=(A)=>cP9(UJ1({},"__esModule",{value:!0}),A),HF7={};dP9(HF7,{EventStreamMarshaller:()=>MF7,eventStreamSerdeProvider:()=>rP9});DF7.exports=lP9(HF7);var iP9=OF7(),nP9=g6("stream");async function*jF7(A){let q=!1,K=!1,Y=[];A.on("error",(z)=>{if(!q)q=!0;if(z)throw z}),A.on("data",(z)=>{Y.push(z)}),A.on("end",()=>{q=!0});while(!K){let z=await new Promise((w)=>setTimeout(()=>w(Y.shift()),0));if(z)yield z;K=q&&Y.length===0}}YP8(jF7,"readabletoIterable");var JF7=class{constructor({utf8Encoder:q,utf8Decoder:K}){this.universalMarshaller=new iP9.EventStreamMarshaller({utf8Decoder:K,utf8Encoder:q})}deserialize(q,K){let Y=typeof q[Symbol.asyncIterator]==="function"?q:jF7(q);return this.universalMarshaller.deserialize(Y,K)}serialize(q,K){return nP9.Readable.from(this.universalMarshaller.serialize(q,K))}};YP8(JF7,"EventStreamMarshaller");var MF7=JF7,rP9=YP8((A)=>new MF7(A),"eventStreamSerdeProvider")});var ZF7=C((PF7)=>{Object.defineProperty(PF7,"__esModule",{value:!0});PF7.fromBase64=void 0;var oP9=A56(),aP9=/^[A-Za-z0-9+/]*={0,2}$/,sP9=(A)=>{if(A.length*3%4!==0)throw TypeError("Incorrect padding on base64 string.");if(!aP9.exec(A))throw TypeError("Invalid base64 string.");let q=(0,oP9.fromString)(A,"base64");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength)};PF7.fromBase64=sP9});var NF7=C((YC2,VF7)=>{var{defineProperty:pJ1,getOwnPropertyDescriptor:tP9,getOwnPropertyNames:eP9}=Object,A09=Object.prototype.hasOwnProperty,zP8=(A,q)=>pJ1(A,"name",{value:q,configurable:!0}),q09=(A,q)=>{for(var K in q)pJ1(A,K,{get:q[K],enumerable:!0})},K09=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of eP9(q))if(!A09.call(A,z)&&z!==K)pJ1(A,z,{get:()=>q[z],enumerable:!(Y=tP9(q,z))||Y.enumerable})}return A},Y09=(A)=>K09(pJ1({},"__esModule",{value:!0}),A),GF7={};q09(GF7,{fromUtf8:()=>TF7,toUint8Array:()=>z09,toUtf8:()=>w09});VF7.exports=Y09(GF7);var fF7=A56(),TF7=zP8((A)=>{let q=(0,fF7.fromString)(A,"utf8");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),z09=zP8((A)=>{if(typeof A==="string")return TF7(A);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(A)},"toUint8Array"),w09=zP8((A)=>{if(typeof A==="string")return A;if(typeof A!=="object"||typeof A.byteOffset!=="number"||typeof A.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return(0,fF7.fromArrayBuffer)(A.buffer,A.byteOffset,A.byteLength).toString("utf8")},"toUtf8")});var EF7=C((vF7)=>{Object.defineProperty(vF7,"__esModule",{value:!0});vF7.toBase64=void 0;var _09=A56(),$09=NF7(),O09=(A)=>{let q;if(typeof A==="string")q=(0,$09.fromUtf8)(A);else q=A;if(typeof q!=="object"||typeof q.byteOffset!=="number"||typeof q.byteLength!=="number")throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,_09.fromArrayBuffer)(q.buffer,q.byteOffset,q.byteLength).toString("base64")};vF7.toBase64=O09});var $P8=C((wC2,dJ1)=>{var{defineProperty:LF7,getOwnPropertyDescriptor:H09,getOwnPropertyNames:j09}=Object,J09=Object.prototype.hasOwnProperty,wP8=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of j09(q))if(!J09.call(A,z)&&z!==K)LF7(A,z,{get:()=>q[z],enumerable:!(Y=H09(q,z))||Y.enumerable})}return A},yF7=(A,q,K)=>(wP8(A,q,"default"),K&&wP8(K,q,"default")),M09=(A)=>wP8(LF7({},"__esModule",{value:!0}),A),_P8={};dJ1.exports=M09(_P8);yF7(_P8,ZF7(),dJ1.exports);yF7(_P8,EF7(),dJ1.exports)});var IF7=C((_C2,hF7)=>{var{defineProperty:cJ1,getOwnPropertyDescriptor:D09,getOwnPropertyNames:X09}=Object,P09=Object.prototype.hasOwnProperty,OS=(A,q)=>cJ1(A,"name",{value:q,configurable:!0}),W09=(A,q)=>{for(var K in q)cJ1(A,K,{get:q[K],enumerable:!0})},Z09=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of X09(q))if(!P09.call(A,z)&&z!==K)cJ1(A,z,{get:()=>q[z],enumerable:!(Y=D09(q,z))||Y.enumerable})}return A},G09=(A)=>Z09(cJ1({},"__esModule",{value:!0}),A),CF7={};W09(CF7,{constructStack:()=>OP8});hF7.exports=G09(CF7);var t56=OS((A,q)=>{let K=[];if(A)K.push(A);if(q)for(let Y of q)K.push(Y);return K},"getAllAliases"),Ee=OS((A,q)=>{return`${A||"anonymous"}${q&&q.length>0?` (a.k.a. ${q.join(",")})`:""}`},"getMiddlewareNameWithAliases"),OP8=OS(()=>{let A=[],q=[],K=!1,Y=new Set,z=OS((J)=>J.sort((M,D)=>RF7[D.step]-RF7[M.step]||SF7[D.priority||"normal"]-SF7[M.priority||"normal"]),"sort"),w=OS((J)=>{let M=!1,D=OS((X)=>{let P=t56(X.name,X.aliases);if(P.includes(J)){M=!0;for(let W of P)Y.delete(W);return!1}return!0},"filterCb");return A=A.filter(D),q=q.filter(D),M},"removeByName"),_=OS((J)=>{let M=!1,D=OS((X)=>{if(X.middleware===J){M=!0;for(let P of t56(X.name,X.aliases))Y.delete(P);return!1}return!0},"filterCb");return A=A.filter(D),q=q.filter(D),M},"removeByReference"),$=OS((J)=>{var M;return A.forEach((D)=>{J.add(D.middleware,{...D})}),q.forEach((D)=>{J.addRelativeTo(D.middleware,{...D})}),(M=J.identifyOnResolve)==null||M.call(J,j.identifyOnResolve()),J},"cloneTo"),O=OS((J)=>{let M=[];return J.before.forEach((D)=>{if(D.before.length===0&&D.after.length===0)M.push(D);else M.push(...O(D))}),M.push(J),J.after.reverse().forEach((D)=>{if(D.before.length===0&&D.after.length===0)M.push(D);else M.push(...O(D))}),M},"expandRelativeMiddlewareList"),H=OS((J=!1)=>{let M=[],D=[],X={};return A.forEach((W)=>{let Z={...W,before:[],after:[]};for(let G of t56(Z.name,Z.aliases))X[G]=Z;M.push(Z)}),q.forEach((W)=>{let Z={...W,before:[],after:[]};for(let G of t56(Z.name,Z.aliases))X[G]=Z;D.push(Z)}),D.forEach((W)=>{if(W.toMiddleware){let Z=X[W.toMiddleware];if(Z===void 0){if(J)return;throw Error(`${W.toMiddleware} is not found when adding ${Ee(W.name,W.aliases)} middleware ${W.relation} ${W.toMiddleware}`)}if(W.relation==="after")Z.after.push(W);if(W.relation==="before")Z.before.push(W)}}),z(M).map(O).reduce((W,Z)=>{return W.push(...Z),W},[])},"getMiddlewareList"),j={add:(J,M={})=>{let{name:D,override:X,aliases:P}=M,W={step:"initialize",priority:"normal",middleware:J,...M},Z=t56(D,P);if(Z.length>0){if(Z.some((G)=>Y.has(G))){if(!X)throw Error(`Duplicate middleware name '${Ee(D,P)}'`);for(let G of Z){let f=A.findIndex((N)=>{var v;return N.name===G||((v=N.aliases)==null?void 0:v.some((y)=>y===G))});if(f===-1)continue;let V=A[f];if(V.step!==W.step||W.priority!==V.priority)throw Error(`"${Ee(V.name,V.aliases)}" middleware with ${V.priority} priority in ${V.step} step cannot be overridden by "${Ee(D,P)}" middleware with ${W.priority} priority in ${W.step} step.`);A.splice(f,1)}}for(let G of Z)Y.add(G)}A.push(W)},addRelativeTo:(J,M)=>{let{name:D,override:X,aliases:P}=M,W={middleware:J,...M},Z=t56(D,P);if(Z.length>0){if(Z.some((G)=>Y.has(G))){if(!X)throw Error(`Duplicate middleware name '${Ee(D,P)}'`);for(let G of Z){let f=q.findIndex((N)=>{var v;return N.name===G||((v=N.aliases)==null?void 0:v.some((y)=>y===G))});if(f===-1)continue;let V=q[f];if(V.toMiddleware!==W.toMiddleware||V.relation!==W.relation)throw Error(`"${Ee(V.name,V.aliases)}" middleware ${V.relation} "${V.toMiddleware}" middleware cannot be overridden by "${Ee(D,P)}" middleware ${W.relation} "${W.toMiddleware}" middleware.`);q.splice(f,1)}}for(let G of Z)Y.add(G)}q.push(W)},clone:()=>$(OP8()),use:(J)=>{J.applyToStack(j)},remove:(J)=>{if(typeof J==="string")return w(J);else return _(J)},removeByTag:(J)=>{let M=!1,D=OS((X)=>{let{tags:P,name:W,aliases:Z}=X;if(P&&P.includes(J)){let G=t56(W,Z);for(let f of G)Y.delete(f);return M=!0,!1}return!0},"filterCb");return A=A.filter(D),q=q.filter(D),M},concat:(J)=>{var M;let D=$(OP8());return D.use(J),D.identifyOnResolve(K||D.identifyOnResolve()||(((M=J.identifyOnResolve)==null?void 0:M.call(J))??!1)),D},applyToStack:$,identify:()=>{return H(!0).map((J)=>{let M=J.step??J.relation+" "+J.toMiddleware;return Ee(J.name,J.aliases)+" - "+M})},identifyOnResolve(J){if(typeof J==="boolean")K=J;return K},resolve:(J,M)=>{for(let D of H().map((X)=>X.middleware).reverse())J=D(J,M);if(K)console.log(j.identify());return J}};return j},"constructStack"),RF7={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},SF7={high:3,normal:2,low:1}});var mF7=C(($C2,BF7)=>{var{defineProperty:lJ1,getOwnPropertyDescriptor:f09,getOwnPropertyNames:T09}=Object,V09=Object.prototype.hasOwnProperty,HP8=(A,q)=>lJ1(A,"name",{value:q,configurable:!0}),N09=(A,q)=>{for(var K in q)lJ1(A,K,{get:q[K],enumerable:!0})},v09=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of T09(q))if(!V09.call(A,z)&&z!==K)lJ1(A,z,{get:()=>q[z],enumerable:!(Y=f09(q,z))||Y.enumerable})}return A},k09=(A)=>v09(lJ1({},"__esModule",{value:!0}),A),bF7={};N09(bF7,{fromUtf8:()=>uF7,toUint8Array:()=>E09,toUtf8:()=>L09});BF7.exports=k09(bF7);var xF7=A56(),uF7=HP8((A)=>{let q=(0,xF7.fromString)(A,"utf8");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),E09=HP8((A)=>{if(typeof A==="string")return uF7(A);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(A)},"toUint8Array"),L09=HP8((A)=>{if(typeof A==="string")return A;if(typeof A!=="object"||typeof A.byteOffset!=="number"||typeof A.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return(0,xF7.fromArrayBuffer)(A.buffer,A.byteOffset,A.byteLength).toString("utf8")},"toUtf8")});var QF7=C((gF7)=>{Object.defineProperty(gF7,"__esModule",{value:!0});gF7.getAwsChunkedEncodingStream=void 0;var y09=g6("stream"),R09=(A,q)=>{let{base64Encoder:K,bodyLengthChecker:Y,checksumAlgorithmFn:z,checksumLocationName:w,streamHasher:_}=q,$=K!==void 0&&z!==void 0&&w!==void 0&&_!==void 0,O=$?_(z,A):void 0,H=new y09.Readable({read:()=>{}});return A.on("data",(j)=>{let J=Y(j)||0;H.push(`${J.toString(16)}\r `),H.push(j),H.push(`\r `)}),A.on("end",async()=>{if(H.push(`0\r `),$){let j=K(await O);H.push(`${w}:${j}\r `),H.push(`\r `)}H.push(null)}),H};gF7.getAwsChunkedEncodingStream=R09});var cF7=C((HC2,dF7)=>{var{defineProperty:iJ1,getOwnPropertyDescriptor:S09,getOwnPropertyNames:C09}=Object,h09=Object.prototype.hasOwnProperty,jP8=(A,q)=>iJ1(A,"name",{value:q,configurable:!0}),I09=(A,q)=>{for(var K in q)iJ1(A,K,{get:q[K],enumerable:!0})},b09=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of C09(q))if(!h09.call(A,z)&&z!==K)iJ1(A,z,{get:()=>q[z],enumerable:!(Y=S09(q,z))||Y.enumerable})}return A},x09=(A)=>b09(iJ1({},"__esModule",{value:!0}),A),UF7={};I09(UF7,{escapeUri:()=>pF7,escapeUriPath:()=>B09});dF7.exports=x09(UF7);var pF7=jP8((A)=>encodeURIComponent(A).replace(/[!'()*]/g,u09),"escapeUri"),u09=jP8((A)=>`%${A.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),B09=jP8((A)=>A.split("/").map(pF7).join("/"),"escapeUriPath")});var rF7=C((jC2,nF7)=>{var{defineProperty:nJ1,getOwnPropertyDescriptor:m09,getOwnPropertyNames:g09}=Object,F09=Object.prototype.hasOwnProperty,Q09=(A,q)=>nJ1(A,"name",{value:q,configurable:!0}),U09=(A,q)=>{for(var K in q)nJ1(A,K,{get:q[K],enumerable:!0})},p09=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of g09(q))if(!F09.call(A,z)&&z!==K)nJ1(A,z,{get:()=>q[z],enumerable:!(Y=m09(q,z))||Y.enumerable})}return A},d09=(A)=>p09(nJ1({},"__esModule",{value:!0}),A),lF7={};U09(lF7,{buildQueryString:()=>iF7});nF7.exports=d09(lF7);var JP8=cF7();function iF7(A){let q=[];for(let K of Object.keys(A).sort()){let Y=A[K];if(K=(0,JP8.escapeUri)(K),Array.isArray(Y))for(let z=0,w=Y.length;z{var{create:c09,defineProperty:sg6,getOwnPropertyDescriptor:l09,getOwnPropertyNames:i09,getPrototypeOf:n09}=Object,r09=Object.prototype.hasOwnProperty,HP=(A,q)=>sg6(A,"name",{value:q,configurable:!0}),o09=(A,q)=>{for(var K in q)sg6(A,K,{get:q[K],enumerable:!0})},sF7=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of i09(q))if(!r09.call(A,z)&&z!==K)sg6(A,z,{get:()=>q[z],enumerable:!(Y=l09(q,z))||Y.enumerable})}return A},a09=(A,q,K)=>(K=A!=null?c09(n09(A)):{},sF7(q||!A||!A.__esModule?sg6(K,"default",{value:A,enumerable:!0}):K,A)),s09=(A)=>sF7(sg6({},"__esModule",{value:!0}),A),tF7={};o09(tF7,{DEFAULT_REQUEST_TIMEOUT:()=>KW9,NodeHttp2Handler:()=>$W9,NodeHttpHandler:()=>YW9,streamCollector:()=>HW9});HQ7.exports=s09(tF7);var eF7=mD8(),AQ7=rF7(),MP8=g6("http"),DP8=g6("https"),t09=["ECONNRESET","EPIPE","ETIMEDOUT"],qQ7=HP((A)=>{let q={};for(let K of Object.keys(A)){let Y=A[K];q[K]=Array.isArray(Y)?Y.join(","):Y}return q},"getTransformedHeaders"),e09=HP((A,q,K=0)=>{if(!K)return;let Y=setTimeout(()=>{A.destroy(),q(Object.assign(Error(`Socket timed out without establishing a connection within ${K} ms`),{name:"TimeoutError"}))},K);A.on("socket",(z)=>{if(z.connecting)z.on("connect",()=>{clearTimeout(Y)});else clearTimeout(Y)})},"setConnectionTimeout"),AW9=HP((A,{keepAlive:q,keepAliveMsecs:K})=>{if(q!==!0)return;A.on("socket",(Y)=>{Y.setKeepAlive(q,K||0)})},"setSocketKeepAlive"),qW9=HP((A,q,K=0)=>{A.setTimeout(K,()=>{A.destroy(),q(Object.assign(Error(`Connection timed out after ${K} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),KQ7=g6("stream"),oF7=1000;async function XP8(A,q,K=oF7){let Y=q.headers??{},z=Y.Expect||Y.expect,w=-1,_=!1;if(z==="100-continue")await Promise.race([new Promise(($)=>{w=Number(setTimeout($,Math.max(oF7,K)))}),new Promise(($)=>{A.on("continue",()=>{clearTimeout(w),$()}),A.on("error",()=>{_=!0,clearTimeout(w),$()})})]);if(!_)YQ7(A,q.body)}HP(XP8,"writeRequestBody");function YQ7(A,q){if(q instanceof KQ7.Readable){q.pipe(A);return}if(q){if(Buffer.isBuffer(q)||typeof q==="string"){A.end(q);return}let K=q;if(typeof K==="object"&&K.buffer&&typeof K.byteOffset==="number"&&typeof K.byteLength==="number"){A.end(Buffer.from(K.buffer,K.byteOffset,K.byteLength));return}A.end(Buffer.from(q));return}A.end()}HP(YQ7,"writeBody");var KW9=0,zQ7=class A{constructor(q){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((K,Y)=>{if(typeof q==="function")q().then((z)=>{K(this.resolveDefaultConfig(z))}).catch(Y);else K(this.resolveDefaultConfig(q))})}static create(q){if(typeof(q==null?void 0:q.handle)==="function")return q;return new A(q)}static checkSocketUsage(q,K){var Y,z;let{sockets:w,requests:_,maxSockets:$}=q;if(typeof $!=="number"||$===1/0)return K;let O=15000;if(Date.now()-O=$&&J>=2*$)return console.warn("@smithy/node-http-handler:WARN",`socket usage at capacity=${j} and ${J} additional requests are enqueued.`,"See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html","or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config."),Date.now()}return K}resolveDefaultConfig(q){let{requestTimeout:K,connectionTimeout:Y,socketTimeout:z,httpAgent:w,httpsAgent:_}=q||{},$=!0,O=50;return{connectionTimeout:Y,requestTimeout:K??z,httpAgent:(()=>{if(w instanceof MP8.Agent||typeof(w==null?void 0:w.destroy)==="function")return w;return new MP8.Agent({keepAlive:!0,maxSockets:50,...w})})(),httpsAgent:(()=>{if(_ instanceof DP8.Agent||typeof(_==null?void 0:_.destroy)==="function")return _;return new DP8.Agent({keepAlive:!0,maxSockets:50,..._})})()}}destroy(){var q,K,Y,z;(K=(q=this.config)==null?void 0:q.httpAgent)==null||K.destroy(),(z=(Y=this.config)==null?void 0:Y.httpsAgent)==null||z.destroy()}async handle(q,{abortSignal:K}={}){if(!this.config)this.config=await this.configProvider;let Y;return new Promise((z,w)=>{let _=void 0,$=HP(async(G)=>{await _,clearTimeout(Y),z(G)},"resolve"),O=HP(async(G)=>{await _,w(G)},"reject");if(!this.config)throw Error("Node HTTP request handler config is not resolved");if(K==null?void 0:K.aborted){let G=Error("Request aborted");G.name="AbortError",O(G);return}let H=q.protocol==="https:",j=H?this.config.httpsAgent:this.config.httpAgent;Y=setTimeout(()=>{this.socketWarningTimestamp=A.checkSocketUsage(j,this.socketWarningTimestamp)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));let J=(0,AQ7.buildQueryString)(q.query||{}),M=void 0;if(q.username!=null||q.password!=null){let G=q.username??"",f=q.password??"";M=`${G}:${f}`}let D=q.path;if(J)D+=`?${J}`;if(q.fragment)D+=`#${q.fragment}`;let X={headers:q.headers,host:q.hostname,method:q.method,path:D,port:q.port,agent:j,auth:M},W=(H?DP8.request:MP8.request)(X,(G)=>{let f=new eF7.HttpResponse({statusCode:G.statusCode||-1,reason:G.statusMessage,headers:qQ7(G.headers),body:G});$({response:f})});if(W.on("error",(G)=>{if(t09.includes(G.code))O(Object.assign(G,{name:"TimeoutError"}));else O(G)}),e09(W,O,this.config.connectionTimeout),qW9(W,O,this.config.requestTimeout),K)K.onabort=()=>{W.abort();let G=Error("Request aborted");G.name="AbortError",O(G)};let Z=X.agent;if(typeof Z==="object"&&"keepAlive"in Z)AW9(W,{keepAlive:Z.keepAlive,keepAliveMsecs:Z.keepAliveMsecs});_=XP8(W,q,this.config.requestTimeout).catch(w)})}updateHttpClientConfig(q,K){this.config=void 0,this.configProvider=this.configProvider.then((Y)=>{return{...Y,[q]:K}})}httpHandlerConfigs(){return this.config??{}}};HP(zQ7,"NodeHttpHandler");var YW9=zQ7,aF7=g6("http2"),zW9=a09(g6("http2")),wQ7=class{constructor(q){this.sessions=[],this.sessions=q??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(q){this.sessions.push(q)}contains(q){return this.sessions.includes(q)}remove(q){this.sessions=this.sessions.filter((K)=>K!==q)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(q){for(let K of this.sessions)if(K===q){if(!K.destroyed)K.destroy()}}};HP(wQ7,"NodeHttp2ConnectionPool");var wW9=wQ7,_Q7=class{constructor(q){if(this.sessionCache=new Map,this.config=q,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError("maxConcurrency must be greater than zero.")}lease(q,K){let Y=this.getUrlString(q),z=this.sessionCache.get(Y);if(z){let O=z.poll();if(O&&!this.config.disableConcurrency)return O}let w=zW9.default.connect(Y);if(this.config.maxConcurrency)w.settings({maxConcurrentStreams:this.config.maxConcurrency},(O)=>{if(O)throw Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+q.destination.toString())});w.unref();let _=HP(()=>{w.destroy(),this.deleteSession(Y,w)},"destroySessionCb");if(w.on("goaway",_),w.on("error",_),w.on("frameError",_),w.on("close",()=>this.deleteSession(Y,w)),K.requestTimeout)w.setTimeout(K.requestTimeout,_);let $=this.sessionCache.get(Y)||new wW9;return $.offerLast(w),this.sessionCache.set(Y,$),w}deleteSession(q,K){let Y=this.sessionCache.get(q);if(!Y)return;if(!Y.contains(K))return;Y.remove(K),this.sessionCache.set(q,Y)}release(q,K){var Y;let z=this.getUrlString(q);(Y=this.sessionCache.get(z))==null||Y.offerLast(K)}destroy(){for(let[q,K]of this.sessionCache){for(let Y of K){if(!Y.destroyed)Y.destroy();K.remove(Y)}this.sessionCache.delete(q)}}setMaxConcurrentStreams(q){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=q}setDisableConcurrentStreams(q){this.config.disableConcurrency=q}getUrlString(q){return q.destination.toString()}};HP(_Q7,"NodeHttp2ConnectionManager");var _W9=_Q7,$Q7=class A{constructor(q){this.metadata={handlerProtocol:"h2"},this.connectionManager=new _W9({}),this.configProvider=new Promise((K,Y)=>{if(typeof q==="function")q().then((z)=>{K(z||{})}).catch(Y);else K(q||{})})}static create(q){if(typeof(q==null?void 0:q.handle)==="function")return q;return new A(q)}destroy(){this.connectionManager.destroy()}async handle(q,{abortSignal:K}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:Y,disableConcurrentStreams:z}=this.config;return new Promise((w,_)=>{var $;let O=!1,H=void 0,j=HP(async(h)=>{await H,w(h)},"resolve"),J=HP(async(h)=>{await H,_(h)},"reject");if(K==null?void 0:K.aborted){O=!0;let h=Error("Request aborted");h.name="AbortError",J(h);return}let{hostname:M,method:D,port:X,protocol:P,query:W}=q,Z="";if(q.username!=null||q.password!=null){let h=q.username??"",B=q.password??"";Z=`${h}:${B}@`}let G=`${P}//${Z}${M}${X?`:${X}`:""}`,f={destination:new URL(G)},V=this.connectionManager.lease(f,{requestTimeout:($=this.config)==null?void 0:$.sessionTimeout,disableConcurrentStreams:z||!1}),N=HP((h)=>{if(z)this.destroySession(V);O=!0,J(h)},"rejectWithDestroy"),v=(0,AQ7.buildQueryString)(W||{}),y=q.path;if(v)y+=`?${v}`;if(q.fragment)y+=`#${q.fragment}`;let R=V.request({...q.headers,[aF7.constants.HTTP2_HEADER_PATH]:y,[aF7.constants.HTTP2_HEADER_METHOD]:D});if(V.ref(),R.on("response",(h)=>{let B=new eF7.HttpResponse({statusCode:h[":status"]||-1,headers:qQ7(h),body:R});if(O=!0,j({response:B}),z)V.close(),this.connectionManager.deleteSession(G,V)}),Y)R.setTimeout(Y,()=>{R.close();let h=Error(`Stream timed out because of no activity for ${Y} ms`);h.name="TimeoutError",N(h)});if(K)K.onabort=()=>{R.close();let h=Error("Request aborted");h.name="AbortError",N(h)};R.on("frameError",(h,B,x)=>{N(Error(`Frame type id ${h} in stream id ${x} has failed with code ${B}.`))}),R.on("error",N),R.on("aborted",()=>{N(Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${R.rstCode}.`))}),R.on("close",()=>{if(V.unref(),z)V.destroy();if(!O)N(Error("Unexpected error: http2 request did not get a response"))}),H=XP8(R,q,Y)})}updateHttpClientConfig(q,K){this.config=void 0,this.configProvider=this.configProvider.then((Y)=>{return{...Y,[q]:K}})}httpHandlerConfigs(){return this.config??{}}destroySession(q){if(!q.destroyed)q.destroy()}};HP($Q7,"NodeHttp2Handler");var $W9=$Q7,OQ7=class extends KQ7.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(q,K,Y){this.bufferedBytes.push(q),Y()}};HP(OQ7,"Collector");var OW9=OQ7,HW9=HP((A)=>new Promise((q,K)=>{let Y=new OW9;A.pipe(Y),A.on("error",(z)=>{Y.end(),K(z)}),Y.on("error",K),Y.on("finish",function(){let z=new Uint8Array(Buffer.concat(this.bufferedBytes));q(z)})}),"streamCollector")});var XQ7=C((MQ7)=>{Object.defineProperty(MQ7,"__esModule",{value:!0});MQ7.sdkStreamMixin=void 0;var jW9=jQ7(),JW9=A56(),PP8=g6("stream"),MW9=g6("util"),JQ7="The stream has already been transformed.",DW9=(A)=>{var q,K;if(!(A instanceof PP8.Readable)){let w=((K=(q=A===null||A===void 0?void 0:A.__proto__)===null||q===void 0?void 0:q.constructor)===null||K===void 0?void 0:K.name)||A;throw Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${w}`)}let Y=!1,z=async()=>{if(Y)throw Error(JQ7);return Y=!0,await(0,jW9.streamCollector)(A)};return Object.assign(A,{transformToByteArray:z,transformToString:async(w)=>{let _=await z();if(w===void 0||Buffer.isEncoding(w))return(0,JW9.fromArrayBuffer)(_.buffer,_.byteOffset,_.byteLength).toString(w);else return new MW9.TextDecoder(w).decode(_)},transformToWebStream:()=>{if(Y)throw Error(JQ7);if(A.readableFlowing!==null)throw Error("The stream has been consumed by other callbacks.");if(typeof PP8.Readable.toWeb!=="function")throw Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return Y=!0,PP8.Readable.toWeb(A)}})};MQ7.sdkStreamMixin=DW9});var VQ7=C((DC2,aJ1)=>{var{defineProperty:rJ1,getOwnPropertyDescriptor:XW9,getOwnPropertyNames:PW9}=Object,WW9=Object.prototype.hasOwnProperty,GP8=(A,q)=>rJ1(A,"name",{value:q,configurable:!0}),ZW9=(A,q)=>{for(var K in q)rJ1(A,K,{get:q[K],enumerable:!0})},WP8=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of PW9(q))if(!WW9.call(A,z)&&z!==K)rJ1(A,z,{get:()=>q[z],enumerable:!(Y=XW9(q,z))||Y.enumerable})}return A},PQ7=(A,q,K)=>(WP8(A,q,"default"),K&&WP8(K,q,"default")),GW9=(A)=>WP8(rJ1({},"__esModule",{value:!0}),A),oJ1={};ZW9(oJ1,{Uint8ArrayBlobAdapter:()=>ZP8});aJ1.exports=GW9(oJ1);var WQ7=$P8(),ZQ7=mF7();function GQ7(A,q="utf-8"){if(q==="base64")return(0,WQ7.toBase64)(A);return(0,ZQ7.toUtf8)(A)}GP8(GQ7,"transformToString");function fQ7(A,q){if(q==="base64")return ZP8.mutate((0,WQ7.fromBase64)(A));return ZP8.mutate((0,ZQ7.fromUtf8)(A))}GP8(fQ7,"transformFromString");var TQ7=class A extends Uint8Array{static fromString(q,K="utf-8"){switch(typeof q){case"string":return fQ7(q,K);default:throw Error(`Unsupported conversion from ${typeof q} to Uint8ArrayBlobAdapter.`)}}static mutate(q){return Object.setPrototypeOf(q,A.prototype),q}transformToString(q="utf-8"){return GQ7(this,q)}};GP8(TQ7,"Uint8ArrayBlobAdapter");var ZP8=TQ7;PQ7(oJ1,QF7(),aJ1.exports);PQ7(oJ1,XQ7(),aJ1.exports)});var lQ7=C((XC2,cQ7)=>{var{defineProperty:AM1,getOwnPropertyDescriptor:fW9,getOwnPropertyNames:TW9}=Object,VW9=Object.prototype.hasOwnProperty,$4=(A,q)=>AM1(A,"name",{value:q,configurable:!0}),NW9=(A,q)=>{for(var K in q)AM1(A,K,{get:q[K],enumerable:!0})},vW9=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of TW9(q))if(!VW9.call(A,z)&&z!==K)AM1(A,z,{get:()=>q[z],enumerable:!(Y=fW9(q,z))||Y.enumerable})}return A},kW9=(A)=>vW9(AM1({},"__esModule",{value:!0}),A),vQ7={};NW9(vQ7,{Client:()=>LW9,Command:()=>RQ7,LazyJsonString:()=>NZ9,NoOpLogger:()=>EW9,SENSITIVE_STRING:()=>SW9,ServiceException:()=>jZ9,StringWrapper:()=>KF6,_json:()=>EP8,collectBody:()=>yW9,convertMap:()=>vZ9,createAggregatedClient:()=>CW9,dateToUtcString:()=>uQ7,decorateServiceException:()=>mQ7,emitWarningIfUnsupportedVersion:()=>XZ9,expectBoolean:()=>IW9,expectByte:()=>kP8,expectFloat32:()=>sJ1,expectInt:()=>xW9,expectInt32:()=>NP8,expectLong:()=>AF6,expectNonNull:()=>BW9,expectNumber:()=>eg6,expectObject:()=>CQ7,expectShort:()=>vP8,expectString:()=>mW9,expectUnion:()=>gW9,extendedEncodeURIComponent:()=>eJ1,getArrayIfSingleItem:()=>VZ9,getDefaultClientConfiguration:()=>fZ9,getDefaultExtensionConfiguration:()=>FQ7,getValueFromTextNode:()=>QQ7,handleFloat:()=>UW9,limitedParseDouble:()=>RP8,limitedParseFloat:()=>pW9,limitedParseFloat32:()=>dW9,loadConfigsForDefaultMode:()=>DZ9,logger:()=>qF6,map:()=>CP8,parseBoolean:()=>hW9,parseEpochTimestamp:()=>qZ9,parseRfc3339DateTime:()=>rW9,parseRfc3339DateTimeWithOffset:()=>aW9,parseRfc7231DateTime:()=>AZ9,resolveDefaultRuntimeConfig:()=>TZ9,resolvedPath:()=>RZ9,serializeFloat:()=>SZ9,splitEvery:()=>dQ7,strictParseByte:()=>xQ7,strictParseDouble:()=>yP8,strictParseFloat:()=>FW9,strictParseFloat32:()=>hQ7,strictParseInt:()=>cW9,strictParseInt32:()=>lW9,strictParseLong:()=>bQ7,strictParseShort:()=>LW6,take:()=>kZ9,throwDefaultError:()=>gQ7,withBaseException:()=>JZ9});cQ7.exports=kW9(vQ7);var kQ7=class{trace(){}debug(){}info(){}warn(){}error(){}};$4(kQ7,"NoOpLogger");var EW9=kQ7,EQ7=IF7(),LQ7=class{constructor(q){this.middlewareStack=(0,EQ7.constructStack)(),this.config=q}send(q,K,Y){let z=typeof K!=="function"?K:void 0,w=typeof K==="function"?K:Y,_=q.resolveMiddleware(this.middlewareStack,this.config,z);if(w)_(q).then(($)=>w(null,$.output),($)=>w($)).catch(()=>{});else return _(q).then(($)=>$.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};$4(LQ7,"Client");var LW9=LQ7,fP8=VQ7(),yW9=$4(async(A=new Uint8Array,q)=>{if(A instanceof Uint8Array)return fP8.Uint8ArrayBlobAdapter.mutate(A);if(!A)return fP8.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let K=q.streamCollector(A);return fP8.Uint8ArrayBlobAdapter.mutate(await K)},"collectBody"),VP8=BD8(),yQ7=class{constructor(){this.middlewareStack=(0,EQ7.constructStack)()}static classBuilder(){return new RW9}resolveMiddlewareWithContext(q,K,Y,{middlewareFn:z,clientName:w,commandName:_,inputFilterSensitiveLog:$,outputFilterSensitiveLog:O,smithyContext:H,additionalContext:j,CommandCtor:J}){for(let W of z.bind(this)(J,q,K,Y))this.middlewareStack.use(W);let M=q.concat(this.middlewareStack),{logger:D}=K,X={logger:D,clientName:w,commandName:_,inputFilterSensitiveLog:$,outputFilterSensitiveLog:O,[VP8.SMITHY_CONTEXT_KEY]:{...H},...j},{requestHandler:P}=K;return M.resolve((W)=>P.handle(W.request,Y||{}),X)}};$4(yQ7,"Command");var RQ7=yQ7,SQ7=class{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(q)=>q,this._outputFilterSensitiveLog=(q)=>q,this._serializer=null,this._deserializer=null}init(q){this._init=q}ep(q){return this._ep=q,this}m(q){return this._middlewareFn=q,this}s(q,K,Y={}){return this._smithyContext={service:q,operation:K,...Y},this}c(q={}){return this._additionalContext=q,this}n(q,K){return this._clientName=q,this._commandName=K,this}f(q=(Y)=>Y,K=(Y)=>Y){return this._inputFilterSensitiveLog=q,this._outputFilterSensitiveLog=K,this}ser(q){return this._serializer=q,this}de(q){return this._deserializer=q,this}build(){var q;let K=this,Y;return Y=(q=class extends RQ7{constructor(...[z]){super();this.serialize=K._serializer,this.deserialize=K._deserializer,this.input=z??{},K._init(this)}static getEndpointParameterInstructions(){return K._ep}resolveMiddleware(z,w,_){return this.resolveMiddlewareWithContext(z,w,_,{CommandCtor:Y,middlewareFn:K._middlewareFn,clientName:K._clientName,commandName:K._commandName,inputFilterSensitiveLog:K._inputFilterSensitiveLog,outputFilterSensitiveLog:K._outputFilterSensitiveLog,smithyContext:K._smithyContext,additionalContext:K._additionalContext})}},$4(q,"CommandRef"),q)}};$4(SQ7,"ClassBuilder");var RW9=SQ7,SW9="***SensitiveInformation***",CW9=$4((A,q)=>{for(let K of Object.keys(A)){let Y=A[K],z=$4(async function(_,$,O){let H=new Y(_);if(typeof $==="function")this.send(H,$);else if(typeof O==="function"){if(typeof $!=="object")throw Error(`Expected http options but got ${typeof $}`);this.send(H,$||{},O)}else return this.send(H,$)},"methodImpl"),w=(K[0].toLowerCase()+K.slice(1)).replace(/Command$/,"");q.prototype[w]=z}},"createAggregatedClient"),hW9=$4((A)=>{switch(A){case"true":return!0;case"false":return!1;default:throw Error(`Unable to parse boolean value "${A}"`)}},"parseBoolean"),IW9=$4((A)=>{if(A===null||A===void 0)return;if(typeof A==="number"){if(A===0||A===1)qF6.warn(tJ1(`Expected boolean, got ${typeof A}: ${A}`));if(A===0)return!1;if(A===1)return!0}if(typeof A==="string"){let q=A.toLowerCase();if(q==="false"||q==="true")qF6.warn(tJ1(`Expected boolean, got ${typeof A}: ${A}`));if(q==="false")return!1;if(q==="true")return!0}if(typeof A==="boolean")return A;throw TypeError(`Expected boolean, got ${typeof A}: ${A}`)},"expectBoolean"),eg6=$4((A)=>{if(A===null||A===void 0)return;if(typeof A==="string"){let q=parseFloat(A);if(!Number.isNaN(q)){if(String(q)!==String(A))qF6.warn(tJ1(`Expected number but observed string: ${A}`));return q}}if(typeof A==="number")return A;throw TypeError(`Expected number, got ${typeof A}: ${A}`)},"expectNumber"),bW9=Math.ceil(340282346638528860000000000000000000000),sJ1=$4((A)=>{let q=eg6(A);if(q!==void 0&&!Number.isNaN(q)&&q!==1/0&&q!==-1/0){if(Math.abs(q)>bW9)throw TypeError(`Expected 32-bit float, got ${A}`)}return q},"expectFloat32"),AF6=$4((A)=>{if(A===null||A===void 0)return;if(Number.isInteger(A)&&!Number.isNaN(A))return A;throw TypeError(`Expected integer, got ${typeof A}: ${A}`)},"expectLong"),xW9=AF6,NP8=$4((A)=>LP8(A,32),"expectInt32"),vP8=$4((A)=>LP8(A,16),"expectShort"),kP8=$4((A)=>LP8(A,8),"expectByte"),LP8=$4((A,q)=>{let K=AF6(A);if(K!==void 0&&uW9(K,q)!==K)throw TypeError(`Expected ${q}-bit integer, got ${A}`);return K},"expectSizedInt"),uW9=$4((A,q)=>{switch(q){case 32:return Int32Array.of(A)[0];case 16:return Int16Array.of(A)[0];case 8:return Int8Array.of(A)[0]}},"castInt"),BW9=$4((A,q)=>{if(A===null||A===void 0){if(q)throw TypeError(`Expected a non-null value for ${q}`);throw TypeError("Expected a non-null value")}return A},"expectNonNull"),CQ7=$4((A)=>{if(A===null||A===void 0)return;if(typeof A==="object"&&!Array.isArray(A))return A;let q=Array.isArray(A)?"array":typeof A;throw TypeError(`Expected object, got ${q}: ${A}`)},"expectObject"),mW9=$4((A)=>{if(A===null||A===void 0)return;if(typeof A==="string")return A;if(["boolean","number","bigint"].includes(typeof A))return qF6.warn(tJ1(`Expected string, got ${typeof A}: ${A}`)),String(A);throw TypeError(`Expected string, got ${typeof A}: ${A}`)},"expectString"),gW9=$4((A)=>{if(A===null||A===void 0)return;let q=CQ7(A),K=Object.entries(q).filter(([,Y])=>Y!=null).map(([Y])=>Y);if(K.length===0)throw TypeError("Unions must have exactly one non-null member. None were found.");if(K.length>1)throw TypeError(`Unions must have exactly one non-null member. Keys ${K} were not null.`);return q},"expectUnion"),yP8=$4((A)=>{if(typeof A=="string")return eg6(RW6(A));return eg6(A)},"strictParseDouble"),FW9=yP8,hQ7=$4((A)=>{if(typeof A=="string")return sJ1(RW6(A));return sJ1(A)},"strictParseFloat32"),QW9=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,RW6=$4((A)=>{let q=A.match(QW9);if(q===null||q[0].length!==A.length)throw TypeError("Expected real number, got implicit NaN");return parseFloat(A)},"parseNumber"),RP8=$4((A)=>{if(typeof A=="string")return IQ7(A);return eg6(A)},"limitedParseDouble"),UW9=RP8,pW9=RP8,dW9=$4((A)=>{if(typeof A=="string")return IQ7(A);return sJ1(A)},"limitedParseFloat32"),IQ7=$4((A)=>{switch(A){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw Error(`Unable to parse float value: ${A}`)}},"parseFloatString"),bQ7=$4((A)=>{if(typeof A==="string")return AF6(RW6(A));return AF6(A)},"strictParseLong"),cW9=bQ7,lW9=$4((A)=>{if(typeof A==="string")return NP8(RW6(A));return NP8(A)},"strictParseInt32"),LW6=$4((A)=>{if(typeof A==="string")return vP8(RW6(A));return vP8(A)},"strictParseShort"),xQ7=$4((A)=>{if(typeof A==="string")return kP8(RW6(A));return kP8(A)},"strictParseByte"),tJ1=$4((A)=>{return String(TypeError(A).stack||A).split(` `).slice(0,5).filter((q)=>!q.includes("stackTraceWarning")).join(` `)},"stackTraceWarning"),qF6={warn:console.warn},iW9=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SP8=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function uQ7(A){let q=A.getUTCFullYear(),K=A.getUTCMonth(),Y=A.getUTCDay(),z=A.getUTCDate(),w=A.getUTCHours(),_=A.getUTCMinutes(),$=A.getUTCSeconds(),O=z<10?`0${z}`:`${z}`,H=w<10?`0${w}`:`${w}`,j=_<10?`0${_}`:`${_}`,J=$<10?`0${$}`:`${$}`;return`${iW9[Y]}, ${O} ${SP8[K]} ${q} ${H}:${j}:${J} GMT`}$4(uQ7,"dateToUtcString");var nW9=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),rW9=$4((A)=>{if(A===null||A===void 0)return;if(typeof A!=="string")throw TypeError("RFC-3339 date-times must be expressed as strings");let q=nW9.exec(A);if(!q)throw TypeError("Invalid RFC-3339 date-time value");let[K,Y,z,w,_,$,O,H]=q,j=LW6(yW6(Y)),J=bg(z,"month",1,12),M=bg(w,"day",1,31);return tg6(j,J,M,{hours:_,minutes:$,seconds:O,fractionalMilliseconds:H})},"parseRfc3339DateTime"),oW9=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),aW9=$4((A)=>{if(A===null||A===void 0)return;if(typeof A!=="string")throw TypeError("RFC-3339 date-times must be expressed as strings");let q=oW9.exec(A);if(!q)throw TypeError("Invalid RFC-3339 date-time value");let[K,Y,z,w,_,$,O,H,j]=q,J=LW6(yW6(Y)),M=bg(z,"month",1,12),D=bg(w,"day",1,31),X=tg6(J,M,D,{hours:_,minutes:$,seconds:O,fractionalMilliseconds:H});if(j.toUpperCase()!="Z")X.setTime(X.getTime()-HZ9(j));return X},"parseRfc3339DateTimeWithOffset"),sW9=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),tW9=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),eW9=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),AZ9=$4((A)=>{if(A===null||A===void 0)return;if(typeof A!=="string")throw TypeError("RFC-7231 date-times must be expressed as strings");let q=sW9.exec(A);if(q){let[K,Y,z,w,_,$,O,H]=q;return tg6(LW6(yW6(w)),TP8(z),bg(Y,"day",1,31),{hours:_,minutes:$,seconds:O,fractionalMilliseconds:H})}if(q=tW9.exec(A),q){let[K,Y,z,w,_,$,O,H]=q;return zZ9(tg6(KZ9(w),TP8(z),bg(Y,"day",1,31),{hours:_,minutes:$,seconds:O,fractionalMilliseconds:H}))}if(q=eW9.exec(A),q){let[K,Y,z,w,_,$,O,H]=q;return tg6(LW6(yW6(H)),TP8(Y),bg(z.trimLeft(),"day",1,31),{hours:w,minutes:_,seconds:$,fractionalMilliseconds:O})}throw TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),qZ9=$4((A)=>{if(A===null||A===void 0)return;let q;if(typeof A==="number")q=A;else if(typeof A==="string")q=yP8(A);else throw TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(q)||q===1/0||q===-1/0)throw TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(q*1000))},"parseEpochTimestamp"),tg6=$4((A,q,K,Y)=>{let z=q-1;return _Z9(A,z,K),new Date(Date.UTC(A,z,K,bg(Y.hours,"hour",0,23),bg(Y.minutes,"minute",0,59),bg(Y.seconds,"seconds",0,60),OZ9(Y.fractionalMilliseconds)))},"buildDate"),KZ9=$4((A)=>{let q=new Date().getUTCFullYear(),K=Math.floor(q/100)*100+LW6(yW6(A));if(K{if(A.getTime()-new Date().getTime()>YZ9)return new Date(Date.UTC(A.getUTCFullYear()-100,A.getUTCMonth(),A.getUTCDate(),A.getUTCHours(),A.getUTCMinutes(),A.getUTCSeconds(),A.getUTCMilliseconds()));return A},"adjustRfc850Year"),TP8=$4((A)=>{let q=SP8.indexOf(A);if(q<0)throw TypeError(`Invalid month: ${A}`);return q+1},"parseMonthByShortName"),wZ9=[31,28,31,30,31,30,31,31,30,31,30,31],_Z9=$4((A,q,K)=>{let Y=wZ9[q];if(q===1&&$Z9(A))Y=29;if(K>Y)throw TypeError(`Invalid day for ${SP8[q]} in ${A}: ${K}`)},"validateDayOfMonth"),$Z9=$4((A)=>{return A%4===0&&(A%100!==0||A%400===0)},"isLeapYear"),bg=$4((A,q,K,Y)=>{let z=xQ7(yW6(A));if(zY)throw TypeError(`${q} must be between ${K} and ${Y}, inclusive`);return z},"parseDateValue"),OZ9=$4((A)=>{if(A===null||A===void 0)return 0;return hQ7("0."+A)*1000},"parseMilliseconds"),HZ9=$4((A)=>{let q=A[0],K=1;if(q=="+")K=1;else if(q=="-")K=-1;else throw TypeError(`Offset direction, ${q}, must be "+" or "-"`);let Y=Number(A.substring(1,3)),z=Number(A.substring(4,6));return K*(Y*60+z)*60*1000},"parseOffsetToMilliseconds"),yW6=$4((A)=>{let q=0;while(q{Object.entries(q).filter(([,Y])=>Y!==void 0).forEach(([Y,z])=>{if(A[Y]==null||A[Y]==="")A[Y]=z});let K=A.message||A.Message||"UnknownError";return A.message=K,delete A.Message,A},"decorateServiceException"),gQ7=$4(({output:A,parsedBody:q,exceptionCtor:K,errorCode:Y})=>{let z=MZ9(A),w=z.httpStatusCode?z.httpStatusCode+"":void 0,_=new K({name:(q==null?void 0:q.code)||(q==null?void 0:q.Code)||Y||w||"UnknownError",$fault:"client",$metadata:z});throw mQ7(_,q)},"throwDefaultError"),JZ9=$4((A)=>{return({output:q,parsedBody:K,errorCode:Y})=>{gQ7({output:q,parsedBody:K,exceptionCtor:A,errorCode:Y})}},"withBaseException"),MZ9=$4((A)=>({httpStatusCode:A.statusCode,requestId:A.headers["x-amzn-requestid"]??A.headers["x-amzn-request-id"]??A.headers["x-amz-request-id"],extendedRequestId:A.headers["x-amz-id-2"],cfId:A.headers["x-amz-cf-id"]}),"deserializeMetadata"),DZ9=$4((A)=>{switch(A){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),NQ7=!1,XZ9=$4((A)=>{if(A&&!NQ7&&parseInt(A.substring(1,A.indexOf(".")))<14)NQ7=!0},"emitWarningIfUnsupportedVersion"),PZ9=$4((A)=>{let q=[];for(let K in VP8.AlgorithmId){let Y=VP8.AlgorithmId[K];if(A[Y]===void 0)continue;q.push({algorithmId:()=>Y,checksumConstructor:()=>A[Y]})}return{_checksumAlgorithms:q,addChecksumAlgorithm(K){this._checksumAlgorithms.push(K)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),WZ9=$4((A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},"resolveChecksumRuntimeConfig"),ZZ9=$4((A)=>{let q=A.retryStrategy;return{setRetryStrategy(K){q=K},retryStrategy(){return q}}},"getRetryConfiguration"),GZ9=$4((A)=>{let q={};return q.retryStrategy=A.retryStrategy(),q},"resolveRetryRuntimeConfig"),FQ7=$4((A)=>{return{...PZ9(A),...ZZ9(A)}},"getDefaultExtensionConfiguration"),fZ9=FQ7,TZ9=$4((A)=>{return{...WZ9(A),...GZ9(A)}},"resolveDefaultRuntimeConfig");function eJ1(A){return encodeURIComponent(A).replace(/[!'()*]/g,function(q){return"%"+q.charCodeAt(0).toString(16).toUpperCase()})}$4(eJ1,"extendedEncodeURIComponent");var VZ9=$4((A)=>Array.isArray(A)?A:[A],"getArrayIfSingleItem"),QQ7=$4((A)=>{for(let K in A)if(A.hasOwnProperty(K)&&A[K]["#text"]!==void 0)A[K]=A[K]["#text"];else if(typeof A[K]==="object"&&A[K]!==null)A[K]=QQ7(A[K]);return A},"getValueFromTextNode"),KF6=$4(function(){let A=Object.getPrototypeOf(this).constructor,K=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(K,A.prototype),K},"StringWrapper");KF6.prototype=Object.create(String.prototype,{constructor:{value:KF6,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(KF6,String);var UQ7=class A extends KF6{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(q){if(q instanceof A)return q;else if(q instanceof String||typeof q==="string")return new A(q);return new A(JSON.stringify(q))}};$4(UQ7,"LazyJsonString");var NZ9=UQ7;function CP8(A,q,K){let Y,z,w;if(typeof q>"u"&&typeof K>"u")Y={},w=A;else if(Y=A,typeof q==="function")return z=q,w=K,EZ9(Y,z,w);else w=q;for(let _ of Object.keys(w)){if(!Array.isArray(w[_])){Y[_]=w[_];continue}pQ7(Y,null,w,_)}return Y}$4(CP8,"map");var vZ9=$4((A)=>{let q={};for(let[K,Y]of Object.entries(A||{}))q[K]=[,Y];return q},"convertMap"),kZ9=$4((A,q)=>{let K={};for(let Y in q)pQ7(K,A,q,Y);return K},"take"),EZ9=$4((A,q,K)=>{return CP8(A,Object.entries(K).reduce((Y,[z,w])=>{if(Array.isArray(w))Y[z]=w;else if(typeof w==="function")Y[z]=[q,w()];else Y[z]=[q,w];return Y},{}))},"mapWithFilter"),pQ7=$4((A,q,K,Y)=>{if(q!==null){let _=K[Y];if(typeof _==="function")_=[,_];let[$=LZ9,O=yZ9,H=Y]=_;if(typeof $==="function"&&$(q[H])||typeof $!=="function"&&!!$)A[Y]=O(q[H]);return}let[z,w]=K[Y];if(typeof w==="function"){let _,$=z===void 0&&(_=w())!=null,O=typeof z==="function"&&!!z(void 0)||typeof z!=="function"&&!!z;if($)A[Y]=_;else if(O)A[Y]=w()}else{let _=z===void 0&&w!=null,$=typeof z==="function"&&!!z(w)||typeof z!=="function"&&!!z;if(_||$)A[Y]=w}},"applyInstruction"),LZ9=$4((A)=>A!=null,"nonNullish"),yZ9=$4((A)=>A,"pass"),RZ9=$4((A,q,K,Y,z,w)=>{if(q!=null&&q[K]!==void 0){let _=Y();if(_.length<=0)throw Error("Empty value provided for input HTTP label: "+K+".");A=A.replace(z,w?_.split("/").map(($)=>eJ1($)).join("/"):eJ1(_))}else throw Error("No value provided for input HTTP label: "+K+".");return A},"resolvedPath"),SZ9=$4((A)=>{if(A!==A)return"NaN";switch(A){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return A}},"serializeFloat"),EP8=$4((A)=>{if(A==null)return{};if(Array.isArray(A))return A.filter((q)=>q!=null).map(EP8);if(typeof A==="object"){let q={};for(let K of Object.keys(A)){if(A[K]==null)continue;q[K]=EP8(A[K])}return q}return A},"_json");function dQ7(A,q,K){if(K<=0||!Number.isInteger(K))throw Error("Invalid number of delimiters ("+K+") for splitEvery.");let Y=A.split(q);if(K===1)return Y;let z=[],w="";for(let _=0;_{let K=D$.map({}),Y=A.body,z=D$.take(Y,{message:D$.expectString});Object.assign(K,z);let w=new Le.InternalServerException({$metadata:qM1(A),...K});return D$.decorateServiceException(w,A.body)},hZ9=async(A,q)=>{let K=D$.map({}),Y=A.body,z=D$.take(Y,{message:D$.expectString,originalMessage:D$.expectString,originalStatusCode:D$.expectInt32});Object.assign(K,z);let w=new Le.ModelStreamErrorException({$metadata:qM1(A),...K});return D$.decorateServiceException(w,A.body)},IZ9=async(A,q)=>{let K=D$.map({}),Y=A.body,z=D$.take(Y,{message:D$.expectString});Object.assign(K,z);let w=new Le.ThrottlingException({$metadata:qM1(A),...K});return D$.decorateServiceException(w,A.body)},bZ9=async(A,q)=>{let K=D$.map({}),Y=A.body,z=D$.take(Y,{message:D$.expectString});Object.assign(K,z);let w=new Le.ValidationException({$metadata:qM1(A),...K});return D$.decorateServiceException(w,A.body)},iQ7=(A,q)=>{return q.eventStreamMarshaller.deserialize(A,async(K)=>{if(K.chunk!=null)return{chunk:await BZ9(K.chunk,q)};if(K.internalServerException!=null)return{internalServerException:await xZ9(K.internalServerException,q)};if(K.modelStreamErrorException!=null)return{modelStreamErrorException:await uZ9(K.modelStreamErrorException,q)};if(K.validationException!=null)return{validationException:await gZ9(K.validationException,q)};if(K.throttlingException!=null)return{throttlingException:await mZ9(K.throttlingException,q)};return{$unknown:A}})},xZ9=async(A,q)=>{let K={...A,body:await YF6(A.body,q)};return CZ9(K,q)},uZ9=async(A,q)=>{let K={...A,body:await YF6(A.body,q)};return hZ9(K,q)},BZ9=async(A,q)=>{let K={},Y=await YF6(A.body,q);return Object.assign(K,FZ9(Y,q)),K},mZ9=async(A,q)=>{let K={...A,body:await YF6(A.body,q)};return IZ9(K,q)},gZ9=async(A,q)=>{let K={...A,body:await YF6(A.body,q)};return bZ9(K,q)},FZ9=(A,q)=>{return D$.take(A,{bytes:q.base64Decoder})},qM1=(A)=>({httpStatusCode:A.statusCode,requestId:A.headers["x-amzn-requestid"]??A.headers["x-amzn-request-id"]??A.headers["x-amz-request-id"]??"",extendedRequestId:A.headers["x-amz-id-2"]??"",cfId:A.headers["x-amz-cf-id"]??""}),QZ9=(A,q)=>D$.collectBody(A,q).then((K)=>q.utf8Encoder(K)),YF6=(A,q)=>QZ9(A,q).then((K)=>{if(K.length)return JSON.parse(K);return{}});var nQ7=k(()=>{D$=e(lQ7(),1),Le=e(jO1(),1)});function rQ7(A){if(A[Symbol.asyncIterator])return A;let q=A.getReader();return{async next(){try{let K=await q.read();if(K?.done)q.releaseLock();return K}catch(K){throw q.releaseLock(),K}},async return(){let K=q.cancel();return q.releaseLock(),await K,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}var hP8=k(()=>{xZ()});function KM1(A){return A!=null&&typeof A==="object"&&!Array.isArray(A)}var IP8=(A)=>(IP8=Array.isArray,IP8(A)),bP8,oQ7=(A)=>{try{return JSON.parse(A)}catch(q){return}};var zF6=k(()=>{hP8();bP8=IP8});function wF6(){}function YM1(A,q,K){if(!q||aQ7[A]>aQ7[K])return wF6;else return q[A].bind(q)}function tQ7(A){let q=A.logger,K=A.logLevel??"off";if(!q)return UZ9;let Y=sQ7.get(q);if(Y&&Y[0]===K)return Y[1];let z={error:YM1("error",q,K),warn:YM1("warn",q,K),info:YM1("info",q,K),debug:YM1("debug",q,K)};return sQ7.set(q,[K,z]),z}var aQ7,UZ9,sQ7;var eQ7=k(()=>{zF6();aQ7={off:0,error:200,warn:300,info:400,debug:500};UZ9={error:wF6,warn:wF6,info:wF6,debug:wF6},sQ7=new WeakMap});function dZ9(A){return typeof A==="object"&&A!==null&&(("name"in A)&&A.name==="AbortError"||("message"in A)&&String(A.message).includes("FetchRequestCanceledException"))}var qU7,zM1,KU7,xP8=(A)=>new TextDecoder("utf-8").decode(A),AU7=(A)=>new TextEncoder().encode(A),pZ9=()=>{let A=new qU7.EventStreamMarshaller({utf8Encoder:xP8,utf8Decoder:AU7});return{base64Decoder:zM1.fromBase64,base64Encoder:zM1.toBase64,utf8Decoder:AU7,utf8Encoder:xP8,eventStreamMarshaller:A,streamCollector:KU7.streamCollector}},wM1;var YU7=k(()=>{Z91();ys();rV();nQ7();zF6();eQ7();qU7=e(XF7(),1),zM1=e($P8(),1),KU7=e(uD8(),1);wM1=class wM1 extends mf{static fromSSEResponse(A,q,K){let Y=!1,z=K?tQ7(K):console;async function*w(){if(!A.body)throw q.abort(),new _4("Attempted to iterate over a response with no body");let $=rQ7(A.body),O=iQ7($,pZ9());for await(let H of O)if(H.chunk&&H.chunk.bytes)yield{event:"chunk",data:xP8(H.chunk.bytes),raw:[]};else if(H.internalServerException)yield{event:"error",data:"InternalServerException",raw:[]};else if(H.modelStreamErrorException)yield{event:"error",data:"ModelStreamErrorException",raw:[]};else if(H.validationException)yield{event:"error",data:"ValidationException",raw:[]};else if(H.throttlingException)yield{event:"error",data:"ThrottlingException",raw:[]}}async function*_(){if(Y)throw Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");Y=!0;let $=!1;try{for await(let O of w()){if(O.event==="chunk")try{yield JSON.parse(O.data)}catch(H){throw z.error("Could not parse message into JSON:",O.data),z.error("From chunk:",O.raw),H}if(O.event==="error"){let H=O.data,j=oQ7(H),J=j?void 0:H;throw V4.generate(void 0,j,J,A.headers)}}$=!0}catch(O){if(dZ9(O))return;throw O}finally{if(!$)q.abort()}}return new wM1(_,q)}}});var uP8=(A)=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[A]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(A)?.trim();return};function*cZ9(A){if(!A)return;if(zU7 in A){let{values:Y,nulls:z}=A;yield*Y.entries();for(let w of z)yield[w,null];return}let q=!1,K;if(A instanceof Headers)K=A.entries();else if(bP8(A))K=A;else q=!0,K=Object.entries(A??{});for(let Y of K){let z=Y[0];if(typeof z!=="string")throw TypeError("expected header name to be a string");let w=bP8(Y[1])?Y[1]:[Y[1]],_=!1;for(let $ of w){if($===void 0)continue;if(q&&!_)_=!0,yield[z,null];yield[z,$]}}}var zU7,BP8=(A)=>{let q=new Headers,K=new Set;for(let Y of A){let z=new Set;for(let[w,_]of cZ9(Y)){let $=w.toLowerCase();if(!z.has($))q.delete(w),z.add($);if(_===null)q.delete(w),K.add($);else q.append(w,_),K.delete($)}}return{[zU7]:!0,values:q,nulls:K}};var wU7=k(()=>{zF6();zU7=Symbol.for("brand.privateNullableHeaders")});function $U7(A){return A.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var _U7,lZ9=(A=$U7)=>function(K,...Y){if(K.length===1)return K[0];let z=!1,w=[],_=K.reduce((j,J,M)=>{if(/[?#]/.test(J))z=!0;let D=Y[M],X=(z?encodeURIComponent:A)(""+D);if(M!==Y.length&&(D==null||typeof D==="object"&&D.toString===Object.getPrototypeOf(Object.getPrototypeOf(D.hasOwnProperty??_U7)??_U7)?.toString))X=D+"",w.push({start:j.length+J.length,length:X.length,error:`Value of type ${Object.prototype.toString.call(D).slice(8,-1)} is not a valid path parameter`});return j+J+(M===Y.length?"":X)},""),$=_.split(/[?#]/,1)[0],O=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,H;while((H=O.exec($))!==null)w.push({start:H.index,length:H[0].length,error:`Value "${H[0]}" can't be safely passed as a path parameter`});if(w.sort((j,J)=>j.start-J.start),w.length>0){let j=0,J=w.reduce((M,D)=>{let X=" ".repeat(D.start-j),P="^".repeat(D.length);return j=D.start+D.length,M+X+P},"");throw new _4(`Path parameters result in path with invalid segments: ${w.map((M)=>M.error).join(` `)} ${_} ${J}`)}return _},mP8;var OU7=k(()=>{hP8();_U7=Object.freeze(Object.create(null)),mP8=lZ9($U7)});function rZ9(A){let q=new YE(A);return delete q.batches,delete q.countTokens,q}function oZ9(A){let q=new uZ(A);return delete q.promptCaching,delete q.messages.batches,delete q.messages.countTokens,q}var iZ9="bedrock-2023-05-31",nZ9,gP8;var FP8=k(()=>{Bd();rb6();am7();YU7();zF6();wU7();OU7();Bd();nZ9=new Set(["/v1/complete","/v1/messages","/v1/messages?beta=true"]);gP8=class gP8 extends rz{constructor({awsRegion:A=uP8("AWS_REGION")??"us-east-1",baseURL:q=uP8("ANTHROPIC_BEDROCK_BASE_URL")??`https://bedrock-runtime.${A}.amazonaws.com`,awsSecretKey:K=null,awsAccessKey:Y=null,awsSessionToken:z=null,providerChainResolver:w=null,..._}={}){super({baseURL:q,..._});this.skipAuth=!1,this.messages=rZ9(this),this.completions=new hs(this),this.beta=oZ9(this),this.awsSecretKey=K,this.awsAccessKey=Y,this.awsRegion=A,this.awsSessionToken=z,this.skipAuth=_.skipAuth??!1,this.providerChainResolver=w}validateHeaders(){}async prepareRequest(A,{url:q,options:K}){if(this.skipAuth)return;let Y=this.awsRegion;if(!Y)throw Error("Expected `awsRegion` option to be passed to the client or the `AWS_REGION` environment variable to be present");let z=await om7(A,{url:q,regionName:Y,awsAccessKey:this.awsAccessKey,awsSecretKey:this.awsSecretKey,awsSessionToken:this.awsSessionToken,fetchOptions:this.fetchOptions,providerChainResolver:this.providerChainResolver});A.headers=BP8([z,A.headers]).values}async buildRequest(A){if(A.__streamClass=wM1,KM1(A.body))A.body={...A.body};if(KM1(A.body)){if(!A.body.anthropic_version)A.body.anthropic_version=iZ9;if(A.headers&&!A.body.anthropic_beta){let q=BP8([A.headers]).values.get("anthropic-beta");if(q!=null)A.body.anthropic_beta=q.split(",")}}if(nZ9.has(A.path)&&A.method==="post"){if(!KM1(A.body))throw Error("Expected request body to be an object for post /v1/messages");let q=A.body.model;A.body.model=void 0;let K=A.body.stream;if(A.body.stream=void 0,K)A.path=mP8`/model/${q}/invoke-with-response-stream`;else A.path=mP8`/model/${q}/invoke`}return super.buildRequest(A)}}});var HU7={};m1(HU7,{default:()=>gP8,BaseAnthropic:()=>rz,AnthropicBedrock:()=>gP8});var jU7=k(()=>{FP8();FP8()});var _M1=k(()=>{xZ()});var QP8=(A)=>(QP8=Array.isArray,QP8(A)),UP8;var $M1=k(()=>{_M1();UP8=QP8});function*sZ9(A){if(!A)return;if(JU7 in A){let{values:Y,nulls:z}=A;yield*Y.entries();for(let w of z)yield[w,null];return}let q=!1,K;if(A instanceof Headers)K=A.entries();else if(UP8(A))K=A;else q=!0,K=Object.entries(A??{});for(let Y of K){let z=Y[0];if(typeof z!=="string")throw TypeError("expected header name to be a string");let w=UP8(Y[1])?Y[1]:[Y[1]],_=!1;for(let $ of w){if($===void 0)continue;if(q&&!_)_=!0,yield[z,null];yield[z,$]}}}var JU7,pP8=(A)=>{let q=new Headers,K=new Set;for(let Y of A){let z=new Set;for(let[w,_]of sZ9(Y)){let $=w.toLowerCase();if(!z.has($))q.delete(w),z.add($);if(_===null)q.delete(w),K.add($);else q.append(w,_),K.delete($)}}return{[JU7]:!0,values:q,nulls:K}};var MU7=k(()=>{$M1();JU7=Symbol.for("brand.privateNullableHeaders")});var DU7=k(()=>{_M1()});var OM1=(A)=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[A]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(A)?.trim();return};var XU7=k(()=>{$M1()});var PU7=k(()=>{$M1();DU7();XU7()});function tZ9(A){let q=new YE(A);return delete q.batches,q}function eZ9(A){let q=new uZ(A);return delete q.messages.batches,q}var dP8;var cP8=k(()=>{MU7();_M1();PU7();Bd();Bd();rb6();dP8=class dP8 extends FI{constructor({baseURL:A=OM1("ANTHROPIC_FOUNDRY_BASE_URL"),apiKey:q=OM1("ANTHROPIC_FOUNDRY_API_KEY"),resource:K=OM1("ANTHROPIC_FOUNDRY_RESOURCE"),azureADTokenProvider:Y,dangerouslyAllowBrowser:z,...w}={}){if(typeof Y==="function")z=!0;if(!Y&&!q)throw new _4("Missing credentials. Please pass one of `apiKey` and `azureTokenProvider`, or set the `ANTHROPIC_FOUNDRY_API_KEY` environment variable.");if(Y&&q)throw new _4("The `apiKey` and `azureADTokenProvider` arguments are mutually exclusive; only one can be passed at a time.");if(!A){if(!K)throw new _4("Must provide one of the `baseURL` or `resource` arguments, or the `ANTHROPIC_FOUNDRY_RESOURCE` environment variable");A=`https://${K}.services.ai.azure.com/anthropic/`}else if(K)throw new _4("baseURL and resource are mutually exclusive");super({apiKey:Y??q,baseURL:A,...w,...z!==void 0?{dangerouslyAllowBrowser:z}:{}});this.resource=null,this.messages=tZ9(this),this.beta=eZ9(this),this.models=void 0}async authHeaders(){if(typeof this._options.apiKey==="function"){let A;try{A=await this._options.apiKey()}catch(q){if(q instanceof _4)throw q;throw new _4(`Failed to get token from azureADTokenProvider: ${q.message}`,{cause:q})}if(typeof A!=="string"||!A)throw new _4(`Expected azureADTokenProvider function argument to return a string but it returned ${A}`);return pP8([{Authorization:`Bearer ${A}`}])}if(typeof this._options.apiKey==="string")return pP8([{"x-api-key":this.apiKey}]);return}validateHeaders(){return}}});var WU7={};m1(WU7,{default:()=>dP8,BaseAnthropic:()=>rz,AnthropicFoundry:()=>dP8});var ZU7=k(()=>{cP8();cP8()});var HM1="4.10.1",e56="04b07795-8ddb-461a-bbee-02f9e1bf7b46",GU7="common",xg,_F6,fU7="login.microsoftonline.com",TU7,VU7="cae",NU7="nocae",vU7="msal.cache";var ug=k(()=>{(function(A){A.AzureChina="https://login.chinacloudapi.cn",A.AzureGermany="https://login.microsoftonline.de",A.AzureGovernment="https://login.microsoftonline.us",A.AzurePublicCloud="https://login.microsoftonline.com"})(xg||(xg={}));_F6=xg.AzurePublicCloud,TU7=["*"]});function AG9(A){var q,K,Y,z,w,_,$;let O={cache:{},broker:{isEnabled:(K=(q=A.brokerOptions)===null||q===void 0?void 0:q.enabled)!==null&&K!==void 0?K:!1,enableMsaPassthrough:(z=(Y=A.brokerOptions)===null||Y===void 0?void 0:Y.legacyEnableMsaPassthrough)!==null&&z!==void 0?z:!1,parentWindowHandle:(w=A.brokerOptions)===null||w===void 0?void 0:w.parentWindowHandle}};if((_=A.tokenCachePersistenceOptions)===null||_===void 0?void 0:_.enabled){if(jM1===void 0)throw Error(["Persistent token caching was requested, but no persistence provider was configured.","You must install the identity-cache-persistence plugin package (`npm install --save @azure/identity-cache-persistence`)","and enable it by importing `useIdentityPlugin` from `@azure/identity` and calling","`useIdentityPlugin(cachePersistencePlugin)` before using `tokenCachePersistenceOptions`."].join(" "));let H=A.tokenCachePersistenceOptions.name||vU7;O.cache.cachePlugin=jM1(Object.assign({name:`${H}.${NU7}`},A.tokenCachePersistenceOptions)),O.cache.cachePluginCae=jM1(Object.assign({name:`${H}.${VU7}`},A.tokenCachePersistenceOptions))}if(($=A.brokerOptions)===null||$===void 0?void 0:$.enabled){if(lP8===void 0)throw Error(["Broker for WAM was requested to be enabled, but no native broker was configured.","You must install the identity-broker plugin package (`npm install --save @azure/identity-broker`)","and enable it by importing `useIdentityPlugin` from `@azure/identity` and calling","`useIdentityPlugin(createNativeBrokerPlugin())` before using `enableBroker`."].join(" "));O.broker.nativeBrokerPlugin=lP8.broker}return O}var jM1=void 0,kU7,lP8=void 0,EU7,LU7;var iP8=k(()=>{ug();kU7={setPersistence(A){jM1=A}},EU7={setNativeBroker(A){lP8={broker:A}}};LU7={generatePluginConfiguration:AG9}});import{EOL as qG9}from"node:os";import KG9 from"node:util";import*as yU7 from"node:process";function RU7(A,...q){yU7.stderr.write(`${KG9.format(A,...q)}${qG9}`)}var SU7=()=>{};function oP8(A){hU7=A,nP8=[],rP8=[];let q=/\*/g,K=A.split(",").map((Y)=>Y.trim().replace(q,".*?"));for(let Y of K)if(Y.startsWith("-"))rP8.push(new RegExp(`^${Y.substr(1)}$`));else nP8.push(new RegExp(`^${Y}$`));for(let Y of JM1)Y.enabled=aP8(Y.namespace)}function aP8(A){if(A.endsWith("*"))return!0;for(let q of rP8)if(q.test(A))return!1;for(let q of nP8)if(q.test(A))return!0;return!1}function YG9(){let A=hU7||"";return oP8(""),A}function bU7(A){let q=Object.assign(K,{enabled:aP8(A),destroy:zG9,log:IU7.log,namespace:A,extend:wG9});function K(...Y){if(!q.enabled)return;if(Y.length>0)Y[0]=`${A} ${Y[0]}`;q.log(...Y)}return JM1.push(q),q}function zG9(){let A=JM1.indexOf(this);if(A>=0)return JM1.splice(A,1),!0;return!1}function wG9(A){let q=bU7(`${this.namespace}:${A}`);return q.log=this.log,q}var CU7,hU7,nP8,rP8,JM1,IU7,SW6;var xU7=k(()=>{SU7();CU7=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,nP8=[],rP8=[],JM1=[];if(CU7)oP8(CU7);IU7=Object.assign((A)=>{return bU7(A)},{enable:oP8,enabled:aP8,disable:YG9,log:RU7});SW6=IU7});function BU7(A,q){q.log=(...K)=>{A.log(...K)}}function mU7(A){return sP8.includes(A)}function MM1(A){let q=new Set,K=typeof process<"u"&&process.env&&process.env[A.logLevelEnvVarName]||void 0,Y,z=SW6(A.namespace);z.log=(...j)=>{SW6.log(...j)};function w(j){if(j&&!mU7(j))throw Error(`Unknown log level '${j}'. Acceptable values: ${sP8.join(",")}`);Y=j;let J=[];for(let M of q)if(_(M))J.push(M.namespace);SW6.enable(J.join(","))}if(K)if(mU7(K))w(K);else console.error(`${A.logLevelEnvVarName} set to unknown log level '${K}'; logging is not enabled. Acceptable values: ${sP8.join(", ")}.`);function _(j){return Boolean(Y&&uU7[j.level]<=uU7[Y])}function $(j,J){let M=Object.assign(j.extend(J),{level:J});if(BU7(j,M),_(M)){let D=SW6.disable();SW6.enable(D+","+M.namespace)}return q.add(M),M}function O(){return Y}function H(j){let J=z.extend(j);return BU7(z,J),{error:$(J,"error"),warning:$(J,"warning"),info:$(J,"info"),verbose:$(J,"verbose")}}return{setLogLevel:w,getLogLevel:O,createClientLogger:H,logger:z}}function DM1(A){return gU7.createClientLogger(A)}var sP8,uU7,gU7,xh2;var XM1=k(()=>{xU7();sP8=["verbose","info","warning","error"],uU7={verbose:400,info:300,warning:200,error:100};gU7=MM1({logLevelEnvVarName:"TYPESPEC_RUNTIME_LOG_LEVEL",namespace:"typeSpecRuntime"}),xh2=gU7.logger});var FU7=k(()=>{XM1()});function PM1(){return tP8.getLogLevel()}function ye(A){return tP8.createClientLogger(A)}var tP8,Fh2;var A96=k(()=>{FU7();tP8=MM1({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),Fh2=tP8.logger});function WM1(A){return A.reduce((q,K)=>{if(process.env[K])q.assigned.push(K);else q.missing.push(K);return q},{missing:[],assigned:[]})}function UM(A){return`SUCCESS. Scopes: ${Array.isArray(A)?A.join(", "):A}.`}function NY(A,q){let K="ERROR.";if(A===null||A===void 0?void 0:A.length)K+=` Scopes: ${Array.isArray(A)?A.join(", "):A}.`;return`${K} Error message: ${typeof q==="string"?q:q.message}.`}function QU7(A,q,K=SN){let Y=q?`${q.fullTitle} ${A}`:A;function z(O){K.info(`${Y} =>`,O)}function w(O){K.warning(`${Y} =>`,O)}function _(O){K.verbose(`${Y} =>`,O)}function $(O){K.error(`${Y} =>`,O)}return{title:A,fullTitle:Y,info:z,warning:w,verbose:_,error:$}}function w5(A,q=SN){let K=QU7(A,void 0,q);return Object.assign(Object.assign({},K),{parent:q,getToken:QU7("=> getToken()",K,q)})}var SN;var l2=k(()=>{A96();SN=ye("identity")});function _G9(A){return A&&typeof A.error==="string"&&typeof A.error_description==="string"}function UU7(A){return{error:A.error,errorDescription:A.error_description,correlationId:A.correlation_id,errorCodes:A.error_codes,timestamp:A.timestamp,traceId:A.trace_id}}var eP8="CredentialUnavailableError",y4,$F6="AuthenticationError",Cb,A08="AggregateAuthenticationError",OF6,hb;var lD=k(()=>{y4=class y4 extends Error{constructor(A,q){super(A,q);this.name=eP8}};Cb=class Cb extends Error{constructor(A,q,K){let Y={error:"unknown",errorDescription:"An unknown error occurred and no additional details are available."};if(_G9(q))Y=UU7(q);else if(typeof q==="string")try{let z=JSON.parse(q);Y=UU7(z)}catch(z){if(A===400)Y={error:"invalid_request",errorDescription:`The service indicated that the request was invalid. ${q}`};else Y={error:"unknown_error",errorDescription:`An unknown error has occurred. Response body: ${q}`}}else Y={error:"unknown_error",errorDescription:"An unknown error occurred and no additional details are available."};super(`${Y.error} Status code: ${A} More details: ${Y.errorDescription},`,K);this.statusCode=A,this.errorResponse=Y,this.name=$F6}};OF6=class OF6 extends Error{constructor(A,q){let K=A.join(` `);super(`${q} ${K}`);this.errors=A,this.name=A08}};hb=class hb extends Error{constructor(A){super(A.message,A.cause?{cause:A.cause}:void 0);this.scopes=A.scopes,this.getTokenOptions=A.getTokenOptions,this.name="AuthenticationRequiredError"}}});function $G9(A){return`The current credential is not configured to acquire tokens for tenant ${A}. To enable acquiring tokens for this tenant add it to the AdditionallyAllowedTenants on the credential options, or add "*" to AdditionallyAllowedTenants to allow acquiring tokens for any tenant.`}function YO(A,q,K=[],Y){var z;let w;if(process.env.AZURE_IDENTITY_DISABLE_MULTITENANTAUTH)w=A;else if(A==="adfs")w=A;else w=(z=q===null||q===void 0?void 0:q.tenantId)!==null&&z!==void 0?z:A;if(A&&w!==A&&!K.includes("*")&&!K.some((_)=>_.localeCompare(w)===0)){let _=$G9(w);throw Y===null||Y===void 0||Y.info(_),new y4(_)}return w}var pU7=k(()=>{lD()});function pM(A,q){if(!q.match(/^[0-9a-zA-Z-.]+$/)){let K=Error("Invalid tenant id provided. You can locate your tenant id by following the instructions listed here: https://learn.microsoft.com/partner-center/find-ids-and-domain-names.");throw A.info(NY("",K)),K}}function CW6(A,q,K){if(q)return pM(A,q),q;if(!K)K=e56;if(K!==e56)return"common";return"organizations"}function eO(A){if(!A||A.length===0)return[];if(A.includes("*"))return TU7;return A}var iD=k(()=>{ug();l2();pU7()});function ZM1(A){return A.toLowerCase()}function*OG9(A){for(let q of A.values())yield[q.name,q.value]}function Bg(A){return new dU7(A)}var dU7;var HF6=k(()=>{dU7=class dU7{constructor(A){if(this._headersMap=new Map,A)for(let q of Object.keys(A))this.set(q,A[q])}set(A,q){this._headersMap.set(ZM1(A),{name:A,value:String(q).trim()})}get(A){var q;return(q=this._headersMap.get(ZM1(A)))===null||q===void 0?void 0:q.value}has(A){return this._headersMap.has(ZM1(A))}delete(A){this._headersMap.delete(ZM1(A))}toJSON(A={}){let q={};if(A.preserveCase)for(let K of this._headersMap.values())q[K.name]=K.value;else for(let[K,Y]of this._headersMap)q[K]=Y.value;return q}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return OG9(this._headersMap)}}});var cU7=()=>{};var lU7=()=>{};import{randomUUID as HG9}from"node:crypto";function jF6(){return jG9()}var q08,jG9;var K08=k(()=>{jG9=typeof((q08=globalThis===null||globalThis===void 0?void 0:globalThis.crypto)===null||q08===void 0?void 0:q08.randomUUID)==="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):HG9});class iU7{constructor(A){var q,K,Y,z,w,_,$;this.url=A.url,this.body=A.body,this.headers=(q=A.headers)!==null&&q!==void 0?q:Bg(),this.method=(K=A.method)!==null&&K!==void 0?K:"GET",this.timeout=(Y=A.timeout)!==null&&Y!==void 0?Y:0,this.multipartBody=A.multipartBody,this.formData=A.formData,this.disableKeepAlive=(z=A.disableKeepAlive)!==null&&z!==void 0?z:!1,this.proxySettings=A.proxySettings,this.streamResponseStatusCodes=A.streamResponseStatusCodes,this.withCredentials=(w=A.withCredentials)!==null&&w!==void 0?w:!1,this.abortSignal=A.abortSignal,this.onUploadProgress=A.onUploadProgress,this.onDownloadProgress=A.onDownloadProgress,this.requestId=A.requestId||jF6(),this.allowInsecureConnection=(_=A.allowInsecureConnection)!==null&&_!==void 0?_:!1,this.enableBrowserStreams=($=A.enableBrowserStreams)!==null&&$!==void 0?$:!1,this.requestOverrides=A.requestOverrides,this.authSchemes=A.authSchemes}}function Y08(A){return new iU7(A)}var nU7=k(()=>{HF6();K08()});class GM1{constructor(A){var q;this._policies=[],this._policies=(q=A===null||A===void 0?void 0:A.slice(0))!==null&&q!==void 0?q:[],this._orderedPolicies=void 0}addPolicy(A,q={}){if(q.phase&&q.afterPhase)throw Error("Policies inside a phase cannot specify afterPhase.");if(q.phase&&!rU7.has(q.phase))throw Error(`Invalid phase name: ${q.phase}`);if(q.afterPhase&&!rU7.has(q.afterPhase))throw Error(`Invalid afterPhase name: ${q.afterPhase}`);this._policies.push({policy:A,options:q}),this._orderedPolicies=void 0}removePolicy(A){let q=[];return this._policies=this._policies.filter((K)=>{if(A.name&&K.policy.name===A.name||A.phase&&K.options.phase===A.phase)return q.push(K.policy),!1;else return!0}),this._orderedPolicies=void 0,q}sendRequest(A,q){return this.getOrderedPolicies().reduceRight((z,w)=>{return(_)=>{return w.sendRequest(_,z)}},(z)=>A.sendRequest(z))(q)}getOrderedPolicies(){if(!this._orderedPolicies)this._orderedPolicies=this.orderPolicies();return this._orderedPolicies}clone(){return new GM1(this._policies)}static create(){return new GM1}orderPolicies(){let A=[],q=new Map;function K(D){return{name:D,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}let Y=K("Serialize"),z=K("None"),w=K("Deserialize"),_=K("Retry"),$=K("Sign"),O=[Y,z,w,_,$];function H(D){if(D==="Retry")return _;else if(D==="Serialize")return Y;else if(D==="Deserialize")return w;else if(D==="Sign")return $;else return z}for(let D of this._policies){let{policy:X,options:P}=D,W=X.name;if(q.has(W))throw Error("Duplicate policy names not allowed in pipeline");let Z={policy:X,dependsOn:new Set,dependants:new Set};if(P.afterPhase)Z.afterPhase=H(P.afterPhase),Z.afterPhase.hasAfterPolicies=!0;q.set(W,Z),H(P.phase).policies.add(Z)}for(let D of this._policies){let{policy:X,options:P}=D,W=X.name,Z=q.get(W);if(!Z)throw Error(`Missing node for policy ${W}`);if(P.afterPolicies)for(let G of P.afterPolicies){let f=q.get(G);if(f)Z.dependsOn.add(f),f.dependants.add(Z)}if(P.beforePolicies)for(let G of P.beforePolicies){let f=q.get(G);if(f)f.dependsOn.add(Z),Z.dependants.add(f)}}function j(D){D.hasRun=!0;for(let X of D.policies){if(X.afterPhase&&(!X.afterPhase.hasRun||X.afterPhase.policies.size))continue;if(X.dependsOn.size===0){A.push(X.policy);for(let P of X.dependants)P.dependsOn.delete(X);q.delete(X.policy.name),D.policies.delete(X)}}}function J(){for(let D of O){if(j(D),D.policies.size>0&&D!==z){if(!z.hasRun)j(z);return}if(D.hasAfterPolicies)j(z)}}let M=0;while(q.size>0){M++;let D=A.length;if(J(),A.length<=D&&M>1)throw Error("Cannot satisfy policy dependencies due to requirements cycle.")}return A}}function z08(){return GM1.create()}var rU7;var oU7=k(()=>{rU7=new Set(["Deserialize","Serialize","Retry","Sign"])});function JF6(A){return typeof A==="object"&&A!==null&&!Array.isArray(A)&&!(A instanceof RegExp)&&!(A instanceof Date)}function q96(A){if(JF6(A)){let q=typeof A.name==="string",K=typeof A.message==="string";return q&&K}return!1}var w08=()=>{};import{inspect as JG9}from"node:util";var aU7;var sU7=k(()=>{aU7=JG9.custom});class mg{constructor({additionalAllowedHeaderNames:A=[],additionalAllowedQueryParameters:q=[]}={}){A=MG9.concat(A),q=DG9.concat(q),this.allowedHeaderNames=new Set(A.map((K)=>K.toLowerCase())),this.allowedQueryParameters=new Set(q.map((K)=>K.toLowerCase()))}sanitize(A){let q=new Set;return JSON.stringify(A,(K,Y)=>{if(Y instanceof Error)return Object.assign(Object.assign({},Y),{name:Y.name,message:Y.message});if(K==="headers")return this.sanitizeHeaders(Y);else if(K==="url")return this.sanitizeUrl(Y);else if(K==="query")return this.sanitizeQuery(Y);else if(K==="body")return;else if(K==="response")return;else if(K==="operationSpec")return;else if(Array.isArray(Y)||JF6(Y)){if(q.has(Y))return"[Circular]";q.add(Y)}return Y},2)}sanitizeUrl(A){if(typeof A!=="string"||A===null||A==="")return A;let q=new URL(A);if(!q.search)return A;for(let[K]of q.searchParams)if(!this.allowedQueryParameters.has(K.toLowerCase()))q.searchParams.set(K,_08);return q.toString()}sanitizeHeaders(A){let q={};for(let K of Object.keys(A))if(this.allowedHeaderNames.has(K.toLowerCase()))q[K]=A[K];else q[K]=_08;return q}sanitizeQuery(A){if(typeof A!=="object"||A===null)return A;let q={};for(let K of Object.keys(A))if(this.allowedQueryParameters.has(K.toLowerCase()))q[K]=A[K];else q[K]=_08;return q}}var _08="REDACTED",MG9,DG9;var MF6=k(()=>{MG9=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],DG9=["api-version"]});function $08(A){if(A instanceof CN)return!0;return q96(A)&&A.name==="RestError"}var XG9,CN;var O08=k(()=>{w08();sU7();MF6();XG9=new mg;CN=class CN extends Error{constructor(A,q={}){super(A);this.name="RestError",this.code=q.code,this.statusCode=q.statusCode,Object.defineProperty(this,"request",{value:q.request,enumerable:!1}),Object.defineProperty(this,"response",{value:q.response,enumerable:!1}),Object.defineProperty(this,aU7,{value:()=>{return`RestError: ${this.message} ${XG9.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`},enumerable:!1}),Object.setPrototypeOf(this,CN.prototype)}};CN.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";CN.PARSE_ERROR="PARSE_ERROR"});var Re;var fM1=k(()=>{Re=class Re extends Error{constructor(A){super(A);this.name="AbortError"}}});var Ib;var TM1=k(()=>{XM1();Ib=DM1("ts-http-runtime")});import*as hW6 from"node:http";import*as IW6 from"node:https";import*as VM1 from"node:zlib";import{Transform as PG9}from"node:stream";function DF6(A){return A&&typeof A.pipe==="function"}function tU7(A){if(A.readable===!1)return Promise.resolve();return new Promise((q)=>{let K=()=>{q(),A.removeListener("close",K),A.removeListener("end",K),A.removeListener("error",K)};A.on("close",K),A.on("end",K),A.on("error",K)})}function eU7(A){return A&&typeof A.byteLength==="number"}class Ap7{constructor(){this.cachedHttpsAgents=new WeakMap}async sendRequest(A){var q,K,Y;let z=new AbortController,w;if(A.abortSignal){if(A.abortSignal.aborted)throw new Re("The operation was aborted. Request has already been canceled.");w=(J)=>{if(J.type==="abort")z.abort()},A.abortSignal.addEventListener("abort",w)}let _;if(A.timeout>0)_=setTimeout(()=>{let J=new mg;Ib.info(`request to '${J.sanitizeUrl(A.url)}' timed out. canceling...`),z.abort()},A.timeout);let $=A.headers.get("Accept-Encoding"),O=($===null||$===void 0?void 0:$.includes("gzip"))||($===null||$===void 0?void 0:$.includes("deflate")),H=typeof A.body==="function"?A.body():A.body;if(H&&!A.headers.has("Content-Length")){let J=TG9(H);if(J!==null)A.headers.set("Content-Length",J)}let j;try{if(H&&A.onUploadProgress){let W=A.onUploadProgress,Z=new H08(W);if(Z.on("error",(G)=>{Ib.error("Error in upload progress",G)}),DF6(H))H.pipe(Z);else Z.end(H);H=Z}let J=await this.makeRequest(A,z,H);if(_!==void 0)clearTimeout(_);let M=ZG9(J),X={status:(q=J.statusCode)!==null&&q!==void 0?q:0,headers:M,request:A};if(A.method==="HEAD")return J.resume(),X;j=O?GG9(J,M):J;let P=A.onDownloadProgress;if(P){let W=new H08(P);W.on("error",(Z)=>{Ib.error("Error in download progress",Z)}),j.pipe(W),j=W}if(((K=A.streamResponseStatusCodes)===null||K===void 0?void 0:K.has(Number.POSITIVE_INFINITY))||((Y=A.streamResponseStatusCodes)===null||Y===void 0?void 0:Y.has(X.status)))X.readableStreamBody=j;else X.bodyAsText=await fG9(j);return X}finally{if(A.abortSignal&&w){let J=Promise.resolve();if(DF6(H))J=tU7(H);let M=Promise.resolve();if(DF6(j))M=tU7(j);Promise.all([J,M]).then(()=>{var D;if(w)(D=A.abortSignal)===null||D===void 0||D.removeEventListener("abort",w)}).catch((D)=>{Ib.warning("Error when cleaning up abortListener on httpRequest",D)})}}}makeRequest(A,q,K){var Y;let z=new URL(A.url),w=z.protocol!=="https:";if(w&&!A.allowInsecureConnection)throw Error(`Cannot connect to ${A.url} while allowInsecureConnection is false.`);let _=(Y=A.agent)!==null&&Y!==void 0?Y:this.getOrCreateAgent(A,w),$=Object.assign({agent:_,hostname:z.hostname,path:`${z.pathname}${z.search}`,port:z.port,method:A.method,headers:A.headers.toJSON({preserveCase:!0})},A.requestOverrides);return new Promise((O,H)=>{let j=w?hW6.request($,O):IW6.request($,O);if(j.once("error",(J)=>{var M;H(new CN(J.message,{code:(M=J.code)!==null&&M!==void 0?M:CN.REQUEST_SEND_ERROR,request:A}))}),q.signal.addEventListener("abort",()=>{let J=new Re("The operation was aborted. Rejecting from abort signal callback while making request.");j.destroy(J),H(J)}),K&&DF6(K))K.pipe(j);else if(K)if(typeof K==="string"||Buffer.isBuffer(K))j.end(K);else if(eU7(K))j.end(ArrayBuffer.isView(K)?Buffer.from(K.buffer):Buffer.from(K));else Ib.error("Unrecognized body type",K),H(new CN("Unrecognized body type"));else j.end()})}getOrCreateAgent(A,q){var K;let Y=A.disableKeepAlive;if(q){if(Y)return hW6.globalAgent;if(!this.cachedHttpAgent)this.cachedHttpAgent=new hW6.Agent({keepAlive:!0});return this.cachedHttpAgent}else{if(Y&&!A.tlsSettings)return IW6.globalAgent;let z=(K=A.tlsSettings)!==null&&K!==void 0?K:WG9,w=this.cachedHttpsAgents.get(z);if(w&&w.options.keepAlive===!Y)return w;return Ib.info("No cached TLS Agent exist, creating a new Agent"),w=new IW6.Agent(Object.assign({keepAlive:!Y},z)),this.cachedHttpsAgents.set(z,w),w}}}function ZG9(A){let q=Bg();for(let K of Object.keys(A.headers)){let Y=A.headers[K];if(Array.isArray(Y)){if(Y.length>0)q.set(K,Y[0])}else if(Y)q.set(K,Y)}return q}function GG9(A,q){let K=q.get("Content-Encoding");if(K==="gzip"){let Y=VM1.createGunzip();return A.pipe(Y),Y}else if(K==="deflate"){let Y=VM1.createInflate();return A.pipe(Y),Y}return A}function fG9(A){return new Promise((q,K)=>{let Y=[];A.on("data",(z)=>{if(Buffer.isBuffer(z))Y.push(z);else Y.push(Buffer.from(z))}),A.on("end",()=>{q(Buffer.concat(Y).toString("utf8"))}),A.on("error",(z)=>{if(z&&(z===null||z===void 0?void 0:z.name)==="AbortError")K(z);else K(new CN(`Error reading response as text: ${z.message}`,{code:CN.PARSE_ERROR}))})})}function TG9(A){if(!A)return 0;else if(Buffer.isBuffer(A))return A.length;else if(DF6(A))return null;else if(eU7(A))return A.byteLength;else if(typeof A==="string")return Buffer.from(A).length;else return null}function qp7(){return new Ap7}var WG9,H08;var Kp7=k(()=>{fM1();HF6();O08();TM1();MF6();WG9={};H08=class H08 extends PG9{_transform(A,q,K){this.push(A),this.loadedBytes+=A.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),K()}catch(Y){K(Y)}}constructor(A){super();this.loadedBytes=0,this.progressCallback=A}}});function j08(){return qp7()}var Yp7=k(()=>{Kp7()});var bW6=k(()=>{HF6();nU7();oU7();O08();Yp7();cU7();lU7()});function XF6(){return z08()}var J08=k(()=>{bW6()});var zl;var NM1=k(()=>{A96();zl=ye("core-rest-pipeline")});function M08(A){return{name:"agentPolicy",sendRequest:async(q,K)=>{if(!q.agent)q.agent=A;return K(q)}}}function D08(){return{name:"decompressResponsePolicy",async sendRequest(A,q){if(A.method!=="HEAD")A.headers.set("Accept-Encoding","gzip,deflate");return q(A)}}}function X08(A,q){return A=Math.ceil(A),q=Math.floor(q),Math.floor(Math.random()*(q-A+1))+A}function PF6(A,q){let K=q.retryDelayInMs*Math.pow(2,A),Y=Math.min(q.maxRetryDelayInMs,K);return{retryAfterInMs:Y/2+X08(0,Y/2)}}var P08=()=>{};function zp7(A,q,K){return new Promise((Y,z)=>{let w=void 0,_=void 0,$=()=>{return z(new Re((K===null||K===void 0?void 0:K.abortErrorMsg)?K===null||K===void 0?void 0:K.abortErrorMsg:VG9))},O=()=>{if((K===null||K===void 0?void 0:K.abortSignal)&&_)K.abortSignal.removeEventListener("abort",_)};if(_=()=>{if(w)clearTimeout(w);return O(),$()},(K===null||K===void 0?void 0:K.abortSignal)&&K.abortSignal.aborted)return $();if(w=setTimeout(()=>{O(),Y(q)},A),K===null||K===void 0?void 0:K.abortSignal)K.abortSignal.addEventListener("abort",_)})}function wp7(A,q){let K=A.headers.get(q);if(!K)return;let Y=Number(K);if(Number.isNaN(Y))return;return Y}var VG9="The operation was aborted.";var W08=k(()=>{fM1()});function _p7(A){if(!(A&&[429,503].includes(A.status)))return;try{for(let z of NG9){let w=wp7(A,z);if(w===0||w)return w*(z===Z08?1000:1)}let q=A.headers.get(Z08);if(!q)return;let Y=Date.parse(q)-Date.now();return Number.isFinite(Y)?Math.max(0,Y):void 0}catch(q){return}}function $p7(A){return Number.isFinite(_p7(A))}function Op7(){return{name:"throttlingRetryStrategy",retry({response:A}){let q=_p7(A);if(!Number.isFinite(q))return{skipStrategy:!0};return{retryAfterInMs:q}}}}var Z08="Retry-After",NG9;var G08=k(()=>{W08();NG9=["retry-after-ms","x-ms-retry-after-ms",Z08]});function Hp7(A={}){var q,K;let Y=(q=A.retryDelayInMs)!==null&&q!==void 0?q:vG9,z=(K=A.maxRetryDelayInMs)!==null&&K!==void 0?K:kG9;return{name:"exponentialRetryStrategy",retry({retryCount:w,response:_,responseError:$}){let O=LG9($),H=O&&A.ignoreSystemErrors,j=EG9(_),J=j&&A.ignoreHttpStatusCodes;if(_&&($p7(_)||!j)||J||H)return{skipStrategy:!0};if($&&!O&&!j)return{errorToThrow:$};return PF6(w,{retryDelayInMs:Y,maxRetryDelayInMs:z})}}}function EG9(A){return Boolean(A&&A.status!==void 0&&(A.status>=500||A.status===408)&&A.status!==501&&A.status!==505)}function LG9(A){if(!A)return!1;return A.code==="ETIMEDOUT"||A.code==="ESOCKETTIMEDOUT"||A.code==="ECONNREFUSED"||A.code==="ECONNRESET"||A.code==="ENOENT"||A.code==="ENOTFOUND"}var vG9=1000,kG9=64000;var jp7=k(()=>{P08();G08()});var WF6=3;function ZF6(A,q={maxRetries:WF6}){let K=q.logger||yG9;return{name:RG9,async sendRequest(Y,z){var w,_;let $,O,H=-1;A:while(!0){H+=1,$=void 0,O=void 0;try{K.info(`Retry ${H}: Attempting to send request`,Y.requestId),$=await z(Y),K.info(`Retry ${H}: Received a response from request`,Y.requestId)}catch(j){if(K.error(`Retry ${H}: Received an error from request`,Y.requestId),O=j,!j||O.name!=="RestError")throw j;$=O.response}if((w=Y.abortSignal)===null||w===void 0?void 0:w.aborted)throw K.error(`Retry ${H}: Request aborted.`),new Re;if(H>=((_=q.maxRetries)!==null&&_!==void 0?_:WF6))if(K.info(`Retry ${H}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),O)throw O;else if($)return $;else throw Error("Maximum retries reached with no response or error to throw");K.info(`Retry ${H}: Processing ${A.length} retry strategies.`);q:for(let j of A){let J=j.logger||K;J.info(`Retry ${H}: Processing retry strategy ${j.name}.`);let M=j.retry({retryCount:H,response:$,responseError:O});if(M.skipStrategy){J.info(`Retry ${H}: Skipped.`);continue q}let{errorToThrow:D,retryAfterInMs:X,redirectTo:P}=M;if(D)throw J.error(`Retry ${H}: Retry strategy ${j.name} throws error:`,D),D;if(X||X===0){J.info(`Retry ${H}: Retry strategy ${j.name} retries after ${X}`),await zp7(X,void 0,{abortSignal:Y.abortSignal});continue A}if(P){J.info(`Retry ${H}: Retry strategy ${j.name} redirects to ${P}`),Y.url=P;continue A}}if(O)throw K.info("None of the retry strategies could work with the received error. Throwing it."),O;if($)return K.info("None of the retry strategies could work with the received response. Returning it."),$}}}}var yG9,RG9="retryPolicy";var f08=k(()=>{W08();fM1();XM1();yG9=DM1("ts-http-runtime retryPolicy")});function V08(A={}){var q;return{name:T08,sendRequest:ZF6([Op7(),Hp7(A)],{maxRetries:(q=A.maxRetries)!==null&&q!==void 0?q:WF6}).sendRequest}}var T08="defaultRetryPolicy";var Jp7=k(()=>{jp7();G08();f08()});function gg(A,q){return Buffer.from(A,q)}var N08,v08,k08,E08,Mp7,Dp7,Xp7,Pp7,xW6,Wp7;var L08=k(()=>{Mp7=typeof window<"u"&&typeof window.document<"u",Dp7=typeof self==="object"&&typeof(self===null||self===void 0?void 0:self.importScripts)==="function"&&(((N08=self.constructor)===null||N08===void 0?void 0:N08.name)==="DedicatedWorkerGlobalScope"||((v08=self.constructor)===null||v08===void 0?void 0:v08.name)==="ServiceWorkerGlobalScope"||((k08=self.constructor)===null||k08===void 0?void 0:k08.name)==="SharedWorkerGlobalScope"),Xp7=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",Pp7=typeof Bun<"u"&&typeof Bun.version<"u",xW6=typeof globalThis.process<"u"&&Boolean(globalThis.process.version)&&Boolean((E08=globalThis.process.versions)===null||E08===void 0?void 0:E08.node),Wp7=typeof navigator<"u"&&(navigator===null||navigator===void 0?void 0:navigator.product)==="ReactNative"});function SG9(A){var q;let K={};for(let[Y,z]of A.entries())(q=K[Y])!==null&&q!==void 0||(K[Y]=[]),K[Y].push(z);return K}function R08(){return{name:y08,async sendRequest(A,q){if(xW6&&typeof FormData<"u"&&A.body instanceof FormData)A.formData=SG9(A.body),A.body=void 0;if(A.formData){let K=A.headers.get("Content-Type");if(K&&K.indexOf("application/x-www-form-urlencoded")!==-1)A.body=CG9(A.formData);else await hG9(A.formData,A);A.formData=void 0}return q(A)}}}function CG9(A){let q=new URLSearchParams;for(let[K,Y]of Object.entries(A))if(Array.isArray(Y))for(let z of Y)q.append(K,z.toString());else q.append(K,Y.toString());return q.toString()}async function hG9(A,q){let K=q.headers.get("Content-Type");if(K&&!K.startsWith("multipart/form-data"))return;q.headers.set("Content-Type",K!==null&&K!==void 0?K:"multipart/form-data");let Y=[];for(let[z,w]of Object.entries(A))for(let _ of Array.isArray(w)?w:[w])if(typeof _==="string")Y.push({headers:Bg({"Content-Disposition":`form-data; name="${z}"`}),body:gg(_,"utf-8")});else if(_===void 0||_===null||typeof _!=="object")throw Error(`Unexpected value for key ${z}: ${_}. Value should be serialized to string first.`);else{let $=_.name||"blob",O=Bg();O.set("Content-Disposition",`form-data; name="${z}"; filename="${$}"`),O.set("Content-Type",_.type||"application/octet-stream"),Y.push({headers:O,body:_})}q.multipartBody={parts:Y}}var y08="formDataPolicy";var Zp7=k(()=>{L08();HF6()});function C08(A={}){var q;let K=(q=A.logger)!==null&&q!==void 0?q:Ib.info,Y=new mg({additionalAllowedHeaderNames:A.additionalAllowedHeaderNames,additionalAllowedQueryParameters:A.additionalAllowedQueryParameters});return{name:S08,async sendRequest(z,w){if(!K.enabled)return w(z);K(`Request: ${Y.sanitize(z)}`);let _=await w(z);return K(`Response status code: ${_.status}`),K(`Headers: ${Y.sanitize(_.headers)}`),_}}}var S08="logPolicy";var Gp7=k(()=>{TM1();MF6()});function vM1(A){return typeof A.stream==="function"}var fp7,bb2,xb2,ub2,Bb2,mb2,gb2,Fb2,Qb2,Ub2,pb2,db2,cb2,lb2,ib2,nb2,rb2,ob2,ab2,sb2,K96,h08,tb2,Tp7,eb2,Ax2,qx2,Kx2,Yx2,zx2,wx2,_x2,$x2;var Vp7=k(()=>{fp7=e(d2(),1),{__extends:bb2,__assign:xb2,__rest:ub2,__decorate:Bb2,__param:mb2,__esDecorate:gb2,__runInitializers:Fb2,__propKey:Qb2,__setFunctionName:Ub2,__metadata:pb2,__awaiter:db2,__generator:cb2,__exportStar:lb2,__createBinding:ib2,__values:nb2,__read:rb2,__spread:ob2,__spreadArrays:ab2,__spreadArray:sb2,__await:K96,__asyncGenerator:h08,__asyncDelegator:tb2,__asyncValues:Tp7,__makeTemplateObject:eb2,__importStar:Ax2,__importDefault:qx2,__classPrivateFieldGet:Kx2,__classPrivateFieldSet:Yx2,__classPrivateFieldIn:zx2,__addDisposableResource:wx2,__disposeResources:_x2,__rewriteRelativeImportExtension:$x2}=fp7.default});import{Readable as I08}from"stream";function Np7(){return h08(this,arguments,function*(){let q=this.getReader();try{while(!0){let{done:K,value:Y}=yield K96(q.read());if(K)return yield K96(void 0);yield yield K96(Y)}}finally{q.releaseLock()}})}function IG9(A){if(!A[Symbol.asyncIterator])A[Symbol.asyncIterator]=Np7.bind(A);if(!A.values)A.values=Np7.bind(A)}function vp7(A){if(A instanceof ReadableStream)return IG9(A),I08.fromWeb(A);else return A}function bG9(A){if(A instanceof Uint8Array)return I08.from(Buffer.from(A));else if(vM1(A))return vp7(A.stream());else return vp7(A)}async function kp7(A){return function(){let q=A.map((K)=>typeof K==="function"?K():K).map(bG9);return I08.from(function(){return h08(this,arguments,function*(){var K,Y,z,w;for(let H of q)try{for(var _=!0,$=(Y=void 0,Tp7(H)),O;O=yield K96($.next()),K=O.done,!K;_=!0)w=O.value,_=!1,yield yield K96(w)}catch(j){Y={error:j}}finally{try{if(!_&&!K&&(z=$.return))yield K96(z.call($))}finally{if(Y)throw Y.error}}})}())}}var Ep7=k(()=>{Vp7()});function xG9(){return`----AzSDKFormBoundary${jF6()}`}function uG9(A){let q="";for(let[K,Y]of A)q+=`${K}: ${Y}\r `;return q}function BG9(A){if(A instanceof Uint8Array)return A.byteLength;else if(vM1(A))return A.size===-1?void 0:A.size;else return}function mG9(A){let q=0;for(let K of A){let Y=BG9(K);if(Y===void 0)return;else q+=Y}return q}async function gG9(A,q,K){let Y=[gg(`--${K}`,"utf-8"),...q.flatMap((w)=>[gg(`\r `,"utf-8"),gg(uG9(w.headers),"utf-8"),gg(`\r `,"utf-8"),w.body,gg(`\r --${K}`,"utf-8")]),gg(`--\r \r `,"utf-8")],z=mG9(Y);if(z)A.headers.set("Content-Length",z);A.body=await kp7(Y)}function UG9(A){if(A.length>FG9)throw Error(`Multipart boundary "${A}" exceeds maximum length of 70 characters`);if(Array.from(A).some((q)=>!QG9.has(q)))throw Error(`Multipart boundary "${A}" contains invalid characters`)}function b08(){return{name:kM1,async sendRequest(A,q){var K;if(!A.multipartBody)return q(A);if(A.body)throw Error("multipartBody and regular body cannot be set at the same time");let Y=A.multipartBody.boundary,z=(K=A.headers.get("Content-Type"))!==null&&K!==void 0?K:"multipart/mixed",w=z.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!w)throw Error(`Got multipart request body, but content-type header was not multipart: ${z}`);let[,_,$]=w;if($&&Y&&$!==Y)throw Error(`Multipart boundary was specified as ${$} in the header, but got ${Y} in the request body`);if(Y!==null&&Y!==void 0||(Y=$),Y)UG9(Y);else Y=xG9();return A.headers.set("Content-Type",`${_}; boundary=${Y}`),await gG9(A,A.multipartBody.parts,Y),A.multipartBody=void 0,q(A)}}}var kM1="multipartPolicy",FG9=70,QG9;var Lp7=k(()=>{K08();Ep7();QG9=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?")});var Sp7=C((HS)=>{var pG9=HS&&HS.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),dG9=HS&&HS.__setModuleDefault||(Object.create?function(A,q){Object.defineProperty(A,"default",{enumerable:!0,value:q})}:function(A,q){A.default=q}),Rp7=HS&&HS.__importStar||function(A){if(A&&A.__esModule)return A;var q={};if(A!=null){for(var K in A)if(K!=="default"&&Object.prototype.hasOwnProperty.call(A,K))pG9(q,A,K)}return dG9(q,A),q},cG9=HS&&HS.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(HS,"__esModule",{value:!0});HS.HttpProxyAgent=void 0;var lG9=Rp7(g6("net")),iG9=Rp7(g6("tls")),nG9=cG9(Vq6()),rG9=g6("events"),oG9=e78(),yp7=g6("url"),uW6=(0,nG9.default)("http-proxy-agent");class x08 extends oG9.Agent{constructor(A,q){super(q);this.proxy=typeof A==="string"?new yp7.URL(A):A,this.proxyHeaders=q?.headers??{},uW6("Creating new HttpProxyAgent instance: %o",this.proxy.href);let K=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),Y=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...q?aG9(q,"headers"):null,host:K,port:Y}}addRequest(A,q){A._header=null,this.setRequestProps(A,q),super.addRequest(A,q)}setRequestProps(A,q){let{proxy:K}=this,Y=q.secureEndpoint?"https:":"http:",z=A.getHeader("host")||"localhost",w=`${Y}//${z}`,_=new yp7.URL(A.path,w);if(q.port!==80)_.port=String(q.port);A.path=String(_);let $=typeof this.proxyHeaders==="function"?this.proxyHeaders():{...this.proxyHeaders};if(K.username||K.password){let O=`${decodeURIComponent(K.username)}:${decodeURIComponent(K.password)}`;$["Proxy-Authorization"]=`Basic ${Buffer.from(O).toString("base64")}`}if(!$["Proxy-Connection"])$["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close";for(let O of Object.keys($)){let H=$[O];if(H)A.setHeader(O,H)}}async connect(A,q){if(A._header=null,!A.path.includes("://"))this.setRequestProps(A,q);let K,Y;if(uW6("Regenerating stored HTTP header string for request"),A._implicitHeader(),A.outputData&&A.outputData.length>0)uW6("Patching connection write() output buffer with updated header"),K=A.outputData[0].data,Y=K.indexOf(`\r \r `)+4,A.outputData[0].data=A._header+K.substring(Y),uW6("Output buffer: %o",A.outputData[0].data);let z;if(this.proxy.protocol==="https:")uW6("Creating `tls.Socket`: %o",this.connectOpts),z=iG9.connect(this.connectOpts);else uW6("Creating `net.Socket`: %o",this.connectOpts),z=lG9.connect(this.connectOpts);return await(0,rG9.once)(z,"connect"),z}}x08.protocols=["http","https"];HS.HttpProxyAgent=x08;function aG9(A,...q){let K={},Y;for(Y in A)if(!q.includes(Y))K[Y]=A[Y];return K}});function EM1(A){if(process.env[A])return process.env[A];else if(process.env[A.toLowerCase()])return process.env[A.toLowerCase()];return}function Kf9(){if(!process)return;let A=EM1(sG9),q=EM1(eG9),K=EM1(tG9);return A||q||K}function Yf9(A,q,K){if(q.length===0)return!1;let Y=new URL(A).hostname;if(K===null||K===void 0?void 0:K.has(Y))return K.get(Y);let z=!1;for(let w of q)if(w[0]==="."){if(Y.endsWith(w))z=!0;else if(Y.length===w.length-1&&Y===w.slice(1))z=!0}else if(Y===w)z=!0;return K===null||K===void 0||K.set(Y,z),z}function zf9(){let A=EM1(Af9);if(up7=!0,A)return A.split(",").map((q)=>q.trim()).filter((q)=>q.length);return[]}function wf9(){let A=Kf9();return A?new URL(A):void 0}function hp7(A){let q;try{q=new URL(A.host)}catch(K){throw Error(`Expecting a valid host string in proxy settings, but found "${A.host}".`)}if(q.port=String(A.port),A.username)q.username=A.username;if(A.password)q.password=A.password;return q}function Ip7(A,q,K){if(A.agent)return;let z=new URL(A.url).protocol!=="https:";if(A.tlsSettings)Ib.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let w=A.headers.toJSON();if(z){if(!q.httpProxyAgent)q.httpProxyAgent=new xp7.HttpProxyAgent(K,{headers:w});A.agent=q.httpProxyAgent}else{if(!q.httpsProxyAgent)q.httpsProxyAgent=new bp7.HttpsProxyAgent(K,{headers:w});A.agent=q.httpsProxyAgent}}function B08(A,q){if(!up7)Cp7.push(...zf9());let K=A?hp7(A):wf9(),Y={};return{name:u08,async sendRequest(z,w){var _;if(!z.proxySettings&&K&&!Yf9(z.url,(_=q===null||q===void 0?void 0:q.customNoProxyList)!==null&&_!==void 0?_:Cp7,(q===null||q===void 0?void 0:q.customNoProxyList)?void 0:qf9))Ip7(z,Y,K);else if(z.proxySettings)Ip7(z,Y,hp7(z.proxySettings));return w(z)}}}var bp7,xp7,sG9="HTTPS_PROXY",tG9="HTTP_PROXY",eG9="ALL_PROXY",Af9="NO_PROXY",u08="proxyPolicy",Cp7,up7=!1,qf9;var Bp7=k(()=>{TM1();bp7=e(Gx6(),1),xp7=e(Sp7(),1),Cp7=[],qf9=new Map});function m08(A={}){let{maxRetries:q=20}=A;return{name:"redirectPolicy",async sendRequest(K,Y){let z=await Y(K);return gp7(Y,z,q)}}}async function gp7(A,q,K,Y=0){let{request:z,status:w,headers:_}=q,$=_.get("location");if($&&(w===300||w===301&&mp7.includes(z.method)||w===302&&mp7.includes(z.method)||w===303&&z.method==="POST"||w===307)&&Y{mp7=["GET","HEAD"]});function g08(A){return{name:"tlsPolicy",sendRequest:async(q,K)=>{if(!q.tlsSettings)q.tlsSettings=A;return K(q)}}}var bb=k(()=>{Jp7();f08();Zp7();Gp7();Lp7();Bp7();Fp7()});function Qp7(A={}){return C08(Object.assign({logger:zl.info},A))}var Up7=k(()=>{NM1();bb()});function pp7(A={}){return m08(A)}var dp7=k(()=>{bb()});import*as BW6 from"node:os";import*as LM1 from"node:process";function cp7(){return"User-Agent"}async function lp7(A){if(LM1&&LM1.versions){let q=LM1.versions;if(q.bun)A.set("Bun",q.bun);else if(q.deno)A.set("Deno",q.deno);else if(q.node)A.set("Node",q.node)}A.set("OS",`(${BW6.arch()}-${BW6.type()}-${BW6.release()})`)}var ip7=()=>{};var yM1="1.21.0",np7=3;function Jf9(A){let q=[];for(let[K,Y]of A){let z=Y?`${K}/${Y}`:K;q.push(z)}return q.join(" ")}function rp7(){return cp7()}async function RM1(A){let q=new Map;q.set("core-rest-pipeline",yM1),await lp7(q);let K=Jf9(q);return A?`${A} ${K}`:K}var F08=k(()=>{ip7()});function ap7(A={}){let q=RM1(A.userAgentPrefix);return{name:Mf9,async sendRequest(K,Y){if(!K.headers.has(op7))K.headers.set(op7,await q);return Y(K)}}}var op7,Mf9="userAgentPolicy";var sp7=k(()=>{F08();op7=rp7()});var SM1=k(()=>{P08();w08();L08();MF6()});var mW6;var tp7=k(()=>{mW6=class mW6 extends Error{constructor(A){super(A);this.name="AbortError"}}});var Q08=k(()=>{tp7()});function ep7(A,q){let{cleanupBeforeAbort:K,abortSignal:Y,abortErrorMsg:z}=q!==null&&q!==void 0?q:{};return new Promise((w,_)=>{function $(){_(new mW6(z!==null&&z!==void 0?z:"The operation was aborted."))}function O(){Y===null||Y===void 0||Y.removeEventListener("abort",H)}function H(){K===null||K===void 0||K(),O(),$()}if(Y===null||Y===void 0?void 0:Y.aborted)return $();try{A((j)=>{O(),w(j)},(j)=>{O(),_(j)})}catch(j){_(j)}Y===null||Y===void 0||Y.addEventListener("abort",H)})}var Ad7=k(()=>{Q08()});function U08(A,q){let K,{abortSignal:Y,abortErrorMsg:z}=q!==null&&q!==void 0?q:{};return ep7((w)=>{K=setTimeout(w,A)},{cleanupBeforeAbort:()=>clearTimeout(K),abortSignal:Y,abortErrorMsg:z!==null&&z!==void 0?z:Pf9})}var Pf9="The delay was aborted.";var qd7=k(()=>{Ad7()});function gW6(A){if(q96(A))return A.message;else{let q;try{if(typeof A==="object"&&A)q=JSON.stringify(A);else q=String(A)}catch(K){q="[unable to stringify input]"}return`Unknown error ${q}`}}var Kd7=k(()=>{SM1()});function Yd7(A,q){return PF6(A,q)}function CM1(A){return q96(A)}var hM1,GF6;var Se=k(()=>{SM1();qd7();Kd7();hM1=xW6,GF6=xW6});function p08(A){return typeof A[zd7]==="function"}function wd7(A){if(p08(A))return A[zd7]();else return A}var zd7;var _d7=k(()=>{zd7=Symbol("rawContent")});function $d7(){let A=b08();return{name:d08,sendRequest:async(q,K)=>{if(q.multipartBody){for(let Y of q.multipartBody.parts)if(p08(Y.body))Y.body=wd7(Y.body)}return A.sendRequest(q,K)}}}var d08;var Od7=k(()=>{bb();_d7();d08=kM1});function Hd7(){return D08()}var jd7=k(()=>{bb()});function Jd7(A={}){return V08(A)}var Md7=k(()=>{bb()});function Dd7(){return R08()}var Xd7=k(()=>{bb()});function Pd7(A,q){return B08(A,q)}var Wd7=k(()=>{bb()});function Zd7(A="x-ms-client-request-id"){return{name:"setClientRequestIdPolicy",async sendRequest(q,K){if(!q.headers.has(A))q.headers.set(A,q.requestId);return K(q)}}}function Gd7(A){return M08(A)}var fd7=k(()=>{bb()});function Td7(A){return g08(A)}var Vd7=k(()=>{bb()});function Nd7(A={}){let q=new fF6(A.parentContext);if(A.span)q=q.setValue(FW6.span,A.span);if(A.namespace)q=q.setValue(FW6.namespace,A.namespace);return q}class fF6{constructor(A){this._contextMap=A instanceof fF6?new Map(A._contextMap):new Map}setValue(A,q){let K=new fF6(this);return K._contextMap.set(A,q),K}getValue(A){return this._contextMap.get(A)}deleteValue(A){let q=new fF6(this);return q._contextMap.delete(A),q}}var FW6;var c08=k(()=>{FW6={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")}});var Ed7=C((vd7)=>{Object.defineProperty(vd7,"__esModule",{value:!0});vd7.state=void 0;vd7.state={instrumenterImplementation:void 0}});var Ld7,IM1;var yd7=k(()=>{Ld7=e(Ed7(),1),IM1=Ld7.state});function Wf9(){return{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}}}function Zf9(){return{createRequestHeaders:()=>{return{}},parseTraceparentHeader:()=>{return},startSpan:(A,q)=>{return{span:Wf9(),tracingContext:Nd7({parentContext:q.tracingContext})}},withContext(A,q,...K){return q(...K)}}}function TF6(){if(!IM1.instrumenterImplementation)IM1.instrumenterImplementation=Zf9();return IM1.instrumenterImplementation}var Rd7=k(()=>{c08();yd7()});function VF6(A){let{namespace:q,packageName:K,packageVersion:Y}=A;function z(H,j,J){var M;let D=TF6().startSpan(H,Object.assign(Object.assign({},J),{packageName:K,packageVersion:Y,tracingContext:(M=j===null||j===void 0?void 0:j.tracingOptions)===null||M===void 0?void 0:M.tracingContext})),X=D.tracingContext,P=D.span;if(!X.getValue(FW6.namespace))X=X.setValue(FW6.namespace,q);P.setAttribute("az.namespace",X.getValue(FW6.namespace));let W=Object.assign({},j,{tracingOptions:Object.assign(Object.assign({},j===null||j===void 0?void 0:j.tracingOptions),{tracingContext:X})});return{span:P,updatedOptions:W}}async function w(H,j,J,M){let{span:D,updatedOptions:X}=z(H,j,M);try{let P=await _(X.tracingOptions.tracingContext,()=>Promise.resolve(J(X,D)));return D.setStatus({status:"success"}),P}catch(P){throw D.setStatus({status:"error",error:P}),P}finally{D.end()}}function _(H,j,...J){return TF6().withContext(H,j,...J)}function $(H){return TF6().parseTraceparentHeader(H)}function O(H){return TF6().createRequestHeaders(H)}return{startSpan:z,withSpan:w,withContext:_,parseTraceparentHeader:$,createRequestHeaders:O}}var Sd7=k(()=>{Rd7();c08()});var l08=k(()=>{Sd7()});function NF6(A){return $08(A)}var QW6;var bM1=k(()=>{bW6();QW6=CN});function Cd7(A={}){let q=RM1(A.userAgentPrefix),K=new mg({additionalAllowedQueryParameters:A.additionalAllowedQueryParameters}),Y=ff9();return{name:Gf9,async sendRequest(z,w){var _;if(!Y)return w(z);let $=await q,O={"http.url":K.sanitizeUrl(z.url),"http.method":z.method,"http.user_agent":$,requestId:z.requestId};if($)O["http.user_agent"]=$;let{span:H,tracingContext:j}=(_=Tf9(Y,z,O))!==null&&_!==void 0?_:{};if(!H||!j)return w(z);try{let J=await Y.withContext(j,w,z);return Nf9(H,J),J}catch(J){throw Vf9(H,J),J}}}}function ff9(){try{return VF6({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:yM1})}catch(A){zl.warning(`Error when creating the TracingClient: ${gW6(A)}`);return}}function Tf9(A,q,K){try{let{span:Y,updatedOptions:z}=A.startSpan(`HTTP ${q.method}`,{tracingOptions:q.tracingOptions},{spanKind:"client",spanAttributes:K});if(!Y.isRecording()){Y.end();return}let w=A.createRequestHeaders(z.tracingOptions.tracingContext);for(let[_,$]of Object.entries(w))q.headers.set(_,$);return{span:Y,tracingContext:z.tracingOptions.tracingContext}}catch(Y){zl.warning(`Skipping creating a tracing span due to an error: ${gW6(Y)}`);return}}function Vf9(A,q){try{if(A.setStatus({status:"error",error:CM1(q)?q:void 0}),NF6(q)&&q.statusCode)A.setAttribute("http.status_code",q.statusCode);A.end()}catch(K){zl.warning(`Skipping tracing span processing due to an error: ${gW6(K)}`)}}function Nf9(A,q){try{A.setAttribute("http.status_code",q.status);let K=q.headers.get("x-ms-request-id");if(K)A.setAttribute("serviceRequestId",K);if(q.status>=400)A.setStatus({status:"error"});A.end()}catch(K){zl.warning(`Skipping tracing span processing due to an error: ${gW6(K)}`)}}var Gf9="tracingPolicy";var hd7=k(()=>{l08();F08();NM1();Se();bM1();SM1()});function xM1(A){if(A instanceof AbortSignal)return{abortSignal:A};if(A.aborted)return{abortSignal:AbortSignal.abort(A.reason)};let q=new AbortController,K=!0;function Y(){if(K)A.removeEventListener("abort",z),K=!1}function z(){q.abort(A.reason),Y()}return A.addEventListener("abort",z),{abortSignal:q.signal,cleanup:Y}}function Id7(){return{name:vf9,sendRequest:async(A,q)=>{if(!A.abortSignal)return q(A);let{abortSignal:K,cleanup:Y}=xM1(A.abortSignal);A.abortSignal=K;try{return await q(A)}finally{Y===null||Y===void 0||Y()}}}}var vf9="wrapAbortSignalLikePolicy";var bd7=()=>{};function i08(A){var q;let K=XF6();if(GF6){if(A.agent)K.addPolicy(Gd7(A.agent));if(A.tlsOptions)K.addPolicy(Td7(A.tlsOptions));K.addPolicy(Pd7(A.proxyOptions)),K.addPolicy(Hd7())}if(K.addPolicy(Id7()),K.addPolicy(Dd7(),{beforePolicies:[d08]}),K.addPolicy(ap7(A.userAgentOptions)),K.addPolicy(Zd7((q=A.telemetryOptions)===null||q===void 0?void 0:q.clientRequestIdHeaderName)),K.addPolicy($d7(),{afterPhase:"Deserialize"}),K.addPolicy(Jd7(A.retryOptions),{phase:"Retry"}),K.addPolicy(Cd7(Object.assign(Object.assign({},A.userAgentOptions),A.loggingOptions)),{afterPhase:"Retry"}),GF6)K.addPolicy(pp7(A.redirectOptions),{afterPhase:"Retry"});return K.addPolicy(Qp7(A.loggingOptions),{afterPhase:"Sign"}),K}var xd7=k(()=>{Up7();J08();dp7();sp7();Od7();jd7();Md7();Xd7();Se();Wd7();fd7();Vd7();hd7();bd7()});function n08(){let A=j08();return{async sendRequest(q){let{abortSignal:K,cleanup:Y}=q.abortSignal?xM1(q.abortSignal):{};try{return q.abortSignal=K,await A.sendRequest(q)}finally{Y===null||Y===void 0||Y()}}}}var ud7=k(()=>{bW6()});function wl(A){return Bg(A)}var Bd7=k(()=>{bW6()});function bE(A){return Y08(A)}var md7=k(()=>{bW6()});function r08(A,q={maxRetries:np7}){return ZF6(A,Object.assign({logger:kf9},q))}var kf9;var gd7=k(()=>{A96();bb();kf9=ye("core-rest-pipeline retryPolicy")});async function Lf9(A,q,K){async function Y(){if(Date.now()A.getToken(O,H),w.retryIntervalInMs,(j=Y===null||Y===void 0?void 0:Y.expiresOnTimestamp)!==null&&j!==void 0?j:Date.now()).then((M)=>{return K=null,Y=M,z=H.tenantId,Y}).catch((M)=>{throw K=null,Y=null,z=void 0,M});return K}return async(O,H)=>{let j=Boolean(H.claims),J=z!==H.tenantId;if(j)Y=null;if(J||j||_.mustRefresh)return $(O,H);if(_.shouldRefresh)$(O,H);return Y}}var Ef9;var Qd7=k(()=>{Se();Ef9={forcedRefreshWindowInMs:1000,retryIntervalInMs:3000,refreshWindowInMs:120000}});async function uM1(A,q){try{return[await q(A),void 0]}catch(K){if(NF6(K)&&K.response)return[K.response,K];else throw K}}async function yf9(A){let{scopes:q,getAccessToken:K,request:Y}=A,z={abortSignal:Y.abortSignal,tracingOptions:Y.tracingOptions,enableCae:!0},w=await K(q,z);if(w)A.request.headers.set("Authorization",`Bearer ${w.token}`)}function Ud7(A){return A.status===401&&A.headers.has("WWW-Authenticate")}async function pd7(A,q){var K;let{scopes:Y}=A,z=await A.getAccessToken(Y,{enableCae:!0,claims:q});if(!z)return!1;return A.request.headers.set("Authorization",`${(K=z.tokenType)!==null&&K!==void 0?K:"Bearer"} ${z.token}`),!0}function vF6(A){var q,K,Y;let{credential:z,scopes:w,challengeCallbacks:_}=A,$=A.logger||zl,O={authorizeRequest:(K=(q=_===null||_===void 0?void 0:_.authorizeRequest)===null||q===void 0?void 0:q.bind(_))!==null&&K!==void 0?K:yf9,authorizeRequestOnChallenge:(Y=_===null||_===void 0?void 0:_.authorizeRequestOnChallenge)===null||Y===void 0?void 0:Y.bind(_)},H=z?Fd7(z):()=>Promise.resolve(null);return{name:cd7,async sendRequest(j,J){if(!j.url.toLowerCase().startsWith("https://"))throw Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");await O.authorizeRequest({scopes:Array.isArray(w)?w:[w],request:j,getAccessToken:H,logger:$});let M,D,X;if([M,D]=await uM1(j,J),Ud7(M)){let P=dd7(M.headers.get("WWW-Authenticate"));if(P){let W;try{W=atob(P)}catch(Z){return $.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${P}`),M}if(X=await pd7({scopes:Array.isArray(w)?w:[w],response:M,request:j,getAccessToken:H,logger:$},W),X)[M,D]=await uM1(j,J)}else if(O.authorizeRequestOnChallenge){if(X=await O.authorizeRequestOnChallenge({scopes:Array.isArray(w)?w:[w],request:j,response:M,getAccessToken:H,logger:$}),X)[M,D]=await uM1(j,J);if(Ud7(M)){if(P=dd7(M.headers.get("WWW-Authenticate")),P){let W;try{W=atob(P)}catch(Z){return $.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${P}`),M}if(X=await pd7({scopes:Array.isArray(w)?w:[w],response:M,request:j,getAccessToken:H,logger:$},W),X)[M,D]=await uM1(j,J)}}}}if(D)throw D;else return M}}}function Rf9(A){let q=/(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g,K=/(\w+)="([^"]*)"/g,Y=[],z;while((z=q.exec(A))!==null){let w=z[1],_=z[2],$={},O;while((O=K.exec(_))!==null)$[O[1]]=O[2];Y.push({scheme:w,params:$})}return Y}function dd7(A){var q;if(!A)return;return(q=Rf9(A).find((Y)=>Y.scheme==="Bearer"&&Y.params.claims&&Y.params.error==="insufficient_claims"))===null||q===void 0?void 0:q.params.claims}var cd7="bearerTokenAuthenticationPolicy";var ld7=k(()=>{Qd7();NM1();bM1()});var Fg=k(()=>{J08();xd7();ud7();Bd7();md7();bM1();gd7();ld7()});var o08="$",BM1="_";function Sf9(A,q){return q!=="Composite"&&q!=="Dictionary"&&(typeof A==="string"||typeof A==="number"||typeof A==="boolean"||(q===null||q===void 0?void 0:q.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i))!==null||A===void 0||A===null)}function Cf9(A){let q=Object.assign(Object.assign({},A.headers),A.body);if(A.hasNullableType&&Object.getOwnPropertyNames(q).length===0)return A.shouldWrapBody?{body:null}:null;else return A.shouldWrapBody?Object.assign(Object.assign({},A.headers),{body:A.body}):q}function a08(A,q){var K,Y;let z=A.parsedHeaders;if(A.request.method==="HEAD")return Object.assign(Object.assign({},z),{body:A.parsedBody});let w=q&&q.bodyMapper,_=Boolean(w===null||w===void 0?void 0:w.nullable),$=w===null||w===void 0?void 0:w.type.name;if($==="Stream")return Object.assign(Object.assign({},z),{blobBody:A.blobBody,readableStreamBody:A.readableStreamBody});let O=$==="Composite"&&w.type.modelProperties||{},H=Object.keys(O).some((j)=>O[j].serializedName==="");if($==="Sequence"||H){let j=(K=A.parsedBody)!==null&&K!==void 0?K:[];for(let J of Object.keys(O))if(O[J].serializedName)j[J]=(Y=A.parsedBody)===null||Y===void 0?void 0:Y[J];if(z)for(let J of Object.keys(z))j[J]=z[J];return _&&!A.parsedBody&&!z&&Object.getOwnPropertyNames(O).length===0?null:j}return Cf9({body:A.parsedBody,headers:z,hasNullableType:_,shouldWrapBody:Sf9(A.parsedBody,$)})}var id7=()=>{};var _l;var mM1=k(()=>{_l={Base64Url:"Base64Url",Boolean:"Boolean",ByteArray:"ByteArray",Composite:"Composite",Date:"Date",DateTime:"DateTime",DateTimeRfc1123:"DateTimeRfc1123",Dictionary:"Dictionary",Enum:"Enum",Number:"Number",Object:"Object",Sequence:"Sequence",String:"String",Stream:"Stream",TimeSpan:"TimeSpan",UnixTime:"UnixTime"}});var od7=C((nd7)=>{Object.defineProperty(nd7,"__esModule",{value:!0});nd7.state=void 0;nd7.state={operationRequestMap:new WeakMap}});var ad7,s08;var sd7=k(()=>{ad7=e(od7(),1),s08=ad7.state});function Ce(A,q,K){let{parameterPath:Y,mapper:z}=q,w;if(typeof Y==="string")Y=[Y];if(Array.isArray(Y)){if(Y.length>0)if(z.isConstant)w=z.defaultValue;else{let _=td7(A,Y);if(!_.propertyFound&&K)_=td7(K,Y);let $=!1;if(!_.propertyFound)$=z.required||Y[0]==="options"&&Y.length===2;w=$?z.defaultValue:_.propertyValue}}else{if(z.required)w={};for(let _ in Y){let $=z.type.modelProperties[_],O=Y[_],H=Ce(A,{parameterPath:O,mapper:$},K);if(H!==void 0){if(!w)w={};w[_]=H}}}return w}function td7(A,q){let K={propertyFound:!1},Y=0;for(;Y{sd7();ed7=Symbol.for("@azure/core-client original request")});function Ac7(A={}){var q,K,Y,z,w,_,$;let O=(K=(q=A.expectedContentTypes)===null||q===void 0?void 0:q.json)!==null&&K!==void 0?K:If9,H=(z=(Y=A.expectedContentTypes)===null||Y===void 0?void 0:Y.xml)!==null&&z!==void 0?z:bf9,j=A.parseXML,J=A.serializerOptions,M={xml:{rootName:(w=J===null||J===void 0?void 0:J.xml.rootName)!==null&&w!==void 0?w:"",includeRoot:(_=J===null||J===void 0?void 0:J.xml.includeRoot)!==null&&_!==void 0?_:!1,xmlCharKey:($=J===null||J===void 0?void 0:J.xml.xmlCharKey)!==null&&$!==void 0?$:BM1}};return{name:xf9,async sendRequest(D,X){let P=await X(D);return mf9(O,H,P,M,j)}}}function uf9(A){let q,K=A.request,Y=$l(K),z=Y===null||Y===void 0?void 0:Y.operationSpec;if(z)if(!(Y===null||Y===void 0?void 0:Y.operationResponseGetter))q=z.responses[A.status];else q=Y===null||Y===void 0?void 0:Y.operationResponseGetter(z,A);return q}function Bf9(A){let q=A.request,K=$l(q),Y=K===null||K===void 0?void 0:K.shouldDeserialize,z;if(Y===void 0)z=!0;else if(typeof Y==="boolean")z=Y;else z=Y(A);return z}async function mf9(A,q,K,Y,z){let w=await Qf9(A,q,K,Y,z);if(!Bf9(w))return w;let _=$l(w.request),$=_===null||_===void 0?void 0:_.operationSpec;if(!$||!$.responses)return w;let O=uf9(w),{error:H,shouldReturnResponse:j}=Ff9(w,$,O,Y);if(H)throw H;else if(j)return w;if(O){if(O.bodyMapper){let J=w.parsedBody;if($.isXML&&O.bodyMapper.type.name===_l.Sequence)J=typeof J==="object"?J[O.bodyMapper.xmlElementName]:[];try{w.parsedBody=$.serializer.deserialize(O.bodyMapper,J,"operationRes.parsedBody",Y)}catch(M){throw new QW6(`Error ${M} occurred in deserializing the responseBody - ${w.bodyAsText}`,{statusCode:w.status,request:w.request,response:w})}}else if($.httpMethod==="HEAD")w.parsedBody=K.status>=200&&K.status<300;if(O.headersMapper)w.parsedHeaders=$.serializer.deserialize(O.headersMapper,w.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0})}return w}function gf9(A){let q=Object.keys(A.responses);return q.length===0||q.length===1&&q[0]==="default"}function Ff9(A,q,K,Y){var z,w,_,$,O;let H=200<=A.status&&A.status<300;if(gf9(q)?H:!!K)if(K){if(!K.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let J=K!==null&&K!==void 0?K:q.responses.default,M=((z=A.request.streamResponseStatusCodes)===null||z===void 0?void 0:z.has(A.status))?`Unexpected status code: ${A.status}`:A.bodyAsText,D=new QW6(M,{statusCode:A.status,request:A.request,response:A});if(!J&&!(((_=(w=A.parsedBody)===null||w===void 0?void 0:w.error)===null||_===void 0?void 0:_.code)&&((O=($=A.parsedBody)===null||$===void 0?void 0:$.error)===null||O===void 0?void 0:O.message)))throw D;let X=J===null||J===void 0?void 0:J.bodyMapper,P=J===null||J===void 0?void 0:J.headersMapper;try{if(A.parsedBody){let W=A.parsedBody,Z;if(X){let f=W;if(q.isXML&&X.type.name===_l.Sequence){f=[];let V=X.xmlElementName;if(typeof W==="object"&&V)f=W[V]}Z=q.serializer.deserialize(X,f,"error.response.parsedBody",Y)}let G=W.error||Z||W;if(D.code=G.code,G.message)D.message=G.message;if(X)D.response.parsedBody=Z}if(A.headers&&P)D.response.parsedHeaders=q.serializer.deserialize(P,A.headers.toJSON(),"operationRes.parsedHeaders")}catch(W){D.message=`Error "${W.message}" occurred in deserializing the responseBody - "${A.bodyAsText}" for the default response.`}return{error:D,shouldReturnResponse:!1}}async function Qf9(A,q,K,Y,z){var w;if(!((w=K.request.streamResponseStatusCodes)===null||w===void 0?void 0:w.has(K.status))&&K.bodyAsText){let _=K.bodyAsText,$=K.headers.get("Content-Type")||"",O=!$?[]:$.split(";").map((H)=>H.toLowerCase());try{if(O.length===0||O.some((H)=>A.indexOf(H)!==-1))return K.parsedBody=JSON.parse(_),K;else if(O.some((H)=>q.indexOf(H)!==-1)){if(!z)throw Error("Parsing XML not supported.");let H=await z(_,Y.xml);return K.parsedBody=H,K}}catch(H){let j=`Error "${H}" occurred while parsing the response body - ${K.bodyAsText}.`,J=H.code||QW6.PARSE_ERROR;throw new QW6(j,{code:J,statusCode:K.status,request:K.request,response:K})}}return K}var If9,bf9,xf9="deserializationPolicy";var qc7=k(()=>{Fg();mM1();kF6();If9=["application/json","text/json"],bf9=["application/xml","application/atom+xml"]});function Kc7(A){let q=new Set;for(let K in A.responses){let Y=A.responses[K];if(Y.bodyMapper&&Y.bodyMapper.type.name===_l.Stream)q.add(Number(K))}return q}function Qg(A){let{parameterPath:q,mapper:K}=A,Y;if(typeof q==="string")Y=q;else if(Array.isArray(q))Y=q.join(".");else Y=K.serializedName;return Y}var gM1=k(()=>{mM1()});function Yc7(A={}){let q=A.stringifyXML;return{name:Uf9,async sendRequest(K,Y){let z=$l(K),w=z===null||z===void 0?void 0:z.operationSpec,_=z===null||z===void 0?void 0:z.operationArguments;if(w&&_)pf9(K,_,w),df9(K,_,w,q);return Y(K)}}}function pf9(A,q,K){var Y,z;if(K.headerParameters)for(let _ of K.headerParameters){let $=Ce(q,_);if($!==null&&$!==void 0||_.mapper.required){$=K.serializer.serialize(_.mapper,$,Qg(_));let O=_.mapper.headerCollectionPrefix;if(O)for(let H of Object.keys($))A.headers.set(O+H,$[H]);else A.headers.set(_.mapper.serializedName||Qg(_),$)}}let w=(z=(Y=q.options)===null||Y===void 0?void 0:Y.requestOptions)===null||z===void 0?void 0:z.customHeaders;if(w)for(let _ of Object.keys(w))A.headers.set(_,w[_])}function df9(A,q,K,Y=function(){throw Error("XML serialization unsupported!")}){var z,w,_,$,O;let H=(z=q.options)===null||z===void 0?void 0:z.serializerOptions,j={xml:{rootName:(w=H===null||H===void 0?void 0:H.xml.rootName)!==null&&w!==void 0?w:"",includeRoot:(_=H===null||H===void 0?void 0:H.xml.includeRoot)!==null&&_!==void 0?_:!1,xmlCharKey:($=H===null||H===void 0?void 0:H.xml.xmlCharKey)!==null&&$!==void 0?$:BM1}},J=j.xml.xmlCharKey;if(K.requestBody&&K.requestBody.mapper){A.body=Ce(q,K.requestBody);let M=K.requestBody.mapper,{required:D,serializedName:X,xmlName:P,xmlElementName:W,xmlNamespace:Z,xmlNamespacePrefix:G,nullable:f}=M,V=M.type.name;try{if(A.body!==void 0&&A.body!==null||f&&A.body===null||D){let N=Qg(K.requestBody);A.body=K.serializer.serialize(M,A.body,N,j);let v=V===_l.Stream;if(K.isXML){let y=G?`xmlns:${G}`:"xmlns",R=cf9(Z,y,V,A.body,j);if(V===_l.Sequence)A.body=Y(lf9(R,W||P||X,y,Z),{rootName:P||X,xmlCharKey:J});else if(!v)A.body=Y(R,{rootName:P||X,xmlCharKey:J})}else if(V===_l.String&&(((O=K.contentType)===null||O===void 0?void 0:O.match("text/plain"))||K.mediaType==="text"))return;else if(!v)A.body=JSON.stringify(A.body)}}catch(N){throw Error(`Error "${N.message}" occurred in serializing the payload - ${JSON.stringify(X,void 0," ")}.`)}}else if(K.formDataParameters&&K.formDataParameters.length>0){A.formData={};for(let M of K.formDataParameters){let D=Ce(q,M);if(D!==void 0&&D!==null){let X=M.mapper.serializedName||Qg(M);A.formData[X]=K.serializer.serialize(M.mapper,D,Qg(M),j)}}}}function cf9(A,q,K,Y,z){if(A&&!["Composite","Sequence","Dictionary"].includes(K)){let w={};return w[z.xml.xmlCharKey]=Y,w[o08]={[q]:A},w}return Y}function lf9(A,q,K,Y){if(!Array.isArray(A))A=[A];if(!K||!Y)return{[q]:A};let z={[q]:A};return z[o08]={[K]:Y},z}var Uf9="serializationPolicy";var zc7=k(()=>{kF6();mM1();gM1()});function wc7(A={}){let q=i08(A!==null&&A!==void 0?A:{});if(A.credentialOptions)q.addPolicy(vF6({credential:A.credentialOptions.credential,scopes:A.credentialOptions.credentialScopes}));return q.addPolicy(Yc7(A.serializationOptions),{phase:"Serialize"}),q.addPolicy(Ac7(A.deserializationOptions),{phase:"Deserialize"}),q}var _c7=k(()=>{qc7();Fg();zc7()});function $c7(){if(!t08)t08=n08();return t08}var t08;var Oc7=k(()=>{Fg()});function jc7(A,q,K,Y){let z=nf9(q,K,Y),w=!1,_=Hc7(A,z);if(q.path){let H=Hc7(q.path,z);if(q.path==="/{nextLink}"&&H.startsWith("/"))H=H.substring(1);if(rf9(H))_=H,w=!0;else _=of9(_,H)}let{queryParams:$,sequenceParams:O}=af9(q,K,Y);return _=tf9(_,$,O,w),_}function Hc7(A,q){let K=A;for(let[Y,z]of q)K=K.split(Y).join(z);return K}function nf9(A,q,K){var Y;let z=new Map;if((Y=A.urlParameters)===null||Y===void 0?void 0:Y.length)for(let w of A.urlParameters){let _=Ce(q,w,K),$=Qg(w);if(_=A.serializer.serialize(w.mapper,_,$),!w.skipEncoding)_=encodeURIComponent(_);z.set(`{${w.mapper.serializedName||$}}`,_)}return z}function rf9(A){return A.includes("://")}function of9(A,q){if(!q)return A;let K=new URL(A),Y=K.pathname;if(!Y.endsWith("/"))Y=`${Y}/`;if(q.startsWith("/"))q=q.substring(1);let z=q.indexOf("?");if(z!==-1){let w=q.substring(0,z),_=q.substring(z+1);if(Y=Y+w,_)K.search=K.search?`${K.search}&${_}`:_}else Y=Y+q;return K.pathname=Y,K.toString()}function af9(A,q,K){var Y;let z=new Map,w=new Set;if((Y=A.queryParameters)===null||Y===void 0?void 0:Y.length)for(let _ of A.queryParameters){if(_.mapper.type.name==="Sequence"&&_.mapper.serializedName)w.add(_.mapper.serializedName);let $=Ce(q,_,K);if($!==void 0&&$!==null||_.mapper.required){$=A.serializer.serialize(_.mapper,$,Qg(_));let O=_.collectionFormat?if9[_.collectionFormat]:"";if(Array.isArray($))$=$.map((H)=>{if(H===null||H===void 0)return"";return H});if(_.collectionFormat==="Multi"&&$.length===0)continue;else if(Array.isArray($)&&(_.collectionFormat==="SSV"||_.collectionFormat==="TSV"))$=$.join(O);if(!_.skipEncoding)if(Array.isArray($))$=$.map((H)=>{return encodeURIComponent(H)});else $=encodeURIComponent($);if(Array.isArray($)&&(_.collectionFormat==="CSV"||_.collectionFormat==="Pipes"))$=$.join(O);z.set(_.mapper.serializedName||Qg(_),$)}}return{queryParams:z,sequenceParams:w}}function sf9(A){let q=new Map;if(!A||A[0]!=="?")return q;A=A.slice(1);let K=A.split("&");for(let Y of K){let[z,w]=Y.split("=",2),_=q.get(z);if(_)if(Array.isArray(_))_.push(w);else q.set(z,[_,w]);else q.set(z,w)}return q}function tf9(A,q,K,Y=!1){if(q.size===0)return A;let z=new URL(A),w=sf9(z.search);for(let[$,O]of q){let H=w.get($);if(Array.isArray(H))if(Array.isArray(O)){H.push(...O);let j=new Set(H);w.set($,Array.from(j))}else H.push(O);else if(H){if(Array.isArray(O))O.unshift(H);else if(K.has($))w.set($,[H,O]);if(!Y)w.set($,O)}else w.set($,O)}let _=[];for(let[$,O]of w)if(typeof O==="string")_.push(`${$}=${O}`);else if(Array.isArray(O))for(let H of O)_.push(`${$}=${H}`);else _.push(`${$}=${O}`);return z.search=_.length?`?${_.join("&")}`:"",z.toString()}var if9;var Jc7=k(()=>{kF6();gM1();if9={CSV:",",SSV:" ",Multi:"Multi",TSV:"\t",Pipes:"|"}});var Mc7;var Dc7=k(()=>{A96();Mc7=ye("core-client")});class FM1{constructor(A={}){var q,K;if(this._requestContentType=A.requestContentType,this._endpoint=(q=A.endpoint)!==null&&q!==void 0?q:A.baseUri,A.baseUri)Mc7.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead.");if(this._allowInsecureConnection=A.allowInsecureConnection,this._httpClient=A.httpClient||$c7(),this.pipeline=A.pipeline||ef9(A),(K=A.additionalPolicies)===null||K===void 0?void 0:K.length)for(let{policy:Y,position:z}of A.additionalPolicies){let w=z==="perRetry"?"Sign":void 0;this.pipeline.addPolicy(Y,{afterPhase:w})}}async sendRequest(A){return this.pipeline.sendRequest(this._httpClient,A)}async sendOperationRequest(A,q){let K=q.baseUrl||this._endpoint;if(!K)throw Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");let Y=jc7(K,q,A,this),z=bE({url:Y});z.method=q.httpMethod;let w=$l(z);w.operationSpec=q,w.operationArguments=A;let _=q.contentType||this._requestContentType;if(_&&q.requestBody)z.headers.set("Content-Type",_);let $=A.options;if($){let O=$.requestOptions;if(O){if(O.timeout)z.timeout=O.timeout;if(O.onUploadProgress)z.onUploadProgress=O.onUploadProgress;if(O.onDownloadProgress)z.onDownloadProgress=O.onDownloadProgress;if(O.shouldDeserialize!==void 0)w.shouldDeserialize=O.shouldDeserialize;if(O.allowInsecureConnection)z.allowInsecureConnection=!0}if($.abortSignal)z.abortSignal=$.abortSignal;if($.tracingOptions)z.tracingOptions=$.tracingOptions}if(this._allowInsecureConnection)z.allowInsecureConnection=!0;if(z.streamResponseStatusCodes===void 0)z.streamResponseStatusCodes=Kc7(q);try{let O=await this.sendRequest(z),H=a08(O,q.responses[O.status]);if($===null||$===void 0?void 0:$.onResponse)$.onResponse(O,H);return H}catch(O){if(typeof O==="object"&&(O===null||O===void 0?void 0:O.response)){let H=O.response,j=a08(H,q.responses[O.statusCode]||q.responses.default);if(O.details=j,$===null||$===void 0?void 0:$.onResponse)$.onResponse(H,j,O)}throw O}}}function ef9(A){let q=AT9(A),K=A.credential&&q?{credentialScopes:q,credential:A.credential}:void 0;return wc7(Object.assign(Object.assign({},A),{credentialOptions:K}))}function AT9(A){if(A.credentialScopes)return A.credentialScopes;if(A.endpoint)return`${A.endpoint}/.default`;if(A.baseUri)return`${A.baseUri}/.default`;if(A.credential&&!A.credentialScopes)throw Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy");return}var Xc7=k(()=>{Fg();_c7();id7();Oc7();kF6();Jc7();gM1();Dc7()});var Pc7=k(()=>{Xc7()});function Wc7(A){if(A==="adfs")return"oauth2/token";else return"oauth2/v2.0/token"}var $z;var l0=k(()=>{ug();l08();$z=VF6({namespace:"Microsoft.AAD",packageName:"@azure/identity",packageVersion:HM1})});function EF6(A){let q="";if(Array.isArray(A)){if(A.length!==1)return;q=A[0]}else if(typeof A==="string")q=A;if(!q.endsWith("/.default"))return q;return q.substr(0,q.lastIndexOf("/.default"))}function Gc7(A){if(typeof A.expires_on==="number")return A.expires_on*1000;if(typeof A.expires_on==="string"){let q=+A.expires_on;if(!isNaN(q))return q*1000;let K=Date.parse(A.expires_on);if(!isNaN(K))return K}if(typeof A.expires_in==="number")return Date.now()+A.expires_in*1000;throw Error(`Failed to parse token expiration from body. expires_in="${A.expires_in}", expires_on="${A.expires_on}"`)}function fc7(A){if(A.refresh_on){if(typeof A.refresh_on==="number")return A.refresh_on*1000;if(typeof A.refresh_on==="string"){let q=+A.refresh_on;if(!isNaN(q))return q*1000;let K=Date.parse(A.refresh_on);if(!isNaN(K))return K}throw Error(`Failed to parse refresh_on from body. refresh_on="${A.refresh_on}"`)}else return}var Zc7="Specifying a `clientId` or `resourceId` is not supported by the Service Fabric managed identity environment. The managed identity configuration is determined by the Service Fabric cluster resource configuration. See https://aka.ms/servicefabricmi for more information";function qT9(A){let q=A===null||A===void 0?void 0:A.authorityHost;if(hM1)q=q!==null&&q!==void 0?q:process.env.AZURE_AUTHORITY_HOST;return q!==null&&q!==void 0?q:_F6}var LF6="noCorrelationId",Ug;var yF6=k(()=>{Pc7();Se();Fg();lD();ug();l0();l2();Ug=class Ug extends FM1{constructor(A){var q,K;let Y=`azsdk-js-identity/${HM1}`,z=((q=A===null||A===void 0?void 0:A.userAgentOptions)===null||q===void 0?void 0:q.userAgentPrefix)?`${A.userAgentOptions.userAgentPrefix} ${Y}`:`${Y}`,w=qT9(A);if(!w.startsWith("https:"))throw Error("The authorityHost address must use the 'https' protocol.");super(Object.assign(Object.assign({requestContentType:"application/json; charset=utf-8",retryOptions:{maxRetries:3}},A),{userAgentOptions:{userAgentPrefix:z},baseUri:w}));if(this.allowInsecureConnection=!1,this.authorityHost=w,this.abortControllers=new Map,this.allowLoggingAccountIdentifiers=(K=A===null||A===void 0?void 0:A.loggingOptions)===null||K===void 0?void 0:K.allowLoggingAccountIdentifiers,this.tokenCredentialOptions=Object.assign({},A),A===null||A===void 0?void 0:A.allowInsecureConnection)this.allowInsecureConnection=A.allowInsecureConnection}async sendTokenRequest(A){SN.info(`IdentityClient: sending token request to [${A.url}]`);let q=await this.sendRequest(A);if(q.bodyAsText&&(q.status===200||q.status===201)){let K=JSON.parse(q.bodyAsText);if(!K.access_token)return null;this.logIdentifiers(q);let Y={accessToken:{token:K.access_token,expiresOnTimestamp:Gc7(K),refreshAfterTimestamp:fc7(K),tokenType:"Bearer"},refreshToken:K.refresh_token};return SN.info(`IdentityClient: [${A.url}] token acquired, expires on ${Y.accessToken.expiresOnTimestamp}`),Y}else{let K=new Cb(q.status,q.bodyAsText);throw SN.warning(`IdentityClient: authentication error. HTTP status: ${q.status}, ${K.errorResponse.errorDescription}`),K}}async refreshAccessToken(A,q,K,Y,z,w={}){if(Y===void 0)return null;SN.info(`IdentityClient: refreshing access token with client ID: ${q}, scopes: ${K} started`);let _={grant_type:"refresh_token",client_id:q,refresh_token:Y,scope:K};if(z!==void 0)_.client_secret=z;let $=new URLSearchParams(_);return $z.withSpan("IdentityClient.refreshAccessToken",w,async(O)=>{try{let H=Wc7(A),j=bE({url:`${this.authorityHost}/${A}/${H}`,method:"POST",body:$.toString(),abortSignal:w.abortSignal,headers:wl({Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"}),tracingOptions:O.tracingOptions}),J=await this.sendTokenRequest(j);return SN.info(`IdentityClient: refreshed token for client ID: ${q}`),J}catch(H){if(H.name===$F6&&H.errorResponse.error==="interaction_required")return SN.info(`IdentityClient: interaction required for client ID: ${q}`),null;else throw SN.warning(`IdentityClient: failed refreshing token for client ID: ${q}: ${H}`),H}})}generateAbortSignal(A){let q=new AbortController,K=this.abortControllers.get(A)||[];K.push(q),this.abortControllers.set(A,K);let Y=q.signal.onabort;return q.signal.onabort=(...z)=>{if(this.abortControllers.set(A,void 0),Y)Y.apply(q.signal,z)},q.signal}abortRequests(A){let q=A||LF6,K=[...this.abortControllers.get(q)||[],...this.abortControllers.get(LF6)||[]];if(!K.length)return;for(let Y of K)Y.abort();this.abortControllers.set(q,void 0)}getCorrelationId(A){var q;let K=(q=A===null||A===void 0?void 0:A.body)===null||q===void 0?void 0:q.split("&").map((Y)=>Y.split("=")).find(([Y])=>Y==="client-request-id");return K&&K.length?K[1]||LF6:LF6}async sendGetRequestAsync(A,q){let K=bE({url:A,method:"GET",body:q===null||q===void 0?void 0:q.body,allowInsecureConnection:this.allowInsecureConnection,headers:wl(q===null||q===void 0?void 0:q.headers),abortSignal:this.generateAbortSignal(LF6)}),Y=await this.sendRequest(K);return this.logIdentifiers(Y),{body:Y.bodyAsText?JSON.parse(Y.bodyAsText):void 0,headers:Y.headers.toJSON(),status:Y.status}}async sendPostRequestAsync(A,q){let K=bE({url:A,method:"POST",body:q===null||q===void 0?void 0:q.body,headers:wl(q===null||q===void 0?void 0:q.headers),allowInsecureConnection:this.allowInsecureConnection,abortSignal:this.generateAbortSignal(this.getCorrelationId(q))}),Y=await this.sendRequest(K);return this.logIdentifiers(Y),{body:Y.bodyAsText?JSON.parse(Y.bodyAsText):void 0,headers:Y.headers.toJSON(),status:Y.status}}getTokenCredentialOptions(){return this.tokenCredentialOptions}logIdentifiers(A){if(!this.allowLoggingAccountIdentifiers||!A.bodyAsText)return;let q="No User Principal Name available";try{let Y=(A.parsedBody||JSON.parse(A.bodyAsText)).access_token;if(!Y)return;let z=Y.split(".")[1],{appid:w,upn:_,tid:$,oid:O}=JSON.parse(Buffer.from(z,"base64").toString("utf8"));SN.info(`[Authenticated account] Client ID: ${w}. Tenant ID: ${$}. User Principal Name: ${_||q}. Object ID (user): ${O}`)}catch(K){SN.warning("allowLoggingAccountIdentifiers was set, but we couldn't log the account information. Error:",K.message)}}}});import KT9 from"node:fs";import YT9 from"node:os";import zT9 from"node:path";function Tc7(A){let q=$T9[A];if(q)throw new y4(q)}function Vc7(A){let q=["User","settings.json"],K="Code",Y=YT9.homedir();function z(...w){let _=zT9.join(...w,"Code",...q);return JSON.parse(KT9.readFileSync(_,{encoding:"utf8"}))[A]}try{let w;switch(process.platform){case"win32":return w=process.env.APPDATA,w?z(w):void 0;case"darwin":return z(Y,"Library","Application Support");case"linux":return z(Y,".config");default:return}}catch(w){Y96.info(`Failed to load the Visual Studio Code configuration file. Error: ${w.message}`);return}}class AW8{constructor(A){this.cloudName=Vc7("azure.cloud")||"AzureCloud";let q=OT9[this.cloudName];if(this.identityClient=new Ug(Object.assign({authorityHost:q},A)),A&&A.tenantId)pM(Y96,A.tenantId),this.tenantId=A.tenantId;else this.tenantId=wT9;this.additionallyAllowedTenantIds=eO(A===null||A===void 0?void 0:A.additionallyAllowedTenants),Tc7(this.tenantId)}async prepare(){let A=Vc7("azure.tenant");if(A)this.tenantId=A;Tc7(this.tenantId)}prepareOnce(){if(!this.preparePromise)this.preparePromise=this.prepare();return this.preparePromise}async getToken(A,q){var K,Y;await this.prepareOnce();let z=YO(this.tenantId,q,this.additionallyAllowedTenantIds,Y96)||this.tenantId;if(e08===void 0)throw new y4(["No implementation of `VisualStudioCodeCredential` is available.","You must install the identity-vscode plugin package (`npm install --save-dev @azure/identity-vscode`)","and enable it by importing `useIdentityPlugin` from `@azure/identity` and calling","`useIdentityPlugin(vsCodePlugin)` before creating a `VisualStudioCodeCredential`.","To troubleshoot, visit https://aka.ms/azsdk/js/identity/vscodecredential/troubleshoot."].join(" "));let w=typeof A==="string"?A:A.join(" ");if(!w.match(/^[0-9a-zA-Z-.:/]+$/)){let O=Error("Invalid scope was specified by the user or calling client");throw Y96.getToken.info(NY(A,O)),O}if(w.indexOf("offline_access")<0)w+=" offline_access";let _=await e08(),{password:$}=(Y=(K=_.find(({account:O})=>O===this.cloudName))!==null&&K!==void 0?K:_[0])!==null&&Y!==void 0?Y:{};if($){let O=await this.identityClient.refreshAccessToken(z,_T9,w,$,void 0);if(O)return Y96.getToken.info(UM(A)),O.accessToken;else{let H=new y4("Could not retrieve the token associated with Visual Studio Code. Have you connected using the 'Azure Account' extension recently? To troubleshoot, visit https://aka.ms/azsdk/js/identity/vscodecredential/troubleshoot.");throw Y96.getToken.info(NY(A,H)),H}}else{let O=new y4("Could not retrieve the token associated with Visual Studio Code. Did you connect using the 'Azure Account' extension? To troubleshoot, visit https://aka.ms/azsdk/js/identity/vscodecredential/troubleshoot.");throw Y96.getToken.info(NY(A,O)),O}}}var wT9="common",_T9="aebc6443-996d-45c2-90f0-388ff96faa56",Y96,e08=void 0,Nc7,$T9,OT9;var qW8=k(()=>{l2();iD();ug();lD();yF6();iD();Y96=w5("VisualStudioCodeCredential"),Nc7={setVsCodeCredentialFinder(A){e08=A}},$T9={adfs:"The VisualStudioCodeCredential does not support authentication with ADFS tenants."};OT9={AzureCloud:xg.AzurePublicCloud,AzureChina:xg.AzureChina,AzureGermanCloud:xg.AzureGermany,AzureUSGovernment:xg.AzureGovernment}});function jT9(A){A(HT9)}var HT9;var vc7=k(()=>{iP8();qW8();HT9={cachePluginControl:kU7,nativeBrokerPluginControl:EU7,vsCodeCredentialControl:Nc7}});class z96{static serializeJSONBlob(A){return JSON.stringify(A)}static serializeAccounts(A){let q={};return Object.keys(A).map(function(K){let Y=A[K];q[K]={home_account_id:Y.homeAccountId,environment:Y.environment,realm:Y.realm,local_account_id:Y.localAccountId,username:Y.username,authority_type:Y.authorityType,name:Y.name,client_info:Y.clientInfo,last_modification_time:Y.lastModificationTime,last_modification_app:Y.lastModificationApp,tenantProfiles:Y.tenantProfiles?.map((z)=>{return JSON.stringify(z)})}}),q}static serializeIdTokens(A){let q={};return Object.keys(A).map(function(K){let Y=A[K];q[K]={home_account_id:Y.homeAccountId,environment:Y.environment,credential_type:Y.credentialType,client_id:Y.clientId,secret:Y.secret,realm:Y.realm}}),q}static serializeAccessTokens(A){let q={};return Object.keys(A).map(function(K){let Y=A[K];q[K]={home_account_id:Y.homeAccountId,environment:Y.environment,credential_type:Y.credentialType,client_id:Y.clientId,secret:Y.secret,realm:Y.realm,target:Y.target,cached_at:Y.cachedAt,expires_on:Y.expiresOn,extended_expires_on:Y.extendedExpiresOn,refresh_on:Y.refreshOn,key_id:Y.keyId,token_type:Y.tokenType,requestedClaims:Y.requestedClaims,requestedClaimsHash:Y.requestedClaimsHash,userAssertionHash:Y.userAssertionHash}}),q}static serializeRefreshTokens(A){let q={};return Object.keys(A).map(function(K){let Y=A[K];q[K]={home_account_id:Y.homeAccountId,environment:Y.environment,credential_type:Y.credentialType,client_id:Y.clientId,secret:Y.secret,family_id:Y.familyId,target:Y.target,realm:Y.realm}}),q}static serializeAppMetadata(A){let q={};return Object.keys(A).map(function(K){let Y=A[K];q[K]={client_id:Y.clientId,environment:Y.environment,family_id:Y.familyId}}),q}static serializeAllCache(A){return{Account:this.serializeAccounts(A.accounts),IdToken:this.serializeIdTokens(A.idTokens),AccessToken:this.serializeAccessTokens(A.accessTokens),RefreshToken:this.serializeRefreshTokens(A.refreshTokens),AppMetadata:this.serializeAppMetadata(A.appMetadata)}}}var QM1=k(()=>{/*! @azure/msal-node v3.8.1 2025-10-29 */});var n8,d3,qG,KW8,X$,hN,w96,he,UM1,UW6,pg,IN,_96,Ol,iw,RF6="appmetadata",kc7="client_info",Ie="1",pW6,YT,nD,AY,dg,SF6,CF6,$96,pM1,N_,dW6=300,i0;var P$=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */n8={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2000,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},d3={SUCCESS:200,SUCCESS_RANGE_START:200,SUCCESS_RANGE_END:299,REDIRECT:302,CLIENT_ERROR:400,CLIENT_ERROR_RANGE_START:400,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,REQUEST_TIMEOUT:408,GONE:410,TOO_MANY_REQUESTS:429,CLIENT_ERROR_RANGE_END:499,SERVER_ERROR:500,SERVER_ERROR_RANGE_START:500,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,SERVER_ERROR_RANGE_END:599,MULTI_SIDED_ERROR:600},qG=[n8.OPENID_SCOPE,n8.PROFILE_SCOPE,n8.OFFLINE_ACCESS_SCOPE],KW8=[...qG,n8.EMAIL_SCOPE],X$={CONTENT_TYPE:"Content-Type",CONTENT_LENGTH:"Content-Length",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"},hN={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},w96={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},he={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},UM1={PLAIN:"plain",S256:"S256"},UW6={CODE:"code",IDTOKEN_TOKEN:"id_token token",IDTOKEN_TOKEN_REFRESHTOKEN:"id_token token refresh_token"},pg={QUERY:"query",FRAGMENT:"fragment",FORM_POST:"form_post"},IN={IMPLICIT_GRANT:"implicit",AUTHORIZATION_CODE_GRANT:"authorization_code",CLIENT_CREDENTIALS_GRANT:"client_credentials",RESOURCE_OWNER_PASSWORD_GRANT:"password",REFRESH_TOKEN_GRANT:"refresh_token",DEVICE_CODE_GRANT:"device_code",JWT_BEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer"},_96={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},Ol={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},iw={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},pW6={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:86400},YT={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},nD={SCHEMA_VERSION:5,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},AY={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},dg={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},SF6={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},CF6={username:"username",password:"password"},$96={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},pM1={CONFIGURED_NO_AUTO_DETECTION:"2",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},N_={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},i0={BASE64:"base64",HEX:"hex",UTF8:"utf-8"}});var cW6={};m1(cW6,{unexpectedError:()=>hF6,postRequestFailed:()=>IF6});var hF6="unexpected_error",IF6="post_request_failed";var YW8=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});function wW8(A,q){return new c3(A,q?`${dM1[A]} ${q}`:dM1[A])}var dM1,zW8,c3;var jS=k(()=>{P$();YW8();/*! @azure/msal-common v15.13.1 2025-10-29 */dM1={[hF6]:"Unexpected error in authentication.",[IF6]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."},zW8={unexpectedError:{code:hF6,desc:dM1[hF6]},postRequestFailed:{code:IF6,desc:dM1[IF6]}};c3=class c3 extends Error{constructor(A,q,K){let Y=q?`${A}: ${q}`:A;super(Y);Object.setPrototypeOf(this,c3.prototype),this.errorCode=A||n8.EMPTY_STRING,this.errorMessage=q||n8.EMPTY_STRING,this.subError=K||n8.EMPTY_STRING,this.name="AuthError"}setCorrelationId(A){this.correlationId=A}}});var i2={};m1(i2,{userTimeoutReached:()=>pF6,userCanceled:()=>lF6,unexpectedCredentialType:()=>FF6,tokenRefreshRequired:()=>Ml,tokenParsingError:()=>xe,tokenClaimsCnfRequiredForSignedJwt:()=>V96,stateNotFound:()=>ue,stateMismatch:()=>D96,requestCannotBeMade:()=>Z96,openIdConfigError:()=>J96,nullOrEmptyToken:()=>H96,nonceMismatch:()=>X96,noNetworkConnectivity:()=>cF6,noCryptoObject:()=>me,noAccountInSilentRequest:()=>jl,noAccountFound:()=>gF6,networkError:()=>j96,nestedAppAuthBridgeDisabled:()=>nF6,multipleMatchingTokens:()=>bF6,multipleMatchingAppMetadata:()=>W96,multipleMatchingAccounts:()=>xF6,missingTenantIdError:()=>iF6,methodNotImplemented:()=>c5,maxAgeTranspired:()=>P96,keyIdMissing:()=>k96,invalidState:()=>xb,invalidClientCredential:()=>UF6,invalidCacheRecord:()=>T96,invalidCacheEnvironment:()=>Jl,invalidAssertion:()=>QF6,hashNotDeserialized:()=>M96,endpointResolutionError:()=>zT,endSessionEndpointNotSupported:()=>v96,emptyInputScopeSet:()=>Be,deviceCodeUnknownError:()=>mF6,deviceCodePollingCancelled:()=>uF6,deviceCodeExpired:()=>BF6,clientInfoEmptyError:()=>O96,clientInfoDecodingError:()=>be,cannotRemoveEmptyScope:()=>G96,cannotAppendScopeSet:()=>f96,bindingKeyNotRemoved:()=>dF6,authorizationCodeMissingFromServerResponse:()=>N96,authTimeNotFound:()=>Hl});var be="client_info_decoding_error",O96="client_info_empty_error",xe="token_parsing_error",H96="null_or_empty_token",zT="endpoints_resolution_error",j96="network_error",J96="openid_config_error",M96="hash_not_deserialized",xb="invalid_state",D96="state_mismatch",ue="state_not_found",X96="nonce_mismatch",Hl="auth_time_not_found",P96="max_age_transpired",bF6="multiple_matching_tokens",xF6="multiple_matching_accounts",W96="multiple_matching_appMetadata",Z96="request_cannot_be_made",G96="cannot_remove_empty_scope",f96="cannot_append_scopeset",Be="empty_input_scopeset",uF6="device_code_polling_cancelled",BF6="device_code_expired",mF6="device_code_unknown_error",jl="no_account_in_silent_request",T96="invalid_cache_record",Jl="invalid_cache_environment",gF6="no_account_found",me="no_crypto_object",FF6="unexpected_credential_type",QF6="invalid_assertion",UF6="invalid_client_credential",Ml="token_refresh_required",pF6="user_timeout_reached",V96="token_claims_cnf_required_for_signedjwt",N96="authorization_code_missing_from_server_response",dF6="binding_key_not_removed",v96="end_session_endpoint_not_supported",k96="key_id_missing",cF6="no_network_connectivity",lF6="user_canceled",iF6="missing_tenant_id_error",c5="method_not_implemented",nF6="nested_app_auth_bridge_disabled";var RJ=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});function JA(A,q){return new ge(A,q)}var l3,_W8,ge;var dM=k(()=>{jS();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */l3={[be]:"The client info could not be parsed/decoded correctly",[O96]:"The client info was empty",[xe]:"Token cannot be parsed",[H96]:"The token is null or empty",[zT]:"Endpoints cannot be resolved",[j96]:"Network request failed",[J96]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[M96]:"The hash parameters could not be deserialized",[xb]:"State was not the expected format",[D96]:"State mismatch error",[ue]:"State not found",[X96]:"Nonce mismatch error",[Hl]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[P96]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[bF6]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[xF6]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[W96]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[Z96]:"Token request cannot be made without authorization code or refresh token.",[G96]:"Cannot remove null or empty scope from ScopeSet",[f96]:"Cannot append ScopeSet",[Be]:"Empty input ScopeSet cannot be processed",[uF6]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[BF6]:"Device code is expired.",[mF6]:"Device code stopped polling for unknown reasons.",[jl]:"Please pass an account object, silent flow is not supported without account information",[T96]:"Cache record object was null or undefined.",[Jl]:"Invalid environment when attempting to create cache entry",[gF6]:"No account found in cache for given key.",[me]:"No crypto object detected.",[FF6]:"Unexpected credential type.",[QF6]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[UF6]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[Ml]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[pF6]:"User defined timeout for device code polling reached",[V96]:"Cannot generate a POP jwt if the token_claims are not populated",[N96]:"Server response does not contain an authorization code to proceed",[dF6]:"Could not remove the credential's binding key from storage.",[v96]:"The provided authority does not support logout",[k96]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[cF6]:"No network connectivity. Check your internet connection.",[lF6]:"User cancelled the flow.",[iF6]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[c5]:"This method has not been implemented",[nF6]:"The nested app auth bridge is disabled"},_W8={clientInfoDecodingError:{code:be,desc:l3[be]},clientInfoEmptyError:{code:O96,desc:l3[O96]},tokenParsingError:{code:xe,desc:l3[xe]},nullOrEmptyToken:{code:H96,desc:l3[H96]},endpointResolutionError:{code:zT,desc:l3[zT]},networkError:{code:j96,desc:l3[j96]},unableToGetOpenidConfigError:{code:J96,desc:l3[J96]},hashNotDeserialized:{code:M96,desc:l3[M96]},invalidStateError:{code:xb,desc:l3[xb]},stateMismatchError:{code:D96,desc:l3[D96]},stateNotFoundError:{code:ue,desc:l3[ue]},nonceMismatchError:{code:X96,desc:l3[X96]},authTimeNotFoundError:{code:Hl,desc:l3[Hl]},maxAgeTranspired:{code:P96,desc:l3[P96]},multipleMatchingTokens:{code:bF6,desc:l3[bF6]},multipleMatchingAccounts:{code:xF6,desc:l3[xF6]},multipleMatchingAppMetadata:{code:W96,desc:l3[W96]},tokenRequestCannotBeMade:{code:Z96,desc:l3[Z96]},removeEmptyScopeError:{code:G96,desc:l3[G96]},appendScopeSetError:{code:f96,desc:l3[f96]},emptyInputScopeSetError:{code:Be,desc:l3[Be]},DeviceCodePollingCancelled:{code:uF6,desc:l3[uF6]},DeviceCodeExpired:{code:BF6,desc:l3[BF6]},DeviceCodeUnknownError:{code:mF6,desc:l3[mF6]},NoAccountInSilentRequest:{code:jl,desc:l3[jl]},invalidCacheRecord:{code:T96,desc:l3[T96]},invalidCacheEnvironment:{code:Jl,desc:l3[Jl]},noAccountFound:{code:gF6,desc:l3[gF6]},noCryptoObj:{code:me,desc:l3[me]},unexpectedCredentialType:{code:FF6,desc:l3[FF6]},invalidAssertion:{code:QF6,desc:l3[QF6]},invalidClientCredential:{code:UF6,desc:l3[UF6]},tokenRefreshRequired:{code:Ml,desc:l3[Ml]},userTimeoutReached:{code:pF6,desc:l3[pF6]},tokenClaimsRequired:{code:V96,desc:l3[V96]},noAuthorizationCodeFromServer:{code:N96,desc:l3[N96]},bindingKeyNotRemovedError:{code:dF6,desc:l3[dF6]},logoutNotSupported:{code:v96,desc:l3[v96]},keyIdMissing:{code:k96,desc:l3[k96]},noNetworkConnectivity:{code:cF6,desc:l3[cF6]},userCanceledError:{code:lF6,desc:l3[lF6]},missingTenantIdError:{code:iF6,desc:l3[iF6]},nestedAppAuthBridgeDisabled:{code:nF6,desc:l3[nF6]}};ge=class ge extends c3{constructor(A,q){super(A,q?`${l3[A]}: ${q}`:l3[A]);this.name="ClientAuthError",Object.setPrototypeOf(this,ge.prototype)}}});var lW6;var $W8=k(()=>{dM();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */lW6={createNewGuid:()=>{throw JA(c5)},base64Decode:()=>{throw JA(c5)},base64Encode:()=>{throw JA(c5)},base64UrlEncode:()=>{throw JA(c5)},encodeKid:()=>{throw JA(c5)},async getPublicKeyThumbprint(){throw JA(c5)},async removeTokenBindingKey(){throw JA(c5)},async clearKeystore(){throw JA(c5)},async signJwt(){throw JA(c5)},async hashString(){throw JA(c5)}}});class bN{constructor(A,q,K){this.level=pH.Info;let Y=()=>{return},z=A||bN.createDefaultLoggerOptions();this.localCallback=z.loggerCallback||Y,this.piiLoggingEnabled=z.piiLoggingEnabled||!1,this.level=typeof z.logLevel==="number"?z.logLevel:pH.Info,this.correlationId=z.correlationId||n8.EMPTY_STRING,this.packageName=q||n8.EMPTY_STRING,this.packageVersion=K||n8.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:pH.Info}}clone(A,q,K){return new bN({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:K||this.correlationId},A,q)}logMessage(A,q){if(q.logLevel>this.level||!this.piiLoggingEnabled&&q.containsPii)return;let z=`${`[${new Date().toUTCString()}] : [${q.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${pH[q.logLevel]} - ${A}`;this.executeCallback(q.logLevel,z,q.containsPii||!1)}executeCallback(A,q,K){if(this.localCallback)this.localCallback(A,q,K)}error(A,q){this.logMessage(A,{logLevel:pH.Error,containsPii:!1,correlationId:q||n8.EMPTY_STRING})}errorPii(A,q){this.logMessage(A,{logLevel:pH.Error,containsPii:!0,correlationId:q||n8.EMPTY_STRING})}warning(A,q){this.logMessage(A,{logLevel:pH.Warning,containsPii:!1,correlationId:q||n8.EMPTY_STRING})}warningPii(A,q){this.logMessage(A,{logLevel:pH.Warning,containsPii:!0,correlationId:q||n8.EMPTY_STRING})}info(A,q){this.logMessage(A,{logLevel:pH.Info,containsPii:!1,correlationId:q||n8.EMPTY_STRING})}infoPii(A,q){this.logMessage(A,{logLevel:pH.Info,containsPii:!0,correlationId:q||n8.EMPTY_STRING})}verbose(A,q){this.logMessage(A,{logLevel:pH.Verbose,containsPii:!1,correlationId:q||n8.EMPTY_STRING})}verbosePii(A,q){this.logMessage(A,{logLevel:pH.Verbose,containsPii:!0,correlationId:q||n8.EMPTY_STRING})}trace(A,q){this.logMessage(A,{logLevel:pH.Trace,containsPii:!1,correlationId:q||n8.EMPTY_STRING})}tracePii(A,q){this.logMessage(A,{logLevel:pH.Trace,containsPii:!0,correlationId:q||n8.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}var pH;var cM1=k(()=>{P$();/*! @azure/msal-common v15.13.1 2025-10-29 */(function(A){A[A.Error=0]="Error",A[A.Warning=1]="Warning",A[A.Info=2]="Info",A[A.Verbose=3]="Verbose",A[A.Trace=4]="Trace"})(pH||(pH={}))});var lM1="@azure/msal-common",iW6="15.13.1";var iM1=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});var Dl;var nM1=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */Dl={None:"none",AzurePublic:"https://login.microsoftonline.com",AzurePpe:"https://login.windows-ppe.net",AzureChina:"https://login.chinacloudapi.cn",AzureGermany:"https://login.microsoftonline.de",AzureUsGovernment:"https://login.microsoftonline.us"}});var nW6={};m1(nW6,{urlParseError:()=>cg,urlEmptyError:()=>y96,untrustedAuthority:()=>b96,tokenRequestEmpty:()=>S96,redirectUriEmpty:()=>E96,pkceParamsMissing:()=>h96,missingSshKid:()=>aF6,missingSshJwk:()=>Xl,missingNonceAuthenticationHeader:()=>sF6,logoutRequestEmpty:()=>C96,invalidRequestMethodForEAR:()=>KQ6,invalidCodeChallengeMethod:()=>oF6,invalidCloudDiscoveryMetadata:()=>Qe,invalidClaims:()=>Fe,invalidAuthorizePostBodyParameters:()=>YQ6,invalidAuthorityMetadata:()=>I96,invalidAuthenticationHeader:()=>tF6,emptyInputScopesError:()=>R96,claimsRequestParsingError:()=>rF6,cannotSetOIDCOptions:()=>eF6,cannotAllowPlatformBroker:()=>AQ6,authorityUriInsecure:()=>L96,authorityMismatch:()=>qQ6});var E96="redirect_uri_empty",rF6="claims_request_parsing_error",L96="authority_uri_insecure",cg="url_parse_error",y96="empty_url_error",R96="empty_input_scopes_error",Fe="invalid_claims",S96="token_request_empty",C96="logout_request_empty",oF6="invalid_code_challenge_method",h96="pkce_params_missing",Qe="invalid_cloud_discovery_metadata",I96="invalid_authority_metadata",b96="untrusted_authority",Xl="missing_ssh_jwk",aF6="missing_ssh_kid",sF6="missing_nonce_authentication_header",tF6="invalid_authentication_header",eF6="cannot_set_OIDCOptions",AQ6="cannot_allow_platform_broker",qQ6="authority_mismatch",KQ6="invalid_request_method_for_EAR",YQ6="invalid_authorize_post_body_parameters";var Pl=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});function n2(A){return new rW6(A)}var AH,OW8,rW6;var Ue=k(()=>{jS();Pl();/*! @azure/msal-common v15.13.1 2025-10-29 */AH={[E96]:"A redirect URI is required for all calls, and none has been set.",[rF6]:"Could not parse the given claims request object.",[L96]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[cg]:"URL could not be parsed into appropriate segments.",[y96]:"URL was empty or null.",[R96]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[Fe]:"Given claims parameter must be a stringified JSON object.",[S96]:"Token request was empty and not found in cache.",[C96]:"The logout request was null or undefined.",[oF6]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[h96]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[Qe]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[I96]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[b96]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[Xl]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[aF6]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[sF6]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[tF6]:"Invalid authentication header provided",[eF6]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[AQ6]:"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",[qQ6]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.",[YQ6]:"Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",[KQ6]:"Invalid request method for EAR protocol mode. The request method cannot be GET when using EAR protocol mode. Please change the request method to POST."},OW8={redirectUriNotSet:{code:E96,desc:AH[E96]},claimsRequestParsingError:{code:rF6,desc:AH[rF6]},authorityUriInsecure:{code:L96,desc:AH[L96]},urlParseError:{code:cg,desc:AH[cg]},urlEmptyError:{code:y96,desc:AH[y96]},emptyScopesError:{code:R96,desc:AH[R96]},invalidClaimsRequest:{code:Fe,desc:AH[Fe]},tokenRequestEmptyError:{code:S96,desc:AH[S96]},logoutRequestEmptyError:{code:C96,desc:AH[C96]},invalidCodeChallengeMethod:{code:oF6,desc:AH[oF6]},invalidCodeChallengeParams:{code:h96,desc:AH[h96]},invalidCloudDiscoveryMetadata:{code:Qe,desc:AH[Qe]},invalidAuthorityMetadata:{code:I96,desc:AH[I96]},untrustedAuthority:{code:b96,desc:AH[b96]},missingSshJwk:{code:Xl,desc:AH[Xl]},missingSshKid:{code:aF6,desc:AH[aF6]},missingNonceAuthenticationHeader:{code:sF6,desc:AH[sF6]},invalidAuthenticationHeader:{code:tF6,desc:AH[tF6]},cannotSetOIDCOptions:{code:eF6,desc:AH[eF6]},cannotAllowPlatformBroker:{code:AQ6,desc:AH[AQ6]},authorityMismatch:{code:qQ6,desc:AH[qQ6]},invalidAuthorizePostBodyParameters:{code:YQ6,desc:AH[YQ6]},invalidRequestMethodForEAR:{code:KQ6,desc:AH[KQ6]}};rW6=class rW6 extends c3{constructor(A){super(A,AH[A]);this.name="ClientConfigurationError",Object.setPrototypeOf(this,rW6.prototype)}}});class v_{static isEmptyObj(A){if(A)try{let q=JSON.parse(A);return Object.keys(q).length===0}catch(q){}return!0}static startsWith(A,q){return A.indexOf(q)===0}static endsWith(A,q){return A.length>=q.length&&A.lastIndexOf(q)===A.length-q.length}static queryStringToObject(A){let q={},K=A.split("&"),Y=(z)=>decodeURIComponent(z.replace(/\+/g," "));return K.forEach((z)=>{if(z.trim()){let[w,_]=z.split(/=(.+)/g,2);if(w&&_)q[Y(w)]=Y(_)}}),q}static trimArrayEntries(A){return A.map((q)=>q.trim())}static removeEmptyStringsFromArray(A){return A.filter((q)=>{return!!q})}static jsonParseHelper(A){try{return JSON.parse(A)}catch(q){return null}}static matchPattern(A,q){return new RegExp(A.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(q)}}var pe=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});class pj{constructor(A){let q=A?v_.trimArrayEntries([...A]):[],K=q?v_.removeEmptyStringsFromArray(q):[];if(!K||!K.length)throw n2(R96);this.scopes=new Set,K.forEach((Y)=>this.scopes.add(Y))}static fromString(A){let K=(A||n8.EMPTY_STRING).split(" ");return new pj(K)}static createSearchScopes(A){let q=A&&A.length>0?A:[...qG],K=new pj(q);if(!K.containsOnlyOIDCScopes())K.removeOIDCScopes();else K.removeScope(n8.OFFLINE_ACCESS_SCOPE);return K}containsScope(A){let q=this.printScopesLowerCase().split(" "),K=new pj(q);return A?K.scopes.has(A.toLowerCase()):!1}containsScopeSet(A){if(!A||A.scopes.size<=0)return!1;return this.scopes.size>=A.scopes.size&&A.asArray().every((q)=>this.containsScope(q))}containsOnlyOIDCScopes(){let A=0;return KW8.forEach((q)=>{if(this.containsScope(q))A+=1}),this.scopes.size===A}appendScope(A){if(A)this.scopes.add(A.trim())}appendScopes(A){try{A.forEach((q)=>this.appendScope(q))}catch(q){throw JA(f96)}}removeScope(A){if(!A)throw JA(G96);this.scopes.delete(A.trim())}removeOIDCScopes(){KW8.forEach((A)=>{this.scopes.delete(A)})}unionScopeSets(A){if(!A)throw JA(Be);let q=new Set;return A.scopes.forEach((K)=>q.add(K.toLowerCase())),this.scopes.forEach((K)=>q.add(K.toLowerCase())),q}intersectingScopeSets(A){if(!A)throw JA(Be);if(!A.containsOnlyOIDCScopes())A.removeOIDCScopes();let q=this.unionScopeSets(A),K=A.getScopeCount(),Y=this.getScopeCount();return q.sizeA.push(q)),A}printScopes(){if(this.scopes)return this.asArray().join(" ");return n8.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}var zQ6=k(()=>{Ue();pe();dM();P$();Pl();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */});function oW6(A,q){if(!A)throw JA(O96);try{let K=q(A);return JSON.parse(K)}catch(K){throw JA(be)}}function lg(A){if(!A)throw JA(be);let q=A.split(Ol.CLIENT_INFO_SEPARATOR,2);return{uid:q[0],utid:q.length<2?n8.EMPTY_STRING:q[1]}}var aW6=k(()=>{dM();P$();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */});function Ec7(A,q){return!!A&&!!q&&A===q.split(".")[1]}function wQ6(A,q,K,Y){if(Y){let{oid:z,sub:w,tid:_,name:$,tfp:O,acr:H,preferred_username:j,upn:J,login_hint:M}=Y,D=_||O||H||"";return{tenantId:D,localAccountId:z||w||"",name:$,username:j||J||"",loginHint:M,isHomeTenant:Ec7(D,A)}}else return{tenantId:K,localAccountId:q,username:"",isHomeTenant:Ec7(K,A)}}function rM1(A,q,K,Y){let z=A;if(q){let{isHomeTenant:w,..._}=q;z={...A,..._}}if(K){let{isHomeTenant:w,..._}=wQ6(A.homeAccountId,A.localAccountId,A.tenantId,K);return z={...z,..._,idTokenClaims:K,idToken:Y},z}return z}var oM1=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});var JS;var HW8=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */JS={Default:0,Adfs:1,Dsts:2,Ciam:3}});function aM1(A){if(A)return A.tid||A.tfp||A.acr||null;return null}var jW8=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});var KG;var _Q6=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */KG={AAD:"AAD",OIDC:"OIDC",EAR:"EAR"}});class cM{static getAccountInfo(A){return{homeAccountId:A.homeAccountId,environment:A.environment,tenantId:A.realm,username:A.username,localAccountId:A.localAccountId,loginHint:A.loginHint,name:A.name,nativeAccountId:A.nativeAccountId,authorityType:A.authorityType,tenantProfiles:new Map((A.tenantProfiles||[]).map((q)=>{return[q.tenantId,q]})),dataBoundary:A.dataBoundary}}isSingleTenant(){return!this.tenantProfiles}static createAccount(A,q,K){let Y=new cM;if(q.authorityType===JS.Adfs)Y.authorityType=_96.ADFS_ACCOUNT_TYPE;else if(q.protocolMode===KG.OIDC)Y.authorityType=_96.GENERIC_ACCOUNT_TYPE;else Y.authorityType=_96.MSSTS_ACCOUNT_TYPE;let z;if(A.clientInfo&&K){if(z=oW6(A.clientInfo,K),z.xms_tdbr)Y.dataBoundary=z.xms_tdbr==="EU"?"EU":"None"}Y.clientInfo=A.clientInfo,Y.homeAccountId=A.homeAccountId,Y.nativeAccountId=A.nativeAccountId;let w=A.environment||q&&q.getPreferredCache();if(!w)throw JA(Jl);Y.environment=w,Y.realm=z?.utid||aM1(A.idTokenClaims)||"",Y.localAccountId=z?.uid||A.idTokenClaims?.oid||A.idTokenClaims?.sub||"";let _=A.idTokenClaims?.preferred_username||A.idTokenClaims?.upn,$=A.idTokenClaims?.emails?A.idTokenClaims.emails[0]:null;if(Y.username=_||$||"",Y.loginHint=A.idTokenClaims?.login_hint,Y.name=A.idTokenClaims?.name||"",Y.cloudGraphHostName=A.cloudGraphHostName,Y.msGraphHost=A.msGraphHost,A.tenantProfiles)Y.tenantProfiles=A.tenantProfiles;else{let O=wQ6(A.homeAccountId,Y.localAccountId,Y.realm,A.idTokenClaims);Y.tenantProfiles=[O]}return Y}static createFromAccountInfo(A,q,K){let Y=new cM;return Y.authorityType=A.authorityType||_96.GENERIC_ACCOUNT_TYPE,Y.homeAccountId=A.homeAccountId,Y.localAccountId=A.localAccountId,Y.nativeAccountId=A.nativeAccountId,Y.realm=A.tenantId,Y.environment=A.environment,Y.username=A.username,Y.name=A.name,Y.loginHint=A.loginHint,Y.cloudGraphHostName=q,Y.msGraphHost=K,Y.tenantProfiles=Array.from(A.tenantProfiles?.values()||[]),Y.dataBoundary=A.dataBoundary,Y}static generateHomeAccountId(A,q,K,Y,z){if(!(q===JS.Adfs||q===JS.Dsts)){if(A)try{let w=oW6(A,Y.base64Decode);if(w.uid&&w.utid)return`${w.uid}.${w.utid}`}catch(w){}K.warning("No client info in response")}return z?.sub||""}static isAccountEntity(A){if(!A)return!1;return A.hasOwnProperty("homeAccountId")&&A.hasOwnProperty("environment")&&A.hasOwnProperty("realm")&&A.hasOwnProperty("localAccountId")&&A.hasOwnProperty("username")&&A.hasOwnProperty("authorityType")}static accountInfoIsEqual(A,q,K){if(!A||!q)return!1;let Y=!0;if(K){let z=A.idTokenClaims||{},w=q.idTokenClaims||{};Y=z.iat===w.iat&&z.nonce===w.nonce}return A.homeAccountId===q.homeAccountId&&A.localAccountId===q.localAccountId&&A.username===q.username&&A.tenantId===q.tenantId&&A.loginHint===q.loginHint&&A.environment===q.environment&&A.nativeAccountId===q.nativeAccountId&&Y}}var sM1=k(()=>{P$();aW6();oM1();dM();HW8();jW8();_Q6();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */});var tM1={};m1(tM1,{isKmsi:()=>JW8,getJWSPayload:()=>Lc7,extractTokenClaims:()=>Wl,checkMaxAge:()=>$Q6});function Wl(A,q){let K=Lc7(A);try{let Y=q(K);return JSON.parse(Y)}catch(Y){throw JA(xe)}}function JW8(A){if(!A.signin_state)return!1;let q=["kmsi","dvc_dmjd"];return A.signin_state.some((Y)=>q.includes(Y.trim().toLowerCase()))}function Lc7(A){if(!A)throw JA(H96);let K=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(A);if(!K||K.length<4)throw JA(xe);return K[2]}function $Q6(A,q){if(q===0||Date.now()-300000>A+q)throw JA(P96)}var sW6=k(()=>{dM();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */});var n0={};m1(n0,{stripLeadingHashOrQuery:()=>Rc7,normalizeUrlForComparison:()=>JT9,mapToQueryString:()=>ig,getDeserializedResponse:()=>MW8});function yc7(A){if(!A)return A;let q=A.toLowerCase();if(v_.endsWith(q,"?"))q=q.slice(0,-1);else if(v_.endsWith(q,"?/"))q=q.slice(0,-2);if(!v_.endsWith(q,"/"))q+="/";return q}function Rc7(A){if(A.startsWith("#/"))return A.substring(2);else if(A.startsWith("#")||A.startsWith("?"))return A.substring(1);return A}function MW8(A){if(!A||A.indexOf("=")<0)return null;try{let q=Rc7(A),K=Object.fromEntries(new URLSearchParams(q));if(K.code||K.ear_jwe||K.error||K.error_description||K.state)return K}catch(q){throw JA(M96)}return null}function ig(A,q=!0,K){let Y=[];return A.forEach((z,w)=>{if(!q&&K&&w in K)Y.push(`${w}=${z}`);else Y.push(`${w}=${encodeURIComponent(z)}`)}),Y.join("&")}function JT9(A){if(!A)return A;let q=A.split("#")[0];try{let K=new URL(q),Y=K.origin+K.pathname+K.search;return yc7(Y)}catch(K){return yc7(q)}}var x96=k(()=>{dM();pe();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */});class D5{get urlString(){return this._urlString}constructor(A){if(this._urlString=A,!this._urlString)throw n2(y96);if(!A.includes("#"))this._urlString=D5.canonicalizeUri(A)}static canonicalizeUri(A){if(A){let q=A.toLowerCase();if(v_.endsWith(q,"?"))q=q.slice(0,-1);else if(v_.endsWith(q,"?/"))q=q.slice(0,-2);if(!v_.endsWith(q,"/"))q+="/";return q}return A}validateAsUri(){let A;try{A=this.getUrlComponents()}catch(q){throw n2(cg)}if(!A.HostNameAndPort||!A.PathSegments)throw n2(cg);if(!A.Protocol||A.Protocol.toLowerCase()!=="https:")throw n2(L96)}static appendQueryString(A,q){if(!q)return A;return A.indexOf("?")<0?`${A}?${q}`:`${A}&${q}`}static removeHashFromUrl(A){return D5.canonicalizeUri(A.split("#")[0])}replaceTenantPath(A){let q=this.getUrlComponents(),K=q.PathSegments;if(A&&K.length!==0&&(K[0]===hN.COMMON||K[0]===hN.ORGANIZATIONS))K[0]=A;return D5.constructAuthorityUriFromObject(q)}getUrlComponents(){let A=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),q=this.urlString.match(A);if(!q)throw n2(cg);let K={Protocol:q[1],HostNameAndPort:q[4],AbsolutePath:q[5],QueryString:q[7]},Y=K.AbsolutePath.split("/");if(Y=Y.filter((z)=>z&&z.length>0),K.PathSegments=Y,K.QueryString&&K.QueryString.endsWith("/"))K.QueryString=K.QueryString.substring(0,K.QueryString.length-1);return K}static getDomainFromUrl(A){let q=RegExp("^([^:/?#]+://)?([^/?#]*)"),K=A.match(q);if(!K)throw n2(cg);return K[2]}static getAbsoluteUrl(A,q){if(A[0]===n8.FORWARD_SLASH){let Y=new D5(q).getUrlComponents();return Y.Protocol+"//"+Y.HostNameAndPort+A}return A}static constructAuthorityUriFromObject(A){return new D5(A.Protocol+"//"+A.HostNameAndPort+"/"+A.PathSegments.join("/"))}static hashContainsKnownProperties(A){return!!MW8(A)}}var de=k(()=>{Ue();pe();P$();x96();Pl();/*! @azure/msal-common v15.13.1 2025-10-29 */});function hc7(A,q){let K,Y=A.canonicalAuthority;if(Y){let z=new D5(Y).getUrlComponents().HostNameAndPort;K=Sc7(z,A.cloudDiscoveryMetadata?.metadata,YT.CONFIG,q)||Sc7(z,XW8.metadata,YT.HARDCODED_VALUES,q)||A.knownAuthorities}return K||[]}function Sc7(A,q,K,Y){if(Y?.trace(`getAliasesFromMetadata called with source: ${K}`),A&&q){let z=OQ6(q,A);if(z)return Y?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${K}, returning aliases`),z.aliases;else Y?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${K}`)}return null}function Ic7(A){return OQ6(XW8.metadata,A)}function OQ6(A,q){for(let K=0;K{de();P$();/*! @azure/msal-common v15.13.1 2025-10-29 */Cc7={endpointMetadata:{"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},instanceDiscoveryMetadata:{metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]}},DW8=Cc7.endpointMetadata,XW8=Cc7.instanceDiscoveryMetadata,PW8=new Set;XW8.metadata.forEach((A)=>{A.aliases.forEach((q)=>{PW8.add(q)})})});var ZW8="cache_quota_exceeded",eM1="cache_error_unknown";var bc7=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});function xc7(A){if(!(A instanceof Error))return new HQ6(eM1);if(A.name==="QuotaExceededError"||A.name==="NS_ERROR_DOM_QUOTA_REACHED"||A.message.includes("exceeded the quota"))return new HQ6(ZW8);else return new HQ6(A.name,A.message)}var GW8,HQ6;var uc7=k(()=>{jS();bc7();/*! @azure/msal-common v15.13.1 2025-10-29 */GW8={[ZW8]:"Exceeded cache storage capacity.",[eM1]:"Unexpected error occurred when using cache storage."};HQ6=class HQ6 extends c3{constructor(A,q){let K=q||(GW8[A]?GW8[A]:GW8[eM1]);super(`${A}: ${K}`);Object.setPrototypeOf(this,HQ6.prototype),this.name="CacheError",this.errorCode=A,this.errorMessage=K}}});class u96{constructor(A,q,K,Y,z){this.clientId=A,this.cryptoImpl=q,this.commonLogger=K.clone(lM1,iW6),this.staticAuthorityOptions=z,this.performanceClient=Y}getAllAccounts(A,q){return this.buildTenantProfiles(this.getAccountsFilteredBy(A,q),q,A)}getAccountInfoFilteredBy(A,q){if(Object.keys(A).length===0||Object.values(A).every((Y)=>!Y))return this.commonLogger.warning("getAccountInfoFilteredBy: Account filter is empty or invalid, returning null"),null;let K=this.getAllAccounts(A,q);if(K.length>1)return K.sort((z)=>{return z.idTokenClaims?-1:1})[0];else if(K.length===1)return K[0];else return null}getBaseAccountInfo(A,q){let K=this.getAccountsFilteredBy(A,q);if(K.length>0)return cM.getAccountInfo(K[0]);else return null}buildTenantProfiles(A,q,K){return A.flatMap((Y)=>{return this.getTenantProfilesFromAccountEntity(Y,q,K?.tenantId,K)})}getTenantedAccountInfoByFilter(A,q,K,Y,z){let w=null,_;if(z){if(!this.tenantProfileMatchesFilter(K,z))return null}let $=this.getIdToken(A,Y,q,K.tenantId);if($){if(_=Wl($.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(_,z))return null}return w=rM1(A,K,_,$?.secret),w}getTenantProfilesFromAccountEntity(A,q,K,Y){let z=cM.getAccountInfo(A),w=z.tenantProfiles||new Map,_=this.getTokenKeys();if(K){let O=w.get(K);if(O)w=new Map([[K,O]]);else return[]}let $=[];return w.forEach((O)=>{let H=this.getTenantedAccountInfoByFilter(z,_,O,q,Y);if(H)$.push(H)}),$}tenantProfileMatchesFilter(A,q){if(!!q.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(A,q.localAccountId))return!1;if(!!q.name&&A.name!==q.name)return!1;if(q.isHomeTenant!==void 0&&A.isHomeTenant!==q.isHomeTenant)return!1;return!0}idTokenClaimsMatchTenantProfileFilter(A,q){if(q){if(!!q.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(A,q.localAccountId))return!1;if(!!q.loginHint&&!this.matchLoginHintFromTokenClaims(A,q.loginHint))return!1;if(!!q.username&&!this.matchUsername(A.preferred_username,q.username))return!1;if(!!q.name&&!this.matchName(A,q.name))return!1;if(!!q.sid&&!this.matchSid(A,q.sid))return!1}return!0}async saveCacheRecord(A,q,K,Y){if(!A)throw JA(T96);try{if(A.account)await this.setAccount(A.account,q,K);if(!!A.idToken&&Y?.idToken!==!1)await this.setIdTokenCredential(A.idToken,q,K);if(!!A.accessToken&&Y?.accessToken!==!1)await this.saveAccessToken(A.accessToken,q,K);if(!!A.refreshToken&&Y?.refreshToken!==!1)await this.setRefreshTokenCredential(A.refreshToken,q,K);if(A.appMetadata)this.setAppMetadata(A.appMetadata,q)}catch(z){if(this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),z instanceof c3)throw z;else throw xc7(z)}}async saveAccessToken(A,q,K){let Y={clientId:A.clientId,credentialType:A.credentialType,environment:A.environment,homeAccountId:A.homeAccountId,realm:A.realm,tokenType:A.tokenType,requestedClaimsHash:A.requestedClaimsHash},z=this.getTokenKeys(),w=pj.fromString(A.target);z.accessToken.forEach((_)=>{if(!this.accessTokenKeyMatchesFilter(_,Y,!1))return;let $=this.getAccessTokenCredential(_,q);if($&&this.credentialMatchesFilter($,Y)){if(pj.fromString($.target).intersectingScopeSets(w))this.removeAccessToken(_,q)}}),await this.setAccessTokenCredential(A,q,K)}getAccountsFilteredBy(A,q){let K=this.getAccountKeys(),Y=[];return K.forEach((z)=>{let w=this.getAccount(z,q);if(!w)return;if(!!A.homeAccountId&&!this.matchHomeAccountId(w,A.homeAccountId))return;if(!!A.username&&!this.matchUsername(w.username,A.username))return;if(!!A.environment&&!this.matchEnvironment(w,A.environment))return;if(!!A.realm&&!this.matchRealm(w,A.realm))return;if(!!A.nativeAccountId&&!this.matchNativeAccountId(w,A.nativeAccountId))return;if(!!A.authorityType&&!this.matchAuthorityType(w,A.authorityType))return;let _={localAccountId:A?.localAccountId,name:A?.name},$=w.tenantProfiles?.filter((O)=>{return this.tenantProfileMatchesFilter(O,_)});if($&&$.length===0)return;Y.push(w)}),Y}credentialMatchesFilter(A,q){if(!!q.clientId&&!this.matchClientId(A,q.clientId))return!1;if(!!q.userAssertionHash&&!this.matchUserAssertionHash(A,q.userAssertionHash))return!1;if(typeof q.homeAccountId==="string"&&!this.matchHomeAccountId(A,q.homeAccountId))return!1;if(!!q.environment&&!this.matchEnvironment(A,q.environment))return!1;if(!!q.realm&&!this.matchRealm(A,q.realm))return!1;if(!!q.credentialType&&!this.matchCredentialType(A,q.credentialType))return!1;if(!!q.familyId&&!this.matchFamilyId(A,q.familyId))return!1;if(!!q.target&&!this.matchTarget(A,q.target))return!1;if(q.requestedClaimsHash||A.requestedClaimsHash){if(A.requestedClaimsHash!==q.requestedClaimsHash)return!1}if(A.credentialType===iw.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(!!q.tokenType&&!this.matchTokenType(A,q.tokenType))return!1;if(q.tokenType===AY.SSH){if(q.keyId&&!this.matchKeyId(A,q.keyId))return!1}}return!0}getAppMetadataFilteredBy(A){let q=this.getKeys(),K={};return q.forEach((Y)=>{if(!this.isAppMetadata(Y))return;let z=this.getAppMetadata(Y);if(!z)return;if(!!A.environment&&!this.matchEnvironment(z,A.environment))return;if(!!A.clientId&&!this.matchClientId(z,A.clientId))return;K[Y]=z}),K}getAuthorityMetadataByAlias(A){let q=this.getAuthorityMetadataKeys(),K=null;return q.forEach((Y)=>{if(!this.isAuthorityMetadata(Y)||Y.indexOf(this.clientId)===-1)return;let z=this.getAuthorityMetadata(Y);if(!z)return;if(z.aliases.indexOf(A)===-1)return;K=z}),K}removeAllAccounts(A){this.getAllAccounts({},A).forEach((K)=>{this.removeAccount(K,A)})}removeAccount(A,q){this.removeAccountContext(A,q);let K=this.getAccountKeys(),Y=(z)=>{return z.includes(A.homeAccountId)&&z.includes(A.environment)};K.filter(Y).forEach((z)=>{this.removeItem(z,q),this.performanceClient.incrementFields({accountsRemoved:1},q)})}removeAccountContext(A,q){let K=this.getTokenKeys(),Y=(z)=>{return z.includes(A.homeAccountId)&&z.includes(A.environment)};K.idToken.filter(Y).forEach((z)=>{this.removeIdToken(z,q)}),K.accessToken.filter(Y).forEach((z)=>{this.removeAccessToken(z,q)}),K.refreshToken.filter(Y).forEach((z)=>{this.removeRefreshToken(z,q)})}removeAccessToken(A,q){let K=this.getAccessTokenCredential(A,q);if(this.removeItem(A,q),this.performanceClient.incrementFields({accessTokensRemoved:1},q),!K||K.credentialType.toLowerCase()!==iw.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||K.tokenType!==AY.POP)return;let Y=K.keyId;if(Y)this.cryptoImpl.removeTokenBindingKey(Y).catch(()=>{this.commonLogger.error(`Failed to remove token binding key ${Y}`,q),this.performanceClient?.incrementFields({removeTokenBindingKeyFailure:1},q)})}removeAppMetadata(A){return this.getKeys().forEach((K)=>{if(this.isAppMetadata(K))this.removeItem(K,A)}),!0}getIdToken(A,q,K,Y,z){this.commonLogger.trace("CacheManager - getIdToken called");let w={homeAccountId:A.homeAccountId,environment:A.environment,credentialType:iw.ID_TOKEN,clientId:this.clientId,realm:Y},_=this.getIdTokensByFilter(w,q,K),$=_.size;if($<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;else if($>1){let O=_;if(!Y){let H=new Map;_.forEach((J,M)=>{if(J.realm===A.tenantId)H.set(M,J)});let j=H.size;if(j<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),_.values().next().value;else if(j===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),H.values().next().value;else O=H}if(this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),O.forEach((H,j)=>{this.removeIdToken(j,q)}),z&&q)z.addFields({multiMatchedID:_.size},q);return null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),_.values().next().value}getIdTokensByFilter(A,q,K){let Y=K&&K.idToken||this.getTokenKeys().idToken,z=new Map;return Y.forEach((w)=>{if(!this.idTokenKeyMatchesFilter(w,{clientId:this.clientId,...A}))return;let _=this.getIdTokenCredential(w,q);if(_&&this.credentialMatchesFilter(_,A))z.set(w,_)}),z}idTokenKeyMatchesFilter(A,q){let K=A.toLowerCase();if(q.clientId&&K.indexOf(q.clientId.toLowerCase())===-1)return!1;if(q.homeAccountId&&K.indexOf(q.homeAccountId.toLowerCase())===-1)return!1;return!0}removeIdToken(A,q){this.removeItem(A,q)}removeRefreshToken(A,q){this.removeItem(A,q)}getAccessToken(A,q,K,Y){let z=q.correlationId;this.commonLogger.trace("CacheManager - getAccessToken called",z);let w=pj.createSearchScopes(q.scopes),_=q.authenticationScheme||AY.BEARER,$=_&&_.toLowerCase()!==AY.BEARER.toLowerCase()?iw.ACCESS_TOKEN_WITH_AUTH_SCHEME:iw.ACCESS_TOKEN,O={homeAccountId:A.homeAccountId,environment:A.environment,credentialType:$,clientId:this.clientId,realm:Y||A.tenantId,target:w,tokenType:_,keyId:q.sshKid,requestedClaimsHash:q.requestedClaimsHash},H=K&&K.accessToken||this.getTokenKeys().accessToken,j=[];H.forEach((M)=>{if(this.accessTokenKeyMatchesFilter(M,O,!0)){let D=this.getAccessTokenCredential(M,z);if(D&&this.credentialMatchesFilter(D,O))j.push(D)}});let J=j.length;if(J<1)return this.commonLogger.info("CacheManager:getAccessToken - No token found",z),null;else if(J>1)return this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them",z),j.forEach((M)=>{this.removeAccessToken(this.generateCredentialKey(M),z)}),this.performanceClient.addFields({multiMatchedAT:j.length},z),null;return this.commonLogger.info("CacheManager:getAccessToken - Returning access token",z),j[0]}accessTokenKeyMatchesFilter(A,q,K){let Y=A.toLowerCase();if(q.clientId&&Y.indexOf(q.clientId.toLowerCase())===-1)return!1;if(q.homeAccountId&&Y.indexOf(q.homeAccountId.toLowerCase())===-1)return!1;if(q.realm&&Y.indexOf(q.realm.toLowerCase())===-1)return!1;if(q.requestedClaimsHash&&Y.indexOf(q.requestedClaimsHash.toLowerCase())===-1)return!1;if(q.target){let z=q.target.asArray();for(let w=0;w{if(!this.accessTokenKeyMatchesFilter(z,A,!0))return;let w=this.getAccessTokenCredential(z,q);if(w&&this.credentialMatchesFilter(w,A))Y.push(w)}),Y}getRefreshToken(A,q,K,Y,z){this.commonLogger.trace("CacheManager - getRefreshToken called");let w=q?Ie:void 0,_={homeAccountId:A.homeAccountId,environment:A.environment,credentialType:iw.REFRESH_TOKEN,clientId:this.clientId,familyId:w},$=Y&&Y.refreshToken||this.getTokenKeys().refreshToken,O=[];$.forEach((j)=>{if(this.refreshTokenKeyMatchesFilter(j,_)){let J=this.getRefreshTokenCredential(j,K);if(J&&this.credentialMatchesFilter(J,_))O.push(J)}});let H=O.length;if(H<1)return this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null;if(H>1&&z&&K)z.addFields({multiMatchedRT:H},K);return this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),O[0]}refreshTokenKeyMatchesFilter(A,q){let K=A.toLowerCase();if(q.familyId&&K.indexOf(q.familyId.toLowerCase())===-1)return!1;if(!q.familyId&&q.clientId&&K.indexOf(q.clientId.toLowerCase())===-1)return!1;if(q.homeAccountId&&K.indexOf(q.homeAccountId.toLowerCase())===-1)return!1;return!0}readAppMetadataFromCache(A){let q={environment:A,clientId:this.clientId},K=this.getAppMetadataFilteredBy(q),Y=Object.keys(K).map((w)=>K[w]),z=Y.length;if(z<1)return null;else if(z>1)throw JA(W96);return Y[0]}isAppMetadataFOCI(A){let q=this.readAppMetadataFromCache(A);return!!(q&&q.familyId===Ie)}matchHomeAccountId(A,q){return typeof A.homeAccountId==="string"&&q===A.homeAccountId}matchLocalAccountIdFromTokenClaims(A,q){let K=A.oid||A.sub;return q===K}matchLocalAccountIdFromTenantProfile(A,q){return A.localAccountId===q}matchName(A,q){return q.toLowerCase()===A.name?.toLowerCase()}matchUsername(A,q){return!!(A&&typeof A==="string"&&q?.toLowerCase()===A.toLowerCase())}matchUserAssertionHash(A,q){return!!(A.userAssertionHash&&q===A.userAssertionHash)}matchEnvironment(A,q){if(this.staticAuthorityOptions){let Y=hc7(this.staticAuthorityOptions,this.commonLogger);if(Y.includes(q)&&Y.includes(A.environment))return!0}let K=this.getAuthorityMetadataByAlias(q);if(K&&K.aliases.indexOf(A.environment)>-1)return!0;return!1}matchCredentialType(A,q){return A.credentialType&&q.toLowerCase()===A.credentialType.toLowerCase()}matchClientId(A,q){return!!(A.clientId&&q===A.clientId)}matchFamilyId(A,q){return!!(A.familyId&&q===A.familyId)}matchRealm(A,q){return A.realm?.toLowerCase()===q.toLowerCase()}matchNativeAccountId(A,q){return!!(A.nativeAccountId&&q===A.nativeAccountId)}matchLoginHintFromTokenClaims(A,q){if(A.login_hint===q)return!0;if(A.preferred_username===q)return!0;if(A.upn===q)return!0;return!1}matchSid(A,q){return A.sid===q}matchAuthorityType(A,q){return!!(A.authorityType&&q.toLowerCase()===A.authorityType.toLowerCase())}matchTarget(A,q){if(A.credentialType!==iw.ACCESS_TOKEN&&A.credentialType!==iw.ACCESS_TOKEN_WITH_AUTH_SCHEME||!A.target)return!1;return pj.fromString(A.target).containsScopeSet(q)}matchTokenType(A,q){return!!(A.tokenType&&A.tokenType===q)}matchKeyId(A,q){return!!(A.keyId&&A.keyId===q)}isAppMetadata(A){return A.indexOf(RF6)!==-1}isAuthorityMetadata(A){return A.indexOf(pW6.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(A){return`${pW6.CACHE_KEY}-${this.clientId}-${A}`}static toObject(A,q){for(let K in q)A[K]=q[K];return A}}var AD1;var fW8=k(()=>{P$();zQ6();sM1();dM();oM1();sW6();iM1();WW8();uc7();jS();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */AD1=class AD1 extends u96{async setAccount(){throw JA(c5)}getAccount(){throw JA(c5)}async setIdTokenCredential(){throw JA(c5)}getIdTokenCredential(){throw JA(c5)}async setAccessTokenCredential(){throw JA(c5)}getAccessTokenCredential(){throw JA(c5)}async setRefreshTokenCredential(){throw JA(c5)}getRefreshTokenCredential(){throw JA(c5)}setAppMetadata(){throw JA(c5)}getAppMetadata(){throw JA(c5)}setServerTelemetry(){throw JA(c5)}getServerTelemetry(){throw JA(c5)}setAuthorityMetadata(){throw JA(c5)}getAuthorityMetadata(){throw JA(c5)}getAuthorityMetadataKeys(){throw JA(c5)}setThrottlingCache(){throw JA(c5)}getThrottlingCache(){throw JA(c5)}removeItem(){throw JA(c5)}getKeys(){throw JA(c5)}getAccountKeys(){throw JA(c5)}getTokenKeys(){throw JA(c5)}generateCredentialKey(){throw JA(c5)}generateAccountKey(){throw JA(c5)}}});var R8,tQ2,Bc7;var ub=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */R8={AcquireTokenByCode:"acquireTokenByCode",AcquireTokenByRefreshToken:"acquireTokenByRefreshToken",AcquireTokenSilent:"acquireTokenSilent",AcquireTokenSilentAsync:"acquireTokenSilentAsync",AcquireTokenPopup:"acquireTokenPopup",AcquireTokenPreRedirect:"acquireTokenPreRedirect",AcquireTokenRedirect:"acquireTokenRedirect",CryptoOptsGetPublicKeyThumbprint:"cryptoOptsGetPublicKeyThumbprint",CryptoOptsSignJwt:"cryptoOptsSignJwt",SilentCacheClientAcquireToken:"silentCacheClientAcquireToken",SilentIframeClientAcquireToken:"silentIframeClientAcquireToken",AwaitConcurrentIframe:"awaitConcurrentIframe",SilentRefreshClientAcquireToken:"silentRefreshClientAcquireToken",SsoSilent:"ssoSilent",StandardInteractionClientGetDiscoveredAuthority:"standardInteractionClientGetDiscoveredAuthority",FetchAccountIdWithNativeBroker:"fetchAccountIdWithNativeBroker",NativeInteractionClientAcquireToken:"nativeInteractionClientAcquireToken",BaseClientCreateTokenRequestHeaders:"baseClientCreateTokenRequestHeaders",NetworkClientSendPostRequestAsync:"networkClientSendPostRequestAsync",RefreshTokenClientExecutePostToTokenEndpoint:"refreshTokenClientExecutePostToTokenEndpoint",AuthorizationCodeClientExecutePostToTokenEndpoint:"authorizationCodeClientExecutePostToTokenEndpoint",BrokerHandhshake:"brokerHandshake",AcquireTokenByRefreshTokenInBroker:"acquireTokenByRefreshTokenInBroker",AcquireTokenByBroker:"acquireTokenByBroker",RefreshTokenClientExecuteTokenRequest:"refreshTokenClientExecuteTokenRequest",RefreshTokenClientAcquireToken:"refreshTokenClientAcquireToken",RefreshTokenClientAcquireTokenWithCachedRefreshToken:"refreshTokenClientAcquireTokenWithCachedRefreshToken",RefreshTokenClientAcquireTokenByRefreshToken:"refreshTokenClientAcquireTokenByRefreshToken",RefreshTokenClientCreateTokenRequestBody:"refreshTokenClientCreateTokenRequestBody",AcquireTokenFromCache:"acquireTokenFromCache",SilentFlowClientAcquireCachedToken:"silentFlowClientAcquireCachedToken",SilentFlowClientGenerateResultFromCacheRecord:"silentFlowClientGenerateResultFromCacheRecord",AcquireTokenBySilentIframe:"acquireTokenBySilentIframe",InitializeBaseRequest:"initializeBaseRequest",InitializeSilentRequest:"initializeSilentRequest",InitializeClientApplication:"initializeClientApplication",InitializeCache:"initializeCache",SilentIframeClientTokenHelper:"silentIframeClientTokenHelper",SilentHandlerInitiateAuthRequest:"silentHandlerInitiateAuthRequest",SilentHandlerMonitorIframeForHash:"silentHandlerMonitorIframeForHash",SilentHandlerLoadFrame:"silentHandlerLoadFrame",SilentHandlerLoadFrameSync:"silentHandlerLoadFrameSync",StandardInteractionClientCreateAuthCodeClient:"standardInteractionClientCreateAuthCodeClient",StandardInteractionClientGetClientConfiguration:"standardInteractionClientGetClientConfiguration",StandardInteractionClientInitializeAuthorizationRequest:"standardInteractionClientInitializeAuthorizationRequest",GetAuthCodeUrl:"getAuthCodeUrl",GetStandardParams:"getStandardParams",HandleCodeResponseFromServer:"handleCodeResponseFromServer",HandleCodeResponse:"handleCodeResponse",HandleResponseEar:"handleResponseEar",HandleResponsePlatformBroker:"handleResponsePlatformBroker",HandleResponseCode:"handleResponseCode",UpdateTokenEndpointAuthority:"updateTokenEndpointAuthority",AuthClientAcquireToken:"authClientAcquireToken",AuthClientExecuteTokenRequest:"authClientExecuteTokenRequest",AuthClientCreateTokenRequestBody:"authClientCreateTokenRequestBody",PopTokenGenerateCnf:"popTokenGenerateCnf",PopTokenGenerateKid:"popTokenGenerateKid",HandleServerTokenResponse:"handleServerTokenResponse",DeserializeResponse:"deserializeResponse",AuthorityFactoryCreateDiscoveredInstance:"authorityFactoryCreateDiscoveredInstance",AuthorityResolveEndpointsAsync:"authorityResolveEndpointsAsync",AuthorityResolveEndpointsFromLocalSources:"authorityResolveEndpointsFromLocalSources",AuthorityGetCloudDiscoveryMetadataFromNetwork:"authorityGetCloudDiscoveryMetadataFromNetwork",AuthorityUpdateCloudDiscoveryMetadata:"authorityUpdateCloudDiscoveryMetadata",AuthorityGetEndpointMetadataFromNetwork:"authorityGetEndpointMetadataFromNetwork",AuthorityUpdateEndpointMetadata:"authorityUpdateEndpointMetadata",AuthorityUpdateMetadataWithRegionalInformation:"authorityUpdateMetadataWithRegionalInformation",RegionDiscoveryDetectRegion:"regionDiscoveryDetectRegion",RegionDiscoveryGetRegionFromIMDS:"regionDiscoveryGetRegionFromIMDS",RegionDiscoveryGetCurrentVersion:"regionDiscoveryGetCurrentVersion",AcquireTokenByCodeAsync:"acquireTokenByCodeAsync",GetEndpointMetadataFromNetwork:"getEndpointMetadataFromNetwork",GetCloudDiscoveryMetadataFromNetworkMeasurement:"getCloudDiscoveryMetadataFromNetworkMeasurement",HandleRedirectPromiseMeasurement:"handleRedirectPromise",HandleNativeRedirectPromiseMeasurement:"handleNativeRedirectPromise",UpdateCloudDiscoveryMetadataMeasurement:"updateCloudDiscoveryMetadataMeasurement",UsernamePasswordClientAcquireToken:"usernamePasswordClientAcquireToken",NativeMessageHandlerHandshake:"nativeMessageHandlerHandshake",NativeGenerateAuthResult:"nativeGenerateAuthResult",RemoveHiddenIframe:"removeHiddenIframe",ClearTokensAndKeysWithClaims:"clearTokensAndKeysWithClaims",CacheManagerGetRefreshToken:"cacheManagerGetRefreshToken",ImportExistingCache:"importExistingCache",SetUserData:"setUserData",LocalStorageUpdated:"localStorageUpdated",GeneratePkceCodes:"generatePkceCodes",GenerateCodeVerifier:"generateCodeVerifier",GenerateCodeChallengeFromVerifier:"generateCodeChallengeFromVerifier",Sha256Digest:"sha256Digest",GetRandomValues:"getRandomValues",GenerateHKDF:"generateHKDF",GenerateBaseKey:"generateBaseKey",Base64Decode:"base64Decode",UrlEncodeArr:"urlEncodeArr",Encrypt:"encrypt",Decrypt:"decrypt",GenerateEarKey:"generateEarKey",DecryptEarResponse:"decryptEarResponse"},tQ2=new Map([[R8.AcquireTokenByCode,"ATByCode"],[R8.AcquireTokenByRefreshToken,"ATByRT"],[R8.AcquireTokenSilent,"ATS"],[R8.AcquireTokenSilentAsync,"ATSAsync"],[R8.AcquireTokenPopup,"ATPopup"],[R8.AcquireTokenRedirect,"ATRedirect"],[R8.CryptoOptsGetPublicKeyThumbprint,"CryptoGetPKThumb"],[R8.CryptoOptsSignJwt,"CryptoSignJwt"],[R8.SilentCacheClientAcquireToken,"SltCacheClientAT"],[R8.SilentIframeClientAcquireToken,"SltIframeClientAT"],[R8.SilentRefreshClientAcquireToken,"SltRClientAT"],[R8.SsoSilent,"SsoSlt"],[R8.StandardInteractionClientGetDiscoveredAuthority,"StdIntClientGetDiscAuth"],[R8.FetchAccountIdWithNativeBroker,"FetchAccIdWithNtvBroker"],[R8.NativeInteractionClientAcquireToken,"NtvIntClientAT"],[R8.BaseClientCreateTokenRequestHeaders,"BaseClientCreateTReqHead"],[R8.NetworkClientSendPostRequestAsync,"NetClientSendPost"],[R8.RefreshTokenClientExecutePostToTokenEndpoint,"RTClientExecPost"],[R8.AuthorizationCodeClientExecutePostToTokenEndpoint,"AuthCodeClientExecPost"],[R8.BrokerHandhshake,"BrokerHandshake"],[R8.AcquireTokenByRefreshTokenInBroker,"ATByRTInBroker"],[R8.AcquireTokenByBroker,"ATByBroker"],[R8.RefreshTokenClientExecuteTokenRequest,"RTClientExecTReq"],[R8.RefreshTokenClientAcquireToken,"RTClientAT"],[R8.RefreshTokenClientAcquireTokenWithCachedRefreshToken,"RTClientATWithCachedRT"],[R8.RefreshTokenClientAcquireTokenByRefreshToken,"RTClientATByRT"],[R8.RefreshTokenClientCreateTokenRequestBody,"RTClientCreateTReqBody"],[R8.AcquireTokenFromCache,"ATFromCache"],[R8.SilentFlowClientAcquireCachedToken,"SltFlowClientATCached"],[R8.SilentFlowClientGenerateResultFromCacheRecord,"SltFlowClientGenResFromCache"],[R8.AcquireTokenBySilentIframe,"ATBySltIframe"],[R8.InitializeBaseRequest,"InitBaseReq"],[R8.InitializeSilentRequest,"InitSltReq"],[R8.InitializeClientApplication,"InitClientApplication"],[R8.InitializeCache,"InitCache"],[R8.ImportExistingCache,"importCache"],[R8.SetUserData,"setUserData"],[R8.LocalStorageUpdated,"localStorageUpdated"],[R8.SilentIframeClientTokenHelper,"SIClientTHelper"],[R8.SilentHandlerInitiateAuthRequest,"SHandlerInitAuthReq"],[R8.SilentHandlerMonitorIframeForHash,"SltHandlerMonitorIframeForHash"],[R8.SilentHandlerLoadFrame,"SHandlerLoadFrame"],[R8.SilentHandlerLoadFrameSync,"SHandlerLoadFrameSync"],[R8.StandardInteractionClientCreateAuthCodeClient,"StdIntClientCreateAuthCodeClient"],[R8.StandardInteractionClientGetClientConfiguration,"StdIntClientGetClientConf"],[R8.StandardInteractionClientInitializeAuthorizationRequest,"StdIntClientInitAuthReq"],[R8.GetAuthCodeUrl,"GetAuthCodeUrl"],[R8.HandleCodeResponseFromServer,"HandleCodeResFromServer"],[R8.HandleCodeResponse,"HandleCodeResp"],[R8.HandleResponseEar,"HandleRespEar"],[R8.HandleResponseCode,"HandleRespCode"],[R8.HandleResponsePlatformBroker,"HandleRespPlatBroker"],[R8.UpdateTokenEndpointAuthority,"UpdTEndpointAuth"],[R8.AuthClientAcquireToken,"AuthClientAT"],[R8.AuthClientExecuteTokenRequest,"AuthClientExecTReq"],[R8.AuthClientCreateTokenRequestBody,"AuthClientCreateTReqBody"],[R8.PopTokenGenerateCnf,"PopTGenCnf"],[R8.PopTokenGenerateKid,"PopTGenKid"],[R8.HandleServerTokenResponse,"HandleServerTRes"],[R8.DeserializeResponse,"DeserializeRes"],[R8.AuthorityFactoryCreateDiscoveredInstance,"AuthFactCreateDiscInst"],[R8.AuthorityResolveEndpointsAsync,"AuthResolveEndpointsAsync"],[R8.AuthorityResolveEndpointsFromLocalSources,"AuthResolveEndpointsFromLocal"],[R8.AuthorityGetCloudDiscoveryMetadataFromNetwork,"AuthGetCDMetaFromNet"],[R8.AuthorityUpdateCloudDiscoveryMetadata,"AuthUpdCDMeta"],[R8.AuthorityGetEndpointMetadataFromNetwork,"AuthUpdCDMetaFromNet"],[R8.AuthorityUpdateEndpointMetadata,"AuthUpdEndpointMeta"],[R8.AuthorityUpdateMetadataWithRegionalInformation,"AuthUpdMetaWithRegInfo"],[R8.RegionDiscoveryDetectRegion,"RegDiscDetectReg"],[R8.RegionDiscoveryGetRegionFromIMDS,"RegDiscGetRegFromIMDS"],[R8.RegionDiscoveryGetCurrentVersion,"RegDiscGetCurrentVer"],[R8.AcquireTokenByCodeAsync,"ATByCodeAsync"],[R8.GetEndpointMetadataFromNetwork,"GetEndpointMetaFromNet"],[R8.GetCloudDiscoveryMetadataFromNetworkMeasurement,"GetCDMetaFromNet"],[R8.HandleRedirectPromiseMeasurement,"HandleRedirectPromise"],[R8.HandleNativeRedirectPromiseMeasurement,"HandleNtvRedirectPromise"],[R8.UpdateCloudDiscoveryMetadataMeasurement,"UpdateCDMeta"],[R8.UsernamePasswordClientAcquireToken,"UserPassClientAT"],[R8.NativeMessageHandlerHandshake,"NtvMsgHandlerHandshake"],[R8.NativeGenerateAuthResult,"NtvGenAuthRes"],[R8.RemoveHiddenIframe,"RemoveHiddenIframe"],[R8.ClearTokensAndKeysWithClaims,"ClearTAndKeysWithClaims"],[R8.CacheManagerGetRefreshToken,"CacheManagerGetRT"],[R8.GeneratePkceCodes,"GenPkceCodes"],[R8.GenerateCodeVerifier,"GenCodeVerifier"],[R8.GenerateCodeChallengeFromVerifier,"GenCodeChallengeFromVerifier"],[R8.Sha256Digest,"Sha256Digest"],[R8.GetRandomValues,"GetRandomValues"],[R8.GenerateHKDF,"genHKDF"],[R8.GenerateBaseKey,"genBaseKey"],[R8.Base64Decode,"b64Decode"],[R8.UrlEncodeArr,"urlEncArr"],[R8.Encrypt,"encrypt"],[R8.Decrypt,"decrypt"],[R8.GenerateEarKey,"genEarKey"],[R8.DecryptEarResponse,"decryptEarResp"]]),Bc7={NotStarted:0,InProgress:1,Completed:2}});class TW8{startMeasurement(){return}endMeasurement(){return}flushMeasurement(){return null}}class tW6{generateId(){return"callback-id"}startMeasurement(A,q){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:Bc7.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:A,startTimeMs:Date.now(),correlationId:q||""},measurement:new TW8}}startPerformanceMeasurement(){return new TW8}calculateQueuedTime(){return 0}addQueueMeasurement(){return}setPreQueueTime(){return}endMeasurement(){return null}discardMeasurements(){return}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){return}addFields(){return}incrementFields(){return}cacheEventByCorrelationId(){return}}var VW8=k(()=>{ub();/*! @azure/msal-common v15.13.1 2025-10-29 */});function mc7({authOptions:A,systemOptions:q,loggerOptions:K,cacheOptions:Y,storageInterface:z,networkInterface:w,cryptoInterface:_,clientCredentials:$,libraryInfo:O,telemetry:H,serverTelemetryManager:j,persistencePlugin:J,serializableCache:M}){let D={...DT9,...K};return{authOptions:TT9(A),systemOptions:{...MT9,...q},loggerOptions:D,cacheOptions:{...XT9,...Y},storageInterface:z||new AD1(A.clientId,lW6,new bN(D),new tW6),networkInterface:w||PT9,cryptoInterface:_||lW6,clientCredentials:$||ZT9,libraryInfo:{...WT9,...O},telemetry:{...fT9,...H},serverTelemetryManager:j||null,persistencePlugin:J||null,serializableCache:M||null}}function TT9(A){return{clientCapabilities:[],azureCloudOptions:GT9,skipAuthorityMetadataCache:!1,instanceAware:!1,encodeExtraQueryParams:!1,...A}}function qD1(A){return A.authOptions.authority.options.protocolMode===KG.OIDC}var MT9,DT9,XT9,PT9,WT9,ZT9,GT9,fT9;var KD1=k(()=>{$W8();cM1();P$();iM1();nM1();fW8();_Q6();dM();VW8();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */MT9={tokenRenewalOffsetSeconds:dW6,preventCorsPreflight:!1},DT9={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:pH.Info,correlationId:n8.EMPTY_STRING},XT9={claimsBasedCachingEnabled:!1},PT9={async sendGetRequestAsync(){throw JA(c5)},async sendPostRequestAsync(){throw JA(c5)}},WT9={sku:n8.SKU,version:iW6,cpu:n8.EMPTY_STRING,os:n8.EMPTY_STRING},ZT9={clientSecret:n8.EMPTY_STRING,clientAssertion:void 0},GT9={azureCloudInstance:Dl.None,tenant:`${n8.DEFAULT_COMMON_TENANT}`},fT9={application:{appName:"",appVersion:""}}});var wT;var jQ6=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */wT={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"}});var B96={};m1(B96,{X_MS_LIB_CAPABILITY:()=>pW8,X_CLIENT_VER:()=>mW8,X_CLIENT_SKU:()=>BW8,X_CLIENT_OS:()=>gW8,X_CLIENT_LAST_TELEM:()=>UW8,X_CLIENT_EXTRA_SKU:()=>IT9,X_CLIENT_CURR_TELEM:()=>QW8,X_CLIENT_CPU:()=>FW8,X_APP_VER:()=>cW8,X_APP_NAME:()=>dW8,TOKEN_TYPE:()=>zD1,STATE:()=>RW8,SID:()=>qZ8,SESSION_STATE:()=>yT9,SCOPE:()=>LW8,RETURN_SPA_CODE:()=>_D1,RESPONSE_TYPE:()=>NW8,RESPONSE_MODE:()=>vW8,REQ_CNF:()=>wD1,REQUESTED_TOKEN_USE:()=>tW8,REFRESH_TOKEN_EXPIRES_IN:()=>LT9,REFRESH_TOKEN:()=>yW8,REDIRECT_URI:()=>YD1,PROMPT:()=>CW8,POST_LOGOUT_URI:()=>lW8,ON_BEHALF_OF:()=>ST9,OBO_ASSERTION:()=>sW8,NONCE:()=>SW8,NATIVE_BROKER:()=>eW8,LOGOUT_HINT:()=>AZ8,LOGIN_HINT:()=>KZ8,INSTANCE_AWARE:()=>eW6,ID_TOKEN_HINT:()=>iW8,ID_TOKEN:()=>kT9,GRANT_TYPE:()=>kW8,FOCI:()=>CT9,EXPIRES_IN:()=>ET9,ERROR_DESCRIPTION:()=>NT9,ERROR:()=>VT9,EAR_JWK:()=>zZ8,EAR_JWE_CRYPTO:()=>wZ8,DOMAIN_HINT:()=>YZ8,DEVICE_CODE:()=>nW8,CODE_VERIFIER:()=>xW8,CODE_CHALLENGE_METHOD:()=>bW8,CODE_CHALLENGE:()=>IW8,CODE:()=>hW8,CLIENT_SECRET:()=>rW8,CLIENT_REQUEST_ID:()=>uW8,CLIENT_INFO:()=>RT9,CLIENT_ID:()=>ng,CLIENT_ASSERTION_TYPE:()=>aW8,CLIENT_ASSERTION:()=>oW8,CLAIMS:()=>EW8,CCS_HEADER:()=>hT9,BROKER_REDIRECT_URI:()=>$D1,BROKER_CLIENT_ID:()=>JQ6,ACCESS_TOKEN:()=>vT9});var ng="client_id",YD1="redirect_uri",NW8="response_type",vW8="response_mode",kW8="grant_type",EW8="claims",LW8="scope",VT9="error",NT9="error_description",vT9="access_token",kT9="id_token",yW8="refresh_token",ET9="expires_in",LT9="refresh_token_expires_in",RW8="state",SW8="nonce",CW8="prompt",yT9="session_state",RT9="client_info",hW8="code",IW8="code_challenge",bW8="code_challenge_method",xW8="code_verifier",uW8="client-request-id",BW8="x-client-SKU",mW8="x-client-VER",gW8="x-client-OS",FW8="x-client-CPU",QW8="x-client-current-telemetry",UW8="x-client-last-telemetry",pW8="x-ms-lib-capability",dW8="x-app-name",cW8="x-app-ver",lW8="post_logout_redirect_uri",iW8="id_token_hint",nW8="device_code",rW8="client_secret",oW8="client_assertion",aW8="client_assertion_type",zD1="token_type",wD1="req_cnf",sW8="assertion",tW8="requested_token_use",ST9="on_behalf_of",CT9="foci",hT9="X-AnchorMailbox",_D1="return_spa_code",eW8="nativebroker",AZ8="logout_hint",qZ8="sid",KZ8="login_hint",YZ8="domain_hint",IT9="x-client-xtra-sku",JQ6="brk_client_id",$D1="brk_redirect_uri",eW6="instance_aware",zZ8="ear_jwk",wZ8="ear_jwe_crypto";var AZ6=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});var P4={};m1(P4,{instrumentBrokerParams:()=>m96,addUsername:()=>FT9,addThrottling:()=>vQ6,addState:()=>XQ6,addSshJwk:()=>VQ6,addSid:()=>OD1,addServerTelemetry:()=>NQ6,addScopes:()=>g96,addResponseType:()=>bT9,addResponseMode:()=>_Z8,addRequestTokenUse:()=>gT9,addRefreshToken:()=>DZ8,addRedirectUri:()=>Q96,addPrompt:()=>jZ8,addPostLogoutRedirectUri:()=>$Z8,addPostBodyParameters:()=>pT9,addPopToken:()=>TQ6,addPassword:()=>QT9,addOboAssertion:()=>mT9,addNonce:()=>JZ8,addNativeBroker:()=>xT9,addLogoutHint:()=>PZ8,addLoginHint:()=>qZ6,addLibraryInfo:()=>MQ6,addInstanceAware:()=>fQ6,addIdTokenHint:()=>OZ8,addGrantType:()=>GQ6,addExtraQueryParameters:()=>Gl,addEARParameters:()=>UT9,addDomainHint:()=>HZ8,addDeviceCode:()=>BT9,addCorrelationId:()=>p96,addCodeVerifier:()=>XZ8,addCodeChallengeParams:()=>uT9,addClientSecret:()=>PQ6,addClientInfo:()=>d96,addClientId:()=>F96,addClientCapabilitiesToClaims:()=>gc7,addClientAssertionType:()=>ZQ6,addClientAssertion:()=>WQ6,addClaims:()=>U96,addCcsUpn:()=>ce,addCcsOid:()=>Zl,addBrokerParameters:()=>fl,addAuthorizationCode:()=>MZ8,addApplicationTelemetry:()=>DQ6});function m96(A,q,K){if(!q)return;let Y=A.get(ng);if(Y&&A.has(JQ6))K?.addFields({embeddedClientId:Y,embeddedRedirectUri:A.get(YD1)},q)}function bT9(A,q){A.set(NW8,q)}function _Z8(A,q){A.set(vW8,q?q:pg.QUERY)}function xT9(A){A.set(eW8,"1")}function g96(A,q,K=!0,Y=qG){if(K&&!Y.includes("openid")&&!q.includes("openid"))Y.push("openid");let z=K?[...q||[],...Y]:q||[],w=new pj(z);A.set(LW8,w.printScopes())}function F96(A,q){A.set(ng,q)}function Q96(A,q){A.set(YD1,q)}function $Z8(A,q){A.set(lW8,q)}function OZ8(A,q){A.set(iW8,q)}function HZ8(A,q){A.set(YZ8,q)}function qZ6(A,q){A.set(KZ8,q)}function ce(A,q){A.set(X$.CCS_HEADER,`UPN:${q}`)}function Zl(A,q){A.set(X$.CCS_HEADER,`Oid:${q.uid}@${q.utid}`)}function OD1(A,q){A.set(qZ8,q)}function U96(A,q,K){let Y=gc7(q,K);try{JSON.parse(Y)}catch(z){throw n2(Fe)}A.set(EW8,Y)}function p96(A,q){A.set(uW8,q)}function MQ6(A,q){if(A.set(BW8,q.sku),A.set(mW8,q.version),q.os)A.set(gW8,q.os);if(q.cpu)A.set(FW8,q.cpu)}function DQ6(A,q){if(q?.appName)A.set(dW8,q.appName);if(q?.appVersion)A.set(cW8,q.appVersion)}function jZ8(A,q){A.set(CW8,q)}function XQ6(A,q){if(q)A.set(RW8,q)}function JZ8(A,q){A.set(SW8,q)}function uT9(A,q,K){if(q&&K)A.set(IW8,q),A.set(bW8,K);else throw n2(h96)}function MZ8(A,q){A.set(hW8,q)}function BT9(A,q){A.set(nW8,q)}function DZ8(A,q){A.set(yW8,q)}function XZ8(A,q){A.set(xW8,q)}function PQ6(A,q){A.set(rW8,q)}function WQ6(A,q){if(q)A.set(oW8,q)}function ZQ6(A,q){if(q)A.set(aW8,q)}function mT9(A,q){A.set(sW8,q)}function gT9(A,q){A.set(tW8,q)}function GQ6(A,q){A.set(kW8,q)}function d96(A){A.set(kc7,"1")}function fQ6(A){if(!A.has(eW6))A.set(eW6,"true")}function Gl(A,q){Object.entries(q).forEach(([K,Y])=>{if(!A.has(K)&&Y)A.set(K,Y)})}function gc7(A,q){let K;if(!A)K={};else try{K=JSON.parse(A)}catch(Y){throw n2(Fe)}if(q&&q.length>0){if(!K.hasOwnProperty(w96.ACCESS_TOKEN))K[w96.ACCESS_TOKEN]={};K[w96.ACCESS_TOKEN][w96.XMS_CC]={values:q}}return JSON.stringify(K)}function FT9(A,q){A.set(CF6.username,q)}function QT9(A,q){A.set(CF6.password,q)}function TQ6(A,q){if(q)A.set(zD1,AY.POP),A.set(wD1,q)}function VQ6(A,q){if(q)A.set(zD1,AY.SSH),A.set(wD1,q)}function NQ6(A,q){A.set(QW8,q.generateCurrentRequestHeaderValue()),A.set(UW8,q.generateLastRequestHeaderValue())}function vQ6(A){A.set(pW8,dg.X_MS_LIB_CAPABILITY_VALUE)}function PZ8(A,q){A.set(AZ8,q)}function fl(A,q,K){if(!A.has(JQ6))A.set(JQ6,q);if(!A.has($D1))A.set($D1,K)}function UT9(A,q){A.set(zZ8,encodeURIComponent(q));let K="eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0";A.set(wZ8,K)}function pT9(A,q){Object.entries(q).forEach(([K,Y])=>{if(Y)A.set(K,Y)})}var KZ6=k(()=>{P$();AZ6();zQ6();Ue();Pl();/*! @azure/msal-common v15.13.1 2025-10-29 */});function Fc7(A){return A.hasOwnProperty("authorization_endpoint")&&A.hasOwnProperty("token_endpoint")&&A.hasOwnProperty("issuer")&&A.hasOwnProperty("jwks_uri")}var Qc7=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});function Uc7(A){return A.hasOwnProperty("tenant_discovery_endpoint")&&A.hasOwnProperty("metadata")}var pc7=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});function dc7(A){return A.hasOwnProperty("error")&&A.hasOwnProperty("error_description")}var cc7=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});var lc7=(A,q,K,Y,z)=>{return(...w)=>{K.trace(`Executing function ${q}`);let _=Y?.startMeasurement(q,z);if(z){let $=q+"CallCount";Y?.incrementFields({[$]:1},z)}try{let $=A(...w);return _?.end({success:!0}),K.trace(`Returning result from ${q}`),$}catch($){K.trace(`Error occurred in ${q}`);try{K.trace(JSON.stringify($))}catch(O){K.trace("Unable to print error message.")}throw _?.end({success:!1},$),$}}},vY=(A,q,K,Y,z)=>{return(...w)=>{K.trace(`Executing function ${q}`);let _=Y?.startMeasurement(q,z);if(z){let $=q+"CallCount";Y?.incrementFields({[$]:1},z)}return Y?.setPreQueueTime(q,z),A(...w).then(($)=>{return K.trace(`Returning result from ${q}`),_?.end({success:!0}),$}).catch(($)=>{K.trace(`Error occurred in ${q}`);try{K.trace(JSON.stringify($))}catch(O){K.trace("Unable to print error message.")}throw _?.end({success:!1},$),$})}};var Tl=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});class kQ6{constructor(A,q,K,Y){this.networkInterface=A,this.logger=q,this.performanceClient=K,this.correlationId=Y}async detectRegion(A,q){this.performanceClient?.addQueueMeasurement(R8.RegionDiscoveryDetectRegion,this.correlationId);let K=A;if(!K){let Y=kQ6.IMDS_OPTIONS;try{let z=await vY(this.getRegionFromIMDS.bind(this),R8.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(n8.IMDS_VERSION,Y);if(z.status===d3.SUCCESS)K=z.body,q.region_source=$96.IMDS;if(z.status===d3.BAD_REQUEST){let w=await vY(this.getCurrentVersion.bind(this),R8.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(Y);if(!w)return q.region_source=$96.FAILED_AUTO_DETECTION,null;let _=await vY(this.getRegionFromIMDS.bind(this),R8.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(w,Y);if(_.status===d3.SUCCESS)K=_.body,q.region_source=$96.IMDS}}catch(z){return q.region_source=$96.FAILED_AUTO_DETECTION,null}}else q.region_source=$96.ENVIRONMENT_VARIABLE;if(!K)q.region_source=$96.FAILED_AUTO_DETECTION;return K||null}async getRegionFromIMDS(A,q){return this.performanceClient?.addQueueMeasurement(R8.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${n8.IMDS_ENDPOINT}?api-version=${A}&format=text`,q,n8.IMDS_TIMEOUT)}async getCurrentVersion(A){this.performanceClient?.addQueueMeasurement(R8.RegionDiscoveryGetCurrentVersion,this.correlationId);try{let q=await this.networkInterface.sendGetRequestAsync(`${n8.IMDS_ENDPOINT}?format=json`,A);if(q.status===d3.BAD_REQUEST&&q.body&&q.body["newest-versions"]&&q.body["newest-versions"].length>0)return q.body["newest-versions"][0];return null}catch(q){return null}}}var ic7=k(()=>{P$();ub();Tl();/*! @azure/msal-common v15.13.1 2025-10-29 */kQ6.IMDS_OPTIONS={headers:{Metadata:"true"}}});var zO={};m1(zO,{wasClockTurnedBack:()=>WZ8,toSecondsFromDate:()=>dT9,toDateFromSeconds:()=>EQ6,nowSeconds:()=>xE,isTokenExpired:()=>YZ6,isCacheExpired:()=>cT9,delay:()=>lT9});function xE(){return Math.round(new Date().getTime()/1000)}function dT9(A){return A.getTime()/1000}function EQ6(A){if(A)return new Date(Number(A)*1000);return new Date}function YZ6(A,q){let K=Number(A)||0;return xE()+q>K}function cT9(A,q){let K=Number(A)+q*24*60*60*1000;return Date.now()>K}function WZ8(A){return Number(A)>xE()}function lT9(A,q){return new Promise((K)=>setTimeout(()=>K(q),A))}var le=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});var _T={};m1(_T,{updateCloudDiscoveryMetadata:()=>LQ6,updateAuthorityEndpointMetadata:()=>zZ6,isThrottlingEntity:()=>aT9,isServerTelemetryEntity:()=>oT9,isRefreshTokenEntity:()=>rT9,isIdTokenEntity:()=>nT9,isCredentialEntity:()=>HD1,isAuthorityMetadataExpired:()=>JD1,isAuthorityMetadataEntity:()=>eT9,isAppMetadataEntity:()=>tT9,isAccessTokenEntity:()=>iT9,generateAuthorityMetadataExpiresAt:()=>jD1,generateAppMetadataKey:()=>sT9,createRefreshTokenEntity:()=>fZ8,createIdTokenEntity:()=>ZZ8,createAccessTokenEntity:()=>GZ8});function ZZ8(A,q,K,Y,z){return{credentialType:iw.ID_TOKEN,homeAccountId:A,environment:q,clientId:Y,secret:K,realm:z,lastUpdatedAt:Date.now().toString()}}function GZ8(A,q,K,Y,z,w,_,$,O,H,j,J,M,D,X){let P={homeAccountId:A,credentialType:iw.ACCESS_TOKEN,secret:K,cachedAt:xE().toString(),expiresOn:_.toString(),extendedExpiresOn:$.toString(),environment:q,clientId:Y,realm:z,target:w,tokenType:j||AY.BEARER,lastUpdatedAt:Date.now().toString()};if(J)P.userAssertionHash=J;if(H)P.refreshOn=H.toString();if(D)P.requestedClaims=D,P.requestedClaimsHash=X;if(P.tokenType?.toLowerCase()!==AY.BEARER.toLowerCase())switch(P.credentialType=iw.ACCESS_TOKEN_WITH_AUTH_SCHEME,P.tokenType){case AY.POP:let W=Wl(K,O);if(!W?.cnf?.kid)throw JA(V96);P.keyId=W.cnf.kid;break;case AY.SSH:P.keyId=M}return P}function fZ8(A,q,K,Y,z,w,_){let $={credentialType:iw.REFRESH_TOKEN,homeAccountId:A,environment:q,clientId:Y,secret:K,lastUpdatedAt:Date.now().toString()};if(w)$.userAssertionHash=w;if(z)$.familyId=z;if(_)$.expiresOn=_.toString();return $}function HD1(A){return A.hasOwnProperty("homeAccountId")&&A.hasOwnProperty("environment")&&A.hasOwnProperty("credentialType")&&A.hasOwnProperty("clientId")&&A.hasOwnProperty("secret")}function iT9(A){if(!A)return!1;return HD1(A)&&A.hasOwnProperty("realm")&&A.hasOwnProperty("target")&&(A.credentialType===iw.ACCESS_TOKEN||A.credentialType===iw.ACCESS_TOKEN_WITH_AUTH_SCHEME)}function nT9(A){if(!A)return!1;return HD1(A)&&A.hasOwnProperty("realm")&&A.credentialType===iw.ID_TOKEN}function rT9(A){if(!A)return!1;return HD1(A)&&A.credentialType===iw.REFRESH_TOKEN}function oT9(A,q){let K=A.indexOf(nD.CACHE_KEY)===0,Y=!0;if(q)Y=q.hasOwnProperty("failedRequests")&&q.hasOwnProperty("errors")&&q.hasOwnProperty("cacheHits");return K&&Y}function aT9(A,q){let K=!1;if(A)K=A.indexOf(dg.THROTTLING_PREFIX)===0;let Y=!0;if(q)Y=q.hasOwnProperty("throttleTime");return K&&Y}function sT9({environment:A,clientId:q}){return[RF6,A,q].join(Ol.CACHE_KEY_SEPARATOR).toLowerCase()}function tT9(A,q){if(!q)return!1;return A.indexOf(RF6)===0&&q.hasOwnProperty("clientId")&&q.hasOwnProperty("environment")}function eT9(A,q){if(!q)return!1;return A.indexOf(pW6.CACHE_KEY)===0&&q.hasOwnProperty("aliases")&&q.hasOwnProperty("preferred_cache")&&q.hasOwnProperty("preferred_network")&&q.hasOwnProperty("canonical_authority")&&q.hasOwnProperty("authorization_endpoint")&&q.hasOwnProperty("token_endpoint")&&q.hasOwnProperty("issuer")&&q.hasOwnProperty("aliasesFromNetwork")&&q.hasOwnProperty("endpointsFromNetwork")&&q.hasOwnProperty("expiresAt")&&q.hasOwnProperty("jwks_uri")}function jD1(){return xE()+pW6.REFRESH_TIME_SECONDS}function zZ6(A,q,K){A.authorization_endpoint=q.authorization_endpoint,A.token_endpoint=q.token_endpoint,A.end_session_endpoint=q.end_session_endpoint,A.issuer=q.issuer,A.endpointsFromNetwork=K,A.jwks_uri=q.jwks_uri}function LQ6(A,q,K){A.aliases=q.aliases,A.preferred_cache=q.preferred_cache,A.preferred_network=q.preferred_network,A.aliasesFromNetwork=K}function JD1(A){return A.expiresAt<=xE()}var MD1=k(()=>{sW6();dM();P$();le();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */});class rD{constructor(A,q,K,Y,z,w,_,$){this.canonicalAuthority=A,this._canonicalAuthority.validateAsUri(),this.networkInterface=q,this.cacheManager=K,this.authorityOptions=Y,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=z,this.performanceClient=_,this.correlationId=w,this.managedIdentity=$||!1,this.regionDiscovery=new kQ6(q,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(A){if(A.HostNameAndPort.endsWith(n8.CIAM_AUTH_URL))return JS.Ciam;let q=A.PathSegments;if(q.length)switch(q[0].toLowerCase()){case n8.ADFS:return JS.Adfs;case n8.DSTS:return JS.Dsts}return JS.Default}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(A){this._canonicalAuthority=new D5(A),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){if(!this._canonicalAuthorityUrlComponents)this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents();return this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);else throw JA(zT)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);else throw JA(zT)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));else throw JA(zT)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw JA(v96);return this.replacePath(this.metadata.end_session_endpoint)}else throw JA(zT)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);else throw JA(zT)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);else throw JA(zT)}canReplaceTenant(A){return A.PathSegments.length===1&&!rD.reservedTenantDomains.has(A.PathSegments[0])&&this.getAuthorityType(A)===JS.Default&&this.protocolMode!==KG.OIDC}replaceTenant(A){return A.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(A){let q=A,Y=new D5(this.metadata.canonical_authority).getUrlComponents(),z=Y.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((_,$)=>{let O=z[$];if($===0&&this.canReplaceTenant(Y)){let H=new D5(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];if(O!==H)this.logger.verbose(`Replacing tenant domain name ${O} with id ${H}`),O=H}if(_!==O)q=q.replace(`/${O}/`,`/${_}/`)}),this.replaceTenant(q)}get defaultOpenIdConfigurationEndpoint(){let A=this.hostnameAndPort;if(this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===JS.Adfs||this.protocolMode===KG.OIDC&&!this.isAliasOfKnownMicrosoftAuthority(A))return`${this.canonicalAuthority}.well-known/openid-configuration`;return`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){this.performanceClient?.addQueueMeasurement(R8.AuthorityResolveEndpointsAsync,this.correlationId);let A=this.getCurrentMetadataEntity(),q=await vY(this.updateCloudDiscoveryMetadata.bind(this),R8.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(A);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,A.preferred_network);let K=await vY(this.updateEndpointMetadata.bind(this),R8.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(A);this.updateCachedMetadata(A,q,{source:K}),this.performanceClient?.addFields({cloudDiscoverySource:q,authorityEndpointSource:K},this.correlationId)}getCurrentMetadataEntity(){let A=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);if(!A)A={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:jD1(),jwks_uri:""};return A}updateCachedMetadata(A,q,K){if(q!==YT.CACHE&&K?.source!==YT.CACHE)A.expiresAt=jD1(),A.canonical_authority=this.canonicalAuthority;let Y=this.cacheManager.generateAuthorityMetadataCacheKey(A.preferred_cache);this.cacheManager.setAuthorityMetadata(Y,A),this.metadata=A}async updateEndpointMetadata(A){this.performanceClient?.addQueueMeasurement(R8.AuthorityUpdateEndpointMetadata,this.correlationId);let q=this.updateEndpointMetadataFromLocalSources(A);if(q){if(q.source===YT.HARDCODED_VALUES){if(this.authorityOptions.azureRegionConfiguration?.azureRegion){if(q.metadata){let Y=await vY(this.updateMetadataWithRegionalInformation.bind(this),R8.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(q.metadata);zZ6(A,Y,!1),A.canonical_authority=this.canonicalAuthority}}}return q.source}let K=await vY(this.getEndpointMetadataFromNetwork.bind(this),R8.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(K){if(this.authorityOptions.azureRegionConfiguration?.azureRegion)K=await vY(this.updateMetadataWithRegionalInformation.bind(this),R8.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(K);return zZ6(A,K,!0),YT.NETWORK}else throw JA(J96,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(A){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");let q=this.getEndpointMetadataFromConfig();if(q)return this.logger.verbose("Found endpoint metadata in authority configuration"),zZ6(A,q,!1),{source:YT.CONFIG};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{let Y=this.getEndpointMetadataFromHardcodedValues();if(Y)return zZ6(A,Y,!1),{source:YT.HARDCODED_VALUES,metadata:Y};else this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}let K=JD1(A);if(this.isAuthoritySameType(A)&&A.endpointsFromNetwork&&!K)return this.logger.verbose("Found endpoint metadata in the cache."),{source:YT.CACHE};else if(K)this.logger.verbose("The metadata entity is expired.");return null}isAuthoritySameType(A){return new D5(A.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch(A){throw n2(I96)}return null}async getEndpointMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(R8.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);let A={},q=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${q}`);try{let K=await this.networkInterface.sendGetRequestAsync(q,A);if(Fc7(K.body))return K.body;else return this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null}catch(K){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${K}`),null}}getEndpointMetadataFromHardcodedValues(){if(this.hostnameAndPort in DW8)return DW8[this.hostnameAndPort];return null}async updateMetadataWithRegionalInformation(A){this.performanceClient?.addQueueMeasurement(R8.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);let q=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(q){if(q!==n8.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=pM1.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=q,rD.replaceWithRegionalInformation(A,q);let K=await vY(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),R8.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(K)return this.regionDiscoveryMetadata.region_outcome=pM1.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=K,rD.replaceWithRegionalInformation(A,K);this.regionDiscoveryMetadata.region_outcome=pM1.AUTO_DETECTION_REQUESTED_FAILED}return A}async updateCloudDiscoveryMetadata(A){this.performanceClient?.addQueueMeasurement(R8.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);let q=this.updateCloudDiscoveryMetadataFromLocalSources(A);if(q)return q;let K=await vY(this.getCloudDiscoveryMetadataFromNetwork.bind(this),R8.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(K)return LQ6(A,K,!0),YT.NETWORK;throw n2(b96)}updateCloudDiscoveryMetadataFromLocalSources(A){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||n8.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||n8.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${A.canonical_authority||n8.NOT_APPLICABLE}`);let q=this.getCloudDiscoveryMetadataFromConfig();if(q)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),LQ6(A,q,!1),YT.CONFIG;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{let Y=Ic7(this.hostnameAndPort);if(Y)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),LQ6(A,Y,!1),YT.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}let K=JD1(A);if(this.isAuthoritySameType(A)&&A.aliasesFromNetwork&&!K)return this.logger.verbose("Found cloud discovery metadata in the cache."),YT.CACHE;else if(K)this.logger.verbose("The metadata entity is expired.");return null}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===JS.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),rD.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");let A=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),q=OQ6(A.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),q)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),q;else this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch(A){throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),n2(Qe)}}if(this.isInKnownAuthorities())return this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),rD.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);return null}async getCloudDiscoveryMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(R8.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);let A=`${n8.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,q={},K=null;try{let Y=await this.networkInterface.sendGetRequestAsync(A,q),z,w;if(Uc7(Y.body))z=Y.body,w=z.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${z.tenant_discovery_endpoint}`);else if(dc7(Y.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${Y.status}`),z=Y.body,z.error===n8.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${z.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${z.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),w=[]}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),K=OQ6(w,this.hostnameAndPort)}catch(Y){if(Y instanceof c3)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata. Error: ${Y.errorCode} Error Description: ${Y.errorMessage}`);else{let z=Y;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata. Error: ${z.name} Error Description: ${z.message}`)}return null}if(!K)this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),K=rD.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);return K}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter((q)=>{return q&&D5.getDomainFromUrl(q).toLowerCase()===this.hostnameAndPort}).length>0}static generateAuthority(A,q){let K;if(q&&q.azureCloudInstance!==Dl.None){let Y=q.tenant?q.tenant:n8.DEFAULT_COMMON_TENANT;K=`${q.azureCloudInstance}/${Y}/`}return K?K:A}static createCloudDiscoveryMetadataFromHost(A){return{preferred_network:A,preferred_cache:A,aliases:[A]}}getPreferredCache(){if(this.managedIdentity)return n8.DEFAULT_AUTHORITY_HOST;else if(this.discoveryComplete())return this.metadata.preferred_cache;else throw JA(zT)}isAlias(A){return this.metadata.aliases.indexOf(A)>-1}isAliasOfKnownMicrosoftAuthority(A){return PW8.has(A)}static isPublicCloudAuthority(A){return n8.KNOWN_PUBLIC_CLOUDS.indexOf(A)>=0}static buildRegionalAuthorityString(A,q,K){let Y=new D5(A);Y.validateAsUri();let z=Y.getUrlComponents(),w=`${q}.${z.HostNameAndPort}`;if(this.isPublicCloudAuthority(z.HostNameAndPort))w=`${q}.${n8.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`;let _=D5.constructAuthorityUriFromObject({...Y.getUrlComponents(),HostNameAndPort:w}).urlString;if(K)return`${_}?${K}`;return _}static replaceWithRegionalInformation(A,q){let K={...A};if(K.authorization_endpoint=rD.buildRegionalAuthorityString(K.authorization_endpoint,q),K.token_endpoint=rD.buildRegionalAuthorityString(K.token_endpoint,q),K.end_session_endpoint)K.end_session_endpoint=rD.buildRegionalAuthorityString(K.end_session_endpoint,q);return K}static transformCIAMAuthority(A){let q=A,Y=new D5(A).getUrlComponents();if(Y.PathSegments.length===0&&Y.HostNameAndPort.endsWith(n8.CIAM_AUTH_URL)){let z=Y.HostNameAndPort.split(".")[0];q=`${q}${z}${n8.AAD_TENANT_DOMAIN_SUFFIX}`}return q}}function nc7(A){let Y=new D5(A).getUrlComponents().PathSegments.slice(-1)[0]?.toLowerCase();switch(Y){case hN.COMMON:case hN.ORGANIZATIONS:case hN.CONSUMERS:return;default:return Y}}function DD1(A){return A.endsWith(n8.FORWARD_SLASH)?A:`${A}${n8.FORWARD_SLASH}`}function TZ8(A){let q=A.cloudDiscoveryMetadata,K=void 0;if(q)try{K=JSON.parse(q)}catch(Y){throw n2(Qe)}return{canonicalAuthority:A.authority?DD1(A.authority):void 0,knownAuthorities:A.knownAuthorities,cloudDiscoveryMetadata:K}}var XD1=k(()=>{HW8();Qc7();de();dM();P$();WW8();Ue();_Q6();nM1();pc7();cc7();ic7();jS();ub();Tl();MD1();RJ();Pl();/*! @azure/msal-common v15.13.1 2025-10-29 */rD.reservedTenantDomains=new Set(["{tenant}","{tenantid}",hN.COMMON,hN.CONSUMERS,hN.ORGANIZATIONS])});var PD1={};m1(PD1,{createDiscoveredInstance:()=>VZ8});async function VZ8(A,q,K,Y,z,w,_){_?.addQueueMeasurement(R8.AuthorityFactoryCreateDiscoveredInstance,w);let $=rD.transformCIAMAuthority(DD1(A)),O=new rD($,q,K,Y,z,w,_);try{return await vY(O.resolveEndpointsAsync.bind(O),R8.AuthorityResolveEndpointsAsync,z,_,w)(),O}catch(H){throw JA(zT)}}var NZ8=k(()=>{XD1();dM();ub();Tl();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */});var $T;var wZ6=k(()=>{jS();/*! @azure/msal-common v15.13.1 2025-10-29 */$T=class $T extends c3{constructor(A,q,K,Y,z){super(A,q,K);this.name="ServerError",this.errorNo=Y,this.status=z,Object.setPrototypeOf(this,$T.prototype)}}});function _Z6(A,q,K){return{clientId:A,authority:q.authority,scopes:q.scopes,homeAccountIdentifier:K,claims:q.claims,authenticationScheme:q.authenticationScheme,resourceRequestMethod:q.resourceRequestMethod,resourceRequestUri:q.resourceRequestUri,shrClaims:q.shrClaims,sshKid:q.sshKid,embeddedClientId:q.embeddedClientId||q.tokenBodyParameters?.clientId}}var WD1=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});class Vl{static generateThrottlingStorageKey(A){return`${dg.THROTTLING_PREFIX}.${JSON.stringify(A)}`}static preProcess(A,q,K){let Y=Vl.generateThrottlingStorageKey(q),z=A.getThrottlingCache(Y);if(z){if(z.throttleTime=500&&A.status<600}static checkResponseForRetryAfter(A){if(A.headers)return A.headers.hasOwnProperty(X$.RETRY_AFTER)&&(A.status<200||A.status>=300);return!1}static calculateThrottleTime(A){let q=A<=0?0:A,K=Date.now()/1000;return Math.floor(Math.min(K+(q||dg.DEFAULT_THROTTLE_TIME_SECONDS),K+dg.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1000)}static removeThrottle(A,q,K,Y){let z=_Z6(q,K,Y),w=this.generateThrottlingStorageKey(z);A.removeItem(w,K.correlationId)}}var rc7=k(()=>{P$();wZ6();WD1();/*! @azure/msal-common v15.13.1 2025-10-29 */});var ZD1;var oc7=k(()=>{jS();/*! @azure/msal-common v15.13.1 2025-10-29 */ZD1=class ZD1 extends c3{constructor(A,q,K){super(A.errorCode,A.errorMessage,A.subError);Object.setPrototypeOf(this,ZD1.prototype),this.name="NetworkError",this.error=A,this.httpStatus=q,this.responseHeaders=K}}});class YG{constructor(A,q){this.config=mc7(A),this.logger=new bN(this.config.loggerOptions,lM1,iW6),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=q}createTokenRequestHeaders(A){let q={};if(q[X$.CONTENT_TYPE]=n8.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&A)switch(A.type){case wT.HOME_ACCOUNT_ID:try{let K=lg(A.credential);q[X$.CCS_HEADER]=`Oid:${K.uid}@${K.utid}`}catch(K){this.logger.verbose("Could not parse home account ID for CCS Header: "+K)}break;case wT.UPN:q[X$.CCS_HEADER]=`UPN: ${A.credential}`;break}return q}async executePostToTokenEndpoint(A,q,K,Y,z,w){if(w)this.performanceClient?.addQueueMeasurement(w,z);let _=await this.sendPostRequest(Y,A,{body:q,headers:K},z);if(this.config.serverTelemetryManager&&_.status<500&&_.status!==429)this.config.serverTelemetryManager.clearTelemetryCache();return _}async sendPostRequest(A,q,K,Y){Vl.preProcess(this.cacheManager,A,Y);let z;try{z=await vY(this.networkClient.sendPostRequestAsync.bind(this.networkClient),R8.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,Y)(q,K);let w=z.headers||{};this.performanceClient?.addFields({refreshTokenSize:z.body.refresh_token?.length||0,httpVerToken:w[X$.X_MS_HTTP_VERSION]||"",requestId:w[X$.X_MS_REQUEST_ID]||""},Y)}catch(w){if(w instanceof ZD1){let _=w.responseHeaders;if(_)this.performanceClient?.addFields({httpVerToken:_[X$.X_MS_HTTP_VERSION]||"",requestId:_[X$.X_MS_REQUEST_ID]||"",contentTypeHeader:_[X$.CONTENT_TYPE]||void 0,contentLengthHeader:_[X$.CONTENT_LENGTH]||void 0,httpStatus:w.httpStatus},Y);throw w.error}if(w instanceof c3)throw w;else throw JA(j96)}return Vl.postProcess(this.cacheManager,A,z,Y),z}async updateAuthority(A,q){this.performanceClient?.addQueueMeasurement(R8.UpdateTokenEndpointAuthority,q);let K=`https://${A}/${this.authority.tenant}/`,Y=await VZ8(K,this.networkClient,this.cacheManager,this.authority.options,this.logger,q,this.performanceClient);this.authority=Y}createTokenQueryParameters(A){let q=new Map;if(A.embeddedClientId)fl(q,this.config.authOptions.clientId,this.config.authOptions.redirectUri);if(A.tokenQueryParameters)Gl(q,A.tokenQueryParameters);return p96(q,A.correlationId),m96(q,A.correlationId,this.performanceClient),ig(q)}}var yQ6=k(()=>{KD1();cM1();P$();iM1();jQ6();aW6();KZ6();x96();NZ8();ub();rc7();jS();dM();oc7();Tl();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */});var fD1={};m1(fD1,{uxNotAllowed:()=>GD1,refreshTokenExpired:()=>SQ6,noTokensFound:()=>ie,nativeAccountUnavailable:()=>RQ6,loginRequired:()=>EZ8,interactionRequired:()=>vZ8,consentRequired:()=>kZ8,badToken:()=>ne});var ie="no_tokens_found",RQ6="native_account_unavailable",SQ6="refresh_token_expired",GD1="ux_not_allowed",vZ8="interaction_required",kZ8="consent_required",EZ8="login_required",ne="bad_token";var TD1=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});function ND1(A,q,K){let Y=!!A&&ac7.indexOf(A)>-1,z=!!K&&AV9.indexOf(K)>-1,w=!!q&&ac7.some((_)=>{return q.indexOf(_)>-1});return Y||w||z}function vD1(A){return new uE(A,VD1[A])}var ac7,AV9,VD1,LZ8,uE;var CQ6=k(()=>{P$();jS();TD1();/*! @azure/msal-common v15.13.1 2025-10-29 */ac7=[vZ8,kZ8,EZ8,ne,GD1],AV9=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],VD1={[ie]:"No refresh token found in the cache. Please sign-in.",[RQ6]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[SQ6]:"Refresh token has expired.",[ne]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",[GD1]:"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve."},LZ8={noTokensFoundError:{code:ie,desc:VD1[ie]},native_account_unavailable:{code:RQ6,desc:VD1[RQ6]},bad_token:{code:ne,desc:VD1[ne]}};uE=class uE extends c3{constructor(A,q,K,Y,z,w,_,$){super(A,q,K);Object.setPrototypeOf(this,uE.prototype),this.timestamp=Y||n8.EMPTY_STRING,this.traceId=z||n8.EMPTY_STRING,this.correlationId=w||n8.EMPTY_STRING,this.claims=_||n8.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=$}}});class kD1{static setRequestState(A,q,K){let Y=kD1.generateLibraryState(A,K);return q?`${Y}${n8.RESOURCE_DELIM}${q}`:Y}static generateLibraryState(A,q){if(!A)throw JA(me);let K={id:A.createNewGuid()};if(q)K.meta=q;let Y=JSON.stringify(K);return A.base64Encode(Y)}static parseRequestState(A,q){if(!A)throw JA(me);if(!q)throw JA(xb);try{let K=q.split(n8.RESOURCE_DELIM),Y=K[0],z=K.length>1?K.slice(1).join(n8.RESOURCE_DELIM):n8.EMPTY_STRING,w=A.base64Decode(Y),_=JSON.parse(w);return{userRequestState:z||n8.EMPTY_STRING,libraryState:_}}catch(K){throw JA(xb)}}}var sc7=k(()=>{P$();dM();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */});class c96{constructor(A,q){this.cryptoUtils=A,this.performanceClient=q}async generateCnf(A,q){this.performanceClient?.addQueueMeasurement(R8.PopTokenGenerateCnf,A.correlationId);let K=await vY(this.generateKid.bind(this),R8.PopTokenGenerateCnf,q,this.performanceClient,A.correlationId)(A),Y=this.cryptoUtils.base64UrlEncode(JSON.stringify(K));return{kid:K.kid,reqCnfString:Y}}async generateKid(A){return this.performanceClient?.addQueueMeasurement(R8.PopTokenGenerateKid,A.correlationId),{kid:await this.cryptoUtils.getPublicKeyThumbprint(A),xms_ksl:qV9.SW}}async signPopToken(A,q,K){return this.signPayload(A,q,K)}async signPayload(A,q,K,Y){let{resourceRequestMethod:z,resourceRequestUri:w,shrClaims:_,shrNonce:$,shrOptions:O}=K,j=(w?new D5(w):void 0)?.getUrlComponents();return this.cryptoUtils.signJwt({at:A,ts:xE(),m:z?.toUpperCase(),u:j?.HostNameAndPort,nonce:$||this.cryptoUtils.createNewGuid(),p:j?.AbsolutePath,q:j?.QueryString?[[],j.QueryString]:void 0,client_claims:_||void 0,...Y},q,O,K.correlationId)}}var qV9;var ED1=k(()=>{le();de();ub();Tl();/*! @azure/msal-common v15.13.1 2025-10-29 */qV9={SW:"sw"}});class MS{constructor(A,q){this.cache=A,this.hasChanged=q}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}var yZ8=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});class dj{constructor(A,q,K,Y,z,w,_){this.clientId=A,this.cacheStorage=q,this.cryptoObj=K,this.logger=Y,this.serializableCache=z,this.persistencePlugin=w,this.performanceClient=_}validateTokenResponse(A,q){if(A.error||A.error_description||A.suberror){let K=`Error(s): ${A.error_codes||n8.NOT_AVAILABLE} - Timestamp: ${A.timestamp||n8.NOT_AVAILABLE} - Description: ${A.error_description||n8.NOT_AVAILABLE} - Correlation ID: ${A.correlation_id||n8.NOT_AVAILABLE} - Trace ID: ${A.trace_id||n8.NOT_AVAILABLE}`,Y=A.error_codes?.length?A.error_codes[0]:void 0,z=new $T(A.error,K,A.suberror,Y,A.status);if(q&&A.status&&A.status>=d3.SERVER_ERROR_RANGE_START&&A.status<=d3.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed. ${z}`);return}else if(q&&A.status&&A.status>=d3.CLIENT_ERROR_RANGE_START&&A.status<=d3.CLIENT_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token. ${z}`);return}if(ND1(A.error,A.error_description,A.suberror))throw new uE(A.error,A.error_description,A.suberror,A.timestamp||n8.EMPTY_STRING,A.trace_id||n8.EMPTY_STRING,A.correlation_id||n8.EMPTY_STRING,A.claims||n8.EMPTY_STRING,Y);throw z}}async handleServerTokenResponse(A,q,K,Y,z,w,_,$,O){this.performanceClient?.addQueueMeasurement(R8.HandleServerTokenResponse,A.correlation_id);let H;if(A.id_token){if(H=Wl(A.id_token||n8.EMPTY_STRING,this.cryptoObj.base64Decode),z&&z.nonce){if(H.nonce!==z.nonce)throw JA(X96)}if(Y.maxAge||Y.maxAge===0){let D=H.auth_time;if(!D)throw JA(Hl);$Q6(D,Y.maxAge)}}this.homeAccountIdentifier=cM.generateHomeAccountId(A.client_info||n8.EMPTY_STRING,q.authorityType,this.logger,this.cryptoObj,H);let j;if(!!z&&!!z.state)j=kD1.parseRequestState(this.cryptoObj,z.state);A.key_id=A.key_id||Y.sshKid||void 0;let J=this.generateCacheRecord(A,q,K,Y,H,w,z),M;try{if(this.persistencePlugin&&this.serializableCache)this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),M=new MS(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(M);if(_&&!$&&J.account){let D=this.cacheStorage.generateAccountKey(cM.getAccountInfo(J.account));if(!this.cacheStorage.getAccount(D,Y.correlationId))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await dj.generateAuthenticationResult(this.cryptoObj,q,J,!1,Y,H,j,void 0,O)}await this.cacheStorage.saveCacheRecord(J,Y.correlationId,JW8(H||{}),Y.storeInCache)}finally{if(this.persistencePlugin&&this.serializableCache&&M)this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(M)}return dj.generateAuthenticationResult(this.cryptoObj,q,J,!1,Y,H,j,A,O)}generateCacheRecord(A,q,K,Y,z,w,_){let $=q.getPreferredCache();if(!$)throw JA(Jl);let O=aM1(z),H,j;if(A.id_token&&!!z)H=ZZ8(this.homeAccountIdentifier,$,A.id_token,this.clientId,O||""),j=tc7(this.cacheStorage,q,this.homeAccountIdentifier,this.cryptoObj.base64Decode,Y.correlationId,z,A.client_info,$,O,_,void 0,this.logger);let J=null;if(A.access_token){let X=A.scope?pj.fromString(A.scope):new pj(Y.scopes||[]),P=(typeof A.expires_in==="string"?parseInt(A.expires_in,10):A.expires_in)||0,W=(typeof A.ext_expires_in==="string"?parseInt(A.ext_expires_in,10):A.ext_expires_in)||0,Z=(typeof A.refresh_in==="string"?parseInt(A.refresh_in,10):A.refresh_in)||void 0,G=K+P,f=G+W,V=Z&&Z>0?K+Z:void 0;J=GZ8(this.homeAccountIdentifier,$,A.access_token,this.clientId,O||q.tenant||"",X.printScopes(),G,f,this.cryptoObj.base64Decode,V,A.token_type,w,A.key_id,Y.claims,Y.requestedClaimsHash)}let M=null;if(A.refresh_token){let X;if(A.refresh_token_expires_in){let P=typeof A.refresh_token_expires_in==="string"?parseInt(A.refresh_token_expires_in,10):A.refresh_token_expires_in;X=K+P}M=fZ8(this.homeAccountIdentifier,$,A.refresh_token,this.clientId,A.foci,w,X)}let D=null;if(A.foci)D={clientId:this.clientId,environment:$,familyId:A.foci};return{account:j,idToken:H,accessToken:J,refreshToken:M,appMetadata:D}}static async generateAuthenticationResult(A,q,K,Y,z,w,_,$,O){let H=n8.EMPTY_STRING,j=[],J=null,M,D,X=n8.EMPTY_STRING;if(K.accessToken){if(K.accessToken.tokenType===AY.POP&&!z.popKid){let G=new c96(A),{secret:f,keyId:V}=K.accessToken;if(!V)throw JA(k96);H=await G.signPopToken(f,V,z)}else H=K.accessToken.secret;if(j=pj.fromString(K.accessToken.target).asArray(),J=EQ6(K.accessToken.expiresOn),M=EQ6(K.accessToken.extendedExpiresOn),K.accessToken.refreshOn)D=EQ6(K.accessToken.refreshOn)}if(K.appMetadata)X=K.appMetadata.familyId===Ie?Ie:"";let P=w?.oid||w?.sub||"",W=w?.tid||"";if($?.spa_accountid&&!!K.account)K.account.nativeAccountId=$?.spa_accountid;let Z=K.account?rM1(cM.getAccountInfo(K.account),void 0,w,K.idToken?.secret):null;return{authority:q.canonicalAuthority,uniqueId:P,tenantId:W,scopes:j,account:Z,idToken:K?.idToken?.secret||"",idTokenClaims:w||{},accessToken:H,fromCache:Y,expiresOn:J,extExpiresOn:M,refreshOn:D,correlationId:z.correlationId,requestId:O||n8.EMPTY_STRING,familyId:X,tokenType:K.accessToken?.tokenType||n8.EMPTY_STRING,state:_?_.userRequestState:n8.EMPTY_STRING,cloudGraphHostName:K.account?.cloudGraphHostName||n8.EMPTY_STRING,msGraphHost:K.account?.msGraphHost||n8.EMPTY_STRING,code:$?.spa_code,fromNativeBroker:!1}}}function tc7(A,q,K,Y,z,w,_,$,O,H,j,J){J?.verbose("setCachedAccount called");let D=A.getAccountKeys().find((G)=>{return G.startsWith(K)}),X=null;if(D)X=A.getAccount(D,z);let P=X||cM.createAccount({homeAccountId:K,idTokenClaims:w,clientInfo:_,environment:$,cloudGraphHostName:H?.cloud_graph_host_name,msGraphHost:H?.msgraph_host,nativeAccountId:j},q,Y),W=P.tenantProfiles||[],Z=O||P.realm;if(Z&&!W.find((G)=>{return G.tenantId===Z})){let G=wQ6(K,P.localAccountId,Z,w);W.push(G)}return P.tenantProfiles=W,P}var hQ6=k(()=>{dM();wZ6();zQ6();sM1();CQ6();sc7();P$();ED1();yZ8();ub();sW6();jW8();oM1();MD1();le();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */});async function OT(A,q,K){if(typeof A==="string")return A;else return A({clientId:q,tokenEndpoint:K})}var LD1=k(()=>{/*! @azure/msal-common v15.13.1 2025-10-29 */});var yD1;var ec7=k(()=>{yQ6();KZ6();x96();P$();AZ6();KD1();hQ6();pe();dM();de();ED1();le();aW6();jQ6();Ue();ub();Tl();LD1();WD1();RJ();Pl();/*! @azure/msal-common v15.13.1 2025-10-29 */yD1=class yD1 extends YG{constructor(A,q){super(A,q);this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}async acquireToken(A,q){if(this.performanceClient?.addQueueMeasurement(R8.AuthClientAcquireToken,A.correlationId),!A.code)throw JA(Z96);let K=xE(),Y=await vY(this.executeTokenRequest.bind(this),R8.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,A.correlationId)(this.authority,A),z=Y.headers?.[X$.X_MS_REQUEST_ID],w=new dj(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return w.validateTokenResponse(Y.body),vY(w.handleServerTokenResponse.bind(w),R8.HandleServerTokenResponse,this.logger,this.performanceClient,A.correlationId)(Y.body,this.authority,K,A,q,void 0,void 0,void 0,z)}getLogoutUri(A){if(!A)throw n2(C96);let q=this.createLogoutUrlQueryString(A);return D5.appendQueryString(this.authority.endSessionEndpoint,q)}async executeTokenRequest(A,q){this.performanceClient?.addQueueMeasurement(R8.AuthClientExecuteTokenRequest,q.correlationId);let K=this.createTokenQueryParameters(q),Y=D5.appendQueryString(A.tokenEndpoint,K),z=await vY(this.createTokenRequestBody.bind(this),R8.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,q.correlationId)(q),w=void 0;if(q.clientInfo)try{let O=oW6(q.clientInfo,this.cryptoUtils.base64Decode);w={credential:`${O.uid}${Ol.CLIENT_INFO_SEPARATOR}${O.utid}`,type:wT.HOME_ACCOUNT_ID}}catch(O){this.logger.verbose("Could not parse client info for CCS Header: "+O)}let _=this.createTokenRequestHeaders(w||q.ccsCredential),$=_Z6(this.config.authOptions.clientId,q);return vY(this.executePostToTokenEndpoint.bind(this),R8.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,q.correlationId)(Y,z,_,$,q.correlationId,R8.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(A){this.performanceClient?.addQueueMeasurement(R8.AuthClientCreateTokenRequestBody,A.correlationId);let q=new Map;if(F96(q,A.embeddedClientId||A.tokenBodyParameters?.[ng]||this.config.authOptions.clientId),!this.includeRedirectUri){if(!A.redirectUri)throw n2(E96)}else Q96(q,A.redirectUri);if(g96(q,A.scopes,!0,this.oidcDefaultScopes),MZ8(q,A.code),MQ6(q,this.config.libraryInfo),DQ6(q,this.config.telemetry.application),vQ6(q),this.serverTelemetryManager&&!qD1(this.config))NQ6(q,this.serverTelemetryManager);if(A.codeVerifier)XZ8(q,A.codeVerifier);if(this.config.clientCredentials.clientSecret)PQ6(q,this.config.clientCredentials.clientSecret);if(this.config.clientCredentials.clientAssertion){let Y=this.config.clientCredentials.clientAssertion;WQ6(q,await OT(Y.assertion,this.config.authOptions.clientId,A.resourceRequestUri)),ZQ6(q,Y.assertionType)}if(GQ6(q,IN.AUTHORIZATION_CODE_GRANT),d96(q),A.authenticationScheme===AY.POP){let Y=new c96(this.cryptoUtils,this.performanceClient),z;if(!A.popKid)z=(await vY(Y.generateCnf.bind(Y),R8.PopTokenGenerateCnf,this.logger,this.performanceClient,A.correlationId)(A,this.logger)).reqCnfString;else z=this.cryptoUtils.encodeKid(A.popKid);TQ6(q,z)}else if(A.authenticationScheme===AY.SSH)if(A.sshJwk)VQ6(q,A.sshJwk);else throw n2(Xl);if(!v_.isEmptyObj(A.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)U96(q,A.claims,this.config.authOptions.clientCapabilities);let K=void 0;if(A.clientInfo)try{let Y=oW6(A.clientInfo,this.cryptoUtils.base64Decode);K={credential:`${Y.uid}${Ol.CLIENT_INFO_SEPARATOR}${Y.utid}`,type:wT.HOME_ACCOUNT_ID}}catch(Y){this.logger.verbose("Could not parse client info for CCS Header: "+Y)}else K=A.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&K)switch(K.type){case wT.HOME_ACCOUNT_ID:try{let Y=lg(K.credential);Zl(q,Y)}catch(Y){this.logger.verbose("Could not parse home account ID for CCS Header: "+Y)}break;case wT.UPN:ce(q,K.credential);break}if(A.embeddedClientId)fl(q,this.config.authOptions.clientId,this.config.authOptions.redirectUri);if(A.tokenBodyParameters)Gl(q,A.tokenBodyParameters);if(A.enableSpaAuthorizationCode&&(!A.tokenBodyParameters||!A.tokenBodyParameters[_D1]))Gl(q,{[_D1]:"1"});return m96(q,A.correlationId,this.performanceClient),ig(q)}createLogoutUrlQueryString(A){let q=new Map;if(A.postLogoutRedirectUri)$Z8(q,A.postLogoutRedirectUri);if(A.correlationId)p96(q,A.correlationId);if(A.idTokenHint)OZ8(q,A.idTokenHint);if(A.state)XQ6(q,A.state);if(A.logoutHint)PZ8(q,A.logoutHint);if(A.extraQueryParameters)Gl(q,A.extraQueryParameters);if(this.config.authOptions.instanceAware)fQ6(q);return ig(q,this.config.authOptions.encodeExtraQueryParams,A.extraQueryParameters)}}});var KV9=300,$Z6;var Al7=k(()=>{KD1();yQ6();KZ6();x96();P$();AZ6();hQ6();ED1();pe();Ue();dM();wZ6();le();de();jQ6();aW6();CQ6();ub();Tl();LD1();WD1();TD1();Pl();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */$Z6=class $Z6 extends YG{constructor(A,q){super(A,q)}async acquireToken(A){this.performanceClient?.addQueueMeasurement(R8.RefreshTokenClientAcquireToken,A.correlationId);let q=xE(),K=await vY(this.executeTokenRequest.bind(this),R8.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,A.correlationId)(A,this.authority),Y=K.headers?.[X$.X_MS_REQUEST_ID],z=new dj(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return z.validateTokenResponse(K.body),vY(z.handleServerTokenResponse.bind(z),R8.HandleServerTokenResponse,this.logger,this.performanceClient,A.correlationId)(K.body,this.authority,q,A,void 0,void 0,!0,A.forceCache,Y)}async acquireTokenByRefreshToken(A){if(!A)throw n2(S96);if(this.performanceClient?.addQueueMeasurement(R8.RefreshTokenClientAcquireTokenByRefreshToken,A.correlationId),!A.account)throw JA(jl);if(this.cacheManager.isAppMetadataFOCI(A.account.environment))try{return await vY(this.acquireTokenWithCachedRefreshToken.bind(this),R8.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,A.correlationId)(A,!0)}catch(K){let Y=K instanceof uE&&K.errorCode===ie,z=K instanceof $T&&K.errorCode===SF6.INVALID_GRANT_ERROR&&K.subError===SF6.CLIENT_MISMATCH_ERROR;if(Y||z)return vY(this.acquireTokenWithCachedRefreshToken.bind(this),R8.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,A.correlationId)(A,!1);else throw K}return vY(this.acquireTokenWithCachedRefreshToken.bind(this),R8.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,A.correlationId)(A,!1)}async acquireTokenWithCachedRefreshToken(A,q){this.performanceClient?.addQueueMeasurement(R8.RefreshTokenClientAcquireTokenWithCachedRefreshToken,A.correlationId);let K=lc7(this.cacheManager.getRefreshToken.bind(this.cacheManager),R8.CacheManagerGetRefreshToken,this.logger,this.performanceClient,A.correlationId)(A.account,q,A.correlationId,void 0,this.performanceClient);if(!K)throw vD1(ie);if(K.expiresOn&&YZ6(K.expiresOn,A.refreshTokenExpirationOffsetSeconds||KV9))throw this.performanceClient?.addFields({rtExpiresOnMs:Number(K.expiresOn)},A.correlationId),vD1(SQ6);let Y={...A,refreshToken:K.secret,authenticationScheme:A.authenticationScheme||AY.BEARER,ccsCredential:{credential:A.account.homeAccountId,type:wT.HOME_ACCOUNT_ID}};try{return await vY(this.acquireToken.bind(this),R8.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,A.correlationId)(Y)}catch(z){if(z instanceof uE){if(this.performanceClient?.addFields({rtExpiresOnMs:Number(K.expiresOn)},A.correlationId),z.subError===ne){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");let w=this.cacheManager.generateCredentialKey(K);this.cacheManager.removeRefreshToken(w,A.correlationId)}}throw z}}async executeTokenRequest(A,q){this.performanceClient?.addQueueMeasurement(R8.RefreshTokenClientExecuteTokenRequest,A.correlationId);let K=this.createTokenQueryParameters(A),Y=D5.appendQueryString(q.tokenEndpoint,K),z=await vY(this.createTokenRequestBody.bind(this),R8.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,A.correlationId)(A),w=this.createTokenRequestHeaders(A.ccsCredential),_=_Z6(this.config.authOptions.clientId,A);return vY(this.executePostToTokenEndpoint.bind(this),R8.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,A.correlationId)(Y,z,w,_,A.correlationId,R8.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(A){this.performanceClient?.addQueueMeasurement(R8.RefreshTokenClientCreateTokenRequestBody,A.correlationId);let q=new Map;if(F96(q,A.embeddedClientId||A.tokenBodyParameters?.[ng]||this.config.authOptions.clientId),A.redirectUri)Q96(q,A.redirectUri);if(g96(q,A.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),GQ6(q,IN.REFRESH_TOKEN_GRANT),d96(q),MQ6(q,this.config.libraryInfo),DQ6(q,this.config.telemetry.application),vQ6(q),this.serverTelemetryManager&&!qD1(this.config))NQ6(q,this.serverTelemetryManager);if(DZ8(q,A.refreshToken),this.config.clientCredentials.clientSecret)PQ6(q,this.config.clientCredentials.clientSecret);if(this.config.clientCredentials.clientAssertion){let K=this.config.clientCredentials.clientAssertion;WQ6(q,await OT(K.assertion,this.config.authOptions.clientId,A.resourceRequestUri)),ZQ6(q,K.assertionType)}if(A.authenticationScheme===AY.POP){let K=new c96(this.cryptoUtils,this.performanceClient),Y;if(!A.popKid)Y=(await vY(K.generateCnf.bind(K),R8.PopTokenGenerateCnf,this.logger,this.performanceClient,A.correlationId)(A,this.logger)).reqCnfString;else Y=this.cryptoUtils.encodeKid(A.popKid);TQ6(q,Y)}else if(A.authenticationScheme===AY.SSH)if(A.sshJwk)VQ6(q,A.sshJwk);else throw n2(Xl);if(!v_.isEmptyObj(A.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)U96(q,A.claims,this.config.authOptions.clientCapabilities);if(this.config.systemOptions.preventCorsPreflight&&A.ccsCredential)switch(A.ccsCredential.type){case wT.HOME_ACCOUNT_ID:try{let K=lg(A.ccsCredential.credential);Zl(q,K)}catch(K){this.logger.verbose("Could not parse home account ID for CCS Header: "+K)}break;case wT.UPN:ce(q,A.ccsCredential.credential);break}if(A.embeddedClientId)fl(q,this.config.authOptions.clientId,this.config.authOptions.redirectUri);if(A.tokenBodyParameters)Gl(q,A.tokenBodyParameters);return m96(q,A.correlationId,this.performanceClient),ig(q)}}});var RD1;var ql7=k(()=>{yQ6();le();dM();hQ6();P$();pe();sW6();ub();Tl();XD1();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */RD1=class RD1 extends YG{constructor(A,q){super(A,q)}async acquireCachedToken(A){this.performanceClient?.addQueueMeasurement(R8.SilentFlowClientAcquireCachedToken,A.correlationId);let q=N_.NOT_APPLICABLE;if(A.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!v_.isEmptyObj(A.claims))throw this.setCacheOutcome(N_.FORCE_REFRESH_OR_CLAIMS,A.correlationId),JA(Ml);if(!A.account)throw JA(jl);let K=A.account.tenantId||nc7(A.authority),Y=this.cacheManager.getTokenKeys(),z=this.cacheManager.getAccessToken(A.account,A,Y,K);if(!z)throw this.setCacheOutcome(N_.NO_CACHED_ACCESS_TOKEN,A.correlationId),JA(Ml);else if(WZ8(z.cachedAt)||YZ6(z.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(N_.CACHED_ACCESS_TOKEN_EXPIRED,A.correlationId),JA(Ml);else if(z.refreshOn&&YZ6(z.refreshOn,0))q=N_.PROACTIVELY_REFRESHED;let w=A.authority||this.authority.getPreferredCache(),_={account:this.cacheManager.getAccount(this.cacheManager.generateAccountKey(A.account),A.correlationId),accessToken:z,idToken:this.cacheManager.getIdToken(A.account,A.correlationId,Y,K,this.performanceClient),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(w)};if(this.setCacheOutcome(q,A.correlationId),this.config.serverTelemetryManager)this.config.serverTelemetryManager.incrementCacheHits();return[await vY(this.generateResultFromCacheRecord.bind(this),R8.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,A.correlationId)(_,A),q]}setCacheOutcome(A,q){if(this.serverTelemetryManager?.setCacheOutcome(A),this.performanceClient?.addFields({cacheOutcome:A},q),A!==N_.NOT_APPLICABLE)this.logger.info(`Token refresh is required due to cache outcome: ${A}`)}async generateResultFromCacheRecord(A,q){this.performanceClient?.addQueueMeasurement(R8.SilentFlowClientGenerateResultFromCacheRecord,q.correlationId);let K;if(A.idToken)K=Wl(A.idToken.secret,this.config.cryptoInterface.base64Decode);if(q.maxAge||q.maxAge===0){let Y=K?.auth_time;if(!Y)throw JA(Hl);$Q6(Y,q.maxAge)}return dj.generateAuthenticationResult(this.cryptoUtils,this.authority,A,!0,q,K)}}});var IQ6={};m1(IQ6,{validateAuthorizationResponse:()=>Kl7,getStandardAuthorizeRequestParameters:()=>YV9,getAuthorizeUrl:()=>zV9,getAuthorizationCodePayload:()=>wV9});function YV9(A,q,K,Y){let z=q.correlationId,w=new Map;F96(w,q.embeddedClientId||q.extraQueryParameters?.[ng]||A.clientId);let _=[...q.scopes||[],...q.extraScopesToConsent||[]];if(g96(w,_,!0,A.authority.options.OIDCOptions?.defaultScopes),Q96(w,q.redirectUri),p96(w,z),_Z8(w,q.responseMode),d96(w),q.prompt)jZ8(w,q.prompt),Y?.addFields({prompt:q.prompt},z);if(q.domainHint)HZ8(w,q.domainHint),Y?.addFields({domainHintFromRequest:!0},z);if(q.prompt!==he.SELECT_ACCOUNT){if(q.sid&&q.prompt===he.NONE)K.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),OD1(w,q.sid),Y?.addFields({sidFromRequest:!0},z);else if(q.account){let $=$V9(q.account),O=OV9(q.account);if(O&&q.domainHint)K.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),O=null;if(O){K.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),qZ6(w,O),Y?.addFields({loginHintFromClaim:!0},z);try{let H=lg(q.account.homeAccountId);Zl(w,H)}catch(H){K.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if($&&q.prompt===he.NONE){K.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),OD1(w,$),Y?.addFields({sidFromClaim:!0},z);try{let H=lg(q.account.homeAccountId);Zl(w,H)}catch(H){K.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(q.loginHint)K.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),qZ6(w,q.loginHint),ce(w,q.loginHint),Y?.addFields({loginHintFromRequest:!0},z);else if(q.account.username){K.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),qZ6(w,q.account.username),Y?.addFields({loginHintFromUpn:!0},z);try{let H=lg(q.account.homeAccountId);Zl(w,H)}catch(H){K.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else if(q.loginHint)K.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),qZ6(w,q.loginHint),ce(w,q.loginHint),Y?.addFields({loginHintFromRequest:!0},z)}else K.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(q.nonce)JZ8(w,q.nonce);if(q.state)XQ6(w,q.state);if(q.claims||A.clientCapabilities&&A.clientCapabilities.length>0)U96(w,q.claims,A.clientCapabilities);if(q.embeddedClientId)fl(w,A.clientId,A.redirectUri);if(A.instanceAware&&(!q.extraQueryParameters||!Object.keys(q.extraQueryParameters).includes(eW6)))fQ6(w);return w}function zV9(A,q,K,Y){let z=ig(q,K,Y);return D5.appendQueryString(A.authorizationEndpoint,z)}function wV9(A,q){if(Kl7(A,q),!A.code)throw JA(N96);return A}function Kl7(A,q){if(!A.state||!q)throw A.state?JA(ue,"Cached State"):JA(ue,"Server State");let K,Y;try{K=decodeURIComponent(A.state)}catch(z){throw JA(xb,A.state)}try{Y=decodeURIComponent(q)}catch(z){throw JA(xb,A.state)}if(K!==Y)throw JA(D96);if(A.error||A.error_description||A.suberror){let z=_V9(A);if(ND1(A.error,A.error_description,A.suberror))throw new uE(A.error||"",A.error_description,A.suberror,A.timestamp||"",A.trace_id||"",A.correlation_id||"",A.claims||"",z);throw new $T(A.error||"",A.error_description,A.suberror,z)}}function _V9(A){let K=A.error_uri?.lastIndexOf("code=");return K&&K>=0?A.error_uri?.substring(K+5):void 0}function $V9(A){return A.idTokenClaims?.sid||null}function OV9(A){return A.loginHint||A.idTokenClaims?.login_hint||null}var Yl7=k(()=>{KZ6();AZ6();P$();aW6();x96();de();dM();CQ6();wZ6();RJ();/*! @azure/msal-common v15.13.1 2025-10-29 */});function HV9(A){let{skus:q,libraryName:K,libraryVersion:Y,extensionName:z,extensionVersion:w}=A,_=new Map([[0,[K,Y]],[2,[z,w]]]),$=[];if(q?.length){if($=q.split(zl7),$.length<4)return q}else $=Array.from({length:4},()=>wl7);return _.forEach((O,H)=>{if(O.length===2&&O[0]?.length&&O[1]?.length)jV9({skuArr:$,index:H,skuName:O[0],skuVersion:O[1]})}),$.join(zl7)}function jV9(A){let{skuArr:q,index:K,skuName:Y,skuVersion:z}=A;if(K>=q.length)return;q[K]=[Y,z].join(wl7)}class re{constructor(A,q){this.cacheOutcome=N_.NOT_APPLICABLE,this.cacheManager=q,this.apiId=A.apiId,this.correlationId=A.correlationId,this.wrapperSKU=A.wrapperSKU||n8.EMPTY_STRING,this.wrapperVer=A.wrapperVer||n8.EMPTY_STRING,this.telemetryCacheKey=nD.CACHE_KEY+Ol.CACHE_KEY_SEPARATOR+A.clientId}generateCurrentRequestHeaderValue(){let A=`${this.apiId}${nD.VALUE_SEPARATOR}${this.cacheOutcome}`,q=[this.wrapperSKU,this.wrapperVer],K=this.getNativeBrokerErrorCode();if(K?.length)q.push(`broker_error=${K}`);let Y=q.join(nD.VALUE_SEPARATOR),z=this.getRegionDiscoveryFields(),w=[A,z].join(nD.VALUE_SEPARATOR);return[nD.SCHEMA_VERSION,w,Y].join(nD.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){let A=this.getLastRequests(),q=re.maxErrorsToSend(A),K=A.failedRequests.slice(0,2*q).join(nD.VALUE_SEPARATOR),Y=A.errors.slice(0,q).join(nD.VALUE_SEPARATOR),z=A.errors.length,w=q=nD.MAX_CACHED_ERRORS)q.failedRequests.shift(),q.failedRequests.shift(),q.errors.shift();if(q.failedRequests.push(this.apiId,this.correlationId),A instanceof Error&&!!A&&A.toString())if(A instanceof c3)if(A.subError)q.errors.push(A.subError);else if(A.errorCode)q.errors.push(A.errorCode);else q.errors.push(A.toString());else q.errors.push(A.toString());else q.errors.push(nD.UNKNOWN_ERROR);this.cacheManager.setServerTelemetry(this.telemetryCacheKey,q,this.correlationId);return}incrementCacheHits(){let A=this.getLastRequests();return A.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,A,this.correlationId),A.cacheHits}getLastRequests(){let A={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||A}clearTelemetryCache(){let A=this.getLastRequests(),q=re.maxErrorsToSend(A),K=A.errors.length;if(q===K)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{let Y={failedRequests:A.failedRequests.slice(q*2),errors:A.errors.slice(q),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,Y,this.correlationId)}}static maxErrorsToSend(A){let q,K=0,Y=0,z=A.errors.length;for(q=0;q{P$();jS();/*! @azure/msal-common v15.13.1 2025-10-29 */});var nw=k(()=>{ec7();Al7();ql7();yQ6();jQ6();XD1();nM1();_Q6();fW8();sM1();de();$W8();Yl7();KZ6();hQ6();zQ6();cM1();CQ6();TD1();jS();YW8();wZ6();dM();RJ();Ue();Pl();P$();pe();_l7();sW6();NZ8();MD1();le();x96();AZ6();yZ8();LD1();/*! @azure/msal-common v15.13.1 2025-10-29 */});class oe{static deserializeJSONBlob(A){return!A?{}:JSON.parse(A)}static deserializeAccounts(A){let q={};if(A)Object.keys(A).map(function(K){let Y=A[K],z={homeAccountId:Y.home_account_id,environment:Y.environment,realm:Y.realm,localAccountId:Y.local_account_id,username:Y.username,authorityType:Y.authority_type,name:Y.name,clientInfo:Y.client_info,lastModificationTime:Y.last_modification_time,lastModificationApp:Y.last_modification_app,tenantProfiles:Y.tenantProfiles?.map((_)=>{return JSON.parse(_)}),lastUpdatedAt:Date.now().toString()},w=new cM;u96.toObject(w,z),q[K]=w});return q}static deserializeIdTokens(A){let q={};if(A)Object.keys(A).map(function(K){let Y=A[K],z={homeAccountId:Y.home_account_id,environment:Y.environment,credentialType:Y.credential_type,clientId:Y.client_id,secret:Y.secret,realm:Y.realm,lastUpdatedAt:Date.now().toString()};q[K]=z});return q}static deserializeAccessTokens(A){let q={};if(A)Object.keys(A).map(function(K){let Y=A[K],z={homeAccountId:Y.home_account_id,environment:Y.environment,credentialType:Y.credential_type,clientId:Y.client_id,secret:Y.secret,realm:Y.realm,target:Y.target,cachedAt:Y.cached_at,expiresOn:Y.expires_on,extendedExpiresOn:Y.extended_expires_on,refreshOn:Y.refresh_on,keyId:Y.key_id,tokenType:Y.token_type,requestedClaims:Y.requestedClaims,requestedClaimsHash:Y.requestedClaimsHash,userAssertionHash:Y.userAssertionHash,lastUpdatedAt:Date.now().toString()};q[K]=z});return q}static deserializeRefreshTokens(A){let q={};if(A)Object.keys(A).map(function(K){let Y=A[K],z={homeAccountId:Y.home_account_id,environment:Y.environment,credentialType:Y.credential_type,clientId:Y.client_id,secret:Y.secret,familyId:Y.family_id,target:Y.target,realm:Y.realm,lastUpdatedAt:Date.now().toString()};q[K]=z});return q}static deserializeAppMetadata(A){let q={};if(A)Object.keys(A).map(function(K){let Y=A[K];q[K]={clientId:Y.client_id,environment:Y.environment,familyId:Y.family_id}});return q}static deserializeAllCache(A){return{accounts:A.Account?this.deserializeAccounts(A.Account):{},idTokens:A.IdToken?this.deserializeIdTokens(A.IdToken):{},accessTokens:A.AccessToken?this.deserializeAccessTokens(A.AccessToken):{},refreshTokens:A.RefreshToken?this.deserializeRefreshTokens(A.RefreshToken):{},appMetadata:A.AppMetadata?this.deserializeAppMetadata(A.AppMetadata):{}}}}var SD1=k(()=>{nw();/*! @azure/msal-node v3.8.1 2025-10-29 */});var RZ8={};m1(RZ8,{Serializer:()=>z96,Deserializer:()=>oe});var $l7=k(()=>{QM1();SD1();/*! @azure/msal-node v3.8.1 2025-10-29 */});var Ol7="system_assigned_managed_identity",ZV9="managed_identity",SZ8,xN,lM,w3,y3,dH,wO,CD1,Hl7="REGION_NAME",jl7="MSAL_FORCE_REGION",Jl7=32,Ml7,hD1,CZ8,HT,Nl,DS,ID1,Dl7=4096;var _O=k(()=>{nw();/*! @azure/msal-node v3.8.1 2025-10-29 */SZ8=`https://login.microsoftonline.com/${ZV9}/`,xN={AUTHORIZATION_HEADER_NAME:"Authorization",METADATA_HEADER_NAME:"Metadata",APP_SERVICE_SECRET_HEADER_NAME:"X-IDENTITY-HEADER",ML_AND_SF_SECRET_HEADER_NAME:"secret"},lM={API_VERSION:"api-version",RESOURCE:"resource",SHA256_TOKEN_TO_REFRESH:"token_sha256_to_refresh",XMS_CC:"xms_cc"},w3={AZURE_POD_IDENTITY_AUTHORITY_HOST:"AZURE_POD_IDENTITY_AUTHORITY_HOST",DEFAULT_IDENTITY_CLIENT_ID:"DEFAULT_IDENTITY_CLIENT_ID",IDENTITY_ENDPOINT:"IDENTITY_ENDPOINT",IDENTITY_HEADER:"IDENTITY_HEADER",IDENTITY_SERVER_THUMBPRINT:"IDENTITY_SERVER_THUMBPRINT",IMDS_ENDPOINT:"IMDS_ENDPOINT",MSI_ENDPOINT:"MSI_ENDPOINT",MSI_SECRET:"MSI_SECRET"},y3={APP_SERVICE:"AppService",AZURE_ARC:"AzureArc",CLOUD_SHELL:"CloudShell",DEFAULT_TO_IMDS:"DefaultToImds",IMDS:"Imds",MACHINE_LEARNING:"MachineLearning",SERVICE_FABRIC:"ServiceFabric"},dH={SYSTEM_ASSIGNED:"system-assigned",USER_ASSIGNED_CLIENT_ID:"user-assigned-client-id",USER_ASSIGNED_RESOURCE_ID:"user-assigned-resource-id",USER_ASSIGNED_OBJECT_ID:"user-assigned-object-id"},wO={GET:"get",POST:"post"},CD1={SUCCESS_RANGE_START:d3.SUCCESS_RANGE_START,SUCCESS_RANGE_END:d3.SUCCESS_RANGE_END,SERVER_ERROR:d3.SERVER_ERROR},Ml7={SHA256:"sha256"},hD1={CV_CHARSET:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~"},CZ8={KEY_SEPARATOR:"-"},HT={MSAL_SKU:"msal.js.node",JWT_BEARER_ASSERTION_TYPE:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer",AUTHORIZATION_PENDING:"authorization_pending",HTTP_PROTOCOL:"http://",LOCALHOST:"localhost"},Nl={acquireTokenSilent:62,acquireTokenByUsernamePassword:371,acquireTokenByDeviceCode:671,acquireTokenByClientCredential:771,acquireTokenByCode:871,acquireTokenByRefreshToken:872},DS={RSA_256:"RS256",PSS_256:"PS256",X5T_256:"x5t#S256",X5T:"x5t",X5C:"x5c",AUDIENCE:"aud",EXPIRATION_TIME:"exp",ISSUER:"iss",SUBJECT:"sub",NOT_BEFORE:"nbf",JWT_ID:"jti"},ID1={INTERVAL_MS:100,TIMEOUT_MS:5000}});class bQ6{static getNetworkResponse(A,q,K){return{headers:A,body:q,status:K}}static urlToHttpOptions(A){let q={protocol:A.protocol,hostname:A.hostname&&A.hostname.startsWith("[")?A.hostname.slice(1,-1):A.hostname,hash:A.hash,search:A.search,pathname:A.pathname,path:`${A.pathname||""}${A.search||""}`,href:A.href};if(A.port!=="")q.port=Number(A.port);if(A.username||A.password)q.auth=`${decodeURIComponent(A.username)}:${decodeURIComponent(A.password)}`;return q}}var Xl7=k(()=>{/*! @azure/msal-node v3.8.1 2025-10-29 */});import hZ8 from"http";import Pl7 from"https";class xQ6{constructor(A,q){this.proxyUrl=A||"",this.customAgentOptions=q||{}}async sendGetRequestAsync(A,q,K){if(this.proxyUrl)return Wl7(A,this.proxyUrl,wO.GET,q,this.customAgentOptions,K);else return Zl7(A,wO.GET,q,this.customAgentOptions,K)}async sendPostRequestAsync(A,q){if(this.proxyUrl)return Wl7(A,this.proxyUrl,wO.POST,q,this.customAgentOptions);else return Zl7(A,wO.POST,q,this.customAgentOptions)}}var Wl7=(A,q,K,Y,z,w)=>{let _=new URL(A),$=new URL(q),O=Y?.headers||{},H={host:$.hostname,port:$.port,method:"CONNECT",path:_.hostname,headers:O};if(z&&Object.keys(z).length)H.agent=new hZ8.Agent(z);let j="";if(K===wO.POST){let M=Y?.body||"";j=`Content-Type: application/x-www-form-urlencoded\r Content-Length: ${M.length}\r \r ${M}`}else if(w)H.timeout=w;let J=`${K.toUpperCase()} ${_.href} HTTP/1.1\r Host: ${_.host}\r Connection: close\r `+j+`\r `;return new Promise((M,D)=>{let X=hZ8.request(H);if(w)X.on("timeout",()=>{X.destroy(),D(Error("Request time out"))});X.end(),X.on("connect",(P,W)=>{let Z=P?.statusCode||CD1.SERVER_ERROR;if(ZCD1.SUCCESS_RANGE_END)X.destroy(),W.destroy(),D(Error(`Error connecting to proxy. Http status code: ${P.statusCode}. Http status message: ${P?.statusMessage||"Unknown"}`));W.write(J);let G=[];W.on("data",(f)=>{G.push(f)}),W.on("end",()=>{let V=Buffer.concat([...G]).toString().split(`\r `),N=parseInt(V[0].split(" ")[1]),v=V[0].split(" ").slice(2).join(" "),y=V[V.length-1],R=V.slice(1,V.length-2),h=new Map;R.forEach((g)=>{let b=g.split(new RegExp(/:\s(.*)/s)),U=b[0],d=b[1];try{let l=JSON.parse(d);if(l&&typeof l==="object")d=l}catch(l){}h.set(U,d)});let x=Object.fromEntries(h),F=bQ6.getNetworkResponse(x,Gl7(N,v,x,y),N);if((Nd3.SUCCESS_RANGE_END)&&F.body.error!==HT.AUTHORIZATION_PENDING)X.destroy();M(F)}),W.on("error",(f)=>{X.destroy(),W.destroy(),D(Error(f.toString()))})}),X.on("error",(P)=>{X.destroy(),D(Error(P.toString()))})})},Zl7=(A,q,K,Y,z)=>{let w=q===wO.POST,_=K?.body||"",$=new URL(A),O=K?.headers||{},H={method:q,headers:O,...bQ6.urlToHttpOptions($)};if(Y&&Object.keys(Y).length)H.agent=new Pl7.Agent(Y);if(w)H.headers={...H.headers,"Content-Length":_.length};else if(z)H.timeout=z;return new Promise((j,J)=>{let M;if(H.protocol==="http:")M=hZ8.request(H);else M=Pl7.request(H);if(w)M.write(_);if(z)M.on("timeout",()=>{M.destroy(),J(Error("Request time out"))});M.end(),M.on("response",(D)=>{let{headers:X,statusCode:P,statusMessage:W}=D,Z=[];D.on("data",(G)=>{Z.push(G)}),D.on("end",()=>{let G=Buffer.concat([...Z]).toString(),f=X,V=bQ6.getNetworkResponse(f,Gl7(P,W,f,G),P);if((Pd3.SUCCESS_RANGE_END)&&V.body.error!==HT.AUTHORIZATION_PENDING)M.destroy();j(V)})}),M.on("error",(D)=>{M.destroy(),J(Error(D.toString()))})})},Gl7=(A,q,K,Y)=>{let z;try{z=JSON.parse(Y)}catch(w){let _,$;if(A>=d3.CLIENT_ERROR_RANGE_START&&A<=d3.CLIENT_ERROR_RANGE_END)_="client_error",$="A client";else if(A>=d3.SERVER_ERROR_RANGE_START&&A<=d3.SERVER_ERROR_RANGE_END)_="server_error",$="A server";else _="unknown_error",$="An unknown";z={error:_,error_description:`${$} error occured. Http status code: ${A} Http status message: ${q||"Unknown"} Headers: ${JSON.stringify(K)}`}}return z};var fl7=k(()=>{nw();_O();Xl7();/*! @azure/msal-node v3.8.1 2025-10-29 */});var bD1="invalid_file_extension",xD1="invalid_file_path",ae="invalid_managed_identity_id_type",uD1="invalid_secret",Tl7="missing_client_id",Vl7="network_unavailable",BD1="platform_not_supported",mD1="unable_to_create_azure_arc",gD1="unable_to_create_cloud_shell",FD1="unable_to_create_source",uQ6="unable_to_read_secret_file",Nl7="user_assigned_not_available_at_runtime",QD1="www_authenticate_header_missing",UD1="www_authenticate_header_unsupported_format",l96;var i96=k(()=>{_O();/*! @azure/msal-node v3.8.1 2025-10-29 */l96={[w3.AZURE_POD_IDENTITY_AUTHORITY_HOST]:"azure_pod_identity_authority_host_url_malformed",[w3.IDENTITY_ENDPOINT]:"identity_endpoint_url_malformed",[w3.IMDS_ENDPOINT]:"imds_endpoint_url_malformed",[w3.MSI_ENDPOINT]:"msi_endpoint_url_malformed"}});function SJ(A){return new IZ8(A)}var GV9,IZ8;var OZ6=k(()=>{nw();i96();_O();/*! @azure/msal-node v3.8.1 2025-10-29 */GV9={[bD1]:"The file path in the WWW-Authenticate header does not contain a .key file.",[xD1]:"The file path in the WWW-Authenticate header is not in a valid Windows or Linux Format.",[ae]:"More than one ManagedIdentityIdType was provided.",[uD1]:"The secret in the file on the file path in the WWW-Authenticate header is greater than 4096 bytes.",[BD1]:"The platform is not supported by Azure Arc. Azure Arc only supports Windows and Linux.",[Tl7]:"A ManagedIdentityId id was not provided.",[l96.AZURE_POD_IDENTITY_AUTHORITY_HOST]:`The Managed Identity's '${w3.AZURE_POD_IDENTITY_AUTHORITY_HOST}' environment variable is malformed.`,[l96.IDENTITY_ENDPOINT]:`The Managed Identity's '${w3.IDENTITY_ENDPOINT}' environment variable is malformed.`,[l96.IMDS_ENDPOINT]:`The Managed Identity's '${w3.IMDS_ENDPOINT}' environment variable is malformed.`,[l96.MSI_ENDPOINT]:`The Managed Identity's '${w3.MSI_ENDPOINT}' environment variable is malformed.`,[Vl7]:"Authentication unavailable. The request to the managed identity endpoint timed out.",[mD1]:"Azure Arc Managed Identities can only be system assigned.",[gD1]:"Cloud Shell Managed Identities can only be system assigned.",[FD1]:"Unable to create a Managed Identity source based on environment variables.",[uQ6]:"Unable to read the secret file.",[Nl7]:"Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.",[QD1]:"A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.",[UD1]:"A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format."};IZ8=class IZ8 extends c3{constructor(A){super(A,GV9[A]);this.name="ManagedIdentityError",Object.setPrototypeOf(this,IZ8.prototype)}}});class bZ8{get id(){return this._id}set id(A){this._id=A}get idType(){return this._idType}set idType(A){this._idType=A}constructor(A){let q=A?.userAssignedClientId,K=A?.userAssignedResourceId,Y=A?.userAssignedObjectId;if(q){if(K||Y)throw SJ(ae);this.id=q,this.idType=dH.USER_ASSIGNED_CLIENT_ID}else if(K){if(q||Y)throw SJ(ae);this.id=K,this.idType=dH.USER_ASSIGNED_RESOURCE_ID}else if(Y){if(q||K)throw SJ(ae);this.id=Y,this.idType=dH.USER_ASSIGNED_OBJECT_ID}else this.id=Ol7,this.idType=dH.SYSTEM_ASSIGNED}}var vl7=k(()=>{OZ6();_O();i96();/*! @azure/msal-node v3.8.1 2025-10-29 */});var iM,qH;var BQ6=k(()=>{nw();/*! @azure/msal-node v3.8.1 2025-10-29 */iM={invalidLoopbackAddressType:{code:"invalid_loopback_server_address_type",desc:"Loopback server address is not type string. This is unexpected."},unableToLoadRedirectUri:{code:"unable_to_load_redirectUrl",desc:"Loopback server callback was invoked without a url. This is unexpected."},noAuthCodeInResponse:{code:"no_auth_code_in_response",desc:"No auth code found in the server response. Please check your network trace to determine what happened."},noLoopbackServerExists:{code:"no_loopback_server_exists",desc:"No loopback server exists yet."},loopbackServerAlreadyExists:{code:"loopback_server_already_exists",desc:"Loopback server already exists. Cannot create another."},loopbackServerTimeout:{code:"loopback_server_timeout",desc:"Timed out waiting for auth code listener to be registered."},stateNotFoundError:{code:"state_not_found",desc:"State not found. Please verify that the request originated from msal."},thumbprintMissing:{code:"thumbprint_missing_from_client_certificate",desc:"Client certificate does not contain a SHA-1 or SHA-256 thumbprint."},redirectUriNotSupported:{code:"redirect_uri_not_supported",desc:"RedirectUri is not supported in this scenario. Please remove redirectUri from the request."}};qH=class qH extends c3{constructor(A,q){super(A,q);this.name="NodeAuthError"}static createInvalidLoopbackAddressTypeError(){return new qH(iM.invalidLoopbackAddressType.code,`${iM.invalidLoopbackAddressType.desc}`)}static createUnableToLoadRedirectUrlError(){return new qH(iM.unableToLoadRedirectUri.code,`${iM.unableToLoadRedirectUri.desc}`)}static createNoAuthCodeInResponseError(){return new qH(iM.noAuthCodeInResponse.code,`${iM.noAuthCodeInResponse.desc}`)}static createNoLoopbackServerExistsError(){return new qH(iM.noLoopbackServerExists.code,`${iM.noLoopbackServerExists.desc}`)}static createLoopbackServerAlreadyExistsError(){return new qH(iM.loopbackServerAlreadyExists.code,`${iM.loopbackServerAlreadyExists.desc}`)}static createLoopbackServerTimeoutError(){return new qH(iM.loopbackServerTimeout.code,`${iM.loopbackServerTimeout.desc}`)}static createStateNotFoundError(){return new qH(iM.stateNotFoundError.code,iM.stateNotFoundError.desc)}static createThumbprintMissingError(){return new qH(iM.thumbprintMissing.code,iM.thumbprintMissing.desc)}static createRedirectUriNotSupportedError(){return new qH(iM.redirectUriNotSupported.code,iM.redirectUriNotSupported.desc)}}});function kl7({auth:A,broker:q,cache:K,system:Y,telemetry:z}){let w={...VV9,networkClient:new xQ6(Y?.proxyUrl,Y?.customAgentOptions),loggerOptions:Y?.loggerOptions||xZ8,disableInternalRetries:Y?.disableInternalRetries||!1};if(!!A.clientCertificate&&!A.clientCertificate.thumbprint&&!A.clientCertificate.thumbprintSha256)throw qH.createStateNotFoundError();return{auth:{...fV9,...A},broker:{...q},cache:{...TV9,...K},system:{...w,...Y},telemetry:{...NV9,...z}}}function El7({clientCapabilities:A,managedIdentityIdParams:q,system:K}){let Y=new bZ8(q),z=K?.loggerOptions||xZ8,w;if(K?.networkClient)w=K.networkClient;else w=new xQ6(K?.proxyUrl,K?.customAgentOptions);return{clientCapabilities:A||[],managedIdentityId:Y,system:{loggerOptions:z,networkClient:w},disableInternalRetries:K?.disableInternalRetries||!1}}var fV9,TV9,xZ8,VV9,NV9;var uZ8=k(()=>{nw();fl7();vl7();BQ6();/*! @azure/msal-node v3.8.1 2025-10-29 */fV9={clientId:n8.EMPTY_STRING,authority:n8.DEFAULT_AUTHORITY,clientSecret:n8.EMPTY_STRING,clientAssertion:n8.EMPTY_STRING,clientCertificate:{thumbprint:n8.EMPTY_STRING,thumbprintSha256:n8.EMPTY_STRING,privateKey:n8.EMPTY_STRING,x5c:n8.EMPTY_STRING},knownAuthorities:[],cloudDiscoveryMetadata:n8.EMPTY_STRING,authorityMetadata:n8.EMPTY_STRING,clientCapabilities:[],protocolMode:KG.AAD,azureCloudOptions:{azureCloudInstance:Dl.None,tenant:n8.EMPTY_STRING},skipAuthorityMetadataCache:!1,encodeExtraQueryParams:!1},TV9={claimsBasedCachingEnabled:!1},xZ8={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:pH.Info},VV9={loggerOptions:xZ8,networkClient:new xQ6,proxyUrl:n8.EMPTY_STRING,customAgentOptions:{},disableInternalRetries:!1},NV9={application:{appName:n8.EMPTY_STRING,appVersion:n8.EMPTY_STRING}}});var BZ8=C((Ll7)=>{Object.defineProperty(Ll7,"__esModule",{value:!0});Ll7.default=EV9;var vV9=kV9(g6("crypto"));function kV9(A){return A&&A.__esModule?A:{default:A}}var dD1=new Uint8Array(256),pD1=dD1.length;function EV9(){if(pD1>dD1.length-16)vV9.default.randomFillSync(dD1),pD1=0;return dD1.slice(pD1,pD1+=16)}});var Sl7=C((yl7)=>{Object.defineProperty(yl7,"__esModule",{value:!0});yl7.default=void 0;var yV9=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;yl7.default=yV9});var mQ6=C((Cl7)=>{Object.defineProperty(Cl7,"__esModule",{value:!0});Cl7.default=void 0;var RV9=SV9(Sl7());function SV9(A){return A&&A.__esModule?A:{default:A}}function CV9(A){return typeof A==="string"&&RV9.default.test(A)}var hV9=CV9;Cl7.default=hV9});var gQ6=C((Il7)=>{Object.defineProperty(Il7,"__esModule",{value:!0});Il7.default=void 0;var IV9=bV9(mQ6());function bV9(A){return A&&A.__esModule?A:{default:A}}var r0=[];for(let A=0;A<256;++A)r0.push((A+256).toString(16).substr(1));function xV9(A,q=0){let K=(r0[A[q+0]]+r0[A[q+1]]+r0[A[q+2]]+r0[A[q+3]]+"-"+r0[A[q+4]]+r0[A[q+5]]+"-"+r0[A[q+6]]+r0[A[q+7]]+"-"+r0[A[q+8]]+r0[A[q+9]]+"-"+r0[A[q+10]]+r0[A[q+11]]+r0[A[q+12]]+r0[A[q+13]]+r0[A[q+14]]+r0[A[q+15]]).toLowerCase();if(!(0,IV9.default)(K))throw TypeError("Stringified UUID is invalid");return K}var uV9=xV9;Il7.default=uV9});var gl7=C((Bl7)=>{Object.defineProperty(Bl7,"__esModule",{value:!0});Bl7.default=void 0;var BV9=ul7(BZ8()),mV9=ul7(gQ6());function ul7(A){return A&&A.__esModule?A:{default:A}}var xl7,mZ8,gZ8=0,FZ8=0;function gV9(A,q,K){let Y=q&&K||0,z=q||Array(16);A=A||{};let w=A.node||xl7,_=A.clockseq!==void 0?A.clockseq:mZ8;if(w==null||_==null){let M=A.random||(A.rng||BV9.default)();if(w==null)w=xl7=[M[0]|1,M[1],M[2],M[3],M[4],M[5]];if(_==null)_=mZ8=(M[6]<<8|M[7])&16383}let $=A.msecs!==void 0?A.msecs:Date.now(),O=A.nsecs!==void 0?A.nsecs:FZ8+1,H=$-gZ8+(O-FZ8)/1e4;if(H<0&&A.clockseq===void 0)_=_+1&16383;if((H<0||$>gZ8)&&A.nsecs===void 0)O=0;if(O>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");gZ8=$,FZ8=O,mZ8=_,$+=12219292800000;let j=(($&268435455)*1e4+O)%4294967296;z[Y++]=j>>>24&255,z[Y++]=j>>>16&255,z[Y++]=j>>>8&255,z[Y++]=j&255;let J=$/4294967296*1e4&268435455;z[Y++]=J>>>8&255,z[Y++]=J&255,z[Y++]=J>>>24&15|16,z[Y++]=J>>>16&255,z[Y++]=_>>>8|128,z[Y++]=_&255;for(let M=0;M<6;++M)z[Y+M]=w[M];return q||(0,mV9.default)(z)}var FV9=gV9;Bl7.default=FV9});var QZ8=C((Fl7)=>{Object.defineProperty(Fl7,"__esModule",{value:!0});Fl7.default=void 0;var QV9=UV9(mQ6());function UV9(A){return A&&A.__esModule?A:{default:A}}function pV9(A){if(!(0,QV9.default)(A))throw TypeError("Invalid UUID");let q,K=new Uint8Array(16);return K[0]=(q=parseInt(A.slice(0,8),16))>>>24,K[1]=q>>>16&255,K[2]=q>>>8&255,K[3]=q&255,K[4]=(q=parseInt(A.slice(9,13),16))>>>8,K[5]=q&255,K[6]=(q=parseInt(A.slice(14,18),16))>>>8,K[7]=q&255,K[8]=(q=parseInt(A.slice(19,23),16))>>>8,K[9]=q&255,K[10]=(q=parseInt(A.slice(24,36),16))/1099511627776&255,K[11]=q/4294967296&255,K[12]=q>>>24&255,K[13]=q>>>16&255,K[14]=q>>>8&255,K[15]=q&255,K}var dV9=pV9;Fl7.default=dV9});var UZ8=C((cl7)=>{Object.defineProperty(cl7,"__esModule",{value:!0});cl7.default=nV9;cl7.URL=cl7.DNS=void 0;var cV9=Ul7(gQ6()),lV9=Ul7(QZ8());function Ul7(A){return A&&A.__esModule?A:{default:A}}function iV9(A){A=unescape(encodeURIComponent(A));let q=[];for(let K=0;K{Object.defineProperty(il7,"__esModule",{value:!0});il7.default=void 0;var aV9=sV9(g6("crypto"));function sV9(A){return A&&A.__esModule?A:{default:A}}function tV9(A){if(Array.isArray(A))A=Buffer.from(A);else if(typeof A==="string")A=Buffer.from(A,"utf8");return aV9.default.createHash("md5").update(A).digest()}var eV9=tV9;il7.default=eV9});var tl7=C((al7)=>{Object.defineProperty(al7,"__esModule",{value:!0});al7.default=void 0;var AN9=ol7(UZ8()),qN9=ol7(rl7());function ol7(A){return A&&A.__esModule?A:{default:A}}var KN9=(0,AN9.default)("v3",48,qN9.default),YN9=KN9;al7.default=YN9});var Ki7=C((Ai7)=>{Object.defineProperty(Ai7,"__esModule",{value:!0});Ai7.default=void 0;var zN9=el7(BZ8()),wN9=el7(gQ6());function el7(A){return A&&A.__esModule?A:{default:A}}function _N9(A,q,K){A=A||{};let Y=A.random||(A.rng||zN9.default)();if(Y[6]=Y[6]&15|64,Y[8]=Y[8]&63|128,q){K=K||0;for(let z=0;z<16;++z)q[K+z]=Y[z];return q}return(0,wN9.default)(Y)}var $N9=_N9;Ai7.default=$N9});var wi7=C((Yi7)=>{Object.defineProperty(Yi7,"__esModule",{value:!0});Yi7.default=void 0;var ON9=HN9(g6("crypto"));function HN9(A){return A&&A.__esModule?A:{default:A}}function jN9(A){if(Array.isArray(A))A=Buffer.from(A);else if(typeof A==="string")A=Buffer.from(A,"utf8");return ON9.default.createHash("sha1").update(A).digest()}var JN9=jN9;Yi7.default=JN9});var Hi7=C(($i7)=>{Object.defineProperty($i7,"__esModule",{value:!0});$i7.default=void 0;var MN9=_i7(UZ8()),DN9=_i7(wi7());function _i7(A){return A&&A.__esModule?A:{default:A}}var XN9=(0,MN9.default)("v5",80,DN9.default),PN9=XN9;$i7.default=PN9});var Mi7=C((ji7)=>{Object.defineProperty(ji7,"__esModule",{value:!0});ji7.default=void 0;var WN9="00000000-0000-0000-0000-000000000000";ji7.default=WN9});var Pi7=C((Di7)=>{Object.defineProperty(Di7,"__esModule",{value:!0});Di7.default=void 0;var ZN9=GN9(mQ6());function GN9(A){return A&&A.__esModule?A:{default:A}}function fN9(A){if(!(0,ZN9.default)(A))throw TypeError("Invalid UUID");return parseInt(A.substr(14,1),16)}var TN9=fN9;Di7.default=TN9});var Wi7=C((Bb)=>{Object.defineProperty(Bb,"__esModule",{value:!0});Object.defineProperty(Bb,"v1",{enumerable:!0,get:function(){return VN9.default}});Object.defineProperty(Bb,"v3",{enumerable:!0,get:function(){return NN9.default}});Object.defineProperty(Bb,"v4",{enumerable:!0,get:function(){return vN9.default}});Object.defineProperty(Bb,"v5",{enumerable:!0,get:function(){return kN9.default}});Object.defineProperty(Bb,"NIL",{enumerable:!0,get:function(){return EN9.default}});Object.defineProperty(Bb,"version",{enumerable:!0,get:function(){return LN9.default}});Object.defineProperty(Bb,"validate",{enumerable:!0,get:function(){return yN9.default}});Object.defineProperty(Bb,"stringify",{enumerable:!0,get:function(){return RN9.default}});Object.defineProperty(Bb,"parse",{enumerable:!0,get:function(){return SN9.default}});var VN9=vl(gl7()),NN9=vl(tl7()),vN9=vl(Ki7()),kN9=vl(Hi7()),EN9=vl(Mi7()),LN9=vl(Pi7()),yN9=vl(mQ6()),RN9=vl(gQ6()),SN9=vl(QZ8());function vl(A){return A&&A.__esModule?A:{default:A}}});var rg,vi2,ki2,Zi7,Ei2,Li2,yi2,Ri2,Si2,Ci2;var Gi7=k(()=>{rg=e(Wi7(),1),vi2=rg.default.v1,ki2=rg.default.v3,Zi7=rg.default.v4,Ei2=rg.default.v5,Li2=rg.default.NIL,yi2=rg.default.version,Ri2=rg.default.validate,Si2=rg.default.stringify,Ci2=rg.default.parse});class FQ6{generateGuid(){return Zi7()}isGuid(A){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(A)}}var pZ8=k(()=>{Gi7();/*! @azure/msal-node v3.8.1 2025-10-29 */});class uN{static base64Encode(A,q){return Buffer.from(A,q).toString(i0.BASE64)}static base64EncodeUrl(A,q){return uN.base64Encode(A,q).replace(/=/g,n8.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")}static base64Decode(A){return Buffer.from(A,i0.BASE64).toString("utf8")}static base64DecodeUrl(A){let q=A.replace(/-/g,"+").replace(/_/g,"/");while(q.length%4)q+="=";return uN.base64Decode(q)}}var QQ6=k(()=>{nw();/*! @azure/msal-node v3.8.1 2025-10-29 */});import CN9 from"crypto";class n96{sha256(A){return CN9.createHash(Ml7.SHA256).update(A).digest()}}var cD1=k(()=>{_O();/*! @azure/msal-node v3.8.1 2025-10-29 */});import hN9 from"crypto";class dZ8{constructor(){this.hashUtils=new n96}async generatePkceCodes(){let A=this.generateCodeVerifier(),q=this.generateCodeChallengeFromVerifier(A);return{verifier:A,challenge:q}}generateCodeVerifier(){let A=[],q=256-256%hD1.CV_CHARSET.length;while(A.length<=Jl7){let Y=hN9.randomBytes(1)[0];if(Y>=q)continue;let z=Y%hD1.CV_CHARSET.length;A.push(hD1.CV_CHARSET[z])}let K=A.join(n8.EMPTY_STRING);return uN.base64EncodeUrl(K)}generateCodeChallengeFromVerifier(A){return uN.base64EncodeUrl(this.hashUtils.sha256(A).toString(i0.BASE64),i0.BASE64)}}var fi7=k(()=>{nw();_O();QQ6();cD1();/*! @azure/msal-node v3.8.1 2025-10-29 */});class kl{constructor(){this.pkceGenerator=new dZ8,this.guidGenerator=new FQ6,this.hashUtils=new n96}base64UrlEncode(){throw Error("Method not implemented.")}encodeKid(){throw Error("Method not implemented.")}createNewGuid(){return this.guidGenerator.generateGuid()}base64Encode(A){return uN.base64Encode(A)}base64Decode(A){return uN.base64Decode(A)}generatePkceCodes(){return this.pkceGenerator.generatePkceCodes()}getPublicKeyThumbprint(){throw Error("Method not implemented.")}removeTokenBindingKey(){throw Error("Method not implemented.")}clearKeystore(){throw Error("Method not implemented.")}signJwt(){throw Error("Method not implemented.")}async hashString(A){return uN.base64EncodeUrl(this.hashUtils.sha256(A).toString(i0.BASE64),i0.BASE64)}}var UQ6=k(()=>{nw();pZ8();QQ6();fi7();cD1();/*! @azure/msal-node v3.8.1 2025-10-29 */});var lD1=k(()=>{P$();VW8();/*! @azure/msal-common v15.13.1 2025-10-29 */});function Ti7(A){let q=A.credentialType===iw.REFRESH_TOKEN&&A.familyId||A.clientId,K=A.tokenType&&A.tokenType.toLowerCase()!==AY.BEARER.toLowerCase()?A.tokenType.toLowerCase():"";return[A.homeAccountId,A.environment,A.credentialType,q,A.realm||"",A.target||"",A.requestedClaimsHash||"",K].join(CZ8.KEY_SEPARATOR).toLowerCase()}function Vi7(A){let q=A.homeAccountId.split(".")[1];return[A.homeAccountId,A.environment,q||A.tenantId||""].join(CZ8.KEY_SEPARATOR).toLowerCase()}var Ni7=k(()=>{nw();_O();/*! @azure/msal-node v3.8.1 2025-10-29 */});var r96;var iD1=k(()=>{nw();SD1();QM1();lD1();Ni7();/*! @azure/msal-node v3.8.1 2025-10-29 */r96=class r96 extends u96{constructor(A,q,K,Y){super(q,K,A,new tW6,Y);this.cache={},this.changeEmitters=[],this.logger=A}registerChangeEmitter(A){this.changeEmitters.push(A)}emitChange(){this.changeEmitters.forEach((A)=>A.call(null))}cacheToInMemoryCache(A){let q={accounts:{},idTokens:{},accessTokens:{},refreshTokens:{},appMetadata:{}};for(let K in A){let Y=A[K];if(typeof Y!=="object")continue;if(Y instanceof cM)q.accounts[K]=Y;else if(_T.isIdTokenEntity(Y))q.idTokens[K]=Y;else if(_T.isAccessTokenEntity(Y))q.accessTokens[K]=Y;else if(_T.isRefreshTokenEntity(Y))q.refreshTokens[K]=Y;else if(_T.isAppMetadataEntity(K,Y))q.appMetadata[K]=Y;else continue}return q}inMemoryCacheToCache(A){let q=this.getCache();return q={...q,...A.accounts,...A.idTokens,...A.accessTokens,...A.refreshTokens,...A.appMetadata},q}getInMemoryCache(){return this.logger.trace("Getting in-memory cache"),this.cacheToInMemoryCache(this.getCache())}setInMemoryCache(A){this.logger.trace("Setting in-memory cache");let q=this.inMemoryCacheToCache(A);this.setCache(q),this.emitChange()}getCache(){return this.logger.trace("Getting cache key-value store"),this.cache}setCache(A){this.logger.trace("Setting cache key value store"),this.cache=A,this.emitChange()}getItem(A){return this.logger.tracePii(`Item key: ${A}`),this.getCache()[A]}setItem(A,q){this.logger.tracePii(`Item key: ${A}`);let K=this.getCache();K[A]=q,this.setCache(K)}generateCredentialKey(A){return Ti7(A)}generateAccountKey(A){return Vi7(A)}getAccountKeys(){let A=this.getInMemoryCache();return Object.keys(A.accounts)}getTokenKeys(){let A=this.getInMemoryCache();return{idToken:Object.keys(A.idTokens),accessToken:Object.keys(A.accessTokens),refreshToken:Object.keys(A.refreshTokens)}}getAccount(A){return this.getItem(A)?Object.assign(new cM,this.getItem(A)):null}async setAccount(A){let q=this.generateAccountKey(cM.getAccountInfo(A));this.setItem(q,A)}getIdTokenCredential(A){let q=this.getItem(A);if(_T.isIdTokenEntity(q))return q;return null}async setIdTokenCredential(A){let q=this.generateCredentialKey(A);this.setItem(q,A)}getAccessTokenCredential(A){let q=this.getItem(A);if(_T.isAccessTokenEntity(q))return q;return null}async setAccessTokenCredential(A){let q=this.generateCredentialKey(A);this.setItem(q,A)}getRefreshTokenCredential(A){let q=this.getItem(A);if(_T.isRefreshTokenEntity(q))return q;return null}async setRefreshTokenCredential(A){let q=this.generateCredentialKey(A);this.setItem(q,A)}getAppMetadata(A){let q=this.getItem(A);if(_T.isAppMetadataEntity(A,q))return q;return null}setAppMetadata(A){let q=_T.generateAppMetadataKey(A);this.setItem(q,A)}getServerTelemetry(A){let q=this.getItem(A);if(q&&_T.isServerTelemetryEntity(A,q))return q;return null}setServerTelemetry(A,q){this.setItem(A,q)}getAuthorityMetadata(A){let q=this.getItem(A);if(q&&_T.isAuthorityMetadataEntity(A,q))return q;return null}getAuthorityMetadataKeys(){return this.getKeys().filter((A)=>{return this.isAuthorityMetadata(A)})}setAuthorityMetadata(A,q){this.setItem(A,q)}getThrottlingCache(A){let q=this.getItem(A);if(q&&_T.isThrottlingEntity(A,q))return q;return null}setThrottlingCache(A,q){this.setItem(A,q)}removeItem(A){this.logger.tracePii(`Item key: ${A}`);let q=!1,K=this.getCache();if(K[A])delete K[A],q=!0;if(q)this.setCache(K),this.emitChange();return q}removeOutdatedAccount(A){this.removeItem(A)}containsKey(A){return this.getKeys().includes(A)}getKeys(){this.logger.trace("Retrieving all cache keys");let A=this.getCache();return[...Object.keys(A)]}clear(){this.logger.trace("Clearing cache entries created by MSAL"),this.getKeys().forEach((q)=>{this.removeItem(q)}),this.emitChange()}static generateInMemoryCache(A){return oe.deserializeAllCache(oe.deserializeJSONBlob(A))}static generateJsonCache(A){return z96.serializeAllCache(A)}updateCredentialCacheKey(A,q){let K=this.generateCredentialKey(q);if(A!==K){let Y=this.getItem(A);if(Y)return this.removeItem(A),this.setItem(K,Y),this.logger.verbose(`Updated an outdated ${q.credentialType} cache key`),K;else this.logger.error(`Attempted to update an outdated ${q.credentialType} cache key but no item matching the outdated key was found in storage`)}return A}}});class dQ6{constructor(A,q,K){if(this.cacheHasChanged=!1,this.storage=A,this.storage.registerChangeEmitter(this.handleChangeEvent.bind(this)),K)this.persistence=K;this.logger=q}hasChanged(){return this.cacheHasChanged}serialize(){this.logger.trace("Serializing in-memory cache");let A=z96.serializeAllCache(this.storage.getInMemoryCache());if(this.cacheSnapshot)this.logger.trace("Reading cache snapshot from disk"),A=this.mergeState(JSON.parse(this.cacheSnapshot),A);else this.logger.trace("No cache snapshot to merge");return this.cacheHasChanged=!1,JSON.stringify(A)}deserialize(A){if(this.logger.trace("Deserializing JSON to in-memory cache"),this.cacheSnapshot=A,this.cacheSnapshot){this.logger.trace("Reading cache snapshot from disk");let q=oe.deserializeAllCache(this.overlayDefaults(JSON.parse(this.cacheSnapshot)));this.storage.setInMemoryCache(q)}else this.logger.trace("No cache snapshot to deserialize")}getKVStore(){return this.storage.getCache()}getCacheSnapshot(){let A=r96.generateInMemoryCache(this.cacheSnapshot);return this.storage.inMemoryCacheToCache(A)}async getAllAccounts(A=new kl().createNewGuid()){this.logger.trace("getAllAccounts called");let q;try{if(this.persistence)q=new MS(this,!1),await this.persistence.beforeCacheAccess(q);return this.storage.getAllAccounts({},A)}finally{if(this.persistence&&q)await this.persistence.afterCacheAccess(q)}}async getAccountByHomeId(A){let q=await this.getAllAccounts();if(A&&q&&q.length)return q.filter((K)=>K.homeAccountId===A)[0]||null;else return null}async getAccountByLocalId(A){let q=await this.getAllAccounts();if(A&&q&&q.length)return q.filter((K)=>K.localAccountId===A)[0]||null;else return null}async removeAccount(A,q){this.logger.trace("removeAccount called");let K;try{if(this.persistence)K=new MS(this,!0),await this.persistence.beforeCacheAccess(K);this.storage.removeAccount(A,q||new FQ6().generateGuid())}finally{if(this.persistence&&K)await this.persistence.afterCacheAccess(K)}}async overwriteCache(){if(!this.persistence){this.logger.info("No persistence layer specified, cache cannot be overwritten");return}this.logger.info("Overwriting in-memory cache with persistent cache"),this.storage.clear();let A=new MS(this,!1);await this.persistence.beforeCacheAccess(A);let q=this.getCacheSnapshot();this.storage.setCache(q),await this.persistence.afterCacheAccess(A)}handleChangeEvent(){this.cacheHasChanged=!0}mergeState(A,q){this.logger.trace("Merging in-memory cache with cache snapshot");let K=this.mergeRemovals(A,q);return this.mergeUpdates(K,q)}mergeUpdates(A,q){return Object.keys(q).forEach((K)=>{let Y=q[K];if(!A.hasOwnProperty(K)){if(Y!==null)A[K]=Y}else{let z=Y!==null,w=typeof Y==="object",_=!Array.isArray(Y),$=typeof A[K]<"u"&&A[K]!==null;if(z&&w&&_&&$)this.mergeUpdates(A[K],Y);else A[K]=Y}}),A}mergeRemovals(A,q){this.logger.trace("Remove updated entries in cache");let K=A.Account?this.mergeRemovalsDict(A.Account,q.Account):A.Account,Y=A.AccessToken?this.mergeRemovalsDict(A.AccessToken,q.AccessToken):A.AccessToken,z=A.RefreshToken?this.mergeRemovalsDict(A.RefreshToken,q.RefreshToken):A.RefreshToken,w=A.IdToken?this.mergeRemovalsDict(A.IdToken,q.IdToken):A.IdToken,_=A.AppMetadata?this.mergeRemovalsDict(A.AppMetadata,q.AppMetadata):A.AppMetadata;return{...A,Account:K,AccessToken:Y,RefreshToken:z,IdToken:w,AppMetadata:_}}mergeRemovalsDict(A,q){let K={...A};return Object.keys(A).forEach((Y)=>{if(!q||!q.hasOwnProperty(Y))delete K[Y]}),K}overlayDefaults(A){return this.logger.trace("Overlaying input cache with the default cache"),{Account:{...pQ6.Account,...A.Account},IdToken:{...pQ6.IdToken,...A.IdToken},AccessToken:{...pQ6.AccessToken,...A.AccessToken},RefreshToken:{...pQ6.RefreshToken,...A.RefreshToken},AppMetadata:{...pQ6.AppMetadata,...A.AppMetadata}}}}var pQ6;var cZ8=k(()=>{iD1();nw();SD1();QM1();UQ6();pZ8();/*! @azure/msal-node v3.8.1 2025-10-29 */pQ6={Account:{},IdToken:{},AccessToken:{},RefreshToken:{},AppMetadata:{}}});var ag=C((lZ8,ki7)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh */var nD1=g6("buffer"),og=nD1.Buffer;function vi7(A,q){for(var K in A)q[K]=A[K]}if(og.from&&og.alloc&&og.allocUnsafe&&og.allocUnsafeSlow)ki7.exports=nD1;else vi7(nD1,lZ8),lZ8.Buffer=o96;function o96(A,q,K){return og(A,q,K)}o96.prototype=Object.create(og.prototype);vi7(og,o96);o96.from=function(A,q,K){if(typeof A==="number")throw TypeError("Argument must not be a number");return og(A,q,K)};o96.alloc=function(A,q,K){if(typeof A!=="number")throw TypeError("Argument must be a number");var Y=og(A);if(q!==void 0)if(typeof K==="string")Y.fill(q,K);else Y.fill(q);else Y.fill(0);return Y};o96.allocUnsafe=function(A){if(typeof A!=="number")throw TypeError("Argument must be a number");return og(A)};o96.allocUnsafeSlow=function(A){if(typeof A!=="number")throw TypeError("Argument must be a number");return nD1.SlowBuffer(A)}});var iZ8=C((yo2,Ei7)=>{var rD1=ag().Buffer,IN9=g6("stream"),bN9=g6("util");function oD1(A){if(this.buffer=null,this.writable=!0,this.readable=!0,!A)return this.buffer=rD1.alloc(0),this;if(typeof A.pipe==="function")return this.buffer=rD1.alloc(0),A.pipe(this),this;if(A.length||typeof A==="object")return this.buffer=A,this.writable=!1,process.nextTick(function(){this.emit("end",A),this.readable=!1,this.emit("close")}.bind(this)),this;throw TypeError("Unexpected data type ("+typeof A+")")}bN9.inherits(oD1,IN9);oD1.prototype.write=function(q){this.buffer=rD1.concat([this.buffer,rD1.from(q)]),this.emit("data",q)};oD1.prototype.end=function(q){if(q)this.write(q);this.emit("end",q),this.emit("close"),this.writable=!1,this.readable=!1};Ei7.exports=oD1});var yi7=C((Ro2,Li7)=>{function nZ8(A){var q=(A/8|0)+(A%8===0?0:1);return q}var xN9={ES256:nZ8(256),ES384:nZ8(384),ES512:nZ8(521)};function uN9(A){var q=xN9[A];if(q)return q;throw Error('Unknown algorithm "'+A+'"')}Li7.exports=uN9});var eD1=C((So2,bi7)=>{var aD1=ag().Buffer,Si7=yi7(),sD1=128,Ci7=0,BN9=32,mN9=16,gN9=2,hi7=mN9|BN9|Ci7<<6,tD1=gN9|Ci7<<6;function FN9(A){return A.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Ii7(A){if(aD1.isBuffer(A))return A;else if(typeof A==="string")return aD1.from(A,"base64");throw TypeError("ECDSA signature must be a Base64 string or a Buffer")}function QN9(A,q){A=Ii7(A);var K=Si7(q),Y=K+1,z=A.length,w=0;if(A[w++]!==hi7)throw Error('Could not find expected "seq"');var _=A[w++];if(_===(sD1|1))_=A[w++];if(z-w<_)throw Error('"seq" specified length of "'+_+'", only "'+(z-w)+'" remaining');if(A[w++]!==tD1)throw Error('Could not find expected "int" for "r"');var $=A[w++];if(z-w-2<$)throw Error('"r" specified length of "'+$+'", only "'+(z-w-2)+'" available');if(Y<$)throw Error('"r" specified length of "'+$+'", max of "'+Y+'" is acceptable');var O=w;if(w+=$,A[w++]!==tD1)throw Error('Could not find expected "int" for "s"');var H=A[w++];if(z-w!==H)throw Error('"s" specified length of "'+H+'", expected "'+(z-w)+'"');if(Y=sD1;if(z)--Y;return Y}function UN9(A,q){A=Ii7(A);var K=Si7(q),Y=A.length;if(Y!==K*2)throw TypeError('"'+q+'" signatures must be "'+K*2+'" bytes, saw "'+Y+'"');var z=Ri7(A,0,K),w=Ri7(A,K,A.length),_=K-z,$=K-w,O=2+_+1+1+$,H=O{var cQ6=g6("buffer").Buffer,rZ8=g6("buffer").SlowBuffer;xi7.exports=AX1;function AX1(A,q){if(!cQ6.isBuffer(A)||!cQ6.isBuffer(q))return!1;if(A.length!==q.length)return!1;var K=0;for(var Y=0;Y{var jZ6=ag().Buffer,XS=g6("crypto"),Bi7=eD1(),ui7=g6("util"),cN9=`"%s" is not a valid algorithm. Supported algorithms are: "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,lQ6="secret must be a string or buffer",HZ6="key must be a string or a buffer",lN9="key must be a string, a buffer or an object",sZ8=typeof XS.createPublicKey==="function";if(sZ8)HZ6+=" or a KeyObject",lQ6+="or a KeyObject";function mi7(A){if(jZ6.isBuffer(A))return;if(typeof A==="string")return;if(!sZ8)throw mb(HZ6);if(typeof A!=="object")throw mb(HZ6);if(typeof A.type!=="string")throw mb(HZ6);if(typeof A.asymmetricKeyType!=="string")throw mb(HZ6);if(typeof A.export!=="function")throw mb(HZ6)}function gi7(A){if(jZ6.isBuffer(A))return;if(typeof A==="string")return;if(typeof A==="object")return;throw mb(lN9)}function iN9(A){if(jZ6.isBuffer(A))return;if(typeof A==="string")return A;if(!sZ8)throw mb(lQ6);if(typeof A!=="object")throw mb(lQ6);if(A.type!=="secret")throw mb(lQ6);if(typeof A.export!=="function")throw mb(lQ6)}function tZ8(A){return A.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Fi7(A){A=A.toString();var q=4-A.length%4;if(q!==4)for(var K=0;K{var Kv9=g6("buffer").Buffer;ci7.exports=function(q){if(typeof q==="string")return q;if(typeof q==="number"||Kv9.isBuffer(q))return q.toString();return JSON.stringify(q)}});var ai7=C((bo2,oi7)=>{var Yv9=ag().Buffer,li7=iZ8(),zv9=eZ8(),wv9=g6("stream"),ii7=AG8(),qG8=g6("util");function ni7(A,q){return Yv9.from(A,q).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function _v9(A,q,K){K=K||"utf8";var Y=ni7(ii7(A),"binary"),z=ni7(ii7(q),K);return qG8.format("%s.%s",Y,z)}function ri7(A){var{header:q,payload:K}=A,Y=A.secret||A.privateKey,z=A.encoding,w=zv9(q.alg),_=_v9(q,K,z),$=w.sign(_,Y);return qG8.format("%s.%s",_,$)}function qX1(A){var q=A.secret||A.privateKey||A.key,K=new li7(q);this.readable=!0,this.header=A.header,this.encoding=A.encoding,this.secret=this.privateKey=this.key=K,this.payload=new li7(A.payload),this.secret.once("close",function(){if(!this.payload.writable&&this.readable)this.sign()}.bind(this)),this.payload.once("close",function(){if(!this.secret.writable&&this.readable)this.sign()}.bind(this))}qG8.inherits(qX1,wv9);qX1.prototype.sign=function(){try{var q=ri7({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",q),this.emit("data",q),this.emit("end"),this.readable=!1,q}catch(K){this.readable=!1,this.emit("error",K),this.emit("close")}};qX1.sign=ri7;oi7.exports=qX1});var _n7=C((xo2,wn7)=>{var ti7=ag().Buffer,si7=iZ8(),$v9=eZ8(),Ov9=g6("stream"),ei7=AG8(),Hv9=g6("util"),jv9=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function Jv9(A){return Object.prototype.toString.call(A)==="[object Object]"}function Mv9(A){if(Jv9(A))return A;try{return JSON.parse(A)}catch(q){return}}function An7(A){var q=A.split(".",1)[0];return Mv9(ti7.from(q,"base64").toString("binary"))}function Dv9(A){return A.split(".",2).join(".")}function qn7(A){return A.split(".")[2]}function Xv9(A,q){q=q||"utf8";var K=A.split(".")[1];return ti7.from(K,"base64").toString(q)}function Kn7(A){return jv9.test(A)&&!!An7(A)}function Yn7(A,q,K){if(!q){var Y=Error("Missing algorithm parameter for jws.verify");throw Y.code="MISSING_ALGORITHM",Y}A=ei7(A);var z=qn7(A),w=Dv9(A),_=$v9(q);return _.verify(w,z,K)}function zn7(A,q){if(q=q||{},A=ei7(A),!Kn7(A))return null;var K=An7(A);if(!K)return null;var Y=Xv9(A);if(K.typ==="JWT"||q.json)Y=JSON.parse(Y,q.encoding);return{header:K,payload:Y,signature:qn7(A)}}function JZ6(A){A=A||{};var q=A.secret||A.publicKey||A.key,K=new si7(q);this.readable=!0,this.algorithm=A.algorithm,this.encoding=A.encoding,this.secret=this.publicKey=this.key=K,this.signature=new si7(A.signature),this.secret.once("close",function(){if(!this.signature.writable&&this.readable)this.verify()}.bind(this)),this.signature.once("close",function(){if(!this.secret.writable&&this.readable)this.verify()}.bind(this))}Hv9.inherits(JZ6,Ov9);JZ6.prototype.verify=function(){try{var q=Yn7(this.signature.buffer,this.algorithm,this.key.buffer),K=zn7(this.signature.buffer,this.encoding);return this.emit("done",q,K),this.emit("data",q),this.emit("end"),this.readable=!1,q}catch(Y){this.readable=!1,this.emit("error",Y),this.emit("close")}};JZ6.decode=zn7;JZ6.isValid=Kn7;JZ6.verify=Yn7;wn7.exports=JZ6});var YX1=C((Wv9)=>{var $n7=ai7(),KX1=_n7(),Pv9=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];Wv9.ALGORITHMS=Pv9;Wv9.sign=$n7.sign;Wv9.verify=KX1.verify;Wv9.decode=KX1.decode;Wv9.isValid=KX1.isValid;Wv9.createSign=function(q){return new $n7(q)};Wv9.createVerify=function(q){return new KX1(q)}});var KG8=C((Bo2,On7)=>{var kv9=YX1();On7.exports=function(A,q){q=q||{};var K=kv9.decode(A,q);if(!K)return null;var Y=K.payload;if(typeof Y==="string")try{var z=JSON.parse(Y);if(z!==null&&typeof z==="object")Y=z}catch(w){}if(q.complete===!0)return{header:K.header,payload:Y,signature:K.signature};return Y}});var nQ6=C((mo2,Hn7)=>{var zX1=function(A,q){if(Error.call(this,A),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);if(this.name="JsonWebTokenError",this.message=A,q)this.inner=q};zX1.prototype=Object.create(Error.prototype);zX1.prototype.constructor=zX1;Hn7.exports=zX1});var YG8=C((go2,Jn7)=>{var jn7=nQ6(),wX1=function(A,q){jn7.call(this,A),this.name="NotBeforeError",this.date=q};wX1.prototype=Object.create(jn7.prototype);wX1.prototype.constructor=wX1;Jn7.exports=wX1});var zG8=C((Fo2,Dn7)=>{var Mn7=nQ6(),_X1=function(A,q){Mn7.call(this,A),this.name="TokenExpiredError",this.expiredAt=q};_X1.prototype=Object.create(Mn7.prototype);_X1.prototype.constructor=_X1;Dn7.exports=_X1});var wG8=C((Qo2,Xn7)=>{var Ev9=Jo1();Xn7.exports=function(A,q){var K=q||Math.floor(Date.now()/1000);if(typeof A==="string"){var Y=Ev9(A);if(typeof Y>"u")return;return Math.floor(K+Y/1000)}else if(typeof A==="number")return K+A;else return}});var rQ6=C((Uo2,Pn7)=>{var Lv9=Number.MAX_SAFE_INTEGER||9007199254740991,yv9=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Pn7.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Lv9,RELEASE_TYPES:yv9,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var oQ6=C((po2,Wn7)=>{var Rv9=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...A)=>console.error("SEMVER",...A):()=>{};Wn7.exports=Rv9});var MZ6=C((sg,Zn7)=>{var{MAX_SAFE_COMPONENT_LENGTH:_G8,MAX_SAFE_BUILD_LENGTH:Sv9,MAX_LENGTH:Cv9}=rQ6(),hv9=oQ6();sg=Zn7.exports={};var Iv9=sg.re=[],bv9=sg.safeRe=[],d4=sg.src=[],xv9=sg.safeSrc=[],c4=sg.t={},uv9=0,$G8="[a-zA-Z0-9-]",Bv9=[["\\s",1],["\\d",Cv9],[$G8,Sv9]],mv9=(A)=>{for(let[q,K]of Bv9)A=A.split(`${q}*`).join(`${q}{0,${K}}`).split(`${q}+`).join(`${q}{1,${K}}`);return A},X5=(A,q,K)=>{let Y=mv9(q),z=uv9++;hv9(A,z,q),c4[A]=z,d4[z]=q,xv9[z]=Y,Iv9[z]=new RegExp(q,K?"g":void 0),bv9[z]=new RegExp(Y,K?"g":void 0)};X5("NUMERICIDENTIFIER","0|[1-9]\\d*");X5("NUMERICIDENTIFIERLOOSE","\\d+");X5("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${$G8}*`);X5("MAINVERSION",`(${d4[c4.NUMERICIDENTIFIER]})\\.(${d4[c4.NUMERICIDENTIFIER]})\\.(${d4[c4.NUMERICIDENTIFIER]})`);X5("MAINVERSIONLOOSE",`(${d4[c4.NUMERICIDENTIFIERLOOSE]})\\.(${d4[c4.NUMERICIDENTIFIERLOOSE]})\\.(${d4[c4.NUMERICIDENTIFIERLOOSE]})`);X5("PRERELEASEIDENTIFIER",`(?:${d4[c4.NUMERICIDENTIFIER]}|${d4[c4.NONNUMERICIDENTIFIER]})`);X5("PRERELEASEIDENTIFIERLOOSE",`(?:${d4[c4.NUMERICIDENTIFIERLOOSE]}|${d4[c4.NONNUMERICIDENTIFIER]})`);X5("PRERELEASE",`(?:-(${d4[c4.PRERELEASEIDENTIFIER]}(?:\\.${d4[c4.PRERELEASEIDENTIFIER]})*))`);X5("PRERELEASELOOSE",`(?:-?(${d4[c4.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d4[c4.PRERELEASEIDENTIFIERLOOSE]})*))`);X5("BUILDIDENTIFIER",`${$G8}+`);X5("BUILD",`(?:\\+(${d4[c4.BUILDIDENTIFIER]}(?:\\.${d4[c4.BUILDIDENTIFIER]})*))`);X5("FULLPLAIN",`v?${d4[c4.MAINVERSION]}${d4[c4.PRERELEASE]}?${d4[c4.BUILD]}?`);X5("FULL",`^${d4[c4.FULLPLAIN]}$`);X5("LOOSEPLAIN",`[v=\\s]*${d4[c4.MAINVERSIONLOOSE]}${d4[c4.PRERELEASELOOSE]}?${d4[c4.BUILD]}?`);X5("LOOSE",`^${d4[c4.LOOSEPLAIN]}$`);X5("GTLT","((?:<|>)?=?)");X5("XRANGEIDENTIFIERLOOSE",`${d4[c4.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);X5("XRANGEIDENTIFIER",`${d4[c4.NUMERICIDENTIFIER]}|x|X|\\*`);X5("XRANGEPLAIN",`[v=\\s]*(${d4[c4.XRANGEIDENTIFIER]})(?:\\.(${d4[c4.XRANGEIDENTIFIER]})(?:\\.(${d4[c4.XRANGEIDENTIFIER]})(?:${d4[c4.PRERELEASE]})?${d4[c4.BUILD]}?)?)?`);X5("XRANGEPLAINLOOSE",`[v=\\s]*(${d4[c4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d4[c4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d4[c4.XRANGEIDENTIFIERLOOSE]})(?:${d4[c4.PRERELEASELOOSE]})?${d4[c4.BUILD]}?)?)?`);X5("XRANGE",`^${d4[c4.GTLT]}\\s*${d4[c4.XRANGEPLAIN]}$`);X5("XRANGELOOSE",`^${d4[c4.GTLT]}\\s*${d4[c4.XRANGEPLAINLOOSE]}$`);X5("COERCEPLAIN",`(^|[^\\d])(\\d{1,${_G8}})(?:\\.(\\d{1,${_G8}}))?(?:\\.(\\d{1,${_G8}}))?`);X5("COERCE",`${d4[c4.COERCEPLAIN]}(?:$|[^\\d])`);X5("COERCEFULL",d4[c4.COERCEPLAIN]+`(?:${d4[c4.PRERELEASE]})?(?:${d4[c4.BUILD]})?(?:$|[^\\d])`);X5("COERCERTL",d4[c4.COERCE],!0);X5("COERCERTLFULL",d4[c4.COERCEFULL],!0);X5("LONETILDE","(?:~>?)");X5("TILDETRIM",`(\\s*)${d4[c4.LONETILDE]}\\s+`,!0);sg.tildeTrimReplace="$1~";X5("TILDE",`^${d4[c4.LONETILDE]}${d4[c4.XRANGEPLAIN]}$`);X5("TILDELOOSE",`^${d4[c4.LONETILDE]}${d4[c4.XRANGEPLAINLOOSE]}$`);X5("LONECARET","(?:\\^)");X5("CARETTRIM",`(\\s*)${d4[c4.LONECARET]}\\s+`,!0);sg.caretTrimReplace="$1^";X5("CARET",`^${d4[c4.LONECARET]}${d4[c4.XRANGEPLAIN]}$`);X5("CARETLOOSE",`^${d4[c4.LONECARET]}${d4[c4.XRANGEPLAINLOOSE]}$`);X5("COMPARATORLOOSE",`^${d4[c4.GTLT]}\\s*(${d4[c4.LOOSEPLAIN]})$|^$`);X5("COMPARATOR",`^${d4[c4.GTLT]}\\s*(${d4[c4.FULLPLAIN]})$|^$`);X5("COMPARATORTRIM",`(\\s*)${d4[c4.GTLT]}\\s*(${d4[c4.LOOSEPLAIN]}|${d4[c4.XRANGEPLAIN]})`,!0);sg.comparatorTrimReplace="$1$2$3";X5("HYPHENRANGE",`^\\s*(${d4[c4.XRANGEPLAIN]})\\s+-\\s+(${d4[c4.XRANGEPLAIN]})\\s*$`);X5("HYPHENRANGELOOSE",`^\\s*(${d4[c4.XRANGEPLAINLOOSE]})\\s+-\\s+(${d4[c4.XRANGEPLAINLOOSE]})\\s*$`);X5("STAR","(<|>)?=?\\s*\\*");X5("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");X5("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var $X1=C((do2,Gn7)=>{var gv9=Object.freeze({loose:!0}),Fv9=Object.freeze({}),Qv9=(A)=>{if(!A)return Fv9;if(typeof A!=="object")return gv9;return A};Gn7.exports=Qv9});var OG8=C((co2,Vn7)=>{var fn7=/^[0-9]+$/,Tn7=(A,q)=>{let K=fn7.test(A),Y=fn7.test(q);if(K&&Y)A=+A,q=+q;return A===q?0:K&&!Y?-1:Y&&!K?1:ATn7(q,A);Vn7.exports={compareIdentifiers:Tn7,rcompareIdentifiers:Uv9}});var zG=C((lo2,En7)=>{var OX1=oQ6(),{MAX_LENGTH:Nn7,MAX_SAFE_INTEGER:HX1}=rQ6(),{safeRe:vn7,safeSrc:kn7,t:jX1}=MZ6(),pv9=$X1(),{compareIdentifiers:DZ6}=OG8();class gb{constructor(A,q){if(q=pv9(q),A instanceof gb)if(A.loose===!!q.loose&&A.includePrerelease===!!q.includePrerelease)return A;else A=A.version;else if(typeof A!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof A}".`);if(A.length>Nn7)throw TypeError(`version is longer than ${Nn7} characters`);OX1("SemVer",A,q),this.options=q,this.loose=!!q.loose,this.includePrerelease=!!q.includePrerelease;let K=A.trim().match(q.loose?vn7[jX1.LOOSE]:vn7[jX1.FULL]);if(!K)throw TypeError(`Invalid Version: ${A}`);if(this.raw=A,this.major=+K[1],this.minor=+K[2],this.patch=+K[3],this.major>HX1||this.major<0)throw TypeError("Invalid major version");if(this.minor>HX1||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>HX1||this.patch<0)throw TypeError("Invalid patch version");if(!K[4])this.prerelease=[];else this.prerelease=K[4].split(".").map((Y)=>{if(/^[0-9]+$/.test(Y)){let z=+Y;if(z>=0&&z=0)if(typeof this.prerelease[z]==="number")this.prerelease[z]++,z=-2;if(z===-1){if(q===this.prerelease.join(".")&&K===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(Y)}}if(q){let z=[q,Y];if(K===!1)z=[q];if(DZ6(this.prerelease[0],q)===0){if(isNaN(this.prerelease[1]))this.prerelease=z}else this.prerelease=z}break}default:throw Error(`invalid increment argument: ${A}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}En7.exports=gb});var a96=C((io2,yn7)=>{var Ln7=zG(),dv9=(A,q,K=!1)=>{if(A instanceof Ln7)return A;try{return new Ln7(A,q)}catch(Y){if(!K)return null;throw Y}};yn7.exports=dv9});var Sn7=C((no2,Rn7)=>{var cv9=a96(),lv9=(A,q)=>{let K=cv9(A,q);return K?K.version:null};Rn7.exports=lv9});var hn7=C((ro2,Cn7)=>{var iv9=a96(),nv9=(A,q)=>{let K=iv9(A.trim().replace(/^[=v]+/,""),q);return K?K.version:null};Cn7.exports=nv9});var xn7=C((oo2,bn7)=>{var In7=zG(),rv9=(A,q,K,Y,z)=>{if(typeof K==="string")z=Y,Y=K,K=void 0;try{return new In7(A instanceof In7?A.version:A,K).inc(q,Y,z).version}catch(w){return null}};bn7.exports=rv9});var mn7=C((ao2,Bn7)=>{var un7=a96(),ov9=(A,q)=>{let K=un7(A,null,!0),Y=un7(q,null,!0),z=K.compare(Y);if(z===0)return null;let w=z>0,_=w?K:Y,$=w?Y:K,O=!!_.prerelease.length;if(!!$.prerelease.length&&!O){if(!$.patch&&!$.minor)return"major";if($.compareMain(_)===0){if($.minor&&!$.patch)return"minor";return"patch"}}let j=O?"pre":"";if(K.major!==Y.major)return j+"major";if(K.minor!==Y.minor)return j+"minor";if(K.patch!==Y.patch)return j+"patch";return"prerelease"};Bn7.exports=ov9});var Fn7=C((so2,gn7)=>{var av9=zG(),sv9=(A,q)=>new av9(A,q).major;gn7.exports=sv9});var Un7=C((to2,Qn7)=>{var tv9=zG(),ev9=(A,q)=>new tv9(A,q).minor;Qn7.exports=ev9});var dn7=C((eo2,pn7)=>{var Ak9=zG(),qk9=(A,q)=>new Ak9(A,q).patch;pn7.exports=qk9});var ln7=C((Aa2,cn7)=>{var Kk9=a96(),Yk9=(A,q)=>{let K=Kk9(A,q);return K&&K.prerelease.length?K.prerelease:null};cn7.exports=Yk9});var PS=C((qa2,nn7)=>{var in7=zG(),zk9=(A,q,K)=>new in7(A,K).compare(new in7(q,K));nn7.exports=zk9});var on7=C((Ka2,rn7)=>{var wk9=PS(),_k9=(A,q,K)=>wk9(q,A,K);rn7.exports=_k9});var sn7=C((Ya2,an7)=>{var $k9=PS(),Ok9=(A,q)=>$k9(A,q,!0);an7.exports=Ok9});var JX1=C((za2,en7)=>{var tn7=zG(),Hk9=(A,q,K)=>{let Y=new tn7(A,K),z=new tn7(q,K);return Y.compare(z)||Y.compareBuild(z)};en7.exports=Hk9});var qr7=C((wa2,Ar7)=>{var jk9=JX1(),Jk9=(A,q)=>A.sort((K,Y)=>jk9(K,Y,q));Ar7.exports=Jk9});var Yr7=C((_a2,Kr7)=>{var Mk9=JX1(),Dk9=(A,q)=>A.sort((K,Y)=>Mk9(Y,K,q));Kr7.exports=Dk9});var aQ6=C(($a2,zr7)=>{var Xk9=PS(),Pk9=(A,q,K)=>Xk9(A,q,K)>0;zr7.exports=Pk9});var MX1=C((Oa2,wr7)=>{var Wk9=PS(),Zk9=(A,q,K)=>Wk9(A,q,K)<0;wr7.exports=Zk9});var HG8=C((Ha2,_r7)=>{var Gk9=PS(),fk9=(A,q,K)=>Gk9(A,q,K)===0;_r7.exports=fk9});var jG8=C((ja2,$r7)=>{var Tk9=PS(),Vk9=(A,q,K)=>Tk9(A,q,K)!==0;$r7.exports=Vk9});var DX1=C((Ja2,Or7)=>{var Nk9=PS(),vk9=(A,q,K)=>Nk9(A,q,K)>=0;Or7.exports=vk9});var XX1=C((Ma2,Hr7)=>{var kk9=PS(),Ek9=(A,q,K)=>kk9(A,q,K)<=0;Hr7.exports=Ek9});var JG8=C((Da2,jr7)=>{var Lk9=HG8(),yk9=jG8(),Rk9=aQ6(),Sk9=DX1(),Ck9=MX1(),hk9=XX1(),Ik9=(A,q,K,Y)=>{switch(q){case"===":if(typeof A==="object")A=A.version;if(typeof K==="object")K=K.version;return A===K;case"!==":if(typeof A==="object")A=A.version;if(typeof K==="object")K=K.version;return A!==K;case"":case"=":case"==":return Lk9(A,K,Y);case"!=":return yk9(A,K,Y);case">":return Rk9(A,K,Y);case">=":return Sk9(A,K,Y);case"<":return Ck9(A,K,Y);case"<=":return hk9(A,K,Y);default:throw TypeError(`Invalid operator: ${q}`)}};jr7.exports=Ik9});var Mr7=C((Xa2,Jr7)=>{var bk9=zG(),xk9=a96(),{safeRe:PX1,t:WX1}=MZ6(),uk9=(A,q)=>{if(A instanceof bk9)return A;if(typeof A==="number")A=String(A);if(typeof A!=="string")return null;q=q||{};let K=null;if(!q.rtl)K=A.match(q.includePrerelease?PX1[WX1.COERCEFULL]:PX1[WX1.COERCE]);else{let O=q.includePrerelease?PX1[WX1.COERCERTLFULL]:PX1[WX1.COERCERTL],H;while((H=O.exec(A))&&(!K||K.index+K[0].length!==A.length)){if(!K||H.index+H[0].length!==K.index+K[0].length)K=H;O.lastIndex=H.index+H[1].length+H[2].length}O.lastIndex=-1}if(K===null)return null;let Y=K[2],z=K[3]||"0",w=K[4]||"0",_=q.includePrerelease&&K[5]?`-${K[5]}`:"",$=q.includePrerelease&&K[6]?`+${K[6]}`:"";return xk9(`${Y}.${z}.${w}${_}${$}`,q)};Jr7.exports=uk9});var Pr7=C((Pa2,Xr7)=>{class Dr7{constructor(){this.max=1000,this.map=new Map}get(A){let q=this.map.get(A);if(q===void 0)return;else return this.map.delete(A),this.map.set(A,q),q}delete(A){return this.map.delete(A)}set(A,q){if(!this.delete(A)&&q!==void 0){if(this.map.size>=this.max){let Y=this.map.keys().next().value;this.delete(Y)}this.map.set(A,q)}return this}}Xr7.exports=Dr7});var WS=C((Wa2,fr7)=>{var Bk9=/\s+/g;class sQ6{constructor(A,q){if(q=gk9(q),A instanceof sQ6)if(A.loose===!!q.loose&&A.includePrerelease===!!q.includePrerelease)return A;else return new sQ6(A.raw,q);if(A instanceof MG8)return this.raw=A.value,this.set=[[A]],this.formatted=void 0,this;if(this.options=q,this.loose=!!q.loose,this.includePrerelease=!!q.includePrerelease,this.raw=A.trim().replace(Bk9," "),this.set=this.raw.split("||").map((K)=>this.parseRange(K.trim())).filter((K)=>K.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let K=this.set[0];if(this.set=this.set.filter((Y)=>!Zr7(Y[0])),this.set.length===0)this.set=[K];else if(this.set.length>1){for(let Y of this.set)if(Y.length===1&&lk9(Y[0])){this.set=[Y];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let A=0;A0)this.formatted+="||";let q=this.set[A];for(let K=0;K0)this.formatted+=" ";this.formatted+=q[K].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(A){let K=((this.options.includePrerelease&&dk9)|(this.options.loose&&ck9))+":"+A,Y=Wr7.get(K);if(Y)return Y;let z=this.options.loose,w=z?BN[jT.HYPHENRANGELOOSE]:BN[jT.HYPHENRANGE];A=A.replace(w,qE9(this.options.includePrerelease)),$O("hyphen replace",A),A=A.replace(BN[jT.COMPARATORTRIM],Qk9),$O("comparator trim",A),A=A.replace(BN[jT.TILDETRIM],Uk9),$O("tilde trim",A),A=A.replace(BN[jT.CARETTRIM],pk9),$O("caret trim",A);let _=A.split(" ").map((j)=>ik9(j,this.options)).join(" ").split(/\s+/).map((j)=>AE9(j,this.options));if(z)_=_.filter((j)=>{return $O("loose invalid filter",j,this.options),!!j.match(BN[jT.COMPARATORLOOSE])});$O("range list",_);let $=new Map,O=_.map((j)=>new MG8(j,this.options));for(let j of O){if(Zr7(j))return[j];$.set(j.value,j)}if($.size>1&&$.has(""))$.delete("");let H=[...$.values()];return Wr7.set(K,H),H}intersects(A,q){if(!(A instanceof sQ6))throw TypeError("a Range is required");return this.set.some((K)=>{return Gr7(K,q)&&A.set.some((Y)=>{return Gr7(Y,q)&&K.every((z)=>{return Y.every((w)=>{return z.intersects(w,q)})})})})}test(A){if(!A)return!1;if(typeof A==="string")try{A=new Fk9(A,this.options)}catch(q){return!1}for(let q=0;qA.value==="<0.0.0-0",lk9=(A)=>A.value==="",Gr7=(A,q)=>{let K=!0,Y=A.slice(),z=Y.pop();while(K&&Y.length)K=Y.every((w)=>{return z.intersects(w,q)}),z=Y.pop();return K},ik9=(A,q)=>{return $O("comp",A,q),A=ok9(A,q),$O("caret",A),A=nk9(A,q),$O("tildes",A),A=sk9(A,q),$O("xrange",A),A=ek9(A,q),$O("stars",A),A},JT=(A)=>!A||A.toLowerCase()==="x"||A==="*",nk9=(A,q)=>{return A.trim().split(/\s+/).map((K)=>rk9(K,q)).join(" ")},rk9=(A,q)=>{let K=q.loose?BN[jT.TILDELOOSE]:BN[jT.TILDE];return A.replace(K,(Y,z,w,_,$)=>{$O("tilde",A,Y,z,w,_,$);let O;if(JT(z))O="";else if(JT(w))O=`>=${z}.0.0 <${+z+1}.0.0-0`;else if(JT(_))O=`>=${z}.${w}.0 <${z}.${+w+1}.0-0`;else if($)$O("replaceTilde pr",$),O=`>=${z}.${w}.${_}-${$} <${z}.${+w+1}.0-0`;else O=`>=${z}.${w}.${_} <${z}.${+w+1}.0-0`;return $O("tilde return",O),O})},ok9=(A,q)=>{return A.trim().split(/\s+/).map((K)=>ak9(K,q)).join(" ")},ak9=(A,q)=>{$O("caret",A,q);let K=q.loose?BN[jT.CARETLOOSE]:BN[jT.CARET],Y=q.includePrerelease?"-0":"";return A.replace(K,(z,w,_,$,O)=>{$O("caret",A,z,w,_,$,O);let H;if(JT(w))H="";else if(JT(_))H=`>=${w}.0.0${Y} <${+w+1}.0.0-0`;else if(JT($))if(w==="0")H=`>=${w}.${_}.0${Y} <${w}.${+_+1}.0-0`;else H=`>=${w}.${_}.0${Y} <${+w+1}.0.0-0`;else if(O)if($O("replaceCaret pr",O),w==="0")if(_==="0")H=`>=${w}.${_}.${$}-${O} <${w}.${_}.${+$+1}-0`;else H=`>=${w}.${_}.${$}-${O} <${w}.${+_+1}.0-0`;else H=`>=${w}.${_}.${$}-${O} <${+w+1}.0.0-0`;else if($O("no pr"),w==="0")if(_==="0")H=`>=${w}.${_}.${$}${Y} <${w}.${_}.${+$+1}-0`;else H=`>=${w}.${_}.${$}${Y} <${w}.${+_+1}.0-0`;else H=`>=${w}.${_}.${$} <${+w+1}.0.0-0`;return $O("caret return",H),H})},sk9=(A,q)=>{return $O("replaceXRanges",A,q),A.split(/\s+/).map((K)=>tk9(K,q)).join(" ")},tk9=(A,q)=>{A=A.trim();let K=q.loose?BN[jT.XRANGELOOSE]:BN[jT.XRANGE];return A.replace(K,(Y,z,w,_,$,O)=>{$O("xRange",A,Y,z,w,_,$,O);let H=JT(w),j=H||JT(_),J=j||JT($),M=J;if(z==="="&&M)z="";if(O=q.includePrerelease?"-0":"",H)if(z===">"||z==="<")Y="<0.0.0-0";else Y="*";else if(z&&M){if(j)_=0;if($=0,z===">")if(z=">=",j)w=+w+1,_=0,$=0;else _=+_+1,$=0;else if(z==="<=")if(z="<",j)w=+w+1;else _=+_+1;if(z==="<")O="-0";Y=`${z+w}.${_}.${$}${O}`}else if(j)Y=`>=${w}.0.0${O} <${+w+1}.0.0-0`;else if(J)Y=`>=${w}.${_}.0${O} <${w}.${+_+1}.0-0`;return $O("xRange return",Y),Y})},ek9=(A,q)=>{return $O("replaceStars",A,q),A.trim().replace(BN[jT.STAR],"")},AE9=(A,q)=>{return $O("replaceGTE0",A,q),A.trim().replace(BN[q.includePrerelease?jT.GTE0PRE:jT.GTE0],"")},qE9=(A)=>(q,K,Y,z,w,_,$,O,H,j,J,M)=>{if(JT(Y))K="";else if(JT(z))K=`>=${Y}.0.0${A?"-0":""}`;else if(JT(w))K=`>=${Y}.${z}.0${A?"-0":""}`;else if(_)K=`>=${K}`;else K=`>=${K}${A?"-0":""}`;if(JT(H))O="";else if(JT(j))O=`<${+H+1}.0.0-0`;else if(JT(J))O=`<${H}.${+j+1}.0-0`;else if(M)O=`<=${H}.${j}.${J}-${M}`;else if(A)O=`<${H}.${j}.${+J+1}-0`;else O=`<=${O}`;return`${K} ${O}`.trim()},KE9=(A,q,K)=>{for(let Y=0;Y0){let z=A[Y].semver;if(z.major===q.major&&z.minor===q.minor&&z.patch===q.patch)return!0}}return!1}return!0}});var tQ6=C((Za2,Er7)=>{var eQ6=Symbol("SemVer ANY");class ZX1{static get ANY(){return eQ6}constructor(A,q){if(q=Tr7(q),A instanceof ZX1)if(A.loose===!!q.loose)return A;else A=A.value;if(A=A.trim().split(/\s+/).join(" "),XG8("comparator",A,q),this.options=q,this.loose=!!q.loose,this.parse(A),this.semver===eQ6)this.value="";else this.value=this.operator+this.semver.version;XG8("comp",this)}parse(A){let q=this.options.loose?Vr7[Nr7.COMPARATORLOOSE]:Vr7[Nr7.COMPARATOR],K=A.match(q);if(!K)throw TypeError(`Invalid comparator: ${A}`);if(this.operator=K[1]!==void 0?K[1]:"",this.operator==="=")this.operator="";if(!K[2])this.semver=eQ6;else this.semver=new vr7(K[2],this.options.loose)}toString(){return this.value}test(A){if(XG8("Comparator.test",A,this.options.loose),this.semver===eQ6||A===eQ6)return!0;if(typeof A==="string")try{A=new vr7(A,this.options)}catch(q){return!1}return DG8(A,this.operator,this.semver,this.options)}intersects(A,q){if(!(A instanceof ZX1))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new kr7(A.value,q).test(this.value)}else if(A.operator===""){if(A.value==="")return!0;return new kr7(this.value,q).test(A.semver)}if(q=Tr7(q),q.includePrerelease&&(this.value==="<0.0.0-0"||A.value==="<0.0.0-0"))return!1;if(!q.includePrerelease&&(this.value.startsWith("<0.0.0")||A.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&A.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&A.operator.startsWith("<"))return!0;if(this.semver.version===A.semver.version&&this.operator.includes("=")&&A.operator.includes("="))return!0;if(DG8(this.semver,"<",A.semver,q)&&this.operator.startsWith(">")&&A.operator.startsWith("<"))return!0;if(DG8(this.semver,">",A.semver,q)&&this.operator.startsWith("<")&&A.operator.startsWith(">"))return!0;return!1}}Er7.exports=ZX1;var Tr7=$X1(),{safeRe:Vr7,t:Nr7}=MZ6(),DG8=JG8(),XG8=oQ6(),vr7=zG(),kr7=WS()});var AU6=C((Ga2,Lr7)=>{var YE9=WS(),zE9=(A,q,K)=>{try{q=new YE9(q,K)}catch(Y){return!1}return q.test(A)};Lr7.exports=zE9});var Rr7=C((fa2,yr7)=>{var wE9=WS(),_E9=(A,q)=>new wE9(A,q).set.map((K)=>K.map((Y)=>Y.value).join(" ").trim().split(" "));yr7.exports=_E9});var Cr7=C((Ta2,Sr7)=>{var $E9=zG(),OE9=WS(),HE9=(A,q,K)=>{let Y=null,z=null,w=null;try{w=new OE9(q,K)}catch(_){return null}return A.forEach((_)=>{if(w.test(_)){if(!Y||z.compare(_)===-1)Y=_,z=new $E9(Y,K)}}),Y};Sr7.exports=HE9});var Ir7=C((Va2,hr7)=>{var jE9=zG(),JE9=WS(),ME9=(A,q,K)=>{let Y=null,z=null,w=null;try{w=new JE9(q,K)}catch(_){return null}return A.forEach((_)=>{if(w.test(_)){if(!Y||z.compare(_)===1)Y=_,z=new jE9(Y,K)}}),Y};hr7.exports=ME9});var ur7=C((Na2,xr7)=>{var PG8=zG(),DE9=WS(),br7=aQ6(),XE9=(A,q)=>{A=new DE9(A,q);let K=new PG8("0.0.0");if(A.test(K))return K;if(K=new PG8("0.0.0-0"),A.test(K))return K;K=null;for(let Y=0;Y{let $=new PG8(_.semver.version);switch(_.operator){case">":if($.prerelease.length===0)$.patch++;else $.prerelease.push(0);$.raw=$.format();case"":case">=":if(!w||br7($,w))w=$;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${_.operator}`)}}),w&&(!K||br7(K,w)))K=w}if(K&&A.test(K))return K;return null};xr7.exports=XE9});var mr7=C((va2,Br7)=>{var PE9=WS(),WE9=(A,q)=>{try{return new PE9(A,q).range||"*"}catch(K){return null}};Br7.exports=WE9});var GX1=C((ka2,Ur7)=>{var ZE9=zG(),Qr7=tQ6(),{ANY:GE9}=Qr7,fE9=WS(),TE9=AU6(),gr7=aQ6(),Fr7=MX1(),VE9=XX1(),NE9=DX1(),vE9=(A,q,K,Y)=>{A=new ZE9(A,Y),q=new fE9(q,Y);let z,w,_,$,O;switch(K){case">":z=gr7,w=VE9,_=Fr7,$=">",O=">=";break;case"<":z=Fr7,w=NE9,_=gr7,$="<",O="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(TE9(A,q,Y))return!1;for(let H=0;H{if(D.semver===GE9)D=new Qr7(">=0.0.0");if(J=J||D,M=M||D,z(D.semver,J.semver,Y))J=D;else if(_(D.semver,M.semver,Y))M=D}),J.operator===$||J.operator===O)return!1;if((!M.operator||M.operator===$)&&w(A,M.semver))return!1;else if(M.operator===O&&_(A,M.semver))return!1}return!0};Ur7.exports=vE9});var dr7=C((Ea2,pr7)=>{var kE9=GX1(),EE9=(A,q,K)=>kE9(A,q,">",K);pr7.exports=EE9});var lr7=C((La2,cr7)=>{var LE9=GX1(),yE9=(A,q,K)=>LE9(A,q,"<",K);cr7.exports=yE9});var rr7=C((ya2,nr7)=>{var ir7=WS(),RE9=(A,q,K)=>{return A=new ir7(A,K),q=new ir7(q,K),A.intersects(q,K)};nr7.exports=RE9});var ar7=C((Ra2,or7)=>{var SE9=AU6(),CE9=PS();or7.exports=(A,q,K)=>{let Y=[],z=null,w=null,_=A.sort((j,J)=>CE9(j,J,K));for(let j of _)if(SE9(j,q,K)){if(w=j,!z)z=j}else{if(w)Y.push([z,w]);w=null,z=null}if(z)Y.push([z,null]);let $=[];for(let[j,J]of Y)if(j===J)$.push(j);else if(!J&&j===_[0])$.push("*");else if(!J)$.push(`>=${j}`);else if(j===_[0])$.push(`<=${J}`);else $.push(`${j} - ${J}`);let O=$.join(" || "),H=typeof q.raw==="string"?q.raw:String(q);return O.length{var sr7=WS(),ZG8=tQ6(),{ANY:WG8}=ZG8,qU6=AU6(),GG8=PS(),hE9=(A,q,K={})=>{if(A===q)return!0;A=new sr7(A,K),q=new sr7(q,K);let Y=!1;A:for(let z of A.set){for(let w of q.set){let _=bE9(z,w,K);if(Y=Y||_!==null,_)continue A}if(Y)return!1}return!0},IE9=[new ZG8(">=0.0.0-0")],tr7=[new ZG8(">=0.0.0")],bE9=(A,q,K)=>{if(A===q)return!0;if(A.length===1&&A[0].semver===WG8)if(q.length===1&&q[0].semver===WG8)return!0;else if(K.includePrerelease)A=IE9;else A=tr7;if(q.length===1&&q[0].semver===WG8)if(K.includePrerelease)return!0;else q=tr7;let Y=new Set,z,w;for(let D of A)if(D.operator===">"||D.operator===">=")z=er7(z,D,K);else if(D.operator==="<"||D.operator==="<=")w=Ao7(w,D,K);else Y.add(D.semver);if(Y.size>1)return null;let _;if(z&&w){if(_=GG8(z.semver,w.semver,K),_>0)return null;else if(_===0&&(z.operator!==">="||w.operator!=="<="))return null}for(let D of Y){if(z&&!qU6(D,String(z),K))return null;if(w&&!qU6(D,String(w),K))return null;for(let X of q)if(!qU6(D,String(X),K))return!1;return!0}let $,O,H,j,J=w&&!K.includePrerelease&&w.semver.prerelease.length?w.semver:!1,M=z&&!K.includePrerelease&&z.semver.prerelease.length?z.semver:!1;if(J&&J.prerelease.length===1&&w.operator==="<"&&J.prerelease[0]===0)J=!1;for(let D of q){if(j=j||D.operator===">"||D.operator===">=",H=H||D.operator==="<"||D.operator==="<=",z){if(M){if(D.semver.prerelease&&D.semver.prerelease.length&&D.semver.major===M.major&&D.semver.minor===M.minor&&D.semver.patch===M.patch)M=!1}if(D.operator===">"||D.operator===">="){if($=er7(z,D,K),$===D&&$!==z)return!1}else if(z.operator===">="&&!qU6(z.semver,String(D),K))return!1}if(w){if(J){if(D.semver.prerelease&&D.semver.prerelease.length&&D.semver.major===J.major&&D.semver.minor===J.minor&&D.semver.patch===J.patch)J=!1}if(D.operator==="<"||D.operator==="<="){if(O=Ao7(w,D,K),O===D&&O!==w)return!1}else if(w.operator==="<="&&!qU6(w.semver,String(D),K))return!1}if(!D.operator&&(w||z)&&_!==0)return!1}if(z&&H&&!w&&_!==0)return!1;if(w&&j&&!z&&_!==0)return!1;if(M||J)return!1;return!0},er7=(A,q,K)=>{if(!A)return q;let Y=GG8(A.semver,q.semver,K);return Y>0?A:Y<0?q:q.operator===">"&&A.operator===">="?q:A},Ao7=(A,q,K)=>{if(!A)return q;let Y=GG8(A.semver,q.semver,K);return Y<0?A:Y>0?q:q.operator==="<"&&A.operator==="<="?q:A};qo7.exports=hE9});var fX1=C((Ca2,wo7)=>{var fG8=MZ6(),Yo7=rQ6(),xE9=zG(),zo7=OG8(),uE9=a96(),BE9=Sn7(),mE9=hn7(),gE9=xn7(),FE9=mn7(),QE9=Fn7(),UE9=Un7(),pE9=dn7(),dE9=ln7(),cE9=PS(),lE9=on7(),iE9=sn7(),nE9=JX1(),rE9=qr7(),oE9=Yr7(),aE9=aQ6(),sE9=MX1(),tE9=HG8(),eE9=jG8(),AL9=DX1(),qL9=XX1(),KL9=JG8(),YL9=Mr7(),zL9=tQ6(),wL9=WS(),_L9=AU6(),$L9=Rr7(),OL9=Cr7(),HL9=Ir7(),jL9=ur7(),JL9=mr7(),ML9=GX1(),DL9=dr7(),XL9=lr7(),PL9=rr7(),WL9=ar7(),ZL9=Ko7();wo7.exports={parse:uE9,valid:BE9,clean:mE9,inc:gE9,diff:FE9,major:QE9,minor:UE9,patch:pE9,prerelease:dE9,compare:cE9,rcompare:lE9,compareLoose:iE9,compareBuild:nE9,sort:rE9,rsort:oE9,gt:aE9,lt:sE9,eq:tE9,neq:eE9,gte:AL9,lte:qL9,cmp:KL9,coerce:YL9,Comparator:zL9,Range:wL9,satisfies:_L9,toComparators:$L9,maxSatisfying:OL9,minSatisfying:HL9,minVersion:jL9,validRange:JL9,outside:ML9,gtr:DL9,ltr:XL9,intersects:PL9,simplifyRange:WL9,subset:ZL9,SemVer:xE9,re:fG8.re,src:fG8.src,tokens:fG8.t,SEMVER_SPEC_VERSION:Yo7.SEMVER_SPEC_VERSION,RELEASE_TYPES:Yo7.RELEASE_TYPES,compareIdentifiers:zo7.compareIdentifiers,rcompareIdentifiers:zo7.rcompareIdentifiers}});var $o7=C((ha2,_o7)=>{var GL9=fX1();_o7.exports=GL9.satisfies(process.version,">=15.7.0")});var Ho7=C((Ia2,Oo7)=>{var fL9=fX1();Oo7.exports=fL9.satisfies(process.version,">=16.9.0")});var TG8=C((ba2,jo7)=>{var TL9=$o7(),VL9=Ho7(),NL9={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},vL9={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};jo7.exports=function(A,q){if(!A||!q)return;let K=q.asymmetricKeyType;if(!K)return;let Y=NL9[K];if(!Y)throw Error(`Unknown key type "${K}".`);if(!Y.includes(A))throw Error(`"alg" parameter for "${K}" key type must be one of: ${Y.join(", ")}.`);if(TL9)switch(K){case"ec":let z=q.asymmetricKeyDetails.namedCurve,w=vL9[A];if(z!==w)throw Error(`"alg" parameter "${A}" requires curve "${w}".`);break;case"rsa-pss":if(VL9){let _=parseInt(A.slice(-3),10),{hashAlgorithm:$,mgf1HashAlgorithm:O,saltLength:H}=q.asymmetricKeyDetails;if($!==`sha${_}`||O!==$)throw Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${A}.`);if(H!==void 0&&H>_>>3)throw Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${A}.`)}break}}});var VG8=C((xa2,Jo7)=>{var kL9=fX1();Jo7.exports=kL9.satisfies(process.version,"^6.12.0 || >=8.0.0")});var Xo7=C((ua2,Do7)=>{var W$=nQ6(),EL9=YG8(),Mo7=zG8(),LL9=KG8(),yL9=wG8(),RL9=TG8(),SL9=VG8(),CL9=YX1(),{KeyObject:hL9,createSecretKey:IL9,createPublicKey:bL9}=g6("crypto"),NG8=["RS256","RS384","RS512"],xL9=["ES256","ES384","ES512"],vG8=["RS256","RS384","RS512"],uL9=["HS256","HS384","HS512"];if(SL9)NG8.splice(NG8.length,0,"PS256","PS384","PS512"),vG8.splice(vG8.length,0,"PS256","PS384","PS512");Do7.exports=function(A,q,K,Y){if(typeof K==="function"&&!Y)Y=K,K={};if(!K)K={};K=Object.assign({},K);let z;if(Y)z=Y;else z=function(j,J){if(j)throw j;return J};if(K.clockTimestamp&&typeof K.clockTimestamp!=="number")return z(new W$("clockTimestamp must be a number"));if(K.nonce!==void 0&&(typeof K.nonce!=="string"||K.nonce.trim()===""))return z(new W$("nonce must be a non-empty string"));if(K.allowInvalidAsymmetricKeyTypes!==void 0&&typeof K.allowInvalidAsymmetricKeyTypes!=="boolean")return z(new W$("allowInvalidAsymmetricKeyTypes must be a boolean"));let w=K.clockTimestamp||Math.floor(Date.now()/1000);if(!A)return z(new W$("jwt must be provided"));if(typeof A!=="string")return z(new W$("jwt must be a string"));let _=A.split(".");if(_.length!==3)return z(new W$("jwt malformed"));let $;try{$=LL9(A,{complete:!0})}catch(j){return z(j)}if(!$)return z(new W$("invalid token"));let O=$.header,H;if(typeof q==="function"){if(!Y)return z(new W$("verify must be called asynchronous if secret or public key is provided as a callback"));H=q}else H=function(j,J){return J(null,q)};return H(O,function(j,J){if(j)return z(new W$("error in secret or public key callback: "+j.message));let M=_[2].trim()!=="";if(!M&&J)return z(new W$("jwt signature is required"));if(M&&!J)return z(new W$("secret or public key must be provided"));if(!M&&!K.algorithms)return z(new W$('please specify "none" in "algorithms" to verify unsigned tokens'));if(J!=null&&!(J instanceof hL9))try{J=bL9(J)}catch(P){try{J=IL9(typeof J==="string"?Buffer.from(J):J)}catch(W){return z(new W$("secretOrPublicKey is not valid key material"))}}if(!K.algorithms)if(J.type==="secret")K.algorithms=uL9;else if(["rsa","rsa-pss"].includes(J.asymmetricKeyType))K.algorithms=vG8;else if(J.asymmetricKeyType==="ec")K.algorithms=xL9;else K.algorithms=NG8;if(K.algorithms.indexOf($.header.alg)===-1)return z(new W$("invalid algorithm"));if(O.alg.startsWith("HS")&&J.type!=="secret")return z(new W$(`secretOrPublicKey must be a symmetric key when using ${O.alg}`));else if(/^(?:RS|PS|ES)/.test(O.alg)&&J.type!=="public")return z(new W$(`secretOrPublicKey must be an asymmetric key when using ${O.alg}`));if(!K.allowInvalidAsymmetricKeyTypes)try{RL9(O.alg,J)}catch(P){return z(P)}let D;try{D=CL9.verify(A,$.header.alg,J)}catch(P){return z(P)}if(!D)return z(new W$("invalid signature"));let X=$.payload;if(typeof X.nbf<"u"&&!K.ignoreNotBefore){if(typeof X.nbf!=="number")return z(new W$("invalid nbf value"));if(X.nbf>w+(K.clockTolerance||0))return z(new EL9("jwt not active",new Date(X.nbf*1000)))}if(typeof X.exp<"u"&&!K.ignoreExpiration){if(typeof X.exp!=="number")return z(new W$("invalid exp value"));if(w>=X.exp+(K.clockTolerance||0))return z(new Mo7("jwt expired",new Date(X.exp*1000)))}if(K.audience){let P=Array.isArray(K.audience)?K.audience:[K.audience];if(!(Array.isArray(X.aud)?X.aud:[X.aud]).some(function(G){return P.some(function(f){return f instanceof RegExp?f.test(G):f===G})}))return z(new W$("jwt audience invalid. expected: "+P.join(" or ")))}if(K.issuer){if(typeof K.issuer==="string"&&X.iss!==K.issuer||Array.isArray(K.issuer)&&K.issuer.indexOf(X.iss)===-1)return z(new W$("jwt issuer invalid. expected: "+K.issuer))}if(K.subject){if(X.sub!==K.subject)return z(new W$("jwt subject invalid. expected: "+K.subject))}if(K.jwtid){if(X.jti!==K.jwtid)return z(new W$("jwt jwtid invalid. expected: "+K.jwtid))}if(K.nonce){if(X.nonce!==K.nonce)return z(new W$("jwt nonce invalid. expected: "+K.nonce))}if(K.maxAge){if(typeof X.iat!=="number")return z(new W$("iat required when maxAge is specified"));let P=yL9(K.maxAge,X.iat);if(typeof P>"u")return z(new W$('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(w>=P+(K.clockTolerance||0))return z(new Mo7("maxAge exceeded",new Date(P*1000)))}if(K.complete===!0){let P=$.signature;return z(null,{header:O,payload:X,signature:P})}return z(null,X)})}});var To7=C((Ba2,fo7)=>{var Po7=1/0,Zo7=9007199254740991,BL9=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,Wo7=NaN,mL9="[object Arguments]",gL9="[object Function]",FL9="[object GeneratorFunction]",QL9="[object String]",UL9="[object Symbol]",pL9=/^\s+|\s+$/g,dL9=/^[-+]0x[0-9a-f]+$/i,cL9=/^0b[01]+$/i,lL9=/^0o[0-7]+$/i,iL9=/^(?:0|[1-9]\d*)$/,nL9=parseInt;function rL9(A,q){var K=-1,Y=A?A.length:0,z=Array(Y);while(++K-1&&A%1==0&&A-1:!!z&&aL9(A,q,K)>-1}function Hy9(A){return jy9(A)&&EG8.call(A,"callee")&&(!qy9.call(A,"callee")||VX1.call(A)==mL9)}var Go7=Array.isArray;function LG8(A){return A!=null&&My9(A.length)&&!Jy9(A)}function jy9(A){return yG8(A)&&LG8(A)}function Jy9(A){var q=kG8(A)?VX1.call(A):"";return q==gL9||q==FL9}function My9(A){return typeof A=="number"&&A>-1&&A%1==0&&A<=Zo7}function kG8(A){var q=typeof A;return!!A&&(q=="object"||q=="function")}function yG8(A){return!!A&&typeof A=="object"}function Dy9(A){return typeof A=="string"||!Go7(A)&&yG8(A)&&VX1.call(A)==QL9}function Xy9(A){return typeof A=="symbol"||yG8(A)&&VX1.call(A)==UL9}function Py9(A){if(!A)return A===0?A:0;if(A=Zy9(A),A===Po7||A===-Po7){var q=A<0?-1:1;return q*BL9}return A===A?A:0}function Wy9(A){var q=Py9(A),K=q%1;return q===q?K?q-K:q:0}function Zy9(A){if(typeof A=="number")return A;if(Xy9(A))return Wo7;if(kG8(A)){var q=typeof A.valueOf=="function"?A.valueOf():A;A=kG8(q)?q+"":q}if(typeof A!="string")return A===0?A:+A;A=A.replace(pL9,"");var K=cL9.test(A);return K||lL9.test(A)?nL9(A.slice(2),K?2:8):dL9.test(A)?Wo7:+A}function Gy9(A){return LG8(A)?zy9(A):wy9(A)}function fy9(A){return A?eL9(A,Gy9(A)):[]}fo7.exports=Oy9});var No7=C((ma2,Vo7)=>{var Ty9="[object Boolean]",Vy9=Object.prototype,Ny9=Vy9.toString;function vy9(A){return A===!0||A===!1||ky9(A)&&Ny9.call(A)==Ty9}function ky9(A){return!!A&&typeof A=="object"}Vo7.exports=vy9});var yo7=C((ga2,Lo7)=>{var vo7=1/0,Ey9=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,ko7=NaN,Ly9="[object Symbol]",yy9=/^\s+|\s+$/g,Ry9=/^[-+]0x[0-9a-f]+$/i,Sy9=/^0b[01]+$/i,Cy9=/^0o[0-7]+$/i,hy9=parseInt,Iy9=Object.prototype,by9=Iy9.toString;function xy9(A){return typeof A=="number"&&A==gy9(A)}function Eo7(A){var q=typeof A;return!!A&&(q=="object"||q=="function")}function uy9(A){return!!A&&typeof A=="object"}function By9(A){return typeof A=="symbol"||uy9(A)&&by9.call(A)==Ly9}function my9(A){if(!A)return A===0?A:0;if(A=Fy9(A),A===vo7||A===-vo7){var q=A<0?-1:1;return q*Ey9}return A===A?A:0}function gy9(A){var q=my9(A),K=q%1;return q===q?K?q-K:q:0}function Fy9(A){if(typeof A=="number")return A;if(By9(A))return ko7;if(Eo7(A)){var q=typeof A.valueOf=="function"?A.valueOf():A;A=Eo7(q)?q+"":q}if(typeof A!="string")return A===0?A:+A;A=A.replace(yy9,"");var K=Sy9.test(A);return K||Cy9.test(A)?hy9(A.slice(2),K?2:8):Ry9.test(A)?ko7:+A}Lo7.exports=xy9});var So7=C((Fa2,Ro7)=>{var Qy9="[object Number]",Uy9=Object.prototype,py9=Uy9.toString;function dy9(A){return!!A&&typeof A=="object"}function cy9(A){return typeof A=="number"||dy9(A)&&py9.call(A)==Qy9}Ro7.exports=cy9});var bo7=C((Qa2,Io7)=>{var ly9="[object Object]";function iy9(A){var q=!1;if(A!=null&&typeof A.toString!="function")try{q=!!(A+"")}catch(K){}return q}function ny9(A,q){return function(K){return A(q(K))}}var ry9=Function.prototype,Co7=Object.prototype,ho7=ry9.toString,oy9=Co7.hasOwnProperty,ay9=ho7.call(Object),sy9=Co7.toString,ty9=ny9(Object.getPrototypeOf,Object);function ey9(A){return!!A&&typeof A=="object"}function AR9(A){if(!ey9(A)||sy9.call(A)!=ly9||iy9(A))return!1;var q=ty9(A);if(q===null)return!0;var K=oy9.call(q,"constructor")&&q.constructor;return typeof K=="function"&&K instanceof K&&ho7.call(K)==ay9}Io7.exports=AR9});var uo7=C((Ua2,xo7)=>{var qR9="[object String]",KR9=Object.prototype,YR9=KR9.toString,zR9=Array.isArray;function wR9(A){return!!A&&typeof A=="object"}function _R9(A){return typeof A=="string"||!zR9(A)&&wR9(A)&&YR9.call(A)==qR9}xo7.exports=_R9});var Qo7=C((pa2,Fo7)=>{var $R9="Expected a function",Bo7=1/0,OR9=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,mo7=NaN,HR9="[object Symbol]",jR9=/^\s+|\s+$/g,JR9=/^[-+]0x[0-9a-f]+$/i,MR9=/^0b[01]+$/i,DR9=/^0o[0-7]+$/i,XR9=parseInt,PR9=Object.prototype,WR9=PR9.toString;function ZR9(A,q){var K;if(typeof q!="function")throw TypeError($R9);return A=NR9(A),function(){if(--A>0)K=q.apply(this,arguments);if(A<=1)q=void 0;return K}}function GR9(A){return ZR9(2,A)}function go7(A){var q=typeof A;return!!A&&(q=="object"||q=="function")}function fR9(A){return!!A&&typeof A=="object"}function TR9(A){return typeof A=="symbol"||fR9(A)&&WR9.call(A)==HR9}function VR9(A){if(!A)return A===0?A:0;if(A=vR9(A),A===Bo7||A===-Bo7){var q=A<0?-1:1;return q*OR9}return A===A?A:0}function NR9(A){var q=VR9(A),K=q%1;return q===q?K?q-K:q:0}function vR9(A){if(typeof A=="number")return A;if(TR9(A))return mo7;if(go7(A)){var q=typeof A.valueOf=="function"?A.valueOf():A;A=go7(q)?q+"":q}if(typeof A!="string")return A===0?A:+A;A=A.replace(jR9,"");var K=MR9.test(A);return K||DR9.test(A)?XR9(A.slice(2),K?2:8):JR9.test(A)?mo7:+A}Fo7.exports=GR9});var oo7=C((da2,ro7)=>{var Uo7=wG8(),kR9=VG8(),ER9=TG8(),po7=YX1(),LR9=To7(),NX1=No7(),do7=yo7(),RG8=So7(),lo7=bo7(),se=uo7(),yR9=Qo7(),{KeyObject:RR9,createSecretKey:SR9,createPrivateKey:CR9}=g6("crypto"),io7=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];if(kR9)io7.splice(3,0,"PS256","PS384","PS512");var hR9={expiresIn:{isValid:function(A){return do7(A)||se(A)&&A},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(A){return do7(A)||se(A)&&A},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(A){return se(A)||Array.isArray(A)},message:'"audience" must be a string or array'},algorithm:{isValid:LR9.bind(null,io7),message:'"algorithm" must be a valid string enum value'},header:{isValid:lo7,message:'"header" must be an object'},encoding:{isValid:se,message:'"encoding" must be a string'},issuer:{isValid:se,message:'"issuer" must be a string'},subject:{isValid:se,message:'"subject" must be a string'},jwtid:{isValid:se,message:'"jwtid" must be a string'},noTimestamp:{isValid:NX1,message:'"noTimestamp" must be a boolean'},keyid:{isValid:se,message:'"keyid" must be a string'},mutatePayload:{isValid:NX1,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:NX1,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:NX1,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},IR9={iat:{isValid:RG8,message:'"iat" should be a number of seconds'},exp:{isValid:RG8,message:'"exp" should be a number of seconds'},nbf:{isValid:RG8,message:'"nbf" should be a number of seconds'}};function no7(A,q,K,Y){if(!lo7(K))throw Error('Expected "'+Y+'" to be a plain object.');Object.keys(K).forEach(function(z){let w=A[z];if(!w){if(!q)throw Error('"'+z+'" is not allowed in "'+Y+'"');return}if(!w.isValid(K[z]))throw Error(w.message)})}function bR9(A){return no7(hR9,!1,A,"options")}function xR9(A){return no7(IR9,!0,A,"payload")}var co7={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},uR9=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];ro7.exports=function(A,q,K,Y){if(typeof K==="function")Y=K,K={};else K=K||{};let z=typeof A==="object"&&!Buffer.isBuffer(A),w=Object.assign({alg:K.algorithm||"HS256",typ:z?"JWT":void 0,kid:K.keyid},K.header);function _(H){if(Y)return Y(H);throw H}if(!q&&K.algorithm!=="none")return _(Error("secretOrPrivateKey must have a value"));if(q!=null&&!(q instanceof RR9))try{q=CR9(q)}catch(H){try{q=SR9(typeof q==="string"?Buffer.from(q):q)}catch(j){return _(Error("secretOrPrivateKey is not valid key material"))}}if(w.alg.startsWith("HS")&&q.type!=="secret")return _(Error(`secretOrPrivateKey must be a symmetric key when using ${w.alg}`));else if(/^(?:RS|PS|ES)/.test(w.alg)){if(q.type!=="private")return _(Error(`secretOrPrivateKey must be an asymmetric key when using ${w.alg}`));if(!K.allowInsecureKeySizes&&!w.alg.startsWith("ES")&&q.asymmetricKeyDetails!==void 0&&q.asymmetricKeyDetails.modulusLength<2048)return _(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${w.alg}`))}if(typeof A>"u")return _(Error("payload is required"));else if(z){try{xR9(A)}catch(H){return _(H)}if(!K.mutatePayload)A=Object.assign({},A)}else{let H=uR9.filter(function(j){return typeof K[j]<"u"});if(H.length>0)return _(Error("invalid "+H.join(",")+" option for "+typeof A+" payload"))}if(typeof A.exp<"u"&&typeof K.expiresIn<"u")return _(Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(typeof A.nbf<"u"&&typeof K.notBefore<"u")return _(Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{bR9(K)}catch(H){return _(H)}if(!K.allowInvalidAsymmetricKeyTypes)try{ER9(w.alg,q)}catch(H){return _(H)}let $=A.iat||Math.floor(Date.now()/1000);if(K.noTimestamp)delete A.iat;else if(z)A.iat=$;if(typeof K.notBefore<"u"){try{A.nbf=Uo7(K.notBefore,$)}catch(H){return _(H)}if(typeof A.nbf>"u")return _(Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(typeof K.expiresIn<"u"&&typeof A==="object"){try{A.exp=Uo7(K.expiresIn,$)}catch(H){return _(H)}if(typeof A.exp>"u")return _(Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(co7).forEach(function(H){let j=co7[H];if(typeof K[H]<"u"){if(typeof A[j]<"u")return _(Error('Bad "options.'+H+'" option. The payload already has an "'+j+'" property.'));A[j]=K[H]}});let O=K.encoding||"utf8";if(typeof Y==="function")Y=Y&&yR9(Y),po7.createSign({header:w,privateKey:q,payload:A,encoding:O}).once("error",Y).once("done",function(H){if(!K.allowInsecureKeySizes&&/^(?:RS|PS)/.test(w.alg)&&H.length<256)return Y(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${w.alg}`));Y(null,H)});else{let H=po7.sign({header:w,payload:A,secret:q,encoding:O});if(!K.allowInsecureKeySizes&&/^(?:RS|PS)/.test(w.alg)&&H.length<256)throw Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${w.alg}`);return H}}});var so7=C((ca2,ao7)=>{ao7.exports={decode:KG8(),verify:Xo7(),sign:oo7(),JsonWebTokenError:nQ6(),NotBeforeError:YG8(),TokenExpiredError:zG8()}});class Fb{static fromAssertion(A){let q=new Fb;return q.jwt=A,q}static fromCertificate(A,q,K){let Y=new Fb;if(Y.privateKey=q,Y.thumbprint=A,Y.useSha256=!1,K)Y.publicCertificate=this.parseCertificate(K);return Y}static fromCertificateWithSha256Thumbprint(A,q,K){let Y=new Fb;if(Y.privateKey=q,Y.thumbprint=A,Y.useSha256=!0,K)Y.publicCertificate=this.parseCertificate(K);return Y}getJwt(A,q,K){if(this.privateKey&&this.thumbprint){if(this.jwt&&!this.isExpired()&&q===this.issuer&&K===this.jwtAudience)return this.jwt;return this.createJwt(A,q,K)}if(this.jwt)return this.jwt;throw JA(i2.invalidAssertion)}createJwt(A,q,K){this.issuer=q,this.jwtAudience=K;let Y=zO.nowSeconds();this.expirationTime=Y+600;let w={alg:this.useSha256?DS.PSS_256:DS.RSA_256},_=this.useSha256?DS.X5T_256:DS.X5T;if(Object.assign(w,{[_]:uN.base64EncodeUrl(this.thumbprint,i0.HEX)}),this.publicCertificate)Object.assign(w,{[DS.X5C]:this.publicCertificate});let $={[DS.AUDIENCE]:this.jwtAudience,[DS.EXPIRATION_TIME]:this.expirationTime,[DS.ISSUER]:this.issuer,[DS.SUBJECT]:this.issuer,[DS.NOT_BEFORE]:Y,[DS.JWT_ID]:A.createNewGuid()};return this.jwt=to7.default.sign($,this.privateKey,{header:w}),this.jwt}isExpired(){return this.expirationTime{nw();QQ6();_O();to7=e(so7(),1);/*! @azure/msal-node v3.8.1 2025-10-29 */});var kX1="@azure/msal-node",Qb="3.8.1";var XZ6=k(()=>{/*! @azure/msal-node v3.8.1 2025-10-29 */});var KU6;var SG8=k(()=>{nw();/*! @azure/msal-node v3.8.1 2025-10-29 */KU6=class KU6 extends YG{constructor(A){super(A)}async acquireToken(A){this.logger.info("in acquireToken call in username-password client");let q=zO.nowSeconds(),K=await this.executeTokenRequest(this.authority,A),Y=new dj(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return Y.validateTokenResponse(K.body),Y.handleServerTokenResponse(K.body,this.authority,q,A)}async executeTokenRequest(A,q){let K=this.createTokenQueryParameters(q),Y=D5.appendQueryString(A.tokenEndpoint,K),z=await this.createTokenRequestBody(q),w=this.createTokenRequestHeaders({credential:q.username,type:wT.UPN}),_={clientId:this.config.authOptions.clientId,authority:A.canonicalAuthority,scopes:q.scopes,claims:q.claims,authenticationScheme:q.authenticationScheme,resourceRequestMethod:q.resourceRequestMethod,resourceRequestUri:q.resourceRequestUri,shrClaims:q.shrClaims,sshKid:q.sshKid};return this.executePostToTokenEndpoint(Y,z,w,_,q.correlationId)}async createTokenRequestBody(A){let q=new Map;if(P4.addClientId(q,this.config.authOptions.clientId),P4.addUsername(q,A.username),P4.addPassword(q,A.password),P4.addScopes(q,A.scopes),P4.addResponseType(q,UW6.IDTOKEN_TOKEN),P4.addGrantType(q,IN.RESOURCE_OWNER_PASSWORD_GRANT),P4.addClientInfo(q),P4.addLibraryInfo(q,this.config.libraryInfo),P4.addApplicationTelemetry(q,this.config.telemetry.application),P4.addThrottling(q),this.serverTelemetryManager)P4.addServerTelemetry(q,this.serverTelemetryManager);let K=A.correlationId||this.config.cryptoInterface.createNewGuid();if(P4.addCorrelationId(q,K),this.config.clientCredentials.clientSecret)P4.addClientSecret(q,this.config.clientCredentials.clientSecret);let Y=this.config.clientCredentials.clientAssertion;if(Y)P4.addClientAssertion(q,await OT(Y.assertion,this.config.authOptions.clientId,A.resourceRequestUri)),P4.addClientAssertionType(q,Y.assertionType);if(!v_.isEmptyObj(A.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)P4.addClaims(q,A.claims,this.config.authOptions.clientCapabilities);if(this.config.systemOptions.preventCorsPreflight&&A.username)P4.addCcsUpn(q,A.username);return n0.mapToQueryString(q)}}});function eo7(A,q,K,Y){let z=IQ6.getStandardAuthorizeRequestParameters({...A.auth,authority:q,redirectUri:K.redirectUri||""},K,Y);if(P4.addLibraryInfo(z,{sku:HT.MSAL_SKU,version:Qb,cpu:process.arch||"",os:process.platform||""}),A.auth.protocolMode!==KG.OIDC)P4.addApplicationTelemetry(z,A.telemetry.application);if(P4.addResponseType(z,UW6.CODE),K.codeChallenge&&K.codeChallengeMethod)P4.addCodeChallengeParams(z,K.codeChallenge,K.codeChallengeMethod);return P4.addExtraQueryParameters(z,K.extraQueryParameters||{}),IQ6.getAuthorizeUrl(q,z,A.auth.encodeExtraQueryParams,K.extraQueryParameters)}var Aa7=k(()=>{nw();_O();XZ6();/*! @azure/msal-node v3.8.1 2025-10-29 */});class s96{constructor(A){this.config=kl7(A),this.cryptoProvider=new kl,this.logger=new bN(this.config.system.loggerOptions,kX1,Qb),this.storage=new r96(this.logger,this.config.auth.clientId,this.cryptoProvider,TZ8(this.config.auth)),this.tokenCache=new dQ6(this.storage,this.logger,this.config.cache.cachePlugin)}async getAuthCodeUrl(A){this.logger.info("getAuthCodeUrl called",A.correlationId);let q={...A,...await this.initializeBaseRequest(A),responseMode:A.responseMode||pg.QUERY,authenticationScheme:AY.BEARER,state:A.state||"",nonce:A.nonce||""},K=await this.createAuthority(q.authority,q.correlationId,void 0,A.azureCloudOptions);return eo7(this.config,K,q,this.logger)}async acquireTokenByCode(A,q){if(this.logger.info("acquireTokenByCode called"),A.state&&q)this.logger.info("acquireTokenByCode - validating state"),this.validateState(A.state,q.state||""),q={...q,state:""};let K={...A,...await this.initializeBaseRequest(A),authenticationScheme:AY.BEARER},Y=this.initializeServerTelemetryManager(Nl.acquireTokenByCode,K.correlationId);try{let z=await this.createAuthority(K.authority,K.correlationId,void 0,A.azureCloudOptions),w=await this.buildOauthClientConfiguration(z,K.correlationId,K.redirectUri,Y),_=new yD1(w);return this.logger.verbose("Auth code client created",K.correlationId),await _.acquireToken(K,q)}catch(z){if(z instanceof c3)z.setCorrelationId(K.correlationId);throw Y.cacheFailedRequest(z),z}}async acquireTokenByRefreshToken(A){this.logger.info("acquireTokenByRefreshToken called",A.correlationId);let q={...A,...await this.initializeBaseRequest(A),authenticationScheme:AY.BEARER},K=this.initializeServerTelemetryManager(Nl.acquireTokenByRefreshToken,q.correlationId);try{let Y=await this.createAuthority(q.authority,q.correlationId,void 0,A.azureCloudOptions),z=await this.buildOauthClientConfiguration(Y,q.correlationId,q.redirectUri||"",K),w=new $Z6(z);return this.logger.verbose("Refresh token client created",q.correlationId),await w.acquireToken(q)}catch(Y){if(Y instanceof c3)Y.setCorrelationId(q.correlationId);throw K.cacheFailedRequest(Y),Y}}async acquireTokenSilent(A){let q={...A,...await this.initializeBaseRequest(A),forceRefresh:A.forceRefresh||!1},K=this.initializeServerTelemetryManager(Nl.acquireTokenSilent,q.correlationId,q.forceRefresh);try{let Y=await this.createAuthority(q.authority,q.correlationId,void 0,A.azureCloudOptions),z=await this.buildOauthClientConfiguration(Y,q.correlationId,q.redirectUri||"",K),w=new RD1(z);this.logger.verbose("Silent flow client created",q.correlationId);try{return await this.tokenCache.overwriteCache(),await this.acquireCachedTokenSilent(q,w,z)}catch(_){if(_ instanceof ge&&_.errorCode===i2.tokenRefreshRequired)return new $Z6(z).acquireTokenByRefreshToken(q);throw _}}catch(Y){if(Y instanceof c3)Y.setCorrelationId(q.correlationId);throw K.cacheFailedRequest(Y),Y}}async acquireCachedTokenSilent(A,q,K){let[Y,z]=await q.acquireCachedToken({...A,scopes:A.scopes?.length?A.scopes:[...qG]});if(z===N_.PROACTIVELY_REFRESHED){this.logger.info("ClientApplication:acquireCachedTokenSilent - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.");let w=new $Z6(K);try{await w.acquireTokenByRefreshToken(A)}catch{}}return Y}async acquireTokenByUsernamePassword(A){this.logger.info("acquireTokenByUsernamePassword called",A.correlationId);let q={...A,...await this.initializeBaseRequest(A)},K=this.initializeServerTelemetryManager(Nl.acquireTokenByUsernamePassword,q.correlationId);try{let Y=await this.createAuthority(q.authority,q.correlationId,void 0,A.azureCloudOptions),z=await this.buildOauthClientConfiguration(Y,q.correlationId,"",K),w=new KU6(z);return this.logger.verbose("Username password client created",q.correlationId),await w.acquireToken(q)}catch(Y){if(Y instanceof c3)Y.setCorrelationId(q.correlationId);throw K.cacheFailedRequest(Y),Y}}getTokenCache(){return this.logger.info("getTokenCache called"),this.tokenCache}validateState(A,q){if(!A)throw qH.createStateNotFoundError();if(A!==q)throw JA(i2.stateMismatch)}getLogger(){return this.logger}setLogger(A){this.logger=A}async buildOauthClientConfiguration(A,q,K,Y){return this.logger.verbose("buildOauthClientConfiguration called",q),this.logger.info(`Building oauth client configuration with the following authority: ${A.tokenEndpoint}.`,q),Y?.updateRegionDiscoveryMetadata(A.regionDiscoveryMetadata),{authOptions:{clientId:this.config.auth.clientId,authority:A,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:K},loggerOptions:{logLevel:this.config.system.loggerOptions.logLevel,loggerCallback:this.config.system.loggerOptions.loggerCallback,piiLoggingEnabled:this.config.system.loggerOptions.piiLoggingEnabled,correlationId:q},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.cryptoProvider,networkInterface:this.config.system.networkClient,storageInterface:this.storage,serverTelemetryManager:Y,clientCredentials:{clientSecret:this.clientSecret,clientAssertion:await this.getClientAssertion(A)},libraryInfo:{sku:HT.MSAL_SKU,version:Qb,cpu:process.arch||n8.EMPTY_STRING,os:process.platform||n8.EMPTY_STRING},telemetry:this.config.telemetry,persistencePlugin:this.config.cache.cachePlugin,serializableCache:this.tokenCache}}async getClientAssertion(A){if(this.developerProvidedClientAssertion)this.clientAssertion=Fb.fromAssertion(await OT(this.developerProvidedClientAssertion,this.config.auth.clientId,A.tokenEndpoint));return this.clientAssertion&&{assertion:this.clientAssertion.getJwt(this.cryptoProvider,this.config.auth.clientId,A.tokenEndpoint),assertionType:HT.JWT_BEARER_ASSERTION_TYPE}}async initializeBaseRequest(A){if(this.logger.verbose("initializeRequestScopes called",A.correlationId),A.authenticationScheme&&A.authenticationScheme===AY.POP)this.logger.verbose("Authentication Scheme 'pop' is not supported yet, setting Authentication Scheme to 'Bearer' for request",A.correlationId);if(A.authenticationScheme=AY.BEARER,this.config.cache.claimsBasedCachingEnabled&&A.claims&&!v_.isEmptyObj(A.claims))A.requestedClaimsHash=await this.cryptoProvider.hashString(A.claims);return{...A,scopes:[...A&&A.scopes||[],...qG],correlationId:A&&A.correlationId||this.cryptoProvider.createNewGuid(),authority:A.authority||this.config.auth.authority}}initializeServerTelemetryManager(A,q,K){let Y={clientId:this.config.auth.clientId,correlationId:q,apiId:A,forceRefresh:K||!1};return new re(Y,this.storage)}async createAuthority(A,q,K,Y){this.logger.verbose("createAuthority called",q);let z=rD.generateAuthority(A,Y||this.config.auth.azureCloudOptions),w={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,azureRegionConfiguration:K,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache};return PD1.createDiscoveredInstance(z,this.config.system.networkClient,this.storage,w,this.logger,q)}clearCache(){this.storage.clear()}}var EX1=k(()=>{nw();uZ8();UQ6();iD1();_O();cZ8();vX1();XZ6();BQ6();SG8();Aa7();/*! @azure/msal-node v3.8.1 2025-10-29 */});import BR9 from"http";class CG8{async listenForAuthCode(A,q){if(this.server)throw qH.createLoopbackServerAlreadyExistsError();return new Promise((K,Y)=>{this.server=BR9.createServer((z,w)=>{let _=z.url;if(!_){w.end(q||"Error occurred loading redirectUrl"),Y(qH.createUnableToLoadRedirectUrlError());return}else if(_===n8.FORWARD_SLASH){w.end(A||"Auth code was successfully acquired. You can close this window now.");return}let $=this.getRedirectUri(),O=new URL(_,$),H=n0.getDeserializedResponse(O.search)||{};if(H.code)w.writeHead(d3.REDIRECT,{location:$}),w.end();if(H.error)w.end(q||`Error occurred: ${H.error}`);K(H)}),this.server.listen(0,"127.0.0.1")})}getRedirectUri(){if(!this.server||!this.server.listening)throw qH.createNoLoopbackServerExistsError();let A=this.server.address();if(!A||typeof A==="string"||!A.port)throw this.closeServer(),qH.createInvalidLoopbackAddressTypeError();let q=A&&A.port;return`${HT.HTTP_PROTOCOL}${HT.LOCALHOST}:${q}`}closeServer(){if(this.server){if(this.server.close(),typeof this.server.closeAllConnections==="function")this.server.closeAllConnections();this.server.unref(),this.server=void 0}}}var qa7=k(()=>{nw();BQ6();_O();/*! @azure/msal-node v3.8.1 2025-10-29 */});var YU6;var hG8=k(()=>{nw();/*! @azure/msal-node v3.8.1 2025-10-29 */YU6=class YU6 extends YG{constructor(A){super(A)}async acquireToken(A){let q=await this.getDeviceCode(A);A.deviceCodeCallback(q);let K=zO.nowSeconds(),Y=await this.acquireTokenWithDeviceCode(A,q),z=new dj(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return z.validateTokenResponse(Y),z.handleServerTokenResponse(Y,this.authority,K,A)}async getDeviceCode(A){let q=this.createExtraQueryParameters(A),K=D5.appendQueryString(this.authority.deviceCodeEndpoint,q),Y=this.createQueryString(A),z=this.createTokenRequestHeaders(),w={clientId:this.config.authOptions.clientId,authority:A.authority,scopes:A.scopes,claims:A.claims,authenticationScheme:A.authenticationScheme,resourceRequestMethod:A.resourceRequestMethod,resourceRequestUri:A.resourceRequestUri,shrClaims:A.shrClaims,sshKid:A.sshKid};return this.executePostRequestToDeviceCodeEndpoint(K,Y,z,w,A.correlationId)}createExtraQueryParameters(A){let q=new Map;if(A.extraQueryParameters)P4.addExtraQueryParameters(q,A.extraQueryParameters);return n0.mapToQueryString(q)}async executePostRequestToDeviceCodeEndpoint(A,q,K,Y,z){let{body:{user_code:w,device_code:_,verification_uri:$,expires_in:O,interval:H,message:j}}=await this.sendPostRequest(Y,A,{body:q,headers:K},z);return{userCode:w,deviceCode:_,verificationUri:$,expiresIn:O,interval:H,message:j}}createQueryString(A){let q=new Map;if(P4.addScopes(q,A.scopes),P4.addClientId(q,this.config.authOptions.clientId),A.extraQueryParameters)P4.addExtraQueryParameters(q,A.extraQueryParameters);if(A.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)P4.addClaims(q,A.claims,this.config.authOptions.clientCapabilities);return n0.mapToQueryString(q)}continuePolling(A,q,K){if(K)throw this.logger.error("Token request cancelled by setting DeviceCodeRequest.cancel = true"),JA(i2.deviceCodePollingCancelled);else if(q&&qq)throw this.logger.error(`User defined timeout for device code polling reached. The timeout was set for ${q}`),JA(i2.userTimeoutReached);else if(zO.nowSeconds()>A){if(q)this.logger.verbose(`User specified timeout ignored as the device code has expired before the timeout elapsed. The user specified timeout was set for ${q}`);throw this.logger.error(`Device code expired. Expiration time of device code was ${A}`),JA(i2.deviceCodeExpired)}return!0}async acquireTokenWithDeviceCode(A,q){let K=this.createTokenQueryParameters(A),Y=D5.appendQueryString(this.authority.tokenEndpoint,K),z=this.createTokenRequestBody(A,q),w=this.createTokenRequestHeaders(),_=A.timeout?zO.nowSeconds()+A.timeout:void 0,$=zO.nowSeconds()+q.expiresIn,O=q.interval*1000;while(this.continuePolling($,_,A.cancel)){let H={clientId:this.config.authOptions.clientId,authority:A.authority,scopes:A.scopes,claims:A.claims,authenticationScheme:A.authenticationScheme,resourceRequestMethod:A.resourceRequestMethod,resourceRequestUri:A.resourceRequestUri,shrClaims:A.shrClaims,sshKid:A.sshKid},j=await this.executePostToTokenEndpoint(Y,z,w,H,A.correlationId);if(j.body&&j.body.error)if(j.body.error===n8.AUTHORIZATION_PENDING)this.logger.info("Authorization pending. Continue polling."),await zO.delay(O);else throw this.logger.info("Unexpected error in polling from the server"),wW8(cW6.postRequestFailed,j.body.error);else return this.logger.verbose("Authorization completed successfully. Polling stopped."),j.body}throw this.logger.error("Polling stopped for unknown reasons."),JA(i2.deviceCodeUnknownError)}createTokenRequestBody(A,q){let K=new Map;P4.addScopes(K,A.scopes),P4.addClientId(K,this.config.authOptions.clientId),P4.addGrantType(K,IN.DEVICE_CODE_GRANT),P4.addDeviceCode(K,q.deviceCode);let Y=A.correlationId||this.config.cryptoInterface.createNewGuid();if(P4.addCorrelationId(K,Y),P4.addClientInfo(K),P4.addLibraryInfo(K,this.config.libraryInfo),P4.addApplicationTelemetry(K,this.config.telemetry.application),P4.addThrottling(K),this.serverTelemetryManager)P4.addServerTelemetry(K,this.serverTelemetryManager);if(!v_.isEmptyObj(A.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)P4.addClaims(K,A.claims,this.config.authOptions.clientCapabilities);return n0.mapToQueryString(K)}}});var zU6;var Ka7=k(()=>{_O();nw();EX1();BQ6();qa7();hG8();XZ6();/*! @azure/msal-node v3.8.1 2025-10-29 */zU6=class zU6 extends s96{constructor(A){super(A);if(this.config.broker.nativeBrokerPlugin)if(this.config.broker.nativeBrokerPlugin.isBrokerAvailable)this.nativeBrokerPlugin=this.config.broker.nativeBrokerPlugin,this.nativeBrokerPlugin.setLogger(this.config.system.loggerOptions);else this.logger.warning("NativeBroker implementation was provided but the broker is unavailable.");this.skus=re.makeExtraSkuString({libraryName:HT.MSAL_SKU,libraryVersion:Qb})}async acquireTokenByDeviceCode(A){this.logger.info("acquireTokenByDeviceCode called",A.correlationId);let q=Object.assign(A,await this.initializeBaseRequest(A)),K=this.initializeServerTelemetryManager(Nl.acquireTokenByDeviceCode,q.correlationId);try{let Y=await this.createAuthority(q.authority,q.correlationId,void 0,A.azureCloudOptions),z=await this.buildOauthClientConfiguration(Y,q.correlationId,"",K),w=new YU6(z);return this.logger.verbose("Device code client created",q.correlationId),await w.acquireToken(q)}catch(Y){if(Y instanceof c3)Y.setCorrelationId(q.correlationId);throw K.cacheFailedRequest(Y),Y}}async acquireTokenInteractive(A){let q=A.correlationId||this.cryptoProvider.createNewGuid();this.logger.trace("acquireTokenInteractive called",q);let{openBrowser:K,successTemplate:Y,errorTemplate:z,windowHandle:w,loopbackClient:_,...$}=A;if(this.nativeBrokerPlugin){let D={...$,clientId:this.config.auth.clientId,scopes:A.scopes||qG,redirectUri:A.redirectUri||"",authority:A.authority||this.config.auth.authority,correlationId:q,extraParameters:{...$.extraQueryParameters,...$.tokenQueryParameters,[B96.X_CLIENT_EXTRA_SKU]:this.skus},accountId:$.account?.nativeAccountId};return this.nativeBrokerPlugin.acquireTokenInteractive(D,w)}if(A.redirectUri){if(!this.config.broker.nativeBrokerPlugin)throw qH.createRedirectUriNotSupportedError();A.redirectUri=""}let{verifier:O,challenge:H}=await this.cryptoProvider.generatePkceCodes(),j=_||new CG8,J={},M=null;try{let D=j.listenForAuthCode(Y,z).then((f)=>{J=f}).catch((f)=>{M=f}),X=await this.waitForRedirectUri(j),P={...$,correlationId:q,scopes:A.scopes||qG,redirectUri:X,responseMode:pg.QUERY,codeChallenge:H,codeChallengeMethod:UM1.S256},W=await this.getAuthCodeUrl(P);if(await K(W),await D,M)throw M;if(J.error)throw new $T(J.error,J.error_description,J.suberror);else if(!J.code)throw qH.createNoAuthCodeInResponseError();let Z=J.client_info,G={code:J.code,codeVerifier:O,clientInfo:Z||n8.EMPTY_STRING,...P};return await this.acquireTokenByCode(G)}finally{j.closeServer()}}async acquireTokenSilent(A){let q=A.correlationId||this.cryptoProvider.createNewGuid();if(this.logger.trace("acquireTokenSilent called",q),this.nativeBrokerPlugin){let K={...A,clientId:this.config.auth.clientId,scopes:A.scopes||qG,redirectUri:A.redirectUri||"",authority:A.authority||this.config.auth.authority,correlationId:q,extraParameters:{...A.tokenQueryParameters,[B96.X_CLIENT_EXTRA_SKU]:this.skus},accountId:A.account.nativeAccountId,forceRefresh:A.forceRefresh||!1};return this.nativeBrokerPlugin.acquireTokenSilent(K)}if(A.redirectUri){if(!this.config.broker.nativeBrokerPlugin)throw qH.createRedirectUriNotSupportedError();A.redirectUri=""}return super.acquireTokenSilent(A)}async signOut(A){if(this.nativeBrokerPlugin&&A.account.nativeAccountId){let q={clientId:this.config.auth.clientId,accountId:A.account.nativeAccountId,correlationId:A.correlationId||this.cryptoProvider.createNewGuid()};await this.nativeBrokerPlugin.signOut(q)}await this.getTokenCache().removeAccount(A.account,A.correlationId)}async getAllAccounts(){if(this.nativeBrokerPlugin){let A=this.cryptoProvider.createNewGuid();return this.nativeBrokerPlugin.getAllAccounts(this.config.auth.clientId,A)}return this.getTokenCache().getAllAccounts()}async waitForRedirectUri(A){return new Promise((q,K)=>{let Y=0,z=setInterval(()=>{if(ID1.TIMEOUT_MS/ID1.INTERVAL_MS{nw();/*! @azure/msal-node v3.8.1 2025-10-29 */t96=class t96 extends YG{constructor(A,q){super(A);this.appTokenProvider=q}async acquireToken(A){if(A.skipCache||A.claims)return this.executeTokenRequest(A,this.authority);let[q,K]=await this.getCachedAuthenticationResult(A,this.config,this.cryptoUtils,this.authority,this.cacheManager,this.serverTelemetryManager);if(q){if(K===N_.PROACTIVELY_REFRESHED){this.logger.info("ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.");let Y=!0;await this.executeTokenRequest(A,this.authority,Y)}return q}else return this.executeTokenRequest(A,this.authority)}async getCachedAuthenticationResult(A,q,K,Y,z,w){let _=q,$=q,O=N_.NOT_APPLICABLE,H;if(_.serializableCache&&_.persistencePlugin)H=new MS(_.serializableCache,!1),await _.persistencePlugin.beforeCacheAccess(H);let j=this.readAccessTokenFromCache(Y,$.managedIdentityId?.id||_.authOptions.clientId,new pj(A.scopes||[]),z,A.correlationId);if(_.serializableCache&&_.persistencePlugin&&H)await _.persistencePlugin.afterCacheAccess(H);if(!j)return w?.setCacheOutcome(N_.NO_CACHED_ACCESS_TOKEN),[null,N_.NO_CACHED_ACCESS_TOKEN];if(zO.isTokenExpired(j.expiresOn,_.systemOptions?.tokenRenewalOffsetSeconds||dW6))return w?.setCacheOutcome(N_.CACHED_ACCESS_TOKEN_EXPIRED),[null,N_.CACHED_ACCESS_TOKEN_EXPIRED];if(j.refreshOn&&zO.isTokenExpired(j.refreshOn.toString(),0))O=N_.PROACTIVELY_REFRESHED,w?.setCacheOutcome(N_.PROACTIVELY_REFRESHED);return[await dj.generateAuthenticationResult(K,Y,{account:null,idToken:null,accessToken:j,refreshToken:null,appMetadata:null},!0,A),O]}readAccessTokenFromCache(A,q,K,Y,z){let w={homeAccountId:n8.EMPTY_STRING,environment:A.canonicalAuthorityUrlComponents.HostNameAndPort,credentialType:iw.ACCESS_TOKEN,clientId:q,realm:A.tenant,target:pj.createSearchScopes(K.asArray())},_=Y.getAccessTokensByFilter(w,z);if(_.length<1)return null;else if(_.length>1)throw JA(i2.multipleMatchingTokens);return _[0]}async executeTokenRequest(A,q,K){let Y,z;if(this.appTokenProvider){this.logger.info("Using appTokenProvider extensibility.");let $={correlationId:A.correlationId,tenantId:this.config.authOptions.authority.tenant,scopes:A.scopes,claims:A.claims};z=zO.nowSeconds();let O=await this.appTokenProvider($);Y={access_token:O.accessToken,expires_in:O.expiresInSeconds,refresh_in:O.refreshInSeconds,token_type:AY.BEARER}}else{let $=this.createTokenQueryParameters(A),O=D5.appendQueryString(q.tokenEndpoint,$),H=await this.createTokenRequestBody(A),j=this.createTokenRequestHeaders(),J={clientId:this.config.authOptions.clientId,authority:A.authority,scopes:A.scopes,claims:A.claims,authenticationScheme:A.authenticationScheme,resourceRequestMethod:A.resourceRequestMethod,resourceRequestUri:A.resourceRequestUri,shrClaims:A.shrClaims,sshKid:A.sshKid};this.logger.info("Sending token request to endpoint: "+q.tokenEndpoint),z=zO.nowSeconds();let M=await this.executePostToTokenEndpoint(O,H,j,J,A.correlationId);Y=M.body,Y.status=M.status}let w=new dj(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return w.validateTokenResponse(Y,K),await w.handleServerTokenResponse(Y,this.authority,z,A)}async createTokenRequestBody(A){let q=new Map;if(P4.addClientId(q,this.config.authOptions.clientId),P4.addScopes(q,A.scopes,!1),P4.addGrantType(q,IN.CLIENT_CREDENTIALS_GRANT),P4.addLibraryInfo(q,this.config.libraryInfo),P4.addApplicationTelemetry(q,this.config.telemetry.application),P4.addThrottling(q),this.serverTelemetryManager)P4.addServerTelemetry(q,this.serverTelemetryManager);let K=A.correlationId||this.config.cryptoInterface.createNewGuid();if(P4.addCorrelationId(q,K),this.config.clientCredentials.clientSecret)P4.addClientSecret(q,this.config.clientCredentials.clientSecret);let Y=A.clientAssertion||this.config.clientCredentials.clientAssertion;if(Y)P4.addClientAssertion(q,await OT(Y.assertion,this.config.authOptions.clientId,A.resourceRequestUri)),P4.addClientAssertionType(q,Y.assertionType);if(!v_.isEmptyObj(A.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)P4.addClaims(q,A.claims,this.config.authOptions.clientCapabilities);return n0.mapToQueryString(q)}}});var wU6;var IG8=k(()=>{nw();QQ6();/*! @azure/msal-node v3.8.1 2025-10-29 */wU6=class wU6 extends YG{constructor(A){super(A)}async acquireToken(A){if(this.scopeSet=new pj(A.scopes||[]),this.userAssertionHash=await this.cryptoUtils.hashString(A.oboAssertion),A.skipCache||A.claims)return this.executeTokenRequest(A,this.authority,this.userAssertionHash);try{return await this.getCachedAuthenticationResult(A)}catch(q){return await this.executeTokenRequest(A,this.authority,this.userAssertionHash)}}async getCachedAuthenticationResult(A){let q=this.readAccessTokenFromCacheForOBO(this.config.authOptions.clientId,A);if(!q)throw this.serverTelemetryManager?.setCacheOutcome(N_.NO_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties."),JA(i2.tokenRefreshRequired);else if(zO.isTokenExpired(q.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.serverTelemetryManager?.setCacheOutcome(N_.CACHED_ACCESS_TOKEN_EXPIRED),this.logger.info(`OnbehalfofFlow:getCachedAuthenticationResult - Cached access token is expired or will expire within ${this.config.systemOptions.tokenRenewalOffsetSeconds} seconds.`),JA(i2.tokenRefreshRequired);let K=this.readIdTokenFromCacheForOBO(q.homeAccountId,A.correlationId),Y,z=null;if(K){Y=tM1.extractTokenClaims(K.secret,uN.base64Decode);let w=Y.oid||Y.sub,_={homeAccountId:K.homeAccountId,environment:K.environment,tenantId:K.realm,username:n8.EMPTY_STRING,localAccountId:w||n8.EMPTY_STRING};z=this.cacheManager.getAccount(this.cacheManager.generateAccountKey(_),A.correlationId)}if(this.config.serverTelemetryManager)this.config.serverTelemetryManager.incrementCacheHits();return dj.generateAuthenticationResult(this.cryptoUtils,this.authority,{account:z,accessToken:q,idToken:K,refreshToken:null,appMetadata:null},!0,A,Y)}readIdTokenFromCacheForOBO(A,q){let K={homeAccountId:A,environment:this.authority.canonicalAuthorityUrlComponents.HostNameAndPort,credentialType:iw.ID_TOKEN,clientId:this.config.authOptions.clientId,realm:this.authority.tenant},Y=this.cacheManager.getIdTokensByFilter(K,q);if(Object.values(Y).length<1)return null;return Object.values(Y)[0]}readAccessTokenFromCacheForOBO(A,q){let K=q.authenticationScheme||AY.BEARER,z={credentialType:K&&K.toLowerCase()!==AY.BEARER.toLowerCase()?iw.ACCESS_TOKEN_WITH_AUTH_SCHEME:iw.ACCESS_TOKEN,clientId:A,target:pj.createSearchScopes(this.scopeSet.asArray()),tokenType:K,keyId:q.sshKid,requestedClaimsHash:q.requestedClaimsHash,userAssertionHash:this.userAssertionHash},w=this.cacheManager.getAccessTokensByFilter(z,q.correlationId),_=w.length;if(_<1)return null;else if(_>1)throw JA(i2.multipleMatchingTokens);return w[0]}async executeTokenRequest(A,q,K){let Y=this.createTokenQueryParameters(A),z=D5.appendQueryString(q.tokenEndpoint,Y),w=await this.createTokenRequestBody(A),_=this.createTokenRequestHeaders(),$={clientId:this.config.authOptions.clientId,authority:A.authority,scopes:A.scopes,claims:A.claims,authenticationScheme:A.authenticationScheme,resourceRequestMethod:A.resourceRequestMethod,resourceRequestUri:A.resourceRequestUri,shrClaims:A.shrClaims,sshKid:A.sshKid},O=zO.nowSeconds(),H=await this.executePostToTokenEndpoint(z,w,_,$,A.correlationId),j=new dj(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return j.validateTokenResponse(H.body),await j.handleServerTokenResponse(H.body,this.authority,O,A,void 0,K)}async createTokenRequestBody(A){let q=new Map;if(P4.addClientId(q,this.config.authOptions.clientId),P4.addScopes(q,A.scopes),P4.addGrantType(q,IN.JWT_BEARER),P4.addClientInfo(q),P4.addLibraryInfo(q,this.config.libraryInfo),P4.addApplicationTelemetry(q,this.config.telemetry.application),P4.addThrottling(q),this.serverTelemetryManager)P4.addServerTelemetry(q,this.serverTelemetryManager);let K=A.correlationId||this.config.cryptoInterface.createNewGuid();if(P4.addCorrelationId(q,K),P4.addRequestTokenUse(q,B96.ON_BEHALF_OF),P4.addOboAssertion(q,A.oboAssertion),this.config.clientCredentials.clientSecret)P4.addClientSecret(q,this.config.clientCredentials.clientSecret);let Y=this.config.clientCredentials.clientAssertion;if(Y)P4.addClientAssertion(q,await OT(Y.assertion,this.config.authOptions.clientId,A.resourceRequestUri)),P4.addClientAssertionType(q,Y.assertionType);if(A.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)P4.addClaims(q,A.claims,this.config.authOptions.clientCapabilities);return n0.mapToQueryString(q)}}});var _U6;var Ya7=k(()=>{EX1();vX1();_O();nw();LX1();IG8();/*! @azure/msal-node v3.8.1 2025-10-29 */_U6=class _U6 extends s96{constructor(A){super(A);let q=!!this.config.auth.clientSecret,K=!!this.config.auth.clientAssertion,Y=(!!this.config.auth.clientCertificate?.thumbprint||!!this.config.auth.clientCertificate?.thumbprintSha256)&&!!this.config.auth.clientCertificate?.privateKey;if(this.appTokenProvider)return;if(q&&K||K&&Y||q&&Y)throw JA(i2.invalidClientCredential);if(this.config.auth.clientSecret){this.clientSecret=this.config.auth.clientSecret;return}if(this.config.auth.clientAssertion){this.developerProvidedClientAssertion=this.config.auth.clientAssertion;return}if(!Y)throw JA(i2.invalidClientCredential);else this.clientAssertion=this.config.auth.clientCertificate.thumbprintSha256?Fb.fromCertificateWithSha256Thumbprint(this.config.auth.clientCertificate.thumbprintSha256,this.config.auth.clientCertificate.privateKey,this.config.auth.clientCertificate.x5c):Fb.fromCertificate(this.config.auth.clientCertificate.thumbprint,this.config.auth.clientCertificate.privateKey,this.config.auth.clientCertificate.x5c);this.appTokenProvider=void 0}SetAppTokenProvider(A){this.appTokenProvider=A}async acquireTokenByClientCredential(A){this.logger.info("acquireTokenByClientCredential called",A.correlationId);let q;if(A.clientAssertion)q={assertion:await OT(A.clientAssertion,this.config.auth.clientId),assertionType:HT.JWT_BEARER_ASSERTION_TYPE};let K=await this.initializeBaseRequest(A),Y={...K,scopes:K.scopes.filter((J)=>!qG.includes(J))},z={...A,...Y,clientAssertion:q},_=new D5(z.authority).getUrlComponents().PathSegments[0];if(Object.values(hN).includes(_))throw JA(i2.missingTenantIdError);let $=process.env[jl7],O;if(z.azureRegion!=="DisableMsalForceRegion")if(!z.azureRegion&&$)O=$;else O=z.azureRegion;let H={azureRegion:O,environmentRegion:process.env[Hl7]},j=this.initializeServerTelemetryManager(Nl.acquireTokenByClientCredential,z.correlationId,z.skipCache);try{let J=await this.createAuthority(z.authority,z.correlationId,H,A.azureCloudOptions),M=await this.buildOauthClientConfiguration(J,z.correlationId,"",j),D=new t96(M,this.appTokenProvider);return this.logger.verbose("Client credential client created",z.correlationId),await D.acquireToken(z)}catch(J){if(J instanceof c3)J.setCorrelationId(z.correlationId);throw j.cacheFailedRequest(J),J}}async acquireTokenOnBehalfOf(A){this.logger.info("acquireTokenOnBehalfOf called",A.correlationId);let q={...A,...await this.initializeBaseRequest(A)};try{let K=await this.createAuthority(q.authority,q.correlationId,void 0,A.azureCloudOptions),Y=await this.buildOauthClientConfiguration(K,q.correlationId,"",void 0),z=new wU6(Y);return this.logger.verbose("On behalf of client created",q.correlationId),await z.acquireToken(q)}catch(K){if(K instanceof c3)K.setCorrelationId(q.correlationId);throw K}}}});function za7(A){if(typeof A!=="string")return!1;let q=new Date(A);return!isNaN(q.getTime())&&q.toISOString()===A}var wa7=k(()=>{/*! @azure/msal-node v3.8.1 2025-10-29 */});class bG8{constructor(A,q,K){this.httpClientNoRetries=A,this.retryPolicy=q,this.logger=K}async sendNetworkRequestAsyncHelper(A,q,K){if(A===wO.GET)return this.httpClientNoRetries.sendGetRequestAsync(q,K);else return this.httpClientNoRetries.sendPostRequestAsync(q,K)}async sendNetworkRequestAsync(A,q,K){let Y=await this.sendNetworkRequestAsyncHelper(A,q,K);if("isNewRequest"in this.retryPolicy)this.retryPolicy.isNewRequest=!0;let z=0;while(await this.retryPolicy.pauseForRetry(Y.status,z,this.logger,Y.headers[X$.RETRY_AFTER]))Y=await this.sendNetworkRequestAsyncHelper(A,q,K),z++;return Y}async sendGetRequestAsync(A,q){return this.sendNetworkRequestAsync(wO.GET,A,q)}async sendPostRequestAsync(A,q){return this.sendNetworkRequestAsync(wO.POST,A,q)}}var _a7=k(()=>{nw();_O();/*! @azure/msal-node v3.8.1 2025-10-29 */});class mN{constructor(A,q,K,Y,z){this.logger=A,this.nodeStorage=q,this.networkClient=K,this.cryptoProvider=Y,this.disableInternalRetries=z}async getServerTokenResponseAsync(A,q,K,Y){return this.getServerTokenResponse(A)}getServerTokenResponse(A){let q,K;if(A.body.expires_on){if(za7(A.body.expires_on))A.body.expires_on=new Date(A.body.expires_on).getTime()/1000;if(K=A.body.expires_on-zO.nowSeconds(),K>7200)q=K/2}return{status:A.status,access_token:A.body.access_token,expires_in:K,scope:A.body.resource,token_type:A.body.token_type,refresh_in:q,correlation_id:A.body.correlation_id||A.body.correlationId,error:typeof A.body.error==="string"?A.body.error:A.body.error?.code,error_description:A.body.message||(typeof A.body.error==="string"?A.body.error_description:A.body.error?.message),error_codes:A.body.error_codes,timestamp:A.body.timestamp,trace_id:A.body.trace_id}}async acquireTokenWithManagedIdentity(A,q,K,Y){let z=this.createRequest(A.resource,q);if(A.revokedTokenSha256Hash)this.logger.info(`[Managed Identity] The following claims are present in the request: ${A.claims}`),z.queryParameters[lM.SHA256_TOKEN_TO_REFRESH]=A.revokedTokenSha256Hash;if(A.clientCapabilities?.length){let M=A.clientCapabilities.toString();this.logger.info(`[Managed Identity] The following client capabilities are present in the request: ${M}`),z.queryParameters[lM.XMS_CC]=M}let w=z.headers;w[X$.CONTENT_TYPE]=n8.URL_FORM_CONTENT_TYPE;let _={headers:w};if(Object.keys(z.bodyParameters).length)_.body=z.computeParametersBodyString();let $=this.disableInternalRetries?this.networkClient:new bG8(this.networkClient,z.retryPolicy,this.logger),O=zO.nowSeconds(),H;try{if(z.httpMethod===wO.POST)H=await $.sendPostRequestAsync(z.computeUri(),_);else H=await $.sendGetRequestAsync(z.computeUri(),_)}catch(M){if(M instanceof c3)throw M;else throw JA(i2.networkError)}let j=new dj(q.id,this.nodeStorage,this.cryptoProvider,this.logger,null,null),J=await this.getServerTokenResponseAsync(H,$,z,_);return j.validateTokenResponse(J,Y),j.handleServerTokenResponse(J,K,O,A)}getManagedIdentityUserAssignedIdQueryParameterKey(A,q,K){switch(A){case dH.USER_ASSIGNED_CLIENT_ID:return this.logger.info(`[Managed Identity] [API version ${K?"2017+":"2019+"}] Adding user assigned client id to the request.`),K?e96.MANAGED_IDENTITY_CLIENT_ID_2017:e96.MANAGED_IDENTITY_CLIENT_ID;case dH.USER_ASSIGNED_RESOURCE_ID:return this.logger.info("[Managed Identity] Adding user assigned resource id to the request."),q?e96.MANAGED_IDENTITY_RESOURCE_ID_IMDS:e96.MANAGED_IDENTITY_RESOURCE_ID_NON_IMDS;case dH.USER_ASSIGNED_OBJECT_ID:return this.logger.info("[Managed Identity] Adding user assigned object id to the request."),e96.MANAGED_IDENTITY_OBJECT_ID;default:throw SJ(ae)}}}var e96;var AY6=k(()=>{nw();_O();OZ6();wa7();_a7();i96();/*! @azure/msal-node v3.8.1 2025-10-29 */e96={MANAGED_IDENTITY_CLIENT_ID_2017:"clientid",MANAGED_IDENTITY_CLIENT_ID:"client_id",MANAGED_IDENTITY_OBJECT_ID:"object_id",MANAGED_IDENTITY_RESOURCE_ID_IMDS:"msi_res_id",MANAGED_IDENTITY_RESOURCE_ID_NON_IMDS:"mi_res_id"};mN.getValidatedEnvVariableUrlString=(A,q,K,Y)=>{try{return new D5(q).urlString}catch(z){throw Y.info(`[Managed Identity] ${K} managed identity is unavailable because the '${A}' environment variable is malformed.`),SJ(l96[A])}}});class xG8{calculateDelay(A,q){if(!A)return q;let K=Math.round(parseFloat(A)*1000);if(isNaN(K))K=new Date(A).valueOf()-new Date().valueOf();return Math.max(q,K)}}var $a7=k(()=>{/*! @azure/msal-node v3.8.1 2025-10-29 */});class yX1{constructor(){this.linearRetryStrategy=new xG8}static get DEFAULT_MANAGED_IDENTITY_RETRY_DELAY_MS(){return gR9}async pauseForRetry(A,q,K,Y){if(FR9.includes(A)&&q{return setTimeout(w,z)}),!0}return!1}}var mR9=3,gR9=1000,FR9;var Oa7=k(()=>{lD1();$a7();/*! @azure/msal-node v3.8.1 2025-10-29 */FR9=[d3.NOT_FOUND,d3.REQUEST_TIMEOUT,d3.TOO_MANY_REQUESTS,d3.SERVER_ERROR,d3.SERVICE_UNAVAILABLE,d3.GATEWAY_TIMEOUT]});class BE{constructor(A,q,K){this.httpMethod=A,this._baseEndpoint=q,this.headers={},this.bodyParameters={},this.queryParameters={},this.retryPolicy=K||new yX1}computeUri(){let A=new Map;if(this.queryParameters)P4.addExtraQueryParameters(A,this.queryParameters);let q=n0.mapToQueryString(A);return D5.appendQueryString(this._baseEndpoint,q)}computeParametersBodyString(){let A=new Map;if(this.bodyParameters)P4.addExtraQueryParameters(A,this.bodyParameters);return n0.mapToQueryString(A)}}var qY6=k(()=>{nw();Oa7();/*! @azure/msal-node v3.8.1 2025-10-29 */});var QR9="2019-08-01",KY6;var Ha7=k(()=>{AY6();_O();qY6();/*! @azure/msal-node v3.8.1 2025-10-29 */KY6=class KY6 extends mN{constructor(A,q,K,Y,z,w,_){super(A,q,K,Y,z);this.identityEndpoint=w,this.identityHeader=_}static getEnvironmentVariables(){let A=process.env[w3.IDENTITY_ENDPOINT],q=process.env[w3.IDENTITY_HEADER];return[A,q]}static tryCreate(A,q,K,Y,z){let[w,_]=KY6.getEnvironmentVariables();if(!w||!_)return A.info(`[Managed Identity] ${y3.APP_SERVICE} managed identity is unavailable because one or both of the '${w3.IDENTITY_HEADER}' and '${w3.IDENTITY_ENDPOINT}' environment variables are not defined.`),null;let $=KY6.getValidatedEnvVariableUrlString(w3.IDENTITY_ENDPOINT,w,y3.APP_SERVICE,A);return A.info(`[Managed Identity] Environment variables validation passed for ${y3.APP_SERVICE} managed identity. Endpoint URI: ${$}. Creating ${y3.APP_SERVICE} managed identity.`),new KY6(A,q,K,Y,z,w,_)}createRequest(A,q){let K=new BE(wO.GET,this.identityEndpoint);if(K.headers[xN.APP_SERVICE_SECRET_HEADER_NAME]=this.identityHeader,K.queryParameters[lM.API_VERSION]=QR9,K.queryParameters[lM.RESOURCE]=A,q.idType!==dH.SYSTEM_ASSIGNED)K.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(q.idType)]=q.id;return K}}});import{accessSync as UR9,constants as ja7,statSync as pR9,readFileSync as dR9}from"fs";import cR9 from"path";var lR9="2019-11-01",Ja7="http://127.0.0.1:40342/metadata/identity/oauth2/token",Ma7="N/A: himds executable exists",Da7,iR9,te;var Xa7=k(()=>{nw();qY6();AY6();OZ6();_O();i96();/*! @azure/msal-node v3.8.1 2025-10-29 */Da7={win32:`${process.env.ProgramData}\\AzureConnectedMachineAgent\\Tokens\\`,linux:"/var/opt/azcmagent/tokens/"},iR9={win32:`${process.env.ProgramFiles}\\AzureConnectedMachineAgent\\himds.exe`,linux:"/opt/azcmagent/bin/himds"};te=class te extends mN{constructor(A,q,K,Y,z,w){super(A,q,K,Y,z);this.identityEndpoint=w}static getEnvironmentVariables(){let A=process.env[w3.IDENTITY_ENDPOINT],q=process.env[w3.IMDS_ENDPOINT];if(!A||!q){let K=iR9[process.platform];try{UR9(K,ja7.F_OK|ja7.R_OK),A=Ja7,q=Ma7}catch(Y){}}return[A,q]}static tryCreate(A,q,K,Y,z,w){let[_,$]=te.getEnvironmentVariables();if(!_||!$)return A.info(`[Managed Identity] ${y3.AZURE_ARC} managed identity is unavailable through environment variables because one or both of '${w3.IDENTITY_ENDPOINT}' and '${w3.IMDS_ENDPOINT}' are not defined. ${y3.AZURE_ARC} managed identity is also unavailable through file detection.`),null;if($===Ma7)A.info(`[Managed Identity] ${y3.AZURE_ARC} managed identity is available through file detection. Defaulting to known ${y3.AZURE_ARC} endpoint: ${Ja7}. Creating ${y3.AZURE_ARC} managed identity.`);else{let O=te.getValidatedEnvVariableUrlString(w3.IDENTITY_ENDPOINT,_,y3.AZURE_ARC,A);O.endsWith("/")&&O.slice(0,-1),te.getValidatedEnvVariableUrlString(w3.IMDS_ENDPOINT,$,y3.AZURE_ARC,A),A.info(`[Managed Identity] Environment variables validation passed for ${y3.AZURE_ARC} managed identity. Endpoint URI: ${O}. Creating ${y3.AZURE_ARC} managed identity.`)}if(w.idType!==dH.SYSTEM_ASSIGNED)throw SJ(mD1);return new te(A,q,K,Y,z,_)}createRequest(A){let q=new BE(wO.GET,this.identityEndpoint.replace("localhost","127.0.0.1"));return q.headers[xN.METADATA_HEADER_NAME]="true",q.queryParameters[lM.API_VERSION]=lR9,q.queryParameters[lM.RESOURCE]=A,q}async getServerTokenResponseAsync(A,q,K,Y){let z;if(A.status===d3.UNAUTHORIZED){let w=A.headers["www-authenticate"];if(!w)throw SJ(QD1);if(!w.includes("Basic realm="))throw SJ(UD1);let _=w.split("Basic realm=")[1];if(!Da7.hasOwnProperty(process.platform))throw SJ(BD1);let $=Da7[process.platform],O=cR9.basename(_);if(!O.endsWith(".key"))throw SJ(bD1);if($+O!==_)throw SJ(xD1);let H;try{H=await pR9(_).size}catch(M){throw SJ(uQ6)}if(H>Dl7)throw SJ(uD1);let j;try{j=dR9(_,i0.UTF8)}catch(M){throw SJ(uQ6)}let J=`Basic ${j}`;this.logger.info("[Managed Identity] Adding authorization header to the request."),K.headers[xN.AUTHORIZATION_HEADER_NAME]=J;try{z=await q.sendGetRequestAsync(K.computeUri(),Y)}catch(M){if(M instanceof c3)throw M;else throw JA(i2.networkError)}}return this.getServerTokenResponse(z||A)}}});var YY6;var Pa7=k(()=>{qY6();AY6();_O();OZ6();i96();/*! @azure/msal-node v3.8.1 2025-10-29 */YY6=class YY6 extends mN{constructor(A,q,K,Y,z,w){super(A,q,K,Y,z);this.msiEndpoint=w}static getEnvironmentVariables(){return[process.env[w3.MSI_ENDPOINT]]}static tryCreate(A,q,K,Y,z,w){let[_]=YY6.getEnvironmentVariables();if(!_)return A.info(`[Managed Identity] ${y3.CLOUD_SHELL} managed identity is unavailable because the '${w3.MSI_ENDPOINT} environment variable is not defined.`),null;let $=YY6.getValidatedEnvVariableUrlString(w3.MSI_ENDPOINT,_,y3.CLOUD_SHELL,A);if(A.info(`[Managed Identity] Environment variable validation passed for ${y3.CLOUD_SHELL} managed identity. Endpoint URI: ${$}. Creating ${y3.CLOUD_SHELL} managed identity.`),w.idType!==dH.SYSTEM_ASSIGNED)throw SJ(gD1);return new YY6(A,q,K,Y,z,_)}createRequest(A){let q=new BE(wO.POST,this.msiEndpoint);return q.headers[xN.METADATA_HEADER_NAME]="true",q.bodyParameters[lM.RESOURCE]=A,q}}});class uG8{constructor(A,q,K){this.minExponentialBackoff=A,this.maxExponentialBackoff=q,this.exponentialDeltaBackoff=K}calculateDelay(A){if(A===0)return this.minExponentialBackoff;return Math.min(Math.pow(2,A-1)*this.exponentialDeltaBackoff,this.maxExponentialBackoff)}}var Wa7=k(()=>{/*! @azure/msal-node v3.8.1 2025-10-29 */});class zY6{constructor(){this.exponentialRetryStrategy=new uG8(zY6.MIN_EXPONENTIAL_BACKOFF_MS,zY6.MAX_EXPONENTIAL_BACKOFF_MS,zY6.EXPONENTIAL_DELTA_BACKOFF_MS)}static get MIN_EXPONENTIAL_BACKOFF_MS(){return aR9}static get MAX_EXPONENTIAL_BACKOFF_MS(){return sR9}static get EXPONENTIAL_DELTA_BACKOFF_MS(){return tR9}static get HTTP_STATUS_GONE_RETRY_AFTER_MS(){return eR9}set isNewRequest(A){this._isNewRequest=A}async pauseForRetry(A,q,K){if(this._isNewRequest)this._isNewRequest=!1,this.maxRetries=A===d3.GONE?oR9:rR9;if((nR9.includes(A)||A>=d3.SERVER_ERROR_RANGE_START&&A<=d3.SERVER_ERROR_RANGE_END&&q{return setTimeout(z,Y)}),!0}return!1}}var nR9,rR9=3,oR9=7,aR9=1000,sR9=4000,tR9=2000,eR9=1e4;var Za7=k(()=>{lD1();Wa7();/*! @azure/msal-node v3.8.1 2025-10-29 */nR9=[d3.NOT_FOUND,d3.REQUEST_TIMEOUT,d3.GONE,d3.TOO_MANY_REQUESTS]});var Ga7="/metadata/identity/oauth2/token",AS9,qS9="2018-02-01",$U6;var fa7=k(()=>{qY6();AY6();_O();Za7();/*! @azure/msal-node v3.8.1 2025-10-29 */AS9=`http://169.254.169.254${Ga7}`;$U6=class $U6 extends mN{constructor(A,q,K,Y,z,w){super(A,q,K,Y,z);this.identityEndpoint=w}static tryCreate(A,q,K,Y,z){let w;if(process.env[w3.AZURE_POD_IDENTITY_AUTHORITY_HOST])A.info(`[Managed Identity] Environment variable ${w3.AZURE_POD_IDENTITY_AUTHORITY_HOST} for ${y3.IMDS} returned endpoint: ${process.env[w3.AZURE_POD_IDENTITY_AUTHORITY_HOST]}`),w=$U6.getValidatedEnvVariableUrlString(w3.AZURE_POD_IDENTITY_AUTHORITY_HOST,`${process.env[w3.AZURE_POD_IDENTITY_AUTHORITY_HOST]}${Ga7}`,y3.IMDS,A);else A.info(`[Managed Identity] Unable to find ${w3.AZURE_POD_IDENTITY_AUTHORITY_HOST} environment variable for ${y3.IMDS}, using the default endpoint.`),w=AS9;return new $U6(A,q,K,Y,z,w)}createRequest(A,q){let K=new BE(wO.GET,this.identityEndpoint);if(K.headers[xN.METADATA_HEADER_NAME]="true",K.queryParameters[lM.API_VERSION]=qS9,K.queryParameters[lM.RESOURCE]=A,q.idType!==dH.SYSTEM_ASSIGNED)K.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(q.idType,!0)]=q.id;return K.retryPolicy=new zY6,K}}});var KS9="2019-07-01-preview",wY6;var Ta7=k(()=>{qY6();AY6();_O();/*! @azure/msal-node v3.8.1 2025-10-29 */wY6=class wY6 extends mN{constructor(A,q,K,Y,z,w,_){super(A,q,K,Y,z);this.identityEndpoint=w,this.identityHeader=_}static getEnvironmentVariables(){let A=process.env[w3.IDENTITY_ENDPOINT],q=process.env[w3.IDENTITY_HEADER],K=process.env[w3.IDENTITY_SERVER_THUMBPRINT];return[A,q,K]}static tryCreate(A,q,K,Y,z,w){let[_,$,O]=wY6.getEnvironmentVariables();if(!_||!$||!O)return A.info(`[Managed Identity] ${y3.SERVICE_FABRIC} managed identity is unavailable because one or all of the '${w3.IDENTITY_HEADER}', '${w3.IDENTITY_ENDPOINT}' or '${w3.IDENTITY_SERVER_THUMBPRINT}' environment variables are not defined.`),null;let H=wY6.getValidatedEnvVariableUrlString(w3.IDENTITY_ENDPOINT,_,y3.SERVICE_FABRIC,A);if(A.info(`[Managed Identity] Environment variables validation passed for ${y3.SERVICE_FABRIC} managed identity. Endpoint URI: ${H}. Creating ${y3.SERVICE_FABRIC} managed identity.`),w.idType!==dH.SYSTEM_ASSIGNED)A.warning(`[Managed Identity] ${y3.SERVICE_FABRIC} user assigned managed identity is configured in the cluster, not during runtime. See also: https://learn.microsoft.com/en-us/azure/service-fabric/configure-existing-cluster-enable-managed-identity-token-service.`);return new wY6(A,q,K,Y,z,_,$)}createRequest(A,q){let K=new BE(wO.GET,this.identityEndpoint);if(K.headers[xN.ML_AND_SF_SECRET_HEADER_NAME]=this.identityHeader,K.queryParameters[lM.API_VERSION]=KS9,K.queryParameters[lM.RESOURCE]=A,q.idType!==dH.SYSTEM_ASSIGNED)K.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(q.idType)]=q.id;return K}}});var YS9="2017-09-01",zS9,_Y6;var Va7=k(()=>{AY6();_O();qY6();/*! @azure/msal-node v3.8.1 2025-10-29 */zS9=`Only client id is supported for user-assigned managed identity in ${y3.MACHINE_LEARNING}.`;_Y6=class _Y6 extends mN{constructor(A,q,K,Y,z,w,_){super(A,q,K,Y,z);this.msiEndpoint=w,this.secret=_}static getEnvironmentVariables(){let A=process.env[w3.MSI_ENDPOINT],q=process.env[w3.MSI_SECRET];return[A,q]}static tryCreate(A,q,K,Y,z){let[w,_]=_Y6.getEnvironmentVariables();if(!w||!_)return A.info(`[Managed Identity] ${y3.MACHINE_LEARNING} managed identity is unavailable because one or both of the '${w3.MSI_ENDPOINT}' and '${w3.MSI_SECRET}' environment variables are not defined.`),null;let $=_Y6.getValidatedEnvVariableUrlString(w3.MSI_ENDPOINT,w,y3.MACHINE_LEARNING,A);return A.info(`[Managed Identity] Environment variables validation passed for ${y3.MACHINE_LEARNING} managed identity. Endpoint URI: ${$}. Creating ${y3.MACHINE_LEARNING} managed identity.`),new _Y6(A,q,K,Y,z,w,_)}createRequest(A,q){let K=new BE(wO.GET,this.msiEndpoint);if(K.headers[xN.METADATA_HEADER_NAME]="true",K.headers[xN.ML_AND_SF_SECRET_HEADER_NAME]=this.secret,K.queryParameters[lM.API_VERSION]=YS9,K.queryParameters[lM.RESOURCE]=A,q.idType===dH.SYSTEM_ASSIGNED)K.queryParameters[e96.MANAGED_IDENTITY_CLIENT_ID_2017]=process.env[w3.DEFAULT_IDENTITY_CLIENT_ID];else if(q.idType===dH.USER_ASSIGNED_CLIENT_ID)K.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(q.idType,!1,!0)]=q.id;else throw Error(zS9);return K}}});class El{constructor(A,q,K,Y,z){this.logger=A,this.nodeStorage=q,this.networkClient=K,this.cryptoProvider=Y,this.disableInternalRetries=z}async sendManagedIdentityTokenRequest(A,q,K,Y){if(!El.identitySource)El.identitySource=this.selectManagedIdentitySource(this.logger,this.nodeStorage,this.networkClient,this.cryptoProvider,this.disableInternalRetries,q);return El.identitySource.acquireTokenWithManagedIdentity(A,q,K,Y)}allEnvironmentVariablesAreDefined(A){return Object.values(A).every((q)=>{return q!==void 0})}getManagedIdentitySource(){return El.sourceName=this.allEnvironmentVariablesAreDefined(wY6.getEnvironmentVariables())?y3.SERVICE_FABRIC:this.allEnvironmentVariablesAreDefined(KY6.getEnvironmentVariables())?y3.APP_SERVICE:this.allEnvironmentVariablesAreDefined(_Y6.getEnvironmentVariables())?y3.MACHINE_LEARNING:this.allEnvironmentVariablesAreDefined(YY6.getEnvironmentVariables())?y3.CLOUD_SHELL:this.allEnvironmentVariablesAreDefined(te.getEnvironmentVariables())?y3.AZURE_ARC:y3.DEFAULT_TO_IMDS,El.sourceName}selectManagedIdentitySource(A,q,K,Y,z,w){let _=wY6.tryCreate(A,q,K,Y,z,w)||KY6.tryCreate(A,q,K,Y,z)||_Y6.tryCreate(A,q,K,Y,z)||YY6.tryCreate(A,q,K,Y,z,w)||te.tryCreate(A,q,K,Y,z,w)||$U6.tryCreate(A,q,K,Y,z);if(!_)throw SJ(FD1);return _}}var Na7=k(()=>{Ha7();Xa7();Pa7();fa7();Ta7();OZ6();_O();Va7();i96();/*! @azure/msal-node v3.8.1 2025-10-29 */});class tg{constructor(A){this.config=El7(A||{}),this.logger=new bN(this.config.system.loggerOptions,kX1,Qb);let q={canonicalAuthority:n8.DEFAULT_AUTHORITY};if(!tg.nodeStorage)tg.nodeStorage=new r96(this.logger,this.config.managedIdentityId.id,lW6,q);this.networkClient=this.config.system.networkClient,this.cryptoProvider=new kl;let K={protocolMode:KG.AAD,knownAuthorities:[SZ8],cloudDiscoveryMetadata:"",authorityMetadata:""};this.fakeAuthority=new rD(SZ8,this.networkClient,tg.nodeStorage,K,this.logger,this.cryptoProvider.createNewGuid(),void 0,!0),this.fakeClientCredentialClient=new t96({authOptions:{clientId:this.config.managedIdentityId.id,authority:this.fakeAuthority}}),this.managedIdentityClient=new El(this.logger,tg.nodeStorage,this.networkClient,this.cryptoProvider,this.config.disableInternalRetries),this.hashUtils=new n96}async acquireToken(A){if(!A.resource)throw n2(nW6.urlEmptyError);let q={forceRefresh:A.forceRefresh,resource:A.resource.replace("/.default",""),scopes:[A.resource.replace("/.default","")],authority:this.fakeAuthority.canonicalAuthority,correlationId:this.cryptoProvider.createNewGuid(),claims:A.claims,clientCapabilities:this.config.clientCapabilities};if(q.forceRefresh)return this.acquireTokenFromManagedIdentity(q,this.config.managedIdentityId,this.fakeAuthority);let[K,Y]=await this.fakeClientCredentialClient.getCachedAuthenticationResult(q,this.config,this.cryptoProvider,this.fakeAuthority,tg.nodeStorage);if(q.claims){let z=this.managedIdentityClient.getManagedIdentitySource();if(K&&wS9.includes(z)){let w=this.hashUtils.sha256(K.accessToken).toString(i0.HEX);q.revokedTokenSha256Hash=w}return this.acquireTokenFromManagedIdentity(q,this.config.managedIdentityId,this.fakeAuthority)}if(K){if(Y===N_.PROACTIVELY_REFRESHED){this.logger.info("ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.");let z=!0;await this.acquireTokenFromManagedIdentity(q,this.config.managedIdentityId,this.fakeAuthority,z)}return K}else return this.acquireTokenFromManagedIdentity(q,this.config.managedIdentityId,this.fakeAuthority)}async acquireTokenFromManagedIdentity(A,q,K,Y){return this.managedIdentityClient.sendManagedIdentityTokenRequest(A,q,K,Y)}getManagedIdentitySource(){return El.sourceName||this.managedIdentityClient.getManagedIdentitySource()}}var wS9;var va7=k(()=>{nw();uZ8();XZ6();UQ6();LX1();Na7();iD1();_O();cD1();/*! @azure/msal-node v3.8.1 2025-10-29 */wS9=[y3.SERVICE_FABRIC]});class BG8{constructor(A,q){this.client=A,this.partitionManager=q}async beforeCacheAccess(A){let q=await this.partitionManager.getKey(),K=await this.client.get(q);A.tokenCache.deserialize(K)}async afterCacheAccess(A){if(A.cacheHasChanged){let q=A.tokenCache.getKVStore(),K=Object.values(q).filter((z)=>cM.isAccountEntity(z)),Y;if(K.length>0){let z=K[0];Y=await this.partitionManager.extractKey(z)}else Y=await this.partitionManager.getKey();await this.client.set(Y,A.tokenCache.serialize())}}}var ka7=k(()=>{nw();/*! @azure/msal-node v3.8.1 2025-10-29 */});var mE={};m1(mE,{version:()=>Qb,internals:()=>RZ8,UsernamePasswordClient:()=>KU6,TokenCacheContext:()=>MS,TokenCache:()=>dQ6,ServerError:()=>$T,ResponseMode:()=>pg,PublicClientApplication:()=>zU6,ProtocolMode:()=>KG,PromptValue:()=>he,OnBehalfOfClient:()=>wU6,ManagedIdentitySourceNames:()=>y3,ManagedIdentityApplication:()=>tg,Logger:()=>bN,LogLevel:()=>pH,InteractionRequiredAuthErrorMessage:()=>LZ8,InteractionRequiredAuthErrorCodes:()=>fD1,InteractionRequiredAuthError:()=>uE,DistributedCachePlugin:()=>BG8,DeviceCodeClient:()=>YU6,CryptoProvider:()=>kl,ConfidentialClientApplication:()=>_U6,ClientCredentialClient:()=>t96,ClientConfigurationErrorMessage:()=>OW8,ClientConfigurationErrorCodes:()=>nW6,ClientConfigurationError:()=>rW6,ClientAuthErrorMessage:()=>_W8,ClientAuthErrorCodes:()=>i2,ClientAuthError:()=>ge,ClientAssertion:()=>Fb,ClientApplication:()=>s96,AzureCloudInstance:()=>Dl,AuthErrorMessage:()=>zW8,AuthErrorCodes:()=>cW6,AuthError:()=>c3});var RX1=k(()=>{$l7();Ka7();Ya7();EX1();LX1();hG8();IG8();va7();SG8();vX1();cZ8();ka7();_O();UQ6();nw();XZ6();/*! @azure/msal-node v3.8.1 2025-10-29 */});var Ea7=k(()=>{RX1()});function PZ6(A,q,K){let Y=(z)=>{return OU6.getToken.info(z),new hb({scopes:Array.isArray(A)?A:[A],getTokenOptions:K,message:z})};if(!q)throw Y("No response");if(!q.expiresOn)throw Y('Response had no "expiresOn" property.');if(!q.accessToken)throw Y('Response had no "accessToken" property.')}function mG8(A){let q=A===null||A===void 0?void 0:A.authorityHost;if(!q&&GF6)q=process.env.AZURE_AUTHORITY_HOST;return q!==null&&q!==void 0?q:_F6}function gG8(A,q){if(!q)q=_F6;if(new RegExp(`${A}/?$`).test(q))return q;if(q.endsWith("/"))return q+A;else return`${q}/${A}`}function ya7(A,q,K){if(A==="adfs"&&q||K)return[q];return[]}function CX1(A){switch(A){case"error":return mE.LogLevel.Error;case"info":return mE.LogLevel.Info;case"verbose":return mE.LogLevel.Verbose;case"warning":return mE.LogLevel.Warning;default:return mE.LogLevel.Info}}function $Y6(A,q,K){if(q.name==="AuthError"||q.name==="ClientAuthError"||q.name==="BrowserAuthError"){let Y=q;switch(Y.errorCode){case"endpoints_resolution_error":return OU6.info(NY(A,q.message)),new y4(q.message);case"device_code_polling_cancelled":return new mW6("The authentication has been aborted by the caller.");case"consent_required":case"interaction_required":case"login_required":OU6.info(NY(A,`Authentication returned errorCode ${Y.errorCode}`));break;default:OU6.info(NY(A,`Failed to acquire token: ${q.message}`));break}}if(q.name==="ClientConfigurationError"||q.name==="BrowserConfigurationAuthError"||q.name==="AbortError"||q.name==="AuthenticationError")return q;if(q.name==="NativeAuthError")return OU6.info(NY(A,`Error from the native broker: ${q.message} with status code: ${q.statusCode}`)),q;return new hb({scopes:A,getTokenOptions:K,message:q.message})}function Ra7(A){return{localAccountId:A.homeAccountId,environment:A.authority,username:A.username,homeAccountId:A.homeAccountId,tenantId:A.tenantId}}function Sa7(A,q){var K;return{authority:(K=q.environment)!==null&&K!==void 0?K:fU7,homeAccountId:q.homeAccountId,tenantId:q.tenantId||GU7,username:q.username,clientId:A,version:La7}}function Ca7(A){return JSON.stringify(A)}function ha7(A){let q=JSON.parse(A);if(q.version&&q.version!==La7)throw Error("Unsupported AuthenticationRecord version");return q}var OU6,La7="1.0",SX1=(A,q=hM1?"Node":"Browser")=>(K,Y,z)=>{if(z)return;switch(K){case mE.LogLevel.Error:A.info(`MSAL ${q} V2 error: ${Y}`);return;case mE.LogLevel.Info:A.info(`MSAL ${q} V2 info message: ${Y}`);return;case mE.LogLevel.Verbose:A.info(`MSAL ${q} V2 verbose message: ${Y}`);return;case mE.LogLevel.Warning:A.info(`MSAL ${q} V2 warning: ${Y}`);return}};var hX1=k(()=>{lD();l2();ug();Se();Q08();Ea7();OU6=w5("IdentityUtils")});function Ia7(A){return r08([{name:"imdsRetryPolicy",retry:({retryCount:q,response:K})=>{if((K===null||K===void 0?void 0:K.status)!==404)return{skipStrategy:!0};return Yd7(q,{retryDelayInMs:A.startDelayInMs,maxRetryDelayInMs:_S9})}}],{maxRetries:A.maxRetries})}var _S9=64000;var ba7=k(()=>{Fg();Se()});function HS9(A){var q;if(!EF6(A))throw Error(`${Ll}: Multiple scopes are not supported.`);let Y=new URL(OS9,(q=process.env.AZURE_POD_IDENTITY_AUTHORITY_HOST)!==null&&q!==void 0?q:$S9),z={Accept:"application/json"};return{url:`${Y}`,method:"GET",headers:wl(z)}}var Ll="ManagedIdentityCredential - IMDS",OY6,$S9="http://169.254.169.254",OS9="/metadata/identity/oauth2/token",FG8;var xa7=k(()=>{Fg();Se();l2();l0();OY6=w5(Ll);FG8={name:"imdsMsi",async isAvailable(A){let{scopes:q,identityClient:K,getTokenOptions:Y}=A,z=EF6(q);if(!z)return OY6.info(`${Ll}: Unavailable. Multiple scopes are not supported.`),!1;if(process.env.AZURE_POD_IDENTITY_AUTHORITY_HOST)return!0;if(!K)throw Error("Missing IdentityClient");let w=HS9(z);return $z.withSpan("ManagedIdentityCredential-pingImdsEndpoint",Y!==null&&Y!==void 0?Y:{},async(_)=>{var $,O;w.tracingOptions=_.tracingOptions;let H=bE(w);H.timeout=(($=_.requestOptions)===null||$===void 0?void 0:$.timeout)||1000,H.allowInsecureConnection=!0;let j;try{OY6.info(`${Ll}: Pinging the Azure IMDS endpoint`),j=await K.sendRequest(H)}catch(J){if(CM1(J))OY6.verbose(`${Ll}: Caught error ${J.name}: ${J.message}`);return OY6.info(`${Ll}: The Azure IMDS endpoint is unavailable`),!1}if(j.status===403){if((O=j.bodyAsText)===null||O===void 0?void 0:O.includes("unreachable"))return OY6.info(`${Ll}: The Azure IMDS endpoint is unavailable`),OY6.info(`${Ll}: ${j.bodyAsText}`),!1}return OY6.info(`${Ll}: The Azure IMDS endpoint is available`),!0})}}});function IX1(A){var q,K;let Y=A;if(Y===void 0&&((K=(q=globalThis.process)===null||q===void 0?void 0:q.env)===null||K===void 0?void 0:K.AZURE_REGIONAL_AUTHORITY_NAME)!==void 0)Y=process.env.AZURE_REGIONAL_AUTHORITY_NAME;if(Y===QG8.AutoDiscoverRegion)return"AUTO_DISCOVER";return Y}var QG8;var ua7=k(()=>{(function(A){A.AutoDiscoverRegion="AutoDiscoverRegion",A.USWest="westus",A.USWest2="westus2",A.USCentral="centralus",A.USEast="eastus",A.USEast2="eastus2",A.USNorthCentral="northcentralus",A.USSouthCentral="southcentralus",A.USWestCentral="westcentralus",A.CanadaCentral="canadacentral",A.CanadaEast="canadaeast",A.BrazilSouth="brazilsouth",A.EuropeNorth="northeurope",A.EuropeWest="westeurope",A.UKSouth="uksouth",A.UKWest="ukwest",A.FranceCentral="francecentral",A.FranceSouth="francesouth",A.SwitzerlandNorth="switzerlandnorth",A.SwitzerlandWest="switzerlandwest",A.GermanyNorth="germanynorth",A.GermanyWestCentral="germanywestcentral",A.NorwayWest="norwaywest",A.NorwayEast="norwayeast",A.AsiaEast="eastasia",A.AsiaSouthEast="southeastasia",A.JapanEast="japaneast",A.JapanWest="japanwest",A.AustraliaEast="australiaeast",A.AustraliaSouthEast="australiasoutheast",A.AustraliaCentral="australiacentral",A.AustraliaCentral2="australiacentral2",A.IndiaCentral="centralindia",A.IndiaSouth="southindia",A.IndiaWest="westindia",A.KoreaSouth="koreasouth",A.KoreaCentral="koreacentral",A.UAECentral="uaecentral",A.UAENorth="uaenorth",A.SouthAfricaNorth="southafricanorth",A.SouthAfricaWest="southafricawest",A.ChinaNorth="chinanorth",A.ChinaEast="chinaeast",A.ChinaNorth2="chinanorth2",A.ChinaEast2="chinaeast2",A.GermanyCentral="germanycentral",A.GermanyNorthEast="germanynortheast",A.GovernmentUSVirginia="usgovvirginia",A.GovernmentUSIowa="usgoviowa",A.GovernmentUSArizona="usgovarizona",A.GovernmentUSTexas="usgovtexas",A.GovernmentUSDodEast="usdodeast",A.GovernmentUSDodCentral="usdodcentral"})(QG8||(QG8={}))});import Ba7 from"node:fs";function jS9(){try{return Ba7.statSync("/.dockerenv"),!0}catch{return!1}}function JS9(){try{return Ba7.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function pG8(){if(UG8===void 0)UG8=jS9()||JS9();return UG8}var UG8;var ma7=()=>{};import MS9 from"node:fs";function WZ6(){if(dG8===void 0)dG8=DS9()||pG8();return dG8}var dG8,DS9=()=>{try{return MS9.statSync("/run/.containerenv"),!0}catch{return!1}};var cG8=k(()=>{ma7()});import Fa7 from"node:process";import XS9 from"node:os";import PS9 from"node:fs";var ga7=()=>{if(Fa7.platform!=="linux")return!1;if(XS9.release().toLowerCase().includes("microsoft")){if(WZ6())return!1;return!0}try{return PS9.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!WZ6():!1}catch{return!1}},ee;var lG8=k(()=>{cG8();ee=Fa7.env.__IS_WSL_TEST__?ga7:ga7()});import Qa7 from"node:process";import Ua7,{constants as WS9}from"node:fs/promises";var ZS9,GS9=async()=>{return`${await ZS9()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`},iG8=async()=>{if(ee)return GS9();return`${Qa7.env.SYSTEMROOT||Qa7.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`};var pa7=k(()=>{lG8();lG8();ZS9=(()=>{let q;return async function(){if(q)return q;let K="/etc/wsl.conf",Y=!1;try{await Ua7.access(K,WS9.F_OK),Y=!0}catch{}if(!Y)return"/mnt/";let z=await Ua7.readFile(K,{encoding:"utf8"}),w=/(?.*)/g.exec(z);if(!w)return"/mnt/";return q=w.groups.mountPoint.trim(),q=q.endsWith("/")?q:`${q}/`,q}})()});function A66(A,q,K){let Y=(z)=>Object.defineProperty(A,q,{value:z,enumerable:!0,writable:!0});return Object.defineProperty(A,q,{configurable:!0,enumerable:!0,get(){let z=K();return Y(z),z},set(z){Y(z)}}),A}import{promisify as fS9}from"node:util";import TS9 from"node:process";import{execFile as VS9}from"node:child_process";async function nG8(){if(TS9.platform!=="darwin")throw Error("macOS only");let{stdout:A}=await NS9("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]);return/LSHandlerRoleAll = "(?!-)(?[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(A)?.groups.id??"com.apple.Safari"}var NS9;var da7=k(()=>{NS9=fS9(VS9)});import vS9 from"node:process";import{promisify as kS9}from"node:util";import{execFile as ES9,execFileSync as M6_}from"node:child_process";async function ca7(A,{humanReadableOutput:q=!0,signal:K}={}){if(vS9.platform!=="darwin")throw Error("macOS only");let Y=q?[]:["-ss"],z={};if(K)z.signal=K;let{stdout:w}=await LS9("osascript",["-e",A,Y],z);return w.trim()}var LS9;var la7=k(()=>{LS9=kS9(ES9)});async function rG8(A){return ca7(`tell application "Finder" to set app_path to application file id "${A}" as string tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}var ia7=k(()=>{la7()});import{promisify as yS9}from"node:util";import{execFile as RS9}from"node:child_process";async function aG8(A=SS9){let{stdout:q}=await A("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),K=/ProgId\s*REG_SZ\s*(?\S+)/.exec(q);if(!K)throw new oG8(`Cannot find Windows browser in stdout: ${JSON.stringify(q)}`);let{id:Y}=K.groups,z=CS9[Y];if(!z)throw new oG8(`Unknown browser ID: ${Y}`);return z}var SS9,CS9,oG8;var na7=k(()=>{SS9=yS9(RS9),CS9={AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},MSEdgeDHTML:{name:"Edge",id:"com.microsoft.edge"},MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"}};oG8=class oG8 extends Error{}});import{promisify as hS9}from"node:util";import sG8 from"node:process";import{execFile as IS9}from"node:child_process";async function tG8(){if(sG8.platform==="darwin"){let A=await nG8();return{name:await rG8(A),id:A}}if(sG8.platform==="linux"){let{stdout:A}=await bS9("xdg-mime",["query","default","x-scheme-handler/http"]),q=A.trim();return{name:xS9(q.replace(/.desktop$/,"").replace("-"," ")),id:q}}if(sG8.platform==="win32")return aG8();throw Error("Only macOS, Linux, and Windows are supported")}var bS9,xS9=(A)=>A.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,(q)=>q.toUpperCase());var ra7=k(()=>{da7();ia7();na7();bS9=hS9(IS9)});var Ks7={};m1(Ks7,{openApp:()=>pS9,default:()=>dS9,apps:()=>q66});import eG8 from"node:process";import{Buffer as ea7}from"node:buffer";import As7 from"node:path";import{fileURLToPath as uS9}from"node:url";import{promisify as BS9}from"node:util";import qs7 from"node:child_process";import mS9,{constants as gS9}from"node:fs/promises";async function QS9(){let A=await iG8(),q=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,K=ea7.from(q,"utf16le").toString("base64"),{stdout:Y}=await FS9(A,["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",K],{encoding:"utf8"}),z=Y.trim(),w={ChromeHTML:"com.google.chrome",BraveHTML:"com.brave.Browser",MSEdgeHTM:"com.microsoft.edge",FirefoxURL:"org.mozilla.firefox"};return w[z]?{id:w[z]}:{}}function ta7(A){if(typeof A==="string"||Array.isArray(A))return A;let{[aa7]:q}=A;if(!q)throw Error(`${aa7} is not supported`);return q}function bX1({[ZZ6]:A},{wsl:q}){if(q&&ee)return ta7(q);if(!A)throw Error(`${ZZ6} is not supported`);return ta7(A)}var FS9,Af8,oa7,ZZ6,aa7,sa7=async(A,q)=>{let K;for(let Y of A)try{return await q(Y)}catch(z){K=z}throw K},HU6=async(A)=>{if(A={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...A},Array.isArray(A.app))return sa7(A.app,($)=>HU6({...A,app:$}));let{name:q,arguments:K=[]}=A.app??{};if(K=[...K],Array.isArray(q))return sa7(q,($)=>HU6({...A,app:{name:$,arguments:K}}));if(q==="browser"||q==="browserPrivate"){let $={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.Browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge"},O={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"},H=ee?await QS9():await tG8();if(H.id in $){let j=$[H.id];if(q==="browserPrivate")K.push(O[j]);return HU6({...A,app:{name:q66[j],arguments:K}})}throw Error(`${H.name} is not supported as a default browser`)}let Y,z=[],w={};if(ZZ6==="darwin"){if(Y="open",A.wait)z.push("--wait-apps");if(A.background)z.push("--background");if(A.newInstance)z.push("--new");if(q)z.push("-a",q)}else if(ZZ6==="win32"||ee&&!WZ6()&&!q){if(Y=await iG8(),z.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),!ee)w.windowsVerbatimArguments=!0;let $=["Start"];if(A.wait)$.push("-Wait");if(q){if($.push(`"\`"${q}\`""`),A.target)K.push(A.target)}else if(A.target)$.push(`"${A.target}"`);if(K.length>0)K=K.map((O)=>`"\`"${O}\`""`),$.push("-ArgumentList",K.join(","));A.target=ea7.from($.join(" "),"utf16le").toString("base64")}else{if(q)Y=q;else{let $=!Af8||Af8==="/",O=!1;try{await mS9.access(oa7,gS9.X_OK),O=!0}catch{}Y=eG8.versions.electron??(ZZ6==="android"||$||!O)?"xdg-open":oa7}if(K.length>0)z.push(...K);if(!A.wait)w.stdio="ignore",w.detached=!0}if(ZZ6==="darwin"&&K.length>0)z.push("--args",...K);if(A.target)z.push(A.target);let _=qs7.spawn(Y,z,w);if(A.wait)return new Promise(($,O)=>{_.once("error",O),_.once("close",(H)=>{if(!A.allowNonzeroExitCode&&H>0){O(Error(`Exited with code ${H}`));return}$(_)})});return _.unref(),_},US9=(A,q)=>{if(typeof A!=="string")throw TypeError("Expected a `target`");return HU6({...q,target:A})},pS9=(A,q)=>{if(typeof A!=="string"&&!Array.isArray(A))throw TypeError("Expected a valid `name`");let{arguments:K=[]}=q??{};if(K!==void 0&&K!==null&&!Array.isArray(K))throw TypeError("Expected `appArguments` as Array type");return HU6({...q,app:{name:A,arguments:K}})},q66,dS9;var Ys7=k(()=>{pa7();ra7();cG8();FS9=BS9(qs7.execFile),Af8=As7.dirname(uS9(import.meta.url)),oa7=As7.join(Af8,"xdg-open"),{platform:ZZ6,arch:aa7}=eG8;q66={};A66(q66,"chrome",()=>bX1({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));A66(q66,"brave",()=>bX1({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}}));A66(q66,"firefox",()=>bX1({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));A66(q66,"edge",()=>bX1({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));A66(q66,"browser",()=>"browser");A66(q66,"browserPrivate",()=>"browserPrivate");dS9=US9});function cS9(A,q,K={}){var Y,z,w;let _=CW6((Y=K.logger)!==null&&Y!==void 0?Y:gN,q,A),$=gG8(_,mG8(K)),O=new Ug(Object.assign(Object.assign({},K.tokenCredentialOptions),{authorityHost:$,loggingOptions:K.loggingOptions}));return{auth:{clientId:A,authority:$,knownAuthorities:ya7(_,$,K.disableInstanceDiscovery)},system:{networkClient:O,loggerOptions:{loggerCallback:SX1((z=K.logger)!==null&&z!==void 0?z:gN),logLevel:CX1(PM1()),piiLoggingEnabled:(w=K.loggingOptions)===null||w===void 0?void 0:w.enableUnsafeSupportLogging}}}}function wG(A,q,K={}){var Y;let z={msalConfig:cS9(A,q,K),cachedAccount:K.authenticationRecord?Ra7(K.authenticationRecord):null,pluginConfiguration:LU7.generatePluginConfiguration(K),logger:(Y=K.logger)!==null&&Y!==void 0?Y:gN},w=new Map;async function _(N={}){let v=N.enableCae?"CAE":"default",y=w.get(v);if(y)return z.logger.getToken.info("Existing PublicClientApplication found in cache, returning it."),y;z.logger.getToken.info(`Creating new PublicClientApplication with CAE ${N.enableCae?"enabled":"disabled"}.`);let R=N.enableCae?z.pluginConfiguration.cache.cachePluginCae:z.pluginConfiguration.cache.cachePlugin;return z.msalConfig.auth.clientCapabilities=N.enableCae?["cp1"]:void 0,y=new zU6(Object.assign(Object.assign({},z.msalConfig),{broker:{nativeBrokerPlugin:z.pluginConfiguration.broker.nativeBrokerPlugin},cache:{cachePlugin:await R}})),w.set(v,y),y}let $=new Map;async function O(N={}){let v=N.enableCae?"CAE":"default",y=$.get(v);if(y)return z.logger.getToken.info("Existing ConfidentialClientApplication found in cache, returning it."),y;z.logger.getToken.info(`Creating new ConfidentialClientApplication with CAE ${N.enableCae?"enabled":"disabled"}.`);let R=N.enableCae?z.pluginConfiguration.cache.cachePluginCae:z.pluginConfiguration.cache.cachePlugin;return z.msalConfig.auth.clientCapabilities=N.enableCae?["cp1"]:void 0,y=new _U6(Object.assign(Object.assign({},z.msalConfig),{broker:{nativeBrokerPlugin:z.pluginConfiguration.broker.nativeBrokerPlugin},cache:{cachePlugin:await R}})),$.set(v,y),y}async function H(N,v,y={}){if(z.cachedAccount===null)throw z.logger.getToken.info("No cached account found in local state."),new hb({scopes:v});if(y.claims)z.cachedClaims=y.claims;let R={account:z.cachedAccount,scopes:v,claims:z.cachedClaims};if(z.pluginConfiguration.broker.isEnabled){if(R.tokenQueryParameters||(R.tokenQueryParameters={}),z.pluginConfiguration.broker.enableMsaPassthrough)R.tokenQueryParameters.msal_request_type="consumer_passthrough"}if(y.proofOfPossessionOptions)R.shrNonce=y.proofOfPossessionOptions.nonce,R.authenticationScheme="pop",R.resourceRequestMethod=y.proofOfPossessionOptions.resourceRequestMethod,R.resourceRequestUri=y.proofOfPossessionOptions.resourceRequestUrl;z.logger.getToken.info("Attempting to acquire token silently");try{return await N.acquireTokenSilent(R)}catch(h){throw $Y6(v,h,y)}}function j(N){if(N===null||N===void 0?void 0:N.tenantId)return gG8(N.tenantId,mG8(K));return z.msalConfig.auth.authority}async function J(N,v,y,R){var h,B;let x=null;try{x=await H(N,v,y)}catch(F){if(F.name!=="AuthenticationRequiredError")throw F;if(y.disableAutomaticAuthentication)throw new hb({scopes:v,getTokenOptions:y,message:"Automatic authentication has been disabled. You may call the authentication() method."})}if(x===null)try{x=await R()}catch(F){throw $Y6(v,F,y)}return PZ6(v,x,y),z.cachedAccount=(h=x===null||x===void 0?void 0:x.account)!==null&&h!==void 0?h:null,z.logger.getToken.info(UM(v)),{token:x.accessToken,expiresOnTimestamp:x.expiresOn.getTime(),refreshAfterTimestamp:(B=x.refreshOn)===null||B===void 0?void 0:B.getTime(),tokenType:x.tokenType}}async function M(N,v,y={}){var R;z.logger.getToken.info("Attempting to acquire token using client secret"),z.msalConfig.auth.clientSecret=v;let h=await O(y);try{let B=await h.acquireTokenByClientCredential({scopes:N,authority:j(y),azureRegion:IX1(),claims:y===null||y===void 0?void 0:y.claims});return PZ6(N,B,y),z.logger.getToken.info(UM(N)),{token:B.accessToken,expiresOnTimestamp:B.expiresOn.getTime(),refreshAfterTimestamp:(R=B.refreshOn)===null||R===void 0?void 0:R.getTime(),tokenType:B.tokenType}}catch(B){throw $Y6(N,B,y)}}async function D(N,v,y={}){var R;z.logger.getToken.info("Attempting to acquire token using client assertion"),z.msalConfig.auth.clientAssertion=v;let h=await O(y);try{let B=await h.acquireTokenByClientCredential({scopes:N,authority:j(y),azureRegion:IX1(),claims:y===null||y===void 0?void 0:y.claims,clientAssertion:v});return PZ6(N,B,y),z.logger.getToken.info(UM(N)),{token:B.accessToken,expiresOnTimestamp:B.expiresOn.getTime(),refreshAfterTimestamp:(R=B.refreshOn)===null||R===void 0?void 0:R.getTime(),tokenType:B.tokenType}}catch(B){throw $Y6(N,B,y)}}async function X(N,v,y={}){var R;z.logger.getToken.info("Attempting to acquire token using client certificate"),z.msalConfig.auth.clientCertificate=v;let h=await O(y);try{let B=await h.acquireTokenByClientCredential({scopes:N,authority:j(y),azureRegion:IX1(),claims:y===null||y===void 0?void 0:y.claims});return PZ6(N,B,y),z.logger.getToken.info(UM(N)),{token:B.accessToken,expiresOnTimestamp:B.expiresOn.getTime(),refreshAfterTimestamp:(R=B.refreshOn)===null||R===void 0?void 0:R.getTime(),tokenType:B.tokenType}}catch(B){throw $Y6(N,B,y)}}async function P(N,v,y={}){z.logger.getToken.info("Attempting to acquire token using device code");let R=await _(y);return J(R,N,y,()=>{var h,B;let x={scopes:N,cancel:(B=(h=y===null||y===void 0?void 0:y.abortSignal)===null||h===void 0?void 0:h.aborted)!==null&&B!==void 0?B:!1,deviceCodeCallback:v,authority:j(y),claims:y===null||y===void 0?void 0:y.claims},F=R.acquireTokenByDeviceCode(x);if(y.abortSignal)y.abortSignal.addEventListener("abort",()=>{x.cancel=!0});return F})}async function W(N,v,y,R={}){z.logger.getToken.info("Attempting to acquire token using username and password");let h=await _(R);return J(h,N,R,()=>{let B={scopes:N,username:v,password:y,authority:j(R),claims:R===null||R===void 0?void 0:R.claims};return h.acquireTokenByUsernamePassword(B)})}function Z(){if(!z.cachedAccount)return;return Sa7(A,z.cachedAccount)}async function G(N,v,y,R,h={}){z.logger.getToken.info("Attempting to acquire token using authorization code");let B;if(R)z.msalConfig.auth.clientSecret=R,B=await O(h);else B=await _(h);return J(B,N,h,()=>{return B.acquireTokenByCode({scopes:N,redirectUri:v,code:y,authority:j(h),claims:h===null||h===void 0?void 0:h.claims})})}async function f(N,v,y,R={}){var h;if(gN.getToken.info("Attempting to acquire token on behalf of another user"),typeof y==="string")gN.getToken.info("Using client secret for on behalf of flow"),z.msalConfig.auth.clientSecret=y;else if(typeof y==="function")gN.getToken.info("Using client assertion callback for on behalf of flow"),z.msalConfig.auth.clientAssertion=y;else gN.getToken.info("Using client certificate for on behalf of flow"),z.msalConfig.auth.clientCertificate=y;let B=await O(R);try{let x=await B.acquireTokenOnBehalfOf({scopes:N,authority:j(R),claims:R.claims,oboAssertion:v});return PZ6(N,x,R),gN.getToken.info(UM(N)),{token:x.accessToken,expiresOnTimestamp:x.expiresOn.getTime(),refreshAfterTimestamp:(h=x.refreshOn)===null||h===void 0?void 0:h.getTime(),tokenType:x.tokenType}}catch(x){throw $Y6(N,x,R)}}async function V(N,v={}){gN.getToken.info("Attempting to acquire token interactively");let y=await _(v);async function R(B){var x;gN.verbose("Authentication will resume through the broker");let F=h();if(z.pluginConfiguration.broker.parentWindowHandle)F.windowHandle=Buffer.from(z.pluginConfiguration.broker.parentWindowHandle);else gN.warning("Parent window handle is not specified for the broker. This may cause unexpected behavior. Please provide the parentWindowHandle.");if(z.pluginConfiguration.broker.enableMsaPassthrough)((x=F.tokenQueryParameters)!==null&&x!==void 0?x:F.tokenQueryParameters={}).msal_request_type="consumer_passthrough";if(B)F.prompt="none",gN.verbose("Attempting broker authentication using the default broker account");else gN.verbose("Attempting broker authentication without the default broker account");if(v.proofOfPossessionOptions)F.shrNonce=v.proofOfPossessionOptions.nonce,F.authenticationScheme="pop",F.resourceRequestMethod=v.proofOfPossessionOptions.resourceRequestMethod,F.resourceRequestUri=v.proofOfPossessionOptions.resourceRequestUrl;try{return await y.acquireTokenInteractive(F)}catch(g){if(gN.verbose(`Failed to authenticate through the broker: ${g.message}`),B)return R(!1);else throw g}}function h(){var B,x;return{openBrowser:async(F)=>{await(await Promise.resolve().then(() => (Ys7(),Ks7))).default(F,{wait:!0,newInstance:!0})},scopes:N,authority:j(v),claims:v===null||v===void 0?void 0:v.claims,loginHint:v===null||v===void 0?void 0:v.loginHint,errorTemplate:(B=v===null||v===void 0?void 0:v.browserCustomizationOptions)===null||B===void 0?void 0:B.errorMessage,successTemplate:(x=v===null||v===void 0?void 0:v.browserCustomizationOptions)===null||x===void 0?void 0:x.successMessage,prompt:(v===null||v===void 0?void 0:v.loginHint)?"login":"select_account"}}return J(y,N,v,async()=>{var B;let x=h();if(z.pluginConfiguration.broker.isEnabled)return R((B=z.pluginConfiguration.broker.useDefaultBrokerAccount)!==null&&B!==void 0?B:!1);if(v.proofOfPossessionOptions)x.shrNonce=v.proofOfPossessionOptions.nonce,x.authenticationScheme="pop",x.resourceRequestMethod=v.proofOfPossessionOptions.resourceRequestMethod,x.resourceRequestUri=v.proofOfPossessionOptions.resourceRequestUrl;return y.acquireTokenInteractive(x)})}return{getActiveAccount:Z,getTokenByClientSecret:M,getTokenByClientAssertion:D,getTokenByClientCertificate:X,getTokenByDeviceCode:P,getTokenByUsernamePassword:W,getTokenByAuthorizationCode:G,getTokenOnBehalfOf:f,getTokenByInteractiveRequest:V}}var gN;var yl=k(()=>{RX1();l2();iP8();hX1();lD();yF6();ua7();A96();iD();gN=w5("MsalClient")});class HY6{constructor(A,q,K,Y={}){if(!A)throw new y4("ClientAssertionCredential: tenantId is a required parameter.");if(!q)throw new y4("ClientAssertionCredential: clientId is a required parameter.");if(!K)throw new y4("ClientAssertionCredential: clientAssertion is a required parameter.");this.tenantId=A,this.additionallyAllowedTenantIds=eO(Y===null||Y===void 0?void 0:Y.additionallyAllowedTenants),this.options=Y,this.getAssertion=K,this.msalClient=wG(q,A,Object.assign(Object.assign({},Y),{logger:zs7,tokenCredentialOptions:this.options}))}async getToken(A,q={}){return $z.withSpan(`${this.constructor.name}.getToken`,q,async(K)=>{K.tenantId=YO(this.tenantId,K,this.additionallyAllowedTenantIds,zs7);let Y=Array.isArray(A)?A:[A];return this.msalClient.getTokenByClientAssertion(Y,this.getAssertion,K)})}}var zs7;var xX1=k(()=>{yl();iD();lD();l2();l0();zs7=w5("ClientAssertionCredential")});import{readFile as lS9}from"node:fs/promises";class Rl{constructor(A){this.azureFederatedTokenFileContent=void 0,this.cacheDate=void 0;let q=WM1(iS9).assigned.join(", ");jU6.info(`Found the following environment variables: ${q}`);let K=A!==null&&A!==void 0?A:{},Y=K.tenantId||process.env.AZURE_TENANT_ID,z=K.clientId||process.env.AZURE_CLIENT_ID;if(this.federatedTokenFilePath=K.tokenFilePath||process.env.AZURE_FEDERATED_TOKEN_FILE,Y)pM(jU6,Y);if(!z)throw new y4(`${jY6}: is unavailable. clientId is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_CLIENT_ID". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);if(!Y)throw new y4(`${jY6}: is unavailable. tenantId is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_TENANT_ID". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);if(!this.federatedTokenFilePath)throw new y4(`${jY6}: is unavailable. federatedTokenFilePath is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_FEDERATED_TOKEN_FILE". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);jU6.info(`Invoking ClientAssertionCredential with tenant ID: ${Y}, clientId: ${K.clientId} and federated token path: [REDACTED]`),this.client=new HY6(Y,z,this.readFileContents.bind(this),A)}async getToken(A,q){if(!this.client){let K=`${jY6}: is unavailable. tenantId, clientId, and federatedTokenFilePath are required parameters. In DefaultAzureCredential and ManagedIdentityCredential, these can be provided as environment variables - "AZURE_TENANT_ID", "AZURE_CLIENT_ID", "AZURE_FEDERATED_TOKEN_FILE". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`;throw jU6.info(K),new y4(K)}return jU6.info("Invoking getToken() of Client Assertion Credential"),this.client.getToken(A,q)}async readFileContents(){if(this.cacheDate!==void 0&&Date.now()-this.cacheDate>=300000)this.azureFederatedTokenFileContent=void 0;if(!this.federatedTokenFilePath)throw new y4(`${jY6}: is unavailable. Invalid file path provided ${this.federatedTokenFilePath}.`);if(!this.azureFederatedTokenFileContent){let q=(await lS9(this.federatedTokenFilePath,"utf8")).trim();if(!q)throw new y4(`${jY6}: is unavailable. No content on the file ${this.federatedTokenFilePath}.`);else this.azureFederatedTokenFileContent=q,this.cacheDate=Date.now()}return this.azureFederatedTokenFileContent}}var jY6="WorkloadIdentityCredential",iS9,jU6;var uX1=k(()=>{l2();xX1();lD();iD();iS9=["AZURE_TENANT_ID","AZURE_CLIENT_ID","AZURE_FEDERATED_TOKEN_FILE"],jU6=w5(jY6)});var ws7="ManagedIdentityCredential - Token Exchange",nS9,qf8;var _s7=k(()=>{uX1();l2();nS9=w5(ws7),qf8={name:"tokenExchangeMsi",async isAvailable(A){let q=process.env,K=Boolean((A||q.AZURE_CLIENT_ID)&&q.AZURE_TENANT_ID&&process.env.AZURE_FEDERATED_TOKEN_FILE);if(!K)nS9.info(`${ws7}: Unavailable. The environment variables needed are: AZURE_CLIENT_ID (or the client ID sent through the parameters), AZURE_TENANT_ID and AZURE_FEDERATED_TOKEN_FILE`);return K},async getToken(A,q={}){let{scopes:K,clientId:Y}=A,z={};return new Rl(Object.assign(Object.assign({clientId:Y,tenantId:process.env.AZURE_TENANT_ID,tokenFilePath:process.env.AZURE_FEDERATED_TOKEN_FILE},z),{disableInstanceDiscovery:!0})).getToken(K,q)}}});class K66{constructor(A,q){var K,Y;this.msiRetryConfig={maxRetries:5,startDelayInMs:800,intervalIncrement:2};let z;if(typeof A==="string")this.clientId=A,z=q!==null&&q!==void 0?q:{};else this.clientId=A===null||A===void 0?void 0:A.clientId,z=A!==null&&A!==void 0?A:{};this.resourceId=z===null||z===void 0?void 0:z.resourceId,this.objectId=z===null||z===void 0?void 0:z.objectId;let w=[{key:"clientId",value:this.clientId},{key:"resourceId",value:this.resourceId},{key:"objectId",value:this.objectId}].filter(($)=>$.value);if(w.length>1)throw Error(`ManagedIdentityCredential: only one of 'clientId', 'resourceId', or 'objectId' can be provided. Received values: ${JSON.stringify({clientId:this.clientId,resourceId:this.resourceId,objectId:this.objectId})}`);if(z.allowInsecureConnection=!0,((K=z.retryOptions)===null||K===void 0?void 0:K.maxRetries)!==void 0)this.msiRetryConfig.maxRetries=z.retryOptions.maxRetries;this.identityClient=new Ug(Object.assign(Object.assign({},z),{additionalPolicies:[{policy:Ia7(this.msiRetryConfig),position:"perCall"}]})),this.managedIdentityApp=new tg({managedIdentityIdParams:{userAssignedClientId:this.clientId,userAssignedResourceId:this.resourceId,userAssignedObjectId:this.objectId},system:{disableInternalRetries:!0,networkClient:this.identityClient,loggerOptions:{logLevel:CX1(PM1()),piiLoggingEnabled:(Y=z.loggingOptions)===null||Y===void 0?void 0:Y.enableUnsafeSupportLogging,loggerCallback:SX1(gE)}}}),this.isAvailableIdentityClient=new Ug(Object.assign(Object.assign({},z),{retryOptions:{maxRetries:0}}));let _=this.managedIdentityApp.getManagedIdentitySource();if(_==="CloudShell"){if(this.clientId||this.resourceId||this.objectId)throw gE.warning(`CloudShell MSI detected with user-provided IDs - throwing. Received values: ${JSON.stringify({clientId:this.clientId,resourceId:this.resourceId,objectId:this.objectId})}.`),new y4("ManagedIdentityCredential: Specifying a user-assigned managed identity is not supported for CloudShell at runtime. When using Managed Identity in CloudShell, omit the clientId, resourceId, and objectId parameters.")}if(_==="ServiceFabric"){if(this.clientId||this.resourceId||this.objectId)throw gE.warning(`Service Fabric detected with user-provided IDs - throwing. Received values: ${JSON.stringify({clientId:this.clientId,resourceId:this.resourceId,objectId:this.objectId})}.`),new y4(`ManagedIdentityCredential: ${Zc7}`)}if(gE.info(`Using ${_} managed identity.`),w.length===1){let{key:$,value:O}=w[0];gE.info(`${_} with ${$}: ${O}`)}}async getToken(A,q={}){gE.getToken.info("Using the MSAL provider for Managed Identity.");let K=EF6(A);if(!K)throw new y4(`ManagedIdentityCredential: Multiple scopes are not supported. Scopes: ${JSON.stringify(A)}`);return $z.withSpan("ManagedIdentityCredential.getToken",q,async()=>{var Y;try{let z=await qf8.isAvailable(this.clientId),w=this.managedIdentityApp.getManagedIdentitySource(),_=w==="DefaultToImds"||w==="Imds";if(gE.getToken.info(`MSAL Identity source: ${w}`),z){gE.getToken.info("Using the token exchange managed identity.");let O=await qf8.getToken({scopes:A,clientId:this.clientId,identityClient:this.identityClient,retryConfig:this.msiRetryConfig,resourceId:this.resourceId});if(O===null)throw new y4("Attempted to use the token exchange managed identity, but received a null response.");return O}else if(_){if(gE.getToken.info("Using the IMDS endpoint to probe for availability."),!await FG8.isAvailable({scopes:A,clientId:this.clientId,getTokenOptions:q,identityClient:this.isAvailableIdentityClient,resourceId:this.resourceId}))throw new y4("Attempted to use the IMDS endpoint, but it is not available.")}gE.getToken.info("Calling into MSAL for managed identity token.");let $=await this.managedIdentityApp.acquireToken({resource:K});return this.ensureValidMsalToken(A,$,q),gE.getToken.info(UM(A)),{expiresOnTimestamp:$.expiresOn.getTime(),token:$.accessToken,refreshAfterTimestamp:(Y=$.refreshOn)===null||Y===void 0?void 0:Y.getTime(),tokenType:"Bearer"}}catch(z){if(gE.getToken.error(NY(A,z)),z.name==="AuthenticationRequiredError")throw z;if(rS9(z))throw new y4(`ManagedIdentityCredential: Network unreachable. Message: ${z.message}`,{cause:z});throw new y4(`ManagedIdentityCredential: Authentication failed. Message ${z.message}`,{cause:z})}})}ensureValidMsalToken(A,q,K){let Y=(z)=>{return gE.getToken.info(z),new hb({scopes:Array.isArray(A)?A:[A],getTokenOptions:K,message:z})};if(!q)throw Y("No response.");if(!q.expiresOn)throw Y('Response had no "expiresOn" property.');if(!q.accessToken)throw Y('Response had no "accessToken" property.')}}function rS9(A){if(A.errorCode==="network_error")return!0;if(A.code==="ENETUNREACH"||A.code==="EHOSTUNREACH")return!0;if(A.statusCode===403||A.code===403){if(A.message.includes("unreachable"))return!0}return!1}var gE;var Kf8=k(()=>{A96();RX1();yF6();lD();hX1();ba7();l2();l0();xa7();_s7();gE=w5("ManagedIdentityCredential")});function FE(A){return Array.isArray(A)?A:[A]}function GZ6(A,q){if(!A.match(/^[0-9a-zA-Z-_.:/]+$/)){let K=Error("Invalid scope was specified by the user or calling client");throw q.getToken.info(NY(A,K)),K}}function BX1(A){return A.replace(/\/.default$/,"")}var eg=k(()=>{l2()});function Yf8(A,q){if(!q.match(/^[0-9a-zA-Z-._ ]+$/)){let K=Error("Invalid subscription provided. You can locate your subscription by following the instructions listed here: https://learn.microsoft.com/azure/azure-portal/get-subscription-tenant-id.");throw A.info(NY("",K)),K}}var $s7=k(()=>{l2()});import oS9 from"child_process";class JU6{constructor(A){if(A===null||A===void 0?void 0:A.tenantId)pM(ZS,A===null||A===void 0?void 0:A.tenantId),this.tenantId=A===null||A===void 0?void 0:A.tenantId;if(A===null||A===void 0?void 0:A.subscription)Yf8(ZS,A===null||A===void 0?void 0:A.subscription),this.subscription=A===null||A===void 0?void 0:A.subscription;this.additionallyAllowedTenantIds=eO(A===null||A===void 0?void 0:A.additionallyAllowedTenants),this.timeout=A===null||A===void 0?void 0:A.processTimeoutInMs}async getToken(A,q={}){let K=YO(this.tenantId,q,this.additionallyAllowedTenantIds);if(K)pM(ZS,K);if(this.subscription)Yf8(ZS,this.subscription);let Y=typeof A==="string"?A:A[0];return ZS.getToken.info(`Using the scope ${Y}`),$z.withSpan(`${this.constructor.name}.getToken`,q,async()=>{var z,w,_,$;try{GZ6(Y,ZS);let O=BX1(Y),H=await Os7.getAzureCliAccessToken(O,K,this.subscription,this.timeout),j=(z=H.stderr)===null||z===void 0?void 0:z.match("(.*)az login --scope(.*)"),J=((w=H.stderr)===null||w===void 0?void 0:w.match("(.*)az login(.*)"))&&!j;if(((_=H.stderr)===null||_===void 0?void 0:_.match("az:(.*)not found"))||(($=H.stderr)===null||$===void 0?void 0:$.startsWith("'az' is not recognized"))){let D=new y4("Azure CLI could not be found. Please visit https://aka.ms/azure-cli for installation instructions and then, once installed, authenticate to your Azure account using 'az login'.");throw ZS.getToken.info(NY(A,D)),D}if(J){let D=new y4("Please run 'az login' from a command prompt to authenticate before using this credential.");throw ZS.getToken.info(NY(A,D)),D}try{let D=H.stdout,X=this.parseRawResponse(D);return ZS.getToken.info(UM(A)),X}catch(D){if(H.stderr)throw new y4(H.stderr);throw D}}catch(O){let H=O.name==="CredentialUnavailableError"?O:new y4(O.message||"Unknown error while trying to retrieve the access token");throw ZS.getToken.info(NY(A,H)),H}})}parseRawResponse(A){let q=JSON.parse(A),K=q.accessToken,Y=Number.parseInt(q.expires_on,10)*1000;if(!isNaN(Y))return ZS.getToken.info("expires_on is available and is valid, using it"),{token:K,expiresOnTimestamp:Y,tokenType:"Bearer"};if(Y=new Date(q.expiresOn).getTime(),isNaN(Y))throw new y4(`Unexpected response from Azure CLI when getting token. Expected "expiresOn" to be a RFC3339 date string. Got: "${q.expiresOn}"`);return{token:K,expiresOnTimestamp:Y,tokenType:"Bearer"}}}var ZS,Os7;var zf8=k(()=>{iD();l2();eg();lD();l0();$s7();ZS=w5("AzureCliCredential"),Os7={getSafeWorkingDir(){if(process.platform==="win32"){let A=process.env.SystemRoot||process.env.SYSTEMROOT;if(!A)ZS.getToken.warning("The SystemRoot environment variable is not set. This may cause issues when using the Azure CLI credential."),A="C:\\Windows";return A}else return"/bin"},async getAzureCliAccessToken(A,q,K,Y){let z=[],w=[];if(q)z=["--tenant",q];if(K)w=["--subscription",`"${K}"`];return new Promise((_,$)=>{try{oS9.execFile("az",["account","get-access-token","--output","json","--resource",A,...z,...w],{cwd:Os7.getSafeWorkingDir(),shell:!0,timeout:Y},(O,H,j)=>{_({stdout:H,stderr:j,error:O})})}catch(O){$(O)}})}}});import aS9 from"child_process";class MU6{constructor(A){if(A===null||A===void 0?void 0:A.tenantId)pM(Sl,A===null||A===void 0?void 0:A.tenantId),this.tenantId=A===null||A===void 0?void 0:A.tenantId;this.additionallyAllowedTenantIds=eO(A===null||A===void 0?void 0:A.additionallyAllowedTenants),this.timeout=A===null||A===void 0?void 0:A.processTimeoutInMs}async getToken(A,q={}){let K=YO(this.tenantId,q,this.additionallyAllowedTenantIds);if(K)pM(Sl,K);let Y;if(typeof A==="string")Y=[A];else Y=A;return Sl.getToken.info(`Using the scopes ${A}`),$z.withSpan(`${this.constructor.name}.getToken`,q,async()=>{var z,w,_,$;try{Y.forEach((J)=>{GZ6(J,Sl)});let O=await Hs7.getAzdAccessToken(Y,K,this.timeout),H=((z=O.stderr)===null||z===void 0?void 0:z.match("not logged in, run `azd login` to login"))||((w=O.stderr)===null||w===void 0?void 0:w.match("not logged in, run `azd auth login` to login"));if(((_=O.stderr)===null||_===void 0?void 0:_.match("azd:(.*)not found"))||(($=O.stderr)===null||$===void 0?void 0:$.startsWith("'azd' is not recognized"))||O.error&&O.error.code==="ENOENT"){let J=new y4("Azure Developer CLI couldn't be found. To mitigate this issue, see the troubleshooting guidelines at https://aka.ms/azsdk/js/identity/azdevclicredential/troubleshoot.");throw Sl.getToken.info(NY(A,J)),J}if(H){let J=new y4("Please run 'azd auth login' from a command prompt to authenticate before using this credential. For more information, see the troubleshooting guidelines at https://aka.ms/azsdk/js/identity/azdevclicredential/troubleshoot.");throw Sl.getToken.info(NY(A,J)),J}try{let J=JSON.parse(O.stdout);return Sl.getToken.info(UM(A)),{token:J.token,expiresOnTimestamp:new Date(J.expiresOn).getTime(),tokenType:"Bearer"}}catch(J){if(O.stderr)throw new y4(O.stderr);throw J}}catch(O){let H=O.name==="CredentialUnavailableError"?O:new y4(O.message||"Unknown error while trying to retrieve the access token");throw Sl.getToken.info(NY(A,H)),H}})}}var Sl,Hs7;var wf8=k(()=>{l2();lD();iD();l0();eg();Sl=w5("AzureDeveloperCliCredential"),Hs7={getSafeWorkingDir(){if(process.platform==="win32"){let A=process.env.SystemRoot||process.env.SYSTEMROOT;if(!A)Sl.getToken.warning("The SystemRoot environment variable is not set. This may cause issues when using the Azure Developer CLI credential."),A="C:\\Windows";return A}else return"/bin"},async getAzdAccessToken(A,q,K){let Y=[];if(q)Y=["--tenant-id",q];return new Promise((z,w)=>{try{aS9.execFile("azd",["auth","token","--output","json",...A.reduce((_,$)=>_.concat("--scope",$),[]),...Y],{cwd:Hs7.getSafeWorkingDir(),timeout:K},(_,$,O)=>{z({stdout:$,stderr:O,error:_})})}catch(_){w(_)}})}}});import*as js7 from"child_process";var Js7;var Ms7=k(()=>{Js7={execFile(A,q,K){return new Promise((Y,z)=>{js7.execFile(A,q,K,(w,_,$)=>{if(Buffer.isBuffer(_))_=_.toString("utf8");if(Buffer.isBuffer($))$=$.toString("utf8");if($||w)z($?Error($):w);else Y(_)})})}}});function Ps7(A){if(Xs7)return`${A}.exe`;else return A}async function Ds7(A,q){let K=[];for(let Y of A){let[z,...w]=Y,_=await Js7.execFile(z,w,{encoding:"utf8",timeout:q});K.push(_)}return K}class DU6{constructor(A){if(A===null||A===void 0?void 0:A.tenantId)pM(Cl,A===null||A===void 0?void 0:A.tenantId),this.tenantId=A===null||A===void 0?void 0:A.tenantId;this.additionallyAllowedTenantIds=eO(A===null||A===void 0?void 0:A.additionallyAllowedTenants),this.timeout=A===null||A===void 0?void 0:A.processTimeoutInMs}async getAzurePowerShellAccessToken(A,q,K){for(let Y of[...$f8]){try{await Ds7([[Y,"/?"]],K)}catch(_){$f8.shift();continue}let w=(await Ds7([[Y,"-NoProfile","-NonInteractive","-Command",` $tenantId = "${q!==null&&q!==void 0?q:""}" $m = Import-Module Az.Accounts -MinimumVersion 2.2.0 -PassThru $useSecureString = $m.Version -ge [version]'2.17.0' $params = @{ ResourceUrl = "${A}" } if ($tenantId.Length -gt 0) { $params["TenantId"] = $tenantId } if ($useSecureString) { $params["AsSecureString"] = $true } $token = Get-AzAccessToken @params $result = New-Object -TypeName PSObject $result | Add-Member -MemberType NoteProperty -Name ExpiresOn -Value $token.ExpiresOn if ($useSecureString) { $result | Add-Member -MemberType NoteProperty -Name Token -Value (ConvertFrom-SecureString -AsPlainText $token.Token) } else { $result | Add-Member -MemberType NoteProperty -Name Token -Value $token.Token } Write-Output (ConvertTo-Json $result) `]]))[0];return eS9(w)}throw Error("Unable to execute PowerShell. Ensure that it is installed in your system")}async getToken(A,q={}){return $z.withSpan(`${this.constructor.name}.getToken`,q,async()=>{let K=YO(this.tenantId,q,this.additionallyAllowedTenantIds),Y=typeof A==="string"?A:A[0];if(K)pM(Cl,K);try{GZ6(Y,Cl),Cl.getToken.info(`Using the scope ${Y}`);let z=BX1(Y),w=await this.getAzurePowerShellAccessToken(z,K,this.timeout);return Cl.getToken.info(UM(A)),{token:w.Token,expiresOnTimestamp:new Date(w.ExpiresOn).getTime(),tokenType:"Bearer"}}catch(z){if(tS9(z)){let _=new y4(_f8.installed);throw Cl.getToken.info(NY(Y,_)),_}else if(sS9(z)){let _=new y4(_f8.login);throw Cl.getToken.info(NY(Y,_)),_}let w=new y4(`${z}. ${_f8.troubleshoot}`);throw Cl.getToken.info(NY(Y,w)),w}})}}async function eS9(A){let q=/{[^{}]*}/g,K=A.match(q),Y=A;if(K)try{for(let z of K)try{let w=JSON.parse(z);if(w===null||w===void 0?void 0:w.Token){if(Y=Y.replace(z,""),Y)Cl.getToken.warning(Y);return w}}catch(w){continue}}catch(z){throw Error(`Unable to parse the output of PowerShell. Received output: ${A}`)}throw Error(`No access token found in the output. Received output: ${A}`)}var Cl,Xs7,Ws7,_f8,sS9=(A)=>A.message.match(`(.*)${Ws7.login}(.*)`),tS9=(A)=>A.message.match(Ws7.installed),$f8;var Of8=k(()=>{iD();l2();eg();lD();Ms7();l0();Cl=w5("AzurePowerShellCredential"),Xs7=process.platform==="win32";Ws7={login:"Run Connect-AzAccount to login",installed:"The specified module 'Az.Accounts' with version '2.2.0' was not loaded because no valid module file was found in any module directory"},_f8={login:"Please run 'Connect-AzAccount' from PowerShell to authenticate before using this credential.",installed:`The 'Az.Account' module >= 2.2.0 is not installed. Install the Azure Az PowerShell module with: "Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force".`,troubleshoot:"To troubleshoot, visit https://aka.ms/azsdk/js/identity/powershellcredential/troubleshoot."},$f8=[Ps7("pwsh")];if(Xs7)$f8.push(Ps7("powershell"))});class XU6{constructor(...A){this._sources=[],this._sources=A}async getToken(A,q={}){let{token:K}=await this.getTokenInternal(A,q);return K}async getTokenInternal(A,q={}){let K=null,Y,z=[];return $z.withSpan("ChainedTokenCredential.getToken",q,async(w)=>{for(let _=0;_0){let _=new OF6(z,"ChainedTokenCredential authentication failed.");throw Hf8.getToken.info(NY(A,_)),_}if(Hf8.getToken.info(`Result for ${Y.constructor.name}: ${UM(A)}`),K===null)throw new y4("Failed to retrieve a valid token");return{token:K,successfulCredential:Y}})}}var Hf8;var jf8=k(()=>{lD();l2();l0();Hf8=w5("ChainedTokenCredential")});import{createHash as Zs7,createPrivateKey as AC9}from"node:crypto";import{readFile as qC9}from"node:fs/promises";class WU6{constructor(A,q,K,Y={}){if(!A||!q)throw Error(`${PU6}: tenantId and clientId are required parameters.`);this.tenantId=A,this.additionallyAllowedTenantIds=eO(Y===null||Y===void 0?void 0:Y.additionallyAllowedTenants),this.sendCertificateChain=Y.sendCertificateChain,this.certificateConfiguration=Object.assign({},typeof K==="string"?{certificatePath:K}:K);let z=this.certificateConfiguration.certificate,w=this.certificateConfiguration.certificatePath;if(!this.certificateConfiguration||!(z||w))throw Error(`${PU6}: Provide either a PEM certificate in string form, or the path to that certificate in the filesystem. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.`);if(z&&w)throw Error(`${PU6}: To avoid unexpected behaviors, providing both the contents of a PEM certificate and the path to a PEM certificate is forbidden. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.`);this.msalClient=wG(q,A,Object.assign(Object.assign({},Y),{logger:Gs7,tokenCredentialOptions:Y}))}async getToken(A,q={}){return $z.withSpan(`${PU6}.getToken`,q,async(K)=>{K.tenantId=YO(this.tenantId,K,this.additionallyAllowedTenantIds,Gs7);let Y=Array.isArray(A)?A:[A],z=await this.buildClientCertificate();return this.msalClient.getTokenByClientCertificate(Y,z,K)})}async buildClientCertificate(){var A;let q=await KC9(this.certificateConfiguration,(A=this.sendCertificateChain)!==null&&A!==void 0?A:!1),K;if(this.certificateConfiguration.certificatePassword!==void 0)K=AC9({key:q.certificateContents,passphrase:this.certificateConfiguration.certificatePassword,format:"pem"}).export({format:"pem",type:"pkcs8"}).toString();else K=q.certificateContents;return{thumbprint:q.thumbprint,thumbprintSha256:q.thumbprintSha256,privateKey:K,x5c:q.x5c}}}async function KC9(A,q){let{certificate:K,certificatePath:Y}=A,z=K||await qC9(Y,"utf8"),w=q?z:void 0,_=/(-+BEGIN CERTIFICATE-+)(\n\r?|\r\n?)([A-Za-z0-9+/\n\r]+=*)(\n\r?|\r\n?)(-+END CERTIFICATE-+)/g,$=[],O;do if(O=_.exec(z),O)$.push(O[3]);while(O);if($.length===0)throw Error("The file at the specified path does not contain a PEM-encoded certificate.");let H=Zs7("sha1").update(Buffer.from($[0],"base64")).digest("hex").toUpperCase(),j=Zs7("sha256").update(Buffer.from($[0],"base64")).digest("hex").toUpperCase();return{certificateContents:z,thumbprintSha256:j,thumbprint:H,x5c:w}}var PU6="ClientCertificateCredential",Gs7;var Jf8=k(()=>{yl();iD();l2();l0();Gs7=w5(PU6)});class ZU6{constructor(A,q,K,Y={}){if(!A)throw new y4("ClientSecretCredential: tenantId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.");if(!q)throw new y4("ClientSecretCredential: clientId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.");if(!K)throw new y4("ClientSecretCredential: clientSecret is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.");this.clientSecret=K,this.tenantId=A,this.additionallyAllowedTenantIds=eO(Y===null||Y===void 0?void 0:Y.additionallyAllowedTenants),this.msalClient=wG(q,A,Object.assign(Object.assign({},Y),{logger:fs7,tokenCredentialOptions:Y}))}async getToken(A,q={}){return $z.withSpan(`${this.constructor.name}.getToken`,q,async(K)=>{K.tenantId=YO(this.tenantId,K,this.additionallyAllowedTenantIds,fs7);let Y=FE(A);return this.msalClient.getTokenByClientSecret(Y,this.clientSecret,K)})}}var fs7;var Mf8=k(()=>{yl();iD();lD();l2();eg();l0();fs7=w5("ClientSecretCredential")});class GU6{constructor(A,q,K,Y,z={}){if(!A)throw new y4("UsernamePasswordCredential: tenantId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/usernamepasswordcredential/troubleshoot.");if(!q)throw new y4("UsernamePasswordCredential: clientId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/usernamepasswordcredential/troubleshoot.");if(!K)throw new y4("UsernamePasswordCredential: username is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/usernamepasswordcredential/troubleshoot.");if(!Y)throw new y4("UsernamePasswordCredential: password is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/usernamepasswordcredential/troubleshoot.");this.tenantId=A,this.additionallyAllowedTenantIds=eO(z===null||z===void 0?void 0:z.additionallyAllowedTenants),this.username=K,this.password=Y,this.msalClient=wG(q,this.tenantId,Object.assign(Object.assign({},z),{tokenCredentialOptions:z!==null&&z!==void 0?z:{}}))}async getToken(A,q={}){return $z.withSpan(`${this.constructor.name}.getToken`,q,async(K)=>{K.tenantId=YO(this.tenantId,K,this.additionallyAllowedTenantIds,YC9);let Y=FE(A);return this.msalClient.getTokenByUsernamePassword(Y,this.username,this.password,K)})}}var YC9;var Df8=k(()=>{yl();iD();lD();l2();eg();l0();YC9=w5("UsernamePasswordCredential")});function wC9(){var A;return((A=process.env.AZURE_ADDITIONALLY_ALLOWED_TENANTS)!==null&&A!==void 0?A:"").split(";")}function _C9(){var A;let q=((A=process.env.AZURE_CLIENT_SEND_CERTIFICATE_CHAIN)!==null&&A!==void 0?A:"").toLowerCase(),K=q==="true"||q==="1";return hl.verbose(`AZURE_CLIENT_SEND_CERTIFICATE_CHAIN: ${process.env.AZURE_CLIENT_SEND_CERTIFICATE_CHAIN}; sendCertificateChain: ${K}`),K}class fU6{constructor(A){this._credential=void 0;let q=WM1(zC9).assigned.join(", ");hl.info(`Found the following environment variables: ${q}`);let K=process.env.AZURE_TENANT_ID,Y=process.env.AZURE_CLIENT_ID,z=process.env.AZURE_CLIENT_SECRET,w=wC9(),_=_C9(),$=Object.assign(Object.assign({},A),{additionallyAllowedTenantIds:w,sendCertificateChain:_});if(K)pM(hl,K);if(K&&Y&&z){hl.info(`Invoking ClientSecretCredential with tenant ID: ${K}, clientId: ${Y} and clientSecret: [REDACTED]`),this._credential=new ZU6(K,Y,z,$);return}let O=process.env.AZURE_CLIENT_CERTIFICATE_PATH,H=process.env.AZURE_CLIENT_CERTIFICATE_PASSWORD;if(K&&Y&&O){hl.info(`Invoking ClientCertificateCredential with tenant ID: ${K}, clientId: ${Y} and certificatePath: ${O}`),this._credential=new WU6(K,Y,{certificatePath:O,certificatePassword:H},$);return}let j=process.env.AZURE_USERNAME,J=process.env.AZURE_PASSWORD;if(K&&Y&&j&&J)hl.info(`Invoking UsernamePasswordCredential with tenant ID: ${K}, clientId: ${Y} and username: ${j}`),hl.warning("Environment is configured to use username and password authentication. This authentication method is deprecated, as it doesn't support multifactor authentication (MFA). Use a more secure credential. For more details, see https://aka.ms/azsdk/identity/mfa."),this._credential=new GU6(K,Y,j,J,$)}async getToken(A,q={}){return $z.withSpan(`${mX1}.getToken`,q,async(K)=>{if(this._credential)try{let Y=await this._credential.getToken(A,K);return hl.getToken.info(UM(A)),Y}catch(Y){let z=new Cb(400,{error:`${mX1} authentication failed. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.`,error_description:Y.message.toString().split("More details:").join("")});throw hl.getToken.info(NY(A,z)),z}throw new y4(`${mX1} is unavailable. No underlying credential could be used. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.`)})}}var zC9,mX1="EnvironmentCredential",hl;var Xf8=k(()=>{lD();l2();Jf8();Mf8();Df8();iD();l0();zC9=["AZURE_TENANT_ID","AZURE_CLIENT_ID","AZURE_CLIENT_SECRET","AZURE_CLIENT_CERTIFICATE_PATH","AZURE_CLIENT_CERTIFICATE_PASSWORD","AZURE_USERNAME","AZURE_PASSWORD","AZURE_ADDITIONALLY_ALLOWED_TENANTS","AZURE_CLIENT_SEND_CERTIFICATE_CHAIN"];hl=w5(mX1)});function $C9(A={}){var q,K,Y,z;(q=A.retryOptions)!==null&&q!==void 0||(A.retryOptions={maxRetries:5,retryDelayInMs:800});let w=(K=A===null||A===void 0?void 0:A.managedIdentityClientId)!==null&&K!==void 0?K:process.env.AZURE_CLIENT_ID,_=(Y=A===null||A===void 0?void 0:A.workloadIdentityClientId)!==null&&Y!==void 0?Y:w,$=A===null||A===void 0?void 0:A.managedIdentityResourceId,O=process.env.AZURE_FEDERATED_TOKEN_FILE,H=(z=A===null||A===void 0?void 0:A.tenantId)!==null&&z!==void 0?z:process.env.AZURE_TENANT_ID;if($){let j=Object.assign(Object.assign({},A),{resourceId:$});return new K66(j)}if(O&&_){let j=Object.assign(Object.assign({},A),{tenantId:H});return new K66(_,j)}if(w){let j=Object.assign(Object.assign({},A),{clientId:w});return new K66(j)}return new K66(A)}function OC9(A){var q,K,Y;let z=(q=A===null||A===void 0?void 0:A.managedIdentityClientId)!==null&&q!==void 0?q:process.env.AZURE_CLIENT_ID,w=(K=A===null||A===void 0?void 0:A.workloadIdentityClientId)!==null&&K!==void 0?K:z,_=process.env.AZURE_FEDERATED_TOKEN_FILE,$=(Y=A===null||A===void 0?void 0:A.tenantId)!==null&&Y!==void 0?Y:process.env.AZURE_TENANT_ID;if(_&&w){let O=Object.assign(Object.assign({},A),{tenantId:$,clientId:w,tokenFilePath:_});return new Rl(O)}if($){let O=Object.assign(Object.assign({},A),{tenantId:$});return new Rl(O)}return new Rl(A)}function HC9(A={}){let q=A.processTimeoutInMs;return new MU6(Object.assign({processTimeoutInMs:q},A))}function jC9(A={}){let q=A.processTimeoutInMs;return new JU6(Object.assign({processTimeoutInMs:q},A))}function JC9(A={}){let q=A.processTimeoutInMs;return new DU6(Object.assign({processTimeoutInMs:q},A))}function MC9(A={}){return new fU6(A)}class Ts7{constructor(A,q){this.credentialName=A,this.credentialUnavailableErrorMessage=q}getToken(){return Pf8.getToken.info(`Skipping ${this.credentialName}, reason: ${this.credentialUnavailableErrorMessage}`),Promise.resolve(null)}}var Pf8,TU6;var Wf8=k(()=>{Kf8();zf8();wf8();Of8();jf8();Xf8();uX1();l2();Pf8=w5("DefaultAzureCredential");TU6=class TU6 extends XU6{constructor(A){let q=process.env.AZURE_TOKEN_CREDENTIALS?process.env.AZURE_TOKEN_CREDENTIALS.trim().toLowerCase():void 0,K=[jC9,JC9,HC9],Y=[MC9,OC9,$C9],z=[];if(q)switch(q){case"dev":z=K;break;case"prod":z=Y;break;default:{let _=`Invalid value for AZURE_TOKEN_CREDENTIALS = ${process.env.AZURE_TOKEN_CREDENTIALS}. Valid values are 'prod' or 'dev'.`;throw Pf8.warning(_),Error(_)}}else z=[...Y,...K];let w=z.map((_)=>{try{return _(A)}catch($){return Pf8.warning(`Skipped ${_.name} because of an error creating the credential: ${$}`),new Ts7(_.name,$.message)}});super(...w)}}});class Gf8{constructor(A){var q,K,Y,z,w;this.tenantId=CW6(Zf8,A.tenantId,A.clientId),this.additionallyAllowedTenantIds=eO(A===null||A===void 0?void 0:A.additionallyAllowedTenants);let _=Object.assign(Object.assign({},A),{tokenCredentialOptions:A,logger:Zf8}),$=A;if(this.browserCustomizationOptions=$.browserCustomizationOptions,this.loginHint=$.loginHint,(q=$===null||$===void 0?void 0:$.brokerOptions)===null||q===void 0?void 0:q.enabled)if(!((K=$===null||$===void 0?void 0:$.brokerOptions)===null||K===void 0?void 0:K.parentWindowHandle))throw Error("In order to do WAM authentication, `parentWindowHandle` under `brokerOptions` is a required parameter");else _.brokerOptions={enabled:!0,parentWindowHandle:$.brokerOptions.parentWindowHandle,legacyEnableMsaPassthrough:(Y=$.brokerOptions)===null||Y===void 0?void 0:Y.legacyEnableMsaPassthrough,useDefaultBrokerAccount:(z=$.brokerOptions)===null||z===void 0?void 0:z.useDefaultBrokerAccount};this.msalClient=wG((w=A.clientId)!==null&&w!==void 0?w:e56,this.tenantId,_),this.disableAutomaticAuthentication=A===null||A===void 0?void 0:A.disableAutomaticAuthentication}async getToken(A,q={}){return $z.withSpan(`${this.constructor.name}.getToken`,q,async(K)=>{K.tenantId=YO(this.tenantId,K,this.additionallyAllowedTenantIds,Zf8);let Y=FE(A);return this.msalClient.getTokenByInteractiveRequest(Y,Object.assign(Object.assign({},K),{disableAutomaticAuthentication:this.disableAutomaticAuthentication,browserCustomizationOptions:this.browserCustomizationOptions,loginHint:this.loginHint}))})}async authenticate(A,q={}){return $z.withSpan(`${this.constructor.name}.authenticate`,q,async(K)=>{let Y=FE(A);return await this.msalClient.getTokenByInteractiveRequest(Y,Object.assign(Object.assign({},K),{disableAutomaticAuthentication:!1,browserCustomizationOptions:this.browserCustomizationOptions,loginHint:this.loginHint})),this.msalClient.getActiveAccount()})}}var Zf8;var Vs7=k(()=>{iD();l2();eg();l0();yl();ug();Zf8=w5("InteractiveBrowserCredential")});function DC9(A){console.log(A.message)}class Tf8{constructor(A){var q,K;this.tenantId=A===null||A===void 0?void 0:A.tenantId,this.additionallyAllowedTenantIds=eO(A===null||A===void 0?void 0:A.additionallyAllowedTenants);let Y=(q=A===null||A===void 0?void 0:A.clientId)!==null&&q!==void 0?q:e56,z=CW6(ff8,A===null||A===void 0?void 0:A.tenantId,Y);this.userPromptCallback=(K=A===null||A===void 0?void 0:A.userPromptCallback)!==null&&K!==void 0?K:DC9,this.msalClient=wG(Y,z,Object.assign(Object.assign({},A),{logger:ff8,tokenCredentialOptions:A||{}})),this.disableAutomaticAuthentication=A===null||A===void 0?void 0:A.disableAutomaticAuthentication}async getToken(A,q={}){return $z.withSpan(`${this.constructor.name}.getToken`,q,async(K)=>{K.tenantId=YO(this.tenantId,K,this.additionallyAllowedTenantIds,ff8);let Y=FE(A);return this.msalClient.getTokenByDeviceCode(Y,this.userPromptCallback,Object.assign(Object.assign({},K),{disableAutomaticAuthentication:this.disableAutomaticAuthentication}))})}async authenticate(A,q={}){return $z.withSpan(`${this.constructor.name}.authenticate`,q,async(K)=>{let Y=Array.isArray(A)?A:[A];return await this.msalClient.getTokenByDeviceCode(Y,this.userPromptCallback,Object.assign(Object.assign({},K),{disableAutomaticAuthentication:!1})),this.msalClient.getActiveAccount()})}}var ff8;var Ns7=k(()=>{iD();l2();eg();l0();yl();ug();ff8=w5("DeviceCodeCredential")});class Vf8{constructor(A,q,K,Y,z={}){var w,_;if(!q)throw new y4(`${Ub}: is unavailable. clientId is a required parameter.`);if(!A)throw new y4(`${Ub}: is unavailable. tenantId is a required parameter.`);if(!K)throw new y4(`${Ub}: is unavailable. serviceConnectionId is a required parameter.`);if(!Y)throw new y4(`${Ub}: is unavailable. systemAccessToken is a required parameter.`);if(z.loggingOptions=Object.assign(Object.assign({},z===null||z===void 0?void 0:z.loggingOptions),{additionalAllowedHeaderNames:[...(_=(w=z.loggingOptions)===null||w===void 0?void 0:w.additionalAllowedHeaderNames)!==null&&_!==void 0?_:[],"x-vss-e2eid","x-msedge-ref"]}),this.identityClient=new Ug(z),pM(GS,A),GS.info(`Invoking AzurePipelinesCredential with tenant ID: ${A}, client ID: ${q}, and service connection ID: ${K}`),!process.env.SYSTEM_OIDCREQUESTURI)throw new y4(`${Ub}: is unavailable. Ensure that you're running this task in an Azure Pipeline, so that following missing system variable(s) can be defined- "SYSTEM_OIDCREQUESTURI"`);let $=`${process.env.SYSTEM_OIDCREQUESTURI}?api-version=${XC9}&serviceConnectionId=${K}`;GS.info(`Invoking ClientAssertionCredential with tenant ID: ${A}, client ID: ${q} and service connection ID: ${K}`),this.clientAssertionCredential=new HY6(A,q,this.requestOidcToken.bind(this,$,Y),z)}async getToken(A,q){if(!this.clientAssertionCredential){let K=`${Ub}: is unavailable. To use Federation Identity in Azure Pipelines, the following parameters are required - tenantId, clientId, serviceConnectionId, systemAccessToken, "SYSTEM_OIDCREQUESTURI". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`;throw GS.error(K),new y4(K)}return GS.info("Invoking getToken() of Client Assertion Credential"),this.clientAssertionCredential.getToken(A,q)}async requestOidcToken(A,q){GS.info("Requesting OIDC token from Azure Pipelines..."),GS.info(A);let K=bE({url:A,method:"POST",headers:wl({"Content-Type":"application/json",Authorization:`Bearer ${q}`,"X-TFS-FedAuthRedirect":"Suppress"})}),Y=await this.identityClient.sendRequest(K);return PC9(Y)}}function PC9(A){let q=A.bodyAsText;if(!q)throw GS.error(`${Ub}: Authentication Failed. Received null token from OIDC request. Response status- ${A.status}. Complete response - ${JSON.stringify(A)}`),new Cb(A.status,{error:`${Ub}: Authentication Failed. Received null token from OIDC request.`,error_description:`${JSON.stringify(A)}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`});try{let K=JSON.parse(q);if(K===null||K===void 0?void 0:K.oidcToken)return K.oidcToken;else{let Y=`${Ub}: Authentication Failed. oidcToken field not detected in the response.`,z="";if(A.status!==200)z=`Response body = ${q}. Response Headers ["x-vss-e2eid"] = ${A.headers.get("x-vss-e2eid")} and ["x-msedge-ref"] = ${A.headers.get("x-msedge-ref")}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`;throw GS.error(Y),GS.error(z),new Cb(A.status,{error:Y,error_description:z})}}catch(K){let Y=`${Ub}: Authentication Failed. oidcToken field not detected in the response.`;throw GS.error(`Response from service = ${q}, Response Headers ["x-vss-e2eid"] = ${A.headers.get("x-vss-e2eid")} and ["x-msedge-ref"] = ${A.headers.get("x-msedge-ref")}, error message = ${K.message}`),GS.error(Y),new Cb(A.status,{error:Y,error_description:`Response = ${q}. Response headers ["x-vss-e2eid"] = ${A.headers.get("x-vss-e2eid")} and ["x-msedge-ref"] = ${A.headers.get("x-msedge-ref")}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`})}}var Ub="AzurePipelinesCredential",GS,XC9="7.1";var vs7=k(()=>{lD();Fg();xX1();yF6();iD();l2();GS=w5(Ub)});class Nf8{constructor(A,q,K,Y,z,w){if(pM(ks7,A),this.clientSecret=K,typeof z==="string")this.authorizationCode=Y,this.redirectUri=z;else this.authorizationCode=K,this.redirectUri=Y,this.clientSecret=void 0,w=z;this.tenantId=A,this.additionallyAllowedTenantIds=eO(w===null||w===void 0?void 0:w.additionallyAllowedTenants),this.msalClient=wG(q,A,Object.assign(Object.assign({},w),{logger:ks7,tokenCredentialOptions:w!==null&&w!==void 0?w:{}}))}async getToken(A,q={}){return $z.withSpan(`${this.constructor.name}.getToken`,q,async(K)=>{let Y=YO(this.tenantId,K,this.additionallyAllowedTenantIds);K.tenantId=Y;let z=FE(A);return this.msalClient.getTokenByAuthorizationCode(z,this.redirectUri,this.authorizationCode,this.clientSecret,Object.assign(Object.assign({},K),{disableAutomaticAuthentication:this.disableAutomaticAuthentication}))})}}var ks7;var Es7=k(()=>{iD();iD();l2();eg();l0();yl();ks7=w5("AuthorizationCodeCredential")});import{createHash as Ls7}from"node:crypto";import{readFile as WC9}from"node:fs/promises";class kf8{constructor(A){let{clientSecret:q}=A,{certificatePath:K,sendCertificateChain:Y}=A,{getAssertion:z}=A,{tenantId:w,clientId:_,userAssertionToken:$,additionallyAllowedTenants:O}=A;if(!w)throw new y4(`${fZ6}: tenantId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.`);if(!_)throw new y4(`${fZ6}: clientId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.`);if(!q&&!K&&!z)throw new y4(`${fZ6}: You must provide one of clientSecret, certificatePath, or a getAssertion callback but none were provided. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.`);if(!$)throw new y4(`${fZ6}: userAssertionToken is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.`);this.certificatePath=K,this.clientSecret=q,this.userAssertionToken=$,this.sendCertificateChain=Y,this.clientAssertion=z,this.tenantId=w,this.additionallyAllowedTenantIds=eO(O),this.msalClient=wG(_,this.tenantId,Object.assign(Object.assign({},A),{logger:vf8,tokenCredentialOptions:A}))}async getToken(A,q={}){return $z.withSpan(`${fZ6}.getToken`,q,async(K)=>{K.tenantId=YO(this.tenantId,K,this.additionallyAllowedTenantIds,vf8);let Y=FE(A);if(this.certificatePath){let z=await this.buildClientCertificate(this.certificatePath);return this.msalClient.getTokenOnBehalfOf(Y,this.userAssertionToken,z,K)}else if(this.clientSecret)return this.msalClient.getTokenOnBehalfOf(Y,this.userAssertionToken,this.clientSecret,q);else if(this.clientAssertion)return this.msalClient.getTokenOnBehalfOf(Y,this.userAssertionToken,this.clientAssertion,q);else throw Error("Expected either clientSecret or certificatePath or clientAssertion to be defined.")})}async buildClientCertificate(A){try{let q=await this.parseCertificate({certificatePath:A},this.sendCertificateChain);return{thumbprint:q.thumbprint,thumbprintSha256:q.thumbprintSha256,privateKey:q.certificateContents,x5c:q.x5c}}catch(q){throw vf8.info(NY("",q)),q}}async parseCertificate(A,q){let K=A.certificatePath,Y=await WC9(K,"utf8"),z=q?Y:void 0,w=/(-+BEGIN CERTIFICATE-+)(\n\r?|\r\n?)([A-Za-z0-9+/\n\r]+=*)(\n\r?|\r\n?)(-+END CERTIFICATE-+)/g,_=[],$;do if($=w.exec(Y),$)_.push($[3]);while($);if(_.length===0)throw Error("The file at the specified path does not contain a PEM-encoded certificate.");let O=Ls7("sha1").update(Buffer.from(_[0],"base64")).digest("hex").toUpperCase(),H=Ls7("sha256").update(Buffer.from(_[0],"base64")).digest("hex").toUpperCase();return{certificateContents:Y,thumbprintSha256:H,thumbprint:O,x5c:z}}}var fZ6="OnBehalfOfCredential",vf8;var ys7=k(()=>{yl();l2();iD();lD();eg();l0();vf8=w5(fZ6)});function Rs7(A,q,K){let{abortSignal:Y,tracingOptions:z}=K||{},w=XF6();w.addPolicy(vF6({credential:A,scopes:q}));async function _(){var $;let H=($=(await w.sendRequest({sendRequest:(j)=>Promise.resolve({request:j,status:200,headers:j.headers})},bE({url:"https://example.com",abortSignal:Y,tracingOptions:z}))).headers.get("authorization"))===null||$===void 0?void 0:$.split(" ")[1];if(!H)throw Error("Failed to get access token");return H}return _}var Ss7=k(()=>{Fg()});var Cs7={};m1(Cs7,{useIdentityPlugin:()=>jT9,serializeAuthenticationRecord:()=>Ca7,logger:()=>SN,getDefaultAzureCredential:()=>ZC9,getBearerTokenProvider:()=>Rs7,deserializeAuthenticationRecord:()=>ha7,WorkloadIdentityCredential:()=>Rl,VisualStudioCodeCredential:()=>AW8,UsernamePasswordCredential:()=>GU6,OnBehalfOfCredential:()=>kf8,ManagedIdentityCredential:()=>K66,InteractiveBrowserCredential:()=>Gf8,EnvironmentCredential:()=>fU6,DeviceCodeCredential:()=>Tf8,DefaultAzureCredential:()=>TU6,CredentialUnavailableErrorName:()=>eP8,CredentialUnavailableError:()=>y4,ClientSecretCredential:()=>ZU6,ClientCertificateCredential:()=>WU6,ClientAssertionCredential:()=>HY6,ChainedTokenCredential:()=>XU6,AzurePowerShellCredential:()=>DU6,AzurePipelinesCredential:()=>Vf8,AzureDeveloperCliCredential:()=>MU6,AzureCliCredential:()=>JU6,AzureAuthorityHosts:()=>xg,AuthorizationCodeCredential:()=>Nf8,AuthenticationRequiredError:()=>hb,AuthenticationErrorName:()=>$F6,AuthenticationError:()=>Cb,AggregateAuthenticationErrorName:()=>A08,AggregateAuthenticationError:()=>OF6});function ZC9(){return new TU6}var hs7=k(()=>{Wf8();lD();hX1();jf8();Mf8();Wf8();Xf8();Jf8();xX1();zf8();wf8();Vs7();Kf8();Ns7();vs7();Es7();Of8();Df8();qW8();ys7();uX1();l2();ug();Ss7();vc7()});var Ef8=C((cA_,Fs7)=>{var gX1=Object.prototype.hasOwnProperty,gs7=Object.prototype.toString,Is7=Object.defineProperty,bs7=Object.getOwnPropertyDescriptor,xs7=function(q){if(typeof Array.isArray==="function")return Array.isArray(q);return gs7.call(q)==="[object Array]"},us7=function(q){if(!q||gs7.call(q)!=="[object Object]")return!1;var K=gX1.call(q,"constructor"),Y=q.constructor&&q.constructor.prototype&&gX1.call(q.constructor.prototype,"isPrototypeOf");if(q.constructor&&!K&&!Y)return!1;var z;for(z in q);return typeof z>"u"||gX1.call(q,z)},Bs7=function(q,K){if(Is7&&K.name==="__proto__")Is7(q,K.name,{enumerable:!0,configurable:!0,value:K.newValue,writable:!0});else q[K.name]=K.newValue},ms7=function(q,K){if(K==="__proto__"){if(!gX1.call(q,K))return;else if(bs7)return bs7(q,K).value}return q[K]};Fs7.exports=function A(){var q,K,Y,z,w,_,$=arguments[0],O=1,H=arguments.length,j=!1;if(typeof $==="boolean")j=$,$=arguments[1]||{},O=2;if($==null||typeof $!=="object"&&typeof $!=="function")$={};for(;O{function r2(A,q,K){if(K.globals)A=K.globals[A.name];return new A(`${K.context?K.context:"Value"} ${q}.`)}function NZ6(A,q){if(typeof A==="bigint")throw r2(TypeError,"is a BigInt which cannot be converted to a number",q);if(!q.globals)return Number(A);return q.globals.Number(A)}function Us7(A){if(A>0&&A%1===0.5&&(A&1)===0||A<0&&A%1===-0.5&&(A&1)===1)return VU6(Math.floor(A));return VU6(Math.round(A))}function FX1(A){return VU6(Math.trunc(A))}function Qs7(A){return A<0?-1:1}function GC9(A,q){let K=A%q;if(Qs7(q)!==Qs7(K))return K+q;return K}function VU6(A){return A===0?0:A}function vZ6(A,{unsigned:q}){let K,Y;if(q)K=0,Y=2**A-1;else K=-(2**(A-1)),Y=2**(A-1)-1;let z=2**A,w=2**(A-1);return(_,$={})=>{let O=NZ6(_,$);if(O=VU6(O),$.enforceRange){if(!Number.isFinite(O))throw r2(TypeError,"is not a finite number",$);if(O=FX1(O),OY)throw r2(TypeError,`is outside the accepted range of ${K} to ${Y}, inclusive`,$);return O}if(!Number.isNaN(O)&&$.clamp)return O=Math.min(Math.max(O,K),Y),O=Us7(O),O;if(!Number.isFinite(O)||O===0)return 0;if(O=FX1(O),O>=K&&O<=Y)return O;if(O=GC9(O,z),!q&&O>=w)return O-z;return O}}function ps7(A,{unsigned:q}){let K=Number.MAX_SAFE_INTEGER,Y=q?0:Number.MIN_SAFE_INTEGER,z=q?BigInt.asUintN:BigInt.asIntN;return(w,_={})=>{let $=NZ6(w,_);if($=VU6($),_.enforceRange){if(!Number.isFinite($))throw r2(TypeError,"is not a finite number",_);if($=FX1($),$K)throw r2(TypeError,`is outside the accepted range of ${Y} to ${K}, inclusive`,_);return $}if(!Number.isNaN($)&&_.clamp)return $=Math.min(Math.max($,Y),K),$=Us7($),$;if(!Number.isFinite($)||$===0)return 0;let O=BigInt(FX1($));return O=z(A,O),Number(O)}}ds7.any=(A)=>{return A};ds7.undefined=()=>{return};ds7.boolean=(A)=>{return Boolean(A)};ds7.byte=vZ6(8,{unsigned:!1});ds7.octet=vZ6(8,{unsigned:!0});ds7.short=vZ6(16,{unsigned:!1});ds7["unsigned short"]=vZ6(16,{unsigned:!0});ds7.long=vZ6(32,{unsigned:!1});ds7["unsigned long"]=vZ6(32,{unsigned:!0});ds7["long long"]=ps7(64,{unsigned:!1});ds7["unsigned long long"]=ps7(64,{unsigned:!0});ds7.double=(A,q={})=>{let K=NZ6(A,q);if(!Number.isFinite(K))throw r2(TypeError,"is not a finite floating-point value",q);return K};ds7["unrestricted double"]=(A,q={})=>{return NZ6(A,q)};ds7.float=(A,q={})=>{let K=NZ6(A,q);if(!Number.isFinite(K))throw r2(TypeError,"is not a finite floating-point value",q);if(Object.is(K,-0))return K;let Y=Math.fround(K);if(!Number.isFinite(Y))throw r2(TypeError,"is outside the range of a single-precision floating-point value",q);return Y};ds7["unrestricted float"]=(A,q={})=>{let K=NZ6(A,q);if(isNaN(K))return K;if(Object.is(K,-0))return K;return Math.fround(K)};ds7.DOMString=(A,q={})=>{if(q.treatNullAsEmptyString&&A===null)return"";if(typeof A==="symbol")throw r2(TypeError,"is a symbol, which cannot be converted to a string",q);return(q.globals?q.globals.String:String)(A)};ds7.ByteString=(A,q={})=>{let K=ds7.DOMString(A,q),Y;for(let z=0;(Y=K.codePointAt(z))!==void 0;++z)if(Y>255)throw r2(TypeError,"is not a valid ByteString",q);return K};ds7.USVString=(A,q={})=>{let K=ds7.DOMString(A,q),Y=K.length,z=[];for(let w=0;w57343)z.push(String.fromCodePoint(_));else if(56320<=_&&_<=57343)z.push(String.fromCodePoint(65533));else if(w===Y-1)z.push(String.fromCodePoint(65533));else{let $=K.charCodeAt(w+1);if(56320<=$&&$<=57343){let O=_&1023,H=$&1023;z.push(String.fromCodePoint(65536+1024*O+H)),++w}else z.push(String.fromCodePoint(65533))}}return z.join("")};ds7.object=(A,q={})=>{if(A===null||typeof A!=="object"&&typeof A!=="function")throw r2(TypeError,"is not an object",q);return A};var fC9=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get,TC9=typeof SharedArrayBuffer==="function"?Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype,"byteLength").get:null;function Lf8(A){try{return fC9.call(A),!0}catch{return!1}}function TZ6(A){try{return TC9.call(A),!0}catch{return!1}}function VZ6(A){try{return new Uint8Array(A),!1}catch{return!0}}ds7.ArrayBuffer=(A,q={})=>{if(!Lf8(A)){if(q.allowShared&&!TZ6(A))throw r2(TypeError,"is not an ArrayBuffer or SharedArrayBuffer",q);throw r2(TypeError,"is not an ArrayBuffer",q)}if(VZ6(A))throw r2(TypeError,"is a detached ArrayBuffer",q);return A};var VC9=Object.getOwnPropertyDescriptor(DataView.prototype,"byteLength").get;ds7.DataView=(A,q={})=>{try{VC9.call(A)}catch(K){throw r2(TypeError,"is not a DataView",q)}if(!q.allowShared&&TZ6(A.buffer))throw r2(TypeError,"is backed by a SharedArrayBuffer, which is not allowed",q);if(VZ6(A.buffer))throw r2(TypeError,"is backed by a detached ArrayBuffer",q);return A};var NC9=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array).prototype,Symbol.toStringTag).get;[Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Uint8ClampedArray,Float32Array,Float64Array].forEach((A)=>{let{name:q}=A,K=/^[AEIOU]/u.test(q)?"an":"a";ds7[q]=(Y,z={})=>{if(!ArrayBuffer.isView(Y)||NC9.call(Y)!==q)throw r2(TypeError,`is not ${K} ${q} object`,z);if(!z.allowShared&&TZ6(Y.buffer))throw r2(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",z);if(VZ6(Y.buffer))throw r2(TypeError,"is a view on a detached ArrayBuffer",z);return Y}});ds7.ArrayBufferView=(A,q={})=>{if(!ArrayBuffer.isView(A))throw r2(TypeError,"is not a view on an ArrayBuffer or SharedArrayBuffer",q);if(!q.allowShared&&TZ6(A.buffer))throw r2(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",q);if(VZ6(A.buffer))throw r2(TypeError,"is a view on a detached ArrayBuffer",q);return A};ds7.BufferSource=(A,q={})=>{if(ArrayBuffer.isView(A)){if(!q.allowShared&&TZ6(A.buffer))throw r2(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",q);if(VZ6(A.buffer))throw r2(TypeError,"is a view on a detached ArrayBuffer",q);return A}if(!q.allowShared&&!Lf8(A))throw r2(TypeError,"is not an ArrayBuffer or a view on one",q);if(q.allowShared&&!TZ6(A)&&!Lf8(A))throw r2(TypeError,"is not an ArrayBuffer, SharedArrayBuffer, or a view on one",q);if(VZ6(A))throw r2(TypeError,"is a detached ArrayBuffer",q);return A};ds7.DOMTimeStamp=ds7["unsigned long long"]});var pX1=C((ss7,ts7)=>{function lC9(A){return typeof A==="object"&&A!==null||typeof A==="function"}var ls7=Function.prototype.call.bind(Object.prototype.hasOwnProperty);function iC9(A,q){for(let K of Reflect.ownKeys(q)){let Y=Reflect.getOwnPropertyDescriptor(q,K);if(Y&&!Reflect.defineProperty(A,K,Y))throw TypeError(`Cannot redefine property: ${String(K)}`)}}function nC9(A,q){let K=rs7(A);return Object.defineProperties(Object.create(K["%Object.prototype%"]),Object.getOwnPropertyDescriptors(q))}var is7=Symbol("wrapper"),ns7=Symbol("impl"),kZ6=Symbol("SameObject caches"),UX1=Symbol.for("[webidl2js] constructor registry"),rC9=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);function rs7(A){if(ls7(A,UX1))return A[UX1];let q=Object.create(null);q["%Object.prototype%"]=A.Object.prototype,q["%IteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf(new A.Array()[Symbol.iterator]()));try{q["%AsyncIteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf(A.eval("(async function* () {})").prototype))}catch{q["%AsyncIteratorPrototype%"]=rC9}return A[UX1]=q,q}function oC9(A,q,K){if(!A[kZ6])A[kZ6]=Object.create(null);if(q in A[kZ6])return A[kZ6][q];return A[kZ6][q]=K(),A[kZ6][q]}function os7(A){return A?A[is7]:null}function as7(A){return A?A[ns7]:null}function aC9(A){let q=os7(A);return q?q:A}function sC9(A){let q=as7(A);return q?q:A}var tC9=Symbol("internal");function eC9(A){if(typeof A!=="string")return!1;let q=A>>>0;if(q===4294967295)return!1;let K=`${q}`;if(A!==K)return!1;return!0}var Ah9=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get;function qh9(A){try{return Ah9.call(A),!0}catch(q){return!1}}function Kh9([A,q],K){let Y;switch(K){case"key":Y=A;break;case"value":Y=q;break;case"key+value":Y=[A,q];break}return{value:Y,done:!1}}var Yh9=Symbol("supports property index"),zh9=Symbol("supported property indices"),wh9=Symbol("supports property name"),_h9=Symbol("supported property names"),$h9=Symbol("indexed property get"),Oh9=Symbol("indexed property set new"),Hh9=Symbol("indexed property set existing"),jh9=Symbol("named property get"),Jh9=Symbol("named property set new"),Mh9=Symbol("named property set existing"),Dh9=Symbol("named property delete"),Xh9=Symbol("async iterator get the next iteration result"),Ph9=Symbol("async iterator return steps"),Wh9=Symbol("async iterator initialization steps"),Zh9=Symbol("async iterator end of iteration");ts7.exports=ss7={isObject:lC9,hasOwn:ls7,define:iC9,newObjectInRealm:nC9,wrapperSymbol:is7,implSymbol:ns7,getSameObject:oC9,ctorRegistrySymbol:UX1,initCtorRegistry:rs7,wrapperForImpl:os7,implForWrapper:as7,tryWrapperForImpl:aC9,tryImplForWrapper:sC9,iterInternalSymbol:tC9,isArrayBuffer:qh9,isArrayIndexPropName:eC9,supportsPropertyIndex:Yh9,supportedPropertyIndices:zh9,supportsPropertyName:wh9,supportedPropertyNames:_h9,indexedGet:$h9,indexedSetNew:Oh9,indexedSetExisting:Hh9,namedGet:jh9,namedSetNew:Jh9,namedSetExisting:Mh9,namedDelete:Dh9,asyncIteratorNext:Xh9,asyncIteratorReturn:Ph9,asyncIteratorInit:Wh9,asyncIteratorEOI:Zh9,iteratorResult:Kh9}});var _t7=C((iA_,wt7)=>{var Gh9=/^xn--/,fh9=/[^\0-\x7F]/,Th9=/[\x2E\u3002\uFF0E\uFF61]/g,Vh9={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},AF=Math.floor,Rf8=String.fromCharCode;function Y66(A){throw RangeError(Vh9[A])}function Nh9(A,q){let K=[],Y=A.length;while(Y--)K[Y]=q(A[Y]);return K}function At7(A,q){let K=A.split("@"),Y="";if(K.length>1)Y=K[0]+"@",A=K[1];A=A.replace(Th9,".");let z=A.split("."),w=Nh9(z,q).join(".");return Y+w}function qt7(A){let q=[],K=0,Y=A.length;while(K=55296&&z<=56319&&KString.fromCodePoint(...A),kh9=function(A){if(A>=48&&A<58)return 26+(A-48);if(A>=65&&A<91)return A-65;if(A>=97&&A<123)return A-97;return 36},es7=function(A,q){return A+22+75*(A<26)-((q!=0)<<5)},Kt7=function(A,q,K){let Y=0;A=K?AF(A/700):A>>1,A+=AF(A/q);for(;A>455;Y+=36)A=AF(A/35);return AF(Y+36*A/(A+38))},Yt7=function(A){let q=[],K=A.length,Y=0,z=128,w=72,_=A.lastIndexOf("-");if(_<0)_=0;for(let $=0;$<_;++$){if(A.charCodeAt($)>=128)Y66("not-basic");q.push(A.charCodeAt($))}for(let $=_>0?_+1:0;$=K)Y66("invalid-input");let M=kh9(A.charCodeAt($++));if(M>=36)Y66("invalid-input");if(M>AF((2147483647-Y)/j))Y66("overflow");Y+=M*j;let D=J<=w?1:J>=w+26?26:J-w;if(MAF(2147483647/X))Y66("overflow");j*=X}let H=q.length+1;if(w=Kt7(Y-O,H,O==0),AF(Y/H)>2147483647-z)Y66("overflow");z+=AF(Y/H),Y%=H,q.splice(Y++,0,z)}return String.fromCodePoint(...q)},zt7=function(A){let q=[];A=qt7(A);let K=A.length,Y=128,z=0,w=72;for(let O of A)if(O<128)q.push(Rf8(O));let _=q.length,$=_;if(_)q.push("-");while($=Y&&jAF((2147483647-z)/H))Y66("overflow");z+=(O-Y)*H,Y=O;for(let j of A){if(j2147483647)Y66("overflow");if(j===Y){let J=z;for(let M=36;;M+=36){let D=M<=w?1:M>=w+26?26:M-w;if(J{var Rh9=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11000}-\u{11002}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11082}\u{110B0}-\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{11134}\u{11145}\u{11146}\u{11173}\u{11180}-\u{11182}\u{111B3}-\u{111C0}\u{111C9}-\u{111CC}\u{111CE}\u{111CF}\u{1122C}-\u{11237}\u{1123E}\u{11241}\u{112DF}-\u{112EA}\u{11300}-\u{11303}\u{1133B}\u{1133C}\u{1133E}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11357}\u{11362}\u{11363}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113B8}-\u{113C0}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}-\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11435}-\u{11446}\u{1145E}\u{114B0}-\u{114C3}\u{115AF}-\u{115B5}\u{115B8}-\u{115C0}\u{115DC}\u{115DD}\u{11630}-\u{11640}\u{116AB}-\u{116B7}\u{1171D}-\u{1172B}\u{1182C}-\u{1183A}\u{11930}-\u{11935}\u{11937}\u{11938}\u{1193B}-\u{1193E}\u{11940}\u{11942}\u{11943}\u{119D1}-\u{119D7}\u{119DA}-\u{119E0}\u{119E4}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A39}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A5B}\u{11A8A}-\u{11A99}\u{11C2F}-\u{11C36}\u{11C38}-\u{11C3F}\u{11C92}-\u{11CA7}\u{11CA9}-\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D8A}-\u{11D8E}\u{11D90}\u{11D91}\u{11D93}-\u{11D97}\u{11EF3}-\u{11EF6}\u{11F00}\u{11F01}\u{11F03}\u{11F34}-\u{11F3A}\u{11F3E}-\u{11F42}\u{11F5A}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F51}-\u{16F87}\u{16F8F}-\u{16F92}\u{16FE4}\u{16FF0}\u{16FF1}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D165}-\u{1D169}\u{1D16D}-\u{1D172}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]/u,Sh9=/[\u094D\u09CD\u0A4D\u0ACD\u0B4D\u0BCD\u0C4D\u0CCD\u0D3B\u0D3C\u0D4D\u0DCA\u0E3A\u0EBA\u0F84\u1039\u103A\u1714\u1715\u1734\u17D2\u1A60\u1B44\u1BAA\u1BAB\u1BF2\u1BF3\u2D7F\uA806\uA82C\uA8C4\uA953\uA9C0\uAAF6\uABED\u{10A3F}\u{11046}\u{11070}\u{1107F}\u{110B9}\u{11133}\u{11134}\u{111C0}\u{11235}\u{112EA}\u{1134D}\u{113CE}-\u{113D0}\u{11442}\u{114C2}\u{115BF}\u{1163F}\u{116B6}\u{1172B}\u{11839}\u{1193D}\u{1193E}\u{119E0}\u{11A34}\u{11A47}\u{11A99}\u{11C3F}\u{11D44}\u{11D45}\u{11D97}\u{11F41}\u{11F42}\u{1612F}]/u,Ch9=/[\u0620\u0626\u0628\u062A-\u062E\u0633-\u063F\u0641-\u0647\u0649\u064A\u066E\u066F\u0678-\u0687\u069A-\u06BF\u06C1\u06C2\u06CC\u06CE\u06D0\u06D1\u06FA-\u06FC\u06FF\u0712-\u0714\u071A-\u071D\u071F-\u0727\u0729\u072B\u072D\u072E\u074E-\u0758\u075C-\u076A\u076D-\u0770\u0772\u0775-\u0777\u077A-\u077F\u07CA-\u07EA\u0841-\u0845\u0848\u084A-\u0853\u0855\u0860\u0862-\u0865\u0868\u0886\u0889-\u088D\u08A0-\u08A9\u08AF\u08B0\u08B3-\u08B8\u08BA-\u08C8\u1807\u1820-\u1878\u1887-\u18A8\u18AA\uA840-\uA872\u{10AC0}-\u{10AC4}\u{10ACD}\u{10AD3}-\u{10ADC}\u{10ADE}-\u{10AE0}\u{10AEB}-\u{10AEE}\u{10B80}\u{10B82}\u{10B86}-\u{10B88}\u{10B8A}\u{10B8B}\u{10B8D}\u{10B90}\u{10BAD}\u{10BAE}\u{10D00}-\u{10D21}\u{10D23}\u{10EC3}\u{10EC4}\u{10F30}-\u{10F32}\u{10F34}-\u{10F44}\u{10F51}-\u{10F53}\u{10F70}-\u{10F73}\u{10F76}-\u{10F81}\u{10FB0}\u{10FB2}\u{10FB3}\u{10FB8}\u{10FBB}\u{10FBC}\u{10FBE}\u{10FBF}\u{10FC1}\u{10FC4}\u{10FCA}\u{10FCB}\u{1E900}-\u{1E943}][\xAD\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u061C\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFEFF\uFFF9-\uFFFB\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C3F}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13430}-\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94B}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*\u200C[\xAD\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u061C\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFEFF\uFFF9-\uFFFB\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C3F}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13430}-\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94B}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*[\u0620\u0622-\u063F\u0641-\u064A\u066E\u066F\u0671-\u0673\u0675-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u077F\u07CA-\u07EA\u0840-\u0858\u0860\u0862-\u0865\u0867-\u086A\u0870-\u0882\u0886\u0889-\u088E\u08A0-\u08AC\u08AE-\u08C8\u1807\u1820-\u1878\u1887-\u18A8\u18AA\uA840-\uA871\u{10AC0}-\u{10AC5}\u{10AC7}\u{10AC9}\u{10ACA}\u{10ACE}-\u{10AD6}\u{10AD8}-\u{10AE1}\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B80}-\u{10B91}\u{10BA9}-\u{10BAE}\u{10D01}-\u{10D23}\u{10EC2}-\u{10EC4}\u{10F30}-\u{10F44}\u{10F51}-\u{10F54}\u{10F70}-\u{10F81}\u{10FB0}\u{10FB2}-\u{10FB6}\u{10FB8}-\u{10FBF}\u{10FC1}-\u{10FC4}\u{10FC9}\u{10FCA}\u{1E900}-\u{1E943}]/u,hh9=/[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0605\u0608\u060B\u060D\u061B-\u064A\u0660-\u0669\u066B-\u066F\u0671-\u06D5\u06DD\u06E5\u06E6\u06EE\u06EF\u06FA-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u08A0-\u08C9\u08E2\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D6F}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}]/u,Ih9=/[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02BB-\u02C1\u02D0\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0482\u048A-\u052F\u0531-\u0556\u0559-\u0589\u0903-\u0939\u093B\u093D-\u0940\u0949-\u094C\u094E-\u0950\u0958-\u0961\u0964-\u0980\u0982\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C0\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09FA\u09FC\u09FD\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A76\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC0\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0\u0AE1\u0AE6-\u0AF0\u0AF9\u0B02\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0BE6-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C77\u0C7F\u0C80\u0C82-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D02-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D4F\u0D54-\u0D61\u0D66-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E4F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3E-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u1000-\u102C\u1031\u1038\u103B\u103C\u103F-\u1057\u105A-\u105D\u1061-\u1070\u1075-\u1081\u1083\u1084\u1087-\u108C\u108E-\u109C\u109E-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u167F\u1681-\u169A\u16A0-\u16F8\u1700-\u1711\u1715\u171F-\u1731\u1734-\u1736\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5\u17C7\u17C8\u17D4-\u17DA\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A19\u1A1A\u1A1E-\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1B04-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B4C\u1B4E-\u1B6A\u1B74-\u1B7F\u1B82-\u1BA1\u1BA6\u1BA7\u1BAA\u1BAE-\u1BE5\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1BFC-\u1C2B\u1C34\u1C35\u1C3B-\u1C49\u1C4D-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2188\u2336-\u237A\u2395\u249C-\u24E9\u26AC\u2800-\u28FF\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u302E\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31BF\u31F0-\u321C\u3220-\u324F\u3260-\u327B\u327F-\u32B0\u32C0-\u32CB\u32D0-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA60C\uA610-\uA62B\uA640-\uA66E\uA680-\uA69D\uA6A0-\uA6EF\uA6F2-\uA6F7\uA722-\uA787\uA789-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA824\uA827\uA830-\uA837\uA840-\uA873\uA880-\uA8C3\uA8CE-\uA8D9\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA952\uA953\uA95F-\uA97C\uA983-\uA9B2\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA2F\uAA30\uAA33\uAA34\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA7B\uAA7D-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAAEB\uAAEE-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB69\uAB70-\uABE4\uABE6\uABE7\uABE9-\uABEC\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1013F}\u{1018D}\u{1018E}\u{101D0}-\u{101FC}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{11000}\u{11002}-\u{11037}\u{11047}-\u{1104D}\u{11066}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11082}-\u{110B2}\u{110B7}\u{110B8}\u{110BB}-\u{110C1}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{1112C}\u{11136}-\u{11147}\u{11150}-\u{11172}\u{11174}-\u{11176}\u{11182}-\u{111B5}\u{111BF}-\u{111C8}\u{111CD}\u{111CE}\u{111D0}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122E}\u{11232}\u{11233}\u{11235}\u{11238}-\u{1123D}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112DE}\u{112E0}-\u{112E2}\u{112F0}-\u{112F9}\u{11302}\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}-\u{1133F}\u{11341}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}-\u{113BA}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}\u{113CD}\u{113CF}\u{113D1}\u{113D3}-\u{113D5}\u{113D7}\u{113D8}\u{11400}-\u{11437}\u{11440}\u{11441}\u{11445}\u{11447}-\u{1145B}\u{1145D}\u{1145F}-\u{11461}\u{11480}-\u{114B2}\u{114B9}\u{114BB}-\u{114BE}\u{114C1}\u{114C4}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B1}\u{115B8}-\u{115BB}\u{115BE}\u{115C1}-\u{115DB}\u{11600}-\u{11632}\u{1163B}\u{1163C}\u{1163E}\u{11641}-\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116AC}\u{116AE}\u{116AF}\u{116B6}\u{116B8}\u{116B9}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{1171E}\u{11720}\u{11721}\u{11726}\u{11730}-\u{11746}\u{11800}-\u{1182E}\u{11838}\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193D}\u{1193F}-\u{11942}\u{11944}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D3}\u{119DC}-\u{119DF}\u{119E1}-\u{119E4}\u{11A00}\u{11A07}\u{11A08}\u{11A0B}-\u{11A32}\u{11A39}\u{11A3A}\u{11A3F}-\u{11A46}\u{11A50}\u{11A57}\u{11A58}\u{11A5C}-\u{11A89}\u{11A97}\u{11A9A}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11BC0}-\u{11BE1}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2F}\u{11C3E}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11CA9}\u{11CB1}\u{11CB4}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D93}\u{11D94}\u{11D96}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11EF5}-\u{11EF8}\u{11F02}-\u{11F10}\u{11F12}-\u{11F35}\u{11F3E}\u{11F3F}\u{11F41}\u{11F43}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{1343F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{1612A}-\u{1612C}\u{16130}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF5}\u{16B00}-\u{16B2F}\u{16B37}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D79}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F50}-\u{16F87}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18CFF}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}\u{1BC9F}\u{1CCD6}-\u{1CCEF}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D166}\u{1D16A}-\u{1D172}\u{1D183}\u{1D184}\u{1D18C}-\u{1D1A9}\u{1D1AE}-\u{1D1E8}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D800}-\u{1D9FF}\u{1DA37}-\u{1DA3A}\u{1DA6D}-\u{1DA74}\u{1DA76}-\u{1DA83}\u{1DA85}-\u{1DA8B}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E5D0}-\u{1E5ED}\u{1E5F0}-\u{1E5FA}\u{1E5FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1F110}-\u{1F12E}\u{1F130}-\u{1F169}\u{1F170}-\u{1F1AC}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}]/u,bh9=/[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D4A}-\u{10D65}\u{10D6F}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}]/u,xh9=/^[\0-\x08\x0E-\x1B!-@\[-`\{-\x84\x86-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02B9\u02BA\u02C2-\u02CF\u02D2-\u02DF\u02E5-\u02ED\u02EF-\u036F\u0374\u0375\u037E\u0384\u0385\u0387\u03F6\u0483-\u0489\u058A\u058D-\u058F\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\u0600-\u070D\u070F-\u074A\u074D-\u07B1\u07C0-\u07FA\u07FD-\u082D\u0830-\u083E\u0840-\u085B\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u0897-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09F2\u09F3\u09FB\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AF1\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0BF3-\u0BFA\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C78-\u0C7E\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E3F\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39-\u0F3D\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1390-\u1399\u1400\u169B\u169C\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DB\u17DD\u17F0-\u17F9\u1800-\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1940\u1944\u1945\u19DE-\u19FF\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u200B-\u200D\u200F-\u2027\u202F-\u205E\u2060-\u2064\u206A-\u2070\u2074-\u207E\u2080-\u208E\u20A0-\u20C0\u20D0-\u20F0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u2150-\u215F\u2189-\u218B\u2190-\u2335\u237B-\u2394\u2396-\u2429\u2440-\u244A\u2460-\u249B\u24EA-\u26AB\u26AD-\u27FF\u2900-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF9-\u2CFF\u2D7F\u2DE0-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u3004\u3008-\u3020\u302A-\u302D\u3030\u3036\u3037\u303D-\u303F\u3099-\u309C\u30A0\u30FB\u31C0-\u31E5\u31EF\u321D\u321E\u3250-\u325F\u327C-\u327E\u32B1-\u32BF\u32CC-\u32CF\u3377-\u337A\u33DE\u33DF\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA60D-\uA60F\uA66F-\uA67F\uA69E\uA69F\uA6F0\uA6F1\uA700-\uA721\uA788\uA802\uA806\uA80B\uA825\uA826\uA828-\uA82C\uA838\uA839\uA874-\uA877\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uAB6A\uAB6B\uABE5\uABE8\uABED\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFE19\uFE20-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFE70-\uFE74\uFE76-\uFEFC\uFEFF\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD\u{10101}\u{10140}-\u{1018C}\u{10190}-\u{1019C}\u{101A0}\u{101FD}\u{102E0}-\u{102FB}\u{10376}-\u{1037A}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{1091F}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A38}-\u{10A3A}\u{10A3F}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE6}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B39}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D27}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D69}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAB}-\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10EFC}-\u{10F27}\u{10F30}-\u{10F59}\u{10F70}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11001}\u{11038}-\u{11046}\u{11052}-\u{11065}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{11660}-\u{1166C}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{11FD5}-\u{11FF1}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE2}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1CC00}-\u{1CCD5}\u{1CCF0}-\u{1CCF9}\u{1CD00}-\u{1CEB3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D1E9}\u{1D1EA}\u{1D200}-\u{1D245}\u{1D300}-\u{1D356}\u{1D6C1}\u{1D6DB}\u{1D6FB}\u{1D715}\u{1D735}\u{1D74F}\u{1D76F}\u{1D789}\u{1D7A9}\u{1D7C3}\u{1D7CE}-\u{1D7FF}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E2FF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8D6}\u{1E900}-\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1EEF0}\u{1EEF1}\u{1F000}-\u{1F02B}\u{1F030}-\u{1F093}\u{1F0A0}-\u{1F0AE}\u{1F0B1}-\u{1F0BF}\u{1F0C1}-\u{1F0CF}\u{1F0D1}-\u{1F0F5}\u{1F100}-\u{1F10F}\u{1F12F}\u{1F16A}-\u{1F16F}\u{1F1AD}\u{1F260}-\u{1F265}\u{1F300}-\u{1F6D7}\u{1F6DC}-\u{1F6EC}\u{1F6F0}-\u{1F6FC}\u{1F700}-\u{1F776}\u{1F77B}-\u{1F7D9}\u{1F7E0}-\u{1F7EB}\u{1F7F0}\u{1F800}-\u{1F80B}\u{1F810}-\u{1F847}\u{1F850}-\u{1F859}\u{1F860}-\u{1F887}\u{1F890}-\u{1F8AD}\u{1F8B0}-\u{1F8BB}\u{1F8C0}\u{1F8C1}\u{1F900}-\u{1FA53}\u{1FA60}-\u{1FA6D}\u{1FA70}-\u{1FA7C}\u{1FA80}-\u{1FA89}\u{1FA8F}-\u{1FAC6}\u{1FACE}-\u{1FADC}\u{1FADF}-\u{1FAE9}\u{1FAF0}-\u{1FAF8}\u{1FB00}-\u{1FB92}\u{1FB94}-\u{1FBF9}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*$/u,uh9=/[0-9\xB2\xB3\xB9\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0605\u0608\u060B\u060D\u061B-\u064A\u0660-\u0669\u066B-\u066F\u0671-\u06D5\u06DD\u06E5\u06E6\u06EE-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u08A0-\u08C9\u08E2\u200F\u2070\u2074-\u2079\u2080-\u2089\u2488-\u249B\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\u{102E1}-\u{102FB}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D6F}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1CCF0}-\u{1CCF9}\u{1D7CE}-\u{1D7FF}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10A}\u{1FBF0}-\u{1FBF9}][\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]*$/u,Bh9=/[0-9\xB2\xB3\xB9\u06F0-\u06F9\u2070\u2074-\u2079\u2080-\u2089\u2488-\u249B\uFF10-\uFF19\u{102E1}-\u{102FB}\u{1CCF0}-\u{1CCF9}\u{1D7CE}-\u{1D7FF}\u{1F100}-\u{1F10A}\u{1FBF0}-\u{1FBF9}]/u,mh9=/[\u0600-\u0605\u0660-\u0669\u066B\u066C\u06DD\u0890\u0891\u08E2\u{10D30}-\u{10D39}\u{10D40}-\u{10D49}\u{10E60}-\u{10E7E}]/u,gh9=/^[\0-\x08\x0E-\x1B!-\x84\x86-\u0377\u037A-\u037F\u0384-\u038A\u038C\u038E-\u03A1\u03A3-\u052F\u0531-\u0556\u0559-\u058A\u058D-\u058F\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0606\u0607\u0609\u060A\u060C\u060E-\u061A\u064B-\u065F\u066A\u0670\u06D6-\u06DC\u06DE-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07F6-\u07F9\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4F\u0D54-\u0D63\u0D66-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E3A\u0E3F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FDA\u1000-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u13A0-\u13F5\u13F8-\u13FD\u1400-\u167F\u1681-\u169C\u16A0-\u16F8\u1700-\u1715\u171F-\u1736\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u1800-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1940\u1944-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u19DE-\u1A1B\u1A1E-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1AB0-\u1ACE\u1B00-\u1B4C\u1B4E-\u1BF3\u1BFC-\u1C37\u1C3B-\u1C49\u1C4D-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD0-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u200B-\u200E\u2010-\u2027\u202F-\u205E\u2060-\u2064\u206A-\u2071\u2074-\u208E\u2090-\u209C\u20A0-\u20C0\u20D0-\u20F0\u2100-\u218B\u2190-\u2429\u2440-\u244A\u2460-\u2B73\u2B76-\u2B95\u2B97-\u2CF3\u2CF9-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u303F\u3041-\u3096\u3099-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31E5\u31EF-\u321E\u3220-\uA48C\uA490-\uA4C6\uA4D0-\uA62B\uA640-\uA6F7\uA700-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA82C\uA830-\uA839\uA840-\uA877\uA880-\uA8C5\uA8CE-\uA8D9\uA8E0-\uA953\uA95F-\uA97C\uA980-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA5C-\uAAC2\uAADB-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB6B\uAB70-\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1E\uFB29\uFD3E-\uFD4F\uFDCF\uFDFD-\uFE19\uFE20-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}-\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1018E}\u{10190}-\u{1019C}\u{101A0}\u{101D0}-\u{101FD}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E0}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{1037A}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{1091F}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10B39}-\u{10B3F}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6E}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11000}-\u{1104D}\u{11052}-\u{11075}\u{1107F}-\u{110C2}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11100}-\u{11134}\u{11136}-\u{11147}\u{11150}-\u{11176}\u{11180}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{11241}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112EA}\u{112F0}-\u{112F9}\u{11300}-\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133B}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}-\u{113C0}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}-\u{113D5}\u{113D7}\u{113D8}\u{113E1}\u{113E2}\u{11400}-\u{1145B}\u{1145D}-\u{11461}\u{11480}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B5}\u{115B8}-\u{115DD}\u{11600}-\u{11644}\u{11650}-\u{11659}\u{11660}-\u{1166C}\u{11680}-\u{116B9}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{1171D}-\u{1172B}\u{11730}-\u{11746}\u{11800}-\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193B}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D7}\u{119DA}-\u{119E4}\u{11A00}-\u{11A47}\u{11A50}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11BC0}-\u{11BE1}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C36}\u{11C38}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11C92}-\u{11CA7}\u{11CA9}-\u{11CB6}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D47}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D90}\u{11D91}\u{11D93}-\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF8}\u{11F00}-\u{11F10}\u{11F12}-\u{11F3A}\u{11F3E}-\u{11F5A}\u{11FB0}\u{11FC0}-\u{11FF1}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{13455}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF0}-\u{16AF5}\u{16B00}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D79}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F4F}-\u{16F87}\u{16F8F}-\u{16F9F}\u{16FE0}-\u{16FE4}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18CFF}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}-\u{1BCA3}\u{1CC00}-\u{1CCF9}\u{1CD00}-\u{1CEB3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D1EA}\u{1D200}-\u{1D245}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D300}-\u{1D356}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D7CB}\u{1D7CE}-\u{1DA8B}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E030}-\u{1E06D}\u{1E08F}\u{1E100}-\u{1E12C}\u{1E130}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AE}\u{1E2C0}-\u{1E2F9}\u{1E2FF}\u{1E4D0}-\u{1E4F9}\u{1E5D0}-\u{1E5FA}\u{1E5FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{1EEF0}\u{1EEF1}\u{1F000}-\u{1F02B}\u{1F030}-\u{1F093}\u{1F0A0}-\u{1F0AE}\u{1F0B1}-\u{1F0BF}\u{1F0C1}-\u{1F0CF}\u{1F0D1}-\u{1F0F5}\u{1F100}-\u{1F1AD}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{1F260}-\u{1F265}\u{1F300}-\u{1F6D7}\u{1F6DC}-\u{1F6EC}\u{1F6F0}-\u{1F6FC}\u{1F700}-\u{1F776}\u{1F77B}-\u{1F7D9}\u{1F7E0}-\u{1F7EB}\u{1F7F0}\u{1F800}-\u{1F80B}\u{1F810}-\u{1F847}\u{1F850}-\u{1F859}\u{1F860}-\u{1F887}\u{1F890}-\u{1F8AD}\u{1F8B0}-\u{1F8BB}\u{1F8C0}\u{1F8C1}\u{1F900}-\u{1FA53}\u{1FA60}-\u{1FA6D}\u{1FA70}-\u{1FA7C}\u{1FA80}-\u{1FA89}\u{1FA8F}-\u{1FAC6}\u{1FACE}-\u{1FADC}\u{1FADF}-\u{1FAE9}\u{1FAF0}-\u{1FAF8}\u{1FB00}-\u{1FB92}\u{1FB94}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}]*$/u,Fh9=/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02BB-\u02C1\u02D0\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0482\u048A-\u052F\u0531-\u0556\u0559-\u0589\u06F0-\u06F9\u0903-\u0939\u093B\u093D-\u0940\u0949-\u094C\u094E-\u0950\u0958-\u0961\u0964-\u0980\u0982\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C0\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09FA\u09FC\u09FD\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A76\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC0\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0\u0AE1\u0AE6-\u0AF0\u0AF9\u0B02\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0BE6-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C77\u0C7F\u0C80\u0C82-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D02-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D4F\u0D54-\u0D61\u0D66-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E4F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3E-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u1000-\u102C\u1031\u1038\u103B\u103C\u103F-\u1057\u105A-\u105D\u1061-\u1070\u1075-\u1081\u1083\u1084\u1087-\u108C\u108E-\u109C\u109E-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u167F\u1681-\u169A\u16A0-\u16F8\u1700-\u1711\u1715\u171F-\u1731\u1734-\u1736\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5\u17C7\u17C8\u17D4-\u17DA\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A19\u1A1A\u1A1E-\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1B04-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B4C\u1B4E-\u1B6A\u1B74-\u1B7F\u1B82-\u1BA1\u1BA6\u1BA7\u1BAA\u1BAE-\u1BE5\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1BFC-\u1C2B\u1C34\u1C35\u1C3B-\u1C49\u1C4D-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2188\u2336-\u237A\u2395\u2488-\u24E9\u26AC\u2800-\u28FF\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u302E\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31BF\u31F0-\u321C\u3220-\u324F\u3260-\u327B\u327F-\u32B0\u32C0-\u32CB\u32D0-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA60C\uA610-\uA62B\uA640-\uA66E\uA680-\uA69D\uA6A0-\uA6EF\uA6F2-\uA6F7\uA722-\uA787\uA789-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA824\uA827\uA830-\uA837\uA840-\uA873\uA880-\uA8C3\uA8CE-\uA8D9\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA952\uA953\uA95F-\uA97C\uA983-\uA9B2\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA2F\uAA30\uAA33\uAA34\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA7B\uAA7D-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAAEB\uAAEE-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB69\uAB70-\uABE4\uABE6\uABE7\uABE9-\uABEC\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1013F}\u{1018D}\u{1018E}\u{101D0}-\u{101FC}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{11000}\u{11002}-\u{11037}\u{11047}-\u{1104D}\u{11066}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11082}-\u{110B2}\u{110B7}\u{110B8}\u{110BB}-\u{110C1}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{1112C}\u{11136}-\u{11147}\u{11150}-\u{11172}\u{11174}-\u{11176}\u{11182}-\u{111B5}\u{111BF}-\u{111C8}\u{111CD}\u{111CE}\u{111D0}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122E}\u{11232}\u{11233}\u{11235}\u{11238}-\u{1123D}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112DE}\u{112E0}-\u{112E2}\u{112F0}-\u{112F9}\u{11302}\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}-\u{1133F}\u{11341}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}-\u{113BA}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}\u{113CD}\u{113CF}\u{113D1}\u{113D3}-\u{113D5}\u{113D7}\u{113D8}\u{11400}-\u{11437}\u{11440}\u{11441}\u{11445}\u{11447}-\u{1145B}\u{1145D}\u{1145F}-\u{11461}\u{11480}-\u{114B2}\u{114B9}\u{114BB}-\u{114BE}\u{114C1}\u{114C4}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B1}\u{115B8}-\u{115BB}\u{115BE}\u{115C1}-\u{115DB}\u{11600}-\u{11632}\u{1163B}\u{1163C}\u{1163E}\u{11641}-\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116AC}\u{116AE}\u{116AF}\u{116B6}\u{116B8}\u{116B9}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{1171E}\u{11720}\u{11721}\u{11726}\u{11730}-\u{11746}\u{11800}-\u{1182E}\u{11838}\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193D}\u{1193F}-\u{11942}\u{11944}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D3}\u{119DC}-\u{119DF}\u{119E1}-\u{119E4}\u{11A00}\u{11A07}\u{11A08}\u{11A0B}-\u{11A32}\u{11A39}\u{11A3A}\u{11A3F}-\u{11A46}\u{11A50}\u{11A57}\u{11A58}\u{11A5C}-\u{11A89}\u{11A97}\u{11A9A}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11BC0}-\u{11BE1}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2F}\u{11C3E}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11CA9}\u{11CB1}\u{11CB4}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D93}\u{11D94}\u{11D96}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11EF5}-\u{11EF8}\u{11F02}-\u{11F10}\u{11F12}-\u{11F35}\u{11F3E}\u{11F3F}\u{11F41}\u{11F43}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{1343F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{1612A}-\u{1612C}\u{16130}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF5}\u{16B00}-\u{16B2F}\u{16B37}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D79}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F50}-\u{16F87}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18CFF}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}\u{1BC9F}\u{1CCD6}-\u{1CCF9}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D166}\u{1D16A}-\u{1D172}\u{1D183}\u{1D184}\u{1D18C}-\u{1D1A9}\u{1D1AE}-\u{1D1E8}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D9FF}\u{1DA37}-\u{1DA3A}\u{1DA6D}-\u{1DA74}\u{1DA76}-\u{1DA83}\u{1DA85}-\u{1DA8B}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E5D0}-\u{1E5ED}\u{1E5F0}-\u{1E5FA}\u{1E5FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1F100}-\u{1F10A}\u{1F110}-\u{1F12E}\u{1F130}-\u{1F169}\u{1F170}-\u{1F1AC}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}][\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]*$/u;$t7.exports={combiningMarks:Rh9,combiningClassVirama:Sh9,validZWNJ:Ch9,bidiDomain:hh9,bidiS1LTR:Ih9,bidiS1RTL:bh9,bidiS2:xh9,bidiS3:uh9,bidiS4EN:Bh9,bidiS4AN:mh9,bidiS5:gh9,bidiS6:Fh9}});var Ht7=C((rA_,Qh9)=>{Qh9.exports=[[[0,44],2],[[45,46],2],[47,2],[[48,57],2],[[58,64],2],[65,1,"a"],[66,1,"b"],[67,1,"c"],[68,1,"d"],[69,1,"e"],[70,1,"f"],[71,1,"g"],[72,1,"h"],[73,1,"i"],[74,1,"j"],[75,1,"k"],[76,1,"l"],[77,1,"m"],[78,1,"n"],[79,1,"o"],[80,1,"p"],[81,1,"q"],[82,1,"r"],[83,1,"s"],[84,1,"t"],[85,1,"u"],[86,1,"v"],[87,1,"w"],[88,1,"x"],[89,1,"y"],[90,1,"z"],[[91,96],2],[[97,122],2],[[123,127],2],[[128,159],3],[160,1," "],[[161,167],2],[168,1," ̈"],[169,2],[170,1,"a"],[[171,172],2],[173,7],[174,2],[175,1," ̄"],[[176,177],2],[178,1,"2"],[179,1,"3"],[180,1," ́"],[181,1,"μ"],[182,2],[183,2],[184,1," ̧"],[185,1,"1"],[186,1,"o"],[187,2],[188,1,"1⁄4"],[189,1,"1⁄2"],[190,1,"3⁄4"],[191,2],[192,1,"à"],[193,1,"á"],[194,1,"â"],[195,1,"ã"],[196,1,"ä"],[197,1,"å"],[198,1,"æ"],[199,1,"ç"],[200,1,"è"],[201,1,"é"],[202,1,"ê"],[203,1,"ë"],[204,1,"ì"],[205,1,"í"],[206,1,"î"],[207,1,"ï"],[208,1,"ð"],[209,1,"ñ"],[210,1,"ò"],[211,1,"ó"],[212,1,"ô"],[213,1,"õ"],[214,1,"ö"],[215,2],[216,1,"ø"],[217,1,"ù"],[218,1,"ú"],[219,1,"û"],[220,1,"ü"],[221,1,"ý"],[222,1,"þ"],[223,6,"ss"],[[224,246],2],[247,2],[[248,255],2],[256,1,"ā"],[257,2],[258,1,"ă"],[259,2],[260,1,"ą"],[261,2],[262,1,"ć"],[263,2],[264,1,"ĉ"],[265,2],[266,1,"ċ"],[267,2],[268,1,"č"],[269,2],[270,1,"ď"],[271,2],[272,1,"đ"],[273,2],[274,1,"ē"],[275,2],[276,1,"ĕ"],[277,2],[278,1,"ė"],[279,2],[280,1,"ę"],[281,2],[282,1,"ě"],[283,2],[284,1,"ĝ"],[285,2],[286,1,"ğ"],[287,2],[288,1,"ġ"],[289,2],[290,1,"ģ"],[291,2],[292,1,"ĥ"],[293,2],[294,1,"ħ"],[295,2],[296,1,"ĩ"],[297,2],[298,1,"ī"],[299,2],[300,1,"ĭ"],[301,2],[302,1,"į"],[303,2],[304,1,"i̇"],[305,2],[[306,307],1,"ij"],[308,1,"ĵ"],[309,2],[310,1,"ķ"],[[311,312],2],[313,1,"ĺ"],[314,2],[315,1,"ļ"],[316,2],[317,1,"ľ"],[318,2],[[319,320],1,"l·"],[321,1,"ł"],[322,2],[323,1,"ń"],[324,2],[325,1,"ņ"],[326,2],[327,1,"ň"],[328,2],[329,1,"ʼn"],[330,1,"ŋ"],[331,2],[332,1,"ō"],[333,2],[334,1,"ŏ"],[335,2],[336,1,"ő"],[337,2],[338,1,"œ"],[339,2],[340,1,"ŕ"],[341,2],[342,1,"ŗ"],[343,2],[344,1,"ř"],[345,2],[346,1,"ś"],[347,2],[348,1,"ŝ"],[349,2],[350,1,"ş"],[351,2],[352,1,"š"],[353,2],[354,1,"ţ"],[355,2],[356,1,"ť"],[357,2],[358,1,"ŧ"],[359,2],[360,1,"ũ"],[361,2],[362,1,"ū"],[363,2],[364,1,"ŭ"],[365,2],[366,1,"ů"],[367,2],[368,1,"ű"],[369,2],[370,1,"ų"],[371,2],[372,1,"ŵ"],[373,2],[374,1,"ŷ"],[375,2],[376,1,"ÿ"],[377,1,"ź"],[378,2],[379,1,"ż"],[380,2],[381,1,"ž"],[382,2],[383,1,"s"],[384,2],[385,1,"ɓ"],[386,1,"ƃ"],[387,2],[388,1,"ƅ"],[389,2],[390,1,"ɔ"],[391,1,"ƈ"],[392,2],[393,1,"ɖ"],[394,1,"ɗ"],[395,1,"ƌ"],[[396,397],2],[398,1,"ǝ"],[399,1,"ə"],[400,1,"ɛ"],[401,1,"ƒ"],[402,2],[403,1,"ɠ"],[404,1,"ɣ"],[405,2],[406,1,"ɩ"],[407,1,"ɨ"],[408,1,"ƙ"],[[409,411],2],[412,1,"ɯ"],[413,1,"ɲ"],[414,2],[415,1,"ɵ"],[416,1,"ơ"],[417,2],[418,1,"ƣ"],[419,2],[420,1,"ƥ"],[421,2],[422,1,"ʀ"],[423,1,"ƨ"],[424,2],[425,1,"ʃ"],[[426,427],2],[428,1,"ƭ"],[429,2],[430,1,"ʈ"],[431,1,"ư"],[432,2],[433,1,"ʊ"],[434,1,"ʋ"],[435,1,"ƴ"],[436,2],[437,1,"ƶ"],[438,2],[439,1,"ʒ"],[440,1,"ƹ"],[[441,443],2],[444,1,"ƽ"],[[445,451],2],[[452,454],1,"dž"],[[455,457],1,"lj"],[[458,460],1,"nj"],[461,1,"ǎ"],[462,2],[463,1,"ǐ"],[464,2],[465,1,"ǒ"],[466,2],[467,1,"ǔ"],[468,2],[469,1,"ǖ"],[470,2],[471,1,"ǘ"],[472,2],[473,1,"ǚ"],[474,2],[475,1,"ǜ"],[[476,477],2],[478,1,"ǟ"],[479,2],[480,1,"ǡ"],[481,2],[482,1,"ǣ"],[483,2],[484,1,"ǥ"],[485,2],[486,1,"ǧ"],[487,2],[488,1,"ǩ"],[489,2],[490,1,"ǫ"],[491,2],[492,1,"ǭ"],[493,2],[494,1,"ǯ"],[[495,496],2],[[497,499],1,"dz"],[500,1,"ǵ"],[501,2],[502,1,"ƕ"],[503,1,"ƿ"],[504,1,"ǹ"],[505,2],[506,1,"ǻ"],[507,2],[508,1,"ǽ"],[509,2],[510,1,"ǿ"],[511,2],[512,1,"ȁ"],[513,2],[514,1,"ȃ"],[515,2],[516,1,"ȅ"],[517,2],[518,1,"ȇ"],[519,2],[520,1,"ȉ"],[521,2],[522,1,"ȋ"],[523,2],[524,1,"ȍ"],[525,2],[526,1,"ȏ"],[527,2],[528,1,"ȑ"],[529,2],[530,1,"ȓ"],[531,2],[532,1,"ȕ"],[533,2],[534,1,"ȗ"],[535,2],[536,1,"ș"],[537,2],[538,1,"ț"],[539,2],[540,1,"ȝ"],[541,2],[542,1,"ȟ"],[543,2],[544,1,"ƞ"],[545,2],[546,1,"ȣ"],[547,2],[548,1,"ȥ"],[549,2],[550,1,"ȧ"],[551,2],[552,1,"ȩ"],[553,2],[554,1,"ȫ"],[555,2],[556,1,"ȭ"],[557,2],[558,1,"ȯ"],[559,2],[560,1,"ȱ"],[561,2],[562,1,"ȳ"],[563,2],[[564,566],2],[[567,569],2],[570,1,"ⱥ"],[571,1,"ȼ"],[572,2],[573,1,"ƚ"],[574,1,"ⱦ"],[[575,576],2],[577,1,"ɂ"],[578,2],[579,1,"ƀ"],[580,1,"ʉ"],[581,1,"ʌ"],[582,1,"ɇ"],[583,2],[584,1,"ɉ"],[585,2],[586,1,"ɋ"],[587,2],[588,1,"ɍ"],[589,2],[590,1,"ɏ"],[591,2],[[592,680],2],[[681,685],2],[[686,687],2],[688,1,"h"],[689,1,"ɦ"],[690,1,"j"],[691,1,"r"],[692,1,"ɹ"],[693,1,"ɻ"],[694,1,"ʁ"],[695,1,"w"],[696,1,"y"],[[697,705],2],[[706,709],2],[[710,721],2],[[722,727],2],[728,1," ̆"],[729,1," ̇"],[730,1," ̊"],[731,1," ̨"],[732,1," ̃"],[733,1," ̋"],[734,2],[735,2],[736,1,"ɣ"],[737,1,"l"],[738,1,"s"],[739,1,"x"],[740,1,"ʕ"],[[741,745],2],[[746,747],2],[748,2],[749,2],[750,2],[[751,767],2],[[768,831],2],[832,1,"̀"],[833,1,"́"],[834,2],[835,1,"̓"],[836,1,"̈́"],[837,1,"ι"],[[838,846],2],[847,7],[[848,855],2],[[856,860],2],[[861,863],2],[[864,865],2],[866,2],[[867,879],2],[880,1,"ͱ"],[881,2],[882,1,"ͳ"],[883,2],[884,1,"ʹ"],[885,2],[886,1,"ͷ"],[887,2],[[888,889],3],[890,1," ι"],[[891,893],2],[894,1,";"],[895,1,"ϳ"],[[896,899],3],[900,1," ́"],[901,1," ̈́"],[902,1,"ά"],[903,1,"·"],[904,1,"έ"],[905,1,"ή"],[906,1,"ί"],[907,3],[908,1,"ό"],[909,3],[910,1,"ύ"],[911,1,"ώ"],[912,2],[913,1,"α"],[914,1,"β"],[915,1,"γ"],[916,1,"δ"],[917,1,"ε"],[918,1,"ζ"],[919,1,"η"],[920,1,"θ"],[921,1,"ι"],[922,1,"κ"],[923,1,"λ"],[924,1,"μ"],[925,1,"ν"],[926,1,"ξ"],[927,1,"ο"],[928,1,"π"],[929,1,"ρ"],[930,3],[931,1,"σ"],[932,1,"τ"],[933,1,"υ"],[934,1,"φ"],[935,1,"χ"],[936,1,"ψ"],[937,1,"ω"],[938,1,"ϊ"],[939,1,"ϋ"],[[940,961],2],[962,6,"σ"],[[963,974],2],[975,1,"ϗ"],[976,1,"β"],[977,1,"θ"],[978,1,"υ"],[979,1,"ύ"],[980,1,"ϋ"],[981,1,"φ"],[982,1,"π"],[983,2],[984,1,"ϙ"],[985,2],[986,1,"ϛ"],[987,2],[988,1,"ϝ"],[989,2],[990,1,"ϟ"],[991,2],[992,1,"ϡ"],[993,2],[994,1,"ϣ"],[995,2],[996,1,"ϥ"],[997,2],[998,1,"ϧ"],[999,2],[1000,1,"ϩ"],[1001,2],[1002,1,"ϫ"],[1003,2],[1004,1,"ϭ"],[1005,2],[1006,1,"ϯ"],[1007,2],[1008,1,"κ"],[1009,1,"ρ"],[1010,1,"σ"],[1011,2],[1012,1,"θ"],[1013,1,"ε"],[1014,2],[1015,1,"ϸ"],[1016,2],[1017,1,"σ"],[1018,1,"ϻ"],[1019,2],[1020,2],[1021,1,"ͻ"],[1022,1,"ͼ"],[1023,1,"ͽ"],[1024,1,"ѐ"],[1025,1,"ё"],[1026,1,"ђ"],[1027,1,"ѓ"],[1028,1,"є"],[1029,1,"ѕ"],[1030,1,"і"],[1031,1,"ї"],[1032,1,"ј"],[1033,1,"љ"],[1034,1,"њ"],[1035,1,"ћ"],[1036,1,"ќ"],[1037,1,"ѝ"],[1038,1,"ў"],[1039,1,"џ"],[1040,1,"а"],[1041,1,"б"],[1042,1,"в"],[1043,1,"г"],[1044,1,"д"],[1045,1,"е"],[1046,1,"ж"],[1047,1,"з"],[1048,1,"и"],[1049,1,"й"],[1050,1,"к"],[1051,1,"л"],[1052,1,"м"],[1053,1,"н"],[1054,1,"о"],[1055,1,"п"],[1056,1,"р"],[1057,1,"с"],[1058,1,"т"],[1059,1,"у"],[1060,1,"ф"],[1061,1,"х"],[1062,1,"ц"],[1063,1,"ч"],[1064,1,"ш"],[1065,1,"щ"],[1066,1,"ъ"],[1067,1,"ы"],[1068,1,"ь"],[1069,1,"э"],[1070,1,"ю"],[1071,1,"я"],[[1072,1103],2],[1104,2],[[1105,1116],2],[1117,2],[[1118,1119],2],[1120,1,"ѡ"],[1121,2],[1122,1,"ѣ"],[1123,2],[1124,1,"ѥ"],[1125,2],[1126,1,"ѧ"],[1127,2],[1128,1,"ѩ"],[1129,2],[1130,1,"ѫ"],[1131,2],[1132,1,"ѭ"],[1133,2],[1134,1,"ѯ"],[1135,2],[1136,1,"ѱ"],[1137,2],[1138,1,"ѳ"],[1139,2],[1140,1,"ѵ"],[1141,2],[1142,1,"ѷ"],[1143,2],[1144,1,"ѹ"],[1145,2],[1146,1,"ѻ"],[1147,2],[1148,1,"ѽ"],[1149,2],[1150,1,"ѿ"],[1151,2],[1152,1,"ҁ"],[1153,2],[1154,2],[[1155,1158],2],[1159,2],[[1160,1161],2],[1162,1,"ҋ"],[1163,2],[1164,1,"ҍ"],[1165,2],[1166,1,"ҏ"],[1167,2],[1168,1,"ґ"],[1169,2],[1170,1,"ғ"],[1171,2],[1172,1,"ҕ"],[1173,2],[1174,1,"җ"],[1175,2],[1176,1,"ҙ"],[1177,2],[1178,1,"қ"],[1179,2],[1180,1,"ҝ"],[1181,2],[1182,1,"ҟ"],[1183,2],[1184,1,"ҡ"],[1185,2],[1186,1,"ң"],[1187,2],[1188,1,"ҥ"],[1189,2],[1190,1,"ҧ"],[1191,2],[1192,1,"ҩ"],[1193,2],[1194,1,"ҫ"],[1195,2],[1196,1,"ҭ"],[1197,2],[1198,1,"ү"],[1199,2],[1200,1,"ұ"],[1201,2],[1202,1,"ҳ"],[1203,2],[1204,1,"ҵ"],[1205,2],[1206,1,"ҷ"],[1207,2],[1208,1,"ҹ"],[1209,2],[1210,1,"һ"],[1211,2],[1212,1,"ҽ"],[1213,2],[1214,1,"ҿ"],[1215,2],[1216,1,"ӏ"],[1217,1,"ӂ"],[1218,2],[1219,1,"ӄ"],[1220,2],[1221,1,"ӆ"],[1222,2],[1223,1,"ӈ"],[1224,2],[1225,1,"ӊ"],[1226,2],[1227,1,"ӌ"],[1228,2],[1229,1,"ӎ"],[1230,2],[1231,2],[1232,1,"ӑ"],[1233,2],[1234,1,"ӓ"],[1235,2],[1236,1,"ӕ"],[1237,2],[1238,1,"ӗ"],[1239,2],[1240,1,"ә"],[1241,2],[1242,1,"ӛ"],[1243,2],[1244,1,"ӝ"],[1245,2],[1246,1,"ӟ"],[1247,2],[1248,1,"ӡ"],[1249,2],[1250,1,"ӣ"],[1251,2],[1252,1,"ӥ"],[1253,2],[1254,1,"ӧ"],[1255,2],[1256,1,"ө"],[1257,2],[1258,1,"ӫ"],[1259,2],[1260,1,"ӭ"],[1261,2],[1262,1,"ӯ"],[1263,2],[1264,1,"ӱ"],[1265,2],[1266,1,"ӳ"],[1267,2],[1268,1,"ӵ"],[1269,2],[1270,1,"ӷ"],[1271,2],[1272,1,"ӹ"],[1273,2],[1274,1,"ӻ"],[1275,2],[1276,1,"ӽ"],[1277,2],[1278,1,"ӿ"],[1279,2],[1280,1,"ԁ"],[1281,2],[1282,1,"ԃ"],[1283,2],[1284,1,"ԅ"],[1285,2],[1286,1,"ԇ"],[1287,2],[1288,1,"ԉ"],[1289,2],[1290,1,"ԋ"],[1291,2],[1292,1,"ԍ"],[1293,2],[1294,1,"ԏ"],[1295,2],[1296,1,"ԑ"],[1297,2],[1298,1,"ԓ"],[1299,2],[1300,1,"ԕ"],[1301,2],[1302,1,"ԗ"],[1303,2],[1304,1,"ԙ"],[1305,2],[1306,1,"ԛ"],[1307,2],[1308,1,"ԝ"],[1309,2],[1310,1,"ԟ"],[1311,2],[1312,1,"ԡ"],[1313,2],[1314,1,"ԣ"],[1315,2],[1316,1,"ԥ"],[1317,2],[1318,1,"ԧ"],[1319,2],[1320,1,"ԩ"],[1321,2],[1322,1,"ԫ"],[1323,2],[1324,1,"ԭ"],[1325,2],[1326,1,"ԯ"],[1327,2],[1328,3],[1329,1,"ա"],[1330,1,"բ"],[1331,1,"գ"],[1332,1,"դ"],[1333,1,"ե"],[1334,1,"զ"],[1335,1,"է"],[1336,1,"ը"],[1337,1,"թ"],[1338,1,"ժ"],[1339,1,"ի"],[1340,1,"լ"],[1341,1,"խ"],[1342,1,"ծ"],[1343,1,"կ"],[1344,1,"հ"],[1345,1,"ձ"],[1346,1,"ղ"],[1347,1,"ճ"],[1348,1,"մ"],[1349,1,"յ"],[1350,1,"ն"],[1351,1,"շ"],[1352,1,"ո"],[1353,1,"չ"],[1354,1,"պ"],[1355,1,"ջ"],[1356,1,"ռ"],[1357,1,"ս"],[1358,1,"վ"],[1359,1,"տ"],[1360,1,"ր"],[1361,1,"ց"],[1362,1,"ւ"],[1363,1,"փ"],[1364,1,"ք"],[1365,1,"օ"],[1366,1,"ֆ"],[[1367,1368],3],[1369,2],[[1370,1375],2],[1376,2],[[1377,1414],2],[1415,1,"եւ"],[1416,2],[1417,2],[1418,2],[[1419,1420],3],[[1421,1422],2],[1423,2],[1424,3],[[1425,1441],2],[1442,2],[[1443,1455],2],[[1456,1465],2],[1466,2],[[1467,1469],2],[1470,2],[1471,2],[1472,2],[[1473,1474],2],[1475,2],[1476,2],[1477,2],[1478,2],[1479,2],[[1480,1487],3],[[1488,1514],2],[[1515,1518],3],[1519,2],[[1520,1524],2],[[1525,1535],3],[[1536,1539],3],[1540,3],[1541,3],[[1542,1546],2],[1547,2],[1548,2],[[1549,1551],2],[[1552,1557],2],[[1558,1562],2],[1563,2],[1564,3],[1565,2],[1566,2],[1567,2],[1568,2],[[1569,1594],2],[[1595,1599],2],[1600,2],[[1601,1618],2],[[1619,1621],2],[[1622,1624],2],[[1625,1630],2],[1631,2],[[1632,1641],2],[[1642,1645],2],[[1646,1647],2],[[1648,1652],2],[1653,1,"اٴ"],[1654,1,"وٴ"],[1655,1,"ۇٴ"],[1656,1,"يٴ"],[[1657,1719],2],[[1720,1721],2],[[1722,1726],2],[1727,2],[[1728,1742],2],[1743,2],[[1744,1747],2],[1748,2],[[1749,1756],2],[1757,3],[1758,2],[[1759,1768],2],[1769,2],[[1770,1773],2],[[1774,1775],2],[[1776,1785],2],[[1786,1790],2],[1791,2],[[1792,1805],2],[1806,3],[1807,3],[[1808,1836],2],[[1837,1839],2],[[1840,1866],2],[[1867,1868],3],[[1869,1871],2],[[1872,1901],2],[[1902,1919],2],[[1920,1968],2],[1969,2],[[1970,1983],3],[[1984,2037],2],[[2038,2042],2],[[2043,2044],3],[2045,2],[[2046,2047],2],[[2048,2093],2],[[2094,2095],3],[[2096,2110],2],[2111,3],[[2112,2139],2],[[2140,2141],3],[2142,2],[2143,3],[[2144,2154],2],[[2155,2159],3],[[2160,2183],2],[2184,2],[[2185,2190],2],[2191,3],[[2192,2193],3],[[2194,2198],3],[2199,2],[[2200,2207],2],[2208,2],[2209,2],[[2210,2220],2],[[2221,2226],2],[[2227,2228],2],[2229,2],[[2230,2237],2],[[2238,2247],2],[[2248,2258],2],[2259,2],[[2260,2273],2],[2274,3],[2275,2],[[2276,2302],2],[2303,2],[2304,2],[[2305,2307],2],[2308,2],[[2309,2361],2],[[2362,2363],2],[[2364,2381],2],[2382,2],[2383,2],[[2384,2388],2],[2389,2],[[2390,2391],2],[2392,1,"क़"],[2393,1,"ख़"],[2394,1,"ग़"],[2395,1,"ज़"],[2396,1,"ड़"],[2397,1,"ढ़"],[2398,1,"फ़"],[2399,1,"य़"],[[2400,2403],2],[[2404,2405],2],[[2406,2415],2],[2416,2],[[2417,2418],2],[[2419,2423],2],[2424,2],[[2425,2426],2],[[2427,2428],2],[2429,2],[[2430,2431],2],[2432,2],[[2433,2435],2],[2436,3],[[2437,2444],2],[[2445,2446],3],[[2447,2448],2],[[2449,2450],3],[[2451,2472],2],[2473,3],[[2474,2480],2],[2481,3],[2482,2],[[2483,2485],3],[[2486,2489],2],[[2490,2491],3],[2492,2],[2493,2],[[2494,2500],2],[[2501,2502],3],[[2503,2504],2],[[2505,2506],3],[[2507,2509],2],[2510,2],[[2511,2518],3],[2519,2],[[2520,2523],3],[2524,1,"ড়"],[2525,1,"ঢ়"],[2526,3],[2527,1,"য়"],[[2528,2531],2],[[2532,2533],3],[[2534,2545],2],[[2546,2554],2],[2555,2],[2556,2],[2557,2],[2558,2],[[2559,2560],3],[2561,2],[2562,2],[2563,2],[2564,3],[[2565,2570],2],[[2571,2574],3],[[2575,2576],2],[[2577,2578],3],[[2579,2600],2],[2601,3],[[2602,2608],2],[2609,3],[2610,2],[2611,1,"ਲ਼"],[2612,3],[2613,2],[2614,1,"ਸ਼"],[2615,3],[[2616,2617],2],[[2618,2619],3],[2620,2],[2621,3],[[2622,2626],2],[[2627,2630],3],[[2631,2632],2],[[2633,2634],3],[[2635,2637],2],[[2638,2640],3],[2641,2],[[2642,2648],3],[2649,1,"ਖ਼"],[2650,1,"ਗ਼"],[2651,1,"ਜ਼"],[2652,2],[2653,3],[2654,1,"ਫ਼"],[[2655,2661],3],[[2662,2676],2],[2677,2],[2678,2],[[2679,2688],3],[[2689,2691],2],[2692,3],[[2693,2699],2],[2700,2],[2701,2],[2702,3],[[2703,2705],2],[2706,3],[[2707,2728],2],[2729,3],[[2730,2736],2],[2737,3],[[2738,2739],2],[2740,3],[[2741,2745],2],[[2746,2747],3],[[2748,2757],2],[2758,3],[[2759,2761],2],[2762,3],[[2763,2765],2],[[2766,2767],3],[2768,2],[[2769,2783],3],[2784,2],[[2785,2787],2],[[2788,2789],3],[[2790,2799],2],[2800,2],[2801,2],[[2802,2808],3],[2809,2],[[2810,2815],2],[2816,3],[[2817,2819],2],[2820,3],[[2821,2828],2],[[2829,2830],3],[[2831,2832],2],[[2833,2834],3],[[2835,2856],2],[2857,3],[[2858,2864],2],[2865,3],[[2866,2867],2],[2868,3],[2869,2],[[2870,2873],2],[[2874,2875],3],[[2876,2883],2],[2884,2],[[2885,2886],3],[[2887,2888],2],[[2889,2890],3],[[2891,2893],2],[[2894,2900],3],[2901,2],[[2902,2903],2],[[2904,2907],3],[2908,1,"ଡ଼"],[2909,1,"ଢ଼"],[2910,3],[[2911,2913],2],[[2914,2915],2],[[2916,2917],3],[[2918,2927],2],[2928,2],[2929,2],[[2930,2935],2],[[2936,2945],3],[[2946,2947],2],[2948,3],[[2949,2954],2],[[2955,2957],3],[[2958,2960],2],[2961,3],[[2962,2965],2],[[2966,2968],3],[[2969,2970],2],[2971,3],[2972,2],[2973,3],[[2974,2975],2],[[2976,2978],3],[[2979,2980],2],[[2981,2983],3],[[2984,2986],2],[[2987,2989],3],[[2990,2997],2],[2998,2],[[2999,3001],2],[[3002,3005],3],[[3006,3010],2],[[3011,3013],3],[[3014,3016],2],[3017,3],[[3018,3021],2],[[3022,3023],3],[3024,2],[[3025,3030],3],[3031,2],[[3032,3045],3],[3046,2],[[3047,3055],2],[[3056,3058],2],[[3059,3066],2],[[3067,3071],3],[3072,2],[[3073,3075],2],[3076,2],[[3077,3084],2],[3085,3],[[3086,3088],2],[3089,3],[[3090,3112],2],[3113,3],[[3114,3123],2],[3124,2],[[3125,3129],2],[[3130,3131],3],[3132,2],[3133,2],[[3134,3140],2],[3141,3],[[3142,3144],2],[3145,3],[[3146,3149],2],[[3150,3156],3],[[3157,3158],2],[3159,3],[[3160,3161],2],[3162,2],[[3163,3164],3],[3165,2],[[3166,3167],3],[[3168,3169],2],[[3170,3171],2],[[3172,3173],3],[[3174,3183],2],[[3184,3190],3],[3191,2],[[3192,3199],2],[3200,2],[3201,2],[[3202,3203],2],[3204,2],[[3205,3212],2],[3213,3],[[3214,3216],2],[3217,3],[[3218,3240],2],[3241,3],[[3242,3251],2],[3252,3],[[3253,3257],2],[[3258,3259],3],[[3260,3261],2],[[3262,3268],2],[3269,3],[[3270,3272],2],[3273,3],[[3274,3277],2],[[3278,3284],3],[[3285,3286],2],[[3287,3292],3],[3293,2],[3294,2],[3295,3],[[3296,3297],2],[[3298,3299],2],[[3300,3301],3],[[3302,3311],2],[3312,3],[[3313,3314],2],[3315,2],[[3316,3327],3],[3328,2],[3329,2],[[3330,3331],2],[3332,2],[[3333,3340],2],[3341,3],[[3342,3344],2],[3345,3],[[3346,3368],2],[3369,2],[[3370,3385],2],[3386,2],[[3387,3388],2],[3389,2],[[3390,3395],2],[3396,2],[3397,3],[[3398,3400],2],[3401,3],[[3402,3405],2],[3406,2],[3407,2],[[3408,3411],3],[[3412,3414],2],[3415,2],[[3416,3422],2],[3423,2],[[3424,3425],2],[[3426,3427],2],[[3428,3429],3],[[3430,3439],2],[[3440,3445],2],[[3446,3448],2],[3449,2],[[3450,3455],2],[3456,3],[3457,2],[[3458,3459],2],[3460,3],[[3461,3478],2],[[3479,3481],3],[[3482,3505],2],[3506,3],[[3507,3515],2],[3516,3],[3517,2],[[3518,3519],3],[[3520,3526],2],[[3527,3529],3],[3530,2],[[3531,3534],3],[[3535,3540],2],[3541,3],[3542,2],[3543,3],[[3544,3551],2],[[3552,3557],3],[[3558,3567],2],[[3568,3569],3],[[3570,3571],2],[3572,2],[[3573,3584],3],[[3585,3634],2],[3635,1,"ํา"],[[3636,3642],2],[[3643,3646],3],[3647,2],[[3648,3662],2],[3663,2],[[3664,3673],2],[[3674,3675],2],[[3676,3712],3],[[3713,3714],2],[3715,3],[3716,2],[3717,3],[3718,2],[[3719,3720],2],[3721,2],[3722,2],[3723,3],[3724,2],[3725,2],[[3726,3731],2],[[3732,3735],2],[3736,2],[[3737,3743],2],[3744,2],[[3745,3747],2],[3748,3],[3749,2],[3750,3],[3751,2],[[3752,3753],2],[[3754,3755],2],[3756,2],[[3757,3762],2],[3763,1,"ໍາ"],[[3764,3769],2],[3770,2],[[3771,3773],2],[[3774,3775],3],[[3776,3780],2],[3781,3],[3782,2],[3783,3],[[3784,3789],2],[3790,2],[3791,3],[[3792,3801],2],[[3802,3803],3],[3804,1,"ຫນ"],[3805,1,"ຫມ"],[[3806,3807],2],[[3808,3839],3],[3840,2],[[3841,3850],2],[3851,2],[3852,1,"་"],[[3853,3863],2],[[3864,3865],2],[[3866,3871],2],[[3872,3881],2],[[3882,3892],2],[3893,2],[3894,2],[3895,2],[3896,2],[3897,2],[[3898,3901],2],[[3902,3906],2],[3907,1,"གྷ"],[[3908,3911],2],[3912,3],[[3913,3916],2],[3917,1,"ཌྷ"],[[3918,3921],2],[3922,1,"དྷ"],[[3923,3926],2],[3927,1,"བྷ"],[[3928,3931],2],[3932,1,"ཛྷ"],[[3933,3944],2],[3945,1,"ཀྵ"],[3946,2],[[3947,3948],2],[[3949,3952],3],[[3953,3954],2],[3955,1,"ཱི"],[3956,2],[3957,1,"ཱུ"],[3958,1,"ྲྀ"],[3959,1,"ྲཱྀ"],[3960,1,"ླྀ"],[3961,1,"ླཱྀ"],[[3962,3968],2],[3969,1,"ཱྀ"],[[3970,3972],2],[3973,2],[[3974,3979],2],[[3980,3983],2],[[3984,3986],2],[3987,1,"ྒྷ"],[[3988,3989],2],[3990,2],[3991,2],[3992,3],[[3993,3996],2],[3997,1,"ྜྷ"],[[3998,4001],2],[4002,1,"ྡྷ"],[[4003,4006],2],[4007,1,"ྦྷ"],[[4008,4011],2],[4012,1,"ྫྷ"],[4013,2],[[4014,4016],2],[[4017,4023],2],[4024,2],[4025,1,"ྐྵ"],[[4026,4028],2],[4029,3],[[4030,4037],2],[4038,2],[[4039,4044],2],[4045,3],[4046,2],[4047,2],[[4048,4049],2],[[4050,4052],2],[[4053,4056],2],[[4057,4058],2],[[4059,4095],3],[[4096,4129],2],[4130,2],[[4131,4135],2],[4136,2],[[4137,4138],2],[4139,2],[[4140,4146],2],[[4147,4149],2],[[4150,4153],2],[[4154,4159],2],[[4160,4169],2],[[4170,4175],2],[[4176,4185],2],[[4186,4249],2],[[4250,4253],2],[[4254,4255],2],[4256,1,"ⴀ"],[4257,1,"ⴁ"],[4258,1,"ⴂ"],[4259,1,"ⴃ"],[4260,1,"ⴄ"],[4261,1,"ⴅ"],[4262,1,"ⴆ"],[4263,1,"ⴇ"],[4264,1,"ⴈ"],[4265,1,"ⴉ"],[4266,1,"ⴊ"],[4267,1,"ⴋ"],[4268,1,"ⴌ"],[4269,1,"ⴍ"],[4270,1,"ⴎ"],[4271,1,"ⴏ"],[4272,1,"ⴐ"],[4273,1,"ⴑ"],[4274,1,"ⴒ"],[4275,1,"ⴓ"],[4276,1,"ⴔ"],[4277,1,"ⴕ"],[4278,1,"ⴖ"],[4279,1,"ⴗ"],[4280,1,"ⴘ"],[4281,1,"ⴙ"],[4282,1,"ⴚ"],[4283,1,"ⴛ"],[4284,1,"ⴜ"],[4285,1,"ⴝ"],[4286,1,"ⴞ"],[4287,1,"ⴟ"],[4288,1,"ⴠ"],[4289,1,"ⴡ"],[4290,1,"ⴢ"],[4291,1,"ⴣ"],[4292,1,"ⴤ"],[4293,1,"ⴥ"],[4294,3],[4295,1,"ⴧ"],[[4296,4300],3],[4301,1,"ⴭ"],[[4302,4303],3],[[4304,4342],2],[[4343,4344],2],[[4345,4346],2],[4347,2],[4348,1,"ნ"],[[4349,4351],2],[[4352,4441],2],[[4442,4446],2],[[4447,4448],7],[[4449,4514],2],[[4515,4519],2],[[4520,4601],2],[[4602,4607],2],[[4608,4614],2],[4615,2],[[4616,4678],2],[4679,2],[4680,2],[4681,3],[[4682,4685],2],[[4686,4687],3],[[4688,4694],2],[4695,3],[4696,2],[4697,3],[[4698,4701],2],[[4702,4703],3],[[4704,4742],2],[4743,2],[4744,2],[4745,3],[[4746,4749],2],[[4750,4751],3],[[4752,4782],2],[4783,2],[4784,2],[4785,3],[[4786,4789],2],[[4790,4791],3],[[4792,4798],2],[4799,3],[4800,2],[4801,3],[[4802,4805],2],[[4806,4807],3],[[4808,4814],2],[4815,2],[[4816,4822],2],[4823,3],[[4824,4846],2],[4847,2],[[4848,4878],2],[4879,2],[4880,2],[4881,3],[[4882,4885],2],[[4886,4887],3],[[4888,4894],2],[4895,2],[[4896,4934],2],[4935,2],[[4936,4954],2],[[4955,4956],3],[[4957,4958],2],[4959,2],[4960,2],[[4961,4988],2],[[4989,4991],3],[[4992,5007],2],[[5008,5017],2],[[5018,5023],3],[[5024,5108],2],[5109,2],[[5110,5111],3],[5112,1,"Ᏸ"],[5113,1,"Ᏹ"],[5114,1,"Ᏺ"],[5115,1,"Ᏻ"],[5116,1,"Ᏼ"],[5117,1,"Ᏽ"],[[5118,5119],3],[5120,2],[[5121,5740],2],[[5741,5742],2],[[5743,5750],2],[[5751,5759],2],[5760,3],[[5761,5786],2],[[5787,5788],2],[[5789,5791],3],[[5792,5866],2],[[5867,5872],2],[[5873,5880],2],[[5881,5887],3],[[5888,5900],2],[5901,2],[[5902,5908],2],[5909,2],[[5910,5918],3],[5919,2],[[5920,5940],2],[[5941,5942],2],[[5943,5951],3],[[5952,5971],2],[[5972,5983],3],[[5984,5996],2],[5997,3],[[5998,6000],2],[6001,3],[[6002,6003],2],[[6004,6015],3],[[6016,6067],2],[[6068,6069],7],[[6070,6099],2],[[6100,6102],2],[6103,2],[[6104,6107],2],[6108,2],[6109,2],[[6110,6111],3],[[6112,6121],2],[[6122,6127],3],[[6128,6137],2],[[6138,6143],3],[[6144,6154],2],[[6155,6158],7],[6159,7],[[6160,6169],2],[[6170,6175],3],[[6176,6263],2],[6264,2],[[6265,6271],3],[[6272,6313],2],[6314,2],[[6315,6319],3],[[6320,6389],2],[[6390,6399],3],[[6400,6428],2],[[6429,6430],2],[6431,3],[[6432,6443],2],[[6444,6447],3],[[6448,6459],2],[[6460,6463],3],[6464,2],[[6465,6467],3],[[6468,6469],2],[[6470,6509],2],[[6510,6511],3],[[6512,6516],2],[[6517,6527],3],[[6528,6569],2],[[6570,6571],2],[[6572,6575],3],[[6576,6601],2],[[6602,6607],3],[[6608,6617],2],[6618,2],[[6619,6621],3],[[6622,6623],2],[[6624,6655],2],[[6656,6683],2],[[6684,6685],3],[[6686,6687],2],[[6688,6750],2],[6751,3],[[6752,6780],2],[[6781,6782],3],[[6783,6793],2],[[6794,6799],3],[[6800,6809],2],[[6810,6815],3],[[6816,6822],2],[6823,2],[[6824,6829],2],[[6830,6831],3],[[6832,6845],2],[6846,2],[[6847,6848],2],[[6849,6862],2],[[6863,6911],3],[[6912,6987],2],[6988,2],[6989,3],[[6990,6991],2],[[6992,7001],2],[[7002,7018],2],[[7019,7027],2],[[7028,7036],2],[[7037,7038],2],[7039,2],[[7040,7082],2],[[7083,7085],2],[[7086,7097],2],[[7098,7103],2],[[7104,7155],2],[[7156,7163],3],[[7164,7167],2],[[7168,7223],2],[[7224,7226],3],[[7227,7231],2],[[7232,7241],2],[[7242,7244],3],[[7245,7293],2],[[7294,7295],2],[7296,1,"в"],[7297,1,"д"],[7298,1,"о"],[7299,1,"с"],[[7300,7301],1,"т"],[7302,1,"ъ"],[7303,1,"ѣ"],[7304,1,"ꙋ"],[7305,1,"ᲊ"],[7306,2],[[7307,7311],3],[7312,1,"ა"],[7313,1,"ბ"],[7314,1,"გ"],[7315,1,"დ"],[7316,1,"ე"],[7317,1,"ვ"],[7318,1,"ზ"],[7319,1,"თ"],[7320,1,"ი"],[7321,1,"კ"],[7322,1,"ლ"],[7323,1,"მ"],[7324,1,"ნ"],[7325,1,"ო"],[7326,1,"პ"],[7327,1,"ჟ"],[7328,1,"რ"],[7329,1,"ს"],[7330,1,"ტ"],[7331,1,"უ"],[7332,1,"ფ"],[7333,1,"ქ"],[7334,1,"ღ"],[7335,1,"ყ"],[7336,1,"შ"],[7337,1,"ჩ"],[7338,1,"ც"],[7339,1,"ძ"],[7340,1,"წ"],[7341,1,"ჭ"],[7342,1,"ხ"],[7343,1,"ჯ"],[7344,1,"ჰ"],[7345,1,"ჱ"],[7346,1,"ჲ"],[7347,1,"ჳ"],[7348,1,"ჴ"],[7349,1,"ჵ"],[7350,1,"ჶ"],[7351,1,"ჷ"],[7352,1,"ჸ"],[7353,1,"ჹ"],[7354,1,"ჺ"],[[7355,7356],3],[7357,1,"ჽ"],[7358,1,"ჾ"],[7359,1,"ჿ"],[[7360,7367],2],[[7368,7375],3],[[7376,7378],2],[7379,2],[[7380,7410],2],[[7411,7414],2],[7415,2],[[7416,7417],2],[7418,2],[[7419,7423],3],[[7424,7467],2],[7468,1,"a"],[7469,1,"æ"],[7470,1,"b"],[7471,2],[7472,1,"d"],[7473,1,"e"],[7474,1,"ǝ"],[7475,1,"g"],[7476,1,"h"],[7477,1,"i"],[7478,1,"j"],[7479,1,"k"],[7480,1,"l"],[7481,1,"m"],[7482,1,"n"],[7483,2],[7484,1,"o"],[7485,1,"ȣ"],[7486,1,"p"],[7487,1,"r"],[7488,1,"t"],[7489,1,"u"],[7490,1,"w"],[7491,1,"a"],[7492,1,"ɐ"],[7493,1,"ɑ"],[7494,1,"ᴂ"],[7495,1,"b"],[7496,1,"d"],[7497,1,"e"],[7498,1,"ə"],[7499,1,"ɛ"],[7500,1,"ɜ"],[7501,1,"g"],[7502,2],[7503,1,"k"],[7504,1,"m"],[7505,1,"ŋ"],[7506,1,"o"],[7507,1,"ɔ"],[7508,1,"ᴖ"],[7509,1,"ᴗ"],[7510,1,"p"],[7511,1,"t"],[7512,1,"u"],[7513,1,"ᴝ"],[7514,1,"ɯ"],[7515,1,"v"],[7516,1,"ᴥ"],[7517,1,"β"],[7518,1,"γ"],[7519,1,"δ"],[7520,1,"φ"],[7521,1,"χ"],[7522,1,"i"],[7523,1,"r"],[7524,1,"u"],[7525,1,"v"],[7526,1,"β"],[7527,1,"γ"],[7528,1,"ρ"],[7529,1,"φ"],[7530,1,"χ"],[7531,2],[[7532,7543],2],[7544,1,"н"],[[7545,7578],2],[7579,1,"ɒ"],[7580,1,"c"],[7581,1,"ɕ"],[7582,1,"ð"],[7583,1,"ɜ"],[7584,1,"f"],[7585,1,"ɟ"],[7586,1,"ɡ"],[7587,1,"ɥ"],[7588,1,"ɨ"],[7589,1,"ɩ"],[7590,1,"ɪ"],[7591,1,"ᵻ"],[7592,1,"ʝ"],[7593,1,"ɭ"],[7594,1,"ᶅ"],[7595,1,"ʟ"],[7596,1,"ɱ"],[7597,1,"ɰ"],[7598,1,"ɲ"],[7599,1,"ɳ"],[7600,1,"ɴ"],[7601,1,"ɵ"],[7602,1,"ɸ"],[7603,1,"ʂ"],[7604,1,"ʃ"],[7605,1,"ƫ"],[7606,1,"ʉ"],[7607,1,"ʊ"],[7608,1,"ᴜ"],[7609,1,"ʋ"],[7610,1,"ʌ"],[7611,1,"z"],[7612,1,"ʐ"],[7613,1,"ʑ"],[7614,1,"ʒ"],[7615,1,"θ"],[[7616,7619],2],[[7620,7626],2],[[7627,7654],2],[[7655,7669],2],[[7670,7673],2],[7674,2],[7675,2],[7676,2],[7677,2],[[7678,7679],2],[7680,1,"ḁ"],[7681,2],[7682,1,"ḃ"],[7683,2],[7684,1,"ḅ"],[7685,2],[7686,1,"ḇ"],[7687,2],[7688,1,"ḉ"],[7689,2],[7690,1,"ḋ"],[7691,2],[7692,1,"ḍ"],[7693,2],[7694,1,"ḏ"],[7695,2],[7696,1,"ḑ"],[7697,2],[7698,1,"ḓ"],[7699,2],[7700,1,"ḕ"],[7701,2],[7702,1,"ḗ"],[7703,2],[7704,1,"ḙ"],[7705,2],[7706,1,"ḛ"],[7707,2],[7708,1,"ḝ"],[7709,2],[7710,1,"ḟ"],[7711,2],[7712,1,"ḡ"],[7713,2],[7714,1,"ḣ"],[7715,2],[7716,1,"ḥ"],[7717,2],[7718,1,"ḧ"],[7719,2],[7720,1,"ḩ"],[7721,2],[7722,1,"ḫ"],[7723,2],[7724,1,"ḭ"],[7725,2],[7726,1,"ḯ"],[7727,2],[7728,1,"ḱ"],[7729,2],[7730,1,"ḳ"],[7731,2],[7732,1,"ḵ"],[7733,2],[7734,1,"ḷ"],[7735,2],[7736,1,"ḹ"],[7737,2],[7738,1,"ḻ"],[7739,2],[7740,1,"ḽ"],[7741,2],[7742,1,"ḿ"],[7743,2],[7744,1,"ṁ"],[7745,2],[7746,1,"ṃ"],[7747,2],[7748,1,"ṅ"],[7749,2],[7750,1,"ṇ"],[7751,2],[7752,1,"ṉ"],[7753,2],[7754,1,"ṋ"],[7755,2],[7756,1,"ṍ"],[7757,2],[7758,1,"ṏ"],[7759,2],[7760,1,"ṑ"],[7761,2],[7762,1,"ṓ"],[7763,2],[7764,1,"ṕ"],[7765,2],[7766,1,"ṗ"],[7767,2],[7768,1,"ṙ"],[7769,2],[7770,1,"ṛ"],[7771,2],[7772,1,"ṝ"],[7773,2],[7774,1,"ṟ"],[7775,2],[7776,1,"ṡ"],[7777,2],[7778,1,"ṣ"],[7779,2],[7780,1,"ṥ"],[7781,2],[7782,1,"ṧ"],[7783,2],[7784,1,"ṩ"],[7785,2],[7786,1,"ṫ"],[7787,2],[7788,1,"ṭ"],[7789,2],[7790,1,"ṯ"],[7791,2],[7792,1,"ṱ"],[7793,2],[7794,1,"ṳ"],[7795,2],[7796,1,"ṵ"],[7797,2],[7798,1,"ṷ"],[7799,2],[7800,1,"ṹ"],[7801,2],[7802,1,"ṻ"],[7803,2],[7804,1,"ṽ"],[7805,2],[7806,1,"ṿ"],[7807,2],[7808,1,"ẁ"],[7809,2],[7810,1,"ẃ"],[7811,2],[7812,1,"ẅ"],[7813,2],[7814,1,"ẇ"],[7815,2],[7816,1,"ẉ"],[7817,2],[7818,1,"ẋ"],[7819,2],[7820,1,"ẍ"],[7821,2],[7822,1,"ẏ"],[7823,2],[7824,1,"ẑ"],[7825,2],[7826,1,"ẓ"],[7827,2],[7828,1,"ẕ"],[[7829,7833],2],[7834,1,"aʾ"],[7835,1,"ṡ"],[[7836,7837],2],[7838,1,"ß"],[7839,2],[7840,1,"ạ"],[7841,2],[7842,1,"ả"],[7843,2],[7844,1,"ấ"],[7845,2],[7846,1,"ầ"],[7847,2],[7848,1,"ẩ"],[7849,2],[7850,1,"ẫ"],[7851,2],[7852,1,"ậ"],[7853,2],[7854,1,"ắ"],[7855,2],[7856,1,"ằ"],[7857,2],[7858,1,"ẳ"],[7859,2],[7860,1,"ẵ"],[7861,2],[7862,1,"ặ"],[7863,2],[7864,1,"ẹ"],[7865,2],[7866,1,"ẻ"],[7867,2],[7868,1,"ẽ"],[7869,2],[7870,1,"ế"],[7871,2],[7872,1,"ề"],[7873,2],[7874,1,"ể"],[7875,2],[7876,1,"ễ"],[7877,2],[7878,1,"ệ"],[7879,2],[7880,1,"ỉ"],[7881,2],[7882,1,"ị"],[7883,2],[7884,1,"ọ"],[7885,2],[7886,1,"ỏ"],[7887,2],[7888,1,"ố"],[7889,2],[7890,1,"ồ"],[7891,2],[7892,1,"ổ"],[7893,2],[7894,1,"ỗ"],[7895,2],[7896,1,"ộ"],[7897,2],[7898,1,"ớ"],[7899,2],[7900,1,"ờ"],[7901,2],[7902,1,"ở"],[7903,2],[7904,1,"ỡ"],[7905,2],[7906,1,"ợ"],[7907,2],[7908,1,"ụ"],[7909,2],[7910,1,"ủ"],[7911,2],[7912,1,"ứ"],[7913,2],[7914,1,"ừ"],[7915,2],[7916,1,"ử"],[7917,2],[7918,1,"ữ"],[7919,2],[7920,1,"ự"],[7921,2],[7922,1,"ỳ"],[7923,2],[7924,1,"ỵ"],[7925,2],[7926,1,"ỷ"],[7927,2],[7928,1,"ỹ"],[7929,2],[7930,1,"ỻ"],[7931,2],[7932,1,"ỽ"],[7933,2],[7934,1,"ỿ"],[7935,2],[[7936,7943],2],[7944,1,"ἀ"],[7945,1,"ἁ"],[7946,1,"ἂ"],[7947,1,"ἃ"],[7948,1,"ἄ"],[7949,1,"ἅ"],[7950,1,"ἆ"],[7951,1,"ἇ"],[[7952,7957],2],[[7958,7959],3],[7960,1,"ἐ"],[7961,1,"ἑ"],[7962,1,"ἒ"],[7963,1,"ἓ"],[7964,1,"ἔ"],[7965,1,"ἕ"],[[7966,7967],3],[[7968,7975],2],[7976,1,"ἠ"],[7977,1,"ἡ"],[7978,1,"ἢ"],[7979,1,"ἣ"],[7980,1,"ἤ"],[7981,1,"ἥ"],[7982,1,"ἦ"],[7983,1,"ἧ"],[[7984,7991],2],[7992,1,"ἰ"],[7993,1,"ἱ"],[7994,1,"ἲ"],[7995,1,"ἳ"],[7996,1,"ἴ"],[7997,1,"ἵ"],[7998,1,"ἶ"],[7999,1,"ἷ"],[[8000,8005],2],[[8006,8007],3],[8008,1,"ὀ"],[8009,1,"ὁ"],[8010,1,"ὂ"],[8011,1,"ὃ"],[8012,1,"ὄ"],[8013,1,"ὅ"],[[8014,8015],3],[[8016,8023],2],[8024,3],[8025,1,"ὑ"],[8026,3],[8027,1,"ὓ"],[8028,3],[8029,1,"ὕ"],[8030,3],[8031,1,"ὗ"],[[8032,8039],2],[8040,1,"ὠ"],[8041,1,"ὡ"],[8042,1,"ὢ"],[8043,1,"ὣ"],[8044,1,"ὤ"],[8045,1,"ὥ"],[8046,1,"ὦ"],[8047,1,"ὧ"],[8048,2],[8049,1,"ά"],[8050,2],[8051,1,"έ"],[8052,2],[8053,1,"ή"],[8054,2],[8055,1,"ί"],[8056,2],[8057,1,"ό"],[8058,2],[8059,1,"ύ"],[8060,2],[8061,1,"ώ"],[[8062,8063],3],[8064,1,"ἀι"],[8065,1,"ἁι"],[8066,1,"ἂι"],[8067,1,"ἃι"],[8068,1,"ἄι"],[8069,1,"ἅι"],[8070,1,"ἆι"],[8071,1,"ἇι"],[8072,1,"ἀι"],[8073,1,"ἁι"],[8074,1,"ἂι"],[8075,1,"ἃι"],[8076,1,"ἄι"],[8077,1,"ἅι"],[8078,1,"ἆι"],[8079,1,"ἇι"],[8080,1,"ἠι"],[8081,1,"ἡι"],[8082,1,"ἢι"],[8083,1,"ἣι"],[8084,1,"ἤι"],[8085,1,"ἥι"],[8086,1,"ἦι"],[8087,1,"ἧι"],[8088,1,"ἠι"],[8089,1,"ἡι"],[8090,1,"ἢι"],[8091,1,"ἣι"],[8092,1,"ἤι"],[8093,1,"ἥι"],[8094,1,"ἦι"],[8095,1,"ἧι"],[8096,1,"ὠι"],[8097,1,"ὡι"],[8098,1,"ὢι"],[8099,1,"ὣι"],[8100,1,"ὤι"],[8101,1,"ὥι"],[8102,1,"ὦι"],[8103,1,"ὧι"],[8104,1,"ὠι"],[8105,1,"ὡι"],[8106,1,"ὢι"],[8107,1,"ὣι"],[8108,1,"ὤι"],[8109,1,"ὥι"],[8110,1,"ὦι"],[8111,1,"ὧι"],[[8112,8113],2],[8114,1,"ὰι"],[8115,1,"αι"],[8116,1,"άι"],[8117,3],[8118,2],[8119,1,"ᾶι"],[8120,1,"ᾰ"],[8121,1,"ᾱ"],[8122,1,"ὰ"],[8123,1,"ά"],[8124,1,"αι"],[8125,1," ̓"],[8126,1,"ι"],[8127,1," ̓"],[8128,1," ͂"],[8129,1," ̈͂"],[8130,1,"ὴι"],[8131,1,"ηι"],[8132,1,"ήι"],[8133,3],[8134,2],[8135,1,"ῆι"],[8136,1,"ὲ"],[8137,1,"έ"],[8138,1,"ὴ"],[8139,1,"ή"],[8140,1,"ηι"],[8141,1," ̓̀"],[8142,1," ̓́"],[8143,1," ̓͂"],[[8144,8146],2],[8147,1,"ΐ"],[[8148,8149],3],[[8150,8151],2],[8152,1,"ῐ"],[8153,1,"ῑ"],[8154,1,"ὶ"],[8155,1,"ί"],[8156,3],[8157,1," ̔̀"],[8158,1," ̔́"],[8159,1," ̔͂"],[[8160,8162],2],[8163,1,"ΰ"],[[8164,8167],2],[8168,1,"ῠ"],[8169,1,"ῡ"],[8170,1,"ὺ"],[8171,1,"ύ"],[8172,1,"ῥ"],[8173,1," ̈̀"],[8174,1," ̈́"],[8175,1,"`"],[[8176,8177],3],[8178,1,"ὼι"],[8179,1,"ωι"],[8180,1,"ώι"],[8181,3],[8182,2],[8183,1,"ῶι"],[8184,1,"ὸ"],[8185,1,"ό"],[8186,1,"ὼ"],[8187,1,"ώ"],[8188,1,"ωι"],[8189,1," ́"],[8190,1," ̔"],[8191,3],[[8192,8202],1," "],[8203,7],[[8204,8205],6,""],[[8206,8207],3],[8208,2],[8209,1,"‐"],[[8210,8214],2],[8215,1," ̳"],[[8216,8227],2],[[8228,8230],3],[8231,2],[[8232,8238],3],[8239,1," "],[[8240,8242],2],[8243,1,"′′"],[8244,1,"′′′"],[8245,2],[8246,1,"‵‵"],[8247,1,"‵‵‵"],[[8248,8251],2],[8252,1,"!!"],[8253,2],[8254,1," ̅"],[[8255,8262],2],[8263,1,"??"],[8264,1,"?!"],[8265,1,"!?"],[[8266,8269],2],[[8270,8274],2],[[8275,8276],2],[[8277,8278],2],[8279,1,"′′′′"],[[8280,8286],2],[8287,1," "],[[8288,8291],7],[8292,7],[8293,3],[[8294,8297],3],[[8298,8303],7],[8304,1,"0"],[8305,1,"i"],[[8306,8307],3],[8308,1,"4"],[8309,1,"5"],[8310,1,"6"],[8311,1,"7"],[8312,1,"8"],[8313,1,"9"],[8314,1,"+"],[8315,1,"−"],[8316,1,"="],[8317,1,"("],[8318,1,")"],[8319,1,"n"],[8320,1,"0"],[8321,1,"1"],[8322,1,"2"],[8323,1,"3"],[8324,1,"4"],[8325,1,"5"],[8326,1,"6"],[8327,1,"7"],[8328,1,"8"],[8329,1,"9"],[8330,1,"+"],[8331,1,"−"],[8332,1,"="],[8333,1,"("],[8334,1,")"],[8335,3],[8336,1,"a"],[8337,1,"e"],[8338,1,"o"],[8339,1,"x"],[8340,1,"ə"],[8341,1,"h"],[8342,1,"k"],[8343,1,"l"],[8344,1,"m"],[8345,1,"n"],[8346,1,"p"],[8347,1,"s"],[8348,1,"t"],[[8349,8351],3],[[8352,8359],2],[8360,1,"rs"],[[8361,8362],2],[8363,2],[8364,2],[[8365,8367],2],[[8368,8369],2],[[8370,8373],2],[[8374,8376],2],[8377,2],[8378,2],[[8379,8381],2],[8382,2],[8383,2],[8384,2],[[8385,8399],3],[[8400,8417],2],[[8418,8419],2],[[8420,8426],2],[8427,2],[[8428,8431],2],[8432,2],[[8433,8447],3],[8448,1,"a/c"],[8449,1,"a/s"],[8450,1,"c"],[8451,1,"°c"],[8452,2],[8453,1,"c/o"],[8454,1,"c/u"],[8455,1,"ɛ"],[8456,2],[8457,1,"°f"],[8458,1,"g"],[[8459,8462],1,"h"],[8463,1,"ħ"],[[8464,8465],1,"i"],[[8466,8467],1,"l"],[8468,2],[8469,1,"n"],[8470,1,"no"],[[8471,8472],2],[8473,1,"p"],[8474,1,"q"],[[8475,8477],1,"r"],[[8478,8479],2],[8480,1,"sm"],[8481,1,"tel"],[8482,1,"tm"],[8483,2],[8484,1,"z"],[8485,2],[8486,1,"ω"],[8487,2],[8488,1,"z"],[8489,2],[8490,1,"k"],[8491,1,"å"],[8492,1,"b"],[8493,1,"c"],[8494,2],[[8495,8496],1,"e"],[8497,1,"f"],[8498,1,"ⅎ"],[8499,1,"m"],[8500,1,"o"],[8501,1,"א"],[8502,1,"ב"],[8503,1,"ג"],[8504,1,"ד"],[8505,1,"i"],[8506,2],[8507,1,"fax"],[8508,1,"π"],[[8509,8510],1,"γ"],[8511,1,"π"],[8512,1,"∑"],[[8513,8516],2],[[8517,8518],1,"d"],[8519,1,"e"],[8520,1,"i"],[8521,1,"j"],[[8522,8523],2],[8524,2],[8525,2],[8526,2],[8527,2],[8528,1,"1⁄7"],[8529,1,"1⁄9"],[8530,1,"1⁄10"],[8531,1,"1⁄3"],[8532,1,"2⁄3"],[8533,1,"1⁄5"],[8534,1,"2⁄5"],[8535,1,"3⁄5"],[8536,1,"4⁄5"],[8537,1,"1⁄6"],[8538,1,"5⁄6"],[8539,1,"1⁄8"],[8540,1,"3⁄8"],[8541,1,"5⁄8"],[8542,1,"7⁄8"],[8543,1,"1⁄"],[8544,1,"i"],[8545,1,"ii"],[8546,1,"iii"],[8547,1,"iv"],[8548,1,"v"],[8549,1,"vi"],[8550,1,"vii"],[8551,1,"viii"],[8552,1,"ix"],[8553,1,"x"],[8554,1,"xi"],[8555,1,"xii"],[8556,1,"l"],[8557,1,"c"],[8558,1,"d"],[8559,1,"m"],[8560,1,"i"],[8561,1,"ii"],[8562,1,"iii"],[8563,1,"iv"],[8564,1,"v"],[8565,1,"vi"],[8566,1,"vii"],[8567,1,"viii"],[8568,1,"ix"],[8569,1,"x"],[8570,1,"xi"],[8571,1,"xii"],[8572,1,"l"],[8573,1,"c"],[8574,1,"d"],[8575,1,"m"],[[8576,8578],2],[8579,1,"ↄ"],[8580,2],[[8581,8584],2],[8585,1,"0⁄3"],[[8586,8587],2],[[8588,8591],3],[[8592,8682],2],[[8683,8691],2],[[8692,8703],2],[[8704,8747],2],[8748,1,"∫∫"],[8749,1,"∫∫∫"],[8750,2],[8751,1,"∮∮"],[8752,1,"∮∮∮"],[[8753,8945],2],[[8946,8959],2],[8960,2],[8961,2],[[8962,9000],2],[9001,1,"〈"],[9002,1,"〉"],[[9003,9082],2],[9083,2],[9084,2],[[9085,9114],2],[[9115,9166],2],[[9167,9168],2],[[9169,9179],2],[[9180,9191],2],[9192,2],[[9193,9203],2],[[9204,9210],2],[[9211,9214],2],[9215,2],[[9216,9252],2],[[9253,9254],2],[[9255,9257],2],[[9258,9279],3],[[9280,9290],2],[[9291,9311],3],[9312,1,"1"],[9313,1,"2"],[9314,1,"3"],[9315,1,"4"],[9316,1,"5"],[9317,1,"6"],[9318,1,"7"],[9319,1,"8"],[9320,1,"9"],[9321,1,"10"],[9322,1,"11"],[9323,1,"12"],[9324,1,"13"],[9325,1,"14"],[9326,1,"15"],[9327,1,"16"],[9328,1,"17"],[9329,1,"18"],[9330,1,"19"],[9331,1,"20"],[9332,1,"(1)"],[9333,1,"(2)"],[9334,1,"(3)"],[9335,1,"(4)"],[9336,1,"(5)"],[9337,1,"(6)"],[9338,1,"(7)"],[9339,1,"(8)"],[9340,1,"(9)"],[9341,1,"(10)"],[9342,1,"(11)"],[9343,1,"(12)"],[9344,1,"(13)"],[9345,1,"(14)"],[9346,1,"(15)"],[9347,1,"(16)"],[9348,1,"(17)"],[9349,1,"(18)"],[9350,1,"(19)"],[9351,1,"(20)"],[[9352,9371],3],[9372,1,"(a)"],[9373,1,"(b)"],[9374,1,"(c)"],[9375,1,"(d)"],[9376,1,"(e)"],[9377,1,"(f)"],[9378,1,"(g)"],[9379,1,"(h)"],[9380,1,"(i)"],[9381,1,"(j)"],[9382,1,"(k)"],[9383,1,"(l)"],[9384,1,"(m)"],[9385,1,"(n)"],[9386,1,"(o)"],[9387,1,"(p)"],[9388,1,"(q)"],[9389,1,"(r)"],[9390,1,"(s)"],[9391,1,"(t)"],[9392,1,"(u)"],[9393,1,"(v)"],[9394,1,"(w)"],[9395,1,"(x)"],[9396,1,"(y)"],[9397,1,"(z)"],[9398,1,"a"],[9399,1,"b"],[9400,1,"c"],[9401,1,"d"],[9402,1,"e"],[9403,1,"f"],[9404,1,"g"],[9405,1,"h"],[9406,1,"i"],[9407,1,"j"],[9408,1,"k"],[9409,1,"l"],[9410,1,"m"],[9411,1,"n"],[9412,1,"o"],[9413,1,"p"],[9414,1,"q"],[9415,1,"r"],[9416,1,"s"],[9417,1,"t"],[9418,1,"u"],[9419,1,"v"],[9420,1,"w"],[9421,1,"x"],[9422,1,"y"],[9423,1,"z"],[9424,1,"a"],[9425,1,"b"],[9426,1,"c"],[9427,1,"d"],[9428,1,"e"],[9429,1,"f"],[9430,1,"g"],[9431,1,"h"],[9432,1,"i"],[9433,1,"j"],[9434,1,"k"],[9435,1,"l"],[9436,1,"m"],[9437,1,"n"],[9438,1,"o"],[9439,1,"p"],[9440,1,"q"],[9441,1,"r"],[9442,1,"s"],[9443,1,"t"],[9444,1,"u"],[9445,1,"v"],[9446,1,"w"],[9447,1,"x"],[9448,1,"y"],[9449,1,"z"],[9450,1,"0"],[[9451,9470],2],[9471,2],[[9472,9621],2],[[9622,9631],2],[[9632,9711],2],[[9712,9719],2],[[9720,9727],2],[[9728,9747],2],[[9748,9749],2],[[9750,9751],2],[9752,2],[9753,2],[[9754,9839],2],[[9840,9841],2],[[9842,9853],2],[[9854,9855],2],[[9856,9865],2],[[9866,9873],2],[[9874,9884],2],[9885,2],[[9886,9887],2],[[9888,9889],2],[[9890,9905],2],[9906,2],[[9907,9916],2],[[9917,9919],2],[[9920,9923],2],[[9924,9933],2],[9934,2],[[9935,9953],2],[9954,2],[9955,2],[[9956,9959],2],[[9960,9983],2],[9984,2],[[9985,9988],2],[9989,2],[[9990,9993],2],[[9994,9995],2],[[9996,10023],2],[10024,2],[[10025,10059],2],[10060,2],[10061,2],[10062,2],[[10063,10066],2],[[10067,10069],2],[10070,2],[10071,2],[[10072,10078],2],[[10079,10080],2],[[10081,10087],2],[[10088,10101],2],[[10102,10132],2],[[10133,10135],2],[[10136,10159],2],[10160,2],[[10161,10174],2],[10175,2],[[10176,10182],2],[[10183,10186],2],[10187,2],[10188,2],[10189,2],[[10190,10191],2],[[10192,10219],2],[[10220,10223],2],[[10224,10239],2],[[10240,10495],2],[[10496,10763],2],[10764,1,"∫∫∫∫"],[[10765,10867],2],[10868,1,"::="],[10869,1,"=="],[10870,1,"==="],[[10871,10971],2],[10972,1,"⫝̸"],[[10973,11007],2],[[11008,11021],2],[[11022,11027],2],[[11028,11034],2],[[11035,11039],2],[[11040,11043],2],[[11044,11084],2],[[11085,11087],2],[[11088,11092],2],[[11093,11097],2],[[11098,11123],2],[[11124,11125],3],[[11126,11157],2],[11158,3],[11159,2],[[11160,11193],2],[[11194,11196],2],[[11197,11208],2],[11209,2],[[11210,11217],2],[11218,2],[[11219,11243],2],[[11244,11247],2],[[11248,11262],2],[11263,2],[11264,1,"ⰰ"],[11265,1,"ⰱ"],[11266,1,"ⰲ"],[11267,1,"ⰳ"],[11268,1,"ⰴ"],[11269,1,"ⰵ"],[11270,1,"ⰶ"],[11271,1,"ⰷ"],[11272,1,"ⰸ"],[11273,1,"ⰹ"],[11274,1,"ⰺ"],[11275,1,"ⰻ"],[11276,1,"ⰼ"],[11277,1,"ⰽ"],[11278,1,"ⰾ"],[11279,1,"ⰿ"],[11280,1,"ⱀ"],[11281,1,"ⱁ"],[11282,1,"ⱂ"],[11283,1,"ⱃ"],[11284,1,"ⱄ"],[11285,1,"ⱅ"],[11286,1,"ⱆ"],[11287,1,"ⱇ"],[11288,1,"ⱈ"],[11289,1,"ⱉ"],[11290,1,"ⱊ"],[11291,1,"ⱋ"],[11292,1,"ⱌ"],[11293,1,"ⱍ"],[11294,1,"ⱎ"],[11295,1,"ⱏ"],[11296,1,"ⱐ"],[11297,1,"ⱑ"],[11298,1,"ⱒ"],[11299,1,"ⱓ"],[11300,1,"ⱔ"],[11301,1,"ⱕ"],[11302,1,"ⱖ"],[11303,1,"ⱗ"],[11304,1,"ⱘ"],[11305,1,"ⱙ"],[11306,1,"ⱚ"],[11307,1,"ⱛ"],[11308,1,"ⱜ"],[11309,1,"ⱝ"],[11310,1,"ⱞ"],[11311,1,"ⱟ"],[[11312,11358],2],[11359,2],[11360,1,"ⱡ"],[11361,2],[11362,1,"ɫ"],[11363,1,"ᵽ"],[11364,1,"ɽ"],[[11365,11366],2],[11367,1,"ⱨ"],[11368,2],[11369,1,"ⱪ"],[11370,2],[11371,1,"ⱬ"],[11372,2],[11373,1,"ɑ"],[11374,1,"ɱ"],[11375,1,"ɐ"],[11376,1,"ɒ"],[11377,2],[11378,1,"ⱳ"],[11379,2],[11380,2],[11381,1,"ⱶ"],[[11382,11383],2],[[11384,11387],2],[11388,1,"j"],[11389,1,"v"],[11390,1,"ȿ"],[11391,1,"ɀ"],[11392,1,"ⲁ"],[11393,2],[11394,1,"ⲃ"],[11395,2],[11396,1,"ⲅ"],[11397,2],[11398,1,"ⲇ"],[11399,2],[11400,1,"ⲉ"],[11401,2],[11402,1,"ⲋ"],[11403,2],[11404,1,"ⲍ"],[11405,2],[11406,1,"ⲏ"],[11407,2],[11408,1,"ⲑ"],[11409,2],[11410,1,"ⲓ"],[11411,2],[11412,1,"ⲕ"],[11413,2],[11414,1,"ⲗ"],[11415,2],[11416,1,"ⲙ"],[11417,2],[11418,1,"ⲛ"],[11419,2],[11420,1,"ⲝ"],[11421,2],[11422,1,"ⲟ"],[11423,2],[11424,1,"ⲡ"],[11425,2],[11426,1,"ⲣ"],[11427,2],[11428,1,"ⲥ"],[11429,2],[11430,1,"ⲧ"],[11431,2],[11432,1,"ⲩ"],[11433,2],[11434,1,"ⲫ"],[11435,2],[11436,1,"ⲭ"],[11437,2],[11438,1,"ⲯ"],[11439,2],[11440,1,"ⲱ"],[11441,2],[11442,1,"ⲳ"],[11443,2],[11444,1,"ⲵ"],[11445,2],[11446,1,"ⲷ"],[11447,2],[11448,1,"ⲹ"],[11449,2],[11450,1,"ⲻ"],[11451,2],[11452,1,"ⲽ"],[11453,2],[11454,1,"ⲿ"],[11455,2],[11456,1,"ⳁ"],[11457,2],[11458,1,"ⳃ"],[11459,2],[11460,1,"ⳅ"],[11461,2],[11462,1,"ⳇ"],[11463,2],[11464,1,"ⳉ"],[11465,2],[11466,1,"ⳋ"],[11467,2],[11468,1,"ⳍ"],[11469,2],[11470,1,"ⳏ"],[11471,2],[11472,1,"ⳑ"],[11473,2],[11474,1,"ⳓ"],[11475,2],[11476,1,"ⳕ"],[11477,2],[11478,1,"ⳗ"],[11479,2],[11480,1,"ⳙ"],[11481,2],[11482,1,"ⳛ"],[11483,2],[11484,1,"ⳝ"],[11485,2],[11486,1,"ⳟ"],[11487,2],[11488,1,"ⳡ"],[11489,2],[11490,1,"ⳣ"],[[11491,11492],2],[[11493,11498],2],[11499,1,"ⳬ"],[11500,2],[11501,1,"ⳮ"],[[11502,11505],2],[11506,1,"ⳳ"],[11507,2],[[11508,11512],3],[[11513,11519],2],[[11520,11557],2],[11558,3],[11559,2],[[11560,11564],3],[11565,2],[[11566,11567],3],[[11568,11621],2],[[11622,11623],2],[[11624,11630],3],[11631,1,"ⵡ"],[11632,2],[[11633,11646],3],[11647,2],[[11648,11670],2],[[11671,11679],3],[[11680,11686],2],[11687,3],[[11688,11694],2],[11695,3],[[11696,11702],2],[11703,3],[[11704,11710],2],[11711,3],[[11712,11718],2],[11719,3],[[11720,11726],2],[11727,3],[[11728,11734],2],[11735,3],[[11736,11742],2],[11743,3],[[11744,11775],2],[[11776,11799],2],[[11800,11803],2],[[11804,11805],2],[[11806,11822],2],[11823,2],[11824,2],[11825,2],[[11826,11835],2],[[11836,11842],2],[[11843,11844],2],[[11845,11849],2],[[11850,11854],2],[11855,2],[[11856,11858],2],[[11859,11869],2],[[11870,11903],3],[[11904,11929],2],[11930,3],[[11931,11934],2],[11935,1,"母"],[[11936,12018],2],[12019,1,"龟"],[[12020,12031],3],[12032,1,"一"],[12033,1,"丨"],[12034,1,"丶"],[12035,1,"丿"],[12036,1,"乙"],[12037,1,"亅"],[12038,1,"二"],[12039,1,"亠"],[12040,1,"人"],[12041,1,"儿"],[12042,1,"入"],[12043,1,"八"],[12044,1,"冂"],[12045,1,"冖"],[12046,1,"冫"],[12047,1,"几"],[12048,1,"凵"],[12049,1,"刀"],[12050,1,"力"],[12051,1,"勹"],[12052,1,"匕"],[12053,1,"匚"],[12054,1,"匸"],[12055,1,"十"],[12056,1,"卜"],[12057,1,"卩"],[12058,1,"厂"],[12059,1,"厶"],[12060,1,"又"],[12061,1,"口"],[12062,1,"囗"],[12063,1,"土"],[12064,1,"士"],[12065,1,"夂"],[12066,1,"夊"],[12067,1,"夕"],[12068,1,"大"],[12069,1,"女"],[12070,1,"子"],[12071,1,"宀"],[12072,1,"寸"],[12073,1,"小"],[12074,1,"尢"],[12075,1,"尸"],[12076,1,"屮"],[12077,1,"山"],[12078,1,"巛"],[12079,1,"工"],[12080,1,"己"],[12081,1,"巾"],[12082,1,"干"],[12083,1,"幺"],[12084,1,"广"],[12085,1,"廴"],[12086,1,"廾"],[12087,1,"弋"],[12088,1,"弓"],[12089,1,"彐"],[12090,1,"彡"],[12091,1,"彳"],[12092,1,"心"],[12093,1,"戈"],[12094,1,"戶"],[12095,1,"手"],[12096,1,"支"],[12097,1,"攴"],[12098,1,"文"],[12099,1,"斗"],[12100,1,"斤"],[12101,1,"方"],[12102,1,"无"],[12103,1,"日"],[12104,1,"曰"],[12105,1,"月"],[12106,1,"木"],[12107,1,"欠"],[12108,1,"止"],[12109,1,"歹"],[12110,1,"殳"],[12111,1,"毋"],[12112,1,"比"],[12113,1,"毛"],[12114,1,"氏"],[12115,1,"气"],[12116,1,"水"],[12117,1,"火"],[12118,1,"爪"],[12119,1,"父"],[12120,1,"爻"],[12121,1,"爿"],[12122,1,"片"],[12123,1,"牙"],[12124,1,"牛"],[12125,1,"犬"],[12126,1,"玄"],[12127,1,"玉"],[12128,1,"瓜"],[12129,1,"瓦"],[12130,1,"甘"],[12131,1,"生"],[12132,1,"用"],[12133,1,"田"],[12134,1,"疋"],[12135,1,"疒"],[12136,1,"癶"],[12137,1,"白"],[12138,1,"皮"],[12139,1,"皿"],[12140,1,"目"],[12141,1,"矛"],[12142,1,"矢"],[12143,1,"石"],[12144,1,"示"],[12145,1,"禸"],[12146,1,"禾"],[12147,1,"穴"],[12148,1,"立"],[12149,1,"竹"],[12150,1,"米"],[12151,1,"糸"],[12152,1,"缶"],[12153,1,"网"],[12154,1,"羊"],[12155,1,"羽"],[12156,1,"老"],[12157,1,"而"],[12158,1,"耒"],[12159,1,"耳"],[12160,1,"聿"],[12161,1,"肉"],[12162,1,"臣"],[12163,1,"自"],[12164,1,"至"],[12165,1,"臼"],[12166,1,"舌"],[12167,1,"舛"],[12168,1,"舟"],[12169,1,"艮"],[12170,1,"色"],[12171,1,"艸"],[12172,1,"虍"],[12173,1,"虫"],[12174,1,"血"],[12175,1,"行"],[12176,1,"衣"],[12177,1,"襾"],[12178,1,"見"],[12179,1,"角"],[12180,1,"言"],[12181,1,"谷"],[12182,1,"豆"],[12183,1,"豕"],[12184,1,"豸"],[12185,1,"貝"],[12186,1,"赤"],[12187,1,"走"],[12188,1,"足"],[12189,1,"身"],[12190,1,"車"],[12191,1,"辛"],[12192,1,"辰"],[12193,1,"辵"],[12194,1,"邑"],[12195,1,"酉"],[12196,1,"釆"],[12197,1,"里"],[12198,1,"金"],[12199,1,"長"],[12200,1,"門"],[12201,1,"阜"],[12202,1,"隶"],[12203,1,"隹"],[12204,1,"雨"],[12205,1,"靑"],[12206,1,"非"],[12207,1,"面"],[12208,1,"革"],[12209,1,"韋"],[12210,1,"韭"],[12211,1,"音"],[12212,1,"頁"],[12213,1,"風"],[12214,1,"飛"],[12215,1,"食"],[12216,1,"首"],[12217,1,"香"],[12218,1,"馬"],[12219,1,"骨"],[12220,1,"高"],[12221,1,"髟"],[12222,1,"鬥"],[12223,1,"鬯"],[12224,1,"鬲"],[12225,1,"鬼"],[12226,1,"魚"],[12227,1,"鳥"],[12228,1,"鹵"],[12229,1,"鹿"],[12230,1,"麥"],[12231,1,"麻"],[12232,1,"黃"],[12233,1,"黍"],[12234,1,"黑"],[12235,1,"黹"],[12236,1,"黽"],[12237,1,"鼎"],[12238,1,"鼓"],[12239,1,"鼠"],[12240,1,"鼻"],[12241,1,"齊"],[12242,1,"齒"],[12243,1,"龍"],[12244,1,"龜"],[12245,1,"龠"],[[12246,12271],3],[[12272,12283],3],[[12284,12287],3],[12288,1," "],[12289,2],[12290,1,"."],[[12291,12292],2],[[12293,12295],2],[[12296,12329],2],[[12330,12333],2],[[12334,12341],2],[12342,1,"〒"],[12343,2],[12344,1,"十"],[12345,1,"卄"],[12346,1,"卅"],[12347,2],[12348,2],[12349,2],[12350,2],[12351,2],[12352,3],[[12353,12436],2],[[12437,12438],2],[[12439,12440],3],[[12441,12442],2],[12443,1," ゙"],[12444,1," ゚"],[[12445,12446],2],[12447,1,"より"],[12448,2],[[12449,12542],2],[12543,1,"コト"],[[12544,12548],3],[[12549,12588],2],[12589,2],[12590,2],[12591,2],[12592,3],[12593,1,"ᄀ"],[12594,1,"ᄁ"],[12595,1,"ᆪ"],[12596,1,"ᄂ"],[12597,1,"ᆬ"],[12598,1,"ᆭ"],[12599,1,"ᄃ"],[12600,1,"ᄄ"],[12601,1,"ᄅ"],[12602,1,"ᆰ"],[12603,1,"ᆱ"],[12604,1,"ᆲ"],[12605,1,"ᆳ"],[12606,1,"ᆴ"],[12607,1,"ᆵ"],[12608,1,"ᄚ"],[12609,1,"ᄆ"],[12610,1,"ᄇ"],[12611,1,"ᄈ"],[12612,1,"ᄡ"],[12613,1,"ᄉ"],[12614,1,"ᄊ"],[12615,1,"ᄋ"],[12616,1,"ᄌ"],[12617,1,"ᄍ"],[12618,1,"ᄎ"],[12619,1,"ᄏ"],[12620,1,"ᄐ"],[12621,1,"ᄑ"],[12622,1,"ᄒ"],[12623,1,"ᅡ"],[12624,1,"ᅢ"],[12625,1,"ᅣ"],[12626,1,"ᅤ"],[12627,1,"ᅥ"],[12628,1,"ᅦ"],[12629,1,"ᅧ"],[12630,1,"ᅨ"],[12631,1,"ᅩ"],[12632,1,"ᅪ"],[12633,1,"ᅫ"],[12634,1,"ᅬ"],[12635,1,"ᅭ"],[12636,1,"ᅮ"],[12637,1,"ᅯ"],[12638,1,"ᅰ"],[12639,1,"ᅱ"],[12640,1,"ᅲ"],[12641,1,"ᅳ"],[12642,1,"ᅴ"],[12643,1,"ᅵ"],[12644,7],[12645,1,"ᄔ"],[12646,1,"ᄕ"],[12647,1,"ᇇ"],[12648,1,"ᇈ"],[12649,1,"ᇌ"],[12650,1,"ᇎ"],[12651,1,"ᇓ"],[12652,1,"ᇗ"],[12653,1,"ᇙ"],[12654,1,"ᄜ"],[12655,1,"ᇝ"],[12656,1,"ᇟ"],[12657,1,"ᄝ"],[12658,1,"ᄞ"],[12659,1,"ᄠ"],[12660,1,"ᄢ"],[12661,1,"ᄣ"],[12662,1,"ᄧ"],[12663,1,"ᄩ"],[12664,1,"ᄫ"],[12665,1,"ᄬ"],[12666,1,"ᄭ"],[12667,1,"ᄮ"],[12668,1,"ᄯ"],[12669,1,"ᄲ"],[12670,1,"ᄶ"],[12671,1,"ᅀ"],[12672,1,"ᅇ"],[12673,1,"ᅌ"],[12674,1,"ᇱ"],[12675,1,"ᇲ"],[12676,1,"ᅗ"],[12677,1,"ᅘ"],[12678,1,"ᅙ"],[12679,1,"ᆄ"],[12680,1,"ᆅ"],[12681,1,"ᆈ"],[12682,1,"ᆑ"],[12683,1,"ᆒ"],[12684,1,"ᆔ"],[12685,1,"ᆞ"],[12686,1,"ᆡ"],[12687,3],[[12688,12689],2],[12690,1,"一"],[12691,1,"二"],[12692,1,"三"],[12693,1,"四"],[12694,1,"上"],[12695,1,"中"],[12696,1,"下"],[12697,1,"甲"],[12698,1,"乙"],[12699,1,"丙"],[12700,1,"丁"],[12701,1,"天"],[12702,1,"地"],[12703,1,"人"],[[12704,12727],2],[[12728,12730],2],[[12731,12735],2],[[12736,12751],2],[[12752,12771],2],[[12772,12773],2],[[12774,12782],3],[12783,3],[[12784,12799],2],[12800,1,"(ᄀ)"],[12801,1,"(ᄂ)"],[12802,1,"(ᄃ)"],[12803,1,"(ᄅ)"],[12804,1,"(ᄆ)"],[12805,1,"(ᄇ)"],[12806,1,"(ᄉ)"],[12807,1,"(ᄋ)"],[12808,1,"(ᄌ)"],[12809,1,"(ᄎ)"],[12810,1,"(ᄏ)"],[12811,1,"(ᄐ)"],[12812,1,"(ᄑ)"],[12813,1,"(ᄒ)"],[12814,1,"(가)"],[12815,1,"(나)"],[12816,1,"(다)"],[12817,1,"(라)"],[12818,1,"(마)"],[12819,1,"(바)"],[12820,1,"(사)"],[12821,1,"(아)"],[12822,1,"(자)"],[12823,1,"(차)"],[12824,1,"(카)"],[12825,1,"(타)"],[12826,1,"(파)"],[12827,1,"(하)"],[12828,1,"(주)"],[12829,1,"(오전)"],[12830,1,"(오후)"],[12831,3],[12832,1,"(一)"],[12833,1,"(二)"],[12834,1,"(三)"],[12835,1,"(四)"],[12836,1,"(五)"],[12837,1,"(六)"],[12838,1,"(七)"],[12839,1,"(八)"],[12840,1,"(九)"],[12841,1,"(十)"],[12842,1,"(月)"],[12843,1,"(火)"],[12844,1,"(水)"],[12845,1,"(木)"],[12846,1,"(金)"],[12847,1,"(土)"],[12848,1,"(日)"],[12849,1,"(株)"],[12850,1,"(有)"],[12851,1,"(社)"],[12852,1,"(名)"],[12853,1,"(特)"],[12854,1,"(財)"],[12855,1,"(祝)"],[12856,1,"(労)"],[12857,1,"(代)"],[12858,1,"(呼)"],[12859,1,"(学)"],[12860,1,"(監)"],[12861,1,"(企)"],[12862,1,"(資)"],[12863,1,"(協)"],[12864,1,"(祭)"],[12865,1,"(休)"],[12866,1,"(自)"],[12867,1,"(至)"],[12868,1,"問"],[12869,1,"幼"],[12870,1,"文"],[12871,1,"箏"],[[12872,12879],2],[12880,1,"pte"],[12881,1,"21"],[12882,1,"22"],[12883,1,"23"],[12884,1,"24"],[12885,1,"25"],[12886,1,"26"],[12887,1,"27"],[12888,1,"28"],[12889,1,"29"],[12890,1,"30"],[12891,1,"31"],[12892,1,"32"],[12893,1,"33"],[12894,1,"34"],[12895,1,"35"],[12896,1,"ᄀ"],[12897,1,"ᄂ"],[12898,1,"ᄃ"],[12899,1,"ᄅ"],[12900,1,"ᄆ"],[12901,1,"ᄇ"],[12902,1,"ᄉ"],[12903,1,"ᄋ"],[12904,1,"ᄌ"],[12905,1,"ᄎ"],[12906,1,"ᄏ"],[12907,1,"ᄐ"],[12908,1,"ᄑ"],[12909,1,"ᄒ"],[12910,1,"가"],[12911,1,"나"],[12912,1,"다"],[12913,1,"라"],[12914,1,"마"],[12915,1,"바"],[12916,1,"사"],[12917,1,"아"],[12918,1,"자"],[12919,1,"차"],[12920,1,"카"],[12921,1,"타"],[12922,1,"파"],[12923,1,"하"],[12924,1,"참고"],[12925,1,"주의"],[12926,1,"우"],[12927,2],[12928,1,"一"],[12929,1,"二"],[12930,1,"三"],[12931,1,"四"],[12932,1,"五"],[12933,1,"六"],[12934,1,"七"],[12935,1,"八"],[12936,1,"九"],[12937,1,"十"],[12938,1,"月"],[12939,1,"火"],[12940,1,"水"],[12941,1,"木"],[12942,1,"金"],[12943,1,"土"],[12944,1,"日"],[12945,1,"株"],[12946,1,"有"],[12947,1,"社"],[12948,1,"名"],[12949,1,"特"],[12950,1,"財"],[12951,1,"祝"],[12952,1,"労"],[12953,1,"秘"],[12954,1,"男"],[12955,1,"女"],[12956,1,"適"],[12957,1,"優"],[12958,1,"印"],[12959,1,"注"],[12960,1,"項"],[12961,1,"休"],[12962,1,"写"],[12963,1,"正"],[12964,1,"上"],[12965,1,"中"],[12966,1,"下"],[12967,1,"左"],[12968,1,"右"],[12969,1,"医"],[12970,1,"宗"],[12971,1,"学"],[12972,1,"監"],[12973,1,"企"],[12974,1,"資"],[12975,1,"協"],[12976,1,"夜"],[12977,1,"36"],[12978,1,"37"],[12979,1,"38"],[12980,1,"39"],[12981,1,"40"],[12982,1,"41"],[12983,1,"42"],[12984,1,"43"],[12985,1,"44"],[12986,1,"45"],[12987,1,"46"],[12988,1,"47"],[12989,1,"48"],[12990,1,"49"],[12991,1,"50"],[12992,1,"1月"],[12993,1,"2月"],[12994,1,"3月"],[12995,1,"4月"],[12996,1,"5月"],[12997,1,"6月"],[12998,1,"7月"],[12999,1,"8月"],[13000,1,"9月"],[13001,1,"10月"],[13002,1,"11月"],[13003,1,"12月"],[13004,1,"hg"],[13005,1,"erg"],[13006,1,"ev"],[13007,1,"ltd"],[13008,1,"ア"],[13009,1,"イ"],[13010,1,"ウ"],[13011,1,"エ"],[13012,1,"オ"],[13013,1,"カ"],[13014,1,"キ"],[13015,1,"ク"],[13016,1,"ケ"],[13017,1,"コ"],[13018,1,"サ"],[13019,1,"シ"],[13020,1,"ス"],[13021,1,"セ"],[13022,1,"ソ"],[13023,1,"タ"],[13024,1,"チ"],[13025,1,"ツ"],[13026,1,"テ"],[13027,1,"ト"],[13028,1,"ナ"],[13029,1,"ニ"],[13030,1,"ヌ"],[13031,1,"ネ"],[13032,1,"ノ"],[13033,1,"ハ"],[13034,1,"ヒ"],[13035,1,"フ"],[13036,1,"ヘ"],[13037,1,"ホ"],[13038,1,"マ"],[13039,1,"ミ"],[13040,1,"ム"],[13041,1,"メ"],[13042,1,"モ"],[13043,1,"ヤ"],[13044,1,"ユ"],[13045,1,"ヨ"],[13046,1,"ラ"],[13047,1,"リ"],[13048,1,"ル"],[13049,1,"レ"],[13050,1,"ロ"],[13051,1,"ワ"],[13052,1,"ヰ"],[13053,1,"ヱ"],[13054,1,"ヲ"],[13055,1,"令和"],[13056,1,"アパート"],[13057,1,"アルファ"],[13058,1,"アンペア"],[13059,1,"アール"],[13060,1,"イニング"],[13061,1,"インチ"],[13062,1,"ウォン"],[13063,1,"エスクード"],[13064,1,"エーカー"],[13065,1,"オンス"],[13066,1,"オーム"],[13067,1,"カイリ"],[13068,1,"カラット"],[13069,1,"カロリー"],[13070,1,"ガロン"],[13071,1,"ガンマ"],[13072,1,"ギガ"],[13073,1,"ギニー"],[13074,1,"キュリー"],[13075,1,"ギルダー"],[13076,1,"キロ"],[13077,1,"キログラム"],[13078,1,"キロメートル"],[13079,1,"キロワット"],[13080,1,"グラム"],[13081,1,"グラムトン"],[13082,1,"クルゼイロ"],[13083,1,"クローネ"],[13084,1,"ケース"],[13085,1,"コルナ"],[13086,1,"コーポ"],[13087,1,"サイクル"],[13088,1,"サンチーム"],[13089,1,"シリング"],[13090,1,"センチ"],[13091,1,"セント"],[13092,1,"ダース"],[13093,1,"デシ"],[13094,1,"ドル"],[13095,1,"トン"],[13096,1,"ナノ"],[13097,1,"ノット"],[13098,1,"ハイツ"],[13099,1,"パーセント"],[13100,1,"パーツ"],[13101,1,"バーレル"],[13102,1,"ピアストル"],[13103,1,"ピクル"],[13104,1,"ピコ"],[13105,1,"ビル"],[13106,1,"ファラッド"],[13107,1,"フィート"],[13108,1,"ブッシェル"],[13109,1,"フラン"],[13110,1,"ヘクタール"],[13111,1,"ペソ"],[13112,1,"ペニヒ"],[13113,1,"ヘルツ"],[13114,1,"ペンス"],[13115,1,"ページ"],[13116,1,"ベータ"],[13117,1,"ポイント"],[13118,1,"ボルト"],[13119,1,"ホン"],[13120,1,"ポンド"],[13121,1,"ホール"],[13122,1,"ホーン"],[13123,1,"マイクロ"],[13124,1,"マイル"],[13125,1,"マッハ"],[13126,1,"マルク"],[13127,1,"マンション"],[13128,1,"ミクロン"],[13129,1,"ミリ"],[13130,1,"ミリバール"],[13131,1,"メガ"],[13132,1,"メガトン"],[13133,1,"メートル"],[13134,1,"ヤード"],[13135,1,"ヤール"],[13136,1,"ユアン"],[13137,1,"リットル"],[13138,1,"リラ"],[13139,1,"ルピー"],[13140,1,"ルーブル"],[13141,1,"レム"],[13142,1,"レントゲン"],[13143,1,"ワット"],[13144,1,"0点"],[13145,1,"1点"],[13146,1,"2点"],[13147,1,"3点"],[13148,1,"4点"],[13149,1,"5点"],[13150,1,"6点"],[13151,1,"7点"],[13152,1,"8点"],[13153,1,"9点"],[13154,1,"10点"],[13155,1,"11点"],[13156,1,"12点"],[13157,1,"13点"],[13158,1,"14点"],[13159,1,"15点"],[13160,1,"16点"],[13161,1,"17点"],[13162,1,"18点"],[13163,1,"19点"],[13164,1,"20点"],[13165,1,"21点"],[13166,1,"22点"],[13167,1,"23点"],[13168,1,"24点"],[13169,1,"hpa"],[13170,1,"da"],[13171,1,"au"],[13172,1,"bar"],[13173,1,"ov"],[13174,1,"pc"],[13175,1,"dm"],[13176,1,"dm2"],[13177,1,"dm3"],[13178,1,"iu"],[13179,1,"平成"],[13180,1,"昭和"],[13181,1,"大正"],[13182,1,"明治"],[13183,1,"株式会社"],[13184,1,"pa"],[13185,1,"na"],[13186,1,"μa"],[13187,1,"ma"],[13188,1,"ka"],[13189,1,"kb"],[13190,1,"mb"],[13191,1,"gb"],[13192,1,"cal"],[13193,1,"kcal"],[13194,1,"pf"],[13195,1,"nf"],[13196,1,"μf"],[13197,1,"μg"],[13198,1,"mg"],[13199,1,"kg"],[13200,1,"hz"],[13201,1,"khz"],[13202,1,"mhz"],[13203,1,"ghz"],[13204,1,"thz"],[13205,1,"μl"],[13206,1,"ml"],[13207,1,"dl"],[13208,1,"kl"],[13209,1,"fm"],[13210,1,"nm"],[13211,1,"μm"],[13212,1,"mm"],[13213,1,"cm"],[13214,1,"km"],[13215,1,"mm2"],[13216,1,"cm2"],[13217,1,"m2"],[13218,1,"km2"],[13219,1,"mm3"],[13220,1,"cm3"],[13221,1,"m3"],[13222,1,"km3"],[13223,1,"m∕s"],[13224,1,"m∕s2"],[13225,1,"pa"],[13226,1,"kpa"],[13227,1,"mpa"],[13228,1,"gpa"],[13229,1,"rad"],[13230,1,"rad∕s"],[13231,1,"rad∕s2"],[13232,1,"ps"],[13233,1,"ns"],[13234,1,"μs"],[13235,1,"ms"],[13236,1,"pv"],[13237,1,"nv"],[13238,1,"μv"],[13239,1,"mv"],[13240,1,"kv"],[13241,1,"mv"],[13242,1,"pw"],[13243,1,"nw"],[13244,1,"μw"],[13245,1,"mw"],[13246,1,"kw"],[13247,1,"mw"],[13248,1,"kω"],[13249,1,"mω"],[13250,3],[13251,1,"bq"],[13252,1,"cc"],[13253,1,"cd"],[13254,1,"c∕kg"],[13255,3],[13256,1,"db"],[13257,1,"gy"],[13258,1,"ha"],[13259,1,"hp"],[13260,1,"in"],[13261,1,"kk"],[13262,1,"km"],[13263,1,"kt"],[13264,1,"lm"],[13265,1,"ln"],[13266,1,"log"],[13267,1,"lx"],[13268,1,"mb"],[13269,1,"mil"],[13270,1,"mol"],[13271,1,"ph"],[13272,3],[13273,1,"ppm"],[13274,1,"pr"],[13275,1,"sr"],[13276,1,"sv"],[13277,1,"wb"],[13278,1,"v∕m"],[13279,1,"a∕m"],[13280,1,"1日"],[13281,1,"2日"],[13282,1,"3日"],[13283,1,"4日"],[13284,1,"5日"],[13285,1,"6日"],[13286,1,"7日"],[13287,1,"8日"],[13288,1,"9日"],[13289,1,"10日"],[13290,1,"11日"],[13291,1,"12日"],[13292,1,"13日"],[13293,1,"14日"],[13294,1,"15日"],[13295,1,"16日"],[13296,1,"17日"],[13297,1,"18日"],[13298,1,"19日"],[13299,1,"20日"],[13300,1,"21日"],[13301,1,"22日"],[13302,1,"23日"],[13303,1,"24日"],[13304,1,"25日"],[13305,1,"26日"],[13306,1,"27日"],[13307,1,"28日"],[13308,1,"29日"],[13309,1,"30日"],[13310,1,"31日"],[13311,1,"gal"],[[13312,19893],2],[[19894,19903],2],[[19904,19967],2],[[19968,40869],2],[[40870,40891],2],[[40892,40899],2],[[40900,40907],2],[40908,2],[[40909,40917],2],[[40918,40938],2],[[40939,40943],2],[[40944,40956],2],[[40957,40959],2],[[40960,42124],2],[[42125,42127],3],[[42128,42145],2],[[42146,42147],2],[[42148,42163],2],[42164,2],[[42165,42176],2],[42177,2],[[42178,42180],2],[42181,2],[42182,2],[[42183,42191],3],[[42192,42237],2],[[42238,42239],2],[[42240,42508],2],[[42509,42511],2],[[42512,42539],2],[[42540,42559],3],[42560,1,"ꙁ"],[42561,2],[42562,1,"ꙃ"],[42563,2],[42564,1,"ꙅ"],[42565,2],[42566,1,"ꙇ"],[42567,2],[42568,1,"ꙉ"],[42569,2],[42570,1,"ꙋ"],[42571,2],[42572,1,"ꙍ"],[42573,2],[42574,1,"ꙏ"],[42575,2],[42576,1,"ꙑ"],[42577,2],[42578,1,"ꙓ"],[42579,2],[42580,1,"ꙕ"],[42581,2],[42582,1,"ꙗ"],[42583,2],[42584,1,"ꙙ"],[42585,2],[42586,1,"ꙛ"],[42587,2],[42588,1,"ꙝ"],[42589,2],[42590,1,"ꙟ"],[42591,2],[42592,1,"ꙡ"],[42593,2],[42594,1,"ꙣ"],[42595,2],[42596,1,"ꙥ"],[42597,2],[42598,1,"ꙧ"],[42599,2],[42600,1,"ꙩ"],[42601,2],[42602,1,"ꙫ"],[42603,2],[42604,1,"ꙭ"],[[42605,42607],2],[[42608,42611],2],[[42612,42619],2],[[42620,42621],2],[42622,2],[42623,2],[42624,1,"ꚁ"],[42625,2],[42626,1,"ꚃ"],[42627,2],[42628,1,"ꚅ"],[42629,2],[42630,1,"ꚇ"],[42631,2],[42632,1,"ꚉ"],[42633,2],[42634,1,"ꚋ"],[42635,2],[42636,1,"ꚍ"],[42637,2],[42638,1,"ꚏ"],[42639,2],[42640,1,"ꚑ"],[42641,2],[42642,1,"ꚓ"],[42643,2],[42644,1,"ꚕ"],[42645,2],[42646,1,"ꚗ"],[42647,2],[42648,1,"ꚙ"],[42649,2],[42650,1,"ꚛ"],[42651,2],[42652,1,"ъ"],[42653,1,"ь"],[42654,2],[42655,2],[[42656,42725],2],[[42726,42735],2],[[42736,42737],2],[[42738,42743],2],[[42744,42751],3],[[42752,42774],2],[[42775,42778],2],[[42779,42783],2],[[42784,42785],2],[42786,1,"ꜣ"],[42787,2],[42788,1,"ꜥ"],[42789,2],[42790,1,"ꜧ"],[42791,2],[42792,1,"ꜩ"],[42793,2],[42794,1,"ꜫ"],[42795,2],[42796,1,"ꜭ"],[42797,2],[42798,1,"ꜯ"],[[42799,42801],2],[42802,1,"ꜳ"],[42803,2],[42804,1,"ꜵ"],[42805,2],[42806,1,"ꜷ"],[42807,2],[42808,1,"ꜹ"],[42809,2],[42810,1,"ꜻ"],[42811,2],[42812,1,"ꜽ"],[42813,2],[42814,1,"ꜿ"],[42815,2],[42816,1,"ꝁ"],[42817,2],[42818,1,"ꝃ"],[42819,2],[42820,1,"ꝅ"],[42821,2],[42822,1,"ꝇ"],[42823,2],[42824,1,"ꝉ"],[42825,2],[42826,1,"ꝋ"],[42827,2],[42828,1,"ꝍ"],[42829,2],[42830,1,"ꝏ"],[42831,2],[42832,1,"ꝑ"],[42833,2],[42834,1,"ꝓ"],[42835,2],[42836,1,"ꝕ"],[42837,2],[42838,1,"ꝗ"],[42839,2],[42840,1,"ꝙ"],[42841,2],[42842,1,"ꝛ"],[42843,2],[42844,1,"ꝝ"],[42845,2],[42846,1,"ꝟ"],[42847,2],[42848,1,"ꝡ"],[42849,2],[42850,1,"ꝣ"],[42851,2],[42852,1,"ꝥ"],[42853,2],[42854,1,"ꝧ"],[42855,2],[42856,1,"ꝩ"],[42857,2],[42858,1,"ꝫ"],[42859,2],[42860,1,"ꝭ"],[42861,2],[42862,1,"ꝯ"],[42863,2],[42864,1,"ꝯ"],[[42865,42872],2],[42873,1,"ꝺ"],[42874,2],[42875,1,"ꝼ"],[42876,2],[42877,1,"ᵹ"],[42878,1,"ꝿ"],[42879,2],[42880,1,"ꞁ"],[42881,2],[42882,1,"ꞃ"],[42883,2],[42884,1,"ꞅ"],[42885,2],[42886,1,"ꞇ"],[[42887,42888],2],[[42889,42890],2],[42891,1,"ꞌ"],[42892,2],[42893,1,"ɥ"],[42894,2],[42895,2],[42896,1,"ꞑ"],[42897,2],[42898,1,"ꞓ"],[42899,2],[[42900,42901],2],[42902,1,"ꞗ"],[42903,2],[42904,1,"ꞙ"],[42905,2],[42906,1,"ꞛ"],[42907,2],[42908,1,"ꞝ"],[42909,2],[42910,1,"ꞟ"],[42911,2],[42912,1,"ꞡ"],[42913,2],[42914,1,"ꞣ"],[42915,2],[42916,1,"ꞥ"],[42917,2],[42918,1,"ꞧ"],[42919,2],[42920,1,"ꞩ"],[42921,2],[42922,1,"ɦ"],[42923,1,"ɜ"],[42924,1,"ɡ"],[42925,1,"ɬ"],[42926,1,"ɪ"],[42927,2],[42928,1,"ʞ"],[42929,1,"ʇ"],[42930,1,"ʝ"],[42931,1,"ꭓ"],[42932,1,"ꞵ"],[42933,2],[42934,1,"ꞷ"],[42935,2],[42936,1,"ꞹ"],[42937,2],[42938,1,"ꞻ"],[42939,2],[42940,1,"ꞽ"],[42941,2],[42942,1,"ꞿ"],[42943,2],[42944,1,"ꟁ"],[42945,2],[42946,1,"ꟃ"],[42947,2],[42948,1,"ꞔ"],[42949,1,"ʂ"],[42950,1,"ᶎ"],[42951,1,"ꟈ"],[42952,2],[42953,1,"ꟊ"],[42954,2],[42955,1,"ɤ"],[42956,1,"ꟍ"],[42957,2],[[42958,42959],3],[42960,1,"ꟑ"],[42961,2],[42962,3],[42963,2],[42964,3],[42965,2],[42966,1,"ꟗ"],[42967,2],[42968,1,"ꟙ"],[42969,2],[42970,1,"ꟛ"],[42971,2],[42972,1,"ƛ"],[[42973,42993],3],[42994,1,"c"],[42995,1,"f"],[42996,1,"q"],[42997,1,"ꟶ"],[42998,2],[42999,2],[43000,1,"ħ"],[43001,1,"œ"],[43002,2],[[43003,43007],2],[[43008,43047],2],[[43048,43051],2],[43052,2],[[43053,43055],3],[[43056,43065],2],[[43066,43071],3],[[43072,43123],2],[[43124,43127],2],[[43128,43135],3],[[43136,43204],2],[43205,2],[[43206,43213],3],[[43214,43215],2],[[43216,43225],2],[[43226,43231],3],[[43232,43255],2],[[43256,43258],2],[43259,2],[43260,2],[43261,2],[[43262,43263],2],[[43264,43309],2],[[43310,43311],2],[[43312,43347],2],[[43348,43358],3],[43359,2],[[43360,43388],2],[[43389,43391],3],[[43392,43456],2],[[43457,43469],2],[43470,3],[[43471,43481],2],[[43482,43485],3],[[43486,43487],2],[[43488,43518],2],[43519,3],[[43520,43574],2],[[43575,43583],3],[[43584,43597],2],[[43598,43599],3],[[43600,43609],2],[[43610,43611],3],[[43612,43615],2],[[43616,43638],2],[[43639,43641],2],[[43642,43643],2],[[43644,43647],2],[[43648,43714],2],[[43715,43738],3],[[43739,43741],2],[[43742,43743],2],[[43744,43759],2],[[43760,43761],2],[[43762,43766],2],[[43767,43776],3],[[43777,43782],2],[[43783,43784],3],[[43785,43790],2],[[43791,43792],3],[[43793,43798],2],[[43799,43807],3],[[43808,43814],2],[43815,3],[[43816,43822],2],[43823,3],[[43824,43866],2],[43867,2],[43868,1,"ꜧ"],[43869,1,"ꬷ"],[43870,1,"ɫ"],[43871,1,"ꭒ"],[[43872,43875],2],[[43876,43877],2],[[43878,43879],2],[43880,2],[43881,1,"ʍ"],[[43882,43883],2],[[43884,43887],3],[43888,1,"Ꭰ"],[43889,1,"Ꭱ"],[43890,1,"Ꭲ"],[43891,1,"Ꭳ"],[43892,1,"Ꭴ"],[43893,1,"Ꭵ"],[43894,1,"Ꭶ"],[43895,1,"Ꭷ"],[43896,1,"Ꭸ"],[43897,1,"Ꭹ"],[43898,1,"Ꭺ"],[43899,1,"Ꭻ"],[43900,1,"Ꭼ"],[43901,1,"Ꭽ"],[43902,1,"Ꭾ"],[43903,1,"Ꭿ"],[43904,1,"Ꮀ"],[43905,1,"Ꮁ"],[43906,1,"Ꮂ"],[43907,1,"Ꮃ"],[43908,1,"Ꮄ"],[43909,1,"Ꮅ"],[43910,1,"Ꮆ"],[43911,1,"Ꮇ"],[43912,1,"Ꮈ"],[43913,1,"Ꮉ"],[43914,1,"Ꮊ"],[43915,1,"Ꮋ"],[43916,1,"Ꮌ"],[43917,1,"Ꮍ"],[43918,1,"Ꮎ"],[43919,1,"Ꮏ"],[43920,1,"Ꮐ"],[43921,1,"Ꮑ"],[43922,1,"Ꮒ"],[43923,1,"Ꮓ"],[43924,1,"Ꮔ"],[43925,1,"Ꮕ"],[43926,1,"Ꮖ"],[43927,1,"Ꮗ"],[43928,1,"Ꮘ"],[43929,1,"Ꮙ"],[43930,1,"Ꮚ"],[43931,1,"Ꮛ"],[43932,1,"Ꮜ"],[43933,1,"Ꮝ"],[43934,1,"Ꮞ"],[43935,1,"Ꮟ"],[43936,1,"Ꮠ"],[43937,1,"Ꮡ"],[43938,1,"Ꮢ"],[43939,1,"Ꮣ"],[43940,1,"Ꮤ"],[43941,1,"Ꮥ"],[43942,1,"Ꮦ"],[43943,1,"Ꮧ"],[43944,1,"Ꮨ"],[43945,1,"Ꮩ"],[43946,1,"Ꮪ"],[43947,1,"Ꮫ"],[43948,1,"Ꮬ"],[43949,1,"Ꮭ"],[43950,1,"Ꮮ"],[43951,1,"Ꮯ"],[43952,1,"Ꮰ"],[43953,1,"Ꮱ"],[43954,1,"Ꮲ"],[43955,1,"Ꮳ"],[43956,1,"Ꮴ"],[43957,1,"Ꮵ"],[43958,1,"Ꮶ"],[43959,1,"Ꮷ"],[43960,1,"Ꮸ"],[43961,1,"Ꮹ"],[43962,1,"Ꮺ"],[43963,1,"Ꮻ"],[43964,1,"Ꮼ"],[43965,1,"Ꮽ"],[43966,1,"Ꮾ"],[43967,1,"Ꮿ"],[[43968,44010],2],[44011,2],[[44012,44013],2],[[44014,44015],3],[[44016,44025],2],[[44026,44031],3],[[44032,55203],2],[[55204,55215],3],[[55216,55238],2],[[55239,55242],3],[[55243,55291],2],[[55292,55295],3],[[55296,57343],3],[[57344,63743],3],[63744,1,"豈"],[63745,1,"更"],[63746,1,"車"],[63747,1,"賈"],[63748,1,"滑"],[63749,1,"串"],[63750,1,"句"],[[63751,63752],1,"龜"],[63753,1,"契"],[63754,1,"金"],[63755,1,"喇"],[63756,1,"奈"],[63757,1,"懶"],[63758,1,"癩"],[63759,1,"羅"],[63760,1,"蘿"],[63761,1,"螺"],[63762,1,"裸"],[63763,1,"邏"],[63764,1,"樂"],[63765,1,"洛"],[63766,1,"烙"],[63767,1,"珞"],[63768,1,"落"],[63769,1,"酪"],[63770,1,"駱"],[63771,1,"亂"],[63772,1,"卵"],[63773,1,"欄"],[63774,1,"爛"],[63775,1,"蘭"],[63776,1,"鸞"],[63777,1,"嵐"],[63778,1,"濫"],[63779,1,"藍"],[63780,1,"襤"],[63781,1,"拉"],[63782,1,"臘"],[63783,1,"蠟"],[63784,1,"廊"],[63785,1,"朗"],[63786,1,"浪"],[63787,1,"狼"],[63788,1,"郎"],[63789,1,"來"],[63790,1,"冷"],[63791,1,"勞"],[63792,1,"擄"],[63793,1,"櫓"],[63794,1,"爐"],[63795,1,"盧"],[63796,1,"老"],[63797,1,"蘆"],[63798,1,"虜"],[63799,1,"路"],[63800,1,"露"],[63801,1,"魯"],[63802,1,"鷺"],[63803,1,"碌"],[63804,1,"祿"],[63805,1,"綠"],[63806,1,"菉"],[63807,1,"錄"],[63808,1,"鹿"],[63809,1,"論"],[63810,1,"壟"],[63811,1,"弄"],[63812,1,"籠"],[63813,1,"聾"],[63814,1,"牢"],[63815,1,"磊"],[63816,1,"賂"],[63817,1,"雷"],[63818,1,"壘"],[63819,1,"屢"],[63820,1,"樓"],[63821,1,"淚"],[63822,1,"漏"],[63823,1,"累"],[63824,1,"縷"],[63825,1,"陋"],[63826,1,"勒"],[63827,1,"肋"],[63828,1,"凜"],[63829,1,"凌"],[63830,1,"稜"],[63831,1,"綾"],[63832,1,"菱"],[63833,1,"陵"],[63834,1,"讀"],[63835,1,"拏"],[63836,1,"樂"],[63837,1,"諾"],[63838,1,"丹"],[63839,1,"寧"],[63840,1,"怒"],[63841,1,"率"],[63842,1,"異"],[63843,1,"北"],[63844,1,"磻"],[63845,1,"便"],[63846,1,"復"],[63847,1,"不"],[63848,1,"泌"],[63849,1,"數"],[63850,1,"索"],[63851,1,"參"],[63852,1,"塞"],[63853,1,"省"],[63854,1,"葉"],[63855,1,"說"],[63856,1,"殺"],[63857,1,"辰"],[63858,1,"沈"],[63859,1,"拾"],[63860,1,"若"],[63861,1,"掠"],[63862,1,"略"],[63863,1,"亮"],[63864,1,"兩"],[63865,1,"凉"],[63866,1,"梁"],[63867,1,"糧"],[63868,1,"良"],[63869,1,"諒"],[63870,1,"量"],[63871,1,"勵"],[63872,1,"呂"],[63873,1,"女"],[63874,1,"廬"],[63875,1,"旅"],[63876,1,"濾"],[63877,1,"礪"],[63878,1,"閭"],[63879,1,"驪"],[63880,1,"麗"],[63881,1,"黎"],[63882,1,"力"],[63883,1,"曆"],[63884,1,"歷"],[63885,1,"轢"],[63886,1,"年"],[63887,1,"憐"],[63888,1,"戀"],[63889,1,"撚"],[63890,1,"漣"],[63891,1,"煉"],[63892,1,"璉"],[63893,1,"秊"],[63894,1,"練"],[63895,1,"聯"],[63896,1,"輦"],[63897,1,"蓮"],[63898,1,"連"],[63899,1,"鍊"],[63900,1,"列"],[63901,1,"劣"],[63902,1,"咽"],[63903,1,"烈"],[63904,1,"裂"],[63905,1,"說"],[63906,1,"廉"],[63907,1,"念"],[63908,1,"捻"],[63909,1,"殮"],[63910,1,"簾"],[63911,1,"獵"],[63912,1,"令"],[63913,1,"囹"],[63914,1,"寧"],[63915,1,"嶺"],[63916,1,"怜"],[63917,1,"玲"],[63918,1,"瑩"],[63919,1,"羚"],[63920,1,"聆"],[63921,1,"鈴"],[63922,1,"零"],[63923,1,"靈"],[63924,1,"領"],[63925,1,"例"],[63926,1,"禮"],[63927,1,"醴"],[63928,1,"隸"],[63929,1,"惡"],[63930,1,"了"],[63931,1,"僚"],[63932,1,"寮"],[63933,1,"尿"],[63934,1,"料"],[63935,1,"樂"],[63936,1,"燎"],[63937,1,"療"],[63938,1,"蓼"],[63939,1,"遼"],[63940,1,"龍"],[63941,1,"暈"],[63942,1,"阮"],[63943,1,"劉"],[63944,1,"杻"],[63945,1,"柳"],[63946,1,"流"],[63947,1,"溜"],[63948,1,"琉"],[63949,1,"留"],[63950,1,"硫"],[63951,1,"紐"],[63952,1,"類"],[63953,1,"六"],[63954,1,"戮"],[63955,1,"陸"],[63956,1,"倫"],[63957,1,"崙"],[63958,1,"淪"],[63959,1,"輪"],[63960,1,"律"],[63961,1,"慄"],[63962,1,"栗"],[63963,1,"率"],[63964,1,"隆"],[63965,1,"利"],[63966,1,"吏"],[63967,1,"履"],[63968,1,"易"],[63969,1,"李"],[63970,1,"梨"],[63971,1,"泥"],[63972,1,"理"],[63973,1,"痢"],[63974,1,"罹"],[63975,1,"裏"],[63976,1,"裡"],[63977,1,"里"],[63978,1,"離"],[63979,1,"匿"],[63980,1,"溺"],[63981,1,"吝"],[63982,1,"燐"],[63983,1,"璘"],[63984,1,"藺"],[63985,1,"隣"],[63986,1,"鱗"],[63987,1,"麟"],[63988,1,"林"],[63989,1,"淋"],[63990,1,"臨"],[63991,1,"立"],[63992,1,"笠"],[63993,1,"粒"],[63994,1,"狀"],[63995,1,"炙"],[63996,1,"識"],[63997,1,"什"],[63998,1,"茶"],[63999,1,"刺"],[64000,1,"切"],[64001,1,"度"],[64002,1,"拓"],[64003,1,"糖"],[64004,1,"宅"],[64005,1,"洞"],[64006,1,"暴"],[64007,1,"輻"],[64008,1,"行"],[64009,1,"降"],[64010,1,"見"],[64011,1,"廓"],[64012,1,"兀"],[64013,1,"嗀"],[[64014,64015],2],[64016,1,"塚"],[64017,2],[64018,1,"晴"],[[64019,64020],2],[64021,1,"凞"],[64022,1,"猪"],[64023,1,"益"],[64024,1,"礼"],[64025,1,"神"],[64026,1,"祥"],[64027,1,"福"],[64028,1,"靖"],[64029,1,"精"],[64030,1,"羽"],[64031,2],[64032,1,"蘒"],[64033,2],[64034,1,"諸"],[[64035,64036],2],[64037,1,"逸"],[64038,1,"都"],[[64039,64041],2],[64042,1,"飯"],[64043,1,"飼"],[64044,1,"館"],[64045,1,"鶴"],[64046,1,"郞"],[64047,1,"隷"],[64048,1,"侮"],[64049,1,"僧"],[64050,1,"免"],[64051,1,"勉"],[64052,1,"勤"],[64053,1,"卑"],[64054,1,"喝"],[64055,1,"嘆"],[64056,1,"器"],[64057,1,"塀"],[64058,1,"墨"],[64059,1,"層"],[64060,1,"屮"],[64061,1,"悔"],[64062,1,"慨"],[64063,1,"憎"],[64064,1,"懲"],[64065,1,"敏"],[64066,1,"既"],[64067,1,"暑"],[64068,1,"梅"],[64069,1,"海"],[64070,1,"渚"],[64071,1,"漢"],[64072,1,"煮"],[64073,1,"爫"],[64074,1,"琢"],[64075,1,"碑"],[64076,1,"社"],[64077,1,"祉"],[64078,1,"祈"],[64079,1,"祐"],[64080,1,"祖"],[64081,1,"祝"],[64082,1,"禍"],[64083,1,"禎"],[64084,1,"穀"],[64085,1,"突"],[64086,1,"節"],[64087,1,"練"],[64088,1,"縉"],[64089,1,"繁"],[64090,1,"署"],[64091,1,"者"],[64092,1,"臭"],[[64093,64094],1,"艹"],[64095,1,"著"],[64096,1,"褐"],[64097,1,"視"],[64098,1,"謁"],[64099,1,"謹"],[64100,1,"賓"],[64101,1,"贈"],[64102,1,"辶"],[64103,1,"逸"],[64104,1,"難"],[64105,1,"響"],[64106,1,"頻"],[64107,1,"恵"],[64108,1,"𤋮"],[64109,1,"舘"],[[64110,64111],3],[64112,1,"並"],[64113,1,"况"],[64114,1,"全"],[64115,1,"侀"],[64116,1,"充"],[64117,1,"冀"],[64118,1,"勇"],[64119,1,"勺"],[64120,1,"喝"],[64121,1,"啕"],[64122,1,"喙"],[64123,1,"嗢"],[64124,1,"塚"],[64125,1,"墳"],[64126,1,"奄"],[64127,1,"奔"],[64128,1,"婢"],[64129,1,"嬨"],[64130,1,"廒"],[64131,1,"廙"],[64132,1,"彩"],[64133,1,"徭"],[64134,1,"惘"],[64135,1,"慎"],[64136,1,"愈"],[64137,1,"憎"],[64138,1,"慠"],[64139,1,"懲"],[64140,1,"戴"],[64141,1,"揄"],[64142,1,"搜"],[64143,1,"摒"],[64144,1,"敖"],[64145,1,"晴"],[64146,1,"朗"],[64147,1,"望"],[64148,1,"杖"],[64149,1,"歹"],[64150,1,"殺"],[64151,1,"流"],[64152,1,"滛"],[64153,1,"滋"],[64154,1,"漢"],[64155,1,"瀞"],[64156,1,"煮"],[64157,1,"瞧"],[64158,1,"爵"],[64159,1,"犯"],[64160,1,"猪"],[64161,1,"瑱"],[64162,1,"甆"],[64163,1,"画"],[64164,1,"瘝"],[64165,1,"瘟"],[64166,1,"益"],[64167,1,"盛"],[64168,1,"直"],[64169,1,"睊"],[64170,1,"着"],[64171,1,"磌"],[64172,1,"窱"],[64173,1,"節"],[64174,1,"类"],[64175,1,"絛"],[64176,1,"練"],[64177,1,"缾"],[64178,1,"者"],[64179,1,"荒"],[64180,1,"華"],[64181,1,"蝹"],[64182,1,"襁"],[64183,1,"覆"],[64184,1,"視"],[64185,1,"調"],[64186,1,"諸"],[64187,1,"請"],[64188,1,"謁"],[64189,1,"諾"],[64190,1,"諭"],[64191,1,"謹"],[64192,1,"變"],[64193,1,"贈"],[64194,1,"輸"],[64195,1,"遲"],[64196,1,"醙"],[64197,1,"鉶"],[64198,1,"陼"],[64199,1,"難"],[64200,1,"靖"],[64201,1,"韛"],[64202,1,"響"],[64203,1,"頋"],[64204,1,"頻"],[64205,1,"鬒"],[64206,1,"龜"],[64207,1,"𢡊"],[64208,1,"𢡄"],[64209,1,"𣏕"],[64210,1,"㮝"],[64211,1,"䀘"],[64212,1,"䀹"],[64213,1,"𥉉"],[64214,1,"𥳐"],[64215,1,"𧻓"],[64216,1,"齃"],[64217,1,"龎"],[[64218,64255],3],[64256,1,"ff"],[64257,1,"fi"],[64258,1,"fl"],[64259,1,"ffi"],[64260,1,"ffl"],[[64261,64262],1,"st"],[[64263,64274],3],[64275,1,"մն"],[64276,1,"մե"],[64277,1,"մի"],[64278,1,"վն"],[64279,1,"մխ"],[[64280,64284],3],[64285,1,"יִ"],[64286,2],[64287,1,"ײַ"],[64288,1,"ע"],[64289,1,"א"],[64290,1,"ד"],[64291,1,"ה"],[64292,1,"כ"],[64293,1,"ל"],[64294,1,"ם"],[64295,1,"ר"],[64296,1,"ת"],[64297,1,"+"],[64298,1,"שׁ"],[64299,1,"שׂ"],[64300,1,"שּׁ"],[64301,1,"שּׂ"],[64302,1,"אַ"],[64303,1,"אָ"],[64304,1,"אּ"],[64305,1,"בּ"],[64306,1,"גּ"],[64307,1,"דּ"],[64308,1,"הּ"],[64309,1,"וּ"],[64310,1,"זּ"],[64311,3],[64312,1,"טּ"],[64313,1,"יּ"],[64314,1,"ךּ"],[64315,1,"כּ"],[64316,1,"לּ"],[64317,3],[64318,1,"מּ"],[64319,3],[64320,1,"נּ"],[64321,1,"סּ"],[64322,3],[64323,1,"ףּ"],[64324,1,"פּ"],[64325,3],[64326,1,"צּ"],[64327,1,"קּ"],[64328,1,"רּ"],[64329,1,"שּ"],[64330,1,"תּ"],[64331,1,"וֹ"],[64332,1,"בֿ"],[64333,1,"כֿ"],[64334,1,"פֿ"],[64335,1,"אל"],[[64336,64337],1,"ٱ"],[[64338,64341],1,"ٻ"],[[64342,64345],1,"پ"],[[64346,64349],1,"ڀ"],[[64350,64353],1,"ٺ"],[[64354,64357],1,"ٿ"],[[64358,64361],1,"ٹ"],[[64362,64365],1,"ڤ"],[[64366,64369],1,"ڦ"],[[64370,64373],1,"ڄ"],[[64374,64377],1,"ڃ"],[[64378,64381],1,"چ"],[[64382,64385],1,"ڇ"],[[64386,64387],1,"ڍ"],[[64388,64389],1,"ڌ"],[[64390,64391],1,"ڎ"],[[64392,64393],1,"ڈ"],[[64394,64395],1,"ژ"],[[64396,64397],1,"ڑ"],[[64398,64401],1,"ک"],[[64402,64405],1,"گ"],[[64406,64409],1,"ڳ"],[[64410,64413],1,"ڱ"],[[64414,64415],1,"ں"],[[64416,64419],1,"ڻ"],[[64420,64421],1,"ۀ"],[[64422,64425],1,"ہ"],[[64426,64429],1,"ھ"],[[64430,64431],1,"ے"],[[64432,64433],1,"ۓ"],[[64434,64449],2],[64450,2],[[64451,64466],3],[[64467,64470],1,"ڭ"],[[64471,64472],1,"ۇ"],[[64473,64474],1,"ۆ"],[[64475,64476],1,"ۈ"],[64477,1,"ۇٴ"],[[64478,64479],1,"ۋ"],[[64480,64481],1,"ۅ"],[[64482,64483],1,"ۉ"],[[64484,64487],1,"ې"],[[64488,64489],1,"ى"],[[64490,64491],1,"ئا"],[[64492,64493],1,"ئە"],[[64494,64495],1,"ئو"],[[64496,64497],1,"ئۇ"],[[64498,64499],1,"ئۆ"],[[64500,64501],1,"ئۈ"],[[64502,64504],1,"ئې"],[[64505,64507],1,"ئى"],[[64508,64511],1,"ی"],[64512,1,"ئج"],[64513,1,"ئح"],[64514,1,"ئم"],[64515,1,"ئى"],[64516,1,"ئي"],[64517,1,"بج"],[64518,1,"بح"],[64519,1,"بخ"],[64520,1,"بم"],[64521,1,"بى"],[64522,1,"بي"],[64523,1,"تج"],[64524,1,"تح"],[64525,1,"تخ"],[64526,1,"تم"],[64527,1,"تى"],[64528,1,"تي"],[64529,1,"ثج"],[64530,1,"ثم"],[64531,1,"ثى"],[64532,1,"ثي"],[64533,1,"جح"],[64534,1,"جم"],[64535,1,"حج"],[64536,1,"حم"],[64537,1,"خج"],[64538,1,"خح"],[64539,1,"خم"],[64540,1,"سج"],[64541,1,"سح"],[64542,1,"سخ"],[64543,1,"سم"],[64544,1,"صح"],[64545,1,"صم"],[64546,1,"ضج"],[64547,1,"ضح"],[64548,1,"ضخ"],[64549,1,"ضم"],[64550,1,"طح"],[64551,1,"طم"],[64552,1,"ظم"],[64553,1,"عج"],[64554,1,"عم"],[64555,1,"غج"],[64556,1,"غم"],[64557,1,"فج"],[64558,1,"فح"],[64559,1,"فخ"],[64560,1,"فم"],[64561,1,"فى"],[64562,1,"في"],[64563,1,"قح"],[64564,1,"قم"],[64565,1,"قى"],[64566,1,"قي"],[64567,1,"كا"],[64568,1,"كج"],[64569,1,"كح"],[64570,1,"كخ"],[64571,1,"كل"],[64572,1,"كم"],[64573,1,"كى"],[64574,1,"كي"],[64575,1,"لج"],[64576,1,"لح"],[64577,1,"لخ"],[64578,1,"لم"],[64579,1,"لى"],[64580,1,"لي"],[64581,1,"مج"],[64582,1,"مح"],[64583,1,"مخ"],[64584,1,"مم"],[64585,1,"مى"],[64586,1,"مي"],[64587,1,"نج"],[64588,1,"نح"],[64589,1,"نخ"],[64590,1,"نم"],[64591,1,"نى"],[64592,1,"ني"],[64593,1,"هج"],[64594,1,"هم"],[64595,1,"هى"],[64596,1,"هي"],[64597,1,"يج"],[64598,1,"يح"],[64599,1,"يخ"],[64600,1,"يم"],[64601,1,"يى"],[64602,1,"يي"],[64603,1,"ذٰ"],[64604,1,"رٰ"],[64605,1,"ىٰ"],[64606,1," ٌّ"],[64607,1," ٍّ"],[64608,1," َّ"],[64609,1," ُّ"],[64610,1," ِّ"],[64611,1," ّٰ"],[64612,1,"ئر"],[64613,1,"ئز"],[64614,1,"ئم"],[64615,1,"ئن"],[64616,1,"ئى"],[64617,1,"ئي"],[64618,1,"بر"],[64619,1,"بز"],[64620,1,"بم"],[64621,1,"بن"],[64622,1,"بى"],[64623,1,"بي"],[64624,1,"تر"],[64625,1,"تز"],[64626,1,"تم"],[64627,1,"تن"],[64628,1,"تى"],[64629,1,"تي"],[64630,1,"ثر"],[64631,1,"ثز"],[64632,1,"ثم"],[64633,1,"ثن"],[64634,1,"ثى"],[64635,1,"ثي"],[64636,1,"فى"],[64637,1,"في"],[64638,1,"قى"],[64639,1,"قي"],[64640,1,"كا"],[64641,1,"كل"],[64642,1,"كم"],[64643,1,"كى"],[64644,1,"كي"],[64645,1,"لم"],[64646,1,"لى"],[64647,1,"لي"],[64648,1,"ما"],[64649,1,"مم"],[64650,1,"نر"],[64651,1,"نز"],[64652,1,"نم"],[64653,1,"نن"],[64654,1,"نى"],[64655,1,"ني"],[64656,1,"ىٰ"],[64657,1,"ير"],[64658,1,"يز"],[64659,1,"يم"],[64660,1,"ين"],[64661,1,"يى"],[64662,1,"يي"],[64663,1,"ئج"],[64664,1,"ئح"],[64665,1,"ئخ"],[64666,1,"ئم"],[64667,1,"ئه"],[64668,1,"بج"],[64669,1,"بح"],[64670,1,"بخ"],[64671,1,"بم"],[64672,1,"به"],[64673,1,"تج"],[64674,1,"تح"],[64675,1,"تخ"],[64676,1,"تم"],[64677,1,"ته"],[64678,1,"ثم"],[64679,1,"جح"],[64680,1,"جم"],[64681,1,"حج"],[64682,1,"حم"],[64683,1,"خج"],[64684,1,"خم"],[64685,1,"سج"],[64686,1,"سح"],[64687,1,"سخ"],[64688,1,"سم"],[64689,1,"صح"],[64690,1,"صخ"],[64691,1,"صم"],[64692,1,"ضج"],[64693,1,"ضح"],[64694,1,"ضخ"],[64695,1,"ضم"],[64696,1,"طح"],[64697,1,"ظم"],[64698,1,"عج"],[64699,1,"عم"],[64700,1,"غج"],[64701,1,"غم"],[64702,1,"فج"],[64703,1,"فح"],[64704,1,"فخ"],[64705,1,"فم"],[64706,1,"قح"],[64707,1,"قم"],[64708,1,"كج"],[64709,1,"كح"],[64710,1,"كخ"],[64711,1,"كل"],[64712,1,"كم"],[64713,1,"لج"],[64714,1,"لح"],[64715,1,"لخ"],[64716,1,"لم"],[64717,1,"له"],[64718,1,"مج"],[64719,1,"مح"],[64720,1,"مخ"],[64721,1,"مم"],[64722,1,"نج"],[64723,1,"نح"],[64724,1,"نخ"],[64725,1,"نم"],[64726,1,"نه"],[64727,1,"هج"],[64728,1,"هم"],[64729,1,"هٰ"],[64730,1,"يج"],[64731,1,"يح"],[64732,1,"يخ"],[64733,1,"يم"],[64734,1,"يه"],[64735,1,"ئم"],[64736,1,"ئه"],[64737,1,"بم"],[64738,1,"به"],[64739,1,"تم"],[64740,1,"ته"],[64741,1,"ثم"],[64742,1,"ثه"],[64743,1,"سم"],[64744,1,"سه"],[64745,1,"شم"],[64746,1,"شه"],[64747,1,"كل"],[64748,1,"كم"],[64749,1,"لم"],[64750,1,"نم"],[64751,1,"نه"],[64752,1,"يم"],[64753,1,"يه"],[64754,1,"ـَّ"],[64755,1,"ـُّ"],[64756,1,"ـِّ"],[64757,1,"طى"],[64758,1,"طي"],[64759,1,"عى"],[64760,1,"عي"],[64761,1,"غى"],[64762,1,"غي"],[64763,1,"سى"],[64764,1,"سي"],[64765,1,"شى"],[64766,1,"شي"],[64767,1,"حى"],[64768,1,"حي"],[64769,1,"جى"],[64770,1,"جي"],[64771,1,"خى"],[64772,1,"خي"],[64773,1,"صى"],[64774,1,"صي"],[64775,1,"ضى"],[64776,1,"ضي"],[64777,1,"شج"],[64778,1,"شح"],[64779,1,"شخ"],[64780,1,"شم"],[64781,1,"شر"],[64782,1,"سر"],[64783,1,"صر"],[64784,1,"ضر"],[64785,1,"طى"],[64786,1,"طي"],[64787,1,"عى"],[64788,1,"عي"],[64789,1,"غى"],[64790,1,"غي"],[64791,1,"سى"],[64792,1,"سي"],[64793,1,"شى"],[64794,1,"شي"],[64795,1,"حى"],[64796,1,"حي"],[64797,1,"جى"],[64798,1,"جي"],[64799,1,"خى"],[64800,1,"خي"],[64801,1,"صى"],[64802,1,"صي"],[64803,1,"ضى"],[64804,1,"ضي"],[64805,1,"شج"],[64806,1,"شح"],[64807,1,"شخ"],[64808,1,"شم"],[64809,1,"شر"],[64810,1,"سر"],[64811,1,"صر"],[64812,1,"ضر"],[64813,1,"شج"],[64814,1,"شح"],[64815,1,"شخ"],[64816,1,"شم"],[64817,1,"سه"],[64818,1,"شه"],[64819,1,"طم"],[64820,1,"سج"],[64821,1,"سح"],[64822,1,"سخ"],[64823,1,"شج"],[64824,1,"شح"],[64825,1,"شخ"],[64826,1,"طم"],[64827,1,"ظم"],[[64828,64829],1,"اً"],[[64830,64831],2],[[64832,64847],2],[64848,1,"تجم"],[[64849,64850],1,"تحج"],[64851,1,"تحم"],[64852,1,"تخم"],[64853,1,"تمج"],[64854,1,"تمح"],[64855,1,"تمخ"],[[64856,64857],1,"جمح"],[64858,1,"حمي"],[64859,1,"حمى"],[64860,1,"سحج"],[64861,1,"سجح"],[64862,1,"سجى"],[[64863,64864],1,"سمح"],[64865,1,"سمج"],[[64866,64867],1,"سمم"],[[64868,64869],1,"صحح"],[64870,1,"صمم"],[[64871,64872],1,"شحم"],[64873,1,"شجي"],[[64874,64875],1,"شمخ"],[[64876,64877],1,"شمم"],[64878,1,"ضحى"],[[64879,64880],1,"ضخم"],[[64881,64882],1,"طمح"],[64883,1,"طمم"],[64884,1,"طمي"],[64885,1,"عجم"],[[64886,64887],1,"عمم"],[64888,1,"عمى"],[64889,1,"غمم"],[64890,1,"غمي"],[64891,1,"غمى"],[[64892,64893],1,"فخم"],[64894,1,"قمح"],[64895,1,"قمم"],[64896,1,"لحم"],[64897,1,"لحي"],[64898,1,"لحى"],[[64899,64900],1,"لجج"],[[64901,64902],1,"لخم"],[[64903,64904],1,"لمح"],[64905,1,"محج"],[64906,1,"محم"],[64907,1,"محي"],[64908,1,"مجح"],[64909,1,"مجم"],[64910,1,"مخج"],[64911,1,"مخم"],[[64912,64913],3],[64914,1,"مجخ"],[64915,1,"همج"],[64916,1,"همم"],[64917,1,"نحم"],[64918,1,"نحى"],[[64919,64920],1,"نجم"],[64921,1,"نجى"],[64922,1,"نمي"],[64923,1,"نمى"],[[64924,64925],1,"يمم"],[64926,1,"بخي"],[64927,1,"تجي"],[64928,1,"تجى"],[64929,1,"تخي"],[64930,1,"تخى"],[64931,1,"تمي"],[64932,1,"تمى"],[64933,1,"جمي"],[64934,1,"جحى"],[64935,1,"جمى"],[64936,1,"سخى"],[64937,1,"صحي"],[64938,1,"شحي"],[64939,1,"ضحي"],[64940,1,"لجي"],[64941,1,"لمي"],[64942,1,"يحي"],[64943,1,"يجي"],[64944,1,"يمي"],[64945,1,"ممي"],[64946,1,"قمي"],[64947,1,"نحي"],[64948,1,"قمح"],[64949,1,"لحم"],[64950,1,"عمي"],[64951,1,"كمي"],[64952,1,"نجح"],[64953,1,"مخي"],[64954,1,"لجم"],[64955,1,"كمم"],[64956,1,"لجم"],[64957,1,"نجح"],[64958,1,"جحي"],[64959,1,"حجي"],[64960,1,"مجي"],[64961,1,"فمي"],[64962,1,"بحي"],[64963,1,"كمم"],[64964,1,"عجم"],[64965,1,"صمم"],[64966,1,"سخي"],[64967,1,"نجي"],[[64968,64974],3],[64975,2],[[64976,65007],3],[65008,1,"صلے"],[65009,1,"قلے"],[65010,1,"الله"],[65011,1,"اكبر"],[65012,1,"محمد"],[65013,1,"صلعم"],[65014,1,"رسول"],[65015,1,"عليه"],[65016,1,"وسلم"],[65017,1,"صلى"],[65018,1,"صلى الله عليه وسلم"],[65019,1,"جل جلاله"],[65020,1,"ریال"],[65021,2],[[65022,65023],2],[[65024,65039],7],[65040,1,","],[65041,1,"、"],[65042,3],[65043,1,":"],[65044,1,";"],[65045,1,"!"],[65046,1,"?"],[65047,1,"〖"],[65048,1,"〗"],[65049,3],[[65050,65055],3],[[65056,65059],2],[[65060,65062],2],[[65063,65069],2],[[65070,65071],2],[65072,3],[65073,1,"—"],[65074,1,"–"],[[65075,65076],1,"_"],[65077,1,"("],[65078,1,")"],[65079,1,"{"],[65080,1,"}"],[65081,1,"〔"],[65082,1,"〕"],[65083,1,"【"],[65084,1,"】"],[65085,1,"《"],[65086,1,"》"],[65087,1,"〈"],[65088,1,"〉"],[65089,1,"「"],[65090,1,"」"],[65091,1,"『"],[65092,1,"』"],[[65093,65094],2],[65095,1,"["],[65096,1,"]"],[[65097,65100],1," ̅"],[[65101,65103],1,"_"],[65104,1,","],[65105,1,"、"],[65106,3],[65107,3],[65108,1,";"],[65109,1,":"],[65110,1,"?"],[65111,1,"!"],[65112,1,"—"],[65113,1,"("],[65114,1,")"],[65115,1,"{"],[65116,1,"}"],[65117,1,"〔"],[65118,1,"〕"],[65119,1,"#"],[65120,1,"&"],[65121,1,"*"],[65122,1,"+"],[65123,1,"-"],[65124,1,"<"],[65125,1,">"],[65126,1,"="],[65127,3],[65128,1,"\\"],[65129,1,"$"],[65130,1,"%"],[65131,1,"@"],[[65132,65135],3],[65136,1," ً"],[65137,1,"ـً"],[65138,1," ٌ"],[65139,2],[65140,1," ٍ"],[65141,3],[65142,1," َ"],[65143,1,"ـَ"],[65144,1," ُ"],[65145,1,"ـُ"],[65146,1," ِ"],[65147,1,"ـِ"],[65148,1," ّ"],[65149,1,"ـّ"],[65150,1," ْ"],[65151,1,"ـْ"],[65152,1,"ء"],[[65153,65154],1,"آ"],[[65155,65156],1,"أ"],[[65157,65158],1,"ؤ"],[[65159,65160],1,"إ"],[[65161,65164],1,"ئ"],[[65165,65166],1,"ا"],[[65167,65170],1,"ب"],[[65171,65172],1,"ة"],[[65173,65176],1,"ت"],[[65177,65180],1,"ث"],[[65181,65184],1,"ج"],[[65185,65188],1,"ح"],[[65189,65192],1,"خ"],[[65193,65194],1,"د"],[[65195,65196],1,"ذ"],[[65197,65198],1,"ر"],[[65199,65200],1,"ز"],[[65201,65204],1,"س"],[[65205,65208],1,"ش"],[[65209,65212],1,"ص"],[[65213,65216],1,"ض"],[[65217,65220],1,"ط"],[[65221,65224],1,"ظ"],[[65225,65228],1,"ع"],[[65229,65232],1,"غ"],[[65233,65236],1,"ف"],[[65237,65240],1,"ق"],[[65241,65244],1,"ك"],[[65245,65248],1,"ل"],[[65249,65252],1,"م"],[[65253,65256],1,"ن"],[[65257,65260],1,"ه"],[[65261,65262],1,"و"],[[65263,65264],1,"ى"],[[65265,65268],1,"ي"],[[65269,65270],1,"لآ"],[[65271,65272],1,"لأ"],[[65273,65274],1,"لإ"],[[65275,65276],1,"لا"],[[65277,65278],3],[65279,7],[65280,3],[65281,1,"!"],[65282,1,'"'],[65283,1,"#"],[65284,1,"$"],[65285,1,"%"],[65286,1,"&"],[65287,1,"'"],[65288,1,"("],[65289,1,")"],[65290,1,"*"],[65291,1,"+"],[65292,1,","],[65293,1,"-"],[65294,1,"."],[65295,1,"/"],[65296,1,"0"],[65297,1,"1"],[65298,1,"2"],[65299,1,"3"],[65300,1,"4"],[65301,1,"5"],[65302,1,"6"],[65303,1,"7"],[65304,1,"8"],[65305,1,"9"],[65306,1,":"],[65307,1,";"],[65308,1,"<"],[65309,1,"="],[65310,1,">"],[65311,1,"?"],[65312,1,"@"],[65313,1,"a"],[65314,1,"b"],[65315,1,"c"],[65316,1,"d"],[65317,1,"e"],[65318,1,"f"],[65319,1,"g"],[65320,1,"h"],[65321,1,"i"],[65322,1,"j"],[65323,1,"k"],[65324,1,"l"],[65325,1,"m"],[65326,1,"n"],[65327,1,"o"],[65328,1,"p"],[65329,1,"q"],[65330,1,"r"],[65331,1,"s"],[65332,1,"t"],[65333,1,"u"],[65334,1,"v"],[65335,1,"w"],[65336,1,"x"],[65337,1,"y"],[65338,1,"z"],[65339,1,"["],[65340,1,"\\"],[65341,1,"]"],[65342,1,"^"],[65343,1,"_"],[65344,1,"`"],[65345,1,"a"],[65346,1,"b"],[65347,1,"c"],[65348,1,"d"],[65349,1,"e"],[65350,1,"f"],[65351,1,"g"],[65352,1,"h"],[65353,1,"i"],[65354,1,"j"],[65355,1,"k"],[65356,1,"l"],[65357,1,"m"],[65358,1,"n"],[65359,1,"o"],[65360,1,"p"],[65361,1,"q"],[65362,1,"r"],[65363,1,"s"],[65364,1,"t"],[65365,1,"u"],[65366,1,"v"],[65367,1,"w"],[65368,1,"x"],[65369,1,"y"],[65370,1,"z"],[65371,1,"{"],[65372,1,"|"],[65373,1,"}"],[65374,1,"~"],[65375,1,"⦅"],[65376,1,"⦆"],[65377,1,"."],[65378,1,"「"],[65379,1,"」"],[65380,1,"、"],[65381,1,"・"],[65382,1,"ヲ"],[65383,1,"ァ"],[65384,1,"ィ"],[65385,1,"ゥ"],[65386,1,"ェ"],[65387,1,"ォ"],[65388,1,"ャ"],[65389,1,"ュ"],[65390,1,"ョ"],[65391,1,"ッ"],[65392,1,"ー"],[65393,1,"ア"],[65394,1,"イ"],[65395,1,"ウ"],[65396,1,"エ"],[65397,1,"オ"],[65398,1,"カ"],[65399,1,"キ"],[65400,1,"ク"],[65401,1,"ケ"],[65402,1,"コ"],[65403,1,"サ"],[65404,1,"シ"],[65405,1,"ス"],[65406,1,"セ"],[65407,1,"ソ"],[65408,1,"タ"],[65409,1,"チ"],[65410,1,"ツ"],[65411,1,"テ"],[65412,1,"ト"],[65413,1,"ナ"],[65414,1,"ニ"],[65415,1,"ヌ"],[65416,1,"ネ"],[65417,1,"ノ"],[65418,1,"ハ"],[65419,1,"ヒ"],[65420,1,"フ"],[65421,1,"ヘ"],[65422,1,"ホ"],[65423,1,"マ"],[65424,1,"ミ"],[65425,1,"ム"],[65426,1,"メ"],[65427,1,"モ"],[65428,1,"ヤ"],[65429,1,"ユ"],[65430,1,"ヨ"],[65431,1,"ラ"],[65432,1,"リ"],[65433,1,"ル"],[65434,1,"レ"],[65435,1,"ロ"],[65436,1,"ワ"],[65437,1,"ン"],[65438,1,"゙"],[65439,1,"゚"],[65440,7],[65441,1,"ᄀ"],[65442,1,"ᄁ"],[65443,1,"ᆪ"],[65444,1,"ᄂ"],[65445,1,"ᆬ"],[65446,1,"ᆭ"],[65447,1,"ᄃ"],[65448,1,"ᄄ"],[65449,1,"ᄅ"],[65450,1,"ᆰ"],[65451,1,"ᆱ"],[65452,1,"ᆲ"],[65453,1,"ᆳ"],[65454,1,"ᆴ"],[65455,1,"ᆵ"],[65456,1,"ᄚ"],[65457,1,"ᄆ"],[65458,1,"ᄇ"],[65459,1,"ᄈ"],[65460,1,"ᄡ"],[65461,1,"ᄉ"],[65462,1,"ᄊ"],[65463,1,"ᄋ"],[65464,1,"ᄌ"],[65465,1,"ᄍ"],[65466,1,"ᄎ"],[65467,1,"ᄏ"],[65468,1,"ᄐ"],[65469,1,"ᄑ"],[65470,1,"ᄒ"],[[65471,65473],3],[65474,1,"ᅡ"],[65475,1,"ᅢ"],[65476,1,"ᅣ"],[65477,1,"ᅤ"],[65478,1,"ᅥ"],[65479,1,"ᅦ"],[[65480,65481],3],[65482,1,"ᅧ"],[65483,1,"ᅨ"],[65484,1,"ᅩ"],[65485,1,"ᅪ"],[65486,1,"ᅫ"],[65487,1,"ᅬ"],[[65488,65489],3],[65490,1,"ᅭ"],[65491,1,"ᅮ"],[65492,1,"ᅯ"],[65493,1,"ᅰ"],[65494,1,"ᅱ"],[65495,1,"ᅲ"],[[65496,65497],3],[65498,1,"ᅳ"],[65499,1,"ᅴ"],[65500,1,"ᅵ"],[[65501,65503],3],[65504,1,"¢"],[65505,1,"£"],[65506,1,"¬"],[65507,1," ̄"],[65508,1,"¦"],[65509,1,"¥"],[65510,1,"₩"],[65511,3],[65512,1,"│"],[65513,1,"←"],[65514,1,"↑"],[65515,1,"→"],[65516,1,"↓"],[65517,1,"■"],[65518,1,"○"],[[65519,65528],3],[[65529,65531],3],[65532,3],[65533,3],[[65534,65535],3],[[65536,65547],2],[65548,3],[[65549,65574],2],[65575,3],[[65576,65594],2],[65595,3],[[65596,65597],2],[65598,3],[[65599,65613],2],[[65614,65615],3],[[65616,65629],2],[[65630,65663],3],[[65664,65786],2],[[65787,65791],3],[[65792,65794],2],[[65795,65798],3],[[65799,65843],2],[[65844,65846],3],[[65847,65855],2],[[65856,65930],2],[[65931,65932],2],[[65933,65934],2],[65935,3],[[65936,65947],2],[65948,2],[[65949,65951],3],[65952,2],[[65953,65999],3],[[66000,66044],2],[66045,2],[[66046,66175],3],[[66176,66204],2],[[66205,66207],3],[[66208,66256],2],[[66257,66271],3],[66272,2],[[66273,66299],2],[[66300,66303],3],[[66304,66334],2],[66335,2],[[66336,66339],2],[[66340,66348],3],[[66349,66351],2],[[66352,66368],2],[66369,2],[[66370,66377],2],[66378,2],[[66379,66383],3],[[66384,66426],2],[[66427,66431],3],[[66432,66461],2],[66462,3],[66463,2],[[66464,66499],2],[[66500,66503],3],[[66504,66511],2],[[66512,66517],2],[[66518,66559],3],[66560,1,"𐐨"],[66561,1,"𐐩"],[66562,1,"𐐪"],[66563,1,"𐐫"],[66564,1,"𐐬"],[66565,1,"𐐭"],[66566,1,"𐐮"],[66567,1,"𐐯"],[66568,1,"𐐰"],[66569,1,"𐐱"],[66570,1,"𐐲"],[66571,1,"𐐳"],[66572,1,"𐐴"],[66573,1,"𐐵"],[66574,1,"𐐶"],[66575,1,"𐐷"],[66576,1,"𐐸"],[66577,1,"𐐹"],[66578,1,"𐐺"],[66579,1,"𐐻"],[66580,1,"𐐼"],[66581,1,"𐐽"],[66582,1,"𐐾"],[66583,1,"𐐿"],[66584,1,"𐑀"],[66585,1,"𐑁"],[66586,1,"𐑂"],[66587,1,"𐑃"],[66588,1,"𐑄"],[66589,1,"𐑅"],[66590,1,"𐑆"],[66591,1,"𐑇"],[66592,1,"𐑈"],[66593,1,"𐑉"],[66594,1,"𐑊"],[66595,1,"𐑋"],[66596,1,"𐑌"],[66597,1,"𐑍"],[66598,1,"𐑎"],[66599,1,"𐑏"],[[66600,66637],2],[[66638,66717],2],[[66718,66719],3],[[66720,66729],2],[[66730,66735],3],[66736,1,"𐓘"],[66737,1,"𐓙"],[66738,1,"𐓚"],[66739,1,"𐓛"],[66740,1,"𐓜"],[66741,1,"𐓝"],[66742,1,"𐓞"],[66743,1,"𐓟"],[66744,1,"𐓠"],[66745,1,"𐓡"],[66746,1,"𐓢"],[66747,1,"𐓣"],[66748,1,"𐓤"],[66749,1,"𐓥"],[66750,1,"𐓦"],[66751,1,"𐓧"],[66752,1,"𐓨"],[66753,1,"𐓩"],[66754,1,"𐓪"],[66755,1,"𐓫"],[66756,1,"𐓬"],[66757,1,"𐓭"],[66758,1,"𐓮"],[66759,1,"𐓯"],[66760,1,"𐓰"],[66761,1,"𐓱"],[66762,1,"𐓲"],[66763,1,"𐓳"],[66764,1,"𐓴"],[66765,1,"𐓵"],[66766,1,"𐓶"],[66767,1,"𐓷"],[66768,1,"𐓸"],[66769,1,"𐓹"],[66770,1,"𐓺"],[66771,1,"𐓻"],[[66772,66775],3],[[66776,66811],2],[[66812,66815],3],[[66816,66855],2],[[66856,66863],3],[[66864,66915],2],[[66916,66926],3],[66927,2],[66928,1,"𐖗"],[66929,1,"𐖘"],[66930,1,"𐖙"],[66931,1,"𐖚"],[66932,1,"𐖛"],[66933,1,"𐖜"],[66934,1,"𐖝"],[66935,1,"𐖞"],[66936,1,"𐖟"],[66937,1,"𐖠"],[66938,1,"𐖡"],[66939,3],[66940,1,"𐖣"],[66941,1,"𐖤"],[66942,1,"𐖥"],[66943,1,"𐖦"],[66944,1,"𐖧"],[66945,1,"𐖨"],[66946,1,"𐖩"],[66947,1,"𐖪"],[66948,1,"𐖫"],[66949,1,"𐖬"],[66950,1,"𐖭"],[66951,1,"𐖮"],[66952,1,"𐖯"],[66953,1,"𐖰"],[66954,1,"𐖱"],[66955,3],[66956,1,"𐖳"],[66957,1,"𐖴"],[66958,1,"𐖵"],[66959,1,"𐖶"],[66960,1,"𐖷"],[66961,1,"𐖸"],[66962,1,"𐖹"],[66963,3],[66964,1,"𐖻"],[66965,1,"𐖼"],[66966,3],[[66967,66977],2],[66978,3],[[66979,66993],2],[66994,3],[[66995,67001],2],[67002,3],[[67003,67004],2],[[67005,67007],3],[[67008,67059],2],[[67060,67071],3],[[67072,67382],2],[[67383,67391],3],[[67392,67413],2],[[67414,67423],3],[[67424,67431],2],[[67432,67455],3],[67456,2],[67457,1,"ː"],[67458,1,"ˑ"],[67459,1,"æ"],[67460,1,"ʙ"],[67461,1,"ɓ"],[67462,3],[67463,1,"ʣ"],[67464,1,"ꭦ"],[67465,1,"ʥ"],[67466,1,"ʤ"],[67467,1,"ɖ"],[67468,1,"ɗ"],[67469,1,"ᶑ"],[67470,1,"ɘ"],[67471,1,"ɞ"],[67472,1,"ʩ"],[67473,1,"ɤ"],[67474,1,"ɢ"],[67475,1,"ɠ"],[67476,1,"ʛ"],[67477,1,"ħ"],[67478,1,"ʜ"],[67479,1,"ɧ"],[67480,1,"ʄ"],[67481,1,"ʪ"],[67482,1,"ʫ"],[67483,1,"ɬ"],[67484,1,"𝼄"],[67485,1,"ꞎ"],[67486,1,"ɮ"],[67487,1,"𝼅"],[67488,1,"ʎ"],[67489,1,"𝼆"],[67490,1,"ø"],[67491,1,"ɶ"],[67492,1,"ɷ"],[67493,1,"q"],[67494,1,"ɺ"],[67495,1,"𝼈"],[67496,1,"ɽ"],[67497,1,"ɾ"],[67498,1,"ʀ"],[67499,1,"ʨ"],[67500,1,"ʦ"],[67501,1,"ꭧ"],[67502,1,"ʧ"],[67503,1,"ʈ"],[67504,1,"ⱱ"],[67505,3],[67506,1,"ʏ"],[67507,1,"ʡ"],[67508,1,"ʢ"],[67509,1,"ʘ"],[67510,1,"ǀ"],[67511,1,"ǁ"],[67512,1,"ǂ"],[67513,1,"𝼊"],[67514,1,"𝼞"],[[67515,67583],3],[[67584,67589],2],[[67590,67591],3],[67592,2],[67593,3],[[67594,67637],2],[67638,3],[[67639,67640],2],[[67641,67643],3],[67644,2],[[67645,67646],3],[67647,2],[[67648,67669],2],[67670,3],[[67671,67679],2],[[67680,67702],2],[[67703,67711],2],[[67712,67742],2],[[67743,67750],3],[[67751,67759],2],[[67760,67807],3],[[67808,67826],2],[67827,3],[[67828,67829],2],[[67830,67834],3],[[67835,67839],2],[[67840,67861],2],[[67862,67865],2],[[67866,67867],2],[[67868,67870],3],[67871,2],[[67872,67897],2],[[67898,67902],3],[67903,2],[[67904,67967],3],[[67968,68023],2],[[68024,68027],3],[[68028,68029],2],[[68030,68031],2],[[68032,68047],2],[[68048,68049],3],[[68050,68095],2],[[68096,68099],2],[68100,3],[[68101,68102],2],[[68103,68107],3],[[68108,68115],2],[68116,3],[[68117,68119],2],[68120,3],[[68121,68147],2],[[68148,68149],2],[[68150,68151],3],[[68152,68154],2],[[68155,68158],3],[68159,2],[[68160,68167],2],[68168,2],[[68169,68175],3],[[68176,68184],2],[[68185,68191],3],[[68192,68220],2],[[68221,68223],2],[[68224,68252],2],[[68253,68255],2],[[68256,68287],3],[[68288,68295],2],[68296,2],[[68297,68326],2],[[68327,68330],3],[[68331,68342],2],[[68343,68351],3],[[68352,68405],2],[[68406,68408],3],[[68409,68415],2],[[68416,68437],2],[[68438,68439],3],[[68440,68447],2],[[68448,68466],2],[[68467,68471],3],[[68472,68479],2],[[68480,68497],2],[[68498,68504],3],[[68505,68508],2],[[68509,68520],3],[[68521,68527],2],[[68528,68607],3],[[68608,68680],2],[[68681,68735],3],[68736,1,"𐳀"],[68737,1,"𐳁"],[68738,1,"𐳂"],[68739,1,"𐳃"],[68740,1,"𐳄"],[68741,1,"𐳅"],[68742,1,"𐳆"],[68743,1,"𐳇"],[68744,1,"𐳈"],[68745,1,"𐳉"],[68746,1,"𐳊"],[68747,1,"𐳋"],[68748,1,"𐳌"],[68749,1,"𐳍"],[68750,1,"𐳎"],[68751,1,"𐳏"],[68752,1,"𐳐"],[68753,1,"𐳑"],[68754,1,"𐳒"],[68755,1,"𐳓"],[68756,1,"𐳔"],[68757,1,"𐳕"],[68758,1,"𐳖"],[68759,1,"𐳗"],[68760,1,"𐳘"],[68761,1,"𐳙"],[68762,1,"𐳚"],[68763,1,"𐳛"],[68764,1,"𐳜"],[68765,1,"𐳝"],[68766,1,"𐳞"],[68767,1,"𐳟"],[68768,1,"𐳠"],[68769,1,"𐳡"],[68770,1,"𐳢"],[68771,1,"𐳣"],[68772,1,"𐳤"],[68773,1,"𐳥"],[68774,1,"𐳦"],[68775,1,"𐳧"],[68776,1,"𐳨"],[68777,1,"𐳩"],[68778,1,"𐳪"],[68779,1,"𐳫"],[68780,1,"𐳬"],[68781,1,"𐳭"],[68782,1,"𐳮"],[68783,1,"𐳯"],[68784,1,"𐳰"],[68785,1,"𐳱"],[68786,1,"𐳲"],[[68787,68799],3],[[68800,68850],2],[[68851,68857],3],[[68858,68863],2],[[68864,68903],2],[[68904,68911],3],[[68912,68921],2],[[68922,68927],3],[[68928,68943],2],[68944,1,"𐵰"],[68945,1,"𐵱"],[68946,1,"𐵲"],[68947,1,"𐵳"],[68948,1,"𐵴"],[68949,1,"𐵵"],[68950,1,"𐵶"],[68951,1,"𐵷"],[68952,1,"𐵸"],[68953,1,"𐵹"],[68954,1,"𐵺"],[68955,1,"𐵻"],[68956,1,"𐵼"],[68957,1,"𐵽"],[68958,1,"𐵾"],[68959,1,"𐵿"],[68960,1,"𐶀"],[68961,1,"𐶁"],[68962,1,"𐶂"],[68963,1,"𐶃"],[68964,1,"𐶄"],[68965,1,"𐶅"],[[68966,68968],3],[[68969,68973],2],[68974,2],[[68975,68997],2],[[68998,69005],3],[[69006,69007],2],[[69008,69215],3],[[69216,69246],2],[69247,3],[[69248,69289],2],[69290,3],[[69291,69292],2],[69293,2],[[69294,69295],3],[[69296,69297],2],[[69298,69313],3],[[69314,69316],2],[[69317,69371],3],[69372,2],[[69373,69375],2],[[69376,69404],2],[[69405,69414],2],[69415,2],[[69416,69423],3],[[69424,69456],2],[[69457,69465],2],[[69466,69487],3],[[69488,69509],2],[[69510,69513],2],[[69514,69551],3],[[69552,69572],2],[[69573,69579],2],[[69580,69599],3],[[69600,69622],2],[[69623,69631],3],[[69632,69702],2],[[69703,69709],2],[[69710,69713],3],[[69714,69733],2],[[69734,69743],2],[[69744,69749],2],[[69750,69758],3],[69759,2],[[69760,69818],2],[[69819,69820],2],[69821,3],[[69822,69825],2],[69826,2],[[69827,69836],3],[69837,3],[[69838,69839],3],[[69840,69864],2],[[69865,69871],3],[[69872,69881],2],[[69882,69887],3],[[69888,69940],2],[69941,3],[[69942,69951],2],[[69952,69955],2],[[69956,69958],2],[69959,2],[[69960,69967],3],[[69968,70003],2],[[70004,70005],2],[70006,2],[[70007,70015],3],[[70016,70084],2],[[70085,70088],2],[[70089,70092],2],[70093,2],[[70094,70095],2],[[70096,70105],2],[70106,2],[70107,2],[70108,2],[[70109,70111],2],[70112,3],[[70113,70132],2],[[70133,70143],3],[[70144,70161],2],[70162,3],[[70163,70199],2],[[70200,70205],2],[70206,2],[[70207,70209],2],[[70210,70271],3],[[70272,70278],2],[70279,3],[70280,2],[70281,3],[[70282,70285],2],[70286,3],[[70287,70301],2],[70302,3],[[70303,70312],2],[70313,2],[[70314,70319],3],[[70320,70378],2],[[70379,70383],3],[[70384,70393],2],[[70394,70399],3],[70400,2],[[70401,70403],2],[70404,3],[[70405,70412],2],[[70413,70414],3],[[70415,70416],2],[[70417,70418],3],[[70419,70440],2],[70441,3],[[70442,70448],2],[70449,3],[[70450,70451],2],[70452,3],[[70453,70457],2],[70458,3],[70459,2],[[70460,70468],2],[[70469,70470],3],[[70471,70472],2],[[70473,70474],3],[[70475,70477],2],[[70478,70479],3],[70480,2],[[70481,70486],3],[70487,2],[[70488,70492],3],[[70493,70499],2],[[70500,70501],3],[[70502,70508],2],[[70509,70511],3],[[70512,70516],2],[[70517,70527],3],[[70528,70537],2],[70538,3],[70539,2],[[70540,70541],3],[70542,2],[70543,3],[[70544,70581],2],[70582,3],[[70583,70592],2],[70593,3],[70594,2],[[70595,70596],3],[70597,2],[70598,3],[[70599,70602],2],[70603,3],[[70604,70611],2],[[70612,70613],2],[70614,3],[[70615,70616],2],[[70617,70624],3],[[70625,70626],2],[[70627,70655],3],[[70656,70730],2],[[70731,70735],2],[[70736,70745],2],[70746,2],[70747,2],[70748,3],[70749,2],[70750,2],[70751,2],[[70752,70753],2],[[70754,70783],3],[[70784,70853],2],[70854,2],[70855,2],[[70856,70863],3],[[70864,70873],2],[[70874,71039],3],[[71040,71093],2],[[71094,71095],3],[[71096,71104],2],[[71105,71113],2],[[71114,71127],2],[[71128,71133],2],[[71134,71167],3],[[71168,71232],2],[[71233,71235],2],[71236,2],[[71237,71247],3],[[71248,71257],2],[[71258,71263],3],[[71264,71276],2],[[71277,71295],3],[[71296,71351],2],[71352,2],[71353,2],[[71354,71359],3],[[71360,71369],2],[[71370,71375],3],[[71376,71395],2],[[71396,71423],3],[[71424,71449],2],[71450,2],[[71451,71452],3],[[71453,71467],2],[[71468,71471],3],[[71472,71481],2],[[71482,71487],2],[[71488,71494],2],[[71495,71679],3],[[71680,71738],2],[71739,2],[[71740,71839],3],[71840,1,"𑣀"],[71841,1,"𑣁"],[71842,1,"𑣂"],[71843,1,"𑣃"],[71844,1,"𑣄"],[71845,1,"𑣅"],[71846,1,"𑣆"],[71847,1,"𑣇"],[71848,1,"𑣈"],[71849,1,"𑣉"],[71850,1,"𑣊"],[71851,1,"𑣋"],[71852,1,"𑣌"],[71853,1,"𑣍"],[71854,1,"𑣎"],[71855,1,"𑣏"],[71856,1,"𑣐"],[71857,1,"𑣑"],[71858,1,"𑣒"],[71859,1,"𑣓"],[71860,1,"𑣔"],[71861,1,"𑣕"],[71862,1,"𑣖"],[71863,1,"𑣗"],[71864,1,"𑣘"],[71865,1,"𑣙"],[71866,1,"𑣚"],[71867,1,"𑣛"],[71868,1,"𑣜"],[71869,1,"𑣝"],[71870,1,"𑣞"],[71871,1,"𑣟"],[[71872,71913],2],[[71914,71922],2],[[71923,71934],3],[71935,2],[[71936,71942],2],[[71943,71944],3],[71945,2],[[71946,71947],3],[[71948,71955],2],[71956,3],[[71957,71958],2],[71959,3],[[71960,71989],2],[71990,3],[[71991,71992],2],[[71993,71994],3],[[71995,72003],2],[[72004,72006],2],[[72007,72015],3],[[72016,72025],2],[[72026,72095],3],[[72096,72103],2],[[72104,72105],3],[[72106,72151],2],[[72152,72153],3],[[72154,72161],2],[72162,2],[[72163,72164],2],[[72165,72191],3],[[72192,72254],2],[[72255,72262],2],[72263,2],[[72264,72271],3],[[72272,72323],2],[[72324,72325],2],[[72326,72345],2],[[72346,72348],2],[72349,2],[[72350,72354],2],[[72355,72367],3],[[72368,72383],2],[[72384,72440],2],[[72441,72447],3],[[72448,72457],2],[[72458,72639],3],[[72640,72672],2],[72673,2],[[72674,72687],3],[[72688,72697],2],[[72698,72703],3],[[72704,72712],2],[72713,3],[[72714,72758],2],[72759,3],[[72760,72768],2],[[72769,72773],2],[[72774,72783],3],[[72784,72793],2],[[72794,72812],2],[[72813,72815],3],[[72816,72817],2],[[72818,72847],2],[[72848,72849],3],[[72850,72871],2],[72872,3],[[72873,72886],2],[[72887,72959],3],[[72960,72966],2],[72967,3],[[72968,72969],2],[72970,3],[[72971,73014],2],[[73015,73017],3],[73018,2],[73019,3],[[73020,73021],2],[73022,3],[[73023,73031],2],[[73032,73039],3],[[73040,73049],2],[[73050,73055],3],[[73056,73061],2],[73062,3],[[73063,73064],2],[73065,3],[[73066,73102],2],[73103,3],[[73104,73105],2],[73106,3],[[73107,73112],2],[[73113,73119],3],[[73120,73129],2],[[73130,73439],3],[[73440,73462],2],[[73463,73464],2],[[73465,73471],3],[[73472,73488],2],[73489,3],[[73490,73530],2],[[73531,73533],3],[[73534,73538],2],[[73539,73551],2],[[73552,73561],2],[73562,2],[[73563,73647],3],[73648,2],[[73649,73663],3],[[73664,73713],2],[[73714,73726],3],[73727,2],[[73728,74606],2],[[74607,74648],2],[74649,2],[[74650,74751],3],[[74752,74850],2],[[74851,74862],2],[74863,3],[[74864,74867],2],[74868,2],[[74869,74879],3],[[74880,75075],2],[[75076,77711],3],[[77712,77808],2],[[77809,77810],2],[[77811,77823],3],[[77824,78894],2],[78895,2],[[78896,78904],3],[[78905,78911],3],[[78912,78933],2],[[78934,78943],3],[[78944,82938],2],[[82939,82943],3],[[82944,83526],2],[[83527,90367],3],[[90368,90425],2],[[90426,92159],3],[[92160,92728],2],[[92729,92735],3],[[92736,92766],2],[92767,3],[[92768,92777],2],[[92778,92781],3],[[92782,92783],2],[[92784,92862],2],[92863,3],[[92864,92873],2],[[92874,92879],3],[[92880,92909],2],[[92910,92911],3],[[92912,92916],2],[92917,2],[[92918,92927],3],[[92928,92982],2],[[92983,92991],2],[[92992,92995],2],[[92996,92997],2],[[92998,93007],3],[[93008,93017],2],[93018,3],[[93019,93025],2],[93026,3],[[93027,93047],2],[[93048,93052],3],[[93053,93071],2],[[93072,93503],3],[[93504,93548],2],[[93549,93551],2],[[93552,93561],2],[[93562,93759],3],[93760,1,"𖹠"],[93761,1,"𖹡"],[93762,1,"𖹢"],[93763,1,"𖹣"],[93764,1,"𖹤"],[93765,1,"𖹥"],[93766,1,"𖹦"],[93767,1,"𖹧"],[93768,1,"𖹨"],[93769,1,"𖹩"],[93770,1,"𖹪"],[93771,1,"𖹫"],[93772,1,"𖹬"],[93773,1,"𖹭"],[93774,1,"𖹮"],[93775,1,"𖹯"],[93776,1,"𖹰"],[93777,1,"𖹱"],[93778,1,"𖹲"],[93779,1,"𖹳"],[93780,1,"𖹴"],[93781,1,"𖹵"],[93782,1,"𖹶"],[93783,1,"𖹷"],[93784,1,"𖹸"],[93785,1,"𖹹"],[93786,1,"𖹺"],[93787,1,"𖹻"],[93788,1,"𖹼"],[93789,1,"𖹽"],[93790,1,"𖹾"],[93791,1,"𖹿"],[[93792,93823],2],[[93824,93850],2],[[93851,93951],3],[[93952,94020],2],[[94021,94026],2],[[94027,94030],3],[94031,2],[[94032,94078],2],[[94079,94087],2],[[94088,94094],3],[[94095,94111],2],[[94112,94175],3],[94176,2],[94177,2],[94178,2],[94179,2],[94180,2],[[94181,94191],3],[[94192,94193],2],[[94194,94207],3],[[94208,100332],2],[[100333,100337],2],[[100338,100343],2],[[100344,100351],3],[[100352,101106],2],[[101107,101589],2],[[101590,101630],3],[101631,2],[[101632,101640],2],[[101641,110575],3],[[110576,110579],2],[110580,3],[[110581,110587],2],[110588,3],[[110589,110590],2],[110591,3],[[110592,110593],2],[[110594,110878],2],[[110879,110882],2],[[110883,110897],3],[110898,2],[[110899,110927],3],[[110928,110930],2],[[110931,110932],3],[110933,2],[[110934,110947],3],[[110948,110951],2],[[110952,110959],3],[[110960,111355],2],[[111356,113663],3],[[113664,113770],2],[[113771,113775],3],[[113776,113788],2],[[113789,113791],3],[[113792,113800],2],[[113801,113807],3],[[113808,113817],2],[[113818,113819],3],[113820,2],[[113821,113822],2],[113823,2],[[113824,113827],7],[[113828,117759],3],[[117760,117973],2],[117974,1,"a"],[117975,1,"b"],[117976,1,"c"],[117977,1,"d"],[117978,1,"e"],[117979,1,"f"],[117980,1,"g"],[117981,1,"h"],[117982,1,"i"],[117983,1,"j"],[117984,1,"k"],[117985,1,"l"],[117986,1,"m"],[117987,1,"n"],[117988,1,"o"],[117989,1,"p"],[117990,1,"q"],[117991,1,"r"],[117992,1,"s"],[117993,1,"t"],[117994,1,"u"],[117995,1,"v"],[117996,1,"w"],[117997,1,"x"],[117998,1,"y"],[117999,1,"z"],[118000,1,"0"],[118001,1,"1"],[118002,1,"2"],[118003,1,"3"],[118004,1,"4"],[118005,1,"5"],[118006,1,"6"],[118007,1,"7"],[118008,1,"8"],[118009,1,"9"],[[118010,118015],3],[[118016,118451],2],[[118452,118527],3],[[118528,118573],2],[[118574,118575],3],[[118576,118598],2],[[118599,118607],3],[[118608,118723],2],[[118724,118783],3],[[118784,119029],2],[[119030,119039],3],[[119040,119078],2],[[119079,119080],3],[119081,2],[[119082,119133],2],[119134,1,"𝅗𝅥"],[119135,1,"𝅘𝅥"],[119136,1,"𝅘𝅥𝅮"],[119137,1,"𝅘𝅥𝅯"],[119138,1,"𝅘𝅥𝅰"],[119139,1,"𝅘𝅥𝅱"],[119140,1,"𝅘𝅥𝅲"],[[119141,119154],2],[[119155,119162],7],[[119163,119226],2],[119227,1,"𝆹𝅥"],[119228,1,"𝆺𝅥"],[119229,1,"𝆹𝅥𝅮"],[119230,1,"𝆺𝅥𝅮"],[119231,1,"𝆹𝅥𝅯"],[119232,1,"𝆺𝅥𝅯"],[[119233,119261],2],[[119262,119272],2],[[119273,119274],2],[[119275,119295],3],[[119296,119365],2],[[119366,119487],3],[[119488,119507],2],[[119508,119519],3],[[119520,119539],2],[[119540,119551],3],[[119552,119638],2],[[119639,119647],3],[[119648,119665],2],[[119666,119672],2],[[119673,119807],3],[119808,1,"a"],[119809,1,"b"],[119810,1,"c"],[119811,1,"d"],[119812,1,"e"],[119813,1,"f"],[119814,1,"g"],[119815,1,"h"],[119816,1,"i"],[119817,1,"j"],[119818,1,"k"],[119819,1,"l"],[119820,1,"m"],[119821,1,"n"],[119822,1,"o"],[119823,1,"p"],[119824,1,"q"],[119825,1,"r"],[119826,1,"s"],[119827,1,"t"],[119828,1,"u"],[119829,1,"v"],[119830,1,"w"],[119831,1,"x"],[119832,1,"y"],[119833,1,"z"],[119834,1,"a"],[119835,1,"b"],[119836,1,"c"],[119837,1,"d"],[119838,1,"e"],[119839,1,"f"],[119840,1,"g"],[119841,1,"h"],[119842,1,"i"],[119843,1,"j"],[119844,1,"k"],[119845,1,"l"],[119846,1,"m"],[119847,1,"n"],[119848,1,"o"],[119849,1,"p"],[119850,1,"q"],[119851,1,"r"],[119852,1,"s"],[119853,1,"t"],[119854,1,"u"],[119855,1,"v"],[119856,1,"w"],[119857,1,"x"],[119858,1,"y"],[119859,1,"z"],[119860,1,"a"],[119861,1,"b"],[119862,1,"c"],[119863,1,"d"],[119864,1,"e"],[119865,1,"f"],[119866,1,"g"],[119867,1,"h"],[119868,1,"i"],[119869,1,"j"],[119870,1,"k"],[119871,1,"l"],[119872,1,"m"],[119873,1,"n"],[119874,1,"o"],[119875,1,"p"],[119876,1,"q"],[119877,1,"r"],[119878,1,"s"],[119879,1,"t"],[119880,1,"u"],[119881,1,"v"],[119882,1,"w"],[119883,1,"x"],[119884,1,"y"],[119885,1,"z"],[119886,1,"a"],[119887,1,"b"],[119888,1,"c"],[119889,1,"d"],[119890,1,"e"],[119891,1,"f"],[119892,1,"g"],[119893,3],[119894,1,"i"],[119895,1,"j"],[119896,1,"k"],[119897,1,"l"],[119898,1,"m"],[119899,1,"n"],[119900,1,"o"],[119901,1,"p"],[119902,1,"q"],[119903,1,"r"],[119904,1,"s"],[119905,1,"t"],[119906,1,"u"],[119907,1,"v"],[119908,1,"w"],[119909,1,"x"],[119910,1,"y"],[119911,1,"z"],[119912,1,"a"],[119913,1,"b"],[119914,1,"c"],[119915,1,"d"],[119916,1,"e"],[119917,1,"f"],[119918,1,"g"],[119919,1,"h"],[119920,1,"i"],[119921,1,"j"],[119922,1,"k"],[119923,1,"l"],[119924,1,"m"],[119925,1,"n"],[119926,1,"o"],[119927,1,"p"],[119928,1,"q"],[119929,1,"r"],[119930,1,"s"],[119931,1,"t"],[119932,1,"u"],[119933,1,"v"],[119934,1,"w"],[119935,1,"x"],[119936,1,"y"],[119937,1,"z"],[119938,1,"a"],[119939,1,"b"],[119940,1,"c"],[119941,1,"d"],[119942,1,"e"],[119943,1,"f"],[119944,1,"g"],[119945,1,"h"],[119946,1,"i"],[119947,1,"j"],[119948,1,"k"],[119949,1,"l"],[119950,1,"m"],[119951,1,"n"],[119952,1,"o"],[119953,1,"p"],[119954,1,"q"],[119955,1,"r"],[119956,1,"s"],[119957,1,"t"],[119958,1,"u"],[119959,1,"v"],[119960,1,"w"],[119961,1,"x"],[119962,1,"y"],[119963,1,"z"],[119964,1,"a"],[119965,3],[119966,1,"c"],[119967,1,"d"],[[119968,119969],3],[119970,1,"g"],[[119971,119972],3],[119973,1,"j"],[119974,1,"k"],[[119975,119976],3],[119977,1,"n"],[119978,1,"o"],[119979,1,"p"],[119980,1,"q"],[119981,3],[119982,1,"s"],[119983,1,"t"],[119984,1,"u"],[119985,1,"v"],[119986,1,"w"],[119987,1,"x"],[119988,1,"y"],[119989,1,"z"],[119990,1,"a"],[119991,1,"b"],[119992,1,"c"],[119993,1,"d"],[119994,3],[119995,1,"f"],[119996,3],[119997,1,"h"],[119998,1,"i"],[119999,1,"j"],[120000,1,"k"],[120001,1,"l"],[120002,1,"m"],[120003,1,"n"],[120004,3],[120005,1,"p"],[120006,1,"q"],[120007,1,"r"],[120008,1,"s"],[120009,1,"t"],[120010,1,"u"],[120011,1,"v"],[120012,1,"w"],[120013,1,"x"],[120014,1,"y"],[120015,1,"z"],[120016,1,"a"],[120017,1,"b"],[120018,1,"c"],[120019,1,"d"],[120020,1,"e"],[120021,1,"f"],[120022,1,"g"],[120023,1,"h"],[120024,1,"i"],[120025,1,"j"],[120026,1,"k"],[120027,1,"l"],[120028,1,"m"],[120029,1,"n"],[120030,1,"o"],[120031,1,"p"],[120032,1,"q"],[120033,1,"r"],[120034,1,"s"],[120035,1,"t"],[120036,1,"u"],[120037,1,"v"],[120038,1,"w"],[120039,1,"x"],[120040,1,"y"],[120041,1,"z"],[120042,1,"a"],[120043,1,"b"],[120044,1,"c"],[120045,1,"d"],[120046,1,"e"],[120047,1,"f"],[120048,1,"g"],[120049,1,"h"],[120050,1,"i"],[120051,1,"j"],[120052,1,"k"],[120053,1,"l"],[120054,1,"m"],[120055,1,"n"],[120056,1,"o"],[120057,1,"p"],[120058,1,"q"],[120059,1,"r"],[120060,1,"s"],[120061,1,"t"],[120062,1,"u"],[120063,1,"v"],[120064,1,"w"],[120065,1,"x"],[120066,1,"y"],[120067,1,"z"],[120068,1,"a"],[120069,1,"b"],[120070,3],[120071,1,"d"],[120072,1,"e"],[120073,1,"f"],[120074,1,"g"],[[120075,120076],3],[120077,1,"j"],[120078,1,"k"],[120079,1,"l"],[120080,1,"m"],[120081,1,"n"],[120082,1,"o"],[120083,1,"p"],[120084,1,"q"],[120085,3],[120086,1,"s"],[120087,1,"t"],[120088,1,"u"],[120089,1,"v"],[120090,1,"w"],[120091,1,"x"],[120092,1,"y"],[120093,3],[120094,1,"a"],[120095,1,"b"],[120096,1,"c"],[120097,1,"d"],[120098,1,"e"],[120099,1,"f"],[120100,1,"g"],[120101,1,"h"],[120102,1,"i"],[120103,1,"j"],[120104,1,"k"],[120105,1,"l"],[120106,1,"m"],[120107,1,"n"],[120108,1,"o"],[120109,1,"p"],[120110,1,"q"],[120111,1,"r"],[120112,1,"s"],[120113,1,"t"],[120114,1,"u"],[120115,1,"v"],[120116,1,"w"],[120117,1,"x"],[120118,1,"y"],[120119,1,"z"],[120120,1,"a"],[120121,1,"b"],[120122,3],[120123,1,"d"],[120124,1,"e"],[120125,1,"f"],[120126,1,"g"],[120127,3],[120128,1,"i"],[120129,1,"j"],[120130,1,"k"],[120131,1,"l"],[120132,1,"m"],[120133,3],[120134,1,"o"],[[120135,120137],3],[120138,1,"s"],[120139,1,"t"],[120140,1,"u"],[120141,1,"v"],[120142,1,"w"],[120143,1,"x"],[120144,1,"y"],[120145,3],[120146,1,"a"],[120147,1,"b"],[120148,1,"c"],[120149,1,"d"],[120150,1,"e"],[120151,1,"f"],[120152,1,"g"],[120153,1,"h"],[120154,1,"i"],[120155,1,"j"],[120156,1,"k"],[120157,1,"l"],[120158,1,"m"],[120159,1,"n"],[120160,1,"o"],[120161,1,"p"],[120162,1,"q"],[120163,1,"r"],[120164,1,"s"],[120165,1,"t"],[120166,1,"u"],[120167,1,"v"],[120168,1,"w"],[120169,1,"x"],[120170,1,"y"],[120171,1,"z"],[120172,1,"a"],[120173,1,"b"],[120174,1,"c"],[120175,1,"d"],[120176,1,"e"],[120177,1,"f"],[120178,1,"g"],[120179,1,"h"],[120180,1,"i"],[120181,1,"j"],[120182,1,"k"],[120183,1,"l"],[120184,1,"m"],[120185,1,"n"],[120186,1,"o"],[120187,1,"p"],[120188,1,"q"],[120189,1,"r"],[120190,1,"s"],[120191,1,"t"],[120192,1,"u"],[120193,1,"v"],[120194,1,"w"],[120195,1,"x"],[120196,1,"y"],[120197,1,"z"],[120198,1,"a"],[120199,1,"b"],[120200,1,"c"],[120201,1,"d"],[120202,1,"e"],[120203,1,"f"],[120204,1,"g"],[120205,1,"h"],[120206,1,"i"],[120207,1,"j"],[120208,1,"k"],[120209,1,"l"],[120210,1,"m"],[120211,1,"n"],[120212,1,"o"],[120213,1,"p"],[120214,1,"q"],[120215,1,"r"],[120216,1,"s"],[120217,1,"t"],[120218,1,"u"],[120219,1,"v"],[120220,1,"w"],[120221,1,"x"],[120222,1,"y"],[120223,1,"z"],[120224,1,"a"],[120225,1,"b"],[120226,1,"c"],[120227,1,"d"],[120228,1,"e"],[120229,1,"f"],[120230,1,"g"],[120231,1,"h"],[120232,1,"i"],[120233,1,"j"],[120234,1,"k"],[120235,1,"l"],[120236,1,"m"],[120237,1,"n"],[120238,1,"o"],[120239,1,"p"],[120240,1,"q"],[120241,1,"r"],[120242,1,"s"],[120243,1,"t"],[120244,1,"u"],[120245,1,"v"],[120246,1,"w"],[120247,1,"x"],[120248,1,"y"],[120249,1,"z"],[120250,1,"a"],[120251,1,"b"],[120252,1,"c"],[120253,1,"d"],[120254,1,"e"],[120255,1,"f"],[120256,1,"g"],[120257,1,"h"],[120258,1,"i"],[120259,1,"j"],[120260,1,"k"],[120261,1,"l"],[120262,1,"m"],[120263,1,"n"],[120264,1,"o"],[120265,1,"p"],[120266,1,"q"],[120267,1,"r"],[120268,1,"s"],[120269,1,"t"],[120270,1,"u"],[120271,1,"v"],[120272,1,"w"],[120273,1,"x"],[120274,1,"y"],[120275,1,"z"],[120276,1,"a"],[120277,1,"b"],[120278,1,"c"],[120279,1,"d"],[120280,1,"e"],[120281,1,"f"],[120282,1,"g"],[120283,1,"h"],[120284,1,"i"],[120285,1,"j"],[120286,1,"k"],[120287,1,"l"],[120288,1,"m"],[120289,1,"n"],[120290,1,"o"],[120291,1,"p"],[120292,1,"q"],[120293,1,"r"],[120294,1,"s"],[120295,1,"t"],[120296,1,"u"],[120297,1,"v"],[120298,1,"w"],[120299,1,"x"],[120300,1,"y"],[120301,1,"z"],[120302,1,"a"],[120303,1,"b"],[120304,1,"c"],[120305,1,"d"],[120306,1,"e"],[120307,1,"f"],[120308,1,"g"],[120309,1,"h"],[120310,1,"i"],[120311,1,"j"],[120312,1,"k"],[120313,1,"l"],[120314,1,"m"],[120315,1,"n"],[120316,1,"o"],[120317,1,"p"],[120318,1,"q"],[120319,1,"r"],[120320,1,"s"],[120321,1,"t"],[120322,1,"u"],[120323,1,"v"],[120324,1,"w"],[120325,1,"x"],[120326,1,"y"],[120327,1,"z"],[120328,1,"a"],[120329,1,"b"],[120330,1,"c"],[120331,1,"d"],[120332,1,"e"],[120333,1,"f"],[120334,1,"g"],[120335,1,"h"],[120336,1,"i"],[120337,1,"j"],[120338,1,"k"],[120339,1,"l"],[120340,1,"m"],[120341,1,"n"],[120342,1,"o"],[120343,1,"p"],[120344,1,"q"],[120345,1,"r"],[120346,1,"s"],[120347,1,"t"],[120348,1,"u"],[120349,1,"v"],[120350,1,"w"],[120351,1,"x"],[120352,1,"y"],[120353,1,"z"],[120354,1,"a"],[120355,1,"b"],[120356,1,"c"],[120357,1,"d"],[120358,1,"e"],[120359,1,"f"],[120360,1,"g"],[120361,1,"h"],[120362,1,"i"],[120363,1,"j"],[120364,1,"k"],[120365,1,"l"],[120366,1,"m"],[120367,1,"n"],[120368,1,"o"],[120369,1,"p"],[120370,1,"q"],[120371,1,"r"],[120372,1,"s"],[120373,1,"t"],[120374,1,"u"],[120375,1,"v"],[120376,1,"w"],[120377,1,"x"],[120378,1,"y"],[120379,1,"z"],[120380,1,"a"],[120381,1,"b"],[120382,1,"c"],[120383,1,"d"],[120384,1,"e"],[120385,1,"f"],[120386,1,"g"],[120387,1,"h"],[120388,1,"i"],[120389,1,"j"],[120390,1,"k"],[120391,1,"l"],[120392,1,"m"],[120393,1,"n"],[120394,1,"o"],[120395,1,"p"],[120396,1,"q"],[120397,1,"r"],[120398,1,"s"],[120399,1,"t"],[120400,1,"u"],[120401,1,"v"],[120402,1,"w"],[120403,1,"x"],[120404,1,"y"],[120405,1,"z"],[120406,1,"a"],[120407,1,"b"],[120408,1,"c"],[120409,1,"d"],[120410,1,"e"],[120411,1,"f"],[120412,1,"g"],[120413,1,"h"],[120414,1,"i"],[120415,1,"j"],[120416,1,"k"],[120417,1,"l"],[120418,1,"m"],[120419,1,"n"],[120420,1,"o"],[120421,1,"p"],[120422,1,"q"],[120423,1,"r"],[120424,1,"s"],[120425,1,"t"],[120426,1,"u"],[120427,1,"v"],[120428,1,"w"],[120429,1,"x"],[120430,1,"y"],[120431,1,"z"],[120432,1,"a"],[120433,1,"b"],[120434,1,"c"],[120435,1,"d"],[120436,1,"e"],[120437,1,"f"],[120438,1,"g"],[120439,1,"h"],[120440,1,"i"],[120441,1,"j"],[120442,1,"k"],[120443,1,"l"],[120444,1,"m"],[120445,1,"n"],[120446,1,"o"],[120447,1,"p"],[120448,1,"q"],[120449,1,"r"],[120450,1,"s"],[120451,1,"t"],[120452,1,"u"],[120453,1,"v"],[120454,1,"w"],[120455,1,"x"],[120456,1,"y"],[120457,1,"z"],[120458,1,"a"],[120459,1,"b"],[120460,1,"c"],[120461,1,"d"],[120462,1,"e"],[120463,1,"f"],[120464,1,"g"],[120465,1,"h"],[120466,1,"i"],[120467,1,"j"],[120468,1,"k"],[120469,1,"l"],[120470,1,"m"],[120471,1,"n"],[120472,1,"o"],[120473,1,"p"],[120474,1,"q"],[120475,1,"r"],[120476,1,"s"],[120477,1,"t"],[120478,1,"u"],[120479,1,"v"],[120480,1,"w"],[120481,1,"x"],[120482,1,"y"],[120483,1,"z"],[120484,1,"ı"],[120485,1,"ȷ"],[[120486,120487],3],[120488,1,"α"],[120489,1,"β"],[120490,1,"γ"],[120491,1,"δ"],[120492,1,"ε"],[120493,1,"ζ"],[120494,1,"η"],[120495,1,"θ"],[120496,1,"ι"],[120497,1,"κ"],[120498,1,"λ"],[120499,1,"μ"],[120500,1,"ν"],[120501,1,"ξ"],[120502,1,"ο"],[120503,1,"π"],[120504,1,"ρ"],[120505,1,"θ"],[120506,1,"σ"],[120507,1,"τ"],[120508,1,"υ"],[120509,1,"φ"],[120510,1,"χ"],[120511,1,"ψ"],[120512,1,"ω"],[120513,1,"∇"],[120514,1,"α"],[120515,1,"β"],[120516,1,"γ"],[120517,1,"δ"],[120518,1,"ε"],[120519,1,"ζ"],[120520,1,"η"],[120521,1,"θ"],[120522,1,"ι"],[120523,1,"κ"],[120524,1,"λ"],[120525,1,"μ"],[120526,1,"ν"],[120527,1,"ξ"],[120528,1,"ο"],[120529,1,"π"],[120530,1,"ρ"],[[120531,120532],1,"σ"],[120533,1,"τ"],[120534,1,"υ"],[120535,1,"φ"],[120536,1,"χ"],[120537,1,"ψ"],[120538,1,"ω"],[120539,1,"∂"],[120540,1,"ε"],[120541,1,"θ"],[120542,1,"κ"],[120543,1,"φ"],[120544,1,"ρ"],[120545,1,"π"],[120546,1,"α"],[120547,1,"β"],[120548,1,"γ"],[120549,1,"δ"],[120550,1,"ε"],[120551,1,"ζ"],[120552,1,"η"],[120553,1,"θ"],[120554,1,"ι"],[120555,1,"κ"],[120556,1,"λ"],[120557,1,"μ"],[120558,1,"ν"],[120559,1,"ξ"],[120560,1,"ο"],[120561,1,"π"],[120562,1,"ρ"],[120563,1,"θ"],[120564,1,"σ"],[120565,1,"τ"],[120566,1,"υ"],[120567,1,"φ"],[120568,1,"χ"],[120569,1,"ψ"],[120570,1,"ω"],[120571,1,"∇"],[120572,1,"α"],[120573,1,"β"],[120574,1,"γ"],[120575,1,"δ"],[120576,1,"ε"],[120577,1,"ζ"],[120578,1,"η"],[120579,1,"θ"],[120580,1,"ι"],[120581,1,"κ"],[120582,1,"λ"],[120583,1,"μ"],[120584,1,"ν"],[120585,1,"ξ"],[120586,1,"ο"],[120587,1,"π"],[120588,1,"ρ"],[[120589,120590],1,"σ"],[120591,1,"τ"],[120592,1,"υ"],[120593,1,"φ"],[120594,1,"χ"],[120595,1,"ψ"],[120596,1,"ω"],[120597,1,"∂"],[120598,1,"ε"],[120599,1,"θ"],[120600,1,"κ"],[120601,1,"φ"],[120602,1,"ρ"],[120603,1,"π"],[120604,1,"α"],[120605,1,"β"],[120606,1,"γ"],[120607,1,"δ"],[120608,1,"ε"],[120609,1,"ζ"],[120610,1,"η"],[120611,1,"θ"],[120612,1,"ι"],[120613,1,"κ"],[120614,1,"λ"],[120615,1,"μ"],[120616,1,"ν"],[120617,1,"ξ"],[120618,1,"ο"],[120619,1,"π"],[120620,1,"ρ"],[120621,1,"θ"],[120622,1,"σ"],[120623,1,"τ"],[120624,1,"υ"],[120625,1,"φ"],[120626,1,"χ"],[120627,1,"ψ"],[120628,1,"ω"],[120629,1,"∇"],[120630,1,"α"],[120631,1,"β"],[120632,1,"γ"],[120633,1,"δ"],[120634,1,"ε"],[120635,1,"ζ"],[120636,1,"η"],[120637,1,"θ"],[120638,1,"ι"],[120639,1,"κ"],[120640,1,"λ"],[120641,1,"μ"],[120642,1,"ν"],[120643,1,"ξ"],[120644,1,"ο"],[120645,1,"π"],[120646,1,"ρ"],[[120647,120648],1,"σ"],[120649,1,"τ"],[120650,1,"υ"],[120651,1,"φ"],[120652,1,"χ"],[120653,1,"ψ"],[120654,1,"ω"],[120655,1,"∂"],[120656,1,"ε"],[120657,1,"θ"],[120658,1,"κ"],[120659,1,"φ"],[120660,1,"ρ"],[120661,1,"π"],[120662,1,"α"],[120663,1,"β"],[120664,1,"γ"],[120665,1,"δ"],[120666,1,"ε"],[120667,1,"ζ"],[120668,1,"η"],[120669,1,"θ"],[120670,1,"ι"],[120671,1,"κ"],[120672,1,"λ"],[120673,1,"μ"],[120674,1,"ν"],[120675,1,"ξ"],[120676,1,"ο"],[120677,1,"π"],[120678,1,"ρ"],[120679,1,"θ"],[120680,1,"σ"],[120681,1,"τ"],[120682,1,"υ"],[120683,1,"φ"],[120684,1,"χ"],[120685,1,"ψ"],[120686,1,"ω"],[120687,1,"∇"],[120688,1,"α"],[120689,1,"β"],[120690,1,"γ"],[120691,1,"δ"],[120692,1,"ε"],[120693,1,"ζ"],[120694,1,"η"],[120695,1,"θ"],[120696,1,"ι"],[120697,1,"κ"],[120698,1,"λ"],[120699,1,"μ"],[120700,1,"ν"],[120701,1,"ξ"],[120702,1,"ο"],[120703,1,"π"],[120704,1,"ρ"],[[120705,120706],1,"σ"],[120707,1,"τ"],[120708,1,"υ"],[120709,1,"φ"],[120710,1,"χ"],[120711,1,"ψ"],[120712,1,"ω"],[120713,1,"∂"],[120714,1,"ε"],[120715,1,"θ"],[120716,1,"κ"],[120717,1,"φ"],[120718,1,"ρ"],[120719,1,"π"],[120720,1,"α"],[120721,1,"β"],[120722,1,"γ"],[120723,1,"δ"],[120724,1,"ε"],[120725,1,"ζ"],[120726,1,"η"],[120727,1,"θ"],[120728,1,"ι"],[120729,1,"κ"],[120730,1,"λ"],[120731,1,"μ"],[120732,1,"ν"],[120733,1,"ξ"],[120734,1,"ο"],[120735,1,"π"],[120736,1,"ρ"],[120737,1,"θ"],[120738,1,"σ"],[120739,1,"τ"],[120740,1,"υ"],[120741,1,"φ"],[120742,1,"χ"],[120743,1,"ψ"],[120744,1,"ω"],[120745,1,"∇"],[120746,1,"α"],[120747,1,"β"],[120748,1,"γ"],[120749,1,"δ"],[120750,1,"ε"],[120751,1,"ζ"],[120752,1,"η"],[120753,1,"θ"],[120754,1,"ι"],[120755,1,"κ"],[120756,1,"λ"],[120757,1,"μ"],[120758,1,"ν"],[120759,1,"ξ"],[120760,1,"ο"],[120761,1,"π"],[120762,1,"ρ"],[[120763,120764],1,"σ"],[120765,1,"τ"],[120766,1,"υ"],[120767,1,"φ"],[120768,1,"χ"],[120769,1,"ψ"],[120770,1,"ω"],[120771,1,"∂"],[120772,1,"ε"],[120773,1,"θ"],[120774,1,"κ"],[120775,1,"φ"],[120776,1,"ρ"],[120777,1,"π"],[[120778,120779],1,"ϝ"],[[120780,120781],3],[120782,1,"0"],[120783,1,"1"],[120784,1,"2"],[120785,1,"3"],[120786,1,"4"],[120787,1,"5"],[120788,1,"6"],[120789,1,"7"],[120790,1,"8"],[120791,1,"9"],[120792,1,"0"],[120793,1,"1"],[120794,1,"2"],[120795,1,"3"],[120796,1,"4"],[120797,1,"5"],[120798,1,"6"],[120799,1,"7"],[120800,1,"8"],[120801,1,"9"],[120802,1,"0"],[120803,1,"1"],[120804,1,"2"],[120805,1,"3"],[120806,1,"4"],[120807,1,"5"],[120808,1,"6"],[120809,1,"7"],[120810,1,"8"],[120811,1,"9"],[120812,1,"0"],[120813,1,"1"],[120814,1,"2"],[120815,1,"3"],[120816,1,"4"],[120817,1,"5"],[120818,1,"6"],[120819,1,"7"],[120820,1,"8"],[120821,1,"9"],[120822,1,"0"],[120823,1,"1"],[120824,1,"2"],[120825,1,"3"],[120826,1,"4"],[120827,1,"5"],[120828,1,"6"],[120829,1,"7"],[120830,1,"8"],[120831,1,"9"],[[120832,121343],2],[[121344,121398],2],[[121399,121402],2],[[121403,121452],2],[[121453,121460],2],[121461,2],[[121462,121475],2],[121476,2],[[121477,121483],2],[[121484,121498],3],[[121499,121503],2],[121504,3],[[121505,121519],2],[[121520,122623],3],[[122624,122654],2],[[122655,122660],3],[[122661,122666],2],[[122667,122879],3],[[122880,122886],2],[122887,3],[[122888,122904],2],[[122905,122906],3],[[122907,122913],2],[122914,3],[[122915,122916],2],[122917,3],[[122918,122922],2],[[122923,122927],3],[122928,1,"а"],[122929,1,"б"],[122930,1,"в"],[122931,1,"г"],[122932,1,"д"],[122933,1,"е"],[122934,1,"ж"],[122935,1,"з"],[122936,1,"и"],[122937,1,"к"],[122938,1,"л"],[122939,1,"м"],[122940,1,"о"],[122941,1,"п"],[122942,1,"р"],[122943,1,"с"],[122944,1,"т"],[122945,1,"у"],[122946,1,"ф"],[122947,1,"х"],[122948,1,"ц"],[122949,1,"ч"],[122950,1,"ш"],[122951,1,"ы"],[122952,1,"э"],[122953,1,"ю"],[122954,1,"ꚉ"],[122955,1,"ә"],[122956,1,"і"],[122957,1,"ј"],[122958,1,"ө"],[122959,1,"ү"],[122960,1,"ӏ"],[122961,1,"а"],[122962,1,"б"],[122963,1,"в"],[122964,1,"г"],[122965,1,"д"],[122966,1,"е"],[122967,1,"ж"],[122968,1,"з"],[122969,1,"и"],[122970,1,"к"],[122971,1,"л"],[122972,1,"о"],[122973,1,"п"],[122974,1,"с"],[122975,1,"у"],[122976,1,"ф"],[122977,1,"х"],[122978,1,"ц"],[122979,1,"ч"],[122980,1,"ш"],[122981,1,"ъ"],[122982,1,"ы"],[122983,1,"ґ"],[122984,1,"і"],[122985,1,"ѕ"],[122986,1,"џ"],[122987,1,"ҫ"],[122988,1,"ꙑ"],[122989,1,"ұ"],[[122990,123022],3],[123023,2],[[123024,123135],3],[[123136,123180],2],[[123181,123183],3],[[123184,123197],2],[[123198,123199],3],[[123200,123209],2],[[123210,123213],3],[123214,2],[123215,2],[[123216,123535],3],[[123536,123566],2],[[123567,123583],3],[[123584,123641],2],[[123642,123646],3],[123647,2],[[123648,124111],3],[[124112,124153],2],[[124154,124367],3],[[124368,124410],2],[[124411,124414],3],[124415,2],[[124416,124895],3],[[124896,124902],2],[124903,3],[[124904,124907],2],[124908,3],[[124909,124910],2],[124911,3],[[124912,124926],2],[124927,3],[[124928,125124],2],[[125125,125126],3],[[125127,125135],2],[[125136,125142],2],[[125143,125183],3],[125184,1,"𞤢"],[125185,1,"𞤣"],[125186,1,"𞤤"],[125187,1,"𞤥"],[125188,1,"𞤦"],[125189,1,"𞤧"],[125190,1,"𞤨"],[125191,1,"𞤩"],[125192,1,"𞤪"],[125193,1,"𞤫"],[125194,1,"𞤬"],[125195,1,"𞤭"],[125196,1,"𞤮"],[125197,1,"𞤯"],[125198,1,"𞤰"],[125199,1,"𞤱"],[125200,1,"𞤲"],[125201,1,"𞤳"],[125202,1,"𞤴"],[125203,1,"𞤵"],[125204,1,"𞤶"],[125205,1,"𞤷"],[125206,1,"𞤸"],[125207,1,"𞤹"],[125208,1,"𞤺"],[125209,1,"𞤻"],[125210,1,"𞤼"],[125211,1,"𞤽"],[125212,1,"𞤾"],[125213,1,"𞤿"],[125214,1,"𞥀"],[125215,1,"𞥁"],[125216,1,"𞥂"],[125217,1,"𞥃"],[[125218,125258],2],[125259,2],[[125260,125263],3],[[125264,125273],2],[[125274,125277],3],[[125278,125279],2],[[125280,126064],3],[[126065,126132],2],[[126133,126208],3],[[126209,126269],2],[[126270,126463],3],[126464,1,"ا"],[126465,1,"ب"],[126466,1,"ج"],[126467,1,"د"],[126468,3],[126469,1,"و"],[126470,1,"ز"],[126471,1,"ح"],[126472,1,"ط"],[126473,1,"ي"],[126474,1,"ك"],[126475,1,"ل"],[126476,1,"م"],[126477,1,"ن"],[126478,1,"س"],[126479,1,"ع"],[126480,1,"ف"],[126481,1,"ص"],[126482,1,"ق"],[126483,1,"ر"],[126484,1,"ش"],[126485,1,"ت"],[126486,1,"ث"],[126487,1,"خ"],[126488,1,"ذ"],[126489,1,"ض"],[126490,1,"ظ"],[126491,1,"غ"],[126492,1,"ٮ"],[126493,1,"ں"],[126494,1,"ڡ"],[126495,1,"ٯ"],[126496,3],[126497,1,"ب"],[126498,1,"ج"],[126499,3],[126500,1,"ه"],[[126501,126502],3],[126503,1,"ح"],[126504,3],[126505,1,"ي"],[126506,1,"ك"],[126507,1,"ل"],[126508,1,"م"],[126509,1,"ن"],[126510,1,"س"],[126511,1,"ع"],[126512,1,"ف"],[126513,1,"ص"],[126514,1,"ق"],[126515,3],[126516,1,"ش"],[126517,1,"ت"],[126518,1,"ث"],[126519,1,"خ"],[126520,3],[126521,1,"ض"],[126522,3],[126523,1,"غ"],[[126524,126529],3],[126530,1,"ج"],[[126531,126534],3],[126535,1,"ح"],[126536,3],[126537,1,"ي"],[126538,3],[126539,1,"ل"],[126540,3],[126541,1,"ن"],[126542,1,"س"],[126543,1,"ع"],[126544,3],[126545,1,"ص"],[126546,1,"ق"],[126547,3],[126548,1,"ش"],[[126549,126550],3],[126551,1,"خ"],[126552,3],[126553,1,"ض"],[126554,3],[126555,1,"غ"],[126556,3],[126557,1,"ں"],[126558,3],[126559,1,"ٯ"],[126560,3],[126561,1,"ب"],[126562,1,"ج"],[126563,3],[126564,1,"ه"],[[126565,126566],3],[126567,1,"ح"],[126568,1,"ط"],[126569,1,"ي"],[126570,1,"ك"],[126571,3],[126572,1,"م"],[126573,1,"ن"],[126574,1,"س"],[126575,1,"ع"],[126576,1,"ف"],[126577,1,"ص"],[126578,1,"ق"],[126579,3],[126580,1,"ش"],[126581,1,"ت"],[126582,1,"ث"],[126583,1,"خ"],[126584,3],[126585,1,"ض"],[126586,1,"ظ"],[126587,1,"غ"],[126588,1,"ٮ"],[126589,3],[126590,1,"ڡ"],[126591,3],[126592,1,"ا"],[126593,1,"ب"],[126594,1,"ج"],[126595,1,"د"],[126596,1,"ه"],[126597,1,"و"],[126598,1,"ز"],[126599,1,"ح"],[126600,1,"ط"],[126601,1,"ي"],[126602,3],[126603,1,"ل"],[126604,1,"م"],[126605,1,"ن"],[126606,1,"س"],[126607,1,"ع"],[126608,1,"ف"],[126609,1,"ص"],[126610,1,"ق"],[126611,1,"ر"],[126612,1,"ش"],[126613,1,"ت"],[126614,1,"ث"],[126615,1,"خ"],[126616,1,"ذ"],[126617,1,"ض"],[126618,1,"ظ"],[126619,1,"غ"],[[126620,126624],3],[126625,1,"ب"],[126626,1,"ج"],[126627,1,"د"],[126628,3],[126629,1,"و"],[126630,1,"ز"],[126631,1,"ح"],[126632,1,"ط"],[126633,1,"ي"],[126634,3],[126635,1,"ل"],[126636,1,"م"],[126637,1,"ن"],[126638,1,"س"],[126639,1,"ع"],[126640,1,"ف"],[126641,1,"ص"],[126642,1,"ق"],[126643,1,"ر"],[126644,1,"ش"],[126645,1,"ت"],[126646,1,"ث"],[126647,1,"خ"],[126648,1,"ذ"],[126649,1,"ض"],[126650,1,"ظ"],[126651,1,"غ"],[[126652,126703],3],[[126704,126705],2],[[126706,126975],3],[[126976,127019],2],[[127020,127023],3],[[127024,127123],2],[[127124,127135],3],[[127136,127150],2],[[127151,127152],3],[[127153,127166],2],[127167,2],[127168,3],[[127169,127183],2],[127184,3],[[127185,127199],2],[[127200,127221],2],[[127222,127231],3],[127232,3],[127233,1,"0,"],[127234,1,"1,"],[127235,1,"2,"],[127236,1,"3,"],[127237,1,"4,"],[127238,1,"5,"],[127239,1,"6,"],[127240,1,"7,"],[127241,1,"8,"],[127242,1,"9,"],[[127243,127244],2],[[127245,127247],2],[127248,1,"(a)"],[127249,1,"(b)"],[127250,1,"(c)"],[127251,1,"(d)"],[127252,1,"(e)"],[127253,1,"(f)"],[127254,1,"(g)"],[127255,1,"(h)"],[127256,1,"(i)"],[127257,1,"(j)"],[127258,1,"(k)"],[127259,1,"(l)"],[127260,1,"(m)"],[127261,1,"(n)"],[127262,1,"(o)"],[127263,1,"(p)"],[127264,1,"(q)"],[127265,1,"(r)"],[127266,1,"(s)"],[127267,1,"(t)"],[127268,1,"(u)"],[127269,1,"(v)"],[127270,1,"(w)"],[127271,1,"(x)"],[127272,1,"(y)"],[127273,1,"(z)"],[127274,1,"〔s〕"],[127275,1,"c"],[127276,1,"r"],[127277,1,"cd"],[127278,1,"wz"],[127279,2],[127280,1,"a"],[127281,1,"b"],[127282,1,"c"],[127283,1,"d"],[127284,1,"e"],[127285,1,"f"],[127286,1,"g"],[127287,1,"h"],[127288,1,"i"],[127289,1,"j"],[127290,1,"k"],[127291,1,"l"],[127292,1,"m"],[127293,1,"n"],[127294,1,"o"],[127295,1,"p"],[127296,1,"q"],[127297,1,"r"],[127298,1,"s"],[127299,1,"t"],[127300,1,"u"],[127301,1,"v"],[127302,1,"w"],[127303,1,"x"],[127304,1,"y"],[127305,1,"z"],[127306,1,"hv"],[127307,1,"mv"],[127308,1,"sd"],[127309,1,"ss"],[127310,1,"ppv"],[127311,1,"wc"],[[127312,127318],2],[127319,2],[[127320,127326],2],[127327,2],[[127328,127337],2],[127338,1,"mc"],[127339,1,"md"],[127340,1,"mr"],[[127341,127343],2],[[127344,127352],2],[127353,2],[127354,2],[[127355,127356],2],[[127357,127358],2],[127359,2],[[127360,127369],2],[[127370,127373],2],[[127374,127375],2],[127376,1,"dj"],[[127377,127386],2],[[127387,127404],2],[127405,2],[[127406,127461],3],[[127462,127487],2],[127488,1,"ほか"],[127489,1,"ココ"],[127490,1,"サ"],[[127491,127503],3],[127504,1,"手"],[127505,1,"字"],[127506,1,"双"],[127507,1,"デ"],[127508,1,"二"],[127509,1,"多"],[127510,1,"解"],[127511,1,"天"],[127512,1,"交"],[127513,1,"映"],[127514,1,"無"],[127515,1,"料"],[127516,1,"前"],[127517,1,"後"],[127518,1,"再"],[127519,1,"新"],[127520,1,"初"],[127521,1,"終"],[127522,1,"生"],[127523,1,"販"],[127524,1,"声"],[127525,1,"吹"],[127526,1,"演"],[127527,1,"投"],[127528,1,"捕"],[127529,1,"一"],[127530,1,"三"],[127531,1,"遊"],[127532,1,"左"],[127533,1,"中"],[127534,1,"右"],[127535,1,"指"],[127536,1,"走"],[127537,1,"打"],[127538,1,"禁"],[127539,1,"空"],[127540,1,"合"],[127541,1,"満"],[127542,1,"有"],[127543,1,"月"],[127544,1,"申"],[127545,1,"割"],[127546,1,"営"],[127547,1,"配"],[[127548,127551],3],[127552,1,"〔本〕"],[127553,1,"〔三〕"],[127554,1,"〔二〕"],[127555,1,"〔安〕"],[127556,1,"〔点〕"],[127557,1,"〔打〕"],[127558,1,"〔盗〕"],[127559,1,"〔勝〕"],[127560,1,"〔敗〕"],[[127561,127567],3],[127568,1,"得"],[127569,1,"可"],[[127570,127583],3],[[127584,127589],2],[[127590,127743],3],[[127744,127776],2],[[127777,127788],2],[[127789,127791],2],[[127792,127797],2],[127798,2],[[127799,127868],2],[127869,2],[[127870,127871],2],[[127872,127891],2],[[127892,127903],2],[[127904,127940],2],[127941,2],[[127942,127946],2],[[127947,127950],2],[[127951,127955],2],[[127956,127967],2],[[127968,127984],2],[[127985,127991],2],[[127992,127999],2],[[128000,128062],2],[128063,2],[128064,2],[128065,2],[[128066,128247],2],[128248,2],[[128249,128252],2],[[128253,128254],2],[128255,2],[[128256,128317],2],[[128318,128319],2],[[128320,128323],2],[[128324,128330],2],[[128331,128335],2],[[128336,128359],2],[[128360,128377],2],[128378,2],[[128379,128419],2],[128420,2],[[128421,128506],2],[[128507,128511],2],[128512,2],[[128513,128528],2],[128529,2],[[128530,128532],2],[128533,2],[128534,2],[128535,2],[128536,2],[128537,2],[128538,2],[128539,2],[[128540,128542],2],[128543,2],[[128544,128549],2],[[128550,128551],2],[[128552,128555],2],[128556,2],[128557,2],[[128558,128559],2],[[128560,128563],2],[128564,2],[[128565,128576],2],[[128577,128578],2],[[128579,128580],2],[[128581,128591],2],[[128592,128639],2],[[128640,128709],2],[[128710,128719],2],[128720,2],[[128721,128722],2],[[128723,128724],2],[128725,2],[[128726,128727],2],[[128728,128731],3],[128732,2],[[128733,128735],2],[[128736,128748],2],[[128749,128751],3],[[128752,128755],2],[[128756,128758],2],[[128759,128760],2],[128761,2],[128762,2],[[128763,128764],2],[[128765,128767],3],[[128768,128883],2],[[128884,128886],2],[[128887,128890],3],[[128891,128895],2],[[128896,128980],2],[[128981,128984],2],[128985,2],[[128986,128991],3],[[128992,129003],2],[[129004,129007],3],[129008,2],[[129009,129023],3],[[129024,129035],2],[[129036,129039],3],[[129040,129095],2],[[129096,129103],3],[[129104,129113],2],[[129114,129119],3],[[129120,129159],2],[[129160,129167],3],[[129168,129197],2],[[129198,129199],3],[[129200,129201],2],[[129202,129211],2],[[129212,129215],3],[[129216,129217],2],[[129218,129279],3],[[129280,129291],2],[129292,2],[[129293,129295],2],[[129296,129304],2],[[129305,129310],2],[129311,2],[[129312,129319],2],[[129320,129327],2],[129328,2],[[129329,129330],2],[[129331,129342],2],[129343,2],[[129344,129355],2],[129356,2],[[129357,129359],2],[[129360,129374],2],[[129375,129387],2],[[129388,129392],2],[129393,2],[129394,2],[[129395,129398],2],[[129399,129400],2],[129401,2],[129402,2],[129403,2],[[129404,129407],2],[[129408,129412],2],[[129413,129425],2],[[129426,129431],2],[[129432,129442],2],[[129443,129444],2],[[129445,129450],2],[[129451,129453],2],[[129454,129455],2],[[129456,129465],2],[[129466,129471],2],[129472,2],[[129473,129474],2],[[129475,129482],2],[129483,2],[129484,2],[[129485,129487],2],[[129488,129510],2],[[129511,129535],2],[[129536,129619],2],[[129620,129631],3],[[129632,129645],2],[[129646,129647],3],[[129648,129651],2],[129652,2],[[129653,129655],2],[[129656,129658],2],[[129659,129660],2],[[129661,129663],3],[[129664,129666],2],[[129667,129670],2],[[129671,129672],2],[129673,2],[[129674,129678],3],[129679,2],[[129680,129685],2],[[129686,129704],2],[[129705,129708],2],[[129709,129711],2],[[129712,129718],2],[[129719,129722],2],[[129723,129725],2],[129726,2],[129727,2],[[129728,129730],2],[[129731,129733],2],[129734,2],[[129735,129741],3],[[129742,129743],2],[[129744,129750],2],[[129751,129753],2],[[129754,129755],2],[129756,2],[[129757,129758],3],[129759,2],[[129760,129767],2],[129768,2],[129769,2],[[129770,129775],3],[[129776,129782],2],[[129783,129784],2],[[129785,129791],3],[[129792,129938],2],[129939,3],[[129940,129994],2],[[129995,130031],2],[130032,1,"0"],[130033,1,"1"],[130034,1,"2"],[130035,1,"3"],[130036,1,"4"],[130037,1,"5"],[130038,1,"6"],[130039,1,"7"],[130040,1,"8"],[130041,1,"9"],[[130042,131069],3],[[131070,131071],3],[[131072,173782],2],[[173783,173789],2],[[173790,173791],2],[[173792,173823],3],[[173824,177972],2],[[177973,177976],2],[177977,2],[[177978,177983],3],[[177984,178205],2],[[178206,178207],3],[[178208,183969],2],[[183970,183983],3],[[183984,191456],2],[[191457,191471],3],[[191472,192093],2],[[192094,194559],3],[194560,1,"丽"],[194561,1,"丸"],[194562,1,"乁"],[194563,1,"𠄢"],[194564,1,"你"],[194565,1,"侮"],[194566,1,"侻"],[194567,1,"倂"],[194568,1,"偺"],[194569,1,"備"],[194570,1,"僧"],[194571,1,"像"],[194572,1,"㒞"],[194573,1,"𠘺"],[194574,1,"免"],[194575,1,"兔"],[194576,1,"兤"],[194577,1,"具"],[194578,1,"𠔜"],[194579,1,"㒹"],[194580,1,"內"],[194581,1,"再"],[194582,1,"𠕋"],[194583,1,"冗"],[194584,1,"冤"],[194585,1,"仌"],[194586,1,"冬"],[194587,1,"况"],[194588,1,"𩇟"],[194589,1,"凵"],[194590,1,"刃"],[194591,1,"㓟"],[194592,1,"刻"],[194593,1,"剆"],[194594,1,"割"],[194595,1,"剷"],[194596,1,"㔕"],[194597,1,"勇"],[194598,1,"勉"],[194599,1,"勤"],[194600,1,"勺"],[194601,1,"包"],[194602,1,"匆"],[194603,1,"北"],[194604,1,"卉"],[194605,1,"卑"],[194606,1,"博"],[194607,1,"即"],[194608,1,"卽"],[[194609,194611],1,"卿"],[194612,1,"𠨬"],[194613,1,"灰"],[194614,1,"及"],[194615,1,"叟"],[194616,1,"𠭣"],[194617,1,"叫"],[194618,1,"叱"],[194619,1,"吆"],[194620,1,"咞"],[194621,1,"吸"],[194622,1,"呈"],[194623,1,"周"],[194624,1,"咢"],[194625,1,"哶"],[194626,1,"唐"],[194627,1,"啓"],[194628,1,"啣"],[[194629,194630],1,"善"],[194631,1,"喙"],[194632,1,"喫"],[194633,1,"喳"],[194634,1,"嗂"],[194635,1,"圖"],[194636,1,"嘆"],[194637,1,"圗"],[194638,1,"噑"],[194639,1,"噴"],[194640,1,"切"],[194641,1,"壮"],[194642,1,"城"],[194643,1,"埴"],[194644,1,"堍"],[194645,1,"型"],[194646,1,"堲"],[194647,1,"報"],[194648,1,"墬"],[194649,1,"𡓤"],[194650,1,"売"],[194651,1,"壷"],[194652,1,"夆"],[194653,1,"多"],[194654,1,"夢"],[194655,1,"奢"],[194656,1,"𡚨"],[194657,1,"𡛪"],[194658,1,"姬"],[194659,1,"娛"],[194660,1,"娧"],[194661,1,"姘"],[194662,1,"婦"],[194663,1,"㛮"],[194664,1,"㛼"],[194665,1,"嬈"],[[194666,194667],1,"嬾"],[194668,1,"𡧈"],[194669,1,"寃"],[194670,1,"寘"],[194671,1,"寧"],[194672,1,"寳"],[194673,1,"𡬘"],[194674,1,"寿"],[194675,1,"将"],[194676,1,"当"],[194677,1,"尢"],[194678,1,"㞁"],[194679,1,"屠"],[194680,1,"屮"],[194681,1,"峀"],[194682,1,"岍"],[194683,1,"𡷤"],[194684,1,"嵃"],[194685,1,"𡷦"],[194686,1,"嵮"],[194687,1,"嵫"],[194688,1,"嵼"],[194689,1,"巡"],[194690,1,"巢"],[194691,1,"㠯"],[194692,1,"巽"],[194693,1,"帨"],[194694,1,"帽"],[194695,1,"幩"],[194696,1,"㡢"],[194697,1,"𢆃"],[194698,1,"㡼"],[194699,1,"庰"],[194700,1,"庳"],[194701,1,"庶"],[194702,1,"廊"],[194703,1,"𪎒"],[194704,1,"廾"],[[194705,194706],1,"𢌱"],[194707,1,"舁"],[[194708,194709],1,"弢"],[194710,1,"㣇"],[194711,1,"𣊸"],[194712,1,"𦇚"],[194713,1,"形"],[194714,1,"彫"],[194715,1,"㣣"],[194716,1,"徚"],[194717,1,"忍"],[194718,1,"志"],[194719,1,"忹"],[194720,1,"悁"],[194721,1,"㤺"],[194722,1,"㤜"],[194723,1,"悔"],[194724,1,"𢛔"],[194725,1,"惇"],[194726,1,"慈"],[194727,1,"慌"],[194728,1,"慎"],[194729,1,"慌"],[194730,1,"慺"],[194731,1,"憎"],[194732,1,"憲"],[194733,1,"憤"],[194734,1,"憯"],[194735,1,"懞"],[194736,1,"懲"],[194737,1,"懶"],[194738,1,"成"],[194739,1,"戛"],[194740,1,"扝"],[194741,1,"抱"],[194742,1,"拔"],[194743,1,"捐"],[194744,1,"𢬌"],[194745,1,"挽"],[194746,1,"拼"],[194747,1,"捨"],[194748,1,"掃"],[194749,1,"揤"],[194750,1,"𢯱"],[194751,1,"搢"],[194752,1,"揅"],[194753,1,"掩"],[194754,1,"㨮"],[194755,1,"摩"],[194756,1,"摾"],[194757,1,"撝"],[194758,1,"摷"],[194759,1,"㩬"],[194760,1,"敏"],[194761,1,"敬"],[194762,1,"𣀊"],[194763,1,"旣"],[194764,1,"書"],[194765,1,"晉"],[194766,1,"㬙"],[194767,1,"暑"],[194768,1,"㬈"],[194769,1,"㫤"],[194770,1,"冒"],[194771,1,"冕"],[194772,1,"最"],[194773,1,"暜"],[194774,1,"肭"],[194775,1,"䏙"],[194776,1,"朗"],[194777,1,"望"],[194778,1,"朡"],[194779,1,"杞"],[194780,1,"杓"],[194781,1,"𣏃"],[194782,1,"㭉"],[194783,1,"柺"],[194784,1,"枅"],[194785,1,"桒"],[194786,1,"梅"],[194787,1,"𣑭"],[194788,1,"梎"],[194789,1,"栟"],[194790,1,"椔"],[194791,1,"㮝"],[194792,1,"楂"],[194793,1,"榣"],[194794,1,"槪"],[194795,1,"檨"],[194796,1,"𣚣"],[194797,1,"櫛"],[194798,1,"㰘"],[194799,1,"次"],[194800,1,"𣢧"],[194801,1,"歔"],[194802,1,"㱎"],[194803,1,"歲"],[194804,1,"殟"],[194805,1,"殺"],[194806,1,"殻"],[194807,1,"𣪍"],[194808,1,"𡴋"],[194809,1,"𣫺"],[194810,1,"汎"],[194811,1,"𣲼"],[194812,1,"沿"],[194813,1,"泍"],[194814,1,"汧"],[194815,1,"洖"],[194816,1,"派"],[194817,1,"海"],[194818,1,"流"],[194819,1,"浩"],[194820,1,"浸"],[194821,1,"涅"],[194822,1,"𣴞"],[194823,1,"洴"],[194824,1,"港"],[194825,1,"湮"],[194826,1,"㴳"],[194827,1,"滋"],[194828,1,"滇"],[194829,1,"𣻑"],[194830,1,"淹"],[194831,1,"潮"],[194832,1,"𣽞"],[194833,1,"𣾎"],[194834,1,"濆"],[194835,1,"瀹"],[194836,1,"瀞"],[194837,1,"瀛"],[194838,1,"㶖"],[194839,1,"灊"],[194840,1,"災"],[194841,1,"灷"],[194842,1,"炭"],[194843,1,"𠔥"],[194844,1,"煅"],[194845,1,"𤉣"],[194846,1,"熜"],[194847,1,"𤎫"],[194848,1,"爨"],[194849,1,"爵"],[194850,1,"牐"],[194851,1,"𤘈"],[194852,1,"犀"],[194853,1,"犕"],[194854,1,"𤜵"],[194855,1,"𤠔"],[194856,1,"獺"],[194857,1,"王"],[194858,1,"㺬"],[194859,1,"玥"],[[194860,194861],1,"㺸"],[194862,1,"瑇"],[194863,1,"瑜"],[194864,1,"瑱"],[194865,1,"璅"],[194866,1,"瓊"],[194867,1,"㼛"],[194868,1,"甤"],[194869,1,"𤰶"],[194870,1,"甾"],[194871,1,"𤲒"],[194872,1,"異"],[194873,1,"𢆟"],[194874,1,"瘐"],[194875,1,"𤾡"],[194876,1,"𤾸"],[194877,1,"𥁄"],[194878,1,"㿼"],[194879,1,"䀈"],[194880,1,"直"],[194881,1,"𥃳"],[194882,1,"𥃲"],[194883,1,"𥄙"],[194884,1,"𥄳"],[194885,1,"眞"],[[194886,194887],1,"真"],[194888,1,"睊"],[194889,1,"䀹"],[194890,1,"瞋"],[194891,1,"䁆"],[194892,1,"䂖"],[194893,1,"𥐝"],[194894,1,"硎"],[194895,1,"碌"],[194896,1,"磌"],[194897,1,"䃣"],[194898,1,"𥘦"],[194899,1,"祖"],[194900,1,"𥚚"],[194901,1,"𥛅"],[194902,1,"福"],[194903,1,"秫"],[194904,1,"䄯"],[194905,1,"穀"],[194906,1,"穊"],[194907,1,"穏"],[194908,1,"𥥼"],[[194909,194910],1,"𥪧"],[194911,1,"竮"],[194912,1,"䈂"],[194913,1,"𥮫"],[194914,1,"篆"],[194915,1,"築"],[194916,1,"䈧"],[194917,1,"𥲀"],[194918,1,"糒"],[194919,1,"䊠"],[194920,1,"糨"],[194921,1,"糣"],[194922,1,"紀"],[194923,1,"𥾆"],[194924,1,"絣"],[194925,1,"䌁"],[194926,1,"緇"],[194927,1,"縂"],[194928,1,"繅"],[194929,1,"䌴"],[194930,1,"𦈨"],[194931,1,"𦉇"],[194932,1,"䍙"],[194933,1,"𦋙"],[194934,1,"罺"],[194935,1,"𦌾"],[194936,1,"羕"],[194937,1,"翺"],[194938,1,"者"],[194939,1,"𦓚"],[194940,1,"𦔣"],[194941,1,"聠"],[194942,1,"𦖨"],[194943,1,"聰"],[194944,1,"𣍟"],[194945,1,"䏕"],[194946,1,"育"],[194947,1,"脃"],[194948,1,"䐋"],[194949,1,"脾"],[194950,1,"媵"],[194951,1,"𦞧"],[194952,1,"𦞵"],[194953,1,"𣎓"],[194954,1,"𣎜"],[194955,1,"舁"],[194956,1,"舄"],[194957,1,"辞"],[194958,1,"䑫"],[194959,1,"芑"],[194960,1,"芋"],[194961,1,"芝"],[194962,1,"劳"],[194963,1,"花"],[194964,1,"芳"],[194965,1,"芽"],[194966,1,"苦"],[194967,1,"𦬼"],[194968,1,"若"],[194969,1,"茝"],[194970,1,"荣"],[194971,1,"莭"],[194972,1,"茣"],[194973,1,"莽"],[194974,1,"菧"],[194975,1,"著"],[194976,1,"荓"],[194977,1,"菊"],[194978,1,"菌"],[194979,1,"菜"],[194980,1,"𦰶"],[194981,1,"𦵫"],[194982,1,"𦳕"],[194983,1,"䔫"],[194984,1,"蓱"],[194985,1,"蓳"],[194986,1,"蔖"],[194987,1,"𧏊"],[194988,1,"蕤"],[194989,1,"𦼬"],[194990,1,"䕝"],[194991,1,"䕡"],[194992,1,"𦾱"],[194993,1,"𧃒"],[194994,1,"䕫"],[194995,1,"虐"],[194996,1,"虜"],[194997,1,"虧"],[194998,1,"虩"],[194999,1,"蚩"],[195000,1,"蚈"],[195001,1,"蜎"],[195002,1,"蛢"],[195003,1,"蝹"],[195004,1,"蜨"],[195005,1,"蝫"],[195006,1,"螆"],[195007,1,"䗗"],[195008,1,"蟡"],[195009,1,"蠁"],[195010,1,"䗹"],[195011,1,"衠"],[195012,1,"衣"],[195013,1,"𧙧"],[195014,1,"裗"],[195015,1,"裞"],[195016,1,"䘵"],[195017,1,"裺"],[195018,1,"㒻"],[195019,1,"𧢮"],[195020,1,"𧥦"],[195021,1,"䚾"],[195022,1,"䛇"],[195023,1,"誠"],[195024,1,"諭"],[195025,1,"變"],[195026,1,"豕"],[195027,1,"𧲨"],[195028,1,"貫"],[195029,1,"賁"],[195030,1,"贛"],[195031,1,"起"],[195032,1,"𧼯"],[195033,1,"𠠄"],[195034,1,"跋"],[195035,1,"趼"],[195036,1,"跰"],[195037,1,"𠣞"],[195038,1,"軔"],[195039,1,"輸"],[195040,1,"𨗒"],[195041,1,"𨗭"],[195042,1,"邔"],[195043,1,"郱"],[195044,1,"鄑"],[195045,1,"𨜮"],[195046,1,"鄛"],[195047,1,"鈸"],[195048,1,"鋗"],[195049,1,"鋘"],[195050,1,"鉼"],[195051,1,"鏹"],[195052,1,"鐕"],[195053,1,"𨯺"],[195054,1,"開"],[195055,1,"䦕"],[195056,1,"閷"],[195057,1,"𨵷"],[195058,1,"䧦"],[195059,1,"雃"],[195060,1,"嶲"],[195061,1,"霣"],[195062,1,"𩅅"],[195063,1,"𩈚"],[195064,1,"䩮"],[195065,1,"䩶"],[195066,1,"韠"],[195067,1,"𩐊"],[195068,1,"䪲"],[195069,1,"𩒖"],[[195070,195071],1,"頋"],[195072,1,"頩"],[195073,1,"𩖶"],[195074,1,"飢"],[195075,1,"䬳"],[195076,1,"餩"],[195077,1,"馧"],[195078,1,"駂"],[195079,1,"駾"],[195080,1,"䯎"],[195081,1,"𩬰"],[195082,1,"鬒"],[195083,1,"鱀"],[195084,1,"鳽"],[195085,1,"䳎"],[195086,1,"䳭"],[195087,1,"鵧"],[195088,1,"𪃎"],[195089,1,"䳸"],[195090,1,"𪄅"],[195091,1,"𪈎"],[195092,1,"𪊑"],[195093,1,"麻"],[195094,1,"䵖"],[195095,1,"黹"],[195096,1,"黾"],[195097,1,"鼅"],[195098,1,"鼏"],[195099,1,"鼖"],[195100,1,"鼻"],[195101,1,"𪘀"],[[195102,196605],3],[[196606,196607],3],[[196608,201546],2],[[201547,201551],3],[[201552,205743],2],[[205744,262141],3],[[262142,262143],3],[[262144,327677],3],[[327678,327679],3],[[327680,393213],3],[[393214,393215],3],[[393216,458749],3],[[458750,458751],3],[[458752,524285],3],[[524286,524287],3],[[524288,589821],3],[[589822,589823],3],[[589824,655357],3],[[655358,655359],3],[[655360,720893],3],[[720894,720895],3],[[720896,786429],3],[[786430,786431],3],[[786432,851965],3],[[851966,851967],3],[[851968,917501],3],[[917502,917503],3],[917504,3],[917505,3],[[917506,917535],3],[[917536,917631],3],[[917632,917759],3],[[917760,917999],7],[[918000,983037],3],[[983038,983039],3],[[983040,1048573],3],[[1048574,1048575],3],[[1048576,1114109],3],[[1114110,1114111],3]]});var Jt7=C((Uh9,jt7)=>{Uh9.STATUS_MAPPING={mapped:1,valid:2,disallowed:3,deviation:6,ignored:7}});var Wt7=C((oA_,Pt7)=>{var Cf8=_t7(),fS=Ot7(),Mt7=Ht7(),{STATUS_MAPPING:z66}=Jt7();function Sf8(A){return/[^\x00-\x7F]/u.test(A)}function Dt7(A){let q=0,K=Mt7.length-1;while(q<=K){let Y=Math.floor((q+K)/2),z=Mt7[Y],w=Array.isArray(z[0])?z[0][0]:z[0],_=Array.isArray(z[0])?z[0][1]:z[0];if(w<=A&&_>=A)return z.slice(1);else if(w>A)K=Y-1;else q=Y+1}return null}function dh9(A,{transitionalProcessing:q}){let K="";for(let Y of A){let[z,w]=Dt7(Y.codePointAt(0));switch(z){case z66.disallowed:K+=Y;break;case z66.ignored:break;case z66.mapped:if(q&&Y==="ẞ")K+="ss";else K+=w;break;case z66.deviation:if(q)K+=w;else K+=Y;break;case z66.valid:K+=Y;break}}return K}function ch9(A,{checkHyphens:q,checkBidi:K,checkJoiners:Y,transitionalProcessing:z,useSTD3ASCIIRules:w,isBidi:_}){if(A.length===0)return!0;if(A.normalize("NFC")!==A)return!1;let $=Array.from(A);if(q){if($[2]==="-"&&$[3]==="-"||(A.startsWith("-")||A.endsWith("-")))return!1}if(!q){if(A.startsWith("xn--"))return!1}if(A.includes("."))return!1;if(fS.combiningMarks.test($[0]))return!1;for(let O of $){let H=O.codePointAt(0),[j]=Dt7(H);if(z){if(j!==z66.valid)return!1}else if(j!==z66.valid&&j!==z66.deviation)return!1;if(w&&H<=127){if(!/^(?:[a-z]|[0-9]|-)$/u.test(O))return!1}}if(Y){let O=0;for(let[H,j]of $.entries())if(j==="‌"||j==="‍"){if(H>0){if(fS.combiningClassVirama.test($[H-1]))continue;if(j==="‌"){let J=$.indexOf("‌",H+1),M=J<0?$.slice(O):$.slice(O,J);if(fS.validZWNJ.test(M.join(""))){O=H+1;continue}}}return!1}}if(K&&_){let O;if(fS.bidiS1LTR.test($[0]))O=!1;else if(fS.bidiS1RTL.test($[0]))O=!0;else return!1;if(O){if(!fS.bidiS2.test(A)||!fS.bidiS3.test(A)||fS.bidiS4EN.test(A)&&fS.bidiS4AN.test(A))return!1}else if(!fS.bidiS5.test(A)||!fS.bidiS6.test(A))return!1}return!0}function lh9(A){let q=A.map((K)=>{if(K.startsWith("xn--"))try{return Cf8.decode(K.substring(4))}catch{return""}return K}).join(".");return fS.bidiDomain.test(q)}function Xt7(A,q){let K=dh9(A,q);K=K.normalize("NFC");let Y=K.split("."),z=lh9(Y),w=!1;for(let[_,$]of Y.entries()){let O=$,H=q.transitionalProcessing;if(O.startsWith("xn--")){if(Sf8(O)){w=!0;continue}try{O=Cf8.decode(O.substring(4))}catch{if(!q.ignoreInvalidPunycode){w=!0;continue}}if(Y[_]=O,O===""||!Sf8(O))w=!0;H=!1}if(w)continue;if(!ch9(O,{...q,transitionalProcessing:H,isBidi:z}))w=!0}return{string:Y.join("."),error:w}}function ih9(A,{checkHyphens:q=!1,checkBidi:K=!1,checkJoiners:Y=!1,useSTD3ASCIIRules:z=!1,verifyDNSLength:w=!1,transitionalProcessing:_=!1,ignoreInvalidPunycode:$=!1}={}){let O=Xt7(A,{checkHyphens:q,checkBidi:K,checkJoiners:Y,useSTD3ASCIIRules:z,transitionalProcessing:_,ignoreInvalidPunycode:$}),H=O.string.split(".");if(H=H.map((j)=>{if(Sf8(j))try{return`xn--${Cf8.encode(j)}`}catch{O.error=!0}return j}),w){let j=H.join(".").length;if(j>253||j===0)O.error=!0;for(let J=0;J63||H[J].length===0){O.error=!0;break}}if(O.error)return null;return H.join(".")}function nh9(A,{checkHyphens:q=!1,checkBidi:K=!1,checkJoiners:Y=!1,useSTD3ASCIIRules:z=!1,transitionalProcessing:w=!1,ignoreInvalidPunycode:_=!1}={}){let $=Xt7(A,{checkHyphens:q,checkBidi:K,checkJoiners:Y,useSTD3ASCIIRules:z,transitionalProcessing:w,ignoreInvalidPunycode:_});return{domain:$.string,error:$.error}}Pt7.exports={toASCII:ih9,toUnicode:nh9}});var If8=C((aA_,Gt7)=>{function hf8(A){return A>=48&&A<=57}function Zt7(A){return A>=65&&A<=90||A>=97&&A<=122}function rh9(A){return Zt7(A)||hf8(A)}function oh9(A){return hf8(A)||A>=65&&A<=70||A>=97&&A<=102}Gt7.exports={isASCIIDigit:hf8,isASCIIAlpha:Zt7,isASCIIAlphanumeric:rh9,isASCIIHex:oh9}});var dX1=C((sA_,ft7)=>{var ah9=new TextEncoder,sh9=new TextDecoder("utf-8",{ignoreBOM:!0});function th9(A){return ah9.encode(A)}function eh9(A){return sh9.decode(A)}ft7.exports={utf8Encode:th9,utf8DecodeWithoutBOM:eh9}});var cX1=C((tA_,Lt7)=>{var{isASCIIHex:Tt7}=If8(),{utf8Encode:Vt7}=dX1();function BY(A){return A.codePointAt(0)}function AI9(A){let q=A.toString(16).toUpperCase();if(q.length===1)q=`0${q}`;return`%${q}`}function Nt7(A){let q=new Uint8Array(A.byteLength),K=0;for(let Y=0;Y126}var KI9=new Set([BY(" "),BY('"'),BY("<"),BY(">"),BY("`")]);function YI9(A){return bf8(A)||KI9.has(A)}var zI9=new Set([BY(" "),BY('"'),BY("#"),BY("<"),BY(">")]);function xf8(A){return bf8(A)||zI9.has(A)}function wI9(A){return xf8(A)||A===BY("'")}var _I9=new Set([BY("?"),BY("`"),BY("{"),BY("}"),BY("^")]);function vt7(A){return xf8(A)||_I9.has(A)}var $I9=new Set([BY("/"),BY(":"),BY(";"),BY("="),BY("@"),BY("["),BY("\\"),BY("]"),BY("|")]);function kt7(A){return vt7(A)||$I9.has(A)}var OI9=new Set([BY("$"),BY("%"),BY("&"),BY("+"),BY(",")]);function HI9(A){return kt7(A)||OI9.has(A)}var jI9=new Set([BY("!"),BY("'"),BY("("),BY(")"),BY("~")]);function JI9(A){return HI9(A)||jI9.has(A)}function Et7(A,q){let K=Vt7(A),Y="";for(let z of K)if(!q(z))Y+=String.fromCharCode(z);else Y+=AI9(z);return Y}function MI9(A,q){return Et7(String.fromCodePoint(A),q)}function DI9(A,q,K=!1){let Y="";for(let z of A)if(K&&z===" ")Y+="+";else Y+=Et7(z,q);return Y}Lt7.exports={isC0ControlPercentEncode:bf8,isFragmentPercentEncode:YI9,isQueryPercentEncode:xf8,isSpecialQueryPercentEncode:wI9,isPathPercentEncode:vt7,isUserinfoPercentEncode:kt7,isURLEncodedPercentEncode:JI9,percentDecodeString:qI9,percentDecodeBytes:Nt7,utf8PercentEncodeString:DI9,utf8PercentEncodeCodePoint:MI9}});var Qf8=C((QI9,MT)=>{var XI9=Wt7(),a0=If8(),{utf8DecodeWithoutBOM:PI9}=dX1(),{percentDecodeString:WI9,utf8PercentEncodeCodePoint:iX1,utf8PercentEncodeString:nX1,isC0ControlPercentEncode:ht7,isFragmentPercentEncode:ZI9,isQueryPercentEncode:GI9,isSpecialQueryPercentEncode:fI9,isPathPercentEncode:TI9,isUserinfoPercentEncode:mf8}=cX1();function j7(A){return A.codePointAt(0)}var It7={ftp:21,file:null,http:80,https:443,ws:80,wss:443},P5=Symbol("failure");function yt7(A){return[...A].length}function Rt7(A,q){let K=A[q];return isNaN(K)?void 0:String.fromCodePoint(K)}function St7(A){return A==="."||A.toLowerCase()==="%2e"}function VI9(A){return A=A.toLowerCase(),A===".."||A==="%2e."||A===".%2e"||A==="%2e%2e"}function NI9(A,q){return a0.isASCIIAlpha(A)&&(q===j7(":")||q===j7("|"))}function bt7(A){return A.length===2&&a0.isASCIIAlpha(A.codePointAt(0))&&(A[1]===":"||A[1]==="|")}function vI9(A){return A.length===2&&a0.isASCIIAlpha(A.codePointAt(0))&&A[1]===":"}function xt7(A){return A.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/u)!==-1}function kI9(A){return xt7(A)||A.search(/[\u0000-\u001F]|%|\u007F/u)!==-1}function lX1(A){return It7[A]!==void 0}function o0(A){return lX1(A.scheme)}function uf8(A){return!lX1(A.scheme)}function ut7(A){return It7[A]}function Bt7(A){if(A==="")return P5;let q=10;if(A.length>=2&&A.charAt(0)==="0"&&A.charAt(1).toLowerCase()==="x")A=A.substring(2),q=16;else if(A.length>=2&&A.charAt(0)==="0")A=A.substring(1),q=8;if(A==="")return 0;let K=/[^0-7]/u;if(q===10)K=/[^0-9]/u;if(q===16)K=/[^0-9A-Fa-f]/u;if(K.test(A))return P5;return parseInt(A,q)}function EI9(A){let q=A.split(".");if(q[q.length-1]===""){if(q.length>1)q.pop()}if(q.length>4)return P5;let K=[];for(let w of q){let _=Bt7(w);if(_===P5)return P5;K.push(_)}for(let w=0;w255)return P5;if(K[K.length-1]>=256**(5-K.length))return P5;let Y=K.pop(),z=0;for(let w of K)Y+=w*256**(3-z),++z;return Y}function LI9(A){let q="",K=A;for(let Y=1;Y<=4;++Y){if(q=String(K%256)+q,Y!==4)q=`.${q}`;K=Math.floor(K/256)}return q}function yI9(A){let q=[0,0,0,0,0,0,0,0],K=0,Y=null,z=0;if(A=Array.from(A,(w)=>w.codePointAt(0)),A[z]===j7(":")){if(A[z+1]!==j7(":"))return P5;z+=2,++K,Y=K}while(z6)return P5;let $=0;while(A[z]!==void 0){let O=null;if($>0)if(A[z]===j7(".")&&$<4)++z;else return P5;if(!a0.isASCIIDigit(A[z]))return P5;while(a0.isASCIIDigit(A[z])){let H=parseInt(Rt7(A,z));if(O===null)O=H;else if(O===0)return P5;else O=O*10+H;if(O>255)return P5;++z}if(q[K]=q[K]*256+O,++$,$===2||$===4)++K}if($!==4)return P5;break}else if(A[z]===j7(":")){if(++z,A[z]===void 0)return P5}else if(A[z]!==void 0)return P5;q[K]=w,++K}if(Y!==null){let w=K-Y;K=7;while(K!==0&&w>0){let _=q[Y+w-1];q[Y+w-1]=q[K],q[K]=_,--K,--w}}else if(Y===null&&K!==8)return P5;return q}function RI9(A){let q="",K=hI9(A),Y=!1;for(let z=0;z<=7;++z){if(Y&&A[z]===0)continue;else if(Y)Y=!1;if(K===z){q+=z===0?"::":":",Y=!0;continue}if(q+=A[z].toString(16),z!==7)q+=":"}return q}function Bf8(A,q=!1){if(A[0]==="["){if(A[A.length-1]!=="]")return P5;return yI9(A.substring(1,A.length-1))}if(q)return CI9(A);let K=PI9(WI9(A)),Y=II9(K);if(Y===P5)return P5;if(SI9(Y))return EI9(Y);return Y}function SI9(A){let q=A.split(".");if(q[q.length-1]===""){if(q.length===1)return!1;q.pop()}let K=q[q.length-1];if(Bt7(K)!==P5)return!0;if(/^[0-9]+$/u.test(K))return!0;return!1}function CI9(A){if(xt7(A))return P5;return nX1(A,ht7)}function hI9(A){let q=null,K=1,Y=null,z=0;for(let w=0;wK)q=Y,K=z;Y=null,z=0}else{if(Y===null)Y=w;++z}if(z>K)return Y;return q}function gf8(A){if(typeof A==="number")return LI9(A);if(A instanceof Array)return`[${RI9(A)}]`;return A}function II9(A,q=!1){let K=XI9.toASCII(A,{checkHyphens:q,checkBidi:!0,checkJoiners:!0,useSTD3ASCIIRules:q,transitionalProcessing:!1,verifyDNSLength:q,ignoreInvalidPunycode:!1});if(K===null)return P5;if(!q){if(K==="")return P5;if(kI9(K))return P5}return K}function bI9(A){let q=0,K=A.length;for(;q32)break;for(;K>q;--K)if(A.charCodeAt(K-1)>32)break;return A.substring(q,K)}function xI9(A){return A.replace(/\u0009|\u000A|\u000D/ug,"")}function mt7(A){let{path:q}=A;if(q.length===0)return;if(A.scheme==="file"&&q.length===1&&BI9(q[0]))return;q.pop()}function gt7(A){return A.username!==""||A.password!==""}function uI9(A){return A.host===null||A.host===""||A.scheme==="file"}function NU6(A){return typeof A.path==="string"}function BI9(A){return/^[A-Za-z]:$/u.test(A)}function cj(A,q,K,Y,z){if(this.pointer=0,this.input=A,this.base=q||null,this.encodingOverride=K||"utf-8",this.stateOverride=z,this.url=Y,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null};let _=bI9(this.input);if(_!==this.input)this.parseError=!0;this.input=_}let w=xI9(this.input);if(w!==this.input)this.parseError=!0;this.input=w,this.state=z||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=Array.from(this.input,(_)=>_.codePointAt(0));for(;this.pointer<=this.input.length;++this.pointer){let _=this.input[this.pointer],$=isNaN(_)?void 0:String.fromCodePoint(_),O=this[`parse ${this.state}`](_,$);if(!O)break;else if(O===P5){this.failure=!0;break}}}cj.prototype["parse scheme start"]=function(q,K){if(a0.isASCIIAlpha(q))this.buffer+=K.toLowerCase(),this.state="scheme";else if(!this.stateOverride)this.state="no scheme",--this.pointer;else return this.parseError=!0,P5;return!0};cj.prototype["parse scheme"]=function(q,K){if(a0.isASCIIAlphanumeric(q)||q===j7("+")||q===j7("-")||q===j7("."))this.buffer+=K.toLowerCase();else if(q===j7(":")){if(this.stateOverride){if(o0(this.url)&&!lX1(this.buffer))return!1;if(!o0(this.url)&&lX1(this.buffer))return!1;if((gt7(this.url)||this.url.port!==null)&&this.buffer==="file")return!1;if(this.url.scheme==="file"&&this.url.host==="")return!1}if(this.url.scheme=this.buffer,this.stateOverride){if(this.url.port===ut7(this.url.scheme))this.url.port=null;return!1}if(this.buffer="",this.url.scheme==="file"){if(this.input[this.pointer+1]!==j7("/")||this.input[this.pointer+2]!==j7("/"))this.parseError=!0;this.state="file"}else if(o0(this.url)&&this.base!==null&&this.base.scheme===this.url.scheme)this.state="special relative or authority";else if(o0(this.url))this.state="special authority slashes";else if(this.input[this.pointer+1]===j7("/"))this.state="path or authority",++this.pointer;else this.url.path="",this.state="opaque path"}else if(!this.stateOverride)this.buffer="",this.state="no scheme",this.pointer=-1;else return this.parseError=!0,P5;return!0};cj.prototype["parse no scheme"]=function(q){if(this.base===null||NU6(this.base)&&q!==j7("#"))return P5;else if(NU6(this.base)&&q===j7("#"))this.url.scheme=this.base.scheme,this.url.path=this.base.path,this.url.query=this.base.query,this.url.fragment="",this.state="fragment";else if(this.base.scheme==="file")this.state="file",--this.pointer;else this.state="relative",--this.pointer;return!0};cj.prototype["parse special relative or authority"]=function(q){if(q===j7("/")&&this.input[this.pointer+1]===j7("/"))this.state="special authority ignore slashes",++this.pointer;else this.parseError=!0,this.state="relative",--this.pointer;return!0};cj.prototype["parse path or authority"]=function(q){if(q===j7("/"))this.state="authority";else this.state="path",--this.pointer;return!0};cj.prototype["parse relative"]=function(q){if(this.url.scheme=this.base.scheme,q===j7("/"))this.state="relative slash";else if(o0(this.url)&&q===j7("\\"))this.parseError=!0,this.state="relative slash";else if(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,q===j7("?"))this.url.query="",this.state="query";else if(q===j7("#"))this.url.fragment="",this.state="fragment";else if(!isNaN(q))this.url.query=null,this.url.path.pop(),this.state="path",--this.pointer;return!0};cj.prototype["parse relative slash"]=function(q){if(o0(this.url)&&(q===j7("/")||q===j7("\\"))){if(q===j7("\\"))this.parseError=!0;this.state="special authority ignore slashes"}else if(q===j7("/"))this.state="authority";else this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer;return!0};cj.prototype["parse special authority slashes"]=function(q){if(q===j7("/")&&this.input[this.pointer+1]===j7("/"))this.state="special authority ignore slashes",++this.pointer;else this.parseError=!0,this.state="special authority ignore slashes",--this.pointer;return!0};cj.prototype["parse special authority ignore slashes"]=function(q){if(q!==j7("/")&&q!==j7("\\"))this.state="authority",--this.pointer;else this.parseError=!0;return!0};cj.prototype["parse authority"]=function(q,K){if(q===j7("@")){if(this.parseError=!0,this.atFlag)this.buffer=`%40${this.buffer}`;this.atFlag=!0;let Y=yt7(this.buffer);for(let z=0;z65535)return this.parseError=!0,P5;this.url.port=Y===ut7(this.url.scheme)?null:Y,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}else return this.parseError=!0,P5;return!0};var mI9=new Set([j7("/"),j7("\\"),j7("?"),j7("#")]);function Ft7(A,q){let K=A.length-q;return K>=2&&NI9(A[q],A[q+1])&&(K===2||mI9.has(A[q+2]))}cj.prototype["parse file"]=function(q){if(this.url.scheme="file",this.url.host="",q===j7("/")||q===j7("\\")){if(q===j7("\\"))this.parseError=!0;this.state="file slash"}else if(this.base!==null&&this.base.scheme==="file"){if(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,q===j7("?"))this.url.query="",this.state="query";else if(q===j7("#"))this.url.fragment="",this.state="fragment";else if(!isNaN(q)){if(this.url.query=null,!Ft7(this.input,this.pointer))mt7(this.url);else this.parseError=!0,this.url.path=[];this.state="path",--this.pointer}}else this.state="path",--this.pointer;return!0};cj.prototype["parse file slash"]=function(q){if(q===j7("/")||q===j7("\\")){if(q===j7("\\"))this.parseError=!0;this.state="file host"}else{if(this.base!==null&&this.base.scheme==="file"){if(!Ft7(this.input,this.pointer)&&vI9(this.base.path[0]))this.url.path.push(this.base.path[0]);this.url.host=this.base.host}this.state="path",--this.pointer}return!0};cj.prototype["parse file host"]=function(q,K){if(isNaN(q)||q===j7("/")||q===j7("\\")||q===j7("?")||q===j7("#"))if(--this.pointer,!this.stateOverride&&bt7(this.buffer))this.parseError=!0,this.state="path";else if(this.buffer===""){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let Y=Bf8(this.buffer,uf8(this.url));if(Y===P5)return P5;if(Y==="localhost")Y="";if(this.url.host=Y,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=K;return!0};cj.prototype["parse path start"]=function(q){if(o0(this.url)){if(q===j7("\\"))this.parseError=!0;if(this.state="path",q!==j7("/")&&q!==j7("\\"))--this.pointer}else if(!this.stateOverride&&q===j7("?"))this.url.query="",this.state="query";else if(!this.stateOverride&&q===j7("#"))this.url.fragment="",this.state="fragment";else if(q!==void 0){if(this.state="path",q!==j7("/"))--this.pointer}else if(this.stateOverride&&this.url.host===null)this.url.path.push("");return!0};cj.prototype["parse path"]=function(q){if(isNaN(q)||q===j7("/")||o0(this.url)&&q===j7("\\")||!this.stateOverride&&(q===j7("?")||q===j7("#"))){if(o0(this.url)&&q===j7("\\"))this.parseError=!0;if(VI9(this.buffer)){if(mt7(this.url),q!==j7("/")&&!(o0(this.url)&&q===j7("\\")))this.url.path.push("")}else if(St7(this.buffer)&&q!==j7("/")&&!(o0(this.url)&&q===j7("\\")))this.url.path.push("");else if(!St7(this.buffer)){if(this.url.scheme==="file"&&this.url.path.length===0&&bt7(this.buffer))this.buffer=`${this.buffer[0]}:`;this.url.path.push(this.buffer)}if(this.buffer="",q===j7("?"))this.url.query="",this.state="query";if(q===j7("#"))this.url.fragment="",this.state="fragment"}else{if(q===j7("%")&&(!a0.isASCIIHex(this.input[this.pointer+1])||!a0.isASCIIHex(this.input[this.pointer+2])))this.parseError=!0;this.buffer+=iX1(q,TI9)}return!0};cj.prototype["parse opaque path"]=function(q){if(q===j7("?"))this.url.query="",this.state="query";else if(q===j7("#"))this.url.fragment="",this.state="fragment";else if(q===j7(" ")){let K=this.input[this.pointer+1];if(K===j7("?")||K===j7("#"))this.url.path+="%20";else this.url.path+=" "}else{if(!isNaN(q)&&q!==j7("%"))this.parseError=!0;if(q===j7("%")&&(!a0.isASCIIHex(this.input[this.pointer+1])||!a0.isASCIIHex(this.input[this.pointer+2])))this.parseError=!0;if(!isNaN(q))this.url.path+=iX1(q,ht7)}return!0};cj.prototype["parse query"]=function(q,K){if(!o0(this.url)||this.url.scheme==="ws"||this.url.scheme==="wss")this.encodingOverride="utf-8";if(!this.stateOverride&&q===j7("#")||isNaN(q)){let Y=o0(this.url)?fI9:GI9;if(this.url.query+=nX1(this.buffer,Y),this.buffer="",q===j7("#"))this.url.fragment="",this.state="fragment"}else if(!isNaN(q)){if(q===j7("%")&&(!a0.isASCIIHex(this.input[this.pointer+1])||!a0.isASCIIHex(this.input[this.pointer+2])))this.parseError=!0;this.buffer+=K}return!0};cj.prototype["parse fragment"]=function(q){if(!isNaN(q)){if(q===j7("%")&&(!a0.isASCIIHex(this.input[this.pointer+1])||!a0.isASCIIHex(this.input[this.pointer+2])))this.parseError=!0;this.url.fragment+=iX1(q,ZI9)}return!0};function gI9(A,q){let K=`${A.scheme}:`;if(A.host!==null){if(K+="//",A.username!==""||A.password!==""){if(K+=A.username,A.password!=="")K+=`:${A.password}`;K+="@"}if(K+=gf8(A.host),A.port!==null)K+=`:${A.port}`}if(A.host===null&&!NU6(A)&&A.path.length>1&&A.path[0]==="")K+="/.";if(K+=Ff8(A),A.query!==null)K+=`?${A.query}`;if(!q&&A.fragment!==null)K+=`#${A.fragment}`;return K}function FI9(A){let q=`${A.scheme}://`;if(q+=gf8(A.host),A.port!==null)q+=`:${A.port}`;return q}function Ff8(A){if(NU6(A))return A.path;let q="";for(let K of A.path)q+=`/${K}`;return q}QI9.serializeURL=gI9;QI9.serializePath=Ff8;QI9.serializeURLOrigin=function(A){switch(A.scheme){case"blob":{let q=QI9.parseURL(Ff8(A));if(q===null)return"null";if(q.scheme!=="http"&&q.scheme!=="https")return"null";return QI9.serializeURLOrigin(q)}case"ftp":case"http":case"https":case"ws":case"wss":return FI9({scheme:A.scheme,host:A.host,port:A.port});case"file":return"null";default:return"null"}};QI9.basicURLParse=function(A,q){if(q===void 0)q={};let K=new cj(A,q.baseURL,q.encodingOverride,q.url,q.stateOverride);if(K.failure)return null;return K.url};QI9.setTheUsername=function(A,q){A.username=nX1(q,mf8)};QI9.setThePassword=function(A,q){A.password=nX1(q,mf8)};QI9.serializeHost=gf8;QI9.cannotHaveAUsernamePasswordPort=uI9;QI9.hasAnOpaquePath=NU6;QI9.serializeInteger=function(A){return String(A)};QI9.parseURL=function(A,q){if(q===void 0)q={};return QI9.basicURLParse(A,{baseURL:q.baseURL,encodingOverride:q.encodingOverride})}});var Uf8=C((eA_,nt7)=>{var{utf8Encode:aI9,utf8DecodeWithoutBOM:Ut7}=dX1(),{percentDecodeBytes:pt7,utf8PercentEncodeString:dt7,isURLEncodedPercentEncode:ct7}=cX1();function lt7(A){return A.codePointAt(0)}function sI9(A){let q=Ab9(A,lt7("&")),K=[];for(let Y of q){if(Y.length===0)continue;let z,w,_=Y.indexOf(lt7("="));if(_>=0)z=Y.slice(0,_),w=Y.slice(_+1);else z=Y,w=new Uint8Array(0);z=it7(z,43,32),w=it7(w,43,32);let $=Ut7(pt7(z)),O=Ut7(pt7(w));K.push([$,O])}return K}function tI9(A){return sI9(aI9(A))}function eI9(A){let q="";for(let[K,Y]of A.entries()){let z=dt7(Y[0],ct7,!0),w=dt7(Y[1],ct7,!0);if(K!==0)q+="&";q+=`${z}=${w}`}return q}function Ab9(A,q){let K=[],Y=0,z=A.indexOf(q);while(z>=0)K.push(A.slice(Y,z)),Y=z+1,z=A.indexOf(q,Y);if(Y!==A.length)K.push(A.slice(Y));return K}function it7(A,q,K){let Y=A.indexOf(q);while(Y>=0)A[Y]=K,Y=A.indexOf(q,Y+1);return A}nt7.exports={parseUrlencodedString:tI9,serializeUrlencoded:eI9}});var ot7=C((qb9)=>{var rt7=QX1(),rX1=pX1();qb9.convert=(A,q,{context:K="The provided value"}={})=>{if(typeof q!=="function")throw new A.TypeError(K+" is not a function");function Y(...z){let w=rX1.tryWrapperForImpl(this),_;for(let $=0;${for(let _=0;_{var pf8=Uf8();Yb9.implementation=class{constructor(q,K,{doNotStripQMark:Y=!1}){let z=K[0];if(this._list=[],this._url=null,!Y&&typeof z==="string"&&z[0]==="?")z=z.slice(1);if(Array.isArray(z))for(let w of z){if(w.length!==2)throw TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element does not contain exactly two elements.");this._list.push([w[0],w[1]])}else if(typeof z==="object"&&Object.getPrototypeOf(z)===null)for(let w of Object.keys(z)){let _=z[w];this._list.push([w,_])}else this._list=pf8.parseUrlencodedString(z)}_updateSteps(){if(this._url!==null){let q=pf8.serializeUrlencoded(this._list);if(q==="")q=null;this._url._url.query=q}}get size(){return this._list.length}append(q,K){this._list.push([q,K]),this._updateSteps()}delete(q,K){let Y=0;while(Y{if(q[0]K[0])return 1;return 0}),this._updateSteps()}[Symbol.iterator](){return this._list[Symbol.iterator]()}toString(){return pf8.serializeUrlencoded(this._list)}}});var cf8=C(($b9)=>{var FN=QX1(),k_=pX1(),wb9=ot7(),st7=k_.newObjectInRealm,CJ=k_.implSymbol,tt7=k_.ctorRegistrySymbol;$b9.is=(A)=>{return k_.isObject(A)&&k_.hasOwn(A,CJ)&&A[CJ]instanceof w66.implementation};$b9.isImpl=(A)=>{return k_.isObject(A)&&A instanceof w66.implementation};$b9.convert=(A,q,{context:K="The provided value"}={})=>{if($b9.is(q))return k_.implForWrapper(q);throw new A.TypeError(`${K} is not of type 'URLSearchParams'.`)};$b9.createDefaultIterator=(A,q,K)=>{let z=A[tt7]["URLSearchParams Iterator"],w=Object.create(z);return Object.defineProperty(w,k_.iterInternalSymbol,{value:{target:q,kind:K,index:0},configurable:!0}),w};function et7(A,q){let K;if(q!==void 0)K=q.prototype;if(!k_.isObject(K))K=A[tt7].URLSearchParams.prototype;return Object.create(K)}$b9.create=(A,q,K)=>{let Y=et7(A);return $b9.setup(Y,A,q,K)};$b9.createImpl=(A,q,K)=>{let Y=$b9.create(A,q,K);return k_.implForWrapper(Y)};$b9._internalSetup=(A,q)=>{};$b9.setup=(A,q,K=[],Y={})=>{if(Y.wrapper=A,$b9._internalSetup(A,q),Object.defineProperty(A,CJ,{value:new w66.implementation(q,K,Y),configurable:!0}),A[CJ][k_.wrapperSymbol]=A,w66.init)w66.init(A[CJ]);return A};$b9.new=(A,q)=>{let K=et7(A,q);if($b9._internalSetup(K,A),Object.defineProperty(K,CJ,{value:Object.create(w66.implementation.prototype),configurable:!0}),K[CJ][k_.wrapperSymbol]=K,w66.init)w66.init(K[CJ]);return K[CJ]};var _b9=new Set(["Window","Worker"]);$b9.install=(A,q)=>{if(!q.some((z)=>_b9.has(z)))return;let K=k_.initCtorRegistry(A);class Y{constructor(){let z=[];{let w=arguments[0];if(w!==void 0)if(k_.isObject(w))if(w[Symbol.iterator]!==void 0)if(!k_.isObject(w))throw new A.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence is not an iterable object.");else{let _=[],$=w;for(let O of $){if(!k_.isObject(O))throw new A.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element is not an iterable object.");else{let H=[],j=O;for(let J of j)J=FN.USVString(J,{context:"Failed to construct 'URLSearchParams': parameter 1 sequence's element's element",globals:A}),H.push(J);O=H}_.push(O)}w=_}else if(!k_.isObject(w))throw new A.TypeError("Failed to construct 'URLSearchParams': parameter 1 record is not an object.");else{let _=Object.create(null);for(let $ of Reflect.ownKeys(w)){let O=Object.getOwnPropertyDescriptor(w,$);if(O&&O.enumerable){let H=$;H=FN.USVString(H,{context:"Failed to construct 'URLSearchParams': parameter 1 record's key",globals:A});let j=w[$];j=FN.USVString(j,{context:"Failed to construct 'URLSearchParams': parameter 1 record's value",globals:A}),_[H]=j}}w=_}else w=FN.USVString(w,{context:"Failed to construct 'URLSearchParams': parameter 1",globals:A});else w="";z.push(w)}return $b9.setup(Object.create(new.target.prototype),A,z)}append(z,w){let _=this!==null&&this!==void 0?this:A;if(!$b9.is(_))throw new A.TypeError("'append' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new A.TypeError(`Failed to execute 'append' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`);let $=[];{let O=arguments[0];O=FN.USVString(O,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 1",globals:A}),$.push(O)}{let O=arguments[1];O=FN.USVString(O,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 2",globals:A}),$.push(O)}return k_.tryWrapperForImpl(_[CJ].append(...$))}delete(z){let w=this!==null&&this!==void 0?this:A;if(!$b9.is(w))throw new A.TypeError("'delete' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new A.TypeError(`Failed to execute 'delete' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);let _=[];{let $=arguments[0];$=FN.USVString($,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 1",globals:A}),_.push($)}{let $=arguments[1];if($!==void 0)$=FN.USVString($,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 2",globals:A});_.push($)}return k_.tryWrapperForImpl(w[CJ].delete(..._))}get(z){let w=this!==null&&this!==void 0?this:A;if(!$b9.is(w))throw new A.TypeError("'get' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new A.TypeError(`Failed to execute 'get' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);let _=[];{let $=arguments[0];$=FN.USVString($,{context:"Failed to execute 'get' on 'URLSearchParams': parameter 1",globals:A}),_.push($)}return w[CJ].get(..._)}getAll(z){let w=this!==null&&this!==void 0?this:A;if(!$b9.is(w))throw new A.TypeError("'getAll' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new A.TypeError(`Failed to execute 'getAll' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);let _=[];{let $=arguments[0];$=FN.USVString($,{context:"Failed to execute 'getAll' on 'URLSearchParams': parameter 1",globals:A}),_.push($)}return k_.tryWrapperForImpl(w[CJ].getAll(..._))}has(z){let w=this!==null&&this!==void 0?this:A;if(!$b9.is(w))throw new A.TypeError("'has' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new A.TypeError(`Failed to execute 'has' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);let _=[];{let $=arguments[0];$=FN.USVString($,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 1",globals:A}),_.push($)}{let $=arguments[1];if($!==void 0)$=FN.USVString($,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 2",globals:A});_.push($)}return w[CJ].has(..._)}set(z,w){let _=this!==null&&this!==void 0?this:A;if(!$b9.is(_))throw new A.TypeError("'set' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new A.TypeError(`Failed to execute 'set' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`);let $=[];{let O=arguments[0];O=FN.USVString(O,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 1",globals:A}),$.push(O)}{let O=arguments[1];O=FN.USVString(O,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 2",globals:A}),$.push(O)}return k_.tryWrapperForImpl(_[CJ].set(...$))}sort(){let z=this!==null&&this!==void 0?this:A;if(!$b9.is(z))throw new A.TypeError("'sort' called on an object that is not a valid instance of URLSearchParams.");return k_.tryWrapperForImpl(z[CJ].sort())}toString(){let z=this!==null&&this!==void 0?this:A;if(!$b9.is(z))throw new A.TypeError("'toString' called on an object that is not a valid instance of URLSearchParams.");return z[CJ].toString()}keys(){if(!$b9.is(this))throw new A.TypeError("'keys' called on an object that is not a valid instance of URLSearchParams.");return $b9.createDefaultIterator(A,this,"key")}values(){if(!$b9.is(this))throw new A.TypeError("'values' called on an object that is not a valid instance of URLSearchParams.");return $b9.createDefaultIterator(A,this,"value")}entries(){if(!$b9.is(this))throw new A.TypeError("'entries' called on an object that is not a valid instance of URLSearchParams.");return $b9.createDefaultIterator(A,this,"key+value")}forEach(z){if(!$b9.is(this))throw new A.TypeError("'forEach' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new A.TypeError("Failed to execute 'forEach' on 'iterable': 1 argument required, but only 0 present.");z=wb9.convert(A,z,{context:"Failed to execute 'forEach' on 'iterable': The callback provided as parameter 1"});let w=arguments[1],_=Array.from(this[CJ]),$=0;while($<_.length){let[O,H]=_[$].map(k_.tryWrapperForImpl);z.call(w,H,O,this),_=Array.from(this[CJ]),$++}}get size(){let z=this!==null&&this!==void 0?this:A;if(!$b9.is(z))throw new A.TypeError("'get size' called on an object that is not a valid instance of URLSearchParams.");return z[CJ].size}}Object.defineProperties(Y.prototype,{append:{enumerable:!0},delete:{enumerable:!0},get:{enumerable:!0},getAll:{enumerable:!0},has:{enumerable:!0},set:{enumerable:!0},sort:{enumerable:!0},toString:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0},forEach:{enumerable:!0},size:{enumerable:!0},[Symbol.toStringTag]:{value:"URLSearchParams",configurable:!0},[Symbol.iterator]:{value:Y.prototype.entries,configurable:!0,writable:!0}}),K.URLSearchParams=Y,K["URLSearchParams Iterator"]=Object.create(K["%IteratorPrototype%"],{[Symbol.toStringTag]:{configurable:!0,value:"URLSearchParams Iterator"}}),k_.define(K["URLSearchParams Iterator"],{next(){let z=this&&this[k_.iterInternalSymbol];if(!z)throw new A.TypeError("next() called on a value that is not a URLSearchParams iterator object");let{target:w,kind:_,index:$}=z,O=Array.from(w[CJ]),H=O.length;if($>=H)return st7(A,{value:void 0,done:!0});let j=O[$];return z.index=$+1,st7(A,k_.iteratorResult(j.map(k_.tryWrapperForImpl),_))}}),Object.defineProperty(A,"URLSearchParams",{configurable:!0,writable:!0,value:Y})};var w66=at7()});var Ye7=C((Xb9)=>{var o2=Qf8(),Ke7=Uf8(),Db9=cf8();Xb9.implementation=class A{constructor(q,[K,Y]){let z=null;if(Y!==void 0){if(z=o2.basicURLParse(Y),z===null)throw TypeError(`Invalid base URL: ${Y}`)}let w=o2.basicURLParse(K,{baseURL:z});if(w===null)throw TypeError(`Invalid URL: ${K}`);let _=w.query!==null?w.query:"";this._url=w,this._query=Db9.createImpl(q,[_],{doNotStripQMark:!0}),this._query._url=this}static parse(q,K,Y){try{return new A(q,[K,Y])}catch{return null}}static canParse(q,K){let Y=null;if(K!==void 0){if(Y=o2.basicURLParse(K),Y===null)return!1}if(o2.basicURLParse(q,{baseURL:Y})===null)return!1;return!0}get href(){return o2.serializeURL(this._url)}set href(q){let K=o2.basicURLParse(q);if(K===null)throw TypeError(`Invalid URL: ${q}`);this._url=K,this._query._list.splice(0);let{query:Y}=K;if(Y!==null)this._query._list=Ke7.parseUrlencodedString(Y)}get origin(){return o2.serializeURLOrigin(this._url)}get protocol(){return`${this._url.scheme}:`}set protocol(q){o2.basicURLParse(`${q}:`,{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(q){if(o2.cannotHaveAUsernamePasswordPort(this._url))return;o2.setTheUsername(this._url,q)}get password(){return this._url.password}set password(q){if(o2.cannotHaveAUsernamePasswordPort(this._url))return;o2.setThePassword(this._url,q)}get host(){let q=this._url;if(q.host===null)return"";if(q.port===null)return o2.serializeHost(q.host);return`${o2.serializeHost(q.host)}:${o2.serializeInteger(q.port)}`}set host(q){if(o2.hasAnOpaquePath(this._url))return;o2.basicURLParse(q,{url:this._url,stateOverride:"host"})}get hostname(){if(this._url.host===null)return"";return o2.serializeHost(this._url.host)}set hostname(q){if(o2.hasAnOpaquePath(this._url))return;o2.basicURLParse(q,{url:this._url,stateOverride:"hostname"})}get port(){if(this._url.port===null)return"";return o2.serializeInteger(this._url.port)}set port(q){if(o2.cannotHaveAUsernamePasswordPort(this._url))return;if(q==="")this._url.port=null;else o2.basicURLParse(q,{url:this._url,stateOverride:"port"})}get pathname(){return o2.serializePath(this._url)}set pathname(q){if(o2.hasAnOpaquePath(this._url))return;this._url.path=[],o2.basicURLParse(q,{url:this._url,stateOverride:"path start"})}get search(){if(this._url.query===null||this._url.query==="")return"";return`?${this._url.query}`}set search(q){let K=this._url;if(q===""){K.query=null,this._query._list=[];return}let Y=q[0]==="?"?q.substring(1):q;K.query="",o2.basicURLParse(Y,{url:K,stateOverride:"query"}),this._query._list=Ke7.parseUrlencodedString(Y)}get searchParams(){return this._query}get hash(){if(this._url.fragment===null||this._url.fragment==="")return"";return`#${this._url.fragment}`}set hash(q){if(q===""){this._url.fragment=null;return}let K=q[0]==="#"?q.substring(1):q;this._url.fragment="",o2.basicURLParse(K,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}}});var $e7=C((Gb9)=>{var _G=QX1(),QN=pX1(),hz=QN.implSymbol,Wb9=QN.ctorRegistrySymbol;Gb9.is=(A)=>{return QN.isObject(A)&&QN.hasOwn(A,hz)&&A[hz]instanceof qF.implementation};Gb9.isImpl=(A)=>{return QN.isObject(A)&&A instanceof qF.implementation};Gb9.convert=(A,q,{context:K="The provided value"}={})=>{if(Gb9.is(q))return QN.implForWrapper(q);throw new A.TypeError(`${K} is not of type 'URL'.`)};function ze7(A,q){let K;if(q!==void 0)K=q.prototype;if(!QN.isObject(K))K=A[Wb9].URL.prototype;return Object.create(K)}Gb9.create=(A,q,K)=>{let Y=ze7(A);return Gb9.setup(Y,A,q,K)};Gb9.createImpl=(A,q,K)=>{let Y=Gb9.create(A,q,K);return QN.implForWrapper(Y)};Gb9._internalSetup=(A,q)=>{};Gb9.setup=(A,q,K=[],Y={})=>{if(Y.wrapper=A,Gb9._internalSetup(A,q),Object.defineProperty(A,hz,{value:new qF.implementation(q,K,Y),configurable:!0}),A[hz][QN.wrapperSymbol]=A,qF.init)qF.init(A[hz]);return A};Gb9.new=(A,q)=>{let K=ze7(A,q);if(Gb9._internalSetup(K,A),Object.defineProperty(K,hz,{value:Object.create(qF.implementation.prototype),configurable:!0}),K[hz][QN.wrapperSymbol]=K,qF.init)qF.init(K[hz]);return K[hz]};var Zb9=new Set(["Window","Worker"]);Gb9.install=(A,q)=>{if(!q.some((z)=>Zb9.has(z)))return;let K=QN.initCtorRegistry(A);class Y{constructor(z){if(arguments.length<1)throw new A.TypeError(`Failed to construct 'URL': 1 argument required, but only ${arguments.length} present.`);let w=[];{let _=arguments[0];_=_G.USVString(_,{context:"Failed to construct 'URL': parameter 1",globals:A}),w.push(_)}{let _=arguments[1];if(_!==void 0)_=_G.USVString(_,{context:"Failed to construct 'URL': parameter 2",globals:A});w.push(_)}return Gb9.setup(Object.create(new.target.prototype),A,w)}toJSON(){let z=this!==null&&this!==void 0?this:A;if(!Gb9.is(z))throw new A.TypeError("'toJSON' called on an object that is not a valid instance of URL.");return z[hz].toJSON()}get href(){let z=this!==null&&this!==void 0?this:A;if(!Gb9.is(z))throw new A.TypeError("'get href' called on an object that is not a valid instance of URL.");return z[hz].href}set href(z){let w=this!==null&&this!==void 0?this:A;if(!Gb9.is(w))throw new A.TypeError("'set href' called on an object that is not a valid instance of URL.");z=_G.USVString(z,{context:"Failed to set the 'href' property on 'URL': The provided value",globals:A}),w[hz].href=z}toString(){let z=this;if(!Gb9.is(z))throw new A.TypeError("'toString' called on an object that is not a valid instance of URL.");return z[hz].href}get origin(){let z=this!==null&&this!==void 0?this:A;if(!Gb9.is(z))throw new A.TypeError("'get origin' called on an object that is not a valid instance of URL.");return z[hz].origin}get protocol(){let z=this!==null&&this!==void 0?this:A;if(!Gb9.is(z))throw new A.TypeError("'get protocol' called on an object that is not a valid instance of URL.");return z[hz].protocol}set protocol(z){let w=this!==null&&this!==void 0?this:A;if(!Gb9.is(w))throw new A.TypeError("'set protocol' called on an object that is not a valid instance of URL.");z=_G.USVString(z,{context:"Failed to set the 'protocol' property on 'URL': The provided value",globals:A}),w[hz].protocol=z}get username(){let z=this!==null&&this!==void 0?this:A;if(!Gb9.is(z))throw new A.TypeError("'get username' called on an object that is not a valid instance of URL.");return z[hz].username}set username(z){let w=this!==null&&this!==void 0?this:A;if(!Gb9.is(w))throw new A.TypeError("'set username' called on an object that is not a valid instance of URL.");z=_G.USVString(z,{context:"Failed to set the 'username' property on 'URL': The provided value",globals:A}),w[hz].username=z}get password(){let z=this!==null&&this!==void 0?this:A;if(!Gb9.is(z))throw new A.TypeError("'get password' called on an object that is not a valid instance of URL.");return z[hz].password}set password(z){let w=this!==null&&this!==void 0?this:A;if(!Gb9.is(w))throw new A.TypeError("'set password' called on an object that is not a valid instance of URL.");z=_G.USVString(z,{context:"Failed to set the 'password' property on 'URL': The provided value",globals:A}),w[hz].password=z}get host(){let z=this!==null&&this!==void 0?this:A;if(!Gb9.is(z))throw new A.TypeError("'get host' called on an object that is not a valid instance of URL.");return z[hz].host}set host(z){let w=this!==null&&this!==void 0?this:A;if(!Gb9.is(w))throw new A.TypeError("'set host' called on an object that is not a valid instance of URL.");z=_G.USVString(z,{context:"Failed to set the 'host' property on 'URL': The provided value",globals:A}),w[hz].host=z}get hostname(){let z=this!==null&&this!==void 0?this:A;if(!Gb9.is(z))throw new A.TypeError("'get hostname' called on an object that is not a valid instance of URL.");return z[hz].hostname}set hostname(z){let w=this!==null&&this!==void 0?this:A;if(!Gb9.is(w))throw new A.TypeError("'set hostname' called on an object that is not a valid instance of URL.");z=_G.USVString(z,{context:"Failed to set the 'hostname' property on 'URL': The provided value",globals:A}),w[hz].hostname=z}get port(){let z=this!==null&&this!==void 0?this:A;if(!Gb9.is(z))throw new A.TypeError("'get port' called on an object that is not a valid instance of URL.");return z[hz].port}set port(z){let w=this!==null&&this!==void 0?this:A;if(!Gb9.is(w))throw new A.TypeError("'set port' called on an object that is not a valid instance of URL.");z=_G.USVString(z,{context:"Failed to set the 'port' property on 'URL': The provided value",globals:A}),w[hz].port=z}get pathname(){let z=this!==null&&this!==void 0?this:A;if(!Gb9.is(z))throw new A.TypeError("'get pathname' called on an object that is not a valid instance of URL.");return z[hz].pathname}set pathname(z){let w=this!==null&&this!==void 0?this:A;if(!Gb9.is(w))throw new A.TypeError("'set pathname' called on an object that is not a valid instance of URL.");z=_G.USVString(z,{context:"Failed to set the 'pathname' property on 'URL': The provided value",globals:A}),w[hz].pathname=z}get search(){let z=this!==null&&this!==void 0?this:A;if(!Gb9.is(z))throw new A.TypeError("'get search' called on an object that is not a valid instance of URL.");return z[hz].search}set search(z){let w=this!==null&&this!==void 0?this:A;if(!Gb9.is(w))throw new A.TypeError("'set search' called on an object that is not a valid instance of URL.");z=_G.USVString(z,{context:"Failed to set the 'search' property on 'URL': The provided value",globals:A}),w[hz].search=z}get searchParams(){let z=this!==null&&this!==void 0?this:A;if(!Gb9.is(z))throw new A.TypeError("'get searchParams' called on an object that is not a valid instance of URL.");return QN.getSameObject(this,"searchParams",()=>{return QN.tryWrapperForImpl(z[hz].searchParams)})}get hash(){let z=this!==null&&this!==void 0?this:A;if(!Gb9.is(z))throw new A.TypeError("'get hash' called on an object that is not a valid instance of URL.");return z[hz].hash}set hash(z){let w=this!==null&&this!==void 0?this:A;if(!Gb9.is(w))throw new A.TypeError("'set hash' called on an object that is not a valid instance of URL.");z=_G.USVString(z,{context:"Failed to set the 'hash' property on 'URL': The provided value",globals:A}),w[hz].hash=z}static parse(z){if(arguments.length<1)throw new A.TypeError(`Failed to execute 'parse' on 'URL': 1 argument required, but only ${arguments.length} present.`);let w=[];{let _=arguments[0];_=_G.USVString(_,{context:"Failed to execute 'parse' on 'URL': parameter 1",globals:A}),w.push(_)}{let _=arguments[1];if(_!==void 0)_=_G.USVString(_,{context:"Failed to execute 'parse' on 'URL': parameter 2",globals:A});w.push(_)}return QN.tryWrapperForImpl(qF.implementation.parse(A,...w))}static canParse(z){if(arguments.length<1)throw new A.TypeError(`Failed to execute 'canParse' on 'URL': 1 argument required, but only ${arguments.length} present.`);let w=[];{let _=arguments[0];_=_G.USVString(_,{context:"Failed to execute 'canParse' on 'URL': parameter 1",globals:A}),w.push(_)}{let _=arguments[1];if(_!==void 0)_=_G.USVString(_,{context:"Failed to execute 'canParse' on 'URL': parameter 2",globals:A});w.push(_)}return qF.implementation.canParse(...w)}}if(Object.defineProperties(Y.prototype,{toJSON:{enumerable:!0},href:{enumerable:!0},toString:{enumerable:!0},origin:{enumerable:!0},protocol:{enumerable:!0},username:{enumerable:!0},password:{enumerable:!0},host:{enumerable:!0},hostname:{enumerable:!0},port:{enumerable:!0},pathname:{enumerable:!0},search:{enumerable:!0},searchParams:{enumerable:!0},hash:{enumerable:!0},[Symbol.toStringTag]:{value:"URL",configurable:!0}}),Object.defineProperties(Y,{parse:{enumerable:!0},canParse:{enumerable:!0}}),K.URL=Y,Object.defineProperty(A,"URL",{configurable:!0,writable:!0,value:Y}),q.includes("Window"))Object.defineProperty(A,"webkitURL",{configurable:!0,writable:!0,value:Y})};var qF=Ye7()});var Oe7=C((Lb9)=>{var kb9=$e7(),Eb9=cf8();Lb9.URL=kb9;Lb9.URLSearchParams=Eb9});var je7=C((hb9)=>{var{URL:Sb9,URLSearchParams:Cb9}=Oe7(),pb=Qf8(),He7=cX1(),aX1={Array,Object,Promise,String,TypeError};Sb9.install(aX1,["Window"]);Cb9.install(aX1,["Window"]);hb9.URL=aX1.URL;hb9.URLSearchParams=aX1.URLSearchParams;hb9.parseURL=pb.parseURL;hb9.basicURLParse=pb.basicURLParse;hb9.serializeURL=pb.serializeURL;hb9.serializePath=pb.serializePath;hb9.serializeHost=pb.serializeHost;hb9.serializeInteger=pb.serializeInteger;hb9.serializeURLOrigin=pb.serializeURLOrigin;hb9.setTheUsername=pb.setTheUsername;hb9.setThePassword=pb.setThePassword;hb9.cannotHaveAUsernamePasswordPort=pb.cannotHaveAUsernamePasswordPort;hb9.hasAnOpaquePath=pb.hasAnOpaquePath;hb9.percentDecodeString=He7.percentDecodeString;hb9.percentDecodeBytes=He7.percentDecodeBytes});var qT8=C((cb,Ve7)=>{Object.defineProperty(cb,"__esModule",{value:!0});function SZ6(A){return A&&typeof A==="object"&&"default"in A?A.default:A}var db=SZ6(g6("stream")),Xe7=SZ6(g6("http")),tX1=SZ6(g6("url")),Pe7=SZ6(je7()),nb9=SZ6(g6("https")),JY6=SZ6(g6("zlib")),rb9=db.Readable,Il=Symbol("buffer"),if8=Symbol("type");class yZ6{constructor(){this[if8]="";let A=arguments[0],q=arguments[1],K=[],Y=0;if(A){let w=A,_=Number(w.length);for(let $=0;$<_;$++){let O=w[$],H;if(O instanceof Buffer)H=O;else if(ArrayBuffer.isView(O))H=Buffer.from(O.buffer,O.byteOffset,O.byteLength);else if(O instanceof ArrayBuffer)H=Buffer.from(O);else if(O instanceof yZ6)H=O[Il];else H=Buffer.from(typeof O==="string"?O:String(O));Y+=H.length,K.push(H)}}this[Il]=Buffer.concat(K);let z=q&&q.type!==void 0&&String(q.type).toLowerCase();if(z&&!/[^\u0020-\u007E]/.test(z))this[if8]=z}get size(){return this[Il].length}get type(){return this[if8]}text(){return Promise.resolve(this[Il].toString())}arrayBuffer(){let A=this[Il],q=A.buffer.slice(A.byteOffset,A.byteOffset+A.byteLength);return Promise.resolve(q)}stream(){let A=new rb9;return A._read=function(){},A.push(this[Il]),A.push(null),A}toString(){return"[object Blob]"}slice(){let A=this.size,q=arguments[0],K=arguments[1],Y,z;if(q===void 0)Y=0;else if(q<0)Y=Math.max(A+q,0);else Y=Math.min(q,A);if(K===void 0)z=A;else if(K<0)z=Math.max(A+K,0);else z=Math.min(K,A);let w=Math.max(z-Y,0),$=this[Il].slice(Y,Y+w),O=new yZ6([],{type:arguments[2]});return O[Il]=$,O}}Object.defineProperties(yZ6.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});Object.defineProperty(yZ6.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0});function s0(A,q,K){if(Error.call(this,A),this.message=A,this.type=q,K)this.code=this.errno=K.code;Error.captureStackTrace(this,this.constructor)}s0.prototype=Object.create(Error.prototype);s0.prototype.constructor=s0;s0.prototype.name="FetchError";var af8;try{af8=(()=>{throw new Error("Cannot require module "+"encoding");})().convert}catch(A){}var xl=Symbol("Body internals"),Je7=db.PassThrough;function jP(A){var q=this,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=K.size;let z=Y===void 0?0:Y;var w=K.timeout;let _=w===void 0?0:w;if(A==null)A=null;else if(We7(A))A=Buffer.from(A.toString());else if(EU6(A));else if(Buffer.isBuffer(A));else if(Object.prototype.toString.call(A)==="[object ArrayBuffer]")A=Buffer.from(A);else if(ArrayBuffer.isView(A))A=Buffer.from(A.buffer,A.byteOffset,A.byteLength);else if(A instanceof db);else A=Buffer.from(String(A));if(this[xl]={body:A,disturbed:!1,error:null},this.size=z,this.timeout=_,A instanceof db)A.on("error",function($){let O=$.name==="AbortError"?$:new s0(`Invalid response body while trying to fetch ${q.url}: ${$.message}`,"system",$);q[xl].error=O})}jP.prototype={get body(){return this[xl].body},get bodyUsed(){return this[xl].disturbed},arrayBuffer(){return EZ6.call(this).then(function(A){return A.buffer.slice(A.byteOffset,A.byteOffset+A.byteLength)})},blob(){let A=this.headers&&this.headers.get("content-type")||"";return EZ6.call(this).then(function(q){return Object.assign(new yZ6([],{type:A.toLowerCase()}),{[Il]:q})})},json(){var A=this;return EZ6.call(this).then(function(q){try{return JSON.parse(q.toString())}catch(K){return jP.Promise.reject(new s0(`invalid json response body at ${A.url} reason: ${K.message}`,"invalid-json"))}})},text(){return EZ6.call(this).then(function(A){return A.toString()})},buffer(){return EZ6.call(this)},textConverted(){var A=this;return EZ6.call(this).then(function(q){return ob9(q,A.headers)})}};Object.defineProperties(jP.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}});jP.mixIn=function(A){for(let q of Object.getOwnPropertyNames(jP.prototype))if(!(q in A)){let K=Object.getOwnPropertyDescriptor(jP.prototype,q);Object.defineProperty(A,q,K)}};function EZ6(){var A=this;if(this[xl].disturbed)return jP.Promise.reject(TypeError(`body used already for: ${this.url}`));if(this[xl].disturbed=!0,this[xl].error)return jP.Promise.reject(this[xl].error);let q=this.body;if(q===null)return jP.Promise.resolve(Buffer.alloc(0));if(EU6(q))q=q.stream();if(Buffer.isBuffer(q))return jP.Promise.resolve(q);if(!(q instanceof db))return jP.Promise.resolve(Buffer.alloc(0));let K=[],Y=0,z=!1;return new jP.Promise(function(w,_){let $;if(A.timeout)$=setTimeout(function(){z=!0,_(new s0(`Response timeout while trying to fetch ${A.url} (over ${A.timeout}ms)`,"body-timeout"))},A.timeout);q.on("error",function(O){if(O.name==="AbortError")z=!0,_(O);else _(new s0(`Invalid response body while trying to fetch ${A.url}: ${O.message}`,"system",O))}),q.on("data",function(O){if(z||O===null)return;if(A.size&&Y+O.length>A.size){z=!0,_(new s0(`content size at ${A.url} over limit: ${A.size}`,"max-size"));return}Y+=O.length,K.push(O)}),q.on("end",function(){if(z)return;clearTimeout($);try{w(Buffer.concat(K,Y))}catch(O){_(new s0(`Could not create Buffer from response body for ${A.url}: ${O.message}`,"system",O))}})})}function ob9(A,q){if(typeof af8!=="function")throw Error("The package `encoding` must be installed to use the textConverted() function");let K=q.get("content-type"),Y="utf-8",z,w;if(K)z=/charset=([^;]*)/i.exec(K);if(w=A.slice(0,1024).toString(),!z&&w)z=/0&&arguments[0]!==void 0?arguments[0]:void 0;if(this[hJ]=Object.create(null),A instanceof VS){let q=A.raw(),K=Object.keys(q);for(let Y of K)for(let z of q[Y])this.append(Y,z);return}if(A==null);else if(typeof A==="object"){let q=A[Symbol.iterator];if(q!=null){if(typeof q!=="function")throw TypeError("Header pairs must be iterable");let K=[];for(let Y of A){if(typeof Y!=="object"||typeof Y[Symbol.iterator]!=="function")throw TypeError("Each header pair must be iterable");K.push(Array.from(Y))}for(let Y of K){if(Y.length!==2)throw TypeError("Each header pair must be a name/value tuple");this.append(Y[0],Y[1])}}else for(let K of Object.keys(A)){let Y=A[K];this.append(K,Y)}}else throw TypeError("Provided initializer must be an object")}get(A){A=`${A}`,vU6(A);let q=LZ6(this[hJ],A);if(q===void 0)return null;return this[hJ][q].join(", ")}forEach(A){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,K=tf8(this),Y=0;while(Y1&&arguments[1]!==void 0?arguments[1]:"key+value";return Object.keys(A[hJ]).sort().map(q==="key"?function(Y){return Y.toLowerCase()}:q==="value"?function(Y){return A[hJ][Y].join(", ")}:function(Y){return[Y.toLowerCase(),A[hJ][Y].join(", ")]})}var ef8=Symbol("internal");function nf8(A,q){let K=Object.create(AT8);return K[ef8]={target:A,kind:q,index:0},K}var AT8=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==AT8)throw TypeError("Value of `this` is not a HeadersIterator");var A=this[ef8];let{target:q,kind:K,index:Y}=A,z=tf8(q,K),w=z.length;if(Y>=w)return{value:void 0,done:!0};return this[ef8].index=Y+1,{value:z[Y],done:!1}}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));Object.defineProperty(AT8,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});function sb9(A){let q=Object.assign({__proto__:null},A[hJ]),K=LZ6(A[hJ],"Host");if(K!==void 0)q[K]=q[K][0];return q}function tb9(A){let q=new VS;for(let K of Object.keys(A)){if(Te7.test(K))continue;if(Array.isArray(A[K]))for(let Y of A[K]){if(sf8.test(Y))continue;if(q[hJ][K]===void 0)q[hJ][K]=[Y];else q[hJ][K].push(Y)}else if(!sf8.test(A[K]))q[hJ][K]=[A[K]]}return q}var _66=Symbol("Response internals"),eb9=Xe7.STATUS_CODES;class TS{constructor(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};jP.call(this,A,q);let K=q.status||200,Y=new VS(q.headers);if(A!=null&&!Y.has("Content-Type")){let z=Ge7(A);if(z)Y.append("Content-Type",z)}this[_66]={url:q.url,status:K,statusText:q.statusText||eb9[K],headers:Y,counter:q.counter}}get url(){return this[_66].url||""}get status(){return this[_66].status}get ok(){return this[_66].status>=200&&this[_66].status<300}get redirected(){return this[_66].counter>0}get statusText(){return this[_66].statusText}get headers(){return this[_66].headers}clone(){return new TS(Ze7(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}jP.mixIn(TS.prototype);Object.defineProperties(TS.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});Object.defineProperty(TS.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});var bl=Symbol("Request internals"),Ax9=tX1.URL||Pe7.URL,qx9=tX1.parse,Kx9=tX1.format;function rf8(A){if(/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(A))A=new Ax9(A).toString();return qx9(A)}var Yx9="destroy"in db.Readable.prototype;function sX1(A){return typeof A==="object"&&typeof A[bl]==="object"}function zx9(A){let q=A&&typeof A==="object"&&Object.getPrototypeOf(A);return!!(q&&q.constructor.name==="AbortSignal")}class O66{constructor(A){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K;if(!sX1(A)){if(A&&A.href)K=rf8(A.href);else K=rf8(`${A}`);A={}}else K=rf8(A.url);let Y=q.method||A.method||"GET";if(Y=Y.toUpperCase(),(q.body!=null||sX1(A)&&A.body!==null)&&(Y==="GET"||Y==="HEAD"))throw TypeError("Request with GET/HEAD method cannot have body");let z=q.body!=null?q.body:sX1(A)&&A.body!==null?Ze7(A):null;jP.call(this,z,{timeout:q.timeout||A.timeout||0,size:q.size||A.size||0});let w=new VS(q.headers||A.headers||{});if(z!=null&&!w.has("Content-Type")){let $=Ge7(z);if($)w.append("Content-Type",$)}let _=sX1(A)?A.signal:null;if("signal"in q)_=q.signal;if(_!=null&&!zx9(_))throw TypeError("Expected signal to be an instanceof AbortSignal");this[bl]={method:Y,redirect:q.redirect||A.redirect||"follow",headers:w,parsedURL:K,signal:_},this.follow=q.follow!==void 0?q.follow:A.follow!==void 0?A.follow:20,this.compress=q.compress!==void 0?q.compress:A.compress!==void 0?A.compress:!0,this.counter=q.counter||A.counter||0,this.agent=q.agent||A.agent}get method(){return this[bl].method}get url(){return Kx9(this[bl].parsedURL)}get headers(){return this[bl].headers}get redirect(){return this[bl].redirect}get signal(){return this[bl].signal}clone(){return new O66(this)}}jP.mixIn(O66.prototype);Object.defineProperty(O66.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(O66.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}});function wx9(A){let q=A[bl].parsedURL,K=new VS(A[bl].headers);if(!K.has("Accept"))K.set("Accept","*/*");if(!q.protocol||!q.hostname)throw TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(q.protocol))throw TypeError("Only HTTP(S) protocols are supported");if(A.signal&&A.body instanceof db.Readable&&!Yx9)throw Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let Y=null;if(A.body==null&&/^(POST|PUT)$/i.test(A.method))Y="0";if(A.body!=null){let w=fe7(A);if(typeof w==="number")Y=String(w)}if(Y)K.set("Content-Length",Y);if(!K.has("User-Agent"))K.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)");if(A.compress&&!K.has("Accept-Encoding"))K.set("Accept-Encoding","gzip,deflate");let z=A.agent;if(typeof z==="function")z=z(q);return Object.assign({},q,{method:A.method,headers:sb9(K),agent:z})}function RZ6(A){Error.call(this,A),this.type="aborted",this.message=A,Error.captureStackTrace(this,this.constructor)}RZ6.prototype=Object.create(Error.prototype);RZ6.prototype.constructor=RZ6;RZ6.prototype.name="AbortError";var kU6=tX1.URL||Pe7.URL,De7=db.PassThrough,_x9=function(q,K){let Y=new kU6(K).hostname,z=new kU6(q).hostname;return Y===z||Y[Y.length-z.length-1]==="."&&Y.endsWith(z)},$x9=function(q,K){let Y=new kU6(K).protocol,z=new kU6(q).protocol;return Y===z};function $66(A,q){if(!$66.Promise)throw Error("native promise missing, set fetch.Promise to your favorite alternative");return jP.Promise=$66.Promise,new $66.Promise(function(K,Y){let z=new O66(A,q),w=wx9(z),_=(w.protocol==="https:"?nb9:Xe7).request,$=z.signal,O=null,H=function(){let P=new RZ6("The user aborted a request.");if(Y(P),z.body&&z.body instanceof db.Readable)of8(z.body,P);if(!O||!O.body)return;O.body.emit("error",P)};if($&&$.aborted){H();return}let j=function(){H(),D()},J=_(w),M;if($)$.addEventListener("abort",j);function D(){if(J.abort(),$)$.removeEventListener("abort",j);clearTimeout(M)}if(z.timeout)J.once("socket",function(X){M=setTimeout(function(){Y(new s0(`network timeout at: ${z.url}`,"request-timeout")),D()},z.timeout)});if(J.on("error",function(X){if(Y(new s0(`request to ${z.url} failed, reason: ${X.message}`,"system",X)),O&&O.body)of8(O.body,X);D()}),Ox9(J,function(X){if($&&$.aborted)return;if(O&&O.body)of8(O.body,X)}),parseInt(process.version.substring(1))<14)J.on("socket",function(X){X.addListener("close",function(P){let W=X.listenerCount("data")>0;if(O&&W&&!P&&!($&&$.aborted)){let Z=Error("Premature close");Z.code="ERR_STREAM_PREMATURE_CLOSE",O.body.emit("error",Z)}})});J.on("response",function(X){clearTimeout(M);let P=tb9(X.headers);if($66.isRedirect(X.statusCode)){let V=P.get("Location"),N=null;try{N=V===null?null:new kU6(V,z.url).toString()}catch(v){if(z.redirect!=="manual"){Y(new s0(`uri requested responds with an invalid redirect URL: ${V}`,"invalid-redirect")),D();return}}switch(z.redirect){case"error":Y(new s0(`uri requested responds with a redirect, redirect mode is set to error: ${z.url}`,"no-redirect")),D();return;case"manual":if(N!==null)try{P.set("Location",N)}catch(y){Y(y)}break;case"follow":if(N===null)break;if(z.counter>=z.follow){Y(new s0(`maximum redirect reached at: ${z.url}`,"max-redirect")),D();return}let v={headers:new VS(z.headers),follow:z.follow,counter:z.counter+1,agent:z.agent,compress:z.compress,method:z.method,body:z.body,signal:z.signal,timeout:z.timeout,size:z.size};if(!_x9(z.url,N)||!$x9(z.url,N))for(let y of["authorization","www-authenticate","cookie","cookie2"])v.headers.delete(y);if(X.statusCode!==303&&z.body&&fe7(z)===null){Y(new s0("Cannot follow redirect with body being a readable stream","unsupported-redirect")),D();return}if(X.statusCode===303||(X.statusCode===301||X.statusCode===302)&&z.method==="POST")v.method="GET",v.body=void 0,v.headers.delete("content-length");K($66(new O66(N,v))),D();return}}X.once("end",function(){if($)$.removeEventListener("abort",j)});let W=X.pipe(new De7),Z={url:z.url,status:X.statusCode,statusText:X.statusMessage,headers:P,size:z.size,timeout:z.timeout,counter:z.counter},G=P.get("Content-Encoding");if(!z.compress||z.method==="HEAD"||G===null||X.statusCode===204||X.statusCode===304){O=new TS(W,Z),K(O);return}let f={flush:JY6.Z_SYNC_FLUSH,finishFlush:JY6.Z_SYNC_FLUSH};if(G=="gzip"||G=="x-gzip"){W=W.pipe(JY6.createGunzip(f)),O=new TS(W,Z),K(O);return}if(G=="deflate"||G=="x-deflate"){let V=X.pipe(new De7);V.once("data",function(N){if((N[0]&15)===8)W=W.pipe(JY6.createInflate());else W=W.pipe(JY6.createInflateRaw());O=new TS(W,Z),K(O)}),V.on("end",function(){if(!O)O=new TS(W,Z),K(O)});return}if(G=="br"&&typeof JY6.createBrotliDecompress==="function"){W=W.pipe(JY6.createBrotliDecompress()),O=new TS(W,Z),K(O);return}O=new TS(W,Z),K(O)}),ab9(J,z)})}function Ox9(A,q){let K;A.on("socket",function(Y){K=Y}),A.on("response",function(Y){let z=Y.headers;if(z["transfer-encoding"]==="chunked"&&!z["content-length"])Y.once("close",function(w){if(K&&K.listenerCount("data")>0&&!w){let $=Error("Premature close");$.code="ERR_STREAM_PREMATURE_CLOSE",q($)}})})}function of8(A,q){if(A.destroy)A.destroy(q);else A.emit("error",q),A.end()}$66.isRedirect=function(A){return A===301||A===302||A===303||A===307||A===308};$66.Promise=global.Promise;Ve7.exports=cb=$66;Object.defineProperty(cb,"__esModule",{value:!0});cb.default=cb;cb.Headers=VS;cb.Request=O66;cb.Response=TS;cb.FetchError=s0;cb.AbortError=RZ6});var ve7=C(($7_,Ne7)=>{var KF=(A)=>A!==null&&typeof A==="object"&&typeof A.pipe==="function";KF.writable=(A)=>KF(A)&&A.writable!==!1&&typeof A._write==="function"&&typeof A._writableState==="object";KF.readable=(A)=>KF(A)&&A.readable!==!1&&typeof A._read==="function"&&typeof A._readableState==="object";KF.duplex=(A)=>KF.writable(A)&&KF.readable(A);KF.transform=(A)=>KF.duplex(A)&&typeof A._transform==="function";Ne7.exports=KF});var ke7=C((O7_,Hx9)=>{Hx9.exports={name:"gaxios",version:"6.7.1",description:"A simple common HTTP client specifically for Google APIs and services.",main:"build/src/index.js",types:"build/src/index.d.ts",files:["build/src"],scripts:{lint:"gts check",test:"c8 mocha build/test","presystem-test":"npm run compile","system-test":"mocha build/system-test --timeout 80000",compile:"tsc -p .",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",webpack:"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js",docs:"compodoc src/","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../",prelint:"cd samples; npm link ../; npm install",clean:"gts clean",precompile:"gts clean"},repository:"googleapis/gaxios",keywords:["google"],engines:{node:">=14"},author:"Google, LLC",license:"Apache-2.0",devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@compodoc/compodoc":"1.1.19","@types/cors":"^2.8.6","@types/express":"^4.16.1","@types/extend":"^3.0.1","@types/mocha":"^9.0.0","@types/multiparty":"0.0.36","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^20.0.0","@types/node-fetch":"^2.5.7","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","@types/uuid":"^10.0.0","abort-controller":"^3.0.0",assert:"^2.0.0",browserify:"^17.0.0",c8:"^8.0.0",cheerio:"1.0.0-rc.10",cors:"^2.8.5",execa:"^5.0.0",express:"^4.16.4","form-data":"^4.0.0",gts:"^5.0.0","is-docker":"^2.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"5.0.0",linkinator:"^3.0.0",mocha:"^8.0.0",multiparty:"^4.2.1",mv:"^2.1.1",ncp:"^2.0.0",nock:"^13.0.0","null-loader":"^4.0.0",puppeteer:"^19.0.0",sinon:"^18.0.0","stream-browserify":"^3.0.0",tmp:"0.2.3","ts-loader":"^8.0.0",typescript:"^5.1.6",webpack:"^5.35.0","webpack-cli":"^4.0.0"},dependencies:{extend:"^3.0.2","https-proxy-agent":"^7.0.1","is-stream":"^2.0.0","node-fetch":"^2.6.9",uuid:"^9.0.1"}}});var ye7=C((Ee7)=>{Object.defineProperty(Ee7,"__esModule",{value:!0});Ee7.pkg=void 0;Ee7.pkg=ke7()});var zT8=C((NS)=>{var jx9=NS&&NS.__importDefault||function(A){return A&&A.__esModule?A:{default:A}},Re7;Object.defineProperty(NS,"__esModule",{value:!0});NS.GaxiosError=NS.GAXIOS_ERROR_SYMBOL=void 0;NS.defaultErrorRedactor=Ce7;var Jx9=g6("url"),KT8=ye7(),Se7=jx9(Ef8());NS.GAXIOS_ERROR_SYMBOL=Symbol.for(`${KT8.pkg.name}-gaxios-error`);class YT8 extends Error{static[(Re7=NS.GAXIOS_ERROR_SYMBOL,Symbol.hasInstance)](A){if(A&&typeof A==="object"&&NS.GAXIOS_ERROR_SYMBOL in A&&A[NS.GAXIOS_ERROR_SYMBOL]===KT8.pkg.version)return!0;return Function.prototype[Symbol.hasInstance].call(YT8,A)}constructor(A,q,K,Y){var z;super(A);if(this.config=q,this.response=K,this.error=Y,this[Re7]=KT8.pkg.version,this.config=(0,Se7.default)(!0,{},q),this.response)this.response.config=(0,Se7.default)(!0,{},this.response.config);if(this.response){try{this.response.data=Mx9(this.config.responseType,(z=this.response)===null||z===void 0?void 0:z.data)}catch(w){}this.status=this.response.status}if(Y&&"code"in Y&&Y.code)this.code=Y.code;if(q.errorRedactor)q.errorRedactor({config:this.config,response:this.response})}}NS.GaxiosError=YT8;function Mx9(A,q){switch(A){case"stream":return q;case"json":return JSON.parse(JSON.stringify(q));case"arraybuffer":return JSON.parse(Buffer.from(q).toString("utf8"));case"blob":return JSON.parse(q.text());default:return q}}function Ce7(A){function K(w){if(!w)return;for(let _ of Object.keys(w)){if(/^authentication$/i.test(_))w[_]="< - See `errorRedactor` option in `gaxios` for configuration>.";if(/^authorization$/i.test(_))w[_]="< - See `errorRedactor` option in `gaxios` for configuration>.";if(/secret/i.test(_))w[_]="< - See `errorRedactor` option in `gaxios` for configuration>."}}function Y(w,_){if(typeof w==="object"&&w!==null&&typeof w[_]==="string"){let $=w[_];if(/grant_type=/i.test($)||/assertion=/i.test($)||/secret/i.test($))w[_]="< - See `errorRedactor` option in `gaxios` for configuration>."}}function z(w){if(typeof w==="object"&&w!==null){if("grant_type"in w)w.grant_type="< - See `errorRedactor` option in `gaxios` for configuration>.";if("assertion"in w)w.assertion="< - See `errorRedactor` option in `gaxios` for configuration>.";if("client_secret"in w)w.client_secret="< - See `errorRedactor` option in `gaxios` for configuration>."}}if(A.config){K(A.config.headers),Y(A.config,"data"),z(A.config.data),Y(A.config,"body"),z(A.config.body);try{let w=new Jx9.URL("",A.config.url);if(w.searchParams.has("token"))w.searchParams.set("token","< - See `errorRedactor` option in `gaxios` for configuration>.");if(w.searchParams.has("client_secret"))w.searchParams.set("client_secret","< - See `errorRedactor` option in `gaxios` for configuration>.");A.config.url=w.toString()}catch(w){}}if(A.response)Ce7({config:A.response.config}),K(A.response.headers),Y(A.response,"data"),z(A.response.data);return A}});var be7=C((Ie7)=>{Object.defineProperty(Ie7,"__esModule",{value:!0});Ie7.getRetryConfig=Dx9;async function Dx9(A){let q=he7(A);if(!A||!A.config||!q&&!A.config.retry)return{shouldRetry:!1};q=q||{},q.currentRetryAttempt=q.currentRetryAttempt||0,q.retry=q.retry===void 0||q.retry===null?3:q.retry,q.httpMethodsToRetry=q.httpMethodsToRetry||["GET","HEAD","PUT","OPTIONS","DELETE"],q.noResponseRetries=q.noResponseRetries===void 0||q.noResponseRetries===null?2:q.noResponseRetries,q.retryDelayMultiplier=q.retryDelayMultiplier?q.retryDelayMultiplier:2,q.timeOfFirstRequest=q.timeOfFirstRequest?q.timeOfFirstRequest:Date.now(),q.totalTimeout=q.totalTimeout?q.totalTimeout:Number.MAX_SAFE_INTEGER,q.maxRetryDelay=q.maxRetryDelay?q.maxRetryDelay:Number.MAX_SAFE_INTEGER;let K=[[100,199],[408,408],[429,429],[500,599]];if(q.statusCodesToRetry=q.statusCodesToRetry||K,A.config.retryConfig=q,!await(q.shouldRetry||Xx9)(A))return{shouldRetry:!1,config:A.config};let z=Px9(q);A.config.retryConfig.currentRetryAttempt+=1;let w=q.retryBackoff?q.retryBackoff(A,z):new Promise((_)=>{setTimeout(_,z)});if(q.onRetryAttempt)q.onRetryAttempt(A);return await w,{shouldRetry:!0,config:A.config}}function Xx9(A){var q;let K=he7(A);if(A.name==="AbortError"||((q=A.error)===null||q===void 0?void 0:q.name)==="AbortError")return!1;if(!K||K.retry===0)return!1;if(!A.response&&(K.currentRetryAttempt||0)>=K.noResponseRetries)return!1;if(!A.config.method||K.httpMethodsToRetry.indexOf(A.config.method.toUpperCase())<0)return!1;if(A.response&&A.response.status){let Y=!1;for(let[z,w]of K.statusCodesToRetry){let _=A.response.status;if(_>=z&&_<=w){Y=!0;break}}if(!Y)return!1}if(K.currentRetryAttempt=K.currentRetryAttempt||0,K.currentRetryAttempt>=K.retry)return!1;return!0}function he7(A){if(A&&A.config&&A.config.retryConfig)return A.config.retryConfig;return}function Px9(A){var q;let Y=(A.currentRetryAttempt?0:(q=A.retryDelay)!==null&&q!==void 0?q:100)+(Math.pow(A.retryDelayMultiplier,A.currentRetryAttempt)-1)/2*1000,z=A.totalTimeout-(Date.now()-A.timeOfFirstRequest);return Math.min(Y,z,A.maxRetryDelay)}});var wT8=C((xe7)=>{Object.defineProperty(xe7,"__esModule",{value:!0});xe7.default=fx9;var Zx9=Gx9(g6("crypto"));function Gx9(A){return A&&A.__esModule?A:{default:A}}var AP1=new Uint8Array(256),eX1=AP1.length;function fx9(){if(eX1>AP1.length-16)Zx9.default.randomFillSync(AP1),eX1=0;return AP1.slice(eX1,eX1+=16)}});var me7=C((ue7)=>{Object.defineProperty(ue7,"__esModule",{value:!0});ue7.default=void 0;var Vx9=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;ue7.default=Vx9});var LU6=C((ge7)=>{Object.defineProperty(ge7,"__esModule",{value:!0});ge7.default=void 0;var Nx9=vx9(me7());function vx9(A){return A&&A.__esModule?A:{default:A}}function kx9(A){return typeof A==="string"&&Nx9.default.test(A)}var Ex9=kx9;ge7.default=Ex9});var yU6=C((Ue7)=>{Object.defineProperty(Ue7,"__esModule",{value:!0});Ue7.default=void 0;Ue7.unsafeStringify=Qe7;var Lx9=yx9(LU6());function yx9(A){return A&&A.__esModule?A:{default:A}}var t0=[];for(let A=0;A<256;++A)t0.push((A+256).toString(16).slice(1));function Qe7(A,q=0){return t0[A[q+0]]+t0[A[q+1]]+t0[A[q+2]]+t0[A[q+3]]+"-"+t0[A[q+4]]+t0[A[q+5]]+"-"+t0[A[q+6]]+t0[A[q+7]]+"-"+t0[A[q+8]]+t0[A[q+9]]+"-"+t0[A[q+10]]+t0[A[q+11]]+t0[A[q+12]]+t0[A[q+13]]+t0[A[q+14]]+t0[A[q+15]]}function Rx9(A,q=0){let K=Qe7(A,q);if(!(0,Lx9.default)(K))throw TypeError("Stringified UUID is invalid");return K}var Sx9=Rx9;Ue7.default=Sx9});var ie7=C((ce7)=>{Object.defineProperty(ce7,"__esModule",{value:!0});ce7.default=void 0;var hx9=bx9(wT8()),Ix9=yU6();function bx9(A){return A&&A.__esModule?A:{default:A}}var de7,_T8,$T8=0,OT8=0;function xx9(A,q,K){let Y=q&&K||0,z=q||Array(16);A=A||{};let w=A.node||de7,_=A.clockseq!==void 0?A.clockseq:_T8;if(w==null||_==null){let M=A.random||(A.rng||hx9.default)();if(w==null)w=de7=[M[0]|1,M[1],M[2],M[3],M[4],M[5]];if(_==null)_=_T8=(M[6]<<8|M[7])&16383}let $=A.msecs!==void 0?A.msecs:Date.now(),O=A.nsecs!==void 0?A.nsecs:OT8+1,H=$-$T8+(O-OT8)/1e4;if(H<0&&A.clockseq===void 0)_=_+1&16383;if((H<0||$>$T8)&&A.nsecs===void 0)O=0;if(O>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");$T8=$,OT8=O,_T8=_,$+=12219292800000;let j=(($&268435455)*1e4+O)%4294967296;z[Y++]=j>>>24&255,z[Y++]=j>>>16&255,z[Y++]=j>>>8&255,z[Y++]=j&255;let J=$/4294967296*1e4&268435455;z[Y++]=J>>>8&255,z[Y++]=J&255,z[Y++]=J>>>24&15|16,z[Y++]=J>>>16&255,z[Y++]=_>>>8|128,z[Y++]=_&255;for(let M=0;M<6;++M)z[Y+M]=w[M];return q||(0,Ix9.unsafeStringify)(z)}var ux9=xx9;ce7.default=ux9});var HT8=C((ne7)=>{Object.defineProperty(ne7,"__esModule",{value:!0});ne7.default=void 0;var Bx9=mx9(LU6());function mx9(A){return A&&A.__esModule?A:{default:A}}function gx9(A){if(!(0,Bx9.default)(A))throw TypeError("Invalid UUID");let q,K=new Uint8Array(16);return K[0]=(q=parseInt(A.slice(0,8),16))>>>24,K[1]=q>>>16&255,K[2]=q>>>8&255,K[3]=q&255,K[4]=(q=parseInt(A.slice(9,13),16))>>>8,K[5]=q&255,K[6]=(q=parseInt(A.slice(14,18),16))>>>8,K[7]=q&255,K[8]=(q=parseInt(A.slice(19,23),16))>>>8,K[9]=q&255,K[10]=(q=parseInt(A.slice(24,36),16))/1099511627776&255,K[11]=q/4294967296&255,K[12]=q>>>24&255,K[13]=q>>>16&255,K[14]=q>>>8&255,K[15]=q&255,K}var Fx9=gx9;ne7.default=Fx9});var jT8=C((se7)=>{Object.defineProperty(se7,"__esModule",{value:!0});se7.URL=se7.DNS=void 0;se7.default=cx9;var Qx9=yU6(),Ux9=px9(HT8());function px9(A){return A&&A.__esModule?A:{default:A}}function dx9(A){A=unescape(encodeURIComponent(A));let q=[];for(let K=0;K{Object.defineProperty(ee7,"__esModule",{value:!0});ee7.default=void 0;var nx9=rx9(g6("crypto"));function rx9(A){return A&&A.__esModule?A:{default:A}}function ox9(A){if(Array.isArray(A))A=Buffer.from(A);else if(typeof A==="string")A=Buffer.from(A,"utf8");return nx9.default.createHash("md5").update(A).digest()}var ax9=ox9;ee7.default=ax9});var w64=C((Y64)=>{Object.defineProperty(Y64,"__esModule",{value:!0});Y64.default=void 0;var sx9=K64(jT8()),tx9=K64(q64());function K64(A){return A&&A.__esModule?A:{default:A}}var ex9=(0,sx9.default)("v3",48,tx9.default),Au9=ex9;Y64.default=Au9});var O64=C((_64)=>{Object.defineProperty(_64,"__esModule",{value:!0});_64.default=void 0;var qu9=Ku9(g6("crypto"));function Ku9(A){return A&&A.__esModule?A:{default:A}}var Yu9={randomUUID:qu9.default.randomUUID};_64.default=Yu9});var D64=C((J64)=>{Object.defineProperty(J64,"__esModule",{value:!0});J64.default=void 0;var H64=j64(O64()),zu9=j64(wT8()),wu9=yU6();function j64(A){return A&&A.__esModule?A:{default:A}}function _u9(A,q,K){if(H64.default.randomUUID&&!q&&!A)return H64.default.randomUUID();A=A||{};let Y=A.random||(A.rng||zu9.default)();if(Y[6]=Y[6]&15|64,Y[8]=Y[8]&63|128,q){K=K||0;for(let z=0;z<16;++z)q[K+z]=Y[z];return q}return(0,wu9.unsafeStringify)(Y)}var $u9=_u9;J64.default=$u9});var W64=C((X64)=>{Object.defineProperty(X64,"__esModule",{value:!0});X64.default=void 0;var Ou9=Hu9(g6("crypto"));function Hu9(A){return A&&A.__esModule?A:{default:A}}function ju9(A){if(Array.isArray(A))A=Buffer.from(A);else if(typeof A==="string")A=Buffer.from(A,"utf8");return Ou9.default.createHash("sha1").update(A).digest()}var Ju9=ju9;X64.default=Ju9});var T64=C((G64)=>{Object.defineProperty(G64,"__esModule",{value:!0});G64.default=void 0;var Mu9=Z64(jT8()),Du9=Z64(W64());function Z64(A){return A&&A.__esModule?A:{default:A}}var Xu9=(0,Mu9.default)("v5",80,Du9.default),Pu9=Xu9;G64.default=Pu9});var v64=C((V64)=>{Object.defineProperty(V64,"__esModule",{value:!0});V64.default=void 0;var Wu9="00000000-0000-0000-0000-000000000000";V64.default=Wu9});var L64=C((k64)=>{Object.defineProperty(k64,"__esModule",{value:!0});k64.default=void 0;var Zu9=Gu9(LU6());function Gu9(A){return A&&A.__esModule?A:{default:A}}function fu9(A){if(!(0,Zu9.default)(A))throw TypeError("Invalid UUID");return parseInt(A.slice(14,15),16)}var Tu9=fu9;k64.default=Tu9});var y64=C((lb)=>{Object.defineProperty(lb,"__esModule",{value:!0});Object.defineProperty(lb,"NIL",{enumerable:!0,get:function(){return Eu9.default}});Object.defineProperty(lb,"parse",{enumerable:!0,get:function(){return Su9.default}});Object.defineProperty(lb,"stringify",{enumerable:!0,get:function(){return Ru9.default}});Object.defineProperty(lb,"v1",{enumerable:!0,get:function(){return Vu9.default}});Object.defineProperty(lb,"v3",{enumerable:!0,get:function(){return Nu9.default}});Object.defineProperty(lb,"v4",{enumerable:!0,get:function(){return vu9.default}});Object.defineProperty(lb,"v5",{enumerable:!0,get:function(){return ku9.default}});Object.defineProperty(lb,"validate",{enumerable:!0,get:function(){return yu9.default}});Object.defineProperty(lb,"version",{enumerable:!0,get:function(){return Lu9.default}});var Vu9=ul(ie7()),Nu9=ul(w64()),vu9=ul(D64()),ku9=ul(T64()),Eu9=ul(v64()),Lu9=ul(L64()),yu9=ul(LU6()),Ru9=ul(yU6()),Su9=ul(HT8());function ul(A){return A&&A.__esModule?A:{default:A}}});var JT8=C((S64)=>{Object.defineProperty(S64,"__esModule",{value:!0});S64.GaxiosInterceptorManager=void 0;class R64 extends Set{}S64.GaxiosInterceptorManager=R64});var U64=C(($G)=>{var Cu9=$G&&$G.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),hu9=$G&&$G.__setModuleDefault||(Object.create?function(A,q){Object.defineProperty(A,"default",{enumerable:!0,value:q})}:function(A,q){A.default=q}),Iu9=$G&&$G.__importStar||function(A){if(A&&A.__esModule)return A;var q={};if(A!=null){for(var K in A)if(K!=="default"&&Object.prototype.hasOwnProperty.call(A,K))Cu9(q,A,K)}return hu9(q,A),q},DY6=$G&&$G.__classPrivateFieldGet||function(A,q,K,Y){if(K==="a"&&!Y)throw TypeError("Private accessor was defined without a getter");if(typeof q==="function"?A!==q||!Y:!q.has(A))throw TypeError("Cannot read private member from an object whose class did not declare it");return K==="m"?Y:K==="a"?Y.call(A):Y?Y.value:q.get(A)},bu9=$G&&$G.__classPrivateFieldSet||function(A,q,K,Y,z){if(Y==="m")throw TypeError("Private method is not writable");if(Y==="a"&&!z)throw TypeError("Private accessor was defined without a setter");if(typeof q==="function"?A!==q||!z:!q.has(A))throw TypeError("Cannot write private member to an object whose class did not declare it");return Y==="a"?z.call(A,K):z?z.value=K:q.set(A,K),K},YP1=$G&&$G.__importDefault||function(A){return A&&A.__esModule?A:{default:A}},CZ6,MY6,h64,m64,g64,F64,qP1,I64;Object.defineProperty($G,"__esModule",{value:!0});$G.Gaxios=void 0;var xu9=YP1(Ef8()),uu9=g6("https"),Bu9=YP1(qT8()),mu9=YP1(g6("querystring")),gu9=YP1(ve7()),b64=g6("url"),KP1=zT8(),Fu9=be7(),x64=g6("stream"),Qu9=y64(),u64=JT8(),Uu9=du9()?window.fetch:Bu9.default;function pu9(){return typeof window<"u"&&!!window}function du9(){return pu9()&&!!window.fetch}function cu9(){return typeof Buffer<"u"}function B64(A,q){return!!Q64(A,q)}function Q64(A,q){q=q.toLowerCase();for(let K of Object.keys((A===null||A===void 0?void 0:A.headers)||{}))if(q===K.toLowerCase())return A.headers[K];return}class MT8{constructor(A){CZ6.add(this),this.agentCache=new Map,this.defaults=A||{},this.interceptors={request:new u64.GaxiosInterceptorManager,response:new u64.GaxiosInterceptorManager}}async request(A={}){return A=await DY6(this,CZ6,"m",F64).call(this,A),A=await DY6(this,CZ6,"m",m64).call(this,A),DY6(this,CZ6,"m",g64).call(this,this._request(A))}async _defaultAdapter(A){let K=await(A.fetchImplementation||Uu9)(A.url,A),Y=await this.getResponseData(A,K);return this.translateResponse(A,K,Y)}async _request(A={}){var q;try{let K;if(A.adapter)K=await A.adapter(A,this._defaultAdapter.bind(this));else K=await this._defaultAdapter(A);if(!A.validateStatus(K.status)){if(A.responseType==="stream"){let Y="";await new Promise((z)=>{(K===null||K===void 0?void 0:K.data).on("data",(w)=>{Y+=w}),(K===null||K===void 0?void 0:K.data).on("end",z)}),K.data=Y}throw new KP1.GaxiosError(`Request failed with status code ${K.status}`,A,K)}return K}catch(K){let Y=K instanceof KP1.GaxiosError?K:new KP1.GaxiosError(K.message,A,void 0,K),{shouldRetry:z,config:w}=await(0,Fu9.getRetryConfig)(Y);if(z&&w)return Y.config.retryConfig.currentRetryAttempt=w.retryConfig.currentRetryAttempt,A.retryConfig=(q=Y.config)===null||q===void 0?void 0:q.retryConfig,this._request(A);throw Y}}async getResponseData(A,q){switch(A.responseType){case"stream":return q.body;case"json":{let K=await q.text();try{K=JSON.parse(K)}catch(Y){}return K}case"arraybuffer":return q.arrayBuffer();case"blob":return q.blob();case"text":return q.text();default:return this.getResponseDataFromContentType(q)}}validateStatus(A){return A>=200&&A<300}paramsSerializer(A){return mu9.default.stringify(A)}translateResponse(A,q,K){let Y={};return q.headers.forEach((z,w)=>{Y[w]=z}),{config:A,data:K,headers:Y,status:q.status,statusText:q.statusText,request:{responseURL:q.url}}}async getResponseDataFromContentType(A){let q=A.headers.get("Content-Type");if(q===null)return A.text();if(q=q.toLowerCase(),q.includes("application/json")){let K=await A.text();try{K=JSON.parse(K)}catch(Y){}return K}else if(q.match(/^text\//))return A.text();else return A.blob()}async*getMultipartRequest(A,q){let K=`--${q}--`;for(let Y of A){let z=Y.headers["Content-Type"]||"application/octet-stream";if(yield`--${q}\r Content-Type: ${z}\r \r `,typeof Y.content==="string")yield Y.content;else yield*Y.content;yield`\r `}yield K}}$G.Gaxios=MT8;MY6=MT8,CZ6=new WeakSet,h64=function(q,K=[]){var Y,z;let w=new b64.URL(q),_=[...K],$=((z=(Y=process.env.NO_PROXY)!==null&&Y!==void 0?Y:process.env.no_proxy)===null||z===void 0?void 0:z.split(","))||[];for(let O of $)_.push(O.trim());for(let O of _)if(O instanceof RegExp){if(O.test(w.toString()))return!1}else if(O instanceof b64.URL){if(O.origin===w.origin)return!1}else if(O.startsWith("*.")||O.startsWith(".")){let H=O.replace(/^\*\./,".");if(w.hostname.endsWith(H))return!1}else if(O===w.origin||O===w.hostname||O===w.href)return!1;return!0},m64=async function(q){let K=Promise.resolve(q);for(let Y of this.interceptors.request.values())if(Y)K=K.then(Y.resolved,Y.rejected);return K},g64=async function(q){let K=Promise.resolve(q);for(let Y of this.interceptors.response.values())if(Y)K=K.then(Y.resolved,Y.rejected);return K},F64=async function(q){var K,Y,z,w;let _=(0,xu9.default)(!0,{},this.defaults,q);if(!_.url)throw Error("URL is required.");let $=_.baseUrl||_.baseURL;if($)_.url=$.toString()+_.url;if(_.paramsSerializer=_.paramsSerializer||this.paramsSerializer,_.params&&Object.keys(_.params).length>0){let j=_.paramsSerializer(_.params);if(j.startsWith("?"))j=j.slice(1);let J=_.url.toString().includes("?")?"&":"?";_.url=_.url+J+j}if(typeof q.maxContentLength==="number")_.size=q.maxContentLength;if(typeof q.maxRedirects==="number")_.follow=q.maxRedirects;if(_.headers=_.headers||{},_.multipart===void 0&&_.data){let j=typeof FormData>"u"?!1:(_===null||_===void 0?void 0:_.data)instanceof FormData;if(gu9.default.readable(_.data))_.body=_.data;else if(cu9()&&Buffer.isBuffer(_.data)){if(_.body=_.data,!B64(_,"Content-Type"))_.headers["Content-Type"]="application/json"}else if(typeof _.data==="object"){if(!j)if(Q64(_,"content-type")==="application/x-www-form-urlencoded")_.body=_.paramsSerializer(_.data);else{if(!B64(_,"Content-Type"))_.headers["Content-Type"]="application/json";_.body=JSON.stringify(_.data)}}else _.body=_.data}else if(_.multipart&&_.multipart.length>0){let j=(0,Qu9.v4)();_.headers["Content-Type"]=`multipart/related; boundary=${j}`;let J=new x64.PassThrough;_.body=J,(0,x64.pipeline)(this.getMultipartRequest(_.multipart,j),J,()=>{})}if(_.validateStatus=_.validateStatus||this.validateStatus,_.responseType=_.responseType||"unknown",!_.headers.Accept&&_.responseType==="json")_.headers.Accept="application/json";_.method=_.method||"GET";let O=_.proxy||((K=process===null||process===void 0?void 0:process.env)===null||K===void 0?void 0:K.HTTPS_PROXY)||((Y=process===null||process===void 0?void 0:process.env)===null||Y===void 0?void 0:Y.https_proxy)||((z=process===null||process===void 0?void 0:process.env)===null||z===void 0?void 0:z.HTTP_PROXY)||((w=process===null||process===void 0?void 0:process.env)===null||w===void 0?void 0:w.http_proxy),H=DY6(this,CZ6,"m",h64).call(this,_.url,_.noProxy);if(_.agent);else if(O&&H){let j=await DY6(MY6,MY6,"m",I64).call(MY6);if(this.agentCache.has(O))_.agent=this.agentCache.get(O);else _.agent=new j(O,{cert:_.cert,key:_.key}),this.agentCache.set(O,_.agent)}else if(_.cert&&_.key)if(this.agentCache.has(_.key))_.agent=this.agentCache.get(_.key);else _.agent=new uu9.Agent({cert:_.cert,key:_.key}),this.agentCache.set(_.key,_.agent);if(typeof _.errorRedactor!=="function"&&_.errorRedactor!==!1)_.errorRedactor=KP1.defaultErrorRedactor;return _},I64=async function(){return bu9(this,MY6,DY6(this,MY6,"f",qP1)||(await Promise.resolve().then(()=>Iu9(Gx6()))).HttpsProxyAgent,"f",qP1),DY6(this,MY6,"f",qP1)};qP1={value:void 0}});var ib=C((XT)=>{var lu9=XT&&XT.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),iu9=XT&&XT.__exportStar||function(A,q){for(var K in A)if(K!=="default"&&!Object.prototype.hasOwnProperty.call(q,K))lu9(q,A,K)};Object.defineProperty(XT,"__esModule",{value:!0});XT.instance=XT.Gaxios=XT.GaxiosError=void 0;XT.request=ru9;var p64=U64();Object.defineProperty(XT,"Gaxios",{enumerable:!0,get:function(){return p64.Gaxios}});var nu9=zT8();Object.defineProperty(XT,"GaxiosError",{enumerable:!0,get:function(){return nu9.GaxiosError}});iu9(JT8(),XT);XT.instance=new p64.Gaxios;async function ru9(A){return XT.instance.request(A)}});var DT8=C((d64,zP1)=>{(function(A){var q,K=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Y=Math.ceil,z=Math.floor,w="[BigNumber Error] ",_=w+"Number primitive has more than 15 significant digits: ",$=100000000000000,O=14,H=9007199254740991,j=[1,10,100,1000,1e4,1e5,1e6,1e7,1e8,1e9,10000000000,100000000000,1000000000000,10000000000000],J=1e7,M=1e9;function D(N){var v,y,R,h=q6.prototype={constructor:q6,toString:null,valueOf:null},B=new q6(1),x=20,F=4,g=-7,b=21,U=-1e7,d=1e7,l=!1,t=1,s=0,H6={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},Z6="0123456789abcdefghijklmnopqrstuvwxyz",G6=!0;function q6(A6,K6){var z6,a,r,X6,O6,D6,y6,C6,h6=this;if(!(h6 instanceof q6))return new q6(A6,K6);if(K6==null){if(A6&&A6._isBigNumber===!0){if(h6.s=A6.s,!A6.c||A6.e>d)h6.c=h6.e=null;else if(A6.e=10;O6/=10,X6++);if(X6>d)h6.c=h6.e=null;else h6.e=X6,h6.c=[A6];return}C6=String(A6)}else{if(!K.test(C6=String(A6)))return R(h6,C6,D6);h6.s=C6.charCodeAt(0)==45?(C6=C6.slice(1),-1):1}if((X6=C6.indexOf("."))>-1)C6=C6.replace(".","");if((O6=C6.search(/e/i))>0){if(X6<0)X6=O6;X6+=+C6.slice(O6+1),C6=C6.substring(0,O6)}else if(X6<0)X6=C6.length}else{if(Z(K6,2,Z6.length,"Base"),K6==10&&G6)return h6=new q6(A6),k6(h6,x+h6.e+1,F);if(C6=String(A6),D6=typeof A6=="number"){if(A6*0!=0)return R(h6,C6,D6,K6);if(h6.s=1/A6<0?(C6=C6.slice(1),-1):1,q6.DEBUG&&C6.replace(/^0\.0*|\./,"").length>15)throw Error(_+A6)}else h6.s=C6.charCodeAt(0)===45?(C6=C6.slice(1),-1):1;z6=Z6.slice(0,K6),X6=O6=0;for(y6=C6.length;O6X6){X6=y6;continue}}else if(!r){if(C6==C6.toUpperCase()&&(C6=C6.toLowerCase())||C6==C6.toLowerCase()&&(C6=C6.toUpperCase())){r=!0,O6=-1,X6=0;continue}}return R(h6,String(A6),D6,K6)}if(D6=!1,C6=y(C6,K6,10,h6.s),(X6=C6.indexOf("."))>-1)C6=C6.replace(".","");else X6=C6.length}for(O6=0;C6.charCodeAt(O6)===48;O6++);for(y6=C6.length;C6.charCodeAt(--y6)===48;);if(C6=C6.slice(O6,++y6)){if(y6-=O6,D6&&q6.DEBUG&&y6>15&&(A6>H||A6!==z(A6)))throw Error(_+h6.s*A6);if((X6=X6-O6-1)>d)h6.c=h6.e=null;else if(X6=-M&&r<=M&&r===z(r)){if(a[0]===0){if(r===0&&a.length===1)return!0;break A}if(K6=(r+1)%O,K6<1)K6+=O;if(String(a[0]).length==K6){for(K6=0;K6=$||z6!==z(z6))break A;if(z6!==0)return!0}}}else if(a===null&&r===null&&(X6===null||X6===1||X6===-1))return!0;throw Error(w+"Invalid BigNumber: "+A6)},q6.maximum=q6.max=function(){return j6(arguments,-1)},q6.minimum=q6.min=function(){return j6(arguments,1)},q6.random=function(){var A6=9007199254740992,K6=Math.random()*A6&2097151?function(){return z(Math.random()*A6)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(z6){var a,r,X6,O6,D6,y6=0,C6=[],h6=new q6(B);if(z6==null)z6=x;else Z(z6,0,M);if(O6=Y(z6/O),l)if(crypto.getRandomValues){a=crypto.getRandomValues(new Uint32Array(O6*=2));for(;y6>>11),D6>=9000000000000000)r=crypto.getRandomValues(new Uint32Array(2)),a[y6]=r[0],a[y6+1]=r[1];else C6.push(D6%100000000000000),y6+=2;y6=O6/2}else if(crypto.randomBytes){a=crypto.randomBytes(O6*=7);for(;y6=9000000000000000)crypto.randomBytes(7).copy(a,y6);else C6.push(D6%100000000000000),y6+=7;y6=O6/7}else throw l=!1,Error(w+"crypto unavailable");if(!l){for(;y6=10;D6/=10,y6++);if(y6r-1){if(D6[O6+1]==null)D6[O6+1]=0;D6[O6+1]+=D6[O6]/r|0,D6[O6]%=r}}return D6.reverse()}return function(z6,a,r,X6,O6){var D6,y6,C6,h6,f6,M6,V6,p6,b6=z6.indexOf("."),R6=x,x6=F;if(b6>=0)h6=s,s=0,z6=z6.replace(".",""),p6=new q6(a),M6=p6.pow(z6.length-b6),s=h6,p6.c=K6(V(P(M6.c),M6.e,"0"),10,r,A6),p6.e=p6.c.length;V6=K6(z6,a,r,O6?(D6=Z6,A6):(D6=A6,Z6)),C6=h6=V6.length;for(;V6[--h6]==0;V6.pop());if(!V6[0])return D6.charAt(0);if(b6<0)--C6;else M6.c=V6,M6.e=C6,M6.s=X6,M6=v(M6,p6,R6,x6,r),V6=M6.c,f6=M6.r,C6=M6.e;if(y6=C6+R6+1,b6=V6[y6],h6=r/2,f6=f6||y6<0||V6[y6+1]!=null,f6=x6<4?(b6!=null||f6)&&(x6==0||x6==(M6.s<0?3:2)):b6>h6||b6==h6&&(x6==4||f6||x6==6&&V6[y6-1]&1||x6==(M6.s<0?8:7)),y6<1||!V6[0])z6=f6?V(D6.charAt(1),-R6,D6.charAt(0)):D6.charAt(0);else{if(V6.length=y6,f6){for(--r;++V6[--y6]>r;)if(V6[y6]=0,!y6)++C6,V6=[1].concat(V6)}for(h6=V6.length;!V6[--h6];);for(b6=0,z6="";b6<=h6;z6+=D6.charAt(V6[b6++]));z6=V(z6,C6,D6.charAt(0))}return z6}}(),v=function(){function A6(a,r,X6){var O6,D6,y6,C6,h6=0,f6=a.length,M6=r%J,V6=r/J|0;for(a=a.slice();f6--;)y6=a[f6]%J,C6=a[f6]/J|0,O6=V6*y6+C6*M6,D6=M6*y6+O6%J*J+h6,h6=(D6/X6|0)+(O6/J|0)+V6*C6,a[f6]=D6%X6;if(h6)a=[h6].concat(a);return a}function K6(a,r,X6,O6){var D6,y6;if(X6!=O6)y6=X6>O6?1:-1;else for(D6=y6=0;D6r[D6]?1:-1;break}return y6}function z6(a,r,X6,O6){var D6=0;for(;X6--;)a[X6]-=D6,D6=a[X6]1;a.splice(0,1));}return function(a,r,X6,O6,D6){var y6,C6,h6,f6,M6,V6,p6,b6,R6,x6,d6,t6,L6,u6,e6,H1,Z1,v1=a.s==r.s?1:-1,T6=a.c,v6=r.c;if(!T6||!T6[0]||!v6||!v6[0])return new q6(!a.s||!r.s||(T6?v6&&T6[0]==v6[0]:!v6)?NaN:T6&&T6[0]==0||!v6?v1*0:v1/0);if(b6=new q6(v1),R6=b6.c=[],C6=a.e-r.e,v1=X6+C6+1,!D6)D6=$,C6=X(a.e/O)-X(r.e/O),v1=v1/O|0;for(h6=0;v6[h6]==(T6[h6]||0);h6++);if(v6[h6]>(T6[h6]||0))C6--;if(v1<0)R6.push(1),f6=!0;else{if(u6=T6.length,H1=v6.length,h6=0,v1+=2,M6=z(D6/(v6[0]+1)),M6>1)v6=A6(v6,M6,D6),T6=A6(T6,M6,D6),H1=v6.length,u6=T6.length;L6=H1,x6=T6.slice(0,H1),d6=x6.length;for(;d6=D6/2)e6++;do{if(M6=0,y6=K6(v6,x6,H1,d6),y6<0){if(t6=x6[0],H1!=d6)t6=t6*D6+(x6[1]||0);if(M6=z(t6/e6),M6>1){if(M6>=D6)M6=D6-1;V6=A6(v6,M6,D6),p6=V6.length,d6=x6.length;while(K6(V6,x6,p6,d6)==1)M6--,z6(V6,H1=10;v1/=10,h6++);k6(b6,X6+(b6.e=h6+C6*O-1)+1,O6,f6)}else b6.e=C6,b6.r=+f6;return b6}}();function w6(A6,K6,z6,a){var r,X6,O6,D6,y6;if(z6==null)z6=F;else Z(z6,0,8);if(!A6.c)return A6.toString();if(r=A6.c[0],O6=A6.e,K6==null)y6=P(A6.c),y6=a==1||a==2&&(O6<=g||O6>=b)?f(y6,O6):V(y6,O6,"0");else if(A6=k6(new q6(A6),K6,z6),X6=A6.e,y6=P(A6.c),D6=y6.length,a==1||a==2&&(K6<=X6||X6<=g)){for(;D6D6){if(--K6>0)for(y6+=".";K6--;y6+="0");}else if(K6+=X6-D6,K6>0){if(X6+1==D6)y6+=".";for(;K6--;y6+="0");}return A6.s<0&&r?"-"+y6:y6}function j6(A6,K6){var z6,a,r=1,X6=new q6(A6[0]);for(;r=10;r/=10,a++);if((z6=a+z6*O-1)>d)A6.c=A6.e=null;else if(z6=10;D6/=10,r++);if(X6=K6-r,X6<0)X6+=O,O6=K6,y6=f6[C6=0],h6=z(y6/M6[r-O6-1]%10);else if(C6=Y((X6+1)/O),C6>=f6.length)if(a){for(;f6.length<=C6;f6.push(0));y6=h6=0,r=1,X6%=O,O6=X6-O+1}else break A;else{y6=D6=f6[C6];for(r=1;D6>=10;D6/=10,r++);X6%=O,O6=X6-O+r,h6=O6<0?0:z(y6/M6[r-O6-1]%10)}if(a=a||K6<0||f6[C6+1]!=null||(O6<0?y6:y6%M6[r-O6-1]),a=z6<4?(h6||a)&&(z6==0||z6==(A6.s<0?3:2)):h6>5||h6==5&&(z6==4||a||z6==6&&(X6>0?O6>0?y6/M6[r-O6]:0:f6[C6-1])%10&1||z6==(A6.s<0?8:7)),K6<1||!f6[0]){if(f6.length=0,a)K6-=A6.e+1,f6[0]=M6[(O-K6%O)%O],A6.e=-K6||0;else f6[0]=A6.e=0;return A6}if(X6==0)f6.length=C6,D6=1,C6--;else f6.length=C6+1,D6=M6[O-X6],f6[C6]=O6>0?z(y6/M6[r-O6]%M6[O6])*D6:0;if(a)for(;;)if(C6==0){for(X6=1,O6=f6[0];O6>=10;O6/=10,X6++);O6=f6[0]+=D6;for(D6=1;O6>=10;O6/=10,D6++);if(X6!=D6){if(A6.e++,f6[0]==$)f6[0]=1}break}else{if(f6[C6]+=D6,f6[C6]!=$)break;f6[C6--]=0,D6=1}for(X6=f6.length;f6[--X6]===0;f6.pop());}if(A6.e>d)A6.c=A6.e=null;else if(A6.e=b?f(K6,z6):V(K6,z6,"0"),A6.s<0?"-"+K6:K6}if(h.absoluteValue=h.abs=function(){var A6=new q6(this);if(A6.s<0)A6.s=1;return A6},h.comparedTo=function(A6,K6){return W(this,new q6(A6,K6))},h.decimalPlaces=h.dp=function(A6,K6){var z6,a,r,X6=this;if(A6!=null){if(Z(A6,0,M),K6==null)K6=F;else Z(K6,0,8);return k6(new q6(X6),A6+X6.e+1,K6)}if(!(z6=X6.c))return null;if(a=((r=z6.length-1)-X(this.e/O))*O,r=z6[r])for(;r%10==0;r/=10,a--);if(a<0)a=0;return a},h.dividedBy=h.div=function(A6,K6){return v(this,new q6(A6,K6),x,F)},h.dividedToIntegerBy=h.idiv=function(A6,K6){return v(this,new q6(A6,K6),0,1)},h.exponentiatedBy=h.pow=function(A6,K6){var z6,a,r,X6,O6,D6,y6,C6,h6,f6=this;if(A6=new q6(A6),A6.c&&!A6.isInteger())throw Error(w+"Exponent not an integer: "+P6(A6));if(K6!=null)K6=new q6(K6);if(D6=A6.e>14,!f6.c||!f6.c[0]||f6.c[0]==1&&!f6.e&&f6.c.length==1||!A6.c||!A6.c[0])return h6=new q6(Math.pow(+P6(f6),D6?A6.s*(2-G(A6)):+P6(A6))),K6?h6.mod(K6):h6;if(y6=A6.s<0,K6){if(K6.c?!K6.c[0]:!K6.s)return new q6(NaN);if(a=!y6&&f6.isInteger()&&K6.isInteger(),a)f6=f6.mod(K6)}else if(A6.e>9&&(f6.e>0||f6.e<-1||(f6.e==0?f6.c[0]>1||D6&&f6.c[1]>=240000000:f6.c[0]<80000000000000||D6&&f6.c[0]<=99999750000000))){if(X6=f6.s<0&&G(A6)?-0:0,f6.e>-1)X6=1/X6;return new q6(y6?1/X6:X6)}else if(s)X6=Y(s/O+2);if(D6){if(z6=new q6(0.5),y6)A6.s=1;C6=G(A6)}else r=Math.abs(+P6(A6)),C6=r%2;h6=new q6(B);for(;;){if(C6){if(h6=h6.times(f6),!h6.c)break;if(X6){if(h6.c.length>X6)h6.c.length=X6}else if(a)h6=h6.mod(K6)}if(r){if(r=z(r/2),r===0)break;C6=r%2}else if(A6=A6.times(z6),k6(A6,A6.e+1,1),A6.e>14)C6=G(A6);else{if(r=+P6(A6),r===0)break;C6=r%2}if(f6=f6.times(f6),X6){if(f6.c&&f6.c.length>X6)f6.c.length=X6}else if(a)f6=f6.mod(K6)}if(a)return h6;if(y6)h6=B.div(h6);return K6?h6.mod(K6):X6?k6(h6,s,F,O6):h6},h.integerValue=function(A6){var K6=new q6(this);if(A6==null)A6=F;else Z(A6,0,8);return k6(K6,K6.e+1,A6)},h.isEqualTo=h.eq=function(A6,K6){return W(this,new q6(A6,K6))===0},h.isFinite=function(){return!!this.c},h.isGreaterThan=h.gt=function(A6,K6){return W(this,new q6(A6,K6))>0},h.isGreaterThanOrEqualTo=h.gte=function(A6,K6){return(K6=W(this,new q6(A6,K6)))===1||K6===0},h.isInteger=function(){return!!this.c&&X(this.e/O)>this.c.length-2},h.isLessThan=h.lt=function(A6,K6){return W(this,new q6(A6,K6))<0},h.isLessThanOrEqualTo=h.lte=function(A6,K6){return(K6=W(this,new q6(A6,K6)))===-1||K6===0},h.isNaN=function(){return!this.s},h.isNegative=function(){return this.s<0},h.isPositive=function(){return this.s>0},h.isZero=function(){return!!this.c&&this.c[0]==0},h.minus=function(A6,K6){var z6,a,r,X6,O6=this,D6=O6.s;if(A6=new q6(A6,K6),K6=A6.s,!D6||!K6)return new q6(NaN);if(D6!=K6)return A6.s=-K6,O6.plus(A6);var y6=O6.e/O,C6=A6.e/O,h6=O6.c,f6=A6.c;if(!y6||!C6){if(!h6||!f6)return h6?(A6.s=-K6,A6):new q6(f6?O6:NaN);if(!h6[0]||!f6[0])return f6[0]?(A6.s=-K6,A6):new q6(h6[0]?O6:F==3?-0:0)}if(y6=X(y6),C6=X(C6),h6=h6.slice(),D6=y6-C6){if(X6=D6<0)D6=-D6,r=h6;else C6=y6,r=f6;r.reverse();for(K6=D6;K6--;r.push(0));r.reverse()}else{a=(X6=(D6=h6.length)<(K6=f6.length))?D6:K6;for(D6=K6=0;K60)for(;K6--;h6[z6++]=0);K6=$-1;for(;a>D6;){if(h6[--a]=0;){z6=0,M6=t6[r]%R6,V6=t6[r]/R6|0;for(O6=y6,X6=r+O6;X6>r;)C6=d6[--O6]%R6,h6=d6[O6]/R6|0,D6=V6*C6+h6*M6,C6=M6*C6+D6%R6*R6+p6[X6]+z6,z6=(C6/b6|0)+(D6/R6|0)+V6*h6,p6[X6--]=C6%b6;p6[X6]=z6}if(z6)++a;else p6.splice(0,1);return _6(A6,p6,a)},h.negated=function(){var A6=new q6(this);return A6.s=-A6.s||null,A6},h.plus=function(A6,K6){var z6,a=this,r=a.s;if(A6=new q6(A6,K6),K6=A6.s,!r||!K6)return new q6(NaN);if(r!=K6)return A6.s=-K6,a.minus(A6);var X6=a.e/O,O6=A6.e/O,D6=a.c,y6=A6.c;if(!X6||!O6){if(!D6||!y6)return new q6(r/0);if(!D6[0]||!y6[0])return y6[0]?A6:new q6(D6[0]?a:r*0)}if(X6=X(X6),O6=X(O6),D6=D6.slice(),r=X6-O6){if(r>0)O6=X6,z6=y6;else r=-r,z6=D6;z6.reverse();for(;r--;z6.push(0));z6.reverse()}if(r=D6.length,K6=y6.length,r-K6<0)z6=y6,y6=D6,D6=z6,K6=r;for(r=0;K6;)r=(D6[--K6]=D6[K6]+y6[K6]+r)/$|0,D6[K6]=$===D6[K6]?0:D6[K6]%$;if(r)D6=[r].concat(D6),++O6;return _6(A6,D6,O6)},h.precision=h.sd=function(A6,K6){var z6,a,r,X6=this;if(A6!=null&&A6!==!!A6){if(Z(A6,1,M),K6==null)K6=F;else Z(K6,0,8);return k6(new q6(X6),A6,K6)}if(!(z6=X6.c))return null;if(r=z6.length-1,a=r*O+1,r=z6[r]){for(;r%10==0;r/=10,a--);for(r=z6[0];r>=10;r/=10,a++);}if(A6&&X6.e+1>a)a=X6.e+1;return a},h.shiftedBy=function(A6){return Z(A6,-H,H),this.times("1e"+A6)},h.squareRoot=h.sqrt=function(){var A6,K6,z6,a,r,X6=this,O6=X6.c,D6=X6.s,y6=X6.e,C6=x+4,h6=new q6("0.5");if(D6!==1||!O6||!O6[0])return new q6(!D6||D6<0&&(!O6||O6[0])?NaN:O6?X6:1/0);if(D6=Math.sqrt(+P6(X6)),D6==0||D6==1/0){if(K6=P(O6),(K6.length+y6)%2==0)K6+="0";if(D6=Math.sqrt(+K6),y6=X((y6+1)/2)-(y6<0||y6%2),D6==1/0)K6="5e"+y6;else K6=D6.toExponential(),K6=K6.slice(0,K6.indexOf("e")+1)+y6;z6=new q6(K6)}else z6=new q6(D6+"");if(z6.c[0]){if(y6=z6.e,D6=y6+C6,D6<3)D6=0;for(;;)if(r=z6,z6=h6.times(r.plus(v(X6,r,C6,1))),P(r.c).slice(0,D6)===(K6=P(z6.c)).slice(0,D6)){if(z6.e0&&p6>0){X6=p6%D6||D6,h6=V6.substr(0,X6);for(;X60)h6+=C6+V6.slice(X6);if(M6)h6="-"+h6}a=f6?h6+(z6.decimalSeparator||"")+((y6=+z6.fractionGroupSize)?f6.replace(new RegExp("\\d{"+y6+"}\\B","g"),"$&"+(z6.fractionGroupSeparator||"")):f6):h6}return(z6.prefix||"")+a+(z6.suffix||"")},h.toFraction=function(A6){var K6,z6,a,r,X6,O6,D6,y6,C6,h6,f6,M6,V6=this,p6=V6.c;if(A6!=null){if(D6=new q6(A6),!D6.isInteger()&&(D6.c||D6.s!==1)||D6.lt(B))throw Error(w+"Argument "+(D6.isInteger()?"out of range: ":"not an integer: ")+P6(D6))}if(!p6)return new q6(V6);K6=new q6(B),C6=z6=new q6(B),a=y6=new q6(B),M6=P(p6),X6=K6.e=M6.length-V6.e-1,K6.c[0]=j[(O6=X6%O)<0?O+O6:O6],A6=!A6||D6.comparedTo(K6)>0?X6>0?K6:C6:D6,O6=d,d=1/0,D6=new q6(M6),y6.c[0]=0;for(;;){if(h6=v(D6,K6,0,1),r=z6.plus(h6.times(a)),r.comparedTo(A6)==1)break;z6=a,a=r,C6=y6.plus(h6.times(r=C6)),y6=r,K6=D6.minus(h6.times(r=K6)),D6=r}return r=v(A6.minus(z6),a,0,1),y6=y6.plus(r.times(C6)),z6=z6.plus(r.times(a)),y6.s=C6.s=V6.s,X6=X6*2,f6=v(C6,a,X6,F).minus(V6).abs().comparedTo(v(y6,z6,X6,F).minus(V6).abs())<1?[C6,a]:[y6,z6],d=O6,f6},h.toNumber=function(){return+P6(this)},h.toPrecision=function(A6,K6){if(A6!=null)Z(A6,1,M);return w6(this,A6,K6,2)},h.toString=function(A6){var K6,z6=this,a=z6.s,r=z6.e;if(r===null)if(a){if(K6="Infinity",a<0)K6="-"+K6}else K6="NaN";else{if(A6==null)K6=r<=g||r>=b?f(P(z6.c),r):V(P(z6.c),r,"0");else if(A6===10&&G6)z6=k6(new q6(z6),x+r+1,F),K6=V(P(z6.c),z6.e,"0");else Z(A6,2,Z6.length,"Base"),K6=y(V(P(z6.c),r,"0"),10,A6,a,!0);if(a<0&&z6.c[0])K6="-"+K6}return K6},h.valueOf=h.toJSON=function(){return P6(this)},h._isBigNumber=!0,N!=null)q6.set(N);return q6}function X(N){var v=N|0;return N>0||N===v?v:v-1}function P(N){var v,y,R=1,h=N.length,B=N[0]+"";for(;Rb^y?1:-1;F=(g=h.length)<(b=B.length)?g:b;for(x=0;xB[x]^y?1:-1;return g==b?0:g>b^y?1:-1}function Z(N,v,y,R){if(Ny||N!==z(N))throw Error(w+(R||"Argument")+(typeof N=="number"?Ny?" out of range: ":" not an integer: ":" not a primitive number: ")+String(N))}function G(N){var v=N.c.length-1;return X(N.e/O)==v&&N.c[v]%2!=0}function f(N,v){return(N.length>1?N.charAt(0)+"."+N.slice(1):N)+(v<0?"e":"e+")+v}function V(N,v,y){var R,h;if(v<0){for(h=y+".";++v;h+=y);N=h+N}else if(R=N.length,++v>R){for(h=y,v-=R;--v;h+=y);N+=h}else if(v{var c64=DT8(),l64=h7_;(function(){function A(H){return H<10?"0"+H:H}var q=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,K=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Y,z,w={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':"\\\"","\\":"\\\\"},_;function $(H){return K.lastIndex=0,K.test(H)?'"'+H.replace(K,function(j){var J=w[j];return typeof J==="string"?J:"\\u"+("0000"+j.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+H+'"'}function O(H,j){var J,M,D,X,P=Y,W,Z=j[H],G=Z!=null&&(Z instanceof c64||c64.isBigNumber(Z));if(Z&&typeof Z==="object"&&typeof Z.toJSON==="function")Z=Z.toJSON(H);if(typeof _==="function")Z=_.call(j,H,Z);switch(typeof Z){case"string":if(G)return Z;else return $(Z);case"number":return isFinite(Z)?String(Z):"null";case"boolean":case"null":case"bigint":return String(Z);case"object":if(!Z)return"null";if(Y+=z,W=[],Object.prototype.toString.apply(Z)==="[object Array]"){X=Z.length;for(J=0;J{var wP1=null,ou9=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,au9=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/,su9=function(A){var q={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(A!==void 0&&A!==null){if(A.strict===!0)q.strict=!0;if(A.storeAsString===!0)q.storeAsString=!0;if(q.alwaysParseAsBig=A.alwaysParseAsBig===!0?A.alwaysParseAsBig:!1,q.useNativeBigInt=A.useNativeBigInt===!0?A.useNativeBigInt:!1,typeof A.constructorAction<"u")if(A.constructorAction==="error"||A.constructorAction==="ignore"||A.constructorAction==="preserve")q.constructorAction=A.constructorAction;else throw Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${A.constructorAction}`);if(typeof A.protoAction<"u")if(A.protoAction==="error"||A.protoAction==="ignore"||A.protoAction==="preserve")q.protoAction=A.protoAction;else throw Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${A.protoAction}`)}var K,Y,z={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:` `,r:"\r",t:"\t"},w,_=function(P){throw{name:"SyntaxError",message:P,at:K,text:w}},$=function(P){if(P&&P!==Y)_("Expected '"+P+"' instead of '"+Y+"'");return Y=w.charAt(K),K+=1,Y},O=function(){var P,W="";if(Y==="-")W="-",$("-");while(Y>="0"&&Y<="9")W+=Y,$();if(Y==="."){W+=".";while($()&&Y>="0"&&Y<="9")W+=Y}if(Y==="e"||Y==="E"){if(W+=Y,$(),Y==="-"||Y==="+")W+=Y,$();while(Y>="0"&&Y<="9")W+=Y,$()}if(P=+W,!isFinite(P))_("Bad number");else{if(wP1==null)wP1=DT8();if(W.length>15)return q.storeAsString?W:q.useNativeBigInt?BigInt(W):new wP1(W);else return!q.alwaysParseAsBig?P:q.useNativeBigInt?BigInt(P):new wP1(P)}},H=function(){var P,W,Z="",G;if(Y==='"'){var f=K;while($()){if(Y==='"'){if(K-1>f)Z+=w.substring(f,K-1);return $(),Z}if(Y==="\\"){if(K-1>f)Z+=w.substring(f,K-1);if($(),Y==="u"){G=0;for(W=0;W<4;W+=1){if(P=parseInt($(),16),!isFinite(P))break;G=G*16+P}Z+=String.fromCharCode(G)}else if(typeof z[Y]==="string")Z+=z[Y];else break;f=K}}}_("Bad string")},j=function(){while(Y&&Y<=" ")$()},J=function(){switch(Y){case"t":return $("t"),$("r"),$("u"),$("e"),!0;case"f":return $("f"),$("a"),$("l"),$("s"),$("e"),!1;case"n":return $("n"),$("u"),$("l"),$("l"),null}_("Unexpected '"+Y+"'")},M,D=function(){var P=[];if(Y==="["){if($("["),j(),Y==="]")return $("]"),P;while(Y){if(P.push(M()),j(),Y==="]")return $("]"),P;$(","),j()}}_("Bad array")},X=function(){var P,W=Object.create(null);if(Y==="{"){if($("{"),j(),Y==="}")return $("}"),W;while(Y){if(P=H(),j(),$(":"),q.strict===!0&&Object.hasOwnProperty.call(W,P))_('Duplicate key "'+P+'"');if(ou9.test(P)===!0)if(q.protoAction==="error")_("Object contains forbidden prototype property");else if(q.protoAction==="ignore")M();else W[P]=M();else if(au9.test(P)===!0)if(q.constructorAction==="error")_("Object contains forbidden constructor property");else if(q.constructorAction==="ignore")M();else W[P]=M();else W[P]=M();if(j(),Y==="}")return $("}"),W;$(","),j()}}_("Bad object")};return M=function(){switch(j(),Y){case"{":return X();case"[":return D();case'"':return H();case"-":return O();default:return Y>="0"&&Y<="9"?O():J()}},function(P,W){var Z;if(w=P+"",K=0,Y=" ",Z=M(),j(),Y)_("Syntax error");return typeof W==="function"?function G(f,V){var N,v,y=f[V];if(y&&typeof y==="object")Object.keys(y).forEach(function(R){if(v=G(y,R),v!==void 0)y[R]=v;else delete y[R]});return W.call(f,V,y)}({"":Z},""):Z}};r64.exports=su9});var t64=C((b7_,_P1)=>{var a64=n64().stringify,s64=o64();_P1.exports=function(A){return{parse:s64(A),stringify:a64}};_P1.exports.parse=s64();_P1.exports.stringify=a64});var XT8=C((w14)=>{Object.defineProperty(w14,"__esModule",{value:!0});w14.GCE_LINUX_BIOS_PATHS=void 0;w14.isGoogleCloudServerless=q14;w14.isGoogleComputeEngineLinux=K14;w14.isGoogleComputeEngineMACAddress=Y14;w14.isGoogleComputeEngine=z14;w14.detectGCPResidency=eu9;var e64=g6("fs"),A14=g6("os");w14.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};var tu9=/^42:01/;function q14(){return!!(process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE)}function K14(){if((0,A14.platform)()!=="linux")return!1;try{(0,e64.statSync)(w14.GCE_LINUX_BIOS_PATHS.BIOS_DATE);let A=(0,e64.readFileSync)(w14.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(A)}catch(A){return!1}}function Y14(){let A=(0,A14.networkInterfaces)();for(let q of Object.values(A)){if(!q)continue;for(let{mac:K}of q)if(tu9.test(K))return!0}return!1}function z14(){return K14()||Y14()}function eu9(){return q14()||z14()}});var O14=C((_14)=>{Object.defineProperty(_14,"__esModule",{value:!0});_14.Colours=void 0;class T9{static isEnabled(A){return A.isTTY&&(typeof A.getColorDepth==="function"?A.getColorDepth()>2:!0)}static refresh(){if(T9.enabled=T9.isEnabled(process.stderr),!this.enabled)T9.reset="",T9.bright="",T9.dim="",T9.red="",T9.green="",T9.yellow="",T9.blue="",T9.magenta="",T9.cyan="",T9.white="",T9.grey="";else T9.reset="\x1B[0m",T9.bright="\x1B[1m",T9.dim="\x1B[2m",T9.red="\x1B[31m",T9.green="\x1B[32m",T9.yellow="\x1B[33m",T9.blue="\x1B[34m",T9.magenta="\x1B[35m",T9.cyan="\x1B[36m",T9.white="\x1B[37m",T9.grey="\x1B[90m"}}_14.Colours=T9;T9.enabled=!1;T9.reset="";T9.bright="";T9.dim="";T9.red="";T9.green="";T9.yellow="";T9.blue="";T9.magenta="";T9.cyan="";T9.white="";T9.grey="";T9.refresh()});var X14=C((a2)=>{var wB9=a2&&a2.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),_B9=a2&&a2.__setModuleDefault||(Object.create?function(A,q){Object.defineProperty(A,"default",{enumerable:!0,value:q})}:function(A,q){A.default=q}),H14=a2&&a2.__importStar||function(A){if(A&&A.__esModule)return A;var q={};if(A!=null){for(var K in A)if(K!=="default"&&Object.prototype.hasOwnProperty.call(A,K))wB9(q,A,K)}return _B9(q,A),q};Object.defineProperty(a2,"__esModule",{value:!0});a2.env=a2.DebugLogBackendBase=a2.placeholder=a2.AdhocDebugLogger=a2.LogSeverity=void 0;a2.getNodeBackend=PT8;a2.getDebugBackend=OB9;a2.getStructuredBackend=HB9;a2.setBackend=jB9;a2.log=D14;var $B9=g6("node:events"),RU6=H14(g6("node:process")),j14=H14(g6("node:util")),QE=O14(),nb;(function(A){A.DEFAULT="DEFAULT",A.DEBUG="DEBUG",A.INFO="INFO",A.WARNING="WARNING",A.ERROR="ERROR"})(nb||(a2.LogSeverity=nb={}));class OP1 extends $B9.EventEmitter{constructor(A,q){super();this.namespace=A,this.upstream=q,this.func=Object.assign(this.invoke.bind(this),{instance:this,on:(K,Y)=>this.on(K,Y)}),this.func.debug=(...K)=>this.invokeSeverity(nb.DEBUG,...K),this.func.info=(...K)=>this.invokeSeverity(nb.INFO,...K),this.func.warn=(...K)=>this.invokeSeverity(nb.WARNING,...K),this.func.error=(...K)=>this.invokeSeverity(nb.ERROR,...K),this.func.sublog=(K)=>D14(K,this.func)}invoke(A,...q){if(this.upstream)this.upstream(A,...q);this.emit("log",A,q)}invokeSeverity(A,...q){this.invoke({severity:A},...q)}}a2.AdhocDebugLogger=OP1;a2.placeholder=new OP1("",()=>{}).func;class SU6{constructor(){var A;this.cached=new Map,this.filters=[],this.filtersSet=!1;let q=(A=RU6.env[a2.env.nodeEnables])!==null&&A!==void 0?A:"*";if(q==="all")q="*";this.filters=q.split(",")}log(A,q,...K){try{if(!this.filtersSet)this.setFilters(),this.filtersSet=!0;let Y=this.cached.get(A);if(!Y)Y=this.makeLogger(A),this.cached.set(A,Y);Y(q,...K)}catch(Y){console.error(Y)}}}a2.DebugLogBackendBase=SU6;class ZT8 extends SU6{constructor(){super(...arguments);this.enabledRegexp=/.*/g}isEnabled(A){return this.enabledRegexp.test(A)}makeLogger(A){if(!this.enabledRegexp.test(A))return()=>{};return(q,...K)=>{var Y;let z=`${QE.Colours.green}${A}${QE.Colours.reset}`,w=`${QE.Colours.yellow}${RU6.pid}${QE.Colours.reset}`,_;switch(q.severity){case nb.ERROR:_=`${QE.Colours.red}${q.severity}${QE.Colours.reset}`;break;case nb.INFO:_=`${QE.Colours.magenta}${q.severity}${QE.Colours.reset}`;break;case nb.WARNING:_=`${QE.Colours.yellow}${q.severity}${QE.Colours.reset}`;break;default:_=(Y=q.severity)!==null&&Y!==void 0?Y:nb.DEFAULT;break}let $=j14.formatWithOptions({colors:QE.Colours.enabled},...K),O=Object.assign({},q);delete O.severity;let H=Object.getOwnPropertyNames(O).length?JSON.stringify(O):"",j=H?`${QE.Colours.grey}${H}${QE.Colours.reset}`:"";console.error("%s [%s|%s] %s%s",w,z,_,$,H?` ${j}`:"")}}setFilters(){let q=this.filters.join(",").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^");this.enabledRegexp=new RegExp(`^${q}$`,"i")}}function PT8(){return new ZT8}class J14 extends SU6{constructor(A){super();this.debugPkg=A}makeLogger(A){let q=this.debugPkg(A);return(K,...Y)=>{q(Y[0],...Y.slice(1))}}setFilters(){var A;let q=(A=RU6.env.NODE_DEBUG)!==null&&A!==void 0?A:"";RU6.env.NODE_DEBUG=`${q}${q?",":""}${this.filters.join(",")}`}}function OB9(A){return new J14(A)}class M14 extends SU6{constructor(A){var q;super();this.upstream=(q=A)!==null&&q!==void 0?q:new ZT8}makeLogger(A){let q=this.upstream.makeLogger(A);return(K,...Y)=>{var z;let w=(z=K.severity)!==null&&z!==void 0?z:nb.INFO,_=Object.assign({severity:w,message:j14.format(...Y)},K),$=JSON.stringify(_);q(K,$)}}setFilters(){this.upstream.setFilters()}}function HB9(A){return new M14(A)}a2.env={nodeEnables:"GOOGLE_SDK_NODE_LOGGING"};var WT8=new Map,vS=void 0;function jB9(A){vS=A,WT8.clear()}function D14(A,q){if(!RU6.env[a2.env.nodeEnables])return a2.placeholder;if(!A)return a2.placeholder;if(q)A=`${q.instance.namespace}:${A}`;let Y=WT8.get(A);if(Y)return Y.func;if(vS===null)return a2.placeholder;else if(vS===void 0)vS=PT8();let z=(()=>{let w=void 0;return new OP1(A,($,...O)=>{if(w!==vS){if(vS===null)return;else if(vS===void 0)vS=PT8();w=vS}vS===null||vS===void 0||vS.log(A,$,...O)})})();return WT8.set(A,z),z.func}});var P14=C((XY6)=>{var JB9=XY6&&XY6.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),MB9=XY6&&XY6.__exportStar||function(A,q){for(var K in A)if(K!=="default"&&!Object.prototype.hasOwnProperty.call(q,K))JB9(q,A,K)};Object.defineProperty(XY6,"__esModule",{value:!0});MB9(X14(),XY6)});var hU6=C((_3)=>{var DB9=_3&&_3.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),XB9=_3&&_3.__exportStar||function(A,q){for(var K in A)if(K!=="default"&&!Object.prototype.hasOwnProperty.call(q,K))DB9(q,A,K)};Object.defineProperty(_3,"__esModule",{value:!0});_3.gcpResidencyCache=_3.METADATA_SERVER_DETECTION=_3.HEADERS=_3.HEADER_VALUE=_3.HEADER_NAME=_3.SECONDARY_HOST_ADDRESS=_3.HOST_ADDRESS=_3.BASE_PATH=void 0;_3.instance=TB9;_3.project=VB9;_3.universe=NB9;_3.bulk=vB9;_3.isAvailable=EB9;_3.resetIsAvailableCache=LB9;_3.getGCPResidency=TT8;_3.setGCPResidency=Z14;_3.requestTimeout=G14;var GT8=ib(),PB9=t64(),WB9=XT8(),ZB9=P14();_3.BASE_PATH="/computeMetadata/v1";_3.HOST_ADDRESS="http://169.254.169.254";_3.SECONDARY_HOST_ADDRESS="http://metadata.google.internal.";_3.HEADER_NAME="Metadata-Flavor";_3.HEADER_VALUE="Google";_3.HEADERS=Object.freeze({[_3.HEADER_NAME]:_3.HEADER_VALUE});var W14=ZB9.log("gcp metadata");_3.METADATA_SERVER_DETECTION=Object.freeze({"assume-present":"don't try to ping the metadata server, but assume it's present",none:"don't try to ping the metadata server, but don't try to use it either","bios-only":"treat the result of a BIOS probe as canonical (don't fall back to pinging)","ping-only":"skip the BIOS probe, and go straight to pinging"});function fT8(A){if(!A)A=process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST||_3.HOST_ADDRESS;if(!/^https?:\/\//.test(A))A=`http://${A}`;return new URL(_3.BASE_PATH,A).href}function GB9(A){Object.keys(A).forEach((q)=>{switch(q){case"params":case"property":case"headers":break;case"qs":throw Error("'qs' is not a valid configuration option. Please use 'params' instead.");default:throw Error(`'${q}' is not a valid configuration option.`)}})}async function CU6(A,q={},K=3,Y=!1){let z="",w={},_={};if(typeof A==="object"){let j=A;z=j.metadataKey,w=j.params||w,_=j.headers||_,K=j.noResponseRetries||K,Y=j.fastFail||Y}else z=A;if(typeof q==="string")z+=`/${q}`;else{if(GB9(q),q.property)z+=`/${q.property}`;_=q.headers||_,w=q.params||w}let $=Y?fB9:GT8.request,O={url:`${fT8()}/${z}`,headers:{..._3.HEADERS,..._},retryConfig:{noResponseRetries:K},params:w,responseType:"text",timeout:G14()};W14.info("instance request %j",O);let H=await $(O);if(W14.info("instance metadata is %s",H.data),H.headers[_3.HEADER_NAME.toLowerCase()]!==_3.HEADER_VALUE)throw Error(`Invalid response from metadata service: incorrect ${_3.HEADER_NAME} header. Expected '${_3.HEADER_VALUE}', got ${H.headers[_3.HEADER_NAME.toLowerCase()]?`'${H.headers[_3.HEADER_NAME.toLowerCase()]}'`:"no header"}`);if(typeof H.data==="string")try{return PB9.parse(H.data)}catch(j){}return H.data}async function fB9(A){var q;let K={...A,url:(q=A.url)===null||q===void 0?void 0:q.toString().replace(fT8(),fT8(_3.SECONDARY_HOST_ADDRESS))},Y=!1,z=(0,GT8.request)(A).then((_)=>{return Y=!0,_}).catch((_)=>{if(Y)return w;else throw Y=!0,_}),w=(0,GT8.request)(K).then((_)=>{return Y=!0,_}).catch((_)=>{if(Y)return z;else throw Y=!0,_});return Promise.race([z,w])}function TB9(A){return CU6("instance",A)}function VB9(A){return CU6("project",A)}function NB9(A){return CU6("universe",A)}async function vB9(A){let q={};return await Promise.all(A.map((K)=>{return(async()=>{let Y=await CU6(K),z=K.metadataKey;q[z]=Y})()})),q}function kB9(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}var HP1;async function EB9(){if(process.env.METADATA_SERVER_DETECTION){let A=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(A in _3.METADATA_SERVER_DETECTION))throw RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${A}\`, but it should be \`${Object.keys(_3.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`);switch(A){case"assume-present":return!0;case"none":return!1;case"bios-only":return TT8();case"ping-only":}}try{if(HP1===void 0)HP1=CU6("instance",void 0,kB9(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST));return await HP1,!0}catch(A){let q=A;if(process.env.DEBUG_AUTH)console.info(q);if(q.type==="request-timeout")return!1;if(q.response&&q.response.status===404)return!1;else{if(!(q.response&&q.response.status===404)&&(!q.code||!["EHOSTDOWN","EHOSTUNREACH","ENETUNREACH","ENOENT","ENOTFOUND","ECONNREFUSED"].includes(q.code))){let K="UNKNOWN";if(q.code)K=q.code;process.emitWarning(`received unexpected error = ${q.message} code = ${K}`,"MetadataLookupWarning")}return!1}}}function LB9(){HP1=void 0}_3.gcpResidencyCache=null;function TT8(){if(_3.gcpResidencyCache===null)Z14();return _3.gcpResidencyCache}function Z14(A=null){_3.gcpResidencyCache=A!==null?A:(0,WB9.detectGCPResidency)()}function G14(){return TT8()?0:3000}XB9(XT8(),_3)});var vT8=C((xB9)=>{xB9.byteLength=RB9;xB9.toByteArray=CB9;xB9.fromByteArray=bB9;var YF=[],kS=[],yB9=typeof Uint8Array<"u"?Uint8Array:Array,VT8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(H66=0,NT8=VT8.length;H660)throw Error("Invalid string. Length must be a multiple of 4");var K=A.indexOf("=");if(K===-1)K=q;var Y=K===q?0:4-K%4;return[K,Y]}function RB9(A){var q=f14(A),K=q[0],Y=q[1];return(K+Y)*3/4-Y}function SB9(A,q,K){return(q+K)*3/4-K}function CB9(A){var q,K=f14(A),Y=K[0],z=K[1],w=new yB9(SB9(A,Y,z)),_=0,$=z>0?Y-4:Y,O;for(O=0;O<$;O+=4)q=kS[A.charCodeAt(O)]<<18|kS[A.charCodeAt(O+1)]<<12|kS[A.charCodeAt(O+2)]<<6|kS[A.charCodeAt(O+3)],w[_++]=q>>16&255,w[_++]=q>>8&255,w[_++]=q&255;if(z===2)q=kS[A.charCodeAt(O)]<<2|kS[A.charCodeAt(O+1)]>>4,w[_++]=q&255;if(z===1)q=kS[A.charCodeAt(O)]<<10|kS[A.charCodeAt(O+1)]<<4|kS[A.charCodeAt(O+2)]>>2,w[_++]=q>>8&255,w[_++]=q&255;return w}function hB9(A){return YF[A>>18&63]+YF[A>>12&63]+YF[A>>6&63]+YF[A&63]}function IB9(A,q,K){var Y,z=[];for(var w=q;w$?$:_+w));if(Y===1)q=A[K-1],z.push(YF[q>>2]+YF[q<<4&63]+"==");else if(Y===2)q=(A[K-2]<<8)+A[K-1],z.push(YF[q>>10]+YF[q>>4&63]+YF[q<<2&63]+"=");return z.join("")}});var N14=C((T14)=>{Object.defineProperty(T14,"__esModule",{value:!0});T14.BrowserCrypto=void 0;var hZ6=vT8(),gB9=IZ6();class jP1{constructor(){if(typeof window>"u"||window.crypto===void 0||window.crypto.subtle===void 0)throw Error("SubtleCrypto not found. Make sure it's an https:// website.")}async sha256DigestBase64(A){let q=new TextEncoder().encode(A),K=await window.crypto.subtle.digest("SHA-256",q);return hZ6.fromByteArray(new Uint8Array(K))}randomBytesBase64(A){let q=new Uint8Array(A);return window.crypto.getRandomValues(q),hZ6.fromByteArray(q)}static padBase64(A){while(A.length%4!==0)A+="=";return A}async verify(A,q,K){let Y={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},z=new TextEncoder().encode(q),w=hZ6.toByteArray(jP1.padBase64(K)),_=await window.crypto.subtle.importKey("jwk",A,Y,!0,["verify"]);return await window.crypto.subtle.verify(Y,_,w,z)}async sign(A,q){let K={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},Y=new TextEncoder().encode(q),z=await window.crypto.subtle.importKey("jwk",A,K,!0,["sign"]),w=await window.crypto.subtle.sign(K,z,Y);return hZ6.fromByteArray(new Uint8Array(w))}decodeBase64StringUtf8(A){let q=hZ6.toByteArray(jP1.padBase64(A));return new TextDecoder().decode(q)}encodeBase64StringUtf8(A){let q=new TextEncoder().encode(A);return hZ6.fromByteArray(q)}async sha256DigestHex(A){let q=new TextEncoder().encode(A),K=await window.crypto.subtle.digest("SHA-256",q);return(0,gB9.fromArrayBufferToHex)(K)}async signWithHmacSha256(A,q){let K=typeof A==="string"?A:String.fromCharCode(...new Uint16Array(A)),Y=new TextEncoder,z=await window.crypto.subtle.importKey("raw",Y.encode(K),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return window.crypto.subtle.sign("HMAC",z,Y.encode(q))}}T14.BrowserCrypto=jP1});var L14=C((k14)=>{Object.defineProperty(k14,"__esModule",{value:!0});k14.NodeCrypto=void 0;var bZ6=g6("crypto");class v14{async sha256DigestBase64(A){return bZ6.createHash("sha256").update(A).digest("base64")}randomBytesBase64(A){return bZ6.randomBytes(A).toString("base64")}async verify(A,q,K){let Y=bZ6.createVerify("RSA-SHA256");return Y.update(q),Y.end(),Y.verify(A,K,"base64")}async sign(A,q){let K=bZ6.createSign("RSA-SHA256");return K.update(q),K.end(),K.sign(A,"base64")}decodeBase64StringUtf8(A){return Buffer.from(A,"base64").toString("utf-8")}encodeBase64StringUtf8(A){return Buffer.from(A,"utf-8").toString("base64")}async sha256DigestHex(A){return bZ6.createHash("sha256").update(A).digest("hex")}async signWithHmacSha256(A,q){let K=typeof A==="string"?A:QB9(A);return FB9(bZ6.createHmac("sha256",K).update(q).digest())}}k14.NodeCrypto=v14;function FB9(A){return A.buffer.slice(A.byteOffset,A.byteOffset+A.byteLength)}function QB9(A){return Buffer.from(A)}});var IZ6=C((R14)=>{Object.defineProperty(R14,"__esModule",{value:!0});R14.createCrypto=dB9;R14.hasBrowserCrypto=y14;R14.fromArrayBufferToHex=cB9;var UB9=N14(),pB9=L14();function dB9(){if(y14())return new UB9.BrowserCrypto;return new pB9.NodeCrypto}function y14(){return typeof window<"u"&&typeof window.crypto<"u"&&typeof window.crypto.subtle<"u"}function cB9(A){return Array.from(new Uint8Array(A)).map((K)=>{return K.toString(16).padStart(2,"0")}).join("")}});var C14=C((S14)=>{Object.defineProperty(S14,"__esModule",{value:!0});S14.validate=rB9;function rB9(A){let q=[{invalid:"uri",expected:"url"},{invalid:"json",expected:"data"},{invalid:"qs",expected:"params"}];for(let K of q)if(A[K.invalid]){let Y=`'${K.invalid}' is not a valid configuration option. Please use '${K.expected}' instead. This library is using Axios for requests. Please see https://github.com/axios/axios to learn more about the valid request options.`;throw Error(Y)}}});var kT8=C((c7_,aB9)=>{aB9.exports={name:"google-auth-library",version:"9.15.1",author:"Google Inc.",description:"Google APIs Authentication Client Library for Node.js",engines:{node:">=14"},main:"./build/src/index.js",types:"./build/src/index.d.ts",repository:"googleapis/google-auth-library-nodejs.git",keywords:["google","api","google apis","client","client library"],dependencies:{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11",gaxios:"^6.1.1","gcp-metadata":"^6.1.0",gtoken:"^7.0.0",jws:"^4.0.0"},devDependencies:{"@types/base64-js":"^1.2.5","@types/chai":"^4.1.7","@types/jws":"^3.1.0","@types/mocha":"^9.0.0","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^20.4.2","@types/sinon":"^17.0.0","assert-rejects":"^1.0.0",c8:"^8.0.0",chai:"^4.2.0",cheerio:"1.0.0-rc.12",codecov:"^3.0.2","engine.io":"6.6.2",gts:"^5.0.0","is-docker":"^2.0.0",jsdoc:"^4.0.0","jsdoc-fresh":"^3.0.0","jsdoc-region-tag":"^3.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"5.0.0",keypair:"^1.0.4",linkinator:"^4.0.0",mocha:"^9.2.2",mv:"^2.1.1",ncp:"^2.0.0",nock:"^13.0.0","null-loader":"^4.0.0",pdfmake:"0.2.12",puppeteer:"^21.0.0",sinon:"^18.0.0","ts-loader":"^8.0.0",typescript:"^5.1.6",webpack:"^5.21.2","webpack-cli":"^4.0.0"},files:["build/src","!build/src/**/*.map"],scripts:{test:"c8 mocha build/test",clean:"gts clean",prepare:"npm run compile",lint:"gts check",compile:"tsc -p .",fix:"gts fix",pretest:"npm run compile -- --sourceMap",docs:"jsdoc -c .jsdoc.json","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap",webpack:"webpack","browser-test":"karma start","docs-test":"linkinator docs","predocs-test":"npm run docs",prelint:"cd samples; npm link ../; npm install",precompile:"gts clean"},license:"Apache-2.0"}});var bU6=C((I14)=>{Object.defineProperty(I14,"__esModule",{value:!0});I14.DefaultTransporter=void 0;var sB9=ib(),tB9=C14(),eB9=kT8(),h14="google-api-nodejs-client";class IU6{constructor(){this.instance=new sB9.Gaxios}configure(A={}){if(A.headers=A.headers||{},typeof window>"u"){let q=A.headers["User-Agent"];if(!q)A.headers["User-Agent"]=IU6.USER_AGENT;else if(!q.includes(`${h14}/`))A.headers["User-Agent"]=`${q} ${IU6.USER_AGENT}`;if(!A.headers["x-goog-api-client"]){let K=process.version.replace(/^v/,"");A.headers["x-goog-api-client"]=`gl-node/${K}`}}return A}request(A){return A=this.configure(A),(0,tB9.validate)(A),this.instance.request(A).catch((q)=>{throw this.processError(q)})}get defaults(){return this.instance.defaults}set defaults(A){this.instance.defaults=A}processError(A){let q=A.response,K=A,Y=q?q.data:null;if(q&&Y&&Y.error&&q.status!==200)if(typeof Y.error==="string")K.message=Y.error,K.status=q.status;else if(Array.isArray(Y.error.errors))K.message=Y.error.errors.map((z)=>z.message).join(` `),K.code=Y.error.code,K.errors=Y.error.errors;else K.message=Y.error.message,K.code=Y.error.code;else if(q&&q.status>=400)K.message=Y,K.status=q.status;return K}}I14.DefaultTransporter=IU6;IU6.USER_AGENT=`${h14}/${eB9.version}`});var J66=C((j66)=>{var rb=j66&&j66.__classPrivateFieldGet||function(A,q,K,Y){if(K==="a"&&!Y)throw TypeError("Private accessor was defined without a getter");if(typeof q==="function"?A!==q||!Y:!q.has(A))throw TypeError("Cannot read private member from an object whose class did not declare it");return K==="m"?Y:K==="a"?Y.call(A):Y?Y.value:q.get(A)},xZ6,Bl,ET8,LT8;Object.defineProperty(j66,"__esModule",{value:!0});j66.LRUCache=void 0;j66.snakeToCamel=x14;j66.originalOrCamelOptions=Am9;function x14(A){return A.replace(/([_][^_])/g,(q)=>q.slice(1).toUpperCase())}function Am9(A){function q(K){var Y;let z=A||{};return(Y=z[K])!==null&&Y!==void 0?Y:z[x14(K)]}return{get:q}}class u14{constructor(A){xZ6.add(this),Bl.set(this,new Map),this.capacity=A.capacity,this.maxAge=A.maxAge}set(A,q){rb(this,xZ6,"m",ET8).call(this,A,q),rb(this,xZ6,"m",LT8).call(this)}get(A){let q=rb(this,Bl,"f").get(A);if(!q)return;return rb(this,xZ6,"m",ET8).call(this,A,q.value),rb(this,xZ6,"m",LT8).call(this),q.value}}j66.LRUCache=u14;Bl=new WeakMap,xZ6=new WeakSet,ET8=function(q,K){rb(this,Bl,"f").delete(q),rb(this,Bl,"f").set(q,{value:K,lastAccessed:Date.now()})},LT8=function(){let q=this.maxAge?Date.now()-this.maxAge:0,K=rb(this,Bl,"f").entries().next();while(!K.done&&(rb(this,Bl,"f").size>this.capacity||K.value[1].lastAccessed{Object.defineProperty(F14,"__esModule",{value:!0});F14.AuthClient=F14.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=F14.DEFAULT_UNIVERSE=void 0;var qm9=g6("events"),B14=ib(),m14=bU6(),Km9=J66();F14.DEFAULT_UNIVERSE="googleapis.com";F14.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=300000;class g14 extends qm9.EventEmitter{constructor(A={}){var q,K,Y,z,w;super();this.credentials={},this.eagerRefreshThresholdMillis=F14.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS,this.forceRefreshOnFailure=!1,this.universeDomain=F14.DEFAULT_UNIVERSE;let _=(0,Km9.originalOrCamelOptions)(A);if(this.apiKey=A.apiKey,this.projectId=(q=_.get("project_id"))!==null&&q!==void 0?q:null,this.quotaProjectId=_.get("quota_project_id"),this.credentials=(K=_.get("credentials"))!==null&&K!==void 0?K:{},this.universeDomain=(Y=_.get("universe_domain"))!==null&&Y!==void 0?Y:F14.DEFAULT_UNIVERSE,this.transporter=(z=A.transporter)!==null&&z!==void 0?z:new m14.DefaultTransporter,A.transporterOptions)this.transporter.defaults=A.transporterOptions;if(A.eagerRefreshThresholdMillis)this.eagerRefreshThresholdMillis=A.eagerRefreshThresholdMillis;this.forceRefreshOnFailure=(w=A.forceRefreshOnFailure)!==null&&w!==void 0?w:!1}get gaxios(){if(this.transporter instanceof B14.Gaxios)return this.transporter;else if(this.transporter instanceof m14.DefaultTransporter)return this.transporter.instance;else if("instance"in this.transporter&&this.transporter.instance instanceof B14.Gaxios)return this.transporter.instance;return null}setCredentials(A){this.credentials=A}addSharedMetadataHeaders(A){if(!A["x-goog-user-project"]&&this.quotaProjectId)A["x-goog-user-project"]=this.quotaProjectId;return A}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}}F14.AuthClient=g14});var RT8=C((d14)=>{Object.defineProperty(d14,"__esModule",{value:!0});d14.LoginTicket=void 0;class p14{constructor(A,q){this.envelope=A,this.payload=q}getEnvelope(){return this.envelope}getPayload(){return this.payload}getUserId(){let A=this.getPayload();if(A&&A.sub)return A.sub;return null}getAttributes(){return{envelope:this.getEnvelope(),payload:this.getPayload()}}}d14.LoginTicket=p14});var PY6=C((i14)=>{Object.defineProperty(i14,"__esModule",{value:!0});i14.OAuth2Client=i14.ClientAuthentication=i14.CertificateFormat=i14.CodeChallengeMethod=void 0;var Ym9=ib(),ST8=g6("querystring"),zm9=g6("stream"),wm9=eD1(),CT8=IZ6(),_m9=zF(),$m9=RT8(),l14;(function(A){A.Plain="plain",A.S256="S256"})(l14||(i14.CodeChallengeMethod=l14={}));var ml;(function(A){A.PEM="PEM",A.JWK="JWK"})(ml||(i14.CertificateFormat=ml={}));var xU6;(function(A){A.ClientSecretPost="ClientSecretPost",A.ClientSecretBasic="ClientSecretBasic",A.None="None"})(xU6||(i14.ClientAuthentication=xU6={}));class PT extends _m9.AuthClient{constructor(A,q,K){let Y=A&&typeof A==="object"?A:{clientId:A,clientSecret:q,redirectUri:K};super(Y);this.certificateCache={},this.certificateExpiry=null,this.certificateCacheFormat=ml.PEM,this.refreshTokenPromises=new Map,this._clientId=Y.clientId,this._clientSecret=Y.clientSecret,this.redirectUri=Y.redirectUri,this.endpoints={tokenInfoUrl:"https://oauth2.googleapis.com/tokeninfo",oauth2AuthBaseUrl:"https://accounts.google.com/o/oauth2/v2/auth",oauth2TokenUrl:"https://oauth2.googleapis.com/token",oauth2RevokeUrl:"https://oauth2.googleapis.com/revoke",oauth2FederatedSignonPemCertsUrl:"https://www.googleapis.com/oauth2/v1/certs",oauth2FederatedSignonJwkCertsUrl:"https://www.googleapis.com/oauth2/v3/certs",oauth2IapPublicKeyUrl:"https://www.gstatic.com/iap/verify/public_key",...Y.endpoints},this.clientAuthentication=Y.clientAuthentication||xU6.ClientSecretPost,this.issuers=Y.issuers||["accounts.google.com","https://accounts.google.com",this.universeDomain]}generateAuthUrl(A={}){if(A.code_challenge_method&&!A.code_challenge)throw Error("If a code_challenge_method is provided, code_challenge must be included.");if(A.response_type=A.response_type||"code",A.client_id=A.client_id||this._clientId,A.redirect_uri=A.redirect_uri||this.redirectUri,Array.isArray(A.scope))A.scope=A.scope.join(" ");return this.endpoints.oauth2AuthBaseUrl.toString()+"?"+ST8.stringify(A)}generateCodeVerifier(){throw Error("generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.")}async generateCodeVerifierAsync(){let A=(0,CT8.createCrypto)(),K=A.randomBytesBase64(96).replace(/\+/g,"~").replace(/=/g,"_").replace(/\//g,"-"),z=(await A.sha256DigestBase64(K)).split("=")[0].replace(/\+/g,"-").replace(/\//g,"_");return{codeVerifier:K,codeChallenge:z}}getToken(A,q){let K=typeof A==="string"?{code:A}:A;if(q)this.getTokenAsync(K).then((Y)=>q(null,Y.tokens,Y.res),(Y)=>q(Y,null,Y.response));else return this.getTokenAsync(K)}async getTokenAsync(A){let q=this.endpoints.oauth2TokenUrl.toString(),K={"Content-Type":"application/x-www-form-urlencoded"},Y={client_id:A.client_id||this._clientId,code_verifier:A.codeVerifier,code:A.code,grant_type:"authorization_code",redirect_uri:A.redirect_uri||this.redirectUri};if(this.clientAuthentication===xU6.ClientSecretBasic){let _=Buffer.from(`${this._clientId}:${this._clientSecret}`);K.Authorization=`Basic ${_.toString("base64")}`}if(this.clientAuthentication===xU6.ClientSecretPost)Y.client_secret=this._clientSecret;let z=await this.transporter.request({...PT.RETRY_CONFIG,method:"POST",url:q,data:ST8.stringify(Y),headers:K}),w=z.data;if(z.data&&z.data.expires_in)w.expiry_date=new Date().getTime()+z.data.expires_in*1000,delete w.expires_in;return this.emit("tokens",w),{tokens:w,res:z}}async refreshToken(A){if(!A)return this.refreshTokenNoCache(A);if(this.refreshTokenPromises.has(A))return this.refreshTokenPromises.get(A);let q=this.refreshTokenNoCache(A).then((K)=>{return this.refreshTokenPromises.delete(A),K},(K)=>{throw this.refreshTokenPromises.delete(A),K});return this.refreshTokenPromises.set(A,q),q}async refreshTokenNoCache(A){var q;if(!A)throw Error("No refresh token is set.");let K=this.endpoints.oauth2TokenUrl.toString(),Y={refresh_token:A,client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token"},z;try{z=await this.transporter.request({...PT.RETRY_CONFIG,method:"POST",url:K,data:ST8.stringify(Y),headers:{"Content-Type":"application/x-www-form-urlencoded"}})}catch(_){if(_ instanceof Ym9.GaxiosError&&_.message==="invalid_grant"&&((q=_.response)===null||q===void 0?void 0:q.data)&&/ReAuth/i.test(_.response.data.error_description))_.message=JSON.stringify(_.response.data);throw _}let w=z.data;if(z.data&&z.data.expires_in)w.expiry_date=new Date().getTime()+z.data.expires_in*1000,delete w.expires_in;return this.emit("tokens",w),{tokens:w,res:z}}refreshAccessToken(A){if(A)this.refreshAccessTokenAsync().then((q)=>A(null,q.credentials,q.res),A);else return this.refreshAccessTokenAsync()}async refreshAccessTokenAsync(){let A=await this.refreshToken(this.credentials.refresh_token),q=A.tokens;return q.refresh_token=this.credentials.refresh_token,this.credentials=q,{credentials:this.credentials,res:A.res}}getAccessToken(A){if(A)this.getAccessTokenAsync().then((q)=>A(null,q.token,q.res),A);else return this.getAccessTokenAsync()}async getAccessTokenAsync(){if(!this.credentials.access_token||this.isTokenExpiring()){if(!this.credentials.refresh_token)if(this.refreshHandler){let K=await this.processAndValidateRefreshHandler();if(K===null||K===void 0?void 0:K.access_token)return this.setCredentials(K),{token:this.credentials.access_token}}else throw Error("No refresh token or refresh handler callback is set.");let q=await this.refreshAccessTokenAsync();if(!q.credentials||q.credentials&&!q.credentials.access_token)throw Error("Could not refresh access token.");return{token:q.credentials.access_token,res:q.res}}else return{token:this.credentials.access_token}}async getRequestHeaders(A){return(await this.getRequestMetadataAsync(A)).headers}async getRequestMetadataAsync(A){let q=this.credentials;if(!q.access_token&&!q.refresh_token&&!this.apiKey&&!this.refreshHandler)throw Error("No access, refresh token, API key or refresh handler callback is set.");if(q.access_token&&!this.isTokenExpiring()){q.token_type=q.token_type||"Bearer";let _={Authorization:q.token_type+" "+q.access_token};return{headers:this.addSharedMetadataHeaders(_)}}if(this.refreshHandler){let _=await this.processAndValidateRefreshHandler();if(_===null||_===void 0?void 0:_.access_token){this.setCredentials(_);let $={Authorization:"Bearer "+this.credentials.access_token};return{headers:this.addSharedMetadataHeaders($)}}}if(this.apiKey)return{headers:{"X-Goog-Api-Key":this.apiKey}};let K=null,Y=null;try{K=await this.refreshToken(q.refresh_token),Y=K.tokens}catch(_){let $=_;if($.response&&($.response.status===403||$.response.status===404))$.message=`Could not refresh access token: ${$.message}`;throw $}let z=this.credentials;z.token_type=z.token_type||"Bearer",Y.refresh_token=z.refresh_token,this.credentials=Y;let w={Authorization:z.token_type+" "+Y.access_token};return{headers:this.addSharedMetadataHeaders(w),res:K.res}}static getRevokeTokenUrl(A){return new PT().getRevokeTokenURL(A).toString()}getRevokeTokenURL(A){let q=new URL(this.endpoints.oauth2RevokeUrl);return q.searchParams.append("token",A),q}revokeToken(A,q){let K={...PT.RETRY_CONFIG,url:this.getRevokeTokenURL(A).toString(),method:"POST"};if(q)this.transporter.request(K).then((Y)=>q(null,Y),q);else return this.transporter.request(K)}revokeCredentials(A){if(A)this.revokeCredentialsAsync().then((q)=>A(null,q),A);else return this.revokeCredentialsAsync()}async revokeCredentialsAsync(){let A=this.credentials.access_token;if(this.credentials={},A)return this.revokeToken(A);else throw Error("No access token to revoke.")}request(A,q){if(q)this.requestAsync(A).then((K)=>q(null,K),(K)=>{return q(K,K.response)});else return this.requestAsync(A)}async requestAsync(A,q=!1){let K;try{let Y=await this.getRequestMetadataAsync(A.url);if(A.headers=A.headers||{},Y.headers&&Y.headers["x-goog-user-project"])A.headers["x-goog-user-project"]=Y.headers["x-goog-user-project"];if(Y.headers&&Y.headers.Authorization)A.headers.Authorization=Y.headers.Authorization;if(this.apiKey)A.headers["X-Goog-Api-Key"]=this.apiKey;K=await this.transporter.request(A)}catch(Y){let z=Y.response;if(z){let w=z.status,_=this.credentials&&this.credentials.access_token&&this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure),$=this.credentials&&this.credentials.access_token&&!this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure)&&this.refreshHandler,O=z.config.data instanceof zm9.Readable,H=w===401||w===403;if(!q&&H&&!O&&_)return await this.refreshAccessTokenAsync(),this.requestAsync(A,!0);else if(!q&&H&&!O&&$){let j=await this.processAndValidateRefreshHandler();if(j===null||j===void 0?void 0:j.access_token)this.setCredentials(j);return this.requestAsync(A,!0)}}throw Y}return K}verifyIdToken(A,q){if(q&&typeof q!=="function")throw Error("This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.");if(q)this.verifyIdTokenAsync(A).then((K)=>q(null,K),q);else return this.verifyIdTokenAsync(A)}async verifyIdTokenAsync(A){if(!A.idToken)throw Error("The verifyIdToken method requires an ID Token");let q=await this.getFederatedSignonCertsAsync();return await this.verifySignedJwtWithCertsAsync(A.idToken,q.certs,A.audience,this.issuers,A.maxExpiry)}async getTokenInfo(A){let{data:q}=await this.transporter.request({...PT.RETRY_CONFIG,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:`Bearer ${A}`},url:this.endpoints.tokenInfoUrl.toString()}),K=Object.assign({expiry_date:new Date().getTime()+q.expires_in*1000,scopes:q.scope.split(" ")},q);return delete K.expires_in,delete K.scope,K}getFederatedSignonCerts(A){if(A)this.getFederatedSignonCertsAsync().then((q)=>A(null,q.certs,q.res),A);else return this.getFederatedSignonCertsAsync()}async getFederatedSignonCertsAsync(){let A=new Date().getTime(),q=(0,CT8.hasBrowserCrypto)()?ml.JWK:ml.PEM;if(this.certificateExpiry&&AA(null,q.pubkeys,q.res),A);else return this.getIapPublicKeysAsync()}async getIapPublicKeysAsync(){let A,q=this.endpoints.oauth2IapPublicKeyUrl.toString();try{A=await this.transporter.request({...PT.RETRY_CONFIG,url:q})}catch(K){if(K instanceof Error)K.message=`Failed to retrieve verification certificates: ${K.message}`;throw K}return{pubkeys:A.data,res:A}}verifySignedJwtWithCerts(){throw Error("verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.")}async verifySignedJwtWithCertsAsync(A,q,K,Y,z){let w=(0,CT8.createCrypto)();if(!z)z=PT.DEFAULT_MAX_TOKEN_LIFETIME_SECS_;let _=A.split(".");if(_.length!==3)throw Error("Wrong number of segments in token: "+A);let $=_[0]+"."+_[1],O=_[2],H,j;try{H=JSON.parse(w.decodeBase64StringUtf8(_[0]))}catch(G){if(G instanceof Error)G.message=`Can't parse token envelope: ${_[0]}': ${G.message}`;throw G}if(!H)throw Error("Can't parse token envelope: "+_[0]);try{j=JSON.parse(w.decodeBase64StringUtf8(_[1]))}catch(G){if(G instanceof Error)G.message=`Can't parse token payload '${_[0]}`;throw G}if(!j)throw Error("Can't parse token payload: "+_[1]);if(!Object.prototype.hasOwnProperty.call(q,H.kid))throw Error("No pem found for envelope: "+JSON.stringify(H));let J=q[H.kid];if(H.alg==="ES256")O=wm9.joseToDer(O,"ES256").toString("base64");if(!await w.verify(J,$,O))throw Error("Invalid token signature: "+A);if(!j.iat)throw Error("No issue time in token: "+JSON.stringify(j));if(!j.exp)throw Error("No expiration time in token: "+JSON.stringify(j));let D=Number(j.iat);if(isNaN(D))throw Error("iat field using invalid format");let X=Number(j.exp);if(isNaN(X))throw Error("exp field using invalid format");let P=new Date().getTime()/1000;if(X>=P+z)throw Error("Expiration time too far in future: "+JSON.stringify(j));let W=D-PT.CLOCK_SKEW_SECS_,Z=X+PT.CLOCK_SKEW_SECS_;if(PZ)throw Error("Token used too late, "+P+" > "+Z+": "+JSON.stringify(j));if(Y&&Y.indexOf(j.iss)<0)throw Error("Invalid issuer, expected one of ["+Y+"], but got "+j.iss);if(typeof K<"u"&&K!==null){let G=j.aud,f=!1;if(K.constructor===Array)f=K.indexOf(G)>-1;else f=G===K;if(!f)throw Error("Wrong recipient, payload audience != requiredAudience")}return new $m9.LoginTicket(H,j)}async processAndValidateRefreshHandler(){if(this.refreshHandler){let A=await this.refreshHandler();if(!A.access_token)throw Error("No access token is returned by the refreshHandler callback.");return A}return}isTokenExpiring(){let A=this.credentials.expiry_date;return A?A<=new Date().getTime()+this.eagerRefreshThresholdMillis:!1}}i14.OAuth2Client=PT;PT.GOOGLE_TOKEN_INFO_URL="https://oauth2.googleapis.com/tokeninfo";PT.CLOCK_SKEW_SECS_=300;PT.DEFAULT_MAX_TOKEN_LIFETIME_SECS_=86400});var hT8=C((a14)=>{Object.defineProperty(a14,"__esModule",{value:!0});a14.Compute=void 0;var Jm9=ib(),r14=hU6(),Mm9=PY6();class o14 extends Mm9.OAuth2Client{constructor(A={}){super(A);this.credentials={expiry_date:1,refresh_token:"compute-placeholder"},this.serviceAccountEmail=A.serviceAccountEmail||"default",this.scopes=Array.isArray(A.scopes)?A.scopes:A.scopes?[A.scopes]:[]}async refreshTokenNoCache(A){let q=`service-accounts/${this.serviceAccountEmail}/token`,K;try{let z={property:q};if(this.scopes.length>0)z.params={scopes:this.scopes.join(",")};K=await r14.instance(z)}catch(z){if(z instanceof Jm9.GaxiosError)z.message=`Could not refresh access token: ${z.message}`,this.wrapError(z);throw z}let Y=K;if(K&&K.expires_in)Y.expiry_date=new Date().getTime()+K.expires_in*1000,delete Y.expires_in;return this.emit("tokens",Y),{tokens:Y,res:null}}async fetchIdToken(A){let q=`service-accounts/${this.serviceAccountEmail}/identity?format=full&audience=${A}`,K;try{let Y={property:q};K=await r14.instance(Y)}catch(Y){if(Y instanceof Error)Y.message=`Could not fetch ID token: ${Y.message}`;throw Y}return K}wrapError(A){let q=A.response;if(q&&q.status){if(A.status=q.status,q.status===403)A.message="A Forbidden error was returned while attempting to retrieve an access token for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have the correct permission scopes specified: "+A.message;else if(q.status===404)A.message="A Not Found error was returned while attempting to retrieve an accesstoken for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have any permission scopes specified: "+A.message}}}a14.Compute=o14});var IT8=C((e14)=>{Object.defineProperty(e14,"__esModule",{value:!0});e14.IdTokenClient=void 0;var Dm9=PY6();class t14 extends Dm9.OAuth2Client{constructor(A){super(A);this.targetAudience=A.targetAudience,this.idTokenProvider=A.idTokenProvider}async getRequestMetadataAsync(A){if(!this.credentials.id_token||!this.credentials.expiry_date||this.isTokenExpiring()){let K=await this.idTokenProvider.fetchIdToken(this.targetAudience);this.credentials={id_token:K,expiry_date:this.getIdTokenExpiryDate(K)}}return{headers:{Authorization:"Bearer "+this.credentials.id_token}}}getIdTokenExpiryDate(A){let q=A.split(".")[1];if(q)return JSON.parse(Buffer.from(q,"base64").toString("ascii")).exp*1000}}e14.IdTokenClient=t14});var bT8=C((K84)=>{Object.defineProperty(K84,"__esModule",{value:!0});K84.GCPEnv=void 0;K84.clear=Xm9;K84.getEnv=Pm9;var q84=hU6(),gl;(function(A){A.APP_ENGINE="APP_ENGINE",A.KUBERNETES_ENGINE="KUBERNETES_ENGINE",A.CLOUD_FUNCTIONS="CLOUD_FUNCTIONS",A.COMPUTE_ENGINE="COMPUTE_ENGINE",A.CLOUD_RUN="CLOUD_RUN",A.NONE="NONE"})(gl||(K84.GCPEnv=gl={}));var uU6;function Xm9(){uU6=void 0}async function Pm9(){if(uU6)return uU6;return uU6=Wm9(),uU6}async function Wm9(){let A=gl.NONE;if(Zm9())A=gl.APP_ENGINE;else if(Gm9())A=gl.CLOUD_FUNCTIONS;else if(await Vm9())if(await Tm9())A=gl.KUBERNETES_ENGINE;else if(fm9())A=gl.CLOUD_RUN;else A=gl.COMPUTE_ENGINE;else A=gl.NONE;return A}function Zm9(){return!!(process.env.GAE_SERVICE||process.env.GAE_MODULE_NAME)}function Gm9(){return!!(process.env.FUNCTION_NAME||process.env.FUNCTION_TARGET)}function fm9(){return!!process.env.K_CONFIGURATION}async function Tm9(){try{return await q84.instance("attributes/cluster-name"),!0}catch(A){return!1}}async function Vm9(){return q84.isAvailable()}});var xT8=C((e7_,z84)=>{var JP1=ag().Buffer,km9=g6("stream"),Em9=g6("util");function MP1(A){if(this.buffer=null,this.writable=!0,this.readable=!0,!A)return this.buffer=JP1.alloc(0),this;if(typeof A.pipe==="function")return this.buffer=JP1.alloc(0),A.pipe(this),this;if(A.length||typeof A==="object")return this.buffer=A,this.writable=!1,process.nextTick(function(){this.emit("end",A),this.readable=!1,this.emit("close")}.bind(this)),this;throw TypeError("Unexpected data type ("+typeof A+")")}Em9.inherits(MP1,km9);MP1.prototype.write=function(q){this.buffer=JP1.concat([this.buffer,JP1.from(q)]),this.emit("data",q)};MP1.prototype.end=function(q){if(q)this.write(q);this.emit("end",q),this.emit("close"),this.writable=!1,this.readable=!1};z84.exports=MP1});var gT8=C((A4_,D84)=>{var BZ6=ag().Buffer,ES=g6("crypto"),_84=eD1(),w84=g6("util"),Lm9=`"%s" is not a valid algorithm. Supported algorithms are: "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,BU6="secret must be a string or buffer",uZ6="key must be a string or a buffer",ym9="key must be a string, a buffer or an object",BT8=typeof ES.createPublicKey==="function";if(BT8)uZ6+=" or a KeyObject",BU6+="or a KeyObject";function $84(A){if(BZ6.isBuffer(A))return;if(typeof A==="string")return;if(!BT8)throw ob(uZ6);if(typeof A!=="object")throw ob(uZ6);if(typeof A.type!=="string")throw ob(uZ6);if(typeof A.asymmetricKeyType!=="string")throw ob(uZ6);if(typeof A.export!=="function")throw ob(uZ6)}function O84(A){if(BZ6.isBuffer(A))return;if(typeof A==="string")return;if(typeof A==="object")return;throw ob(ym9)}function Rm9(A){if(BZ6.isBuffer(A))return;if(typeof A==="string")return A;if(!BT8)throw ob(BU6);if(typeof A!=="object")throw ob(BU6);if(A.type!=="secret")throw ob(BU6);if(typeof A.export!=="function")throw ob(BU6)}function mT8(A){return A.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function H84(A){A=A.toString();var q=4-A.length%4;if(q!==4)for(var K=0;K{var gm9=g6("buffer").Buffer;X84.exports=function(q){if(typeof q==="string")return q;if(typeof q==="number"||gm9.isBuffer(q))return q.toString();return JSON.stringify(q)}});var T84=C((K4_,f84)=>{var Fm9=ag().Buffer,P84=xT8(),Qm9=gT8(),Um9=g6("stream"),W84=FT8(),QT8=g6("util");function Z84(A,q){return Fm9.from(A,q).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function pm9(A,q,K){K=K||"utf8";var Y=Z84(W84(A),"binary"),z=Z84(W84(q),K);return QT8.format("%s.%s",Y,z)}function G84(A){var{header:q,payload:K}=A,Y=A.secret||A.privateKey,z=A.encoding,w=Qm9(q.alg),_=pm9(q,K,z),$=w.sign(_,Y);return QT8.format("%s.%s",_,$)}function DP1(A){var q=A.secret||A.privateKey||A.key,K=new P84(q);this.readable=!0,this.header=A.header,this.encoding=A.encoding,this.secret=this.privateKey=this.key=K,this.payload=new P84(A.payload),this.secret.once("close",function(){if(!this.payload.writable&&this.readable)this.sign()}.bind(this)),this.payload.once("close",function(){if(!this.secret.writable&&this.readable)this.sign()}.bind(this))}QT8.inherits(DP1,Um9);DP1.prototype.sign=function(){try{var q=G84({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",q),this.emit("data",q),this.emit("end"),this.readable=!1,q}catch(K){this.readable=!1,this.emit("error",K),this.emit("close")}};DP1.sign=G84;f84.exports=DP1});var C84=C((Y4_,S84)=>{var N84=ag().Buffer,V84=xT8(),dm9=gT8(),cm9=g6("stream"),v84=FT8(),lm9=g6("util"),im9=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function nm9(A){return Object.prototype.toString.call(A)==="[object Object]"}function rm9(A){if(nm9(A))return A;try{return JSON.parse(A)}catch(q){return}}function k84(A){var q=A.split(".",1)[0];return rm9(N84.from(q,"base64").toString("binary"))}function om9(A){return A.split(".",2).join(".")}function E84(A){return A.split(".")[2]}function am9(A,q){q=q||"utf8";var K=A.split(".")[1];return N84.from(K,"base64").toString(q)}function L84(A){return im9.test(A)&&!!k84(A)}function y84(A,q,K){if(!q){var Y=Error("Missing algorithm parameter for jws.verify");throw Y.code="MISSING_ALGORITHM",Y}A=v84(A);var z=E84(A),w=om9(A),_=dm9(q);return _.verify(w,z,K)}function R84(A,q){if(q=q||{},A=v84(A),!L84(A))return null;var K=k84(A);if(!K)return null;var Y=am9(A);if(K.typ==="JWT"||q.json)Y=JSON.parse(Y,q.encoding);return{header:K,payload:Y,signature:E84(A)}}function mZ6(A){A=A||{};var q=A.secret||A.publicKey||A.key,K=new V84(q);this.readable=!0,this.algorithm=A.algorithm,this.encoding=A.encoding,this.secret=this.publicKey=this.key=K,this.signature=new V84(A.signature),this.secret.once("close",function(){if(!this.signature.writable&&this.readable)this.verify()}.bind(this)),this.signature.once("close",function(){if(!this.secret.writable&&this.readable)this.verify()}.bind(this))}lm9.inherits(mZ6,cm9);mZ6.prototype.verify=function(){try{var q=y84(this.signature.buffer,this.algorithm,this.key.buffer),K=R84(this.signature.buffer,this.encoding);return this.emit("done",q,K),this.emit("data",q),this.emit("end"),this.readable=!1,q}catch(Y){this.readable=!1,this.emit("error",Y),this.emit("close")}};mZ6.decode=R84;mZ6.isValid=L84;mZ6.verify=y84;S84.exports=mZ6});var UT8=C((tm9)=>{var h84=T84(),XP1=C84(),sm9=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];tm9.ALGORITHMS=sm9;tm9.sign=h84.sign;tm9.verify=XP1.verify;tm9.decode=XP1.decode;tm9.isValid=XP1.isValid;tm9.createSign=function(q){return new h84(q)};tm9.createVerify=function(q){return new XP1(q)}});var Q84=C((M66)=>{var ab=M66&&M66.__classPrivateFieldGet||function(A,q,K,Y){if(K==="a"&&!Y)throw TypeError("Private accessor was defined without a getter");if(typeof q==="function"?A!==q||!Y:!q.has(A))throw TypeError("Cannot read private member from an object whose class did not declare it");return K==="m"?Y:K==="a"?Y.call(A):Y?Y.value:q.get(A)},I84=M66&&M66.__classPrivateFieldSet||function(A,q,K,Y,z){if(Y==="m")throw TypeError("Private method is not writable");if(Y==="a"&&!z)throw TypeError("Private accessor was defined without a setter");if(typeof q==="function"?A!==q||!z:!q.has(A))throw TypeError("Cannot write private member to an object whose class did not declare it");return Y==="a"?z.call(A,K):z?z.value=K:q.set(A,K),K},sb,gZ6,pT8,b84,x84,dT8,cT8,u84;Object.defineProperty(M66,"__esModule",{value:!0});M66.GoogleToken=void 0;var B84=g6("fs"),_g9=ib(),$g9=UT8(),Og9=g6("path"),Hg9=g6("util"),m84=B84.readFile?(0,Hg9.promisify)(B84.readFile):async()=>{throw new FZ6("use key rather than keyFile.","MISSING_CREDENTIALS")},g84="https://www.googleapis.com/oauth2/v4/token",jg9="https://accounts.google.com/o/oauth2/revoke?token=";class FZ6 extends Error{constructor(A,q){super(A);this.code=q}}class F84{get accessToken(){return this.rawToken?this.rawToken.access_token:void 0}get idToken(){return this.rawToken?this.rawToken.id_token:void 0}get tokenType(){return this.rawToken?this.rawToken.token_type:void 0}get refreshToken(){return this.rawToken?this.rawToken.refresh_token:void 0}constructor(A){sb.add(this),this.transporter={request:(q)=>(0,_g9.request)(q)},gZ6.set(this,void 0),ab(this,sb,"m",cT8).call(this,A)}hasExpired(){let A=new Date().getTime();if(this.rawToken&&this.expiresAt)return A>=this.expiresAt;else return!0}isTokenExpiring(){var A;let q=new Date().getTime(),K=(A=this.eagerRefreshThresholdMillis)!==null&&A!==void 0?A:0;if(this.rawToken&&this.expiresAt)return this.expiresAt<=q+K;else return!0}getToken(A,q={}){if(typeof A==="object")q=A,A=void 0;if(q=Object.assign({forceRefresh:!1},q),A){let K=A;ab(this,sb,"m",pT8).call(this,q).then((Y)=>K(null,Y),A);return}return ab(this,sb,"m",pT8).call(this,q)}async getCredentials(A){switch(Og9.extname(A)){case".json":{let K=await m84(A,"utf8"),Y=JSON.parse(K),z=Y.private_key,w=Y.client_email;if(!z||!w)throw new FZ6("private_key and client_email are required.","MISSING_CREDENTIALS");return{privateKey:z,clientEmail:w}}case".der":case".crt":case".pem":return{privateKey:await m84(A,"utf8")};case".p12":case".pfx":throw new FZ6("*.p12 certificates are not supported after v6.1.2. Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.","UNKNOWN_CERTIFICATE_TYPE");default:throw new FZ6("Unknown certificate type. Type is determined based on file extension. Current supported extensions are *.json, and *.pem.","UNKNOWN_CERTIFICATE_TYPE")}}revokeToken(A){if(A){ab(this,sb,"m",dT8).call(this).then(()=>A(),A);return}return ab(this,sb,"m",dT8).call(this)}}M66.GoogleToken=F84;gZ6=new WeakMap,sb=new WeakSet,pT8=async function(q){if(ab(this,gZ6,"f")&&!q.forceRefresh)return ab(this,gZ6,"f");try{return await I84(this,gZ6,ab(this,sb,"m",b84).call(this,q),"f")}finally{I84(this,gZ6,void 0,"f")}},b84=async function(q){if(this.isTokenExpiring()===!1&&q.forceRefresh===!1)return Promise.resolve(this.rawToken);if(!this.key&&!this.keyFile)throw Error("No key or keyFile set.");if(!this.key&&this.keyFile){let K=await this.getCredentials(this.keyFile);if(this.key=K.privateKey,this.iss=K.clientEmail||this.iss,!K.clientEmail)ab(this,sb,"m",x84).call(this)}return ab(this,sb,"m",u84).call(this)},x84=function(){if(!this.iss)throw new FZ6("email is required.","MISSING_CREDENTIALS")},dT8=async function(){if(!this.accessToken)throw Error("No token to revoke.");let q=jg9+this.accessToken;await this.transporter.request({url:q,retry:!0}),ab(this,sb,"m",cT8).call(this,{email:this.iss,sub:this.sub,key:this.key,keyFile:this.keyFile,scope:this.scope,additionalClaims:this.additionalClaims})},cT8=function(q={}){if(this.keyFile=q.keyFile,this.key=q.key,this.rawToken=void 0,this.iss=q.email||q.iss,this.sub=q.sub,this.additionalClaims=q.additionalClaims,typeof q.scope==="object")this.scope=q.scope.join(" ");else this.scope=q.scope;if(this.eagerRefreshThresholdMillis=q.eagerRefreshThresholdMillis,q.transporter)this.transporter=q.transporter},u84=async function(){var q,K;let Y=Math.floor(new Date().getTime()/1000),z=this.additionalClaims||{},w=Object.assign({iss:this.iss,scope:this.scope,aud:g84,exp:Y+3600,iat:Y,sub:this.sub},z),_=$g9.sign({header:{alg:"RS256"},payload:w,secret:this.key});try{let $=await this.transporter.request({method:"POST",url:g84,data:{grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:_},headers:{"Content-Type":"application/x-www-form-urlencoded"},responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});return this.rawToken=$.data,this.expiresAt=$.data.expires_in===null||$.data.expires_in===void 0?void 0:(Y+$.data.expires_in)*1000,this.rawToken}catch($){this.rawToken=void 0,this.tokenExpires=void 0;let O=$.response&&((q=$.response)===null||q===void 0?void 0:q.data)?(K=$.response)===null||K===void 0?void 0:K.data:{};if(O.error){let H=O.error_description?`: ${O.error_description}`:"";$.message=`${O.error}${H}`}throw $}}});var iT8=C((p84)=>{Object.defineProperty(p84,"__esModule",{value:!0});p84.JWTAccess=void 0;var Jg9=UT8(),Mg9=J66(),U84={alg:"RS256",typ:"JWT"};class lT8{constructor(A,q,K,Y){this.cache=new Mg9.LRUCache({capacity:500,maxAge:3600000}),this.email=A,this.key=q,this.keyId=K,this.eagerRefreshThresholdMillis=Y!==null&&Y!==void 0?Y:300000}getCachedKey(A,q){let K=A;if(q&&Array.isArray(q)&&q.length)K=A?`${A}_${q.join("_")}`:`${q.join("_")}`;else if(typeof q==="string")K=A?`${A}_${q}`:q;if(!K)throw Error("Scopes or url must be provided");return K}getRequestHeaders(A,q,K){let Y=this.getCachedKey(A,K),z=this.cache.get(Y),w=Date.now();if(z&&z.expiration-w>this.eagerRefreshThresholdMillis)return z.headers;let _=Math.floor(Date.now()/1000),$=lT8.getExpirationTime(_),O;if(Array.isArray(K))K=K.join(" ");if(K)O={iss:this.email,sub:this.email,scope:K,exp:$,iat:_};else O={iss:this.email,sub:this.email,aud:A,exp:$,iat:_};if(q){for(let D in O)if(q[D])throw Error(`The '${D}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`)}let H=this.keyId?{...U84,kid:this.keyId}:U84,j=Object.assign(O,q),M={Authorization:`Bearer ${Jg9.sign({header:H,payload:j,secret:this.key})}`};return this.cache.set(Y,{expiration:$*1000,headers:M}),M}static getExpirationTime(A){return A+3600}fromJSON(A){if(!A)throw Error("Must pass in a JSON object containing the service account auth settings.");if(!A.client_email)throw Error("The incoming JSON object does not contain a client_email field");if(!A.private_key)throw Error("The incoming JSON object does not contain a private_key field");this.email=A.client_email,this.key=A.private_key,this.keyId=A.private_key_id,this.projectId=A.project_id}fromStream(A,q){if(q)this.fromStreamAsync(A).then(()=>q(),q);else return this.fromStreamAsync(A)}fromStreamAsync(A){return new Promise((q,K)=>{if(!A)K(Error("Must pass in a stream containing the service account auth settings."));let Y="";A.setEncoding("utf8").on("data",(z)=>Y+=z).on("error",K).on("end",()=>{try{let z=JSON.parse(Y);this.fromJSON(z),q()}catch(z){K(z)}})})}}p84.JWTAccess=lT8});var rT8=C((l84)=>{Object.defineProperty(l84,"__esModule",{value:!0});l84.JWT=void 0;var c84=Q84(),Dg9=iT8(),Xg9=PY6(),PP1=zF();class nT8 extends Xg9.OAuth2Client{constructor(A,q,K,Y,z,w){let _=A&&typeof A==="object"?A:{email:A,keyFile:q,key:K,keyId:w,scopes:Y,subject:z};super(_);this.email=_.email,this.keyFile=_.keyFile,this.key=_.key,this.keyId=_.keyId,this.scopes=_.scopes,this.subject=_.subject,this.additionalClaims=_.additionalClaims,this.credentials={refresh_token:"jwt-placeholder",expiry_date:1}}createScoped(A){let q=new nT8(this);return q.scopes=A,q}async getRequestMetadataAsync(A){A=this.defaultServicePath?`https://${this.defaultServicePath}/`:A;let q=!this.hasUserScopes()&&A||this.useJWTAccessWithScope&&this.hasAnyScopes()||this.universeDomain!==PP1.DEFAULT_UNIVERSE;if(this.subject&&this.universeDomain!==PP1.DEFAULT_UNIVERSE)throw RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${PP1.DEFAULT_UNIVERSE}`);if(!this.apiKey&&q)if(this.additionalClaims&&this.additionalClaims.target_audience){let{tokens:K}=await this.refreshToken();return{headers:this.addSharedMetadataHeaders({Authorization:`Bearer ${K.id_token}`})}}else{if(!this.access)this.access=new Dg9.JWTAccess(this.email,this.key,this.keyId,this.eagerRefreshThresholdMillis);let K;if(this.hasUserScopes())K=this.scopes;else if(!A)K=this.defaultScopes;let Y=this.useJWTAccessWithScope||this.universeDomain!==PP1.DEFAULT_UNIVERSE,z=await this.access.getRequestHeaders(A!==null&&A!==void 0?A:void 0,this.additionalClaims,Y?K:void 0);return{headers:this.addSharedMetadataHeaders(z)}}else if(this.hasAnyScopes()||this.apiKey)return super.getRequestMetadataAsync(A);else return{headers:{}}}async fetchIdToken(A){let q=new c84.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:{target_audience:A},transporter:this.transporter});if(await q.getToken({forceRefresh:!0}),!q.idToken)throw Error("Unknown error: Failed to fetch ID token");return q.idToken}hasUserScopes(){if(!this.scopes)return!1;return this.scopes.length>0}hasAnyScopes(){if(this.scopes&&this.scopes.length>0)return!0;if(this.defaultScopes&&this.defaultScopes.length>0)return!0;return!1}authorize(A){if(A)this.authorizeAsync().then((q)=>A(null,q),A);else return this.authorizeAsync()}async authorizeAsync(){let A=await this.refreshToken();if(!A)throw Error("No result returned");return this.credentials=A.tokens,this.credentials.refresh_token="jwt-placeholder",this.key=this.gtoken.key,this.email=this.gtoken.iss,A.tokens}async refreshTokenNoCache(A){let q=this.createGToken(),Y={access_token:(await q.getToken({forceRefresh:this.isTokenExpiring()})).access_token,token_type:"Bearer",expiry_date:q.expiresAt,id_token:q.idToken};return this.emit("tokens",Y),{res:null,tokens:Y}}createGToken(){if(!this.gtoken)this.gtoken=new c84.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:this.additionalClaims,transporter:this.transporter});return this.gtoken}fromJSON(A){if(!A)throw Error("Must pass in a JSON object containing the service account auth settings.");if(!A.client_email)throw Error("The incoming JSON object does not contain a client_email field");if(!A.private_key)throw Error("The incoming JSON object does not contain a private_key field");this.email=A.client_email,this.key=A.private_key,this.keyId=A.private_key_id,this.projectId=A.project_id,this.quotaProjectId=A.quota_project_id,this.universeDomain=A.universe_domain||this.universeDomain}fromStream(A,q){if(q)this.fromStreamAsync(A).then(()=>q(),q);else return this.fromStreamAsync(A)}fromStreamAsync(A){return new Promise((q,K)=>{if(!A)throw Error("Must pass in a stream containing the service account auth settings.");let Y="";A.setEncoding("utf8").on("error",K).on("data",(z)=>Y+=z).on("end",()=>{try{let z=JSON.parse(Y);this.fromJSON(z),q()}catch(z){K(z)}})})}fromAPIKey(A){if(typeof A!=="string")throw Error("Must provide an API Key string.");this.apiKey=A}async getCredentials(){if(this.key)return{private_key:this.key,client_email:this.email};else if(this.keyFile){let q=await this.createGToken().getCredentials(this.keyFile);return{private_key:q.privateKey,client_email:q.clientEmail}}throw Error("A key or a keyFile must be provided to getCredentials.")}}l84.JWT=nT8});var oT8=C((n84)=>{Object.defineProperty(n84,"__esModule",{value:!0});n84.UserRefreshClient=n84.USER_REFRESH_ACCOUNT_TYPE=void 0;var Pg9=PY6(),Wg9=g6("querystring");n84.USER_REFRESH_ACCOUNT_TYPE="authorized_user";class WP1 extends Pg9.OAuth2Client{constructor(A,q,K,Y,z){let w=A&&typeof A==="object"?A:{clientId:A,clientSecret:q,refreshToken:K,eagerRefreshThresholdMillis:Y,forceRefreshOnFailure:z};super(w);this._refreshToken=w.refreshToken,this.credentials.refresh_token=w.refreshToken}async refreshTokenNoCache(A){return super.refreshTokenNoCache(this._refreshToken)}async fetchIdToken(A){return(await this.transporter.request({...WP1.RETRY_CONFIG,url:this.endpoints.oauth2TokenUrl,headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"POST",data:(0,Wg9.stringify)({client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token",refresh_token:this._refreshToken,target_audience:A})})).data.id_token}fromJSON(A){if(!A)throw Error("Must pass in a JSON object containing the user refresh token");if(A.type!=="authorized_user")throw Error('The incoming JSON object does not have the "authorized_user" type');if(!A.client_id)throw Error("The incoming JSON object does not contain a client_id field");if(!A.client_secret)throw Error("The incoming JSON object does not contain a client_secret field");if(!A.refresh_token)throw Error("The incoming JSON object does not contain a refresh_token field");this._clientId=A.client_id,this._clientSecret=A.client_secret,this._refreshToken=A.refresh_token,this.credentials.refresh_token=A.refresh_token,this.quotaProjectId=A.quota_project_id,this.universeDomain=A.universe_domain||this.universeDomain}fromStream(A,q){if(q)this.fromStreamAsync(A).then(()=>q(),q);else return this.fromStreamAsync(A)}async fromStreamAsync(A){return new Promise((q,K)=>{if(!A)return K(Error("Must pass in a stream containing the user refresh token."));let Y="";A.setEncoding("utf8").on("error",K).on("data",(z)=>Y+=z).on("end",()=>{try{let z=JSON.parse(Y);return this.fromJSON(z),q()}catch(z){return K(z)}})})}static fromJSON(A){let q=new WP1;return q.fromJSON(A),q}}n84.UserRefreshClient=WP1});var aT8=C((a84)=>{Object.defineProperty(a84,"__esModule",{value:!0});a84.Impersonated=a84.IMPERSONATED_ACCOUNT_TYPE=void 0;var o84=PY6(),Gg9=ib(),fg9=J66();a84.IMPERSONATED_ACCOUNT_TYPE="impersonated_service_account";class gU6 extends o84.OAuth2Client{constructor(A={}){var q,K,Y,z,w,_;super(A);if(this.credentials={expiry_date:1,refresh_token:"impersonated-placeholder"},this.sourceClient=(q=A.sourceClient)!==null&&q!==void 0?q:new o84.OAuth2Client,this.targetPrincipal=(K=A.targetPrincipal)!==null&&K!==void 0?K:"",this.delegates=(Y=A.delegates)!==null&&Y!==void 0?Y:[],this.targetScopes=(z=A.targetScopes)!==null&&z!==void 0?z:[],this.lifetime=(w=A.lifetime)!==null&&w!==void 0?w:3600,!(0,fg9.originalOrCamelOptions)(A).get("universe_domain"))this.universeDomain=this.sourceClient.universeDomain;else if(this.sourceClient.universeDomain!==this.universeDomain)throw RangeError(`Universe domain ${this.sourceClient.universeDomain} in source credentials does not match ${this.universeDomain} universe domain set for impersonated credentials.`);this.endpoint=(_=A.endpoint)!==null&&_!==void 0?_:`https://iamcredentials.${this.universeDomain}`}async sign(A){await this.sourceClient.getAccessToken();let q=`projects/-/serviceAccounts/${this.targetPrincipal}`,K=`${this.endpoint}/v1/${q}:signBlob`,Y={delegates:this.delegates,payload:Buffer.from(A).toString("base64")};return(await this.sourceClient.request({...gU6.RETRY_CONFIG,url:K,data:Y,method:"POST"})).data}getTargetPrincipal(){return this.targetPrincipal}async refreshToken(){var A,q,K,Y,z,w;try{await this.sourceClient.getAccessToken();let _="projects/-/serviceAccounts/"+this.targetPrincipal,$=`${this.endpoint}/v1/${_}:generateAccessToken`,O={delegates:this.delegates,scope:this.targetScopes,lifetime:this.lifetime+"s"},H=await this.sourceClient.request({...gU6.RETRY_CONFIG,url:$,data:O,method:"POST"}),j=H.data;return this.credentials.access_token=j.accessToken,this.credentials.expiry_date=Date.parse(j.expireTime),{tokens:this.credentials,res:H}}catch(_){if(!(_ instanceof Error))throw _;let $=0,O="";if(_ instanceof Gg9.GaxiosError)$=(K=(q=(A=_===null||_===void 0?void 0:_.response)===null||A===void 0?void 0:A.data)===null||q===void 0?void 0:q.error)===null||K===void 0?void 0:K.status,O=(w=(z=(Y=_===null||_===void 0?void 0:_.response)===null||Y===void 0?void 0:Y.data)===null||z===void 0?void 0:z.error)===null||w===void 0?void 0:w.message;if($&&O)throw _.message=`${$}: unable to impersonate: ${O}`,_;else throw _.message=`unable to impersonate: ${_}`,_}}async fetchIdToken(A,q){var K,Y;await this.sourceClient.getAccessToken();let z=`projects/-/serviceAccounts/${this.targetPrincipal}`,w=`${this.endpoint}/v1/${z}:generateIdToken`,_={delegates:this.delegates,audience:A,includeEmail:(K=q===null||q===void 0?void 0:q.includeEmail)!==null&&K!==void 0?K:!0,useEmailAzp:(Y=q===null||q===void 0?void 0:q.includeEmail)!==null&&Y!==void 0?Y:!0};return(await this.sourceClient.request({...gU6.RETRY_CONFIG,url:w,data:_,method:"POST"})).data.token}}a84.Impersonated=gU6});var sT8=C((AA4)=>{Object.defineProperty(AA4,"__esModule",{value:!0});AA4.OAuthClientAuthHandler=void 0;AA4.getErrorFromOAuthErrorResponse=vg9;var t84=g6("querystring"),Vg9=IZ6(),Ng9=["PUT","POST","PATCH"];class e84{constructor(A){this.clientAuthentication=A,this.crypto=(0,Vg9.createCrypto)()}applyClientAuthenticationOptions(A,q){if(this.injectAuthenticatedHeaders(A,q),!q)this.injectAuthenticatedRequestBody(A)}injectAuthenticatedHeaders(A,q){var K;if(q)A.headers=A.headers||{},Object.assign(A.headers,{Authorization:`Bearer ${q}}`});else if(((K=this.clientAuthentication)===null||K===void 0?void 0:K.confidentialClientType)==="basic"){A.headers=A.headers||{};let Y=this.clientAuthentication.clientId,z=this.clientAuthentication.clientSecret||"",w=this.crypto.encodeBase64StringUtf8(`${Y}:${z}`);Object.assign(A.headers,{Authorization:`Basic ${w}`})}}injectAuthenticatedRequestBody(A){var q;if(((q=this.clientAuthentication)===null||q===void 0?void 0:q.confidentialClientType)==="request-body"){let K=(A.method||"GET").toUpperCase();if(Ng9.indexOf(K)!==-1){let Y,z=A.headers||{};for(let w in z)if(w.toLowerCase()==="content-type"&&z[w]){Y=z[w].toLowerCase();break}if(Y==="application/x-www-form-urlencoded"){A.data=A.data||"";let w=t84.parse(A.data);Object.assign(w,{client_id:this.clientAuthentication.clientId,client_secret:this.clientAuthentication.clientSecret||""}),A.data=t84.stringify(w)}else if(Y==="application/json")A.data=A.data||{},Object.assign(A.data,{client_id:this.clientAuthentication.clientId,client_secret:this.clientAuthentication.clientSecret||""});else throw Error(`${Y} content-types are not supported with ${this.clientAuthentication.confidentialClientType} client authentication`)}else throw Error(`${K} HTTP method does not support ${this.clientAuthentication.confidentialClientType} client authentication`)}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}}AA4.OAuthClientAuthHandler=e84;function vg9(A,q){let{error:K,error_description:Y,error_uri:z}=A,w=`Error code ${K}`;if(typeof Y<"u")w+=`: ${Y}`;if(typeof z<"u")w+=` - ${z}`;let _=Error(w);if(q){let $=Object.keys(q);if(q.stack)$.push("stack");$.forEach((O)=>{if(O!=="message")Object.defineProperty(_,O,{value:q[O],writable:!1,enumerable:!0})})}return _}});var eT8=C((YA4)=>{Object.defineProperty(YA4,"__esModule",{value:!0});YA4.StsCredentials=void 0;var Eg9=ib(),Lg9=g6("querystring"),yg9=bU6(),KA4=sT8();class tT8 extends KA4.OAuthClientAuthHandler{constructor(A,q){super(q);this.tokenExchangeEndpoint=A,this.transporter=new yg9.DefaultTransporter}async exchangeToken(A,q,K){var Y,z,w;let _={grant_type:A.grantType,resource:A.resource,audience:A.audience,scope:(Y=A.scope)===null||Y===void 0?void 0:Y.join(" "),requested_token_type:A.requestedTokenType,subject_token:A.subjectToken,subject_token_type:A.subjectTokenType,actor_token:(z=A.actingParty)===null||z===void 0?void 0:z.actorToken,actor_token_type:(w=A.actingParty)===null||w===void 0?void 0:w.actorTokenType,options:K&&JSON.stringify(K)};Object.keys(_).forEach((H)=>{if(typeof _[H]>"u")delete _[H]});let $={"Content-Type":"application/x-www-form-urlencoded"};Object.assign($,q||{});let O={...tT8.RETRY_CONFIG,url:this.tokenExchangeEndpoint.toString(),method:"POST",headers:$,data:Lg9.stringify(_),responseType:"json"};this.applyClientAuthenticationOptions(O);try{let H=await this.transporter.request(O),j=H.data;return j.res=H,j}catch(H){if(H instanceof Eg9.GaxiosError&&H.response)throw(0,KA4.getErrorFromOAuthErrorResponse)(H.response.data,H);throw H}}}YA4.StsCredentials=tT8});var D66=C((JP)=>{var AV8=JP&&JP.__classPrivateFieldGet||function(A,q,K,Y){if(K==="a"&&!Y)throw TypeError("Private accessor was defined without a getter");if(typeof q==="function"?A!==q||!Y:!q.has(A))throw TypeError("Cannot read private member from an object whose class did not declare it");return K==="m"?Y:K==="a"?Y.call(A):Y?Y.value:q.get(A)},wA4=JP&&JP.__classPrivateFieldSet||function(A,q,K,Y,z){if(Y==="m")throw TypeError("Private method is not writable");if(Y==="a"&&!z)throw TypeError("Private accessor was defined without a setter");if(typeof q==="function"?A!==q||!z:!q.has(A))throw TypeError("Cannot write private member to an object whose class did not declare it");return Y==="a"?z.call(A,K):z?z.value=K:q.set(A,K),K},qV8,QZ6,$A4;Object.defineProperty(JP,"__esModule",{value:!0});JP.BaseExternalAccountClient=JP.DEFAULT_UNIVERSE=JP.CLOUD_RESOURCE_MANAGER=JP.EXTERNAL_ACCOUNT_TYPE=JP.EXPIRATION_TIME_OFFSET=void 0;var Rg9=g6("stream"),Sg9=zF(),Cg9=eT8(),_A4=J66(),hg9="urn:ietf:params:oauth:grant-type:token-exchange",Ig9="urn:ietf:params:oauth:token-type:access_token",KV8="https://www.googleapis.com/auth/cloud-platform",bg9=3600;JP.EXPIRATION_TIME_OFFSET=300000;JP.EXTERNAL_ACCOUNT_TYPE="external_account";JP.CLOUD_RESOURCE_MANAGER="https://cloudresourcemanager.googleapis.com/v1/projects/";var xg9="//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+",ug9="https://sts.{universeDomain}/v1/token",Bg9=kT8(),mg9=zF();Object.defineProperty(JP,"DEFAULT_UNIVERSE",{enumerable:!0,get:function(){return mg9.DEFAULT_UNIVERSE}});class ZP1 extends Sg9.AuthClient{constructor(A,q){var K;super({...A,...q});qV8.add(this),QZ6.set(this,null);let Y=(0,_A4.originalOrCamelOptions)(A),z=Y.get("type");if(z&&z!==JP.EXTERNAL_ACCOUNT_TYPE)throw Error(`Expected "${JP.EXTERNAL_ACCOUNT_TYPE}" type but received "${A.type}"`);let w=Y.get("client_id"),_=Y.get("client_secret"),$=(K=Y.get("token_url"))!==null&&K!==void 0?K:ug9.replace("{universeDomain}",this.universeDomain),O=Y.get("subject_token_type"),H=Y.get("workforce_pool_user_project"),j=Y.get("service_account_impersonation_url"),J=Y.get("service_account_impersonation"),M=(0,_A4.originalOrCamelOptions)(J).get("token_lifetime_seconds");if(this.cloudResourceManagerURL=new URL(Y.get("cloud_resource_manager_url")||`https://cloudresourcemanager.${this.universeDomain}/v1/projects/`),w)this.clientAuth={confidentialClientType:"basic",clientId:w,clientSecret:_};this.stsCredential=new Cg9.StsCredentials($,this.clientAuth),this.scopes=Y.get("scopes")||[KV8],this.cachedAccessToken=null,this.audience=Y.get("audience"),this.subjectTokenType=O,this.workforcePoolUserProject=H;let D=new RegExp(xg9);if(this.workforcePoolUserProject&&!this.audience.match(D))throw Error("workforcePoolUserProject should not be set for non-workforce pool credentials.");if(this.serviceAccountImpersonationUrl=j,this.serviceAccountImpersonationLifetime=M,this.serviceAccountImpersonationLifetime)this.configLifetimeRequested=!0;else this.configLifetimeRequested=!1,this.serviceAccountImpersonationLifetime=bg9;this.projectNumber=this.getProjectNumber(this.audience),this.supplierContext={audience:this.audience,subjectTokenType:this.subjectTokenType,transporter:this.transporter}}getServiceAccountEmail(){var A;if(this.serviceAccountImpersonationUrl){if(this.serviceAccountImpersonationUrl.length>256)throw RangeError(`URL is too long: ${this.serviceAccountImpersonationUrl}`);let K=/serviceAccounts\/(?[^:]+):generateAccessToken$/.exec(this.serviceAccountImpersonationUrl);return((A=K===null||K===void 0?void 0:K.groups)===null||A===void 0?void 0:A.email)||null}return null}setCredentials(A){super.setCredentials(A),this.cachedAccessToken=A}async getAccessToken(){if(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))await this.refreshAccessTokenAsync();return{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let q={Authorization:`Bearer ${(await this.getAccessToken()).token}`};return this.addSharedMetadataHeaders(q)}request(A,q){if(q)this.requestAsync(A).then((K)=>q(null,K),(K)=>{return q(K,K.response)});else return this.requestAsync(A)}async getProjectId(){let A=this.projectNumber||this.workforcePoolUserProject;if(this.projectId)return this.projectId;else if(A){let q=await this.getRequestHeaders(),K=await this.transporter.request({...ZP1.RETRY_CONFIG,headers:q,url:`${this.cloudResourceManagerURL.toString()}${A}`,responseType:"json"});return this.projectId=K.data.projectId,this.projectId}return null}async requestAsync(A,q=!1){let K;try{let Y=await this.getRequestHeaders();if(A.headers=A.headers||{},Y&&Y["x-goog-user-project"])A.headers["x-goog-user-project"]=Y["x-goog-user-project"];if(Y&&Y.Authorization)A.headers.Authorization=Y.Authorization;K=await this.transporter.request(A)}catch(Y){let z=Y.response;if(z){let w=z.status,_=z.config.data instanceof Rg9.Readable;if(!q&&(w===401||w===403)&&!_&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(A,!0)}throw Y}return K}async refreshAccessTokenAsync(){wA4(this,QZ6,AV8(this,QZ6,"f")||AV8(this,qV8,"m",$A4).call(this),"f");try{return await AV8(this,QZ6,"f")}finally{wA4(this,QZ6,null,"f")}}getProjectNumber(A){let q=A.match(/\/projects\/([^/]+)/);if(!q)return null;return q[1]}async getImpersonatedAccessToken(A){let q={...ZP1.RETRY_CONFIG,url:this.serviceAccountImpersonationUrl,method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${A}`},data:{scope:this.getScopesArray(),lifetime:this.serviceAccountImpersonationLifetime+"s"},responseType:"json"},K=await this.transporter.request(q),Y=K.data;return{access_token:Y.accessToken,expiry_date:new Date(Y.expireTime).getTime(),res:K}}isExpired(A){let q=new Date().getTime();return A.expiry_date?q>=A.expiry_date-this.eagerRefreshThresholdMillis:!1}getScopesArray(){if(typeof this.scopes==="string")return[this.scopes];return this.scopes||[KV8]}getMetricsHeaderValue(){let A=process.version.replace(/^v/,""),q=this.serviceAccountImpersonationUrl!==void 0,K=this.credentialSourceType?this.credentialSourceType:"unknown";return`gl-node/${A} auth/${Bg9.version} google-byoid-sdk source/${K} sa-impersonation/${q} config-lifetime/${this.configLifetimeRequested}`}}JP.BaseExternalAccountClient=ZP1;QZ6=new WeakMap,qV8=new WeakSet,$A4=async function(){let q=await this.retrieveSubjectToken(),K={grantType:hg9,audience:this.audience,requestedTokenType:Ig9,subjectToken:q,subjectTokenType:this.subjectTokenType,scope:this.serviceAccountImpersonationUrl?[KV8]:this.getScopesArray()},Y=!this.clientAuth&&this.workforcePoolUserProject?{userProject:this.workforcePoolUserProject}:void 0,z={"x-goog-api-client":this.getMetricsHeaderValue()},w=await this.stsCredential.exchangeToken(K,z,Y);if(this.serviceAccountImpersonationUrl)this.cachedAccessToken=await this.getImpersonatedAccessToken(w.access_token);else if(w.expires_in)this.cachedAccessToken={access_token:w.access_token,expiry_date:new Date().getTime()+w.expires_in*1000,res:w.res};else this.cachedAccessToken={access_token:w.access_token,res:w.res};return this.credentials={},Object.assign(this.credentials,this.cachedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedAccessToken.expiry_date,access_token:this.cachedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedAccessToken}});var JA4=C((HA4)=>{var YV8,zV8,wV8;Object.defineProperty(HA4,"__esModule",{value:!0});HA4.FileSubjectTokenSupplier=void 0;var _V8=g6("util"),$V8=g6("fs"),gg9=(0,_V8.promisify)((YV8=$V8.readFile)!==null&&YV8!==void 0?YV8:()=>{}),Fg9=(0,_V8.promisify)((zV8=$V8.realpath)!==null&&zV8!==void 0?zV8:()=>{}),Qg9=(0,_V8.promisify)((wV8=$V8.lstat)!==null&&wV8!==void 0?wV8:()=>{});class OA4{constructor(A){this.filePath=A.filePath,this.formatType=A.formatType,this.subjectTokenFieldName=A.subjectTokenFieldName}async getSubjectToken(A){let q=this.filePath;try{if(q=await Fg9(q),!(await Qg9(q)).isFile())throw Error()}catch(z){if(z instanceof Error)z.message=`The file at ${q} does not exist, or it is not a file. ${z.message}`;throw z}let K,Y=await gg9(q,{encoding:"utf8"});if(this.formatType==="text")K=Y;else if(this.formatType==="json"&&this.subjectTokenFieldName)K=JSON.parse(Y)[this.subjectTokenFieldName];if(!K)throw Error("Unable to parse the subject_token from the credential_source file");return K}}HA4.FileSubjectTokenSupplier=OA4});var PA4=C((DA4)=>{Object.defineProperty(DA4,"__esModule",{value:!0});DA4.UrlSubjectTokenSupplier=void 0;class MA4{constructor(A){this.url=A.url,this.formatType=A.formatType,this.subjectTokenFieldName=A.subjectTokenFieldName,this.headers=A.headers,this.additionalGaxiosOptions=A.additionalGaxiosOptions}async getSubjectToken(A){let q={...this.additionalGaxiosOptions,url:this.url,method:"GET",headers:this.headers,responseType:this.formatType},K;if(this.formatType==="text")K=(await A.transporter.request(q)).data;else if(this.formatType==="json"&&this.subjectTokenFieldName)K=(await A.transporter.request(q)).data[this.subjectTokenFieldName];if(!K)throw Error("Unable to parse the subject_token from the credential_source URL");return K}}DA4.UrlSubjectTokenSupplier=MA4});var jV8=C((WA4)=>{Object.defineProperty(WA4,"__esModule",{value:!0});WA4.IdentityPoolClient=void 0;var Ug9=D66(),OV8=J66(),pg9=JA4(),dg9=PA4();class HV8 extends Ug9.BaseExternalAccountClient{constructor(A,q){super(A,q);let K=(0,OV8.originalOrCamelOptions)(A),Y=K.get("credential_source"),z=K.get("subject_token_supplier");if(!Y&&!z)throw Error("A credential source or subject token supplier must be specified.");if(Y&&z)throw Error("Only one of credential source or subject token supplier can be specified.");if(z)this.subjectTokenSupplier=z,this.credentialSourceType="programmatic";else{let w=(0,OV8.originalOrCamelOptions)(Y),_=(0,OV8.originalOrCamelOptions)(w.get("format")),$=_.get("type")||"text",O=_.get("subject_token_field_name");if($!=="json"&&$!=="text")throw Error(`Invalid credential_source format "${$}"`);if($==="json"&&!O)throw Error("Missing subject_token_field_name for JSON credential_source format");let H=w.get("file"),j=w.get("url"),J=w.get("headers");if(H&&j)throw Error('No valid Identity Pool "credential_source" provided, must be either file or url.');else if(H&&!j)this.credentialSourceType="file",this.subjectTokenSupplier=new pg9.FileSubjectTokenSupplier({filePath:H,formatType:$,subjectTokenFieldName:O});else if(!H&&j)this.credentialSourceType="url",this.subjectTokenSupplier=new dg9.UrlSubjectTokenSupplier({url:j,formatType:$,subjectTokenFieldName:O,headers:J,additionalGaxiosOptions:HV8.RETRY_CONFIG});else throw Error('No valid Identity Pool "credential_source" provided, must be either file or url.')}}async retrieveSubjectToken(){return this.subjectTokenSupplier.getSubjectToken(this.supplierContext)}}WA4.IdentityPoolClient=HV8});var JV8=C((VA4)=>{Object.defineProperty(VA4,"__esModule",{value:!0});VA4.AwsRequestSigner=void 0;var fA4=IZ6(),GA4="AWS4-HMAC-SHA256",cg9="aws4_request";class TA4{constructor(A,q){this.getCredentials=A,this.region=q,this.crypto=(0,fA4.createCrypto)()}async getRequestOptions(A){if(!A.url)throw Error('"url" is required in "amzOptions"');let q=typeof A.data==="object"?JSON.stringify(A.data):A.data,K=A.url,Y=A.method||"GET",z=A.body||q,w=A.headers,_=await this.getCredentials(),$=new URL(K),O=await ig9({crypto:this.crypto,host:$.host,canonicalUri:$.pathname,canonicalQuerystring:$.search.substr(1),method:Y,region:this.region,securityCredentials:_,requestPayload:z,additionalAmzHeaders:w}),H=Object.assign(O.amzDate?{"x-amz-date":O.amzDate}:{},{Authorization:O.authorizationHeader,host:$.host},w||{});if(_.token)Object.assign(H,{"x-amz-security-token":_.token});let j={url:K,method:Y,headers:H};if(typeof z<"u")j.body=z;return j}}VA4.AwsRequestSigner=TA4;async function FU6(A,q,K){return await A.signWithHmacSha256(q,K)}async function lg9(A,q,K,Y,z){let w=await FU6(A,`AWS4${q}`,K),_=await FU6(A,w,Y),$=await FU6(A,_,z);return await FU6(A,$,"aws4_request")}async function ig9(A){let q=A.additionalAmzHeaders||{},K=A.requestPayload||"",Y=A.host.split(".")[0],z=new Date,w=z.toISOString().replace(/[-:]/g,"").replace(/\.[0-9]+/,""),_=z.toISOString().replace(/[-]/g,"").replace(/T.*/,""),$={};if(Object.keys(q).forEach((f)=>{$[f.toLowerCase()]=q[f]}),A.securityCredentials.token)$["x-amz-security-token"]=A.securityCredentials.token;let O=Object.assign({host:A.host},$.date?{}:{"x-amz-date":w},$),H="",j=Object.keys(O).sort();j.forEach((f)=>{H+=`${f}:${O[f]} `});let J=j.join(";"),M=await A.crypto.sha256DigestHex(K),D=`${A.method} ${A.canonicalUri} ${A.canonicalQuerystring} ${H} ${J} ${M}`,X=`${_}/${A.region}/${Y}/${cg9}`,P=`${GA4} ${w} ${X} `+await A.crypto.sha256DigestHex(D),W=await lg9(A.crypto,A.securityCredentials.secretAccessKey,_,A.region,Y),Z=await FU6(A.crypto,W,P),G=`${GA4} Credential=${A.securityCredentials.accessKeyId}/${X}, SignedHeaders=${J}, Signature=${(0,fA4.fromArrayBufferToHex)(Z)}`;return{amzDate:$.date?void 0:w,authorizationHeader:G,canonicalQuerystring:A.canonicalQuerystring}}});var LA4=C((UZ6)=>{var Fl=UZ6&&UZ6.__classPrivateFieldGet||function(A,q,K,Y){if(K==="a"&&!Y)throw TypeError("Private accessor was defined without a getter");if(typeof q==="function"?A!==q||!Y:!q.has(A))throw TypeError("Cannot read private member from an object whose class did not declare it");return K==="m"?Y:K==="a"?Y.call(A):Y?Y.value:q.get(A)},tb,MV8,vA4,kA4,GP1,DV8;Object.defineProperty(UZ6,"__esModule",{value:!0});UZ6.DefaultAwsSecurityCredentialsSupplier=void 0;class EA4{constructor(A){tb.add(this),this.regionUrl=A.regionUrl,this.securityCredentialsUrl=A.securityCredentialsUrl,this.imdsV2SessionTokenUrl=A.imdsV2SessionTokenUrl,this.additionalGaxiosOptions=A.additionalGaxiosOptions}async getAwsRegion(A){if(Fl(this,tb,"a",GP1))return Fl(this,tb,"a",GP1);let q={};if(!Fl(this,tb,"a",GP1)&&this.imdsV2SessionTokenUrl)q["x-aws-ec2-metadata-token"]=await Fl(this,tb,"m",MV8).call(this,A.transporter);if(!this.regionUrl)throw Error('Unable to determine AWS region due to missing "options.credential_source.region_url"');let K={...this.additionalGaxiosOptions,url:this.regionUrl,method:"GET",responseType:"text",headers:q},Y=await A.transporter.request(K);return Y.data.substr(0,Y.data.length-1)}async getAwsSecurityCredentials(A){if(Fl(this,tb,"a",DV8))return Fl(this,tb,"a",DV8);let q={};if(this.imdsV2SessionTokenUrl)q["x-aws-ec2-metadata-token"]=await Fl(this,tb,"m",MV8).call(this,A.transporter);let K=await Fl(this,tb,"m",vA4).call(this,q,A.transporter),Y=await Fl(this,tb,"m",kA4).call(this,K,q,A.transporter);return{accessKeyId:Y.AccessKeyId,secretAccessKey:Y.SecretAccessKey,token:Y.Token}}}UZ6.DefaultAwsSecurityCredentialsSupplier=EA4;tb=new WeakSet,MV8=async function(q){let K={...this.additionalGaxiosOptions,url:this.imdsV2SessionTokenUrl,method:"PUT",responseType:"text",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"300"}};return(await q.request(K)).data},vA4=async function(q,K){if(!this.securityCredentialsUrl)throw Error('Unable to determine AWS role name due to missing "options.credential_source.url"');let Y={...this.additionalGaxiosOptions,url:this.securityCredentialsUrl,method:"GET",responseType:"text",headers:q};return(await K.request(Y)).data},kA4=async function(q,K,Y){return(await Y.request({...this.additionalGaxiosOptions,url:`${this.securityCredentialsUrl}/${q}`,responseType:"json",headers:K})).data},GP1=function(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||null},DV8=function(){if(process.env.AWS_ACCESS_KEY_ID&&process.env.AWS_SECRET_ACCESS_KEY)return{accessKeyId:process.env.AWS_ACCESS_KEY_ID,secretAccessKey:process.env.AWS_SECRET_ACCESS_KEY,token:process.env.AWS_SESSION_TOKEN};return null}});var XV8=C((pZ6)=>{var ng9=pZ6&&pZ6.__classPrivateFieldGet||function(A,q,K,Y){if(K==="a"&&!Y)throw TypeError("Private accessor was defined without a getter");if(typeof q==="function"?A!==q||!Y:!q.has(A))throw TypeError("Cannot read private member from an object whose class did not declare it");return K==="m"?Y:K==="a"?Y.call(A):Y?Y.value:q.get(A)},fP1,RA4;Object.defineProperty(pZ6,"__esModule",{value:!0});pZ6.AwsClient=void 0;var rg9=JV8(),og9=D66(),ag9=LA4(),yA4=J66();class QU6 extends og9.BaseExternalAccountClient{constructor(A,q){super(A,q);let K=(0,yA4.originalOrCamelOptions)(A),Y=K.get("credential_source"),z=K.get("aws_security_credentials_supplier");if(!Y&&!z)throw Error("A credential source or AWS security credentials supplier must be specified.");if(Y&&z)throw Error("Only one of credential source or AWS security credentials supplier can be specified.");if(z)this.awsSecurityCredentialsSupplier=z,this.regionalCredVerificationUrl=ng9(fP1,fP1,"f",RA4),this.credentialSourceType="programmatic";else{let w=(0,yA4.originalOrCamelOptions)(Y);this.environmentId=w.get("environment_id");let _=w.get("region_url"),$=w.get("url"),O=w.get("imdsv2_session_token_url");this.awsSecurityCredentialsSupplier=new ag9.DefaultAwsSecurityCredentialsSupplier({regionUrl:_,securityCredentialsUrl:$,imdsV2SessionTokenUrl:O}),this.regionalCredVerificationUrl=w.get("regional_cred_verification_url"),this.credentialSourceType="aws",this.validateEnvironmentId()}this.awsRequestSigner=null,this.region=""}validateEnvironmentId(){var A;let q=(A=this.environmentId)===null||A===void 0?void 0:A.match(/^(aws)(\d+)$/);if(!q||!this.regionalCredVerificationUrl)throw Error('No valid AWS "credential_source" provided');else if(parseInt(q[2],10)!==1)throw Error(`aws version "${q[2]}" is not supported in the current build.`)}async retrieveSubjectToken(){if(!this.awsRequestSigner)this.region=await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext),this.awsRequestSigner=new rg9.AwsRequestSigner(async()=>{return this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext)},this.region);let A=await this.awsRequestSigner.getRequestOptions({...fP1.RETRY_CONFIG,url:this.regionalCredVerificationUrl.replace("{region}",this.region),method:"POST"}),q=[],K=Object.assign({"x-goog-cloud-target-resource":this.audience},A.headers);for(let Y in K)q.push({key:Y,value:K[Y]});return encodeURIComponent(JSON.stringify({url:A.url,method:A.method,headers:q}))}}pZ6.AwsClient=QU6;fP1=QU6;RA4={value:"https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15"};QU6.AWS_EC2_METADATA_IPV4_ADDRESS="169.254.169.254";QU6.AWS_EC2_METADATA_IPV6_ADDRESS="fd00:ec2::254"});var NV8=C((hA4)=>{Object.defineProperty(hA4,"__esModule",{value:!0});hA4.InvalidSubjectTokenError=hA4.InvalidMessageFieldError=hA4.InvalidCodeFieldError=hA4.InvalidTokenTypeFieldError=hA4.InvalidExpirationTimeFieldError=hA4.InvalidSuccessFieldError=hA4.InvalidVersionFieldError=hA4.ExecutableResponseError=hA4.ExecutableResponse=void 0;var TP1="urn:ietf:params:oauth:token-type:saml2",PV8="urn:ietf:params:oauth:token-type:id_token",WV8="urn:ietf:params:oauth:token-type:jwt";class SA4{constructor(A){if(!A.version)throw new ZV8("Executable response must contain a 'version' field.");if(A.success===void 0)throw new GV8("Executable response must contain a 'success' field.");if(this.version=A.version,this.success=A.success,this.success){if(this.expirationTime=A.expiration_time,this.tokenType=A.token_type,this.tokenType!==TP1&&this.tokenType!==PV8&&this.tokenType!==WV8)throw new fV8(`Executable response must contain a 'token_type' field when successful and it must be one of ${PV8}, ${WV8}, or ${TP1}.`);if(this.tokenType===TP1){if(!A.saml_response)throw new VP1(`Executable response must contain a 'saml_response' field when token_type=${TP1}.`);this.subjectToken=A.saml_response}else{if(!A.id_token)throw new VP1(`Executable response must contain a 'id_token' field when token_type=${PV8} or ${WV8}.`);this.subjectToken=A.id_token}}else{if(!A.code)throw new TV8("Executable response must contain a 'code' field when unsuccessful.");if(!A.message)throw new VV8("Executable response must contain a 'message' field when unsuccessful.");this.errorCode=A.code,this.errorMessage=A.message}}isValid(){return!this.isExpired()&&this.success}isExpired(){return this.expirationTime!==void 0&&this.expirationTime{Object.defineProperty(bA4,"__esModule",{value:!0});bA4.PluggableAuthHandler=void 0;var wF9=NP1(),WY6=NV8(),_F9=g6("child_process"),vV8=g6("fs");class kV8{constructor(A){if(!A.command)throw Error("No command provided.");if(this.commandComponents=kV8.parseCommand(A.command),this.timeoutMillis=A.timeoutMillis,!this.timeoutMillis)throw Error("No timeoutMillis provided.");this.outputFile=A.outputFile}retrieveResponseFromExecutable(A){return new Promise((q,K)=>{let Y=_F9.spawn(this.commandComponents[0],this.commandComponents.slice(1),{env:{...process.env,...Object.fromEntries(A)}}),z="";Y.stdout.on("data",(_)=>{z+=_}),Y.stderr.on("data",(_)=>{z+=_});let w=setTimeout(()=>{return Y.removeAllListeners(),Y.kill(),K(Error("The executable failed to finish within the timeout specified."))},this.timeoutMillis);Y.on("close",(_)=>{if(clearTimeout(w),_===0)try{let $=JSON.parse(z),O=new WY6.ExecutableResponse($);return q(O)}catch($){if($ instanceof WY6.ExecutableResponseError)return K($);return K(new WY6.ExecutableResponseError(`The executable returned an invalid response: ${z}`))}else return K(new wF9.ExecutableError(z,_.toString()))})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0)return;let A;try{A=await vV8.promises.realpath(this.outputFile)}catch(K){return}if(!(await vV8.promises.lstat(A)).isFile())return;let q=await vV8.promises.readFile(A,{encoding:"utf8"});if(q==="")return;try{let K=JSON.parse(q);if(new WY6.ExecutableResponse(K).isValid())return new WY6.ExecutableResponse(K);return}catch(K){if(K instanceof WY6.ExecutableResponseError)throw K;throw new WY6.ExecutableResponseError(`The output file contained an invalid response: ${q}`)}}static parseCommand(A){let q=A.match(/(?:[^\s"]+|"[^"]*")+/g);if(!q)throw Error(`Provided command: "${A}" could not be parsed.`);for(let K=0;K{Object.defineProperty(QA4,"__esModule",{value:!0});QA4.PluggableAuthClient=QA4.ExecutableError=void 0;var $F9=D66(),OF9=NV8(),HF9=uA4();class EV8 extends Error{constructor(A,q){super(`The executable failed with exit code: ${q} and error message: ${A}.`);this.code=q,Object.setPrototypeOf(this,new.target.prototype)}}QA4.ExecutableError=EV8;var jF9=30000,BA4=5000,mA4=120000,JF9="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES",gA4=1;class FA4 extends $F9.BaseExternalAccountClient{constructor(A,q){super(A,q);if(!A.credential_source.executable)throw Error('No valid Pluggable Auth "credential_source" provided.');if(this.command=A.credential_source.executable.command,!this.command)throw Error('No valid Pluggable Auth "credential_source" provided.');if(A.credential_source.executable.timeout_millis===void 0)this.timeoutMillis=jF9;else if(this.timeoutMillis=A.credential_source.executable.timeout_millis,this.timeoutMillismA4)throw Error(`Timeout must be between ${BA4} and ${mA4} milliseconds.`);this.outputFile=A.credential_source.executable.output_file,this.handler=new HF9.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile}),this.credentialSourceType="executable"}async retrieveSubjectToken(){if(process.env[JF9]!=="1")throw Error("Pluggable Auth executables need to be explicitly allowed to run by setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment Variable to 1.");let A=void 0;if(this.outputFile)A=await this.handler.retrieveCachedResponse();if(!A){let q=new Map;if(q.set("GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE",this.audience),q.set("GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE",this.subjectTokenType),q.set("GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE","0"),this.outputFile)q.set("GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE",this.outputFile);let K=this.getServiceAccountEmail();if(K)q.set("GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL",K);A=await this.handler.retrieveResponseFromExecutable(q)}if(A.version>gA4)throw Error(`Version of executable is not currently supported, maximum supported version is ${gA4}.`);if(!A.success)throw new EV8(A.errorMessage,A.errorCode);if(this.outputFile){if(!A.expirationTime)throw new OF9.InvalidExpirationTimeFieldError("The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.")}if(A.isExpired())throw Error("Executable response is expired.");return A.subjectToken}}QA4.PluggableAuthClient=FA4});var LV8=C((dA4)=>{Object.defineProperty(dA4,"__esModule",{value:!0});dA4.ExternalAccountClient=void 0;var DF9=D66(),XF9=jV8(),PF9=XV8(),WF9=NP1();class pA4{constructor(){throw Error("ExternalAccountClients should be initialized via: ExternalAccountClient.fromJSON(), directly via explicit constructors, eg. new AwsClient(options), new IdentityPoolClient(options), newPluggableAuthClientOptions, or via new GoogleAuth(options).getClient()")}static fromJSON(A,q){var K,Y;if(A&&A.type===DF9.EXTERNAL_ACCOUNT_TYPE)if((K=A.credential_source)===null||K===void 0?void 0:K.environment_id)return new PF9.AwsClient(A,q);else if((Y=A.credential_source)===null||Y===void 0?void 0:Y.executable)return new WF9.PluggableAuthClient(A,q);else return new XF9.IdentityPoolClient(A,q);else return null}}dA4.ExternalAccountClient=pA4});var oA4=C((nA4)=>{Object.defineProperty(nA4,"__esModule",{value:!0});nA4.ExternalAccountAuthorizedUserClient=nA4.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var ZF9=zF(),lA4=sT8(),GF9=ib(),fF9=g6("stream"),TF9=D66();nA4.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var VF9="https://sts.{universeDomain}/v1/oauthtoken";class yV8 extends lA4.OAuthClientAuthHandler{constructor(A,q,K){super(K);this.url=A,this.transporter=q}async refreshToken(A,q){let K=new URLSearchParams({grant_type:"refresh_token",refresh_token:A}),Y={"Content-Type":"application/x-www-form-urlencoded",...q},z={...yV8.RETRY_CONFIG,url:this.url,method:"POST",headers:Y,data:K.toString(),responseType:"json"};this.applyClientAuthenticationOptions(z);try{let w=await this.transporter.request(z),_=w.data;return _.res=w,_}catch(w){if(w instanceof GF9.GaxiosError&&w.response)throw(0,lA4.getErrorFromOAuthErrorResponse)(w.response.data,w);throw w}}}class iA4 extends ZF9.AuthClient{constructor(A,q){var K;super({...A,...q});if(A.universe_domain)this.universeDomain=A.universe_domain;this.refreshToken=A.refresh_token;let Y={confidentialClientType:"basic",clientId:A.client_id,clientSecret:A.client_secret};if(this.externalAccountAuthorizedUserHandler=new yV8((K=A.token_url)!==null&&K!==void 0?K:VF9.replace("{universeDomain}",this.universeDomain),this.transporter,Y),this.cachedAccessToken=null,this.quotaProjectId=A.quota_project_id,typeof(q===null||q===void 0?void 0:q.eagerRefreshThresholdMillis)!=="number")this.eagerRefreshThresholdMillis=TF9.EXPIRATION_TIME_OFFSET;else this.eagerRefreshThresholdMillis=q.eagerRefreshThresholdMillis;this.forceRefreshOnFailure=!!(q===null||q===void 0?void 0:q.forceRefreshOnFailure)}async getAccessToken(){if(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))await this.refreshAccessTokenAsync();return{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let q={Authorization:`Bearer ${(await this.getAccessToken()).token}`};return this.addSharedMetadataHeaders(q)}request(A,q){if(q)this.requestAsync(A).then((K)=>q(null,K),(K)=>{return q(K,K.response)});else return this.requestAsync(A)}async requestAsync(A,q=!1){let K;try{let Y=await this.getRequestHeaders();if(A.headers=A.headers||{},Y&&Y["x-goog-user-project"])A.headers["x-goog-user-project"]=Y["x-goog-user-project"];if(Y&&Y.Authorization)A.headers.Authorization=Y.Authorization;K=await this.transporter.request(A)}catch(Y){let z=Y.response;if(z){let w=z.status,_=z.config.data instanceof fF9.Readable;if(!q&&(w===401||w===403)&&!_&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(A,!0)}throw Y}return K}async refreshAccessTokenAsync(){let A=await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken);if(this.cachedAccessToken={access_token:A.access_token,expiry_date:new Date().getTime()+A.expires_in*1000,res:A.res},A.refresh_token!==void 0)this.refreshToken=A.refresh_token;return this.cachedAccessToken}isExpired(A){let q=new Date().getTime();return A.expiry_date?q>=A.expiry_date-this.eagerRefreshThresholdMillis:!1}}nA4.ExternalAccountAuthorizedUserClient=iA4});var q74=C((e0)=>{var X66=e0&&e0.__classPrivateFieldGet||function(A,q,K,Y){if(K==="a"&&!Y)throw TypeError("Private accessor was defined without a getter");if(typeof q==="function"?A!==q||!Y:!q.has(A))throw TypeError("Cannot read private member from an object whose class did not declare it");return K==="m"?Y:K==="a"?Y.call(A):Y?Y.value:q.get(A)},aA4=e0&&e0.__classPrivateFieldSet||function(A,q,K,Y,z){if(Y==="m")throw TypeError("Private method is not writable");if(Y==="a"&&!z)throw TypeError("Private accessor was defined without a setter");if(typeof q==="function"?A!==q||!z:!q.has(A))throw TypeError("Cannot write private member to an object whose class did not declare it");return Y==="a"?z.call(A,K):z?z.value=K:q.set(A,K),K},P66,lZ6,iZ6,A74;Object.defineProperty(e0,"__esModule",{value:!0});e0.GoogleAuth=e0.GoogleAuthExceptionMessages=e0.CLOUD_SDK_CLIENT_ID=void 0;var vF9=g6("child_process"),dU6=g6("fs"),UU6=hU6(),kF9=g6("os"),SV8=g6("path"),EF9=IZ6(),LF9=bU6(),yF9=hT8(),RF9=IT8(),SF9=bT8(),dZ6=rT8(),sA4=oT8(),cZ6=aT8(),CF9=LV8(),pU6=D66(),RV8=zF(),tA4=oA4(),eA4=J66();e0.CLOUD_SDK_CLIENT_ID="764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com";e0.GoogleAuthExceptionMessages={API_KEY_WITH_CREDENTIALS:"API Keys and Credentials are mutually exclusive authentication methods and cannot be used together.",NO_PROJECT_ID_FOUND:`Unable to detect a Project Id in the current environment. To learn more about authentication and Google APIs, visit: https://cloud.google.com/docs/authentication/getting-started`,NO_CREDENTIALS_FOUND:`Unable to find credentials in current environment. To learn more about authentication and Google APIs, visit: https://cloud.google.com/docs/authentication/getting-started`,NO_ADC_FOUND:"Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.",NO_UNIVERSE_DOMAIN_FOUND:`Unable to detect a Universe Domain in the current environment. To learn more about Universe Domain retrieval, visit: https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys`};class CV8{get isGCE(){return this.checkIsGCE}constructor(A={}){if(P66.add(this),this.checkIsGCE=void 0,this.jsonContent=null,this.cachedCredential=null,lZ6.set(this,null),this.clientOptions={},this._cachedProjectId=A.projectId||null,this.cachedCredential=A.authClient||null,this.keyFilename=A.keyFilename||A.keyFile,this.scopes=A.scopes,this.clientOptions=A.clientOptions||{},this.jsonContent=A.credentials||null,this.apiKey=A.apiKey||this.clientOptions.apiKey||null,this.apiKey&&(this.jsonContent||this.clientOptions.credentials))throw RangeError(e0.GoogleAuthExceptionMessages.API_KEY_WITH_CREDENTIALS);if(A.universeDomain)this.clientOptions.universeDomain=A.universeDomain}setGapicJWTValues(A){A.defaultServicePath=this.defaultServicePath,A.useJWTAccessWithScope=this.useJWTAccessWithScope,A.defaultScopes=this.defaultScopes}getProjectId(A){if(A)this.getProjectIdAsync().then((q)=>A(null,q),A);else return this.getProjectIdAsync()}async getProjectIdOptional(){try{return await this.getProjectId()}catch(A){if(A instanceof Error&&A.message===e0.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)return null;else throw A}}async findAndCacheProjectId(){let A=null;if(A||(A=await this.getProductionProjectId()),A||(A=await this.getFileProjectId()),A||(A=await this.getDefaultServiceProjectId()),A||(A=await this.getGCEProjectId()),A||(A=await this.getExternalAccountClientProjectId()),A)return this._cachedProjectId=A,A;else throw Error(e0.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)}async getProjectIdAsync(){if(this._cachedProjectId)return this._cachedProjectId;if(!this._findProjectIdPromise)this._findProjectIdPromise=this.findAndCacheProjectId();return this._findProjectIdPromise}async getUniverseDomainFromMetadataServer(){var A;let q;try{q=await UU6.universe("universe-domain"),q||(q=RV8.DEFAULT_UNIVERSE)}catch(K){if(K&&((A=K===null||K===void 0?void 0:K.response)===null||A===void 0?void 0:A.status)===404)q=RV8.DEFAULT_UNIVERSE;else throw K}return q}async getUniverseDomain(){let A=(0,eA4.originalOrCamelOptions)(this.clientOptions).get("universe_domain");try{A!==null&&A!==void 0||(A=(await this.getClient()).universeDomain)}catch(q){A!==null&&A!==void 0||(A=RV8.DEFAULT_UNIVERSE)}return A}getAnyScopes(){return this.scopes||this.defaultScopes}getApplicationDefault(A={},q){let K;if(typeof A==="function")q=A;else K=A;if(q)this.getApplicationDefaultAsync(K).then((Y)=>q(null,Y.credential,Y.projectId),q);else return this.getApplicationDefaultAsync(K)}async getApplicationDefaultAsync(A={}){if(this.cachedCredential)return await X66(this,P66,"m",iZ6).call(this,this.cachedCredential,null);let q;if(q=await this._tryGetApplicationCredentialsFromEnvironmentVariable(A),q){if(q instanceof dZ6.JWT)q.scopes=this.scopes;else if(q instanceof pU6.BaseExternalAccountClient)q.scopes=this.getAnyScopes();return await X66(this,P66,"m",iZ6).call(this,q)}if(q=await this._tryGetApplicationCredentialsFromWellKnownFile(A),q){if(q instanceof dZ6.JWT)q.scopes=this.scopes;else if(q instanceof pU6.BaseExternalAccountClient)q.scopes=this.getAnyScopes();return await X66(this,P66,"m",iZ6).call(this,q)}if(await this._checkIsGCE())return A.scopes=this.getAnyScopes(),await X66(this,P66,"m",iZ6).call(this,new yF9.Compute(A));throw Error(e0.GoogleAuthExceptionMessages.NO_ADC_FOUND)}async _checkIsGCE(){if(this.checkIsGCE===void 0)this.checkIsGCE=UU6.getGCPResidency()||await UU6.isAvailable();return this.checkIsGCE}async _tryGetApplicationCredentialsFromEnvironmentVariable(A){let q=process.env.GOOGLE_APPLICATION_CREDENTIALS||process.env.google_application_credentials;if(!q||q.length===0)return null;try{return this._getApplicationCredentialsFromFilePath(q,A)}catch(K){if(K instanceof Error)K.message=`Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${K.message}`;throw K}}async _tryGetApplicationCredentialsFromWellKnownFile(A){let q=null;if(this._isWindows())q=process.env.APPDATA;else{let Y=process.env.HOME;if(Y)q=SV8.join(Y,".config")}if(q){if(q=SV8.join(q,"gcloud","application_default_credentials.json"),!dU6.existsSync(q))q=null}if(!q)return null;return await this._getApplicationCredentialsFromFilePath(q,A)}async _getApplicationCredentialsFromFilePath(A,q={}){if(!A||A.length===0)throw Error("The file path is invalid.");try{if(A=dU6.realpathSync(A),!dU6.lstatSync(A).isFile())throw Error()}catch(Y){if(Y instanceof Error)Y.message=`The file at ${A} does not exist, or it is not a file. ${Y.message}`;throw Y}let K=dU6.createReadStream(A);return this.fromStream(K,q)}fromImpersonatedJSON(A){var q,K,Y,z;if(!A)throw Error("Must pass in a JSON object containing an impersonated refresh token");if(A.type!==cZ6.IMPERSONATED_ACCOUNT_TYPE)throw Error(`The incoming JSON object does not have the "${cZ6.IMPERSONATED_ACCOUNT_TYPE}" type`);if(!A.source_credentials)throw Error("The incoming JSON object does not contain a source_credentials field");if(!A.service_account_impersonation_url)throw Error("The incoming JSON object does not contain a service_account_impersonation_url field");let w=this.fromJSON(A.source_credentials);if(((q=A.service_account_impersonation_url)===null||q===void 0?void 0:q.length)>256)throw RangeError(`Target principal is too long: ${A.service_account_impersonation_url}`);let _=(Y=(K=/(?[^/]+):(generateAccessToken|generateIdToken)$/.exec(A.service_account_impersonation_url))===null||K===void 0?void 0:K.groups)===null||Y===void 0?void 0:Y.target;if(!_)throw RangeError(`Cannot extract target principal from ${A.service_account_impersonation_url}`);let $=(z=this.getAnyScopes())!==null&&z!==void 0?z:[];return new cZ6.Impersonated({...A,sourceClient:w,targetPrincipal:_,targetScopes:Array.isArray($)?$:[$]})}fromJSON(A,q={}){let K,Y=(0,eA4.originalOrCamelOptions)(q).get("universe_domain");if(A.type===sA4.USER_REFRESH_ACCOUNT_TYPE)K=new sA4.UserRefreshClient(q),K.fromJSON(A);else if(A.type===cZ6.IMPERSONATED_ACCOUNT_TYPE)K=this.fromImpersonatedJSON(A);else if(A.type===pU6.EXTERNAL_ACCOUNT_TYPE)K=CF9.ExternalAccountClient.fromJSON(A,q),K.scopes=this.getAnyScopes();else if(A.type===tA4.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE)K=new tA4.ExternalAccountAuthorizedUserClient(A,q);else q.scopes=this.scopes,K=new dZ6.JWT(q),this.setGapicJWTValues(K),K.fromJSON(A);if(Y)K.universeDomain=Y;return K}_cacheClientFromJSON(A,q){let K=this.fromJSON(A,q);return this.jsonContent=A,this.cachedCredential=K,K}fromStream(A,q={},K){let Y={};if(typeof q==="function")K=q;else Y=q;if(K)this.fromStreamAsync(A,Y).then((z)=>K(null,z),K);else return this.fromStreamAsync(A,Y)}fromStreamAsync(A,q){return new Promise((K,Y)=>{if(!A)throw Error("Must pass in a stream containing the Google auth settings.");let z=[];A.setEncoding("utf8").on("error",Y).on("data",(w)=>z.push(w)).on("end",()=>{try{try{let w=JSON.parse(z.join("")),_=this._cacheClientFromJSON(w,q);return K(_)}catch(w){if(!this.keyFilename)throw w;let _=new dZ6.JWT({...this.clientOptions,keyFile:this.keyFilename});return this.cachedCredential=_,this.setGapicJWTValues(_),K(_)}}catch(w){return Y(w)}})})}fromAPIKey(A,q={}){return new dZ6.JWT({...q,apiKey:A})}_isWindows(){let A=kF9.platform();if(A&&A.length>=3){if(A.substring(0,3).toLowerCase()==="win")return!0}return!1}async getDefaultServiceProjectId(){return new Promise((A)=>{(0,vF9.exec)("gcloud config config-helper --format json",(q,K)=>{if(!q&&K)try{let Y=JSON.parse(K).configuration.properties.core.project;A(Y);return}catch(Y){}A(null)})})}getProductionProjectId(){return process.env.GCLOUD_PROJECT||process.env.GOOGLE_CLOUD_PROJECT||process.env.gcloud_project||process.env.google_cloud_project}async getFileProjectId(){if(this.cachedCredential)return this.cachedCredential.projectId;if(this.keyFilename){let q=await this.getClient();if(q&&q.projectId)return q.projectId}let A=await this._tryGetApplicationCredentialsFromEnvironmentVariable();if(A)return A.projectId;else return null}async getExternalAccountClientProjectId(){if(!this.jsonContent||this.jsonContent.type!==pU6.EXTERNAL_ACCOUNT_TYPE)return null;return await(await this.getClient()).getProjectId()}async getGCEProjectId(){try{return await UU6.project("project-id")}catch(A){return null}}getCredentials(A){if(A)this.getCredentialsAsync().then((q)=>A(null,q),A);else return this.getCredentialsAsync()}async getCredentialsAsync(){let A=await this.getClient();if(A instanceof cZ6.Impersonated)return{client_email:A.getTargetPrincipal()};if(A instanceof pU6.BaseExternalAccountClient){let q=A.getServiceAccountEmail();if(q)return{client_email:q,universe_domain:A.universeDomain}}if(this.jsonContent)return{client_email:this.jsonContent.client_email,private_key:this.jsonContent.private_key,universe_domain:this.jsonContent.universe_domain};if(await this._checkIsGCE()){let[q,K]=await Promise.all([UU6.instance("service-accounts/default/email"),this.getUniverseDomain()]);return{client_email:q,universe_domain:K}}throw Error(e0.GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND)}async getClient(){if(this.cachedCredential)return this.cachedCredential;aA4(this,lZ6,X66(this,lZ6,"f")||X66(this,P66,"m",A74).call(this),"f");try{return await X66(this,lZ6,"f")}finally{aA4(this,lZ6,null,"f")}}async getIdTokenClient(A){let q=await this.getClient();if(!("fetchIdToken"in q))throw Error("Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.");return new RF9.IdTokenClient({targetAudience:A,idTokenProvider:q})}async getAccessToken(){return(await(await this.getClient()).getAccessToken()).token}async getRequestHeaders(A){return(await this.getClient()).getRequestHeaders(A)}async authorizeRequest(A){A=A||{};let q=A.url||A.uri,Y=await(await this.getClient()).getRequestHeaders(q);return A.headers=Object.assign(A.headers||{},Y),A}async request(A){return(await this.getClient()).request(A)}getEnv(){return(0,SF9.getEnv)()}async sign(A,q){let K=await this.getClient(),Y=await this.getUniverseDomain();if(q=q||`https://iamcredentials.${Y}/v1/projects/-/serviceAccounts/`,K instanceof cZ6.Impersonated)return(await K.sign(A)).signedBlob;let z=(0,EF9.createCrypto)();if(K instanceof dZ6.JWT&&K.key)return await z.sign(K.key,A);let w=await this.getCredentials();if(!w.client_email)throw Error("Cannot sign data without `client_email`.");return this.signBlob(z,w.client_email,A,q)}async signBlob(A,q,K,Y){let z=new URL(Y+`${q}:signBlob`);return(await this.request({method:"POST",url:z.href,data:{payload:A.encodeBase64StringUtf8(K)},retry:!0,retryConfig:{httpMethodsToRetry:["POST"]}})).data.signedBlob}}e0.GoogleAuth=CV8;lZ6=new WeakMap,P66=new WeakSet,iZ6=async function(q,K=process.env.GOOGLE_CLOUD_QUOTA_PROJECT||null){let Y=await this.getProjectIdOptional();if(K)q.quotaProjectId=K;return this.cachedCredential=q,{credential:q,projectId:Y}},A74=async function(){if(this.jsonContent)return this._cacheClientFromJSON(this.jsonContent,this.clientOptions);else if(this.keyFilename){let q=SV8.resolve(this.keyFilename),K=dU6.createReadStream(q);return await this.fromStreamAsync(K,this.clientOptions)}else if(this.apiKey){let q=await this.fromAPIKey(this.apiKey,this.clientOptions);q.scopes=this.scopes;let{credential:K}=await X66(this,P66,"m",iZ6).call(this,q);return K}else{let{credential:q}=await this.getApplicationDefaultAsync(this.clientOptions);return q}};CV8.DefaultTransporter=LF9.DefaultTransporter});var w74=C((Y74)=>{Object.defineProperty(Y74,"__esModule",{value:!0});Y74.IAMAuth=void 0;class K74{constructor(A,q){this.selector=A,this.token=q,this.selector=A,this.token=q}getRequestHeaders(){return{"x-goog-iam-authority-selector":this.selector,"x-goog-iam-authorization-token":this.token}}}Y74.IAMAuth=K74});var H74=C(($74)=>{Object.defineProperty($74,"__esModule",{value:!0});$74.DownscopedClient=$74.EXPIRATION_TIME_OFFSET=$74.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var hF9=g6("stream"),IF9=zF(),bF9=eT8(),xF9="urn:ietf:params:oauth:grant-type:token-exchange",uF9="urn:ietf:params:oauth:token-type:access_token",BF9="urn:ietf:params:oauth:token-type:access_token";$74.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;$74.EXPIRATION_TIME_OFFSET=300000;class _74 extends IF9.AuthClient{constructor(A,q,K,Y){super({...K,quotaProjectId:Y});if(this.authClient=A,this.credentialAccessBoundary=q,q.accessBoundary.accessBoundaryRules.length===0)throw Error("At least one access boundary rule needs to be defined.");else if(q.accessBoundary.accessBoundaryRules.length>$74.MAX_ACCESS_BOUNDARY_RULES_COUNT)throw Error(`The provided access boundary has more than ${$74.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`);for(let z of q.accessBoundary.accessBoundaryRules)if(z.availablePermissions.length===0)throw Error("At least one permission should be defined in access boundary rules.");this.stsCredential=new bF9.StsCredentials(`https://sts.${this.universeDomain}/v1/token`),this.cachedDownscopedAccessToken=null}setCredentials(A){if(!A.expiry_date)throw Error("The access token expiry_date field is missing in the provided credentials.");super.setCredentials(A),this.cachedDownscopedAccessToken=A}async getAccessToken(){if(!this.cachedDownscopedAccessToken||this.isExpired(this.cachedDownscopedAccessToken))await this.refreshAccessTokenAsync();return{token:this.cachedDownscopedAccessToken.access_token,expirationTime:this.cachedDownscopedAccessToken.expiry_date,res:this.cachedDownscopedAccessToken.res}}async getRequestHeaders(){let q={Authorization:`Bearer ${(await this.getAccessToken()).token}`};return this.addSharedMetadataHeaders(q)}request(A,q){if(q)this.requestAsync(A).then((K)=>q(null,K),(K)=>{return q(K,K.response)});else return this.requestAsync(A)}async requestAsync(A,q=!1){let K;try{let Y=await this.getRequestHeaders();if(A.headers=A.headers||{},Y&&Y["x-goog-user-project"])A.headers["x-goog-user-project"]=Y["x-goog-user-project"];if(Y&&Y.Authorization)A.headers.Authorization=Y.Authorization;K=await this.transporter.request(A)}catch(Y){let z=Y.response;if(z){let w=z.status,_=z.config.data instanceof hF9.Readable;if(!q&&(w===401||w===403)&&!_&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(A,!0)}throw Y}return K}async refreshAccessTokenAsync(){var A;let q=(await this.authClient.getAccessToken()).token,K={grantType:xF9,requestedTokenType:uF9,subjectToken:q,subjectTokenType:BF9},Y=await this.stsCredential.exchangeToken(K,void 0,this.credentialAccessBoundary),z=((A=this.authClient.credentials)===null||A===void 0?void 0:A.expiry_date)||null,w=Y.expires_in?new Date().getTime()+Y.expires_in*1000:z;return this.cachedDownscopedAccessToken={access_token:Y.access_token,expiry_date:w,res:Y.res},this.credentials={},Object.assign(this.credentials,this.cachedDownscopedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedDownscopedAccessToken.expiry_date,access_token:this.cachedDownscopedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedDownscopedAccessToken}isExpired(A){let q=new Date().getTime();return A.expiry_date?q>=A.expiry_date-this.eagerRefreshThresholdMillis:!1}}$74.DownscopedClient=_74});var M74=C((j74)=>{Object.defineProperty(j74,"__esModule",{value:!0});j74.PassThroughClient=void 0;var gF9=zF();class IV8 extends gF9.AuthClient{async request(A){return this.transporter.request(A)}async getAccessToken(){return{}}async getRequestHeaders(){return{}}}j74.PassThroughClient=IV8;var FF9=new IV8;FF9.getAccessToken()});var xV8=C((E_)=>{Object.defineProperty(E_,"__esModule",{value:!0});E_.GoogleAuth=E_.auth=E_.DefaultTransporter=E_.PassThroughClient=E_.ExecutableError=E_.PluggableAuthClient=E_.DownscopedClient=E_.BaseExternalAccountClient=E_.ExternalAccountClient=E_.IdentityPoolClient=E_.AwsRequestSigner=E_.AwsClient=E_.UserRefreshClient=E_.LoginTicket=E_.ClientAuthentication=E_.OAuth2Client=E_.CodeChallengeMethod=E_.Impersonated=E_.JWT=E_.JWTAccess=E_.IdTokenClient=E_.IAMAuth=E_.GCPEnv=E_.Compute=E_.DEFAULT_UNIVERSE=E_.AuthClient=E_.gaxios=E_.gcpMetadata=void 0;var D74=q74();Object.defineProperty(E_,"GoogleAuth",{enumerable:!0,get:function(){return D74.GoogleAuth}});E_.gcpMetadata=hU6();E_.gaxios=ib();var X74=zF();Object.defineProperty(E_,"AuthClient",{enumerable:!0,get:function(){return X74.AuthClient}});Object.defineProperty(E_,"DEFAULT_UNIVERSE",{enumerable:!0,get:function(){return X74.DEFAULT_UNIVERSE}});var QF9=hT8();Object.defineProperty(E_,"Compute",{enumerable:!0,get:function(){return QF9.Compute}});var UF9=bT8();Object.defineProperty(E_,"GCPEnv",{enumerable:!0,get:function(){return UF9.GCPEnv}});var pF9=w74();Object.defineProperty(E_,"IAMAuth",{enumerable:!0,get:function(){return pF9.IAMAuth}});var dF9=IT8();Object.defineProperty(E_,"IdTokenClient",{enumerable:!0,get:function(){return dF9.IdTokenClient}});var cF9=iT8();Object.defineProperty(E_,"JWTAccess",{enumerable:!0,get:function(){return cF9.JWTAccess}});var lF9=rT8();Object.defineProperty(E_,"JWT",{enumerable:!0,get:function(){return lF9.JWT}});var iF9=aT8();Object.defineProperty(E_,"Impersonated",{enumerable:!0,get:function(){return iF9.Impersonated}});var bV8=PY6();Object.defineProperty(E_,"CodeChallengeMethod",{enumerable:!0,get:function(){return bV8.CodeChallengeMethod}});Object.defineProperty(E_,"OAuth2Client",{enumerable:!0,get:function(){return bV8.OAuth2Client}});Object.defineProperty(E_,"ClientAuthentication",{enumerable:!0,get:function(){return bV8.ClientAuthentication}});var nF9=RT8();Object.defineProperty(E_,"LoginTicket",{enumerable:!0,get:function(){return nF9.LoginTicket}});var rF9=oT8();Object.defineProperty(E_,"UserRefreshClient",{enumerable:!0,get:function(){return rF9.UserRefreshClient}});var oF9=XV8();Object.defineProperty(E_,"AwsClient",{enumerable:!0,get:function(){return oF9.AwsClient}});var aF9=JV8();Object.defineProperty(E_,"AwsRequestSigner",{enumerable:!0,get:function(){return aF9.AwsRequestSigner}});var sF9=jV8();Object.defineProperty(E_,"IdentityPoolClient",{enumerable:!0,get:function(){return sF9.IdentityPoolClient}});var tF9=LV8();Object.defineProperty(E_,"ExternalAccountClient",{enumerable:!0,get:function(){return tF9.ExternalAccountClient}});var eF9=D66();Object.defineProperty(E_,"BaseExternalAccountClient",{enumerable:!0,get:function(){return eF9.BaseExternalAccountClient}});var AQ9=H74();Object.defineProperty(E_,"DownscopedClient",{enumerable:!0,get:function(){return AQ9.DownscopedClient}});var P74=NP1();Object.defineProperty(E_,"PluggableAuthClient",{enumerable:!0,get:function(){return P74.PluggableAuthClient}});Object.defineProperty(E_,"ExecutableError",{enumerable:!0,get:function(){return P74.ExecutableError}});var qQ9=M74();Object.defineProperty(E_,"PassThroughClient",{enumerable:!0,get:function(){return qQ9.PassThroughClient}});var KQ9=bU6();Object.defineProperty(E_,"DefaultTransporter",{enumerable:!0,get:function(){return KQ9.DefaultTransporter}});var YQ9=new D74.GoogleAuth;E_.auth=YQ9});var vP1=(A)=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[A]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(A)?.trim();return};var W74=k(()=>{xZ()});function kP1(A){return A!=null&&typeof A==="object"&&!Array.isArray(A)}var uV8=(A)=>(uV8=Array.isArray,uV8(A)),BV8;var mV8=k(()=>{W74();BV8=uV8});function*OQ9(A){if(!A)return;if(Z74 in A){let{values:Y,nulls:z}=A;yield*Y.entries();for(let w of z)yield[w,null];return}let q=!1,K;if(A instanceof Headers)K=A.entries();else if(BV8(A))K=A;else q=!0,K=Object.entries(A??{});for(let Y of K){let z=Y[0];if(typeof z!=="string")throw TypeError("expected header name to be a string");let w=BV8(Y[1])?Y[1]:[Y[1]],_=!1;for(let $ of w){if($===void 0)continue;if(q&&!_)_=!0,yield[z,null];yield[z,$]}}}var Z74,G74=(A)=>{let q=new Headers,K=new Set;for(let Y of A){let z=new Set;for(let[w,_]of OQ9(Y)){let $=w.toLowerCase();if(!z.has($))q.delete(w),z.add($);if(_===null)q.delete(w),K.add($);else q.append(w,_),K.delete($)}}return{[Z74]:!0,values:q,nulls:K}};var f74=k(()=>{mV8();Z74=Symbol.for("brand.privateNullableHeaders")});function JQ9(A){let q=new YE(A);return delete q.batches,q}function MQ9(A){let q=new uZ(A);return delete q.messages.batches,q}var T74,HQ9="vertex-2023-10-16",jQ9,gV8;var FV8=k(()=>{Bd();rb6();mV8();f74();Bd();T74=e(xV8(),1),jQ9=new Set(["/v1/messages","/v1/messages?beta=true"]);gV8=class gV8 extends rz{constructor({baseURL:A=vP1("ANTHROPIC_VERTEX_BASE_URL"),region:q=vP1("CLOUD_ML_REGION")??null,projectId:K=vP1("ANTHROPIC_VERTEX_PROJECT_ID")??null,...Y}={}){if(!q)throw Error("No region was given. The client should be instantiated with the `region` option or the `CLOUD_ML_REGION` environment variable should be set.");super({baseURL:A||(q==="global"?"https://aiplatform.googleapis.com/v1":`https://${q}-aiplatform.googleapis.com/v1`),...Y});if(this.messages=JQ9(this),this.beta=MQ9(this),this.region=q,this.projectId=K,this.accessToken=Y.accessToken??null,Y.authClient&&Y.googleAuth)throw Error("You cannot provide both `authClient` and `googleAuth`. Please provide only one of them.");else if(Y.authClient)this._authClientPromise=Promise.resolve(Y.authClient);else this._auth=Y.googleAuth??new T74.GoogleAuth({scopes:"https://www.googleapis.com/auth/cloud-platform"}),this._authClientPromise=this._auth.getClient()}validateHeaders(){}async prepareOptions(A){let q=await this._authClientPromise,K=await q.getRequestHeaders(),Y=q.projectId??K["x-goog-user-project"];if(!this.projectId&&Y)this.projectId=Y;A.headers=G74([K,A.headers])}async buildRequest(A){if(kP1(A.body))A.body={...A.body};if(kP1(A.body)){if(!A.body.anthropic_version)A.body.anthropic_version=HQ9}if(jQ9.has(A.path)&&A.method==="post"){if(!this.projectId)throw Error("No projectId was given and it could not be resolved from credentials. The client should be instantiated with the `projectId` option or the `ANTHROPIC_VERTEX_PROJECT_ID` environment variable should be set.");if(!kP1(A.body))throw Error("Expected request body to be an object for post /v1/messages");let q=A.body.model;A.body.model=void 0;let Y=A.body.stream??!1?"streamRawPredict":"rawPredict";A.path=`/projects/${this.projectId}/locations/${this.region}/publishers/anthropic/models/${q}:${Y}`}if(A.path==="/v1/messages/count_tokens"||A.path=="/v1/messages/count_tokens?beta=true"&&A.method==="post"){if(!this.projectId)throw Error("No projectId was given and it could not be resolved from credentials. The client should be instantiated with the `projectId` option or the `ANTHROPIC_VERTEX_PROJECT_ID` environment variable should be set.");A.path=`/projects/${this.projectId}/locations/${this.region}/publishers/anthropic/models/count-tokens:rawPredict`}return super.buildRequest(A)}}});var V74={};m1(V74,{default:()=>gV8,BaseAnthropic:()=>rz,AnthropicVertex:()=>gV8});var N74=k(()=>{FV8();FV8()});function EP1(){return{error:(A,...q)=>console.error("[Anthropic SDK ERROR]",A,...q),warn:(A,...q)=>console.error("[Anthropic SDK WARN]",A,...q),info:(A,...q)=>console.error("[Anthropic SDK INFO]",A,...q),debug:(A,...q)=>console.error("[Anthropic SDK DEBUG]",A,...q)}}async function eb({apiKey:A,maxRetries:q,model:K,fetchOverride:Y,source:z}){let w=process.env.CLAUDE_CODE_CONTAINER_ID,_=process.env.CLAUDE_CODE_REMOTE_SESSION_ID,$=process.env.CLAUDE_AGENT_SDK_CLIENT_APP,O=XQ9(),H={"x-app":"cli","User-Agent":ey(),...O,...w?{"x-claude-remote-container-id":w}:{},..._?{"x-claude-remote-session-id":_}:{},...$?{"x-client-app":$}:{}};if(L(`[API:request] Creating client, ANTHROPIC_CUSTOM_HEADERS present: ${!!process.env.ANTHROPIC_CUSTOM_HEADERS}, has Authorization header: ${!!O.Authorization}`),$1(process.env.CLAUDE_CODE_ADDITIONAL_PROTECTION))H["x-anthropic-additional-protection"]="true";if(L("[API:auth] OAuth token check starting"),await L_(),L("[API:auth] OAuth token check complete"),!A7())DQ9(H,u7());let J=PQ9(Y,z),M={defaultHeaders:H,maxRetries:q,timeout:parseInt(process.env.API_TIMEOUT_MS||String(600000),10),dangerouslyAllowBrowser:!0,fetchOptions:n36(),...J&&{fetch:J}};if($1(process.env.CLAUDE_CODE_USE_BEDROCK)){let{AnthropicBedrock:X}=await Promise.resolve().then(() => (jU7(),HU7)),P=K===Fj()&&process.env.ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION?process.env.ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION:Q46(),W={...M,awsRegion:P,...$1(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH)&&{skipAuth:!0},...uB()&&{logger:EP1()}};if(process.env.AWS_BEARER_TOKEN_BEDROCK)W.skipAuth=!0,W.defaultHeaders={...W.defaultHeaders,Authorization:`Bearer ${process.env.AWS_BEARER_TOKEN_BEDROCK}`};else if(!$1(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH)){let Z=await Ut();if(Z)W.awsAccessKey=Z.accessKeyId,W.awsSecretKey=Z.secretAccessKey,W.awsSessionToken=Z.sessionToken}return new X(W)}if($1(process.env.CLAUDE_CODE_USE_FOUNDRY)){let{AnthropicFoundry:X}=await Promise.resolve().then(() => (ZU7(),WU7)),P;if(!process.env.ANTHROPIC_FOUNDRY_API_KEY)if($1(process.env.CLAUDE_CODE_SKIP_FOUNDRY_AUTH))P=()=>Promise.resolve("");else{let{DefaultAzureCredential:Z,getBearerTokenProvider:G}=await Promise.resolve().then(() => (hs7(),Cs7));P=G(new Z,"https://cognitiveservices.azure.com/.default")}let W={...M,...P&&{azureADTokenProvider:P},...uB()&&{logger:EP1()}};return new X(W)}if($1(process.env.CLAUDE_CODE_USE_VERTEX)){let[{AnthropicVertex:X},{GoogleAuth:P}]=await Promise.all([Promise.resolve().then(() => (N74(),V74)),Promise.resolve().then(() => e(xV8(),1))]),W=process.env.GCLOUD_PROJECT||process.env.GOOGLE_CLOUD_PROJECT||process.env.gcloud_project||process.env.google_cloud_project,Z=process.env.GOOGLE_APPLICATION_CREDENTIALS||process.env.google_application_credentials,G=$1(process.env.CLAUDE_CODE_SKIP_VERTEX_AUTH)?{getClient:()=>({getRequestHeaders:()=>({})})}:new P({scopes:["https://www.googleapis.com/auth/cloud-platform"],...W||Z?{}:{projectId:process.env.ANTHROPIC_VERTEX_PROJECT_ID}}),f={...M,region:L81(K),googleAuth:G,...uB()&&{logger:EP1()}};return new X(f)}let D={apiKey:A7()?null:A||nk(),authToken:A7()?g7()?.accessToken:void 0,...{},...M,...uB()&&{logger:EP1()}};return new FI(D)}function DQ9(A,q){let K=process.env.ANTHROPIC_AUTH_TOKEN||nZ6(q);if(K)A.Authorization=`Bearer ${K}`}function XQ9(){let A={},q=process.env.ANTHROPIC_CUSTOM_HEADERS;if(!q)return A;let K=q.split(/\n|\r\n/);for(let Y of K){if(!Y.trim())continue;let z=Y.match(/^\s*(.*?)\s*:\s*(.*?)\s*$/);if(z){let[,w,_]=z;if(w&&_!==void 0)A[w]=_}}return A}function PQ9(A,q){return A}var cU6=k(()=>{rV();bA();Q1();uD();Z8();VE();L5();G1();Xq()});function WQ9(A,q){return A&&P31(A,q,Ry)}var LP1;var QV8=k(()=>{se1();T46();LP1=WQ9});function ZQ9(A,q){var K={};return q=hB(q,3),LP1(A,function(Y,z,w){go(K,z,q(Y,z,w))}),K}var ZY6;var yP1=k(()=>{NR6();QV8();PH6();ZY6=ZQ9});import{createHash as E74,randomUUID as GQ9}from"crypto";import{dirname as L74,join as y74}from"path";import{writeFile as R74,readFile as S74,mkdir as C74}from"fs/promises";function UV8(){return!1}async function fQ9(A,q,K){if(!UV8())return await K();let Y=E74("sha1").update(U6(A)).digest("hex").slice(0,12),z=y74(process.env.CLAUDE_CODE_TEST_FIXTURES_ROOT??I1(),`fixtures/${q}-${Y}.json`);try{return O8(await S74(z,{encoding:"utf8"}))}catch(_){if(_.code!=="ENOENT")throw _}if((YA.isCI||!1)&&!$1(process.env.VCR_RECORD))throw Error(`Fixture missing: ${z}. Re-run tests with VCR_RECORD=1, then commit the result.`);let w=await K();return await C74(L74(z),{recursive:!0}),await R74(z,U6(w,null,2),{encoding:"utf8"}),w}async function SP1(A,q){if(!UV8())return await q();let K=oD(A.filter((_)=>{if(_.type!=="user")return!0;if(_.isMeta)return!1;return!0})),Y=VQ9(K.map((_)=>_.message.content),k74),z=y74(process.env.CLAUDE_CODE_TEST_FIXTURES_ROOT??I1(),`fixtures/${Y.map((_)=>E74("sha1").update(U6(_)).digest("hex").slice(0,6)).join("-")}.json`);try{let _=O8(await S74(z,{encoding:"utf8"}));return _.output.forEach(TQ9),_.output.map(($,O)=>v74($,vQ9,O,GQ9()))}catch(_){if(_.code!=="ENOENT")throw _}if(YA.isCI&&!$1(process.env.VCR_RECORD))throw Error(`Anthropic API fixture missing: ${z}. Re-run tests with VCR_RECORD=1, then commit the result. Input messages: ${U6(Y,null,2)}`);let w=await q();if(YA.isCI&&!$1(process.env.VCR_RECORD))return w;return await C74(L74(z),{recursive:!0}),await R74(z,U6({input:Y,output:w.map((_,$)=>v74(_,k74,$))},null,2),{encoding:"utf8"}),w}function TQ9(A){if(A.type==="stream_event")return;let q=A.message.model,K=A.message.usage,Y=km6(q,K);kO1(Y,K,q)}function VQ9(A,q){return A.map((K)=>{if(typeof K==="string")return q(K);return K.map((Y)=>{switch(Y.type){case"tool_result":if(typeof Y.content==="string")return{...Y,content:q(Y.content)};if(Array.isArray(Y.content))return{...Y,content:Y.content.map((z)=>{switch(z.type){case"text":return{...z,text:q(z.text)};case"image":return z;default:return}})};return Y;case"text":return{...Y,text:q(Y.text)};case"tool_use":return{...Y,input:RP1(Y.input,q)};case"image":return Y;default:return}})})}function RP1(A,q){return ZY6(A,(K,Y)=>{if(Array.isArray(K))return K.map((z)=>RP1(z,q));if(kM6(K))return RP1(K,q);return q(K,Y,A)})}function NQ9(A,q,K,Y){return{uuid:Y??`UUID-${K}`,requestId:"REQUEST_ID",timestamp:A.timestamp,message:{...A.message,content:A.message.content.map((z)=>{switch(z.type){case"text":return{...z,text:q(z.text),citations:z.citations||[]};case"tool_use":return{...z,input:RP1(z.input,q)};default:return z}}).filter(Boolean)},type:"assistant"}}function v74(A,q,K,Y){if(A.type==="assistant")return NQ9(A,q,K,Y);else return A}function k74(A){if(typeof A!=="string")return A;let q=I1(),K=OA(),Y=A.replace(/num_files="\d+"/g,'num_files="[NUM]"').replace(/duration_ms="\d+"/g,'duration_ms="[DURATION]"').replace(/cost_usd="\d+"/g,'cost_usd="[COST]"').replaceAll(K,"[CONFIG_HOME]").replaceAll(q,"[CWD]").replace(/Available commands:.+/,"Available commands: [COMMANDS]");if(process.platform==="win32"){let z=q.replaceAll("\\","/"),w=K.replaceAll("\\","/"),_=U6(q).slice(1,-1),$=U6(K).slice(1,-1);Y=Y.replaceAll(_,"[CWD]").replaceAll($,"[CONFIG_HOME]").replaceAll(z,"[CWD]").replaceAll(w,"[CONFIG_HOME]")}if(Y=Y.replace(/\[CWD\][^\s"'<>]*/g,(z)=>z.replaceAll("\\\\","/").replaceAll("\\","/")).replace(/\[CONFIG_HOME\][^\s"'<>]*/g,(z)=>z.replaceAll("\\\\","/").replaceAll("\\","/")),Y.includes("Files modified by user:"))return"Files modified by user: [FILES]";return Y}function vQ9(A){if(typeof A!=="string")return A;return A.replaceAll("[NUM]","1").replaceAll("[DURATION]","100").replaceAll("[CONFIG_HOME]",OA()).replaceAll("[CWD]",I1())}async function*pV8(A,q){if(!UV8())return yield*q();let K=[],Y=await SP1(A,async()=>{for await(let z of q())K.push(z);return K});if(Y.length>0){yield*Y;return}yield*K}async function h74(A,q,K){return(await fQ9({messages:A,tools:q},"token-count",async()=>({tokenCount:await K()}))).tokenCount}var dV8=k(()=>{K9();W7();Z8();W31();yP1();SA();ct();kE();a1()});var GY6=C((lq_,IP1)=>{function x74(A){return Array.isArray(A)?A:[A]}var kQ9=void 0,lV8="",I74=" ",cV8="\\",EQ9=/^\s+$/,LQ9=/(?:[^\\]|^)\\$/,yQ9=/^\\!/,RQ9=/^\\#/,SQ9=/\r?\n/g,CQ9=/^\.{0,2}\/|^\.{1,2}$/,hQ9=/\/$/,rZ6="/",u74="node-ignore";if(typeof Symbol<"u")u74=Symbol.for("node-ignore");var B74=u74,oZ6=(A,q,K)=>{return Object.defineProperty(A,q,{value:K}),K},IQ9=/([0-z])-([0-z])/g,m74=()=>!1,bQ9=(A)=>A.replace(IQ9,(q,K,Y)=>K.charCodeAt(0)<=Y.charCodeAt(0)?q:lV8),xQ9=(A)=>{let{length:q}=A;return A.slice(0,q-q%2)},uQ9=[[/^\uFEFF/,()=>lV8],[/((?:\\\\)*?)(\\?\s+)$/,(A,q,K)=>q+(K.indexOf("\\")===0?I74:lV8)],[/(\\+?)\s/g,(A,q)=>{let{length:K}=q;return q.slice(0,K-K%2)+I74}],[/[\\$.|*+(){^]/g,(A)=>`\\${A}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return!/\/(?!$)/.test(this)?"(?:^|\\/)":"^"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(A,q,K)=>q+6{let Y=K.replace(/\\\*/g,"[^\\/]*");return q+Y}],[/\\\\\\(?=[$.|*+(){^])/g,()=>cV8],[/\\\\/g,()=>cV8],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(A,q,K,Y,z)=>q===cV8?`\\[${K}${xQ9(Y)}${z}`:z==="]"?Y.length%2===0?`[${bQ9(K)}${Y}]`:"[]":"[]"],[/(?:[^*])$/,(A)=>/\/$/.test(A)?`${A}$`:`${A}(?=$|\\/$)`]],BQ9=/(^|\\\/)?\\\*$/,lU6="regex",CP1="checkRegex",b74="_",mQ9={[lU6](A,q){return`${q?`${q}[^/]+`:"[^/]*"}(?=$|\\/$)`},[CP1](A,q){return`${q?`${q}[^/]*`:"[^/]*"}(?=$|\\/$)`}},gQ9=(A)=>uQ9.reduce((q,[K,Y])=>q.replace(K,Y.bind(A)),A),hP1=(A)=>typeof A==="string",FQ9=(A)=>A&&hP1(A)&&!EQ9.test(A)&&!LQ9.test(A)&&A.indexOf("#")!==0,QQ9=(A)=>A.split(SQ9).filter(Boolean);class g74{constructor(A,q,K,Y,z,w){this.pattern=A,this.mark=q,this.negative=z,oZ6(this,"body",K),oZ6(this,"ignoreCase",Y),oZ6(this,"regexPrefix",w)}get regex(){let A=b74+lU6;if(this[A])return this[A];return this._make(lU6,A)}get checkRegex(){let A=b74+CP1;if(this[A])return this[A];return this._make(CP1,A)}_make(A,q){let K=this.regexPrefix.replace(BQ9,mQ9[A]),Y=this.ignoreCase?new RegExp(K,"i"):new RegExp(K);return oZ6(this,q,Y)}}var UQ9=({pattern:A,mark:q},K)=>{let Y=!1,z=A;if(z.indexOf("!")===0)Y=!0,z=z.substr(1);z=z.replace(yQ9,"!").replace(RQ9,"#");let w=gQ9(z);return new g74(A,q,z,K,Y,w)};class F74{constructor(A){this._ignoreCase=A,this._rules=[]}_add(A){if(A&&A[B74]){this._rules=this._rules.concat(A._rules._rules),this._added=!0;return}if(hP1(A))A={pattern:A};if(FQ9(A.pattern)){let q=UQ9(A,this._ignoreCase);this._added=!0,this._rules.push(q)}}add(A){return this._added=!1,x74(hP1(A)?QQ9(A):A).forEach(this._add,this),this._added}test(A,q,K){let Y=!1,z=!1,w;this._rules.forEach(($)=>{let{negative:O}=$;if(z===O&&Y!==z||O&&!Y&&!z&&!q)return;if(!$[K].test(A))return;Y=!O,z=O,w=O?kQ9:$});let _={ignored:Y,unignored:z};if(w)_.rule=w;return _}}var pQ9=(A,q)=>{throw new q(A)},Ul=(A,q,K)=>{if(!hP1(A))return K(`path must be a string, but got \`${q}\``,TypeError);if(!A)return K("path must not be empty",TypeError);if(Ul.isNotRelative(A))return K(`path should be a \`path.relative()\`d string, but got "${q}"`,RangeError);return!0},Q74=(A)=>CQ9.test(A);Ul.isNotRelative=Q74;Ul.convert=(A)=>A;class U74{constructor({ignorecase:A=!0,ignoreCase:q=A,allowRelativePaths:K=!1}={}){oZ6(this,B74,!0),this._rules=new F74(q),this._strictPathCheck=!K,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(A){if(this._rules.add(A))this._initCache();return this}addPattern(A){return this.add(A)}_test(A,q,K,Y){let z=A&&Ul.convert(A);return Ul(z,A,this._strictPathCheck?pQ9:m74),this._t(z,q,K,Y)}checkIgnore(A){if(!hQ9.test(A))return this.test(A);let q=A.split(rZ6).filter(Boolean);if(q.pop(),q.length){let K=this._t(q.join(rZ6)+rZ6,this._testCache,!0,q);if(K.ignored)return K}return this._rules.test(A,!1,CP1)}_t(A,q,K,Y){if(A in q)return q[A];if(!Y)Y=A.split(rZ6).filter(Boolean);if(Y.pop(),!Y.length)return q[A]=this._rules.test(A,K,lU6);let z=this._t(Y.join(rZ6)+rZ6,q,K,Y);return q[A]=z.ignored?z:this._rules.test(A,K,lU6)}ignores(A){return this._test(A,this._ignoreCache,!1).ignored}createFilter(){return(A)=>!this.ignores(A)}filter(A){return x74(A).filter(this.createFilter())}test(A){return this._test(A,this._testCache,!0)}}var iV8=(A)=>new U74(A),dQ9=(A)=>Ul(A&&Ul.convert(A),A,m74),p74=()=>{let A=(K)=>/^\\\\\?\\/.test(K)||/["<>|\u0000-\u001F]+/u.test(K)?K:K.replace(/\\/g,"/");Ul.convert=A;let q=/^[a-z]:\//i;Ul.isNotRelative=(K)=>q.test(K)||Q74(K)};if(typeof process<"u"&&process.platform==="win32")p74();IP1.exports=iV8;iV8.default=iV8;IP1.exports.isPathValid=dQ9;oZ6(IP1.exports,Symbol.for("setupWindows"),p74)});var iU6=C((iq_,c74)=>{var d74={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:"[^/]",END_ANCHOR:"(?:\\/|$)",DOTS_SLASH:"\\.{1,2}(?:\\/|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|\\/)\\.{1,2}(?:\\/|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:\\/|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:\\/|$))",QMARK_NO_DOT:"[^.\\/]",STAR:"[^/]*?",START_ANCHOR:"(?:^|\\/)",SEP:"/"},cQ9={...d74,SLASH_LITERAL:"[\\\\/]",QMARK:"[^\\\\/]",STAR:"[^\\\\/]*?",DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},lQ9={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};c74.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:lQ9,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(A){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${A.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(A){return A===!0?cQ9:d74}}});var nU6=C((aQ9)=>{var{REGEX_BACKSLASH:iQ9,REGEX_REMOVE_BACKSLASH:nQ9,REGEX_SPECIAL_CHARS:rQ9,REGEX_SPECIAL_CHARS_GLOBAL:oQ9}=iU6();aQ9.isObject=(A)=>A!==null&&typeof A==="object"&&!Array.isArray(A);aQ9.hasRegexChars=(A)=>rQ9.test(A);aQ9.isRegexChar=(A)=>A.length===1&&aQ9.hasRegexChars(A);aQ9.escapeRegex=(A)=>A.replace(oQ9,"\\$1");aQ9.toPosixSlashes=(A)=>A.replace(iQ9,"/");aQ9.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let A=navigator.platform.toLowerCase();return A==="win32"||A==="windows"}if(typeof process<"u"&&process.platform)return process.platform==="win32";return!1};aQ9.removeBackslashes=(A)=>{return A.replace(nQ9,(q)=>{return q==="\\"?"":q})};aQ9.escapeLast=(A,q,K)=>{let Y=A.lastIndexOf(q,K);if(Y===-1)return A;if(A[Y-1]==="\\")return aQ9.escapeLast(A,q,Y-1);return`${A.slice(0,Y)}\\${A.slice(Y)}`};aQ9.removePrefix=(A,q={})=>{let K=A;if(K.startsWith("./"))K=K.slice(2),q.prefix="./";return K};aQ9.wrapOutput=(A,q={},K={})=>{let Y=K.contains?"":"^",z=K.contains?"":"$",w=`${Y}(?:${A})${z}`;if(q.negated===!0)w=`(?:^(?!${w}).*$)`;return w};aQ9.basename=(A,{windows:q}={})=>{let K=A.split(q?/[\\/]/:"/"),Y=K[K.length-1];if(Y==="")return K[K.length-2];return Y}});var A44=C((rq_,e74)=>{var n74=nU6(),{CHAR_ASTERISK:nV8,CHAR_AT:_U9,CHAR_BACKWARD_SLASH:rU6,CHAR_COMMA:$U9,CHAR_DOT:rV8,CHAR_EXCLAMATION_MARK:oV8,CHAR_FORWARD_SLASH:t74,CHAR_LEFT_CURLY_BRACE:aV8,CHAR_LEFT_PARENTHESES:sV8,CHAR_LEFT_SQUARE_BRACKET:OU9,CHAR_PLUS:HU9,CHAR_QUESTION_MARK:r74,CHAR_RIGHT_CURLY_BRACE:jU9,CHAR_RIGHT_PARENTHESES:o74,CHAR_RIGHT_SQUARE_BRACKET:JU9}=iU6(),a74=(A)=>{return A===t74||A===rU6},s74=(A)=>{if(A.isPrefix!==!0)A.depth=A.isGlobstar?1/0:1},MU9=(A,q)=>{let K=q||{},Y=A.length-1,z=K.parts===!0||K.scanToEnd===!0,w=[],_=[],$=[],O=A,H=-1,j=0,J=0,M=!1,D=!1,X=!1,P=!1,W=!1,Z=!1,G=!1,f=!1,V=!1,N=!1,v=0,y,R,h={value:"",depth:0,isGlob:!1},B=()=>H>=Y,x=()=>O.charCodeAt(H+1),F=()=>{return y=R,O.charCodeAt(++H)};while(H0)b=O.slice(0,j),O=O.slice(j),J-=j;if(g&&X===!0&&J>0)g=O.slice(0,J),U=O.slice(J);else if(X===!0)g="",U=O;else g=O;if(g&&g!==""&&g!=="/"&&g!==O){if(a74(g.charCodeAt(g.length-1)))g=g.slice(0,-1)}if(K.unescape===!0){if(U)U=n74.removeBackslashes(U);if(g&&G===!0)g=n74.removeBackslashes(g)}let d={prefix:b,input:A,start:j,base:g,glob:U,isBrace:M,isBracket:D,isGlob:X,isExtglob:P,isGlobstar:W,negated:f,negatedExtglob:V};if(K.tokens===!0){if(d.maxDepth=0,!a74(R))_.push(h);d.tokens=_}if(K.parts===!0||K.tokens===!0){let l;for(let t=0;t{var bP1=iU6(),wF=nU6(),{MAX_LENGTH:xP1,POSIX_REGEX_SOURCE:DU9,REGEX_NON_SPECIAL_CHARS:XU9,REGEX_SPECIAL_CHARS_BACKREF:PU9,REPLACEMENTS:q44}=bP1,WU9=(A,q)=>{if(typeof q.expandRange==="function")return q.expandRange(...A,q);A.sort();let K=`[${A.join("-")}]`;try{new RegExp(K)}catch(Y){return A.map((z)=>wF.escapeRegex(z)).join("..")}return K},aZ6=(A,q)=>{return`Missing ${A}: "${q}" - use "\\\\${q}" to match literal characters`},tV8=(A,q)=>{if(typeof A!=="string")throw TypeError("Expected a string");A=q44[A]||A;let K={...q},Y=typeof K.maxLength==="number"?Math.min(xP1,K.maxLength):xP1,z=A.length;if(z>Y)throw SyntaxError(`Input length: ${z}, exceeds maximum allowed length: ${Y}`);let w={type:"bos",value:"",output:K.prepend||""},_=[w],$=K.capture?"":"?:",O=bP1.globChars(K.windows),H=bP1.extglobChars(O),{DOT_LITERAL:j,PLUS_LITERAL:J,SLASH_LITERAL:M,ONE_CHAR:D,DOTS_SLASH:X,NO_DOT:P,NO_DOT_SLASH:W,NO_DOTS_SLASH:Z,QMARK:G,QMARK_NO_DOT:f,STAR:V,START_ANCHOR:N}=O,v=(P6)=>{return`(${$}(?:(?!${N}${P6.dot?X:j}).)*?)`},y=K.dot?"":P,R=K.dot?G:f,h=K.bash===!0?v(K):V;if(K.capture)h=`(${h})`;if(typeof K.noext==="boolean")K.noextglob=K.noext;let B={input:A,index:-1,start:0,dot:K.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:_};A=wF.removePrefix(A,B),z=A.length;let x=[],F=[],g=[],b=w,U,d=()=>B.index===z-1,l=B.peek=(P6=1)=>A[B.index+P6],t=B.advance=()=>A[++B.index]||"",s=()=>A.slice(B.index+1),H6=(P6="",A6=0)=>{B.consumed+=P6,B.index+=A6},Z6=(P6)=>{B.output+=P6.output!=null?P6.output:P6.value,H6(P6.value)},G6=()=>{let P6=1;while(l()==="!"&&(l(2)!=="("||l(3)==="?"))t(),B.start++,P6++;if(P6%2===0)return!1;return B.negated=!0,B.start++,!0},q6=(P6)=>{B[P6]++,g.push(P6)},w6=(P6)=>{B[P6]--,g.pop()},j6=(P6)=>{if(b.type==="globstar"){let A6=B.braces>0&&(P6.type==="comma"||P6.type==="brace"),K6=P6.extglob===!0||x.length&&(P6.type==="pipe"||P6.type==="paren");if(P6.type!=="slash"&&P6.type!=="paren"&&!A6&&!K6)B.output=B.output.slice(0,-b.output.length),b.type="star",b.value="*",b.output=h,B.output+=b.output}if(x.length&&P6.type!=="paren")x[x.length-1].inner+=P6.value;if(P6.value||P6.output)Z6(P6);if(b&&b.type==="text"&&P6.type==="text"){b.output=(b.output||b.value)+P6.value,b.value+=P6.value;return}P6.prev=b,_.push(P6),b=P6},_6=(P6,A6)=>{let K6={...H[A6],conditions:1,inner:""};K6.prev=b,K6.parens=B.parens,K6.output=B.output;let z6=(K.capture?"(":"")+K6.open;q6("parens"),j6({type:P6,value:A6,output:B.output?"":D}),j6({type:"paren",extglob:!0,value:t(),output:z6}),x.push(K6)},k6=(P6)=>{let A6=P6.close+(K.capture?")":""),K6;if(P6.type==="negate"){let z6=h;if(P6.inner&&P6.inner.length>1&&P6.inner.includes("/"))z6=v(K);if(z6!==h||d()||/^\)+$/.test(s()))A6=P6.close=`)$))${z6}`;if(P6.inner.includes("*")&&(K6=s())&&/^\.[^\\/.]+$/.test(K6)){let a=tV8(K6,{...q,fastpaths:!1}).output;A6=P6.close=`)${a})${z6})`}if(P6.prev.type==="bos")B.negatedExtglob=!0}j6({type:"paren",extglob:!0,value:U,output:A6}),w6("parens")};if(K.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(A)){let P6=!1,A6=A.replace(PU9,(K6,z6,a,r,X6,O6)=>{if(r==="\\")return P6=!0,K6;if(r==="?"){if(z6)return z6+r+(X6?G.repeat(X6.length):"");if(O6===0)return R+(X6?G.repeat(X6.length):"");return G.repeat(a.length)}if(r===".")return j.repeat(a.length);if(r==="*"){if(z6)return z6+r+(X6?h:"");return h}return z6?K6:`\\${K6}`});if(P6===!0)if(K.unescape===!0)A6=A6.replace(/\\/g,"");else A6=A6.replace(/\\+/g,(K6)=>{return K6.length%2===0?"\\\\":K6?"\\":""});if(A6===A&&K.contains===!0)return B.output=A,B;return B.output=wF.wrapOutput(A6,B,q),B}while(!d()){if(U=t(),U==="\x00")continue;if(U==="\\"){let K6=l();if(K6==="/"&&K.bash!==!0)continue;if(K6==="."||K6===";")continue;if(!K6){U+="\\",j6({type:"text",value:U});continue}let z6=/^\\+/.exec(s()),a=0;if(z6&&z6[0].length>2){if(a=z6[0].length,B.index+=a,a%2!==0)U+="\\"}if(K.unescape===!0)U=t();else U+=t();if(B.brackets===0){j6({type:"text",value:U});continue}}if(B.brackets>0&&(U!=="]"||b.value==="["||b.value==="[^")){if(K.posix!==!1&&U===":"){let K6=b.value.slice(1);if(K6.includes("[")){if(b.posix=!0,K6.includes(":")){let z6=b.value.lastIndexOf("["),a=b.value.slice(0,z6),r=b.value.slice(z6+2),X6=DU9[r];if(X6){if(b.value=a+X6,B.backtrack=!0,t(),!w.output&&_.indexOf(b)===1)w.output=D;continue}}}}if(U==="["&&l()!==":"||U==="-"&&l()==="]")U=`\\${U}`;if(U==="]"&&(b.value==="["||b.value==="[^"))U=`\\${U}`;if(K.posix===!0&&U==="!"&&b.value==="[")U="^";b.value+=U,Z6({value:U});continue}if(B.quotes===1&&U!=='"'){U=wF.escapeRegex(U),b.value+=U,Z6({value:U});continue}if(U==='"'){if(B.quotes=B.quotes===1?0:1,K.keepQuotes===!0)j6({type:"text",value:U});continue}if(U==="("){q6("parens"),j6({type:"paren",value:U});continue}if(U===")"){if(B.parens===0&&K.strictBrackets===!0)throw SyntaxError(aZ6("opening","("));let K6=x[x.length-1];if(K6&&B.parens===K6.parens+1){k6(x.pop());continue}j6({type:"paren",value:U,output:B.parens?")":"\\)"}),w6("parens");continue}if(U==="["){if(K.nobracket===!0||!s().includes("]")){if(K.nobracket!==!0&&K.strictBrackets===!0)throw SyntaxError(aZ6("closing","]"));U=`\\${U}`}else q6("brackets");j6({type:"bracket",value:U});continue}if(U==="]"){if(K.nobracket===!0||b&&b.type==="bracket"&&b.value.length===1){j6({type:"text",value:U,output:`\\${U}`});continue}if(B.brackets===0){if(K.strictBrackets===!0)throw SyntaxError(aZ6("opening","["));j6({type:"text",value:U,output:`\\${U}`});continue}w6("brackets");let K6=b.value.slice(1);if(b.posix!==!0&&K6[0]==="^"&&!K6.includes("/"))U=`/${U}`;if(b.value+=U,Z6({value:U}),K.literalBrackets===!1||wF.hasRegexChars(K6))continue;let z6=wF.escapeRegex(b.value);if(B.output=B.output.slice(0,-b.value.length),K.literalBrackets===!0){B.output+=z6,b.value=z6;continue}b.value=`(${$}${z6}|${b.value})`,B.output+=b.value;continue}if(U==="{"&&K.nobrace!==!0){q6("braces");let K6={type:"brace",value:U,output:"(",outputIndex:B.output.length,tokensIndex:B.tokens.length};F.push(K6),j6(K6);continue}if(U==="}"){let K6=F[F.length-1];if(K.nobrace===!0||!K6){j6({type:"text",value:U,output:U});continue}let z6=")";if(K6.dots===!0){let a=_.slice(),r=[];for(let X6=a.length-1;X6>=0;X6--){if(_.pop(),a[X6].type==="brace")break;if(a[X6].type!=="dots")r.unshift(a[X6].value)}z6=WU9(r,K),B.backtrack=!0}if(K6.comma!==!0&&K6.dots!==!0){let a=B.output.slice(0,K6.outputIndex),r=B.tokens.slice(K6.tokensIndex);K6.value=K6.output="\\{",U=z6="\\}",B.output=a;for(let X6 of r)B.output+=X6.output||X6.value}j6({type:"brace",value:U,output:z6}),w6("braces"),F.pop();continue}if(U==="|"){if(x.length>0)x[x.length-1].conditions++;j6({type:"text",value:U});continue}if(U===","){let K6=U,z6=F[F.length-1];if(z6&&g[g.length-1]==="braces")z6.comma=!0,K6="|";j6({type:"comma",value:U,output:K6});continue}if(U==="/"){if(b.type==="dot"&&B.index===B.start+1){B.start=B.index+1,B.consumed="",B.output="",_.pop(),b=w;continue}j6({type:"slash",value:U,output:M});continue}if(U==="."){if(B.braces>0&&b.type==="dot"){if(b.value===".")b.output=j;let K6=F[F.length-1];b.type="dots",b.output+=U,b.value+=U,K6.dots=!0;continue}if(B.braces+B.parens===0&&b.type!=="bos"&&b.type!=="slash"){j6({type:"text",value:U,output:j});continue}j6({type:"dot",value:U,output:j});continue}if(U==="?"){if(!(b&&b.value==="(")&&K.noextglob!==!0&&l()==="("&&l(2)!=="?"){_6("qmark",U);continue}if(b&&b.type==="paren"){let z6=l(),a=U;if(b.value==="("&&!/[!=<:]/.test(z6)||z6==="<"&&!/<([!=]|\w+>)/.test(s()))a=`\\${U}`;j6({type:"text",value:U,output:a});continue}if(K.dot!==!0&&(b.type==="slash"||b.type==="bos")){j6({type:"qmark",value:U,output:f});continue}j6({type:"qmark",value:U,output:G});continue}if(U==="!"){if(K.noextglob!==!0&&l()==="("){if(l(2)!=="?"||!/[!=<:]/.test(l(3))){_6("negate",U);continue}}if(K.nonegate!==!0&&B.index===0){G6();continue}}if(U==="+"){if(K.noextglob!==!0&&l()==="("&&l(2)!=="?"){_6("plus",U);continue}if(b&&b.value==="("||K.regex===!1){j6({type:"plus",value:U,output:J});continue}if(b&&(b.type==="bracket"||b.type==="paren"||b.type==="brace")||B.parens>0){j6({type:"plus",value:U});continue}j6({type:"plus",value:J});continue}if(U==="@"){if(K.noextglob!==!0&&l()==="("&&l(2)!=="?"){j6({type:"at",extglob:!0,value:U,output:""});continue}j6({type:"text",value:U});continue}if(U!=="*"){if(U==="$"||U==="^")U=`\\${U}`;let K6=XU9.exec(s());if(K6)U+=K6[0],B.index+=K6[0].length;j6({type:"text",value:U});continue}if(b&&(b.type==="globstar"||b.star===!0)){b.type="star",b.star=!0,b.value+=U,b.output=h,B.backtrack=!0,B.globstar=!0,H6(U);continue}let P6=s();if(K.noextglob!==!0&&/^\([^?]/.test(P6)){_6("star",U);continue}if(b.type==="star"){if(K.noglobstar===!0){H6(U);continue}let K6=b.prev,z6=K6.prev,a=K6.type==="slash"||K6.type==="bos",r=z6&&(z6.type==="star"||z6.type==="globstar");if(K.bash===!0&&(!a||P6[0]&&P6[0]!=="/")){j6({type:"star",value:U,output:""});continue}let X6=B.braces>0&&(K6.type==="comma"||K6.type==="brace"),O6=x.length&&(K6.type==="pipe"||K6.type==="paren");if(!a&&K6.type!=="paren"&&!X6&&!O6){j6({type:"star",value:U,output:""});continue}while(P6.slice(0,3)==="/**"){let D6=A[B.index+4];if(D6&&D6!=="/")break;P6=P6.slice(3),H6("/**",3)}if(K6.type==="bos"&&d()){b.type="globstar",b.value+=U,b.output=v(K),B.output=b.output,B.globstar=!0,H6(U);continue}if(K6.type==="slash"&&K6.prev.type!=="bos"&&!r&&d()){B.output=B.output.slice(0,-(K6.output+b.output).length),K6.output=`(?:${K6.output}`,b.type="globstar",b.output=v(K)+(K.strictSlashes?")":"|$)"),b.value+=U,B.globstar=!0,B.output+=K6.output+b.output,H6(U);continue}if(K6.type==="slash"&&K6.prev.type!=="bos"&&P6[0]==="/"){let D6=P6[1]!==void 0?"|$":"";B.output=B.output.slice(0,-(K6.output+b.output).length),K6.output=`(?:${K6.output}`,b.type="globstar",b.output=`${v(K)}${M}|${M}${D6})`,b.value+=U,B.output+=K6.output+b.output,B.globstar=!0,H6(U+t()),j6({type:"slash",value:"/",output:""});continue}if(K6.type==="bos"&&P6[0]==="/"){b.type="globstar",b.value+=U,b.output=`(?:^|${M}|${v(K)}${M})`,B.output=b.output,B.globstar=!0,H6(U+t()),j6({type:"slash",value:"/",output:""});continue}B.output=B.output.slice(0,-b.output.length),b.type="globstar",b.output=v(K),b.value+=U,B.output+=b.output,B.globstar=!0,H6(U);continue}let A6={type:"star",value:U,output:h};if(K.bash===!0){if(A6.output=".*?",b.type==="bos"||b.type==="slash")A6.output=y+A6.output;j6(A6);continue}if(b&&(b.type==="bracket"||b.type==="paren")&&K.regex===!0){A6.output=U,j6(A6);continue}if(B.index===B.start||b.type==="slash"||b.type==="dot"){if(b.type==="dot")B.output+=W,b.output+=W;else if(K.dot===!0)B.output+=Z,b.output+=Z;else B.output+=y,b.output+=y;if(l()!=="*")B.output+=D,b.output+=D}j6(A6)}while(B.brackets>0){if(K.strictBrackets===!0)throw SyntaxError(aZ6("closing","]"));B.output=wF.escapeLast(B.output,"["),w6("brackets")}while(B.parens>0){if(K.strictBrackets===!0)throw SyntaxError(aZ6("closing",")"));B.output=wF.escapeLast(B.output,"("),w6("parens")}while(B.braces>0){if(K.strictBrackets===!0)throw SyntaxError(aZ6("closing","}"));B.output=wF.escapeLast(B.output,"{"),w6("braces")}if(K.strictSlashes!==!0&&(b.type==="star"||b.type==="bracket"))j6({type:"maybe_slash",value:"",output:`${M}?`});if(B.backtrack===!0){B.output="";for(let P6 of B.tokens)if(B.output+=P6.output!=null?P6.output:P6.value,P6.suffix)B.output+=P6.suffix}return B};tV8.fastpaths=(A,q)=>{let K={...q},Y=typeof K.maxLength==="number"?Math.min(xP1,K.maxLength):xP1,z=A.length;if(z>Y)throw SyntaxError(`Input length: ${z}, exceeds maximum allowed length: ${Y}`);A=q44[A]||A;let{DOT_LITERAL:w,SLASH_LITERAL:_,ONE_CHAR:$,DOTS_SLASH:O,NO_DOT:H,NO_DOTS:j,NO_DOTS_SLASH:J,STAR:M,START_ANCHOR:D}=bP1.globChars(K.windows),X=K.dot?j:H,P=K.dot?J:H,W=K.capture?"":"?:",Z={negated:!1,prefix:""},G=K.bash===!0?".*?":M;if(K.capture)G=`(${G})`;let f=(y)=>{if(y.noglobstar===!0)return G;return`(${W}(?:(?!${D}${y.dot?O:w}).)*?)`},V=(y)=>{switch(y){case"*":return`${X}${$}${G}`;case".*":return`${w}${$}${G}`;case"*.*":return`${X}${G}${w}${$}${G}`;case"*/*":return`${X}${G}${_}${$}${P}${G}`;case"**":return X+f(K);case"**/*":return`(?:${X}${f(K)}${_})?${P}${$}${G}`;case"**/*.*":return`(?:${X}${f(K)}${_})?${P}${G}${w}${$}${G}`;case"**/.*":return`(?:${X}${f(K)}${_})?${w}${$}${G}`;default:{let R=/^(.*?)\.(\w+)$/.exec(y);if(!R)return;let h=V(R[1]);if(!h)return;return h+w+R[2]}}},N=wF.removePrefix(A,Z),v=V(N);if(v&&K.strictSlashes!==!0)v+=`${_}?`;return v};K44.exports=tV8});var _44=C((aq_,w44)=>{var ZU9=A44(),eV8=Y44(),z44=nU6(),GU9=iU6(),fU9=(A)=>A&&typeof A==="object"&&!Array.isArray(A),IJ=(A,q,K=!1)=>{if(Array.isArray(A)){let j=A.map((M)=>IJ(M,q,K));return(M)=>{for(let D of j){let X=D(M);if(X)return X}return!1}}let Y=fU9(A)&&A.tokens&&A.input;if(A===""||typeof A!=="string"&&!Y)throw TypeError("Expected pattern to be a non-empty string");let z=q||{},w=z.windows,_=Y?IJ.compileRe(A,q):IJ.makeRe(A,q,!1,!0),$=_.state;delete _.state;let O=()=>!1;if(z.ignore){let j={...q,ignore:null,onMatch:null,onResult:null};O=IJ(z.ignore,j,K)}let H=(j,J=!1)=>{let{isMatch:M,match:D,output:X}=IJ.test(j,_,q,{glob:A,posix:w}),P={glob:A,state:$,regex:_,posix:w,input:j,output:X,match:D,isMatch:M};if(typeof z.onResult==="function")z.onResult(P);if(M===!1)return P.isMatch=!1,J?P:!1;if(O(j)){if(typeof z.onIgnore==="function")z.onIgnore(P);return P.isMatch=!1,J?P:!1}if(typeof z.onMatch==="function")z.onMatch(P);return J?P:!0};if(K)H.state=$;return H};IJ.test=(A,q,K,{glob:Y,posix:z}={})=>{if(typeof A!=="string")throw TypeError("Expected input to be a string");if(A==="")return{isMatch:!1,output:""};let w=K||{},_=w.format||(z?z44.toPosixSlashes:null),$=A===Y,O=$&&_?_(A):A;if($===!1)O=_?_(A):A,$=O===Y;if($===!1||w.capture===!0)if(w.matchBase===!0||w.basename===!0)$=IJ.matchBase(A,q,K,z);else $=q.exec(O);return{isMatch:Boolean($),match:$,output:O}};IJ.matchBase=(A,q,K)=>{return(q instanceof RegExp?q:IJ.makeRe(q,K)).test(z44.basename(A))};IJ.isMatch=(A,q,K)=>IJ(q,K)(A);IJ.parse=(A,q)=>{if(Array.isArray(A))return A.map((K)=>IJ.parse(K,q));return eV8(A,{...q,fastpaths:!1})};IJ.scan=(A,q)=>ZU9(A,q);IJ.compileRe=(A,q,K=!1,Y=!1)=>{if(K===!0)return A.output;let z=q||{},w=z.contains?"":"^",_=z.contains?"":"$",$=`${w}(?:${A.output})${_}`;if(A&&A.negated===!0)$=`^(?!${$}).*$`;let O=IJ.toRegex($,q);if(Y===!0)O.state=A;return O};IJ.makeRe=(A,q={},K=!1,Y=!1)=>{if(!A||typeof A!=="string")throw TypeError("Expected a non-empty string");let z={negated:!1,fastpaths:!0};if(q.fastpaths!==!1&&(A[0]==="."||A[0]==="*"))z.output=eV8.fastpaths(A,q);if(!z.output)z=eV8(A,q);return IJ.compileRe(z,q,K,Y)};IJ.toRegex=(A,q)=>{try{let K=q||{};return new RegExp(A,K.flags||(K.nocase?"i":""))}catch(K){if(q&&q.debug===!0)throw K;return/$^/}};IJ.constants=GU9;w44.exports=IJ});var j44=C((sq_,H44)=>{var $44=_44(),TU9=nU6();function O44(A,q,K=!1){if(q&&(q.windows===null||q.windows===void 0))q={...q,windows:TU9.isWindows()};return $44(A,q,K)}Object.assign(O44,$44);H44.exports=O44});function qN8(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function W44(A){TY6=A}function V2(A,q=""){let K=typeof A==="string"?A:A.source,Y={replace:(z,w)=>{let _=typeof w==="string"?w:w.source;return _=_.replace(WT.caret,"$1"),K=K.replace(z,_),Y},getRegex:()=>{return new RegExp(K,q)}};return Y}function _F(A,q){if(q){if(WT.escapeTest.test(A))return A.replace(WT.escapeReplace,M44)}else if(WT.escapeTestNoEncode.test(A))return A.replace(WT.escapeReplaceNoEncode,M44);return A}function D44(A){try{A=encodeURI(A).replace(WT.percentDecode,"%")}catch{return null}return A}function X44(A,q){let K=A.replace(WT.findPipe,(w,_,$)=>{let O=!1,H=_;while(--H>=0&&$[H]==="\\")O=!O;if(O)return"|";else return" |"}),Y=K.split(WT.splitPipe),z=0;if(!Y[0].trim())Y.shift();if(Y.length>0&&!Y.at(-1)?.trim())Y.pop();if(q)if(Y.length>q)Y.splice(q);else while(Y.length{let _=w.match(K.other.beginningSpace);if(_===null)return w;let[$]=_;if($.length>=z.length)return w.slice(z.length);return w}).join(` `)}class eU6{options;rules;lexer;constructor(A){this.options=A||TY6}space(A){let q=this.rules.block.newline.exec(A);if(q&&q[0].length>0)return{type:"space",raw:q[0]}}code(A){let q=this.rules.block.code.exec(A);if(q){let K=q[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:q[0],codeBlockStyle:"indented",text:!this.options.pedantic?aU6(K,` `):K}}}fences(A){let q=this.rules.block.fences.exec(A);if(q){let K=q[0],Y=Ap9(K,q[3]||"",this.rules);return{type:"code",raw:K,lang:q[2]?q[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):q[2],text:Y}}}heading(A){let q=this.rules.block.heading.exec(A);if(q){let K=q[2].trim();if(this.rules.other.endingHash.test(K)){let Y=aU6(K,"#");if(this.options.pedantic)K=Y.trim();else if(!Y||this.rules.other.endingSpaceChar.test(Y))K=Y.trim()}return{type:"heading",raw:q[0],depth:q[1].length,text:K,tokens:this.lexer.inline(K)}}}hr(A){let q=this.rules.block.hr.exec(A);if(q)return{type:"hr",raw:aU6(q[0],` `)}}blockquote(A){let q=this.rules.block.blockquote.exec(A);if(q){let K=aU6(q[0],` `).split(` `),Y="",z="",w=[];while(K.length>0){let _=!1,$=[],O;for(O=0;O1,z={type:"list",raw:"",ordered:Y,start:Y?+K.slice(0,-1):"",loose:!1,items:[]};if(K=Y?`\\d{1,9}\\${K.slice(-1)}`:`\\${K}`,this.options.pedantic)K=Y?K:"[*+-]";let w=this.rules.other.listItemRegex(K),_=!1;while(A){let O=!1,H="",j="";if(!(q=w.exec(A)))break;if(this.rules.block.hr.test(A))break;H=q[0],A=A.substring(H.length);let J=q[2].split(` `,1)[0].replace(this.rules.other.listReplaceTabs,(Z)=>" ".repeat(3*Z.length)),M=A.split(` `,1)[0],D=!J.trim(),X=0;if(this.options.pedantic)X=2,j=J.trimStart();else if(D)X=q[1].length+1;else X=q[2].search(this.rules.other.nonSpaceChar),X=X>4?1:X,j=J.slice(X),X+=q[1].length;if(D&&this.rules.other.blankLine.test(M))H+=M+` `,A=A.substring(M.length+1),O=!0;if(!O){let Z=this.rules.other.nextBulletRegex(X),G=this.rules.other.hrRegex(X),f=this.rules.other.fencesBeginRegex(X),V=this.rules.other.headingBeginRegex(X),N=this.rules.other.htmlBeginRegex(X);while(A){let v=A.split(` `,1)[0],y;if(M=v,this.options.pedantic)M=M.replace(this.rules.other.listReplaceNesting," "),y=M;else y=M.replace(this.rules.other.tabCharGlobal," ");if(f.test(M))break;if(V.test(M))break;if(N.test(M))break;if(Z.test(M))break;if(G.test(M))break;if(y.search(this.rules.other.nonSpaceChar)>=X||!M.trim())j+=` `+y.slice(X);else{if(D)break;if(J.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(f.test(J))break;if(V.test(J))break;if(G.test(J))break;j+=` `+M}if(!D&&!M.trim())D=!0;H+=v+` `,A=A.substring(v.length+1),J=y.slice(X)}}if(!z.loose){if(_)z.loose=!0;else if(this.rules.other.doubleBlankLine.test(H))_=!0}let P=null,W;if(this.options.gfm){if(P=this.rules.other.listIsTask.exec(j),P)W=P[0]!=="[ ] ",j=j.replace(this.rules.other.listReplaceTask,"")}z.items.push({type:"list_item",raw:H,task:!!P,checked:W,loose:!1,text:j,tokens:[]}),z.raw+=H}let $=z.items.at(-1);if($)$.raw=$.raw.trimEnd(),$.text=$.text.trimEnd();else return;z.raw=z.raw.trimEnd();for(let O=0;OJ.type==="space"),j=H.length>0&&H.some((J)=>this.rules.other.anyLine.test(J.raw));z.loose=j}if(z.loose)for(let O=0;O{return{text:$,tokens:this.lexer.inline($),header:!1,align:w.align[O]}}));return w}lheading(A){let q=this.rules.block.lheading.exec(A);if(q)return{type:"heading",raw:q[0],depth:q[2].charAt(0)==="="?1:2,text:q[1],tokens:this.lexer.inline(q[1])}}paragraph(A){let q=this.rules.block.paragraph.exec(A);if(q){let K=q[1].charAt(q[1].length-1)===` `?q[1].slice(0,-1):q[1];return{type:"paragraph",raw:q[0],text:K,tokens:this.lexer.inline(K)}}}text(A){let q=this.rules.block.text.exec(A);if(q)return{type:"text",raw:q[0],text:q[0],tokens:this.lexer.inline(q[0])}}escape(A){let q=this.rules.inline.escape.exec(A);if(q)return{type:"escape",raw:q[0],text:q[1]}}tag(A){let q=this.rules.inline.tag.exec(A);if(q){if(!this.lexer.state.inLink&&this.rules.other.startATag.test(q[0]))this.lexer.state.inLink=!0;else if(this.lexer.state.inLink&&this.rules.other.endATag.test(q[0]))this.lexer.state.inLink=!1;if(!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(q[0]))this.lexer.state.inRawBlock=!0;else if(this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(q[0]))this.lexer.state.inRawBlock=!1;return{type:"html",raw:q[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:q[0]}}}link(A){let q=this.rules.inline.link.exec(A);if(q){let K=q[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(K)){if(!this.rules.other.endAngleBracket.test(K))return;let w=aU6(K.slice(0,-1),"\\");if((K.length-w.length)%2===0)return}else{let w=eU9(q[2],"()");if(w>-1){let $=(q[0].indexOf("!")===0?5:4)+q[1].length+w;q[2]=q[2].substring(0,w),q[0]=q[0].substring(0,$).trim(),q[3]=""}}let Y=q[2],z="";if(this.options.pedantic){let w=this.rules.other.pedanticHrefTitle.exec(Y);if(w)Y=w[1],z=w[3]}else z=q[3]?q[3].slice(1,-1):"";if(Y=Y.trim(),this.rules.other.startAngleBracket.test(Y))if(this.options.pedantic&&!this.rules.other.endAngleBracket.test(K))Y=Y.slice(1);else Y=Y.slice(1,-1);return P44(q,{href:Y?Y.replace(this.rules.inline.anyPunctuation,"$1"):Y,title:z?z.replace(this.rules.inline.anyPunctuation,"$1"):z},q[0],this.lexer,this.rules)}}reflink(A,q){let K;if((K=this.rules.inline.reflink.exec(A))||(K=this.rules.inline.nolink.exec(A))){let Y=(K[2]||K[1]).replace(this.rules.other.multipleSpaceGlobal," "),z=q[Y.toLowerCase()];if(!z){let w=K[0].charAt(0);return{type:"text",raw:w,text:w}}return P44(K,z,K[0],this.lexer,this.rules)}}emStrong(A,q,K=""){let Y=this.rules.inline.emStrongLDelim.exec(A);if(!Y)return;if(Y[3]&&K.match(this.rules.other.unicodeAlphaNumeric))return;if(!(Y[1]||Y[2])||!K||this.rules.inline.punctuation.exec(K)){let w=[...Y[0]].length-1,_,$,O=w,H=0,j=Y[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;j.lastIndex=0,q=q.slice(-1*A.length+w);while((Y=j.exec(q))!=null){if(_=Y[1]||Y[2]||Y[3]||Y[4]||Y[5]||Y[6],!_)continue;if($=[..._].length,Y[3]||Y[4]){O+=$;continue}else if(Y[5]||Y[6]){if(w%3&&!((w+$)%3)){H+=$;continue}}if(O-=$,O>0)continue;$=Math.min($,$+O+H);let J=[...Y[0]][0].length,M=A.slice(0,w+Y.index+J+$);if(Math.min(w,$)%2){let X=M.slice(1,-1);return{type:"em",raw:M,text:X,tokens:this.lexer.inlineTokens(X)}}let D=M.slice(2,-2);return{type:"strong",raw:M,text:D,tokens:this.lexer.inlineTokens(D)}}}}codespan(A){let q=this.rules.inline.code.exec(A);if(q){let K=q[2].replace(this.rules.other.newLineCharGlobal," "),Y=this.rules.other.nonSpaceChar.test(K),z=this.rules.other.startingSpaceChar.test(K)&&this.rules.other.endingSpaceChar.test(K);if(Y&&z)K=K.substring(1,K.length-1);return{type:"codespan",raw:q[0],text:K}}}br(A){let q=this.rules.inline.br.exec(A);if(q)return{type:"br",raw:q[0]}}del(A){let q=this.rules.inline.del.exec(A);if(q)return{type:"del",raw:q[0],text:q[2],tokens:this.lexer.inlineTokens(q[2])}}autolink(A){let q=this.rules.inline.autolink.exec(A);if(q){let K,Y;if(q[2]==="@")K=q[1],Y="mailto:"+K;else K=q[1],Y=K;return{type:"link",raw:q[0],text:K,href:Y,tokens:[{type:"text",raw:K,text:K}]}}}url(A){let q;if(q=this.rules.inline.url.exec(A)){let K,Y;if(q[2]==="@")K=q[0],Y="mailto:"+K;else{let z;do z=q[0],q[0]=this.rules.inline._backpedal.exec(q[0])?.[0]??"";while(z!==q[0]);if(K=q[0],q[1]==="www.")Y="http://"+q[0];else Y=q[0]}return{type:"link",raw:q[0],text:K,href:Y,tokens:[{type:"text",raw:K,text:K}]}}}inlineText(A){let q=this.rules.inline.text.exec(A);if(q){let K=this.lexer.state.inRawBlock;return{type:"text",raw:q[0],text:q[0],escaped:K}}}}class ZT{tokens;options;state;tokenizer;inlineQueue;constructor(A){this.tokens=[],this.tokens.links=Object.create(null),this.options=A||TY6,this.options.tokenizer=this.options.tokenizer||new eU6,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let q={other:WT,block:uP1.normal,inline:oU6.normal};if(this.options.pedantic)q.block=uP1.pedantic,q.inline=oU6.pedantic;else if(this.options.gfm)if(q.block=uP1.gfm,this.options.breaks)q.inline=oU6.breaks;else q.inline=oU6.gfm;this.tokenizer.rules=q}static get rules(){return{block:uP1,inline:oU6}}static lex(A,q){return new ZT(q).lex(A)}static lexInline(A,q){return new ZT(q).inlineTokens(A)}lex(A){A=A.replace(WT.carriageReturn,` `),this.blockTokens(A,this.tokens);for(let q=0;q{if(Y=w.call({lexer:this},A,q))return A=A.substring(Y.raw.length),q.push(Y),!0;return!1}))continue;if(Y=this.tokenizer.space(A)){A=A.substring(Y.raw.length);let w=q.at(-1);if(Y.raw.length===1&&w!==void 0)w.raw+=` `;else q.push(Y);continue}if(Y=this.tokenizer.code(A)){A=A.substring(Y.raw.length);let w=q.at(-1);if(w?.type==="paragraph"||w?.type==="text")w.raw+=` `+Y.raw,w.text+=` `+Y.text,this.inlineQueue.at(-1).src=w.text;else q.push(Y);continue}if(Y=this.tokenizer.fences(A)){A=A.substring(Y.raw.length),q.push(Y);continue}if(Y=this.tokenizer.heading(A)){A=A.substring(Y.raw.length),q.push(Y);continue}if(Y=this.tokenizer.hr(A)){A=A.substring(Y.raw.length),q.push(Y);continue}if(Y=this.tokenizer.blockquote(A)){A=A.substring(Y.raw.length),q.push(Y);continue}if(Y=this.tokenizer.list(A)){A=A.substring(Y.raw.length),q.push(Y);continue}if(Y=this.tokenizer.html(A)){A=A.substring(Y.raw.length),q.push(Y);continue}if(Y=this.tokenizer.def(A)){A=A.substring(Y.raw.length);let w=q.at(-1);if(w?.type==="paragraph"||w?.type==="text")w.raw+=` `+Y.raw,w.text+=` `+Y.raw,this.inlineQueue.at(-1).src=w.text;else if(!this.tokens.links[Y.tag])this.tokens.links[Y.tag]={href:Y.href,title:Y.title};continue}if(Y=this.tokenizer.table(A)){A=A.substring(Y.raw.length),q.push(Y);continue}if(Y=this.tokenizer.lheading(A)){A=A.substring(Y.raw.length),q.push(Y);continue}let z=A;if(this.options.extensions?.startBlock){let w=1/0,_=A.slice(1),$;if(this.options.extensions.startBlock.forEach((O)=>{if($=O.call({lexer:this},_),typeof $==="number"&&$>=0)w=Math.min(w,$)}),w<1/0&&w>=0)z=A.substring(0,w+1)}if(this.state.top&&(Y=this.tokenizer.paragraph(z))){let w=q.at(-1);if(K&&w?.type==="paragraph")w.raw+=` `+Y.raw,w.text+=` `+Y.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=w.text;else q.push(Y);K=z.length!==A.length,A=A.substring(Y.raw.length);continue}if(Y=this.tokenizer.text(A)){A=A.substring(Y.raw.length);let w=q.at(-1);if(w?.type==="text")w.raw+=` `+Y.raw,w.text+=` `+Y.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=w.text;else q.push(Y);continue}if(A){let w="Infinite loop on byte: "+A.charCodeAt(0);if(this.options.silent){console.error(w);break}else throw Error(w)}}return this.state.top=!0,q}inline(A,q=[]){return this.inlineQueue.push({src:A,tokens:q}),q}inlineTokens(A,q=[]){let K=A,Y=null;if(this.tokens.links){let _=Object.keys(this.tokens.links);if(_.length>0){while((Y=this.tokenizer.rules.inline.reflinkSearch.exec(K))!=null)if(_.includes(Y[0].slice(Y[0].lastIndexOf("[")+1,-1)))K=K.slice(0,Y.index)+"["+"a".repeat(Y[0].length-2)+"]"+K.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)}}while((Y=this.tokenizer.rules.inline.blockSkip.exec(K))!=null)K=K.slice(0,Y.index)+"["+"a".repeat(Y[0].length-2)+"]"+K.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);while((Y=this.tokenizer.rules.inline.anyPunctuation.exec(K))!=null)K=K.slice(0,Y.index)+"++"+K.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let z=!1,w="";while(A){if(!z)w="";z=!1;let _;if(this.options.extensions?.inline?.some((O)=>{if(_=O.call({lexer:this},A,q))return A=A.substring(_.raw.length),q.push(_),!0;return!1}))continue;if(_=this.tokenizer.escape(A)){A=A.substring(_.raw.length),q.push(_);continue}if(_=this.tokenizer.tag(A)){A=A.substring(_.raw.length),q.push(_);continue}if(_=this.tokenizer.link(A)){A=A.substring(_.raw.length),q.push(_);continue}if(_=this.tokenizer.reflink(A,this.tokens.links)){A=A.substring(_.raw.length);let O=q.at(-1);if(_.type==="text"&&O?.type==="text")O.raw+=_.raw,O.text+=_.text;else q.push(_);continue}if(_=this.tokenizer.emStrong(A,K,w)){A=A.substring(_.raw.length),q.push(_);continue}if(_=this.tokenizer.codespan(A)){A=A.substring(_.raw.length),q.push(_);continue}if(_=this.tokenizer.br(A)){A=A.substring(_.raw.length),q.push(_);continue}if(_=this.tokenizer.del(A)){A=A.substring(_.raw.length),q.push(_);continue}if(_=this.tokenizer.autolink(A)){A=A.substring(_.raw.length),q.push(_);continue}if(!this.state.inLink&&(_=this.tokenizer.url(A))){A=A.substring(_.raw.length),q.push(_);continue}let $=A;if(this.options.extensions?.startInline){let O=1/0,H=A.slice(1),j;if(this.options.extensions.startInline.forEach((J)=>{if(j=J.call({lexer:this},H),typeof j==="number"&&j>=0)O=Math.min(O,j)}),O<1/0&&O>=0)$=A.substring(0,O+1)}if(_=this.tokenizer.inlineText($)){if(A=A.substring(_.raw.length),_.raw.slice(-1)!=="_")w=_.raw.slice(-1);z=!0;let O=q.at(-1);if(O?.type==="text")O.raw+=_.raw,O.text+=_.text;else q.push(_);continue}if(A){let O="Infinite loop on byte: "+A.charCodeAt(0);if(this.options.silent){console.error(O);break}else throw Error(O)}}return q}}class Ap6{options;parser;constructor(A){this.options=A||TY6}space(A){return""}code({text:A,lang:q,escaped:K}){let Y=(q||"").match(WT.notSpaceStart)?.[0],z=A.replace(WT.endingNewline,"")+` `;if(!Y)return"
"+(K?z:_F(z,!0))+`
`;return'
'+(K?z:_F(z,!0))+`
`}blockquote({tokens:A}){return`
${this.parser.parse(A)}
`}html({text:A}){return A}heading({tokens:A,depth:q}){return`${this.parser.parseInline(A)} `}hr(A){return`
`}list(A){let{ordered:q,start:K}=A,Y="";for(let _=0;_ `+Y+" `}listitem(A){let q="";if(A.task){let K=this.checkbox({checked:!!A.checked});if(A.loose)if(A.tokens[0]?.type==="paragraph"){if(A.tokens[0].text=K+" "+A.tokens[0].text,A.tokens[0].tokens&&A.tokens[0].tokens.length>0&&A.tokens[0].tokens[0].type==="text")A.tokens[0].tokens[0].text=K+" "+_F(A.tokens[0].tokens[0].text),A.tokens[0].tokens[0].escaped=!0}else A.tokens.unshift({type:"text",raw:K+" ",text:K+" ",escaped:!0});else q+=K+" "}return q+=this.parser.parse(A.tokens,!!A.loose),`
  • ${q}
  • `}checkbox({checked:A}){return"'}paragraph({tokens:A}){return`

    ${this.parser.parseInline(A)}

    `}table(A){let q="",K="";for(let z=0;z${Y}`;return` `+q+` `+Y+`
    `}tablerow({text:A}){return` ${A} `}tablecell(A){let q=this.parser.parseInline(A.tokens),K=A.header?"th":"td";return(A.align?`<${K} align="${A.align}">`:`<${K}>`)+q+` `}strong({tokens:A}){return`${this.parser.parseInline(A)}`}em({tokens:A}){return`${this.parser.parseInline(A)}`}codespan({text:A}){return`${_F(A,!0)}`}br(A){return"
    "}del({tokens:A}){return`${this.parser.parseInline(A)}`}link({href:A,title:q,tokens:K}){let Y=this.parser.parseInline(K),z=D44(A);if(z===null)return Y;A=z;let w='",w}image({href:A,title:q,text:K}){let Y=D44(A);if(Y===null)return _F(K);A=Y;let z=`${K}{let _=z[w].flat(1/0);K=K.concat(this.walkTokens(_,q))});else if(z.tokens)K=K.concat(this.walkTokens(z.tokens,q))}}return K}use(...A){let q=this.defaults.extensions||{renderers:{},childTokens:{}};return A.forEach((K)=>{let Y={...K};if(Y.async=this.defaults.async||Y.async||!1,K.extensions)K.extensions.forEach((z)=>{if(!z.name)throw Error("extension name required");if("renderer"in z){let w=q.renderers[z.name];if(w)q.renderers[z.name]=function(..._){let $=z.renderer.apply(this,_);if($===!1)$=w.apply(this,_);return $};else q.renderers[z.name]=z.renderer}if("tokenizer"in z){if(!z.level||z.level!=="block"&&z.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let w=q[z.level];if(w)w.unshift(z.tokenizer);else q[z.level]=[z.tokenizer];if(z.start){if(z.level==="block")if(q.startBlock)q.startBlock.push(z.start);else q.startBlock=[z.start];else if(z.level==="inline")if(q.startInline)q.startInline.push(z.start);else q.startInline=[z.start]}}if("childTokens"in z&&z.childTokens)q.childTokens[z.name]=z.childTokens}),Y.extensions=q;if(K.renderer){let z=this.defaults.renderer||new Ap6(this.defaults);for(let w in K.renderer){if(!(w in z))throw Error(`renderer '${w}' does not exist`);if(["options","parser"].includes(w))continue;let _=w,$=K.renderer[_],O=z[_];z[_]=(...H)=>{let j=$.apply(z,H);if(j===!1)j=O.apply(z,H);return j||""}}Y.renderer=z}if(K.tokenizer){let z=this.defaults.tokenizer||new eU6(this.defaults);for(let w in K.tokenizer){if(!(w in z))throw Error(`tokenizer '${w}' does not exist`);if(["options","rules","lexer"].includes(w))continue;let _=w,$=K.tokenizer[_],O=z[_];z[_]=(...H)=>{let j=$.apply(z,H);if(j===!1)j=O.apply(z,H);return j}}Y.tokenizer=z}if(K.hooks){let z=this.defaults.hooks||new tU6;for(let w in K.hooks){if(!(w in z))throw Error(`hook '${w}' does not exist`);if(["options","block"].includes(w))continue;let _=w,$=K.hooks[_],O=z[_];if(tU6.passThroughHooks.has(w))z[_]=(H)=>{if(this.defaults.async)return Promise.resolve($.call(z,H)).then((J)=>{return O.call(z,J)});let j=$.call(z,H);return O.call(z,j)};else z[_]=(...H)=>{let j=$.apply(z,H);if(j===!1)j=O.apply(z,H);return j}}Y.hooks=z}if(K.walkTokens){let z=this.defaults.walkTokens,w=K.walkTokens;Y.walkTokens=function(_){let $=[];if($.push(w.call(this,_)),z)$=$.concat(z.call(this,_));return $}}this.defaults={...this.defaults,...Y}}),this}setOptions(A){return this.defaults={...this.defaults,...A},this}lexer(A,q){return ZT.lex(A,q??this.defaults)}parser(A,q){return LS.parse(A,q??this.defaults)}parseMarkdown(A){return(K,Y)=>{let z={...Y},w={...this.defaults,...z},_=this.onError(!!w.silent,!!w.async);if(this.defaults.async===!0&&z.async===!1)return _(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof K>"u"||K===null)return _(Error("marked(): input parameter is undefined or null"));if(typeof K!=="string")return _(Error("marked(): input parameter is of type "+Object.prototype.toString.call(K)+", string expected"));if(w.hooks)w.hooks.options=w,w.hooks.block=A;let $=w.hooks?w.hooks.provideLexer():A?ZT.lex:ZT.lexInline,O=w.hooks?w.hooks.provideParser():A?LS.parse:LS.parseInline;if(w.async)return Promise.resolve(w.hooks?w.hooks.preprocess(K):K).then((H)=>$(H,w)).then((H)=>w.hooks?w.hooks.processAllTokens(H):H).then((H)=>w.walkTokens?Promise.all(this.walkTokens(H,w.walkTokens)).then(()=>H):H).then((H)=>O(H,w)).then((H)=>w.hooks?w.hooks.postprocess(H):H).catch(_);try{if(w.hooks)K=w.hooks.preprocess(K);let H=$(K,w);if(w.hooks)H=w.hooks.processAllTokens(H);if(w.walkTokens)this.walkTokens(H,w.walkTokens);let j=O(H,w);if(w.hooks)j=w.hooks.postprocess(j);return j}catch(H){return _(H)}}}onError(A,q){return(K)=>{if(K.message+=` Please report this to https://github.com/markedjs/marked.`,A){let Y="

    An error occurred:

    "+_F(K.message+"",!0)+"
    ";if(q)return Promise.resolve(Y);return Y}if(q)return Promise.reject(K);throw K}}}function kY(A,q){return fY6.parse(A,q)}var TY6,sU6,WT,VU9,NU9,vU9,qp6,kU9,Z44,G44,KN8,EU9,YN8,LU9,yU9,mP1="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",zN8,RU9,f44,SU9,wN8,J44,CU9,hU9,IU9,bU9,T44,xU9,gP1,_N8,V44,uU9,N44,BU9,mU9,gU9,v44,FU9,QU9,k44="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",UU9,pU9,dU9,cU9,lU9,iU9,nU9,BP1,rU9,E44,L44,oU9,$N8,aU9,AN8,sU9,uP1,oU6,tU9,M44=(A)=>tU9[A],tU6,fY6,tq_,eq_,AK_,qK_,KK_,YK_,zK_;var Kp6=k(()=>{TY6=qN8();sU6={exec:()=>null};WT={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^
    /i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(A)=>new RegExp(`^( {0,3}${A})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(A)=>new RegExp(`^ {0,${Math.min(3,A-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(A)=>new RegExp(`^ {0,${Math.min(3,A-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(A)=>new RegExp(`^ {0,${Math.min(3,A-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(A)=>new RegExp(`^ {0,${Math.min(3,A-1)}}#`),htmlBeginRegex:(A)=>new RegExp(`^ {0,${Math.min(3,A-1)}}<(?:[a-z].*>|!--)`,"i")},VU9=/^(?:[ \t]*(?:\n|$))+/,NU9=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,vU9=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,qp6=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,kU9=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Z44=/(?:[*+-]|\d{1,9}[.)])/,G44=V2(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Z44).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),KN8=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,EU9=/^[^\n]+/,YN8=/(?!\s*\])(?:\\.|[^\[\]\\])+/,LU9=V2(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",YN8).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),yU9=V2(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Z44).getRegex(),zN8=/|$))/,RU9=V2("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",zN8).replace("tag",mP1).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),f44=V2(KN8).replace("hr",qp6).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",mP1).getRegex(),SU9=V2(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",f44).getRegex(),wN8={blockquote:SU9,code:NU9,def:LU9,fences:vU9,heading:kU9,hr:qp6,html:RU9,lheading:G44,list:yU9,newline:VU9,paragraph:f44,table:sU6,text:EU9},J44=V2("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",qp6).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",mP1).getRegex(),CU9={...wN8,table:J44,paragraph:V2(KN8).replace("hr",qp6).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",J44).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",mP1).getRegex()},hU9={...wN8,html:V2(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",zN8).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:sU6,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:V2(KN8).replace("hr",qp6).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",G44).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},IU9=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bU9=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,T44=/^( {2,}|\\)\n(?!\s*$)/,xU9=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,v44=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,FU9=V2(v44,"u").replace(/punct/g,gP1).getRegex(),QU9=V2(v44,"u").replace(/punct/g,N44).getRegex(),UU9=V2(k44,"gu").replace(/notPunctSpace/g,V44).replace(/punctSpace/g,_N8).replace(/punct/g,gP1).getRegex(),pU9=V2(k44,"gu").replace(/notPunctSpace/g,mU9).replace(/punctSpace/g,BU9).replace(/punct/g,N44).getRegex(),dU9=V2("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,V44).replace(/punctSpace/g,_N8).replace(/punct/g,gP1).getRegex(),cU9=V2(/\\(punct)/,"gu").replace(/punct/g,gP1).getRegex(),lU9=V2(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),iU9=V2(zN8).replace("(?:-->|$)","-->").getRegex(),nU9=V2("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",iU9).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),BP1=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rU9=V2(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",BP1).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),E44=V2(/^!?\[(label)\]\[(ref)\]/).replace("label",BP1).replace("ref",YN8).getRegex(),L44=V2(/^!?\[(ref)\](?:\[\])?/).replace("ref",YN8).getRegex(),oU9=V2("reflink|nolink(?!\\()","g").replace("reflink",E44).replace("nolink",L44).getRegex(),$N8={_backpedal:sU6,anyPunctuation:cU9,autolink:lU9,blockSkip:gU9,br:T44,code:bU9,del:sU6,emStrongLDelim:FU9,emStrongRDelimAst:UU9,emStrongRDelimUnd:dU9,escape:IU9,link:rU9,nolink:L44,punctuation:uU9,reflink:E44,reflinkSearch:oU9,tag:nU9,text:xU9,url:sU6},aU9={...$N8,link:V2(/^!?\[(label)\]\((.*?)\)/).replace("label",BP1).getRegex(),reflink:V2(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",BP1).getRegex()},AN8={...$N8,emStrongRDelimAst:pU9,emStrongLDelim:QU9,url:V2(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"};tU6=class tU6{options;block;constructor(A){this.options=A||TY6}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(A){return A}postprocess(A){return A}processAllTokens(A){return A}provideLexer(){return this.block?ZT.lex:ZT.lexInline}provideParser(){return this.block?LS.parse:LS.parseInline}};fY6=new y44;kY.options=kY.setOptions=function(A){return fY6.setOptions(A),kY.defaults=fY6.defaults,W44(kY.defaults),kY};kY.getDefaults=qN8;kY.defaults=TY6;kY.use=function(...A){return fY6.use(...A),kY.defaults=fY6.defaults,W44(kY.defaults),kY};kY.walkTokens=function(A,q){return fY6.walkTokens(A,q)};kY.parseInline=fY6.parseInline;kY.Parser=LS;kY.parser=LS.parse;kY.Renderer=Ap6;kY.TextRenderer=FP1;kY.Lexer=ZT;kY.lexer=ZT.lex;kY.Tokenizer=eU6;kY.Hooks=tU6;kY.parse=kY;tq_=kY.options,eq_=kY.setOptions,AK_=kY.use,qK_=kY.walkTokens,KK_=kY.parseInline,YK_=LS.parse,zK_=ZT.lex});import{normalize as QP1}from"path";class R44{cache;constructor(A,q){this.cache=new ck({max:A,maxSize:q,sizeCalculation:(K)=>Math.max(1,Buffer.byteLength(K.content))})}get(A){return this.cache.get(QP1(A))}set(A,q){return this.cache.set(QP1(A),q),this}has(A){return this.cache.has(QP1(A))}delete(A){return this.cache.delete(QP1(A))}clear(){this.cache.clear()}get size(){return this.cache.size}get max(){return this.cache.max}get maxSize(){return this.cache.maxSize}get calculatedSize(){return this.cache.calculatedSize}keys(){return this.cache.keys()}entries(){return this.cache.entries()}dump(){return this.cache.dump()}load(A){this.cache.load(A)}}function pl(A,q=qp9){return new R44(A,q)}function ON8(A){return Object.fromEntries(A.entries())}function $F(A){return Array.from(A.keys())}function dl(A){let q=pl(A.max,A.maxSize);return q.load(A.dump()),q}function sZ6(A,q){let K=dl(A);for(let[Y,z]of q.entries()){let w=K.get(Y);if(!w||z.timestamp>w.timestamp)K.set(Y,z)}return K}var VY6=100,qp9=26214400;var OG=k(()=>{aJ6()});function C44(A){if(typeof A!=="string")return;return S44.find((q)=>q===A)}var S44,h44,I44,UP1,pP1;var dP1=k(()=>{S44=["user","feedback","project","reference"];h44=["## Types of memory","","There are several discrete types of memory that you can store in your memory system. Each type below declares a of `private`, `team`, or guidance for choosing between the two.","","",""," user"," always private"," Contain information about the user's role, goals, responsibilities, and knowledge. Great user memories help you tailor your future behavior to the user's preferences and perspective. Your goal in reading and writing these memories is to build up an understanding of who the user is and how you can be most helpful to them specifically. For example, you should collaborate with a senior software engineer differently than a student who is coding for the very first time. Keep in mind, that the aim here is to be helpful to the user. Avoid writing memories about the user that could be viewed as a negative judgement or that are not relevant to the work you're trying to accomplish together."," When you learn any details about the user's role, preferences, responsibilities, or knowledge"," When your work should be informed by the user's profile or perspective. For example, if the user is asking you to explain a part of the code, you should answer that question in a way that is tailored to the specific details that they will find most valuable or that helps them build their mental model in relation to domain knowledge they already have."," "," user: I'm a data scientist investigating what logging we have in place"," assistant: [saves private user memory: user is a data scientist, currently focused on observability/logging]",""," user: I've been writing Go for ten years but this is my first time touching the React side of this repo"," assistant: [saves private user memory: deep Go expertise, new to React and this project's frontend — frame frontend explanations in terms of backend analogues]"," ","",""," feedback"," default to private. Save as team only when the correction is clearly a project-wide convention that every contributor should follow (e.g., a testing policy, a build invariant), not a personal style preference."," Guidance or correction the user has given you. These are a very important type of memory to read and write as they allow you to remain coherent and responsive to the way you should approach work in the project. Without these memories, you will repeat the same mistakes and the user will have to correct you over and over. Before saving a private feedback memory, check that it doesn't contradict a team feedback memory — if it does, either don't save it or note the override explicitly.",` Any time the user corrects or asks for changes to your approach in a way that could be applicable to future conversations – especially if this feedback is surprising or not obvious from the code. These often take the form of "no not that, instead do...", "lets not...", "don't...". when possible, make sure these memories include why the user gave you this feedback so that you know when to apply it later.`," Let these memories guide your behavior so that the user and other users in the project do not need to offer the same guidance twice."," "," user: don't mock the database in these tests — we got burned last quarter when mocked tests passed but the prod migration failed"," assistant: [saves team feedback memory: integration tests must hit a real database, not mocks. Reason: prior incident where mock/prod divergence masked a broken migration. Team scope: this is a project testing policy, not a personal preference]",""," user: stop summarizing what you just did at the end of every response, I can read the diff"," assistant: [saves private feedback memory: this user wants terse responses with no trailing summaries. Private because it's a communication preference, not a project convention]"," ","",""," project"," private or team, but strongly bias toward team"," Information that you learn about ongoing work, goals, initiatives, bugs, or incidents within the project that is not otherwise derivable from the code or git history. Project memories help you understand the broader context and motivation behind the work users are working on within this working directory.",' When you learn who is doing what, why, or by when. These states change relatively quickly so try to keep your understanding of this up to date. Always convert relative dates in user messages to absolute dates when saving (e.g., "Thursday" → "2026-03-05"), so the memory remains interpretable after time passes.'," Use these memories to more fully understand the details and nuance behind the user's request, anticipate coordination issues across users, make better informed suggestions."," "," user: we're freezing all non-critical merges after Thursday — mobile team is cutting a release branch"," assistant: [saves team project memory: merge freeze begins 2026-03-05 for mobile release cut. Flag any non-critical PR work scheduled after that date]",""," user: the reason we're ripping out the old auth middleware is that legal flagged it for storing session tokens in a way that doesn't meet the new compliance requirements"," assistant: [saves team project memory: auth middleware rewrite is driven by legal/compliance requirements around session token storage, not tech-debt cleanup — scope decisions should favor compliance over ergonomics]"," ","",""," reference"," usually team"," Stores pointers to where information can be found in external systems. These memories allow you to remember where to look to find up-to-date information outside of the project directory."," When you learn about resources in external systems and their purpose. For example, that bugs are tracked in a specific project in Linear or that feedback can be found in a specific Slack channel."," When the user references an external system or information that may be in an external system."," ",` user: check the Linear project "INGEST" if you want context on these tickets, that's where we track all pipeline bugs`,' assistant: [saves team reference memory: pipeline bugs are tracked in Linear project "INGEST"]',""," user: the Grafana board at grafana.internal/d/api-latency is what oncall watches — if you're touching request handling, that's the thing that'll page someone"," assistant: [saves team reference memory: grafana.internal/d/api-latency is the oncall latency dashboard — check it when editing request-path code]"," ","","",""],I44=["## Types of memory","","There are several discrete types of memory that you can store in your memory system:","","",""," user"," Contain information about the user's role, goals, responsibilities, and knowledge. Great user memories help you tailor your future behavior to the user's preferences and perspective. Your goal in reading and writing these memories is to build up an understanding of who the user is and how you can be most helpful to them specifically. For example, you should collaborate with a senior software engineer differently than a student who is coding for the very first time. Keep in mind, that the aim here is to be helpful to the user. Avoid writing memories about the user that could be viewed as a negative judgement or that are not relevant to the work you're trying to accomplish together."," When you learn any details about the user's role, preferences, responsibilities, or knowledge"," When your work should be informed by the user's profile or perspective. For example, if the user is asking you to explain a part of the code, you should answer that question in a way that is tailored to the specific details that they will find most valuable or that helps them build their mental model in relation to domain knowledge they already have."," "," user: I'm a data scientist investigating what logging we have in place"," assistant: [saves user memory: user is a data scientist, currently focused on observability/logging]",""," user: I've been writing Go for ten years but this is my first time touching the React side of this repo"," assistant: [saves user memory: deep Go expertise, new to React and this project's frontend — frame frontend explanations in terms of backend analogues]"," ","",""," feedback"," Guidance or correction the user has given you. These are a very important type of memory to read and write as they allow you to remain coherent and responsive to the way you should approach work in the project. Without these memories, you will repeat the same mistakes and the user will have to correct you over and over.",` Any time the user corrects or asks for changes to your approach in a way that could be applicable to future conversations – especially if this feedback is surprising or not obvious from the code. These often take the form of "no not that, instead do...", "lets not...", "don't...". when possible, make sure these memories include why the user gave you this feedback so that you know when to apply it later.`," Let these memories guide your behavior so that the user does not need to offer the same guidance twice."," "," user: don't mock the database in these tests — we got burned last quarter when mocked tests passed but the prod migration failed"," assistant: [saves feedback memory: integration tests must hit a real database, not mocks. Reason: prior incident where mock/prod divergence masked a broken migration]",""," user: stop summarizing what you just did at the end of every response, I can read the diff"," assistant: [saves feedback memory: this user wants terse responses with no trailing summaries]"," ","",""," project"," Information that you learn about ongoing work, goals, initiatives, bugs, or incidents within the project that is not otherwise derivable from the code or git history. Project memories help you understand the broader context and motivation behind the work the user is doing within this working directory.",' When you learn who is doing what, why, or by when. These states change relatively quickly so try to keep your understanding of this up to date. Always convert relative dates in user messages to absolute dates when saving (e.g., "Thursday" → "2026-03-05"), so the memory remains interpretable after time passes.'," Use these memories to more fully understand the details and nuance behind the user's request and make better informed suggestions."," "," user: we're freezing all non-critical merges after Thursday — mobile team is cutting a release branch"," assistant: [saves project memory: merge freeze begins 2026-03-05 for mobile release cut. Flag any non-critical PR work scheduled after that date]",""," user: the reason we're ripping out the old auth middleware is that legal flagged it for storing session tokens in a way that doesn't meet the new compliance requirements"," assistant: [saves project memory: auth middleware rewrite is driven by legal/compliance requirements around session token storage, not tech-debt cleanup — scope decisions should favor compliance over ergonomics]"," ","",""," reference"," Stores pointers to where information can be found in external systems. These memories allow you to remember where to look to find up-to-date information outside of the project directory."," When you learn about resources in external systems and their purpose. For example, that bugs are tracked in a specific project in Linear or that feedback can be found in a specific Slack channel."," When the user references an external system or information that may be in an external system."," ",` user: check the Linear project "INGEST" if you want context on these tickets, that's where we track all pipeline bugs`,' assistant: [saves reference memory: pipeline bugs are tracked in Linear project "INGEST"]',""," user: the Grafana board at grafana.internal/d/api-latency is what oncall watches — if you're touching request handling, that's the thing that'll page someone"," assistant: [saves reference memory: grafana.internal/d/api-latency is the oncall latency dashboard — check it when editing request-path code]"," ","","",""],UP1=["## What NOT to save in memory","","- Code patterns, conventions, architecture, file paths, or project structure — these can be derived by reading the current project state.","- Git history, recent changes, or who-changed-what — `git log` / `git blame` are authoritative.","- Debugging solutions or fix recipes — the fix is in the code; the commit message has the context.","- Anything already documented in CLAUDE.md files.","- Ephemeral task details: in-progress work, temporary state, current conversation context."],pP1=["```markdown","---","name: {{memory name}}","description: {{one-line description — used to decide relevance in future conversations, so be specific}}",`type: {{${S44.join(", ")}}}`,"---","","{{memory content}}","```"]});function cH(){if(!$1(process.env.EMBEDDED_SEARCH_TOOLS))return!1;let A=process.env.CLAUDE_CODE_ENTRYPOINT;return A!=="sdk-ts"&&A!=="sdk-py"&&A!=="sdk-cli"}function b44(){return process.execPath}var Ax=k(()=>{Z8()});var W66={};m1(W66,{validateTeamMemWritePath:()=>wp9,validateTeamMemKey:()=>JN8,isTeamMemoryEnabled:()=>lP1,isTeamMemPath:()=>g44,isTeamMemFile:()=>Yp6,getTeamMemPath:()=>yS,getTeamMemEntrypoint:()=>zp9,PathTraversalError:()=>MP});import{dirname as x44,join as cP1,resolve as HN8,sep as jN8}from"path";import{realpath as u44,lstat as Kp9}from"fs/promises";function Yp9(A){if(A.includes("\x00"))throw new MP(`Null byte in path key: "${A}"`);let q;try{q=decodeURIComponent(A)}catch{q=A}if(q!==A&&(q.includes("..")||q.includes("/")))throw new MP(`URL-encoded traversal in path key: "${A}"`);let K=A.normalize("NFKC");if(K!==A&&(K.includes("..")||K.includes("/")||K.includes("\\")||K.includes("\x00")))throw new MP(`Unicode-normalized traversal in path key: "${A}"`);if(A.includes("\\"))throw new MP(`Backslash in path key: "${A}"`);if(A.startsWith("/"))throw new MP(`Absolute path key: "${A}"`);return A}function lP1(){if(!G9())return!1;return p8("tengu_herring_clock",!1)}function yS(){return(cP1(mD(),"team")+jN8).normalize("NFC")}function zp9(){return cP1(mD(),"team","MEMORY.md")}async function B44(A){let q=[],K=A;for(let Y=x44(K);K!==Y;Y=x44(K))try{let z=await u44(K);return q.length===0?z:cP1(z,...q.reverse())}catch(z){let w=z.code;if(w==="ENOENT")try{if((await Kp9(K)).isSymbolicLink())throw new MP(`Dangling symlink detected (target does not exist): "${K}"`)}catch(_){if(_ instanceof MP)throw _}else if(w==="ELOOP")throw new MP(`Symlink loop detected in path: "${K}"`);else if(w!=="ENOTDIR"&&w!=="ENAMETOOLONG")throw new MP(`Cannot verify path containment (${w}): "${K}"`);q.push(K.slice(Y.length+jN8.length)),K=Y}return A}async function m44(A){let q;try{q=await u44(yS().replace(/[/\\]+$/,""))}catch(K){let Y=K.code;if(Y==="ENOENT"||Y==="ENOTDIR")return!0;return!1}if(A===q)return!0;return A.startsWith(q+jN8)}function g44(A){let q=HN8(A),K=yS();return q.startsWith(K)}async function wp9(A){if(A.includes("\x00"))throw new MP(`Null byte in path: "${A}"`);let q=HN8(A),K=yS();if(!q.startsWith(K))throw new MP(`Path escapes team memory directory: "${A}"`);let Y=await B44(q);if(!await m44(Y))throw new MP(`Path escapes team memory directory via symlink: "${A}"`);return q}async function JN8(A){Yp9(A);let q=yS(),K=cP1(q,A),Y=HN8(K);if(!Y.startsWith(q))throw new MP(`Key escapes team memory directory: "${A}"`);let z=await B44(Y);if(!await m44(z))throw new MP(`Key escapes team memory directory via symlink: "${A}"`);return Y}function Yp6(A){return lP1()&&g44(A)}var MP;var RS=k(()=>{GJ();rA();MP=class MP extends Error{constructor(A){super(A);this.name="PathTraversalError"}}});var F44={};m1(F44,{buildTypedCombinedMemoryPrompt:()=>$p9,buildCombinedMemoryPrompt:()=>_p9});function _p9(){let A=mD(),q=yS();return["# Memory","","You have two persistent memory systems:","",`1. **User memory** at \`${A}\` — private between you and the user, persists across your conversations`,`2. **Team memory** at \`${q}\` — shared with all users in the same organization, automatically synced across conversations`,"","Use these directories to build knowledge over multiple conversations and become a more effective and helpful agent over time. It is very important that you build up context and knowledge in these directories so that the user feels like they can trust you to help with meaningful projects across conversations.","","## You MUST access memories when:","- Specific known memories (personal or team) seem relevant to the task at hand.","- The user seems to be referring to work you may have done in a prior conversation with them or other users in their organization.","- The user explicitly asks you to check memory, recall, or remember.","","## You MUST save memories when:","- You encounter information that might be useful in future conversations. Whenever you find new information, think to yourself whether it would be helpful to have if you started a new conversation tomorrow. If the answer is yes, save or update your memory before you continue work on your task.",`- When the user describes what they are working on, their goals, or the broader context of their project (e.g., "I'm building...", "we're migrating to...", "the goal is..."), save this so you can reference it in future sessions.`,'- If a user explicitly asks you to remember a piece of information, you MUST save it before continuing your work. Messages like this will often begin with "never...", "always...", "next time...", "remember..." etc.',"- If a user explicitly asks you to forget or stop remembering information, you MUST find and remove the relevant entry from the appropriate memory.","- If the user corrects you on something you stated from memory (personal or team), you MUST update or remove the incorrect entry. A correction means the stored memory is wrong — fix it at the source before continuing, so the same mistake does not repeat in future conversations or for other team members.","- When in doubt about whether something is worth saving, save it — it is better to prune and curate memories later than it is to fail to remember and have users correct you later.","","## What to save in user memory (private):","- User preferences for workflow, tools, or communication style. Especially if the user corrects or guides you during the conversation.","- Information that might help you understand the user's personal projects and goals.","- Solutions to problems you have encountered with the current user that are unlikely to recur for other users.","- Any information the user has explicitly asked you to remember.","","## What to save in team memory (shared):","- Reusable patterns and conventions within the project that are not otherwise documented in the CLAUDE.md files.","- Project or goal information that might help you understand the intent of future and ongoing work within the user's organization.","- Architectural decisions, important file paths, and project structure.","- Solutions to problems that are likely to recur across users or conversations.","- Insights that may help you with future debugging conversations with all users that might contribute to this project.","- Any information the user explicitly has asked you to remember for the team or commit to team memory.","","## What not to save:","- You MUST NEVER save secrets, credentials, API keys, tokens, passwords, or other sensitive data in team memory. Team memory syncs to all repository collaborators as plaintext files. Writes containing detected secrets will be automatically rejected.","- Ephemeral task details: information that is only relevant to the current task at hand like in-progress work or temporary state.","- User-specific preferences in team memory: Not all new information will be useful to all members of the user's organization. For example, one user might prefer a functional programming style and another might prefer OOP. If you determine that a memory is user-specific, save it to user memory instead.","- Information that duplicates or contradicts existing CLAUDE.md instructions.","- Information that you'd like to remember for later on in this conversation. Remember that your conversation will be automatically compressed and so you effectively have an unlimited context for this conversation. It is not necessary or useful to use memory for this purpose.","","## Choosing between user memory and team memory:",'- If the user explicitly says "remember" or "save", use user memory.','- If the user explicitly says "remember for the team" or "save to team memory", use team memory.',"- If the information is about personal preferences, style, or workflow specific to this user, use user memory.","- If the information is about project conventions, architecture, or shared knowledge, use team memory.","- If unclear, ask which memory to use.","","## How to save memories:","You should save memory files using this format:","","```markdown","---","name: {{memory name}}","description: {{one-line description. This is used to decide if a memory will be useful in future conversations, so try to make your description very specific to the actual content of the memory.}}","---","","{{memory content}}","```","","- Keep the name and description fields of memories up-to-date with the memory content","- Organize memory semantically by topic, not chronologically","- Use the Write and Edit tools to update your memory files",`- Each directory has a \`${OO}\` entrypoint loaded into your conversation context — lines after ${aD} will be truncated, so keep them concise`,"- Create separate topic files (e.g., `debugging.md`, `patterns.md`) for detailed notes and link to them from MEMORY.md","- Update or remove memories that turn out to be wrong or outdated","- Do not write duplicate memories. First check if there is an existing memory you can update before writing a new one.","","## Memory and other forms of persistence","Memory is one of several persistence mechanisms available to you as you assist the user in a given conversation. The distinction is often that memory can be recalled in future conversations and should not be used for persisting information that is only useful within the scope of the current conversation.","- When to use or update a plan instead of memory: If you are about to start a non-trivial implementation task and would like to reach alignment with the user on your approach you should use a Plan rather than saving this information to memory. Similarly, if you already have a plan within the conversation and you have changed your approach persist that change by updating the plan rather than saving a memory.","- When to use or update tasks instead of memory: When you need to break your work in current conversation into discrete steps or keep track of your progress use tasks instead of saving to memory. Tasks are great for persisting information about the work that needs to be done in the current conversation, but memory should be reserved for information that will be useful in future conversations.","",...tZ6(A)].join(` `)}function $p9(){let A=mD(),q=yS();return["# Memory","",`You have a persistent, file-based memory system with two directories: a private directory at \`${A}\` and a shared team directory at \`${q}\`.`,"","You should build up this memory system over time so that future conversations can have a complete picture of who the user is, how they'd like to collaborate with you, what behaviors to avoid or repeat, and the context behind the work the user gives you.","","If the user explicitly asks you to remember something, save it immediately as whichever type fits best. If they ask you to forget something, find and remove the relevant entry.","","## Memory scope","","There are two scope levels:","",`- private: memories that are private between you and the current user. They persist across conversations with only this specific user and are stored at the root \`${A}\`.`,`- team: memories that are shared with and contributed by all of the users who work within this project directory. Team memories are synced at the beginning of every session and they are stored at \`${q}\`.`,"",...h44,...UP1,"- You MUST avoid saving sensitive data within shared team memories. For example, never save API keys or user credentials.","","## How to save memories","","Saving a memory is a two-step process:","","**Step 1** — write the memory to its own file in the chosen directory (private or team, per the type's scope guidance) using this frontmatter format:","",...pP1,"",`**Step 2** — add a pointer to that file in the same directory's \`${OO}\`. Each directory (private and team) has its own \`${OO}\` index — these contain only links to memory files with brief descriptions. They have no frontmatter. Never write memory content directly into a \`${OO}\`.`,"",`- Both \`${OO}\` indexes are loaded into your conversation context — lines after ${aD} will be truncated, so keep them concise`,"- Keep the name, description, and type fields in memory files up-to-date with the content","- Organize memory semantically by topic, not chronologically","- Update or remove memories that turn out to be wrong or outdated","- Do not write duplicate memories. First check if there is an existing memory you can update before writing a new one.","","## When to access memories","- When specific known memories (personal or team) seem relevant to the task at hand.","- When the user seems to be referring to work you may have done in a prior conversation with them or other users in their organization.","- You MUST access memory when the user explicitly asks you to check memory, recall, or remember.","","## Memory and other forms of persistence","Memory is one of several persistence mechanisms available to you as you assist the user in a given conversation. The distinction is often that memory can be recalled in future conversations and should not be used for persisting information that is only useful within the scope of the current conversation.","- When to use or update a plan instead of memory: If you are about to start a non-trivial implementation task and would like to reach alignment with the user on your approach you should use a Plan rather than saving this information to memory. Similarly, if you already have a plan within the conversation and you have changed your approach persist that change by updating the plan rather than saving a memory.","- When to use or update tasks instead of memory: When you need to break your work in current conversation into discrete steps or keep track of your progress use tasks instead of saving to memory. Tasks are great for persisting information about the work that needs to be done in the current conversation, but memory should be reserved for information that will be useful in future conversations.","",...tZ6(A)].join(` `)}var Q44=k(()=>{GJ();RS();eZ6();dP1()});function zp6(A,q){P1().readdir(A).then((Y)=>{let z=0,w=0;for(let _ of Y)if(_.isFile())z++;else if(_.isDirectory())w++;c("tengu_memdir_loaded",{...q,total_file_count:z,total_subdir_count:w})},()=>{c("tengu_memdir_loaded",q)})}function l44(A){let{displayName:q,memoryDir:K,extraGuidelines:Y}=A,z=P1(),w=K+OO;try{z.mkdirSync(K)}catch{}let _="";try{_=z.readFileSync(w,{encoding:"utf-8"})}catch{}let $=[`# ${q}`,"",`You have a persistent ${q} directory at \`${K}\`. Its contents persist across conversations.`,"",`As you work, consult your memory files to build on previous experience. When you encounter a mistake that seems like it could be common, check your ${q} for relevant notes — and if nothing is written yet, record what you learned.`,"","Guidelines:",`- \`${OO}\` is always loaded into your system prompt — lines after ${aD} will be truncated, so keep it concise`,"- Create separate topic files (e.g., `debugging.md`, `patterns.md`) for detailed notes and link to them from MEMORY.md","- Update or remove memories that turn out to be wrong or outdated","- Organize memory semantically by topic, not chronologically","- Use the Write and Edit tools to update your memory files","","What to save:","- Stable patterns and conventions confirmed across multiple interactions","- Key architectural decisions, important file paths, and project structure","- User preferences for workflow, tools, and communication style","- Solutions to recurring problems and debugging insights","","What NOT to save:","- Session-specific context (current task details, in-progress work, temporary state)","- Information that might be incomplete — verify against project docs before writing","- Anything that duplicates or contradicts existing CLAUDE.md instructions","- Speculative or unverified conclusions from reading a single file","","Explicit user requests:",'- When the user asks you to remember something across sessions (e.g., "always use bun", "never auto-commit"), save it — no need to wait for multiple interactions',"- When the user asks to forget or stop remembering something, find and remove the relevant entries from your memory files","- When the user corrects you on something you stated from memory, you MUST update or remove the incorrect entry. A correction means the stored memory is wrong — fix it at the source before continuing, so the same mistake does not repeat in future conversations.",...Y??[],""];if($.push(...tZ6(K)),_.trim()){let O=_.trim().split(` `),H=O.length>aD,j=q===c44?"auto":"agent";zp6(K,{content_length:_.length,line_count:O.length,was_truncated:H,memory_type:j});let J=_.trim();if(H)J=O.slice(0,aD).join(` `)+` > WARNING: ${OO} is ${O.length} lines (limit: ${aD}). Only the first ${aD} lines were loaded. Move detailed content into separate topic files and keep ${OO} as a concise index.`;$.push(`## ${OO}`,"",J)}else $.push(`## ${OO}`,"",`Your ${OO} is currently empty. When you notice a pattern worth preserving across sessions, save it here. Anything in ${OO} will be included in your system prompt next time.`);return $.join(` `)}function i44(A,q,K){let Y=[`# ${A}`,"",`You have a persistent, file-based memory system found at: \`${q}\``,"","You should build up this memory system over time so that future conversations can have a complete picture of who the user is, how they'd like to collaborate with you, what behaviors to avoid or repeat, and the context behind the work the user gives you.","","If the user explicitly asks you to remember something, save it immediately as whichever type fits best. If they ask you to forget something, find and remove the relevant entry.","",...I44,...UP1,"","## How to save memories","","Saving a memory is a two-step process:","","**Step 1** — write the memory to its own file (e.g., `user_role.md`, `feedback_testing.md`) using this frontmatter format:","",...pP1,"",`**Step 2** — add a pointer to that file in \`${OO}\`. \`${OO}\` is an index, not a memory — it should contain only links to memory files with brief descriptions. It has no frontmatter. Never write memory content directly into \`${OO}\`.`,"",`- \`${OO}\` is always loaded into your conversation context — lines after ${aD} will be truncated, so keep the index concise`,"- Keep the name, description, and type fields in memory files up-to-date with the content","- Organize memory semantically by topic, not chronologically","- Update or remove memories that turn out to be wrong or outdated","- Do not write duplicate memories. First check if there is an existing memory you can update before writing a new one.","","## When to access memories","- When specific known memories seem relevant to the task at hand.","- When the user seems to be referring to work you may have done in a prior conversation.","- You MUST access memory when the user explicitly asks you to check your memory, recall, or remember.","","## Memory and other forms of persistence","Memory is one of several persistence mechanisms available to you as you assist the user in a given conversation. The distinction is often that memory can be recalled in future conversations and should not be used for persisting information that is only useful within the scope of the current conversation.","- When to use or update a plan instead of memory: If you are about to start a non-trivial implementation task and would like to reach alignment with the user on your approach you should use a Plan rather than saving this information to memory. Similarly, if you already have a plan within the conversation and you have changed your approach persist that change by updating the plan rather than saving a memory.","- When to use or update tasks instead of memory: When you need to break your work in current conversation into discrete steps or keep track of your progress use tasks instead of saving to memory. Tasks are great for persisting information about the work that needs to be done in the current conversation, but memory should be reserved for information that will be useful in future conversations.","",...K??[],""];return Y.push(...tZ6(q)),Y}function n44(A){let{displayName:q,memoryDir:K,extraGuidelines:Y}=A,z=P1(),w=K+OO;try{z.mkdirSync(K)}catch{}let _="";try{_=z.readFileSync(w,{encoding:"utf-8"})}catch{}let $=i44(q,K,Y);if(_.trim()){let O=_.trim().split(` `),H=O.length>aD,j=q===c44?"auto":"agent";zp6(K,{content_length:_.length,line_count:O.length,was_truncated:H,memory_type:j});let J=_.trim();if(H)J=O.slice(0,aD).join(` `)+` > WARNING: ${OO} is ${O.length} lines (limit: ${aD}). Only the first ${aD} lines were loaded. Move detailed content into separate topic files and keep ${OO} as a concise index.`;$.push(`## ${OO}`,"",J)}else $.push(`## ${OO}`,"",`Your ${OO} is currently empty. When you save new memories, they will appear here.`);return $.join(` `)}function Op9(){let A=mD();return["# auto memory","",`You have a persistent auto memory directory at \`${A}\`. Its contents persist across conversations.`,"","As you work, consult your memory files to build on previous experience.","","## How to save memories:","- Organize memory semantically by topic, not chronologically","- Use the Write and Edit tools to update your memory files",`- \`${OO}\` is always loaded into your conversation context — lines after ${aD} will be truncated, so keep it concise`,"- Create separate topic files (e.g., `debugging.md`, `patterns.md`) for detailed notes and link to them from MEMORY.md","- Update or remove memories that turn out to be wrong or outdated","- Do not write duplicate memories. First check if there is an existing memory you can update before writing a new one.","","## What to save:","- Stable patterns and conventions confirmed across multiple interactions","- Key architectural decisions, important file paths, and project structure","- User preferences for workflow, tools, and communication style","- Solutions to recurring problems and debugging insights","","## What NOT to save:","- Session-specific context (current task details, in-progress work, temporary state)","- Information that might be incomplete — verify against project docs before writing","- Anything that duplicates or contradicts existing CLAUDE.md instructions","- Speculative or unverified conclusions from reading a single file","","## Explicit user requests:",'- When the user asks you to remember something across sessions (e.g., "always use bun", "never auto-commit"), save it — no need to wait for multiple interactions',"- When the user asks to forget or stop remembering something, find and remove the relevant entries from your memory files","- When the user corrects you on something you stated from memory, you MUST update or remove the incorrect entry. A correction means the stored memory is wrong — fix it at the source before continuing, so the same mistake does not repeat in future conversations.","",...tZ6(A)].join(` `)}function tZ6(A){if(!p8("tengu_coral_fern",!1))return[];let q=bJ(DA()),K=cH(),Y=K?`grep -rn "" ${A} --include="*.md"`:`${fY} with pattern="" path="${A}" glob="*.md"`,z=K?`grep -rn "" ${q}/ --include="*.jsonl"`:`${fY} with pattern="" path="${q}/" glob="*.jsonl"`;return["## Searching past context","","When looking for past context:","1. Search topic files in your memory directory:","```",Y,"```","2. Session transcript logs (last resort — large files, slow):","```",z,"```","Use narrow search terms (error messages, file paths, function names) rather than broad keywords.",""]}function iP1(){let A=G9(),q=p8("tengu_swinburne_dune",!1);if(U44.isTeamMemoryEnabled())return zp6(mD(),{memory_type:"auto"}),zp6(U44.getTeamMemPath(),{memory_type:"team"}),q?p44.buildTypedCombinedMemoryPrompt():p44.buildCombinedMemoryPrompt();if(A){if(zp6(mD(),{memory_type:"auto"}),q)return i44("auto memory",mD()).join(` `);return Op9()}if(c("tengu_memdir_disabled",{disabled_by_env_var:$1(process.env.CLAUDE_CODE_DISABLE_AUTO_MEMORY),disabled_by_setting:!$1(process.env.CLAUDE_CODE_DISABLE_AUTO_MEMORY)&&h7().autoMemoryEnabled===!1}),p8("tengu_herring_clock",!1))c("tengu_team_memdir_disabled",{});return null}var U44,OO="MEMORY.md",aD=200,c44="auto memory",p44;var eZ6=k(()=>{Y7();GJ();B1();Z8();GA();rA();uq();Q1();BZ();dP1();Ax();U44=(RS(),W3(W66)),p44=(Q44(),W3(F44))});var fN8={};m1(fN8,{shouldShowClaudeMdExternalIncludesWarning:()=>GN8,resetGetMemoryFilesCache:()=>DN8,processMemoryFile:()=>pE,processMdRules:()=>Z66,processConditionedMdRules:()=>_p6,isMemoryFilePath:()=>e44,hasExternalClaudeMdIncludes:()=>aP1,getUltraClaudeMd:()=>f66,getMemoryFilesForNestedDirectory:()=>WN8,getMemoryFiles:()=>lH,getManagedAndUserConditionalRules:()=>PN8,getLargeMemoryFiles:()=>G66,getImportantClaudeMdEntries:()=>oP1,getExternalClaudeMdIncludes:()=>AG6,getConditionalRulesForCwdLevelDirectory:()=>ZN8,getClaudeMds:()=>XN8,getAllMemoryFilePaths:()=>Np9,MAX_ULTRAMEMORY_CHARACTER_COUNT:()=>NY6,MAX_MEMORY_CHARACTER_COUNT:()=>OF});import{join as UE,parse as Hp9,dirname as wp6,relative as jp9,isAbsolute as Jp9,basename as Mp9,sep as MN8,extname as Dp9}from"path";function t44(A){return qx(A,DA())}function Wp9(A){let{frontmatter:q,content:K}=fJ(A);if(!q.paths)return{content:K};let Y=e51(q.paths).map((z)=>{return z.endsWith("/**")?z.slice(0,-3):z}).filter((z)=>z.length>0);if(Y.length===0||Y.every((z)=>z==="**"))return{content:K};return{content:K,paths:Y}}function rP1(A,q){try{let Y=P1().readFileSync(A,{encoding:"utf-8"}),z=Dp9(A).toLowerCase();if(z&&!Pp9.has(z))return L(`Skipping non-text file in @include: ${A}`),null;let{content:w,paths:_}=Wp9(Y),$=w;if(q==="AutoMem"||q==="TeamMem"){let O=w.trimEnd().split(` `);if(O.length>aD)$=O.slice(0,aD).join(` `)+` > WARNING: MEMORY.md is ${O.length} lines (limit: ${aD}). Only the first ${aD} lines were loaded. Move detailed content into separate topic files and keep MEMORY.md as a concise index.`}return{path:A,type:q,content:$,globs:_}}catch(K){let Y=K.code;if(Y==="ENOENT"||Y==="EISDIR")return null;if(Y==="EACCES")c("tengu_claude_md_permission_error",{is_access_error:1,has_home_dir:A.includes(OA())?1:0})}return null}function Zp9(A,q){let K=new Set,z=new ZT({gfm:!1}).lex(A);function w(_){for(let $ of _){if($.type==="code"||$.type==="codespan")continue;if($.type==="text"){let O=$.text||"",H=/(?:^|\s)@((?:[^\s\\]|\\ )+)/g,j;while((j=H.exec(O))!==null){let J=j[1];if(!J)continue;let M=J.indexOf("#");if(M!==-1)J=J.substring(0,M);if(!J)continue;if(J=J.replace(/\\ /g," "),J){if(J.startsWith("./")||J.startsWith("~/")||J.startsWith("/")&&J!=="/"||!J.startsWith("@")&&!J.match(/^[#%^&*()]+/)&&J.match(/^[a-zA-Z0-9._-]/)){let X=t4(J,wp6(q));K.add(X)}}}}if($.tokens)w($.tokens);if($.items)w($.items)}}return w(z),[...K]}function fp9(A,q){if(q!=="User"&&q!=="Project"&&q!=="Local")return!1;let K=h7().claudeMdExcludes;if(!K||K.length===0)return!1;let Y={dot:!0},z=A.replaceAll("\\","/"),w=Tp9(K).filter((_)=>_.length>0);if(w.length===0)return!1;return s44.default.isMatch(z,w,Y)}function Tp9(A){let q=P1(),K=A.map((Y)=>Y.replaceAll("\\","/"));for(let Y of K){if(!Y.startsWith("/"))continue;let z=Y.search(/[*?{[]/),w=z===-1?Y:Y.slice(0,z),_=wp6(w);try{let $=q.realpathSync(_).replaceAll("\\","/");if($!==_){let O=$+Y.slice(_.length);K.push(O)}}catch{}}return K}function pE(A,q,K,Y,z=0,w){let _=nM(A);if(K.has(_)||z>=Gp9)return[];if(fp9(A,q))return[];let{resolvedPath:$,isSymlink:O}=d$(P1(),A);if(K.add(_),O)K.add(nM($));let H=rP1(A,q);if(!H||!H.content.trim())return[];if(w)H.parent=w;let j=[];j.push(H);let J=Zp9(H.content,$);for(let M of J){if(!t44(M)&&!Y)continue;let X=pE(M,q,K,Y,z+1,A);j.push(...X)}return j}function Z66({rulesDir:A,type:q,processedPaths:K,includeExternal:Y,conditionalRule:z,visitedDirs:w=new Set}){if(w.has(A))return[];try{let _=P1(),{resolvedPath:$,isSymlink:O}=d$(_,A);if(w.add(A),O)w.add($);let H=[],j;try{j=_.readdirSync($)}catch(J){let M=J.code;if(M==="ENOENT"||M==="EACCES"||M==="ENOTDIR")return[];throw J}for(let J of j){let M=UE(A,J.name),{resolvedPath:D,isSymlink:X}=d$(_,M),P=X?_.statSync(D):null,W=P?P.isDirectory():J.isDirectory(),Z=P?P.isFile():J.isFile();if(W)H.push(...Z66({rulesDir:D,type:q,processedPaths:K,includeExternal:Y,conditionalRule:z,visitedDirs:w}));else if(Z&&J.name.endsWith(".md")){let G=pE(D,q,K,Y);H.push(...G.filter((f)=>z?f.globs:!f.globs))}}return H}catch(_){if(_ instanceof Error&&_.message.includes("EACCES"))c("tengu_claude_rules_md_permission_error",{is_access_error:1,has_home_dir:A.includes(OA())?1:0});return[]}}function Vp9(A){return A==="User"||A==="Project"||A==="Local"||A==="Managed"}function DN8(){lH.cache.clear?.()}function G66(){return lH().filter((A)=>A.content.length>OF)}function f66(){return null}function oP1(){return[]}function PN8(A,q){let K=[],Y=sP1();if(K.push(..._p6(A,Y,"Managed",q,!1)),WM("userSettings")){let z=tP1();K.push(..._p6(A,z,"User",q,!0))}return K}function WN8(A,q,K){let Y=[];if(WM("projectSettings")){let _=UE(A,"CLAUDE.md");Y.push(...pE(_,"Project",K,!1));let $=UE(A,".claude","CLAUDE.md");Y.push(...pE($,"Project",K,!1))}if(WM("localSettings")){let _=UE(A,"CLAUDE.local.md");Y.push(...pE(_,"Local",K,!1))}let z=UE(A,".claude","rules"),w=new Set(K);Y.push(...Z66({rulesDir:z,type:"Project",processedPaths:w,includeExternal:!1,conditionalRule:!1})),Y.push(..._p6(q,z,"Project",K,!1));for(let _ of w)K.add(_);return Y}function ZN8(A,q,K){let Y=UE(A,".claude","rules");return _p6(q,Y,"Project",K,!1)}function _p6(A,q,K,Y,z){return Z66({rulesDir:q,type:K,processedPaths:Y,includeExternal:z,conditionalRule:!0}).filter((_)=>{if(!_.globs||_.globs.length===0)return!1;let $=K==="Project"?wp6(wp6(q)):DA(),O=Jp9(A)?jp9($,A):A;return a44.default().add(_.globs).ignores(O)})}function AG6(){let A=[];for(let q of lH(!0))if(q.type!=="User"&&q.parent&&!t44(q.path))A.push({path:q.path,parent:q.parent});return A}function aP1(){return AG6().length>0}async function GN8(){let A=f_();if(A.hasClaudeMdExternalIncludesApproved||A.hasClaudeMdExternalIncludesWarningShown)return!1;return aP1()}function e44(A){let q=Mp9(A);if(q==="CLAUDE.md"||q==="CLAUDE.local.md")return!0;if(q.endsWith(".md")&&A.includes(`${MN8}.claude${MN8}rules${MN8}`))return!0;return!1}function Np9(A){let q=new Set;for(let K of lH())if(K.content.trim().length>0)q.add(K.path);for(let K of $F(A))if(e44(K))q.add(K);return Array.from(q)}var a44,s44,r44,o44=!1,Xp9="Codebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default behavior and you MUST follow them exactly as written.",OF=40000,NY6=3000,Pp9,Gp9=5,lH,XN8=()=>{let A=lH(),q=[],K=p8("tengu_paper_halyard",!1);for(let Y of A){if(K&&(Y.type==="Project"||Y.type==="Local"))continue;if(Y.content){let z=Y.type==="Project"?" (project instructions, checked into the codebase)":Y.type==="Local"?" (user's private project instructions, not checked in)":Y.type==="TeamMem"?" (shared team memory, synced across the organization)":Y.type==="AutoMem"?" (user's auto-memory, persists across conversations)":" (user's private global instructions for all projects)";if(Y.type==="TeamMem")q.push(`Contents of ${Y.path}${z}: ${Y.content} `);else q.push(`Contents of ${Y.path}${z}: ${Y.content}`)}}if(q.length===0)return"";return`${Xp9} ${q.join(` `)}`};var sD=k(()=>{Eq();Q1();Y7();Kz();B1();Kp6();F2();GA();iz();p7();U3();Q8();Z8();iV();OG();G1();D2();rA();GJ();GJ();eZ6();J$();a44=e(GY6(),1),s44=e(j44(),1),r44=(RS(),W3(W66)),Pp9=new Set([".md",".txt",".text",".json",".yaml",".yml",".toml",".xml",".csv",".html",".htm",".css",".scss",".sass",".less",".js",".ts",".tsx",".jsx",".mjs",".cjs",".mts",".cts",".py",".pyi",".pyw",".rb",".erb",".rake",".go",".rs",".java",".kt",".kts",".scala",".c",".cpp",".cc",".cxx",".h",".hpp",".hxx",".cs",".swift",".sh",".bash",".zsh",".fish",".ps1",".bat",".cmd",".env",".ini",".cfg",".conf",".config",".properties",".sql",".graphql",".gql",".proto",".vue",".svelte",".astro",".ejs",".hbs",".pug",".jade",".php",".pl",".pm",".lua",".r",".R",".dart",".ex",".exs",".erl",".hrl",".clj",".cljs",".cljc",".edn",".hs",".lhs",".elm",".ml",".mli",".f",".f90",".f95",".for",".cmake",".make",".makefile",".gradle",".sbt",".rst",".adoc",".asciidoc",".org",".tex",".latex",".lock",".log",".diff",".patch"]);lH=T8((A=!1)=>{let q=Date.now();z8("info","memory_files_started");let K=[],Y=new Set,z=f_(),w=A||z.hasClaudeMdExternalIncludesApproved||!1,_=Kx("Managed");K.push(...pE(_,"Managed",Y,w));let $=sP1();if(K.push(...Z66({rulesDir:$,type:"Managed",processedPaths:Y,includeExternal:w,conditionalRule:!1})),WM("userSettings")){let W=Kx("User");K.push(...pE(W,"User",Y,!0));let Z=tP1();K.push(...Z66({rulesDir:Z,type:"User",processedPaths:Y,includeExternal:!0,conditionalRule:!1}))}let O=[],H=DA(),j=H;while(j!==Hp9(j).root)O.push(j),j=wp6(j);let J=Fw(H),M=y0(H),D=J!==null&&M!==null&&nM(J)!==nM(M)&&qx(J,M);for(let W of O.reverse()){let Z=D&&qx(W,M)&&!qx(W,J);if(WM("projectSettings")&&!Z){let G=UE(W,"CLAUDE.md");K.push(...pE(G,"Project",Y,w));let f=UE(W,".claude","CLAUDE.md");K.push(...pE(f,"Project",Y,w));let V=UE(W,".claude","rules");K.push(...Z66({rulesDir:V,type:"Project",processedPaths:Y,includeExternal:w,conditionalRule:!1}))}if(WM("localSettings")){let G=UE(W,"CLAUDE.local.md");K.push(...pE(G,"Local",Y,w))}}if($1(process.env.CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD)){let W=EV();for(let Z of W){let G=UE(Z,"CLAUDE.md");K.push(...pE(G,"Project",Y,w));let f=UE(Z,".claude","CLAUDE.md");K.push(...pE(f,"Project",Y,w));let V=UE(Z,".claude","rules");K.push(...Z66({rulesDir:V,type:"Project",processedPaths:Y,includeExternal:w,conditionalRule:!1}))}}if(G9()){let W=rP1(J51(),"AutoMem");if(W&&!Y.has(nM(W.path)))Y.add(nM(W.path)),K.push(W)}if(r44.isTeamMemoryEnabled()){let W=rP1(r44.getTeamMemEntrypoint(),"TeamMem");if(W&&!Y.has(nM(W.path)))Y.add(nM(W.path)),K.push(W)}let X=K.reduce((W,Z)=>W+Z.content.length,0);z8("info","memory_files_completed",{duration_ms:Date.now()-q,file_count:K.length,total_content_length:X});let P={};for(let W of K)P[W.type]=(P[W.type]??0)+1;if(!o44){if(o44=!0,c("tengu_claudemd__initial_load",{file_count:K.length,total_content_length:X,user_count:P.User??0,project_count:P.Project??0,local_count:P.Local??0,managed_count:P.Managed??0,automem_count:P.AutoMem??0,...{teammem_count:P.TeamMem??0},duration_ms:Date.now()-q}),$p6())for(let W of K){if(!Vp9(W.type))continue;let Z=W.parent?"include":"session_start";Op6(W.path,W.type,Z,{globs:W.globs,parentFilePath:W.parent})}}return K})});function Aq4(A){kp9=A,y_.cache.clear?.(),KH.cache.clear?.()}var TN8=40000,kp9=null,VN8,KH,y_;var dE=k(()=>{x1();sD();Eq();U3();aq();D2();Z8();VN8=T8(async()=>{let A=Date.now();z8("info","git_status_started");let q=Date.now(),K=await Cj();if(z8("info","git_is_git_check_completed",{duration_ms:Date.now()-q,is_git:K}),!K)return z8("info","git_status_skipped_not_git",{duration_ms:Date.now()-A}),null;try{let Y=Date.now(),[z,w,_,$]=await Promise.all([ZJ(),dV(),W8(nA(),["--no-optional-locks","status","--short"],{preserveOutputOnError:!1}).then(({stdout:H})=>H.trim()),W8(nA(),["--no-optional-locks","log","--oneline","-n","5"],{preserveOutputOnError:!1}).then(({stdout:H})=>H.trim())]);z8("info","git_commands_completed",{duration_ms:Date.now()-Y,status_length:_.length});let O=_.length>TN8?_.substring(0,TN8)+` ... (truncated because it exceeds 40k characters. If you need more information, run "git status" using BashTool)`:_;return z8("info","git_status_completed",{duration_ms:Date.now()-A,truncated:_.length>TN8}),`This is the git status at the start of the conversation. Note that this status is a snapshot in time, and will not update during the conversation. Current branch: ${z} Main branch (you will usually use this for PRs): ${w} Status: ${O||"(clean)"} Recent commits: ${$}`}catch(Y){return z8("error","git_status_failed",{duration_ms:Date.now()-A}),$6(Y),null}}),KH=T8(async()=>{let A=Date.now();z8("info","system_context_started");let q=$1(process.env.CLAUDE_CODE_REMOTE)?null:await VN8(),K=null;return z8("info","system_context_completed",{duration_ms:Date.now()-A,has_git_status:q!==null,has_injection:K!==null}),{...q?{gitStatus:q}:{},...{}}}),y_=T8(async()=>{let A=Date.now();z8("info","user_context_started");let q=process.env.CLAUDE_CODE_DISABLE_CLAUDE_MDS||$1(process.env.CLAUDE_CODE_SIMPLE),K=q?null:XN8();return z8("info","user_context_completed",{duration_ms:Date.now()-A,claudemd_length:K?.length??0,claudemd_disabled:Boolean(q)}),{...K?{claudeMd:K}:{},currentDate:`Today's date is ${dD6()}.`}})});function cl(A){if(A?.type==="assistant"&&"usage"in A.message&&!(A.message.content[0]?.type==="text"&&Jp6.has(A.message.content[0].text))&&A.message.model!==vY6)return A.message.usage;return}function qq4(A){if(A?.type==="assistant"&&"id"in A.message&&A.message.model!==vY6)return A.message.id;return}function jp6(A){return A.input_tokens+(A.cache_creation_input_tokens??0)+(A.cache_read_input_tokens??0)+A.output_tokens}function cE(A){let q=A.length-1;while(q>=0){let K=A[q],Y=K?cl(K):void 0;if(Y)return jp6(Y);q--}return 0}function eP1(A){for(let q=A.length-1;q>=0;q--){let K=A[q],Y=K?cl(K):void 0;if(Y)return{input_tokens:Y.input_tokens,output_tokens:Y.output_tokens,cache_creation_input_tokens:Y.cache_creation_input_tokens??0,cache_read_input_tokens:Y.cache_read_input_tokens??0}}return null}function A01(A){for(let K=A.length-1;K>=0;K--){let Y=A[K];if(Y?.type==="assistant"){let z=cl(Y);if(z)return jp6(z)>200000;return!1}}return!1}function Kq4(A){if(A<1000)return`~${A}`;return`~${(A/1000).toFixed(1)}k`}function q01(A){let q=0;for(let K of A.message.content)if(K.type==="text")q+=K.text.length;else if(K.type==="thinking")q+=K.thinking.length;else if(K.type==="redacted_thinking")q+=K.data.length;else if(K.type==="tool_use")q+=U6(K.input).length;return q}function HG(A){let q=A.length-1;while(q>=0){let K=A[q],Y=K?cl(K):void 0;if(K&&Y){let z=qq4(K);if(z){let w=q-1;while(w>=0){let _=A[w],$=_?qq4(_):void 0;if($===z)q=w;else if($!==void 0)break;w--}}return jp6(Y)+Hp6(A.slice(q+1))}q--}return Hp6(A)}var jG=k(()=>{SA();UN();a1()});var Yq4,zq4="Update the todo list for the current session. To be used proactively and often to track progress and pending tasks. Make sure that at least one task is in_progress at all times. Always provide both content (imperative) and activeForm (present continuous) for each task.";var wq4=k(()=>{Yq4=`Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user. It also helps the user understand the progress of the task and overall progress of their requests. ## When to Use This Tool Use this tool proactively in these scenarios: 1. Complex multi-step tasks - When a task requires 3 or more distinct steps or actions 2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations 3. User explicitly requests todo list - When the user directly asks you to use the todo list 4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated) 5. After receiving new instructions - Immediately capture user requirements as todos 6. When you start working on a task - Mark it as in_progress BEFORE beginning work. Ideally you should only have one todo as in_progress at a time 7. After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation ## When NOT to Use This Tool Skip using this tool when: 1. There is only a single, straightforward task 2. The task is trivial and tracking it provides no organizational benefit 3. The task can be completed in less than 3 trivial steps 4. The task is purely conversational or informational NOTE that you should not use this tool if there is only one trivial task to do. In this case you are better off just doing the task directly. ## Examples of When to Use the Todo List User: I want to add a dark mode toggle to the application settings. Make sure you run the tests and build when you're done! Assistant: I'll help add a dark mode toggle to your application settings. Let me create a todo list to track this implementation. *Creates todo list with the following items:* 1. Creating dark mode toggle component in Settings page 2. Adding dark mode state management (context/store) 3. Implementing CSS-in-JS styles for dark theme 4. Updating existing components to support theme switching 5. Running tests and build process, addressing any failures or errors that occur *Begins working on the first task* The assistant used the todo list because: 1. Adding dark mode is a multi-step feature requiring UI, state management, and styling changes 2. The user explicitly requested tests and build be run afterward 3. The assistant inferred that tests and build need to pass by adding "Ensure tests and build succeed" as the final task User: Help me rename the function getCwd to getCurrentWorkingDirectory across my project Assistant: Let me first search through your codebase to find all occurrences of 'getCwd'. *Uses grep or search tools to locate all instances of getCwd in the codebase* Assistant: I've found 15 instances of 'getCwd' across 8 different files. Let me create a todo list to track these changes. *Creates todo list with specific items for each file that needs updating* The assistant used the todo list because: 1. First, the assistant searched to understand the scope of the task 2. Upon finding multiple occurrences across different files, it determined this was a complex task with multiple steps 3. The todo list helps ensure every instance is tracked and updated systematically 4. This approach prevents missing any occurrences and maintains code consistency User: I need to implement these features for my e-commerce site: user registration, product catalog, shopping cart, and checkout flow. Assistant: I'll help implement these features. First, let's add all the features to the todo list. *Creates a todo list breaking down each feature into specific tasks based on the project architecture* Assistant: Let's start with user registration. This will involve creating database models, API endpoints, and frontend forms that integrate with your existing authentication system. The assistant used the todo list because: 1. The user provided multiple complex features to implement in a comma separated list 2. The todo list helps organize these large features into manageable tasks 3. This approach allows for tracking progress across the entire implementation User: Can you help optimize my React application? It's rendering slowly and has performance issues. Assistant: I'll help optimize your React application. First, let me examine your codebase to identify potential performance bottlenecks. *Reviews component structure, render patterns, state management, and data fetching* Assistant: After analyzing your codebase, I've identified several performance issues. Let me create a todo list to track our optimization efforts. *Creates todo list with items like: 1) Implementing memoization for expensive calculations in ProductList, 2) Adding virtualization for long lists in Dashboard, 3) Optimizing image loading in Gallery component, 4) Fixing state update loops in ShoppingCart, 5) Reviewing bundle size and implementing code splitting* Let's start by implementing memoization for the expensive calculations in your ProductList component. The assistant used the todo list because: 1. First, the assistant examined the codebase to identify specific performance issues 2. Based on this analysis, it identified multiple optimization opportunities 3. Performance optimization is a non-trivial task requiring multiple steps 4. The todo list helps methodically track improvements across different components 5. This systematic approach ensures all performance bottlenecks are addressed ## Examples of When NOT to Use the Todo List User: How do I print 'Hello World' in Python? Assistant: In Python, you can print "Hello World" with this simple code: python print("Hello World") This will output the text "Hello World" to the console when executed. The assistant did not use the todo list because this is a single, trivial task that can be completed in one step. There's no need to track multiple tasks or steps for such a straightforward request. User: What does the git status command do? Assistant: The git status command shows the current state of your working directory and staging area. It displays which changes have been staged, which haven't, and which files aren't being tracked by Git. This is a fundamental command for understanding the current state of your repository before making commits. The assistant did not use the todo list because this is an informational request with no actual coding task to complete. The user is simply asking for an explanation, not for the assistant to perform multiple steps or tasks. User: Can you add a comment to the calculateTotal function to explain what it does? Assistant: Sure, let me add a comment to the calculateTotal function to explain what it does. * Uses the ${Yq} tool to add a comment to the calculateTotal function * The assistant did not use the todo list because this is a single, straightforward task confined to one location in the code. Adding a comment doesn't require tracking multiple steps or systematic organization. User: Run npm install for me and tell me what happens. Assistant: I'll run the npm install command for you. *Executes: npm install* The command completed successfully. Here's the output: [Output of npm install command] All dependencies have been installed according to your package.json file. The assistant did not use the todo list because this is a single command execution with immediate results. There are no multiple steps to track or organize, making the todo list unnecessary for this straightforward task. ## Task States and Management 1. **Task States**: Use these states to track progress: - pending: Task not yet started - in_progress: Currently working on (limit to ONE task at a time) - completed: Task finished successfully **IMPORTANT**: Task descriptions must have two forms: - content: The imperative form describing what needs to be done (e.g., "Run tests", "Build the project") - activeForm: The present continuous form shown during execution (e.g., "Running tests", "Building the project") 2. **Task Management**: - Update task status in real-time as you work - Mark tasks complete IMMEDIATELY after finishing (don't batch completions) - Exactly ONE task must be in_progress at any time (not less, not more) - Complete current tasks before starting new ones - Remove tasks that are no longer relevant from the list entirely 3. **Task Completion Requirements**: - ONLY mark a task as completed when you have FULLY accomplished it - If you encounter errors, blockers, or cannot finish, keep the task as in_progress - When blocked, create a new task describing what needs to be resolved - Never mark a task as completed if: - Tests are failing - Implementation is partial - You encountered unresolved errors - You couldn't find necessary files or dependencies 4. **Task Breakdown**: - Create specific, actionable items - Break complex tasks into smaller, manageable steps - Use clear, descriptive task names - Always provide both forms: - content: "Fix authentication bug" - activeForm: "Fixing authentication bug" When in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully. `});var Ep9,Lp9,qG6;var NN8=k(()=>{B7();Ep9=i6(()=>I.enum(["pending","in_progress","completed"])),Lp9=i6(()=>I.object({content:I.string().min(1,"Content cannot be empty"),status:Ep9(),activeForm:I.string().min(1,"Active form cannot be empty")})),qG6=i6(()=>I.array(Lp9()))});function _q4(){return null}function $q4(){return null}function Oq4(){return null}function Hq4(){return null}function jq4(){return null}var HF="TodoWrite";import{AsyncLocalStorage as yp9}from"async_hooks";function SS(){return vN8.getStore()}function K01(A,q){return vN8.run(A,q)}function AW(){return vN8.getStore()!==void 0}function Y01(A){return{...A,isInProcess:!0}}var vN8;var lE=k(()=>{vN8=new yp9});var LN8={};m1(LN8,{waitForTeammatesToBecomeIdle:()=>EN8,setDynamicTeamContext:()=>Rp9,runWithTeammateContext:()=>K01,isTeammate:()=>Oz,isTeamLead:()=>JG,isPlanModeRequired:()=>Dp6,isInProcessTeammate:()=>AW,hasWorkingInProcessTeammates:()=>kN8,hasActiveInProcessTeammates:()=>z01,getTeammateContext:()=>SS,getTeammateColor:()=>YH,getTeamName:()=>W5,getParentSessionId:()=>T66,getDynamicTeamContext:()=>Mp6,getAgentName:()=>V9,getAgentId:()=>qW,createTeammateContext:()=>Y01,clearDynamicTeamContext:()=>Sp9});function T66(){let A=SS();if(A)return A.parentSessionId;return iE?.parentSessionId}function Rp9(A){iE=A}function Sp9(){iE=null}function Mp6(){return iE}function qW(){let A=SS();if(A)return A.agentId;return iE?.agentId}function V9(){let A=SS();if(A)return A.agentName;return iE?.agentName}function W5(A){let q=SS();if(q)return q.teamName;if(iE?.teamName)return iE.teamName;return A?.teamName}function Oz(){if(SS())return!0;return!!(iE?.agentId&&iE?.teamName)}function YH(){let A=SS();if(A)return A.color;return iE?.color}function Dp6(){let A=SS();if(A)return A.planModeRequired;if(iE!==null)return iE.planModeRequired;return $1(process.env.CLAUDE_CODE_PLAN_MODE_REQUIRED)}function JG(A){if(!A?.leadAgentId)return!1;let q=qW(),K=A.leadAgentId;if(q===K)return!0;if(!q)return!0;return!1}function z01(A){for(let q of Object.values(A.tasks))if(q.type==="in_process_teammate"&&q.status==="running")return!0;return!1}function kN8(A){for(let q of Object.values(A.tasks))if(q.type==="in_process_teammate"&&q.status==="running"&&!q.isIdle)return!0;return!1}function EN8(A,q){let K=[];for(let[Y,z]of Object.entries(q.tasks))if(z.type==="in_process_teammate"&&z.status==="running"&&!z.isIdle)K.push(Y);if(K.length===0)return Promise.resolve();return new Promise((Y)=>{let z=K.length,w=()=>{if(z--,z===0)Y()};A((_)=>{let $={..._.tasks};for(let O of K){let H=$[O];if(H&&H.type==="in_process_teammate")if(H.isIdle)w();else $[O]={...H,onIdleCallbacks:[...H.onIdleCallbacks??[],w]}}return{..._,tasks:$}})})}var iE=null;var sz=k(()=>{lE();lE();Z8()});import{join as Pp6}from"path";import{mkdir as Cp9,readdir as yN8,readFile as Jq4,unlink as Mq4,writeFile as _01}from"fs/promises";function Dq4(A){if(Xp6===A)return;Xp6=A,V66()}function Xq4(){if(Xp6===void 0)return;Xp6=void 0,V66()}function Pq4(A){return w01.add(A),w01.delete.bind(w01,A)}function V66(){for(let A of w01)try{A()}catch{}}function Wq4(A){return Pp6(CS(A),Ip9)}async function RN8(A){let q=Wq4(A);try{let K=(await Jq4(q,"utf-8")).trim(),Y=parseInt(K,10);return isNaN(Y)?0:Y}catch{return 0}}async function Zq4(A,q){let K=Wq4(A);await _01(K,String(q))}function iH(){if($1(process.env.CLAUDE_CODE_ENABLE_TASKS))return!0;return!u7()}async function O01(A){let q=CS(A),K=await CN8(A),Y;try{Y=await Wp6.lock(K,$01);let z=await Gq4(A);if(z>0){let _=await RN8(A);if(z>_)await Zq4(A,z)}let w;try{w=await yN8(q)}catch{w=[]}for(let _ of w)if(_.endsWith(".json")&&!_.startsWith(".")){let $=Pp6(q,_);try{await Mq4($)}catch{}}V66()}finally{if(Y)await Y()}}function GT(){if(process.env.CLAUDE_CODE_TASK_LIST_ID)return process.env.CLAUDE_CODE_TASK_LIST_ID;let A=SS();if(A)return A.teamName;return W5()||Xp6||d1()}function KG6(A){return A.replace(/[^a-zA-Z0-9_-]/g,"-")}function CS(A){return Pp6(OA(),"tasks",KG6(A))}function Zp6(A,q){return Pp6(CS(A),`${KG6(q)}.json`)}async function H01(A){let q=CS(A);try{await Cp9(q,{recursive:!0})}catch{}}async function Gq4(A){let q=CS(A),K;try{K=await yN8(q)}catch{return 0}let Y=0;for(let z of K){if(!z.endsWith(".json"))continue;let w=parseInt(z.replace(".json",""),10);if(!isNaN(w)&&w>Y)Y=w}return Y}async function bp9(A){let[q,K]=await Promise.all([Gq4(A),RN8(A)]);return Math.max(q,K)}async function j01(A,q){let K=await CN8(A),Y;try{Y=await Wp6.lock(K,$01);let z=await bp9(A),w=String(z+1),_={id:w,...q},$=Zp6(A,w);return await _01($,U6(_,null,2)),V66(),w}finally{if(Y)await Y()}}async function jF(A,q){let K=Zp6(A,q);try{let Y=await Jq4(K,"utf-8"),z=O8(Y),w=hp9().safeParse(z);if(!w.success)return L(`[Tasks] Task ${q} failed schema validation: ${w.error.message}`),null;return w.data}catch(Y){if(Y.code==="ENOENT")return null;return L(`[Tasks] Failed to read task ${q}: ${D1(Y)}`),$6(Y),null}}async function Yx(A,q,K){let Y=await jF(A,q);if(!Y)return null;let z={...Y,...K,id:q},w=Zp6(A,q);return await _01(w,U6(z,null,2)),V66(),z}async function J01(A,q){let K=Zp6(A,q);try{let Y=parseInt(q,10);if(!isNaN(Y)){let w=await RN8(A);if(Y>w)await Zq4(A,Y)}try{await Mq4(K)}catch(w){if(w.code==="ENOENT")return!1;throw w}let z=await DP(A);for(let w of z){let _=w.blocks.filter((O)=>O!==q),$=w.blockedBy.filter((O)=>O!==q);if(_.length!==w.blocks.length||$.length!==w.blockedBy.length)await Yx(A,w.id,{blocks:_,blockedBy:$})}return V66(),!0}catch{return!1}}async function DP(A){let q=CS(A),K;try{K=await yN8(q)}catch{return[]}let Y=K.filter((w)=>w.endsWith(".json")).map((w)=>w.replace(".json",""));return(await Promise.all(Y.map((w)=>jF(A,w)))).filter((w)=>w!==null)}async function SN8(A,q,K){let[Y,z]=await Promise.all([jF(A,q),jF(A,K)]);if(!Y||!z)return!1;if(!Y.blocks.includes(K))await Yx(A,q,{blocks:[...Y.blocks,K]});if(!z.blockedBy.includes(q))await Yx(A,K,{blockedBy:[...z.blockedBy,q]});return!0}function xp9(A){return Pp6(CS(A),".lock")}async function CN8(A){await H01(A);let q=xp9(A);try{await _01(q,"",{flag:"wx"})}catch{}return q}async function hN8(A,q,K,Y={}){let z=Zp6(A,q);if(!await jF(A,q))return{success:!1,reason:"task_not_found"};if(Y.checkAgentBusy)return up9(A,q,K);let _;try{_=await Wp6.lock(z,$01);let $=await jF(A,q);if(!$)return{success:!1,reason:"task_not_found"};if($.owner&&$.owner!==K)return{success:!1,reason:"already_claimed",task:$};if($.status==="completed")return{success:!1,reason:"already_resolved",task:$};let O=await DP(A),H=new Set(O.filter((M)=>M.status!=="completed").map((M)=>M.id)),j=$.blockedBy.filter((M)=>H.has(M));if(j.length>0)return{success:!1,reason:"blocked",task:$,blockedByTasks:j};return{success:!0,task:await Yx(A,q,{owner:K})}}catch($){return L(`[Tasks] Failed to claim task ${q}: ${D1($)}`),$6($),{success:!1,reason:"task_not_found"}}finally{if(_)await _()}}async function up9(A,q,K){let Y=await CN8(A),z;try{z=await Wp6.lock(Y,$01);let w=await DP(A),_=w.find((J)=>J.id===q);if(!_)return{success:!1,reason:"task_not_found"};if(_.owner&&_.owner!==K)return{success:!1,reason:"already_claimed",task:_};if(_.status==="completed")return{success:!1,reason:"already_resolved",task:_};let $=new Set(w.filter((J)=>J.status!=="completed").map((J)=>J.id)),O=_.blockedBy.filter((J)=>$.has(J));if(O.length>0)return{success:!1,reason:"blocked",task:_,blockedByTasks:O};let H=w.filter((J)=>J.status!=="completed"&&J.owner===K&&J.id!==q);if(H.length>0)return{success:!1,reason:"agent_busy",task:_,busyWithTasks:H.map((J)=>J.id)};return{success:!0,task:await Yx(A,q,{owner:K})}}catch(w){return L(`[Tasks] Failed to claim task ${q} with busy check: ${D1(w)}`),$6(w),{success:!1,reason:"task_not_found"}}finally{if(z)await z()}}async function N66(A,q,K,Y){let w=(await DP(A)).filter((O)=>O.status!=="completed"&&(O.owner===q||O.owner===K));for(let O of w)await Yx(A,O.id,{owner:void 0,status:"pending"});if(w.length>0)L(`[Tasks] Unassigned ${w.length} task(s) from ${K}`);let $=`${K} ${Y==="terminated"?"was terminated":"has shut down"}.`;if(w.length>0){let O=w.map((H)=>`#${H.id} "${H.subject}"`).join(", ");$+=` ${w.length} task(s) were unassigned: ${O}. Use TaskList to check availability and TaskUpdate with owner to reassign them to idle teammates.`}return{unassignedTasks:w.map((O)=>({id:O.id,subject:O.subject})),notificationMessage:$}}var Wp6,w01,Xp6,kY6,hp9,Ip9=".highwatermark",$01,IN8="tasklist";var G$=k(()=>{Z8();Q1();Z8();B7();x1();G1();a1();sz();lE();MA();Wp6=e(zm(),1),w01=new Set;kY6=i6(()=>I.enum(["pending","in_progress","completed"])),hp9=i6(()=>I.object({id:I.string(),subject:I.string(),description:I.string(),activeForm:I.string().optional(),owner:I.string().optional(),status:kY6(),blocks:I.array(I.string()),blockedBy:I.array(I.string()),metadata:I.record(I.string(),I.unknown()).optional()})),$01={retries:{retries:10,minTimeout:5,maxTimeout:100}}});var Bp9,mp9,pN;var YG6=k(()=>{B7();wq4();NN8();Q1();G$();rA();Bp9=i6(()=>I.strictObject({todos:qG6().describe("The updated todo list")})),mp9=i6(()=>I.object({oldTodos:qG6().describe("The todo list before the update"),newTodos:qG6().describe("The todo list after the update"),verificationNudgeNeeded:I.boolean().optional()})),pN={name:HF,searchHint:"manage the session task checklist",maxResultSizeChars:1e5,strict:!0,input_examples:[{todos:[{content:"Fix the login bug",status:"pending",activeForm:"Fixing the login bug"}]},{todos:[{content:"Implement feature",status:"completed",activeForm:"Implementing feature"},{content:"Write unit tests",status:"in_progress",activeForm:"Writing unit tests"}]}],async description(){return zq4},async prompt(){return Yq4},get inputSchema(){return Bp9()},get outputSchema(){return mp9()},userFacingName(){return""},shouldDefer:!0,isEnabled(){return!iH()},isConcurrencySafe(){return!1},isReadOnly(){return!1},toAutoClassifierInput(A){return`${A.todos.length} items`},async checkPermissions(A){return{behavior:"allow",updatedInput:A}},renderToolUseMessage:_q4,renderToolUseProgressMessage:$q4,renderToolUseRejectedMessage:Oq4,renderToolUseErrorMessage:Hq4,renderToolResultMessage:jq4,async call({todos:A},q){let K=q.getAppState(),Y=q.agentId??d1(),z=K.todos[Y]??[],_=A.every((O)=>O.status==="completed")?[]:A,$=!1;return q.setAppState((O)=>({...O,todos:{...O.todos,[Y]:_}})),{data:{oldTodos:z,newTodos:A,verificationNudgeNeeded:$}}},mapToolResultToToolResultBlockParam({verificationNudgeNeeded:A},q){let Y=A?` NOTE: You just closed out 3+ tasks and none of them was a verification step. Before writing your final summary, spawn the verification agent (subagent_type="${rUA}"). You cannot self-assign PARTIAL by listing caveats in your summary — only the verifier issues a verdict.`:"";return{tool_use_id:q,type:"tool_result",content:"Todos have been modified successfully. Ensure that you continue to use the todo list to track your progress. Please proceed with the current tasks if applicable"+Y}}}});function il(A,q="append"){if(A.length>0){if(bN8&&hS.length>0)if(q==="prepend")hS[0]=A+hS[0];else hS[0]=hS[0]+A;else if(hS.unshift(A),hS.length>gp9)hS.pop();bN8=!0,X01=!1}}function P01(){return hS[0]??""}function fp6(){bN8=!1}function W01(A,q){fq4=A,xN8=q,X01=!0,M01=0}function Z01(){if(!X01||hS.length<=1)return null;return M01=(M01+1)%hS.length,{text:hS[M01]??"",start:fq4,length:xN8}}function G01(A){xN8=A}function Tp6(){X01=!1}class oK{measuredText;selection;offset;constructor(A,q=0,K=0){this.measuredText=A;this.selection=K;this.offset=Math.max(0,Math.min(this.text.length,q))}static fromText(A,q,K=0,Y=0){return new oK(new Tq4(A,q-1),K,Y)}render(A,q,K,Y){let{line:z,column:w}=this.getPosition();return this.measuredText.getWrappedText().map((_,$,O)=>{let H=_;if(q&&$===O.length-1){let Z=Array.from(hj().segment(_)),G=Math.min(6,Z.length),f=Z.length-G,V=Z.length>G?Z[f].index:0;H=q.repeat(f)+_.slice(V)}if(z!==$)return H.trimEnd();let j="",J=A,M="",D=0,X=!1;for(let{segment:Z}of hj().segment(H)){if(X){M+=Z;continue}let G=D+B8(Z);if(G>w)J=Z,X=!0;else D=G,j+=Z}let P,W="";if(Y&&$===O.length-1&&this.isAtEnd()&&Y.text.length>0){let Z=RI6(Y.text)||Y.text[0];P=A?K(Z):Z;let G=Y.text.slice(Z.length);if(G.length>0)W=Y.dim(G)}else P=A?K(J):J;return j+P+W+M.trimEnd()}).join(` `)}left(){if(this.offset===0)return this;let A=this.measuredText.prevOffset(this.offset);return new oK(this.measuredText,A)}right(){if(this.offset>=this.text.length)return this;let A=this.measuredText.nextOffset(this.offset);return new oK(this.measuredText,Math.min(A,this.text.length))}up(){let{line:A,column:q}=this.getPosition();if(A===0)return this;let K=this.measuredText.getWrappedText()[A-1];if(K===void 0)return this;let Y=B8(K);if(q>Y){let w=this.getOffset({line:A-1,column:Y});return new oK(this.measuredText,w,0)}let z=this.getOffset({line:A-1,column:q});return new oK(this.measuredText,z,0)}down(){let{line:A,column:q}=this.getPosition();if(A>=this.measuredText.lineCount-1)return this;let K=this.measuredText.getWrappedText()[A+1];if(K===void 0)return this;let Y=B8(K);if(q>Y){let w=this.getOffset({line:A+1,column:Y});return new oK(this.measuredText,w,0)}let z=this.getOffset({line:A+1,column:q});return new oK(this.measuredText,z,0)}startOfCurrentLine(){let{line:A}=this.getPosition();return new oK(this.measuredText,this.getOffset({line:A,column:0}),0)}startOfLine(){let{line:A,column:q}=this.getPosition();if(q===0&&A>0)return new oK(this.measuredText,this.getOffset({line:A-1,column:0}),0);return this.startOfCurrentLine()}firstNonBlankInLine(){let{line:A}=this.getPosition(),K=(this.measuredText.getWrappedText()[A]||"").match(/^\s*\S/),Y=K?.index?K.index+K[0].length-1:0,z=this.getOffset({line:A,column:Y});return new oK(this.measuredText,z,0)}endOfLine(){let{line:A}=this.getPosition(),q=this.measuredText.getLineLength(A),K=this.getOffset({line:A,column:q});return new oK(this.measuredText,K,0)}findLogicalLineStart(A=this.offset){let q=this.text.lastIndexOf(` `,A-1);return q===-1?0:q+1}findLogicalLineEnd(A=this.offset){let q=this.text.indexOf(` `,A);return q===-1?this.text.length:q}getLogicalLineBounds(){return{start:this.findLogicalLineStart(),end:this.findLogicalLineEnd()}}createCursorWithColumn(A,q,K){let Y=q-A,z=Math.min(K,Y),w=A+z,_=this.measuredText.snapToGraphemeBoundary(w);return new oK(this.measuredText,_,0)}endOfLogicalLine(){return new oK(this.measuredText,this.findLogicalLineEnd(),0)}startOfLogicalLine(){return new oK(this.measuredText,this.findLogicalLineStart(),0)}firstNonBlankInLogicalLine(){let{start:A,end:q}=this.getLogicalLineBounds(),Y=this.text.slice(A,q).match(/\S/),z=A+(Y?.index??0);return new oK(this.measuredText,z,0)}upLogicalLine(){let{start:A}=this.getLogicalLineBounds();if(A===0)return new oK(this.measuredText,0,0);let q=this.offset-A,K=A-1,Y=this.findLogicalLineStart(K);return this.createCursorWithColumn(Y,K,q)}downLogicalLine(){let{start:A,end:q}=this.getLogicalLineBounds();if(q>=this.text.length)return new oK(this.measuredText,this.text.length,0);let K=this.offset-A,Y=q+1,z=this.findLogicalLineEnd(Y);return this.createCursorWithColumn(Y,z,K)}nextWord(){if(this.isAtEnd())return this;let A=this.measuredText.getWordBoundaries();for(let q of A)if(q.isWordLike&&q.start>this.offset)return new oK(this.measuredText,q.start);return new oK(this.measuredText,this.text.length)}endOfWord(){if(this.isAtEnd())return this;let A=this.measuredText.getWordBoundaries();for(let q of A){if(!q.isWordLike)continue;if(this.offset>=q.start&&this.offsetthis.offset)return new oK(this.measuredText,K.end-1);return this}}for(let q of A)if(q.isWordLike&&q.start>this.offset)return new oK(this.measuredText,q.end-1);return this}prevWord(){if(this.isAtStart())return this;let A=this.measuredText.getWordBoundaries(),q=null;for(let K of A){if(!K.isWordLike)continue;if(K.startK.start&&this.offset<=K.end)return new oK(this.measuredText,K.start);q=K.start}}if(q!==null)return new oK(this.measuredText,q);return new oK(this.measuredText,0)}nextVimWord(){if(this.isAtEnd())return this;let A=this.offset,q=(Y)=>this.measuredText.nextOffset(Y),K=this.graphemeAt(A);if(!K)return this;if(ll(K))while(Athis.measuredText.nextOffset(z);if(this.graphemeAt(q)==="")return this;q=K(q);while(q=A.length)return new oK(this.measuredText,A.length);let Y=this.graphemeAt(q);if(ll(Y))while(q=A.length||!ll(this.graphemeAt(z)))break;q=z}else if(v66(Y))while(q=A.length||!v66(this.graphemeAt(z)))break;q=z}return new oK(this.measuredText,q)}prevVimWord(){if(this.isAtStart())return this;let A=this.offset,q=(Y)=>this.measuredText.prevOffset(Y);A=q(A);while(A>0&&Gp6.test(this.graphemeAt(A)))A=q(A);if(A===0&&Gp6.test(this.graphemeAt(0)))return new oK(this.measuredText,0);let K=this.graphemeAt(A);if(ll(K))while(A>0){let Y=q(A);if(!ll(this.graphemeAt(Y)))break;A=Y}else if(v66(K))while(A>0){let Y=q(A);if(!v66(this.graphemeAt(Y)))break;A=Y}return new oK(this.measuredText,A)}nextWORD(){let A=this;while(!A.isOverWhitespace()&&!A.isAtEnd())A=A.right();while(A.isOverWhitespace()&&!A.isAtEnd())A=A.right();return A}endOfWORD(){if(this.isAtEnd())return this;let A=this;if(!A.isOverWhitespace()&&(A.right().isOverWhitespace()||A.right().isAtEnd()))return A=A.right(),A.endOfWORD();if(A.isOverWhitespace())A=A.nextWORD();while(!A.right().isOverWhitespace()&&!A.isAtEnd())A=A.right();return A}prevWORD(){let A=this;if(A.left().isOverWhitespace())A=A.left();while(A.isOverWhitespace()&&!A.isAtStart())A=A.left();if(!A.isOverWhitespace())while(!A.left().isOverWhitespace()&&!A.isAtStart())A=A.left();return A}modifyText(A,q=""){let K=this.offset,Y=A.offset,z=this.text.slice(0,K)+q+this.text.slice(Y);return oK.fromText(z,this.columns,K+q.normalize("NFC").length)}insert(A){return this.modifyText(this,A)}del(){if(this.isAtEnd())return this;return this.modifyText(this.right())}backspace(){if(this.isAtStart())return this;return this.left().modifyText(this)}deleteToLineStart(){let A=this.startOfCurrentLine(),q=this.text.slice(A.offset,this.offset);return{cursor:A.modifyText(this),killed:q}}deleteToLineEnd(){if(this.text[this.offset]===` `)return{cursor:this.modifyText(this.right()),killed:` `};let A=this.endOfLine(),q=this.text.slice(this.offset,A.offset);return{cursor:this.modifyText(A),killed:q}}deleteToLogicalLineEnd(){if(this.text[this.offset]===` `)return this.modifyText(this.right());return this.modifyText(this.endOfLogicalLine())}deleteWordBefore(){if(this.isAtStart())return{cursor:this,killed:""};let A=this.prevWord(),q=this.text.slice(A.offset,this.offset);return{cursor:A.modifyText(this),killed:q}}deleteTokenBefore(){if(this.isAtStart())return null;let A=this.text[this.offset];if(A!==void 0&&!/\s/.test(A))return null;let K=this.text.slice(0,this.offset).match(/(^|\s)\[(Pasted text #\d+(?: \+\d+ lines)?|\.\.\.Truncated text #\d+ \+\d+ lines\.\.\.)\]$/);if(K){let Y=K.index+K[1].length;return new oK(this.measuredText,Y).modifyText(this)}return null}deleteWordAfter(){if(this.isAtEnd())return this;return this.modifyText(this.nextWord())}graphemeAt(A){if(A>=this.text.length)return"";let q=this.measuredText.nextOffset(A);return this.text.slice(A,q)}isOverWhitespace(){let A=this.text[this.offset]??"";return/\s/.test(A)}equals(A){return this.offset===A.offset&&this.measuredText===A.measuredText}isAtStart(){return this.offset===0}isAtEnd(){return this.offset>=this.text.length}startOfFirstLine(){return new oK(this.measuredText,0,0)}startOfLastLine(){let A=this.text.lastIndexOf(` `);if(A===-1)return this.startOfLine();return new oK(this.measuredText,A+1,0)}goToLine(A){let q=this.text.split(` `),K=Math.min(Math.max(0,A-1),q.length-1),Y=0;for(let z=0;z=0){if(this.graphemeAt($)===A){if(_++,_===K)return w?Math.min(this.offset,this.measuredText.nextOffset($)):$}if($===0)break;$=this.measuredText.prevOffset($)}}return null}}class D01{text;startOffset;isPrecededByNewline;endsWithNewline;constructor(A,q,K,Y=!1){this.text=A;this.startOffset=q;this.isPrecededByNewline=K;this.endsWithNewline=Y}equals(A){return this.text===A.text&&this.startOffset===A.startOffset}get length(){return this.text.length+(this.endsWithNewline?1:0)}}class Tq4{columns;_wrappedLines;text;navigationCache;graphemeBoundaries;constructor(A,q){this.columns=q;this.text=A.normalize("NFC"),this.navigationCache=new Map}get wrappedLines(){if(!this._wrappedLines)this._wrappedLines=this.measureWrappedText();return this._wrappedLines}getGraphemeBoundaries(){if(!this.graphemeBoundaries){this.graphemeBoundaries=[];for(let{index:A}of hj().segment(this.text))this.graphemeBoundaries.push(A);this.graphemeBoundaries.push(this.text.length)}return this.graphemeBoundaries}wordBoundariesCache;getWordBoundaries(){if(!this.wordBoundariesCache){this.wordBoundariesCache=[];for(let A of RdA().segment(this.text))this.wordBoundariesCache.push({start:A.index,end:A.index+A.segment.length,isWordLike:A.isWordLike??!1})}return this.wordBoundariesCache}binarySearchBoundary(A,q,K){let Y=0,z=A.length-1,w=K?this.text.length:0;while(Y<=z){let _=Math.floor((Y+z)/2),$=A[_];if($===void 0)break;if(K)if($>q)w=$,z=_-1;else Y=_+1;else if($=A.length)return B8(A);return B8(A.substring(0,q))}displayWidthToStringIndex(A,q){if(q<=0)return 0;if(!A)return 0;if(A===this.text)return this.offsetAtDisplayWidth(q);let K=0,Y=0;for(let{segment:z,index:w}of hj().segment(A)){let _=B8(z);if(K+_>q)break;K+=_,Y=w+z.length}return Y}offsetAtDisplayWidth(A){if(A<=0)return 0;let q=0,K=this.getGraphemeBoundaries();for(let Y=0;YA)return z;q+=$}return this.text.length}measureWrappedText(){let A=L56(this.text,this.columns,{hard:!0,trim:!1}),q=[],K=0,Y=-1,z=A.split(` `);for(let w=0;ww===0||O>0&&this.text[O-1]===` `;if(_.length===0)if(Y=this.text.indexOf(` `,Y+1),Y!==-1){let O=Y,H=!0;q.push(new D01(_,O,$(O),!0))}else{let O=this.text.length;q.push(new D01(_,O,$(O),!1))}else{let O=this.text.indexOf(_,K);if(O===-1)throw Error("Failed to find wrapped line in text");K=O+_.length;let H=O+_.length,j=HA.isPrecededByNewline?A.text:A.text.trimStart())}getWrappedLines(){return this.wrappedLines}getLine(A){let q=this.wrappedLines;return q[Math.max(0,Math.min(A,q.length-1))]}getOffsetFromPosition(A){let q=this.getLine(A.line);if(q.text.length===0&&q.endsWithNewline)return q.startOffset;let K=q.isPrecededByNewline?0:q.text.length-q.text.trimStart().length,Y=A.column+K,z=this.displayWidthToStringIndex(q.text,Y),w=q.startOffset+z,_=q.startOffset+q.text.length,$=_,O=B8(q.text);if(q.endsWithNewline&&A.column>O)$=_+1;return Math.min(w,$)}getLineLength(A){let q=this.getLine(A);return B8(q.text)}getPositionFromOffset(A){let q=this.wrappedLines;for(let z=0;z=w.startOffset&&(!_||A<_.startOffset)){let $=A-w.startOffset,O;if(w.isPrecededByNewline)O=this.stringIndexToDisplayWidth(w.text,$);else{let H=w.text.length-w.text.trimStart().length;if(${let q=this.getGraphemeBoundaries();return this.binarySearchBoundary(q,A,!0)})}prevOffset(A){if(A<=0)return 0;return this.withCache(`prev:${A}`,()=>{let q=this.getGraphemeBoundaries();return this.binarySearchBoundary(q,A,!1)})}snapToGraphemeBoundary(A){if(A<=0)return 0;if(A>=this.text.length)return this.text.length;let q=this.getGraphemeBoundaries(),K=0,Y=q.length-1;while(K>1;if(q[z]<=A)K=z;else Y=z-1}return q[K]}}var gp9=10,hS,M01=0,bN8=!1,fq4=0,xN8=0,X01=!1,Fp9,Gp6,ll=(A)=>Fp9.test(A),f01=(A)=>Gp6.test(A),v66=(A)=>A.length>0&&!f01(A)&&!ll(A);var EY6=k(()=>{hH1();y5();YR();hS=[];Fp9=/^[\p{L}\p{N}\p{M}_]$/u,Gp6=/\s/});import{join as Qp9}from"path";function uN8(){let A=P1().existsSync(Qp9(I1(),"CLAUDE.md")),q=kq4(I1());return[{key:"workspace",text:"Ask Claude to create a new app or clone a repository",isComplete:!1,isCompletable:!0,isEnabled:q},{key:"claudemd",text:"Run /init to create a CLAUDE.md file with instructions for Claude",isComplete:A,isCompletable:!0,isEnabled:!q}]}function Vq4(){return uN8().filter(({isCompletable:A,isEnabled:q})=>A&&q).every(({isComplete:A})=>A)}function zG6(){if(f_().hasCompletedProjectOnboarding)return;if(Vq4())T_((A)=>({...A,hasCompletedProjectOnboarding:!0}))}function vq4(){T_((A)=>({...A,projectOnboardingSeenCount:A.projectOnboardingSeenCount+1}))}var Nq4;var Vp6=k(()=>{Q8();p7();W7();Y7();Eq();Nq4=T8(()=>{if(Vq4()||f_().projectOnboardingSeenCount>=4||process.env.IS_DEMO)return!1;return!0})});import{homedir as Up9}from"os";import{join as pp9}from"path";import{stat as Eq4}from"fs/promises";function dp9(A){_8((q)=>({...q,appleTerminalSetupInProgress:!0,appleTerminalBackupPath:A}))}function wG6(){_8((A)=>({...A,appleTerminalSetupInProgress:!1}))}function cp9(){let A=T1();return{inProgress:A.appleTerminalSetupInProgress??!1,backupPath:A.appleTerminalBackupPath||null}}function _G6(){return pp9(Up9(),"Library","Preferences","com.apple.Terminal.plist")}async function Lq4(){let A=_G6(),q=`${A}.bak`;try{let{code:K}=await W8("defaults",["export","com.apple.Terminal",A]);if(K!==0)return null;try{await Eq4(A)}catch{return null}return await W8("defaults",["export","com.apple.Terminal",q]),dp9(q),q}catch(K){return $6(K),null}}async function T01(){let{inProgress:A,backupPath:q}=cp9();if(!A)return{status:"no_backup"};if(!q)return wG6(),{status:"no_backup"};try{await Eq4(q)}catch{return wG6(),{status:"no_backup"}}try{let{code:K}=await W8("defaults",["import","com.apple.Terminal",q]);if(K!==0)return{status:"failed",backupPath:q};return await W8("killall",["cfprefsd"]),wG6(),{status:"restored"}}catch(K){return $6(Error(`Failed to restore Terminal.app settings with: ${K}`)),wG6(),{status:"failed",backupPath:q}}}var BN8=k(()=>{aq();x1();Q8()});import{homedir as lp9}from"os";import{dirname as f5_,join as k66}from"path";function ip9(){let A=process.env.SHELL||"",q=lp9(),K=k66(q,".claude");if(A.endsWith("/zsh")||A.endsWith("/zsh.exe")){let Y=k66(K,"completion.zsh");return{name:"zsh",rcFile:k66(q,".zshrc"),cacheFile:Y,completionLine:`[[ -f "${Y}" ]] && source "${Y}"`,shellFlag:"zsh"}}if(A.endsWith("/bash")||A.endsWith("/bash.exe")){let Y=k66(K,"completion.bash");return{name:"bash",rcFile:k66(q,".bashrc"),cacheFile:Y,completionLine:`[ -f "${Y}" ] && source "${Y}"`,shellFlag:"bash"}}if(A.endsWith("/fish")||A.endsWith("/fish.exe")){let Y=process.env.XDG_CONFIG_HOME||k66(q,".config"),z=k66(K,"completion.fish");return{name:"fish",rcFile:k66(Y,"fish","config.fish"),cacheFile:z,completionLine:`[ -f "${z}" ] && source "${z}"`,shellFlag:"fish"}}return null}async function mN8(){let A=ip9();if(!A)return;L(`update: Regenerating ${A.name} completion cache`);let q=process.argv[1]||"claude";if((await W8(q,["completion",A.shellFlag,"--output",A.cacheFile])).code!==0){L(`update: Failed to regenerate ${A.name} completion cache`);return}L(`update: Regenerated ${A.name} completion cache at ${A.cacheFile}`)}var gN8=k(()=>{We();tc();G1();aq();x1()});var Sq4={};m1(Sq4,{shouldOfferTerminalSetup:()=>$G6,setupTerminal:()=>v01,markBackslashReturnUsed:()=>oN8,isShiftEnterKeyBindingInstalled:()=>nN8,hasUsedBackslashReturn:()=>rN8,getNativeCSIuTerminalDisplayName:()=>iN8,call:()=>ap9});import{randomBytes as QN8}from"crypto";import{copyFile as UN8,mkdir as pN8,readFile as dN8,writeFile as cN8}from"fs/promises";import{homedir as lN8,platform as V01}from"os";import{dirname as np9,join as JF}from"path";import{pathToFileURL as rp9}from"url";function op9(){let A=process.env.VSCODE_GIT_ASKPASS_MAIN??"",q=process.env.PATH??"";return A.includes(".vscode-server")||A.includes(".cursor-server")||A.includes(".windsurf-server")||q.includes(".vscode-server")||q.includes(".cursor-server")||q.includes(".windsurf-server")}function iN8(){if(!YA.terminal||!(YA.terminal in N01))return null;return N01[YA.terminal]??null}function IS(A){if(!ef())return A;return`\x1B]8;;${rp9(A).href}\x07${A}\x1B]8;;\x07`}function $G6(){return V01()==="darwin"&&YA.terminal==="Apple_Terminal"||YA.terminal==="vscode"||YA.terminal==="cursor"||YA.terminal==="windsurf"||YA.terminal==="alacritty"||YA.terminal==="zed"}async function v01(A){let q="";switch(YA.terminal){case"Apple_Terminal":q=await sp9(A);break;case"vscode":q=await FN8("VSCode",A);break;case"cursor":q=await FN8("Cursor",A);break;case"windsurf":q=await FN8("Windsurf",A);break;case"alacritty":q=await tp9(A);break;case"zed":q=await ep9(A);break;case null:break}return _8((K)=>{if(["vscode","cursor","windsurf","alacritty","zed"].includes(YA.terminal??"")){if(K.shiftEnterKeyBindingInstalled===!0)return K;return{...K,shiftEnterKeyBindingInstalled:!0}}else if(YA.terminal==="Apple_Terminal"){if(K.optionAsMetaKeyInstalled===!0)return K;return{...K,optionAsMetaKeyInstalled:!0}}return K}),zG6(),q}function nN8(){return T1().shiftEnterKeyBindingInstalled===!0}function rN8(){return T1().hasUsedBackslashReturn===!0}function oN8(){if(!T1().hasUsedBackslashReturn)_8((q)=>({...q,hasUsedBackslashReturn:!0}))}async function ap9(A,q,K){if(YA.terminal&&YA.terminal in N01){let z=`Shift+Enter is natively supported in ${N01[YA.terminal]}. No configuration needed. Just use Shift+Enter to add newlines.`;return A(z),null}if(!$G6()){let z=YA.terminal||"your current terminal",w=c8(),_="";if(w==="macos")_=` • macOS: Apple Terminal `;else if(w==="windows")_=` • Windows: Windows Terminal `;let $=`Terminal setup cannot be run from ${z}. This command configures a convenient Shift+Enter shortcut for multi-line prompts. ${M1.dim("Note: You can already use backslash (\\\\) + return to add newlines.")} To set up the shortcut (optional): 1. Exit tmux/screen temporarily 2. Run /terminal-setup directly in one of these terminals: ${_} • IDE: VSCode, Cursor, Windsurf, Zed • Other: Alacritty 3. Return to tmux/screen - settings will persist ${M1.dim("Note: iTerm2, WezTerm, Ghostty, Kitty, and Warp support Shift+Enter natively.")}`;return A($),null}let Y=await v01(q.options.theme);return A(Y),null}async function FN8(A="VSCode",q){if(op9())return`${uA("warning",q)(`Cannot install keybindings from a remote ${A} session.`)}${qY}${qY}${A} keybindings must be installed on your local machine, not the remote server.${qY}${qY}To install the Shift+Enter keybinding:${qY}1. Open ${A} on your local machine (not connected to remote)${qY}2. Open the Command Palette (Cmd/Ctrl+Shift+P) → "Preferences: Open Keyboard Shortcuts (JSON)"${qY}3. Add this keybinding (the file must be a JSON array):${qY}${qY}${M1.dim(`[ { "key": "shift+enter", "command": "workbench.action.terminal.sendSequence", "args": { "text": "\\u001b\\r" }, "when": "terminalFocus" } ]`)}${qY}`;let K=A==="VSCode"?"Code":A,Y=JF(lN8(),V01()==="win32"?JF("AppData","Roaming",K,"User"):V01()==="darwin"?JF("Library","Application Support",K,"User"):JF(".config",K,"User")),z=JF(Y,"keybindings.json");try{await pN8(Y,{recursive:!0});let w="[]",_=[],$=!1;try{w=await dN8(z,{encoding:"utf-8"}),$=!0,_=OvA(w)??[]}catch(J){let M=J.code;if(M!=="ENOENT"&&M!=="EACCES"&&M!=="EPERM")throw J}if($){let J=QN8(4).toString("hex"),M=`${z}.${J}.bak`;try{await UN8(z,M)}catch{return`${uA("warning",q)(`Error backing up existing ${A} terminal keybindings. Bailing out.`)}${qY}${M1.dim(`See ${IS(z)}`)}${qY}${M1.dim(`Backup path: ${IS(M)}`)}${qY}`}}if(_.find((J)=>J.key==="shift+enter"&&J.command==="workbench.action.terminal.sendSequence"&&J.when==="terminalFocus"))return`${uA("warning",q)(`Found existing ${A} terminal Shift+Enter key binding. Remove it to continue.`)}${qY}${M1.dim(`See ${IS(z)}`)}${qY}`;let j=jvA(w,{key:"shift+enter",command:"workbench.action.terminal.sendSequence",args:{text:"\x1B\r"},when:"terminalFocus"});return await cN8(z,j,{encoding:"utf-8"}),`${uA("success",q)(`Installed ${A} terminal Shift+Enter key binding`)}${qY}${M1.dim(`See ${IS(z)}`)}${qY}`}catch(w){throw $6(w),Error(`Failed to install ${A} terminal Shift+Enter key binding`)}}async function yq4(A){let{code:q}=await W8("/usr/libexec/PlistBuddy",["-c",`Add :'Window Settings':'${A}':useOptionAsMetaKey bool true`,_G6()]);if(q!==0){let{code:K}=await W8("/usr/libexec/PlistBuddy",["-c",`Set :'Window Settings':'${A}':useOptionAsMetaKey true`,_G6()]);if(K!==0)return $6(Error(`Failed to enable Option as Meta key for Terminal.app profile: ${A}`)),!1}return!0}async function Rq4(A){let{code:q}=await W8("/usr/libexec/PlistBuddy",["-c",`Add :'Window Settings':'${A}':Bell bool false`,_G6()]);if(q!==0){let{code:K}=await W8("/usr/libexec/PlistBuddy",["-c",`Set :'Window Settings':'${A}':Bell false`,_G6()]);if(K!==0)return $6(Error(`Failed to disable audio bell for Terminal.app profile: ${A}`)),!1}return!0}async function sp9(A){try{if(!await Lq4())throw Error("Failed to create backup of Terminal.app preferences, bailing out");let{stdout:K,code:Y}=await W8("defaults",["read","com.apple.Terminal","Default Window Settings"]);if(Y!==0||!K.trim())throw Error("Failed to read default Terminal.app profile");let{stdout:z,code:w}=await W8("defaults",["read","com.apple.Terminal","Startup Window Settings"]);if(w!==0||!z.trim())throw Error("Failed to read startup Terminal.app profile");let _=!1,$=K.trim(),O=await yq4($),H=await Rq4($);if(O||H)_=!0;let j=z.trim();if(j!==$){let J=await yq4(j),M=await Rq4(j);if(J||M)_=!0}if(!_)throw Error("Failed to enable Option as Meta key or disable audio bell for any Terminal.app profile");return await W8("killall",["cfprefsd"]),wG6(),`${uA("success",A)("Configured Terminal.app settings:")}${qY}${uA("success",A)('- Enabled "Use Option as Meta key"')}${qY}${uA("success",A)("- Switched to visual bell")}${qY}${M1.dim("Option+Enter will now enter a newline.")}${qY}${M1.dim("You must restart Terminal.app for changes to take effect.",A)}${qY}`}catch(q){$6(q);let K=await T01(),Y="Failed to enable Option as Meta key for Terminal.app.";if(K.status==="restored")throw Error(`${Y} Your settings have been restored from backup.`);else if(K.status==="failed")throw Error(`${Y} Restoring from backup failed, try manually with: defaults import com.apple.Terminal ${K.backupPath}`);else throw Error(`${Y} No backup was available to restore from.`)}}async function tp9(A){let K=[],Y=process.env.XDG_CONFIG_HOME;if(Y)K.push(JF(Y,"alacritty","alacritty.toml"));else K.push(JF(lN8(),".config","alacritty","alacritty.toml"));if(V01()==="win32"){let $=process.env.APPDATA;if($)K.push(JF($,"alacritty","alacritty.toml"))}let z=null,w="",_=!1;for(let $ of K)try{w=await dN8($,{encoding:"utf-8"}),z=$,_=!0;break}catch(O){let H=O.code;if(H!=="ENOENT"&&H!=="EACCES"&&H!=="EPERM")throw O}if(!z)z=K[0]??null;if(!z)throw Error("No valid config path found for Alacritty");try{if(_){if(w.includes('mods = "Shift"')&&w.includes('key = "Return"'))return`${uA("warning",A)("Found existing Alacritty Shift+Enter key binding. Remove it to continue.")}${qY}${M1.dim(`See ${IS(z)}`)}${qY}`;let O=QN8(4).toString("hex"),H=`${z}.${O}.bak`;try{await UN8(z,H)}catch{return`${uA("warning",A)("Error backing up existing Alacritty config. Bailing out.")}${qY}${M1.dim(`See ${IS(z)}`)}${qY}${M1.dim(`Backup path: ${IS(H)}`)}${qY}`}}else await pN8(np9(z),{recursive:!0});let $=w;if(w&&!w.endsWith(` `))$+=` `;return $+=` [[keyboard.bindings]] key = "Return" mods = "Shift" chars = "\\u001B\\r" `,await cN8(z,$,{encoding:"utf-8"}),`${uA("success",A)("Installed Alacritty Shift+Enter key binding")}${qY}${uA("success",A)("You may need to restart Alacritty for changes to take effect")}${qY}${M1.dim(`See ${IS(z)}`)}${qY}`}catch($){throw $6($),Error("Failed to install Alacritty Shift+Enter key binding")}}async function ep9(A){let q=JF(lN8(),".config","zed"),K=JF(q,"keymap.json");try{await pN8(q,{recursive:!0});let Y="[]",z=!1;try{Y=await dN8(K,{encoding:"utf-8"}),z=!0}catch(_){let $=_.code;if($!=="ENOENT"&&$!=="EACCES"&&$!=="EPERM")throw _}if(z){if(Y.includes("shift-enter"))return`${uA("warning",A)("Found existing Zed Shift+Enter key binding. Remove it to continue.")}${qY}${M1.dim(`See ${IS(K)}`)}${qY}`;let _=QN8(4).toString("hex"),$=`${K}.${_}.bak`;try{await UN8(K,$)}catch{return`${uA("warning",A)("Error backing up existing Zed keymap. Bailing out.")}${qY}${M1.dim(`See ${IS(K)}`)}${qY}${M1.dim(`Backup path: ${IS($)}`)}${qY}`}}let w;try{if(w=O8(Y),!Array.isArray(w))w=[]}catch{w=[]}return w.push({context:"Terminal",bindings:{"shift-enter":["terminal::SendText","\x1B\r"]}}),await cN8(K,U6(w,null,2)+` `,{encoding:"utf-8"}),`${uA("success",A)("Installed Zed Shift+Enter key binding")}${qY}${M1.dim(`See ${IS(K)}`)}${qY}`}catch(Y){throw $6(Y),Error("Failed to install Zed Shift+Enter key binding")}}var qY=` `,N01;var LY6=k(()=>{iK();tc();Vp6();BN8();Q8();K9();aq();J2();x1();n6();uK();a1();gN8();N01={ghostty:"Ghostty",kitty:"Kitty","iTerm.app":"iTerm2",WezTerm:"WezTerm",WarpTerminal:"Warp"}});import{join as aN8}from"path";import{createHash as Ad9}from"crypto";import{mkdir as qd9,writeFile as Kd9,readFile as Yd9,readdir as zd9,stat as wd9,unlink as _d9}from"fs/promises";function sN8(){return aN8(OA(),$d9)}function Cq4(A){return Ad9("sha256").update(A).digest("hex").slice(0,16)}function hq4(A){return aN8(sN8(),`${A}.txt`)}async function Iq4(A,q){try{let K=sN8();await qd9(K,{recursive:!0});let Y=hq4(A);await Kd9(Y,q,{encoding:"utf8",mode:384}),L(`Stored paste ${A} to ${Y}`)}catch(K){L(`Failed to store paste: ${K}`)}}async function bq4(A){try{let q=hq4(A);return await Yd9(q,{encoding:"utf8"})}catch(q){if(q&&typeof q==="object"&&"code"in q){if(q.code!=="ENOENT")L(`Failed to retrieve paste ${A}: ${q}`)}return null}}async function xq4(A){let q=sN8(),K;try{K=await zd9(q)}catch{return}let Y=A.getTime();for(let z of K){if(!z.endsWith(".txt"))continue;let w=aN8(q,z);try{if((await wd9(w)).mtimeMs{Z8();G1()});import{join as Bq4}from"path";import{appendFile as Od9,writeFile as Hd9}from"fs/promises";function OG6(A){return(A.match(/\r\n|\r|\n/g)||[]).length}function E01(A,q){if(q===0)return`[Pasted text #${A}]`;return`[Pasted text #${A} +${q} lines]`}function HG6(A){let q=/\[(Pasted text|Image|\.\.\.Truncated text) #(\d+)(?: \+\d+ lines)?(\.)*\]/g;return[...A.matchAll(q)].map((Y)=>({id:parseInt(Y[2]||"0"),match:Y[0]})).filter((Y)=>Y.id>0)}function Md9(A){return O8(A)}async function*gq4(){for(let q=nl.length-1;q>=0;q--)yield nl[q];let A=Bq4(OA(),"history.jsonl");try{for await(let q of UKA(A))try{yield Md9(q)}catch(K){L(`Failed to parse history line: ${K}`)}}catch(q){if(q.code==="ENOENT")return;throw q}}async function*Av8(){for await(let A of gq4())yield await Fq4(A)}async function*L01(){let A=Uz(),q=0;for await(let K of gq4()){if(!K||typeof K.project!=="string")continue;if(K.project===A){if(yield await Fq4(K),q++,q>=jd9)break}}}async function Dd9(A){if(A.content)return{id:A.id,type:A.type,content:A.content,mediaType:A.mediaType,filename:A.filename};if(A.contentHash){let q=await bq4(A.contentHash);if(q)return{id:A.id,type:A.type,content:q,mediaType:A.mediaType,filename:A.filename}}return null}async function Fq4(A){let q={};for(let[K,Y]of Object.entries(A.pastedContents||{})){let z=await Dd9(Y);if(z)q[Number(K)]=z}return{display:A.display,pastedContents:q}}async function Qq4(){if(nl.length===0)return;let A;try{let q=Bq4(OA(),"history.jsonl");await Hd9(q,"",{encoding:"utf8",mode:384,flag:"a"}),A=await mq4.lock(q,{stale:1e4,retries:{retries:3,minTimeout:50}});let K=nl.map((Y)=>U6(Y)+` `);nl=[],await Od9(q,K.join(""),{mode:384})}catch(q){L(`Failed to write prompt history: ${q}`)}finally{if(A)await A()}}async function Uq4(A){if(eN8||nl.length===0)return;if(A>5)return;eN8=!0;try{await Qq4()}finally{if(eN8=!1,nl.length>0)await new Promise((q)=>setTimeout(q,500)),Uq4(A+1)}}async function Xd9(A){let q=typeof A==="string"?{display:A,pastedContents:{}}:A,K={};if(q.pastedContents)for(let[z,w]of Object.entries(q.pastedContents)){if(w.type==="image")continue;if(w.content.length<=Jd9)K[Number(z)]={id:w.id,type:w.type,content:w.content,mediaType:w.mediaType,filename:w.filename};else{let _=Cq4(w.content);K[Number(z)]={id:w.id,type:w.type,contentHash:_,mediaType:w.mediaType,filename:w.filename},Iq4(_,w.content)}}let Y={...q,pastedContents:K,timestamp:Date.now(),project:Uz(),sessionId:d1()};nl.push(Y),k01=Uq4(0)}function yY6(A){if($1(process.env.CLAUDE_CODE_SKIP_PROMPT_HISTORY))return;if(!uq4)uq4=!0,Kq(async()=>{if(k01)await k01;if(nl.length>0)await Qq4()});Xd9(A)}var mq4,jd9=100,Jd9=1024,nl,eN8=!1,k01=null,uq4=!1;var zx=k(()=>{Z8();Y7();Q1();G1();sY();a1();tN8();mq4=e(zm(),1);nl=[]});function pq4(A,q){switch(q){case"bash":return`!${A}`;default:return A}}function MF(A){if(A.startsWith("!"))return"bash";return"prompt"}function RY6(A){if(MF(A)==="prompt")return A;return A.slice(1)}function dq4(A){return A==="!"}function jG6(A){let q=y01.useCallback((K)=>{let Y=BA();A(K,Y)},[A]);y01.useEffect(()=>o$.subscribe(q),[q])}var y01;var R01=k(()=>{Vm();GA();y01=e(W6(),1)});function S01(){return p8("tengu_amber_quartz",!1)}function fT(){if(!nH())return!1;return S01()}var rl=k(()=>{rA();bA()});function C01(A,q){let K=h7();L(`Settings changed from ${A}, updating app state`);let Y=A91();yK6(),q((z)=>{let w=cq4(z.toolPermissionContext,Y);if(w.isBypassPermissionsModeAvailable&&SY6())w=CY6(w);let _=cd(K.effortLevel);return{...z,settings:K,toolPermissionContext:w,..._!==void 0?{effortValue:_}:{},...{voiceEnabled:K.voiceEnabled===!0&&fT()}}})}var qv8=k(()=>{GA();G1();eV();xJ();Xm();XP();RK6();rl()});class Kv8{queue=[];waiters=[];listeners=new Set;_revision=0;get length(){return this.queue.length}get revision(){return this._revision}send(A){this._revision++;let q=this.waiters.findIndex((K)=>K.fn(A));if(q!==-1){let K=this.waiters.splice(q,1)[0];if(K){K.resolve(A),this.notify();return}}this.queue.push(A),this.notify()}poll(A=()=>!0){let q=this.queue.findIndex(A);if(q===-1)return;return this.queue.splice(q,1)[0]}receive(A=()=>!0){let q=this.queue.findIndex(A);if(q!==-1){let K=this.queue.splice(q,1)[0];if(K)return this.notify(),Promise.resolve(K)}return new Promise((K)=>{this.waiters.push({fn:A,resolve:K})})}subscribe(A){return this.listeners.add(A),()=>{this.listeners.delete(A)}}notify(){for(let A of this.listeners)A()}}function iq4(A){let q=Y6(3),{children:K}=A,Y;if(q[0]===Symbol.for("react.memo_cache_sentinel"))Y=new Kv8,q[0]=Y;else Y=q[0];let z=Y,w;if(q[1]!==K)w=JG6.default.createElement(lq4.Provider,{value:z},K),q[1]=K,q[2]=w;else w=q[2];return w}function nq4(){let A=JG6.useContext(lq4);if(!A)throw Error("useMailbox must be used within a MailboxProvider");return A}var JG6,lq4;var Yv8=k(()=>{K1();JG6=e(W6(),1),lq4=JG6.createContext(void 0)});function h01(A,q){let K=A,Y=new Set;return{getState:()=>K,setState:(z)=>{let w=K,_=z(w);if(Object.is(_,w))return;K=_,q?.({newState:_,oldState:w});for(let $ of Y)$()},subscribe:(z)=>{return Y.add(z),()=>Y.delete(z)}}}import{basename as Pd9,extname as Wd9,posix as rq4,sep as Zd9}from"path";function aq4(A){let q=rq4.sep+A.split(Zd9).join(rq4.sep).replace(/^\/+/,""),K=Pd9(A).toLowerCase(),Y=Wd9(A).toLowerCase();if(Gd9.has(K))return!0;if(oq4.has(Y))return!0;let z=K.split(".");if(z.length>2){let w="."+z.slice(-2).join(".");if(oq4.has(w))return!0}for(let w of fd9)if(q.includes(w))return!0;for(let w of Td9)if(w.test(K))return!0;return!1}var Gd9,oq4,fd9,Td9;var sq4=k(()=>{Gd9=new Set(["package-lock.json","yarn.lock","pnpm-lock.yaml","bun.lockb","bun.lock","composer.lock","gemfile.lock","cargo.lock","poetry.lock","pipfile.lock","shrinkwrap.json","npm-shrinkwrap.json"]),oq4=new Set([".lock",".min.js",".min.css",".min.html",".bundle.js",".bundle.css",".generated.ts",".generated.js",".d.ts"]),fd9=["/dist/","/build/","/out/","/output/","/node_modules/","/vendor/","/vendored/","/third_party/","/third-party/","/external/","/.next/","/.nuxt/","/.svelte-kit/","/coverage/","/__pycache__/","/.tox/","/venv/","/.venv/","/target/release/","/target/debug/"],Td9=[/^.*\.min\.[a-z]+$/i,/^.*-min\.[a-z]+$/i,/^.*\.bundle\.[a-z]+$/i,/^.*\.generated\.[a-z]+$/i,/^.*\.gen\.[a-z]+$/i,/^.*\.auto\.[a-z]+$/i,/^.*_generated\.[a-z]+$/i,/^.*_gen\.[a-z]+$/i,/^.*\.pb\.(go|js|ts|py|rb)$/i,/^.*_pb2?\.py$/i,/^.*\.pb\.h$/i,/^.*\.grpc\.[a-z]+$/i,/^.*\.swagger\.[a-z]+$/i,/^.*\.openapi\.[a-z]+$/i]});import{join as Vd9,isAbsolute as B9_,relative as m9_}from"path";import{stat as Nd9}from"fs/promises";function I01(){let A=I1();return Fw(A)??DA()}function eq4(){return Np6==="internal"}function qK4(A){if(A.includes("opus-4-6"))return"claude-opus-4-6";if(A.includes("opus-4-5"))return"claude-opus-4-5";if(A.includes("opus-4-1"))return"claude-opus-4-1";if(A.includes("opus-4"))return"claude-opus-4";if(A.includes("sonnet-4-6"))return"claude-sonnet-4-6";if(A.includes("sonnet-4-5"))return"claude-sonnet-4-5";if(A.includes("sonnet-4"))return"claude-sonnet-4";if(A.includes("sonnet-3-7"))return"claude-sonnet-3-7";if(A.includes("haiku-4-5"))return"claude-haiku-4-5";if(A.includes("haiku-3-5"))return"claude-haiku-3-5";return"claude"}function kd9(){return process.env.CLAUDE_CODE_ENTRYPOINT??"cli"}function MG6(){return{fileStates:new Map,sessionBaselines:new Map,surface:kd9(),startingHeadSha:null,promptCount:0,promptCountAtLastCommit:0,permissionPromptCount:0,permissionPromptCountAtLastCommit:0,escapeCount:0,escapeCountAtLastCommit:0}}async function KK4(A,q){let K=I01(),Y=d1(),z={},w=[],_=new Set,$={},O=0,H=0,j=new Map,J=new Map;for(let W of A){_.add(W.surface);let Z=W.sessionBaselines instanceof Map?W.sessionBaselines:new Map(Object.entries(W.sessionBaselines??{}));for(let[f,V]of Z)if(!J.has(f))J.set(f,V);let G=W.fileStates instanceof Map?W.fileStates:new Map(Object.entries(W.fileStates??{}));for(let[f,V]of G){let N=j.get(f);if(N)j.set(f,{...V,claudeContribution:N.claudeContribution+V.claudeContribution});else j.set(f,V)}}let M=await Promise.all(q.map(async(W)=>{if(aq4(W))return{type:"generated",file:W};let Z=Vd9(K,W),G=j.get(W),f=J.get(W),V=A[0].surface,N=0,v=0;if(await Ed9(W))if(G)N=G.claudeContribution,v=0;else{let B=await tq4(W);v=B>0?B:100}else try{let B=await Nd9(Z);if(G)N=G.claudeContribution,v=0;else if(f){let x=await tq4(W);v=x>0?x:B.size}else v=B.size}catch{return null}N=Math.max(0,N),v=Math.max(0,v);let R=N+v,h=R>0?Math.round(N/R*100):0;return{type:"file",file:W,claudeChars:N,humanChars:v,percent:h,surface:V}}));for(let W of M){if(!W)continue;if(W.type==="generated"){w.push(W.file);continue}z[W.file]={claudeChars:W.claudeChars,humanChars:W.humanChars,percent:W.percent,surface:W.surface},O+=W.claudeChars,H+=W.humanChars,$[W.surface]=($[W.surface]??0)+W.claudeChars}let D=O+H,X=D>0?Math.round(O/D*100):0,P={};for(let[W,Z]of Object.entries($)){let G=D>0?Math.round(Z/D*100):0;P[W]={claudeChars:Z,percent:G}}return{version:1,summary:{claudePercent:X,claudeChars:O,humanChars:H,surfaces:Array.from(_)},files:z,surfaceBreakdown:P,excludedGenerated:w,sessions:[Y]}}async function tq4(A){let q=I01();try{let K=await z7(nA(),["diff","--cached","--stat","--",A],{cwd:q,timeout:5000});if(K.code!==0||!K.stdout)return 0;let Y=K.stdout.split(` `).filter(Boolean),z=0;for(let w of Y)if(w.includes("file changed")||w.includes("files changed")){let _=w.match(/(\d+) insertions?/),$=w.match(/(\d+) deletions?/),O=_?parseInt(_[1],10):0,H=$?parseInt($[1],10):0;z+=(O+H)*40}return z}catch{return 0}}async function Ed9(A){let q=I01();try{let K=await z7(nA(),["diff","--cached","--name-status","--",A],{cwd:q,timeout:5000});if(K.code===0&&K.stdout)return K.stdout.trim().startsWith("D\t")}catch{}return!1}var vd9,Np6=null,AK4;var ol=k(()=>{Q1();Y7();G1();x1();sq4();aq();Xq();U3();ZK6();W7();vd9=["github.com:anthropics/claude-cli-internal","github.com/anthropics/claude-cli-internal","github.com:anthropics/anthropic","github.com/anthropics/anthropic","github.com:anthropics/apps","github.com/anthropics/apps","github.com:anthropics/casino","github.com/anthropics/casino","github.com:anthropics/dotfiles","github.com/anthropics/dotfiles","github.com:anthropics/terraform-config","github.com/anthropics/terraform-config","github.com:anthropics/hex-export","github.com/anthropics/hex-export","github.com:anthropics/feedback-v2","github.com/anthropics/feedback-v2","github.com:anthropics/labs","github.com/anthropics/labs","github.com:anthropics/argo-rollouts","github.com/anthropics/argo-rollouts","github.com:anthropics/starling-configs","github.com/anthropics/starling-configs","github.com:anthropics/ts-tools","github.com/anthropics/ts-tools","github.com:anthropics/ts-capsules","github.com/anthropics/ts-capsules"];AK4=Og(async()=>{if(Np6!==null)return Np6==="internal";let A=I01(),q=await b31(A);if(!q)return Np6="none",!1;let K=vd9.some((Y)=>q.includes(Y));return Np6=K?"internal":"external",K})});function zK4(){return null}function wK4(A){let q=zK4();if(!q)return A;let K=new globalThis.Headers(A);return Object.entries(q).forEach(([Y,z])=>{if(z!==void 0)K.set(Y,z)}),K}function DG6(){return b01&&!1}function _K4(){return null}function $K4(){return b01&&YK4!==null&&!1}var Ld9,b01=!1,YK4=null,yd9="max";var zv8=k(()=>{Q8();Ld9={}});function wv8(A){if(DG6())return wK4(A);return A}function XG6(A){return A||DG6()}function HK4(A){return DG6()&&A.status===429}var vp6=k(()=>{zv8();rV()});function jK4(A){return Rd9.some((q)=>A.startsWith(q))}function JK4(A,q){if(A.isUsingOverage){if(A.overageStatus==="allowed_warning")return{message:"You're close to your extra usage spending limit",severity:"warning"};return null}if(A.status==="rejected")return{message:Sd9(A,q),severity:"error"};if(A.status==="allowed_warning"){if(A.utilization!==void 0&&A.utilization<0.7)return null;let Y=K3(),z=Y==="team"||Y==="enterprise",w=Y9()?.hasExtraUsageEnabled===!0;if(z&&w&&!wx())return null;let _=Cd9(A);if(_)return{message:_,severity:"warning"}}return null}function _v8(A,q){let K=JK4(A,q);if(K&&K.severity==="error")return K.message;return null}function $v8(A,q){let K=JK4(A,q);if(K&&K.severity==="warning")return K.message;return null}function Sd9(A,q){let K=A.resetsAt,Y=K?cM6(K,!0):void 0,z=A.overageResetsAt?cM6(A.overageResetsAt,!0):void 0,w=Y?` · resets ${Y}`:"";if(A.overageStatus==="rejected"){let _="";if(K&&A.overageResetsAt)if(K{Oq();bA();Q8();Rd9=["You've hit your","You've used","You're now using extra usage","You're close to","You're out of extra usage"]});function xd9(A,q){let K=Date.now()/1000,Y=A-q,z=K-Y;return Math.max(0,Math.min(1,z/q))}function jv8(A){TT=A,E66.forEach((K)=>K(A));let q=Math.round((A.resetsAt?A.resetsAt-Date.now()/1000:0)/3600);c("tengu_claudeai_limits_status_changed",{status:A.status,unifiedRateLimitFallbackAvailable:A.unifiedRateLimitFallbackAvailable,hoursTillReset:q})}async function ud9(){let A=Fj(),q=await eb({maxRetries:0,model:A,source:"quota_check"}),K=[{role:"user",content:"quota"}],Y=nE(A);return q.beta.messages.create({model:A,max_tokens:1,messages:K,metadata:L66(),...Y.length>0?{betas:Y}:{}}).asResponse()}async function MK4(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return;if(!XG6(A7()))return;if(u7())return;try{let A=await ud9();Jv8(A.headers)}catch(A){if(A instanceof V4)x01(A)}}function Bd9(A,q){for(let[K,Y]of Object.entries(bd9)){let z=A.get(`anthropic-ratelimit-unified-${K}-surpassed-threshold`);if(z!==null){let w=A.get(`anthropic-ratelimit-unified-${K}-utilization`),_=A.get(`anthropic-ratelimit-unified-${K}-reset`),$=w?Number(w):void 0;return{status:"allowed_warning",resetsAt:_?Number(_):void 0,rateLimitType:Y,utilization:$,unifiedRateLimitFallbackAvailable:q,isUsingOverage:!1,surpassedThreshold:Number(z)}}}return null}function md9(A,q,K){let{rateLimitType:Y,claimAbbrev:z,windowSeconds:w,thresholds:_}=q,$=A.get(`anthropic-ratelimit-unified-${z}-utilization`),O=A.get(`anthropic-ratelimit-unified-${z}-reset`);if($===null||O===null)return null;let H=Number($),j=Number(O),J=xd9(j,w);if(!_.some((D)=>H>=D.utilization&&J<=D.timePct))return null;return{status:"allowed_warning",resetsAt:j,rateLimitType:Y,utilization:H,unifiedRateLimitFallbackAvailable:K,isUsingOverage:!1}}function gd9(A,q){let K=Bd9(A,q);if(K)return K;for(let Y of Id9){let z=md9(A,Y,q);if(z)return z}return null}function DK4(A){let q=A.get("anthropic-ratelimit-unified-status")||"allowed",K=A.get("anthropic-ratelimit-unified-reset"),Y=K?Number(K):void 0,z=A.get("anthropic-ratelimit-unified-fallback")==="available",w=A.get("anthropic-ratelimit-unified-representative-claim"),_=A.get("anthropic-ratelimit-unified-overage-status"),$=A.get("anthropic-ratelimit-unified-overage-reset"),O=$?Number($):void 0,H=A.get("anthropic-ratelimit-unified-overage-disabled-reason"),j=q==="rejected"&&(_==="allowed"||_==="allowed_warning"),J=q;if(q==="allowed"||q==="allowed_warning"){let M=gd9(A,z);if(M)return M;J="allowed"}return{status:J,resetsAt:Y,unifiedRateLimitFallbackAvailable:z,...w&&{rateLimitType:w},..._&&{overageStatus:_},...O&&{overageResetsAt:O},...H&&{overageDisabledReason:H},isUsingOverage:j}}function XK4(A){let q=A.get("anthropic-ratelimit-unified-overage-disabled-reason")??null;if(T1().cachedExtraUsageDisabledReason!==q)_8((Y)=>({...Y,cachedExtraUsageDisabledReason:q}))}function Jv8(A){let q=A7();if(!XG6(q)){if(TT.status!=="allowed"||TT.resetsAt)jv8({status:"allowed",unifiedRateLimitFallbackAvailable:!1,isUsingOverage:!1});return}let K=wv8(A),Y=DK4(K);if(XK4(K),!QV(TT,Y))jv8(Y)}function x01(A){if(!XG6(A7())||A.status!==429)return;try{let q={...TT};if(A.headers){let K=wv8(A.headers);q=DK4(K),XK4(K)}if(q.status="rejected",!QV(TT,q))jv8(q)}catch(q){$6(q)}}var Id9,bd9,TT,E66;var al=k(()=>{cU6();x1();Xq();B1();bA();rE();rV();zH();_M6();vp6();Q8();Q1();Hv8();Id9=[{rateLimitType:"five_hour",claimAbbrev:"5h",windowSeconds:18000,thresholds:[{utilization:0.9,timePct:0.72}]},{rateLimitType:"seven_day",claimAbbrev:"7d",windowSeconds:604800,thresholds:[{utilization:0.75,timePct:0.6},{utilization:0.5,timePct:0.35},{utilization:0.25,timePct:0.15}]}],bd9={"5h":"five_hour","7d":"seven_day",overage:"overage"};TT={status:"allowed",unifiedRateLimitFallbackAvailable:!1,isUsingOverage:!1},E66=new Set});var ZG6=5242880,_x=3932160,y66=2000,R66=2000,GG6=20971520,PK4=100,WK4=3145728,Mv8=104857600,fG6=20,u01=10,ZK4=100;function kp6(A){if(!A||typeof A!=="object")return null;let q=A,K=5,Y=0;while(q&&Y([^<]+)<\/title>/);if(K&&K[1])return K[1].trim();return""}return A.message}function B01(A){let q=kp6(A);if(q){let{code:Y,isSSLError:z}=q;if(Y==="ETIMEDOUT")return"Request timed out. Check your internet connection and proxy settings";if(z)switch(Y){case"UNABLE_TO_VERIFY_LEAF_SIGNATURE":case"UNABLE_TO_GET_ISSUER_CERT":case"UNABLE_TO_GET_ISSUER_CERT_LOCALLY":return"Unable to connect to API: SSL certificate verification failed. Check your proxy or corporate SSL certificates";case"CERT_HAS_EXPIRED":return"Unable to connect to API: SSL certificate has expired";case"CERT_REVOKED":return"Unable to connect to API: SSL certificate has been revoked";case"DEPTH_ZERO_SELF_SIGNED_CERT":case"SELF_SIGNED_CERT_IN_CHAIN":return"Unable to connect to API: Self-signed certificate detected. Check your proxy or corporate SSL certificates";case"ERR_TLS_CERT_ALTNAME_INVALID":case"HOSTNAME_MISMATCH":return"Unable to connect to API: SSL certificate hostname mismatch";case"CERT_NOT_YET_VALID":return"Unable to connect to API: SSL certificate is not yet valid";default:return`Unable to connect to API: SSL error (${Y})`}}if(A.message==="Connection error."){if(q?.code)return`Unable to connect to API (${q.code})`;return"Unable to connect to API. Check your internet connection"}let K=Qd9(A);return K!==A.message&&K.length>0?K:A.message}async function oE(A,q){await new Promise((K,Y)=>{let z=setTimeout(K,A);if(q){let w=()=>{clearTimeout(z),Y(new Rz)};if(q.aborted){w();return}q.addEventListener("abort",w,{once:!0}),setTimeout(()=>{q?.removeEventListener("abort",w)},A)}})}var Fd9;var DF=k(()=>{rV();Fd9=new Set(["UNABLE_TO_VERIFY_LEAF_SIGNATURE","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","CERT_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CERT_REVOKED","CERT_REJECTED","CERT_UNTRUSTED","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","CERT_CHAIN_TOO_LONG","PATH_LENGTH_EXCEEDED","ERR_TLS_CERT_ALTNAME_INVALID","HOSTNAME_MISMATCH","ERR_TLS_HANDSHAKE_TIMEOUT","ERR_SSL_WRONG_VERSION_NUMBER","ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC"])});function Ud9(A){if(typeof A!=="object"||A===null)return!1;let q=A;if(q.type!=="image")return!1;if(typeof q.source!=="object"||q.source===null)return!1;let K=q.source;return K.type==="base64"&&typeof K.data==="string"}function GK4(A){let q=[],K=0;for(let Y of A){if(typeof Y!=="object"||Y===null)continue;let z=Y;if(z.type!=="user")continue;let w=z.message;if(!w)continue;let _=w.content;if(typeof _==="string"||!Array.isArray(_))continue;for(let $ of _)if(Ud9($)){K++;let O=$.source.data.length;if(O>ZG6)c("tengu_image_api_validation_failed",{base64_size_bytes:O,max_bytes:ZG6}),q.push({index:K,size:O})}}if(q.length>0)throw new TG6(q,ZG6)}var TG6;var m01=k(()=>{B1();p7();TG6=class TG6 extends Error{constructor(A,q){let K,Y=A[0];if(A.length===1&&Y)K=`Image base64 size (${RK(Y.size)}) exceeds API limit (${RK(q)}). Please resize the image before sending.`;else K=`${A.length} images exceed the API limit (${RK(q)}): `+A.map((z)=>`Image ${z.index}: ${RK(z.size)}`).join(", ")+". Please resize these images before sending.";super(K);this.name="ImageSizeError"}}});var NK4={};m1(NK4,{sharp:()=>VK4,getNativeModule:()=>TK4,default:()=>pd9});function TK4(){if(fK4)return g01;fK4=!0;try{g01=(()=>{throw new Error("Cannot require module "+"../../image-processor.node");})()}catch{g01=null}return g01}function VK4(A){let q=null,K=[],Y=0;async function z(){if(!q)q=(async()=>{let $=TK4();if(!$)throw Error("Native image processor module not available");return $.processImage(A)})();return q}function w($){for(let O=Y;O{j.resize($,O,H)}),_},jpeg($){return K.push((O)=>{O.jpeg($?.quality)}),_},png($){return K.push((O)=>{O.png($)}),_},webp($){return K.push((O)=>{O.webp($?.quality)}),_},async toBuffer(){let $=await z();return w($),$.toBuffer()}};return _}var g01=null,fK4=!1,pd9;var Dv8=k(()=>{pd9=VK4});var XF=C((SY_,kK4)=>{/*! Copyright 2013 Lovell Fuller and others. SPDX-License-Identifier: Apache-2.0 */var vK4=(A)=>typeof A<"u"&&A!==null,dd9=(A)=>typeof A==="object",cd9=(A)=>Object.prototype.toString.call(A)==="[object Object]",ld9=(A)=>typeof A==="function",id9=(A)=>typeof A==="boolean",nd9=(A)=>A instanceof Buffer,rd9=(A)=>{if(vK4(A))switch(A.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},od9=(A)=>A instanceof ArrayBuffer,ad9=(A)=>typeof A==="string"&&A.length>0,sd9=(A)=>typeof A==="number"&&!Number.isNaN(A),td9=(A)=>Number.isInteger(A),ed9=(A,q,K)=>A>=q&&A<=K,Ac9=(A,q)=>q.includes(A),qc9=(A,q,K)=>Error(`Expected ${q} for ${A} but received ${K} of type ${typeof K}`),Kc9=(A,q)=>{return q.message=A.message,q};kK4.exports={defined:vK4,object:dd9,plainObject:cd9,fn:ld9,bool:id9,buffer:nd9,typedArray:rd9,arrayBuffer:od9,string:ad9,number:sd9,integer:td9,inRange:ed9,inArray:Ac9,invalidParameterError:qc9,nativeError:Kc9}});var yK4=C((CY_,LK4)=>{var EK4=()=>process.platform==="linux",F01=null,Yc9=()=>{if(!F01)if(EK4()&&process.report){let A=process.report.excludeNetwork;process.report.excludeNetwork=!0,F01=process.report.getReport(),process.report.excludeNetwork=A}else F01={};return F01};LK4.exports={isLinux:EK4,getReport:Yc9}});var SK4=C((hY_,RK4)=>{var VG6=g6("fs"),zc9=(A)=>{let q=VG6.openSync(A,"r"),K=Buffer.alloc(2048),Y=VG6.readSync(q,K,0,2048,0);return VG6.close(q,()=>{}),K.subarray(0,Y)},wc9=(A)=>new Promise((q,K)=>{VG6.open(A,"r",(Y,z)=>{if(Y)K(Y);else{let w=Buffer.alloc(2048);VG6.read(z,w,0,2048,0,(_,$)=>{q(w.subarray(0,$)),VG6.close(z,()=>{})})}})});RK4.exports={LDD_PATH:"/usr/bin/ldd",SELF_PATH:"/proc/self/exe",readFileSync:zc9,readFile:wc9}});var hK4=C((IY_,CK4)=>{var _c9=(A)=>{if(A.length<64)return null;if(A.readUInt32BE(0)!==2135247942)return null;if(A.readUInt8(4)!==2)return null;if(A.readUInt8(5)!==1)return null;let q=A.readUInt32LE(32),K=A.readUInt16LE(54),Y=A.readUInt16LE(56);for(let z=0;z{var bK4=g6("child_process"),{isLinux:NG6,getReport:xK4}=yK4(),{LDD_PATH:Q01,SELF_PATH:uK4,readFile:Xv8,readFileSync:Pv8}=SK4(),{interpreterPath:BK4}=hK4(),PF,WF,ZF,S66="",mK4=()=>{if(!S66)return new Promise((A)=>{bK4.exec("getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",(q,K)=>{S66=q?" ":K,A(S66)})});return S66},gK4=()=>{if(!S66)try{S66=bK4.execSync("getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",{encoding:"utf8"})}catch(A){S66=" "}return S66},sl="glibc",FK4=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,hY6="musl",$c9=(A)=>A.includes("libc.musl-")||A.includes("ld-musl-"),QK4=()=>{let A=xK4();if(A.header&&A.header.glibcVersionRuntime)return sl;if(Array.isArray(A.sharedObjects)){if(A.sharedObjects.some($c9))return hY6}return null},UK4=(A)=>{let[q,K]=A.split(/[\r\n]+/);if(q&&q.includes(sl))return sl;if(K&&K.includes(hY6))return hY6;return null},pK4=(A)=>{if(A){if(A.includes("/ld-musl-"))return hY6;else if(A.includes("/ld-linux-"))return sl}return null},dK4=(A)=>{if(A=A.toString(),A.includes("musl"))return hY6;if(A.includes("GNU C Library"))return sl;return null},Oc9=async()=>{if(WF!==void 0)return WF;WF=null;try{let A=await Xv8(Q01);WF=dK4(A)}catch(A){}return WF},Hc9=()=>{if(WF!==void 0)return WF;WF=null;try{let A=Pv8(Q01);WF=dK4(A)}catch(A){}return WF},jc9=async()=>{if(PF!==void 0)return PF;PF=null;try{let A=await Xv8(uK4),q=BK4(A);PF=pK4(q)}catch(A){}return PF},Jc9=()=>{if(PF!==void 0)return PF;PF=null;try{let A=Pv8(uK4),q=BK4(A);PF=pK4(q)}catch(A){}return PF},cK4=async()=>{let A=null;if(NG6()){if(A=await jc9(),!A){if(A=await Oc9(),!A)A=QK4();if(!A){let q=await mK4();A=UK4(q)}}}return A},lK4=()=>{let A=null;if(NG6()){if(A=Jc9(),!A){if(A=Hc9(),!A)A=QK4();if(!A){let q=gK4();A=UK4(q)}}}return A},Mc9=async()=>NG6()&&await cK4()!==sl,Dc9=()=>NG6()&&lK4()!==sl,Xc9=async()=>{if(ZF!==void 0)return ZF;ZF=null;try{let q=(await Xv8(Q01)).match(FK4);if(q)ZF=q[1]}catch(A){}return ZF},Pc9=()=>{if(ZF!==void 0)return ZF;ZF=null;try{let q=Pv8(Q01).match(FK4);if(q)ZF=q[1]}catch(A){}return ZF},iK4=()=>{let A=xK4();if(A.header&&A.header.glibcVersionRuntime)return A.header.glibcVersionRuntime;return null},IK4=(A)=>A.trim().split(/\s+/)[1],nK4=(A)=>{let[q,K,Y]=A.split(/[\r\n]+/);if(q&&q.includes(sl))return IK4(q);if(K&&Y&&K.includes(hY6))return IK4(Y);return null},Wc9=async()=>{let A=null;if(NG6()){if(A=await Xc9(),!A)A=iK4();if(!A){let q=await mK4();A=nK4(q)}}return A},Zc9=()=>{let A=null;if(NG6()){if(A=Pc9(),!A)A=iK4();if(!A){let q=gK4();A=nK4(q)}}return A};rK4.exports={GLIBC:sl,MUSL:hY6,family:cK4,familySync:lK4,isNonGlibcLinux:Mc9,isNonGlibcLinuxSync:Dc9,version:Wc9,versionSync:Zc9}});var Ep6=C((xY_,oK4)=>{var Gc9=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...A)=>console.error("SEMVER",...A):()=>{};oK4.exports=Gc9});var p01=C((uY_,aK4)=>{var fc9=Number.MAX_SAFE_INTEGER||9007199254740991,Tc9=["major","premajor","minor","preminor","patch","prepatch","prerelease"];aK4.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:fc9,RELEASE_TYPES:Tc9,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Lp6=C((GF,sK4)=>{var{MAX_SAFE_COMPONENT_LENGTH:Wv8,MAX_SAFE_BUILD_LENGTH:Vc9,MAX_LENGTH:Nc9}=p01(),vc9=Ep6();GF=sK4.exports={};var kc9=GF.re=[],Ec9=GF.safeRe=[],l4=GF.src=[],Lc9=GF.safeSrc=[],i4=GF.t={},yc9=0,Zv8="[a-zA-Z0-9-]",Rc9=[["\\s",1],["\\d",Nc9],[Zv8,Vc9]],Sc9=(A)=>{for(let[q,K]of Rc9)A=A.split(`${q}*`).join(`${q}{0,${K}}`).split(`${q}+`).join(`${q}{1,${K}}`);return A},Z5=(A,q,K)=>{let Y=Sc9(q),z=yc9++;vc9(A,z,q),i4[A]=z,l4[z]=q,Lc9[z]=Y,kc9[z]=new RegExp(q,K?"g":void 0),Ec9[z]=new RegExp(Y,K?"g":void 0)};Z5("NUMERICIDENTIFIER","0|[1-9]\\d*");Z5("NUMERICIDENTIFIERLOOSE","\\d+");Z5("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Zv8}*`);Z5("MAINVERSION",`(${l4[i4.NUMERICIDENTIFIER]})\\.(${l4[i4.NUMERICIDENTIFIER]})\\.(${l4[i4.NUMERICIDENTIFIER]})`);Z5("MAINVERSIONLOOSE",`(${l4[i4.NUMERICIDENTIFIERLOOSE]})\\.(${l4[i4.NUMERICIDENTIFIERLOOSE]})\\.(${l4[i4.NUMERICIDENTIFIERLOOSE]})`);Z5("PRERELEASEIDENTIFIER",`(?:${l4[i4.NONNUMERICIDENTIFIER]}|${l4[i4.NUMERICIDENTIFIER]})`);Z5("PRERELEASEIDENTIFIERLOOSE",`(?:${l4[i4.NONNUMERICIDENTIFIER]}|${l4[i4.NUMERICIDENTIFIERLOOSE]})`);Z5("PRERELEASE",`(?:-(${l4[i4.PRERELEASEIDENTIFIER]}(?:\\.${l4[i4.PRERELEASEIDENTIFIER]})*))`);Z5("PRERELEASELOOSE",`(?:-?(${l4[i4.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l4[i4.PRERELEASEIDENTIFIERLOOSE]})*))`);Z5("BUILDIDENTIFIER",`${Zv8}+`);Z5("BUILD",`(?:\\+(${l4[i4.BUILDIDENTIFIER]}(?:\\.${l4[i4.BUILDIDENTIFIER]})*))`);Z5("FULLPLAIN",`v?${l4[i4.MAINVERSION]}${l4[i4.PRERELEASE]}?${l4[i4.BUILD]}?`);Z5("FULL",`^${l4[i4.FULLPLAIN]}$`);Z5("LOOSEPLAIN",`[v=\\s]*${l4[i4.MAINVERSIONLOOSE]}${l4[i4.PRERELEASELOOSE]}?${l4[i4.BUILD]}?`);Z5("LOOSE",`^${l4[i4.LOOSEPLAIN]}$`);Z5("GTLT","((?:<|>)?=?)");Z5("XRANGEIDENTIFIERLOOSE",`${l4[i4.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Z5("XRANGEIDENTIFIER",`${l4[i4.NUMERICIDENTIFIER]}|x|X|\\*`);Z5("XRANGEPLAIN",`[v=\\s]*(${l4[i4.XRANGEIDENTIFIER]})(?:\\.(${l4[i4.XRANGEIDENTIFIER]})(?:\\.(${l4[i4.XRANGEIDENTIFIER]})(?:${l4[i4.PRERELEASE]})?${l4[i4.BUILD]}?)?)?`);Z5("XRANGEPLAINLOOSE",`[v=\\s]*(${l4[i4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l4[i4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l4[i4.XRANGEIDENTIFIERLOOSE]})(?:${l4[i4.PRERELEASELOOSE]})?${l4[i4.BUILD]}?)?)?`);Z5("XRANGE",`^${l4[i4.GTLT]}\\s*${l4[i4.XRANGEPLAIN]}$`);Z5("XRANGELOOSE",`^${l4[i4.GTLT]}\\s*${l4[i4.XRANGEPLAINLOOSE]}$`);Z5("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Wv8}})(?:\\.(\\d{1,${Wv8}}))?(?:\\.(\\d{1,${Wv8}}))?`);Z5("COERCE",`${l4[i4.COERCEPLAIN]}(?:$|[^\\d])`);Z5("COERCEFULL",l4[i4.COERCEPLAIN]+`(?:${l4[i4.PRERELEASE]})?(?:${l4[i4.BUILD]})?(?:$|[^\\d])`);Z5("COERCERTL",l4[i4.COERCE],!0);Z5("COERCERTLFULL",l4[i4.COERCEFULL],!0);Z5("LONETILDE","(?:~>?)");Z5("TILDETRIM",`(\\s*)${l4[i4.LONETILDE]}\\s+`,!0);GF.tildeTrimReplace="$1~";Z5("TILDE",`^${l4[i4.LONETILDE]}${l4[i4.XRANGEPLAIN]}$`);Z5("TILDELOOSE",`^${l4[i4.LONETILDE]}${l4[i4.XRANGEPLAINLOOSE]}$`);Z5("LONECARET","(?:\\^)");Z5("CARETTRIM",`(\\s*)${l4[i4.LONECARET]}\\s+`,!0);GF.caretTrimReplace="$1^";Z5("CARET",`^${l4[i4.LONECARET]}${l4[i4.XRANGEPLAIN]}$`);Z5("CARETLOOSE",`^${l4[i4.LONECARET]}${l4[i4.XRANGEPLAINLOOSE]}$`);Z5("COMPARATORLOOSE",`^${l4[i4.GTLT]}\\s*(${l4[i4.LOOSEPLAIN]})$|^$`);Z5("COMPARATOR",`^${l4[i4.GTLT]}\\s*(${l4[i4.FULLPLAIN]})$|^$`);Z5("COMPARATORTRIM",`(\\s*)${l4[i4.GTLT]}\\s*(${l4[i4.LOOSEPLAIN]}|${l4[i4.XRANGEPLAIN]})`,!0);GF.comparatorTrimReplace="$1$2$3";Z5("HYPHENRANGE",`^\\s*(${l4[i4.XRANGEPLAIN]})\\s+-\\s+(${l4[i4.XRANGEPLAIN]})\\s*$`);Z5("HYPHENRANGELOOSE",`^\\s*(${l4[i4.XRANGEPLAINLOOSE]})\\s+-\\s+(${l4[i4.XRANGEPLAINLOOSE]})\\s*$`);Z5("STAR","(<|>)?=?\\s*\\*");Z5("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Z5("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var d01=C((BY_,tK4)=>{var Cc9=Object.freeze({loose:!0}),hc9=Object.freeze({}),Ic9=(A)=>{if(!A)return hc9;if(typeof A!=="object")return Cc9;return A};tK4.exports=Ic9});var K34=C((mY_,q34)=>{var eK4=/^[0-9]+$/,A34=(A,q)=>{if(typeof A==="number"&&typeof q==="number")return A===q?0:AA34(q,A);q34.exports={compareIdentifiers:A34,rcompareIdentifiers:bc9}});var vG6=C((gY_,z34)=>{var c01=Ep6(),{MAX_LENGTH:Y34,MAX_SAFE_INTEGER:l01}=p01(),{safeRe:i01,t:n01}=Lp6(),xc9=d01(),{compareIdentifiers:Gv8}=K34();class $x{constructor(A,q){if(q=xc9(q),A instanceof $x)if(A.loose===!!q.loose&&A.includePrerelease===!!q.includePrerelease)return A;else A=A.version;else if(typeof A!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof A}".`);if(A.length>Y34)throw TypeError(`version is longer than ${Y34} characters`);c01("SemVer",A,q),this.options=q,this.loose=!!q.loose,this.includePrerelease=!!q.includePrerelease;let K=A.trim().match(q.loose?i01[n01.LOOSE]:i01[n01.FULL]);if(!K)throw TypeError(`Invalid Version: ${A}`);if(this.raw=A,this.major=+K[1],this.minor=+K[2],this.patch=+K[3],this.major>l01||this.major<0)throw TypeError("Invalid major version");if(this.minor>l01||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>l01||this.patch<0)throw TypeError("Invalid patch version");if(!K[4])this.prerelease=[];else this.prerelease=K[4].split(".").map((Y)=>{if(/^[0-9]+$/.test(Y)){let z=+Y;if(z>=0&&zA.major)return 1;if(this.minorA.minor)return 1;if(this.patchA.patch)return 1;return 0}comparePre(A){if(!(A instanceof $x))A=new $x(A,this.options);if(this.prerelease.length&&!A.prerelease.length)return-1;else if(!this.prerelease.length&&A.prerelease.length)return 1;else if(!this.prerelease.length&&!A.prerelease.length)return 0;let q=0;do{let K=this.prerelease[q],Y=A.prerelease[q];if(c01("prerelease compare",q,K,Y),K===void 0&&Y===void 0)return 0;else if(Y===void 0)return 1;else if(K===void 0)return-1;else if(K===Y)continue;else return Gv8(K,Y)}while(++q)}compareBuild(A){if(!(A instanceof $x))A=new $x(A,this.options);let q=0;do{let K=this.build[q],Y=A.build[q];if(c01("build compare",q,K,Y),K===void 0&&Y===void 0)return 0;else if(Y===void 0)return 1;else if(K===void 0)return-1;else if(K===Y)continue;else return Gv8(K,Y)}while(++q)}inc(A,q,K){if(A.startsWith("pre")){if(!q&&K===!1)throw Error("invalid increment argument: identifier is empty");if(q){let Y=`-${q}`.match(this.options.loose?i01[n01.PRERELEASELOOSE]:i01[n01.PRERELEASE]);if(!Y||Y[1]!==q)throw Error(`invalid identifier: ${q}`)}}switch(A){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",q,K);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",q,K);break;case"prepatch":this.prerelease.length=0,this.inc("patch",q,K),this.inc("pre",q,K);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",q,K);this.inc("pre",q,K);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{let Y=Number(K)?1:0;if(this.prerelease.length===0)this.prerelease=[Y];else{let z=this.prerelease.length;while(--z>=0)if(typeof this.prerelease[z]==="number")this.prerelease[z]++,z=-2;if(z===-1){if(q===this.prerelease.join(".")&&K===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(Y)}}if(q){let z=[q,Y];if(K===!1)z=[q];if(Gv8(this.prerelease[0],q)===0){if(isNaN(this.prerelease[1]))this.prerelease=z}else this.prerelease=z}break}default:throw Error(`invalid increment argument: ${A}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}z34.exports=$x});var $34=C((FY_,_34)=>{var w34=vG6(),uc9=(A,q,K=!1)=>{if(A instanceof w34)return A;try{return new w34(A,q)}catch(Y){if(!K)return null;throw Y}};_34.exports=uc9});var H34=C((QY_,O34)=>{var Bc9=vG6(),mc9=$34(),{safeRe:r01,t:o01}=Lp6(),gc9=(A,q)=>{if(A instanceof Bc9)return A;if(typeof A==="number")A=String(A);if(typeof A!=="string")return null;q=q||{};let K=null;if(!q.rtl)K=A.match(q.includePrerelease?r01[o01.COERCEFULL]:r01[o01.COERCE]);else{let O=q.includePrerelease?r01[o01.COERCERTLFULL]:r01[o01.COERCERTL],H;while((H=O.exec(A))&&(!K||K.index+K[0].length!==A.length)){if(!K||H.index+H[0].length!==K.index+K[0].length)K=H;O.lastIndex=H.index+H[1].length+H[2].length}O.lastIndex=-1}if(K===null)return null;let Y=K[2],z=K[3]||"0",w=K[4]||"0",_=q.includePrerelease&&K[5]?`-${K[5]}`:"",$=q.includePrerelease&&K[6]?`+${K[6]}`:"";return mc9(`${Y}.${z}.${w}${_}${$}`,q)};O34.exports=gc9});var IY6=C((UY_,J34)=>{var j34=vG6(),Fc9=(A,q,K)=>new j34(A,K).compare(new j34(q,K));J34.exports=Fc9});var fv8=C((pY_,M34)=>{var Qc9=IY6(),Uc9=(A,q,K)=>Qc9(A,q,K)>=0;M34.exports=Uc9});var P34=C((dY_,X34)=>{class D34{constructor(){this.max=1000,this.map=new Map}get(A){let q=this.map.get(A);if(q===void 0)return;else return this.map.delete(A),this.map.set(A,q),q}delete(A){return this.map.delete(A)}set(A,q){if(!this.delete(A)&&q!==void 0){if(this.map.size>=this.max){let Y=this.map.keys().next().value;this.delete(Y)}this.map.set(A,q)}return this}}X34.exports=D34});var Z34=C((cY_,W34)=>{var pc9=IY6(),dc9=(A,q,K)=>pc9(A,q,K)===0;W34.exports=dc9});var f34=C((lY_,G34)=>{var cc9=IY6(),lc9=(A,q,K)=>cc9(A,q,K)!==0;G34.exports=lc9});var V34=C((iY_,T34)=>{var ic9=IY6(),nc9=(A,q,K)=>ic9(A,q,K)>0;T34.exports=nc9});var v34=C((nY_,N34)=>{var rc9=IY6(),oc9=(A,q,K)=>rc9(A,q,K)<0;N34.exports=oc9});var E34=C((rY_,k34)=>{var ac9=IY6(),sc9=(A,q,K)=>ac9(A,q,K)<=0;k34.exports=sc9});var y34=C((oY_,L34)=>{var tc9=Z34(),ec9=f34(),Al9=V34(),ql9=fv8(),Kl9=v34(),Yl9=E34(),zl9=(A,q,K,Y)=>{switch(q){case"===":if(typeof A==="object")A=A.version;if(typeof K==="object")K=K.version;return A===K;case"!==":if(typeof A==="object")A=A.version;if(typeof K==="object")K=K.version;return A!==K;case"":case"=":case"==":return tc9(A,K,Y);case"!=":return ec9(A,K,Y);case">":return Al9(A,K,Y);case">=":return ql9(A,K,Y);case"<":return Kl9(A,K,Y);case"<=":return Yl9(A,K,Y);default:throw TypeError(`Invalid operator: ${q}`)}};L34.exports=zl9});var x34=C((aY_,b34)=>{var yp6=Symbol("SemVer ANY");class a01{static get ANY(){return yp6}constructor(A,q){if(q=R34(q),A instanceof a01)if(A.loose===!!q.loose)return A;else A=A.value;if(A=A.trim().split(/\s+/).join(" "),Vv8("comparator",A,q),this.options=q,this.loose=!!q.loose,this.parse(A),this.semver===yp6)this.value="";else this.value=this.operator+this.semver.version;Vv8("comp",this)}parse(A){let q=this.options.loose?S34[C34.COMPARATORLOOSE]:S34[C34.COMPARATOR],K=A.match(q);if(!K)throw TypeError(`Invalid comparator: ${A}`);if(this.operator=K[1]!==void 0?K[1]:"",this.operator==="=")this.operator="";if(!K[2])this.semver=yp6;else this.semver=new h34(K[2],this.options.loose)}toString(){return this.value}test(A){if(Vv8("Comparator.test",A,this.options.loose),this.semver===yp6||A===yp6)return!0;if(typeof A==="string")try{A=new h34(A,this.options)}catch(q){return!1}return Tv8(A,this.operator,this.semver,this.options)}intersects(A,q){if(!(A instanceof a01))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new I34(A.value,q).test(this.value)}else if(A.operator===""){if(A.value==="")return!0;return new I34(this.value,q).test(A.semver)}if(q=R34(q),q.includePrerelease&&(this.value==="<0.0.0-0"||A.value==="<0.0.0-0"))return!1;if(!q.includePrerelease&&(this.value.startsWith("<0.0.0")||A.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&A.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&A.operator.startsWith("<"))return!0;if(this.semver.version===A.semver.version&&this.operator.includes("=")&&A.operator.includes("="))return!0;if(Tv8(this.semver,"<",A.semver,q)&&this.operator.startsWith(">")&&A.operator.startsWith("<"))return!0;if(Tv8(this.semver,">",A.semver,q)&&this.operator.startsWith("<")&&A.operator.startsWith(">"))return!0;return!1}}b34.exports=a01;var R34=d01(),{safeRe:S34,t:C34}=Lp6(),Tv8=y34(),Vv8=Ep6(),h34=vG6(),I34=Nv8()});var Nv8=C((sY_,g34)=>{var wl9=/\s+/g;class Rp6{constructor(A,q){if(q=$l9(q),A instanceof Rp6)if(A.loose===!!q.loose&&A.includePrerelease===!!q.includePrerelease)return A;else return new Rp6(A.raw,q);if(A instanceof vv8)return this.raw=A.value,this.set=[[A]],this.formatted=void 0,this;if(this.options=q,this.loose=!!q.loose,this.includePrerelease=!!q.includePrerelease,this.raw=A.trim().replace(wl9," "),this.set=this.raw.split("||").map((K)=>this.parseRange(K.trim())).filter((K)=>K.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let K=this.set[0];if(this.set=this.set.filter((Y)=>!B34(Y[0])),this.set.length===0)this.set=[K];else if(this.set.length>1){for(let Y of this.set)if(Y.length===1&&Xl9(Y[0])){this.set=[Y];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let A=0;A0)this.formatted+="||";let q=this.set[A];for(let K=0;K0)this.formatted+=" ";this.formatted+=q[K].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(A){let K=((this.options.includePrerelease&&Ml9)|(this.options.loose&&Dl9))+":"+A,Y=u34.get(K);if(Y)return Y;let z=this.options.loose,w=z?VT[MG.HYPHENRANGELOOSE]:VT[MG.HYPHENRANGE];A=A.replace(w,kl9(this.options.includePrerelease)),HO("hyphen replace",A),A=A.replace(VT[MG.COMPARATORTRIM],Hl9),HO("comparator trim",A),A=A.replace(VT[MG.TILDETRIM],jl9),HO("tilde trim",A),A=A.replace(VT[MG.CARETTRIM],Jl9),HO("caret trim",A);let _=A.split(" ").map((j)=>Pl9(j,this.options)).join(" ").split(/\s+/).map((j)=>vl9(j,this.options));if(z)_=_.filter((j)=>{return HO("loose invalid filter",j,this.options),!!j.match(VT[MG.COMPARATORLOOSE])});HO("range list",_);let $=new Map,O=_.map((j)=>new vv8(j,this.options));for(let j of O){if(B34(j))return[j];$.set(j.value,j)}if($.size>1&&$.has(""))$.delete("");let H=[...$.values()];return u34.set(K,H),H}intersects(A,q){if(!(A instanceof Rp6))throw TypeError("a Range is required");return this.set.some((K)=>{return m34(K,q)&&A.set.some((Y)=>{return m34(Y,q)&&K.every((z)=>{return Y.every((w)=>{return z.intersects(w,q)})})})})}test(A){if(!A)return!1;if(typeof A==="string")try{A=new Ol9(A,this.options)}catch(q){return!1}for(let q=0;qA.value==="<0.0.0-0",Xl9=(A)=>A.value==="",m34=(A,q)=>{let K=!0,Y=A.slice(),z=Y.pop();while(K&&Y.length)K=Y.every((w)=>{return z.intersects(w,q)}),z=Y.pop();return K},Pl9=(A,q)=>{return A=A.replace(VT[MG.BUILD],""),HO("comp",A,q),A=Gl9(A,q),HO("caret",A),A=Wl9(A,q),HO("tildes",A),A=Tl9(A,q),HO("xrange",A),A=Nl9(A,q),HO("stars",A),A},NT=(A)=>!A||A.toLowerCase()==="x"||A==="*",Wl9=(A,q)=>{return A.trim().split(/\s+/).map((K)=>Zl9(K,q)).join(" ")},Zl9=(A,q)=>{let K=q.loose?VT[MG.TILDELOOSE]:VT[MG.TILDE];return A.replace(K,(Y,z,w,_,$)=>{HO("tilde",A,Y,z,w,_,$);let O;if(NT(z))O="";else if(NT(w))O=`>=${z}.0.0 <${+z+1}.0.0-0`;else if(NT(_))O=`>=${z}.${w}.0 <${z}.${+w+1}.0-0`;else if($)HO("replaceTilde pr",$),O=`>=${z}.${w}.${_}-${$} <${z}.${+w+1}.0-0`;else O=`>=${z}.${w}.${_} <${z}.${+w+1}.0-0`;return HO("tilde return",O),O})},Gl9=(A,q)=>{return A.trim().split(/\s+/).map((K)=>fl9(K,q)).join(" ")},fl9=(A,q)=>{HO("caret",A,q);let K=q.loose?VT[MG.CARETLOOSE]:VT[MG.CARET],Y=q.includePrerelease?"-0":"";return A.replace(K,(z,w,_,$,O)=>{HO("caret",A,z,w,_,$,O);let H;if(NT(w))H="";else if(NT(_))H=`>=${w}.0.0${Y} <${+w+1}.0.0-0`;else if(NT($))if(w==="0")H=`>=${w}.${_}.0${Y} <${w}.${+_+1}.0-0`;else H=`>=${w}.${_}.0${Y} <${+w+1}.0.0-0`;else if(O)if(HO("replaceCaret pr",O),w==="0")if(_==="0")H=`>=${w}.${_}.${$}-${O} <${w}.${_}.${+$+1}-0`;else H=`>=${w}.${_}.${$}-${O} <${w}.${+_+1}.0-0`;else H=`>=${w}.${_}.${$}-${O} <${+w+1}.0.0-0`;else if(HO("no pr"),w==="0")if(_==="0")H=`>=${w}.${_}.${$}${Y} <${w}.${_}.${+$+1}-0`;else H=`>=${w}.${_}.${$}${Y} <${w}.${+_+1}.0-0`;else H=`>=${w}.${_}.${$} <${+w+1}.0.0-0`;return HO("caret return",H),H})},Tl9=(A,q)=>{return HO("replaceXRanges",A,q),A.split(/\s+/).map((K)=>Vl9(K,q)).join(" ")},Vl9=(A,q)=>{A=A.trim();let K=q.loose?VT[MG.XRANGELOOSE]:VT[MG.XRANGE];return A.replace(K,(Y,z,w,_,$,O)=>{HO("xRange",A,Y,z,w,_,$,O);let H=NT(w),j=H||NT(_),J=j||NT($),M=J;if(z==="="&&M)z="";if(O=q.includePrerelease?"-0":"",H)if(z===">"||z==="<")Y="<0.0.0-0";else Y="*";else if(z&&M){if(j)_=0;if($=0,z===">")if(z=">=",j)w=+w+1,_=0,$=0;else _=+_+1,$=0;else if(z==="<=")if(z="<",j)w=+w+1;else _=+_+1;if(z==="<")O="-0";Y=`${z+w}.${_}.${$}${O}`}else if(j)Y=`>=${w}.0.0${O} <${+w+1}.0.0-0`;else if(J)Y=`>=${w}.${_}.0${O} <${w}.${+_+1}.0-0`;return HO("xRange return",Y),Y})},Nl9=(A,q)=>{return HO("replaceStars",A,q),A.trim().replace(VT[MG.STAR],"")},vl9=(A,q)=>{return HO("replaceGTE0",A,q),A.trim().replace(VT[q.includePrerelease?MG.GTE0PRE:MG.GTE0],"")},kl9=(A)=>(q,K,Y,z,w,_,$,O,H,j,J,M)=>{if(NT(Y))K="";else if(NT(z))K=`>=${Y}.0.0${A?"-0":""}`;else if(NT(w))K=`>=${Y}.${z}.0${A?"-0":""}`;else if(_)K=`>=${K}`;else K=`>=${K}${A?"-0":""}`;if(NT(H))O="";else if(NT(j))O=`<${+H+1}.0.0-0`;else if(NT(J))O=`<${H}.${+j+1}.0-0`;else if(M)O=`<=${H}.${j}.${J}-${M}`;else if(A)O=`<${H}.${j}.${+J+1}-0`;else O=`<=${O}`;return`${K} ${O}`.trim()},El9=(A,q,K)=>{for(let Y=0;Y0){let z=A[Y].semver;if(z.major===q.major&&z.minor===q.minor&&z.patch===q.patch)return!0}}return!1}return!0}});var Q34=C((tY_,F34)=>{var Ll9=Nv8(),yl9=(A,q,K)=>{try{q=new Ll9(q,K)}catch(Y){return!1}return q.test(A)};F34.exports=yl9});var kv8=C((eY_,Rl9)=>{Rl9.exports={name:"sharp",description:"High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",version:"0.34.5",author:"Lovell Fuller ",homepage:"https://sharp.pixelplumbing.com",contributors:["Pierre Inglebert ","Jonathan Ong ","Chanon Sajjamanochai ","Juliano Julio ","Daniel Gasienica ","Julian Walker ","Amit Pitaru ","Brandon Aaron ","Andreas Lind ","Maurus Cuelenaere ","Linus Unnebäck ","Victor Mateevitsi ","Alaric Holloway ","Bernhard K. Weisshuhn ","Chris Riley ","David Carley ","John Tobin ","Kenton Gray ","Felix Bünemann ","Samy Al Zahrani ","Chintan Thakkar ","F. Orlando Galashan ","Kleis Auke Wolthuizen ","Matt Hirsch ","Matthias Thoemmes ","Patrick Paskaris ","Jérémy Lal ","Rahul Nanwani ","Alice Monday ","Kristo Jorgenson ","YvesBos ","Guy Maliar ","Nicolas Coden ","Matt Parrish ","Marcel Bretschneider ","Matthew McEachen ","Jarda Kotěšovec ","Kenric D'Souza ","Oleh Aleinyk ","Marcel Bretschneider ","Andrea Bianco ","Rik Heywood ","Thomas Parisot ","Nathan Graves ","Tom Lokhorst ","Espen Hovlandsdal ","Sylvain Dumont ","Alun Davies ","Aidan Hoolachan ","Axel Eirola ","Freezy ","Daiz ","Julian Aubourg ","Keith Belovay ","Michael B. Klein ","Jordan Prudhomme ","Ilya Ovdin ","Andargor ","Paul Neave ","Brendan Kennedy ","Brychan Bennett-Odlum ","Edward Silverton ","Roman Malieiev ","Tomas Szabo ","Robert O'Rourke ","Guillermo Alfonso Varela Chouciño ","Christian Flintrup ","Manan Jadhav ","Leon Radley ","alza54 ","Jacob Smith ","Michael Nutt ","Brad Parham ","Taneli Vatanen ","Joris Dugué ","Chris Banks ","Ompal Singh ","Brodan ","Ankur Parihar ","Brahim Ait elhaj ","Mart Jansink ","Lachlan Newman ","Dennis Beatty ","Ingvar Stepanyan ","Don Denton "],scripts:{build:"node install/build.js",install:"node install/check.js || npm run build",clean:"rm -rf src/build/ .nyc_output/ coverage/ test/fixtures/output.*",test:"npm run lint && npm run test-unit",lint:"npm run lint-cpp && npm run lint-js && npm run lint-types","lint-cpp":"cpplint --quiet src/*.h src/*.cc","lint-js":"biome lint","lint-types":"tsd --files ./test/types/sharp.test-d.ts","test-leak":"./test/leak/leak.sh","test-unit":"node --experimental-test-coverage test/unit.mjs","package-from-local-build":"node npm/from-local-build.js","package-release-notes":"node npm/release-notes.js","docs-build":"node docs/build.mjs","docs-serve":"cd docs && npm start","docs-publish":"cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"},type:"commonjs",main:"lib/index.js",types:"lib/index.d.ts",files:["install","lib","src/*.{cc,h,gyp}"],repository:{type:"git",url:"git://github.com/lovell/sharp.git"},keywords:["jpeg","png","webp","avif","tiff","gif","svg","jp2","dzi","image","resize","thumbnail","crop","embed","libvips","vips"],dependencies:{"@img/colour":"^1.0.0","detect-libc":"^2.1.2",semver:"^7.7.3"},optionalDependencies:{"@img/sharp-darwin-arm64":"0.34.5","@img/sharp-darwin-x64":"0.34.5","@img/sharp-libvips-darwin-arm64":"1.2.4","@img/sharp-libvips-darwin-x64":"1.2.4","@img/sharp-libvips-linux-arm":"1.2.4","@img/sharp-libvips-linux-arm64":"1.2.4","@img/sharp-libvips-linux-ppc64":"1.2.4","@img/sharp-libvips-linux-riscv64":"1.2.4","@img/sharp-libvips-linux-s390x":"1.2.4","@img/sharp-libvips-linux-x64":"1.2.4","@img/sharp-libvips-linuxmusl-arm64":"1.2.4","@img/sharp-libvips-linuxmusl-x64":"1.2.4","@img/sharp-linux-arm":"0.34.5","@img/sharp-linux-arm64":"0.34.5","@img/sharp-linux-ppc64":"0.34.5","@img/sharp-linux-riscv64":"0.34.5","@img/sharp-linux-s390x":"0.34.5","@img/sharp-linux-x64":"0.34.5","@img/sharp-linuxmusl-arm64":"0.34.5","@img/sharp-linuxmusl-x64":"0.34.5","@img/sharp-wasm32":"0.34.5","@img/sharp-win32-arm64":"0.34.5","@img/sharp-win32-ia32":"0.34.5","@img/sharp-win32-x64":"0.34.5"},devDependencies:{"@biomejs/biome":"^2.3.4","@cpplint/cli":"^0.1.0","@emnapi/runtime":"^1.7.0","@img/sharp-libvips-dev":"1.2.4","@img/sharp-libvips-dev-wasm32":"1.2.4","@img/sharp-libvips-win32-arm64":"1.2.4","@img/sharp-libvips-win32-ia32":"1.2.4","@img/sharp-libvips-win32-x64":"1.2.4","@types/node":"*",emnapi:"^1.7.0","exif-reader":"^2.0.2","extract-zip":"^2.0.1",icc:"^3.0.0","jsdoc-to-markdown":"^9.1.3","node-addon-api":"^8.5.0","node-gyp":"^11.5.0","tar-fs":"^3.1.1",tsd:"^0.33.0"},license:"Apache-2.0",engines:{node:"^18.17.0 || ^20.3.0 || >=21.0.0"},config:{libvips:">=8.17.3"},funding:{url:"https://opencollective.com/libvips"}}});var Lv8=C((Az_,a34)=>{/*! Copyright 2013 Lovell Fuller and others. SPDX-License-Identifier: Apache-2.0 */var{spawnSync:s01}=g6("node:child_process"),{createHash:Sl9}=g6("node:crypto"),c34=H34(),Cl9=fv8(),hl9=Q34(),U34=U01(),{config:Il9,engines:p34,optionalDependencies:bl9}=kv8(),xl9=process.env.npm_package_config_libvips||Il9.libvips,l34=c34(xl9).version,ul9=["darwin-arm64","darwin-x64","linux-arm","linux-arm64","linux-ppc64","linux-riscv64","linux-s390x","linux-x64","linuxmusl-arm64","linuxmusl-x64","win32-arm64","win32-ia32","win32-x64"],t01={encoding:"utf8",shell:!0},Bl9=(A)=>{if(A instanceof Error)console.error(`sharp: Installation error: ${A.message}`);else console.log(`sharp: ${A}`)},i34=()=>U34.isNonGlibcLinuxSync()?U34.familySync():"",ml9=()=>`${process.platform}${i34()}-${process.arch}`,kG6=()=>{if(n34())return"wasm32";let{npm_config_arch:A,npm_config_platform:q,npm_config_libc:K}=process.env,Y=typeof K==="string"?K:i34();return`${q||process.platform}${Y}-${A||process.arch}`},gl9=()=>{try{return g6(`@img/sharp-libvips-dev-${kG6()}/include`)}catch{try{return (()=>{throw new Error("Cannot require module "+"@img/sharp-libvips-dev/include");})()}catch{}}return""},Fl9=()=>{try{return (()=>{throw new Error("Cannot require module "+"@img/sharp-libvips-dev/cplusplus");})()}catch{}return""},Ql9=()=>{try{return g6(`@img/sharp-libvips-dev-${kG6()}/lib`)}catch{try{return g6(`@img/sharp-libvips-${kG6()}/lib`)}catch{}}return""},Ul9=()=>{if(process.release?.name==="node"&&process.versions){if(!hl9(process.versions.node,p34.node))return{found:process.versions.node,expected:p34.node}}},n34=()=>{let{CC:A}=process.env;return Boolean(A?.endsWith("/emcc"))},pl9=()=>{if(process.platform==="darwin"&&process.arch==="x64")return(s01("sysctl sysctl.proc_translated",t01).stdout||"").trim()==="sysctl.proc_translated: 1";return!1},d34=(A)=>Sl9("sha512").update(A).digest("hex"),dl9=()=>{try{let A=d34(`imgsharp-libvips-${kG6()}`),q=c34(bl9[`@img/sharp-libvips-${kG6()}`],{includePrerelease:!0}).version;return d34(`${A}npm:${q}`).slice(0,10)}catch{}return""},cl9=()=>s01(`node-gyp rebuild --directory=src ${n34()?"--nodedir=emscripten":""}`,{...t01,stdio:"inherit"}).status,r34=()=>{if(process.platform!=="win32")return(s01("pkg-config --modversion vips-cpp",{...t01,env:{...process.env,PKG_CONFIG_PATH:o34()}}).stdout||"").trim();else return""},o34=()=>{if(process.platform!=="win32")return[(s01('which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2',t01).stdout||"").trim(),process.env.PKG_CONFIG_PATH,"/usr/local/lib/pkgconfig","/usr/lib/pkgconfig","/usr/local/libdata/pkgconfig","/usr/libdata/pkgconfig"].filter(Boolean).join(":");else return""},Ev8=(A,q,K)=>{if(K)K(`Detected ${q}, skipping search for globally-installed libvips`);return A},ll9=(A)=>{if(Boolean(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS)===!0)return Ev8(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",A);if(Boolean(process.env.SHARP_FORCE_GLOBAL_LIBVIPS)===!0)return Ev8(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",A);if(pl9())return Ev8(!1,"Rosetta",A);let q=r34();return!!q&&Cl9(q,l34)};a34.exports={minimumLibvipsVersion:l34,prebuiltPlatforms:ul9,buildPlatformArch:kG6,buildSharpLibvipsIncludeDir:gl9,buildSharpLibvipsCPlusPlusDir:Fl9,buildSharpLibvipsLibDir:Ql9,isUnsupportedNodeRuntime:Ul9,runtimePlatformArch:ml9,log:Bl9,yarnLocator:dl9,spawnRebuild:cl9,globalLibvipsVersion:r34,pkgConfigPath:o34,useGlobalLibvips:ll9}});var Cp6=C((Kz_,t34)=>{/*! Copyright 2013 Lovell Fuller and others. SPDX-License-Identifier: Apache-2.0 */var{familySync:il9,versionSync:nl9}=U01(),{runtimePlatformArch:rl9,isUnsupportedNodeRuntime:s34,prebuiltPlatforms:ol9,minimumLibvipsVersion:al9}=Lv8(),bY6=rl9(),sl9=[`../src/build/Release/sharp-${bY6}.node`,"../src/build/Release/sharp-wasm32.node",`@img/sharp-${bY6}/sharp.node`,"@img/sharp-wasm32/sharp.node"],yv8,EG6,Sp6=[];for(yv8 of sl9)try{EG6=g6(yv8);break}catch(A){Sp6.push(A)}if(EG6&&yv8.startsWith("@img/sharp-linux-x64")&&!EG6._isUsingX64V2()){let A=Error("Prebuilt binaries for linux-x64 require v2 microarchitecture");A.code="Unsupported CPU",Sp6.push(A),EG6=null}if(EG6)t34.exports=EG6;else{let[A,q,K]=["linux","darwin","win32"].map((w)=>bY6.startsWith(w)),Y=[`Could not load the "sharp" module using the ${bY6} runtime`];Sp6.forEach((w)=>{if(w.code!=="MODULE_NOT_FOUND")Y.push(`${w.code}: ${w.message}`)});let z=Sp6.map((w)=>w.message).join(" ");if(Y.push("Possible solutions:"),s34()){let{found:w,expected:_}=s34();Y.push("- Please upgrade Node.js:",` Found ${w}`,` Requires ${_}`)}else if(ol9.includes(bY6)){let[w,_]=bY6.split("-"),$=w.endsWith("musl")?" --libc=musl":"";Y.push("- Ensure optional dependencies can be installed:"," npm install --include=optional sharp","- Ensure your package manager supports multi-platform installation:"," See https://sharp.pixelplumbing.com/install#cross-platform","- Add platform-specific dependencies:",` npm install --os=${w.replace("musl","")}${$} --cpu=${_} sharp`)}else Y.push(`- Manually install libvips >= ${al9}`,"- Add experimental WebAssembly-based dependencies:"," npm install --cpu=wasm32 sharp"," npm install @img/sharp-wasm32");if(A&&/(symbol not found|CXXABI_)/i.test(z))try{let{config:w}=g6(`@img/sharp-libvips-${bY6}/package`),_=`${il9()} ${nl9()}`,$=`${w.musl?"musl":"glibc"} ${w.musl||w.glibc}`;Y.push("- Update your OS:",` Found ${_}`,` Requires ${$}`)}catch(w){}if(A&&/\/snap\/core[0-9]{2}/.test(z))Y.push("- Remove the Node.js Snap, which does not support native modules"," snap remove node");if(q&&/Incompatible library version/.test(z))Y.push("- Update Homebrew:"," brew update && brew upgrade vips");if(Sp6.some((w)=>w.code==="ERR_DLOPEN_DISABLED"))Y.push("- Run Node.js without using the --no-addons flag");if(K&&/The specified procedure could not be found/.test(z))Y.push("- Using the canvas package on Windows?"," See https://sharp.pixelplumbing.com/install#canvas-and-windows","- Check for outdated versions of sharp in the dependency tree:"," npm ls sharp");throw Y.push("- Consult the installation documentation:"," See https://sharp.pixelplumbing.com/install"),Error(Y.join(` `))}});var A54=C((zz_,e34)=>{/*! Copyright 2013 Lovell Fuller and others. SPDX-License-Identifier: Apache-2.0 */var tl9=g6("node:util"),Rv8=g6("node:stream"),el9=XF();Cp6();var Ai9=tl9.debuglog("sharp"),qi9=(A)=>{xY6.queue.emit("change",A)},xY6=function(A,q){if(arguments.length===1&&!el9.defined(A))throw Error("Invalid input");if(!(this instanceof xY6))return new xY6(A,q);return Rv8.Duplex.call(this),this.options={topOffsetPre:-1,leftOffsetPre:-1,widthPre:-1,heightPre:-1,topOffsetPost:-1,leftOffsetPost:-1,widthPost:-1,heightPost:-1,width:-1,height:-1,canvas:"crop",position:0,resizeBackground:[0,0,0,255],angle:0,rotationAngle:0,rotationBackground:[0,0,0,255],rotateBefore:!1,orientBefore:!1,flip:!1,flop:!1,extendTop:0,extendBottom:0,extendLeft:0,extendRight:0,extendBackground:[0,0,0,255],extendWith:"background",withoutEnlargement:!1,withoutReduction:!1,affineMatrix:[],affineBackground:[0,0,0,255],affineIdx:0,affineIdy:0,affineOdx:0,affineOdy:0,affineInterpolator:this.constructor.interpolators.bilinear,kernel:"lanczos3",fastShrinkOnLoad:!0,tint:[-1,0,0,0],flatten:!1,flattenBackground:[0,0,0],unflatten:!1,negate:!1,negateAlpha:!0,medianSize:0,blurSigma:0,precision:"integer",minAmpl:0.2,sharpenSigma:0,sharpenM1:1,sharpenM2:2,sharpenX1:2,sharpenY2:10,sharpenY3:20,threshold:0,thresholdGrayscale:!0,trimBackground:[],trimThreshold:-1,trimLineArt:!1,dilateWidth:0,erodeWidth:0,gamma:0,gammaOut:0,greyscale:!1,normalise:!1,normaliseLower:1,normaliseUpper:99,claheWidth:0,claheHeight:0,claheMaxSlope:3,brightness:1,saturation:1,hue:0,lightness:0,booleanBufferIn:null,booleanFileIn:"",joinChannelIn:[],extractChannel:-1,removeAlpha:!1,ensureAlpha:-1,colourspace:"srgb",colourspacePipeline:"last",composite:[],fileOut:"",formatOut:"input",streamOut:!1,keepMetadata:0,withMetadataOrientation:-1,withMetadataDensity:0,withIccProfile:"",withExif:{},withExifMerge:!0,withXmp:"",resolveWithObject:!1,loop:-1,delay:[],jpegQuality:80,jpegProgressive:!1,jpegChromaSubsampling:"4:2:0",jpegTrellisQuantisation:!1,jpegOvershootDeringing:!1,jpegOptimiseScans:!1,jpegOptimiseCoding:!0,jpegQuantisationTable:0,pngProgressive:!1,pngCompressionLevel:6,pngAdaptiveFiltering:!1,pngPalette:!1,pngQuality:100,pngEffort:7,pngBitdepth:8,pngDither:1,jp2Quality:80,jp2TileHeight:512,jp2TileWidth:512,jp2Lossless:!1,jp2ChromaSubsampling:"4:4:4",webpQuality:80,webpAlphaQuality:100,webpLossless:!1,webpNearLossless:!1,webpSmartSubsample:!1,webpSmartDeblock:!1,webpPreset:"default",webpEffort:4,webpMinSize:!1,webpMixed:!1,gifBitdepth:8,gifEffort:7,gifDither:1,gifInterFrameMaxError:0,gifInterPaletteMaxError:3,gifKeepDuplicateFrames:!1,gifReuse:!0,gifProgressive:!1,tiffQuality:80,tiffCompression:"jpeg",tiffBigtiff:!1,tiffPredictor:"horizontal",tiffPyramid:!1,tiffMiniswhite:!1,tiffBitdepth:8,tiffTile:!1,tiffTileHeight:256,tiffTileWidth:256,tiffXres:1,tiffYres:1,tiffResolutionUnit:"inch",heifQuality:50,heifLossless:!1,heifCompression:"av1",heifEffort:4,heifChromaSubsampling:"4:4:4",heifBitdepth:8,jxlDistance:1,jxlDecodingTier:0,jxlEffort:7,jxlLossless:!1,rawDepth:"uchar",tileSize:256,tileOverlap:0,tileContainer:"fs",tileLayout:"dz",tileFormat:"last",tileDepth:"last",tileAngle:0,tileSkipBlanks:-1,tileBackground:[255,255,255,255],tileCentre:!1,tileId:"https://example.com/iiif",tileBasename:"",timeoutSeconds:0,linearA:[],linearB:[],pdfBackground:[255,255,255,255],debuglog:(K)=>{this.emit("warning",K),Ai9(K)},queueListener:qi9},this.options.input=this._createInputDescriptor(A,q,{allowStream:!0}),this};Object.setPrototypeOf(xY6.prototype,Rv8.Duplex.prototype);Object.setPrototypeOf(xY6,Rv8.Duplex);function Ki9(){let A=this.constructor.call(),{debuglog:q,queueListener:K,...Y}=this.options;if(A.options=structuredClone(Y),A.options.debuglog=q,A.options.queueListener=K,this._isStreamInput())this.on("finish",()=>{this._flattenBufferIn(),A.options.input.buffer=this.options.input.buffer,A.emit("finish")});return A}Object.assign(xY6.prototype,{clone:Ki9});e34.exports=xY6});var Y54=C((wz_,K54)=>{/*! Copyright 2013 Lovell Fuller and others. SPDX-License-Identifier: Apache-2.0 */var H8=XF(),C66=Cp6(),Yi9={left:"low",top:"low",low:"low",center:"centre",centre:"centre",right:"high",bottom:"high",high:"high"},zi9=["failOn","limitInputPixels","unlimited","animated","autoOrient","density","ignoreIcc","page","pages","sequentialRead","jp2","openSlide","pdf","raw","svg","tiff","failOnError","openSlideLevel","pdfBackground","tiffSubifd"];function q54(A){let q=zi9.filter((K)=>H8.defined(A[K])).map((K)=>[K,A[K]]);return q.length?Object.fromEntries(q):void 0}function wi9(A,q,K){let Y={autoOrient:!1,failOn:"warning",limitInputPixels:268402689,ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(H8.string(A))Y.file=A;else if(H8.buffer(A)){if(A.length===0)throw Error("Input Buffer is empty");Y.buffer=A}else if(H8.arrayBuffer(A)){if(A.byteLength===0)throw Error("Input bit Array is empty");Y.buffer=Buffer.from(A,0,A.byteLength)}else if(H8.typedArray(A)){if(A.length===0)throw Error("Input Bit Array is empty");Y.buffer=Buffer.from(A.buffer,A.byteOffset,A.byteLength)}else if(H8.plainObject(A)&&!H8.defined(q)){if(q=A,q54(q))Y.buffer=[]}else if(!H8.defined(A)&&!H8.defined(q)&&H8.object(K)&&K.allowStream)Y.buffer=[];else if(Array.isArray(A))if(A.length>1)if(!this.options.joining)this.options.joining=!0,this.options.join=A.map((z)=>this._createInputDescriptor(z));else throw Error("Recursive join is unsupported");else throw Error("Expected at least two images to join");else throw Error(`Unsupported input '${A}' of type ${typeof A}${H8.defined(q)?` when also providing options of type ${typeof q}`:""}`);if(H8.object(q)){if(H8.defined(q.failOnError))if(H8.bool(q.failOnError))Y.failOn=q.failOnError?"warning":"none";else throw H8.invalidParameterError("failOnError","boolean",q.failOnError);if(H8.defined(q.failOn))if(H8.string(q.failOn)&&H8.inArray(q.failOn,["none","truncated","error","warning"]))Y.failOn=q.failOn;else throw H8.invalidParameterError("failOn","one of: none, truncated, error, warning",q.failOn);if(H8.defined(q.autoOrient))if(H8.bool(q.autoOrient))Y.autoOrient=q.autoOrient;else throw H8.invalidParameterError("autoOrient","boolean",q.autoOrient);if(H8.defined(q.density))if(H8.inRange(q.density,1,1e5))Y.density=q.density;else throw H8.invalidParameterError("density","number between 1 and 100000",q.density);if(H8.defined(q.ignoreIcc))if(H8.bool(q.ignoreIcc))Y.ignoreIcc=q.ignoreIcc;else throw H8.invalidParameterError("ignoreIcc","boolean",q.ignoreIcc);if(H8.defined(q.limitInputPixels))if(H8.bool(q.limitInputPixels))Y.limitInputPixels=q.limitInputPixels?268402689:0;else if(H8.integer(q.limitInputPixels)&&H8.inRange(q.limitInputPixels,0,Number.MAX_SAFE_INTEGER))Y.limitInputPixels=q.limitInputPixels;else throw H8.invalidParameterError("limitInputPixels","positive integer",q.limitInputPixels);if(H8.defined(q.unlimited))if(H8.bool(q.unlimited))Y.unlimited=q.unlimited;else throw H8.invalidParameterError("unlimited","boolean",q.unlimited);if(H8.defined(q.sequentialRead))if(H8.bool(q.sequentialRead))Y.sequentialRead=q.sequentialRead;else throw H8.invalidParameterError("sequentialRead","boolean",q.sequentialRead);if(H8.defined(q.raw)){if(H8.object(q.raw)&&H8.integer(q.raw.width)&&q.raw.width>0&&H8.integer(q.raw.height)&&q.raw.height>0&&H8.integer(q.raw.channels)&&H8.inRange(q.raw.channels,1,4))switch(Y.rawWidth=q.raw.width,Y.rawHeight=q.raw.height,Y.rawChannels=q.raw.channels,A.constructor){case Uint8Array:case Uint8ClampedArray:Y.rawDepth="uchar";break;case Int8Array:Y.rawDepth="char";break;case Uint16Array:Y.rawDepth="ushort";break;case Int16Array:Y.rawDepth="short";break;case Uint32Array:Y.rawDepth="uint";break;case Int32Array:Y.rawDepth="int";break;case Float32Array:Y.rawDepth="float";break;case Float64Array:Y.rawDepth="double";break;default:Y.rawDepth="uchar";break}else throw Error("Expected width, height and channels for raw pixel input");if(Y.rawPremultiplied=!1,H8.defined(q.raw.premultiplied))if(H8.bool(q.raw.premultiplied))Y.rawPremultiplied=q.raw.premultiplied;else throw H8.invalidParameterError("raw.premultiplied","boolean",q.raw.premultiplied);if(Y.rawPageHeight=0,H8.defined(q.raw.pageHeight))if(H8.integer(q.raw.pageHeight)&&q.raw.pageHeight>0&&q.raw.pageHeight<=q.raw.height){if(q.raw.height%q.raw.pageHeight!==0)throw Error(`Expected raw.height ${q.raw.height} to be a multiple of raw.pageHeight ${q.raw.pageHeight}`);Y.rawPageHeight=q.raw.pageHeight}else throw H8.invalidParameterError("raw.pageHeight","positive integer",q.raw.pageHeight)}if(H8.defined(q.animated))if(H8.bool(q.animated))Y.pages=q.animated?-1:1;else throw H8.invalidParameterError("animated","boolean",q.animated);if(H8.defined(q.pages))if(H8.integer(q.pages)&&H8.inRange(q.pages,-1,1e5))Y.pages=q.pages;else throw H8.invalidParameterError("pages","integer between -1 and 100000",q.pages);if(H8.defined(q.page))if(H8.integer(q.page)&&H8.inRange(q.page,0,1e5))Y.page=q.page;else throw H8.invalidParameterError("page","integer between 0 and 100000",q.page);if(H8.object(q.openSlide)&&H8.defined(q.openSlide.level))if(H8.integer(q.openSlide.level)&&H8.inRange(q.openSlide.level,0,256))Y.openSlideLevel=q.openSlide.level;else throw H8.invalidParameterError("openSlide.level","integer between 0 and 256",q.openSlide.level);else if(H8.defined(q.level))if(H8.integer(q.level)&&H8.inRange(q.level,0,256))Y.openSlideLevel=q.level;else throw H8.invalidParameterError("level","integer between 0 and 256",q.level);if(H8.object(q.tiff)&&H8.defined(q.tiff.subifd))if(H8.integer(q.tiff.subifd)&&H8.inRange(q.tiff.subifd,-1,1e5))Y.tiffSubifd=q.tiff.subifd;else throw H8.invalidParameterError("tiff.subifd","integer between -1 and 100000",q.tiff.subifd);else if(H8.defined(q.subifd))if(H8.integer(q.subifd)&&H8.inRange(q.subifd,-1,1e5))Y.tiffSubifd=q.subifd;else throw H8.invalidParameterError("subifd","integer between -1 and 100000",q.subifd);if(H8.object(q.svg)){if(H8.defined(q.svg.stylesheet))if(H8.string(q.svg.stylesheet))Y.svgStylesheet=q.svg.stylesheet;else throw H8.invalidParameterError("svg.stylesheet","string",q.svg.stylesheet);if(H8.defined(q.svg.highBitdepth))if(H8.bool(q.svg.highBitdepth))Y.svgHighBitdepth=q.svg.highBitdepth;else throw H8.invalidParameterError("svg.highBitdepth","boolean",q.svg.highBitdepth)}if(H8.object(q.pdf)&&H8.defined(q.pdf.background))Y.pdfBackground=this._getBackgroundColourOption(q.pdf.background);else if(H8.defined(q.pdfBackground))Y.pdfBackground=this._getBackgroundColourOption(q.pdfBackground);if(H8.object(q.jp2)&&H8.defined(q.jp2.oneshot))if(H8.bool(q.jp2.oneshot))Y.jp2Oneshot=q.jp2.oneshot;else throw H8.invalidParameterError("jp2.oneshot","boolean",q.jp2.oneshot);if(H8.defined(q.create))if(H8.object(q.create)&&H8.integer(q.create.width)&&q.create.width>0&&H8.integer(q.create.height)&&q.create.height>0&&H8.integer(q.create.channels)){if(Y.createWidth=q.create.width,Y.createHeight=q.create.height,Y.createChannels=q.create.channels,Y.createPageHeight=0,H8.defined(q.create.pageHeight))if(H8.integer(q.create.pageHeight)&&q.create.pageHeight>0&&q.create.pageHeight<=q.create.height){if(q.create.height%q.create.pageHeight!==0)throw Error(`Expected create.height ${q.create.height} to be a multiple of create.pageHeight ${q.create.pageHeight}`);Y.createPageHeight=q.create.pageHeight}else throw H8.invalidParameterError("create.pageHeight","positive integer",q.create.pageHeight);if(H8.defined(q.create.noise)){if(!H8.object(q.create.noise))throw Error("Expected noise to be an object");if(q.create.noise.type!=="gaussian")throw Error("Only gaussian noise is supported at the moment");if(Y.createNoiseType=q.create.noise.type,!H8.inRange(q.create.channels,1,4))throw H8.invalidParameterError("create.channels","number between 1 and 4",q.create.channels);if(Y.createNoiseMean=128,H8.defined(q.create.noise.mean))if(H8.number(q.create.noise.mean)&&H8.inRange(q.create.noise.mean,0,1e4))Y.createNoiseMean=q.create.noise.mean;else throw H8.invalidParameterError("create.noise.mean","number between 0 and 10000",q.create.noise.mean);if(Y.createNoiseSigma=30,H8.defined(q.create.noise.sigma))if(H8.number(q.create.noise.sigma)&&H8.inRange(q.create.noise.sigma,0,1e4))Y.createNoiseSigma=q.create.noise.sigma;else throw H8.invalidParameterError("create.noise.sigma","number between 0 and 10000",q.create.noise.sigma)}else if(H8.defined(q.create.background)){if(!H8.inRange(q.create.channels,3,4))throw H8.invalidParameterError("create.channels","number between 3 and 4",q.create.channels);Y.createBackground=this._getBackgroundColourOption(q.create.background)}else throw Error("Expected valid noise or background to create a new input image");delete Y.buffer}else throw Error("Expected valid width, height and channels to create a new input image");if(H8.defined(q.text))if(H8.object(q.text)&&H8.string(q.text.text)){if(Y.textValue=q.text.text,H8.defined(q.text.height)&&H8.defined(q.text.dpi))throw Error("Expected only one of dpi or height");if(H8.defined(q.text.font))if(H8.string(q.text.font))Y.textFont=q.text.font;else throw H8.invalidParameterError("text.font","string",q.text.font);if(H8.defined(q.text.fontfile))if(H8.string(q.text.fontfile))Y.textFontfile=q.text.fontfile;else throw H8.invalidParameterError("text.fontfile","string",q.text.fontfile);if(H8.defined(q.text.width))if(H8.integer(q.text.width)&&q.text.width>0)Y.textWidth=q.text.width;else throw H8.invalidParameterError("text.width","positive integer",q.text.width);if(H8.defined(q.text.height))if(H8.integer(q.text.height)&&q.text.height>0)Y.textHeight=q.text.height;else throw H8.invalidParameterError("text.height","positive integer",q.text.height);if(H8.defined(q.text.align))if(H8.string(q.text.align)&&H8.string(this.constructor.align[q.text.align]))Y.textAlign=this.constructor.align[q.text.align];else throw H8.invalidParameterError("text.align","valid alignment",q.text.align);if(H8.defined(q.text.justify))if(H8.bool(q.text.justify))Y.textJustify=q.text.justify;else throw H8.invalidParameterError("text.justify","boolean",q.text.justify);if(H8.defined(q.text.dpi))if(H8.integer(q.text.dpi)&&H8.inRange(q.text.dpi,1,1e6))Y.textDpi=q.text.dpi;else throw H8.invalidParameterError("text.dpi","integer between 1 and 1000000",q.text.dpi);if(H8.defined(q.text.rgba))if(H8.bool(q.text.rgba))Y.textRgba=q.text.rgba;else throw H8.invalidParameterError("text.rgba","bool",q.text.rgba);if(H8.defined(q.text.spacing))if(H8.integer(q.text.spacing)&&H8.inRange(q.text.spacing,-1e6,1e6))Y.textSpacing=q.text.spacing;else throw H8.invalidParameterError("text.spacing","integer between -1000000 and 1000000",q.text.spacing);if(H8.defined(q.text.wrap))if(H8.string(q.text.wrap)&&H8.inArray(q.text.wrap,["word","char","word-char","none"]))Y.textWrap=q.text.wrap;else throw H8.invalidParameterError("text.wrap","one of: word, char, word-char, none",q.text.wrap);delete Y.buffer}else throw Error("Expected a valid string to create an image with text.");if(H8.defined(q.join))if(H8.defined(this.options.join)){if(H8.defined(q.join.animated))if(H8.bool(q.join.animated))Y.joinAnimated=q.join.animated;else throw H8.invalidParameterError("join.animated","boolean",q.join.animated);if(H8.defined(q.join.across))if(H8.integer(q.join.across)&&H8.inRange(q.join.across,1,1e6))Y.joinAcross=q.join.across;else throw H8.invalidParameterError("join.across","integer between 1 and 100000",q.join.across);if(H8.defined(q.join.shim))if(H8.integer(q.join.shim)&&H8.inRange(q.join.shim,0,1e6))Y.joinShim=q.join.shim;else throw H8.invalidParameterError("join.shim","integer between 0 and 100000",q.join.shim);if(H8.defined(q.join.background))Y.joinBackground=this._getBackgroundColourOption(q.join.background);if(H8.defined(q.join.halign))if(H8.string(q.join.halign)&&H8.string(this.constructor.align[q.join.halign]))Y.joinHalign=this.constructor.align[q.join.halign];else throw H8.invalidParameterError("join.halign","valid alignment",q.join.halign);if(H8.defined(q.join.valign))if(H8.string(q.join.valign)&&H8.string(this.constructor.align[q.join.valign]))Y.joinValign=this.constructor.align[q.join.valign];else throw H8.invalidParameterError("join.valign","valid alignment",q.join.valign)}else throw Error("Expected input to be an array of images to join")}else if(H8.defined(q))throw Error(`Invalid input options ${q}`);return Y}function _i9(A,q,K){if(Array.isArray(this.options.input.buffer))if(H8.buffer(A)){if(this.options.input.buffer.length===0)this.on("finish",()=>{this.streamInFinished=!0});this.options.input.buffer.push(A),K()}else K(Error("Non-Buffer data on Writable Stream"));else K(Error("Unexpected data on Writable Stream"))}function $i9(){if(this._isStreamInput())this.options.input.buffer=Buffer.concat(this.options.input.buffer)}function Oi9(){return Array.isArray(this.options.input.buffer)}function Hi9(A){let q=Error();if(H8.fn(A)){if(this._isStreamInput())this.on("finish",()=>{this._flattenBufferIn(),C66.metadata(this.options,(K,Y)=>{if(K)A(H8.nativeError(K,q));else A(null,Y)})});else C66.metadata(this.options,(K,Y)=>{if(K)A(H8.nativeError(K,q));else A(null,Y)});return this}else if(this._isStreamInput())return new Promise((K,Y)=>{let z=()=>{this._flattenBufferIn(),C66.metadata(this.options,(w,_)=>{if(w)Y(H8.nativeError(w,q));else K(_)})};if(this.writableFinished)z();else this.once("finish",z)});else return new Promise((K,Y)=>{C66.metadata(this.options,(z,w)=>{if(z)Y(H8.nativeError(z,q));else K(w)})})}function ji9(A){let q=Error();if(H8.fn(A)){if(this._isStreamInput())this.on("finish",()=>{this._flattenBufferIn(),C66.stats(this.options,(K,Y)=>{if(K)A(H8.nativeError(K,q));else A(null,Y)})});else C66.stats(this.options,(K,Y)=>{if(K)A(H8.nativeError(K,q));else A(null,Y)});return this}else if(this._isStreamInput())return new Promise((K,Y)=>{this.on("finish",function(){this._flattenBufferIn(),C66.stats(this.options,(z,w)=>{if(z)Y(H8.nativeError(z,q));else K(w)})})});else return new Promise((K,Y)=>{C66.stats(this.options,(z,w)=>{if(z)Y(H8.nativeError(z,q));else K(w)})})}K54.exports=(A)=>{Object.assign(A.prototype,{_inputOptionsFromObject:q54,_createInputDescriptor:wi9,_write:_i9,_flattenBufferIn:$i9,_isStreamInput:Oi9,metadata:Hi9,stats:ji9}),A.align=Yi9}});var H54=C((_z_,O54)=>{/*! Copyright 2013 Lovell Fuller and others. SPDX-License-Identifier: Apache-2.0 */var dq=XF(),w54={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},_54={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},z54={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},$54={entropy:16,attention:17},Sv8={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3",mks2013:"mks2013",mks2021:"mks2021"},Ji9={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},Mi9={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};function Cv8(A){return A.angle%360!==0||A.rotationAngle!==0}function e01(A){return A.width!==-1||A.height!==-1}function Di9(A,q,K){if(e01(this.options))this.options.debuglog("ignoring previous resize options");if(this.options.widthPost!==-1)this.options.debuglog("operation order will be: extract, resize, extract");if(dq.defined(A))if(dq.object(A)&&!dq.defined(K))K=A;else if(dq.integer(A)&&A>0)this.options.width=A;else throw dq.invalidParameterError("width","positive integer",A);else this.options.width=-1;if(dq.defined(q))if(dq.integer(q)&&q>0)this.options.height=q;else throw dq.invalidParameterError("height","positive integer",q);else this.options.height=-1;if(dq.object(K)){if(dq.defined(K.width))if(dq.integer(K.width)&&K.width>0)this.options.width=K.width;else throw dq.invalidParameterError("width","positive integer",K.width);if(dq.defined(K.height))if(dq.integer(K.height)&&K.height>0)this.options.height=K.height;else throw dq.invalidParameterError("height","positive integer",K.height);if(dq.defined(K.fit)){let Y=Mi9[K.fit];if(dq.string(Y))this.options.canvas=Y;else throw dq.invalidParameterError("fit","valid fit",K.fit)}if(dq.defined(K.position)){let Y=dq.integer(K.position)?K.position:$54[K.position]||_54[K.position]||w54[K.position];if(dq.integer(Y)&&(dq.inRange(Y,0,8)||dq.inRange(Y,16,17)))this.options.position=Y;else throw dq.invalidParameterError("position","valid position/gravity/strategy",K.position)}if(this._setBackgroundColourOption("resizeBackground",K.background),dq.defined(K.kernel))if(dq.string(Sv8[K.kernel]))this.options.kernel=Sv8[K.kernel];else throw dq.invalidParameterError("kernel","valid kernel name",K.kernel);if(dq.defined(K.withoutEnlargement))this._setBooleanOption("withoutEnlargement",K.withoutEnlargement);if(dq.defined(K.withoutReduction))this._setBooleanOption("withoutReduction",K.withoutReduction);if(dq.defined(K.fastShrinkOnLoad))this._setBooleanOption("fastShrinkOnLoad",K.fastShrinkOnLoad)}if(Cv8(this.options)&&e01(this.options))this.options.rotateBefore=!0;return this}function Xi9(A){if(dq.integer(A)&&A>0)this.options.extendTop=A,this.options.extendBottom=A,this.options.extendLeft=A,this.options.extendRight=A;else if(dq.object(A)){if(dq.defined(A.top))if(dq.integer(A.top)&&A.top>=0)this.options.extendTop=A.top;else throw dq.invalidParameterError("top","positive integer",A.top);if(dq.defined(A.bottom))if(dq.integer(A.bottom)&&A.bottom>=0)this.options.extendBottom=A.bottom;else throw dq.invalidParameterError("bottom","positive integer",A.bottom);if(dq.defined(A.left))if(dq.integer(A.left)&&A.left>=0)this.options.extendLeft=A.left;else throw dq.invalidParameterError("left","positive integer",A.left);if(dq.defined(A.right))if(dq.integer(A.right)&&A.right>=0)this.options.extendRight=A.right;else throw dq.invalidParameterError("right","positive integer",A.right);if(this._setBackgroundColourOption("extendBackground",A.background),dq.defined(A.extendWith))if(dq.string(z54[A.extendWith]))this.options.extendWith=z54[A.extendWith];else throw dq.invalidParameterError("extendWith","one of: background, copy, repeat, mirror",A.extendWith)}else throw dq.invalidParameterError("extend","integer or object",A);return this}function Pi9(A){let q=e01(this.options)||this.options.widthPre!==-1?"Post":"Pre";if(this.options[`width${q}`]!==-1)this.options.debuglog("ignoring previous extract options");if(["left","top","width","height"].forEach(function(K){let Y=A[K];if(dq.integer(Y)&&Y>=0)this.options[K+(K==="left"||K==="top"?"Offset":"")+q]=Y;else throw dq.invalidParameterError(K,"integer",Y)},this),Cv8(this.options)&&!e01(this.options)){if(this.options.widthPre===-1||this.options.widthPost===-1)this.options.rotateBefore=!0}if(this.options.input.autoOrient)this.options.orientBefore=!0;return this}function Wi9(A){if(this.options.trimThreshold=10,dq.defined(A))if(dq.object(A)){if(dq.defined(A.background))this._setBackgroundColourOption("trimBackground",A.background);if(dq.defined(A.threshold))if(dq.number(A.threshold)&&A.threshold>=0)this.options.trimThreshold=A.threshold;else throw dq.invalidParameterError("threshold","positive number",A.threshold);if(dq.defined(A.lineArt))this._setBooleanOption("trimLineArt",A.lineArt)}else throw dq.invalidParameterError("trim","object",A);if(Cv8(this.options))this.options.rotateBefore=!0;return this}O54.exports=(A)=>{Object.assign(A.prototype,{resize:Di9,extend:Xi9,extract:Pi9,trim:Wi9}),A.gravity=w54,A.strategy=$54,A.kernel=Sv8,A.fit=Ji9,A.position=_54}});var J54=C(($z_,j54)=>{/*! Copyright 2013 Lovell Fuller and others. SPDX-License-Identifier: Apache-2.0 */var s2=XF(),hv8={clear:"clear",source:"source",over:"over",in:"in",out:"out",atop:"atop",dest:"dest","dest-over":"dest-over","dest-in":"dest-in","dest-out":"dest-out","dest-atop":"dest-atop",xor:"xor",add:"add",saturate:"saturate",multiply:"multiply",screen:"screen",overlay:"overlay",darken:"darken",lighten:"lighten","colour-dodge":"colour-dodge","color-dodge":"colour-dodge","colour-burn":"colour-burn","color-burn":"colour-burn","hard-light":"hard-light","soft-light":"soft-light",difference:"difference",exclusion:"exclusion"};function Zi9(A){if(!Array.isArray(A))throw s2.invalidParameterError("images to composite","array",A);return this.options.composite=A.map((q)=>{if(!s2.object(q))throw s2.invalidParameterError("image to composite","object",q);let K=this._inputOptionsFromObject(q),Y={input:this._createInputDescriptor(q.input,K,{allowStream:!1}),blend:"over",tile:!1,left:0,top:0,hasOffset:!1,gravity:0,premultiplied:!1};if(s2.defined(q.blend))if(s2.string(hv8[q.blend]))Y.blend=hv8[q.blend];else throw s2.invalidParameterError("blend","valid blend name",q.blend);if(s2.defined(q.tile))if(s2.bool(q.tile))Y.tile=q.tile;else throw s2.invalidParameterError("tile","boolean",q.tile);if(s2.defined(q.left))if(s2.integer(q.left))Y.left=q.left;else throw s2.invalidParameterError("left","integer",q.left);if(s2.defined(q.top))if(s2.integer(q.top))Y.top=q.top;else throw s2.invalidParameterError("top","integer",q.top);if(s2.defined(q.top)!==s2.defined(q.left))throw Error("Expected both left and top to be set");else Y.hasOffset=s2.integer(q.top)&&s2.integer(q.left);if(s2.defined(q.gravity))if(s2.integer(q.gravity)&&s2.inRange(q.gravity,0,8))Y.gravity=q.gravity;else if(s2.string(q.gravity)&&s2.integer(this.constructor.gravity[q.gravity]))Y.gravity=this.constructor.gravity[q.gravity];else throw s2.invalidParameterError("gravity","valid gravity",q.gravity);if(s2.defined(q.premultiplied))if(s2.bool(q.premultiplied))Y.premultiplied=q.premultiplied;else throw s2.invalidParameterError("premultiplied","boolean",q.premultiplied);return Y}),this}j54.exports=(A)=>{A.prototype.composite=Zi9,A.blend=hv8}});var W54=C((Oz_,P54)=>{/*! Copyright 2013 Lovell Fuller and others. SPDX-License-Identifier: Apache-2.0 */var L8=XF(),M54={integer:"integer",float:"float",approximate:"approximate"};function Gi9(A,q){if(!L8.defined(A))return this.autoOrient();if(this.options.angle||this.options.rotationAngle)this.options.debuglog("ignoring previous rotate options"),this.options.angle=0,this.options.rotationAngle=0;if(L8.integer(A)&&!(A%90))this.options.angle=A;else if(L8.number(A)){if(this.options.rotationAngle=A,L8.object(q)&&q.background)this._setBackgroundColourOption("rotationBackground",q.background)}else throw L8.invalidParameterError("angle","numeric",A);return this}function fi9(){return this.options.input.autoOrient=!0,this}function Ti9(A){return this.options.flip=L8.bool(A)?A:!0,this}function Vi9(A){return this.options.flop=L8.bool(A)?A:!0,this}function Ni9(A,q){let K=[].concat(...A);if(K.length===4&&K.every(L8.number))this.options.affineMatrix=K;else throw L8.invalidParameterError("matrix","1x4 or 2x2 array",A);if(L8.defined(q))if(L8.object(q)){if(this._setBackgroundColourOption("affineBackground",q.background),L8.defined(q.idx))if(L8.number(q.idx))this.options.affineIdx=q.idx;else throw L8.invalidParameterError("options.idx","number",q.idx);if(L8.defined(q.idy))if(L8.number(q.idy))this.options.affineIdy=q.idy;else throw L8.invalidParameterError("options.idy","number",q.idy);if(L8.defined(q.odx))if(L8.number(q.odx))this.options.affineOdx=q.odx;else throw L8.invalidParameterError("options.odx","number",q.odx);if(L8.defined(q.ody))if(L8.number(q.ody))this.options.affineOdy=q.ody;else throw L8.invalidParameterError("options.ody","number",q.ody);if(L8.defined(q.interpolator))if(L8.inArray(q.interpolator,Object.values(this.constructor.interpolators)))this.options.affineInterpolator=q.interpolator;else throw L8.invalidParameterError("options.interpolator","valid interpolator name",q.interpolator)}else throw L8.invalidParameterError("options","object",q);return this}function vi9(A,q,K){if(!L8.defined(A))this.options.sharpenSigma=-1;else if(L8.bool(A))this.options.sharpenSigma=A?-1:0;else if(L8.number(A)&&L8.inRange(A,0.01,1e4)){if(this.options.sharpenSigma=A,L8.defined(q))if(L8.number(q)&&L8.inRange(q,0,1e4))this.options.sharpenM1=q;else throw L8.invalidParameterError("flat","number between 0 and 10000",q);if(L8.defined(K))if(L8.number(K)&&L8.inRange(K,0,1e4))this.options.sharpenM2=K;else throw L8.invalidParameterError("jagged","number between 0 and 10000",K)}else if(L8.plainObject(A)){if(L8.number(A.sigma)&&L8.inRange(A.sigma,0.000001,10))this.options.sharpenSigma=A.sigma;else throw L8.invalidParameterError("options.sigma","number between 0.000001 and 10",A.sigma);if(L8.defined(A.m1))if(L8.number(A.m1)&&L8.inRange(A.m1,0,1e6))this.options.sharpenM1=A.m1;else throw L8.invalidParameterError("options.m1","number between 0 and 1000000",A.m1);if(L8.defined(A.m2))if(L8.number(A.m2)&&L8.inRange(A.m2,0,1e6))this.options.sharpenM2=A.m2;else throw L8.invalidParameterError("options.m2","number between 0 and 1000000",A.m2);if(L8.defined(A.x1))if(L8.number(A.x1)&&L8.inRange(A.x1,0,1e6))this.options.sharpenX1=A.x1;else throw L8.invalidParameterError("options.x1","number between 0 and 1000000",A.x1);if(L8.defined(A.y2))if(L8.number(A.y2)&&L8.inRange(A.y2,0,1e6))this.options.sharpenY2=A.y2;else throw L8.invalidParameterError("options.y2","number between 0 and 1000000",A.y2);if(L8.defined(A.y3))if(L8.number(A.y3)&&L8.inRange(A.y3,0,1e6))this.options.sharpenY3=A.y3;else throw L8.invalidParameterError("options.y3","number between 0 and 1000000",A.y3)}else throw L8.invalidParameterError("sigma","number between 0.01 and 10000",A);return this}function ki9(A){if(!L8.defined(A))this.options.medianSize=3;else if(L8.integer(A)&&L8.inRange(A,1,1000))this.options.medianSize=A;else throw L8.invalidParameterError("size","integer between 1 and 1000",A);return this}function Ei9(A){let q;if(L8.number(A))q=A;else if(L8.plainObject(A)){if(!L8.number(A.sigma))throw L8.invalidParameterError("options.sigma","number between 0.3 and 1000",q);if(q=A.sigma,"precision"in A)if(L8.string(M54[A.precision]))this.options.precision=M54[A.precision];else throw L8.invalidParameterError("precision","one of: integer, float, approximate",A.precision);if("minAmplitude"in A)if(L8.number(A.minAmplitude)&&L8.inRange(A.minAmplitude,0.001,1))this.options.minAmpl=A.minAmplitude;else throw L8.invalidParameterError("minAmplitude","number between 0.001 and 1",A.minAmplitude)}if(!L8.defined(A))this.options.blurSigma=-1;else if(L8.bool(A))this.options.blurSigma=A?-1:0;else if(L8.number(q)&&L8.inRange(q,0.3,1000))this.options.blurSigma=q;else throw L8.invalidParameterError("sigma","number between 0.3 and 1000",q);return this}function D54(A){if(!L8.defined(A))this.options.dilateWidth=1;else if(L8.integer(A)&&A>0)this.options.dilateWidth=A;else throw L8.invalidParameterError("dilate","positive integer",D54);return this}function X54(A){if(!L8.defined(A))this.options.erodeWidth=1;else if(L8.integer(A)&&A>0)this.options.erodeWidth=A;else throw L8.invalidParameterError("erode","positive integer",X54);return this}function Li9(A){if(this.options.flatten=L8.bool(A)?A:!0,L8.object(A))this._setBackgroundColourOption("flattenBackground",A.background);return this}function yi9(){return this.options.unflatten=!0,this}function Ri9(A,q){if(!L8.defined(A))this.options.gamma=2.2;else if(L8.number(A)&&L8.inRange(A,1,3))this.options.gamma=A;else throw L8.invalidParameterError("gamma","number between 1.0 and 3.0",A);if(!L8.defined(q))this.options.gammaOut=this.options.gamma;else if(L8.number(q)&&L8.inRange(q,1,3))this.options.gammaOut=q;else throw L8.invalidParameterError("gammaOut","number between 1.0 and 3.0",q);return this}function Si9(A){if(this.options.negate=L8.bool(A)?A:!0,L8.plainObject(A)&&"alpha"in A)if(!L8.bool(A.alpha))throw L8.invalidParameterError("alpha","should be boolean value",A.alpha);else this.options.negateAlpha=A.alpha;return this}function Ci9(A){if(L8.plainObject(A)){if(L8.defined(A.lower))if(L8.number(A.lower)&&L8.inRange(A.lower,0,99))this.options.normaliseLower=A.lower;else throw L8.invalidParameterError("lower","number between 0 and 99",A.lower);if(L8.defined(A.upper))if(L8.number(A.upper)&&L8.inRange(A.upper,1,100))this.options.normaliseUpper=A.upper;else throw L8.invalidParameterError("upper","number between 1 and 100",A.upper)}if(this.options.normaliseLower>=this.options.normaliseUpper)throw L8.invalidParameterError("range","lower to be less than upper",`${this.options.normaliseLower} >= ${this.options.normaliseUpper}`);return this.options.normalise=!0,this}function hi9(A){return this.normalise(A)}function Ii9(A){if(L8.plainObject(A)){if(L8.integer(A.width)&&A.width>0)this.options.claheWidth=A.width;else throw L8.invalidParameterError("width","integer greater than zero",A.width);if(L8.integer(A.height)&&A.height>0)this.options.claheHeight=A.height;else throw L8.invalidParameterError("height","integer greater than zero",A.height);if(L8.defined(A.maxSlope))if(L8.integer(A.maxSlope)&&L8.inRange(A.maxSlope,0,100))this.options.claheMaxSlope=A.maxSlope;else throw L8.invalidParameterError("maxSlope","integer between 0 and 100",A.maxSlope)}else throw L8.invalidParameterError("options","plain object",A);return this}function bi9(A){if(!L8.object(A)||!Array.isArray(A.kernel)||!L8.integer(A.width)||!L8.integer(A.height)||!L8.inRange(A.width,3,1001)||!L8.inRange(A.height,3,1001)||A.height*A.width!==A.kernel.length)throw Error("Invalid convolution kernel");if(!L8.integer(A.scale))A.scale=A.kernel.reduce((q,K)=>q+K,0);if(A.scale<1)A.scale=1;if(!L8.integer(A.offset))A.offset=0;return this.options.convKernel=A,this}function xi9(A,q){if(!L8.defined(A))this.options.threshold=128;else if(L8.bool(A))this.options.threshold=A?128:0;else if(L8.integer(A)&&L8.inRange(A,0,255))this.options.threshold=A;else throw L8.invalidParameterError("threshold","integer between 0 and 255",A);if(!L8.object(q)||q.greyscale===!0||q.grayscale===!0)this.options.thresholdGrayscale=!0;else this.options.thresholdGrayscale=!1;return this}function ui9(A,q,K){if(this.options.boolean=this._createInputDescriptor(A,K),L8.string(q)&&L8.inArray(q,["and","or","eor"]))this.options.booleanOp=q;else throw L8.invalidParameterError("operator","one of: and, or, eor",q);return this}function Bi9(A,q){if(!L8.defined(A)&&L8.number(q))A=1;else if(L8.number(A)&&!L8.defined(q))q=0;if(!L8.defined(A))this.options.linearA=[];else if(L8.number(A))this.options.linearA=[A];else if(Array.isArray(A)&&A.length&&A.every(L8.number))this.options.linearA=A;else throw L8.invalidParameterError("a","number or array of numbers",A);if(!L8.defined(q))this.options.linearB=[];else if(L8.number(q))this.options.linearB=[q];else if(Array.isArray(q)&&q.length&&q.every(L8.number))this.options.linearB=q;else throw L8.invalidParameterError("b","number or array of numbers",q);if(this.options.linearA.length!==this.options.linearB.length)throw Error("Expected a and b to be arrays of the same length");return this}function mi9(A){if(!Array.isArray(A))throw L8.invalidParameterError("inputMatrix","array",A);if(A.length!==3&&A.length!==4)throw L8.invalidParameterError("inputMatrix","3x3 or 4x4 array",A.length);let q=A.flat().map(Number);if(q.length!==9&&q.length!==16)throw L8.invalidParameterError("inputMatrix","cardinality of 9 or 16",q.length);return this.options.recombMatrix=q,this}function gi9(A){if(!L8.plainObject(A))throw L8.invalidParameterError("options","plain object",A);if("brightness"in A)if(L8.number(A.brightness)&&A.brightness>=0)this.options.brightness=A.brightness;else throw L8.invalidParameterError("brightness","number above zero",A.brightness);if("saturation"in A)if(L8.number(A.saturation)&&A.saturation>=0)this.options.saturation=A.saturation;else throw L8.invalidParameterError("saturation","number above zero",A.saturation);if("hue"in A)if(L8.integer(A.hue))this.options.hue=A.hue%360;else throw L8.invalidParameterError("hue","number",A.hue);if("lightness"in A)if(L8.number(A.lightness))this.options.lightness=A.lightness;else throw L8.invalidParameterError("lightness","number",A.lightness);return this}P54.exports=(A)=>{Object.assign(A.prototype,{autoOrient:fi9,rotate:Gi9,flip:Ti9,flop:Vi9,affine:Ni9,sharpen:vi9,erode:X54,dilate:D54,median:ki9,blur:Ei9,flatten:Li9,unflatten:yi9,gamma:Ri9,negate:Si9,normalise:Ci9,normalize:hi9,clahe:Ii9,convolve:bi9,threshold:xi9,boolean:ui9,linear:Bi9,recomb:mi9,modulate:gi9})}});var N54=C((Hz_,V54)=>{var{defineProperty:uv8,getOwnPropertyDescriptor:Fi9,getOwnPropertyNames:Qi9}=Object,Ui9=Object.prototype.hasOwnProperty,pi9=(A,q)=>{for(var K in q)uv8(A,K,{get:q[K],enumerable:!0})},di9=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of Qi9(q))if(!Ui9.call(A,z)&&z!==K)uv8(A,z,{get:()=>q[z],enumerable:!(Y=Fi9(q,z))||Y.enumerable})}return A},ci9=(A)=>di9(uv8({},"__esModule",{value:!0}),A),Z54={};pi9(Z54,{default:()=>zn9});V54.exports=ci9(Z54);var fF={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},G54=Object.create(null);for(let A in fF)if(Object.hasOwn(fF,A))G54[fF[A]]=A;var dN={to:{},get:{}};dN.get=function(A){let q=A.slice(0,3).toLowerCase(),K,Y;switch(q){case"hsl":{K=dN.get.hsl(A),Y="hsl";break}case"hwb":{K=dN.get.hwb(A),Y="hwb";break}default:{K=dN.get.rgb(A),Y="rgb";break}}if(!K)return null;return{model:Y,value:K}};dN.get.rgb=function(A){if(!A)return null;let q=/^#([a-f\d]{3,4})$/i,K=/^#([a-f\d]{6})([a-f\d]{2})?$/i,Y=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,z=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,w=/^(\w+)$/,_=[0,0,0,1],$,O,H;if($=A.match(K)){H=$[2],$=$[1];for(O=0;O<3;O++){let j=O*2;_[O]=Number.parseInt($.slice(j,j+2),16)}if(H)_[3]=Number.parseInt(H,16)/255}else if($=A.match(q)){$=$[1],H=$[3];for(O=0;O<3;O++)_[O]=Number.parseInt($[O]+$[O],16);if(H)_[3]=Number.parseInt(H+H,16)/255}else if($=A.match(Y)){for(O=0;O<3;O++)_[O]=Number.parseInt($[O+1],10);if($[4])_[3]=$[5]?Number.parseFloat($[4])*0.01:Number.parseFloat($[4])}else if($=A.match(z)){for(O=0;O<3;O++)_[O]=Math.round(Number.parseFloat($[O+1])*2.55);if($[4])_[3]=$[5]?Number.parseFloat($[4])*0.01:Number.parseFloat($[4])}else if($=A.match(w)){if($[1]==="transparent")return[0,0,0,0];if(!Object.hasOwn(fF,$[1]))return null;return _=fF[$[1]],_[3]=1,_}else return null;for(O=0;O<3;O++)_[O]=h66(_[O],0,255);return _[3]=h66(_[3],0,1),_};dN.get.hsl=function(A){if(!A)return null;let q=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,K=A.match(q);if(K){let Y=Number.parseFloat(K[4]),z=(Number.parseFloat(K[1])%360+360)%360,w=h66(Number.parseFloat(K[2]),0,100),_=h66(Number.parseFloat(K[3]),0,100),$=h66(Number.isNaN(Y)?1:Y,0,1);return[z,w,_,$]}return null};dN.get.hwb=function(A){if(!A)return null;let q=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,K=A.match(q);if(K){let Y=Number.parseFloat(K[4]),z=(Number.parseFloat(K[1])%360+360)%360,w=h66(Number.parseFloat(K[2]),0,100),_=h66(Number.parseFloat(K[3]),0,100),$=h66(Number.isNaN(Y)?1:Y,0,1);return[z,w,_,$]}return null};dN.to.hex=function(...A){return"#"+AW1(A[0])+AW1(A[1])+AW1(A[2])+(A[3]<1?AW1(Math.round(A[3]*255)):"")};dN.to.rgb=function(...A){return A.length<4||A[3]===1?"rgb("+Math.round(A[0])+", "+Math.round(A[1])+", "+Math.round(A[2])+")":"rgba("+Math.round(A[0])+", "+Math.round(A[1])+", "+Math.round(A[2])+", "+A[3]+")"};dN.to.rgb.percent=function(...A){let q=Math.round(A[0]/255*100),K=Math.round(A[1]/255*100),Y=Math.round(A[2]/255*100);return A.length<4||A[3]===1?"rgb("+q+"%, "+K+"%, "+Y+"%)":"rgba("+q+"%, "+K+"%, "+Y+"%, "+A[3]+")"};dN.to.hsl=function(...A){return A.length<4||A[3]===1?"hsl("+A[0]+", "+A[1]+"%, "+A[2]+"%)":"hsla("+A[0]+", "+A[1]+"%, "+A[2]+"%, "+A[3]+")"};dN.to.hwb=function(...A){let q="";if(A.length>=4&&A[3]!==1)q=", "+A[3];return"hwb("+A[0]+", "+A[1]+"%, "+A[2]+"%"+q+")"};dN.to.keyword=function(...A){return G54[A.slice(0,3)]};function h66(A,q,K){return Math.min(Math.max(q,A),K)}function AW1(A){let q=Math.round(A).toString(16).toUpperCase();return q.length<2?"0"+q:q}var LG6=dN,f54={};for(let A of Object.keys(fF))f54[fF[A]]=A;var B4={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},uY6=B4,tl=0.008856451679035631;function RG6(A){let q=A>0.0031308?1.055*A**0.4166666666666667-0.055:A*12.92;return Math.min(Math.max(0,q),1)}function SG6(A){return A>0.04045?((A+0.055)/1.055)**2.4:A/12.92}for(let A of Object.keys(B4)){if(!("channels"in B4[A]))throw Error("missing channels property: "+A);if(!("labels"in B4[A]))throw Error("missing channel labels property: "+A);if(B4[A].labels.length!==B4[A].channels)throw Error("channel and label counts mismatch: "+A);let{channels:q,labels:K}=B4[A];delete B4[A].channels,delete B4[A].labels,Object.defineProperty(B4[A],"channels",{value:q}),Object.defineProperty(B4[A],"labels",{value:K})}B4.rgb.hsl=function(A){let q=A[0]/255,K=A[1]/255,Y=A[2]/255,z=Math.min(q,K,Y),w=Math.max(q,K,Y),_=w-z,$,O;switch(w){case z:{$=0;break}case q:{$=(K-Y)/_;break}case K:{$=2+(Y-q)/_;break}case Y:{$=4+(q-K)/_;break}}if($=Math.min($*60,360),$<0)$+=360;let H=(z+w)/2;if(w===z)O=0;else if(H<=0.5)O=_/(w+z);else O=_/(2-w-z);return[$,O*100,H*100]};B4.rgb.hsv=function(A){let q,K,Y,z,w,_=A[0]/255,$=A[1]/255,O=A[2]/255,H=Math.max(_,$,O),j=H-Math.min(_,$,O),J=function(M){return(H-M)/6/j+0.5};if(j===0)z=0,w=0;else{switch(w=j/H,q=J(_),K=J($),Y=J(O),H){case _:{z=Y-K;break}case $:{z=0.3333333333333333+q-Y;break}case O:{z=0.6666666666666666+K-q;break}}if(z<0)z+=1;else if(z>1)z-=1}return[z*360,w*100,H*100]};B4.rgb.hwb=function(A){let q=A[0],K=A[1],Y=A[2],z=B4.rgb.hsl(A)[0],w=0.00392156862745098*Math.min(q,Math.min(K,Y));return Y=1-0.00392156862745098*Math.max(q,Math.max(K,Y)),[z,w*100,Y*100]};B4.rgb.oklab=function(A){let q=SG6(A[0]/255),K=SG6(A[1]/255),Y=SG6(A[2]/255),z=Math.cbrt(0.4122214708*q+0.5363325363*K+0.0514459929*Y),w=Math.cbrt(0.2119034982*q+0.6806995451*K+0.1073969566*Y),_=Math.cbrt(0.0883024619*q+0.2817188376*K+0.6299787005*Y),$=0.2104542553*z+0.793617785*w-0.0040720468*_,O=1.9779984951*z-2.428592205*w+0.4505937099*_,H=0.0259040371*z+0.7827717662*w-0.808675766*_;return[$*100,O*100,H*100]};B4.rgb.cmyk=function(A){let q=A[0]/255,K=A[1]/255,Y=A[2]/255,z=Math.min(1-q,1-K,1-Y),w=(1-q-z)/(1-z)||0,_=(1-K-z)/(1-z)||0,$=(1-Y-z)/(1-z)||0;return[w*100,_*100,$*100,z*100]};function li9(A,q){return(A[0]-q[0])**2+(A[1]-q[1])**2+(A[2]-q[2])**2}B4.rgb.keyword=function(A){let q=f54[A];if(q)return q;let K=Number.POSITIVE_INFINITY,Y;for(let z of Object.keys(fF)){let w=fF[z],_=li9(A,w);if(_tl?K**0.3333333333333333:7.787*K+0.13793103448275862,Y=Y>tl?Y**0.3333333333333333:7.787*Y+0.13793103448275862,z=z>tl?z**0.3333333333333333:7.787*z+0.13793103448275862;let w=116*Y-16,_=500*(K-Y),$=200*(Y-z);return[w,_,$]};B4.hsl.rgb=function(A){let q=A[0]/360,K=A[1]/100,Y=A[2]/100,z,w;if(K===0)return w=Y*255,[w,w,w];let _=Y<0.5?Y*(1+K):Y+K-Y*K,$=2*Y-_,O=[0,0,0];for(let H=0;H<3;H++){if(z=q+0.3333333333333333*-(H-1),z<0)z++;if(z>1)z--;if(6*z<1)w=$+(_-$)*6*z;else if(2*z<1)w=_;else if(3*z<2)w=$+(_-$)*(0.6666666666666666-z)*6;else w=$;O[H]=w*255}return O};B4.hsl.hsv=function(A){let q=A[0],K=A[1]/100,Y=A[2]/100,z=K,w=Math.max(Y,0.01);Y*=2,K*=Y<=1?Y:2-Y,z*=w<=1?w:2-w;let _=(Y+K)/2,$=Y===0?2*z/(w+z):2*K/(Y+K);return[q,$*100,_*100]};B4.hsv.rgb=function(A){let q=A[0]/60,K=A[1]/100,Y=A[2]/100,z=Math.floor(q)%6,w=q-Math.floor(q),_=255*Y*(1-K),$=255*Y*(1-K*w),O=255*Y*(1-K*(1-w));switch(Y*=255,z){case 0:return[Y,O,_];case 1:return[$,Y,_];case 2:return[_,Y,O];case 3:return[_,$,Y];case 4:return[O,_,Y];case 5:return[Y,_,$]}};B4.hsv.hsl=function(A){let q=A[0],K=A[1]/100,Y=A[2]/100,z=Math.max(Y,0.01),w,_;_=(2-K)*Y;let $=(2-K)*z;return w=K*z,w/=$<=1?$:2-$,w=w||0,_/=2,[q,w*100,_*100]};B4.hwb.rgb=function(A){let q=A[0]/360,K=A[1]/100,Y=A[2]/100,z=K+Y,w;if(z>1)K/=z,Y/=z;let _=Math.floor(6*q),$=1-Y;if(w=6*q-_,(_&1)!==0)w=1-w;let O=K+w*($-K),H,j,J;switch(_){default:case 6:case 0:{H=$,j=O,J=K;break}case 1:{H=O,j=$,J=K;break}case 2:{H=K,j=$,J=O;break}case 3:{H=K,j=O,J=$;break}case 4:{H=O,j=K,J=$;break}case 5:{H=$,j=K,J=O;break}}return[H*255,j*255,J*255]};B4.cmyk.rgb=function(A){let q=A[0]/100,K=A[1]/100,Y=A[2]/100,z=A[3]/100,w=1-Math.min(1,q*(1-z)+z),_=1-Math.min(1,K*(1-z)+z),$=1-Math.min(1,Y*(1-z)+z);return[w*255,_*255,$*255]};B4.xyz.rgb=function(A){let q=A[0]/100,K=A[1]/100,Y=A[2]/100,z,w,_;return z=q*3.2404542+K*-1.5371385+Y*-0.4985314,w=q*-0.969266+K*1.8760108+Y*0.041556,_=q*0.0556434+K*-0.2040259+Y*1.0572252,z=RG6(z),w=RG6(w),_=RG6(_),[z*255,w*255,_*255]};B4.xyz.lab=function(A){let q=A[0],K=A[1],Y=A[2];q/=95.047,K/=100,Y/=108.883,q=q>tl?q**0.3333333333333333:7.787*q+0.13793103448275862,K=K>tl?K**0.3333333333333333:7.787*K+0.13793103448275862,Y=Y>tl?Y**0.3333333333333333:7.787*Y+0.13793103448275862;let z=116*K-16,w=500*(q-K),_=200*(K-Y);return[z,w,_]};B4.xyz.oklab=function(A){let q=A[0]/100,K=A[1]/100,Y=A[2]/100,z=Math.cbrt(0.8189330101*q+0.3618667424*K-0.1288597137*Y),w=Math.cbrt(0.0329845436*q+0.9293118715*K+0.0361456387*Y),_=Math.cbrt(0.0482003018*q+0.2643662691*K+0.633851707*Y),$=0.2104542553*z+0.793617785*w-0.0040720468*_,O=1.9779984951*z-2.428592205*w+0.4505937099*_,H=0.0259040371*z+0.7827717662*w-0.808675766*_;return[$*100,O*100,H*100]};B4.oklab.oklch=function(A){return B4.lab.lch(A)};B4.oklab.xyz=function(A){let q=A[0]/100,K=A[1]/100,Y=A[2]/100,z=(0.999999998*q+0.396337792*K+0.215803758*Y)**3,w=(1.000000008*q-0.105561342*K-0.063854175*Y)**3,_=(1.000000055*q-0.089484182*K-1.291485538*Y)**3,$=1.227013851*z-0.55779998*w+0.281256149*_,O=-0.040580178*z+1.11225687*w-0.071676679*_,H=-0.076381285*z-0.421481978*w+1.58616322*_;return[$*100,O*100,H*100]};B4.oklab.rgb=function(A){let q=A[0]/100,K=A[1]/100,Y=A[2]/100,z=(q+0.3963377774*K+0.2158037573*Y)**3,w=(q-0.1055613458*K-0.0638541728*Y)**3,_=(q-0.0894841775*K-1.291485548*Y)**3,$=RG6(4.0767416621*z-3.3077115913*w+0.2309699292*_),O=RG6(-1.2684380046*z+2.6097574011*w-0.3413193965*_),H=RG6(-0.0041960863*z-0.7034186147*w+1.707614701*_);return[$*255,O*255,H*255]};B4.oklch.oklab=function(A){return B4.lch.lab(A)};B4.lab.xyz=function(A){let q=A[0],K=A[1],Y=A[2],z,w,_;w=(q+16)/116,z=K/500+w,_=w-Y/200;let $=w**3,O=z**3,H=_**3;return w=$>tl?$:(w-0.13793103448275862)/7.787,z=O>tl?O:(z-0.13793103448275862)/7.787,_=H>tl?H:(_-0.13793103448275862)/7.787,z*=95.047,w*=100,_*=108.883,[z,w,_]};B4.lab.lch=function(A){let q=A[0],K=A[1],Y=A[2],z;if(z=Math.atan2(Y,K)*360/2/Math.PI,z<0)z+=360;let _=Math.sqrt(K*K+Y*Y);return[q,_,z]};B4.lch.lab=function(A){let q=A[0],K=A[1],z=A[2]/360*2*Math.PI,w=K*Math.cos(z),_=K*Math.sin(z);return[q,w,_]};B4.rgb.ansi16=function(A,q=null){let[K,Y,z]=A,w=q===null?B4.rgb.hsv(A)[2]:q;if(w=Math.round(w/50),w===0)return 30;let _=30+(Math.round(z/255)<<2|Math.round(Y/255)<<1|Math.round(K/255));if(w===2)_+=60;return _};B4.hsv.ansi16=function(A){return B4.rgb.ansi16(B4.hsv.rgb(A),A[2])};B4.rgb.ansi256=function(A){let q=A[0],K=A[1],Y=A[2];if(q>>4===K>>4&&K>>4===Y>>4){if(q<8)return 16;if(q>248)return 231;return Math.round((q-8)/247*24)+232}return 16+36*Math.round(q/255*5)+6*Math.round(K/255*5)+Math.round(Y/255*5)};B4.ansi16.rgb=function(A){A=A[0];let q=A%10;if(q===0||q===7){if(A>50)q+=3.5;return q=q/10.5*255,[q,q,q]}let K=(Math.trunc(A>50)+1)*0.5,Y=(q&1)*K*255,z=(q>>1&1)*K*255,w=(q>>2&1)*K*255;return[Y,z,w]};B4.ansi256.rgb=function(A){if(A=A[0],A>=232){let w=(A-232)*10+8;return[w,w,w]}A-=16;let q,K=Math.floor(A/36)/5*255,Y=Math.floor((q=A%36)/6)/5*255,z=q%6/5*255;return[K,Y,z]};B4.rgb.hex=function(A){let K=(((Math.round(A[0])&255)<<16)+((Math.round(A[1])&255)<<8)+(Math.round(A[2])&255)).toString(16).toUpperCase();return"000000".slice(K.length)+K};B4.hex.rgb=function(A){let q=A.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!q)return[0,0,0];let K=q[0];if(q[0].length===3)K=[...K].map(($)=>$+$).join("");let Y=Number.parseInt(K,16),z=Y>>16&255,w=Y>>8&255,_=Y&255;return[z,w,_]};B4.rgb.hcg=function(A){let q=A[0]/255,K=A[1]/255,Y=A[2]/255,z=Math.max(Math.max(q,K),Y),w=Math.min(Math.min(q,K),Y),_=z-w,$,O=_<1?w/(1-_):0;if(_<=0)$=0;else if(z===q)$=(K-Y)/_%6;else if(z===K)$=2+(Y-q)/_;else $=4+(q-K)/_;return $/=6,$%=1,[$*360,_*100,O*100]};B4.hsl.hcg=function(A){let q=A[1]/100,K=A[2]/100,Y=K<0.5?2*q*K:2*q*(1-K),z=0;if(Y<1)z=(K-0.5*Y)/(1-Y);return[A[0],Y*100,z*100]};B4.hsv.hcg=function(A){let q=A[1]/100,K=A[2]/100,Y=q*K,z=0;if(Y<1)z=(K-Y)/(1-Y);return[A[0],Y*100,z*100]};B4.hcg.rgb=function(A){let q=A[0]/360,K=A[1]/100,Y=A[2]/100;if(K===0)return[Y*255,Y*255,Y*255];let z=[0,0,0],w=q%1*6,_=w%1,$=1-_,O=0;switch(Math.floor(w)){case 0:{z[0]=1,z[1]=_,z[2]=0;break}case 1:{z[0]=$,z[1]=1,z[2]=0;break}case 2:{z[0]=0,z[1]=1,z[2]=_;break}case 3:{z[0]=0,z[1]=$,z[2]=1;break}case 4:{z[0]=_,z[1]=0,z[2]=1;break}default:z[0]=1,z[1]=0,z[2]=$}return O=(1-K)*Y,[(K*z[0]+O)*255,(K*z[1]+O)*255,(K*z[2]+O)*255]};B4.hcg.hsv=function(A){let q=A[1]/100,K=A[2]/100,Y=q+K*(1-q),z=0;if(Y>0)z=q/Y;return[A[0],z*100,Y*100]};B4.hcg.hsl=function(A){let q=A[1]/100,Y=A[2]/100*(1-q)+0.5*q,z=0;if(Y>0&&Y<0.5)z=q/(2*Y);else if(Y>=0.5&&Y<1)z=q/(2*(1-Y));return[A[0],z*100,Y*100]};B4.hcg.hwb=function(A){let q=A[1]/100,K=A[2]/100,Y=q+K*(1-q);return[A[0],(Y-q)*100,(1-Y)*100]};B4.hwb.hcg=function(A){let q=A[1]/100,Y=1-A[2]/100,z=Y-q,w=0;if(z<1)w=(Y-z)/(1-z);return[A[0],z*100,w*100]};B4.apple.rgb=function(A){return[A[0]/65535*255,A[1]/65535*255,A[2]/65535*255]};B4.rgb.apple=function(A){return[A[0]/255*65535,A[1]/255*65535,A[2]/255*65535]};B4.gray.rgb=function(A){return[A[0]/100*255,A[0]/100*255,A[0]/100*255]};B4.gray.hsl=function(A){return[0,0,A[0]]};B4.gray.hsv=B4.gray.hsl;B4.gray.hwb=function(A){return[0,100,A[0]]};B4.gray.cmyk=function(A){return[0,0,0,A[0]]};B4.gray.lab=function(A){return[A[0],0,0]};B4.gray.hex=function(A){let q=Math.round(A[0]/100*255)&255,Y=((q<<16)+(q<<8)+q).toString(16).toUpperCase();return"000000".slice(Y.length)+Y};B4.rgb.gray=function(A){return[(A[0]+A[1]+A[2])/3/255*100]};function ii9(){let A={},q=Object.keys(uY6);for(let{length:K}=q,Y=0;Y0){let Y=K.pop(),z=Object.keys(uY6[Y]);for(let{length:w}=z,_=0;_1)K=Y;return A(K)};if("conversion"in A)q.conversion=A.conversion;return q}function An9(A){let q=function(...K){let Y=K[0];if(Y===void 0||Y===null)return Y;if(Y.length>1)K=Y;let z=A(K);if(typeof z==="object")for(let{length:w}=z,_=0;_0){this.model=q||"rgb",Y=aE[this.model].channels;let z=Array.prototype.slice.call(A,0,Y);this.color=xv8(z,Y),this.valpha=typeof A[Y]==="number"?A[Y]:1}else if(typeof A==="number")this.model="rgb",this.color=[A>>16&255,A>>8&255,A&255],this.valpha=1;else{this.valpha=1;let z=Object.keys(A);if("alpha"in A)z.splice(z.indexOf("alpha"),1),this.valpha=typeof A.alpha==="number"?A.alpha:0;let w=z.sort().join("");if(!(w in Iv8))throw Error("Unable to parse color from object: "+JSON.stringify(A));this.model=Iv8[w];let{labels:_}=aE[this.model],$=[];for(K=0;K<_.length;K++)$.push(A[_[K]]);this.color=xv8($)}if(bv8[this.model]){Y=aE[this.model].channels;for(K=0;K(A%360+360)%360),saturationl:lj("hsl",1,tD(100)),lightness:lj("hsl",2,tD(100)),saturationv:lj("hsv",1,tD(100)),value:lj("hsv",2,tD(100)),chroma:lj("hcg",1,tD(100)),gray:lj("hcg",2,tD(100)),white:lj("hwb",1,tD(100)),wblack:lj("hwb",2,tD(100)),cyan:lj("cmyk",0,tD(100)),magenta:lj("cmyk",1,tD(100)),yellow:lj("cmyk",2,tD(100)),black:lj("cmyk",3,tD(100)),x:lj("xyz",0,tD(95.047)),y:lj("xyz",1,tD(100)),z:lj("xyz",2,tD(108.833)),l:lj("lab",0,tD(100)),a:lj("lab",1),b:lj("lab",2),keyword(A){if(A!==void 0)return new PP(A);return aE[this.model].keyword(this.color)},hex(A){if(A!==void 0)return new PP(A);return LG6.to.hex(...this.rgb().round().color)},hexa(A){if(A!==void 0)return new PP(A);let q=this.rgb().round().color,K=Math.round(this.valpha*255).toString(16).toUpperCase();if(K.length===1)K="0"+K;return LG6.to.hex(...q)+K},rgbNumber(){let A=this.rgb().color;return(A[0]&255)<<16|(A[1]&255)<<8|A[2]&255},luminosity(){let A=this.rgb().color,q=[];for(let[K,Y]of A.entries()){let z=Y/255;q[K]=z<=0.04045?z/12.92:((z+0.055)/1.055)**2.4}return 0.2126*q[0]+0.7152*q[1]+0.0722*q[2]},contrast(A){let q=this.luminosity(),K=A.luminosity();if(q>K)return(q+0.05)/(K+0.05);return(K+0.05)/(q+0.05)},level(A){let q=this.contrast(A);if(q>=7)return"AAA";return q>=4.5?"AA":""},isDark(){let A=this.rgb().color;return(A[0]*2126+A[1]*7152+A[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let A=this.rgb();for(let q=0;q<3;q++)A.color[q]=255-A.color[q];return A},lighten(A){let q=this.hsl();return q.color[2]+=q.color[2]*A,q},darken(A){let q=this.hsl();return q.color[2]-=q.color[2]*A,q},saturate(A){let q=this.hsl();return q.color[1]+=q.color[1]*A,q},desaturate(A){let q=this.hsl();return q.color[1]-=q.color[1]*A,q},whiten(A){let q=this.hwb();return q.color[1]+=q.color[1]*A,q},blacken(A){let q=this.hwb();return q.color[2]+=q.color[2]*A,q},grayscale(){let A=this.rgb().color,q=A[0]*0.3+A[1]*0.59+A[2]*0.11;return PP.rgb(q,q,q)},fade(A){return this.alpha(this.valpha-this.valpha*A)},opaquer(A){return this.alpha(this.valpha+this.valpha*A)},rotate(A){let q=this.hsl(),K=q.color[0];return K=(K+A)%360,K=K<0?360+K:K,q.color[0]=K,q},mix(A,q){if(!A||!A.rgb)throw Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof A);let K=A.rgb(),Y=this.rgb(),z=q===void 0?0.5:q,w=2*z-1,_=K.alpha()-Y.alpha(),$=((w*_===-1?w:(w+_)/(1+w*_))+1)/2,O=1-$;return PP.rgb($*K.red()+O*Y.red(),$*K.green()+O*Y.green(),$*K.blue()+O*Y.blue(),K.alpha()*z+Y.alpha()*(1-z))}};for(let A of Object.keys(aE)){if(T54.includes(A))continue;let{channels:q}=aE[A];PP.prototype[A]=function(...K){if(this.model===A)return new PP(this);if(K.length>0)return new PP(K,A);return new PP([...Yn9(aE[this.model][A].raw(this.color)),this.valpha],A)},PP[A]=function(...K){let Y=K[0];if(typeof Y==="number")Y=xv8(K,q);return new PP(Y,A)}}function qn9(A,q){return Number(A.toFixed(q))}function Kn9(A){return function(q){return qn9(q,A)}}function lj(A,q,K){A=Array.isArray(A)?A:[A];for(let Y of A)(bv8[Y]||=[])[q]=K;return A=A[0],function(Y){let z;if(Y!==void 0){if(K)Y=K(Y);return z=this[A](),z.color[q]=Y,z}if(z=this[A]().color[q],K)z=K(z);return z}}function tD(A){return function(q){return Math.max(0,Math.min(A,q))}}function Yn9(A){return Array.isArray(A)?A:[A]}function xv8(A,q){for(let K=0;K{v54.exports=N54().default});var R54=C((Jz_,y54)=>{/*! Copyright 2013 Lovell Fuller and others. SPDX-License-Identifier: Apache-2.0 */var wn9=k54(),el=XF(),E54={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};function _n9(A){return this._setBackgroundColourOption("tint",A),this}function $n9(A){return this.options.greyscale=el.bool(A)?A:!0,this}function On9(A){return this.greyscale(A)}function Hn9(A){if(!el.string(A))throw el.invalidParameterError("colourspace","string",A);return this.options.colourspacePipeline=A,this}function jn9(A){return this.pipelineColourspace(A)}function Jn9(A){if(!el.string(A))throw el.invalidParameterError("colourspace","string",A);return this.options.colourspace=A,this}function Mn9(A){return this.toColourspace(A)}function L54(A){if(el.object(A)||el.string(A)&&A.length>=3&&A.length<=200){let q=wn9(A);return[q.red(),q.green(),q.blue(),Math.round(q.alpha()*255)]}else throw el.invalidParameterError("background","object or string",A)}function Dn9(A,q){if(el.defined(q))this.options[A]=L54(q)}y54.exports=(A)=>{Object.assign(A.prototype,{tint:_n9,greyscale:$n9,grayscale:On9,pipelineColourspace:Hn9,pipelineColorspace:jn9,toColourspace:Jn9,toColorspace:Mn9,_getBackgroundColourOption:L54,_setBackgroundColourOption:Dn9}),A.colourspace=E54,A.colorspace=E54}});var C54=C((Mz_,S54)=>{/*! Copyright 2013 Lovell Fuller and others. SPDX-License-Identifier: Apache-2.0 */var TF=XF(),Xn9={and:"and",or:"or",eor:"eor"};function Pn9(){return this.options.removeAlpha=!0,this}function Wn9(A){if(TF.defined(A))if(TF.number(A)&&TF.inRange(A,0,1))this.options.ensureAlpha=A;else throw TF.invalidParameterError("alpha","number between 0 and 1",A);else this.options.ensureAlpha=1;return this}function Zn9(A){let q={red:0,green:1,blue:2,alpha:3};if(Object.keys(q).includes(A))A=q[A];if(TF.integer(A)&&TF.inRange(A,0,4))this.options.extractChannel=A;else throw TF.invalidParameterError("channel","integer or one of: red, green, blue, alpha",A);return this}function Gn9(A,q){if(Array.isArray(A))A.forEach(function(K){this.options.joinChannelIn.push(this._createInputDescriptor(K,q))},this);else this.options.joinChannelIn.push(this._createInputDescriptor(A,q));return this}function fn9(A){if(TF.string(A)&&TF.inArray(A,["and","or","eor"]))this.options.bandBoolOp=A;else throw TF.invalidParameterError("boolOp","one of: and, or, eor",A);return this}S54.exports=(A)=>{Object.assign(A.prototype,{removeAlpha:Pn9,ensureAlpha:Wn9,extractChannel:Zn9,joinChannel:Gn9,bandbool:fn9}),A.bool=Xn9}});var u54=C((Dz_,x54)=>{/*! Copyright 2013 Lovell Fuller and others. SPDX-License-Identifier: Apache-2.0 */var Bv8=g6("node:path"),f1=XF(),CG6=Cp6(),h54=new Map([["heic","heif"],["heif","heif"],["avif","avif"],["jpeg","jpeg"],["jpg","jpeg"],["jpe","jpeg"],["tile","tile"],["dz","tile"],["png","png"],["raw","raw"],["tiff","tiff"],["tif","tiff"],["webp","webp"],["gif","gif"],["jp2","jp2"],["jpx","jp2"],["j2k","jp2"],["j2c","jp2"],["jxl","jxl"]]),Tn9=/\.(jp[2x]|j2[kc])$/i,I54=()=>Error("JP2 output requires libvips with support for OpenJPEG"),b54=(A)=>1<<31-Math.clz32(Math.ceil(Math.log2(A)));function Vn9(A,q){let K;if(!f1.string(A))K=Error("Missing output file path");else if(f1.string(this.options.input.file)&&Bv8.resolve(this.options.input.file)===Bv8.resolve(A))K=Error("Cannot use same file for input and output");else if(Tn9.test(Bv8.extname(A))&&!this.constructor.format.jp2k.output.file)K=I54();if(K)if(f1.fn(q))q(K);else return Promise.reject(K);else{this.options.fileOut=A;let Y=Error();return this._pipeline(q,Y)}return this}function Nn9(A,q){if(f1.object(A))this._setBooleanOption("resolveWithObject",A.resolveWithObject);else if(this.options.resolveWithObject)this.options.resolveWithObject=!1;this.options.fileOut="";let K=Error();return this._pipeline(f1.fn(A)?A:q,K)}function vn9(){return this.options.keepMetadata|=1,this}function kn9(A){if(f1.object(A))for(let[q,K]of Object.entries(A))if(f1.object(K))for(let[Y,z]of Object.entries(K))if(f1.string(z))this.options.withExif[`exif-${q.toLowerCase()}-${Y}`]=z;else throw f1.invalidParameterError(`${q}.${Y}`,"string",z);else throw f1.invalidParameterError(q,"object",K);else throw f1.invalidParameterError("exif","object",A);return this.options.withExifMerge=!1,this.keepExif()}function En9(A){return this.withExif(A),this.options.withExifMerge=!0,this}function Ln9(){return this.options.keepMetadata|=8,this}function yn9(A,q){if(f1.string(A))this.options.withIccProfile=A;else throw f1.invalidParameterError("icc","string",A);if(this.keepIccProfile(),f1.object(q)){if(f1.defined(q.attach))if(f1.bool(q.attach)){if(!q.attach)this.options.keepMetadata&=-9}else throw f1.invalidParameterError("attach","boolean",q.attach)}return this}function Rn9(){return this.options.keepMetadata|=2,this}function Sn9(A){if(f1.string(A)&&A.length>0)this.options.withXmp=A,this.options.keepMetadata|=2;else throw f1.invalidParameterError("xmp","non-empty string",A);return this}function Cn9(){return this.options.keepMetadata=31,this}function hn9(A){if(this.keepMetadata(),this.withIccProfile("srgb"),f1.object(A)){if(f1.defined(A.orientation))if(f1.integer(A.orientation)&&f1.inRange(A.orientation,1,8))this.options.withMetadataOrientation=A.orientation;else throw f1.invalidParameterError("orientation","integer between 1 and 8",A.orientation);if(f1.defined(A.density))if(f1.number(A.density)&&A.density>0)this.options.withMetadataDensity=A.density;else throw f1.invalidParameterError("density","positive number",A.density);if(f1.defined(A.icc))this.withIccProfile(A.icc);if(f1.defined(A.exif))this.withExifMerge(A.exif)}return this}function In9(A,q){let K=h54.get((f1.object(A)&&f1.string(A.id)?A.id:A).toLowerCase());if(!K)throw f1.invalidParameterError("format",`one of: ${[...h54.keys()].join(", ")}`,A);return this[K](q)}function bn9(A){if(f1.object(A)){if(f1.defined(A.quality))if(f1.integer(A.quality)&&f1.inRange(A.quality,1,100))this.options.jpegQuality=A.quality;else throw f1.invalidParameterError("quality","integer between 1 and 100",A.quality);if(f1.defined(A.progressive))this._setBooleanOption("jpegProgressive",A.progressive);if(f1.defined(A.chromaSubsampling))if(f1.string(A.chromaSubsampling)&&f1.inArray(A.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jpegChromaSubsampling=A.chromaSubsampling;else throw f1.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",A.chromaSubsampling);let q=f1.bool(A.optimizeCoding)?A.optimizeCoding:A.optimiseCoding;if(f1.defined(q))this._setBooleanOption("jpegOptimiseCoding",q);if(f1.defined(A.mozjpeg))if(f1.bool(A.mozjpeg)){if(A.mozjpeg)this.options.jpegTrellisQuantisation=!0,this.options.jpegOvershootDeringing=!0,this.options.jpegOptimiseScans=!0,this.options.jpegProgressive=!0,this.options.jpegQuantisationTable=3}else throw f1.invalidParameterError("mozjpeg","boolean",A.mozjpeg);let K=f1.bool(A.trellisQuantization)?A.trellisQuantization:A.trellisQuantisation;if(f1.defined(K))this._setBooleanOption("jpegTrellisQuantisation",K);if(f1.defined(A.overshootDeringing))this._setBooleanOption("jpegOvershootDeringing",A.overshootDeringing);let Y=f1.bool(A.optimizeScans)?A.optimizeScans:A.optimiseScans;if(f1.defined(Y)){if(this._setBooleanOption("jpegOptimiseScans",Y),Y)this.options.jpegProgressive=!0}let z=f1.number(A.quantizationTable)?A.quantizationTable:A.quantisationTable;if(f1.defined(z))if(f1.integer(z)&&f1.inRange(z,0,8))this.options.jpegQuantisationTable=z;else throw f1.invalidParameterError("quantisationTable","integer between 0 and 8",z)}return this._updateFormatOut("jpeg",A)}function xn9(A){if(f1.object(A)){if(f1.defined(A.progressive))this._setBooleanOption("pngProgressive",A.progressive);if(f1.defined(A.compressionLevel))if(f1.integer(A.compressionLevel)&&f1.inRange(A.compressionLevel,0,9))this.options.pngCompressionLevel=A.compressionLevel;else throw f1.invalidParameterError("compressionLevel","integer between 0 and 9",A.compressionLevel);if(f1.defined(A.adaptiveFiltering))this._setBooleanOption("pngAdaptiveFiltering",A.adaptiveFiltering);let q=A.colours||A.colors;if(f1.defined(q))if(f1.integer(q)&&f1.inRange(q,2,256))this.options.pngBitdepth=b54(q);else throw f1.invalidParameterError("colours","integer between 2 and 256",q);if(f1.defined(A.palette))this._setBooleanOption("pngPalette",A.palette);else if([A.quality,A.effort,A.colours,A.colors,A.dither].some(f1.defined))this._setBooleanOption("pngPalette",!0);if(this.options.pngPalette){if(f1.defined(A.quality))if(f1.integer(A.quality)&&f1.inRange(A.quality,0,100))this.options.pngQuality=A.quality;else throw f1.invalidParameterError("quality","integer between 0 and 100",A.quality);if(f1.defined(A.effort))if(f1.integer(A.effort)&&f1.inRange(A.effort,1,10))this.options.pngEffort=A.effort;else throw f1.invalidParameterError("effort","integer between 1 and 10",A.effort);if(f1.defined(A.dither))if(f1.number(A.dither)&&f1.inRange(A.dither,0,1))this.options.pngDither=A.dither;else throw f1.invalidParameterError("dither","number between 0.0 and 1.0",A.dither)}}return this._updateFormatOut("png",A)}function un9(A){if(f1.object(A)){if(f1.defined(A.quality))if(f1.integer(A.quality)&&f1.inRange(A.quality,1,100))this.options.webpQuality=A.quality;else throw f1.invalidParameterError("quality","integer between 1 and 100",A.quality);if(f1.defined(A.alphaQuality))if(f1.integer(A.alphaQuality)&&f1.inRange(A.alphaQuality,0,100))this.options.webpAlphaQuality=A.alphaQuality;else throw f1.invalidParameterError("alphaQuality","integer between 0 and 100",A.alphaQuality);if(f1.defined(A.lossless))this._setBooleanOption("webpLossless",A.lossless);if(f1.defined(A.nearLossless))this._setBooleanOption("webpNearLossless",A.nearLossless);if(f1.defined(A.smartSubsample))this._setBooleanOption("webpSmartSubsample",A.smartSubsample);if(f1.defined(A.smartDeblock))this._setBooleanOption("webpSmartDeblock",A.smartDeblock);if(f1.defined(A.preset))if(f1.string(A.preset)&&f1.inArray(A.preset,["default","photo","picture","drawing","icon","text"]))this.options.webpPreset=A.preset;else throw f1.invalidParameterError("preset","one of: default, photo, picture, drawing, icon, text",A.preset);if(f1.defined(A.effort))if(f1.integer(A.effort)&&f1.inRange(A.effort,0,6))this.options.webpEffort=A.effort;else throw f1.invalidParameterError("effort","integer between 0 and 6",A.effort);if(f1.defined(A.minSize))this._setBooleanOption("webpMinSize",A.minSize);if(f1.defined(A.mixed))this._setBooleanOption("webpMixed",A.mixed)}return mv8(A,this.options),this._updateFormatOut("webp",A)}function Bn9(A){if(f1.object(A)){if(f1.defined(A.reuse))this._setBooleanOption("gifReuse",A.reuse);if(f1.defined(A.progressive))this._setBooleanOption("gifProgressive",A.progressive);let q=A.colours||A.colors;if(f1.defined(q))if(f1.integer(q)&&f1.inRange(q,2,256))this.options.gifBitdepth=b54(q);else throw f1.invalidParameterError("colours","integer between 2 and 256",q);if(f1.defined(A.effort))if(f1.number(A.effort)&&f1.inRange(A.effort,1,10))this.options.gifEffort=A.effort;else throw f1.invalidParameterError("effort","integer between 1 and 10",A.effort);if(f1.defined(A.dither))if(f1.number(A.dither)&&f1.inRange(A.dither,0,1))this.options.gifDither=A.dither;else throw f1.invalidParameterError("dither","number between 0.0 and 1.0",A.dither);if(f1.defined(A.interFrameMaxError))if(f1.number(A.interFrameMaxError)&&f1.inRange(A.interFrameMaxError,0,32))this.options.gifInterFrameMaxError=A.interFrameMaxError;else throw f1.invalidParameterError("interFrameMaxError","number between 0.0 and 32.0",A.interFrameMaxError);if(f1.defined(A.interPaletteMaxError))if(f1.number(A.interPaletteMaxError)&&f1.inRange(A.interPaletteMaxError,0,256))this.options.gifInterPaletteMaxError=A.interPaletteMaxError;else throw f1.invalidParameterError("interPaletteMaxError","number between 0.0 and 256.0",A.interPaletteMaxError);if(f1.defined(A.keepDuplicateFrames))if(f1.bool(A.keepDuplicateFrames))this._setBooleanOption("gifKeepDuplicateFrames",A.keepDuplicateFrames);else throw f1.invalidParameterError("keepDuplicateFrames","boolean",A.keepDuplicateFrames)}return mv8(A,this.options),this._updateFormatOut("gif",A)}function mn9(A){if(!this.constructor.format.jp2k.output.buffer)throw I54();if(f1.object(A)){if(f1.defined(A.quality))if(f1.integer(A.quality)&&f1.inRange(A.quality,1,100))this.options.jp2Quality=A.quality;else throw f1.invalidParameterError("quality","integer between 1 and 100",A.quality);if(f1.defined(A.lossless))if(f1.bool(A.lossless))this.options.jp2Lossless=A.lossless;else throw f1.invalidParameterError("lossless","boolean",A.lossless);if(f1.defined(A.tileWidth))if(f1.integer(A.tileWidth)&&f1.inRange(A.tileWidth,1,32768))this.options.jp2TileWidth=A.tileWidth;else throw f1.invalidParameterError("tileWidth","integer between 1 and 32768",A.tileWidth);if(f1.defined(A.tileHeight))if(f1.integer(A.tileHeight)&&f1.inRange(A.tileHeight,1,32768))this.options.jp2TileHeight=A.tileHeight;else throw f1.invalidParameterError("tileHeight","integer between 1 and 32768",A.tileHeight);if(f1.defined(A.chromaSubsampling))if(f1.string(A.chromaSubsampling)&&f1.inArray(A.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jp2ChromaSubsampling=A.chromaSubsampling;else throw f1.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",A.chromaSubsampling)}return this._updateFormatOut("jp2",A)}function mv8(A,q){if(f1.object(A)&&f1.defined(A.loop))if(f1.integer(A.loop)&&f1.inRange(A.loop,0,65535))q.loop=A.loop;else throw f1.invalidParameterError("loop","integer between 0 and 65535",A.loop);if(f1.object(A)&&f1.defined(A.delay))if(f1.integer(A.delay)&&f1.inRange(A.delay,0,65535))q.delay=[A.delay];else if(Array.isArray(A.delay)&&A.delay.every(f1.integer)&&A.delay.every((K)=>f1.inRange(K,0,65535)))q.delay=A.delay;else throw f1.invalidParameterError("delay","integer or an array of integers between 0 and 65535",A.delay)}function gn9(A){if(f1.object(A)){if(f1.defined(A.quality))if(f1.integer(A.quality)&&f1.inRange(A.quality,1,100))this.options.tiffQuality=A.quality;else throw f1.invalidParameterError("quality","integer between 1 and 100",A.quality);if(f1.defined(A.bitdepth))if(f1.integer(A.bitdepth)&&f1.inArray(A.bitdepth,[1,2,4,8]))this.options.tiffBitdepth=A.bitdepth;else throw f1.invalidParameterError("bitdepth","1, 2, 4 or 8",A.bitdepth);if(f1.defined(A.tile))this._setBooleanOption("tiffTile",A.tile);if(f1.defined(A.tileWidth))if(f1.integer(A.tileWidth)&&A.tileWidth>0)this.options.tiffTileWidth=A.tileWidth;else throw f1.invalidParameterError("tileWidth","integer greater than zero",A.tileWidth);if(f1.defined(A.tileHeight))if(f1.integer(A.tileHeight)&&A.tileHeight>0)this.options.tiffTileHeight=A.tileHeight;else throw f1.invalidParameterError("tileHeight","integer greater than zero",A.tileHeight);if(f1.defined(A.miniswhite))this._setBooleanOption("tiffMiniswhite",A.miniswhite);if(f1.defined(A.pyramid))this._setBooleanOption("tiffPyramid",A.pyramid);if(f1.defined(A.xres))if(f1.number(A.xres)&&A.xres>0)this.options.tiffXres=A.xres;else throw f1.invalidParameterError("xres","number greater than zero",A.xres);if(f1.defined(A.yres))if(f1.number(A.yres)&&A.yres>0)this.options.tiffYres=A.yres;else throw f1.invalidParameterError("yres","number greater than zero",A.yres);if(f1.defined(A.compression))if(f1.string(A.compression)&&f1.inArray(A.compression,["none","jpeg","deflate","packbits","ccittfax4","lzw","webp","zstd","jp2k"]))this.options.tiffCompression=A.compression;else throw f1.invalidParameterError("compression","one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k",A.compression);if(f1.defined(A.bigtiff))this._setBooleanOption("tiffBigtiff",A.bigtiff);if(f1.defined(A.predictor))if(f1.string(A.predictor)&&f1.inArray(A.predictor,["none","horizontal","float"]))this.options.tiffPredictor=A.predictor;else throw f1.invalidParameterError("predictor","one of: none, horizontal, float",A.predictor);if(f1.defined(A.resolutionUnit))if(f1.string(A.resolutionUnit)&&f1.inArray(A.resolutionUnit,["inch","cm"]))this.options.tiffResolutionUnit=A.resolutionUnit;else throw f1.invalidParameterError("resolutionUnit","one of: inch, cm",A.resolutionUnit)}return this._updateFormatOut("tiff",A)}function Fn9(A){return this.heif({...A,compression:"av1"})}function Qn9(A){if(f1.object(A)){if(f1.string(A.compression)&&f1.inArray(A.compression,["av1","hevc"]))this.options.heifCompression=A.compression;else throw f1.invalidParameterError("compression","one of: av1, hevc",A.compression);if(f1.defined(A.quality))if(f1.integer(A.quality)&&f1.inRange(A.quality,1,100))this.options.heifQuality=A.quality;else throw f1.invalidParameterError("quality","integer between 1 and 100",A.quality);if(f1.defined(A.lossless))if(f1.bool(A.lossless))this.options.heifLossless=A.lossless;else throw f1.invalidParameterError("lossless","boolean",A.lossless);if(f1.defined(A.effort))if(f1.integer(A.effort)&&f1.inRange(A.effort,0,9))this.options.heifEffort=A.effort;else throw f1.invalidParameterError("effort","integer between 0 and 9",A.effort);if(f1.defined(A.chromaSubsampling))if(f1.string(A.chromaSubsampling)&&f1.inArray(A.chromaSubsampling,["4:2:0","4:4:4"]))this.options.heifChromaSubsampling=A.chromaSubsampling;else throw f1.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",A.chromaSubsampling);if(f1.defined(A.bitdepth))if(f1.integer(A.bitdepth)&&f1.inArray(A.bitdepth,[8,10,12])){if(A.bitdepth!==8&&this.constructor.versions.heif)throw f1.invalidParameterError("bitdepth when using prebuilt binaries",8,A.bitdepth);this.options.heifBitdepth=A.bitdepth}else throw f1.invalidParameterError("bitdepth","8, 10 or 12",A.bitdepth)}else throw f1.invalidParameterError("options","Object",A);return this._updateFormatOut("heif",A)}function Un9(A){if(f1.object(A)){if(f1.defined(A.quality))if(f1.integer(A.quality)&&f1.inRange(A.quality,1,100))this.options.jxlDistance=A.quality>=30?0.1+(100-A.quality)*0.09:0.017666666666666667*A.quality*A.quality-1.15*A.quality+25;else throw f1.invalidParameterError("quality","integer between 1 and 100",A.quality);else if(f1.defined(A.distance))if(f1.number(A.distance)&&f1.inRange(A.distance,0,15))this.options.jxlDistance=A.distance;else throw f1.invalidParameterError("distance","number between 0.0 and 15.0",A.distance);if(f1.defined(A.decodingTier))if(f1.integer(A.decodingTier)&&f1.inRange(A.decodingTier,0,4))this.options.jxlDecodingTier=A.decodingTier;else throw f1.invalidParameterError("decodingTier","integer between 0 and 4",A.decodingTier);if(f1.defined(A.lossless))if(f1.bool(A.lossless))this.options.jxlLossless=A.lossless;else throw f1.invalidParameterError("lossless","boolean",A.lossless);if(f1.defined(A.effort))if(f1.integer(A.effort)&&f1.inRange(A.effort,1,9))this.options.jxlEffort=A.effort;else throw f1.invalidParameterError("effort","integer between 1 and 9",A.effort)}return mv8(A,this.options),this._updateFormatOut("jxl",A)}function pn9(A){if(f1.object(A)){if(f1.defined(A.depth))if(f1.string(A.depth)&&f1.inArray(A.depth,["char","uchar","short","ushort","int","uint","float","complex","double","dpcomplex"]))this.options.rawDepth=A.depth;else throw f1.invalidParameterError("depth","one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex",A.depth)}return this._updateFormatOut("raw")}function dn9(A){if(f1.object(A)){if(f1.defined(A.size))if(f1.integer(A.size)&&f1.inRange(A.size,1,8192))this.options.tileSize=A.size;else throw f1.invalidParameterError("size","integer between 1 and 8192",A.size);if(f1.defined(A.overlap))if(f1.integer(A.overlap)&&f1.inRange(A.overlap,0,8192)){if(A.overlap>this.options.tileSize)throw f1.invalidParameterError("overlap",`<= size (${this.options.tileSize})`,A.overlap);this.options.tileOverlap=A.overlap}else throw f1.invalidParameterError("overlap","integer between 0 and 8192",A.overlap);if(f1.defined(A.container))if(f1.string(A.container)&&f1.inArray(A.container,["fs","zip"]))this.options.tileContainer=A.container;else throw f1.invalidParameterError("container","one of: fs, zip",A.container);if(f1.defined(A.layout))if(f1.string(A.layout)&&f1.inArray(A.layout,["dz","google","iiif","iiif3","zoomify"]))this.options.tileLayout=A.layout;else throw f1.invalidParameterError("layout","one of: dz, google, iiif, iiif3, zoomify",A.layout);if(f1.defined(A.angle))if(f1.integer(A.angle)&&!(A.angle%90))this.options.tileAngle=A.angle;else throw f1.invalidParameterError("angle","positive/negative multiple of 90",A.angle);if(this._setBackgroundColourOption("tileBackground",A.background),f1.defined(A.depth))if(f1.string(A.depth)&&f1.inArray(A.depth,["onepixel","onetile","one"]))this.options.tileDepth=A.depth;else throw f1.invalidParameterError("depth","one of: onepixel, onetile, one",A.depth);if(f1.defined(A.skipBlanks))if(f1.integer(A.skipBlanks)&&f1.inRange(A.skipBlanks,-1,65535))this.options.tileSkipBlanks=A.skipBlanks;else throw f1.invalidParameterError("skipBlanks","integer between -1 and 255/65535",A.skipBlanks);else if(f1.defined(A.layout)&&A.layout==="google")this.options.tileSkipBlanks=5;let q=f1.bool(A.center)?A.center:A.centre;if(f1.defined(q))this._setBooleanOption("tileCentre",q);if(f1.defined(A.id))if(f1.string(A.id))this.options.tileId=A.id;else throw f1.invalidParameterError("id","string",A.id);if(f1.defined(A.basename))if(f1.string(A.basename))this.options.tileBasename=A.basename;else throw f1.invalidParameterError("basename","string",A.basename)}if(f1.inArray(this.options.formatOut,["jpeg","png","webp"]))this.options.tileFormat=this.options.formatOut;else if(this.options.formatOut!=="input")throw f1.invalidParameterError("format","one of: jpeg, png, webp",this.options.formatOut);return this._updateFormatOut("dz")}function cn9(A){if(!f1.plainObject(A))throw f1.invalidParameterError("options","object",A);if(f1.integer(A.seconds)&&f1.inRange(A.seconds,0,3600))this.options.timeoutSeconds=A.seconds;else throw f1.invalidParameterError("seconds","integer between 0 and 3600",A.seconds);return this}function ln9(A,q){if(!(f1.object(q)&&q.force===!1))this.options.formatOut=A;return this}function in9(A,q){if(f1.bool(q))this.options[A]=q;else throw f1.invalidParameterError(A,"boolean",q)}function nn9(){if(!this.options.streamOut){this.options.streamOut=!0;let A=Error();this._pipeline(void 0,A)}}function rn9(A,q){if(typeof A==="function"){if(this._isStreamInput())this.on("finish",()=>{this._flattenBufferIn(),CG6.pipeline(this.options,(K,Y,z)=>{if(K)A(f1.nativeError(K,q));else A(null,Y,z)})});else CG6.pipeline(this.options,(K,Y,z)=>{if(K)A(f1.nativeError(K,q));else A(null,Y,z)});return this}else if(this.options.streamOut){if(this._isStreamInput()){if(this.once("finish",()=>{this._flattenBufferIn(),CG6.pipeline(this.options,(K,Y,z)=>{if(K)this.emit("error",f1.nativeError(K,q));else this.emit("info",z),this.push(Y);this.push(null),this.on("end",()=>this.emit("close"))})}),this.streamInFinished)this.emit("finish")}else CG6.pipeline(this.options,(K,Y,z)=>{if(K)this.emit("error",f1.nativeError(K,q));else this.emit("info",z),this.push(Y);this.push(null),this.on("end",()=>this.emit("close"))});return this}else if(this._isStreamInput())return new Promise((K,Y)=>{this.once("finish",()=>{this._flattenBufferIn(),CG6.pipeline(this.options,(z,w,_)=>{if(z)Y(f1.nativeError(z,q));else if(this.options.resolveWithObject)K({data:w,info:_});else K(w)})})});else return new Promise((K,Y)=>{CG6.pipeline(this.options,(z,w,_)=>{if(z)Y(f1.nativeError(z,q));else if(this.options.resolveWithObject)K({data:w,info:_});else K(w)})})}x54.exports=(A)=>{Object.assign(A.prototype,{toFile:Vn9,toBuffer:Nn9,keepExif:vn9,withExif:kn9,withExifMerge:En9,keepIccProfile:Ln9,withIccProfile:yn9,keepXmp:Rn9,withXmp:Sn9,keepMetadata:Cn9,withMetadata:hn9,toFormat:In9,jpeg:bn9,jp2:mn9,png:xn9,webp:un9,tiff:gn9,avif:Fn9,heif:Qn9,jxl:Un9,gif:Bn9,raw:pn9,tile:dn9,timeout:cn9,_updateFormatOut:ln9,_setBooleanOption:in9,_read:nn9,_pipeline:rn9})}});var F54=C((Xz_,g54)=>{/*! Copyright 2013 Lovell Fuller and others. SPDX-License-Identifier: Apache-2.0 */var on9=g6("node:events"),qW1=U01(),bS=XF(),{runtimePlatformArch:an9}=Lv8(),vT=Cp6(),B54=an9(),gv8=vT.libvipsVersion(),I66=vT.format();I66.heif.output.alias=["avif","heic"];I66.jpeg.output.alias=["jpe","jpg"];I66.tiff.output.alias=["tif"];I66.jp2k.output.alias=["j2c","j2k","jp2","jpx"];var sn9={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"},hG6={vips:gv8.semver};if(!gv8.isGlobal)if(!gv8.isWasm)try{hG6=g6(`@img/sharp-${B54}/versions`)}catch(A){try{hG6=g6(`@img/sharp-libvips-${B54}/versions`)}catch(q){}}else try{hG6=(()=>{throw new Error("Cannot require module "+"@img/sharp-wasm32/versions");})()}catch(A){}hG6.sharp=kv8().version;if(hG6.heif&&I66.heif)I66.heif.input.fileSuffix=[".avif"],I66.heif.output.alias=["avif"];function m54(A){if(bS.bool(A))if(A)return vT.cache(50,20,100);else return vT.cache(0,0,0);else if(bS.object(A))return vT.cache(A.memory,A.files,A.items);else return vT.cache()}m54(!0);function tn9(A){return vT.concurrency(bS.integer(A)?A:null)}if(qW1.familySync()===qW1.GLIBC&&!vT._isUsingJemalloc())vT.concurrency(1);else if(qW1.familySync()===qW1.MUSL&&vT.concurrency()===1024)vT.concurrency(g6("node:os").availableParallelism());var en9=new on9.EventEmitter;function Ar9(){return vT.counters()}function qr9(A){return vT.simd(bS.bool(A)?A:null)}function Kr9(A){if(bS.object(A))if(Array.isArray(A.operation)&&A.operation.every(bS.string))vT.block(A.operation,!0);else throw bS.invalidParameterError("operation","Array",A.operation);else throw bS.invalidParameterError("options","object",A)}function Yr9(A){if(bS.object(A))if(Array.isArray(A.operation)&&A.operation.every(bS.string))vT.block(A.operation,!1);else throw bS.invalidParameterError("operation","Array",A.operation);else throw bS.invalidParameterError("options","object",A)}g54.exports=(A)=>{A.cache=m54,A.concurrency=tn9,A.counters=Ar9,A.simd=qr9,A.format=I66,A.interpolators=sn9,A.versions=hG6,A.queue=en9,A.block=Kr9,A.unblock=Yr9}});var Fv8=C((Wz_,Q54)=>{/*! Copyright 2013 Lovell Fuller and others. SPDX-License-Identifier: Apache-2.0 */var Ai=A54();Y54()(Ai);H54()(Ai);J54()(Ai);W54()(Ai);R54()(Ai);C54()(Ai);u54()(Ai);F54()(Ai);Q54.exports=Ai});async function IG6(){if(KW1)return KW1.default;if(ZY())try{let K=await Promise.resolve().then(() => (Dv8(),NK4)),Y=K.sharp||K.default;return KW1={default:Y},Y}catch{console.warn("Native image processor not available, falling back to sharp")}let A=await Promise.resolve().then(() => e(Fv8(),1)),q=A?.default||A;return KW1={default:q},q}var KW1=null;var Qv8=()=>{};function d54(A){if(A instanceof Error){let K=A;if(K.code==="MODULE_NOT_FOUND"||K.code==="ERR_MODULE_NOT_FOUND"||K.code==="ERR_DLOPEN_FAILED")return U54;if(K.code==="EACCES"||K.code==="EPERM")return Hr9;if(K.code==="ENOMEM")return p54}let q=D1(A);if(q.includes("Native image processor module not available"))return U54;if(q.includes("unsupported image format")||q.includes("Input buffer")||q.includes("Input file is missing")||q.includes("Input file has corrupt header")||q.includes("corrupt header")||q.includes("corrupt image")||q.includes("premature end")||q.includes("zlib: data error")||q.includes("zero width")||q.includes("zero height"))return zr9;if(q.includes("pixel limit")||q.includes("too many pixels")||q.includes("exceeds pixel")||q.includes("image dimensions"))return _r9;if(q.includes("out of memory")||q.includes("Cannot allocate")||q.includes("memory allocation"))return p54;if(q.includes("timeout")||q.includes("timed out"))return $r9;if(q.includes("Vips"))return Or9;return wr9}function c54(A){let q=5381;for(let K=0;K>>0}async function VF(A,q,K){try{let Y=await IG6(),w=await Y(A).metadata(),_=w.format??K,$=_==="jpg"?"jpeg":_;if(!w.width||!w.height){if(q>_x)return{buffer:await Y(A).jpeg({quality:80}).toBuffer(),mediaType:"jpeg"};return{buffer:A,mediaType:$}}let{width:O,height:H}=w,j=O,J=H;if(q<=_x&&j<=y66&&J<=R66)return{buffer:A,mediaType:$,dimensions:{originalWidth:O,originalHeight:H,displayWidth:j,displayHeight:J}};let M=j>y66||J>R66,D=$==="png";if(!M&&q>_x){if(D){let P=await Y(A).png({compressionLevel:9,palette:!0}).toBuffer();if(P.length<=_x)return{buffer:P,mediaType:"png",dimensions:{originalWidth:O,originalHeight:H,displayWidth:j,displayHeight:J}}}for(let P of[80,60,40,20]){let W=await Y(A).jpeg({quality:P}).toBuffer();if(W.length<=_x)return{buffer:W,mediaType:"jpeg",dimensions:{originalWidth:O,originalHeight:H,displayWidth:j,displayHeight:J}}}}if(j>y66)J=Math.round(J*y66/j),j=y66;if(J>R66)j=Math.round(j*R66/J),J=R66;L(`Resizing to ${j}x${J}`);let X=await Y(A).resize(j,J,{fit:"inside",withoutEnlargement:!0}).toBuffer();if(X.length>_x){if(D){let G=await Y(A).resize(j,J,{fit:"inside",withoutEnlargement:!0}).png({compressionLevel:9,palette:!0}).toBuffer();if(G.length<=_x)return{buffer:G,mediaType:"png",dimensions:{originalWidth:O,originalHeight:H,displayWidth:j,displayHeight:J}}}for(let G of[80,60,40,20]){let f=await Y(A).resize(j,J,{fit:"inside",withoutEnlargement:!0}).jpeg({quality:G}).toBuffer();if(f.length<=_x)return{buffer:f,mediaType:"jpeg",dimensions:{originalWidth:O,originalHeight:H,displayWidth:j,displayHeight:J}}}let P=Math.min(j,1000),W=Math.round(J*P/Math.max(j,1));L("Still too large, compressing with JPEG");let Z=await Y(A).resize(P,W,{fit:"inside",withoutEnlargement:!0}).jpeg({quality:20}).toBuffer();return L(`JPEG compressed buffer size: ${Z.length}`),{buffer:Z,mediaType:"jpeg",dimensions:{originalWidth:O,originalHeight:H,displayWidth:P,displayHeight:W}}}return{buffer:X,mediaType:$,dimensions:{originalWidth:O,originalHeight:H,displayWidth:j,displayHeight:J}}}catch(Y){$6(Y);let z=d54(Y),w=D1(Y);c("tengu_image_resize_failed",{original_size_bytes:q,error_type:z,error_message_hash:c54(w)});let $=Ip6(A).slice(6),O=Math.ceil(q*4/3),H=A.length>=24&&A[0]===137&&A[1]===80&&A[2]===78&&A[3]===71&&(A.readUInt32BE(16)>y66||A.readUInt32BE(20)>R66);if(O<=ZG6&&!H)return c("tengu_image_resize_fallback",{original_size_bytes:q,base64_size_bytes:O,error_type:z}),{buffer:A,mediaType:$};throw new qi(H?`Unable to resize image — dimensions exceed the ${y66}x${R66}px limit and image processing failed. Please resize the image to reduce its pixel dimensions.`:`Unable to resize image (${RK(q)} raw, ${RK(O)} base64). The image exceeds the 5MB API limit and compression failed. Please resize the image manually or use a smaller image.`)}}async function Ki(A){if(A.source.type!=="base64")return{block:A};let q=Buffer.from(A.source.data,"base64"),K=q.length,z=A.source.media_type?.split("/")[1]||"png",w=await VF(q,K,z);return{block:{type:"image",source:{type:"base64",media_type:`image/${w.mediaType}`,data:w.buffer.toString("base64")}},dimensions:w.dimensions}}async function YW1(A,q=_x,K){let Y=K?.split("/")[1]||"jpeg",z=Y==="jpg"?"jpeg":Y;try{let w=await IG6(),_=await w(A).metadata(),$=_.format||z,O=A.length,H={imageBuffer:A,metadata:_,format:$,maxBytes:q,originalSize:O};if(O<=q)return hp6(A,$,O);let j=await jr9(H,w);if(j)return j;if($==="png"){let M=await Mr9(H,w);if(M)return M}let J=await Dr9(H,50,w);if(J)return J;return await Xr9(H,w)}catch(w){$6(w);let _=d54(w),$=D1(w);if(c("tengu_image_compress_failed",{original_size_bytes:A.length,max_bytes:q,error_type:_,error_message_hash:c54($)}),A.length<=q){let O=Ip6(A);return{base64:A.toString("base64"),mediaType:O,originalSize:A.length}}throw new qi(`Unable to compress image (${RK(A.length)}) to fit within ${RK(q)}. Please use a smaller image.`)}}async function l54(A,q,K){let Y=Math.floor(q/0.125),z=Math.floor(Y*0.75);return YW1(A,z,K)}async function i54(A,q=_x){if(A.source.type!=="base64")return A;let K=Buffer.from(A.source.data,"base64");if(K.length<=q)return A;let Y=await YW1(K,q);return{type:"image",source:{type:"base64",media_type:Y.mediaType,data:Y.base64}}}function hp6(A,q,K){let Y=q==="jpg"?"jpeg":q;return{base64:A.toString("base64"),mediaType:`image/${Y}`,originalSize:K}}async function jr9(A,q){let K=[1,0.75,0.5,0.25];for(let Y of K){let z=Math.round((A.metadata.width||2000)*Y),w=Math.round((A.metadata.height||2000)*Y),_=q(A.imageBuffer).resize(z,w,{fit:"inside",withoutEnlargement:!0});_=Jr9(_,A.format);let $=await _.toBuffer();if($.length<=A.maxBytes)return hp6($,A.format,A.originalSize)}return null}function Jr9(A,q){switch(q){case"png":return A.png({compressionLevel:9,palette:!0});case"jpeg":case"jpg":return A.jpeg({quality:80});case"webp":return A.webp({quality:80});default:return A}}async function Mr9(A,q){let K=await q(A.imageBuffer).resize(800,800,{fit:"inside",withoutEnlargement:!0}).png({compressionLevel:9,palette:!0,colors:64}).toBuffer();if(K.length<=A.maxBytes)return hp6(K,"png",A.originalSize);return null}async function Dr9(A,q,K){let Y=await K(A.imageBuffer).resize(600,600,{fit:"inside",withoutEnlargement:!0}).jpeg({quality:q}).toBuffer();if(Y.length<=A.maxBytes)return hp6(Y,"jpeg",A.originalSize);return null}async function Xr9(A,q){let K=await q(A.imageBuffer).resize(400,400,{fit:"inside",withoutEnlargement:!0}).jpeg({quality:20}).toBuffer();return hp6(K,"jpeg",A.originalSize)}function Ip6(A){if(A.length<4)return"image/png";if(A[0]===137&&A[1]===80&&A[2]===78&&A[3]===71)return"image/png";if(A[0]===255&&A[1]===216&&A[2]===255)return"image/jpeg";if(A[0]===71&&A[1]===73&&A[2]===70)return"image/gif";if(A[0]===82&&A[1]===73&&A[2]===70&&A[3]===70){if(A.length>=12&&A[8]===87&&A[9]===69&&A[10]===66&&A[11]===80)return"image/webp"}return"image/png"}function Uv8(A){try{let q=Buffer.from(A,"base64");return Ip6(q)}catch{return"image/png"}}function bG6(A,q){let{originalWidth:K,originalHeight:Y,displayWidth:z,displayHeight:w}=A;if(!K||!Y||!z||!w||z<=0||w<=0){if(q)return`[Image source: ${q}]`;return null}let _=K!==z||Y!==w;if(!_&&!q)return null;let $=[];if(q)$.push(`source: ${q}`);if(_){let O=K/z;$.push(`original ${K}x${Y}, displayed at ${z}x${w}. Multiply coordinates by ${O.toFixed(2)} to map to original image.`)}return`[Image: ${$.join(", ")}]`}var U54=1,zr9=2,wr9=3,_r9=4,p54=5,$r9=6,Or9=7,Hr9=8,qi;var xS=k(()=>{x1();G1();p7();B1();Qv8();MA();qi=class qi extends Error{constructor(A){super(A);this.name="ImageResizeError"}}});function r54(A){if(!A.isApiErrorMessage)return!1;let q=A.message.content;if(!Array.isArray(q))return!1;return q.some((K)=>K.type==="text"&&K.text.startsWith(NF))}function dv8(){let A=`max ${PK4} pages, ${RK(GG6)}`;return u7()?`PDF too large (${A}). Try reading the file a different way (e.g., extract text with pdftotext).`:`PDF too large (${A}). Double press esc to go back and try again, or use pdftotext to convert to text first.`}function cv8(){return u7()?"PDF is password protected. Try using a CLI tool to extract or convert the PDF.":"PDF is password protected. Please double press esc to edit your message and try again."}function lv8(){return u7()?"The PDF file was not valid. Try converting it to text first (e.g., pdftotext).":"The PDF file was not valid. Double press esc to go back and try again with a different file."}function zW1(){return u7()?"Image was too large. Try resizing the image or using a different approach.":"Image was too large. Double press esc to go back and try again with a smaller image."}function iv8(){let A=`max ${RK(GG6)}`;return u7()?`Request too large (${A}). Try with a smaller file.`:`Request too large (${A}). Double press esc to go back and try with a smaller file.`}function Wr9(){return u7()?"Your account does not have access to Claude. Please login again or contact your administrator.":OW1}function Zr9(){return u7()?"Your organization does not have access to Claude. Please login again or contact your administrator.":Pr9}function Gr9(A,q,K){try{let Y=-1;for(let $=0;$=500)return"server_error";if(q>=400)return"client_error"}if(A instanceof bZ){if(kp6(A)?.isSSLError)return"ssl_cert_error";return"connection_error"}return"unknown"}function a54(A,q){if(A!=="refusal")return;c("tengu_refusal_api_response",{});let K=u7()?`${wH}: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Try rephrasing the request or attempting a different approach.`:`${wH}: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task.`;return mY({content:K+(q!=="claude-sonnet-4-20250514"?" If you are seeing this refusal repeatedly, try running /model claude-sonnet-4-20250514 to switch models.":""),error:"invalid_request"})}var wH="API Error",NF="Prompt is too long",wW1="Credit balance is too low",_W1="Not logged in · Please run /login",$W1="Invalid API key · Fix external API key",OW1="OAuth token revoked · Please run /login",pv8="Repeated 529 Overloaded errors",BY6="Opus is experiencing high load, please use /model to switch to Sonnet",HW1="Request timed out",Pr9="Your account does not have access to Claude Code. Please run /login.";var vF=k(()=>{rV();bA();SA();Xq();yz();B1();al();vp6();Z8();Q1();p7();DF();m01();xS();O56()});var ev8=C((kr9)=>{kr9.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(kr9.HttpAuthLocation||(kr9.HttpAuthLocation={}));kr9.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(kr9.HttpApiKeyAuthLocation||(kr9.HttpApiKeyAuthLocation={}));kr9.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(kr9.EndpointURLScheme||(kr9.EndpointURLScheme={}));kr9.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(kr9.AlgorithmId||(kr9.AlgorithmId={}));var fr9=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>kr9.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>kr9.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},Tr9=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},Vr9=(A)=>{return fr9(A)},Nr9=(A)=>{return Tr9(A)};kr9.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(kr9.FieldPosition||(kr9.FieldPosition={}));var vr9="__smithy_context";kr9.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(kr9.IniSectionType||(kr9.IniSectionType={}));kr9.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(kr9.RequestHandlerProtocol||(kr9.RequestHandlerProtocol={}));kr9.SMITHY_CONTEXT_KEY=vr9;kr9.getDefaultClientConfiguration=Vr9;kr9.resolveDefaultRuntimeConfig=Nr9});var gY6=C((uG6)=>{var e54=Qm(),zk8=MN(),qk8=ev8(),Rr9=lO(),s54=JN();class A94{config;middlewareStack=e54.constructStack();initConfig;handlers;constructor(A){this.config=A}send(A,q,K){let Y=typeof q!=="function"?q:void 0,z=typeof q==="function"?q:K,w=Y===void 0&&this.config.cacheMiddleware===!0,_;if(w){if(!this.handlers)this.handlers=new WeakMap;let $=this.handlers;if($.has(A.constructor))_=$.get(A.constructor);else _=A.resolveMiddleware(this.middlewareStack,this.config,Y),$.set(A.constructor,_)}else delete this.handlers,_=A.resolveMiddleware(this.middlewareStack,this.config,Y);if(z)_(A).then(($)=>z(null,$.output),($)=>z($)).catch(()=>{});else return _(A).then(($)=>$.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var Ak8="***SensitiveInformation***";function Kk8(A,q){if(q==null)return q;let K=Rr9.NormalizedSchema.of(A);if(K.getMergedTraits().sensitive)return Ak8;if(K.isListSchema()){if(!!K.getValueSchema().getMergedTraits().sensitive)return Ak8}else if(K.isMapSchema()){if(!!K.getKeySchema().getMergedTraits().sensitive||!!K.getValueSchema().getMergedTraits().sensitive)return Ak8}else if(K.isStructSchema()&&typeof q==="object"){let Y=q,z={};for(let[w,_]of K.structIterator())if(Y[w]!=null)z[w]=Kk8(_,Y[w]);return z}return q}class wk8{middlewareStack=e54.constructStack();schema;static classBuilder(){return new q94}resolveMiddlewareWithContext(A,q,K,{middlewareFn:Y,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,smithyContext:O,additionalContext:H,CommandCtor:j}){for(let P of Y.bind(this)(j,A,q,K))this.middlewareStack.use(P);let J=A.concat(this.middlewareStack),{logger:M}=q,D={logger:M,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,[qk8.SMITHY_CONTEXT_KEY]:{commandInstance:this,...O},...H},{requestHandler:X}=q;return J.resolve((P)=>X.handle(P.request,K||{}),D)}}class q94{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(A){this._init=A}ep(A){return this._ep=A,this}m(A){return this._middlewareFn=A,this}s(A,q,K={}){return this._smithyContext={service:A,operation:q,...K},this}c(A={}){return this._additionalContext=A,this}n(A,q){return this._clientName=A,this._commandName=q,this}f(A=(K)=>K,q=(K)=>K){return this._inputFilterSensitiveLog=A,this._outputFilterSensitiveLog=q,this}ser(A){return this._serializer=A,this}de(A){return this._deserializer=A,this}sc(A){return this._operationSchema=A,this._smithyContext.operationSchema=A,this}build(){let A=this,q;return q=class extends wk8{input;static getEndpointParameterInstructions(){return A._ep}constructor(...[K]){super();this.input=K??{},A._init(this),this.schema=A._operationSchema}resolveMiddleware(K,Y,z){let w=A._operationSchema,_=w?.[4]??w?.input,$=w?.[5]??w?.output;return this.resolveMiddlewareWithContext(K,Y,z,{CommandCtor:q,middlewareFn:A._middlewareFn,clientName:A._clientName,commandName:A._commandName,inputFilterSensitiveLog:A._inputFilterSensitiveLog??(w?Kk8.bind(null,_):(O)=>O),outputFilterSensitiveLog:A._outputFilterSensitiveLog??(w?Kk8.bind(null,$):(O)=>O),smithyContext:A._smithyContext,additionalContext:A._additionalContext})}serialize=A._serializer;deserialize=A._deserializer}}}var Sr9="***SensitiveInformation***",Cr9=(A,q)=>{for(let K of Object.keys(A)){let Y=A[K],z=async function(_,$,O){let H=new Y(_);if(typeof $==="function")this.send(H,$);else if(typeof O==="function"){if(typeof $!=="object")throw Error(`Expected http options but got ${typeof $}`);this.send(H,$||{},O)}else return this.send(H,$)},w=(K[0].toLowerCase()+K.slice(1)).replace(/Command$/,"");q.prototype[w]=z}};class xG6 extends Error{$fault;$response;$retryable;$metadata;constructor(A){super(A.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=A.name,this.$fault=A.$fault,this.$metadata=A.$metadata}static isInstance(A){if(!A)return!1;let q=A;return xG6.prototype.isPrototypeOf(q)||Boolean(q.$fault)&&Boolean(q.$metadata)&&(q.$fault==="client"||q.$fault==="server")}static[Symbol.hasInstance](A){if(!A)return!1;let q=A;if(this===xG6)return xG6.isInstance(A);if(xG6.isInstance(A)){if(q.name&&this.name)return this.prototype.isPrototypeOf(A)||q.name===this.name;return this.prototype.isPrototypeOf(A)}return!1}}var K94=(A,q={})=>{Object.entries(q).filter(([,Y])=>Y!==void 0).forEach(([Y,z])=>{if(A[Y]==null||A[Y]==="")A[Y]=z});let K=A.message||A.Message||"UnknownError";return A.message=K,delete A.Message,A},Y94=({output:A,parsedBody:q,exceptionCtor:K,errorCode:Y})=>{let z=Ir9(A),w=z.httpStatusCode?z.httpStatusCode+"":void 0,_=new K({name:q?.code||q?.Code||Y||w||"UnknownError",$fault:"client",$metadata:z});throw K94(_,q)},hr9=(A)=>{return({output:q,parsedBody:K,errorCode:Y})=>{Y94({output:q,parsedBody:K,exceptionCtor:A,errorCode:Y})}},Ir9=(A)=>({httpStatusCode:A.statusCode,requestId:A.headers["x-amzn-requestid"]??A.headers["x-amzn-request-id"]??A.headers["x-amz-request-id"],extendedRequestId:A.headers["x-amz-id-2"],cfId:A.headers["x-amz-cf-id"]}),br9=(A)=>{switch(A){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},t54=!1,xr9=(A)=>{if(A&&!t54&&parseInt(A.substring(1,A.indexOf(".")))<16)t54=!0},ur9=(A)=>{let q=[];for(let K in qk8.AlgorithmId){let Y=qk8.AlgorithmId[K];if(A[Y]===void 0)continue;q.push({algorithmId:()=>Y,checksumConstructor:()=>A[Y]})}return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},Br9=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},mr9=(A)=>{return{setRetryStrategy(q){A.retryStrategy=q},retryStrategy(){return A.retryStrategy}}},gr9=(A)=>{let q={};return q.retryStrategy=A.retryStrategy(),q},z94=(A)=>{return Object.assign(ur9(A),mr9(A))},Fr9=z94,Qr9=(A)=>{return Object.assign(Br9(A),gr9(A))},Ur9=(A)=>Array.isArray(A)?A:[A],w94=(A)=>{for(let K in A)if(A.hasOwnProperty(K)&&A[K]["#text"]!==void 0)A[K]=A[K]["#text"];else if(typeof A[K]==="object"&&A[K]!==null)A[K]=w94(A[K]);return A},pr9=(A)=>{return A!=null};class _94{trace(){}debug(){}info(){}warn(){}error(){}}function $94(A,q,K){let Y,z,w;if(typeof q>"u"&&typeof K>"u")Y={},w=A;else if(Y=A,typeof q==="function")return z=q,w=K,lr9(Y,z,w);else w=q;for(let _ of Object.keys(w)){if(!Array.isArray(w[_])){Y[_]=w[_];continue}O94(Y,null,w,_)}return Y}var dr9=(A)=>{let q={};for(let[K,Y]of Object.entries(A||{}))q[K]=[,Y];return q},cr9=(A,q)=>{let K={};for(let Y in q)O94(K,A,q,Y);return K},lr9=(A,q,K)=>{return $94(A,Object.entries(K).reduce((Y,[z,w])=>{if(Array.isArray(w))Y[z]=w;else if(typeof w==="function")Y[z]=[q,w()];else Y[z]=[q,w];return Y},{}))},O94=(A,q,K,Y)=>{if(q!==null){let _=K[Y];if(typeof _==="function")_=[,_];let[$=ir9,O=nr9,H=Y]=_;if(typeof $==="function"&&$(q[H])||typeof $!=="function"&&!!$)A[Y]=O(q[H]);return}let[z,w]=K[Y];if(typeof w==="function"){let _,$=z===void 0&&(_=w())!=null,O=typeof z==="function"&&!!z(void 0)||typeof z!=="function"&&!!z;if($)A[Y]=_;else if(O)A[Y]=w()}else{let _=z===void 0&&w!=null,$=typeof z==="function"&&!!z(w)||typeof z!=="function"&&!!z;if(_||$)A[Y]=w}},ir9=(A)=>A!=null,nr9=(A)=>A,rr9=(A)=>{if(A!==A)return"NaN";switch(A){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return A}},or9=(A)=>A.toISOString().replace(".000Z","Z"),Yk8=(A)=>{if(A==null)return{};if(Array.isArray(A))return A.filter((q)=>q!=null).map(Yk8);if(typeof A==="object"){let q={};for(let K of Object.keys(A)){if(A[K]==null)continue;q[K]=Yk8(A[K])}return q}return A};Object.defineProperty(uG6,"collectBody",{enumerable:!0,get:function(){return zk8.collectBody}});Object.defineProperty(uG6,"extendedEncodeURIComponent",{enumerable:!0,get:function(){return zk8.extendedEncodeURIComponent}});Object.defineProperty(uG6,"resolvedPath",{enumerable:!0,get:function(){return zk8.resolvedPath}});uG6.Client=A94;uG6.Command=wk8;uG6.NoOpLogger=_94;uG6.SENSITIVE_STRING=Sr9;uG6.ServiceException=xG6;uG6._json=Yk8;uG6.convertMap=dr9;uG6.createAggregatedClient=Cr9;uG6.decorateServiceException=K94;uG6.emitWarningIfUnsupportedVersion=xr9;uG6.getArrayIfSingleItem=Ur9;uG6.getDefaultClientConfiguration=Fr9;uG6.getDefaultExtensionConfiguration=z94;uG6.getValueFromTextNode=w94;uG6.isSerializableHeaderValue=pr9;uG6.loadConfigsForDefaultMode=br9;uG6.map=$94;uG6.resolveDefaultRuntimeConfig=Qr9;uG6.serializeDateTime=or9;uG6.serializeFloat=rr9;uG6.take=cr9;uG6.throwDefaultError=Y94;uG6.withBaseException=hr9;Object.keys(s54).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(uG6,A))Object.defineProperty(uG6,A,{enumerable:!0,get:function(){return s54[A]}})})});var $k8=C((j94)=>{Object.defineProperty(j94,"__esModule",{value:!0});j94.resolveHttpAuthSchemeConfig=j94.resolveStsAuthConfig=j94.defaultSTSHttpAuthSchemeProvider=j94.defaultSTSHttpAuthSchemeParametersProvider=void 0;var fo9=O$(),_k8=pZ(),To9=Ok8(),Vo9=async(A,q,K)=>{return{operation:(0,_k8.getSmithyContext)(q).operation,region:await(0,_k8.normalizeProvider)(A.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};j94.defaultSTSHttpAuthSchemeParametersProvider=Vo9;function No9(A){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:A.region},propertiesExtractor:(q,K)=>({signingProperties:{config:q,context:K}})}}function H94(A){return{schemeId:"smithy.api#noAuth"}}var vo9=(A)=>{let q=[];switch(A.operation){case"AssumeRoleWithSAML":{q.push(H94(A));break}case"AssumeRoleWithWebIdentity":{q.push(H94(A));break}default:q.push(No9(A))}return q};j94.defaultSTSHttpAuthSchemeProvider=vo9;var ko9=(A)=>Object.assign(A,{stsClientCtor:To9.STSClient});j94.resolveStsAuthConfig=ko9;var Eo9=(A)=>{let q=j94.resolveStsAuthConfig(A),K=(0,fo9.resolveAwsSdkSigV4Config)(q);return Object.assign(K,{authSchemePreference:(0,_k8.normalizeProvider)(A.authSchemePreference??[])})};j94.resolveHttpAuthSchemeConfig=Eo9});var Hk8=C((D94)=>{Object.defineProperty(D94,"__esModule",{value:!0});D94.commonParams=D94.resolveClientEndpointParameters=void 0;var Ro9=(A)=>{return Object.assign(A,{useDualstackEndpoint:A.useDualstackEndpoint??!1,useFipsEndpoint:A.useFipsEndpoint??!1,useGlobalEndpoint:A.useGlobalEndpoint??!1,defaultSigningName:"sts"})};D94.resolveClientEndpointParameters=Ro9;D94.commonParams={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var P94=C((sz_,Co9)=>{Co9.exports={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.936.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.936.0","@aws-sdk/credential-provider-node":"3.936.0","@aws-sdk/middleware-host-header":"3.936.0","@aws-sdk/middleware-logger":"3.936.0","@aws-sdk/middleware-recursion-detection":"3.936.0","@aws-sdk/middleware-user-agent":"3.936.0","@aws-sdk/region-config-resolver":"3.936.0","@aws-sdk/types":"3.936.0","@aws-sdk/util-endpoints":"3.936.0","@aws-sdk/util-user-agent-browser":"3.936.0","@aws-sdk/util-user-agent-node":"3.936.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.5","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.12","@smithy/middleware-retry":"^4.4.12","@smithy/middleware-serde":"^4.2.6","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.8","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.11","@smithy/util-defaults-mode-node":"^4.2.14","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.8.3"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}}});var W94=C((Io9)=>{var ho9=(A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]";Io9.isArrayBuffer=ho9});var Jk8=C((mo9)=>{var xo9=W94(),jk8=g6("buffer"),uo9=(A,q=0,K=A.byteLength-q)=>{if(!xo9.isArrayBuffer(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return jk8.Buffer.from(A,q,K)},Bo9=(A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?jk8.Buffer.from(A,q):jk8.Buffer.from(A)};mo9.fromArrayBuffer=uo9;mo9.fromString=Bo9});var f94=C((Z94)=>{Object.defineProperty(Z94,"__esModule",{value:!0});Z94.fromBase64=void 0;var Qo9=Jk8(),Uo9=/^[A-Za-z0-9+/]*={0,2}$/,po9=(A)=>{if(A.length*3%4!==0)throw TypeError("Incorrect padding on base64 string.");if(!Uo9.exec(A))throw TypeError("Invalid base64 string.");let q=(0,Qo9.fromString)(A,"base64");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength)};Z94.fromBase64=po9});var N94=C((T94)=>{Object.defineProperty(T94,"__esModule",{value:!0});T94.toBase64=void 0;var do9=Jk8(),co9=Z2(),lo9=(A)=>{let q;if(typeof A==="string")q=(0,co9.fromUtf8)(A);else q=A;if(typeof q!=="object"||typeof q.byteOffset!=="number"||typeof q.byteLength!=="number")throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,do9.fromArrayBuffer)(q.buffer,q.byteOffset,q.byteLength).toString("base64")};T94.toBase64=lo9});var E94=C((xp6)=>{var v94=f94(),k94=N94();Object.keys(v94).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(xp6,A))Object.defineProperty(xp6,A,{enumerable:!0,get:function(){return v94[A]}})});Object.keys(k94).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(xp6,A))Object.defineProperty(xp6,A,{enumerable:!0,get:function(){return k94[A]}})})});var o94=C((n94)=>{Object.defineProperty(n94,"__esModule",{value:!0});n94.ruleSet=void 0;var m94="required",l5="type",tz="fn",ez="argv",x66="ref",L94=!1,Mk8=!0,b66="booleanEquals",KW="stringEquals",g94="sigv4",F94="sts",Q94="us-east-1",_H="endpoint",y94="https://sts.{Region}.{PartitionResult#dnsSuffix}",kF="tree",BG6="error",Xk8="getAttr",R94={[m94]:!1,[l5]:"string"},Dk8={[m94]:!0,default:!1,[l5]:"boolean"},U94={[x66]:"Endpoint"},S94={[tz]:"isSet",[ez]:[{[x66]:"Region"}]},YW={[x66]:"Region"},C94={[tz]:"aws.partition",[ez]:[YW],assign:"PartitionResult"},p94={[x66]:"UseFIPS"},d94={[x66]:"UseDualStack"},DG={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:g94,signingName:F94,signingRegion:Q94}]},headers:{}},sE={},h94={conditions:[{[tz]:KW,[ez]:[YW,"aws-global"]}],[_H]:DG,[l5]:_H},c94={[tz]:b66,[ez]:[p94,!0]},l94={[tz]:b66,[ez]:[d94,!0]},I94={[tz]:Xk8,[ez]:[{[x66]:"PartitionResult"},"supportsFIPS"]},i94={[x66]:"PartitionResult"},b94={[tz]:b66,[ez]:[!0,{[tz]:Xk8,[ez]:[i94,"supportsDualStack"]}]},x94=[{[tz]:"isSet",[ez]:[U94]}],u94=[c94],B94=[l94],io9={version:"1.0",parameters:{Region:R94,UseDualStack:Dk8,UseFIPS:Dk8,Endpoint:R94,UseGlobalEndpoint:Dk8},rules:[{conditions:[{[tz]:b66,[ez]:[{[x66]:"UseGlobalEndpoint"},Mk8]},{[tz]:"not",[ez]:x94},S94,C94,{[tz]:b66,[ez]:[p94,L94]},{[tz]:b66,[ez]:[d94,L94]}],rules:[{conditions:[{[tz]:KW,[ez]:[YW,"ap-northeast-1"]}],endpoint:DG,[l5]:_H},{conditions:[{[tz]:KW,[ez]:[YW,"ap-south-1"]}],endpoint:DG,[l5]:_H},{conditions:[{[tz]:KW,[ez]:[YW,"ap-southeast-1"]}],endpoint:DG,[l5]:_H},{conditions:[{[tz]:KW,[ez]:[YW,"ap-southeast-2"]}],endpoint:DG,[l5]:_H},h94,{conditions:[{[tz]:KW,[ez]:[YW,"ca-central-1"]}],endpoint:DG,[l5]:_H},{conditions:[{[tz]:KW,[ez]:[YW,"eu-central-1"]}],endpoint:DG,[l5]:_H},{conditions:[{[tz]:KW,[ez]:[YW,"eu-north-1"]}],endpoint:DG,[l5]:_H},{conditions:[{[tz]:KW,[ez]:[YW,"eu-west-1"]}],endpoint:DG,[l5]:_H},{conditions:[{[tz]:KW,[ez]:[YW,"eu-west-2"]}],endpoint:DG,[l5]:_H},{conditions:[{[tz]:KW,[ez]:[YW,"eu-west-3"]}],endpoint:DG,[l5]:_H},{conditions:[{[tz]:KW,[ez]:[YW,"sa-east-1"]}],endpoint:DG,[l5]:_H},{conditions:[{[tz]:KW,[ez]:[YW,Q94]}],endpoint:DG,[l5]:_H},{conditions:[{[tz]:KW,[ez]:[YW,"us-east-2"]}],endpoint:DG,[l5]:_H},{conditions:[{[tz]:KW,[ez]:[YW,"us-west-1"]}],endpoint:DG,[l5]:_H},{conditions:[{[tz]:KW,[ez]:[YW,"us-west-2"]}],endpoint:DG,[l5]:_H},{endpoint:{url:y94,properties:{authSchemes:[{name:g94,signingName:F94,signingRegion:"{Region}"}]},headers:sE},[l5]:_H}],[l5]:kF},{conditions:x94,rules:[{conditions:u94,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[l5]:BG6},{conditions:B94,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[l5]:BG6},{endpoint:{url:U94,properties:sE,headers:sE},[l5]:_H}],[l5]:kF},{conditions:[S94],rules:[{conditions:[C94],rules:[{conditions:[c94,l94],rules:[{conditions:[{[tz]:b66,[ez]:[Mk8,I94]},b94],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:sE,headers:sE},[l5]:_H}],[l5]:kF},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[l5]:BG6}],[l5]:kF},{conditions:u94,rules:[{conditions:[{[tz]:b66,[ez]:[I94,Mk8]}],rules:[{conditions:[{[tz]:KW,[ez]:[{[tz]:Xk8,[ez]:[i94,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:sE,headers:sE},[l5]:_H},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:sE,headers:sE},[l5]:_H}],[l5]:kF},{error:"FIPS is enabled but this partition does not support FIPS",[l5]:BG6}],[l5]:kF},{conditions:B94,rules:[{conditions:[b94],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:sE,headers:sE},[l5]:_H}],[l5]:kF},{error:"DualStack is enabled but this partition does not support DualStack",[l5]:BG6}],[l5]:kF},h94,{endpoint:{url:y94,properties:sE,headers:sE},[l5]:_H}],[l5]:kF}],[l5]:kF},{error:"Invalid Configuration: Missing Region",[l5]:BG6}]};n94.ruleSet=io9});var t94=C((a94)=>{Object.defineProperty(a94,"__esModule",{value:!0});a94.defaultEndpointResolver=void 0;var no9=pm(),Pk8=Ab(),ro9=o94(),oo9=new Pk8.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),ao9=(A,q={})=>{return oo9.get(A,()=>(0,Pk8.resolveEndpoint)(ro9.ruleSet,{endpointParams:A,logger:q.logger}))};a94.defaultEndpointResolver=ao9;Pk8.customEndpointFunctions.aws=no9.awsEndpointFunctions});var YY4=C((qY4)=>{Object.defineProperty(qY4,"__esModule",{value:!0});qY4.getRuntimeConfig=void 0;var so9=O$(),to9=Lc(),eo9=pw(),Aa9=gY6(),qa9=LR(),e94=E94(),AY4=Z2(),Ka9=$k8(),Ya9=t94(),za9=(A)=>{return{apiVersion:"2011-06-15",base64Decoder:A?.base64Decoder??e94.fromBase64,base64Encoder:A?.base64Encoder??e94.toBase64,disableHostPrefix:A?.disableHostPrefix??!1,endpointProvider:A?.endpointProvider??Ya9.defaultEndpointResolver,extensions:A?.extensions??[],httpAuthSchemeProvider:A?.httpAuthSchemeProvider??Ka9.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:A?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(q)=>q.getIdentityProvider("aws.auth#sigv4"),signer:new so9.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(q)=>q.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new eo9.NoAuthSigner}],logger:A?.logger??new Aa9.NoOpLogger,protocol:A?.protocol??new to9.AwsQueryProtocol({defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15"}),serviceId:A?.serviceId??"STS",urlParser:A?.urlParser??qa9.parseUrl,utf8Decoder:A?.utf8Decoder??AY4.fromUtf8,utf8Encoder:A?.utf8Encoder??AY4.toUtf8}};qY4.getRuntimeConfig=za9});var jY4=C((OY4)=>{Object.defineProperty(OY4,"__esModule",{value:!0});OY4.getRuntimeConfig=void 0;var wa9=d2(),_a9=wa9.__importDefault(P94()),Wk8=O$(),zY4=i36(),wY4=Nc(),JW1=NJ(),$a9=pw(),Oa9=vc(),_Y4=h0(),FY6=HN(),$Y4=$N(),Ha9=kc(),ja9=lm(),Ja9=YY4(),Ma9=gY6(),Da9=Rc(),Xa9=gY6(),Pa9=(A)=>{(0,Xa9.emitWarningIfUnsupportedVersion)(process.version);let q=(0,Da9.resolveDefaultsModeConfig)(A),K=()=>q().then(Ma9.loadConfigsForDefaultMode),Y=(0,Ja9.getRuntimeConfig)(A);(0,Wk8.emitWarningIfUnsupportedVersion)(process.version);let z={profile:A?.profile,logger:Y.logger};return{...Y,...A,runtime:"node",defaultsMode:q,authSchemePreference:A?.authSchemePreference??(0,FY6.loadConfig)(Wk8.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,z),bodyLengthChecker:A?.bodyLengthChecker??Ha9.calculateBodyLength,credentialDefaultProvider:A?.credentialDefaultProvider??zY4.defaultProvider,defaultUserAgentProvider:A?.defaultUserAgentProvider??(0,wY4.createDefaultUserAgentProvider)({serviceId:Y.serviceId,clientVersion:_a9.default.version}),httpAuthSchemes:A?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4")||(async(_)=>await(0,zY4.defaultProvider)(_?.__config||{})()),signer:new Wk8.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new $a9.NoAuthSigner}],maxAttempts:A?.maxAttempts??(0,FY6.loadConfig)(_Y4.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,A),region:A?.region??(0,FY6.loadConfig)(JW1.NODE_REGION_CONFIG_OPTIONS,{...JW1.NODE_REGION_CONFIG_FILE_OPTIONS,...z}),requestHandler:$Y4.NodeHttpHandler.create(A?.requestHandler??K),retryMode:A?.retryMode??(0,FY6.loadConfig)({..._Y4.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await K()).retryMode||ja9.DEFAULT_RETRY_MODE},A),sha256:A?.sha256??Oa9.Hash.bind(null,"sha256"),streamCollector:A?.streamCollector??$Y4.streamCollector,useDualstackEndpoint:A?.useDualstackEndpoint??(0,FY6.loadConfig)(JW1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,z),useFipsEndpoint:A?.useFipsEndpoint??(0,FY6.loadConfig)(JW1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,z),userAgentAppId:A?.userAgentAppId??(0,FY6.loadConfig)(wY4.NODE_APP_ID_CONFIG_OPTIONS,z)}};OY4.getRuntimeConfig=Pa9});var XY4=C((Va9)=>{var Wa9=ev8(),Za9=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},Ga9=(A)=>{return{httpHandler:A.httpHandler()}};class JY4{name;kind;values;constructor({name:A,kind:q=Wa9.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class MY4{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class MW1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new MW1({...A,headers:{...A.headers}});if(q.query)q.query=fa9(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return MW1.clone(this)}}function fa9(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class DY4{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function Ta9(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}Va9.Field=JY4;Va9.Fields=MY4;Va9.HttpRequest=MW1;Va9.HttpResponse=DY4;Va9.getHttpHandlerExtensionConfiguration=Za9;Va9.isValidHostname=Ta9;Va9.resolveHttpHandlerRuntimeConfig=Ga9});var ZY4=C((PY4)=>{Object.defineProperty(PY4,"__esModule",{value:!0});PY4.resolveHttpAuthRuntimeConfig=PY4.getHttpAuthExtensionConfiguration=void 0;var Sa9=(A)=>{let{httpAuthSchemes:q,httpAuthSchemeProvider:K,credentials:Y}=A;return{setHttpAuthScheme(z){let w=q.findIndex((_)=>_.schemeId===z.schemeId);if(w===-1)q.push(z);else q.splice(w,1,z)},httpAuthSchemes(){return q},setHttpAuthSchemeProvider(z){K=z},httpAuthSchemeProvider(){return K},setCredentials(z){Y=z},credentials(){return Y}}};PY4.getHttpAuthExtensionConfiguration=Sa9;var Ca9=(A)=>{return{httpAuthSchemes:A.httpAuthSchemes(),httpAuthSchemeProvider:A.httpAuthSchemeProvider(),credentials:A.credentials()}};PY4.resolveHttpAuthRuntimeConfig=Ca9});var kY4=C((NY4)=>{Object.defineProperty(NY4,"__esModule",{value:!0});NY4.resolveRuntimeExtensions=void 0;var GY4=Kb(),fY4=XY4(),TY4=gY6(),VY4=ZY4(),Ia9=(A,q)=>{let K=Object.assign((0,GY4.getAwsRegionExtensionConfiguration)(A),(0,TY4.getDefaultExtensionConfiguration)(A),(0,fY4.getHttpHandlerExtensionConfiguration)(A),(0,VY4.getHttpAuthExtensionConfiguration)(A));return q.forEach((Y)=>Y.configure(K)),Object.assign(A,(0,GY4.resolveAwsRegionExtensionConfiguration)(K),(0,TY4.resolveDefaultRuntimeConfig)(K),(0,fY4.resolveHttpHandlerRuntimeConfig)(K),(0,VY4.resolveHttpAuthRuntimeConfig)(K))};NY4.resolveRuntimeExtensions=Ia9});var Ok8=C((Gk8)=>{Object.defineProperty(Gk8,"__esModule",{value:!0});Gk8.STSClient=Gk8.__Client=void 0;var EY4=Dc(),ba9=Xc(),xa9=Pc(),LY4=cm(),ua9=NJ(),Zk8=pw(),Ba9=lO(),ma9=Vc(),ga9=qb(),yY4=h0(),SY4=gY6();Object.defineProperty(Gk8,"__Client",{enumerable:!0,get:function(){return SY4.Client}});var RY4=$k8(),Fa9=Hk8(),Qa9=jY4(),Ua9=kY4();class CY4 extends SY4.Client{config;constructor(...[A]){let q=(0,Qa9.getRuntimeConfig)(A||{});super(q);this.initConfig=q;let K=(0,Fa9.resolveClientEndpointParameters)(q),Y=(0,LY4.resolveUserAgentConfig)(K),z=(0,yY4.resolveRetryConfig)(Y),w=(0,ua9.resolveRegionConfig)(z),_=(0,EY4.resolveHostHeaderConfig)(w),$=(0,ga9.resolveEndpointConfig)(_),O=(0,RY4.resolveHttpAuthSchemeConfig)($),H=(0,Ua9.resolveRuntimeExtensions)(O,A?.extensions||[]);this.config=H,this.middlewareStack.use((0,Ba9.getSchemaSerdePlugin)(this.config)),this.middlewareStack.use((0,LY4.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,yY4.getRetryPlugin)(this.config)),this.middlewareStack.use((0,ma9.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,EY4.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,ba9.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,xa9.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,Zk8.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:RY4.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(j)=>new Zk8.DefaultIdentityProviderConfig({"aws.auth#sigv4":j.credentials})})),this.middlewareStack.use((0,Zk8.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}}Gk8.STSClient=CY4});var _z4=C((DW1)=>{var up6=Ok8(),cN=gY6(),Ox=qb(),Hx=Hk8(),tE=lO(),fk8=ON(),pa9=Kb(),lN=class A extends cN.ServiceException{constructor(q){super(q);Object.setPrototypeOf(this,A.prototype)}},IY4=class A extends lN{name="ExpiredTokenException";$fault="client";constructor(q){super({name:"ExpiredTokenException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},bY4=class A extends lN{name="MalformedPolicyDocumentException";$fault="client";constructor(q){super({name:"MalformedPolicyDocumentException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},xY4=class A extends lN{name="PackedPolicyTooLargeException";$fault="client";constructor(q){super({name:"PackedPolicyTooLargeException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},uY4=class A extends lN{name="RegionDisabledException";$fault="client";constructor(q){super({name:"RegionDisabledException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},BY4=class A extends lN{name="IDPRejectedClaimException";$fault="client";constructor(q){super({name:"IDPRejectedClaimException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},mY4=class A extends lN{name="InvalidIdentityTokenException";$fault="client";constructor(q){super({name:"InvalidIdentityTokenException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},gY4=class A extends lN{name="IDPCommunicationErrorException";$fault="client";constructor(q){super({name:"IDPCommunicationErrorException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},FY4=class A extends lN{name="InvalidAuthorizationMessageException";$fault="client";constructor(q){super({name:"InvalidAuthorizationMessageException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},QY4=class A extends lN{name="ExpiredTradeInTokenException";$fault="client";constructor(q){super({name:"ExpiredTradeInTokenException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},UY4=class A extends lN{name="JWTPayloadSizeExceededException";$fault="client";constructor(q){super({name:"JWTPayloadSizeExceededException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},pY4=class A extends lN{name="OutboundWebIdentityFederationDisabledException";$fault="client";constructor(q){super({name:"OutboundWebIdentityFederationDisabledException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},dY4=class A extends lN{name="SessionDurationEscalationException";$fault="client";constructor(q){super({name:"SessionDurationEscalationException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},Tk8="Arn",cY4="AccessKeyId",da9="AssumedPrincipal",ca9="AssumeRole",la9="AssumedRoleId",ia9="AssumeRoleRequest",na9="AssumeRoleResponse",ra9="AssumeRootRequest",oa9="AssumeRootResponse",XW1="AssumedRoleUser",aa9="AssumeRoleWithSAML",sa9="AssumeRoleWithSAMLRequest",ta9="AssumeRoleWithSAMLResponse",ea9="AssumeRoleWithWebIdentity",As9="AssumeRoleWithWebIdentityRequest",qs9="AssumeRoleWithWebIdentityResponse",Ks9="AssumeRoot",lY4="Account",Vk8="Audience",u66="Credentials",Ys9="ContextAssertion",zs9="DecodeAuthorizationMessage",ws9="DecodeAuthorizationMessageRequest",_s9="DecodeAuthorizationMessageResponse",$s9="DecodedMessage",QY6="DurationSeconds",iY4="Expiration",Os9="ExternalId",Hs9="EncodedMessage",js9="ExpiredTokenException",Js9="ExpiredTradeInTokenException",nY4="FederatedUser",Ms9="FederatedUserId",Ds9="GetAccessKeyInfo",Xs9="GetAccessKeyInfoRequest",Ps9="GetAccessKeyInfoResponse",Ws9="GetCallerIdentity",Zs9="GetCallerIdentityRequest",Gs9="GetCallerIdentityResponse",fs9="GetDelegatedAccessToken",Ts9="GetDelegatedAccessTokenRequest",Vs9="GetDelegatedAccessTokenResponse",Ns9="GetFederationToken",vs9="GetFederationTokenRequest",ks9="GetFederationTokenResponse",Es9="GetSessionToken",Ls9="GetSessionTokenRequest",ys9="GetSessionTokenResponse",Rs9="GetWebIdentityToken",Ss9="GetWebIdentityTokenRequest",Cs9="GetWebIdentityTokenResponse",hs9="Issuer",Is9="InvalidAuthorizationMessageException",bs9="IDPCommunicationErrorException",xs9="IDPRejectedClaimException",us9="InvalidIdentityTokenException",Bs9="JWTPayloadSizeExceededException",ms9="Key",gs9="MalformedPolicyDocumentException",Fs9="Name",Qs9="NameQualifier",Us9="OutboundWebIdentityFederationDisabledException",PW1="Policy",WW1="PolicyArns",ps9="PrincipalArn",ds9="ProviderArn",cs9="ProvidedContexts",ls9="ProvidedContextsListType",is9="ProvidedContext",ns9="PolicyDescriptorType",rs9="ProviderId",Bp6="PackedPolicySize",os9="PackedPolicyTooLargeException",as9="Provider",Nk8="RoleArn",ss9="RegionDisabledException",rY4="RoleSessionName",ts9="Subject",es9="SigningAlgorithm",At9="SecretAccessKey",qt9="SAMLAssertion",Kt9="SAMLAssertionType",Yt9="SessionDurationEscalationException",zt9="SubjectFromWebIdentityToken",mp6="SourceIdentity",oY4="SerialNumber",wt9="SubjectType",_t9="SessionToken",vk8="Tags",aY4="TokenCode",$t9="TradeInToken",Ot9="TargetPrincipal",Ht9="TaskPolicyArn",jt9="TransitiveTagKeys",Jt9="Tag",Mt9="UserId",Dt9="Value",sY4="WebIdentityToken",Xt9="arn",Pt9="accessKeySecretType",uS="awsQueryError",BS="client",Wt9="clientTokenType",mS="error",gS="httpError",FS="message",Zt9="policyDescriptorListType",tY4="smithy.ts.sdk.synthetic.com.amazonaws.sts",Gt9="tradeInTokenType",ft9="tagListType",Tt9="webIdentityTokenType",R4="com.amazonaws.sts",Vt9=[0,R4,Pt9,8,0],Nt9=[0,R4,Wt9,8,0],vt9=[0,R4,Kt9,8,0],kt9=[0,R4,Gt9,8,0],Et9=[0,R4,Tt9,8,0],kk8=[3,R4,XW1,0,[la9,Tk8],[0,0]],Lt9=[3,R4,ia9,0,[Nk8,rY4,WW1,PW1,QY6,vk8,jt9,Os9,oY4,aY4,mp6,cs9],[0,0,()=>ZW1,0,1,()=>Ek8,64,0,0,0,0,()=>je9]],yt9=[3,R4,na9,0,[u66,XW1,Bp6,mp6],[[()=>UY6,0],()=>kk8,1,0]],Rt9=[3,R4,sa9,0,[Nk8,ps9,qt9,WW1,PW1,QY6],[0,0,[()=>vt9,0],()=>ZW1,0,1]],St9=[3,R4,ta9,0,[u66,XW1,Bp6,ts9,wt9,hs9,Vk8,Qs9,mp6],[[()=>UY6,0],()=>kk8,1,0,0,0,0,0,0]],Ct9=[3,R4,As9,0,[Nk8,rY4,sY4,rs9,WW1,PW1,QY6],[0,0,[()=>Nt9,0],0,()=>ZW1,0,1]],ht9=[3,R4,qs9,0,[u66,zt9,XW1,Bp6,as9,Vk8,mp6],[[()=>UY6,0],0,()=>kk8,1,0,0,0]],It9=[3,R4,ra9,0,[Ot9,Ht9,QY6],[0,()=>eY4,1]],bt9=[3,R4,oa9,0,[u66,mp6],[[()=>UY6,0],0]],UY6=[3,R4,u66,0,[cY4,At9,_t9,iY4],[0,[()=>Vt9,0],0,4]],xt9=[3,R4,ws9,0,[Hs9],[0]],ut9=[3,R4,_s9,0,[$s9],[0]],Bt9=[-3,R4,js9,{[mS]:BS,[gS]:400,[uS]:["ExpiredTokenException",400]},[FS],[0]];tE.TypeRegistry.for(R4).registerError(Bt9,IY4);var mt9=[-3,R4,Js9,{[mS]:BS,[gS]:400,[uS]:["ExpiredTradeInTokenException",400]},[FS],[0]];tE.TypeRegistry.for(R4).registerError(mt9,QY4);var gt9=[3,R4,nY4,0,[Ms9,Tk8],[0,0]],Ft9=[3,R4,Xs9,0,[cY4],[0]],Qt9=[3,R4,Ps9,0,[lY4],[0]],Ut9=[3,R4,Zs9,0,[],[]],pt9=[3,R4,Gs9,0,[Mt9,lY4,Tk8],[0,0,0]],dt9=[3,R4,Ts9,0,[$t9],[[()=>kt9,0]]],ct9=[3,R4,Vs9,0,[u66,Bp6,da9],[[()=>UY6,0],1,0]],lt9=[3,R4,vs9,0,[Fs9,PW1,WW1,QY6,vk8],[0,0,()=>ZW1,1,()=>Ek8]],it9=[3,R4,ks9,0,[u66,nY4,Bp6],[[()=>UY6,0],()=>gt9,1]],nt9=[3,R4,Ls9,0,[QY6,oY4,aY4],[1,0,0]],rt9=[3,R4,ys9,0,[u66],[[()=>UY6,0]]],ot9=[3,R4,Ss9,0,[Vk8,QY6,es9,vk8],[64,1,0,()=>Ek8]],at9=[3,R4,Cs9,0,[sY4,iY4],[[()=>Et9,0],4]],st9=[-3,R4,bs9,{[mS]:BS,[gS]:400,[uS]:["IDPCommunicationError",400]},[FS],[0]];tE.TypeRegistry.for(R4).registerError(st9,gY4);var tt9=[-3,R4,xs9,{[mS]:BS,[gS]:403,[uS]:["IDPRejectedClaim",403]},[FS],[0]];tE.TypeRegistry.for(R4).registerError(tt9,BY4);var et9=[-3,R4,Is9,{[mS]:BS,[gS]:400,[uS]:["InvalidAuthorizationMessageException",400]},[FS],[0]];tE.TypeRegistry.for(R4).registerError(et9,FY4);var Ae9=[-3,R4,us9,{[mS]:BS,[gS]:400,[uS]:["InvalidIdentityToken",400]},[FS],[0]];tE.TypeRegistry.for(R4).registerError(Ae9,mY4);var qe9=[-3,R4,Bs9,{[mS]:BS,[gS]:400,[uS]:["JWTPayloadSizeExceededException",400]},[FS],[0]];tE.TypeRegistry.for(R4).registerError(qe9,UY4);var Ke9=[-3,R4,gs9,{[mS]:BS,[gS]:400,[uS]:["MalformedPolicyDocument",400]},[FS],[0]];tE.TypeRegistry.for(R4).registerError(Ke9,bY4);var Ye9=[-3,R4,Us9,{[mS]:BS,[gS]:403,[uS]:["OutboundWebIdentityFederationDisabledException",403]},[FS],[0]];tE.TypeRegistry.for(R4).registerError(Ye9,pY4);var ze9=[-3,R4,os9,{[mS]:BS,[gS]:400,[uS]:["PackedPolicyTooLarge",400]},[FS],[0]];tE.TypeRegistry.for(R4).registerError(ze9,xY4);var eY4=[3,R4,ns9,0,[Xt9],[0]],we9=[3,R4,is9,0,[ds9,Ys9],[0,0]],_e9=[-3,R4,ss9,{[mS]:BS,[gS]:403,[uS]:["RegionDisabledException",403]},[FS],[0]];tE.TypeRegistry.for(R4).registerError(_e9,uY4);var $e9=[-3,R4,Yt9,{[mS]:BS,[gS]:403,[uS]:["SessionDurationEscalationException",403]},[FS],[0]];tE.TypeRegistry.for(R4).registerError($e9,dY4);var Oe9=[3,R4,Jt9,0,[ms9,Dt9],[0,0]],He9=[-3,tY4,"STSServiceException",0,[],[]];tE.TypeRegistry.for(tY4).registerError(He9,lN);var ZW1=[1,R4,Zt9,0,()=>eY4],je9=[1,R4,ls9,0,()=>we9],Ek8=[1,R4,ft9,0,()=>Oe9],Je9=[9,R4,ca9,0,()=>Lt9,()=>yt9],Me9=[9,R4,aa9,0,()=>Rt9,()=>St9],De9=[9,R4,ea9,0,()=>Ct9,()=>ht9],Xe9=[9,R4,Ks9,0,()=>It9,()=>bt9],Pe9=[9,R4,zs9,0,()=>xt9,()=>ut9],We9=[9,R4,Ds9,0,()=>Ft9,()=>Qt9],Ze9=[9,R4,Ws9,0,()=>Ut9,()=>pt9],Ge9=[9,R4,fs9,0,()=>dt9,()=>ct9],fe9=[9,R4,Ns9,0,()=>lt9,()=>it9],Te9=[9,R4,Es9,0,()=>nt9,()=>rt9],Ve9=[9,R4,Rs9,0,()=>ot9,()=>at9];class GW1 extends cN.Command.classBuilder().ep(Hx.commonParams).m(function(A,q,K,Y){return[Ox.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(Je9).build(){}class Lk8 extends cN.Command.classBuilder().ep(Hx.commonParams).m(function(A,q,K,Y){return[Ox.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").sc(Me9).build(){}class fW1 extends cN.Command.classBuilder().ep(Hx.commonParams).m(function(A,q,K,Y){return[Ox.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(De9).build(){}class yk8 extends cN.Command.classBuilder().ep(Hx.commonParams).m(function(A,q,K,Y){return[Ox.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoot",{}).n("STSClient","AssumeRootCommand").sc(Xe9).build(){}class Rk8 extends cN.Command.classBuilder().ep(Hx.commonParams).m(function(A,q,K,Y){return[Ox.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").sc(Pe9).build(){}class Sk8 extends cN.Command.classBuilder().ep(Hx.commonParams).m(function(A,q,K,Y){return[Ox.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").sc(We9).build(){}class Ck8 extends cN.Command.classBuilder().ep(Hx.commonParams).m(function(A,q,K,Y){return[Ox.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").sc(Ze9).build(){}class hk8 extends cN.Command.classBuilder().ep(Hx.commonParams).m(function(A,q,K,Y){return[Ox.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetDelegatedAccessToken",{}).n("STSClient","GetDelegatedAccessTokenCommand").sc(Ge9).build(){}class Ik8 extends cN.Command.classBuilder().ep(Hx.commonParams).m(function(A,q,K,Y){return[Ox.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").sc(fe9).build(){}class bk8 extends cN.Command.classBuilder().ep(Hx.commonParams).m(function(A,q,K,Y){return[Ox.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").sc(Te9).build(){}class xk8 extends cN.Command.classBuilder().ep(Hx.commonParams).m(function(A,q,K,Y){return[Ox.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetWebIdentityToken",{}).n("STSClient","GetWebIdentityTokenCommand").sc(Ve9).build(){}var Ne9={AssumeRoleCommand:GW1,AssumeRoleWithSAMLCommand:Lk8,AssumeRoleWithWebIdentityCommand:fW1,AssumeRootCommand:yk8,DecodeAuthorizationMessageCommand:Rk8,GetAccessKeyInfoCommand:Sk8,GetCallerIdentityCommand:Ck8,GetDelegatedAccessTokenCommand:hk8,GetFederationTokenCommand:Ik8,GetSessionTokenCommand:bk8,GetWebIdentityTokenCommand:xk8};class uk8 extends up6.STSClient{}cN.createAggregatedClient(Ne9,uk8);var Az4=(A)=>{if(typeof A?.Arn==="string"){let q=A.Arn.split(":");if(q.length>4&&q[4]!=="")return q[4]}return},qz4=async(A,q,K,Y={})=>{let z=typeof A==="function"?await A():A,w=typeof q==="function"?await q():q,_=await pa9.stsRegionDefaultResolver(Y)();return K?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${z} (credential provider clientConfig)`,`${w} (contextual client)`,`${_} (STS default: AWS_REGION, profile region, or us-east-1)`),z??w??_},ve9=(A,q)=>{let K,Y;return async(z,w)=>{if(Y=z,!K){let{logger:j=A?.parentClientConfig?.logger,profile:J=A?.parentClientConfig?.profile,region:M,requestHandler:D=A?.parentClientConfig?.requestHandler,credentialProviderLogger:X,userAgentAppId:P=A?.parentClientConfig?.userAgentAppId}=A,W=await qz4(M,A?.parentClientConfig?.region,X,{logger:j,profile:J}),Z=!Kz4(D);K=new q({...A,userAgentAppId:P,profile:J,credentialDefaultProvider:()=>async()=>Y,region:W,requestHandler:Z?D:void 0,logger:j})}let{Credentials:_,AssumedRoleUser:$}=await K.send(new GW1(w));if(!_||!_.AccessKeyId||!_.SecretAccessKey)throw Error(`Invalid response from STS.assumeRole call with role ${w.RoleArn}`);let O=Az4($),H={accessKeyId:_.AccessKeyId,secretAccessKey:_.SecretAccessKey,sessionToken:_.SessionToken,expiration:_.Expiration,..._.CredentialScope&&{credentialScope:_.CredentialScope},...O&&{accountId:O}};return fk8.setCredentialFeature(H,"CREDENTIALS_STS_ASSUME_ROLE","i"),H}},ke9=(A,q)=>{let K;return async(Y)=>{if(!K){let{logger:O=A?.parentClientConfig?.logger,profile:H=A?.parentClientConfig?.profile,region:j,requestHandler:J=A?.parentClientConfig?.requestHandler,credentialProviderLogger:M,userAgentAppId:D=A?.parentClientConfig?.userAgentAppId}=A,X=await qz4(j,A?.parentClientConfig?.region,M,{logger:O,profile:H}),P=!Kz4(J);K=new q({...A,userAgentAppId:D,profile:H,region:X,requestHandler:P?J:void 0,logger:O})}let{Credentials:z,AssumedRoleUser:w}=await K.send(new fW1(Y));if(!z||!z.AccessKeyId||!z.SecretAccessKey)throw Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${Y.RoleArn}`);let _=Az4(w),$={accessKeyId:z.AccessKeyId,secretAccessKey:z.SecretAccessKey,sessionToken:z.SessionToken,expiration:z.Expiration,...z.CredentialScope&&{credentialScope:z.CredentialScope},..._&&{accountId:_}};if(_)fk8.setCredentialFeature($,"RESOLVED_ACCOUNT_ID","T");return fk8.setCredentialFeature($,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),$}},Kz4=(A)=>{return A?.metadata?.handlerProtocol==="h2"},Yz4=(A,q)=>{if(!q)return A;else return class extends A{constructor(Y){super(Y);for(let z of q)this.middlewareStack.use(z)}}},zz4=(A={},q)=>ve9(A,Yz4(up6.STSClient,q)),wz4=(A={},q)=>ke9(A,Yz4(up6.STSClient,q)),Ee9=(A)=>(q)=>A({roleAssumer:zz4(q),roleAssumerWithWebIdentity:wz4(q),...q});Object.defineProperty(DW1,"$Command",{enumerable:!0,get:function(){return cN.Command}});DW1.AssumeRoleCommand=GW1;DW1.AssumeRoleWithSAMLCommand=Lk8;DW1.AssumeRoleWithWebIdentityCommand=fW1;DW1.AssumeRootCommand=yk8;DW1.DecodeAuthorizationMessageCommand=Rk8;DW1.ExpiredTokenException=IY4;DW1.ExpiredTradeInTokenException=QY4;DW1.GetAccessKeyInfoCommand=Sk8;DW1.GetCallerIdentityCommand=Ck8;DW1.GetDelegatedAccessTokenCommand=hk8;DW1.GetFederationTokenCommand=Ik8;DW1.GetSessionTokenCommand=bk8;DW1.GetWebIdentityTokenCommand=xk8;DW1.IDPCommunicationErrorException=gY4;DW1.IDPRejectedClaimException=BY4;DW1.InvalidAuthorizationMessageException=FY4;DW1.InvalidIdentityTokenException=mY4;DW1.JWTPayloadSizeExceededException=UY4;DW1.MalformedPolicyDocumentException=bY4;DW1.OutboundWebIdentityFederationDisabledException=pY4;DW1.PackedPolicyTooLargeException=xY4;DW1.RegionDisabledException=uY4;DW1.STS=uk8;DW1.STSServiceException=lN;DW1.SessionDurationEscalationException=dY4;DW1.decorateDefaultCredentialProvider=Ee9;DW1.getDefaultRoleAssumer=zz4;DW1.getDefaultRoleAssumerWithWebIdentity=wz4;Object.keys(up6).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(DW1,A))Object.defineProperty(DW1,A,{enumerable:!0,get:function(){return up6[A]}})})});function $z4(A){return A?.name==="CredentialsProviderError"}function Oz4(A){if(!A||typeof A!=="object")return!1;let q=A;if(!q.Credentials||typeof q.Credentials!=="object")return!1;let K=q.Credentials;return typeof K.AccessKeyId==="string"&&typeof K.SecretAccessKey==="string"&&typeof K.SessionToken==="string"&&K.AccessKeyId.length>0&&K.SecretAccessKey.length>0&&K.SessionToken.length>0}async function Hz4(){try{L("Clearing AWS credential provider cache");let{fromIni:A}=await Promise.resolve().then(() => e(oX8(),1));await A({ignoreCache:!0})(),L("AWS credential provider cache refreshed")}catch(A){L("Failed to clear AWS credential cache (this is expected if no credentials are configured)")}}var Bk8=async()=>{let{STSClient:A,GetCallerIdentityCommand:q}=await Promise.resolve().then(() => e(_z4(),1));await new A().send(new q({}))};var mk8=k(()=>{G1()});async function*VW1(A,q,K){let Y=_6Y(K),z={model:K.model,thinkingConfig:K.thinkingConfig,...gq()?{fastMode:K.fastMode}:{}},w=null,_=0,$;for(let O=1;O<=Y+1;O++){if(K.signal?.aborted)throw new Rz;let H=gq()?z.fastMode&&!Jg():!1;try{if(w===null||$ instanceof V4&&$.status===401||Qk8($)||Mz4($)){if($ instanceof V4&&$.status===401||Qk8($)){let j=g7()?.accessToken;if(j)await Sf(j)}w=await A()}return await q(w,O,z)}catch(j){if($=j,L(`API error (attempt ${O}/${Y+1}): ${j instanceof V4?`${j.status} ${j.message}`:D1(j)}`,{level:"error"}),H&&j instanceof V4&&(j.status===429||Fk8(j))){let X=j.headers?.get("anthropic-ratelimit-unified-overage-disabled-reason");if(X!==null&&X!==void 0){cv7(X),z.fastMode=!1;continue}let P=j6Y(j);if(P!==null&&P=q6Y){if(K.fallbackModel)throw c("tengu_api_opus_fallback_triggered",{original_model:K.model,fallback_model:K.fallbackModel,provider:jK6()}),new TW1(K.model,K.fallbackModel);if(!process.env.IS_SANDBOX)throw c("tengu_api_custom_529_overloaded_error",{}),new EF(Error(pv8),z)}}if(O>Y)throw new EF(j,z);if(!z6Y(j)&&(!(j instanceof V4)||!w6Y(j)))throw new EF(j,z);if(j instanceof V4){let X=Jz4(j);if(X){let{inputTokens:P,contextLimit:W}=X,Z=1000,G=Math.max(0,W-P-1000);if(G (\d+)/,K=A.message.match(q);if(!K||K.length!==4)return;if(!K[1]||!K[2]||!K[3]){$6(Error("Unable to parse max_tokens from max_tokens exceed context limit error message"));return}let Y=parseInt(K[1],10),z=parseInt(K[2],10),w=parseInt(K[3],10);if(isNaN(Y)||isNaN(z)||isNaN(w))return;return{inputTokens:Y,maxTokens:z,contextLimit:w}}function Y6Y(A){if(!(A instanceof V4))return!1;return A.status===400&&(A.message?.includes("Fast mode is not enabled")??!1)}function Fk8(A){if(!(A instanceof V4))return!1;return A.status===529||(A.message?.includes('"type":"overloaded_error"')??!1)}function Qk8(A){return A instanceof V4&&A.status===403&&(A.message?.includes("OAuth token has been revoked")??!1)}function Mz4(A){if($1(process.env.CLAUDE_CODE_USE_BEDROCK)){if($z4(A)||A instanceof V4&&A.status===403)return!0}return!1}function z6Y(A){if(Mz4(A))return Qp6(),!0;return!1}function w6Y(A){if(HK4(A))return!1;if(A.message?.includes('"type":"overloaded_error"'))return!0;if(Jz4(A))return!0;let q=A.headers?.get("x-should-retry");if(q==="true"&&!A7())return!0;if(q==="false"){let K=A.status!==void 0&&A.status>=500;return!1}if(A instanceof bZ)return!0;if(!A.status)return!1;if(A.status===408)return!0;if(A.status===409)return!0;if(A.status===429)return!A7();if(A.status===401)return Fp6(),!0;if(Qk8(A))return!0;if(A.status&&A.status>=500)return!0;return!1}function gp6(){if(process.env.CLAUDE_CODE_MAX_RETRIES)return parseInt(process.env.CLAUDE_CODE_MAX_RETRIES,10);return A6Y}function _6Y(A){return A.maxRetries??gp6()}function j6Y(A){let q=jz4(A);if(q){let K=parseInt(q,10);if(!isNaN(K))return K*1000}return null}var A6Y=10,gk8=3000,q6Y=3,K6Y=500,EF,TW1,$6Y=1800000,O6Y=20000,H6Y=600000;var Yi=k(()=>{rV();x1();G1();Xq();yz();bA();B1();vF();mk8();vp6();SA();DF();Z8();aZ();MA();EF=class EF extends Error{originalError;retryContext;constructor(A,q){let K=D1(A);super(K);this.originalError=A;this.retryContext=q;if(this.name="RetryError",A instanceof Error&&A.stack)this.stack=A.stack}};TW1=class TW1 extends Error{originalModel;fallbackModel;constructor(A,q){super(`Model fallback triggered: ${A} -> ${q}`);this.originalModel=A;this.fallbackModel=q;this.name="FallbackTriggeredError"}}});function J6Y(A,q,K,Y){var z=A.length,w=K+(Y?1:-1);while(Y?w--:++w{Xz4=J6Y});function M6Y(A){return A!==A}var Wz4;var Zz4=k(()=>{Wz4=M6Y});function D6Y(A,q,K){var Y=K-1,z=A.length;while(++Y{Gz4=D6Y});function X6Y(A,q,K){return q===q?Gz4(A,q,K):Xz4(A,Wz4,K)}var Tz4;var Vz4=k(()=>{Pz4();Zz4();fz4();Tz4=X6Y});function P6Y(A,q){var K=A==null?0:A.length;return!!K&&Tz4(A,q,0)>-1}var Nz4;var vz4=k(()=>{Vz4();Nz4=P6Y});function W6Y(A,q,K){var Y=-1,z=A==null?0:A.length;while(++Y{kz4=W6Y});var Z6Y=1/0,G6Y,Lz4;var yz4=k(()=>{Jg1();lM8();T11();G6Y=!(xo&&1/AH6(new xo([,-0]))[1]==Z6Y)?sc:function(A){return new xo(A)},Lz4=G6Y});function T6Y(A,q,K){var Y=-1,z=Nz4,w=A.length,_=!0,$=[],O=$;if(K)_=!1,z=kz4;else if(w>=f6Y){var H=q?null:Lz4(A);if(H)return AH6(H);_=!1,z=G11,O=new Z11}else O=q?[]:$;A:while(++Y{tm1();vz4();Ez4();em1();yz4();T11();Rz4=T6Y});function V6Y(A,q){return A&&A.length?Rz4(A,hB(q,2)):[]}var zW;var zi=k(()=>{PH6();Sz4();zW=V6Y});function MK(A){return A}function Cz4(){N6Y.clear()}var N6Y;var B66=k(()=>{G1();B1();a1();x1();iz();N6Y=new Map});function hz4(A){return p8("tengu_lean_cast",!1)?L6Y:A}function Iz4(A){let q=R6Y.replace(NW1,hz4(E6Y));if(A&&A.trim()!=="")q+=` Additional Instructions: ${A}`;return q+=` IMPORTANT: Do NOT use any tools. You MUST respond with ONLY the ... block as your text output.`,q}function bz4(A){let q=y6Y.replace(NW1,hz4(k6Y));if(A&&A.trim()!=="")q+=` Additional Instructions: ${A}`;return q+=` IMPORTANT: Do NOT use any tools. You MUST respond with ONLY the ... block as your text output.`,q}function S6Y(A){let q=A;q=q.replace(/[\s\S]*?<\/analysis>/,"");let K=q.match(/([\s\S]*?)<\/summary>/);if(K){let Y=K[1]||"";q=q.replace(/[\s\S]*?<\/summary>/,`Summary: ${Y.trim()}`)}return q=q.replace(/\n\n+/g,` `),q.trim()}function Up6(A,q,K,Y){let w=`This session is being continued from a previous conversation that ran out of context. The summary below covers the earlier portion of the conversation. ${S6Y(A)}`;if(K)w+=` If you need specific details from before compaction (like exact code snippets, error messages, or content you generated), read the full transcript at: ${K}`;if(Y)w+=` Recent messages are preserved verbatim.`;if(q)return`${w} Continue the conversation from where it left off without asking the user any further questions. Resume directly — do not acknowledge the summary, do not recap what was happening, do not preface with "I'll continue" or similar. Pick up the last task as if the break never happened.`;return w}var k6Y=`Before providing your final summary, wrap your analysis in tags to organize your thoughts and ensure you've covered all necessary points. In your analysis process: 1. Chronologically analyze each message and section of the conversation. For each section thoroughly identify: - The user's explicit requests and intents - Your approach to addressing the user's requests - Key decisions, technical concepts and code patterns - Specific details like: - file names - full code snippets - function signatures - file edits - Errors that you ran into and how you fixed them - Pay special attention to specific user feedback that you received, especially if the user told you to do something differently. 2. Double-check for technical accuracy and completeness, addressing each required element thoroughly.`,E6Y=`Before providing your final summary, wrap your analysis in tags to organize your thoughts and ensure you've covered all necessary points. In your analysis process: 1. Analyze the recent messages chronologically. For each section thoroughly identify: - The user's explicit requests and intents - Your approach to addressing the user's requests - Key decisions, technical concepts and code patterns - Specific details like: - file names - full code snippets - function signatures - file edits - Errors that you ran into and how you fixed them - Pay special attention to specific user feedback that you received, especially if the user told you to do something differently. 2. Double-check for technical accuracy and completeness, addressing each required element thoroughly.`,L6Y=`Before providing your final summary, wrap your analysis in tags. Treat this as a private planning scratchpad — it is not the place for content meant to reach the user. Use it to plan, not to draft: - Walk through chronologically and note (in a line or two each) what belongs in each of the 9 sections below - Flag anything you might otherwise forget: a user correction, an unresolved error, the exact task in flight - Do NOT write code snippets, file contents, or verbatim quotes here — save those for where they will actually be kept The goal of is coverage, not detail. The detail goes in .`,NW1="<>",y6Y,R6Y;var Uk8=k(()=>{rA();y6Y=`Your task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions. This summary should be thorough in capturing technical details, code patterns, and architectural decisions that would be essential for continuing development work without losing context. ${NW1} Your summary should include the following sections: 1. Primary Request and Intent: Capture all of the user's explicit requests and intents in detail 2. Key Technical Concepts: List all important technical concepts, technologies, and frameworks discussed. 3. Files and Code Sections: Enumerate specific files and code sections examined, modified, or created. Pay special attention to the most recent messages and include full code snippets where applicable and include a summary of why this file read or edit is important. 4. Errors and fixes: List all errors that you ran into, and how you fixed them. Pay special attention to specific user feedback that you received, especially if the user told you to do something differently. 5. Problem Solving: Document problems solved and any ongoing troubleshooting efforts. 6. All user messages: List ALL user messages that are not tool results. These are critical for understanding the users' feedback and changing intent. 7. Pending Tasks: Outline any pending tasks that you have explicitly been asked to work on. 8. Current Work: Describe in detail precisely what was being worked on immediately before this summary request, paying special attention to the most recent messages from both user and assistant. Include file names and code snippets where applicable. 9. Optional Next Step: List the next step that you will take that is related to the most recent work you were doing. IMPORTANT: ensure that this step is DIRECTLY in line with the user's most recent explicit requests, and the task you were working on immediately before this summary request. If your last task was concluded, then only list next steps if they are explicitly in line with the users request. Do not start on tangential requests or really old requests that were already completed without confirming with the user first. If there is a next step, include direct quotes from the most recent conversation showing exactly what task you were working on and where you left off. This should be verbatim to ensure there's no drift in task interpretation. Here's an example of how your output should be structured: [Your thought process, ensuring all points are covered thoroughly and accurately] 1. Primary Request and Intent: [Detailed description] 2. Key Technical Concepts: - [Concept 1] - [Concept 2] - [...] 3. Files and Code Sections: - [File Name 1] - [Summary of why this file is important] - [Summary of the changes made to this file, if any] - [Important Code Snippet] - [File Name 2] - [Important Code Snippet] - [...] 4. Errors and fixes: - [Detailed description of error 1]: - [How you fixed the error] - [User feedback on the error if any] - [...] 5. Problem Solving: [Description of solved problems and ongoing troubleshooting] 6. All user messages: - [Detailed non tool use user message] - [...] 7. Pending Tasks: - [Task 1] - [Task 2] - [...] 8. Current Work: [Precise description of current work] 9. Optional Next Step: [Optional Next step to take] Please provide your summary based on the conversation so far, following this structure and ensuring precision and thoroughness in your response. There may be additional summarization instructions provided in the included context. If so, remember to follow these instructions when creating the above summary. Examples of instructions include: ## Compact Instructions When summarizing the conversation focus on typescript code changes and also remember the mistakes you made and how you fixed them. # Summary instructions When you are using compact - please focus on test output and code changes. Include file reads verbatim. `,R6Y=`Your task is to create a detailed summary of the RECENT portion of the conversation — the messages that follow earlier retained context. The earlier messages are being kept intact and do NOT need to be summarized. Focus your summary on what was discussed, learned, and accomplished in the recent messages only. ${NW1} Your summary should include the following sections: 1. Primary Request and Intent: Capture the user's explicit requests and intents from the recent messages 2. Key Technical Concepts: List important technical concepts, technologies, and frameworks discussed recently. 3. Files and Code Sections: Enumerate specific files and code sections examined, modified, or created. Include full code snippets where applicable and include a summary of why this file read or edit is important. 4. Errors and fixes: List errors encountered and how they were fixed. 5. Problem Solving: Document problems solved and any ongoing troubleshooting efforts. 6. All user messages: List ALL user messages from the recent portion that are not tool results. 7. Pending Tasks: Outline any pending tasks from the recent messages. 8. Current Work: Describe precisely what was being worked on immediately before this summary request. 9. Optional Next Step: List the next step related to the most recent work. Include direct quotes from the most recent conversation. Here's an example of how your output should be structured: [Your thought process, ensuring all points are covered thoroughly and accurately] 1. Primary Request and Intent: [Detailed description] 2. Key Technical Concepts: - [Concept 1] - [Concept 2] 3. Files and Code Sections: - [File Name 1] - [Summary of why this file is important] - [Important Code Snippet] 4. Errors and fixes: - [Error description]: - [How you fixed it] 5. Problem Solving: [Description] 6. All user messages: - [Detailed non tool use user message] 7. Pending Tasks: - [Task 1] 8. Current Work: [Precise description of current work] 9. Optional Next Step: [Optional Next step to take] Please provide your summary based on the RECENT messages only (after the retained earlier context), following this structure and ensuring precision and thoroughness in your response. `});import{createReadStream as C6Y,fstat as h6Y}from"fs";import{readFile as I6Y,stat as b6Y}from"fs/promises";async function mG6(A,q=0,K,Y,z){z?.throwIfAborted();let w=await b6Y(A);if(w.isDirectory())throw Error(`EISDIR: illegal operation on a directory, read '${A}'`);if(w.isFile()&&w.sizeY)throw new pp6(w.size,Y);let _=await I6Y(A,{encoding:"utf8",signal:z});return u6Y(_,w.mtimeMs,q,K)}return F6Y(A,q,K,Y,z)}function u6Y(A,q,K,Y){let z=Y!==void 0?K+Y:1/0,w=A.charCodeAt(0)===65279?A.slice(1):A,_=[],$=0,O=0,H;while((H=w.indexOf(` `,O))!==-1){if($>=K&&$=K&&${this.resolveMtime(q?0:K.mtimeMs)})}function m6Y(A){if(this.isFirstChunk){if(this.isFirstChunk=!1,A.charCodeAt(0)===65279)A=A.slice(1)}if(this.totalBytesRead+=Buffer.byteLength(A),this.maxBytes!==void 0&&this.totalBytesRead>this.maxBytes){this.stream.destroy(new pp6(this.totalBytesRead,this.maxBytes));return}let q=this.partial.length>0?this.partial+A:A;this.partial="";let K=0,Y;while((Y=q.indexOf(` `,K))!==-1){if(this.currentLineIndex>=this.offset&&this.currentLineIndex=this.offset&&this.currentLineIndex=this.offset&&this.currentLineIndex{this.resolve({content:q,lineCount:this.selectedLines.length,totalLines:this.currentLineIndex,totalBytes:this.totalBytesRead,readBytes:Buffer.byteLength(q,"utf8"),mtimeMs:K})})}function F6Y(A,q,K,Y,z){return new Promise((w,_)=>{let $={stream:C6Y(A,{encoding:"utf8",highWaterMark:524288,...z?{signal:z}:void 0}),offset:q,endLine:K!==void 0?q+K:1/0,maxBytes:Y,resolve:w,totalBytesRead:0,currentLineIndex:0,selectedLines:[],partial:"",isFirstChunk:!0,resolveMtime:()=>{},mtimeReady:null};$.mtimeReady=new Promise((O)=>{$.resolveMtime=O}),$.stream.once("open",B6Y.bind($)),$.stream.on("data",m6Y.bind($)),$.stream.once("end",g6Y.bind($)),$.stream.once("error",_)})}var x6Y=10485760,pp6;var vW1=k(()=>{p7();pp6=class pp6 extends Error{sizeInBytes;maxSizeBytes;constructor(A,q){super(`File content (${RK(A)}) exceeds maximum allowed size (${RK(q)}). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.`);this.sizeInBytes=A;this.maxSizeBytes=q;this.name="FileTooLargeError"}}});function pk8(A){if(/\d\s*<<\s*\d/.test(A)||/\[\[\s*\d+\s*<<\s*\d+\s*\]\]/.test(A)||/\$\(\(.*<<.*\)\)/.test(A))return!1;return/<<-?\s*(?:(['"]?)(\w+)\1|\\(\w+))/.test(A)}function Q6Y(A){let q=/'(?:[^'\\]|\\.)*\n(?:[^'\\]|\\.)*'/,K=/"(?:[^"\\]|\\.)*\n(?:[^"\\]|\\.)*"/;return q.test(A)||K.test(A)}function xz4(A,q=!0){if(pk8(A)||Q6Y(A)){let Y=`'${A.replace(/'/g,`'"'"'`)}'`;if(pk8(A))return Y;return q?`${Y} < /dev/null`:Y}if(q)return G4([A,"<","/dev/null"]);return G4([A])}function U6Y(A){return/(?:^|[\s;&|])<(?![<(])\s*\S+/.test(A)}function uz4(A){if(pk8(A))return!1;if(U6Y(A))return!1;return!0}function Bz4(A){return A.replace(p6Y,"$1/dev/null")}var p6Y;var mz4=k(()=>{ZM();p6Y=/(\d?&?>+\s*)[Nn][Uu][Ll](?=\s|$|[|&;)\n])/g});function Fz4(A){if(A.includes("`"))return dp6(A);if(A.includes("$("))return dp6(A);if(i6Y(A))return dp6(A);let q=n6Y(A),K=Xw(q);if(!K.success)return dp6(A);let Y=K.tokens,z=d6Y(Y);if(z<=0)return dp6(A);let w=[...gz4(Y,0,z),"< /dev/null",...gz4(Y,z,Y.length)];return G4([w.join(" ")])}function d6Y(A){for(let q=0;q&"&&typeof O==="string"&&/^[012]$/.test(O)){Y.push(`${_}>&${O}`),w+=2;continue}if($.op===">"&&O==="/dev/null"){Y.push(`${_}>/dev/null`),w+=2;continue}if($.op===">"&&typeof O==="string"&&O.startsWith("&")){let H=O.slice(1);if(/^[012]$/.test(H)){Y.push(`${_}>&${H}`),w+=2;continue}}}if(typeof _==="string")if(!z&&c6Y(_)){let O=_.indexOf("="),H=_.slice(0,O),j=_.slice(O+1),J=G4([j]);Y.push(`${H}=${J}`)}else z=!0,Y.push(G4([_]));else if(dk8(_)){if(_.op==="glob"&&"pattern"in _)Y.push(_.pattern);else if(Y.push(_.op),l6Y(_.op))z=!1}}return Y}function c6Y(A){return/^[A-Za-z_][A-Za-z0-9_]*=/.test(A)}function l6Y(A){return A==="&&"||A==="||"||A===";"}function dk8(A,q){if(!A||typeof A!=="object"||!("op"in A))return!1;return q?A.op===q:!0}function i6Y(A){return/\b(for|while|until|if|case|select)\s/.test(A)}function dp6(A){return G4([A])+" < /dev/null"}function n6Y(A){return A.replace(/\\+\n/g,(q)=>{let K=q.length-1;if(K%2===1)return"\\".repeat(K-1);else return q})}var Qz4=k(()=>{ZM()});import{mkdir as r6Y,stat as o6Y}from"fs/promises";import{execFile as a6Y}from"node:child_process";import{join as lk8}from"node:path";import*as kW1 from"node:os";function ik8(A,q,K,Y=[]){let z=G4([K]),w=Y.length>0?`${Y.join(" ")} "$@"`:'"$@"';return[`function ${A} {`," if [[ -n $ZSH_VERSION ]]; then",` ARGV0=${q} ${z} ${w}`,' elif [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "cygwin" ]] || [[ "$OSTYPE" == "win32" ]]; then',` ARGV0=${q} ${z} ${w}`," elif [[ $BASHPID != $$ ]]; then",` exec -a ${q} ${z} ${w}`," else",` (exec -a ${q} ${z} ${w})`," fi","}"].join(` `)}function s6Y(){let A=wM6();if(A.argv0)return{type:"function",snippet:ik8("rg",A.argv0,A.rgPath)};let q=G4([A.rgPath]),K=A.rgArgs.map((z)=>G4([z]));return{type:"alias",snippet:A.rgArgs.length>0?`${q} ${K.join(" ")}`:q}}function e6Y(){if(!cH())return null;let A=b44();return["unalias find 2>/dev/null || true","unalias grep 2>/dev/null || true",ik8("find","bfs",A,["-regextype","findutils-default"]),ik8("grep","ugrep",A,["--ignore-files","--hidden","-I",...t6Y.map((q)=>`--exclude-dir=${q}`)])].join(` `)}function nk8(A){let q=A.includes("zsh")?".zshrc":A.includes("bash")?".bashrc":".profile";return lk8(kW1.homedir(),q)}function A1Y(A){let q=A.endsWith(".zshrc"),K="";if(q)K+=` echo "# Functions" >> "$SNAPSHOT_FILE" # Force autoload all functions first typeset -f > /dev/null 2>&1 # Now get user function names - filter completion functions (single underscore prefix) # but keep double-underscore helpers (e.g. __zsh_like_cd from mise, __pyenv_init) typeset +f | grep -vE '^_[^_]' | while read func; do typeset -f "$func" >> "$SNAPSHOT_FILE" done `;else K+=` echo "# Functions" >> "$SNAPSHOT_FILE" # Force autoload all functions first declare -f > /dev/null 2>&1 # Now get user function names - filter completion functions (single underscore prefix) # but keep double-underscore helpers (e.g. __zsh_like_cd from mise, __pyenv_init) declare -F | cut -d' ' -f3 | grep -vE '^_[^_]' | while read func; do # Encode the function to base64, preserving all special characters encoded_func=$(declare -f "$func" | base64 ) # Write the function definition to the snapshot echo "eval ${ck8}"${ck8}$(echo '$encoded_func' | base64 -d)${ck8}" > /dev/null 2>&1" >> "$SNAPSHOT_FILE" done `;if(q)K+=` echo "# Shell Options" >> "$SNAPSHOT_FILE" setopt | sed 's/^/setopt /' | head -n 1000 >> "$SNAPSHOT_FILE" `;else K+=` echo "# Shell Options" >> "$SNAPSHOT_FILE" shopt -p | head -n 1000 >> "$SNAPSHOT_FILE" set -o | grep "on" | awk '{print "set -o " $1}' | head -n 1000 >> "$SNAPSHOT_FILE" echo "shopt -s expand_aliases" >> "$SNAPSHOT_FILE" `;return K+=` echo "# Aliases" >> "$SNAPSHOT_FILE" # Filter out winpty aliases on Windows to avoid "stdin is not a tty" errors # Git Bash automatically creates aliases like "alias node='winpty node.exe'" for # programs that need Win32 Console in mintty, but winpty fails when there's no TTY if [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "cygwin" ]]; then alias | grep -v "='winpty " | sed 's/^alias //g' | sed 's/^/alias -- /' | head -n 1000 >> "$SNAPSHOT_FILE" else alias | sed 's/^alias //g' | sed 's/^/alias -- /' | head -n 1000 >> "$SNAPSHOT_FILE" fi `,K}async function q1Y(){let A=process.env.PATH;if(c8()==="windows"){let z=await GY("echo $PATH",{shell:!0,reject:!1});if(z.exitCode===0&&z.stdout)A=z.stdout.trim()}let q=s6Y(),K="";if(K+=` # Check for rg availability echo "# Check for rg availability" >> "$SNAPSHOT_FILE" echo "if ! (unalias rg 2>/dev/null; command -v rg) >/dev/null 2>&1; then" >> "$SNAPSHOT_FILE" `,q.type==="function")K+=` cat >> "$SNAPSHOT_FILE" << 'RIPGREP_FUNC_END' ${q.snippet} RIPGREP_FUNC_END `;else{let z=q.snippet.replace(/'/g,"'\\''");K+=` echo ' alias rg='"'${z}'" >> "$SNAPSHOT_FILE" `}K+=` echo "fi" >> "$SNAPSHOT_FILE" `;let Y=e6Y();if(Y!==null)K+=` # Shadow find/grep with embedded bfs/ugrep (ant-native only) echo "# Shadow find/grep with embedded bfs/ugrep" >> "$SNAPSHOT_FILE" cat >> "$SNAPSHOT_FILE" << 'FIND_GREP_FUNC_END' ${Y} FIND_GREP_FUNC_END `;return K+=` # Add PATH to the file echo "export PATH=${G4([A||""])}" >> "$SNAPSHOT_FILE" `,K}async function K1Y(A,q,K){let Y=nk8(A),z=Y.endsWith(".zshrc"),w=K?A1Y(Y):!z?'echo "shopt -s expand_aliases" >> "$SNAPSHOT_FILE"':"",_=await q1Y();return`SNAPSHOT_FILE=${G4([q])} ${K?`source "${Y}" < /dev/null`:"# No user config file to source"} # First, create/clear the snapshot file echo "# Snapshot file" >| "$SNAPSHOT_FILE" # When this file is sourced, we first unalias to avoid conflicts # This is necessary because aliases get "frozen" inside function definitions at definition time, # which can cause unexpected behavior when functions use commands that conflict with aliases echo "# Unset all aliases to avoid conflicts with functions" >> "$SNAPSHOT_FILE" echo "unalias -a 2>/dev/null || true" >> "$SNAPSHOT_FILE" ${w} ${_} # Exit silently on success, only report errors if [ ! -f "$SNAPSHOT_FILE" ]; then echo "Error: Snapshot file was not created at $SNAPSHOT_FILE" >&2 exit 1 fi `}var ck8="\\",Uz4=1e4,t6Y,rk8=async(A)=>{let q=A.includes("zsh")?"zsh":A.includes("bash")?"bash":"sh";return L(`Creating shell snapshot for ${q} (${A})`),new Promise(async(K)=>{try{let Y=nk8(A);L(`Looking for shell config file: ${Y}`);let z=await $3(Y);if(!z)L(`Shell config file not found: ${Y}, creating snapshot with Claude Code defaults only`);let w=Date.now(),_=Math.random().toString(36).substring(2,8),$=lk8(OA(),"shell-snapshots");L(`Snapshots directory: ${$}`);let O=lk8($,`snapshot-${q}-${w}-${_}.sh`);await r6Y($,{recursive:!0});let H=await K1Y(A,O,z);L(`Creating snapshot at: ${O}`),L(`Execution timeout: ${Uz4}ms`),a6Y(A,["-c","-l",H],{env:{...process.env.CLAUDE_CODE_DONT_INHERIT_ENV?{}:process.env,SHELL:A,GIT_EDITOR:"true",CLAUDECODE:"1"},timeout:Uz4,maxBuffer:1048576,encoding:"utf8"},async(j,J,M)=>{if(j){let D=j;if(L(`Shell snapshot creation failed: ${j.message}`),L("Error details:"),L(` - Error code: ${D?.code}`),L(` - Error signal: ${D?.signal}`),L(` - Error killed: ${D?.killed}`),L(` - Shell path: ${A}`),L(` - Config file: ${nk8(A)}`),L(` - Config file exists: ${z}`),L(` - Working directory: ${I1()}`),L(` - Claude home: ${OA()}`),L(`Full snapshot script: ${H}`),J)L(`stdout output (${J.length} chars): ${J}`);else L("No stdout output captured");if(M)L(`stderr output (${M.length} chars): ${M}`);else L("No stderr output captured");$6(Error(`Failed to create shell snapshot: ${j.message}`));let X=D?.signal?kW1.constants.signals[D.signal]:void 0;c("tengu_shell_snapshot_failed",{stderr_length:M?.length||0,has_error_code:!!D?.code,error_signal_number:X,error_killed:D?.killed}),K(void 0)}else{let D;try{D=(await o6Y(O)).size}catch{}if(D!==void 0)L(`Shell snapshot created successfully (${D} bytes)`),Kq(async()=>{try{await P1().unlink(O),L(`Cleaned up session snapshot: ${O}`)}catch(X){L(`Error cleaning up session snapshot: ${X}`)}}),K(O);else{L(`Shell snapshot file not found after creation: ${O}`),L(`Checking if parent directory still exists: ${$}`);try{let X=await P1().readdir($);L(`Directory contains ${X.length} files`)}catch{L(`Parent directory does not exist or is not accessible: ${$}`)}c("tengu_shell_unknown_error",{}),K(void 0)}}})}catch(Y){if(L(`Unexpected error during snapshot creation: ${Y}`),Y instanceof Error)L(`Error stack trace: ${Y.stack}`);$6(Y),c("tengu_shell_snapshot_error",{}),K(void 0)}})};var pz4=k(()=>{p7();ZM();Ef();x1();B1();Z8();sY();Y7();uK();G1();EI();Ax();W7();t6Y=[".git",".svn",".hg",".bzr"]});function cz4(){return dz4}function lz4(){dz4.clear()}var dz4;var ok8=k(()=>{dz4=new Map});function rz4(){if(!iz4||nz4===null)return null;return`${iz4},${nz4},0`}var iz4=null,nz4=null;var oz4=k(()=>{aq();G1();x1();sY()});import{access as Y1Y}from"fs/promises";import{join as EW1}from"node:path/posix";import{join as z1Y}from"node:path";import{tmpdir as w1Y}from"node:os";function _1Y(A){if(process.env.CLAUDE_CODE_SHELL_PREFIX)return"{ shopt -u extglob || setopt NO_EXTENDED_GLOB; } >/dev/null 2>&1 || true";if(A.includes("bash"))return"shopt -u extglob 2>/dev/null || true";else if(A.includes("zsh"))return"setopt NO_EXTENDED_GLOB 2>/dev/null || true";return null}async function az4(A,q){let K,Y=q?.skipSnapshot?Promise.resolve(void 0):rk8(A).catch((w)=>{L(`Failed to create shell snapshot: ${w}`);return}),z;return{type:"bash",shellPath:A,detached:!0,async buildExecCommand(w,_){let $=await Y;if($)try{await Y1Y($)}catch{L(`Snapshot file missing, recreating: ${$}`),Y=rk8(A).catch((V)=>{L(`Failed to recreate shell snapshot: ${V}`);return}),$=await Y}z=$,K=_.sandboxTmpDir;let O=w1Y(),j=c8()==="windows"?yf(O):O,J=_.useSandbox?EW1(_.sandboxTmpDir,`cwd-${_.id}`):EW1(j,`claude-${_.id}-cwd`),M=_.useSandbox?EW1(_.sandboxTmpDir,`cwd-${_.id}`):z1Y(O,`claude-${_.id}-cwd`),D=Bz4(w),X=uz4(D),P=xz4(D,X);if(!_.useSandbox&&D.includes("|")&&X)P=Fz4(D);let W=[];if($){let V=c8()==="windows"?yf($):$;W.push(`source ${G4([V])}`)}let Z=await ZcA();if(Z)W.push(Z);let G=_1Y(A);if(G)W.push(G);W.push(`eval ${P}`),W.push(`pwd -P >| ${J}`);let f=W.join(" && ");if(process.env.CLAUDE_CODE_SHELL_PREFIX)f=w51(process.env.CLAUDE_CODE_SHELL_PREFIX,f);return{commandString:f,cwdFilePath:M}},getSpawnArgs(w){let _=z!==void 0;if(_)L("Spawning shell without login (-l flag skipped)");return["-c",..._?[]:["-l"],w]},async getEnvironmentOverrides(w){let _=w.includes("tmux"),$=rz4(),O={};if($)O.TMUX=$;if(K){let H=K;if(c8()==="windows")H=yf(H);O.TMPDIR=H,O.CLAUDE_CODE_TMPDIR=H,O.TMPPREFIX=EW1(H,"zsh")}for(let[H,j]of cz4())O[H]=j;return O}}}var sz4=k(()=>{ZM();O18();mz4();Qz4();pz4();_51();uK();jd();G1();ok8();oz4()});import{join as $1Y}from"path";import{tmpdir as O1Y}from"os";function tz4(A){return{type:"powershell",shellPath:A,detached:!1,async buildExecCommand(q,K){let Y=$1Y(O1Y(),`claude-pwd-ps-${K.id}`),w=` ; $_ec = if (!$?) { if ($LASTEXITCODE) { $LASTEXITCODE } else { 1 } } else { 0 } ; (Get-Location).Path | Out-File -FilePath '${Y.replace(/'/g,"''")}' -Encoding utf8 -NoNewline ; exit $_ec`;return{commandString:q+w,cwdFilePath:Y}},getSpawnArgs(q){return["-NoProfile","-NonInteractive","-Command",q]},async getEnvironmentOverrides(){return{}}}}var ez4=()=>{};async function H1Y(){let A=await f0("pwsh");if(A)return A;let q=await f0("powershell");if(q)return q;return null}function Aw4(){if(!ak8)ak8=H1Y();return ak8}var ak8=null;var qw4=k(()=>{tB()});import{constants as cp6,realpathSync as Kw4,readFileSync as j1Y,unlinkSync as J1Y,openSync as M1Y,closeSync as Yw4}from"node:fs";import{mkdir as D1Y}from"fs/promises";import{execFileSync as X1Y,spawn as P1Y}from"node:child_process";import{isAbsolute as W1Y,resolve as Z1Y}from"node:path";import{join as G1Y}from"node:path/posix";import{accessSync as f1Y}from"fs";function sk8(A){try{return f1Y(A,cp6.X_OK),!0}catch(q){try{return X1Y(A,["--version"],{timeout:1000,stdio:"ignore"}),!0}catch{return!1}}}async function V1Y(){let A=process.env.CLAUDE_CODE_SHELL;if(A)if((A.includes("bash")||A.includes("zsh"))&&sk8(A))return L(`Using shell override: ${A}`),A;else L(`CLAUDE_CODE_SHELL="${A}" is not a valid bash/zsh path, falling back to detection`);let q=process.env.SHELL,K=q&&(q.includes("bash")||q.includes("zsh")),Y=q?.includes("bash"),[z,w]=await Promise.all([f0("zsh"),f0("bash")]),_=["/bin","/usr/bin","/usr/local/bin","/opt/homebrew/bin"],O=(Y?["bash","zsh"]:["zsh","bash"]).flatMap((j)=>_.map((J)=>`${J}/${j}`));if(Y){if(w)O.unshift(w);if(z)O.push(z)}else{if(z)O.unshift(z);if(w)O.push(w)}if(K&&sk8(q))O.unshift(q);let H=O.find((j)=>j&&sk8(j));if(!H){let j="No suitable shell found. Claude CLI requires a Posix shell environment. Please ensure you have a valid shell installed and the SHELL environment variable set.";throw $6(Error(j)),Error(j)}return H}async function N1Y(){let A=await V1Y();return{provider:await az4(A)}}async function LW1(A,q,K,Y,z,w,_,$){let O=Y||T1Y,H=await k1Y[K](),j=Math.floor(Math.random()*65536).toString(16).padStart(4,"0"),J=G1Y(process.env.CLAUDE_CODE_TMPDIR||"/tmp",tk8()),{commandString:M,cwdFilePath:D}=await H.buildExecCommand(A,{id:j,sandboxTmpDir:_?J:void 0,useSandbox:_??!1}),X=M,P=Fq1();try{Kw4(P)}catch{let y=DA();L(`Shell CWD "${P}" no longer exists, recovering to "${y}"`);try{Kw4(y),a11(y),P=y}catch{return KcA(`Working directory "${P}" no longer exists. Please restart Claude from an existing directory.`)}}if(q.aborted)return w18();let W=H.shellPath;if(_){X=await mA.wrapWithSandbox(X,W,void 0,q);try{P1().mkdirSync(J,{mode:448})}catch(y){L(`Failed to create ${J} directory: ${y}`)}}let Z=H.getSpawnArgs(X),G=await H.getEnvironmentOverrides(A),f=tk("local_bash"),V=new w$(f,z??null,!0);await D1Y(EK6(),{recursive:!0});let N=cp6.O_NOFOLLOW??0,v=M1Y(V.path,process.platform==="win32"?"w":cp6.O_WRONLY|cp6.O_CREAT|cp6.O_APPEND|N);try{let y=P1Y(W,Z,{env:{...process.env,SHELL:K==="bash"?W:void 0,GIT_EDITOR:"true",CLAUDECODE:"1",...G,...{}},cwd:P,stdio:["pipe",v,v],detached:H.detached,windowsHide:!0});Yw4(v);let R=K51(y,q,O,V,$),h=c8()==="windows"?Eh6(D):D;return R.result.then(async(B)=>{if(_)mA.cleanupAfterCommand();if(B&&!w&&!B.backgroundTaskId)try{let x=j1Y(h,{encoding:"utf8"}).trim();if(c8()==="windows")x=Eh6(x);rH(x,P)}catch{c("tengu_shell_set_cwd",{success:!1})}try{J1Y(h)}catch{}}),R}catch(y){try{Yw4(v)}catch{}return V.clear(),L(`Shell exec error: ${D1(y)}`),w18(void 0,{code:126,stderr:D1(y)})}}function rH(A,q){let K=W1Y(A)?A:Z1Y(q||P1().cwd(),A);if(!P1().existsSync(K))throw Error(`Path "${K}" does not exist`);let Y=P1().realpathSync(K);a11(Y);try{c("tengu_shell_set_cwd",{success:!0})}catch(z){}}var T1Y=1800000,v1Y,k1Y;var Jx=k(()=>{tB();x1();B1();_18();Ed();II6();BD();Y7();Q1();G1();Eq();W7();MA();iz();sz4();ez4();qw4();Pw();jd();uK();v1Y=T8(N1Y),k1Y={bash:async()=>(await v1Y()).provider,powershell:async()=>{let A=await Aw4();if(!A)throw Error("PowerShell is not available");return tz4(A)}}});function zw4(A){let q=A.split(` `),K=0;while(K=0&&q[Y]?.trim()==="")Y--;if(K>Y)return"";return q.slice(K,Y+1).join(` `)}function ek8(A){return/^data:image\/[a-z0-9.+_-]+;base64,/i.test(A)}function ww4(A){let q=ek8(A);if(q)return{totalLines:1,truncatedContent:A,isImage:q};let K=A51();if(A.length<=K)return{totalLines:A.split(` `).length,truncatedContent:A,isImage:q};let Y=A.slice(0,K),z=A.slice(K).split(` `).length,w=`${Y} ... [${z} lines truncated] ...`;return{totalLines:A.split(` `).length,truncatedContent:w,isImage:q}}function RW1(A){if(bF1()||!Mx(I1(),A)){if(rH(DA()),!bF1())return c("tengu_bash_tool_reset_to_original_dir",{}),!0}return!1}var yW1=(A)=>`${A.trim()} Shell cwd was reset to ${DA()}`;var lp6=k(()=>{Z8();q51();iz();Q1();B1();W7();Jx()});function AE8(A){if(!A)return"";let q=Array.isArray(A)?A.join(""):A,{truncatedContent:K}=ww4(q);return K}function L1Y(A){if(typeof A["image/png"]==="string")return{image_data:A["image/png"].replace(/\s/g,""),media_type:"image/png"};if(typeof A["image/jpeg"]==="string")return{image_data:A["image/jpeg"].replace(/\s/g,""),media_type:"image/jpeg"};return}function y1Y(A){switch(A.output_type){case"stream":return{output_type:A.output_type,text:AE8(A.text)};case"execute_result":case"display_data":return{output_type:A.output_type,text:AE8(A.data?.["text/plain"]),image:A.data&&L1Y(A.data)};case"error":return{output_type:A.output_type,text:AE8(`${A.ename}: ${A.evalue} ${A.traceback.join(` `)}`)}}}function _w4(A,q,K,Y){let z=A.id??`cell-${q}`,w={cellType:A.cell_type,source:Array.isArray(A.source)?A.source.join(""):A.source,execution_count:A.cell_type==="code"?A.execution_count||void 0:void 0,cell_id:z};if(A.cell_type==="code")w.language=K;if(A.cell_type==="code"&&A.outputs?.length){let _=A.outputs.map(y1Y);if(!Y&&U6(_).length>1e4)w.outputs=[{output_type:"stream",text:`Outputs are too large to include. Use ${f4} with: cat | jq '.cells[${q}].outputs'`}];else w.outputs=_}return w}function R1Y(A){let q=[];if(A.cellType!=="code")q.push(`${A.cellType}`);if(A.language!=="python"&&A.cellType==="code")q.push(`${A.language}`);return{text:`${q.join("")}${A.source}`,type:"text"}}function S1Y(A){let q=[];if(A.text)q.push({text:` ${A.text}`,type:"text"});if(A.image)q.push({type:"image",source:{data:A.image.image_data,media_type:A.image.media_type,type:"base64"}});return q}function C1Y(A){let q=R1Y(A),K=A.outputs?.flatMap(S1Y);return[q,...K??[]]}async function $w4(A,q){let K=t4(A),z=(await P1().readFileBytes(K)).toString("utf-8"),w=O8(z),_=w.metadata.language_info?.name??"python";if(q){let $=w.cells.find((O)=>O.id===q);if(!$)throw Error(`Cell with ID "${q}" not found in notebook`);return[_w4($,w.cells.indexOf($),_,!0)]}return w.cells.map(($,O)=>_w4($,O,_,!1))}function Ow4(A,q){let K=A.flatMap(C1Y);return{tool_use_id:q,type:"tool_result",content:K.reduce((Y,z)=>{if(Y.length===0)return[z];let w=Y[Y.length-1];if(w&&w.type==="text"&&z.type==="text")return w.text+=` `+z.text,Y;return Y.push(z),Y},[])}}function ip6(A){let q=A.match(/^cell-(\d+)$/);if(q&&q[1]){let K=parseInt(q[1],10);return isNaN(K)?void 0:K}return}var SW1=k(()=>{lp6();Kz();Y7();a1()});var Hw4=50000,qE8=4,jw4=400000,Dx=50;import{join as KE8}from"path";import{mkdir as h1Y,writeFile as I1Y,stat as b1Y}from"fs/promises";function Jw4(A,q){let Y=p8(B1Y,{})?.[A];if(typeof Y==="number"&&Number.isFinite(Y)&&Y>0)return Y;return Math.min(q,Hw4)}function m1Y(){return KE8(bJ(DA()),d1())}function m66(){return KE8(m1Y(),YE8)}function zE8(A,q){let K=q?"json":"txt";return KE8(m66(),`${A}.${K}`)}async function np6(){try{await h1Y(m66(),{recursive:!0})}catch{}}async function wE8(A,q){let K=Array.isArray(A);if(K){if(A.some((H)=>H.type!=="text"))return{error:"Cannot persist tool results containing non-text content"}}await np6();let Y=zE8(q,K),z=K?U6(A,null,2):A,w=!1;try{await b1Y(Y),w=!0}catch{}if(!w){try{await I1Y(Y,z,"utf-8")}catch(O){let H=O instanceof Error?O:Error(String(O));return $6(H),{error:g1Y(H)}}L(`Persisted tool result to ${Y} (${RK(z.length)})`)}let{preview:_,hasMore:$}=$E8(z,CW1);return{filepath:Y,originalSize:z.length,isJson:K,preview:_,hasMore:$}}function _E8(A){let q=`${x1Y} `;return q+=`Output too large (${RK(A.originalSize)}). Full output saved to: ${A.filepath} `,q+=`Preview (first ${RK(CW1)}): `,q+=A.preview,q+=A.hasMore?` ... `:` `,q+=u1Y,q}async function gG6(A,q,K){let Y=A.mapToolResultToToolResultBlockParam(q,K);return Dw4(Y,A.name,Jw4(A.name,A.maxResultSizeChars))}async function Mw4(A,q,K){return Dw4(A,q,Jw4(q,K))}async function Dw4(A,q,K){let Y=A.content;if(!Y)return A;if(Array.isArray(Y)){if(Y.some((H)=>typeof H==="object"&&("type"in H)&&H.type==="image"))return A}let z=typeof Y==="string"?Y.length:U6(Y).length,w=K??jw4;if(z<=w)return A;let _=await wE8(Y,A.tool_use_id);if(OE8(_))return A;let $=_E8(_);return c("tengu_tool_result_persisted",{toolName:wK(q),originalSizeBytes:_.originalSize,persistedSizeBytes:$.length,estimatedOriginalTokens:Math.ceil(_.originalSize/qE8),estimatedPersistedTokens:Math.ceil($.length/qE8),thresholdUsed:w}),{...A,content:$}}function $E8(A,q){if(A.length<=q)return{preview:A,hasMore:!1};let Y=A.slice(0,q).lastIndexOf(` `),z=Y>q*0.5?Y:q;return{preview:A.slice(0,z),hasMore:!0}}function OE8(A){return"error"in A}function g1Y(A){let q=A;if(q.code)switch(q.code){case"ENOENT":return`Directory not found: ${q.path??"unknown path"}`;case"EACCES":return`Permission denied: ${q.path??"unknown path"}`;case"ENOSPC":return"No space left on device";case"EROFS":return"Read-only file system";case"EMFILE":return"Too many open files";case"EEXIST":return`File already exists: ${q.path??"unknown path"}`;default:return`${q.code}: ${q.message}`}return A.message}var YE8="tool-results",x1Y="",u1Y="",B1Y="tengu_satin_quoll",CW1=2000;var LF=k(()=>{G1();x1();p7();B1();ij();rA();Q1();uq();a1()});import{randomUUID as F1Y}from"crypto";import{join as Xw4}from"path";import{mkdir as Q1Y,readdir as U1Y,readFile as p1Y}from"fs/promises";async function Pw4(A){try{let Y=(await P1().stat(A)).size;if(Y===0)return{success:!1,error:{reason:"empty",message:`PDF file is empty: ${A}`}};if(Y>GG6)return{success:!1,error:{reason:"too_large",message:`PDF file exceeds maximum allowed size of ${RK(GG6)}.`}};let z=await p1Y(A);if(!z.subarray(0,5).toString("ascii").startsWith("%PDF-"))return{success:!1,error:{reason:"corrupted",message:`File is not a valid PDF (missing %PDF- header): ${A}`}};let _=z.toString("base64");return{success:!0,data:{type:"pdf",file:{filePath:A,base64:_,originalSize:Y}}}}catch(q){return{success:!1,error:{reason:"unknown",message:D1(q)}}}}async function IW1(A){let{code:q,stdout:K}=await W8("pdfinfo",[A],{timeout:1e4,useCwd:!1});if(q!==0)return null;let Y=/^Pages:\s+(\d+)/m.exec(K);if(!Y)return null;let z=parseInt(Y[1],10);return isNaN(z)?null:z}async function d1Y(){if(hW1!==void 0)return hW1;let{code:A,stderr:q}=await W8("pdftoppm",["-v"],{timeout:5000,useCwd:!1});return hW1=A===0||q.length>0,hW1}async function HE8(A,q){try{let z=(await P1().stat(A)).size;if(z===0)return{success:!1,error:{reason:"empty",message:`PDF file is empty: ${A}`}};if(z>Mv8)return{success:!1,error:{reason:"too_large",message:`PDF file exceeds maximum allowed size for text extraction (${RK(Mv8)}).`}};if(!await d1Y())return{success:!1,error:{reason:"unavailable",message:"pdftoppm is not installed. Install poppler-utils (e.g. `brew install poppler` or `apt-get install poppler-utils`) to enable PDF page rendering."}};let _=F1Y(),$=Xw4(m66(),`pdf-${_}`);await Q1Y($,{recursive:!0});let O=Xw4($,"page"),H=["-jpeg","-r","100"];if(q?.firstPage)H.push("-f",String(q.firstPage));if(q?.lastPage&&q.lastPage!==1/0)H.push("-l",String(q.lastPage));H.push(A,O);let{code:j,stderr:J}=await W8("pdftoppm",H,{timeout:120000,useCwd:!1});if(j!==0){if(/password/i.test(J))return{success:!1,error:{reason:"password_protected",message:"PDF is password-protected. Please provide an unprotected version."}};if(/damaged|corrupt|invalid/i.test(J))return{success:!1,error:{reason:"corrupted",message:"PDF file is corrupted or invalid."}};return{success:!1,error:{reason:"unknown",message:`pdftoppm failed: ${J}`}}}let D=(await U1Y($)).filter((W)=>W.endsWith(".jpg")).sort();if(D.length===0)return{success:!1,error:{reason:"corrupted",message:"pdftoppm produced no output pages. The PDF may be invalid."}};let P=D.length;return{success:!0,data:{type:"parts",file:{filePath:A,originalSize:z,outputDir:$,count:P}}}}catch(K){return{success:!1,error:{reason:"unknown",message:D1(K)}}}}var hW1;var jE8=k(()=>{Y7();p7();LF();aq();MA()});function Ww4(A){let q=Y6(10),{children:K,lock:Y}=A,z=Y===void 0?"always":Y,[w,_]=Ze(),{isVisible:$}=_,{rows:O}=PA(),H=yF.useRef(null),j=yF.useRef(0),[J,M]=yF.useState(0),D;if(q[0]!==w)D=(V)=>{w(V)},q[0]=w,q[1]=D;else D=q[1];let X=D,P=z==="always"||!$,W;if(q[2]!==O)W=()=>{if(!H.current)return;let{height:V}=wW6(H.current);if(V>j.current)j.current=Math.min(V,O),M(j.current)},q[2]=O,q[3]=W;else W=q[3];yF.useLayoutEffect(W);let Z=P?J:void 0,G;if(q[4]!==K)G=yF.default.createElement(m,{ref:H,flexDirection:"column"},K),q[4]=K,q[5]=G;else G=q[5];let f;if(q[6]!==X||q[7]!==Z||q[8]!==G)f=yF.default.createElement(m,{minHeight:Z,ref:X},G),q[6]=X,q[7]=Z,q[8]=G,q[9]=f;else f=q[9];return f}var yF;var Zw4=k(()=>{K1();n6();xq();bg6();yF=e(W6(),1)});function M8(A){let q=Y6(8),{children:K,height:Y}=A;if(Gw4.useContext(fw4))return K;let w;if(q[0]===Symbol.for("react.memo_cache_sentinel"))w=kT.createElement(T,null," ","⎿  "),q[0]=w;else w=q[0];let _;if(q[1]!==K)_=kT.createElement(m,{flexShrink:1,flexGrow:1},K),q[1]=K,q[2]=_;else _=q[2];let $;if(q[3]!==Y||q[4]!==_)$=kT.createElement(c1Y,null,kT.createElement(m,{flexDirection:"row",height:Y,overflowY:"hidden"},w,_)),q[3]=Y,q[4]=_,q[5]=$;else $=q[5];let O=$;if(Y!==void 0)return O;let H;if(q[6]!==O)H=kT.createElement(Ww4,{lock:"offscreen"},O),q[6]=O,q[7]=H;else H=q[7];return H}function c1Y(A){let q=Y6(2),{children:K}=A,Y;if(q[0]!==K)Y=kT.createElement(fw4.Provider,{value:!0},K),q[0]=K,q[1]=Y;else Y=q[1];return Y}var kT,Gw4,fw4;var DK=k(()=>{K1();n6();Zw4();kT=e(W6(),1),Gw4=e(W6(),1);fw4=kT.createContext(!1)});function SF(){let A=Y6(1),q;if(A[0]===Symbol.for("react.memo_cache_sentinel"))q=RF.createElement(RF.Fragment,null,RF.createElement(T,{dimColor:!0},"Interrupted "),RF.createElement(T,{dimColor:!0},"· What should Claude do instead?")),A[0]=q;else q=A[0];return q}var RF;var FG6=k(()=>{K1();n6();RF=e(W6(),1)});function N9(){let A=Y6(1),q;if(A[0]===Symbol.for("react.memo_cache_sentinel"))q=rp6.createElement(M8,{height:1},rp6.createElement(SF,null)),A[0]=q;else q=A[0];return q}var rp6;var rM=k(()=>{K1();DK();FG6();rp6=e(W6(),1)});var l1Y,i1Y,n1Y,QG6;var bW1=k(()=>{uK();l1Y=c8()==="windows"?"alt+v":"ctrl+v",i1Y=c8()!=="windows"||(fJ6()?ij8(process.versions.bun,">=1.2.23"):ij8(process.versions.node,">=22.17.0 <23.0.0 || >=24.2.0")),n1Y=i1Y?"shift+tab":"meta+m",QG6=[{context:"Global",bindings:{"ctrl+c":"app:interrupt","ctrl+d":"app:exit","ctrl+t":"app:toggleTodos","ctrl+o":"app:toggleTranscript","ctrl+shift+o":"app:toggleTeammatePreview","ctrl+r":"history:search",...{},...{}}},{context:"Chat",bindings:{escape:"chat:cancel","ctrl+f":"chat:killAgents",[n1Y]:"chat:cycleMode","meta+p":"chat:modelPicker","meta+o":"chat:fastMode","meta+t":"chat:thinkingToggle",enter:"chat:submit",up:"history:previous",down:"history:next","ctrl+_":"chat:undo","ctrl+shift+-":"chat:undo","ctrl+g":"chat:externalEditor","ctrl+s":"chat:stash",[l1Y]:"chat:imagePaste",...{space:"voice:pushToTalk"}}},{context:"Autocomplete",bindings:{tab:"autocomplete:accept",escape:"autocomplete:dismiss",up:"autocomplete:previous",down:"autocomplete:next"}},{context:"Settings",bindings:{escape:"confirm:no",up:"select:previous",down:"select:next",k:"select:previous",j:"select:next","ctrl+p":"select:previous","ctrl+n":"select:next",enter:"select:accept",space:"select:accept","/":"settings:search",r:"settings:retry"}},{context:"Confirmation",bindings:{y:"confirm:yes",n:"confirm:no",enter:"confirm:yes",escape:"confirm:no",up:"confirm:previous",down:"confirm:next",tab:"confirm:nextField",space:"confirm:toggle","shift+tab":"confirm:cycleMode","ctrl+e":"confirm:toggleExplanation","ctrl+d":"permission:toggleDebug"}},{context:"Tabs",bindings:{tab:"tabs:next","shift+tab":"tabs:previous",right:"tabs:next",left:"tabs:previous"}},{context:"Transcript",bindings:{"ctrl+e":"transcript:toggleShowAll","ctrl+c":"transcript:exit",escape:"transcript:exit"}},{context:"HistorySearch",bindings:{"ctrl+r":"historySearch:next",escape:"historySearch:accept",tab:"historySearch:accept","ctrl+c":"historySearch:cancel",enter:"historySearch:execute"}},{context:"Task",bindings:{"ctrl+b":"task:background"}},{context:"ThemePicker",bindings:{"ctrl+t":"theme:toggleSyntaxHighlighting"}},...[],{context:"Help",bindings:{escape:"help:dismiss"}},{context:"Attachments",bindings:{right:"attachments:next",left:"attachments:previous",backspace:"attachments:remove",delete:"attachments:remove",down:"attachments:exit",escape:"attachments:exit"}},{context:"Footer",bindings:{right:"footer:next",left:"footer:previous",enter:"footer:openSelected",escape:"footer:clearSelection"}},{context:"MessageSelector",bindings:{up:"messageSelector:up",down:"messageSelector:down",k:"messageSelector:up",j:"messageSelector:down","ctrl+p":"messageSelector:up","ctrl+n":"messageSelector:down","ctrl+up":"messageSelector:top","shift+up":"messageSelector:top","meta+up":"messageSelector:top","shift+k":"messageSelector:top","ctrl+down":"messageSelector:bottom","shift+down":"messageSelector:bottom","meta+down":"messageSelector:bottom","shift+j":"messageSelector:bottom",enter:"messageSelector:select"}},{context:"DiffDialog",bindings:{escape:"diff:dismiss",left:"diff:previousSource",right:"diff:nextSource",up:"diff:previousFile",down:"diff:nextFile",enter:"diff:viewDetails"}},{context:"ModelPicker",bindings:{left:"modelPicker:decreaseEffort",right:"modelPicker:increaseEffort"}},{context:"Select",bindings:{up:"select:previous",down:"select:next",j:"select:next",k:"select:previous","ctrl+n":"select:next","ctrl+p":"select:previous",enter:"select:accept",escape:"select:cancel"}},{context:"Plugin",bindings:{space:"plugin:toggle",i:"plugin:install"}}]});function Tw4(){let A=c8(),q=[...op6,...ME8];if(A==="macos")q.push(...DE8);return q}function pY6(A){let q=A.split("+"),K=[],Y="";for(let z of q){let _=z.trim().toLowerCase();if(["ctrl","control","alt","opt","option","meta","cmd","command","shift"].includes(_))if(_==="control")K.push("ctrl");else if(_==="option"||_==="opt")K.push("alt");else if(_==="command"||_==="cmd")K.push("cmd");else K.push(_);else Y=_}return K.sort(),[...K,Y].join("+")}var op6,ME8,DE8;var xW1=k(()=>{uK();op6=[{key:"ctrl+c",reason:"Cannot be rebound - used for interrupt/exit (hardcoded)",severity:"error"},{key:"ctrl+d",reason:"Cannot be rebound - used for exit (hardcoded)",severity:"error"},{key:"ctrl+m",reason:"Cannot be rebound - identical to Enter in terminals (both send CR)",severity:"error"}],ME8=[{key:"ctrl+z",reason:"Unix process suspend (SIGTSTP)",severity:"warning"},{key:"ctrl+\\",reason:"Terminal quit signal (SIGQUIT)",severity:"error"}],DE8=[{key:"cmd+c",reason:"macOS system copy",severity:"error"},{key:"cmd+v",reason:"macOS system paste",severity:"error"},{key:"cmd+x",reason:"macOS system cut",severity:"error"},{key:"cmd+q",reason:"macOS quit application",severity:"error"},{key:"cmd+w",reason:"macOS close window/tab",severity:"error"},{key:"cmd+tab",reason:"macOS app switcher",severity:"error"},{key:"cmd+space",reason:"macOS Spotlight",severity:"error"}]});function r1Y(A){if(typeof A!=="object"||A===null)return!1;let q=A;return typeof q.context==="string"&&typeof q.bindings==="object"&&q.bindings!==null}function o1Y(A){return Array.isArray(A)&&A.every(r1Y)}function a1Y(A){return Vw4.includes(A)}function s1Y(A){let q=A.toLowerCase().split("+");for(let Y of q)if(!Y.trim())return{type:"parse_error",severity:"error",message:`Empty key part in "${A}"`,key:A,suggestion:'Remove extra "+" characters'};let K=ug6(A);if(!K.key&&!K.ctrl&&!K.alt&&!K.shift&&!K.meta)return{type:"parse_error",severity:"error",message:`Could not parse keystroke "${A}"`,key:A};return null}function t1Y(A,q){let K=[];if(typeof A!=="object"||A===null)return K.push({type:"parse_error",severity:"error",message:`Keybinding block ${q+1} is not an object`}),K;let Y=A,z=Y.context,w;if(typeof z!=="string")K.push({type:"parse_error",severity:"error",message:`Keybinding block ${q+1} missing "context" field`});else if(!a1Y(z))K.push({type:"invalid_context",severity:"error",message:`Unknown context "${z}"`,context:z,suggestion:`Valid contexts: ${Vw4.join(", ")}`});else w=z;if(typeof Y.bindings!=="object"||Y.bindings===null)return K.push({type:"parse_error",severity:"error",message:`Keybinding block ${q+1} missing "bindings" field`}),K;let _=Y.bindings;for(let[$,O]of Object.entries(_)){let H=s1Y($);if(H)H.context=w,K.push(H);if(O!==null&&typeof O!=="string")K.push({type:"invalid_action",severity:"error",message:`Invalid action for "${$}": must be a string or null`,key:$,context:w});else if(typeof O==="string"&&O.startsWith("command:")){if(!/^command:[a-zA-Z0-9:\-_]+$/.test(O))K.push({type:"invalid_action",severity:"warning",message:`Invalid command binding "${O}" for "${$}": command name may only contain alphanumeric characters, colons, hyphens, and underscores`,key:$,context:w,action:O});if(w&&w!=="Chat")K.push({type:"invalid_action",severity:"warning",message:`Command binding "${O}" must be in "Chat" context, not "${w}"`,key:$,context:w,action:O,suggestion:'Move this binding to a block with "context": "Chat"'})}else if(O==="voice:pushToTalk"){let j=jD8($)[0];if(j&&!j.ctrl&&!j.alt&&!j.shift&&!j.meta&&/^[a-z]$/.test(j.key))K.push({type:"invalid_action",severity:"warning",message:`Binding "${$}" to voice:pushToTalk prints into the input during warmup; use space or a modifier combo like meta+k`,key:$,context:w,action:O})}}return K}function XE8(A){let q=[],K=/"bindings"\s*:\s*\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g,Y;while((Y=K.exec(A))!==null){let z=Y[1];if(!z)continue;let $=A.slice(0,Y.index).match(/"context"\s*:\s*"([^"]+)"[^{]*$/)?.[1]??"unknown",O=/"([^"]+)"\s*:/g,H=new Map,j;while((j=O.exec(z))!==null){let J=j[1];if(!J)continue;let M=(H.get(J)??0)+1;if(H.set(J,M),M===2)q.push({type:"duplicate",severity:"warning",message:`Duplicate key "${J}" in ${$} bindings`,key:J,context:$,suggestion:"This key appears multiple times in the same context. JSON uses the last value, earlier values are ignored."})}}return q}function e1Y(A){let q=[];if(!Array.isArray(A))return q.push({type:"parse_error",severity:"error",message:"keybindings.json must contain an array",suggestion:"Wrap your bindings in [ ]"}),q;for(let K=0;Kug6(_));q.push({chord:w,action:z,context:K.context})}return q}function PE8(A,q){let K=[];if(K.push(...e1Y(A)),o1Y(A)){K.push(...A8Y(A));let z=K8Y(A);K.push(...q8Y(z))}let Y=new Set;return K.filter((z)=>{let w=`${z.type}:${z.key}:${z.context}`;if(Y.has(w))return!1;return Y.add(w),!0})}var Vw4;var Nw4=k(()=>{xW1();Vw4=["Global","Chat","Autocomplete","Confirmation","Help","Transcript","HistorySearch","Task","ThemePicker","Settings","Tabs","Attachments","Footer","MessageSelector","DiffDialog","ModelPicker","Select","Plugin"]});import{readFile as Y8Y,stat as z8Y}from"fs/promises";import{readFileSync as w8Y}from"fs";import{join as _8Y,dirname as $8Y}from"path";function eE(){return p8("tengu_keybinding_customization_release",!1)}function yw4(A){let q=new Date().toISOString().slice(0,10);if(kw4===q)return;kw4=q,c("tengu_custom_keybindings_loaded",{user_binding_count:A})}function j8Y(A){return typeof A==="object"&&A!==null&&"code"in A&&typeof A.code==="string"}function J8Y(A){if(typeof A!=="object"||A===null)return!1;let q=A;return typeof q.context==="string"&&typeof q.bindings==="object"&&q.bindings!==null}function Rw4(A){return Array.isArray(A)&&A.every(J8Y)}function cY6(){return _8Y(OA(),"keybindings.json")}function WE8(){return Cj1(QG6)}async function M8Y(){let A=WE8();if(!eE())return{bindings:A,warnings:[]};let q=cY6();try{let K=await Y8Y(q,"utf-8"),Y=O8(K),z;if(typeof Y==="object"&&Y!==null&&"bindings"in Y)z=Y.bindings;else return L('[keybindings] Invalid keybindings.json: keybindings.json must have a "bindings" array'),{bindings:A,warnings:[{type:"parse_error",severity:"error",message:'keybindings.json must have a "bindings" array',suggestion:'Use format: { "bindings": [ ... ] }'}]};if(!Rw4(z)){let H=!Array.isArray(z)?'"bindings" must be an array':"keybindings.json contains invalid block structure",j=!Array.isArray(z)?'Set "bindings" to an array of keybinding blocks':'Each block must have "context" (string) and "bindings" (object)';return L(`[keybindings] Invalid keybindings.json: ${H}`),{bindings:A,warnings:[{type:"parse_error",severity:"error",message:H,suggestion:j}]}}let w=Cj1(z);L(`[keybindings] Loaded ${w.length} user bindings from ${q}`);let _=[...A,...w];yw4(w.length);let O=[...XE8(K),...PE8(z,_)];if(O.length>0)L(`[keybindings] Found ${O.length} validation issue(s)`);return{bindings:_,warnings:O}}catch(K){if(j8Y(K)&&K.code==="ENOENT")return{bindings:A,warnings:[]};return L(`[keybindings] Error loading ${q}: ${D1(K)}`),{bindings:A,warnings:[{type:"parse_error",severity:"error",message:`Failed to parse keybindings.json: ${D1(K)}`}]}}}function Sw4(){if(wW)return wW;return sp6().bindings}function sp6(){if(wW)return{bindings:wW,warnings:XG};let A=WE8();if(!eE())return wW=A,XG=[],{bindings:wW,warnings:XG};let q=cY6();try{let K=w8Y(q,"utf-8"),Y=O8(K),z;if(typeof Y==="object"&&Y!==null&&"bindings"in Y)z=Y.bindings;else return wW=A,XG=[{type:"parse_error",severity:"error",message:'keybindings.json must have a "bindings" array',suggestion:'Use format: { "bindings": [ ... ] }'}],{bindings:wW,warnings:XG};if(!Rw4(z)){let $=!Array.isArray(z)?'"bindings" must be an array':"keybindings.json contains invalid block structure",O=!Array.isArray(z)?'Set "bindings" to an array of keybinding blocks':'Each block must have "context" (string) and "bindings" (object)';return wW=A,XG=[{type:"parse_error",severity:"error",message:$,suggestion:O}],{bindings:wW,warnings:XG}}let w=Cj1(z);if(L(`[keybindings] Loaded ${w.length} user bindings from ${q}`),wW=[...A,...w],yw4(w.length),XG=[...XE8(K),...PE8(z,wW)],XG.length>0)L(`[keybindings] Found ${XG.length} validation issue(s)`);return{bindings:wW,warnings:XG}}catch{return wW=A,XG=[],{bindings:wW,warnings:XG}}}async function Cw4(){if(vw4||Lw4)return;if(!eE()){L("[keybindings] Skipping file watcher - user customization disabled");return}let A=cY6(),q=$8Y(A);try{if(!(await z8Y(q)).isDirectory()){L(`[keybindings] Not watching: ${q} is not a directory`);return}}catch{L(`[keybindings] Not watching: ${q} does not exist`);return}vw4=!0,L(`[keybindings] Watching for changes to ${A}`),dY6=TK6.watch(A,{persistent:!0,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:O8Y,pollInterval:H8Y},ignorePermissionErrors:!0,usePolling:!1,atomic:!0}),dY6.on("add",Ew4),dY6.on("change",Ew4),dY6.on("unlink",X8Y),Kq(async()=>D8Y())}function D8Y(){if(Lw4=!0,dY6)dY6.close(),dY6=null;ap6.clear()}function hw4(A){return ap6.add(A),()=>{ap6.delete(A)}}async function Ew4(A){L(`[keybindings] Detected change to ${A}`);try{let q=await M8Y();wW=q.bindings,XG=q.warnings,ap6.forEach((K)=>K(q))}catch(q){L(`[keybindings] Error reloading: ${D1(q)}`)}}function X8Y(A){L(`[keybindings] Detected deletion of ${A}`);let q=WE8();wW=q,XG=[],ap6.forEach((K)=>K({bindings:q,warnings:[]}))}function Iw4(){return XG}var O8Y=500,H8Y=200,dY6=null,vw4=!1,Lw4=!1,wW=null,XG,ap6,kw4=null;var wi=k(()=>{VK6();Z8();G1();sY();a1();rA();B1();bW1();Nw4();MA();XG=[],ap6=new Set});function WP(A,q,K){let Y=Sw4(),z=hj1(A,q,Y);if(z===void 0){let w=`${A}:${q}`;if(!bw4.has(w))bw4.add(w),c("tengu_keybinding_fallback_used",{action:A,context:q,fallback:K,reason:"action_not_found"});return K}return z}var bw4;var _i=k(()=>{wi();Bg6();B1();bw4=new Set});function tp6(A){let q=Y6(2),{children:K}=A,Y;if(q[0]!==K)Y=lY6.default.createElement(xw4.Provider,{value:!0},K),q[0]=K,q[1]=Y;else Y=q[1];return Y}function oM(){let A=Y6(2),q=lY6.useContext(xw4),K=zK("app:toggleTranscript","Global","ctrl+o");if(q)return null;let Y;if(A[0]!==K)Y=lY6.default.createElement(T,{dimColor:!0},lY6.default.createElement(J8,{shortcut:K,action:"expand",parens:!0})),A[0]=K,A[1]=Y;else Y=A[1];return Y}function uw4(){let A=WP("app:toggleTranscript","Global","ctrl+o");return M1.dim(`(${A} to expand)`)}var lY6,xw4;var QS=k(()=>{K1();n6();iK();JK();LJ();_i();lY6=e(W6(),1),xw4=lY6.default.createContext(!1)});async function Bw4(A){if(A.startsWith(`<${gV}>`))return null;try{let K=(await PG({systemPrompt:MK(["Analyze if this message indicates a new conversation topic. If it does, extract a 2-3 word title that captures the new topic. Format your response as a JSON object with two fields: 'isNewTopic' (boolean) and 'title' (string, or null if isNewTopic is false)."]),userPrompt:A,outputFormat:{type:"json_schema",schema:{type:"object",properties:{isNewTopic:{type:"boolean"},title:{anyOf:[{type:"string"},{type:"null"}]}},required:["isNewTopic","title"],additionalProperties:!1}},signal:new AbortController().signal,options:{querySource:"terminal_update_title",agents:[],isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,mcpTools:[]}})).message.content.filter((z)=>z.type==="text").map((z)=>z.text).join(""),Y=q3(K);if(Y&&typeof Y==="object"&&"isNewTopic"in Y&&"title"in Y&&Y.isNewTopic&&typeof Y.title==="string")return Y.title}catch(q){$6(q)}return null}function W8Y(A,q){let K=A.split(` `),Y=[];for(let w of K){let _=B8(w);if(_<=q)Y.push(w.trimEnd());else{let $=0;while($<_){let O=SE(w,$,$+q);Y.push(O.trimEnd()),$+=q}}}let z=Y.length-ep6;if(z===1)return{aboveTheFold:Y.slice(0,ep6+1).join(` `).trimEnd(),remainingLines:0};return{aboveTheFold:Y.slice(0,ep6).join(` `).trimEnd(),remainingLines:Math.max(0,z)}}function mw4(A,q){let K=A.trimEnd();if(!K)return"";let Y=Math.max(q-P8Y,10),z=ep6*Y*4,w=K.length>z,_=w?K.slice(0,z):K,{aboveTheFold:$,remainingLines:O}=W8Y(_,Y),H=w?Math.max(O,Math.ceil(K.length/Y)-ep6):O;return[$,H>0?M1.dim(`… +${H} lines ${uw4()}`):""].filter(Boolean).join(` `)}var ep6=3,P8Y=10;var ZE8=k(()=>{zH();J2();x1();iK();QS();Ez();U06();y5()});function Qw4(A){let q=Y6(2),{children:K}=A,Y;if(q[0]!==K)Y=Ad6.createElement(Fw4.Provider,{value:!0},K),q[0]=K,q[1]=Y;else Y=q[1];return Y}function Uw4(){return gw4.useContext(Fw4)}var Ad6,gw4,Fw4;var GE8=k(()=>{K1();Ad6=e(W6(),1),gw4=e(W6(),1),Fw4=Ad6.createContext(!1)});function UG6(A,q,K){if(!(K?.supportsHyperlinks??ef()))return A;let z=q??A,w=M1.blue(z);return`${pw4}${A}${dw4}${w}${pw4}${dw4}`}var pw4="\x1B]8;;",dw4="\x07";var fE8=k(()=>{iK();tc()});function Z8Y(A){try{let q=O8(A),K=U6(q),Y=A.replace(/\\\//g,"/").replace(/\s+/g,""),z=K.replace(/\s+/g,"");if(Y!==z)return A;return U6(q,null,2)}catch{return A}}function f8Y(A){if(A.length>G8Y)return A;return A.split(` `).map(Z8Y).join(` `)}function cw4(A){return A.replace(T8Y,(q)=>UG6(q))}function CF(A){let q=Y6(10),{content:K,verbose:Y,isError:z,isWarning:w,linkifyUrls:_}=A,{columns:$}=PA(),O=Uw4(),H=Y||O,j;if(q[0]!==$||q[1]!==K||q[2]!==_||q[3]!==H){A:{let P=f8Y(K);if(_)P=cw4(P);if(H){j=uW1(P);break A}j=uW1(mw4(P,$))}q[0]=$,q[1]=K,q[2]=_,q[3]=H,q[4]=j}else j=q[4];let J=j,M=z?"error":w?"warning":void 0,D;if(q[5]!==J)D=iY6.createElement(CK,null,J),q[5]=J,q[6]=D;else D=q[6];let X;if(q[7]!==M||q[8]!==D)X=iY6.createElement(M8,null,iY6.createElement(T,{color:M},D)),q[7]=M,q[8]=D,q[9]=X;else X=q[9];return X}function uW1(A){return A.replace(/\u001b\[([0-9]+;)*4(;[0-9]+)*m|\u001b\[4(;[0-9]+)*m|\u001b\[([0-9]+;)*4m/g,"")}var iY6,G8Y=1e4,T8Y;var pG6=k(()=>{K1();n6();DK();xq();ZE8();a1();GE8();fE8();iY6=e(W6(),1);T8Y=/https?:\/\/[^\s"'<>\\]+/g});function BW1(A){return A.replace(/[\s\S]*?<\/sandbox_violations>/g,"")}function i3(A){let q=Y6(16),{result:K,verbose:Y}=A,z=zK("app:toggleTranscript","Global","ctrl+o"),w,_,$,O,H;if(q[0]!==K||q[1]!==z||q[2]!==Y){let M;if(typeof K!=="string")M="Tool execution failed";else{let X=Pq(K,"tool_use_error")??K,Z=BW1(X).replace(/<\/?error>/g,"").trim();if(!Y&&Z.includes("InputValidationError: "))M="Invalid tool parameters";else if(Z.startsWith("Error: ")||Z.startsWith("Cancelled: "))M=Z;else M=`Error: ${Z}`}let D=M.split(` `).length-TE8;_=M8,w=m,$="column",O=_W.createElement(T,{color:"error"},uW1(Y?M:M.split(` `).slice(0,TE8).join(` `))),H=!Y&&M.split(` `).length>TE8&&_W.createElement(m,null,_W.createElement(T,{dimColor:!0},"… +",D," ",D===1?"line":"lines"," ("),_W.createElement(T,{dimColor:!0,bold:!0},z),_W.createElement(T,null," "),_W.createElement(T,{dimColor:!0},"to see all)")),q[0]=K,q[1]=z,q[2]=Y,q[3]=w,q[4]=_,q[5]=$,q[6]=O,q[7]=H}else w=q[3],_=q[4],$=q[5],O=q[6],H=q[7];let j;if(q[8]!==w||q[9]!==$||q[10]!==O||q[11]!==H)j=_W.createElement(w,{flexDirection:$},O,H),q[8]=w,q[9]=$,q[10]=O,q[11]=H,q[12]=j;else j=q[12];let J;if(q[13]!==_||q[14]!==j)J=_W.createElement(_,null,j),q[13]=_,q[14]=j,q[15]=J;else J=q[15];return J}var _W,TE8=10;var $H=k(()=>{K1();n6();DK();SA();pG6();LJ();_W=e(W6(),1)});import{pathToFileURL as V8Y}from"url";function AL(A){let q=Y6(5),{filePath:K,children:Y}=A,z;if(q[0]!==K)z=V8Y(K),q[0]=K,q[1]=z;else z=q[1];let w=Y??K,_;if(q[2]!==z.href||q[3]!==w)_=lw4.default.createElement(d7,{url:z.href},w),q[2]=z.href,q[3]=w,q[4]=_;else _=q[4];return _}var lw4;var dG6=k(()=>{K1();r56();lw4=e(W6(),1)});function mW1(){let A=process.env.CLAUDE_CODE_ENVIRONMENT_KIND;if(A==="byoc"||A==="anthropic_cloud")return A;return null}var VE8=k(()=>{G1()});import{randomBytes as N8Y}from"crypto";function L8Y(A){return N8Y(4).readUInt32BE(0)%A}function NE8(A){return A[L8Y(A.length)]}function gW1(){let A=NE8(v8Y),q=NE8(E8Y),K=NE8(k8Y);return`${A}-${q}-${K}`}var v8Y,k8Y,E8Y;var vE8=k(()=>{v8Y=["abundant","ancient","bright","calm","cheerful","clever","cozy","curious","dapper","dazzling","deep","delightful","eager","elegant","enchanted","fancy","fluffy","gentle","gleaming","golden","graceful","happy","hidden","humble","jolly","joyful","keen","kind","lively","lovely","lucky","luminous","magical","majestic","mellow","merry","mighty","misty","noble","peaceful","playful","polished","precious","proud","quiet","quirky","radiant","rosy","serene","shiny","silly","sleepy","smooth","snazzy","snug","snuggly","soft","sparkling","spicy","splendid","sprightly","starry","steady","sunny","swift","tender","tidy","toasty","tranquil","twinkly","valiant","vast","velvet","vivid","warm","whimsical","wild","wise","witty","wondrous","zany","zesty","zippy","breezy","bubbly","buzzing","cheeky","cosmic","cozy","crispy","crystalline","cuddly","drifting","dreamy","effervescent","ethereal","fizzy","flickering","floating","floofy","fluttering","foamy","frolicking","fuzzy","giggly","glimmering","glistening","glittery","glowing","goofy","groovy","harmonic","hazy","humming","iridescent","jaunty","jazzy","jiggly","melodic","moonlit","mossy","nifty","peppy","prancy","purrfect","purring","quizzical","rippling","rustling","shimmering","shimmying","snappy","snoopy","squishy","swirling","ticklish","tingly","twinkling","velvety","wiggly","wobbly","woolly","zazzy","abstract","adaptive","agile","async","atomic","binary","cached","compiled","composed","compressed","concurrent","cryptic","curried","declarative","delegated","distributed","dynamic","eager","elegant","encapsulated","enumerated","eventual","expressive","federated","functional","generic","greedy","hashed","idempotent","immutable","imperative","indexed","inherited","iterative","lazy","lexical","linear","linked","logical","memoized","modular","mutable","nested","optimized","parallel","parsed","partitioned","piped","polymorphic","pure","reactive","recursive","refactored","reflective","replicated","resilient","robust","scalable","sequential","serialized","sharded","sorted","staged","stateful","stateless","streamed","structured","synchronous","synthetic","temporal","transient","typed","unified","validated","vectorized","virtual"],k8Y=["aurora","avalanche","blossom","breeze","brook","bubble","canyon","cascade","cloud","clover","comet","coral","cosmos","creek","crescent","crystal","dawn","dewdrop","dusk","eclipse","ember","feather","fern","firefly","flame","flurry","fog","forest","frost","galaxy","garden","glacier","glade","grove","harbor","horizon","island","lagoon","lake","leaf","lightning","meadow","meteor","mist","moon","moonbeam","mountain","nebula","nova","ocean","orbit","pebble","petal","pine","planet","pond","puddle","quasar","rain","rainbow","reef","ripple","river","shore","sky","snowflake","spark","spring","star","stardust","starlight","storm","stream","summit","sun","sunbeam","sunrise","sunset","thunder","tide","twilight","valley","volcano","waterfall","wave","willow","wind","alpaca","axolotl","badger","bear","beaver","bee","bird","bumblebee","bunny","cat","chipmunk","crab","crane","deer","dolphin","dove","dragon","dragonfly","duckling","eagle","elephant","falcon","finch","flamingo","fox","frog","giraffe","goose","hamster","hare","hedgehog","hippo","hummingbird","jellyfish","kitten","koala","ladybug","lark","lemur","llama","lobster","lynx","manatee","meerkat","moth","narwhal","newt","octopus","otter","owl","panda","parrot","peacock","pelican","penguin","phoenix","piglet","platypus","pony","porcupine","puffin","puppy","quail","quokka","rabbit","raccoon","raven","robin","salamander","seahorse","seal","sloth","snail","sparrow","sphinx","squid","squirrel","starfish","swan","tiger","toucan","turtle","unicorn","walrus","whale","wolf","wombat","wren","yeti","zebra","acorn","anchor","balloon","beacon","biscuit","blanket","bonbon","book","boot","cake","candle","candy","castle","charm","clock","cocoa","cookie","crayon","crown","cupcake","donut","dream","fairy","fiddle","flask","flute","fountain","gadget","gem","gizmo","globe","goblet","hammock","harp","haven","hearth","honey","journal","kazoo","kettle","key","kite","lantern","lemon","lighthouse","locket","lollipop","mango","map","marble","marshmallow","melody","mitten","mochi","muffin","music","nest","noodle","oasis","origami","pancake","parasol","peach","pearl","pebble","pie","pillow","pinwheel","pixel","pizza","plum","popcorn","pretzel","prism","pudding","pumpkin","puzzle","quiche","quill","quilt","riddle","rocket","rose","scone","scroll","shell","sketch","snowglobe","sonnet","sparkle","spindle","sprout","sundae","swing","taco","teacup","teapot","thimble","toast","token","tome","tower","treasure","treehouse","trinket","truffle","tulip","umbrella","waffle","wand","whisper","whistle","widget","wreath","zephyr","abelson","adleman","aho","allen","babbage","bachman","backus","barto","bengio","bentley","blum","boole","brooks","catmull","cerf","cherny","church","clarke","cocke","codd","conway","cook","corbato","cray","curry","dahl","diffie","dijkstra","dongarra","eich","emerson","engelbart","feigenbaum","floyd","gosling","graham","gray","hamming","hanrahan","hartmanis","hejlsberg","hellman","hennessy","hickey","hinton","hoare","hollerith","hopcroft","hopper","iverson","kahan","kahn","karp","kay","kernighan","knuth","kurzweil","lamport","lampson","lecun","lerdorf","liskov","lovelace","matsumoto","mccarthy","metcalfe","micali","milner","minsky","moler","moore","naur","neumann","newell","nygaard","papert","parnas","pascal","patterson","pearl","perlis","pike","pnueli","rabin","reddy","ritchie","rivest","rossum","russell","scott","sedgewick","shamir","shannon","sifakis","simon","stallman","stearns","steele","stonebraker","stroustrup","sutherland","sutton","tarjan","thacker","thompson","torvalds","turing","ullman","valiant","wadler","wall","wigderson","wilkes","wilkinson","wirth","wozniak","yao"],E8Y=["baking","beaming","booping","bouncing","brewing","bubbling","chasing","churning","coalescing","conjuring","cooking","crafting","crunching","cuddling","dancing","dazzling","discovering","doodling","dreaming","drifting","enchanting","exploring","finding","floating","fluttering","foraging","forging","frolicking","gathering","giggling","gliding","greeting","growing","hatching","herding","honking","hopping","hugging","humming","imagining","inventing","jingling","juggling","jumping","kindling","knitting","launching","leaping","mapping","marinating","meandering","mixing","moseying","munching","napping","nibbling","noodling","orbiting","painting","percolating","petting","plotting","pondering","popping","prancing","purring","puzzling","questing","riding","roaming","rolling","sauteeing","scribbling","seeking","shimmying","singing","skipping","sleeping","snacking","sniffing","snuggling","soaring","sparking","spinning","splashing","sprouting","squishing","stargazing","stirring","strolling","swimming","swinging","tickling","tinkering","toasting","tumbling","twirling","waddling","wandering","watching","weaving","whistling","wibbling","wiggling","wishing","wobbling","wondering","yawning","zooming"]});var qL="ExitPlanMode",aM="ExitPlanMode";import{randomUUID as y8Y}from"crypto";import{join as g66,resolve as R8Y,sep as S8Y}from"path";import{copyFile as C8Y,writeFile as h8Y}from"fs/promises";function hF(A){let q=A??d1(),K=B46(),Y=K.get(q);if(!Y){let z=jO();for(let w=0;wq.slug)?.slug}async function FW1(A,q){let K=nw4(A);if(!K)return!1;let Y=q??d1();kE8(Y,K);let z=g66(jO(),`${K}.md`);try{return await P1().stat(z),!0}catch{if(mW1()===null)return!1;L(`Plan file missing during resume: ${z}. Attempting recovery.`);let w=x8Y(A.messages,"plan"),_=null;if(w&&w.content.length>0)_=w.content,L(`Plan recovered from file snapshot, ${_.length} chars`,{level:"info"});else if(_=b8Y(A),_)L(`Plan recovered from message history, ${_.length} chars`,{level:"info"});if(_)try{return await h8Y(z,_,{encoding:"utf-8"}),!0}catch($){return $6($),!1}return L("Plan file recovery failed: no file snapshot or plan content found in message history"),!1}}async function rw4(A,q){let K=nw4(A);if(!K)return!1;let Y=jO(),z=g66(Y,`${K}.md`),w=hF(q),_=g66(Y,`${w}.md`);try{return await C8Y(z,_),!0}catch($){if($.code==="ENOENT")return!1;return $6($),!1}}function b8Y(A){for(let q=A.messages.length-1;q>=0;q--){let K=A.messages[q];if(!K)continue;if(K.type==="assistant"){let{content:Y}=K.message;if(Array.isArray(Y)){for(let z of Y)if(z.type==="tool_use"&&z.name===aM){let _=z.input?.plan;if(typeof _==="string"&&_.length>0)return _}}}if(K.type==="user"){let Y=K;if(typeof Y.planContent==="string"&&Y.planContent.length>0)return Y.planContent}if(K.type==="attachment"){let Y=K;if(Y.attachment?.type==="plan_file_reference"){let z=Y.attachment.planContent;if(typeof z==="string"&&z.length>0)return z}}}return null}function x8Y(A,q){for(let K=A.length-1;K>=0;K--){let Y=A[K];if(Y?.type==="system"&&"subtype"in Y&&Y.subtype==="file_snapshot"&&"snapshotFiles"in Y)return Y.snapshotFiles.find((w)=>w.key===q)}return}async function ow4(){if(mW1()===null)return;try{let A=[],q=sM();if(q)A.push({key:"plan",path:eD(),content:q});if(A.length===0)return;let K={type:"system",subtype:"file_snapshot",content:"File snapshot",level:"info",isMeta:!0,timestamp:new Date().toISOString(),uuid:y8Y(),snapshotFiles:A},{recordTranscript:Y}=await Promise.resolve().then(() => (uq(),EE8));await Y([K])}catch(A){$6(A instanceof Error?A:Error(`File snapshot persistence failed: ${A}`))}}var I8Y=10,jO;var uJ=k(()=>{Eq();Q1();Y7();Z8();VE8();x1();G1();vE8();W7();GA();jO=T8(function(){let K=h7().plansDirectory,Y;if(K){let z=I1(),w=R8Y(z,K);if(!w.startsWith(z+S8Y)&&w!==z)$6(Error(`plansDirectory must be within project root: ${K}`)),Y=g66(OA(),"plans");else Y=w}else Y=g66(OA(),"plans");try{P1().mkdirSync(Y)}catch(z){$6(z)}return Y})});function QW1(A){let q=`${EK6()}/`,K=".output";if(A.startsWith(q)&&A.endsWith(".output")){let Y=A.slice(q.length,-7);if(Y.length>0&&Y.length<=20&&/^[a-zA-Z0-9_-]+$/.test(Y))return Y}return null}function aw4({file_path:A,offset:q,limit:K,pages:Y},{verbose:z}){if(!A)return null;if(QW1(A))return"";let w=z?A:T3(A);if(Y)return cq.createElement(cq.Fragment,null,cq.createElement(AL,{filePath:A},w),` · pages ${Y}`);if(z&&(q||K)){let _=q??1,$=K?`lines ${_}-${_+K-1}`:`from line ${_}`;return cq.createElement(cq.Fragment,null,cq.createElement(AL,{filePath:A},w),` · ${$}`)}return cq.createElement(AL,{filePath:A},w)}function sw4({file_path:A}){let q=A?QW1(A):null;if(!q)return null;return cq.createElement(T,{dimColor:!0}," ",q)}function tw4(){return null}function ew4(A){switch(A.type){case"image":{let{originalSize:q}=A.file,K=RK(q);return cq.createElement(M8,{height:1},cq.createElement(T,null,"Read image (",K,")"))}case"notebook":{let{cells:q}=A.file;if(!q||q.length<1)return cq.createElement(T,{color:"error"},"No cells found in notebook");return cq.createElement(M8,{height:1},cq.createElement(T,null,"Read ",cq.createElement(T,{bold:!0},q.length)," cells"))}case"pdf":{let{originalSize:q}=A.file,K=RK(q);return cq.createElement(M8,{height:1},cq.createElement(T,null,"Read PDF (",K,")"))}case"parts":return cq.createElement(M8,{height:1},cq.createElement(T,null,"Read ",cq.createElement(T,{bold:!0},A.file.count)," ",A.file.count===1?"page":"pages"," (",RK(A.file.originalSize),")"));case"text":{let{numLines:q}=A.file;return cq.createElement(M8,{height:1},cq.createElement(T,null,"Read ",cq.createElement(T,{bold:!0},q)," ",q===1?"line":"lines"))}}}function A24(){return cq.createElement(N9,null)}function q24(A,{verbose:q}){if(!q&&typeof A==="string"){if(A.includes(WG))return cq.createElement(M8,null,cq.createElement(T,{color:"error"},"File not found"));if(Pq(A,"tool_use_error"))return cq.createElement(M8,null,cq.createElement(T,{color:"error"},"Error reading file"))}return cq.createElement(i3,{result:A,verbose:q})}function K24(A){if(A?.file_path?.startsWith(jO()))return"Reading Plan";if(A?.file_path&&QW1(A.file_path))return"Read agent output";return"Read"}function LE8(A){if(!A?.file_path)return null;let q=QW1(A.file_path);if(q)return q;return T3(A.file_path)}var cq;var Y24=k(()=>{n6();rM();$H();dG6();DK();p7();SA();uJ();BD();cq=e(W6(),1)});import{randomUUID as u8Y}from"crypto";async function IF(A,q,K){let Y=A;return await Promise.all([...A.matchAll(B8Y),...A.matchAll(m8Y)].map(async(z)=>{let w=z[1]?.trim();if(w)try{let _=await tM(Hq,{command:w},q,ZG({content:[]}),"");if(_.behavior!=="allow")throw L(`Bash command permission check failed for command in ${K}: ${w}. Error: ${_.message}`),new Ym(`Bash command permission check failed for pattern "${z[0]}": ${_.message||"Permission denied"}`);let{data:$}=await Hq.call({command:w},q),O=await gG6(Hq,$,u8Y()),H=typeof O.content==="string"?O.content:z24($.stdout,$.stderr);Y=Y.replace(z[0],H)}catch(_){if(_ instanceof Ym)throw _;g8Y(_,z[0])}})),Y}function z24(A,q,K=!1){let Y=[];if(A.trim())Y.push(A.trim());if(q.trim())if(K)Y.push(`[stderr: ${q.trim()}]`);else Y.push(`[stderr] ${q.trim()}`);return Y.join(K?" ":` `)}function g8Y(A,q,K=!1){if(A instanceof kI){if(A.interrupted)throw new Ym(`Bash command interrupted for pattern "${q}": [Command interrupted]`);let w=z24(A.stdout,A.stderr,K);throw new Ym(`Bash command failed for pattern "${q}": ${w}`)}let Y=D1(A),z=K?`[Error: ${Y}]`:`[Error] ${Y}`;throw new Ym(z)}var B8Y,m8Y;var cG6=k(()=>{$W();MA();G1();xJ();SA();LF();B8Y=/```!\s*\n?([\s\S]*?)\n?```/g,m8Y=/(?<=^|\s)!`([^`]+)`/gm});function yE8(A){if(!A||!A.trim())return[];let q=Xw(A,(K)=>`$${K}`);if(!q.success)return A.split(/\s+/).filter(Boolean);return q.tokens.filter((K)=>typeof K==="string")}function qd6(A){if(!A)return[];let q=(K)=>typeof K==="string"&&K.trim()!==""&&!/^\d+$/.test(K);if(Array.isArray(A))return A.filter(q);if(typeof A==="string")return A.split(/\s+/).filter(q);return[]}function w24(A,q){let K=A.slice(q.length);if(K.length===0)return;return K.map((Y)=>`[${Y}]`).join(" ")}function lG6(A,q,K=!0,Y=[]){if(q===void 0||q===null)return A;let z=yE8(q),w=A;for(let _=0;_{let O=parseInt($,10);return z[O]??""}),A=A.replace(/\$(\d+)(?!\w)/g,(_,$)=>{let O=parseInt($,10);return z[O]??""}),A=A.replaceAll("$ARGUMENTS",q),A===w&&K&&q)A=A+` ARGUMENTS: ${q}`;return A}var Kd6=k(()=>{ZM()});import{realpath as F8Y}from"fs/promises";import{join as F66,dirname as nY6,basename as pW1,sep as iG6,isAbsolute as Q8Y,relative as U8Y}from"path";function Q66(A,q){switch(A){case"policySettings":return F66(IZ(),".claude",q);case"userSettings":return F66(OA(),q);case"projectSettings":return`.claude/${q}`;case"plugin":return"plugin";default:return""}}function rG6(A){let q=[A.name,A.description,A.whenToUse].filter(Boolean).join(" ");return Iz(q)}async function p8Y(A){try{return await F8Y(A)}catch{return null}}function UW1(A){return A===!0||A==="true"}function $24(A,q){if(!A.hooks)return;let K=qR().safeParse(A.hooks);if(!K.success){L(`Invalid hooks in skill '${q}': ${K.error.message}`);return}return K.data}function d8Y(A){if(!A.paths||typeof A.paths!=="string")return;let q=e51(A.paths).map((K)=>{return K.endsWith("/**")?K.slice(0,-3):K}).filter((K)=>K.length>0);if(q.length===0||q.every((K)=>K==="**"))return;return q}function O24({skillName:A,displayName:q,description:K,hasUserSpecifiedDescription:Y,markdownContent:z,allowedTools:w,argumentHint:_,argumentNames:$,whenToUse:O,version:H,model:j,disableModelInvocation:J,userInvocable:M,source:D,baseDir:X,loadedFrom:P,hooks:W,executionContext:Z,agent:G,paths:f}){return{type:"prompt",name:A,description:K,hasUserSpecifiedDescription:Y,allowedTools:w,argumentHint:_,argNames:$.length>0?$:void 0,whenToUse:O,version:H,model:j,disableModelInvocation:J,userInvocable:M,context:Z,agent:G,paths:f,contentLength:z.length,isEnabled:()=>!0,isHidden:!M,progressMessage:"running",userFacingName(){return q||A},source:D,loadedFrom:P,hooks:W,skillRoot:X,async getPromptForCommand(V,N){let v=X?`Base directory for this skill: ${X} ${z}`:z;if(v=lG6(v,V,!0,$),X){let y=process.platform==="win32"?X.replace(/\\/g,"/"):X;v=v.replace(/\$\{CLAUDE_SKILL_DIR\}/g,y)}return v=v.replace(/\$\{CLAUDE_SESSION_ID\}/g,d1()),v=await IF(v,{...N,getAppState(){let y=N.getAppState();return{...y,toolPermissionContext:{...y.toolPermissionContext,alwaysAllowRules:{...y.toolPermissionContext.alwaysAllowRules,command:w}}}}},`/${A}`),[{type:"text",text:v}]}}}async function Yd6(A,q){let K=P1(),Y;try{Y=await K.readdir(A)}catch(w){let _=w.code;if(_!=="ENOENT"&&_!=="EACCES"&&_!=="EPERM")$6(w);return[]}return(await Promise.all(Y.map(async(w)=>{try{if(!w.isDirectory()&&!w.isSymbolicLink())return null;let _=F66(A,w.name),$=F66(_,"SKILL.md"),O;try{O=await K.readFile($,{encoding:"utf-8"})}catch{return null}let{frontmatter:H,content:j}=fJ(O,$),J=w.name,M=$R(H.description,J),D=M??Hi(j,"Skill"),X=Xx(H["allowed-tools"]),P=H["user-invocable"]===void 0?!0:UW1(H["user-invocable"]),W=UW1(H["disable-model-invocation"]),Z=H.model==="inherit"?void 0:H.model?J5(H.model):void 0,G=$24(H,J),f=H.context==="fork"?"fork":void 0,V=H.agent,N=qd6(H.arguments),v=d8Y(H);return{skill:O24({skillName:J,displayName:H.name!=null?String(H.name):void 0,description:D,hasUserSpecifiedDescription:M!==null,markdownContent:j,allowedTools:X,argumentHint:H["argument-hint"]!=null?String(H["argument-hint"]):void 0,argumentNames:N,whenToUse:H.when_to_use,version:H.version,model:Z,disableModelInvocation:W,userInvocable:P,source:q,baseDir:_,loadedFrom:"skills",hooks:G,executionContext:f,agent:V,paths:v}),filePath:$}}catch(_){return $6(_),null}}))).filter((w)=>w!==null)}function SE8(A){return/^skill\.md$/i.test(pW1(A))}function c8Y(A){let q=new Map;for(let Y of A){let z=nY6(Y.filePath),w=q.get(z)??[];w.push(Y),q.set(z,w)}let K=[];for(let[Y,z]of q){let w=z.filter((_)=>SE8(_.filePath));if(w.length>0){let _=w[0];if(w.length>1)L(`Multiple skill files found in ${Y}, using ${pW1(_.filePath)}`);K.push(_)}else K.push(...z)}return K}function H24(A,q){let K=q.endsWith(iG6)?q.slice(0,-1):q;if(A===K)return"";let Y=A.slice(K.length+1);return Y?Y.split(iG6).join(":"):""}function l8Y(A,q){let K=nY6(A),Y=nY6(K),z=pW1(K),w=H24(Y,q);return w?`${w}:${z}`:z}function i8Y(A,q){let K=pW1(A),Y=nY6(A),z=K.replace(/\.md$/,""),w=H24(Y,q);return w?`${w}:${z}`:z}function n8Y(A){return SE8(A.filePath)?l8Y(A.filePath,A.baseDir):i8Y(A.filePath,A.baseDir)}async function r8Y(A){try{let q=await ji("commands",A),K=c8Y(q),Y=[];for(let{baseDir:z,filePath:w,frontmatter:_,content:$,source:O}of K)try{let j=SE8(w)?nY6(w):void 0,J=n8Y({baseDir:z,filePath:w,frontmatter:_,content:$,source:O}),M=$R(_.description,J),D=M??Hi($,"Custom command"),X=Xx(_["allowed-tools"]),P=_["user-invocable"]===void 0?!0:UW1(_["user-invocable"]),W=UW1(_["disable-model-invocation"]),Z=_.model==="inherit"?void 0:_.model?J5(_.model):void 0,G=_.context==="fork"?"fork":void 0,f=_.agent,V=$24(_,J),N=qd6(_.arguments);Y.push({skill:O24({skillName:J,displayName:void 0,description:D,hasUserSpecifiedDescription:M!==null,markdownContent:$,allowedTools:X,argumentHint:_["argument-hint"]!=null?String(_["argument-hint"]):void 0,argumentNames:N,whenToUse:_.when_to_use,version:_.version,model:Z,disableModelInvocation:W,userInvocable:P,source:O,baseDir:j,loadedFrom:"commands_DEPRECATED",hooks:V,executionContext:G,agent:f,paths:void 0}),filePath:w})}catch(H){$6(H)}return Y}catch(q){return $6(q),[]}}function dW1(){CE8.cache?.clear?.(),ji.cache?.clear?.(),nG6.clear(),cW1.clear()}function j24(A){hE8.push(A)}async function oG6(A,q){let K=P1(),Y=q.endsWith(iG6)?q.slice(0,-1):q,z=[];for(let w of A){let _=nY6(w);while(_.startsWith(Y+iG6)){let $=F66(_,".claude","skills");if(!RE8.has($)){RE8.add($);try{if(await K.stat($),await k68(_,Y)){L(`[skills] Skipped gitignored skills dir: ${$}`);continue}z.push($)}catch{}}let O=nY6(_);if(O===_)break;_=O}}return z.sort((w,_)=>_.split(iG6).length-w.split(iG6).length)}async function aG6(A){if(!WM("projectSettings")){L("[skills] Dynamic skill discovery skipped: projectSettings source disabled");return}if(A.length===0)return;let q=new Set($i.keys()),K=await Promise.all(A.map((z)=>Yd6(z,"projectSettings")));for(let z=K.length-1;z>=0;z--)for(let{skill:w}of K[z]??[])if(w.type==="prompt")$i.set(w.name,w);let Y=K.flat().length;if(Y>0){let z=[...$i.keys()].filter((w)=>!q.has(w));if(L(`[skills] Dynamically discovered ${Y} skills from ${A.length} directories`),z.length>0)c("tengu_dynamic_skills_changed",{source:"file_operation",previousCount:q.size,newCount:$i.size,addedCount:z.length,directoryCount:A.length})}for(let z of hE8)try{z()}catch(w){$6(w)}}function J24(){return Array.from($i.values())}function sG6(A,q){if(nG6.size===0)return[];let K=[];for(let[Y,z]of nG6){if(z.type!=="prompt"||!z.paths||z.paths.length===0)continue;let w=_24.default().add(z.paths);for(let _ of A){let $=Q8Y(_)?U8Y(q,_):_;if(w.ignores($)){$i.set(Y,z),nG6.delete(Y),cW1.add(Y),K.push(Y),L(`[skills] Activated conditional skill '${Y}' (matched path: ${$})`);break}}}if(K.length>0){c("tengu_dynamic_skills_changed",{source:"conditional_paths",previousCount:$i.size-K.length,newCount:$i.size,addedCount:K.length,directoryCount:0});for(let Y of hE8)try{Y()}catch(z){$6(z)}}return K}function M24(){RE8.clear(),$i.clear(),nG6.clear(),cW1.clear()}var _24,CE8,RE8,$i,nG6,cW1,hE8;var Oi=k(()=>{Eq();x1();G1();iV();B1();cG6();Ji();Y7();iV();Z8();Os();F2();E68();Xq();hI();UN();Q1();Kd6();_24=e(GY6(),1);CE8=T8(async(A)=>{let q=F66(OA(),"skills"),K=F66(IZ(),".claude","skills"),Y=IE8("skills",A);L(`Loading skills from: managed=${K}, user=${q}, project=[${Y.join(", ")}]`);let z=EV(),w=WM("projectSettings"),[_,$,O,H,j]=await Promise.all([Yd6(K,"policySettings"),WM("userSettings")?Yd6(q,"userSettings"):Promise.resolve([]),w?Promise.all(Y.map((G)=>Yd6(G,"projectSettings"))):Promise.resolve([]),w?Promise.all(z.map((G)=>Yd6(F66(G,".claude","skills"),"projectSettings"))):Promise.resolve([]),r8Y(A)]),J=[..._,...$,...O.flat(),...H.flat(),...j],M=await Promise.all(J.map(({skill:G,filePath:f})=>G.type==="prompt"?p8Y(f):Promise.resolve(null))),D=new Map,X=[];for(let G=0;G0)L(`Deduplicated ${P} skills (same file)`);let W=[],Z=[];for(let G of X)if(G.type==="prompt"&&G.paths&&G.paths.length>0&&!cW1.has(G.name))Z.push(G);else W.push(G);for(let G of Z)nG6.set(G.name,G);if(Z.length>0)L(`[skills] ${Z.length} conditional skills stored (activated when matching files are touched)`);return L(`Loaded ${X.length} unique skills (${W.length} unconditional, ${Z.length} conditional, managed: ${_.length}, user: ${$.length}, project: ${O.flat().length}, additional: ${H.flat().length}, legacy commands: ${j.length})`),W});RE8=new Set,$i=new Map,nG6=new Map,cW1=new Set,hE8=[]});import{readdir as o8Y,readFile as a8Y}from"fs/promises";import*as rY6 from"path";import{posix as s8Y,win32 as t8Y}from"path";function qAY(A){if(AAY.has(A))return!0;if(A.startsWith("/proc/")&&(A.endsWith("/fd/0")||A.endsWith("/fd/1")||A.endsWith("/fd/2")))return!0;return!1}function YAY(A){let q=rY6.basename(A),K=/^(.+)([ \u202F])(AM|PM)(\.png)$/,Y=q.match(K);if(!Y)return;let z=Y[2],w=z===" "?KAY:" ";return A.replace(`${z}${Y[3]}${Y[4]}`,`${w}${Y[3]}${Y[4]}`)}function bE8(){let A=process.env.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS;if(A){let q=parseInt(A,10);if(!isNaN(q)&&q>0)return q}return wAY}function _AY(A){let q=OA();if(!A.startsWith(q))return null;let K=A.split(t8Y.sep).join(s8Y.sep);if(K.includes("/session-memory/")&&K.endsWith(".md"))return"session_memory";if(K.includes("/projects/")&&K.endsWith(".jsonl"))return"session_transcript";return null}function HAY(A){return SO1(A)}function MAY(){let A=t$(d5());return!JAY.has(A)}async function D24(A,q,K){let Y=K??bE8(),z=Z24(A,q);if(!z||z<=Y/4)return;let _=await W24(A)??z;if(_>Y)throw new iW1(_,Y)}function lW1(A,q,K,Y){return{type:"image",file:{base64:A.toString("base64"),type:`image/${q}`,originalSize:K,dimensions:Y}}}async function X24(A,q,K,Y,z,w,_,$,O,H,j){if(Y==="ipynb"){let V=await $w4(K),N=U6(V),v=Buffer.byteLength(N);if(v>$)throw Error(`Notebook content (${RK(v)}) exceeds maximum allowed size (${RK($)}). Use ${f4} with jq to read specific portions: cat "${A}" | jq '.cells[:20]' # First 20 cells cat "${A}" | jq '.cells[100:120]' # Cells 100-120 cat "${A}" | jq '.cells | length' # Count total cells cat "${A}" | jq '.cells[] | select(.cell_type=="code") | .source' # All code sources`);await D24(N,Y,O);let y=await P1().stat(K);H.set(q,{content:N,timestamp:Math.floor(y.mtimeMs),offset:z,limit:w}),j.nestedMemoryAttachmentTriggers?.add(q);let R={type:"notebook",file:{filePath:A,cells:V}};return pI({operation:"read",tool:"FileReadTool",filePath:q,content:N}),{data:R}}if(P24.has(Y)){let V=await xE8(K,O);j.nestedMemoryAttachmentTriggers?.add(q),pI({operation:"read",tool:"FileReadTool",filePath:q,content:V.file.base64});let N=V.file.dimensions?bG6(V.file.dimensions):null;return{data:V,...N&&{newMessages:[A8({content:N,isMeta:!0})]}}}if(BD6(Y)){if(_){let B=N78(_),x=await HE8(K,B??void 0);if(!x.success)throw Error(x.error.message);c("tengu_pdf_page_extraction",{success:!0,pageCount:x.data.file.count,fileSize:x.data.file.originalSize,hasPageRange:!0}),pI({operation:"read",tool:"FileReadTool",filePath:q,content:`PDF pages ${_}`});let g=(await o8Y(x.data.file.outputDir)).filter((U)=>U.endsWith(".jpg")).sort(),b=await Promise.all(g.map(async(U)=>{let d=rY6.join(x.data.file.outputDir,U),l=await a8Y(d),t=await VF(l,l.length,"jpeg");return{type:"image",source:{type:"base64",media_type:`image/${t.mediaType}`,data:t.buffer.toString("base64")}}}));return{data:x.data,...b.length>0&&{newMessages:[A8({content:b,isMeta:!0})]}}}let V=await IW1(K);if(V!==null&&V>u01)throw Error(`This PDF has ${V} pages, which is too many to read at once. Use the pages parameter to read specific page ranges (e.g., pages: "1-5"). Maximum ${fG6} pages per request.`);let v=await P1().stat(K);if(!jx6()||v.size>WK4){let B=await HE8(K);if(B.success)c("tengu_pdf_page_extraction",{success:!0,pageCount:B.data.file.count,fileSize:B.data.file.originalSize});else c("tengu_pdf_page_extraction",{success:!1,available:B.error.reason!=="unavailable",fileSize:v.size})}if(!jx6())throw Error("PDF reading is not supported. Install poppler-utils (e.g. `brew install poppler` or `apt-get install poppler-utils`) to enable PDF reading.");let R=await Pw4(K);if(!R.success)throw Error(R.error.message);let h=R.data;return pI({operation:"read",tool:"FileReadTool",filePath:q,content:h.file.base64}),{data:h,newMessages:[A8({content:[{type:"document",source:{type:"base64",media_type:"application/pdf",data:h.file.base64}}],isMeta:!0})]}}let J=z===0?0:z-1,{content:M,lineCount:D,totalLines:X,totalBytes:P,readBytes:W,mtimeMs:Z}=await mG6(K,J,w,w===void 0?$:void 0,j.abortController.signal);await D24(M,Y,O),H.set(q,{content:M,timestamp:Math.floor(Z),offset:z,limit:w}),j.nestedMemoryAttachmentTriggers?.add(q);for(let V of zAY)V(K,M);let G={type:"text",file:{filePath:A,content:M,numLines:D,startLine:z,totalLines:X}};pI({operation:"read",tool:"FileReadTool",filePath:q,content:M});let f=_AY(q);return c("tengu_session_file_read",{totalLines:X,readLines:D,totalBytes:P,readBytes:W,is_session_memory:f==="session_memory",is_session_transcript:f==="session_transcript"}),{data:G}}async function xE8(A,q=bE8(),K){let Y=await P1().readFileBytes(A,K),z=Y.length;if(z===0)throw Error(`Image file is empty: ${A}`);let w=Ip6(Y),_=w.split("/")[1]||"png",$;try{let H=await VF(Y,z,_);$=lW1(H.buffer,H.mediaType,z,H.dimensions)}catch(H){if(H instanceof qi)throw H;$6(H),$=lW1(Y,_,z)}if(Math.ceil($.file.base64.length*0.125)>q)try{let H=await l54(Y,q,w);return{type:"image",file:{base64:H.base64,type:H.mediaType,originalSize:z}}}catch(H){$6(H);try{let j=await Promise.resolve().then(() => e(Fv8(),1)),M=await(j.default||j)(Y).resize(400,400,{fit:"inside",withoutEnlargement:!0}).jpeg({quality:20}).toBuffer();return lW1(M,"jpeg",z)}catch(j){return $6(j),lW1(Y,_,z)}}return $}var AAY,KAY,zAY,wAY=25000,iW1,P24,$AY,OAY,KY,jAY=` Whenever you read a file, you should consider whether it would be considered malware. You CAN and SHOULD provide analysis of malware, what it is doing. But you MUST refuse to improve or augment the code. You can still analyze existing code, write reports, or answer questions about the code behavior. `,JAY;var Px=k(()=>{B7();W7();Z8();xS();p7();at();vW1();Kz();SW1();x1();U2();iz();RY1();X68();jE8();SA();UN();Y7();Y24();gY1();B1();Xq();p7();a1();Oi();AAY=new Set(["/dev/zero","/dev/random","/dev/urandom","/dev/full","/dev/stdin","/dev/tty","/dev/console","/dev/stdout","/dev/stderr","/dev/fd/0","/dev/fd/1","/dev/fd/2"]);KAY=String.fromCharCode(8239);zAY=[];iW1=class iW1 extends Error{tokenCount;maxTokens;constructor(A,q){super(`File content (${A} tokens) exceeds maximum allowed tokens (${q}). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.`);this.tokenCount=A;this.maxTokens=q;this.name="MaxFileReadTokenExceededError"}};P24=new Set(["png","jpg","jpeg","gif","webp"]);$AY=i6(()=>I.strictObject({file_path:I.string().describe("The absolute path to the file to read"),offset:I.number().optional().describe("The line number to start reading from. Only provide if the file is too large to read at once"),limit:I.number().optional().describe("The number of lines to read. Only provide if the file is too large to read at once."),pages:I.string().optional().describe(`Page range for PDF files (e.g., "1-5", "3", "10-20"). Only applicable to PDF files. Maximum ${fG6} pages per request.`)})),OAY=i6(()=>{let A=I.enum(["image/jpeg","image/png","image/gif","image/webp"]);return I.discriminatedUnion("type",[I.object({type:I.literal("text"),file:I.object({filePath:I.string().describe("The path to the file that was read"),content:I.string().describe("The content of the file"),numLines:I.number().describe("Number of lines in the returned content"),startLine:I.number().describe("The starting line number"),totalLines:I.number().describe("Total number of lines in the file")})}),I.object({type:I.literal("image"),file:I.object({base64:I.string().describe("Base64-encoded image data"),type:A.describe("The MIME type of the image"),originalSize:I.number().describe("Original file size in bytes"),dimensions:I.object({originalWidth:I.number().optional().describe("Original image width in pixels"),originalHeight:I.number().optional().describe("Original image height in pixels"),displayWidth:I.number().optional().describe("Displayed image width in pixels (after resizing)"),displayHeight:I.number().optional().describe("Displayed image height in pixels (after resizing)")}).optional().describe("Image dimension info for coordinate mapping")})}),I.object({type:I.literal("notebook"),file:I.object({filePath:I.string().describe("The path to the notebook file"),cells:I.array(I.any()).describe("Array of notebook cells")})}),I.object({type:I.literal("pdf"),file:I.object({filePath:I.string().describe("The path to the PDF file"),base64:I.string().describe("Base64-encoded PDF data"),originalSize:I.number().describe("Original file size in bytes")})}),I.object({type:I.literal("parts"),file:I.object({filePath:I.string().describe("The path to the PDF file"),originalSize:I.number().describe("Original file size in bytes"),count:I.number().describe("Number of pages extracted"),outputDir:I.string().describe("Directory containing extracted page images")})})])}),KY={name:u4,searchHint:"read files, images, PDFs, notebooks",maxResultSizeChars:1e5,strict:!0,input_examples:[{file_path:"/Users/username/project/src/index.ts"},{file_path:"/Users/username/project/README.md",limit:100,offset:50}],async description(){return KtA},async prompt(){return YtA},get inputSchema(){return $AY()},inputParamAliases:{filePath:"file_path",filepath:"file_path",path:"file_path"},get outputSchema(){return OAY()},userFacingName:K24,getToolUseSummary:LE8,getActivityDescription(A){let q=LE8(A);return q?`Reading ${q}`:"Reading file"},isEnabled(){return!0},isConcurrencySafe(){return!0},isReadOnly(){return!0},toAutoClassifierInput(A){return A.file_path},isSearchOrReadCommand(){return{isSearch:!1,isRead:!0}},getPath({file_path:A}){return A||I1()},async checkPermissions(A,q){let K=q.getAppState();return U66(KY,A,K.toolPermissionContext)},renderToolUseMessage:aw4,renderToolUseTag:sw4,renderToolUseProgressMessage:tw4,renderToolResultMessage:ew4,renderToolUseRejectedMessage:A24,renderToolUseErrorMessage:q24,async validateInput({file_path:A,pages:q},K){if(q!==void 0){let O=N78(q);if(!O)return{result:!1,message:`Invalid pages parameter: "${q}". Use formats like "1-5", "3", or "10-20". Pages are 1-indexed.`,errorCode:7};if((O.lastPage===1/0?fG6+1:O.lastPage-O.firstPage+1)>fG6)return{result:!1,message:`Page range "${q}" exceeds maximum of ${fG6} pages per request. Please use a smaller range.`,errorCode:8}}let Y=t4(A),z=K.getAppState();if(ZP(Y,z.toolPermissionContext,"read","deny")!==null)return{result:!1,message:"File is in a directory that is denied by your permission settings.",errorCode:1};if(Y.startsWith("\\\\")||Y.startsWith("//"))return{result:!0};let $=rY6.extname(Y).toLowerCase();if(x31(Y)&&!BD6($)&&!P24.has($.slice(1)))return{result:!1,message:`This tool cannot read binary files. The file appears to be a binary ${$} file. Please use appropriate tools for binary file analysis.`,errorCode:4};if(qAY(Y))return{result:!1,message:`Cannot read '${A}': this device file would block or produce infinite output.`,errorCode:9};return{result:!0}},async call({file_path:A,offset:q=1,limit:K=void 0,pages:Y},z){let{readFileState:w,fileReadingLimits:_}=z,$=_?.maxSizeBytes??uE8,O=_?.maxTokens??bE8(),H=rY6.extname(A).toLowerCase().slice(1),j=t4(A),J=I1();if(!$1(process.env.CLAUDE_CODE_SIMPLE)){let M=await oG6([j],J);if(M.length>0){for(let D of M)z.dynamicSkillDirTriggers?.add(D);aG6(M).catch(()=>{})}sG6([j],J)}try{return await X24(A,j,j,H,q,K,Y,$,O,w,z)}catch(M){if(M.code==="ENOENT"){let X=YAY(j);if(X)try{return await X24(A,j,X,H,q,K,Y,$,O,w,z)}catch(G){if(G.code!=="ENOENT")throw G}let P=nW1(j),W=await p66(j),Z=`File does not exist. ${WG} ${I1()}.`;if(W)Z+=` Did you mean ${W}?`;else if(P)Z+=` Did you mean ${P}?`;throw Error(Z)}throw M}},mapToolResultToToolResultBlockParam(A,q){switch(A.type){case"image":return{tool_use_id:q,type:"tool_result",content:[{type:"image",source:{type:"base64",data:A.file.base64,media_type:A.file.type}}]};case"notebook":return Ow4(A.file.cells,q);case"pdf":return{tool_use_id:q,type:"tool_result",content:`PDF file read: ${A.file.filePath} (${RK(A.file.originalSize)})`};case"parts":return{tool_use_id:q,type:"tool_result",content:`PDF pages extracted: ${A.file.count} page(s) from ${A.file.filePath} (${RK(A.file.originalSize)})`};case"text":{let K;if(A.file.content)K=HAY(A.file)+(MAY()?jAY:"");else K=A.file.totalLines===0?"Warning: the file exists but the contents are empty.":`Warning: the file exists but is shorter than the provided offset (${A.file.startLine}). The file has ${A.file.totalLines} lines.`;return{tool_use_id:q,type:"tool_result",content:K}}}}};JAY=new Set(["claude-opus-4-6"])});var T24={};m1(T24,{shouldRenderSearchHints:()=>f24,isDeferredTool:()=>GG,getPrompt:()=>rW1,formatDeferredToolLine:()=>zd6,TOOL_SEARCH_TOOL_NAME:()=>OW});function PAY(){return p8("tengu_glacier_2xr",!1)?"Deferred tools are announced via system-reminder messages in the conversation as they become available — look for those messages for the list of tools you can discover.":"Look for messages in the conversation for the list of tools you can discover."}function GG(A){if(A.isMcp===!0)return!0;if(A.name===OW)return!1;if(p8("tengu_defer_all_bn4",!0))return!0;return A.shouldDefer===!0}function f24(){if($1(process.env.CLAUDE_CODE_SEARCH_HINTS_IN_LIST))return!0;if(dz(process.env.CLAUDE_CODE_SEARCH_HINTS_IN_LIST))return!1;return p8("tengu_tst_hint_m7r",!1)}function zd6(A){if(f24()&&A.searchHint)return`${A.name} — ${A.searchHint}`;return A.name}function rW1(){return XAY+PAY()+WAY+DAY}var OW="ToolSearch",DAY=` **Why this is non-negotiable:** - Deferred tools are not loaded until discovered via this tool - Calling a deferred tool without first loading it will fail **Query modes:** 1. **Keyword search** - Use keywords when you're unsure which tool to use or need to discover multiple tools at once: - "list directory" - find tools for listing directories - "notebook jupyter" - find notebook editing tools - "slack message" - find slack messaging tools - Returns up to 5 matching tools ranked by relevance - All returned tools are immediately available to call — no further selection step needed 2. **Direct selection** - Use \`select:\` when you know the exact tool name: - "select:mcp__slack__read_channel" - "select:NotebookEdit" - "select:Read,Edit,Grep" - load multiple tools at once with comma separation - Returns the named tool(s) if they exist **IMPORTANT:** Both modes load tools equally. Do NOT follow up a keyword search with \`select:\` calls for tools already returned — they are already loaded. 3. **Required keyword** - Prefix with \`+\` to require a match: - "+linear create issue" - only tools from "linear", ranked by "create"/"issue" - "+slack send" - only "slack" tools, ranked by "send" - Useful when you know the service name but not the exact tool **CORRECT Usage Patterns:** User: I need to work with slack somehow Assistant: Let me search for slack tools. [Calls ToolSearch with query: "slack"] Assistant: Found several options including mcp__slack__read_channel. [Calls mcp__slack__read_channel directly — it was loaded by the keyword search] User: Edit the Jupyter notebook Assistant: Let me load the notebook editing tool. [Calls ToolSearch with query: "select:NotebookEdit"] [Calls NotebookEdit] User: List files in the src directory Assistant: I can see mcp__filesystem__list_directory in the available tools. Let me select it. [Calls ToolSearch with query: "select:mcp__filesystem__list_directory"] [Calls the tool] **INCORRECT Usage Patterns - NEVER DO THESE:** User: Read my slack messages Assistant: [Directly calls mcp__slack__read_channel without loading it first] WRONG - You must load the tool FIRST using this tool Assistant: [Calls ToolSearch with query: "slack", gets back mcp__slack__read_channel] Assistant: [Calls ToolSearch with query: "select:mcp__slack__read_channel"] WRONG - The keyword search already loaded the tool. The select call is redundant. `,XAY=`Search for or select deferred tools to make them available for use. **MANDATORY PREREQUISITE - THIS IS A HARD REQUIREMENT** You MUST use this tool to load deferred tools BEFORE calling them directly. This is a BLOCKING REQUIREMENT - deferred tools are NOT available until you load them using this tool. `,WAY=" Both query modes (keyword search and direct selection) load the returned tools — once a tool appears in the results, it is immediately available to call.";var d66=k(()=>{rA();Z8();Q1()});function V24(){return null}function N24(){return null}function v24(){return null}function k24(){return null}function E24(){return null}var S24={};m1(S24,{outputSchema:()=>R24,inputSchema:()=>y24,clearToolSearchDescriptionCache:()=>fAY,ToolSearchTool:()=>wd6});function ZAY(A){return A.map((q)=>q.name).sort().join(",")}function GAY(A){let q=ZAY(A);if(BE8!==q)L("ToolSearchTool: cache invalidated - deferred tools changed"),sW1.cache.clear?.(),BE8=q}function fAY(){sW1.cache.clear?.(),BE8=null}function oW1(A,q,K,Y){return{data:{matches:A,query:q,total_deferred_tools:K,...Y&&Y.length>0?{pending_mcp_servers:Y}:{}}}}function L24(A){if(A.startsWith("mcp__")){let K=A.replace(/^mcp__/,"").toLowerCase();return{parts:K.split("__").flatMap((z)=>z.split("_")).filter(Boolean),full:K.replace(/__/g," ").replace(/_/g," "),isMcp:!0}}let q=A.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ").toLowerCase().split(/\s+/).filter(Boolean);return{parts:q,full:q.join(" "),isMcp:!1}}function aW1(A,q){return new RegExp(`\\b${iM6(q)}\\b`).test(A)}async function TAY(A,q,K,Y){let z=A.toLowerCase().trim(),w=q.find((M)=>M.name.toLowerCase()===z)??K.find((M)=>M.name.toLowerCase()===z);if(w)return[w.name];if(z.startsWith("mcp__")&&z.length>5){let M=q.filter((D)=>D.name.toLowerCase().startsWith(z)).slice(0,Y).map((D)=>D.name);if(M.length>0)return M}let _=z.split(/\s+/).filter((M)=>M.length>0),$=[],O=[];for(let M of _)if(M.startsWith("+")&&M.length>1)$.push(M.slice(1));else O.push(M);let H=q;if($.length>0)H=(await Promise.all(q.map(async(D)=>{let X=L24(D.name),W=(await sW1(D.name,K)).toLowerCase(),Z=D.searchHint?.toLowerCase()??"";return $.every((f)=>X.parts.includes(f)||X.parts.some((V)=>V.includes(f))||aW1(W,f)||Z&&aW1(Z,f))?D:null}))).filter((D)=>D!==null);let j=$.length>0?[...$,...O]:_;return(await Promise.all(H.map(async(M)=>{let D=L24(M.name),P=(await sW1(M.name,K)).toLowerCase(),W=M.searchHint?.toLowerCase()??"",Z=0;for(let G of j){if(D.parts.includes(G))Z+=D.isMcp?12:10;else if(D.parts.some((f)=>f.includes(G)))Z+=D.isMcp?6:5;if(D.full.includes(G)&&Z===0)Z+=3;if(W&&aW1(W,G))Z+=4;if(aW1(P,G))Z+=2}return{name:M.name,score:Z}}))).filter((M)=>M.score>0).sort((M,D)=>D.score-M.score).slice(0,Y).map((M)=>M.name)}var y24,R24,BE8=null,sW1,wd6;var tW1=k(()=>{B7();d66();bF();G1();B1();Eq();y24=i6(()=>I.object({query:I.string().describe('Query to find deferred tools. Use "select:" for direct selection, or keywords to search.'),max_results:I.number().optional().default(5).describe("Maximum number of results to return (default: 5)")})),R24=i6(()=>I.object({matches:I.array(I.string()),query:I.string(),total_deferred_tools:I.number(),pending_mcp_servers:I.array(I.string()).optional()}));sW1=T8(async(A,q)=>{let K=z5(q,A);if(!K)return"";return K.prompt({getToolPermissionContext:async()=>({mode:"default",additionalWorkingDirectories:new Map,alwaysAllowRules:{},alwaysDenyRules:{},alwaysAskRules:{},isBypassPermissionsModeAvailable:!1}),tools:q,agents:[]})},(A)=>A);wd6={isEnabled(){return Wx()},isConcurrencySafe(){return!0},isReadOnly(){return!0},toAutoClassifierInput(){return""},name:OW,maxResultSizeChars:1e5,async description(){return rW1()},async prompt(){return rW1()},get inputSchema(){return y24()},get outputSchema(){return R24()},async call(A,{options:{tools:q},getAppState:K}){let{query:Y,max_results:z=5}=A,w=q.filter(GG);GAY(w);async function _(){let J=K().mcp.clients.filter((M)=>M.type==="pending");return J.length>0?J.map((M)=>M.name):void 0}function $(j,J){c("tengu_tool_search_outcome",{query:Y,queryType:J,matchCount:j.length,totalDeferredTools:w.length,maxResults:z,hasMatches:j.length>0})}let O=Y.match(/^select:(.+)$/i);if(O){let j=O[1].split(",").map((D)=>D.trim()).filter(Boolean),J=[],M=[];for(let D of j){let X=z5(w,D)??z5(q,D);if(X){if(!J.includes(X.name))J.push(X.name)}else M.push(D)}if(J.length===0){L(`ToolSearchTool: select failed — none found: ${M.join(", ")}`),$([],"select");let D=await _();return oW1([],Y,w.length,D)}if(M.length>0)L(`ToolSearchTool: partial select — found: ${J.join(", ")}, missing: ${M.join(", ")}`);else L(`ToolSearchTool: selected ${J.join(", ")}`);return $(J,"select"),oW1(J,Y,w.length)}let H=await TAY(Y,w,q,z);if(L(`ToolSearchTool: keyword search for "${Y}", found ${H.length} matches`),$(H,"keyword"),H.length===0){let j=await _();return oW1(H,Y,w.length,j)}return oW1(H,Y,w.length)},async checkPermissions(A){return{behavior:"allow",updatedInput:A}},renderToolUseMessage:V24,userFacingName:()=>"",renderToolUseRejectedMessage:N24,renderToolUseErrorMessage:v24,renderToolUseProgressMessage:k24,renderToolResultMessage:E24,mapToolResultToToolResultBlockParam(A,q){if(A.matches.length===0){let K="No matching deferred tools found";if(A.pending_mcp_servers&&A.pending_mcp_servers.length>0)K+=`. Some MCP servers are still connecting: ${A.pending_mcp_servers.join(", ")}. Their tools will become available shortly — try searching again.`;return{type:"tool_result",tool_use_id:q,content:K}}return{type:"tool_result",tool_use_id:q,content:A.matches.map((K)=>({type:"tool_reference",tool_name:K}))}}}});import{readFile as C24}from"fs/promises";async function eW1(A,q){return}var VAY,NAY;var mE8=k(()=>{B1();Eq();a1();VAY=T8(async()=>{return null}),NAY=T8(async()=>{return null})});var US="TaskCreate";var KL="TaskUpdate";var nj="Skill";function rj(A){return typeof A==="object"&&A!==null&&"type"in A&&A.type==="in_process_teammate"}function pS(A){let{viewingAgentTaskId:q,tasks:K}=A;if(!q)return;let Y=K[q];if(!Y)return;if(!rj(Y))return;return Y}function h24(A){let q=pS(A);if(q)return{type:"viewed",task:q};return{type:"leader"}}function I24(A){return pS(A)!==void 0}var oY6=()=>{};function AZ1(A){if(!A)return;let q=Object.values(A).filter((K)=>K.type==="image").map((K)=>K.id);return q.length>0?q:void 0}var B24={};m1(B24,{getSkillToolInfo:()=>QE8,getSkillInfo:()=>EAY,getPrompt:()=>KZ1,getLimitedSkillToolCommands:()=>UE8,getCharBudget:()=>qZ1,formatCommandsWithinBudget:()=>FE8,clearPromptCache:()=>pE8,SKILL_BUDGET_CONTEXT_PERCENT:()=>b24,DEFAULT_CHAR_BUDGET:()=>u24,CHARS_PER_TOKEN:()=>x24});function qZ1(A){if(Number(process.env.SLASH_COMMAND_TOOL_CHAR_BUDGET))return Number(process.env.SLASH_COMMAND_TOOL_CHAR_BUDGET);if(A)return Math.floor(A*x24*b24);return u24}function gE8(A){return A.whenToUse?`${A.description} - ${A.whenToUse}`:A.description}function vAY(A){if(A.name!==A.userFacingName()&&A.type==="prompt"&&A.source==="plugin")L(`Skill prompt: showing "${A.name}" (userFacingName="${A.userFacingName()}")`);return`- ${A.name}: ${gE8(A)}`}function FE8(A,q){if(A.length===0)return"";let K=qZ1(q),Y=A.map((D)=>({cmd:D,full:vAY(D)}));if(Y.reduce((D,X)=>D+X.full.length,0)+(Y.length-1)<=K)return Y.map((D)=>D.full).join(` `);let w=new Set,_=[];for(let D=0;Dw.has(P)?D+X.full.length+1:D,0),O=K-$;if(_.length===0)return Y.map((D)=>D.full).join(` `);let H=_.reduce((D,X)=>D+X.name.length+4,0)+(_.length-1),j=O-H,J=Math.floor(j/_.length);if(Jw.has(X)?Y[X].full:`- ${D.name}`).join(` `);let M=_.filter((D)=>gE8(D).length>J).length;return A.map((D,X)=>{if(w.has(X))return Y[X].full;let P=gE8(D),W=P.length>J?P.slice(0,J-1)+"…":P;return`- ${D.name}: ${W}`}).join(` `)}async function QE8(A){let q=await dS(A);return{totalCommands:q.length,includedCommands:q.length}}function UE8(A){return dS(A)}function pE8(){KZ1.cache?.clear?.()}async function EAY(A){try{let q=await _d6(A);return{totalSkills:q.length,includedSkills:q.length}}catch(q){return $6(q instanceof Error?q:Error("Failed to get skill info")),{totalSkills:0,includedSkills:0}}}var b24=0.02,x24=4,u24=16000,kAY=20,KZ1;var aY6=k(()=>{OH();G1();x1();OH();WK1();Ez();B1();KZ1=T8(async(A)=>{return`Execute a skill within the main conversation When users ask you to perform tasks, check if any of the available skills match. Skills provide specialized capabilities and domain knowledge. When users reference a "slash command" or "/" (e.g., "/commit", "/review-pr"), they are referring to a skill. Use this tool to invoke it. How to invoke: - Use this tool with the skill name and optional arguments - Examples: - \`skill: "pdf"\` - invoke the pdf skill - \`skill: "commit", args: "-m 'Fix bug'"\` - invoke with arguments - \`skill: "review-pr", args: "123"\` - invoke with arguments - \`skill: "ms-office-suite:pdf"\` - invoke using fully qualified name Important: - Available skills are listed in system-reminder messages in the conversation - When a skill matches the user's request, this is a BLOCKING REQUIREMENT: invoke the relevant Skill tool BEFORE generating any other response about the task - NEVER mention a skill without actually calling this tool - Do not invoke a skill that is already running - Do not use this tool for built-in CLI commands (like /help, /clear, etc.) - If you see a <${SZ}> tag in the current conversation turn, the skill has ALREADY been loaded - follow the instructions directly instead of calling this tool again `})});function m24(A,q){let K=Object.create(null),Y=0;for(let z of A){let w=q(z,Y++);if(K[w]===void 0)K[w]=[];K[w].push(z)}return K}function sY6(A,q){let K=d1(),Y={type:"queue-operation",operation:A,timestamp:new Date().toISOString(),sessionId:K,...q!==void 0&&{content:q}};cE8(Y)}function c66(){g24=Object.freeze([...Hz]);for(let A of dE8)A()}function eG6(A){return dE8.add(A),()=>{dE8.delete(A)}}function YZ1(){return g24}function F24(){return[...Hz]}function Q24(){return Hz.length}function tY6(){return Hz.length>0}function HW(A){Hz.push({...A,priority:A.priority??"next"}),c66(),sY6("enqueue",typeof A.value==="string"?A.value:void 0)}function jW(A){Hz.push({...A,priority:A.priority??"later"}),c66(),sY6("enqueue",typeof A.value==="string"?A.value:void 0)}function zZ1(){if(Hz.length===0)return;let A=0,q=tG6[Hz[0].priority??"next"];for(let Y=1;Y=0;K--)if(A.some((Y)=>Y.value===Hz[K].value))Hz.splice(K,1);if(Hz.length!==q)c66();for(let K of A)sY6("remove")}function c24(A){let q=[];for(let K=Hz.length-1;K>=0;K--)if(A(Hz[K]))q.unshift(Hz.splice(K,1)[0]);if(q.length>0){c66();for(let K of q)sY6("remove")}return q}function l24(){if(Hz.length===0)return;Hz.length=0,c66()}function yAY(A){return!LAY.has(A)}function l66(A){return yAY(A.mode)&&!A.isMeta}function RAY(A){if(typeof A==="string")return A;let q=[];for(let K of A)if(K.type==="text")q.push(K.text);return q.join(` `)}function SAY(A,q){if(typeof A==="string")return[];let K=[],Y=0;for(let z of A)if(z.type==="image"&&z.source.type==="base64")K.push({id:q+Y,type:"image",content:z.source.data,mediaType:z.source.media_type,filename:`image${Y+1}`}),Y++;return K}function wZ1(A,q){if(Hz.length===0)return;let{editable:K=[],nonEditable:Y=[]}=m24([...Hz],(H)=>l66(H)?"editable":"nonEditable");if(K.length===0)return;let z=K.map((H)=>RAY(H.value)),w=[...z,A].filter(Boolean).join(` `),_=z.join(` `).length+1+q,$=[],O=Date.now();for(let H of K){let j=SAY(H.value,O);$.push(...j),O+=j.length}for(let H of K)sY6("popAll",typeof H.value==="string"?H.value:void 0);return Hz.length=0,Hz.push(...Y),c66(),{text:w,cursorOffset:_,images:$}}function _Z1(A){let q=tG6[A];return Hz.filter((K)=>tG6[K.priority??"next"]<=q)}var Hz,g24,dE8,tG6,LAY;var oj=k(()=>{uq();Q1();Hz=[],g24=Object.freeze([]),dE8=new Set;tG6={now:0,next:1,later:2};LAY=new Set(["task-notification"])});import{randomUUID as CAY}from"crypto";function Od6(A){if(!u7())return;if($d6.length>=hAY)$d6.shift();$d6.push(A)}function $Z1(){if($d6.length===0)return[];return $d6.splice(0).map((q)=>({...q,uuid:CAY(),session_id:d1()}))}var hAY=1000,$d6;var OZ1=k(()=>{Q1();$d6=[]});function fw(A,q,K){q((Y)=>{let z=Y.tasks?.[A];if(!z)return Y;return{...Y,tasks:{...Y.tasks,[A]:K(z)}}})}function ET(A,q){q((K)=>({...K,tasks:{...K.tasks,[A.id]:A}})),Od6({type:"system",subtype:"task_started",task_id:A.id,tool_use_id:A.toolUseId,description:A.description,task_type:A.type,prompt:"prompt"in A?A.prompt:void 0})}function cS(A,q){q((K)=>{let Y=K.tasks?.[A];if(!Y)return K;if(Y.status!=="completed"&&Y.status!=="failed"&&Y.status!=="killed")return K;if(!Y.notified)return K;let{[A]:z,...w}=K.tasks;return{...K,tasks:w}})}function lE8(A){let q=A.tasks??{};return Object.values(q).filter((K)=>K.status==="running")}async function i24(A){let q=[],K={},Y=[],z=A.tasks??{};for(let w of Object.values(z)){if(w.notified)switch(w.status){case"completed":case"failed":case"killed":Y.push(w.id);continue;case"pending":continue;case"running":break}if(w.status==="running"){let _=await ndA(w.id,w.outputOffset);if(_.content)K[w.id]={...w,outputOffset:_.newOffset}}}return{attachments:q,updatedTasks:K,evictedTaskIds:Y}}var xF=3000;var fG=k(()=>{BD();oj();OZ1();Ez()});function Af6(){if($1(process.env.CLAUDE_CODE_MCP_INSTR_DELTA))return!0;if(dz(process.env.CLAUDE_CODE_MCP_INSTR_DELTA))return!1;return p8("tengu_basalt_3kr",!1)}function n24(A,q,K){let Y=new Set;for(let H of q){if(H.type!=="attachment")continue;if(H.attachment.type!=="mcp_instructions_delta")continue;for(let j of H.attachment.addedNames)Y.add(j);for(let j of H.attachment.removedNames)Y.delete(j)}let z=A.filter((H)=>H.type==="connected"),w=new Set(z.map((H)=>H.name)),_=new Map;for(let H of z)if(H.instructions)_.set(H.name,`## ${H.name} ${H.instructions}`);for(let H of K){if(!w.has(H.serverName))continue;let j=_.get(H.serverName);_.set(H.serverName,j?`${j} ${H.block}`:`## ${H.serverName} ${H.block}`)}let $=[];for(let[H,j]of _)if(!Y.has(H))$.push({name:H,block:j});let O=[];for(let H of Y)if(!w.has(H))O.push(H);if($.length===0&&O.length===0)return null;return c("tengu_mcp_instructions_pool_change",{addedCount:$.length,removedCount:O.length,priorAnnouncedCount:Y.size,clientSideCount:K.length}),$.sort((H,j)=>H.name.localeCompare(j.name)),{addedNames:$.map((H)=>H.name),addedBlocks:$.map((H)=>H.block),removedNames:O.sort()}}var HZ1=k(()=>{rA();B1();Z8()});import{platform as o24,tmpdir as IAY,userInfo as bAY,homedir as iE8}from"os";import{join as lS}from"path";import{access as r24}from"fs/promises";import{readdirSync as xAY}from"fs";function a24(){let A=c8(),q=iE8(),K=[];for(let Y of JZ1){let z=Hd6[Y],w;switch(A){case"macos":w=z.macos.dataPath;break;case"linux":case"wsl":w=z.linux.dataPath;break;case"windows":{if(z.windows.dataPath.length>0){let _=z.windows.useRoaming?lS(q,"AppData","Roaming"):lS(q,"AppData","Local");K.push({browser:Y,path:lS(_,...z.windows.dataPath)})}continue}}if(w&&w.length>0)K.push({browser:Y,path:lS(q,...w)})}return K}function s24(){let A=c8(),q=iE8(),K=[];for(let Y of JZ1){let z=Hd6[Y];switch(A){case"macos":if(z.macos.nativeMessagingPath.length>0)K.push({browser:Y,path:lS(q,...z.macos.nativeMessagingPath)});break;case"linux":case"wsl":if(z.linux.nativeMessagingPath.length>0)K.push({browser:Y,path:lS(q,...z.linux.nativeMessagingPath)});break;case"windows":break}}return K}function t24(){let A=[];for(let q of JZ1){let K=Hd6[q];if(K.windows.registryKey)A.push({browser:q,key:K.windows.registryKey})}return A}async function uAY(){let A=c8();for(let q of JZ1){let K=Hd6[q];switch(A){case"macos":{let Y=`/Applications/${K.macos.appName}.app`;try{return await r24(Y),L(`[Claude in Chrome] Detected browser: ${K.name}`),q}catch{}break}case"linux":{for(let Y of K.linux.binaries)if(await f0(Y).catch(()=>null))return L(`[Claude in Chrome] Detected browser: ${K.name}`),q;break}case"windows":{let Y=iE8();if(K.windows.dataPath.length>0){let z=K.windows.useRoaming?lS(Y,"AppData","Roaming"):lS(Y,"AppData","Local"),w=lS(z,...K.windows.dataPath);try{return await r24(w),L(`[Claude in Chrome] Detected browser: ${K.name}`),q}catch{}}break}}}return null}function eY6(A){return FO(A)===iN}function e24(A){if(jZ1.size>=BAY&&!jZ1.has(A))jZ1.clear();jZ1.add(A)}async function MZ1(A){let q=c8(),K=await uAY();if(!K)return L("[Claude in Chrome] No compatible browser found"),!1;let Y=Hd6[K];switch(q){case"macos":{let{code:z}=await W8("open",["-a",Y.macos.appName,A]);return z===0}case"windows":{let{code:z}=await W8("rundll32",["url,OpenURL",A]);return z===0}case"linux":{for(let z of Y.linux.binaries){let{code:w}=await W8(z,[A]);if(w===0)return!0}return!1}default:return!1}}function jd6(){return`/tmp/claude-mcp-browser-bridge-${nE8()}`}function DZ1(){if(o24()==="win32")return`\\\\.\\pipe\\${q_4()}`;return lS(jd6(),`${process.pid}.sock`)}function A_4(){if(o24()==="win32")return[`\\\\.\\pipe\\${q_4()}`];let A=[],q=jd6();try{let w=xAY(q);for(let _ of w)if(_.endsWith(".sock"))A.push(lS(q,_))}catch{}let K=`claude-mcp-browser-bridge-${nE8()}`,Y=lS(IAY(),K),z=`/tmp/${K}`;if(!A.includes(Y))A.push(Y);if(Y!==z&&!A.includes(z))A.push(z);return A}function q_4(){return`claude-mcp-browser-bridge-${nE8()}`}function nE8(){try{return bAY().username||"default"}catch{return process.env.USER||process.env.USERNAME||"default"}}var iN="claude-in-chrome",Hd6,JZ1,BAY=200,jZ1;var iS=k(()=>{uK();aq();G1();tB();Hd6={chrome:{name:"Google Chrome",macos:{appName:"Google Chrome",dataPath:["Library","Application Support","Google","Chrome"],nativeMessagingPath:["Library","Application Support","Google","Chrome","NativeMessagingHosts"]},linux:{binaries:["google-chrome","google-chrome-stable"],dataPath:[".config","google-chrome"],nativeMessagingPath:[".config","google-chrome","NativeMessagingHosts"]},windows:{dataPath:["Google","Chrome","User Data"],registryKey:"HKCU\\Software\\Google\\Chrome\\NativeMessagingHosts"}},brave:{name:"Brave",macos:{appName:"Brave Browser",dataPath:["Library","Application Support","BraveSoftware","Brave-Browser"],nativeMessagingPath:["Library","Application Support","BraveSoftware","Brave-Browser","NativeMessagingHosts"]},linux:{binaries:["brave-browser","brave"],dataPath:[".config","BraveSoftware","Brave-Browser"],nativeMessagingPath:[".config","BraveSoftware","Brave-Browser","NativeMessagingHosts"]},windows:{dataPath:["BraveSoftware","Brave-Browser","User Data"],registryKey:"HKCU\\Software\\BraveSoftware\\Brave-Browser\\NativeMessagingHosts"}},arc:{name:"Arc",macos:{appName:"Arc",dataPath:["Library","Application Support","Arc","User Data"],nativeMessagingPath:["Library","Application Support","Arc","User Data","NativeMessagingHosts"]},linux:{binaries:[],dataPath:[],nativeMessagingPath:[]},windows:{dataPath:["Arc","User Data"],registryKey:"HKCU\\Software\\ArcBrowser\\Arc\\NativeMessagingHosts"}},chromium:{name:"Chromium",macos:{appName:"Chromium",dataPath:["Library","Application Support","Chromium"],nativeMessagingPath:["Library","Application Support","Chromium","NativeMessagingHosts"]},linux:{binaries:["chromium","chromium-browser"],dataPath:[".config","chromium"],nativeMessagingPath:[".config","chromium","NativeMessagingHosts"]},windows:{dataPath:["Chromium","User Data"],registryKey:"HKCU\\Software\\Chromium\\NativeMessagingHosts"}},edge:{name:"Microsoft Edge",macos:{appName:"Microsoft Edge",dataPath:["Library","Application Support","Microsoft Edge"],nativeMessagingPath:["Library","Application Support","Microsoft Edge","NativeMessagingHosts"]},linux:{binaries:["microsoft-edge","microsoft-edge-stable"],dataPath:[".config","microsoft-edge"],nativeMessagingPath:[".config","microsoft-edge","NativeMessagingHosts"]},windows:{dataPath:["Microsoft","Edge","User Data"],registryKey:"HKCU\\Software\\Microsoft\\Edge\\NativeMessagingHosts"}},vivaldi:{name:"Vivaldi",macos:{appName:"Vivaldi",dataPath:["Library","Application Support","Vivaldi"],nativeMessagingPath:["Library","Application Support","Vivaldi","NativeMessagingHosts"]},linux:{binaries:["vivaldi","vivaldi-stable"],dataPath:[".config","vivaldi"],nativeMessagingPath:[".config","vivaldi","NativeMessagingHosts"]},windows:{dataPath:["Vivaldi","User Data"],registryKey:"HKCU\\Software\\Vivaldi\\NativeMessagingHosts"}},opera:{name:"Opera",macos:{appName:"Opera",dataPath:["Library","Application Support","com.operasoftware.Opera"],nativeMessagingPath:["Library","Application Support","com.operasoftware.Opera","NativeMessagingHosts"]},linux:{binaries:["opera"],dataPath:[".config","opera"],nativeMessagingPath:[".config","opera","NativeMessagingHosts"]},windows:{dataPath:["Opera Software","Opera Stable"],registryKey:"HKCU\\Software\\Opera Software\\Opera Stable\\NativeMessagingHosts",useRoaming:!0}}},JZ1=["chrome","brave","arc","edge","chromium","vivaldi","opera"];jZ1=new Set});function rE8(){return`# Claude in Chrome browser automation You have access to browser automation tools (mcp__claude-in-chrome__*) for interacting with web pages in Chrome. Follow these guidelines for effective browser automation. ## GIF recording When performing multi-step browser interactions that the user may want to review or share, use mcp__claude-in-chrome__gif_creator to record them. You must ALWAYS: * Capture extra frames before and after taking actions to ensure smooth playback * Name the file meaningfully to help the user identify it later (e.g., "login_process.gif") ## Console log debugging You can use mcp__claude-in-chrome__read_console_messages to read console output. Console output may be verbose. If you are looking for specific log entries, use the 'pattern' parameter with a regex-compatible pattern. This filters results efficiently and avoids overwhelming output. For example, use pattern: "[MyApp]" to filter for application-specific logs rather than reading all console output. ## Alerts and dialogs IMPORTANT: Do not trigger JavaScript alerts, confirms, prompts, or browser modal dialogs through your actions. These browser dialogs block all further browser events and will prevent the extension from receiving any subsequent commands. Instead, when possible, use console.log for debugging and then use the mcp__claude-in-chrome__read_console_messages tool to read those log messages. If a page has dialog-triggering elements: 1. Avoid clicking buttons or links that may trigger alerts (e.g., "Delete" buttons with confirmation dialogs) 2. If you must interact with such elements, warn the user first that this may interrupt the session 3. Use mcp__claude-in-chrome__javascript_tool to check for and dismiss any existing dialogs before proceeding If you accidentally trigger a dialog and lose responsiveness, inform the user they need to manually dismiss it in the browser. ## Avoid rabbit holes and loops When using browser automation tools, stay focused on the specific task. If you encounter any of the following, stop and ask the user for guidance: - Unexpected complexity or tangential browser exploration - Browser tool calls failing or returning errors after 2-3 attempts - No response from the browser extension - Page elements not responding to clicks or input - Pages not loading or timing out - Unable to complete the browser task despite multiple approaches Explain what you attempted, what went wrong, and ask how the user would like to proceed. Do not keep retrying the same failing browser action or explore unrelated pages without checking in first. ## Tab context and session startup IMPORTANT: At the start of each browser automation session, call mcp__claude-in-chrome__tabs_context_mcp first to get information about the user's current browser tabs. Use this context to understand what the user might want to work with before creating new tabs. Never reuse tab IDs from a previous/other session. Follow these guidelines: 1. Only reuse an existing tab if the user explicitly asks to work with it 2. Otherwise, create a new tab with mcp__claude-in-chrome__tabs_create_mcp 3. If a tool returns an error indicating the tab doesn't exist or is invalid, call tabs_context_mcp to get fresh tab IDs 4. When a tab is closed by the user or a navigation error occurs, call tabs_context_mcp to see what tabs are available`}var K_4=`# Claude in Chrome browser automation You have access to browser automation tools (mcp__claude-in-chrome__*) for interacting with web pages in Chrome. Follow these guidelines for effective browser automation. ## GIF recording When performing multi-step browser interactions that the user may want to review or share, use mcp__claude-in-chrome__gif_creator to record them. You must ALWAYS: * Capture extra frames before and after taking actions to ensure smooth playback * Name the file meaningfully to help the user identify it later (e.g., "login_process.gif") ## Console log debugging You can use mcp__claude-in-chrome__read_console_messages to read console output. Console output may be verbose. If you are looking for specific log entries, use the 'pattern' parameter with a regex-compatible pattern. This filters results efficiently and avoids overwhelming output. For example, use pattern: "[MyApp]" to filter for application-specific logs rather than reading all console output. ## Alerts and dialogs IMPORTANT: Do not trigger JavaScript alerts, confirms, prompts, or browser modal dialogs through your actions. These browser dialogs block all further browser events and will prevent the extension from receiving any subsequent commands. Instead, when possible, use console.log for debugging and then use the mcp__claude-in-chrome__read_console_messages tool to read those log messages. If a page has dialog-triggering elements: 1. Avoid clicking buttons or links that may trigger alerts (e.g., "Delete" buttons with confirmation dialogs) 2. If you must interact with such elements, warn the user first that this may interrupt the session 3. Use mcp__claude-in-chrome__javascript_tool to check for and dismiss any existing dialogs before proceeding If you accidentally trigger a dialog and lose responsiveness, inform the user they need to manually dismiss it in the browser. ## Avoid rabbit holes and loops When using browser automation tools, stay focused on the specific task. If you encounter any of the following, stop and ask the user for guidance: - Unexpected complexity or tangential browser exploration - Browser tool calls failing or returning errors after 2-3 attempts - No response from the browser extension - Page elements not responding to clicks or input - Pages not loading or timing out - Unable to complete the browser task despite multiple approaches Explain what you attempted, what went wrong, and ask how the user would like to proceed. Do not keep retrying the same failing browser action or explore unrelated pages without checking in first. ## Tab context and session startup IMPORTANT: At the start of each browser automation session, call mcp__claude-in-chrome__tabs_context_mcp first to get information about the user's current browser tabs. Use this context to understand what the user might want to work with before creating new tabs. Never reuse tab IDs from a previous/other session. Follow these guidelines: 1. Only reuse an existing tab if the user explicitly asks to work with it 2. Otherwise, create a new tab with mcp__claude-in-chrome__tabs_create_mcp 3. If a tool returns an error indicating the tab doesn't exist or is invalid, call tabs_context_mcp to get fresh tab IDs 4. When a tab is closed by the user or a navigation error occurs, call tabs_context_mcp to see what tabs are available`,XZ1=`**IMPORTANT: Before using any chrome browser tools, you MUST first load them using ToolSearch.** Chrome browser tools are MCP tools that require loading before use. Before calling any mcp__claude-in-chrome__* tool: 1. Use ToolSearch with \`select:mcp__claude-in-chrome__\` to load the specific tool 2. Then call the tool For example, to get tab context: 1. First: ToolSearch with query "select:mcp__claude-in-chrome__tabs_context_mcp" 2. Then: Call mcp__claude-in-chrome__tabs_context_mcp`,oE8='**Browser Automation**: Chrome browser tools are available via the "claude-in-chrome" skill. CRITICAL: Before using any mcp__claude-in-chrome__* tools, invoke the skill by calling the Skill tool with skill: "claude-in-chrome". The skill provides browser automation instructions and enables the tools.';function Y_4(A){if(aE8=A,A&&Jd6.length>0)for(let q of Jd6.splice(0))A(q)}function sE8(A){if(aE8)aE8(A);else if(Jd6.push(A),Jd6.length>gAY)Jd6.shift()}function PZ1(A){return mAY.includes(A)}function tE8(A,q,K){if(!PZ1(K))return;sE8({type:"started",hookId:A,hookName:q,hookEvent:K})}function FAY(A){if(!PZ1(A.hookEvent))return;if(!$1(process.env.CLAUDE_CODE_REMOTE))return;sE8({type:"progress",...A})}function WZ1(A){if(!PZ1(A.hookEvent))return()=>{};if(!$1(process.env.CLAUDE_CODE_REMOTE))return()=>{};let q="",K=setInterval(()=>{A.getOutput().then(({stdout:Y,stderr:z,output:w})=>{if(w===q)return;q=w,FAY({hookId:A.hookId,hookName:A.hookName,hookEvent:A.hookEvent,stdout:Y,stderr:z,output:w})})},1000);return K.unref(),()=>clearInterval(K)}function JW(A){let q=A.stdout||A.stderr||A.output;if(q)L(`Hook ${A.hookName} (${A.hookEvent}) ${A.outcome}: ${q}`);if(!PZ1(A.hookEvent))return;sE8({type:"response",...A})}var mAY,gAY=100,Jd6,aE8=null;var ZZ1=k(()=>{Z8();G1();mAY=["SessionStart","Setup"],Jd6=[]});function z_4({processId:A,hookId:q,asyncResponse:K,hookName:Y,hookEvent:z,command:w,shellCommand:_,toolName:$}){let O=K.asyncTimeout||15000;L(`Hooks: Registering async hook ${A} (${Y}) with timeout ${O}ms`);let H=WZ1({hookId:q,hookName:Y,hookEvent:z,getOutput:async()=>{let j=uF.get(A)?.shellCommand?.taskOutput;if(!j)return{stdout:"",stderr:"",output:""};let J=await j.getStdout(),M=j.getStderr();return{stdout:J,stderr:M,output:J+M}}});uF.set(A,{processId:A,hookId:q,hookName:Y,hookEvent:z,toolName:$,command:w,startTime:Date.now(),timeout:O,responseAttachmentSent:!1,shellCommand:_,stopProgressInterval:H})}async function eE8(A,q,K){A.stopProgressInterval();let Y=A.shellCommand?.taskOutput,z=Y?await Y.getStdout():"",w=Y?.getStderr()??"";A.shellCommand?.cleanup(),JW({hookId:A.hookId,hookName:A.hookName,hookEvent:A.hookEvent,output:z+w,stdout:z,stderr:w,exitCode:q,outcome:K})}async function w_4(){let A=[],q=uF.size;L(`Hooks: Found ${q} total hooks in registry`);let K=Array.from(uF.values()),Y=await Promise.allSettled(K.map(async(w)=>{let _=await w.shellCommand?.taskOutput.getStdout()??"",$=w.shellCommand?.taskOutput.getStderr()??"";if(L(`Hooks: Checking hook ${w.processId} (${w.hookName}) - attachmentSent: ${w.responseAttachmentSent}, stdout length: ${_.length}`),!w.shellCommand)return L(`Hooks: Hook ${w.processId} has no shell command, removing from registry`),w.stopProgressInterval(),{type:"remove",processId:w.processId};if(L(`Hooks: Hook shell status ${w.shellCommand.status}`),w.shellCommand.status==="killed")return L(`Hooks: Hook ${w.processId} is ${w.shellCommand.status}, removing from registry`),w.stopProgressInterval(),w.shellCommand.cleanup(),{type:"remove",processId:w.processId};if(w.shellCommand.status!=="completed")return{type:"skip"};if(w.responseAttachmentSent||!_.trim())return L(`Hooks: Skipping hook ${w.processId} - already delivered/sent or no stdout`),w.stopProgressInterval(),{type:"remove",processId:w.processId};let O=_.split(` `);L(`Hooks: Processing ${O.length} lines of stdout for ${w.processId}`);let j=(await w.shellCommand.result).code,J={};for(let M of O)if(M.trim().startsWith("{")){L(`Hooks: Found JSON line: ${M.trim().substring(0,100)}...`);try{let D=O8(M.trim());if(!("async"in D)){L(`Hooks: Found sync response from ${w.processId}: ${U6(D)}`),J=D;break}}catch{L(`Hooks: Failed to parse JSON from ${w.processId}: ${M.trim()}`)}}return w.responseAttachmentSent=!0,await eE8(w,j,j===0?"success":"error"),{type:"response",processId:w.processId,isSessionStart:w.hookEvent==="SessionStart",payload:{processId:w.processId,response:J,hookName:w.hookName,hookEvent:w.hookEvent,toolName:w.toolName,stdout:_,stderr:$,exitCode:j}}})),z=!1;for(let w of Y){if(w.status!=="fulfilled"){L(`Hooks: checkForAsyncHookResponses callback rejected: ${w.reason}`,{level:"error"});continue}let _=w.value;if(_.type==="remove")uF.delete(_.processId);else if(_.type==="response"){if(A.push(_.payload),uF.delete(_.processId),_.isSessionStart)z=!0}}if(z)L("Invalidating session env cache after SessionStart hook completed"),WcA();return L(`Hooks: checkForNewResponses returning ${A.length} responses`),A}function __4(A){for(let q of A){let K=uF.get(q);if(K&&K.responseAttachmentSent)L(`Hooks: Removing delivered hook ${q}`),K.stopProgressInterval(),uF.delete(q)}}async function AL8(){let A=Array.from(uF.values());await Promise.all(A.map(async(q)=>{if(q.shellCommand?.status==="completed"){let K=await q.shellCommand.result;await eE8(q,K.code,K.code===0?"success":"error")}else{if(q.shellCommand&&q.shellCommand.status!=="killed")q.shellCommand.kill();await eE8(q,1,"cancelled")}})),uF.clear()}var uF;var GZ1=k(()=>{G1();_51();a1();ZZ1();uF=new Map});import{randomUUID as QAY}from"crypto";function H_4({serverName:A,files:q}){let K=QAY();L(`LSP Diagnostics: Registering ${q.length} diagnostic file(s) from ${A} (ID: ${K})`),Mi.set(K,{serverName:A,files:q,timestamp:Date.now(),attachmentSent:!1})}function O_4(A){switch(A){case"Error":return 1;case"Warning":return 2;case"Info":return 3;case"Hint":return 4;default:return 4}}function j_4(A){return U6({message:A.message,severity:A.severity,range:A.range,source:A.source||null,code:A.code||null})}function pAY(A){let q=new Map,K=[];for(let Y of A){if(!q.has(Y.uri))q.set(Y.uri,new Set),K.push({uri:Y.uri,diagnostics:[]});let z=q.get(Y.uri),w=K.find(($)=>$.uri===Y.uri),_=i66.get(Y.uri)||new Set;for(let $ of Y.diagnostics)try{let O=j_4($);if(z.has(O)||_.has(O))continue;z.add(O),w.diagnostics.push($)}catch(O){let H=O instanceof Error?O:Error(String(O)),j=$.message?.substring(0,100)||"";$6(Error(`Failed to deduplicate diagnostic in ${Y.uri}: ${H.message}. Diagnostic message: ${j}`)),w.diagnostics.push($)}}return K.filter((Y)=>Y.diagnostics.length>0)}function J_4(){L(`LSP Diagnostics: Checking registry - ${Mi.size} pending`);let A=[],q=new Set,K=[];for(let H of Mi.values())if(!H.attachmentSent)A.push(...H.files),q.add(H.serverName),K.push(H);if(A.length===0)return[];let Y;try{Y=pAY(A)}catch(H){let j=H instanceof Error?H:Error(String(H));$6(Error(`Failed to deduplicate LSP diagnostics: ${j.message}`)),Y=A}for(let H of K)H.attachmentSent=!0;for(let[H,j]of Mi)if(j.attachmentSent)Mi.delete(H);let z=A.reduce((H,j)=>H+j.diagnostics.length,0),w=Y.reduce((H,j)=>H+j.diagnostics.length,0);if(z>w)L(`LSP Diagnostics: Deduplication removed ${z-w} duplicate diagnostic(s)`);let _=0,$=0;for(let H of Y){if(H.diagnostics.sort((J,M)=>O_4(J.severity)-O_4(M.severity)),H.diagnostics.length>fZ1)$+=H.diagnostics.length-fZ1,H.diagnostics=H.diagnostics.slice(0,fZ1);let j=$_4-_;if(H.diagnostics.length>j)$+=H.diagnostics.length-j,H.diagnostics=H.diagnostics.slice(0,j);_+=H.diagnostics.length}if(Y=Y.filter((H)=>H.diagnostics.length>0),$>0)L(`LSP Diagnostics: Volume limiting removed ${$} diagnostic(s) (max ${fZ1}/file, ${$_4} total)`);for(let H of Y){if(!i66.has(H.uri))i66.set(H.uri,new Set);let j=i66.get(H.uri);for(let J of H.diagnostics)try{j.add(j_4(J))}catch(M){let D=M instanceof Error?M:Error(String(M)),X=J.message?.substring(0,100)||"";$6(Error(`Failed to track delivered diagnostic in ${H.uri}: ${D.message}. Diagnostic message: ${X}`))}}let O=Y.reduce((H,j)=>H+j.diagnostics.length,0);if(O===0)return L("LSP Diagnostics: No new diagnostics to deliver (all filtered by deduplication)"),[];return L(`LSP Diagnostics: Delivering ${Y.length} file(s) with ${O} diagnostic(s) from ${q.size} server(s)`),[{serverName:Array.from(q).join(", "),files:Y}]}function M_4(){L(`LSP Diagnostics: Clearing ${Mi.size} pending diagnostic(s)`),Mi.clear()}function D_4(){L(`LSP Diagnostics: Resetting all state (${Mi.size} pending, ${i66.size} files tracked)`),Mi.clear(),i66.clear()}function TZ1(A){if(i66.has(A))L(`LSP Diagnostics: Clearing delivered diagnostics for ${A}`),i66.delete(A)}var fZ1=10,$_4=30,UAY=500,Mi,i66;var qf6=k(()=>{G1();x1();aJ6();a1();Mi=new Map,i66=new ck({max:UAY})});function dAY(A){let q=A.find((z)=>z.role==="user");if(!q)return"";let K=q.content;if(typeof K==="string")return K;let Y=K.find((z)=>z.type==="text");return Y?.type==="text"?Y.text:""}async function nS(A){let{model:q,system:K,messages:Y,tools:z,tool_choice:w,output_format:_,max_tokens:$=1024,maxRetries:O=2,signal:H,skipSystemPromptPrefix:j,temperature:J,thinking:M,stop_sequences:D}=A,X=await eb({maxRetries:O,model:q,source:"side_query"}),P=[...nE(q)];if(_&&qz6(q)&&!P.includes(As))P.push(As);let W=dAY(Y),Z=Q78(W,{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.71",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-06T22:45:36Z"}.VERSION),G=uY1(Z),f=[G?{type:"text",text:G}:null,...j?[]:[{type:"text",text:xY1({isNonInteractive:!1,hasAppendSystemPrompt:!1})}],...Array.isArray(K)?K:K?[{type:"text",text:K}]:[]].filter((v)=>v!==null),V=M?{type:"enabled",budget_tokens:M}:void 0;return await X.beta.messages.create({model:jg(q),max_tokens:$,system:f,messages:Y,...z&&{tools:z},...w&&{tool_choice:w},..._&&{output_config:{format:_}},...J!==void 0&&{temperature:J},...D&&{stop_sequences:D},...V&&{thinking:V},...P.length>0&&{betas:P},metadata:L66()},{signal:H})}var Az6=k(()=>{cU6();zH();rE();HK6();rE();BY1();U78();Xq()});import{readdir as cAY,stat as lAY}from"fs/promises";import{join as P_4,basename as iAY}from"path";async function W_4(A,q,K){let Y=await oAY(q,K);if(Y.length===0)return[];let z=await aAY(A,Y,K),w=new Map(Y.map((_)=>[_.filename,_.filePath]));return z.map((_)=>w.get(_)).filter((_)=>_!==void 0)}async function oAY(A,q){try{let Y=(await cAY(A,{recursive:!0})).filter((_)=>_.endsWith(".md")&&iAY(_)!=="MEMORY.md"),z=Y.length>X_4?await sAY(Y,A,X_4):Y;return(await Promise.allSettled(z.map(async(_)=>{let $=P_4(A,_),{content:O}=await mG6($,0,nAY,void 0,q),{frontmatter:H}=fJ(O,$),j=H.description||null,J=C44(H.type);return{filename:_,filePath:$,description:j,type:J}}))).filter((_)=>_.status==="fulfilled").map((_)=>_.value)}catch{return[]}}async function aAY(A,q,K){let Y=new Set(q.map((w)=>w.filename)),z=q.map((w)=>{let _=w.type?`[${w.type}] `:"";return w.description?`- ${_}${w.filename}: ${w.description}`:`- ${_}${w.filename}`}).join(` `);try{let _=(await nS({model:rf(),system:rAY,skipSystemPromptPrefix:!0,messages:[{role:"user",content:`Query: ${A} Available memories: ${z}`}],max_tokens:256,output_format:{type:"json_schema",schema:{type:"object",properties:{selected_memories:{type:"array",items:{type:"string"}}},required:["selected_memories"],additionalProperties:!1}},signal:K})).content.find((O)=>O.type==="text");if(!_||_.type!=="text")return[];return O8(_.text).selected_memories.filter((O)=>Y.has(O))}catch{return[]}}async function sAY(A,q,K){return(await Promise.allSettled(A.map(async(z)=>{let w=P_4(q,z),_=await lAY(w);return{relativePath:z,mtimeMs:_.mtimeMs}}))).filter((z)=>z.status==="fulfilled").map((z)=>z.value).sort((z,w)=>w.mtimeMs-z.mtimeMs).slice(0,K).map((z)=>z.relativePath)}var X_4=200,nAY=30,rAY=`You are selecting memories that will be useful to Claude Code as it processes a user's query. You will be given the user's query and a list of available memory files with their filenames and descriptions. Return a list of filenames for the memories that will clearly be useful to Claude Code as it processes the user's query (up to 5). Only include memories that you are certain will be helpful based on their name and description. - If you are unsure if a memory will be useful in processing the user's query, then do not include it in your list. Be selective and discerning. - If there are no memories in the list that would clearly be useful, feel free to return an empty list. `;var Z_4=k(()=>{Az6();Xq();iV();a1();dP1();vW1()});import{join as Di,normalize as tAY,sep as BF}from"path";function eAY(A){return A.replace(/:/g,"-")}function G_4(A){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return Di(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR,"projects",ID(y0(Uz())??Uz()),"agent-memory-local",A)+BF;return Di(I1(),".claude","agent-memory-local",A)+BF}function Kf6(A,q){let K=eAY(A);switch(q){case"project":return Di(I1(),".claude","agent-memory",K)+BF;case"local":return G_4(K);case"user":return Di(yd(),"agent-memory",K)+BF}}function Md6(A){let q=tAY(A),K=yd();if(q.startsWith(Di(K,"agent-memory")+BF))return!0;if(q.startsWith(Di(I1(),".claude","agent-memory")+BF))return!0;if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR){if(q.includes(BF+"agent-memory-local"+BF)&&q.startsWith(Di(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR,"projects")+BF))return!0}else if(q.startsWith(Di(I1(),".claude","agent-memory-local")+BF))return!0;return!1}function VZ1(A){switch(A){case"user":return`User (${Di(yd(),"agent-memory")}/)`;case"project":return"Project (.claude/agent-memory/)";case"local":return`Local (${G_4("...")})`;default:return"None"}}function Kz6(A,q){let K;switch(q){case"user":K="- Since this memory is user-scope, keep learnings general since they apply across all projects";break;case"project":K="- Since this memory is project-scope and shared with your team via version control, tailor your memories to this project";break;case"local":K="- Since this memory is local-scope (not checked into version control), tailor your memories to this project and machine";break}return(p8("tengu_swinburne_dune",!1)?n44:l44)({displayName:"Persistent Agent Memory",memoryDir:Kf6(A,q),extraGuidelines:[K]})}var Zx=k(()=>{Q1();W7();U3();eZ6();rA();GJ();Kz()});function YL(A,q){return`${A}@${q}`}function Yz6(A){let q=A.indexOf("@");if(q===-1)return null;return{agentName:A.slice(0,q),teamName:A.slice(q+1)}}function Yf6(A,q){let K=Date.now();return`${A}-${K}@${q}`}function wf6(){return`claude-swarm-${process.pid}`}var Aw="team-lead",nN="claude-swarm",zf6="swarm-view",TG="tmux",qL8="claude-hidden",_f6="CLAUDE_CODE_TEAMMATE_COMMAND";var Gx="SendMessage";var f_4,A7Y,nM_,q7Y,rM_,K7Y,oM_,aM_,Y7Y,z7Y,w7Y,sM_,_7Y,$7Y,O7Y,H7Y,NZ1,j7Y,J7Y,T_4,tM_,$f6,KL8,YL8,Dd6,eM_,n66,M7Y,V_4,BJ,D7Y,X7Y,P7Y,W7Y,Z7Y,G7Y,f7Y,T7Y,V7Y,N7Y,v7Y,k7Y,E7Y,L7Y,y7Y,R7Y,S7Y,C7Y,h7Y,I7Y,b7Y,x7Y,u7Y,B7Y,m7Y,g7Y,N_4,F7Y,Q7Y,U7Y,p7Y,d7Y,c7Y,l7Y,i7Y,n7Y,r7Y,o7Y,a7Y,s7Y,AD_,t7Y,qD_,KD_,v_4,k_4,E_4,L_4,e7Y,y_4,YD_,zD_,wD_,A4Y,q4Y,K4Y,JO,R_4,Y4Y,z4Y,S_4,zL8,w4Y,_4Y,$4Y,O4Y,C_4,h_4,I_4,H4Y,j4Y,J4Y,M4Y,D4Y,X4Y,P4Y,W4Y,Z4Y,G4Y,f4Y,T4Y,V4Y,N4Y,v4Y,k4Y,E4Y,L4Y,y4Y,R4Y,_D_,b_4,Xd6;var wL8=k(()=>{B7();f_4=i6(()=>I.object({inputTokens:I.number(),outputTokens:I.number(),cacheReadInputTokens:I.number(),cacheCreationInputTokens:I.number(),webSearchRequests:I.number(),costUSD:I.number(),contextWindow:I.number(),maxOutputTokens:I.number()})),A7Y=i6(()=>I.literal("json_schema")),nM_=i6(()=>I.object({type:A7Y()})),q7Y=i6(()=>I.object({type:I.literal("json_schema"),schema:I.record(I.string(),I.unknown())})),rM_=i6(()=>q7Y()),K7Y=i6(()=>I.enum(["user","project","org","temporary","oauth"])),oM_=i6(()=>I.enum(["local","user","project"]).describe("Config scope for settings.")),aM_=i6(()=>I.literal("context-1m-2025-08-07")),Y7Y=i6(()=>I.object({type:I.literal("adaptive")}).describe("Claude decides when and how much to think (Opus 4.6+).")),z7Y=i6(()=>I.object({type:I.literal("enabled"),budgetTokens:I.number().optional()}).describe("Fixed thinking token budget (older models)")),w7Y=i6(()=>I.object({type:I.literal("disabled")}).describe("No extended thinking")),sM_=i6(()=>I.union([Y7Y(),z7Y(),w7Y()]).describe("Controls Claude's thinking/reasoning behavior. When set, takes precedence over the deprecated maxThinkingTokens.")),_7Y=i6(()=>I.object({type:I.literal("stdio").optional(),command:I.string(),args:I.array(I.string()).optional(),env:I.record(I.string(),I.string()).optional()})),$7Y=i6(()=>I.object({type:I.literal("sse"),url:I.string(),headers:I.record(I.string(),I.string()).optional()})),O7Y=i6(()=>I.object({type:I.literal("http"),url:I.string(),headers:I.record(I.string(),I.string()).optional()})),H7Y=i6(()=>I.object({type:I.literal("sdk"),name:I.string()})),NZ1=i6(()=>I.union([_7Y(),$7Y(),O7Y(),H7Y()])),j7Y=i6(()=>I.object({type:I.literal("claudeai-proxy"),url:I.string(),id:I.string()})),J7Y=i6(()=>I.union([NZ1(),j7Y()])),T_4=i6(()=>I.object({name:I.string().describe("Server name as configured"),status:I.enum(["connected","failed","needs-auth","pending","disabled"]).describe("Current connection status"),serverInfo:I.object({name:I.string(),version:I.string()}).optional().describe("Server information (available when connected)"),error:I.string().optional().describe("Error message (available when status is 'failed')"),config:J7Y().optional().describe("Server configuration (includes URL for HTTP/SSE servers)"),scope:I.string().optional().describe("Configuration scope (e.g., project, user, local, claudeai, managed)"),tools:I.array(I.object({name:I.string(),description:I.string().optional(),annotations:I.object({readOnly:I.boolean().optional(),destructive:I.boolean().optional(),openWorld:I.boolean().optional()}).optional()})).optional().describe("Tools provided by this server (available when connected)")}).describe("Status information for an MCP server connection.")),tM_=i6(()=>I.object({added:I.array(I.string()).describe("Names of servers that were added"),removed:I.array(I.string()).describe("Names of servers that were removed"),errors:I.record(I.string(),I.string()).describe("Map of server names to error messages for servers that failed to connect")}).describe("Result of a setMcpServers operation.")),$f6=i6(()=>I.enum(["userSettings","projectSettings","localSettings","session","cliArg"])),KL8=i6(()=>I.enum(["allow","deny","ask"])),YL8=i6(()=>I.object({toolName:I.string(),ruleContent:I.string().optional()})),Dd6=i6(()=>I.discriminatedUnion("type",[I.object({type:I.literal("addRules"),rules:I.array(YL8()),behavior:KL8(),destination:$f6()}),I.object({type:I.literal("replaceRules"),rules:I.array(YL8()),behavior:KL8(),destination:$f6()}),I.object({type:I.literal("removeRules"),rules:I.array(YL8()),behavior:KL8(),destination:$f6()}),I.object({type:I.literal("setMode"),mode:I.lazy(()=>n66()),destination:$f6()}),I.object({type:I.literal("addDirectories"),directories:I.array(I.string()),destination:$f6()}),I.object({type:I.literal("removeDirectories"),directories:I.array(I.string()),destination:$f6()})])),eM_=i6(()=>I.union([I.object({behavior:I.literal("allow"),updatedInput:I.record(I.string(),I.unknown()).optional(),updatedPermissions:I.array(Dd6()).optional(),toolUseID:I.string().optional()}),I.object({behavior:I.literal("deny"),message:I.string(),interrupt:I.boolean().optional(),toolUseID:I.string().optional()})])),n66=i6(()=>I.enum(["default","acceptEdits","bypassPermissions","plan","dontAsk"]).describe("Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. 'dontAsk' - Don't prompt for permissions, deny if not pre-approved.")),M7Y=["PreToolUse","PostToolUse","PostToolUseFailure","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","SubagentStart","SubagentStop","PreCompact","PermissionRequest","Setup","TeammateIdle","TaskCompleted","Elicitation","ElicitationResult","ConfigChange","WorktreeCreate","WorktreeRemove","InstructionsLoaded"],V_4=i6(()=>I.enum(M7Y)),BJ=i6(()=>I.object({session_id:I.string(),transcript_path:I.string(),cwd:I.string(),permission_mode:I.string().optional(),agent_id:I.string().optional().describe("Subagent identifier. Present only when the hook fires from within a subagent (e.g., a tool called by an AgentTool worker). Absent for the main thread, even in --agent sessions. Use this field (not agent_type) to distinguish subagent calls from main-thread calls."),agent_type:I.string().optional().describe('Agent type name (e.g., "general-purpose", "code-reviewer"). Present when the hook fires from within a subagent (alongside agent_id), or on the main thread of a session started with --agent (without agent_id).')})),D7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("PreToolUse"),tool_name:I.string(),tool_input:I.unknown(),tool_use_id:I.string()}))),X7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("PermissionRequest"),tool_name:I.string(),tool_input:I.unknown(),permission_suggestions:I.array(Dd6()).optional()}))),P7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("PostToolUse"),tool_name:I.string(),tool_input:I.unknown(),tool_response:I.unknown(),tool_use_id:I.string()}))),W7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("PostToolUseFailure"),tool_name:I.string(),tool_input:I.unknown(),tool_use_id:I.string(),error:I.string(),is_interrupt:I.boolean().optional()}))),Z7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("Notification"),message:I.string(),title:I.string().optional(),notification_type:I.string()}))),G7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("UserPromptSubmit"),prompt:I.string()}))),f7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("SessionStart"),source:I.enum(["startup","resume","clear","compact"]),agent_type:I.string().optional(),model:I.string().optional()}))),T7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("Setup"),trigger:I.enum(["init","maintenance"])}))),V7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("Stop"),stop_hook_active:I.boolean(),last_assistant_message:I.string().optional().describe("Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file.")}))),N7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("SubagentStart"),agent_id:I.string(),agent_type:I.string()}))),v7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("SubagentStop"),stop_hook_active:I.boolean(),agent_id:I.string(),agent_transcript_path:I.string(),agent_type:I.string(),last_assistant_message:I.string().optional().describe("Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file.")}))),k7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("PreCompact"),trigger:I.enum(["manual","auto"]),custom_instructions:I.string().nullable()}))),E7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("TeammateIdle"),teammate_name:I.string(),team_name:I.string()}))),L7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("TaskCompleted"),task_id:I.string(),task_subject:I.string(),task_description:I.string().optional(),teammate_name:I.string().optional(),team_name:I.string().optional()}))),y7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("Elicitation"),mcp_server_name:I.string(),message:I.string(),mode:I.enum(["form","url"]).optional(),url:I.string().optional(),elicitation_id:I.string().optional(),requested_schema:I.record(I.string(),I.unknown()).optional()}))),R7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("ElicitationResult"),mcp_server_name:I.string(),elicitation_id:I.string().optional(),mode:I.enum(["form","url"]).optional(),action:I.enum(["accept","decline","cancel"]),content:I.record(I.string(),I.unknown()).optional()}))),S7Y=["user_settings","project_settings","local_settings","policy_settings","skills"],C7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("ConfigChange"),source:I.enum(S7Y),file_path:I.string().optional()}))),h7Y=["session_start","nested_traversal","path_glob_match","include"],I7Y=["User","Project","Local","Managed"],b7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("InstructionsLoaded"),file_path:I.string(),memory_type:I.enum(I7Y),load_reason:I.enum(h7Y),globs:I.array(I.string()).optional(),trigger_file_path:I.string().optional(),parent_file_path:I.string().optional()}))),x7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("WorktreeCreate"),name:I.string()}))),u7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("WorktreeRemove"),worktree_path:I.string()}))),B7Y=["clear","logout","prompt_input_exit","other","bypass_permissions_disabled"],m7Y=i6(()=>I.enum(B7Y)),g7Y=i6(()=>BJ().and(I.object({hook_event_name:I.literal("SessionEnd"),reason:m7Y()}))),N_4=i6(()=>I.union([D7Y(),P7Y(),W7Y(),Z7Y(),G7Y(),f7Y(),g7Y(),V7Y(),N7Y(),v7Y(),k7Y(),X7Y(),T7Y(),E7Y(),L7Y(),y7Y(),R7Y(),C7Y(),b7Y(),x7Y(),u7Y()])),F7Y=i6(()=>I.object({async:I.literal(!0),asyncTimeout:I.number().optional()})),Q7Y=i6(()=>I.object({hookEventName:I.literal("PreToolUse"),permissionDecision:I.enum(["allow","deny","ask"]).optional(),permissionDecisionReason:I.string().optional(),updatedInput:I.record(I.string(),I.unknown()).optional(),additionalContext:I.string().optional()})),U7Y=i6(()=>I.object({hookEventName:I.literal("UserPromptSubmit"),additionalContext:I.string().optional()})),p7Y=i6(()=>I.object({hookEventName:I.literal("SessionStart"),additionalContext:I.string().optional()})),d7Y=i6(()=>I.object({hookEventName:I.literal("Setup"),additionalContext:I.string().optional()})),c7Y=i6(()=>I.object({hookEventName:I.literal("SubagentStart"),additionalContext:I.string().optional()})),l7Y=i6(()=>I.object({hookEventName:I.literal("PostToolUse"),additionalContext:I.string().optional(),updatedMCPToolOutput:I.unknown().optional()})),i7Y=i6(()=>I.object({hookEventName:I.literal("PostToolUseFailure"),additionalContext:I.string().optional()})),n7Y=i6(()=>I.object({hookEventName:I.literal("Notification"),additionalContext:I.string().optional()})),r7Y=i6(()=>I.object({hookEventName:I.literal("PermissionRequest"),decision:I.union([I.object({behavior:I.literal("allow"),updatedInput:I.record(I.string(),I.unknown()).optional(),updatedPermissions:I.array(Dd6()).optional()}),I.object({behavior:I.literal("deny"),message:I.string().optional(),interrupt:I.boolean().optional()})])})),o7Y=i6(()=>I.object({continue:I.boolean().optional(),suppressOutput:I.boolean().optional(),stopReason:I.string().optional(),decision:I.enum(["approve","block"]).optional(),systemMessage:I.string().optional(),reason:I.string().optional(),hookSpecificOutput:I.union([Q7Y(),U7Y(),p7Y(),d7Y(),c7Y(),l7Y(),i7Y(),n7Y(),r7Y(),a7Y(),s7Y()]).optional()})),a7Y=i6(()=>I.object({hookEventName:I.literal("Elicitation"),action:I.enum(["accept","decline","cancel"]).optional(),content:I.record(I.string(),I.unknown()).optional()})),s7Y=i6(()=>I.object({hookEventName:I.literal("ElicitationResult"),action:I.enum(["accept","decline","cancel"]).optional(),content:I.record(I.string(),I.unknown()).optional()})),AD_=i6(()=>I.union([F7Y(),o7Y()])),t7Y=i6(()=>I.object({key:I.string().describe("Unique key for this option, returned in the response"),label:I.string().describe("Display text for this option"),description:I.string().optional().describe("Optional description shown below the label")})),qD_=i6(()=>I.object({prompt:I.string().describe("Request ID. Presence of this key marks the line as a prompt request."),message:I.string().describe("The prompt message to display to the user"),options:I.array(t7Y()).describe("Available options for the user to choose from")})),KD_=i6(()=>I.object({prompt_response:I.string().describe("The request ID from the corresponding prompt request"),selected:I.string().describe("The key of the selected option")})),v_4=i6(()=>I.object({name:I.string().describe("Skill name (without the leading slash)"),description:I.string().describe("Description of what the skill does"),argumentHint:I.string().describe('Hint for skill arguments (e.g., "")')}).describe("Information about an available skill (invoked via /command syntax).")),k_4=i6(()=>I.object({name:I.string().describe('Agent type identifier (e.g., "Explore")'),description:I.string().describe("Description of when to use this agent"),model:I.string().optional().describe("Model alias this agent uses. If omitted, inherits the parent's model")}).describe("Information about an available subagent that can be invoked via the Task tool.")),E_4=i6(()=>I.object({value:I.string().describe("Model identifier to use in API calls"),displayName:I.string().describe("Human-readable display name"),description:I.string().describe("Description of the model's capabilities"),supportsEffort:I.boolean().optional().describe("Whether this model supports effort levels"),supportedEffortLevels:I.array(I.enum(["low","medium","high","max"])).optional().describe("Available effort levels for this model"),supportsAdaptiveThinking:I.boolean().optional().describe("Whether this model supports adaptive thinking (Claude decides when and how much to think)"),supportsFastMode:I.boolean().optional().describe("Whether this model supports fast mode")}).describe("Information about an available model.")),L_4=i6(()=>I.object({email:I.string().optional(),organization:I.string().optional(),subscriptionType:I.string().optional(),tokenSource:I.string().optional(),apiKeySource:I.string().optional()}).describe("Information about the logged in user's account.")),e7Y=i6(()=>I.union([I.string(),I.record(I.string(),NZ1())])),y_4=i6(()=>I.object({description:I.string().describe("Natural language description of when to use this agent"),tools:I.array(I.string()).optional().describe("Array of allowed tool names. If omitted, inherits all tools from parent"),disallowedTools:I.array(I.string()).optional().describe("Array of tool names to explicitly disallow for this agent"),prompt:I.string().describe("The agent's system prompt"),model:I.enum(["sonnet","opus","haiku","inherit"]).optional().describe("Model to use for this agent. If omitted or 'inherit', uses the main model"),mcpServers:I.array(e7Y()).optional(),criticalSystemReminder_EXPERIMENTAL:I.string().optional().describe("Experimental: Critical reminder added to system prompt"),skills:I.array(I.string()).optional().describe("Array of skill names to preload into the agent context"),maxTurns:I.number().int().positive().optional().describe("Maximum number of agentic turns (API round-trips) before stopping")}).describe("Definition for a custom subagent that can be invoked via the Agent tool.")),YD_=i6(()=>I.enum(["user","project","local"]).describe("Source for loading filesystem-based settings. 'user' - Global user settings (~/.claude/settings.json). 'project' - Project settings (.claude/settings.json). 'local' - Local settings (.claude/settings.local.json).")),zD_=i6(()=>I.object({type:I.literal("local").describe("Plugin type. Currently only 'local' is supported"),path:I.string().describe("Absolute or relative path to the plugin directory")}).describe("Configuration for loading a plugin.")),wD_=i6(()=>I.object({canRewind:I.boolean(),error:I.string().optional(),filesChanged:I.array(I.string()).optional(),insertions:I.number().optional(),deletions:I.number().optional()}).describe("Result of a rewindFiles operation.")),A4Y=i6(()=>I.unknown()),q4Y=i6(()=>I.unknown()),K4Y=i6(()=>I.unknown()),JO=i6(()=>I.string()),R_4=i6(()=>I.unknown()),Y4Y=i6(()=>I.enum(["authentication_failed","billing_error","rate_limit","invalid_request","server_error","unknown","max_output_tokens"])),z4Y=i6(()=>I.union([I.literal("compacting"),I.null()])),S_4=i6(()=>I.object({type:I.literal("user"),message:A4Y(),parent_tool_use_id:I.string().nullable(),isSynthetic:I.boolean().optional(),tool_use_result:I.unknown().optional(),priority:I.enum(["now","next","later"]).optional()})),zL8=i6(()=>S_4().extend({uuid:JO().optional(),session_id:I.string()})),w4Y=i6(()=>S_4().extend({uuid:JO(),session_id:I.string(),isReplay:I.literal(!0)})),_4Y=i6(()=>I.object({status:I.enum(["allowed","allowed_warning","rejected"]),resetsAt:I.number().optional(),rateLimitType:I.enum(["five_hour","seven_day","seven_day_opus","seven_day_sonnet","overage"]).optional(),utilization:I.number().optional(),overageStatus:I.enum(["allowed","allowed_warning","rejected"]).optional(),overageResetsAt:I.number().optional(),overageDisabledReason:I.enum(["overage_not_provisioned","org_level_disabled","org_level_disabled_until","out_of_credits","seat_tier_level_disabled","member_level_disabled","seat_tier_zero_credit_limit","group_zero_credit_limit","member_zero_credit_limit","org_service_level_disabled","org_service_zero_credit_limit","no_limits_configured","unknown"]).optional(),isUsingOverage:I.boolean().optional(),surpassedThreshold:I.number().optional()}).describe("Rate limit information for claude.ai subscription users.")),$4Y=i6(()=>I.object({type:I.literal("assistant"),message:q4Y(),parent_tool_use_id:I.string().nullable(),error:Y4Y().optional(),uuid:JO(),session_id:I.string()})),O4Y=i6(()=>I.object({type:I.literal("rate_limit_event"),rate_limit_info:_4Y(),uuid:JO(),session_id:I.string()}).describe("Rate limit event emitted when rate limit info changes.")),C_4=i6(()=>I.object({type:I.literal("streamlined_text"),text:I.string().describe("Text content preserved from the assistant message"),session_id:I.string(),uuid:JO()}).describe("@internal Streamlined text message - replaces SDKAssistantMessage in streamlined output. Text content preserved, thinking and tool_use blocks removed.")),h_4=i6(()=>I.object({type:I.literal("streamlined_tool_use_summary"),tool_summary:I.string().describe('Summary of tool calls (e.g., "Read 2 files, wrote 1 file")'),session_id:I.string(),uuid:JO()}).describe("@internal Streamlined tool use summary - replaces tool_use blocks in streamlined output with a cumulative summary string.")),I_4=i6(()=>I.object({tool_name:I.string(),tool_use_id:I.string(),tool_input:I.record(I.string(),I.unknown())})),H4Y=i6(()=>I.object({type:I.literal("result"),subtype:I.literal("success"),duration_ms:I.number(),duration_api_ms:I.number(),is_error:I.boolean(),num_turns:I.number(),result:I.string(),stop_reason:I.string().nullable(),total_cost_usd:I.number(),usage:R_4(),modelUsage:I.record(I.string(),f_4()),permission_denials:I.array(I_4()),structured_output:I.unknown().optional(),fast_mode_state:Xd6().optional(),uuid:JO(),session_id:I.string()})),j4Y=i6(()=>I.object({type:I.literal("result"),subtype:I.enum(["error_during_execution","error_max_turns","error_max_budget_usd","error_max_structured_output_retries"]),duration_ms:I.number(),duration_api_ms:I.number(),is_error:I.boolean(),num_turns:I.number(),stop_reason:I.string().nullable(),total_cost_usd:I.number(),usage:R_4(),modelUsage:I.record(I.string(),f_4()),permission_denials:I.array(I_4()),errors:I.array(I.string()),fast_mode_state:Xd6().optional(),uuid:JO(),session_id:I.string()})),J4Y=i6(()=>I.union([H4Y(),j4Y()])),M4Y=i6(()=>I.object({type:I.literal("system"),subtype:I.literal("init"),agents:I.array(I.string()).optional(),apiKeySource:K7Y(),betas:I.array(I.string()).optional(),claude_code_version:I.string(),cwd:I.string(),tools:I.array(I.string()),mcp_servers:I.array(I.object({name:I.string(),status:I.string()})),model:I.string(),permissionMode:n66(),slash_commands:I.array(I.string()),output_style:I.string(),skills:I.array(I.string()),plugins:I.array(I.object({name:I.string(),path:I.string()})),fast_mode_state:Xd6().optional(),uuid:JO(),session_id:I.string()})),D4Y=i6(()=>I.object({type:I.literal("stream_event"),event:K4Y(),parent_tool_use_id:I.string().nullable(),uuid:JO(),session_id:I.string()})),X4Y=i6(()=>I.object({type:I.literal("system"),subtype:I.literal("compact_boundary"),compact_metadata:I.object({trigger:I.enum(["manual","auto"]),pre_tokens:I.number()}),uuid:JO(),session_id:I.string()})),P4Y=i6(()=>I.object({type:I.literal("system"),subtype:I.literal("status"),status:z4Y(),permissionMode:n66().optional(),uuid:JO(),session_id:I.string()})),W4Y=i6(()=>I.object({type:I.literal("system"),subtype:I.literal("local_command_output"),content:I.string(),uuid:JO(),session_id:I.string()}).describe("Output from a local slash command (e.g. /voice, /cost). Displayed as assistant-style text in the transcript.")),Z4Y=i6(()=>I.object({type:I.literal("system"),subtype:I.literal("hook_started"),hook_id:I.string(),hook_name:I.string(),hook_event:I.string(),uuid:JO(),session_id:I.string()})),G4Y=i6(()=>I.object({type:I.literal("system"),subtype:I.literal("hook_progress"),hook_id:I.string(),hook_name:I.string(),hook_event:I.string(),stdout:I.string(),stderr:I.string(),output:I.string(),uuid:JO(),session_id:I.string()})),f4Y=i6(()=>I.object({type:I.literal("system"),subtype:I.literal("hook_response"),hook_id:I.string(),hook_name:I.string(),hook_event:I.string(),output:I.string(),stdout:I.string(),stderr:I.string(),exit_code:I.number().optional(),outcome:I.enum(["success","error","cancelled"]),uuid:JO(),session_id:I.string()})),T4Y=i6(()=>I.object({type:I.literal("tool_progress"),tool_use_id:I.string(),tool_name:I.string(),parent_tool_use_id:I.string().nullable(),elapsed_time_seconds:I.number(),task_id:I.string().optional(),uuid:JO(),session_id:I.string()})),V4Y=i6(()=>I.object({type:I.literal("auth_status"),isAuthenticating:I.boolean(),output:I.array(I.string()),error:I.string().optional(),uuid:JO(),session_id:I.string()})),N4Y=i6(()=>I.object({type:I.literal("system"),subtype:I.literal("files_persisted"),files:I.array(I.object({filename:I.string(),file_id:I.string()})),failed:I.array(I.object({filename:I.string(),error:I.string()})),processed_at:I.string(),uuid:JO(),session_id:I.string()})),v4Y=i6(()=>I.object({type:I.literal("system"),subtype:I.literal("task_notification"),task_id:I.string(),tool_use_id:I.string().optional(),status:I.enum(["completed","failed","stopped"]),output_file:I.string(),summary:I.string(),usage:I.object({total_tokens:I.number(),tool_uses:I.number(),duration_ms:I.number()}).optional(),uuid:JO(),session_id:I.string()})),k4Y=i6(()=>I.object({type:I.literal("system"),subtype:I.literal("task_started"),task_id:I.string(),tool_use_id:I.string().optional(),description:I.string(),task_type:I.string().optional(),prompt:I.string().optional(),uuid:JO(),session_id:I.string()})),E4Y=i6(()=>I.object({type:I.literal("system"),subtype:I.literal("task_progress"),task_id:I.string(),tool_use_id:I.string().optional(),description:I.string(),usage:I.object({total_tokens:I.number(),tool_uses:I.number(),duration_ms:I.number()}),last_tool_name:I.string().optional(),uuid:JO(),session_id:I.string()})),L4Y=i6(()=>I.object({type:I.literal("tool_use_summary"),summary:I.string(),preceding_tool_use_ids:I.array(I.string()),uuid:JO(),session_id:I.string()})),y4Y=i6(()=>I.object({type:I.literal("system"),subtype:I.literal("elicitation_complete"),mcp_server_name:I.string(),elicitation_id:I.string(),uuid:JO(),session_id:I.string()})),R4Y=i6(()=>I.object({type:I.literal("prompt_suggestion"),suggestion:I.string(),uuid:JO(),session_id:I.string()}).describe("Predicted next user prompt, emitted after each turn when promptSuggestions is enabled.")),_D_=i6(()=>I.object({sessionId:I.string().describe("Unique session identifier (UUID)."),summary:I.string().describe("Display title for the session: custom title, auto-generated summary, or first prompt."),lastModified:I.number().describe("Last modified time in milliseconds since epoch."),fileSize:I.number().describe("Session file size in bytes."),customTitle:I.string().optional().describe("User-set session title via /rename."),firstPrompt:I.string().optional().describe("First meaningful user prompt in the session."),gitBranch:I.string().optional().describe("Git branch at the end of the session."),cwd:I.string().optional().describe("Working directory for the session.")}).describe("Session metadata returned by listSessions.")),b_4=i6(()=>I.union([$4Y(),zL8(),w4Y(),J4Y(),M4Y(),D4Y(),X4Y(),P4Y(),W4Y(),Z4Y(),G4Y(),f4Y(),T4Y(),V4Y(),v4Y(),k4Y(),E4Y(),N4Y(),L4Y(),O4Y(),y4Y(),R4Y()])),Xd6=i6(()=>I.enum(["off","cooldown","on"]).describe("Fast mode state: off, in cooldown after rate limit, or actively enabled."))});var U_4={};m1(U_4,{writeToMailbox:()=>z9,sendShutdownRequestToMailbox:()=>EZ1,readUnreadMessages:()=>wz6,readMailbox:()=>Xi,markMessagesAsReadByPredicate:()=>DL8,markMessagesAsRead:()=>Zd6,markMessageAsReadByIndex:()=>Wd6,isTeamPermissionUpdate:()=>RZ1,isTaskAssignment:()=>yZ1,isStructuredProtocolMessage:()=>hZ1,isShutdownRequest:()=>r66,isShutdownRejected:()=>LZ1,isShutdownApproved:()=>LT,isSandboxPermissionResponse:()=>Vd6,isSandboxPermissionRequest:()=>kZ1,isPlanApprovalResponse:()=>jf6,isPlanApprovalRequest:()=>$z6,isPermissionResponse:()=>_z6,isPermissionRequest:()=>Td6,isModeSetRequest:()=>CZ1,isIdleNotification:()=>fd6,getLastPeerDmSummary:()=>Nd6,getInboxPath:()=>zz6,formatTeammateMessages:()=>I4Y,createShutdownRequestMessage:()=>Hf6,createShutdownRejectedMessage:()=>ML8,createShutdownApprovedMessage:()=>JL8,createSandboxPermissionResponseMessage:()=>jL8,createSandboxPermissionRequestMessage:()=>HL8,createPermissionResponseMessage:()=>OL8,createPermissionRequestMessage:()=>$L8,createModeSetRequestMessage:()=>SZ1,createIdleNotification:()=>Gd6,clearMailbox:()=>h4Y,ShutdownRequestMessageSchema:()=>m_4,ShutdownRejectedMessageSchema:()=>F_4,ShutdownApprovedMessageSchema:()=>g_4,PlanApprovalResponseMessageSchema:()=>B_4,PlanApprovalRequestMessageSchema:()=>u_4,ModeSetRequestMessageSchema:()=>Q_4});import{mkdir as S4Y,readFile as x_4,writeFile as Of6}from"fs/promises";import{join as _L8}from"path";function zz6(A,q){let K=q||W5()||"default",Y=KG6(K),z=KG6(A),w=_L8(Zf(),Y,"inboxes"),_=_L8(w,`${z}.json`);return L(`[TeammateMailbox] getInboxPath: agent=${A}, team=${K}, fullPath=${_}`),_}async function C4Y(A){let q=A||W5()||"default",K=KG6(q),Y=_L8(Zf(),K,"inboxes");await S4Y(Y,{recursive:!0}),L(`[TeammateMailbox] Ensured inbox directory: ${Y}`)}async function Xi(A,q){let K=zz6(A,q);L(`[TeammateMailbox] readMailbox: path=${K}`);try{let Y=await x_4(K,"utf-8"),z=O8(Y);return L(`[TeammateMailbox] readMailbox: read ${z.length} message(s)`),z}catch(Y){if(Y.code==="ENOENT")return L("[TeammateMailbox] readMailbox: file does not exist"),[];return L(`Failed to read inbox for ${A}: ${Y}`),$6(Y),[]}}async function wz6(A,q){let K=await Xi(A,q),Y=K.filter((z)=>!z.read);return L(`[TeammateMailbox] readUnreadMessages: ${Y.length} unread of ${K.length} total`),Y}async function z9(A,q,K){await C4Y(K);let Y=zz6(A,K),z=`${Y}.lock`;L(`[TeammateMailbox] writeToMailbox: recipient=${A}, from=${q.from}, path=${Y}`);try{await Of6(Y,"[]",{encoding:"utf-8",flag:"wx"}),L("[TeammateMailbox] writeToMailbox: created new inbox file")}catch(_){if(_.code!=="EEXIST"){L(`[TeammateMailbox] writeToMailbox: failed to create inbox file: ${_}`),$6(_);return}}let w;try{w=await Pd6.lock(Y,{lockfilePath:z,...vZ1});let _=await Xi(A,K),$={...q,read:!1};_.push($),await Of6(Y,U6(_,null,2),"utf-8"),L(`[TeammateMailbox] Wrote message to ${A}'s inbox from ${q.from}`)}catch(_){L(`Failed to write to inbox for ${A}: ${_}`),$6(_)}finally{if(w)await w()}}async function Wd6(A,q,K){let Y=zz6(A,q);L(`[TeammateMailbox] markMessageAsReadByIndex called: agentName=${A}, teamName=${q}, index=${K}, path=${Y}`);let z=`${Y}.lock`,w;try{L("[TeammateMailbox] markMessageAsReadByIndex: acquiring lock..."),w=await Pd6.lock(Y,{lockfilePath:z,...vZ1}),L("[TeammateMailbox] markMessageAsReadByIndex: lock acquired");let _=await Xi(A,q);if(L(`[TeammateMailbox] markMessageAsReadByIndex: read ${_.length} messages after lock`),K<0||K>=_.length){L(`[TeammateMailbox] markMessageAsReadByIndex: index ${K} out of bounds (${_.length} messages)`);return}let $=_[K];if(!$||$.read){L("[TeammateMailbox] markMessageAsReadByIndex: message already read or missing");return}_[K]={...$,read:!0},await Of6(Y,U6(_,null,2),"utf-8"),L(`[TeammateMailbox] markMessageAsReadByIndex: marked message at index ${K} as read`)}catch(_){if(_.code==="ENOENT"){L(`[TeammateMailbox] markMessageAsReadByIndex: file does not exist at ${Y}`);return}L(`[TeammateMailbox] markMessageAsReadByIndex FAILED for ${A}: ${_}`),$6(_)}finally{if(w)await w(),L("[TeammateMailbox] markMessageAsReadByIndex: lock released")}}async function Zd6(A,q){let K=zz6(A,q);L(`[TeammateMailbox] markMessagesAsRead called: agentName=${A}, teamName=${q}, path=${K}`);let Y=`${K}.lock`,z;try{L("[TeammateMailbox] markMessagesAsRead: acquiring lock..."),z=await Pd6.lock(K,{lockfilePath:Y,...vZ1}),L("[TeammateMailbox] markMessagesAsRead: lock acquired");let w=await Xi(A,q);if(L(`[TeammateMailbox] markMessagesAsRead: read ${w.length} messages after lock`),w.length===0){L("[TeammateMailbox] markMessagesAsRead: no messages to mark");return}let _=w.filter((J)=>!J.read).length;L(`[TeammateMailbox] markMessagesAsRead: ${_} unread of ${w.length} total`);let $=w.map((J)=>({...J,read:!0}));await Of6(K,U6($,null,2),"utf-8"),L(`[TeammateMailbox] markMessagesAsRead: WROTE ${_} message(s) as read to ${K}`);let O=await x_4(K,"utf-8"),j=O8(O).filter((J)=>!J.read).length;L(`[TeammateMailbox] markMessagesAsRead: VERIFY - ${j} still unread after write`)}catch(w){if(w.code==="ENOENT"){L(`[TeammateMailbox] markMessagesAsRead: file does not exist at ${K}`);return}L(`[TeammateMailbox] markMessagesAsRead FAILED for ${A}: ${w}`),$6(w)}finally{if(z)await z(),L("[TeammateMailbox] markMessagesAsRead: lock released")}}async function h4Y(A,q){let K=zz6(A,q);try{await Of6(K,"[]",{encoding:"utf-8",flag:"r+"}),L(`[TeammateMailbox] Cleared inbox for ${A}`)}catch(Y){if(Y.code==="ENOENT")return;L(`Failed to clear inbox for ${A}: ${Y}`),$6(Y)}}function I4Y(A){return A.map((q)=>{let K=q.color?` color="${q.color}"`:"",Y=q.summary?` summary="${q.summary}"`:"";return`<${WJ} teammate_id="${q.from}"${K}${Y}> ${q.text} `}).join(` `)}function Gd6(A,q){return{type:"idle_notification",from:A,timestamp:new Date().toISOString(),idleReason:q?.idleReason,summary:q?.summary,completedTaskId:q?.completedTaskId,completedStatus:q?.completedStatus,failureReason:q?.failureReason}}function fd6(A){try{let q=O8(A);if(q&&q.type==="idle_notification")return q}catch{}return null}function $L8(A){return{type:"permission_request",request_id:A.request_id,agent_id:A.agent_id,tool_name:A.tool_name,tool_use_id:A.tool_use_id,description:A.description,input:A.input,permission_suggestions:A.permission_suggestions||[]}}function OL8(A){if(A.subtype==="error")return{type:"permission_response",request_id:A.request_id,subtype:"error",error:A.error||"Permission denied"};return{type:"permission_response",request_id:A.request_id,subtype:"success",response:{updated_input:A.updated_input,permission_updates:A.permission_updates}}}function Td6(A){try{let q=O8(A);if(q&&q.type==="permission_request")return q}catch{}return null}function _z6(A){try{let q=O8(A);if(q&&q.type==="permission_response")return q}catch{}return null}function HL8(A){return{type:"sandbox_permission_request",requestId:A.requestId,workerId:A.workerId,workerName:A.workerName,workerColor:A.workerColor,hostPattern:{host:A.host},createdAt:Date.now()}}function jL8(A){return{type:"sandbox_permission_response",requestId:A.requestId,host:A.host,allow:A.allow,timestamp:new Date().toISOString()}}function kZ1(A){try{let q=O8(A);if(q&&q.type==="sandbox_permission_request")return q}catch{}return null}function Vd6(A){try{let q=O8(A);if(q&&q.type==="sandbox_permission_response")return q}catch{}return null}function Hf6(A){return{type:"shutdown_request",requestId:A.requestId,from:A.from,reason:A.reason,timestamp:new Date().toISOString()}}function JL8(A){return{type:"shutdown_approved",requestId:A.requestId,from:A.from,timestamp:new Date().toISOString(),paneId:A.paneId,backendType:A.backendType}}function ML8(A){return{type:"shutdown_rejected",requestId:A.requestId,from:A.from,reason:A.reason,timestamp:new Date().toISOString()}}async function EZ1(A,q,K){let Y=q||W5(),z=V9()||Aw,w=Yf6("shutdown",A),_=Hf6({requestId:w,from:z,reason:K});return await z9(A,{from:z,text:U6(_),timestamp:new Date().toISOString(),color:YH()},Y),{requestId:w,target:A}}function r66(A){try{let q=m_4().safeParse(O8(A));if(q.success)return q.data}catch{}return null}function $z6(A){try{let q=u_4().safeParse(O8(A));if(q.success)return q.data}catch{}return null}function LT(A){try{let q=g_4().safeParse(O8(A));if(q.success)return q.data}catch{}return null}function LZ1(A){try{let q=F_4().safeParse(O8(A));if(q.success)return q.data}catch{}return null}function jf6(A){try{let q=B_4().safeParse(O8(A));if(q.success)return q.data}catch{}return null}function yZ1(A){try{let q=O8(A);if(q&&q.type==="task_assignment")return q}catch{}return null}function RZ1(A){try{let q=O8(A);if(q&&q.type==="team_permission_update")return q}catch{}return null}function SZ1(A){return{type:"mode_set_request",mode:A.mode,from:A.from}}function CZ1(A){try{let q=Q_4().safeParse(O8(A));if(q.success)return q.data}catch{}return null}function hZ1(A){try{let q=O8(A);if(!q||typeof q!=="object"||!("type"in q))return!1;let K=q.type;return K==="permission_request"||K==="permission_response"||K==="sandbox_permission_request"||K==="sandbox_permission_response"||K==="shutdown_request"||K==="shutdown_approved"||K==="team_permission_update"||K==="mode_set_request"||K==="plan_approval_request"||K==="plan_approval_response"}catch{return!1}}async function DL8(A,q,K){let Y=zz6(A,K),z=`${Y}.lock`,w;try{w=await Pd6.lock(Y,{lockfilePath:z,...vZ1});let _=await Xi(A,K);if(_.length===0)return;let $=_.map((O)=>!O.read&&q(O)?{...O,read:!0}:O);await Of6(Y,U6($,null,2),"utf-8")}catch(_){if(_.code==="ENOENT")return;$6(_)}finally{if(w)try{await w()}catch{}}}function Nd6(A){for(let q=A.length-1;q>=0;q--){let K=A[q];if(!K)continue;if(K.type==="user"&&typeof K.message.content==="string")break;if(K.type!=="assistant")continue;for(let Y of K.message.content)if(Y.type==="tool_use"&&Y.name===Gx&&typeof Y.input==="object"&&Y.input!==null&&"type"in Y.input&&Y.input.type==="message"&&"recipient"in Y.input&&typeof Y.input.recipient==="string"&&Y.input.recipient.toLowerCase()!==Aw.toLowerCase()){let z=Y.input.recipient,w="summary"in Y.input&&typeof Y.input.summary==="string"?Y.input.summary:("content"in Y.input)&&typeof Y.input.content==="string"?Y.input.content.slice(0,80):void 0;if(w)return`[to ${z}] ${w}`}}return}var Pd6,vZ1,u_4,B_4,m_4,g_4,F_4,Q_4;var oH=k(()=>{Z8();B7();x1();Ez();G1();sz();G$();wL8();a1();Pd6=e(zm(),1),vZ1={retries:{retries:10,minTimeout:5,maxTimeout:100}};u_4=i6(()=>I.object({type:I.literal("plan_approval_request"),from:I.string(),timestamp:I.string(),planFilePath:I.string(),planContent:I.string(),requestId:I.string()})),B_4=i6(()=>I.object({type:I.literal("plan_approval_response"),requestId:I.string(),approved:I.boolean(),feedback:I.string().optional(),timestamp:I.string(),permissionMode:n66().optional()})),m_4=i6(()=>I.object({type:I.literal("shutdown_request"),requestId:I.string(),from:I.string(),reason:I.string().optional(),timestamp:I.string()})),g_4=i6(()=>I.object({type:I.literal("shutdown_approved"),requestId:I.string(),from:I.string(),timestamp:I.string(),paneId:I.string().optional(),backendType:I.string().optional()})),F_4=i6(()=>I.object({type:I.literal("shutdown_rejected"),requestId:I.string(),from:I.string(),reason:I.string(),timestamp:I.string()}));Q_4=i6(()=>I.object({type:I.literal("mode_set_request"),mode:n66(),from:I.string()}))});import{join as Oz6}from"path";import{mkdirSync as b4Y,readFileSync as x4Y,writeFileSync as u4Y}from"fs";import{readFile as p_4,writeFile as B4Y,mkdir as m4Y,rm as XL8}from"fs/promises";function d_4(A){return A.replace(/[^a-zA-Z0-9]/g,"-").toLowerCase()}function IZ1(A){return Oz6(Zf(),d_4(A))}function eM(A){let q=Oz6(IZ1(A),"config.json");try{let K=x4Y(q,"utf-8");return O8(K)}catch(K){if(K.code==="ENOENT")return null;return L(`[TeammateTool] Failed to read team file for ${A}: ${D1(K)}`),null}}function vd6(A,q){let K=IZ1(A);b4Y(K,{recursive:!0});let Y=Oz6(K,"config.json");u4Y(Y,U6(q,null,2))}function Jf6(A,q){let K=q.agentId||q.name;if(!K)return L("[TeammateTool] removeTeammateFromTeamFile called with no identifier"),!1;let Y=eM(A);if(!Y)return L(`[TeammateTool] Cannot remove teammate ${K}: failed to read team file for "${A}"`),!1;let z=Y.members.length;if(Y.members=Y.members.filter((w)=>{if(q.agentId&&w.agentId===q.agentId)return!1;if(q.name&&w.name===q.name)return!1;return!0}),Y.members.length===z)return L(`[TeammateTool] Teammate ${K} not found in team file for "${A}"`),!1;return vd6(A,Y),L(`[TeammateTool] Removed teammate from team file: ${K}`),!0}function g4Y(A){return eM(A)?.hiddenPaneIds??[]}function c_4(A,q){return g4Y(A).includes(q)}function l_4(A,q){let K=eM(A);if(!K)return!1;let Y=K.members.findIndex((z)=>z.tmuxPaneId===q);if(Y===-1)return!1;if(K.members.splice(Y,1),K.hiddenPaneIds){let z=K.hiddenPaneIds.indexOf(q);if(z!==-1)K.hiddenPaneIds.splice(z,1)}return vd6(A,K),L(`[TeammateTool] Removed member with pane ${q} from team ${A}`),!0}function i_4(A,q){let K=eM(A);if(!K)return!1;let Y=K.members.findIndex((z)=>z.agentId===q);if(Y===-1)return!1;return K.members.splice(Y,1),vd6(A,K),L(`[TeammateTool] Removed member ${q} from team ${A}`),!0}function kd6(A,q,K){let Y=eM(A);if(!Y)return!1;let z=Y.members.find((_)=>_.name===q);if(!z)return L(`[TeammateTool] Cannot set member mode: member ${q} not found in team ${A}`),!1;if(z.mode===K)return!0;let w=Y.members.map((_)=>_.name===q?{..._,mode:K}:_);return vd6(A,{...Y,members:w}),L(`[TeammateTool] Set member ${q} in team ${A} to mode: ${K}`),!0}function n_4(A,q){if(!Oz())return;let K=q??W5(),Y=V9();if(K&&Y)kd6(K,Y,A)}function r_4(A,q){let K=eM(A);if(!K)return!1;let Y=new Map(q.map((_)=>[_.memberName,_.mode])),z=!1,w=K.members.map((_)=>{let $=Y.get(_.name);if($!==void 0&&_.mode!==$)return z=!0,{..._,mode:$};return _});if(z)vd6(A,{...K,members:w}),L(`[TeammateTool] Set ${q.length} member modes in team ${A}`);return!0}async function bZ1(A,q,K){let Y=IZ1(A),z=Oz6(Y,"config.json"),w;try{let $=await p_4(z,"utf-8");w=O8($)}catch{L(`[TeammateTool] Cannot set member active: team ${A} not found`);return}let _=w.members.find(($)=>$.name===q);if(!_){L(`[TeammateTool] Cannot set member active: member ${q} not found in team ${A}`);return}if(_.isActive===K)return;_.isActive=K,await m4Y(Y,{recursive:!0}),await B4Y(z,U6(w,null,2)),L(`[TeammateTool] Set member ${q} in team ${A} to ${K?"active":"idle"}`)}async function F4Y(A){let q=Oz6(A,".git"),K=null;try{let z=(await p_4(q,"utf-8")).trim().match(/^gitdir:\s*(.+)$/);if(z&&z[1]){let w=z[1],_=Oz6(w,"..","..");K=Oz6(_,"..")}}catch{}if(K){let Y=await z7(nA(),["worktree","remove","--force",A],{cwd:K});if(Y.code===0){L(`[TeammateTool] Removed worktree via git: ${A}`);return}if(Y.stderr?.includes("not a working tree")){L(`[TeammateTool] Worktree already removed: ${A}`);return}L(`[TeammateTool] git worktree remove failed, falling back to rm: ${Y.stderr}`)}try{await XL8(A,{recursive:!0,force:!0}),L(`[TeammateTool] Removed worktree directory manually: ${A}`)}catch(Y){L(`[TeammateTool] Failed to remove worktree ${A}: ${D1(Y)}`)}}async function o_4(A){let q=d_4(A),K=eM(A),Y=[];if(K){for(let _ of K.members)if(_.worktreePath)Y.push(_.worktreePath)}for(let _ of Y)await F4Y(_);let z=IZ1(A);try{await XL8(z,{recursive:!0,force:!0}),L(`[TeammateTool] Cleaned up team directory: ${z}`)}catch(_){L(`[TeammateTool] Failed to clean up team directory ${z}: ${D1(_)}`)}let w=CS(q);try{await XL8(w,{recursive:!0,force:!0}),L(`[TeammateTool] Cleaned up tasks directory: ${w}`),V66()}catch(_){L(`[TeammateTool] Failed to clean up tasks directory ${w}: ${D1(_)}`)}}var BD_;var rN=k(()=>{B7();Z8();G1();a1();sz();aq();G$();U3();MA();BD_=i6(()=>I.strictObject({operation:I.enum(["spawnTeam","cleanup"]).describe("Operation: spawnTeam to create a team, cleanup to remove team and task directories."),agent_type:I.string().optional().describe('Type/role of the team lead (e.g., "researcher", "test-runner"). Used for team file and inter-agent coordination.'),team_name:I.string().optional().describe("Name for the new team to create (required for spawnTeam)."),description:I.string().optional().describe("Team description/purpose (only used with spawnTeam).")}))});import{readdir as s_4,stat as t_4}from"fs/promises";import{dirname as PL8,parse as uZ1,relative as Pi,resolve as e_4}from"path";import{randomUUID as Q4Y}from"node:crypto";async function d4Y(A,q,K,Y,z,w){if($1(process.env.CLAUDE_CODE_DISABLE_ATTACHMENTS)||$1(process.env.CLAUDE_CODE_SIMPLE))return[];let _=g3(),$=setTimeout(()=>{_.abort()},1000),O={...q,abortController:_},H=!q.agentId,j=A?[N2("at_mentioned_files",()=>$qY(A,O)),N2("mcp_resources",()=>HqY(A,O)),N2("agent_mentions",()=>Promise.resolve(OqY(A,q.options.agentDefinitions.activeAgents)))]:[],J=await Promise.all(j),M=[N2("date_change",()=>Promise.resolve(t4Y())),N2("ultrathink_effort",()=>Promise.resolve(e4Y(A))),N2("deferred_tools_delta",()=>Promise.resolve(gZ1(q.options.tools,q.options.mainLoopModel,z))),N2("mcp_instructions_delta",()=>Promise.resolve(FZ1(q.options.mcpClients,q.options.tools,q.options.mainLoopModel,z))),N2("changed_files",()=>jqY(O)),N2("nested_memory",()=>JqY(O)),N2("dynamic_skill",()=>XqY(O)),N2("skill_listing",()=>PqY(O)),N2("ultra_claude_md",async()=>KqY(z)),N2("plan_mode",()=>a4Y(z,q)),N2("plan_mode_exit",()=>s4Y(q)),N2("todo_reminders",()=>iH()?yqY(z,q):EqY(z,q)),...Z7()?[...w==="session_memory"?[]:[N2("teammate_mailbox",async()=>CqY(q))],N2("team_context",async()=>hqY(z??[]))]:[],N2("critical_system_reminder",()=>Promise.resolve(AqY(q))),...[],...[]],D=H?[N2("ide_selection",async()=>YqY(K,q)),N2("ide_opened_file",async()=>_qY(K,q)),N2("output_style",async()=>Promise.resolve(qqY())),N2("diagnostics",async()=>VqY(q)),N2("lsp_diagnostics",async()=>NqY(q)),N2("unified_tasks",async()=>RqY(q)),N2("async_hook_responses",async()=>SqY()),N2("token_usage",async()=>Promise.resolve(IqY(z??[],q.options.mainLoopModel))),N2("budget_usd",async()=>Promise.resolve(bqY(q.options.maxBudgetUsd))),N2("verify_plan_reminder",async()=>uqY(z,q)),N2("queued_commands",()=>l4Y(Y))]:[],[X,P]=await Promise.all([Promise.all(M),Promise.all(D)]);return clearTimeout($),[...J.flat(),...X.flat(),...P.flat()]}async function N2(A,q){let K=Date.now();try{let Y=await q(),z=Date.now()-K;if(Math.random()<0.05){let w=Y.reduce((_,$)=>{return _+U6($).length},0);c("tengu_attachment_compute_duration",{label:A,duration_ms:z,attachment_size_bytes:w,attachment_count:Y.length})}return Y}catch(Y){let z=Date.now()-K;if(Math.random()<0.05)c("tengu_attachment_compute_duration",{label:A,duration_ms:z,error:!0});return $6(Y),Iy(`Attachment error in ${A}`,Y),[]}}async function l4Y(A){if(!A)return[];let q=A.filter((K)=>c4Y.has(K.mode));return Promise.all(q.map(async(K)=>{let Y=await n4Y(K.pastedContents),z=K.value;if(Y.length>0)z=[{type:"text",text:typeof K.value==="string"?K.value:i4Y(K.value)},...Y];return{type:"queued_command",prompt:z,source_uuid:K.uuid,imagePasteIds:AZ1(K.pastedContents),commandMode:K.mode,origin:K.origin,isMeta:K.isMeta}}))}function i4Y(A){return A.filter((q)=>q.type==="text").map((q)=>q.text).join(` `)}async function n4Y(A){if(!A)return[];let q=Object.values(A).filter((Y)=>Y.type==="image");if(q.length===0)return[];return await Promise.all(q.map(async(Y)=>{let z={type:"image",source:{type:"base64",media_type:Y.mediaType||"image/png",data:Y.content}};return(await Ki(z)).block}))}function r4Y(A){let q=0,K=!1;for(let Y=A.length-1;Y>=0;Y--){let z=A[Y];if(z?.type==="assistant"){if(QZ1(z))continue;q++}else if(z?.type==="attachment"&&(z.attachment.type==="plan_mode"||z.attachment.type==="plan_mode_reentry")){K=!0;break}}return{turnCount:q,foundPlanModeAttachment:K}}function o4Y(A){let q=0;for(let K=A.length-1;K>=0;K--){let Y=A[K];if(Y?.type==="attachment"){if(Y.attachment.type==="plan_mode_exit")break;if(Y.attachment.type==="plan_mode")q++}}return q}async function a4Y(A,q){let Y=q.getAppState().toolPermissionContext;if(Y.mode!=="plan")return[];if(A&&A.length>0){let{turnCount:H,foundPlanModeAttachment:j}=r4Y(A);if(j&&H!H||M.type!=="Project"&&M.type!=="Local");Y.push(...WL8(J,q,A))}for(let j of O){let J=ZN8(j,A,z).filter((M)=>!H||M.type!=="Project"&&M.type!=="Local");Y.push(...WL8(J,q,A))}}catch(z){$6(z)}return Y}async function _qY(A,q){if(!A?.filePath||A.text)return[];let K=q.getAppState();if(Df6(A.filePath,K.toolPermissionContext))return[];return[...A$4(A.filePath,q,K),{type:"opened_file_in_ide",filename:A.filePath}]}async function $qY(A,q){let K=WqY(A);if(K.length===0)return[];let Y=q.getAppState();return(await Promise.all(K.map(async(w)=>{try{let{filename:_,lineStart:$,lineEnd:O}=GqY(w),H=t4(_);if(Df6(H,Y.toolPermissionContext))return null;try{if((await t_4(H)).isDirectory())try{let J=await s_4(H,{withFileTypes:!0}),M=1000,D=J.length>1000,X=J.slice(0,1000).map((W)=>W.name);if(D)X.push(`… and ${J.length-1000} more entries`);let P=X.join(` `);return c("tengu_at_mention_extracting_directory_success",{}),{type:"directory",path:H,content:P,displayPath:Pi(I1(),H)}}catch{return null}}catch{}return await ZL8(H,q,"tengu_at_mention_extracting_filename_success","tengu_at_mention_extracting_filename_error","at-mention",{offset:$,limit:O&&$?O-$+1:void 0})}catch{c("tengu_at_mention_extracting_filename_error",{})}}))).filter(Boolean)}function OqY(A,q){let K=z$4(A);if(K.length===0)return[];return K.map((z)=>{let w=z.replace("agent-",""),_=q.find(($)=>$.agentType===w);if(!_)return c("tengu_at_mention_agent_not_found",{}),null;return c("tengu_at_mention_agent_success",{}),{type:"agent_mention",agentType:_.agentType}}).filter((z)=>z!==null)}async function HqY(A,q){let K=ZqY(A);if(K.length===0)return[];let Y=q.options.mcpClients||[];return(await Promise.all(K.map(async(w)=>{try{let[_,...$]=w.split(":"),O=$.join(":");if(!_||!O)return c("tengu_at_mention_mcp_resource_error",{}),null;let H=Y.find((M)=>M.name===_);if(!H||H.type!=="connected")return c("tengu_at_mention_mcp_resource_error",{}),null;let J=(q.options.mcpResources?.[_]||[]).find((M)=>M.uri===O);if(!J)return c("tengu_at_mention_mcp_resource_error",{}),null;try{let M=await H.client.readResource({uri:O});return c("tengu_at_mention_mcp_resource_success",{}),{type:"mcp_resource",server:_,uri:O,name:J.name||O,description:J.description,content:M}}catch(M){return c("tengu_at_mention_mcp_resource_error",{}),$6(M),null}}catch{return c("tengu_at_mention_mcp_resource_error",{}),null}}))).filter((w)=>w!==null)}async function jqY(A){let q=$F(A.readFileState);if(q.length===0)return[];let K=A.getAppState();return(await Promise.all(q.map(async(z)=>{let w=A.readFileState.get(z);if(!w)return null;if(w.offset!==void 0||w.limit!==void 0)return null;let _=t4(z);if(Df6(_,K.toolPermissionContext))return null;try{if(oS(_)<=w.timestamp)return null;let $={file_path:_};if(!(await KY.validateInput($,A)).result)return null;let H=await KY.call($,A);if(H.data.type==="text"){let j=Ak7(w.content,H.data.file.content);if(j==="")return null;return{type:"edited_text_file",filename:_,snippet:j}}if(H.data.type==="image")try{let j=await xE8(_);return{type:"edited_image_file",filename:_,content:j}}catch(j){return $6(j),c("tengu_watched_file_compression_failed",{file:_}),null}}catch{return A.readFileState.delete(z),null}}))).filter((z)=>z!==null)}async function JqY(A){if(!A.nestedMemoryAttachmentTriggers||A.nestedMemoryAttachmentTriggers.size===0)return[];let q=A.getAppState(),K=[];for(let Y of A.nestedMemoryAttachmentTriggers){let z=A$4(Y,A,q);K.push(...z)}return A.nestedMemoryAttachmentTriggers.clear(),K}async function MqY(A,q,K){let Y=AbortSignal.timeout(5000),z=z$4(A).flatMap((H)=>{let j=H.replace("agent-",""),J=q.find((M)=>M.agentType===j);return J?.memory?[Kf6(j,J.memory)]:[]}),w=z.length>0?z:[mD()],$=(await Promise.all(w.map((H)=>W_4(A,H,Y).catch(()=>[])))).flat().filter((H)=>!K.has(H)).slice(0,5),O=(await Promise.all($.map(async(H)=>{try{let j=await mG6(H,0,xZ1,void 0,Y),J=j.totalLines>xZ1,M=J?j.content+` > This memory file was truncated to the first ${xZ1} lines. Use the ${u4} tool to view the complete file at: ${H}`:j.content;return K.set(H,{content:M,timestamp:Date.now(),offset:void 0,limit:J?xZ1:void 0}),{path:H,content:M}}catch{return null}}))).filter((H)=>H!==null);if(O.length===0)return[];return[{type:"relevant_memories",memories:O}]}function q$4(A,q){if(!G9()||!p8("tengu_moth_copse",!1))return;let K=A.findLast((z)=>z.type==="user"&&!z.isMeta);if(!K)return;let Y=fi(K);if(!Y||!/\s/.test(Y.trim()))return;return MqY(Y,q.options.agentDefinitions.activeAgents,q.readFileState).catch((z)=>{return $6(z),[]})}function DqY(A){return typeof A==="object"&&A!==null&&"file_path"in A&&typeof A.file_path==="string"}function K$4(A,q){let K=new Set(q.filter((Y)=>R5(Y,u4)).map((Y)=>DqY(Y.input)?Y.input.file_path:void 0).filter((Y)=>Y!==void 0));if(K.size===0)return A;return A.map((Y)=>{if(Y.type!=="relevant_memories")return Y;let z=Y.memories.filter((w)=>!K.has(w.path));return z.length>0?{...Y,memories:z}:null}).filter((Y)=>Y!==null)}async function XqY(A){let q=[];if(A.dynamicSkillDirTriggers&&A.dynamicSkillDirTriggers.size>0){let K=await Promise.all(Array.from(A.dynamicSkillDirTriggers).map(async(Y)=>{try{let w=(await s_4(Y,{withFileTypes:!0})).filter(($)=>$.isDirectory()||$.isSymbolicLink()).map(($)=>$.name),_=await Promise.all(w.map(async($)=>{try{return await t_4(e_4(Y,$,"SKILL.md")),$}catch{return null}}));return{skillDir:Y,skillNames:_.filter(($)=>$!==null)}}catch{return{skillDir:Y,skillNames:[]}}}));for(let{skillDir:Y,skillNames:z}of K)if(z.length>0)q.push({type:"dynamic_skill",skillDir:Y,skillNames:z,displayPath:Pi(I1(),Y)});A.dynamicSkillDirTriggers.clear()}return q}function Wi(){Mf6.clear(),mZ1=!1}function Y$4(){mZ1=!0}async function PqY(A){if(!A.options.tools.some(($)=>R5($,nj)))return[];let q=Uz(),K=await dS(q);if(mZ1){mZ1=!1;for(let $ of K)Mf6.add($.name);return[]}let Y=K.filter(($)=>!Mf6.has($.name));if(Y.length===0)return[];let z=Mf6.size===0;for(let $ of Y)Mf6.add($.name);L(`Sending ${Y.length} skills via attachment (${z?"initial":"dynamic"}, ${Mf6.size} total sent)`);let w=XM(A.options.mainLoopModel,kj());return[{type:"skill_listing",content:FE8(Y,w),skillCount:Y.length,isInitial:z}]}function WqY(A){let q=/(^|\s)@"([^"]+)"/g,K=/(^|\s)@([^\s]+)\b/g,Y=[],z=[],w;while((w=q.exec(A))!==null)if(w[2]&&!w[2].endsWith(" (agent)"))Y.push(w[2]);return(A.match(K)||[]).forEach(($)=>{let O=$.slice($.indexOf("@")+1);if(!O.startsWith('"'))z.push(O)}),[...new Set([...Y,...z])]}function ZqY(A){let q=/(^|\s)@([^\s]+:[^\s]+)\b/g,K=A.match(q)||[];return[...new Set(K.map((Y)=>Y.slice(Y.indexOf("@")+1)))]}function z$4(A){let q=[],K=/(^|\s)@"([\w:.@-]+) \(agent\)"/g,Y;while((Y=K.exec(A))!==null)if(Y[2])q.push(Y[2]);let z=/(^|\s)@(agent-[\w:.@-]+)/g,w=A.match(z)||[];for(let _ of w)q.push(_.slice(_.indexOf("@")+1));return[...new Set(q)]}function GqY(A){let q=A.match(/^([^#]+)(?:#L(\d+)(?:-(\d+))?)?(?:#[^#]*)?$/);if(!q)return{filename:A};let[,K,Y,z]=q,w=Y?parseInt(Y,10):void 0,_=z?parseInt(z,10):w;return{filename:K??A,lineStart:w,lineEnd:_}}function fqY(A){let q=0,K=!1;for(let Y=A.length-1;Y>=0;Y--){let z=A[Y];if(z?.type==="attachment"&&z.attachment.type==="ultramemory"){K=!0;break}if(z?.type==="assistant")q+=fL8(z)}return K?q:null}function TqY(A){if(!A||A.length===0)return!0;let q=fqY(A);if(q===null)return!0;return q>=U4Y.TOKEN_COOLDOWN}async function VqY(A){if(!A.options.tools.some((K)=>R5(K,f4)))return[];let q=await Gi.getNewDiagnostics();if(q.length===0)return[];return[{type:"diagnostics",files:q,isNew:!0}]}async function NqY(A){if(!A.options.tools.some((q)=>R5(q,f4)))return[];L("LSP Diagnostics: getLSPDiagnosticAttachments called");try{let q=J_4();if(q.length===0)return[];L(`LSP Diagnostics: Found ${q.length} pending diagnostic set(s)`);let K=q.map(({files:Y})=>({type:"diagnostics",files:Y,isNew:!0}));if(q.length>0)M_4(),L(`LSP Diagnostics: Cleared ${q.length} delivered diagnostic(s) from registry`);return L(`LSP Diagnostics: Returning ${K.length} diagnostic attachment(s)`),K}catch(q){let K=q instanceof Error?q:Error(String(q));return $6(Error(`Failed to get LSP diagnostic attachments: ${K.message}`)),[]}}async function*Xf6(A,q,K,Y,z,w){let _=await d4Y(A,q,K,Y,z,w);if(_.length===0)return;c("tengu_attachments",{attachment_types:_.map(($)=>$.type)});for(let $ of _)yield m4($)}async function vqY(A){let q=uZ1(A).ext.toLowerCase();if(!BD6(q))return null;try{let[K,Y]=await Promise.all([P1().stat(A),IW1(A)]),z=Y??Math.ceil(K.size/102400);if(z>u01)return c("tengu_pdf_reference_attachment",{pageCount:z,fileSize:K.size,hadPdfinfo:Y!==null}),{type:"pdf_reference",filename:A,pageCount:z,fileSize:K.size,displayPath:Pi(I1(),A)}}catch{}return null}async function ZL8(A,q,K,Y,z,w){let{offset:_,limit:$}=w??{},O=q.getAppState();if(Df6(A,O.toolPermissionContext))return null;if(z==="at-mention"&&!_$4(A)){let j=uZ1(A).ext.toLowerCase();if(!BD6(j))try{let J=await P1().stat(A);return c("tengu_attachment_file_too_large",{size_bytes:J.size,mode:z}),null}catch{}}if(z==="at-mention"){let j=await vqY(A);if(j)return j}let H=q.readFileState.get(A);if(H&&z==="at-mention")try{let j=oS(A);if(H.timestamp<=j&&j===H.timestamp)return c(K,{}),{type:"already_read_file",filename:A,displayPath:Pi(I1(),A),content:{type:"text",file:{filePath:A,content:H.content,numLines:H.content.split(` `).length,startLine:_??1,totalLines:H.content.split(` `).length}}}}catch{}try{let j={file_path:A,offset:_,limit:$};async function J(){if(z==="compact")return{type:"compact_file_reference",filename:A,displayPath:Pi(I1(),A)};let D=q.getAppState();if(Df6(A,D.toolPermissionContext))return null;try{let X={file_path:A,offset:_??1,limit:Jx6},P=await KY.call(X,q);return c(K,{}),{type:"file",filename:A,content:P.data,truncated:!0,displayPath:Pi(I1(),A)}}catch{return c(Y,{}),null}}if(!(await KY.validateInput(j,q)).result)return null;try{let D=await KY.call(j,q);return c(K,{}),{type:"file",filename:A,content:D.data,displayPath:Pi(I1(),A)}}catch(D){if(D instanceof iW1||D instanceof pp6)return await J();throw D}}catch{return c(Y,{}),null}}function m4(A){return{attachment:A,type:"attachment",uuid:Q4Y(),timestamp:new Date().toISOString()}}function kqY(A){let q=-1,K=-1,Y=0,z=0;for(let w=A.length-1;w>=0;w--){let _=A[w];if(_?.type==="assistant"){if(QZ1(_))continue;if(q===-1&&"message"in _&&Array.isArray(_.message?.content)&&_.message.content.some(($)=>$.type==="tool_use"&&$.name==="TodoWrite"))q=w;if(q===-1)Y++;if(K===-1)z++}else if(K===-1&&_?.type==="attachment"&&_.attachment.type==="todo_reminder")K=w;if(q!==-1&&K!==-1)break}return{turnsSinceLastTodoWrite:Y,turnsSinceLastReminder:z}}async function EqY(A,q){if(!q.options.tools.some((z)=>R5(z,HF)))return[];if(!A||A.length===0)return[];let{turnsSinceLastTodoWrite:K,turnsSinceLastReminder:Y}=kqY(A);if(K>=BZ1.TURNS_SINCE_WRITE&&Y>=BZ1.TURNS_BETWEEN_REMINDERS){let z=q.agentId??d1(),_=q.getAppState().todos[z]??[];return[{type:"todo_reminder",content:_,itemCount:_.length}]}return[]}function LqY(A){let q=-1,K=-1,Y=0,z=0;for(let w=A.length-1;w>=0;w--){let _=A[w];if(_?.type==="assistant"){if(QZ1(_))continue;if(q===-1&&"message"in _&&Array.isArray(_.message?.content)&&_.message.content.some(($)=>$.type==="tool_use"&&($.name===US||$.name===KL)))q=w;if(q===-1)Y++;if(K===-1)z++}else if(K===-1&&_?.type==="attachment"&&_.attachment.type==="task_reminder")K=w;if(q!==-1&&K!==-1)break}return{turnsSinceLastTaskManagement:Y,turnsSinceLastReminder:z}}async function yqY(A,q){if(!iH())return[];if(!q.options.tools.some((z)=>R5(z,KL)))return[];if(!A||A.length===0)return[];let{turnsSinceLastTaskManagement:K,turnsSinceLastReminder:Y}=LqY(A);if(K>=BZ1.TURNS_SINCE_WRITE&&Y>=BZ1.TURNS_BETWEEN_REMINDERS){let z=await DP(GT());return[{type:"task_reminder",content:z,itemCount:z.length}]}return[]}async function RqY(A){let q=A.getAppState(),{attachments:K,updatedTasks:Y,evictedTaskIds:z}=await i24(q);if(Object.keys(Y).length>0||z.length>0)A.setAppState((w)=>{let _={...w.tasks,...Y};for(let $ of z)delete _[$];return{...w,tasks:_}});return K.map((w)=>({type:"task_status",taskId:w.taskId,taskType:w.taskType,status:w.status,description:w.description,deltaSummary:w.deltaSummary}))}async function SqY(){let A=await w_4();if(A.length===0)return[];L(`Hooks: getAsyncHookResponseAttachments found ${A.length} responses`);let q=A.map(({processId:K,response:Y,hookName:z,hookEvent:w,toolName:_,stdout:$,stderr:O,exitCode:H})=>{return L(`Hooks: Creating attachment for ${K} (${z}): ${U6(Y)}`),{type:"async_hook_response",processId:K,hookName:z,hookEvent:w,toolName:_,response:Y,stdout:$,stderr:O,exitCode:H}});if(A.length>0){let K=A.map((Y)=>Y.processId);__4(K),L(`Hooks: Removed ${K.length} delivered hooks from registry`)}return L(`Hooks: getAsyncHookResponseAttachments found ${q.length} attachments`),q}async function CqY(A){if(!Z7())return[];return[]}function hqY(A){let q=W5(),K=qW(),Y=V9();if(!q||!K)return[];if(A.some((O)=>O.type==="assistant"))return[];let w=OA(),_=`${w}/teams/${q}/config.json`,$=`${w}/tasks/${q}/`;return[{type:"team_context",agentId:K,agentName:Y||K,teamName:q,teamConfigPath:_,taskListPath:$}]}function IqY(A,q){if(!$1(process.env.CLAUDE_CODE_ENABLE_TOKEN_USAGE_ATTACHMENT))return[];let K=Hz6(q),Y=cE(A);return[{type:"token_usage",used:Y,total:K,remaining:K-Y}]}function bqY(A){if(A===void 0)return[];let q=bX(),K=A-q;return[{type:"budget_usd",used:q,total:A,remaining:K}]}function xqY(A){let q=0;for(let K=A.length-1;K>=0;K--){let Y=A[K];if(Y?.type==="user"&&!(("isMeta"in Y)&&Y.isMeta))q++;if(Y?.type==="attachment"&&Y.attachment.type==="plan_mode_exit")return q}return 0}async function uqY(A,q){return[]}function Df6(A,q){return ZP(A,q,"read","deny")!==null}var BZ1,a_4,U4Y,xZ1=200,p4Y,c4Y,Mf6,mZ1=!1;var MW=k(()=>{B1();Px();vW1();Kz();Y7();G$();uJ();M$();sD();W7();oY6();x1();UN();G1();jz6();GA();W56();xS();OH();Q1();aY6();PM();U2();OG();Qj();p7();iz();fG();Q1();bF();HZ1();iS();GZ1();qf6();G1();SA();Z8();UI();jG();Zi();rA();J$();a1();RY1();dE();jE8();uY();Z_4();GJ();Zx();oH();sz();lE();rN();G$();BZ1={TURNS_SINCE_WRITE:10,TURNS_BETWEEN_REMINDERS:10},a_4={TURNS_BETWEEN_ATTACHMENTS:5,FULL_REMINDER_EVERY_N_ATTACHMENTS:5},U4Y={TOKEN_COOLDOWN:5000},p4Y={TURNS_BETWEEN_REMINDERS:10};c4Y=new Set(["prompt","task-notification"]);Mf6=new Set});function TL8(A){if(A==="Local")return"project (local)";if(A==="AutoMem")return"auto memory";if(A==="TeamMem")return"team memory";return A.toLowerCase()}var $$4;var VL8=k(()=>{$$4=["User","Project","Local","Managed","ExperimentalUltraClaudeMd","AutoMem","TeamMem"]});function H$4(A){let q={toolRequests:new Map,toolResults:new Map,humanMessages:0,assistantMessages:0,localCommandOutputs:0,other:0,attachments:new Map,duplicateFileReads:new Map,total:0},K=new Map,Y=new Map,z=new Map;return A.forEach((_)=>{if(_.type==="attachment"){let $=_.attachment.type||"unknown";q.attachments.set($,(q.attachments.get($)||0)+1)}}),oD(A).forEach((_)=>{let{content:$}=_.message;if(typeof $==="string"){let O=Iz($);if(q.total+=O,_.type==="user"&&$.includes("local-command-stdout"))q.localCommandOutputs+=O;else q[_.type==="user"?"humanMessages":"assistantMessages"]+=O}else $.forEach((O)=>mqY(O,_,q,K,Y,z))}),z.forEach((_,$)=>{if(_.count>1){let H=Math.floor(_.totalTokens/_.count)*(_.count-1);q.duplicateFileReads.set($,{count:_.count,tokens:H})}}),q}function mqY(A,q,K,Y,z,w){let _=Iz(U6(A));switch(K.total+=_,A.type){case"text":if(q.type==="user"&&"text"in A&&A.text.includes("local-command-stdout"))K.localCommandOutputs+=_;else K[q.type==="user"?"humanMessages":"assistantMessages"]+=_;break;case"tool_use":{if("name"in A&&"id"in A){let $=A.name||"unknown";if(O$4(K.toolRequests,$,_),Y.set(A.id,$),$==="Read"&&"input"in A&&A.input&&typeof A.input==="object"&&"file_path"in A.input){let O=String(A.input.file_path);z.set(A.id,O)}}break}case"tool_result":{if("tool_use_id"in A){let $=Y.get(A.tool_use_id)||"unknown";if(O$4(K.toolResults,$,_),$==="Read"){let O=z.get(A.tool_use_id);if(O){let H=w.get(O)||{count:0,totalTokens:0};w.set(O,{count:H.count+1,totalTokens:H.totalTokens+_})}}}break}case"image":case"server_tool_use":case"web_search_tool_result":case"search_result":case"document":case"thinking":case"redacted_thinking":case"code_execution_tool_result":case"mcp_tool_use":case"mcp_tool_result":case"container_upload":case"web_fetch_tool_result":case"bash_code_execution_tool_result":case"text_editor_code_execution_tool_result":case"tool_search_tool_result":case"compaction":K.other+=_;break}}function O$4(A,q,K){A.set(q,(A.get(q)||0)+K)}function j$4(A){let q={total_tokens:A.total,human_message_tokens:A.humanMessages,assistant_message_tokens:A.assistantMessages,local_command_output_tokens:A.localCommandOutputs,other_tokens:A.other};A.attachments.forEach((Y,z)=>{q[`attachment_${z}_count`]=Y}),A.toolRequests.forEach((Y,z)=>{q[`tool_request_${z}_tokens`]=Y}),A.toolResults.forEach((Y,z)=>{q[`tool_result_${z}_tokens`]=Y});let K=[...A.duplicateFileReads.values()].reduce((Y,z)=>Y+z.tokens,0);if(q.duplicate_read_tokens=K,q.duplicate_read_file_count=A.duplicateFileReads.size,A.total>0){q.human_message_percent=Math.round(A.humanMessages/A.total*100),q.assistant_message_percent=Math.round(A.assistantMessages/A.total*100),q.local_command_output_percent=Math.round(A.localCommandOutputs/A.total*100),q.duplicate_read_percent=Math.round(K/A.total*100);let Y=[...A.toolRequests.values()].reduce((w,_)=>w+_,0),z=[...A.toolResults.values()].reduce((w,_)=>w+_,0);q.tool_request_percent=Math.round(Y/A.total*100),q.tool_result_percent=Math.round(z/A.total*100),A.toolRequests.forEach((w,_)=>{q[`tool_request_${_}_percent`]=Math.round(w/A.total*100)}),A.toolResults.forEach((w,_)=>{q[`tool_result_${_}_percent`]=Math.round(w/A.total*100)})}return q}var J$4=k(()=>{UN();SA();a1()});function D$4(){NL8(),Ti=setInterval(()=>{if(z8("debug","session_keepalive_heartbeat",{refcount:Jz6}),$1(process.env.CLAUDE_CODE_REMOTE_SEND_KEEPALIVES))Mz6?.()},M$4)}function gqY(){if(NL8(),Mz6===null)return;Sd6=setTimeout(()=>{z8("info","session_idle_30s"),Sd6=null},M$4)}function NL8(){if(Sd6!==null)clearTimeout(Sd6),Sd6=null}function UZ1(A){if(Mz6=A,Jz6>0&&Ti===null)D$4()}function Pf6(){if(Mz6=null,Ti!==null)clearInterval(Ti),Ti=null;NL8()}function X$4(){if($1(process.env.CLAUDE_CODE_REMOTE_SEND_KEEPALIVES))Mz6?.()}function P$4(){return Mz6!==null}function pZ1(){if(Jz6++,Jz6===1&&Mz6!==null&&Ti===null)D$4()}function dZ1(){if(Jz6>0)Jz6--;if(Jz6===0&&Ti!==null)clearInterval(Ti),Ti=null,gqY()}var M$4=30000,Mz6=null,Jz6=0,Ti=null,Sd6=null;var Wf6=k(()=>{D2();Z8()});async function FqY(A){try{return!!await f0(A)}catch{return!1}}var Zf6;var cZ1=k(()=>{Eq();tB();Zf6=T8(async()=>{return FqY("git")})});function Gf6(A,q){let Y=A.slice(0,2).map((_)=>{let $=_.reason||_.error||"unknown error";return q?`${_.name} (${$})`:_.name}).join(q?"; ":", "),z=A.length-2,w=z>0?` and ${z} more`:"";return`${Y}${w}`}function Cd6(A){switch(A.source){case"github":return A.repo;case"url":return A.url;case"git":return A.url;case"directory":return A.path;case"file":return A.path;default:return"Unknown source"}}function mF(A,q){return`${A}@${q}`}async function fx(A){let q=[],K=[];for(let[Y,z]of Object.entries(A)){if(!Xz6(z.source))continue;let w=null;try{w=await DW(Y)}catch(_){let $=_ instanceof Error?_.message:String(_);K.push({name:Y,error:$}),$6(_ instanceof Error?_:Error(`Failed to load marketplace ${Y}: ${_}`))}q.push({name:Y,config:z,data:w})}return{marketplaces:q,failures:K}}function ff6(A,q){if(A.length===0)return null;if(q>0)return{type:"warning",message:A.length===1?`Warning: Failed to load marketplace '${A[0].name}': ${A[0].error}`:`Warning: Failed to load ${A.length} marketplaces: ${QqY(A)}`};return{type:"error",message:`Failed to load all marketplaces. Errors: ${UqY(A)}`}}function QqY(A){return A.map((q)=>q.name).join(", ")}function UqY(A){return A.map((q)=>`${q.name}: ${q.error}`).join("; ")}function Dz6(){let A=HA("policySettings");if(!A?.strictKnownMarketplaces)return null;return A.strictKnownMarketplaces}function pqY(){let A=HA("policySettings");if(!A?.blockedMarketplaces)return null;return A.blockedMarketplaces}function Z$4(){return HA("policySettings")?.pluginTrustMessage}function dqY(A,q){if(A.source!==q.source)return!1;switch(A.source){case"url":return A.url===q.url;case"github":return A.repo===q.repo&&(A.ref||void 0)===(q.ref||void 0)&&(A.path||void 0)===(q.path||void 0);case"git":return A.url===q.url&&(A.ref||void 0)===(q.ref||void 0)&&(A.path||void 0)===(q.path||void 0);case"npm":return A.package===q.package;case"file":return A.path===q.path;case"directory":return A.path===q.path;default:return!1}}function vL8(A){switch(A.source){case"github":return"github.com";case"git":{let q=A.url.match(/^[^@]+@([^:]+):/);if(q?.[1])return q[1];try{return new URL(A.url).hostname}catch{return null}}case"url":try{return new URL(A.url).hostname}catch{return null}default:return null}}function cqY(A,q){let K=vL8(A);if(!K)return!1;try{return new RegExp(q.hostPattern).test(K)}catch{return $6(Error(`Invalid hostPattern regex: ${q.hostPattern}`)),!1}}function lqY(A,q){if(A.source!=="file"&&A.source!=="directory")return!1;try{return new RegExp(q.pathPattern).test(A.path)}catch{return $6(Error(`Invalid pathPattern regex: ${q.pathPattern}`)),!1}}function G$4(){let A=Dz6();if(!A)return[];return A.filter((q)=>q.source==="hostPattern").map((q)=>q.hostPattern)}function W$4(A){let q=A.match(/^git@github\.com:([^/]+\/[^/]+?)(?:\.git)?$/);if(q&&q[1])return q[1];let K=A.match(/^https?:\/\/github\.com\/([^/]+\/[^/]+?)(?:\.git)?$/);if(K&&K[1])return K[1];return null}function o66(A,q){if(!A)return!0;return(A||void 0)===(q||void 0)}function iqY(A,q){if(A.source===q.source)switch(A.source){case"github":{let K=q;if(A.repo!==K.repo)return!1;return o66(K.ref,A.ref)&&o66(K.path,A.path)}case"git":{let K=q;if(A.url!==K.url)return!1;return o66(K.ref,A.ref)&&o66(K.path,A.path)}case"url":return A.url===q.url;case"npm":return A.package===q.package;case"file":return A.path===q.path;case"directory":return A.path===q.path;default:return!1}if(A.source==="git"&&q.source==="github"){if(W$4(A.url)===q.repo)return o66(q.ref,A.ref)&&o66(q.path,A.path)}if(A.source==="github"&&q.source==="git"){if(W$4(q.url)===A.repo)return o66(q.ref,A.ref)&&o66(q.path,A.path)}return!1}function hd6(A){let q=pqY();if(q===null)return!1;return q.some((K)=>iqY(A,K))}function Xz6(A){if(hd6(A))return!1;let q=Dz6();if(q===null)return!0;return q.some((K)=>{if(K.source==="hostPattern")return cqY(A,K);if(K.source==="pathPattern")return lqY(A,K);return dqY(A,K)})}function Tf6(A){switch(A.source){case"github":return`github:${A.repo}${A.ref?`@${A.ref}`:""}`;case"url":return A.url;case"git":return`git:${A.url}${A.ref?`@${A.ref}`:""}`;case"npm":return`npm:${A.package}`;case"file":return`file:${A.path}`;case"directory":return`dir:${A.path}`;case"hostPattern":return`hostPattern:${A.hostPattern}`;case"pathPattern":return`pathPattern:${A.pathPattern}`;default:return"unknown source"}}async function f$4({configuredMarketplaceCount:A,failedMarketplaceCount:q}){if(!await Zf6())return"git-not-installed";let Y=Dz6();if(Y!==null){if(Y.length===0)return"all-blocked-by-policy";if(A===0)return"policy-restricts-sources"}if(A===0)return"no-marketplaces-configured";if(q>0&&q===A)return"all-marketplaces-failed";return"all-plugins-installed"}var gF=k(()=>{R_();x1();GA();cZ1()});import{join as T$4}from"path";function Id6(){let A={};for(let q of EV())for(let K of V$4){let{settings:Y}=a66(T$4(q,".claude",K));if(!Y?.enabledPlugins)continue;Object.assign(A,Y.enabledPlugins)}return A}function N$4(){let A={};for(let q of EV())for(let K of V$4){let{settings:Y}=a66(T$4(q,".claude",K));if(!Y?.extraKnownMarketplaces)continue;Object.assign(A,Y.extraKnownMarketplaces)}return A}var V$4;var lZ1=k(()=>{Q1();GA();V$4=["settings.json","settings.local.json"]});function S_(A){if(A.includes("@")){let q=A.split("@");return{name:q[0]||"",marketplace:q[1]}}return{name:A}}function Tx(A){if(A==="managed")throw Error("Cannot install plugins to managed scope");return nqY[A]}function v$4(A){return kL8[A]}var kL8,nqY;var FF=k(()=>{kL8={policySettings:"managed",userSettings:"user",projectSettings:"project",localSettings:"local",flagSettings:"flag"};nqY={user:"userSettings",project:"projectSettings",local:"localSettings"}});import{dirname as VP_,join as Pz6}from"path";function bd6(){return Pz6(Rj(),"installed_plugins.json")}function rqY(){return Pz6(Rj(),"installed_plugins_v2.json")}function oqY(){if(EL8)return;let A=P1(),q=bd6(),K=rqY();try{let Y=A.existsSync(K),z=A.existsSync(q);if(Y){A.renameSync(K,q),L("Renamed installed_plugins_v2.json to installed_plugins.json");let w=yT();k$4(w)}else if(z){let w=A.readFileSync(q,{encoding:"utf-8"}),_=O8(w);if((typeof _?.version==="number"?_.version:1)===1){let O=XI6().parse(_),H=RL8(O);pz(q,U6(H,null,2),{encoding:"utf-8",flush:!0}),L(`Converted installed_plugins.json from V1 to V2 format (${Object.keys(O.plugins).length} plugins)`),k$4(H)}}EL8=!0}catch(Y){let z=D1(Y);L(`Failed to migrate plugin files: ${z}`,{level:"error"}),$6(Y instanceof Error?Y:Error(`Failed to migrate plugin files: ${z}`)),EL8=!0}}function k$4(A){let q=P1(),K=Vf6();try{let Y=new Set;for(let w of Object.values(A.plugins))for(let _ of w)Y.add(_.installPath);let z=q.readdirSync(K);for(let w of z){if(!w.isDirectory())continue;let _=w.name,$=Pz6(K,_);if(q.readdirSync($).some((j)=>{if(!j.isDirectory())return!1;let J=Pz6($,j.name);return q.readdirSync(J).some((D)=>D.isDirectory())}))continue;if(!Y.has($))q.rmSync($,{recursive:!0,force:!0}),L(`Cleaned up legacy cache directory: ${_}`)}}catch(Y){let z=D1(Y);L(`Failed to clean up legacy cache: ${z}`,{level:"warn"})}}function yL8(){let A=P1(),q=bd6(),K;try{K=A.readFileSync(q,{encoding:"utf-8"})}catch(w){if(w.code==="ENOENT")return null;throw w}let Y=O8(K);return{version:typeof Y?.version==="number"?Y.version:1,data:Y}}function RL8(A){let q={};for(let[K,Y]of Object.entries(A.plugins)){let z=Nx(K,Y.version);q[K]=[{scope:"user",installPath:z,version:Y.version,installedAt:Y.installedAt,lastUpdated:Y.lastUpdated,gitCommitSha:Y.gitCommitSha}]}return{version:2,plugins:q}}function yT(){if(QF!==null)return QF;let A=bd6();try{let q=yL8();if(q){if(q.version===2){let z=PI6().parse(q.data);return QF=z,L(`Loaded ${Object.keys(z.plugins).length} installed plugins from ${A}`),z}let K=XI6().parse(q.data),Y=RL8(K);return QF=Y,L(`Loaded and converted ${Object.keys(K.plugins).length} plugins from V1 format`),Y}return L("installed_plugins.json doesn't exist, returning empty V2 object"),QF={version:2,plugins:{}},QF}catch(q){let K=D1(q);return L(`Failed to load installed_plugins.json: ${K}. Starting with empty state.`,{level:"error"}),$6(q instanceof Error?q:Error(`Failed to load installed_plugins.json: ${K}`)),QF={version:2,plugins:{}},QF}}function nZ1(A){let q=P1(),K=bd6();try{let Y=Rj();if(!q.existsSync(Y))q.mkdirSync(Y);let z=U6(A,null,2);pz(K,z,{encoding:"utf-8",flush:!0}),QF=A,L(`Saved ${Object.keys(A.plugins).length} installed plugins to ${K}`)}catch(Y){let z=D1(Y);throw $6(Y instanceof Error?Y:Error(`Failed to save installed_plugins.json: ${z}`)),Y}}function L$4(A,q,K){let Y=Vx(),z=Y.plugins[A];if(!z)return;if(Y.plugins[A]=z.filter((w)=>!(w.scope===q&&w.projectPath===K)),Y.plugins[A].length===0)delete Y.plugins[A];nZ1(Y),L(`Removed installation for ${A} at scope ${q}`)}function xd6(){if(LL8===null)LL8=yT();return LL8}function Vx(){try{let A=yL8();if(A){if(A.version===2)return PI6().parse(A.data);let q=XI6().parse(A.data);return RL8(q)}return{version:2,plugins:{}}}catch(A){let q=D1(A);return L(`Failed to load installed plugins from disk: ${q}`,{level:"error"}),{version:2,plugins:{}}}}function y$4(A,q,K,Y,z,w){let _=Vx(),$=_.plugins[A];if(!$){L(`Cannot update ${A} on disk: plugin not found in installed plugins`);return}let O=$.find((H)=>H.scope===q&&H.projectPath===K);if(O){if(O.installPath=Y,O.version=z,O.lastUpdated=new Date().toISOString(),w!==void 0)O.gitCommitSha=w;let H=bd6();pz(H,U6(_,null,2),{encoding:"utf-8",flush:!0}),QF=null,L(`Updated ${A} on disk to version ${z} at ${Y}`)}else L(`Cannot update ${A} on disk: no installation for scope ${q}`)}async function SL8(){oqY();try{await IL8()}catch(q){$6(q)}let A=xd6();L(`Initialized versioned plugins system with ${Object.keys(A.plugins).length} plugins`)}function R$4(A){if(!A)return[];let q=Vx(),K=`@${A}`,Y=new Set,z=!1;for(let w of Object.keys(q.plugins)){if(!w.endsWith(K))continue;for(let _ of q.plugins[w]??[])if(_.installPath)Y.add(_.installPath);delete q.plugins[w],z=!0,L(`Removed installed plugin for marketplace removal: ${w}`)}if(z)nZ1(q);return Array.from(Y)}function CL8(A){return A.scope==="user"||A.scope==="managed"||A.projectPath===DA()}function RT(A){let K=yT().plugins[A];if(!K||K.length===0)return!1;if(!K.some(CL8))return!1;return BA().enabledPlugins?.[A]!==void 0}function hL8(A,q,K="user",Y){let z=Vx(),w={scope:K,installPath:q.installPath,version:q.version,installedAt:q.installedAt,lastUpdated:q.lastUpdated,gitCommitSha:q.gitCommitSha,...Y&&{projectPath:Y}},_=z.plugins[A]||[],$=_.findIndex((H)=>H.scope===K&&H.projectPath===Y),O=$>=0;if(O)_[$]=w;else _.push(w);z.plugins[A]=_,nZ1(z),L(`${O?"Updated":"Added"} installed plugin: ${A} (scope: ${K})`)}async function iZ1(A){return await I31(A)??void 0}function E$4(A,q){let K=P1(),Y=Pz6(A,".claude-plugin","plugin.json");try{let z=K.readFileSync(Y,{encoding:"utf-8"});return O8(z).version||"unknown"}catch{return L(`Could not read version from manifest for ${q}`),"unknown"}}async function IL8(){let q=BA().enabledPlugins||{};if(Object.keys(q).length===0)return;let K=yL8(),Y=K!==null;if(Y&&K?.version===2&&K){let D=PI6().safeParse(K.data);if(D?.success){let X=D.data.plugins;if(Object.keys(q).filter((W)=>W.includes("@")).every((W)=>{let Z=X[W];return Z&&Z.length>0})){L("All plugins already exist, skipping migration");return}}}L(Y?"Syncing installed_plugins.json with enabledPlugins from all settings.json files":"Creating installed_plugins.json from settings.json files");let w=P1(),_=new Date().toISOString(),$=I1(),O=new Map,H=["userSettings","projectSettings","localSettings"];for(let D of H){let P=HA(D)?.enabledPlugins||{};for(let W of Object.keys(P)){if(!W.includes("@"))continue;let Z=v$4(D);O.set(W,{scope:Z,projectPath:Z==="user"?void 0:$})}}let j={};if(Y)j={...yT().plugins};let J=0,M=0;for(let[D,X]of O){let P=j[D];if(P&&P.length>0){let W=P[0];if(W&&(W.scope!==X.scope||W.projectPath!==X.projectPath)){if(W.scope=X.scope,X.projectPath)W.projectPath=X.projectPath;else delete W.projectPath;W.lastUpdated=_,J++,L(`Updated ${D} scope to ${X.scope} (settings.json is source of truth)`)}}else{let{name:W,marketplace:Z}=S_(D);if(!W||!Z)continue;try{L(`Looking up plugin ${D} in marketplace ${Z}`);let G=await aS(D);if(!G){L(`Plugin ${D} not found in any marketplace, skipping`);continue}let{entry:f,marketplaceInstallLocation:V}=G,N,v="unknown",y=void 0;if(typeof f.source==="string")N=Pz6(V,f.source),v=E$4(N,D),y=await iZ1(N);else{let R=Vf6(),h=W.replace(/[^a-zA-Z0-9-_]/g,"-"),B=Pz6(R,h);if(!w.existsSync(B)){L(`External plugin ${D} not in cache, skipping`);continue}N=B,v=E$4(B,D),y=await iZ1(B)}if(v==="unknown"&&f.version)v=f.version;if(v==="unknown"&&y)v=y.substring(0,12);j[D]=[{scope:X.scope,installPath:Nx(D,v),version:v,installedAt:_,lastUpdated:_,gitCommitSha:y,...X.projectPath&&{projectPath:X.projectPath}}],M++,L(`Added ${D} with scope ${X.scope}`)}catch(G){L(`Failed to add plugin ${D}: ${G}`)}}}if(!Y||J>0||M>0)nZ1({version:2,plugins:j}),L(`Sync completed: ${M} added, ${J} updated in installed_plugins.json`)}var EL8=!1,QF=null,LL8=null;var GP=k(()=>{Y7();a1();G1();x1();na();L0();a1();MA();GA();FF();W7();Q1();aj();ZK6();R_()});function ST(A){switch(A.type){case"generic-error":return A.error;case"path-not-found":return`Path not found: ${A.path} (${A.component})`;case"git-auth-failed":return`Git authentication failed (${A.authType}): ${A.gitUrl}`;case"git-timeout":return`Git ${A.operation} timeout: ${A.gitUrl}`;case"network-error":return`Network error: ${A.url}${A.details?` - ${A.details}`:""}`;case"manifest-parse-error":return`Manifest parse error: ${A.parseError}`;case"manifest-validation-error":return`Manifest validation failed: ${A.validationErrors.join(", ")}`;case"plugin-not-found":return`Plugin ${A.pluginId} not found in marketplace ${A.marketplace}`;case"marketplace-not-found":return`Marketplace ${A.marketplace} not found`;case"marketplace-load-failed":return`Marketplace ${A.marketplace} failed to load: ${A.reason}`;case"mcp-config-invalid":return`MCP server ${A.serverName} invalid: ${A.validationError}`;case"mcp-server-suppressed-duplicate":{let q=A.duplicateOf.startsWith("plugin:")?`server provided by plugin "${A.duplicateOf.split(":")[1]??"?"}"`:`already-configured "${A.duplicateOf}"`;return`MCP server "${A.serverName}" skipped — same command/URL as ${q}`}case"hook-load-failed":return`Hook load failed: ${A.reason}`;case"component-load-failed":return`${A.component} load failed from ${A.path}: ${A.reason}`;case"mcpb-download-failed":return`Failed to download MCPB from ${A.url}: ${A.reason}`;case"mcpb-extract-failed":return`Failed to extract MCPB ${A.mcpbPath}: ${A.reason}`;case"mcpb-invalid-manifest":return`MCPB manifest invalid at ${A.mcpbPath}: ${A.validationError}`;case"lsp-config-invalid":return`Plugin "${A.plugin}" has invalid LSP server config for "${A.serverName}": ${A.validationError}`;case"lsp-server-start-failed":return`Plugin "${A.plugin}" failed to start LSP server "${A.serverName}": ${A.reason}`;case"lsp-server-crashed":if(A.signal)return`Plugin "${A.plugin}" LSP server "${A.serverName}" crashed with signal ${A.signal}`;return`Plugin "${A.plugin}" LSP server "${A.serverName}" crashed with exit code ${A.exitCode??"unknown"}`;case"lsp-request-timeout":return`Plugin "${A.plugin}" LSP server "${A.serverName}" timed out on ${A.method} request after ${A.timeoutMs}ms`;case"lsp-request-failed":return`Plugin "${A.plugin}" LSP server "${A.serverName}" ${A.method} request failed: ${A.error}`;case"marketplace-blocked-by-policy":if(A.blockedByBlocklist)return`Marketplace '${A.marketplace}' is blocked by enterprise policy`;return`Marketplace '${A.marketplace}' is not in the allowed marketplace list`}}var rZ1=(A)=>A.name==="up"||A.name==="k"||A.ctrl&&A.name==="p",bL8=(A)=>A.name==="down"||A.name==="j"||A.ctrl&&A.name==="n",oZ1=(A)=>A.name==="backspace",S$4=(A)=>"123456789".includes(A.name),Nf6=(A)=>A.name==="enter"||A.name==="return";var xL8,uL8,BL8,mL8,ud6;var aZ1=k(()=>{xL8=class xL8 extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(A){super();this.cause=A?.cause}};uL8=class uL8 extends Error{name="CancelPromptError";message="Prompt was canceled"};BL8=class BL8 extends Error{name="ExitPromptError"};mL8=class mL8 extends Error{name="HookError"};ud6=class ud6 extends Error{name="ValidationError"}});import{AsyncLocalStorage as aqY,AsyncResource as sqY}from"node:async_hooks";function tqY(A){return{rl:A,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function h$4(A,q){let K=tqY(A);return C$4.run(K,()=>{function Y(z){K.handleChange=()=>{K.index=0,z()},K.handleChange()}return q(Y)})}function Wz6(){let A=C$4.getStore();if(!A)throw new mL8("[Inquirer] Hook functions can only be called from within a prompt");return A}function gL8(){return Wz6().rl}function FL8(A){let q=(...K)=>{let Y=Wz6(),z=!1,w=Y.handleChange;Y.handleChange=()=>{z=!0};let _=A(...K);if(z)w();return Y.handleChange=w,_};return sqY.bind(q)}function vf6(A){let q=Wz6(),{index:K}=q,Y={get(){return q.hooks[K]},set(w){q.hooks[K]=w},initialized:K in q.hooks},z=A(Y);return q.index++,z}function I$4(){Wz6().handleChange()}var C$4,Zz6;var Gz6=k(()=>{aZ1();C$4=new aqY;Zz6={queue(A){let q=Wz6(),{index:K}=q;q.hooksEffect.push(()=>{q.hooksCleanup[K]?.();let Y=A(gL8());if(Y!=null&&typeof Y!=="function")throw new ud6("useEffect return value must be a cleanup function or nothing.");q.hooksCleanup[K]=Y})},run(){let A=Wz6();FL8(()=>{A.hooksEffect.forEach((q)=>{q()}),A.hooksEffect.length=0})()},clearAll(){let A=Wz6();A.hooksCleanup.forEach((q)=>{q?.()}),A.hooksEffect.length=0,A.hooksCleanup.length=0}}});function XW(A){return vf6((q)=>{let K=(z)=>{if(q.get()!==z)q.set(z),I$4()};if(q.initialized)return[q.get(),K];let Y=typeof A==="function"?A():A;return q.set(Y),[Y,K]})}var sZ1=k(()=>{Gz6()});function fz6(A,q){vf6((K)=>{let Y=K.get();if(!Array.isArray(Y)||q.some((w,_)=>!Object.is(w,Y[_])))Zz6.queue(A);K.set(q)})}var tZ1=k(()=>{Gz6()});var eZ1=C((rP_,b$4)=>{var eqY=g6("node:tty"),AKY=eqY?.WriteStream?.prototype?.hasColors?.()??!1,i5=(A,q)=>{if(!AKY)return(z)=>z;let K=`\x1B[${A}m`,Y=`\x1B[${q}m`;return(z)=>{let w=z+"",_=w.indexOf(Y);if(_===-1)return K+w+Y;let $=K,O=0;while(_!==-1)$+=w.slice(O,_)+K,O=_+Y.length,_=w.indexOf(Y,O);return $+=w.slice(O)+Y,$}},S5={};S5.reset=i5(0,0);S5.bold=i5(1,22);S5.dim=i5(2,22);S5.italic=i5(3,23);S5.underline=i5(4,24);S5.overline=i5(53,55);S5.inverse=i5(7,27);S5.hidden=i5(8,28);S5.strikethrough=i5(9,29);S5.black=i5(30,39);S5.red=i5(31,39);S5.green=i5(32,39);S5.yellow=i5(33,39);S5.blue=i5(34,39);S5.magenta=i5(35,39);S5.cyan=i5(36,39);S5.white=i5(37,39);S5.gray=i5(90,39);S5.bgBlack=i5(40,49);S5.bgRed=i5(41,49);S5.bgGreen=i5(42,49);S5.bgYellow=i5(43,49);S5.bgBlue=i5(44,49);S5.bgMagenta=i5(45,49);S5.bgCyan=i5(46,49);S5.bgWhite=i5(47,49);S5.bgGray=i5(100,49);S5.redBright=i5(91,39);S5.greenBright=i5(92,39);S5.yellowBright=i5(93,39);S5.blueBright=i5(94,39);S5.magentaBright=i5(95,39);S5.cyanBright=i5(96,39);S5.whiteBright=i5(97,39);S5.bgRedBright=i5(101,49);S5.bgGreenBright=i5(102,49);S5.bgYellowBright=i5(103,49);S5.bgBlueBright=i5(104,49);S5.bgMagentaBright=i5(105,49);S5.bgCyanBright=i5(106,49);S5.bgWhiteBright=i5(107,49);b$4.exports=S5});import UF from"node:process";function qKY(){if(UF.platform!=="win32")return UF.env.TERM!=="linux";return Boolean(UF.env.WT_SESSION)||Boolean(UF.env.TERMINUS_SUBLIME)||UF.env.ConEmuTask==="{cmd::Cmder}"||UF.env.TERM_PROGRAM==="Terminus-Sublime"||UF.env.TERM_PROGRAM==="vscode"||UF.env.TERM==="xterm-256color"||UF.env.TERM==="alacritty"||UF.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var x$4,u$4,KKY,YKY,zKY,wKY,_KY,kf6,aP_;var AG1=k(()=>{x$4={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},u$4={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},KKY={tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},YKY={...x$4,...u$4},zKY={...x$4,...KKY},wKY=qKY(),_KY=wKY?YKY:zKY,kf6=_KY,aP_=Object.entries(u$4)});var sS,B$4;var m$4=k(()=>{AG1();sS=e(eZ1(),1),B$4={prefix:{idle:sS.default.blue("?"),done:sS.default.green(kf6.tick)},spinner:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"].map((A)=>sS.default.yellow(A))},style:{answer:sS.default.cyan,message:sS.default.bold,error:(A)=>sS.default.red(`> ${A}`),defaultAnswer:(A)=>sS.default.dim(`(${A})`),help:sS.default.dim,highlight:sS.default.cyan,key:(A)=>sS.default.cyan(sS.default.bold(`<${A}>`))}}});function g$4(A){if(typeof A!=="object"||A===null)return!1;let q=A;while(Object.getPrototypeOf(q)!==null)q=Object.getPrototypeOf(q);return Object.getPrototypeOf(A)===q}function F$4(...A){let q={};for(let K of A)for(let[Y,z]of Object.entries(K)){let w=q[Y];q[Y]=g$4(w)&&g$4(z)?F$4(w,z):z}return q}function Vi(...A){let q=[B$4,...A.filter((K)=>K!=null)];return F$4(...q)}var QL8=k(()=>{m$4()});import{AsyncResource as Q$4}from"node:async_hooks";function Tz6({status:A="idle",theme:q}){let[K,Y]=XW(!1),[z,w]=XW(0),{prefix:_,spinner:$}=Vi(q);if(fz6(()=>{if(A==="loading"){let H,j=-1,J=setTimeout(Q$4.bind(()=>{Y(!0),H=setInterval(Q$4.bind(()=>{j=j+1,w(j%$.frames.length)}),$.interval)}),300);return()=>{clearTimeout(J),clearInterval(H)}}else Y(!1)},[A]),K)return $.frames[z];return typeof _==="string"?_:_[A==="loading"?"idle":A]}var U$4=k(()=>{sZ1();tZ1();QL8()});function Bd6(A,q){return vf6((K)=>{let Y=K.get();if(!Y||Y.dependencies.length!==q.length||Y.dependencies.some((z,w)=>z!==q[w])){let z=A();return K.set({value:z,dependencies:q}),z}return Y.value})}var p$4=k(()=>{Gz6()});function s66(A){return XW({current:A})[0]}var qG1=k(()=>{sZ1()});function Vz6(A){let q=s66(A);q.current=A,fz6((K)=>{let Y=!1,z=FL8((w,_)=>{if(Y)return;q.current(_,K)});return K.input.on("keypress",z),()=>{Y=!0,K.input.removeListener("keypress",z)}},[])}var d$4=k(()=>{qG1();tZ1();Gz6()});var l$4=C((P0_,c$4)=>{c$4.exports=OKY;function $KY(A){let q={defaultWidth:0,output:process.stdout,tty:g6("tty")};if(!A)return q;return Object.keys(q).forEach(function(K){if(!A[K])A[K]=q[K]}),A}function OKY(A){let q=$KY(A);if(q.output.getWindowSize)return q.output.getWindowSize()[0]||q.defaultWidth;if(q.tty.getWindowSize)return q.tty.getWindowSize()[1]||q.defaultWidth;if(q.output.columns)return q.output.columns;if(process.env.CLI_WIDTH){let K=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(K)&&K!==0)return K}return q.defaultWidth}});var n$4=C((W0_,i$4)=>{i$4.exports=({onlyFirst:A=!1}={})=>{let q=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(q,A?void 0:"g")}});var o$4=C((Z0_,r$4)=>{var HKY=n$4();r$4.exports=(A)=>typeof A==="string"?A.replace(HKY(),""):A});var s$4=C((G0_,UL8)=>{var a$4=(A)=>{if(Number.isNaN(A))return!1;if(A>=4352&&(A<=4447||A===9001||A===9002||11904<=A&&A<=12871&&A!==12351||12880<=A&&A<=19903||19968<=A&&A<=42182||43360<=A&&A<=43388||44032<=A&&A<=55203||63744<=A&&A<=64255||65040<=A&&A<=65049||65072<=A&&A<=65131||65281<=A&&A<=65376||65504<=A&&A<=65510||110592<=A&&A<=110593||127488<=A&&A<=127569||131072<=A&&A<=262141))return!0;return!1};UL8.exports=a$4;UL8.exports.default=a$4});var e$4=C((f0_,pL8)=>{var jKY=o$4(),JKY=s$4(),MKY=U68(),t$4=(A)=>{if(typeof A!=="string"||A.length===0)return 0;if(A=jKY(A),A.length===0)return 0;A=A.replace(MKY()," ");let q=0;for(let K=0;K=127&&Y<=159)continue;if(Y>=768&&Y<=879)continue;if(Y>65535)K++;q+=JKY(Y)?2:1}return q};pL8.exports=t$4;pL8.exports.default=t$4});var qO4=C((T0_,AO4)=>{AO4.exports=({onlyFirst:A=!1}={})=>{let q=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(q,A?void 0:"g")}});var dL8=C((V0_,KO4)=>{var DKY=qO4();KO4.exports=(A)=>typeof A==="string"?A.replace(DKY(),""):A});var zO4=C((N0_,YO4)=>{YO4.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var cL8=C((v0_,_O4)=>{var md6=zO4(),wO4={};for(let A of Object.keys(md6))wO4[md6[A]]=A;var Rq={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};_O4.exports=Rq;for(let A of Object.keys(Rq)){if(!("channels"in Rq[A]))throw Error("missing channels property: "+A);if(!("labels"in Rq[A]))throw Error("missing channel labels property: "+A);if(Rq[A].labels.length!==Rq[A].channels)throw Error("channel and label counts mismatch: "+A);let{channels:q,labels:K}=Rq[A];delete Rq[A].channels,delete Rq[A].labels,Object.defineProperty(Rq[A],"channels",{value:q}),Object.defineProperty(Rq[A],"labels",{value:K})}Rq.rgb.hsl=function(A){let q=A[0]/255,K=A[1]/255,Y=A[2]/255,z=Math.min(q,K,Y),w=Math.max(q,K,Y),_=w-z,$,O;if(w===z)$=0;else if(q===w)$=(K-Y)/_;else if(K===w)$=2+(Y-q)/_;else if(Y===w)$=4+(q-K)/_;if($=Math.min($*60,360),$<0)$+=360;let H=(z+w)/2;if(w===z)O=0;else if(H<=0.5)O=_/(w+z);else O=_/(2-w-z);return[$,O*100,H*100]};Rq.rgb.hsv=function(A){let q,K,Y,z,w,_=A[0]/255,$=A[1]/255,O=A[2]/255,H=Math.max(_,$,O),j=H-Math.min(_,$,O),J=function(M){return(H-M)/6/j+0.5};if(j===0)z=0,w=0;else{if(w=j/H,q=J(_),K=J($),Y=J(O),_===H)z=Y-K;else if($===H)z=0.3333333333333333+q-Y;else if(O===H)z=0.6666666666666666+K-q;if(z<0)z+=1;else if(z>1)z-=1}return[z*360,w*100,H*100]};Rq.rgb.hwb=function(A){let q=A[0],K=A[1],Y=A[2],z=Rq.rgb.hsl(A)[0],w=0.00392156862745098*Math.min(q,Math.min(K,Y));return Y=1-0.00392156862745098*Math.max(q,Math.max(K,Y)),[z,w*100,Y*100]};Rq.rgb.cmyk=function(A){let q=A[0]/255,K=A[1]/255,Y=A[2]/255,z=Math.min(1-q,1-K,1-Y),w=(1-q-z)/(1-z)||0,_=(1-K-z)/(1-z)||0,$=(1-Y-z)/(1-z)||0;return[w*100,_*100,$*100,z*100]};function XKY(A,q){return(A[0]-q[0])**2+(A[1]-q[1])**2+(A[2]-q[2])**2}Rq.rgb.keyword=function(A){let q=wO4[A];if(q)return q;let K=1/0,Y;for(let z of Object.keys(md6)){let w=md6[z],_=XKY(A,w);if(_0.04045?((q+0.055)/1.055)**2.4:q/12.92,K=K>0.04045?((K+0.055)/1.055)**2.4:K/12.92,Y=Y>0.04045?((Y+0.055)/1.055)**2.4:Y/12.92;let z=q*0.4124+K*0.3576+Y*0.1805,w=q*0.2126+K*0.7152+Y*0.0722,_=q*0.0193+K*0.1192+Y*0.9505;return[z*100,w*100,_*100]};Rq.rgb.lab=function(A){let q=Rq.rgb.xyz(A),K=q[0],Y=q[1],z=q[2];K/=95.047,Y/=100,z/=108.883,K=K>0.008856?K**0.3333333333333333:7.787*K+0.13793103448275862,Y=Y>0.008856?Y**0.3333333333333333:7.787*Y+0.13793103448275862,z=z>0.008856?z**0.3333333333333333:7.787*z+0.13793103448275862;let w=116*Y-16,_=500*(K-Y),$=200*(Y-z);return[w,_,$]};Rq.hsl.rgb=function(A){let q=A[0]/360,K=A[1]/100,Y=A[2]/100,z,w,_;if(K===0)return _=Y*255,[_,_,_];if(Y<0.5)z=Y*(1+K);else z=Y+K-Y*K;let $=2*Y-z,O=[0,0,0];for(let H=0;H<3;H++){if(w=q+0.3333333333333333*-(H-1),w<0)w++;if(w>1)w--;if(6*w<1)_=$+(z-$)*6*w;else if(2*w<1)_=z;else if(3*w<2)_=$+(z-$)*(0.6666666666666666-w)*6;else _=$;O[H]=_*255}return O};Rq.hsl.hsv=function(A){let q=A[0],K=A[1]/100,Y=A[2]/100,z=K,w=Math.max(Y,0.01);Y*=2,K*=Y<=1?Y:2-Y,z*=w<=1?w:2-w;let _=(Y+K)/2,$=Y===0?2*z/(w+z):2*K/(Y+K);return[q,$*100,_*100]};Rq.hsv.rgb=function(A){let q=A[0]/60,K=A[1]/100,Y=A[2]/100,z=Math.floor(q)%6,w=q-Math.floor(q),_=255*Y*(1-K),$=255*Y*(1-K*w),O=255*Y*(1-K*(1-w));switch(Y*=255,z){case 0:return[Y,O,_];case 1:return[$,Y,_];case 2:return[_,Y,O];case 3:return[_,$,Y];case 4:return[O,_,Y];case 5:return[Y,_,$]}};Rq.hsv.hsl=function(A){let q=A[0],K=A[1]/100,Y=A[2]/100,z=Math.max(Y,0.01),w,_;_=(2-K)*Y;let $=(2-K)*z;return w=K*z,w/=$<=1?$:2-$,w=w||0,_/=2,[q,w*100,_*100]};Rq.hwb.rgb=function(A){let q=A[0]/360,K=A[1]/100,Y=A[2]/100,z=K+Y,w;if(z>1)K/=z,Y/=z;let _=Math.floor(6*q),$=1-Y;if(w=6*q-_,(_&1)!==0)w=1-w;let O=K+w*($-K),H,j,J;switch(_){default:case 6:case 0:H=$,j=O,J=K;break;case 1:H=O,j=$,J=K;break;case 2:H=K,j=$,J=O;break;case 3:H=K,j=O,J=$;break;case 4:H=O,j=K,J=$;break;case 5:H=$,j=K,J=O;break}return[H*255,j*255,J*255]};Rq.cmyk.rgb=function(A){let q=A[0]/100,K=A[1]/100,Y=A[2]/100,z=A[3]/100,w=1-Math.min(1,q*(1-z)+z),_=1-Math.min(1,K*(1-z)+z),$=1-Math.min(1,Y*(1-z)+z);return[w*255,_*255,$*255]};Rq.xyz.rgb=function(A){let q=A[0]/100,K=A[1]/100,Y=A[2]/100,z,w,_;return z=q*3.2406+K*-1.5372+Y*-0.4986,w=q*-0.9689+K*1.8758+Y*0.0415,_=q*0.0557+K*-0.204+Y*1.057,z=z>0.0031308?1.055*z**0.4166666666666667-0.055:z*12.92,w=w>0.0031308?1.055*w**0.4166666666666667-0.055:w*12.92,_=_>0.0031308?1.055*_**0.4166666666666667-0.055:_*12.92,z=Math.min(Math.max(0,z),1),w=Math.min(Math.max(0,w),1),_=Math.min(Math.max(0,_),1),[z*255,w*255,_*255]};Rq.xyz.lab=function(A){let q=A[0],K=A[1],Y=A[2];q/=95.047,K/=100,Y/=108.883,q=q>0.008856?q**0.3333333333333333:7.787*q+0.13793103448275862,K=K>0.008856?K**0.3333333333333333:7.787*K+0.13793103448275862,Y=Y>0.008856?Y**0.3333333333333333:7.787*Y+0.13793103448275862;let z=116*K-16,w=500*(q-K),_=200*(K-Y);return[z,w,_]};Rq.lab.xyz=function(A){let q=A[0],K=A[1],Y=A[2],z,w,_;w=(q+16)/116,z=K/500+w,_=w-Y/200;let $=w**3,O=z**3,H=_**3;return w=$>0.008856?$:(w-0.13793103448275862)/7.787,z=O>0.008856?O:(z-0.13793103448275862)/7.787,_=H>0.008856?H:(_-0.13793103448275862)/7.787,z*=95.047,w*=100,_*=108.883,[z,w,_]};Rq.lab.lch=function(A){let q=A[0],K=A[1],Y=A[2],z;if(z=Math.atan2(Y,K)*360/2/Math.PI,z<0)z+=360;let _=Math.sqrt(K*K+Y*Y);return[q,_,z]};Rq.lch.lab=function(A){let q=A[0],K=A[1],z=A[2]/360*2*Math.PI,w=K*Math.cos(z),_=K*Math.sin(z);return[q,w,_]};Rq.rgb.ansi16=function(A,q=null){let[K,Y,z]=A,w=q===null?Rq.rgb.hsv(A)[2]:q;if(w=Math.round(w/50),w===0)return 30;let _=30+(Math.round(z/255)<<2|Math.round(Y/255)<<1|Math.round(K/255));if(w===2)_+=60;return _};Rq.hsv.ansi16=function(A){return Rq.rgb.ansi16(Rq.hsv.rgb(A),A[2])};Rq.rgb.ansi256=function(A){let q=A[0],K=A[1],Y=A[2];if(q===K&&K===Y){if(q<8)return 16;if(q>248)return 231;return Math.round((q-8)/247*24)+232}return 16+36*Math.round(q/255*5)+6*Math.round(K/255*5)+Math.round(Y/255*5)};Rq.ansi16.rgb=function(A){let q=A%10;if(q===0||q===7){if(A>50)q+=3.5;return q=q/10.5*255,[q,q,q]}let K=(~~(A>50)+1)*0.5,Y=(q&1)*K*255,z=(q>>1&1)*K*255,w=(q>>2&1)*K*255;return[Y,z,w]};Rq.ansi256.rgb=function(A){if(A>=232){let w=(A-232)*10+8;return[w,w,w]}A-=16;let q,K=Math.floor(A/36)/5*255,Y=Math.floor((q=A%36)/6)/5*255,z=q%6/5*255;return[K,Y,z]};Rq.rgb.hex=function(A){let K=(((Math.round(A[0])&255)<<16)+((Math.round(A[1])&255)<<8)+(Math.round(A[2])&255)).toString(16).toUpperCase();return"000000".substring(K.length)+K};Rq.hex.rgb=function(A){let q=A.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!q)return[0,0,0];let K=q[0];if(q[0].length===3)K=K.split("").map(($)=>{return $+$}).join("");let Y=parseInt(K,16),z=Y>>16&255,w=Y>>8&255,_=Y&255;return[z,w,_]};Rq.rgb.hcg=function(A){let q=A[0]/255,K=A[1]/255,Y=A[2]/255,z=Math.max(Math.max(q,K),Y),w=Math.min(Math.min(q,K),Y),_=z-w,$,O;if(_<1)$=w/(1-_);else $=0;if(_<=0)O=0;else if(z===q)O=(K-Y)/_%6;else if(z===K)O=2+(Y-q)/_;else O=4+(q-K)/_;return O/=6,O%=1,[O*360,_*100,$*100]};Rq.hsl.hcg=function(A){let q=A[1]/100,K=A[2]/100,Y=K<0.5?2*q*K:2*q*(1-K),z=0;if(Y<1)z=(K-0.5*Y)/(1-Y);return[A[0],Y*100,z*100]};Rq.hsv.hcg=function(A){let q=A[1]/100,K=A[2]/100,Y=q*K,z=0;if(Y<1)z=(K-Y)/(1-Y);return[A[0],Y*100,z*100]};Rq.hcg.rgb=function(A){let q=A[0]/360,K=A[1]/100,Y=A[2]/100;if(K===0)return[Y*255,Y*255,Y*255];let z=[0,0,0],w=q%1*6,_=w%1,$=1-_,O=0;switch(Math.floor(w)){case 0:z[0]=1,z[1]=_,z[2]=0;break;case 1:z[0]=$,z[1]=1,z[2]=0;break;case 2:z[0]=0,z[1]=1,z[2]=_;break;case 3:z[0]=0,z[1]=$,z[2]=1;break;case 4:z[0]=_,z[1]=0,z[2]=1;break;default:z[0]=1,z[1]=0,z[2]=$}return O=(1-K)*Y,[(K*z[0]+O)*255,(K*z[1]+O)*255,(K*z[2]+O)*255]};Rq.hcg.hsv=function(A){let q=A[1]/100,K=A[2]/100,Y=q+K*(1-q),z=0;if(Y>0)z=q/Y;return[A[0],z*100,Y*100]};Rq.hcg.hsl=function(A){let q=A[1]/100,Y=A[2]/100*(1-q)+0.5*q,z=0;if(Y>0&&Y<0.5)z=q/(2*Y);else if(Y>=0.5&&Y<1)z=q/(2*(1-Y));return[A[0],z*100,Y*100]};Rq.hcg.hwb=function(A){let q=A[1]/100,K=A[2]/100,Y=q+K*(1-q);return[A[0],(Y-q)*100,(1-Y)*100]};Rq.hwb.hcg=function(A){let q=A[1]/100,Y=1-A[2]/100,z=Y-q,w=0;if(z<1)w=(Y-z)/(1-z);return[A[0],z*100,w*100]};Rq.apple.rgb=function(A){return[A[0]/65535*255,A[1]/65535*255,A[2]/65535*255]};Rq.rgb.apple=function(A){return[A[0]/255*65535,A[1]/255*65535,A[2]/255*65535]};Rq.gray.rgb=function(A){return[A[0]/100*255,A[0]/100*255,A[0]/100*255]};Rq.gray.hsl=function(A){return[0,0,A[0]]};Rq.gray.hsv=Rq.gray.hsl;Rq.gray.hwb=function(A){return[0,100,A[0]]};Rq.gray.cmyk=function(A){return[0,0,0,A[0]]};Rq.gray.lab=function(A){return[A[0],0,0]};Rq.gray.hex=function(A){let q=Math.round(A[0]/100*255)&255,Y=((q<<16)+(q<<8)+q).toString(16).toUpperCase();return"000000".substring(Y.length)+Y};Rq.rgb.gray=function(A){return[(A[0]+A[1]+A[2])/3/255*100]}});var OO4=C((k0_,$O4)=>{var KG1=cL8();function PKY(){let A={},q=Object.keys(KG1);for(let K=q.length,Y=0;Y{var lL8=cL8(),fKY=OO4(),Ef6={},TKY=Object.keys(lL8);function VKY(A){let q=function(...K){let Y=K[0];if(Y===void 0||Y===null)return Y;if(Y.length>1)K=Y;return A(K)};if("conversion"in A)q.conversion=A.conversion;return q}function NKY(A){let q=function(...K){let Y=K[0];if(Y===void 0||Y===null)return Y;if(Y.length>1)K=Y;let z=A(K);if(typeof z==="object")for(let w=z.length,_=0;_{Ef6[A]={},Object.defineProperty(Ef6[A],"channels",{value:lL8[A].channels}),Object.defineProperty(Ef6[A],"labels",{value:lL8[A].labels});let q=fKY(A);Object.keys(q).forEach((Y)=>{let z=q[Y];Ef6[A][Y]=NKY(z),Ef6[A][Y].raw=VKY(z)})});HO4.exports=Ef6});var PO4=C((L0_,XO4)=>{var jO4=(A,q)=>(...K)=>{return`\x1B[${A(...K)+q}m`},JO4=(A,q)=>(...K)=>{let Y=A(...K);return`\x1B[${38+q};5;${Y}m`},MO4=(A,q)=>(...K)=>{let Y=A(...K);return`\x1B[${38+q};2;${Y[0]};${Y[1]};${Y[2]}m`},YG1=(A)=>A,DO4=(A,q,K)=>[A,q,K],Lf6=(A,q,K)=>{Object.defineProperty(A,q,{get:()=>{let Y=K();return Object.defineProperty(A,q,{value:Y,enumerable:!0,configurable:!0}),Y},enumerable:!0,configurable:!0})},nL8,yf6=(A,q,K,Y)=>{if(nL8===void 0)nL8=iL8();let z=Y?10:0,w={};for(let[_,$]of Object.entries(nL8)){let O=_==="ansi16"?"ansi":_;if(_===q)w[O]=A(K,z);else if(typeof $==="object")w[O]=A($[q],z)}return w};function vKY(){let A=new Map,q={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};q.color.gray=q.color.blackBright,q.bgColor.bgGray=q.bgColor.bgBlackBright,q.color.grey=q.color.blackBright,q.bgColor.bgGrey=q.bgColor.bgBlackBright;for(let[K,Y]of Object.entries(q)){for(let[z,w]of Object.entries(Y))q[z]={open:`\x1B[${w[0]}m`,close:`\x1B[${w[1]}m`},Y[z]=q[z],A.set(w[0],w[1]);Object.defineProperty(q,K,{value:Y,enumerable:!1})}return Object.defineProperty(q,"codes",{value:A,enumerable:!1}),q.color.close="\x1B[39m",q.bgColor.close="\x1B[49m",Lf6(q.color,"ansi",()=>yf6(jO4,"ansi16",YG1,!1)),Lf6(q.color,"ansi256",()=>yf6(JO4,"ansi256",YG1,!1)),Lf6(q.color,"ansi16m",()=>yf6(MO4,"rgb",DO4,!1)),Lf6(q.bgColor,"ansi",()=>yf6(jO4,"ansi16",YG1,!0)),Lf6(q.bgColor,"ansi256",()=>yf6(JO4,"ansi256",YG1,!0)),Lf6(q.bgColor,"ansi16m",()=>yf6(MO4,"rgb",DO4,!0)),q}Object.defineProperty(XO4,"exports",{enumerable:!0,get:vKY})});var GO4=C((y0_,ZO4)=>{var gd6=e$4(),kKY=dL8(),EKY=PO4(),oL8=new Set(["\x1B","›"]),WO4=(A)=>`${oL8.values().next().value}[${A}m`,LKY=(A)=>A.split(" ").map((q)=>gd6(q)),rL8=(A,q,K)=>{let Y=[...q],z=!1,w=gd6(kKY(A[A.length-1]));for(let[_,$]of Y.entries()){let O=gd6($);if(w+O<=K)A[A.length-1]+=$;else A.push($),w=0;if(oL8.has($))z=!0;else if(z&&$==="m"){z=!1;continue}if(z)continue;if(w+=O,w===K&&_0&&A.length>1)A[A.length-2]+=A.pop()},yKY=(A)=>{let q=A.split(" "),K=q.length;while(K>0){if(gd6(q[K-1])>0)break;K--}if(K===q.length)return A;return q.slice(0,K).join(" ")+q.slice(K).join("")},RKY=(A,q,K={})=>{if(K.trim!==!1&&A.trim()==="")return"";let Y="",z="",w,_=LKY(A),$=[""];for(let[O,H]of A.split(" ").entries()){if(K.trim!==!1)$[$.length-1]=$[$.length-1].trimLeft();let j=gd6($[$.length-1]);if(O!==0){if(j>=q&&(K.wordWrap===!1||K.trim===!1))$.push(""),j=0;if(j>0||K.trim===!1)$[$.length-1]+=" ",j++}if(K.hard&&_[O]>q){let J=q-j,M=1+Math.floor((_[O]-J-1)/q);if(Math.floor((_[O]-1)/q)q&&j>0&&_[O]>0){if(K.wordWrap===!1&&jq&&K.wordWrap===!1){rL8($,H,q);continue}$[$.length-1]+=H}if(K.trim!==!1)$=$.map(yKY);Y=$.join(` `);for(let[O,H]of[...Y].entries()){if(z+=H,oL8.has(H)){let J=parseFloat(/\d[^m]*/.exec(Y.slice(O,O+4)));w=J===39?null:J}let j=EKY.codes.get(Number(w));if(w&&j){if(Y[O+1]===` `)z+=WO4(j);else if(H===` `)z+=WO4(w)}}return z};ZO4.exports=(A,q,K)=>{return String(A).normalize().replace(/\r\n/g,` `).split(` `).map((Y)=>RKY(Y,q,K)).join(` `)}});function Fd6(A,q){return A.split(` `).flatMap((K)=>TO4.default(K,q,{trim:!1,hard:!0}).split(` `).map((Y)=>Y.trimEnd())).join(` `)}function zG1(){return fO4.default({defaultWidth:80,output:gL8().output})}var fO4,TO4;var wG1=k(()=>{Gz6();fO4=e(l$4(),1),TO4=e(GO4(),1)});function SKY(A,q){return Fd6(A,q).split(` `)}function CKY(A,q){let K=q.length,Y=(A%K+K)%K;return[...q.slice(Y),...q.slice(0,Y)]}function VO4({items:A,width:q,renderItem:K,active:Y,position:z,pageSize:w}){let _=A.map((X,P)=>({item:X,index:P,isActive:P===Y})),$=CKY(Y-z,_).slice(0,w),O=(X)=>$[X]==null?[]:SKY(K($[X]),q),H=Array.from({length:w}),j=O(z).slice(0,w),J=z+j.length<=w?z:w-j.length;H.splice(J,j.length,...j);let M=J+j.length,D=z+1;while(M=w)break;D++}M=J-1,D=z-1;while(M>=0&&D>=0){for(let X of O(D).reverse())if(H[M--]=X,M<0)break;D--}return H.filter((X)=>typeof X==="string")}var NO4=k(()=>{wG1()});function vO4({active:A,pageSize:q,total:K}){let Y=Math.floor(q/2);if(K<=q||A=K-Y)return A+q-K;return Y}function kO4({active:A,lastActive:q,total:K,pageSize:Y,pointer:z}){if(K<=Y)return A;if(q{qG1();wG1();NO4()});var RO4=C((g0_,yO4)=>{var hKY=g6("stream");class LO4 extends hKY{#A=null;constructor(A={}){super(A);this.writable=this.readable=!0,this.muted=!1,this.on("pipe",this._onpipe),this.replace=A.replace,this._prompt=A.prompt||null,this._hadControl=!1}#q(A,q){if(this._dest)return this._dest[A];if(this._src)return this._src[A];return q}#K(A,...q){if(typeof this._dest?.[A]==="function")this._dest[A](...q);if(typeof this._src?.[A]==="function")this._src[A](...q)}get isTTY(){if(this.#A!==null)return this.#A;return this.#q("isTTY",!1)}set isTTY(A){this.#A=A}get rows(){return this.#q("rows")}get columns(){return this.#q("columns")}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(A){this._src=A}pipe(A,q){return this._dest=A,super.pipe(A,q)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(A){if(this.muted){if(!this.replace)return!0;if(A.match(/^\u001b/)){if(A.indexOf(this._prompt)===0)A=A.slice(this._prompt.length),A=A.replace(/./g,this.replace),A=this._prompt+A;return this._hadControl=!0,this.emit("data",A)}else{if(this._prompt&&this._hadControl&&A.indexOf(this._prompt)===0)this._hadControl=!1,this.emit("data",this._prompt),A=A.slice(this._prompt.length);A=A.toString().replace(/./g,this.replace)}}this.emit("data",A)}end(A){if(this.muted)if(A&&this.replace)A=A.toString().replace(/./g,this.replace);else A=null;if(A)this.emit("data",A);this.emit("end")}destroy(...A){return this.#K("destroy",...A)}destroySoon(...A){return this.#K("destroySoon",...A)}close(...A){return this.#K("close",...A)}}yO4.exports=LO4});var CO4=C((IKY,sL8)=>{var gY=IKY;IKY.default=gY;var v2="\x1B[",Qd6="\x1B]",Rf6="\x07",_G1=";",SO4=process.env.TERM_PROGRAM==="Apple_Terminal";gY.cursorTo=(A,q)=>{if(typeof A!=="number")throw TypeError("The `x` argument is required");if(typeof q!=="number")return v2+(A+1)+"G";return v2+(q+1)+";"+(A+1)+"H"};gY.cursorMove=(A,q)=>{if(typeof A!=="number")throw TypeError("The `x` argument is required");let K="";if(A<0)K+=v2+-A+"D";else if(A>0)K+=v2+A+"C";if(q<0)K+=v2+-q+"A";else if(q>0)K+=v2+q+"B";return K};gY.cursorUp=(A=1)=>v2+A+"A";gY.cursorDown=(A=1)=>v2+A+"B";gY.cursorForward=(A=1)=>v2+A+"C";gY.cursorBackward=(A=1)=>v2+A+"D";gY.cursorLeft=v2+"G";gY.cursorSavePosition=SO4?"\x1B7":v2+"s";gY.cursorRestorePosition=SO4?"\x1B8":v2+"u";gY.cursorGetPosition=v2+"6n";gY.cursorNextLine=v2+"E";gY.cursorPrevLine=v2+"F";gY.cursorHide=v2+"?25l";gY.cursorShow=v2+"?25h";gY.eraseLines=(A)=>{let q="";for(let K=0;K{return[Qd6,"8",_G1,_G1,q,Rf6,A,Qd6,"8",_G1,_G1,Rf6].join("")};gY.image=(A,q={})=>{let K=`${Qd6}1337;File=inline=1`;if(q.width)K+=`;width=${q.width}`;if(q.height)K+=`;height=${q.height}`;if(q.preserveAspectRatio===!1)K+=";preserveAspectRatio=0";return K+":"+A.toString("base64")+Rf6};gY.iTerm={setCwd:(A=process.cwd())=>`${Qd6}50;CurrentDir=${A}${Rf6}`,annotation:(A,q={})=>{let K=`${Qd6}1337;`,Y=typeof q.x<"u",z=typeof q.y<"u";if((Y||z)&&!(Y&&z&&typeof q.length<"u"))throw Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");if(A=A.replace(/\|/g,""),K+=q.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",q.length>0)K+=(Y?[A,q.length,q.x,q.y]:[q.length,A]).join("|");else K+=A;return K+Rf6}}});function IO4(A){return A>0?t66.default.cursorDown(A):""}class $G1{rl;height=0;extraLinesUnderPrompt=0;cursorPos;constructor(A){this.rl=A,this.rl=A,this.cursorPos=A.getCursorPos()}write(A){this.rl.output.unmute(),this.rl.output.write(A),this.rl.output.mute()}render(A,q=""){let K=xKY(A),Y=bO4.default(K),z=Y;if(this.rl.line.length>0)z=z.slice(0,-this.rl.line.length);this.rl.setPrompt(z),this.cursorPos=this.rl.getCursorPos();let w=zG1();if(A=Fd6(A,w),q=Fd6(q,w),Y.length%w===0)A+=` `;let _=A+(q?` `+q:""),O=Math.floor(Y.length/w)-this.cursorPos.rows+(q?hO4(q):0);if(O>0)_+=t66.default.cursorUp(O);_+=t66.default.cursorTo(this.cursorPos.cols),this.write(IO4(this.extraLinesUnderPrompt)+t66.default.eraseLines(this.height)+_),this.extraLinesUnderPrompt=O,this.height=hO4(_)}checkCursorPos(){let A=this.rl.getCursorPos();if(A.cols!==this.cursorPos.cols)this.write(t66.default.cursorTo(A.cols)),this.cursorPos=A}done({clearContent:A}){this.rl.setPrompt("");let q=IO4(this.extraLinesUnderPrompt);q+=A?t66.default.eraseLines(this.height):` `,q+=t66.default.cursorShow,this.write(q),this.rl.close()}}var bO4,t66,hO4=(A)=>A.split(` `).length,xKY=(A)=>A.split(` `).pop()??"";var xO4=k(()=>{wG1();bO4=e(dL8(),1),t66=e(CO4(),1)});var tL8;var uO4=k(()=>{tL8=class tL8 extends Promise{static withResolver(){let A,q;return{promise:new Promise((Y,z)=>{A=Y,q=z}),resolve:A,reject:q}}}});import*as BO4 from"node:readline";import{AsyncResource as uKY}from"node:async_hooks";function Nz6(A){return(K,Y={})=>{let{input:z=process.stdin,signal:w}=Y,_=new Set,$=new mO4.default;$.pipe(Y.output??process.stdout);let O=BO4.createInterface({terminal:!0,input:z,output:$}),H=new $G1(O),{promise:j,resolve:J,reject:M}=tL8.withResolver(),D=()=>M(new uL8);if(w){let P=()=>M(new xL8({cause:w.reason}));if(w.aborted)return P(),Object.assign(j,{cancel:D});w.addEventListener("abort",P),_.add(()=>w.removeEventListener("abort",P))}_.add(vJ6((P,W)=>{M(new BL8(`User force closed the prompt with ${P} ${W}`))}));let X=()=>H.checkCursorPos();return O.input.on("keypress",X),_.add(()=>O.input.removeListener("keypress",X)),h$4(O,(P)=>{let W=uKY.bind(()=>Zz6.clearAll());return O.on("close",W),_.add(()=>O.removeListener("close",W)),P(()=>{try{let Z=A(K,(V)=>{setImmediate(()=>J(V))}),[G,f]=typeof Z==="string"?[Z]:Z;H.render(G,f),Zz6.run()}catch(Z){M(Z)}}),Object.assign(j.then((Z)=>{return Zz6.clearAll(),Z},(Z)=>{throw Zz6.clearAll(),Z}).finally(()=>{_.forEach((Z)=>Z()),H.done({clearContent:Boolean(Y?.clearPromptOnDone)}),$.end()}).then(()=>j),{cancel:D})})}}var mO4;var gO4=k(()=>{Aq1();xO4();uO4();Gz6();aZ1();mO4=e(RO4(),1)});class vz6{separator=FO4.default.dim(Array.from({length:15}).join(kf6.line));type="separator";constructor(A){if(A)this.separator=A}static isSeparator(A){return Boolean(A&&typeof A==="object"&&"type"in A&&A.type==="separator")}}var FO4;var QO4=k(()=>{AG1();FO4=e(eZ1(),1)});var OG1=k(()=>{U$4();sZ1();tZ1();p$4();qG1();d$4();QL8();EO4();gO4();QO4();aZ1()});var k2;var UO4=k(()=>{OG1();k2=Nz6((A,q)=>{let{transformer:K=(M)=>M?"yes":"no"}=A,[Y,z]=XW("idle"),[w,_]=XW(""),$=Vi(A.theme),O=Tz6({status:Y,theme:$});Vz6((M,D)=>{if(Nf6(M)){let X=A.default!==!1;if(/^(y|yes)/i.test(w))X=!0;else if(/^(n|no)/i.test(w))X=!1;_(K(X)),z("done"),q(X)}else _(D.line)});let H=w,j="";if(Y==="done")H=$.style.answer(w);else j=` ${$.style.defaultAnswer(A.default===!1?"y/N":"Y/n")}`;let J=$.style.message(A.message,Y);return`${O} ${J}${j} ${H}`})});var jz;var pO4=k(()=>{OG1();jz=Nz6((A,q)=>{let{required:K,validate:Y=()=>!0}=A,z=Vi(A.theme),[w,_]=XW("idle"),[$="",O]=XW(A.default),[H,j]=XW(),[J,M]=XW(""),D=Tz6({status:w,theme:z});Vz6(async(G,f)=>{if(w!=="idle")return;if(Nf6(G)){let V=J||$;_("loading");let N=K&&!V?"You must provide a value":await Y(V);if(N===!0)M(V),_("done"),q(V);else f.write(J),j(N||"You must provide a valid value"),_("idle")}else if(oZ1(G)&&!J)O(void 0);else if(G.name==="tab"&&!J)O(void 0),f.clearLine(0),f.write($),M($);else M(f.line),j(void 0)});let X=z.style.message(A.message,w),P=J;if(typeof A.transformer==="function")P=A.transformer(J,{isFinal:w==="done"});else if(w==="done")P=z.style.answer(J);let W;if($&&w!=="done"&&!J)W=z.style.defaultAnswer($);let Z="";if(H)Z=z.style.error(H);return[[D,X,W,P].filter((G)=>G!==void 0).join(" "),Z]})});var cO4=C((BKY,eL8)=>{var FY=BKY;BKY.default=FY;var E2="\x1B[",Ud6="\x1B]",Sf6="\x07",HG1=";",dO4=process.env.TERM_PROGRAM==="Apple_Terminal";FY.cursorTo=(A,q)=>{if(typeof A!=="number")throw TypeError("The `x` argument is required");if(typeof q!=="number")return E2+(A+1)+"G";return E2+(q+1)+";"+(A+1)+"H"};FY.cursorMove=(A,q)=>{if(typeof A!=="number")throw TypeError("The `x` argument is required");let K="";if(A<0)K+=E2+-A+"D";else if(A>0)K+=E2+A+"C";if(q<0)K+=E2+-q+"A";else if(q>0)K+=E2+q+"B";return K};FY.cursorUp=(A=1)=>E2+A+"A";FY.cursorDown=(A=1)=>E2+A+"B";FY.cursorForward=(A=1)=>E2+A+"C";FY.cursorBackward=(A=1)=>E2+A+"D";FY.cursorLeft=E2+"G";FY.cursorSavePosition=dO4?"\x1B7":E2+"s";FY.cursorRestorePosition=dO4?"\x1B8":E2+"u";FY.cursorGetPosition=E2+"6n";FY.cursorNextLine=E2+"E";FY.cursorPrevLine=E2+"F";FY.cursorHide=E2+"?25l";FY.cursorShow=E2+"?25h";FY.eraseLines=(A)=>{let q="";for(let K=0;K{return[Ud6,"8",HG1,HG1,q,Sf6,A,Ud6,"8",HG1,HG1,Sf6].join("")};FY.image=(A,q={})=>{let K=`${Ud6}1337;File=inline=1`;if(q.width)K+=`;width=${q.width}`;if(q.height)K+=`;height=${q.height}`;if(q.preserveAspectRatio===!1)K+=";preserveAspectRatio=0";return K+":"+A.toString("base64")+Sf6};FY.iTerm={setCwd:(A=process.cwd())=>`${Ud6}50;CurrentDir=${A}${Sf6}`,annotation:(A,q={})=>{let K=`${Ud6}1337;`,Y=typeof q.x<"u",z=typeof q.y<"u";if((Y||z)&&!(Y&&z&&typeof q.length<"u"))throw Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");if(A=A.replace(/\|/g,""),K+=q.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",q.length>0)K+=(Y?[A,q.length,q.x,q.y]:[q.length,A]).join("|");else K+=A;return K+Sf6}}});function Cf6(A){return!vz6.isSeparator(A)&&!A.disabled}function FKY(A){return A.map((q)=>{if(vz6.isSeparator(q))return q;if(typeof q==="string")return{value:q,name:q,short:q,disabled:!1};let K=q.name??String(q.value);return{value:q.value,name:K,description:q.description,short:q.short??K,disabled:q.disabled??!1}})}var Ay8,lO4,gKY,jG1;var iO4=k(()=>{OG1();AG1();Ay8=e(eZ1(),1),lO4=e(cO4(),1),gKY={icon:{cursor:kf6.pointer},style:{disabled:(A)=>Ay8.default.dim(`- ${A}`),description:(A)=>Ay8.default.cyan(A)},helpMode:"auto"};jG1=Nz6((A,q)=>{let{loop:K=!0,pageSize:Y=7}=A,z=s66(!0),w=Vi(gKY,A.theme),[_,$]=XW("idle"),O=Tz6({status:_,theme:w}),H=s66(),j=Bd6(()=>FKY(A.choices),[A.choices]),J=Bd6(()=>{let N=j.findIndex(Cf6),v=j.findLastIndex(Cf6);if(N<0)throw new ud6("[select prompt] No selectable choices. All choices are disabled.");return{first:N,last:v}},[j]),M=Bd6(()=>{if(!("default"in A))return-1;return j.findIndex((N)=>Cf6(N)&&N.value===A.default)},[A.default,j]),[D,X]=XW(M===-1?J.first:M),P=j[D];Vz6((N,v)=>{if(clearTimeout(H.current),Nf6(N))$("done"),q(P.value);else if(rZ1(N)||bL8(N)){if(v.clearLine(0),K||rZ1(N)&&D!==J.first||bL8(N)&&D!==J.last){let y=rZ1(N)?-1:1,R=D;do R=(R+y+j.length)%j.length;while(!Cf6(j[R]));X(R)}}else if(S$4(N)){v.clearLine(0);let y=Number(N.name)-1,R=j[y];if(R!=null&&Cf6(R))X(y)}else if(oZ1(N))v.clearLine(0);else{let y=v.line.toLowerCase(),R=j.findIndex((h)=>{if(vz6.isSeparator(h)||!Cf6(h))return!1;return h.name.toLowerCase().startsWith(y)});if(R>=0)X(R);H.current=setTimeout(()=>{v.clearLine(0)},700)}}),fz6(()=>()=>{clearTimeout(H.current)},[]);let W=w.style.message(A.message,_),Z="",G="";if(w.helpMode==="always"||w.helpMode==="auto"&&z.current)if(z.current=!1,j.length>Y)G=` ${w.style.help("(Use arrow keys to reveal more choices)")}`;else Z=w.style.help("(Use arrow keys)");let f=aL8({items:j,active:D,renderItem({item:N,isActive:v}){if(vz6.isSeparator(N))return` ${N.separator}`;if(N.disabled){let h=typeof N.disabled==="string"?N.disabled:"(disabled)";return w.style.disabled(`${N.name} ${h}`)}let y=v?w.style.highlight:(h)=>h,R=v?w.icon.cursor:" ";return y(`${R} ${N.name}`)},pageSize:Y,loop:K});if(_==="done")return`${O} ${W} ${w.style.answer(P.short)}`;let V=P.description?` ${w.style.description(P.description)}`:"";return`${[O,W,Z].filter(Boolean).join(" ")} ${f}${G}${V}${lO4.default.cursorHide}`})});var qy8=k(()=>{UO4();pO4();iO4()});var kz6="0.2",Ky8,nO4,rO4,oO4,aO4,sO4,tO4,eO4,AH4,qH4,QKY,pd6,UKY;var dd6=k(()=>{aK6();Ky8=bk({command:cA(),args:Ej(cA()).optional(),env:OI(cA(),cA()).optional()}),nO4=bk({name:cA(),email:cA().email().optional(),url:cA().url().optional()}),rO4=bk({type:cA(),url:cA().url()}),oO4=Ky8.partial(),aO4=Ky8.extend({platform_overrides:OI(cA(),oO4).optional()}),sO4=bk({type:HI(["python","node","binary"]),entry_point:cA(),mcp_config:aO4}),tO4=bk({claude_desktop:cA().optional(),platforms:Ej(HI(["darwin","win32","linux"])).optional(),runtimes:bk({python:cA().optional(),node:cA().optional()}).optional()}).passthrough(),eO4=bk({name:cA(),description:cA().optional()}),AH4=bk({name:cA(),description:cA().optional(),arguments:Ej(cA()).optional(),text:cA()}),qH4=bk({type:HI(["string","number","boolean","directory","file"]),title:cA(),description:cA(),required:mX().optional(),default:Oq6([cA(),my(),mX(),Ej(cA())]).optional(),multiple:mX().optional(),sensitive:mX().optional(),min:my().optional(),max:my().optional()}),QKY=OI(cA(),Oq6([cA(),my(),mX(),Ej(cA())])),pd6=bk({$schema:cA().optional(),dxt_version:cA().optional().describe("@deprecated Use manifest_version instead"),manifest_version:cA().optional(),name:cA(),display_name:cA().optional(),version:cA(),description:cA(),long_description:cA().optional(),author:nO4,repository:rO4.optional(),homepage:cA().url().optional(),documentation:cA().url().optional(),support:cA().url().optional(),icon:cA().optional(),screenshots:Ej(cA()).optional(),server:sO4,tools:Ej(eO4).optional(),tools_generated:mX().optional(),prompts:Ej(AH4).optional(),prompts_generated:mX().optional(),keywords:Ej(cA()).optional(),license:cA().optional(),privacy_policies:Ej(cA()).optional(),compatibility:tO4.optional(),user_config:OI(cA(),qH4).optional()}).refine((A)=>!!(A.dxt_version||A.manifest_version),{message:"Either 'dxt_version' (deprecated) or 'manifest_version' must be provided"}),UKY=bk({status:HI(["signed","unsigned","self-signed"]),publisher:cA().optional(),issuer:cA().optional(),valid_from:cA().optional(),valid_to:cA().optional(),fingerprint:cA().optional()})});import{existsSync as KH4,readFileSync as pKY,writeFileSync as dKY}from"fs";import{basename as YH4,join as zH4,resolve as cKY}from"path";function wH4(A){let q=zH4(A,"package.json");if(KH4(q))try{return JSON.parse(pKY(q,"utf-8"))}catch(K){}return{}}function Yy8(A){if(typeof A.author==="string")return A.author;return A.author?.name||""}function zy8(A){if(typeof A.author==="object")return A.author?.email||"";return""}function wy8(A){if(typeof A.author==="object")return A.author?.url||"";return""}function _H4(A){if(typeof A.repository==="string")return A.repository;return A.repository?.url||""}function $H4(A,q){let K=A.name||YH4(q),Y=Yy8(A)||"Unknown Author",z=K,w=A.version||"1.0.0",_=A.description||"A MCPB bundle";return{name:K,authorName:Y,displayName:z,version:w,description:_}}function OH4(A){return{authorEmail:zy8(A),authorUrl:wy8(A)}}function HH4(A){let K=$y8("node",A),Y=_y8("node",K);return{serverType:"node",entryPoint:K,mcp_config:Y}}function jH4(A){return{keywords:"",license:A.license||"MIT",repository:void 0}}function _y8(A,q){switch(A){case"node":return{command:"node",args:["${__dirname}/"+q],env:{}};case"python":return{command:"python",args:["${__dirname}/"+q],env:{PYTHONPATH:"${__dirname}/server/lib"}};case"binary":return{command:"${__dirname}/"+q,args:[],env:{}}}}function $y8(A,q){switch(A){case"node":return q?.main||"server/index.js";case"python":return"server/main.py";case"binary":return"server/my-server"}}async function JH4(A,q){let K=A.name||YH4(q),Y=await jz({message:"Extension name:",default:K,validate:(O)=>O.trim().length>0||"Name is required"}),z=await jz({message:"Author name:",default:Yy8(A),validate:(O)=>O.trim().length>0||"Author name is required"}),w=await jz({message:"Display name (optional):",default:Y}),_=await jz({message:"Version:",default:A.version||"1.0.0",validate:(O)=>{if(!O.trim())return"Version is required";if(!/^\d+\.\d+\.\d+/.test(O))return"Version must follow semantic versioning (e.g., 1.0.0)";return!0}}),$=await jz({message:"Description:",default:A.description||"",validate:(O)=>O.trim().length>0||"Description is required"});return{name:Y,authorName:z,displayName:w,version:_,description:$}}async function MH4(A){let q=await jz({message:"Author email (optional):",default:zy8(A)}),K=await jz({message:"Author URL (optional):",default:wy8(A)});return{authorEmail:q,authorUrl:K}}async function DH4(A){let q=await jG1({message:"Server type:",choices:[{name:"Node.js",value:"node"},{name:"Python",value:"python"},{name:"Binary",value:"binary"}],default:"node"}),K=await jz({message:"Entry point:",default:$y8(q,A)}),Y=_y8(q,K);return{serverType:q,entryPoint:K,mcp_config:Y}}async function XH4(){let A=await k2({message:"Does your MCP Server provide tools you want to advertise (optional)?",default:!0}),q=[],K=!1;if(A){let Y=!0;while(Y){let z=await jz({message:"Tool name:",validate:(_)=>_.trim().length>0||"Tool name is required"}),w=await jz({message:"Tool description (optional):"});q.push({name:z,...w?{description:w}:{}}),Y=await k2({message:"Add another tool?",default:!1})}K=await k2({message:"Does your server generate additional tools at runtime?",default:!1})}return{tools:q,toolsGenerated:K}}async function PH4(){let A=await k2({message:"Does your MCP Server provide prompts you want to advertise (optional)?",default:!1}),q=[],K=!1;if(A){let Y=!0;while(Y){let z=await jz({message:"Prompt name:",validate:(H)=>H.trim().length>0||"Prompt name is required"}),w=await jz({message:"Prompt description (optional):"}),_=await k2({message:"Does this prompt have arguments?",default:!1}),$=[];if(_){let H=!0;while(H){let j=await jz({message:"Argument name:",validate:(J)=>{if(!J.trim())return"Argument name is required";if($.includes(J))return"Argument names must be unique";return!0}});$.push(j),H=await k2({message:"Add another argument?",default:!1})}}let O=await jz({message:_?`Prompt text (use \${arguments.name} for arguments: ${$.join(", ")}):`:"Prompt text:",validate:(H)=>H.trim().length>0||"Prompt text is required"});q.push({name:z,...w?{description:w}:{},...$.length>0?{arguments:$}:{},text:O}),Y=await k2({message:"Add another prompt?",default:!1})}K=await k2({message:"Does your server generate additional prompts at runtime?",default:!1})}return{prompts:q,promptsGenerated:K}}async function WH4(A){let q=await jz({message:"Keywords (comma-separated, optional):",default:""}),K=await jz({message:"License:",default:A.license||"MIT"}),Y=await k2({message:"Add repository information?",default:!!A.repository}),z;if(Y){let w=await jz({message:"Repository URL:",default:_H4(A)});if(w)z={type:"git",url:w}}return{keywords:q,license:K,repository:z}}async function ZH4(A){if(await k2({message:"Add a detailed long description?",default:!1}))return await jz({message:"Long description (supports basic markdown):",default:A});return}async function GH4(){let A=await jz({message:"Homepage URL (optional):",validate:(Y)=>{if(!Y.trim())return!0;try{return new URL(Y),!0}catch{return"Must be a valid URL (e.g., https://example.com)"}}}),q=await jz({message:"Documentation URL (optional):",validate:(Y)=>{if(!Y.trim())return!0;try{return new URL(Y),!0}catch{return"Must be a valid URL"}}}),K=await jz({message:"Support URL (optional):",validate:(Y)=>{if(!Y.trim())return!0;try{return new URL(Y),!0}catch{return"Must be a valid URL"}}});return{homepage:A,documentation:q,support:K}}async function fH4(){let A=await jz({message:"Icon file path (optional, relative to manifest):",validate:(Y)=>{if(!Y.trim())return!0;if(Y.includes(".."))return"Relative paths cannot include '..'";return!0}}),q=await k2({message:"Add screenshots?",default:!1}),K=[];if(q){let Y=!0;while(Y){let z=await jz({message:"Screenshot file path (relative to manifest):",validate:(w)=>{if(!w.trim())return"Screenshot path is required";if(w.includes(".."))return"Relative paths cannot include '..'";return!0}});K.push(z),Y=await k2({message:"Add another screenshot?",default:!1})}}return{icon:A,screenshots:K}}async function TH4(A){if(!await k2({message:"Add compatibility constraints?",default:!1}))return;let K=await k2({message:"Specify supported platforms?",default:!1}),Y;if(K){let w=[];if(await k2({message:"Support macOS (darwin)?",default:!0}))w.push("darwin");if(await k2({message:"Support Windows (win32)?",default:!0}))w.push("win32");if(await k2({message:"Support Linux?",default:!0}))w.push("linux");Y=w.length>0?w:void 0}let z;if(A!=="binary"){if(await k2({message:"Specify runtime version constraints?",default:!1})){if(A==="python")z={python:await jz({message:"Python version constraint (e.g., >=3.8,<4.0):",validate:($)=>$.trim().length>0||"Python version constraint is required"})};else if(A==="node")z={node:await jz({message:"Node.js version constraint (e.g., >=16.0.0):",validate:($)=>$.trim().length>0||"Node.js version constraint is required"})}}}return{...Y?{platforms:Y}:{},...z?{runtimes:z}:{}}}async function VH4(){if(!await k2({message:"Add user-configurable options?",default:!1}))return{};let q={},K=!0;while(K){let Y=await jz({message:"Configuration option key (unique identifier):",validate:(j)=>{if(!j.trim())return"Key is required";if(q[j])return"Key must be unique";return!0}}),z=await jG1({message:"Option type:",choices:[{name:"String",value:"string"},{name:"Number",value:"number"},{name:"Boolean",value:"boolean"},{name:"Directory",value:"directory"},{name:"File",value:"file"}]}),w=await jz({message:"Option title (human-readable name):",validate:(j)=>j.trim().length>0||"Title is required"}),_=await jz({message:"Option description:",validate:(j)=>j.trim().length>0||"Description is required"}),$=await k2({message:"Is this option required?",default:!1}),O=await k2({message:"Is this option sensitive (like a password)?",default:!1}),H={type:z,title:w,description:_,required:$,sensitive:O};if(!$){let j;if(z==="boolean")j=await k2({message:"Default value:",default:!1});else if(z==="number"){let J=await jz({message:"Default value (number):",validate:(M)=>{if(!M.trim())return!0;return!isNaN(Number(M))||"Must be a valid number"}});j=J?Number(J):void 0}else j=await jz({message:"Default value (optional):"});if(j!==void 0&&j!=="")H.default=j}if(z==="number"){if(await k2({message:"Add min/max constraints?",default:!1})){let J=await jz({message:"Minimum value (optional):",validate:(D)=>{if(!D.trim())return!0;return!isNaN(Number(D))||"Must be a valid number"}}),M=await jz({message:"Maximum value (optional):",validate:(D)=>{if(!D.trim())return!0;return!isNaN(Number(D))||"Must be a valid number"}});if(J)H.min=Number(J);if(M)H.max=Number(M)}}q[Y]=H,K=await k2({message:"Add another configuration option?",default:!1})}return q}function NH4(A,q,K,Y,z,w,_,$,O,H,j,J,M){let{name:D,displayName:X,version:P,description:W,authorName:Z}=A,{authorEmail:G,authorUrl:f}=K,{serverType:V,entryPoint:N,mcp_config:v}=w,{keywords:y,license:R,repository:h}=M;return{manifest_version:kz6,name:D,...X&&X!==D?{display_name:X}:{},version:P,description:W,...q?{long_description:q}:{},author:{name:Z,...G?{email:G}:{},...f?{url:f}:{}},...Y.homepage?{homepage:Y.homepage}:{},...Y.documentation?{documentation:Y.documentation}:{},...Y.support?{support:Y.support}:{},...z.icon?{icon:z.icon}:{},...z.screenshots.length>0?{screenshots:z.screenshots}:{},server:{type:V,entry_point:N,mcp_config:v},..._.length>0?{tools:_}:{},...$?{tools_generated:!0}:{},...O.length>0?{prompts:O}:{},...H?{prompts_generated:!0}:{},...j?{compatibility:j}:{},...Object.keys(J).length>0?{user_config:J}:{},...y?{keywords:y.split(",").map((B)=>B.trim()).filter((B)=>B)}:{},...R?{license:R}:{},...h?{repository:h}:{}}}function vH4(){console.log(` Next steps:`),console.log("1. Ensure all your production dependencies are in this directory"),console.log("2. Run 'mcpb pack' to create your .mcpb file")}async function Oy8(A=process.cwd(),q=!1){let K=cKY(A),Y=zH4(K,"manifest.json");if(KH4(Y)){if(q)return console.log("manifest.json already exists. Use --force to overwrite in non-interactive mode."),!1;if(!await k2({message:"manifest.json already exists. Overwrite?",default:!1}))return console.log("Cancelled"),!1}if(!q)console.log("This utility will help you create a manifest.json file for your MCPB bundle."),console.log(`Press ^C at any time to quit. `);else console.log("Creating manifest.json with default values...");try{let z=wH4(K),w=q?$H4(z,K):await JH4(z,K),_=q?void 0:await ZH4(w.description),$=q?OH4(z):await MH4(z),O=q?{homepage:"",documentation:"",support:""}:await GH4(),H=q?{icon:"",screenshots:[]}:await fH4(),j=q?HH4(z):await DH4(z),J=q?{tools:[],toolsGenerated:!1}:await XH4(),M=q?{prompts:[],promptsGenerated:!1}:await PH4(),D=q?void 0:await TH4(j.serverType),X=q?{}:await VH4(),P=q?jH4(z):await WH4(z),W=NH4(w,_,$,O,H,j,J.tools,J.toolsGenerated,M.prompts,M.promptsGenerated,D,X,P);return dKY(Y,JSON.stringify(W,null,2)+` `),console.log(` Created manifest.json at ${Y}`),vH4(),!0}catch(z){if(z instanceof Error&&z.message.includes("User force closed"))return console.log(` Cancelled`),!1;throw z}}var Hy8=k(()=>{qy8();dd6()});var uy8={};m1(uy8,{zlibSync:()=>Zy8,zlib:()=>A3Y,zipSync:()=>by8,zip:()=>H3Y,unzlibSync:()=>VG1,unzlib:()=>oH4,unzipSync:()=>xy8,unzip:()=>D3Y,strToU8:()=>q16,strFromU8:()=>hy8,inflateSync:()=>df6,inflate:()=>Sy8,gzipSync:()=>Py8,gzip:()=>tKY,gunzipSync:()=>fG1,gunzip:()=>nH4,deflateSync:()=>ad6,deflate:()=>lH4,decompressSync:()=>Y3Y,decompress:()=>K3Y,compressSync:()=>Py8,compress:()=>tKY,Zlib:()=>Wy8,ZipPassThrough:()=>id6,ZipDeflate:()=>_3Y,Zip:()=>O3Y,Unzlib:()=>TG1,UnzipPassThrough:()=>Kj4,UnzipInflate:()=>j3Y,Unzip:()=>M3Y,Inflate:()=>oN,Gzip:()=>Xy8,Gunzip:()=>GG1,FlateErrorCode:()=>oKY,EncodeUTF8:()=>w3Y,Deflate:()=>qC,Decompress:()=>Gy8,DecodeUTF8:()=>z3Y,Compress:()=>Xy8,AsyncZlib:()=>eKY,AsyncZipDeflate:()=>$3Y,AsyncUnzlib:()=>rH4,AsyncUnzipInflate:()=>J3Y,AsyncInflate:()=>Ry8,AsyncGzip:()=>sKY,AsyncGunzip:()=>iH4,AsyncDeflate:()=>cH4,AsyncDecompress:()=>q3Y,AsyncCompress:()=>sKY});import{createRequire as lKY}from"module";function Lz6(A,q){if(typeof A=="function")q=A,A={};return this.ondata=q,A}function lH4(A,q,K){if(!K)K=q,q={};if(typeof K!="function")lq(7);return Uf6(A,q,[Qf6],function(Y){return K16(ad6(Y.data[0],Y.data[1]))},0,K)}function ad6(A,q){return Ez6(A,q||{},0,0)}function Sy8(A,q,K){if(!K)K=q,q={};if(typeof K!="function")lq(7);return Uf6(A,q,[Ff6],function(Y){return K16(df6(Y.data[0],Ny8(Y.data[1])))},1,K)}function df6(A,q){return rd6(A,{i:2},q&&q.out,q&&q.dictionary)}function tKY(A,q,K){if(!K)K=q,q={};if(typeof K!="function")lq(7);return Uf6(A,q,[Qf6,FH4,function(){return[Py8]}],function(Y){return K16(Py8(Y.data[0],Y.data[1]))},2,K)}function Py8(A,q){if(!q)q={};var K=gf6(),Y=A.length;K.p(A);var z=Ez6(A,q,Ey8(q),8),w=z.length;return vy8(z,q),Tw(z,w-8,K.d()),Tw(z,w-4,Y),z}function nH4(A,q,K){if(!K)K=q,q={};if(typeof K!="function")lq(7);return Uf6(A,q,[Ff6,QH4,function(){return[fG1]}],function(Y){return K16(fG1(Y.data[0],Y.data[1]))},3,K)}function fG1(A,q){var K=ky8(A);if(K+8>A.length)lq(6,"invalid gzip data");return rd6(A.subarray(K,-8),{i:2},q&&q.out||new C5(dH4(A)),q&&q.dictionary)}function A3Y(A,q,K){if(!K)K=q,q={};if(typeof K!="function")lq(7);return Uf6(A,q,[Qf6,UH4,function(){return[Zy8]}],function(Y){return K16(Zy8(Y.data[0],Y.data[1]))},4,K)}function Zy8(A,q){if(!q)q={};var K=vG1();K.p(A);var Y=Ez6(A,q,q.dictionary?6:2,4);return Ly8(Y,q),Tw(Y,Y.length-4,K.d()),Y}function oH4(A,q,K){if(!K)K=q,q={};if(typeof K!="function")lq(7);return Uf6(A,q,[Ff6,pH4,function(){return[VG1]}],function(Y){return K16(VG1(Y.data[0],Ny8(Y.data[1])))},5,K)}function VG1(A,q){return rd6(A.subarray(yy8(A,q&&q.dictionary),-4),{i:2},q&&q.out,q&&q.dictionary)}function K3Y(A,q,K){if(!K)K=q,q={};if(typeof K!="function")lq(7);return A[0]==31&&A[1]==139&&A[2]==8?nH4(A,q,K):(A[0]&15)!=8||A[0]>>4>7||(A[0]<<8|A[1])%31?Sy8(A,q,K):oH4(A,q,K)}function Y3Y(A,q){return A[0]==31&&A[1]==139&&A[2]==8?fG1(A,q):(A[0]&15)!=8||A[0]>>4>7||(A[0]<<8|A[1])%31?df6(A,q):VG1(A,q)}function q16(A,q){if(q){var K=new C5(A.length);for(var Y=0;Y>1)),_=0,$=function(j){w[_++]=j};for(var Y=0;Yw.length){var O=new C5(_+8+(z-Y<<1));O.set(w),w=O}var H=A.charCodeAt(Y);if(H<128||q)$(H);else if(H<2048)$(192|H>>6),$(128|H&63);else if(H>55295&&H<57344)H=65536+(H&1047552)|A.charCodeAt(++Y)&1023,$(240|H>>18),$(128|H>>12&63),$(128|H>>6&63),$(128|H&63);else $(224|H>>12),$(128|H>>6&63),$(128|H&63)}return AC(w,0,_)}function hy8(A,q){if(q){var K="";for(var Y=0;Y65535)b(lq(11,0,1),null);if(!g)b(null,f);else if(v<160000)try{b(null,ad6(f,V))}catch(U){b(U,null)}else j.push(lH4(f,V,b))};for(var P=0;P65535)lq(11);var Z=j?ad6(O,H):O,G=Z.length,f=gf6();f.p(O),Y.push(od6(H,{size:O.length,crc:f.d(),c:Z,f:J,m:X,u:M!=_.length||X&&D.length!=P,o:z,compression:j})),z+=30+M+W+G,w+=76+2*(M+W)+(P||0)+G}var V=new C5(w+22),N=z,v=w-z;for(var y=0;y65558)return _(lq(13,0,1),null),z;var O=CT(A,$+8);if(O){var H=O,j=mJ(A,$+16),J=j==4294967295||H==65535;if(J){var M=mJ(A,$-12);if(J=mJ(A,M)==101075792,J)H=O=mJ(A,M+32),j=mJ(A,M+48)}var D=q&&q.filter,X=function(W){var Z=Aj4(A,j,J),G=Z[0],f=Z[1],V=Z[2],N=Z[3],v=Z[4],y=Z[5],R=eH4(A,y);j=v;var h=function(x,F){if(x)z(),_(x,null);else{if(F)w[N]=F;if(!--O)_(null,w)}};if(!D||D({name:N,size:f,originalSize:V,compression:G}))if(!G)h(null,AC(A,R,R+f));else if(G==8){var B=A.subarray(R,R+f);if(V<524288||f>0.8*V)try{h(null,df6(B,{out:new C5(V)}))}catch(x){h(x,null)}else Y.push(Sy8(B,{size:V},h))}else h(lq(14,"unknown compression type "+G,1),null);else h(null,null)};for(var P=0;P65558)lq(13);var z=CT(A,Y+8);if(!z)return{};var w=mJ(A,Y+16),_=w==4294967295||z==65535;if(_){var $=mJ(A,Y-12);if(_=mJ(A,$)==101075792,_)z=mJ(A,$+32),w=mJ(A,$+48)}var O=q&&q.filter;for(var H=0;H>O]=H}}else{$=new hT(Y);for(z=0;z>15-A[z]}return $},Ni,YY,YY,YY,YY,bf6,YY,CH4,hH4,IH4,bH4,DG1=function(A){var q=A[0];for(var K=1;Kq)q=A[K];return q},tS=function(A,q,K){var Y=q/8|0;return(A[Y]|A[Y+1]<<8)>>(q&7)&K},XG1=function(A,q){var K=q/8|0;return(A[K]|A[K+1]<<8|A[K+2]<<16)>>(q&7)},mf6=function(A){return(A+7)/8|0},AC=function(A,q,K){if(q==null||q<0)q=0;if(K==null||K>A.length)K=A.length;return new C5(A.subarray(q,K))},oKY,xH4,lq=function(A,q,K){var Y=Error(q||xH4[A]);if(Y.code=A,Error.captureStackTrace)Error.captureStackTrace(Y,lq);if(!K)throw Y;return Y},rd6=function(A,q,K,Y){var z=A.length,w=Y?Y.length:0;if(!z||q.f&&!q.l)return K||new C5(0);var _=!K,$=_||q.i!=2,O=q.i;if(_)K=new C5(z*3);var H=function(z6){var a=K.length;if(z6>a){var r=new C5(Math.max(a*2,z6));r.set(K),K=r}},j=q.f||0,J=q.p||0,M=q.b||0,D=q.l,X=q.d,P=q.m,W=q.n,Z=z*8;do{if(!D){j=tS(A,J,1);var G=tS(A,J+1,3);if(J+=3,!G){var f=mf6(J)+4,V=A[f-4]|A[f-3]<<8,N=f+V;if(N>z){if(O)lq(0);break}if($)H(M+V);K.set(A.subarray(f,N),M),q.b=M+=V,q.p=J=N*8,q.f=j;continue}else if(G==1)D=hH4,X=bH4,P=9,W=5;else if(G==2){var v=tS(A,J,31)+257,y=tS(A,J+10,15)+4,R=v+tS(A,J+5,31)+1;J+=14;var h=new C5(R),B=new C5(19);for(var x=0;x>4;if(f<16)h[x++]=f;else{var d=0,l=0;if(f==16)l=3+tS(A,J,3),J+=2,d=h[x-1];else if(f==17)l=3+tS(A,J,7),J+=3;else if(f==18)l=11+tS(A,J,127),J+=7;while(l--)h[x++]=d}}var t=h.subarray(0,v),s=h.subarray(v);P=DG1(t),W=DG1(s),D=eS(t,P,1),X=eS(s,W,1)}else lq(1);if(J>Z){if(O)lq(0);break}}if($)H(M+131072);var H6=(1<>4;if(J+=d&15,J>Z){if(O)lq(0);break}if(!d)lq(2);if(q6<256)K[M++]=q6;else if(q6==256){G6=J,D=null;break}else{var w6=q6-254;if(q6>264){var x=q6-257,j6=uf6[x];w6=tS(A,J,(1<>4;if(!_6)lq(3);J+=_6&15;var s=SH4[k6];if(k6>3){var j6=Bf6[k6];s+=XG1(A,J)&(1<Z){if(O)lq(0);break}if($)H(M+131072);var P6=M+w6;if(M>8},hf6=function(A,q,K){K<<=q&7;var Y=q/8|0;A[Y]|=K,A[Y+1]|=K>>8,A[Y+2]|=K>>16},PG1=function(A,q){var K=[];for(var Y=0;YM)M=w[Y].s;var D=new hT(M+1),X=ZG1(K[j-1],D,0);if(X>q){var Y=0,P=0,W=X-q,Z=1<q)P+=Z-(1<>=W;while(P>0){var f=w[Y].s;if(D[f]=0&&P;--Y){var V=w[Y].s;if(D[V]==q)--D[V],++P}X=q}return{t:new C5(D),l:X}},ZG1=function(A,q,K){return A.s==-1?Math.max(ZG1(A.l,q,K+1),ZG1(A.r,q,K+1)):q[A.s]=K},My8=function(A){var q=A.length;while(q&&!A[--q]);var K=new hT(++q),Y=0,z=A[0],w=1,_=function(O){K[Y++]=O};for(var $=1;$<=q;++$)if(A[$]==z&&$!=q)++w;else{if(!z&&w>2){for(;w>138;w-=138)_(32754);if(w>2)_(w>10?w-11<<5|28690:w-3<<5|12305),w=0}else if(w>3){_(z),--w;for(;w>6;w-=6)_(8304);if(w>2)_(w-3<<5|8208),w=0}while(w--)_(z);w=1,z=A[$]}return{c:K.subarray(0,Y),n:q}},If6=function(A,q){var K=0;for(var Y=0;Y>8,A[z+2]=A[z]^255,A[z+3]=A[z+1]^255;for(var w=0;w4&&!B[cd6[F-1]];--F);var g=H+5<<3,b=If6(z,Ni)+If6(w,bf6)+_,U=If6(z,M)+If6(w,P)+_+14+3*F+If6(y,B)+2*y[16]+3*y[17]+7*y[18];if(O>=0&&g<=b&&g<=U)return Vy8(q,j,A.subarray(O,O+H));var d,l,t,s;if(dF(q,j,1+(U15)dF(q,j,q6[R]>>5&127),j+=q6[R]>>12}}}else d=CH4,l=Ni,t=IH4,s=bf6;for(var R=0;R<$;++R){var j6=Y[R];if(j6>255){var w6=j6>>18&31;if(hf6(q,j,d[w6+257]),j+=l[w6+257],w6>7)dF(q,j,j6>>23&31),j+=uf6[w6];var _6=j6&31;if(hf6(q,j,t[_6]),j+=s[_6],_6>3)hf6(q,j,j6>>5&8191),j+=Bf6[_6]}else hf6(q,j,d[j6]),j+=l[j6]}return hf6(q,j,d[256]),j+l[256]},uH4,e66,BH4=function(A,q,K,Y,z,w){var _=w.z||A.length,$=new C5(Y+_+5*(1+Math.ceil(_/7000))+z),O=$.subarray(Y,$.length-z),H=w.l,j=(w.r||0)&7;if(q){if(j)O[0]=w.r>>3;var J=uH4[q-1],M=J>>13,D=J&8191,X=(1<7000||B>24576)&&(d>423||!H)){j=Dy8(A,O,0,V,N,v,R,B,F,h-F,j),B=y=R=0,F=h;for(var l=0;l<286;++l)N[l]=0;for(var l=0;l<30;++l)v[l]=0}var t=2,s=0,H6=D,Z6=b-U&32767;if(d>2&&g==f(h-Z6)){var G6=Math.min(M,d)-1,q6=Math.min(32767,h),w6=Math.min(258,d);while(Z6<=q6&&--H6&&b!=U){if(A[h+t]==A[h+t-Z6]){var j6=0;for(;j6t){if(t=j6,s=Z6,j6>G6)break;var _6=Math.min(Z6,j6-2),k6=0;for(var l=0;l<_6;++l){var P6=h-Z6+l&32767,A6=P[P6],K6=P6-A6&32767;if(K6>k6)k6=K6,U=P6}}}b=U,U=P[b],Z6+=b-U&32767}}if(s){V[B++]=268435456|WG1[t]<<18|Jy8[s];var z6=WG1[t]&31,a=Jy8[s]&31;R+=uf6[z6]+Bf6[a],++N[257+z6],++v[a],x=h+t,++y}else V[B++]=A[h],++N[A[h]]}}for(h=Math.max(h,x);h<_;++h)V[B++]=A[h],++N[A[h]];if(j=Dy8(A,O,H,V,N,v,R,B,F,h-F,j),!H)w.r=j&7|O[j/8|0]<<3,j-=7,w.h=W,w.p=P,w.i=h,w.w=x}else{for(var h=w.w||0;h<_+H;h+=65535){var r=h+65535;if(r>=_)O[j/8|0]=H,r=_;j=Vy8(O,j+1,A.subarray(h,r))}w.i=_}return AC($,0,Y+mf6(j)+z)},mH4,gf6=function(){var A=-1;return{p:function(q){var K=A;for(var Y=0;Y>>8;A=K},d:function(){return~A}}},vG1=function(){var A=1,q=0;return{p:function(K){var Y=A,z=q,w=K.length|0;for(var _=0;_!=w;){var $=Math.min(_+2655,w);for(;_<$;++_)z+=Y+=K[_];Y=(Y&65535)+15*(Y>>16),z=(z&65535)+15*(z>>16)}A=Y,q=z},d:function(){return A%=65521,q%=65521,(A&255)<<24|(A&65280)<<8|(q&255)<<8|q>>8}}},Ez6=function(A,q,K,Y,z){if(!z){if(z={l:1},q.dictionary){var w=q.dictionary.subarray(-32768),_=new C5(w.length+A.length);_.set(w),_.set(A,w.length),A=_,z.w=w.length}}return BH4(A,q.level==null?6:q.level,q.mem==null?z.l?Math.ceil(Math.max(8,Math.min(13,Math.log(A.length)))*1.5):20:12+q.mem,K,Y,z)},od6=function(A,q){var K={};for(var Y in A)K[Y]=A[Y];for(var Y in q)K[Y]=q[Y];return K},kH4=function(A,q,K){var Y=A(),z=A.toString(),w=z.slice(z.indexOf("[")+1,z.lastIndexOf("]")).replace(/\s+/g,"").split(",");for(var _=0;_>>0},jy8=function(A,q){return mJ(A,q)+mJ(A,q+4)*4294967296},Tw=function(A,q,K){for(;K;++q)A[q]=K,K>>>=8},vy8=function(A,q){var K=q.filename;if(A[0]=31,A[1]=139,A[2]=8,A[8]=q.level<2?4:q.level==9?2:0,A[9]=3,q.mtime!=0)Tw(A,4,Math.floor(new Date(q.mtime||Date.now())/1000));if(K){A[3]=8;for(var Y=0;Y<=K.length;++Y)A[Y+10]=K.charCodeAt(Y)}},ky8=function(A){if(A[0]!=31||A[1]!=139||A[2]!=8)lq(6,"invalid gzip data");var q=A[3],K=10;if(q&4)K+=(A[10]|A[11]<<8)+2;for(var Y=(q>>3&1)+(q>>4&1);Y>0;Y-=!A[K++]);return K+(q&2)},dH4=function(A){var q=A.length;return(A[q-4]|A[q-3]<<8|A[q-2]<<16|A[q-1]<<24)>>>0},Ey8=function(A){return 10+(A.filename?A.filename.length+1:0)},Ly8=function(A,q){var K=q.level,Y=K==0?0:K<6?1:K==9?3:2;if(A[0]=120,A[1]=Y<<6|(q.dictionary&&32),A[1]|=31-(A[0]<<8|A[1])%31,q.dictionary){var z=vG1();z.p(q.dictionary),Tw(A,2,z.d())}},yy8=function(A,q){if((A[0]&15)!=8||A[0]>>4>7||(A[0]<<8|A[1])%31)lq(6,"invalid zlib data");if((A[1]>>5&1)==+!q)lq(6,"invalid zlib data: "+(A[1]&32?"need":"unexpected")+" dictionary");return(A[1]>>3&4)+2},qC,cH4,oN,Ry8,Xy8,sKY,GG1,iH4,Wy8,eKY,TG1,rH4,Gy8,q3Y,Cy8=function(A,q,K,Y){for(var z in A){var w=A[z],_=q+z,$=Y;if(Array.isArray(w))$=od6(Y,w[1]),w=w[0];if(w instanceof C5)K[_]=[w,$];else K[_+="/"]=[new C5(0),$],Cy8(w,_,K,Y)}},EH4,fy8,aH4=0,sH4=function(A){for(var q="",K=0;;){var Y=A[K++],z=(Y>127)+(Y>223)+(Y>239);if(K+z>A.length)return{s:q,r:AC(A,K-1)};if(!z)q+=String.fromCharCode(Y);else if(z==3)Y=((Y&15)<<18|(A[K++]&63)<<12|(A[K++]&63)<<6|A[K++]&63)-65536,q+=String.fromCharCode(55296|Y>>10,56320|Y&1023);else if(z&1)q+=String.fromCharCode((Y&31)<<6|A[K++]&63);else q+=String.fromCharCode((Y&15)<<12|(A[K++]&63)<<6|A[K++]&63)}},z3Y,w3Y,tH4=function(A){return A==1?3:A<6?2:A==9?1:0},eH4=function(A,q){return q+30+CT(A,q+26)+CT(A,q+28)},Aj4=function(A,q,K){var Y=CT(A,q+28),z=hy8(A.subarray(q+46,q+46+Y),!(CT(A,q+8)&2048)),w=q+46+Y,_=mJ(A,q+20),$=K&&_==4294967295?qj4(A,w):[_,mJ(A,q+24),mJ(A,q+42)],O=$[0],H=$[1],j=$[2];return[CT(A,q+10),O,H,z,w+CT(A,q+30)+CT(A,q+32),j]},qj4=function(A,q){for(;CT(A,q)!=1;q+=4+CT(A,q+2));return[jy8(A,q+12),jy8(A,q+4),jy8(A,q+20)]},A16=function(A){var q=0;if(A)for(var K in A){var Y=A[K].length;if(Y>65535)lq(9);q+=Y+4}return q},xf6=function(A,q,K,Y,z,w,_,$){var O=Y.length,H=K.extra,j=$&&$.length,J=A16(H);if(Tw(A,q,_!=null?33639248:67324752),q+=4,_!=null)A[q++]=20,A[q++]=K.os;A[q]=20,q+=2,A[q++]=K.flag<<1|(w<0&&8),A[q++]=z&&8,A[q++]=K.compression&255,A[q++]=K.compression>>8;var M=new Date(K.mtime==null?Date.now():K.mtime),D=M.getFullYear()-1980;if(D<0||D>119)lq(10);if(Tw(A,q,D<<25|M.getMonth()+1<<21|M.getDate()<<16|M.getHours()<<11|M.getMinutes()<<5|M.getSeconds()>>1),q+=4,w!=-1)Tw(A,q,K.crc),Tw(A,q+4,w<0?-w-2:w),Tw(A,q+8,K.size);if(Tw(A,q+12,O),Tw(A,q+14,J),q+=16,_!=null)Tw(A,q,j),Tw(A,q+6,K.attrs),Tw(A,q+10,_),q+=14;if(A.set(Y,q),q+=O,J)for(var X in H){var P=H[X],W=P.length;Tw(A,q,+X),Tw(A,q+2,W),A.set(P,q+4),q+=4+W}if(j)A.set($,q),q+=j;return q},Iy8=function(A,q,K,Y,z){Tw(A,q,101010256),Tw(A,q+8,K),Tw(A,q+10,K),Tw(A,q+12,Y),Tw(A,q+16,z)},id6,_3Y,$3Y,O3Y,Kj4,j3Y,J3Y,M3Y,NG1;var sd6=k(()=>{iKY=lKY("/");try{MG1=iKY("worker_threads").Worker}catch(A){}rKY=MG1?function(A,q,K,Y,z){var w=!1,_=new MG1(A+nKY,{eval:!0}).on("error",function($){return z($,null)}).on("message",function($){return z(null,$)}).on("exit",function($){if($&&!w)z(Error("exited with code "+$),null)});return _.postMessage(K,Y),_.terminate=function(){return w=!0,MG1.prototype.terminate.call(_)},_}:function(A,q,K,Y,z){setImmediate(function(){return z(Error("async operations unsupported - update to Node 12+ (or Node 10-11 with the --experimental-worker CLI flag)"),null)});var w=function(){};return{terminate:w,postMessage:w}},C5=Uint8Array,hT=Uint16Array,nd6=Int32Array,uf6=new C5([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Bf6=new C5([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),cd6=new C5([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yH4=LH4(uf6,2),Ty8=yH4.b,WG1=yH4.r;Ty8[28]=258,WG1[258]=28;RH4=LH4(Bf6,0),SH4=RH4.b,Jy8=RH4.r,ld6=new hT(32768);for(YY=0;YY<32768;++YY)pF=(YY&43690)>>1|(YY&21845)<<1,pF=(pF&52428)>>2|(pF&13107)<<2,pF=(pF&61680)>>4|(pF&3855)<<4,ld6[YY]=((pF&65280)>>8|(pF&255)<<8)>>1;Ni=new C5(288);for(YY=0;YY<144;++YY)Ni[YY]=8;for(YY=144;YY<256;++YY)Ni[YY]=9;for(YY=256;YY<280;++YY)Ni[YY]=7;for(YY=280;YY<288;++YY)Ni[YY]=8;bf6=new C5(32);for(YY=0;YY<32;++YY)bf6[YY]=5;CH4=eS(Ni,9,0),hH4=eS(Ni,9,1),IH4=eS(bf6,5,0),bH4=eS(bf6,5,1),oKY={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},xH4=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],uH4=new nd6([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),e66=new C5(0),mH4=function(){var A=new Int32Array(256);for(var q=0;q<256;++q){var K=q,Y=9;while(--Y)K=(K&1&&-306674912)^K>>>1;A[q]=K}return A}(),JG1=[];qC=function(){function A(q,K){if(typeof q=="function")K=q,q={};if(this.ondata=K,this.o=q||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new C5(98304),this.o.dictionary){var Y=this.o.dictionary.subarray(-32768);this.b.set(Y,32768-Y.length),this.s.i=32768-Y.length}}return A.prototype.p=function(q,K){this.ondata(Ez6(q,this.o,0,0,this.s),K)},A.prototype.push=function(q,K){if(!this.ondata)lq(5);if(this.s.l)lq(4);var Y=q.length+this.s.z;if(Y>this.b.length){if(Y>2*this.b.length-32768){var z=new C5(Y&-32768);z.set(this.b.subarray(0,this.s.z)),this.b=z}var w=this.b.length-this.s.z;this.b.set(q.subarray(0,w),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(q.subarray(w),32768),this.s.z=q.length-w+32768,this.s.i=32766,this.s.w=32768}else this.b.set(q,this.s.z),this.s.z+=q.length;if(this.s.l=K&1,this.s.z>this.s.w+8191||K)this.p(this.b,K||!1),this.s.w=this.s.i,this.s.i-=2},A.prototype.flush=function(){if(!this.ondata)lq(5);if(this.s.l)lq(4);this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},A}(),cH4=function(){function A(q,K){pf6([Qf6,function(){return[KC,qC]}],this,Lz6.call(this,q,K),function(Y){var z=new qC(Y.data);onmessage=KC(z)},6,1)}return A}();oN=function(){function A(q,K){if(typeof q=="function")K=q,q={};this.ondata=K;var Y=q&&q.dictionary&&q.dictionary.subarray(-32768);if(this.s={i:0,b:Y?Y.length:0},this.o=new C5(32768),this.p=new C5(0),Y)this.o.set(Y)}return A.prototype.e=function(q){if(!this.ondata)lq(5);if(this.d)lq(4);if(!this.p.length)this.p=q;else if(q.length){var K=new C5(this.p.length+q.length);K.set(this.p),K.set(q,this.p.length),this.p=K}},A.prototype.c=function(q){this.s.i=+(this.d=q||!1);var K=this.s.b,Y=rd6(this.p,this.s,this.o);this.ondata(AC(Y,K,this.s.b),this.d),this.o=AC(Y,this.s.b-32768),this.s.b=this.o.length,this.p=AC(this.p,this.s.p/8|0),this.s.p&=7},A.prototype.push=function(q,K){this.e(q),this.c(K)},A}(),Ry8=function(){function A(q,K){pf6([Ff6,function(){return[KC,oN]}],this,Lz6.call(this,q,K),function(Y){var z=new oN(Y.data);onmessage=KC(z)},7,0)}return A}();Xy8=function(){function A(q,K){this.c=gf6(),this.l=0,this.v=1,qC.call(this,q,K)}return A.prototype.push=function(q,K){this.c.p(q),this.l+=q.length,qC.prototype.push.call(this,q,K)},A.prototype.p=function(q,K){var Y=Ez6(q,this.o,this.v&&Ey8(this.o),K&&8,this.s);if(this.v)vy8(Y,this.o),this.v=0;if(K)Tw(Y,Y.length-8,this.c.d()),Tw(Y,Y.length-4,this.l);this.ondata(Y,K)},A.prototype.flush=function(){qC.prototype.flush.call(this)},A}(),sKY=function(){function A(q,K){pf6([Qf6,FH4,function(){return[KC,qC,Xy8]}],this,Lz6.call(this,q,K),function(Y){var z=new Xy8(Y.data);onmessage=KC(z)},8,1)}return A}();GG1=function(){function A(q,K){this.v=1,this.r=0,oN.call(this,q,K)}return A.prototype.push=function(q,K){if(oN.prototype.e.call(this,q),this.r+=q.length,this.v){var Y=this.p.subarray(this.v-1),z=Y.length>3?ky8(Y):4;if(z>Y.length){if(!K)return}else if(this.v>1&&this.onmember)this.onmember(this.r-Y.length);this.p=Y.subarray(z),this.v=0}if(oN.prototype.c.call(this,K),this.s.f&&!this.s.l&&!K)this.v=mf6(this.s.p)+9,this.s={i:0},this.o=new C5(0),this.push(new C5(0),K)},A}(),iH4=function(){function A(q,K){var Y=this;pf6([Ff6,QH4,function(){return[KC,oN,GG1]}],this,Lz6.call(this,q,K),function(z){var w=new GG1(z.data);w.onmember=function(_){return postMessage(_)},onmessage=KC(w)},9,0,function(z){return Y.onmember&&Y.onmember(z)})}return A}();Wy8=function(){function A(q,K){this.c=vG1(),this.v=1,qC.call(this,q,K)}return A.prototype.push=function(q,K){this.c.p(q),qC.prototype.push.call(this,q,K)},A.prototype.p=function(q,K){var Y=Ez6(q,this.o,this.v&&(this.o.dictionary?6:2),K&&4,this.s);if(this.v)Ly8(Y,this.o),this.v=0;if(K)Tw(Y,Y.length-4,this.c.d());this.ondata(Y,K)},A.prototype.flush=function(){qC.prototype.flush.call(this)},A}(),eKY=function(){function A(q,K){pf6([Qf6,UH4,function(){return[KC,qC,Wy8]}],this,Lz6.call(this,q,K),function(Y){var z=new Wy8(Y.data);onmessage=KC(z)},10,1)}return A}();TG1=function(){function A(q,K){oN.call(this,q,K),this.v=q&&q.dictionary?2:1}return A.prototype.push=function(q,K){if(oN.prototype.e.call(this,q),this.v){if(this.p.length<6&&!K)return;this.p=this.p.subarray(yy8(this.p,this.v-1)),this.v=0}if(K){if(this.p.length<4)lq(6,"invalid zlib data");this.p=this.p.subarray(0,-4)}oN.prototype.c.call(this,K)},A}(),rH4=function(){function A(q,K){pf6([Ff6,pH4,function(){return[KC,oN,TG1]}],this,Lz6.call(this,q,K),function(Y){var z=new TG1(Y.data);onmessage=KC(z)},11,0)}return A}();Gy8=function(){function A(q,K){this.o=Lz6.call(this,q,K)||{},this.G=GG1,this.I=oN,this.Z=TG1}return A.prototype.i=function(){var q=this;this.s.ondata=function(K,Y){q.ondata(K,Y)}},A.prototype.push=function(q,K){if(!this.ondata)lq(5);if(!this.s){if(this.p&&this.p.length){var Y=new C5(this.p.length+q.length);Y.set(this.p),Y.set(q,this.p.length)}else this.p=q;if(this.p.length>2)this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(this.o):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,K),this.p=null}else this.s.push(q,K)},A}(),q3Y=function(){function A(q,K){Gy8.call(this,q,K),this.queuedSize=0,this.G=iH4,this.I=Ry8,this.Z=rH4}return A.prototype.i=function(){var q=this;this.s.ondata=function(K,Y,z){q.ondata(K,Y,z)},this.s.ondrain=function(K){if(q.queuedSize-=K,q.ondrain)q.ondrain(K)}},A.prototype.push=function(q,K){this.queuedSize+=q.length,Gy8.prototype.push.call(this,q,K)},A}();EH4=typeof TextEncoder<"u"&&new TextEncoder,fy8=typeof TextDecoder<"u"&&new TextDecoder;try{fy8.decode(e66,{stream:!0}),aH4=1}catch(A){}z3Y=function(){function A(q){if(this.ondata=q,aH4)this.t=new TextDecoder;else this.p=e66}return A.prototype.push=function(q,K){if(!this.ondata)lq(5);if(K=!!K,this.t){if(this.ondata(this.t.decode(q,{stream:!0}),K),K){if(this.t.decode().length)lq(8);this.t=null}return}if(!this.p)lq(4);var Y=new C5(this.p.length+q.length);Y.set(this.p),Y.set(q,this.p.length);var z=sH4(Y),w=z.s,_=z.r;if(K){if(_.length)lq(8);this.p=null}else this.p=_;this.ondata(w,K)},A}(),w3Y=function(){function A(q){this.ondata=q}return A.prototype.push=function(q,K){if(!this.ondata)lq(5);if(this.d)lq(4);this.ondata(q16(q),this.d=K||!1)},A}();id6=function(){function A(q){this.filename=q,this.c=gf6(),this.size=0,this.compression=0}return A.prototype.process=function(q,K){this.ondata(null,q,K)},A.prototype.push=function(q,K){if(!this.ondata)lq(5);if(this.c.p(q),this.size+=q.length,K)this.crc=this.c.d();this.process(q,K||!1)},A}(),_3Y=function(){function A(q,K){var Y=this;if(!K)K={};id6.call(this,q),this.d=new qC(K,function(z,w){Y.ondata(null,z,w)}),this.compression=8,this.flag=tH4(K.level)}return A.prototype.process=function(q,K){try{this.d.push(q,K)}catch(Y){this.ondata(Y,null,K)}},A.prototype.push=function(q,K){id6.prototype.push.call(this,q,K)},A}(),$3Y=function(){function A(q,K){var Y=this;if(!K)K={};id6.call(this,q),this.d=new cH4(K,function(z,w,_){Y.ondata(z,w,_)}),this.compression=8,this.flag=tH4(K.level),this.terminate=this.d.terminate}return A.prototype.process=function(q,K){this.d.push(q,K)},A.prototype.push=function(q,K){id6.prototype.push.call(this,q,K)},A}(),O3Y=function(){function A(q){this.ondata=q,this.u=[],this.d=1}return A.prototype.add=function(q){var K=this;if(!this.ondata)lq(5);if(this.d&2)this.ondata(lq(4+(this.d&1)*8,0,1),null,!1);else{var Y=q16(q.filename),z=Y.length,w=q.comment,_=w&&q16(w),$=z!=q.filename.length||_&&w.length!=_.length,O=z+A16(q.extra)+30;if(z>65535)this.ondata(lq(11,0,1),null,!1);var H=new C5(O);xf6(H,0,q,Y,$,-1);var j=[H],J=function(){for(var W=0,Z=j;W0){var z=Math.min(this.c,q.length),w=q.subarray(0,z);if(this.c-=z,this.d)this.d.push(w,!this.c);else this.k[0].push(w);if(q=q.subarray(z),q.length)return this.push(q,K)}else{var _=0,$=0,O=void 0,H=void 0;if(!this.p.length)H=q;else if(!q.length)H=this.p;else H=new C5(this.p.length+q.length),H.set(this.p),H.set(q,this.p.length);var j=H.length,J=this.c,M=J&&this.d,D=function(){var Z,G=mJ(H,$);if(G==67324752){_=1,O=$,X.d=null,X.c=0;var f=CT(H,$+6),V=CT(H,$+8),N=f&2048,v=f&8,y=CT(H,$+26),R=CT(H,$+28);if(j>$+30+y+R){var h=[];X.k.unshift(h),_=2;var B=mJ(H,$+18),x=mJ(H,$+22),F=hy8(H.subarray($+30,$+=30+y),!N);if(B==4294967295)Z=v?[-2]:qj4(H,$),B=Z[0],x=Z[1];else if(v)B=-1;$+=R,X.c=B;var g,b={name:F,compression:V,start:function(){if(!b.ondata)lq(5);if(!B)b.ondata(null,e66,!0);else{var U=Y.o[V];if(!U)b.ondata(lq(14,"unknown compression type "+V,1),null,!1);g=B<0?new U(F):new U(F,B,x),g.ondata=function(s,H6,Z6){b.ondata(s,H6,Z6)};for(var d=0,l=h;d=0)b.size=B,b.originalSize=x;X.onfile(b)}return"break"}else if(J){if(G==134695760)return O=$+=12+(J==-2&&8),_=3,X.c=0,"break";else if(G==33639248)return O=$-=4,_=3,X.c=0,"break"}},X=this;for(;$Y.trim()).filter((Y)=>Y.length>0&&!Y.startsWith("#"))}catch(K){return console.warn(`Warning: Could not read .mcpbignore file: ${K instanceof Error?K.message:"Unknown error"}`),[]}}function Fy8(A){return wj4.default().add(Oj4).add(A)}function P3Y(A,q=[]){return Fy8(q).ignores(A)}function Hj4(A,q=A,K={},Y=[]){let z=Yj4(A),w=Fy8(Y);for(let _ of z){let $=my8(A,_),O=_j4(q,$);if(w.ignores(O))continue;if(zj4($).isDirectory())Hj4($,q,K,Y);else{let j=O.split($j4).join("/");K[j]=By8($)}}return K}function kG1(A,q=A,K={},Y=[],z=0){let w=Yj4(A),_=Fy8(Y);for(let $ of w){let O=my8(A,$),H=_j4(q,O);if(_.ignores(H)){z++;continue}let j=zj4(O);if(j.isDirectory())z=kG1(O,q,K,Y,z).ignoredCount;else{let J=H.split($j4).join("/");K[J]={data:By8(O),mode:j.mode}}}return{files:K,ignoredCount:z}}var wj4,Oj4;var Qy8=k(()=>{wj4=e(GY6(),1),Oj4=[".DS_Store","Thumbs.db",".gitignore",".git",".mcpbignore","*.log",".env*",".npm",".npmrc",".yarnrc",".yarn",".eslintrc",".editorconfig",".prettierrc",".prettierignore",".eslintignore",".nycrc",".babelrc",".pnp.*","node_modules/.cache","node_modules/.bin","*.map",".env.local",".env.*.local","npm-debug.log*","yarn-debug.log*","yarn-error.log*","package-lock.json","yarn.lock","*.mcpb","*.d.ts","*.tsbuildinfo","tsconfig.json"]});var T$=C((W3Y)=>{W3Y.fromCallback=function(A){return Object.defineProperty(function(...q){if(typeof q[q.length-1]==="function")A.apply(this,q);else return new Promise((K,Y)=>{q.push((z,w)=>z!=null?Y(z):K(w)),A.apply(this,q)})},"name",{value:A.name})};W3Y.fromPromise=function(A){return Object.defineProperty(function(...q){let K=q[q.length-1];if(typeof K!=="function")return A.apply(this,q);else q.pop(),A.apply(this,q).then((Y)=>K(null,Y),K)},"name",{value:A.name})}});var yz6=C((Uy8)=>{var jj4=T$().fromCallback,aN=gw(),f3Y=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((A)=>{return typeof aN[A]==="function"});Object.assign(Uy8,aN);f3Y.forEach((A)=>{Uy8[A]=jj4(aN[A])});Uy8.exists=function(A,q){if(typeof q==="function")return aN.exists(A,q);return new Promise((K)=>{return aN.exists(A,K)})};Uy8.read=function(A,q,K,Y,z,w){if(typeof w==="function")return aN.read(A,q,K,Y,z,w);return new Promise((_,$)=>{aN.read(A,q,K,Y,z,(O,H,j)=>{if(O)return $(O);_({bytesRead:H,buffer:j})})})};Uy8.write=function(A,q,...K){if(typeof K[K.length-1]==="function")return aN.write(A,q,...K);return new Promise((Y,z)=>{aN.write(A,q,...K,(w,_,$)=>{if(w)return z(w);Y({bytesWritten:_,buffer:$})})})};if(typeof aN.writev==="function")Uy8.writev=function(A,q,...K){if(typeof K[K.length-1]==="function")return aN.writev(A,q,...K);return new Promise((Y,z)=>{aN.writev(A,q,...K,(w,_,$)=>{if(w)return z(w);Y({bytesWritten:_,buffers:$})})})};if(typeof aN.realpath.native==="function")Uy8.realpath.native=jj4(aN.realpath.native);else process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var Mj4=C((k3Y,Jj4)=>{var v3Y=g6("path");k3Y.checkPath=function(q){if(process.platform==="win32"){if(/[<>:"|?*]/.test(q.replace(v3Y.parse(q).root,""))){let Y=Error(`Path contains invalid characters: ${q}`);throw Y.code="EINVAL",Y}}}});var Wj4=C((L3Y,py8)=>{var Dj4=yz6(),{checkPath:Xj4}=Mj4(),Pj4=(A)=>{let q={mode:511};if(typeof A==="number")return A;return{...q,...A}.mode};L3Y.makeDir=async(A,q)=>{return Xj4(A),Dj4.mkdir(A,{mode:Pj4(q),recursive:!0})};L3Y.makeDirSync=(A,q)=>{return Xj4(A),Dj4.mkdirSync(A,{mode:Pj4(q),recursive:!0})}});var vx=C((aW_,Zj4)=>{var S3Y=T$().fromPromise,{makeDir:C3Y,makeDirSync:dy8}=Wj4(),cy8=S3Y(C3Y);Zj4.exports={mkdirs:cy8,mkdirsSync:dy8,mkdirp:cy8,mkdirpSync:dy8,ensureDir:cy8,ensureDirSync:dy8}});var Y16=C((sW_,fj4)=>{var h3Y=T$().fromPromise,Gj4=yz6();function I3Y(A){return Gj4.access(A).then(()=>!0).catch(()=>!1)}fj4.exports={pathExists:h3Y(I3Y),pathExistsSync:Gj4.existsSync}});var ly8=C((tW_,Tj4)=>{var cf6=gw();function b3Y(A,q,K,Y){cf6.open(A,"r+",(z,w)=>{if(z)return Y(z);cf6.futimes(w,q,K,(_)=>{cf6.close(w,($)=>{if(Y)Y(_||$)})})})}function x3Y(A,q,K){let Y=cf6.openSync(A,"r+");return cf6.futimesSync(Y,q,K),cf6.closeSync(Y)}Tj4.exports={utimesMillis:b3Y,utimesMillisSync:x3Y}});var Rz6=C((eW_,vj4)=>{var lf6=yz6(),fP=g6("path"),u3Y=g6("util");function B3Y(A,q,K){let Y=K.dereference?(z)=>lf6.stat(z,{bigint:!0}):(z)=>lf6.lstat(z,{bigint:!0});return Promise.all([Y(A),Y(q).catch((z)=>{if(z.code==="ENOENT")return null;throw z})]).then(([z,w])=>({srcStat:z,destStat:w}))}function m3Y(A,q,K){let Y,z=K.dereference?(_)=>lf6.statSync(_,{bigint:!0}):(_)=>lf6.lstatSync(_,{bigint:!0}),w=z(A);try{Y=z(q)}catch(_){if(_.code==="ENOENT")return{srcStat:w,destStat:null};throw _}return{srcStat:w,destStat:Y}}function g3Y(A,q,K,Y,z){u3Y.callbackify(B3Y)(A,q,Y,(w,_)=>{if(w)return z(w);let{srcStat:$,destStat:O}=_;if(O){if(td6($,O)){let H=fP.basename(A),j=fP.basename(q);if(K==="move"&&H!==j&&H.toLowerCase()===j.toLowerCase())return z(null,{srcStat:$,destStat:O,isChangingCase:!0});return z(Error("Source and destination must not be the same."))}if($.isDirectory()&&!O.isDirectory())return z(Error(`Cannot overwrite non-directory '${q}' with directory '${A}'.`));if(!$.isDirectory()&&O.isDirectory())return z(Error(`Cannot overwrite directory '${q}' with non-directory '${A}'.`))}if($.isDirectory()&&iy8(A,q))return z(Error(EG1(A,q,K)));return z(null,{srcStat:$,destStat:O})})}function F3Y(A,q,K,Y){let{srcStat:z,destStat:w}=m3Y(A,q,Y);if(w){if(td6(z,w)){let _=fP.basename(A),$=fP.basename(q);if(K==="move"&&_!==$&&_.toLowerCase()===$.toLowerCase())return{srcStat:z,destStat:w,isChangingCase:!0};throw Error("Source and destination must not be the same.")}if(z.isDirectory()&&!w.isDirectory())throw Error(`Cannot overwrite non-directory '${q}' with directory '${A}'.`);if(!z.isDirectory()&&w.isDirectory())throw Error(`Cannot overwrite directory '${q}' with non-directory '${A}'.`)}if(z.isDirectory()&&iy8(A,q))throw Error(EG1(A,q,K));return{srcStat:z,destStat:w}}function Vj4(A,q,K,Y,z){let w=fP.resolve(fP.dirname(A)),_=fP.resolve(fP.dirname(K));if(_===w||_===fP.parse(_).root)return z();lf6.stat(_,{bigint:!0},($,O)=>{if($){if($.code==="ENOENT")return z();return z($)}if(td6(q,O))return z(Error(EG1(A,K,Y)));return Vj4(A,q,_,Y,z)})}function Nj4(A,q,K,Y){let z=fP.resolve(fP.dirname(A)),w=fP.resolve(fP.dirname(K));if(w===z||w===fP.parse(w).root)return;let _;try{_=lf6.statSync(w,{bigint:!0})}catch($){if($.code==="ENOENT")return;throw $}if(td6(q,_))throw Error(EG1(A,K,Y));return Nj4(A,q,w,Y)}function td6(A,q){return q.ino&&q.dev&&q.ino===A.ino&&q.dev===A.dev}function iy8(A,q){let K=fP.resolve(A).split(fP.sep).filter((z)=>z),Y=fP.resolve(q).split(fP.sep).filter((z)=>z);return K.reduce((z,w,_)=>z&&Y[_]===w,!0)}function EG1(A,q,K){return`Cannot ${K} '${A}' to a subdirectory of itself, '${q}'.`}vj4.exports={checkPaths:g3Y,checkPathsSync:F3Y,checkParentPaths:Vj4,checkParentPathsSync:Nj4,isSrcSubdir:iy8,areIdentical:td6}});var hj4=C((AZ_,Cj4)=>{var sN=gw(),ed6=g6("path"),Q3Y=vx().mkdirs,U3Y=Y16().pathExists,p3Y=ly8().utimesMillis,Ac6=Rz6();function d3Y(A,q,K,Y){if(typeof K==="function"&&!Y)Y=K,K={};else if(typeof K==="function")K={filter:K};if(Y=Y||function(){},K=K||{},K.clobber="clobber"in K?!!K.clobber:!0,K.overwrite="overwrite"in K?!!K.overwrite:K.clobber,K.preserveTimestamps&&process.arch==="ia32")process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended; see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");Ac6.checkPaths(A,q,"copy",K,(z,w)=>{if(z)return Y(z);let{srcStat:_,destStat:$}=w;Ac6.checkParentPaths(A,_,q,"copy",(O)=>{if(O)return Y(O);if(K.filter)return Lj4(kj4,$,A,q,K,Y);return kj4($,A,q,K,Y)})})}function kj4(A,q,K,Y,z){let w=ed6.dirname(K);U3Y(w,(_,$)=>{if(_)return z(_);if($)return LG1(A,q,K,Y,z);Q3Y(w,(O)=>{if(O)return z(O);return LG1(A,q,K,Y,z)})})}function Lj4(A,q,K,Y,z,w){Promise.resolve(z.filter(K,Y)).then((_)=>{if(_)return A(q,K,Y,z,w);return w()},(_)=>w(_))}function c3Y(A,q,K,Y,z){if(Y.filter)return Lj4(LG1,A,q,K,Y,z);return LG1(A,q,K,Y,z)}function LG1(A,q,K,Y,z){(Y.dereference?sN.stat:sN.lstat)(q,(_,$)=>{if(_)return z(_);if($.isDirectory())return s3Y($,A,q,K,Y,z);else if($.isFile()||$.isCharacterDevice()||$.isBlockDevice())return l3Y($,A,q,K,Y,z);else if($.isSymbolicLink())return A5Y(A,q,K,Y,z);else if($.isSocket())return z(Error(`Cannot copy a socket file: ${q}`));else if($.isFIFO())return z(Error(`Cannot copy a FIFO pipe: ${q}`));return z(Error(`Unknown file: ${q}`))})}function l3Y(A,q,K,Y,z,w){if(!q)return yj4(A,K,Y,z,w);return i3Y(A,K,Y,z,w)}function i3Y(A,q,K,Y,z){if(Y.overwrite)sN.unlink(K,(w)=>{if(w)return z(w);return yj4(A,q,K,Y,z)});else if(Y.errorOnExist)return z(Error(`'${K}' already exists`));else return z()}function yj4(A,q,K,Y,z){sN.copyFile(q,K,(w)=>{if(w)return z(w);if(Y.preserveTimestamps)return n3Y(A.mode,q,K,z);return yG1(K,A.mode,z)})}function n3Y(A,q,K,Y){if(r3Y(A))return o3Y(K,A,(z)=>{if(z)return Y(z);return Ej4(A,q,K,Y)});return Ej4(A,q,K,Y)}function r3Y(A){return(A&128)===0}function o3Y(A,q,K){return yG1(A,q|128,K)}function Ej4(A,q,K,Y){a3Y(q,K,(z)=>{if(z)return Y(z);return yG1(K,A,Y)})}function yG1(A,q,K){return sN.chmod(A,q,K)}function a3Y(A,q,K){sN.stat(A,(Y,z)=>{if(Y)return K(Y);return p3Y(q,z.atime,z.mtime,K)})}function s3Y(A,q,K,Y,z,w){if(!q)return t3Y(A.mode,K,Y,z,w);return Rj4(K,Y,z,w)}function t3Y(A,q,K,Y,z){sN.mkdir(K,(w)=>{if(w)return z(w);Rj4(q,K,Y,(_)=>{if(_)return z(_);return yG1(K,A,z)})})}function Rj4(A,q,K,Y){sN.readdir(A,(z,w)=>{if(z)return Y(z);return Sj4(w,A,q,K,Y)})}function Sj4(A,q,K,Y,z){let w=A.pop();if(!w)return z();return e3Y(A,w,q,K,Y,z)}function e3Y(A,q,K,Y,z,w){let _=ed6.join(K,q),$=ed6.join(Y,q);Ac6.checkPaths(_,$,"copy",z,(O,H)=>{if(O)return w(O);let{destStat:j}=H;c3Y(j,_,$,z,(J)=>{if(J)return w(J);return Sj4(A,K,Y,z,w)})})}function A5Y(A,q,K,Y,z){sN.readlink(q,(w,_)=>{if(w)return z(w);if(Y.dereference)_=ed6.resolve(process.cwd(),_);if(!A)return sN.symlink(_,K,z);else sN.readlink(K,($,O)=>{if($){if($.code==="EINVAL"||$.code==="UNKNOWN")return sN.symlink(_,K,z);return z($)}if(Y.dereference)O=ed6.resolve(process.cwd(),O);if(Ac6.isSrcSubdir(_,O))return z(Error(`Cannot copy '${_}' to a subdirectory of itself, '${O}'.`));if(A.isDirectory()&&Ac6.isSrcSubdir(O,_))return z(Error(`Cannot overwrite '${O}' with '${_}'.`));return q5Y(_,K,z)})})}function q5Y(A,q,K){sN.unlink(q,(Y)=>{if(Y)return K(Y);return sN.symlink(A,q,K)})}Cj4.exports=d3Y});var Bj4=C((qZ_,uj4)=>{var VG=gw(),qc6=g6("path"),K5Y=vx().mkdirsSync,Y5Y=ly8().utimesMillisSync,Kc6=Rz6();function z5Y(A,q,K){if(typeof K==="function")K={filter:K};if(K=K||{},K.clobber="clobber"in K?!!K.clobber:!0,K.overwrite="overwrite"in K?!!K.overwrite:K.clobber,K.preserveTimestamps&&process.arch==="ia32")process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended; see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:Y,destStat:z}=Kc6.checkPathsSync(A,q,"copy",K);return Kc6.checkParentPathsSync(A,Y,q,"copy"),w5Y(z,A,q,K)}function w5Y(A,q,K,Y){if(Y.filter&&!Y.filter(q,K))return;let z=qc6.dirname(K);if(!VG.existsSync(z))K5Y(z);return Ij4(A,q,K,Y)}function _5Y(A,q,K,Y){if(Y.filter&&!Y.filter(q,K))return;return Ij4(A,q,K,Y)}function Ij4(A,q,K,Y){let w=(Y.dereference?VG.statSync:VG.lstatSync)(q);if(w.isDirectory())return D5Y(w,A,q,K,Y);else if(w.isFile()||w.isCharacterDevice()||w.isBlockDevice())return $5Y(w,A,q,K,Y);else if(w.isSymbolicLink())return W5Y(A,q,K,Y);else if(w.isSocket())throw Error(`Cannot copy a socket file: ${q}`);else if(w.isFIFO())throw Error(`Cannot copy a FIFO pipe: ${q}`);throw Error(`Unknown file: ${q}`)}function $5Y(A,q,K,Y,z){if(!q)return bj4(A,K,Y,z);return O5Y(A,K,Y,z)}function O5Y(A,q,K,Y){if(Y.overwrite)return VG.unlinkSync(K),bj4(A,q,K,Y);else if(Y.errorOnExist)throw Error(`'${K}' already exists`)}function bj4(A,q,K,Y){if(VG.copyFileSync(q,K),Y.preserveTimestamps)H5Y(A.mode,q,K);return ny8(K,A.mode)}function H5Y(A,q,K){if(j5Y(A))J5Y(K,A);return M5Y(q,K)}function j5Y(A){return(A&128)===0}function J5Y(A,q){return ny8(A,q|128)}function ny8(A,q){return VG.chmodSync(A,q)}function M5Y(A,q){let K=VG.statSync(A);return Y5Y(q,K.atime,K.mtime)}function D5Y(A,q,K,Y,z){if(!q)return X5Y(A.mode,K,Y,z);return xj4(K,Y,z)}function X5Y(A,q,K,Y){return VG.mkdirSync(K),xj4(q,K,Y),ny8(K,A)}function xj4(A,q,K){VG.readdirSync(A).forEach((Y)=>P5Y(Y,A,q,K))}function P5Y(A,q,K,Y){let z=qc6.join(q,A),w=qc6.join(K,A),{destStat:_}=Kc6.checkPathsSync(z,w,"copy",Y);return _5Y(_,z,w,Y)}function W5Y(A,q,K,Y){let z=VG.readlinkSync(q);if(Y.dereference)z=qc6.resolve(process.cwd(),z);if(!A)return VG.symlinkSync(z,K);else{let w;try{w=VG.readlinkSync(K)}catch(_){if(_.code==="EINVAL"||_.code==="UNKNOWN")return VG.symlinkSync(z,K);throw _}if(Y.dereference)w=qc6.resolve(process.cwd(),w);if(Kc6.isSrcSubdir(z,w))throw Error(`Cannot copy '${z}' to a subdirectory of itself, '${w}'.`);if(VG.statSync(K).isDirectory()&&Kc6.isSrcSubdir(w,z))throw Error(`Cannot overwrite '${w}' with '${z}'.`);return Z5Y(z,K)}}function Z5Y(A,q){return VG.unlinkSync(q),VG.symlinkSync(A,q)}uj4.exports=z5Y});var RG1=C((KZ_,mj4)=>{var G5Y=T$().fromCallback;mj4.exports={copy:G5Y(hj4()),copySync:Bj4()}});var ij4=C((YZ_,lj4)=>{var gj4=gw(),pj4=g6("path"),C_=g6("assert"),Yc6=process.platform==="win32";function dj4(A){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((K)=>{A[K]=A[K]||gj4[K],K=K+"Sync",A[K]=A[K]||gj4[K]}),A.maxBusyTries=A.maxBusyTries||3}function ry8(A,q,K){let Y=0;if(typeof q==="function")K=q,q={};C_(A,"rimraf: missing path"),C_.strictEqual(typeof A,"string","rimraf: path should be a string"),C_.strictEqual(typeof K,"function","rimraf: callback function required"),C_(q,"rimraf: invalid options argument provided"),C_.strictEqual(typeof q,"object","rimraf: options should be object"),dj4(q),Fj4(A,q,function z(w){if(w){if((w.code==="EBUSY"||w.code==="ENOTEMPTY"||w.code==="EPERM")&&YFj4(A,q,z),_)}if(w.code==="ENOENT")w=null}K(w)})}function Fj4(A,q,K){C_(A),C_(q),C_(typeof K==="function"),q.lstat(A,(Y,z)=>{if(Y&&Y.code==="ENOENT")return K(null);if(Y&&Y.code==="EPERM"&&Yc6)return Qj4(A,q,Y,K);if(z&&z.isDirectory())return SG1(A,q,Y,K);q.unlink(A,(w)=>{if(w){if(w.code==="ENOENT")return K(null);if(w.code==="EPERM")return Yc6?Qj4(A,q,w,K):SG1(A,q,w,K);if(w.code==="EISDIR")return SG1(A,q,w,K)}return K(w)})})}function Qj4(A,q,K,Y){C_(A),C_(q),C_(typeof Y==="function"),q.chmod(A,438,(z)=>{if(z)Y(z.code==="ENOENT"?null:K);else q.stat(A,(w,_)=>{if(w)Y(w.code==="ENOENT"?null:K);else if(_.isDirectory())SG1(A,q,K,Y);else q.unlink(A,Y)})})}function Uj4(A,q,K){let Y;C_(A),C_(q);try{q.chmodSync(A,438)}catch(z){if(z.code==="ENOENT")return;else throw K}try{Y=q.statSync(A)}catch(z){if(z.code==="ENOENT")return;else throw K}if(Y.isDirectory())CG1(A,q,K);else q.unlinkSync(A)}function SG1(A,q,K,Y){C_(A),C_(q),C_(typeof Y==="function"),q.rmdir(A,(z)=>{if(z&&(z.code==="ENOTEMPTY"||z.code==="EEXIST"||z.code==="EPERM"))f5Y(A,q,Y);else if(z&&z.code==="ENOTDIR")Y(K);else Y(z)})}function f5Y(A,q,K){C_(A),C_(q),C_(typeof K==="function"),q.readdir(A,(Y,z)=>{if(Y)return K(Y);let w=z.length,_;if(w===0)return q.rmdir(A,K);z.forEach(($)=>{ry8(pj4.join(A,$),q,(O)=>{if(_)return;if(O)return K(_=O);if(--w===0)q.rmdir(A,K)})})})}function cj4(A,q){let K;q=q||{},dj4(q),C_(A,"rimraf: missing path"),C_.strictEqual(typeof A,"string","rimraf: path should be a string"),C_(q,"rimraf: missing options"),C_.strictEqual(typeof q,"object","rimraf: options should be object");try{K=q.lstatSync(A)}catch(Y){if(Y.code==="ENOENT")return;if(Y.code==="EPERM"&&Yc6)Uj4(A,q,Y)}try{if(K&&K.isDirectory())CG1(A,q,null);else q.unlinkSync(A)}catch(Y){if(Y.code==="ENOENT")return;else if(Y.code==="EPERM")return Yc6?Uj4(A,q,Y):CG1(A,q,Y);else if(Y.code!=="EISDIR")throw Y;CG1(A,q,Y)}}function CG1(A,q,K){C_(A),C_(q);try{q.rmdirSync(A)}catch(Y){if(Y.code==="ENOTDIR")throw K;else if(Y.code==="ENOTEMPTY"||Y.code==="EEXIST"||Y.code==="EPERM")T5Y(A,q);else if(Y.code!=="ENOENT")throw Y}}function T5Y(A,q){if(C_(A),C_(q),q.readdirSync(A).forEach((K)=>cj4(pj4.join(A,K),q)),Yc6){let K=Date.now();do try{return q.rmdirSync(A,q)}catch{}while(Date.now()-K<500)}else return q.rmdirSync(A,q)}lj4.exports=ry8;ry8.sync=cj4});var zc6=C((zZ_,rj4)=>{var hG1=gw(),V5Y=T$().fromCallback,nj4=ij4();function N5Y(A,q){if(hG1.rm)return hG1.rm(A,{recursive:!0,force:!0},q);nj4(A,q)}function v5Y(A){if(hG1.rmSync)return hG1.rmSync(A,{recursive:!0,force:!0});nj4.sync(A)}rj4.exports={remove:V5Y(N5Y),removeSync:v5Y}});var KJ4=C((wZ_,qJ4)=>{var k5Y=T$().fromPromise,sj4=yz6(),tj4=g6("path"),ej4=vx(),AJ4=zc6(),oj4=k5Y(async function(q){let K;try{K=await sj4.readdir(q)}catch{return ej4.mkdirs(q)}return Promise.all(K.map((Y)=>AJ4.remove(tj4.join(q,Y))))});function aj4(A){let q;try{q=sj4.readdirSync(A)}catch{return ej4.mkdirsSync(A)}q.forEach((K)=>{K=tj4.join(A,K),AJ4.removeSync(K)})}qJ4.exports={emptyDirSync:aj4,emptydirSync:aj4,emptyDir:oj4,emptydir:oj4}});var _J4=C((_Z_,wJ4)=>{var E5Y=T$().fromCallback,YJ4=g6("path"),z16=gw(),zJ4=vx();function L5Y(A,q){function K(){z16.writeFile(A,"",(Y)=>{if(Y)return q(Y);q()})}z16.stat(A,(Y,z)=>{if(!Y&&z.isFile())return q();let w=YJ4.dirname(A);z16.stat(w,(_,$)=>{if(_){if(_.code==="ENOENT")return zJ4.mkdirs(w,(O)=>{if(O)return q(O);K()});return q(_)}if($.isDirectory())K();else z16.readdir(w,(O)=>{if(O)return q(O)})})})}function y5Y(A){let q;try{q=z16.statSync(A)}catch{}if(q&&q.isFile())return;let K=YJ4.dirname(A);try{if(!z16.statSync(K).isDirectory())z16.readdirSync(K)}catch(Y){if(Y&&Y.code==="ENOENT")zJ4.mkdirsSync(K);else throw Y}z16.writeFileSync(A,"")}wJ4.exports={createFile:E5Y(L5Y),createFileSync:y5Y}});var JJ4=C(($Z_,jJ4)=>{var R5Y=T$().fromCallback,$J4=g6("path"),w16=gw(),OJ4=vx(),S5Y=Y16().pathExists,{areIdentical:HJ4}=Rz6();function C5Y(A,q,K){function Y(z,w){w16.link(z,w,(_)=>{if(_)return K(_);K(null)})}w16.lstat(q,(z,w)=>{w16.lstat(A,(_,$)=>{if(_)return _.message=_.message.replace("lstat","ensureLink"),K(_);if(w&&HJ4($,w))return K(null);let O=$J4.dirname(q);S5Y(O,(H,j)=>{if(H)return K(H);if(j)return Y(A,q);OJ4.mkdirs(O,(J)=>{if(J)return K(J);Y(A,q)})})})})}function h5Y(A,q){let K;try{K=w16.lstatSync(q)}catch{}try{let w=w16.lstatSync(A);if(K&&HJ4(w,K))return}catch(w){throw w.message=w.message.replace("lstat","ensureLink"),w}let Y=$J4.dirname(q);if(w16.existsSync(Y))return w16.linkSync(A,q);return OJ4.mkdirsSync(Y),w16.linkSync(A,q)}jJ4.exports={createLink:R5Y(C5Y),createLinkSync:h5Y}});var DJ4=C((OZ_,MJ4)=>{var _16=g6("path"),wc6=gw(),I5Y=Y16().pathExists;function b5Y(A,q,K){if(_16.isAbsolute(A))return wc6.lstat(A,(Y)=>{if(Y)return Y.message=Y.message.replace("lstat","ensureSymlink"),K(Y);return K(null,{toCwd:A,toDst:A})});else{let Y=_16.dirname(q),z=_16.join(Y,A);return I5Y(z,(w,_)=>{if(w)return K(w);if(_)return K(null,{toCwd:z,toDst:A});else return wc6.lstat(A,($)=>{if($)return $.message=$.message.replace("lstat","ensureSymlink"),K($);return K(null,{toCwd:A,toDst:_16.relative(Y,A)})})})}}function x5Y(A,q){let K;if(_16.isAbsolute(A)){if(K=wc6.existsSync(A),!K)throw Error("absolute srcpath does not exist");return{toCwd:A,toDst:A}}else{let Y=_16.dirname(q),z=_16.join(Y,A);if(K=wc6.existsSync(z),K)return{toCwd:z,toDst:A};else{if(K=wc6.existsSync(A),!K)throw Error("relative srcpath does not exist");return{toCwd:A,toDst:_16.relative(Y,A)}}}}MJ4.exports={symlinkPaths:b5Y,symlinkPathsSync:x5Y}});var WJ4=C((HZ_,PJ4)=>{var XJ4=gw();function u5Y(A,q,K){if(K=typeof q==="function"?q:K,q=typeof q==="function"?!1:q,q)return K(null,q);XJ4.lstat(A,(Y,z)=>{if(Y)return K(null,"file");q=z&&z.isDirectory()?"dir":"file",K(null,q)})}function B5Y(A,q){let K;if(q)return q;try{K=XJ4.lstatSync(A)}catch{return"file"}return K&&K.isDirectory()?"dir":"file"}PJ4.exports={symlinkType:u5Y,symlinkTypeSync:B5Y}});var kJ4=C((jZ_,vJ4)=>{var m5Y=T$().fromCallback,GJ4=g6("path"),kx=yz6(),fJ4=vx(),g5Y=fJ4.mkdirs,F5Y=fJ4.mkdirsSync,TJ4=DJ4(),Q5Y=TJ4.symlinkPaths,U5Y=TJ4.symlinkPathsSync,VJ4=WJ4(),p5Y=VJ4.symlinkType,d5Y=VJ4.symlinkTypeSync,c5Y=Y16().pathExists,{areIdentical:NJ4}=Rz6();function l5Y(A,q,K,Y){Y=typeof K==="function"?K:Y,K=typeof K==="function"?!1:K,kx.lstat(q,(z,w)=>{if(!z&&w.isSymbolicLink())Promise.all([kx.stat(A),kx.stat(q)]).then(([_,$])=>{if(NJ4(_,$))return Y(null);ZJ4(A,q,K,Y)});else ZJ4(A,q,K,Y)})}function ZJ4(A,q,K,Y){Q5Y(A,q,(z,w)=>{if(z)return Y(z);A=w.toDst,p5Y(w.toCwd,K,(_,$)=>{if(_)return Y(_);let O=GJ4.dirname(q);c5Y(O,(H,j)=>{if(H)return Y(H);if(j)return kx.symlink(A,q,$,Y);g5Y(O,(J)=>{if(J)return Y(J);kx.symlink(A,q,$,Y)})})})})}function i5Y(A,q,K){let Y;try{Y=kx.lstatSync(q)}catch{}if(Y&&Y.isSymbolicLink()){let $=kx.statSync(A),O=kx.statSync(q);if(NJ4($,O))return}let z=U5Y(A,q);A=z.toDst,K=d5Y(z.toCwd,K);let w=GJ4.dirname(q);if(kx.existsSync(w))return kx.symlinkSync(A,q,K);return F5Y(w),kx.symlinkSync(A,q,K)}vJ4.exports={createSymlink:m5Y(l5Y),createSymlinkSync:i5Y}});var IJ4=C((JZ_,hJ4)=>{var{createFile:EJ4,createFileSync:LJ4}=_J4(),{createLink:yJ4,createLinkSync:RJ4}=JJ4(),{createSymlink:SJ4,createSymlinkSync:CJ4}=kJ4();hJ4.exports={createFile:EJ4,createFileSync:LJ4,ensureFile:EJ4,ensureFileSync:LJ4,createLink:yJ4,createLinkSync:RJ4,ensureLink:yJ4,ensureLinkSync:RJ4,createSymlink:SJ4,createSymlinkSync:CJ4,ensureSymlink:SJ4,ensureSymlinkSync:CJ4}});var if6=C((MZ_,bJ4)=>{function n5Y(A,{EOL:q=` `,finalEOL:K=!0,replacer:Y=null,spaces:z}={}){let w=K?q:"";return JSON.stringify(A,Y,z).replace(/\n/g,q)+w}function r5Y(A){if(Buffer.isBuffer(A))A=A.toString("utf8");return A.replace(/^\uFEFF/,"")}bJ4.exports={stringify:n5Y,stripBom:r5Y}});var oy8=C((DZ_,BJ4)=>{var nf6;try{nf6=gw()}catch(A){nf6=g6("fs")}var IG1=T$(),{stringify:xJ4,stripBom:uJ4}=if6();async function o5Y(A,q={}){if(typeof q==="string")q={encoding:q};let K=q.fs||nf6,Y="throws"in q?q.throws:!0,z=await IG1.fromCallback(K.readFile)(A,q);z=uJ4(z);let w;try{w=JSON.parse(z,q?q.reviver:null)}catch(_){if(Y)throw _.message=`${A}: ${_.message}`,_;else return null}return w}var a5Y=IG1.fromPromise(o5Y);function s5Y(A,q={}){if(typeof q==="string")q={encoding:q};let K=q.fs||nf6,Y="throws"in q?q.throws:!0;try{let z=K.readFileSync(A,q);return z=uJ4(z),JSON.parse(z,q.reviver)}catch(z){if(Y)throw z.message=`${A}: ${z.message}`,z;else return null}}async function t5Y(A,q,K={}){let Y=K.fs||nf6,z=xJ4(q,K);await IG1.fromCallback(Y.writeFile)(A,z,K)}var e5Y=IG1.fromPromise(t5Y);function A9Y(A,q,K={}){let Y=K.fs||nf6,z=xJ4(q,K);return Y.writeFileSync(A,z,K)}var q9Y={readFile:a5Y,readFileSync:s5Y,writeFile:e5Y,writeFileSync:A9Y};BJ4.exports=q9Y});var gJ4=C((XZ_,mJ4)=>{var bG1=oy8();mJ4.exports={readJson:bG1.readFile,readJsonSync:bG1.readFileSync,writeJson:bG1.writeFile,writeJsonSync:bG1.writeFileSync}});var xG1=C((PZ_,UJ4)=>{var K9Y=T$().fromCallback,_c6=gw(),FJ4=g6("path"),QJ4=vx(),Y9Y=Y16().pathExists;function z9Y(A,q,K,Y){if(typeof K==="function")Y=K,K="utf8";let z=FJ4.dirname(A);Y9Y(z,(w,_)=>{if(w)return Y(w);if(_)return _c6.writeFile(A,q,K,Y);QJ4.mkdirs(z,($)=>{if($)return Y($);_c6.writeFile(A,q,K,Y)})})}function w9Y(A,...q){let K=FJ4.dirname(A);if(_c6.existsSync(K))return _c6.writeFileSync(A,...q);QJ4.mkdirsSync(K),_c6.writeFileSync(A,...q)}UJ4.exports={outputFile:K9Y(z9Y),outputFileSync:w9Y}});var dJ4=C((WZ_,pJ4)=>{var{stringify:_9Y}=if6(),{outputFile:$9Y}=xG1();async function O9Y(A,q,K={}){let Y=_9Y(q,K);await $9Y(A,Y,K)}pJ4.exports=O9Y});var lJ4=C((ZZ_,cJ4)=>{var{stringify:H9Y}=if6(),{outputFileSync:j9Y}=xG1();function J9Y(A,q,K){let Y=H9Y(q,K);j9Y(A,Y,K)}cJ4.exports=J9Y});var nJ4=C((GZ_,iJ4)=>{var M9Y=T$().fromPromise,IT=gJ4();IT.outputJson=M9Y(dJ4());IT.outputJsonSync=lJ4();IT.outputJSON=IT.outputJson;IT.outputJSONSync=IT.outputJsonSync;IT.writeJSON=IT.writeJson;IT.writeJSONSync=IT.writeJsonSync;IT.readJSON=IT.readJson;IT.readJSONSync=IT.readJsonSync;iJ4.exports=IT});var tJ4=C((fZ_,sJ4)=>{var D9Y=gw(),sy8=g6("path"),X9Y=RG1().copy,aJ4=zc6().remove,P9Y=vx().mkdirp,W9Y=Y16().pathExists,rJ4=Rz6();function Z9Y(A,q,K,Y){if(typeof K==="function")Y=K,K={};K=K||{};let z=K.overwrite||K.clobber||!1;rJ4.checkPaths(A,q,"move",K,(w,_)=>{if(w)return Y(w);let{srcStat:$,isChangingCase:O=!1}=_;rJ4.checkParentPaths(A,$,q,"move",(H)=>{if(H)return Y(H);if(G9Y(q))return oJ4(A,q,z,O,Y);P9Y(sy8.dirname(q),(j)=>{if(j)return Y(j);return oJ4(A,q,z,O,Y)})})})}function G9Y(A){let q=sy8.dirname(A);return sy8.parse(q).root===q}function oJ4(A,q,K,Y,z){if(Y)return ay8(A,q,K,z);if(K)return aJ4(q,(w)=>{if(w)return z(w);return ay8(A,q,K,z)});W9Y(q,(w,_)=>{if(w)return z(w);if(_)return z(Error("dest already exists."));return ay8(A,q,K,z)})}function ay8(A,q,K,Y){D9Y.rename(A,q,(z)=>{if(!z)return Y();if(z.code!=="EXDEV")return Y(z);return f9Y(A,q,K,Y)})}function f9Y(A,q,K,Y){X9Y(A,q,{overwrite:K,errorOnExist:!0},(w)=>{if(w)return Y(w);return aJ4(A,Y)})}sJ4.exports=Z9Y});var YM4=C((TZ_,KM4)=>{var AM4=gw(),ey8=g6("path"),T9Y=RG1().copySync,qM4=zc6().removeSync,V9Y=vx().mkdirpSync,eJ4=Rz6();function N9Y(A,q,K){K=K||{};let Y=K.overwrite||K.clobber||!1,{srcStat:z,isChangingCase:w=!1}=eJ4.checkPathsSync(A,q,"move",K);if(eJ4.checkParentPathsSync(A,z,q,"move"),!v9Y(q))V9Y(ey8.dirname(q));return k9Y(A,q,Y,w)}function v9Y(A){let q=ey8.dirname(A);return ey8.parse(q).root===q}function k9Y(A,q,K,Y){if(Y)return ty8(A,q,K);if(K)return qM4(q),ty8(A,q,K);if(AM4.existsSync(q))throw Error("dest already exists.");return ty8(A,q,K)}function ty8(A,q,K){try{AM4.renameSync(A,q)}catch(Y){if(Y.code!=="EXDEV")throw Y;return E9Y(A,q,K)}}function E9Y(A,q,K){return T9Y(A,q,{overwrite:K,errorOnExist:!0}),qM4(A)}KM4.exports=N9Y});var wM4=C((VZ_,zM4)=>{var L9Y=T$().fromCallback;zM4.exports={move:L9Y(tJ4()),moveSync:YM4()}});var $M4=C((NZ_,_M4)=>{_M4.exports={...yz6(),...RG1(),...KJ4(),...IJ4(),...nJ4(),...vx(),...wM4(),...xG1(),...Y16(),...zc6()}});var Sz6=C((AR8)=>{var OM4=T$().fromCallback,tN=gw(),y9Y=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((A)=>{return typeof tN[A]==="function"});Object.assign(AR8,tN);y9Y.forEach((A)=>{AR8[A]=OM4(tN[A])});AR8.exists=function(A,q){if(typeof q==="function")return tN.exists(A,q);return new Promise((K)=>{return tN.exists(A,K)})};AR8.read=function(A,q,K,Y,z,w){if(typeof w==="function")return tN.read(A,q,K,Y,z,w);return new Promise((_,$)=>{tN.read(A,q,K,Y,z,(O,H,j)=>{if(O)return $(O);_({bytesRead:H,buffer:j})})})};AR8.write=function(A,q,...K){if(typeof K[K.length-1]==="function")return tN.write(A,q,...K);return new Promise((Y,z)=>{tN.write(A,q,...K,(w,_,$)=>{if(w)return z(w);Y({bytesWritten:_,buffer:$})})})};if(typeof tN.writev==="function")AR8.writev=function(A,q,...K){if(typeof K[K.length-1]==="function")return tN.writev(A,q,...K);return new Promise((Y,z)=>{tN.writev(A,q,...K,(w,_,$)=>{if(w)return z(w);Y({bytesWritten:_,buffers:$})})})};if(typeof tN.realpath.native==="function")AR8.realpath.native=OM4(tN.realpath.native);else process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var jM4=C((I9Y,HM4)=>{var h9Y=g6("path");I9Y.checkPath=function(q){if(process.platform==="win32"){if(/[<>:"|?*]/.test(q.replace(h9Y.parse(q).root,""))){let Y=Error(`Path contains invalid characters: ${q}`);throw Y.code="EINVAL",Y}}}});var XM4=C((x9Y,qR8)=>{var JM4=Sz6(),{checkPath:MM4}=jM4(),DM4=(A)=>{let q={mode:511};if(typeof A==="number")return A;return{...q,...A}.mode};x9Y.makeDir=async(A,q)=>{return MM4(A),JM4.mkdir(A,{mode:DM4(q),recursive:!0})};x9Y.makeDirSync=(A,q)=>{return MM4(A),JM4.mkdirSync(A,{mode:DM4(q),recursive:!0})}});var Ex=C((LZ_,PM4)=>{var m9Y=T$().fromPromise,{makeDir:g9Y,makeDirSync:KR8}=XM4(),YR8=m9Y(g9Y);PM4.exports={mkdirs:YR8,mkdirsSync:KR8,mkdirp:YR8,mkdirpSync:KR8,ensureDir:YR8,ensureDirSync:KR8}});var $16=C((yZ_,ZM4)=>{var F9Y=T$().fromPromise,WM4=Sz6();function Q9Y(A){return WM4.access(A).then(()=>!0).catch(()=>!1)}ZM4.exports={pathExists:F9Y(Q9Y),pathExistsSync:WM4.existsSync}});var zR8=C((RZ_,GM4)=>{var rf6=gw();function U9Y(A,q,K,Y){rf6.open(A,"r+",(z,w)=>{if(z)return Y(z);rf6.futimes(w,q,K,(_)=>{rf6.close(w,($)=>{if(Y)Y(_||$)})})})}function p9Y(A,q,K){let Y=rf6.openSync(A,"r+");return rf6.futimesSync(Y,q,K),rf6.closeSync(Y)}GM4.exports={utimesMillis:U9Y,utimesMillisSync:p9Y}});var Cz6=C((SZ_,VM4)=>{var of6=Sz6(),TP=g6("path"),d9Y=g6("util");function c9Y(A,q,K){let Y=K.dereference?(z)=>of6.stat(z,{bigint:!0}):(z)=>of6.lstat(z,{bigint:!0});return Promise.all([Y(A),Y(q).catch((z)=>{if(z.code==="ENOENT")return null;throw z})]).then(([z,w])=>({srcStat:z,destStat:w}))}function l9Y(A,q,K){let Y,z=K.dereference?(_)=>of6.statSync(_,{bigint:!0}):(_)=>of6.lstatSync(_,{bigint:!0}),w=z(A);try{Y=z(q)}catch(_){if(_.code==="ENOENT")return{srcStat:w,destStat:null};throw _}return{srcStat:w,destStat:Y}}function i9Y(A,q,K,Y,z){d9Y.callbackify(c9Y)(A,q,Y,(w,_)=>{if(w)return z(w);let{srcStat:$,destStat:O}=_;if(O){if($c6($,O)){let H=TP.basename(A),j=TP.basename(q);if(K==="move"&&H!==j&&H.toLowerCase()===j.toLowerCase())return z(null,{srcStat:$,destStat:O,isChangingCase:!0});return z(Error("Source and destination must not be the same."))}if($.isDirectory()&&!O.isDirectory())return z(Error(`Cannot overwrite non-directory '${q}' with directory '${A}'.`));if(!$.isDirectory()&&O.isDirectory())return z(Error(`Cannot overwrite directory '${q}' with non-directory '${A}'.`))}if($.isDirectory()&&wR8(A,q))return z(Error(uG1(A,q,K)));return z(null,{srcStat:$,destStat:O})})}function n9Y(A,q,K,Y){let{srcStat:z,destStat:w}=l9Y(A,q,Y);if(w){if($c6(z,w)){let _=TP.basename(A),$=TP.basename(q);if(K==="move"&&_!==$&&_.toLowerCase()===$.toLowerCase())return{srcStat:z,destStat:w,isChangingCase:!0};throw Error("Source and destination must not be the same.")}if(z.isDirectory()&&!w.isDirectory())throw Error(`Cannot overwrite non-directory '${q}' with directory '${A}'.`);if(!z.isDirectory()&&w.isDirectory())throw Error(`Cannot overwrite directory '${q}' with non-directory '${A}'.`)}if(z.isDirectory()&&wR8(A,q))throw Error(uG1(A,q,K));return{srcStat:z,destStat:w}}function fM4(A,q,K,Y,z){let w=TP.resolve(TP.dirname(A)),_=TP.resolve(TP.dirname(K));if(_===w||_===TP.parse(_).root)return z();of6.stat(_,{bigint:!0},($,O)=>{if($){if($.code==="ENOENT")return z();return z($)}if($c6(q,O))return z(Error(uG1(A,K,Y)));return fM4(A,q,_,Y,z)})}function TM4(A,q,K,Y){let z=TP.resolve(TP.dirname(A)),w=TP.resolve(TP.dirname(K));if(w===z||w===TP.parse(w).root)return;let _;try{_=of6.statSync(w,{bigint:!0})}catch($){if($.code==="ENOENT")return;throw $}if($c6(q,_))throw Error(uG1(A,K,Y));return TM4(A,q,w,Y)}function $c6(A,q){return q.ino&&q.dev&&q.ino===A.ino&&q.dev===A.dev}function wR8(A,q){let K=TP.resolve(A).split(TP.sep).filter((z)=>z),Y=TP.resolve(q).split(TP.sep).filter((z)=>z);return K.reduce((z,w,_)=>z&&Y[_]===w,!0)}function uG1(A,q,K){return`Cannot ${K} '${A}' to a subdirectory of itself, '${q}'.`}VM4.exports={checkPaths:i9Y,checkPathsSync:n9Y,checkParentPaths:fM4,checkParentPathsSync:TM4,isSrcSubdir:wR8,areIdentical:$c6}});var SM4=C((CZ_,RM4)=>{var eN=gw(),Oc6=g6("path"),r9Y=Ex().mkdirs,o9Y=$16().pathExists,a9Y=zR8().utimesMillis,Hc6=Cz6();function s9Y(A,q,K,Y){if(typeof K==="function"&&!Y)Y=K,K={};else if(typeof K==="function")K={filter:K};if(Y=Y||function(){},K=K||{},K.clobber="clobber"in K?!!K.clobber:!0,K.overwrite="overwrite"in K?!!K.overwrite:K.clobber,K.preserveTimestamps&&process.arch==="ia32")process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended; see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");Hc6.checkPaths(A,q,"copy",K,(z,w)=>{if(z)return Y(z);let{srcStat:_,destStat:$}=w;Hc6.checkParentPaths(A,_,q,"copy",(O)=>{if(O)return Y(O);if(K.filter)return kM4(NM4,$,A,q,K,Y);return NM4($,A,q,K,Y)})})}function NM4(A,q,K,Y,z){let w=Oc6.dirname(K);o9Y(w,(_,$)=>{if(_)return z(_);if($)return BG1(A,q,K,Y,z);r9Y(w,(O)=>{if(O)return z(O);return BG1(A,q,K,Y,z)})})}function kM4(A,q,K,Y,z,w){Promise.resolve(z.filter(K,Y)).then((_)=>{if(_)return A(q,K,Y,z,w);return w()},(_)=>w(_))}function t9Y(A,q,K,Y,z){if(Y.filter)return kM4(BG1,A,q,K,Y,z);return BG1(A,q,K,Y,z)}function BG1(A,q,K,Y,z){(Y.dereference?eN.stat:eN.lstat)(q,(_,$)=>{if(_)return z(_);if($.isDirectory())return wYY($,A,q,K,Y,z);else if($.isFile()||$.isCharacterDevice()||$.isBlockDevice())return e9Y($,A,q,K,Y,z);else if($.isSymbolicLink())return OYY(A,q,K,Y,z);else if($.isSocket())return z(Error(`Cannot copy a socket file: ${q}`));else if($.isFIFO())return z(Error(`Cannot copy a FIFO pipe: ${q}`));return z(Error(`Unknown file: ${q}`))})}function e9Y(A,q,K,Y,z,w){if(!q)return EM4(A,K,Y,z,w);return AYY(A,K,Y,z,w)}function AYY(A,q,K,Y,z){if(Y.overwrite)eN.unlink(K,(w)=>{if(w)return z(w);return EM4(A,q,K,Y,z)});else if(Y.errorOnExist)return z(Error(`'${K}' already exists`));else return z()}function EM4(A,q,K,Y,z){eN.copyFile(q,K,(w)=>{if(w)return z(w);if(Y.preserveTimestamps)return qYY(A.mode,q,K,z);return mG1(K,A.mode,z)})}function qYY(A,q,K,Y){if(KYY(A))return YYY(K,A,(z)=>{if(z)return Y(z);return vM4(A,q,K,Y)});return vM4(A,q,K,Y)}function KYY(A){return(A&128)===0}function YYY(A,q,K){return mG1(A,q|128,K)}function vM4(A,q,K,Y){zYY(q,K,(z)=>{if(z)return Y(z);return mG1(K,A,Y)})}function mG1(A,q,K){return eN.chmod(A,q,K)}function zYY(A,q,K){eN.stat(A,(Y,z)=>{if(Y)return K(Y);return a9Y(q,z.atime,z.mtime,K)})}function wYY(A,q,K,Y,z,w){if(!q)return _YY(A.mode,K,Y,z,w);return LM4(K,Y,z,w)}function _YY(A,q,K,Y,z){eN.mkdir(K,(w)=>{if(w)return z(w);LM4(q,K,Y,(_)=>{if(_)return z(_);return mG1(K,A,z)})})}function LM4(A,q,K,Y){eN.readdir(A,(z,w)=>{if(z)return Y(z);return yM4(w,A,q,K,Y)})}function yM4(A,q,K,Y,z){let w=A.pop();if(!w)return z();return $YY(A,w,q,K,Y,z)}function $YY(A,q,K,Y,z,w){let _=Oc6.join(K,q),$=Oc6.join(Y,q);Hc6.checkPaths(_,$,"copy",z,(O,H)=>{if(O)return w(O);let{destStat:j}=H;t9Y(j,_,$,z,(J)=>{if(J)return w(J);return yM4(A,K,Y,z,w)})})}function OYY(A,q,K,Y,z){eN.readlink(q,(w,_)=>{if(w)return z(w);if(Y.dereference)_=Oc6.resolve(process.cwd(),_);if(!A)return eN.symlink(_,K,z);else eN.readlink(K,($,O)=>{if($){if($.code==="EINVAL"||$.code==="UNKNOWN")return eN.symlink(_,K,z);return z($)}if(Y.dereference)O=Oc6.resolve(process.cwd(),O);if(Hc6.isSrcSubdir(_,O))return z(Error(`Cannot copy '${_}' to a subdirectory of itself, '${O}'.`));if(A.isDirectory()&&Hc6.isSrcSubdir(O,_))return z(Error(`Cannot overwrite '${O}' with '${_}'.`));return HYY(_,K,z)})})}function HYY(A,q,K){eN.unlink(q,(Y)=>{if(Y)return K(Y);return eN.symlink(A,q,K)})}RM4.exports=s9Y});var xM4=C((hZ_,bM4)=>{var NG=gw(),jc6=g6("path"),jYY=Ex().mkdirsSync,JYY=zR8().utimesMillisSync,Jc6=Cz6();function MYY(A,q,K){if(typeof K==="function")K={filter:K};if(K=K||{},K.clobber="clobber"in K?!!K.clobber:!0,K.overwrite="overwrite"in K?!!K.overwrite:K.clobber,K.preserveTimestamps&&process.arch==="ia32")process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended; see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:Y,destStat:z}=Jc6.checkPathsSync(A,q,"copy",K);return Jc6.checkParentPathsSync(A,Y,q,"copy"),DYY(z,A,q,K)}function DYY(A,q,K,Y){if(Y.filter&&!Y.filter(q,K))return;let z=jc6.dirname(K);if(!NG.existsSync(z))jYY(z);return CM4(A,q,K,Y)}function XYY(A,q,K,Y){if(Y.filter&&!Y.filter(q,K))return;return CM4(A,q,K,Y)}function CM4(A,q,K,Y){let w=(Y.dereference?NG.statSync:NG.lstatSync)(q);if(w.isDirectory())return VYY(w,A,q,K,Y);else if(w.isFile()||w.isCharacterDevice()||w.isBlockDevice())return PYY(w,A,q,K,Y);else if(w.isSymbolicLink())return kYY(A,q,K,Y);else if(w.isSocket())throw Error(`Cannot copy a socket file: ${q}`);else if(w.isFIFO())throw Error(`Cannot copy a FIFO pipe: ${q}`);throw Error(`Unknown file: ${q}`)}function PYY(A,q,K,Y,z){if(!q)return hM4(A,K,Y,z);return WYY(A,K,Y,z)}function WYY(A,q,K,Y){if(Y.overwrite)return NG.unlinkSync(K),hM4(A,q,K,Y);else if(Y.errorOnExist)throw Error(`'${K}' already exists`)}function hM4(A,q,K,Y){if(NG.copyFileSync(q,K),Y.preserveTimestamps)ZYY(A.mode,q,K);return _R8(K,A.mode)}function ZYY(A,q,K){if(GYY(A))fYY(K,A);return TYY(q,K)}function GYY(A){return(A&128)===0}function fYY(A,q){return _R8(A,q|128)}function _R8(A,q){return NG.chmodSync(A,q)}function TYY(A,q){let K=NG.statSync(A);return JYY(q,K.atime,K.mtime)}function VYY(A,q,K,Y,z){if(!q)return NYY(A.mode,K,Y,z);return IM4(K,Y,z)}function NYY(A,q,K,Y){return NG.mkdirSync(K),IM4(q,K,Y),_R8(K,A)}function IM4(A,q,K){NG.readdirSync(A).forEach((Y)=>vYY(Y,A,q,K))}function vYY(A,q,K,Y){let z=jc6.join(q,A),w=jc6.join(K,A),{destStat:_}=Jc6.checkPathsSync(z,w,"copy",Y);return XYY(_,z,w,Y)}function kYY(A,q,K,Y){let z=NG.readlinkSync(q);if(Y.dereference)z=jc6.resolve(process.cwd(),z);if(!A)return NG.symlinkSync(z,K);else{let w;try{w=NG.readlinkSync(K)}catch(_){if(_.code==="EINVAL"||_.code==="UNKNOWN")return NG.symlinkSync(z,K);throw _}if(Y.dereference)w=jc6.resolve(process.cwd(),w);if(Jc6.isSrcSubdir(z,w))throw Error(`Cannot copy '${z}' to a subdirectory of itself, '${w}'.`);if(NG.statSync(K).isDirectory()&&Jc6.isSrcSubdir(w,z))throw Error(`Cannot overwrite '${w}' with '${z}'.`);return EYY(z,K)}}function EYY(A,q){return NG.unlinkSync(q),NG.symlinkSync(A,q)}bM4.exports=MYY});var gG1=C((IZ_,uM4)=>{var LYY=T$().fromCallback;uM4.exports={copy:LYY(SM4()),copySync:xM4()}});var cM4=C((bZ_,dM4)=>{var BM4=gw(),QM4=g6("path"),h_=g6("assert"),Mc6=process.platform==="win32";function UM4(A){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((K)=>{A[K]=A[K]||BM4[K],K=K+"Sync",A[K]=A[K]||BM4[K]}),A.maxBusyTries=A.maxBusyTries||3}function $R8(A,q,K){let Y=0;if(typeof q==="function")K=q,q={};h_(A,"rimraf: missing path"),h_.strictEqual(typeof A,"string","rimraf: path should be a string"),h_.strictEqual(typeof K,"function","rimraf: callback function required"),h_(q,"rimraf: invalid options argument provided"),h_.strictEqual(typeof q,"object","rimraf: options should be object"),UM4(q),mM4(A,q,function z(w){if(w){if((w.code==="EBUSY"||w.code==="ENOTEMPTY"||w.code==="EPERM")&&YmM4(A,q,z),_)}if(w.code==="ENOENT")w=null}K(w)})}function mM4(A,q,K){h_(A),h_(q),h_(typeof K==="function"),q.lstat(A,(Y,z)=>{if(Y&&Y.code==="ENOENT")return K(null);if(Y&&Y.code==="EPERM"&&Mc6)return gM4(A,q,Y,K);if(z&&z.isDirectory())return FG1(A,q,Y,K);q.unlink(A,(w)=>{if(w){if(w.code==="ENOENT")return K(null);if(w.code==="EPERM")return Mc6?gM4(A,q,w,K):FG1(A,q,w,K);if(w.code==="EISDIR")return FG1(A,q,w,K)}return K(w)})})}function gM4(A,q,K,Y){h_(A),h_(q),h_(typeof Y==="function"),q.chmod(A,438,(z)=>{if(z)Y(z.code==="ENOENT"?null:K);else q.stat(A,(w,_)=>{if(w)Y(w.code==="ENOENT"?null:K);else if(_.isDirectory())FG1(A,q,K,Y);else q.unlink(A,Y)})})}function FM4(A,q,K){let Y;h_(A),h_(q);try{q.chmodSync(A,438)}catch(z){if(z.code==="ENOENT")return;else throw K}try{Y=q.statSync(A)}catch(z){if(z.code==="ENOENT")return;else throw K}if(Y.isDirectory())QG1(A,q,K);else q.unlinkSync(A)}function FG1(A,q,K,Y){h_(A),h_(q),h_(typeof Y==="function"),q.rmdir(A,(z)=>{if(z&&(z.code==="ENOTEMPTY"||z.code==="EEXIST"||z.code==="EPERM"))yYY(A,q,Y);else if(z&&z.code==="ENOTDIR")Y(K);else Y(z)})}function yYY(A,q,K){h_(A),h_(q),h_(typeof K==="function"),q.readdir(A,(Y,z)=>{if(Y)return K(Y);let w=z.length,_;if(w===0)return q.rmdir(A,K);z.forEach(($)=>{$R8(QM4.join(A,$),q,(O)=>{if(_)return;if(O)return K(_=O);if(--w===0)q.rmdir(A,K)})})})}function pM4(A,q){let K;q=q||{},UM4(q),h_(A,"rimraf: missing path"),h_.strictEqual(typeof A,"string","rimraf: path should be a string"),h_(q,"rimraf: missing options"),h_.strictEqual(typeof q,"object","rimraf: options should be object");try{K=q.lstatSync(A)}catch(Y){if(Y.code==="ENOENT")return;if(Y.code==="EPERM"&&Mc6)FM4(A,q,Y)}try{if(K&&K.isDirectory())QG1(A,q,null);else q.unlinkSync(A)}catch(Y){if(Y.code==="ENOENT")return;else if(Y.code==="EPERM")return Mc6?FM4(A,q,Y):QG1(A,q,Y);else if(Y.code!=="EISDIR")throw Y;QG1(A,q,Y)}}function QG1(A,q,K){h_(A),h_(q);try{q.rmdirSync(A)}catch(Y){if(Y.code==="ENOTDIR")throw K;else if(Y.code==="ENOTEMPTY"||Y.code==="EEXIST"||Y.code==="EPERM")RYY(A,q);else if(Y.code!=="ENOENT")throw Y}}function RYY(A,q){if(h_(A),h_(q),q.readdirSync(A).forEach((K)=>pM4(QM4.join(A,K),q)),Mc6){let K=Date.now();do try{return q.rmdirSync(A,q)}catch{}while(Date.now()-K<500)}else return q.rmdirSync(A,q)}dM4.exports=$R8;$R8.sync=pM4});var Dc6=C((xZ_,iM4)=>{var UG1=gw(),SYY=T$().fromCallback,lM4=cM4();function CYY(A,q){if(UG1.rm)return UG1.rm(A,{recursive:!0,force:!0},q);lM4(A,q)}function hYY(A){if(UG1.rmSync)return UG1.rmSync(A,{recursive:!0,force:!0});lM4.sync(A)}iM4.exports={remove:SYY(CYY),removeSync:hYY}});var AD4=C((uZ_,eM4)=>{var IYY=T$().fromPromise,oM4=Sz6(),aM4=g6("path"),sM4=Ex(),tM4=Dc6(),nM4=IYY(async function(q){let K;try{K=await oM4.readdir(q)}catch{return sM4.mkdirs(q)}return Promise.all(K.map((Y)=>tM4.remove(aM4.join(q,Y))))});function rM4(A){let q;try{q=oM4.readdirSync(A)}catch{return sM4.mkdirsSync(A)}q.forEach((K)=>{K=aM4.join(A,K),tM4.removeSync(K)})}eM4.exports={emptyDirSync:rM4,emptydirSync:rM4,emptyDir:nM4,emptydir:nM4}});var zD4=C((BZ_,YD4)=>{var bYY=T$().fromCallback,qD4=g6("path"),O16=gw(),KD4=Ex();function xYY(A,q){function K(){O16.writeFile(A,"",(Y)=>{if(Y)return q(Y);q()})}O16.stat(A,(Y,z)=>{if(!Y&&z.isFile())return q();let w=qD4.dirname(A);O16.stat(w,(_,$)=>{if(_){if(_.code==="ENOENT")return KD4.mkdirs(w,(O)=>{if(O)return q(O);K()});return q(_)}if($.isDirectory())K();else O16.readdir(w,(O)=>{if(O)return q(O)})})})}function uYY(A){let q;try{q=O16.statSync(A)}catch{}if(q&&q.isFile())return;let K=qD4.dirname(A);try{if(!O16.statSync(K).isDirectory())O16.readdirSync(K)}catch(Y){if(Y&&Y.code==="ENOENT")KD4.mkdirsSync(K);else throw Y}O16.writeFileSync(A,"")}YD4.exports={createFile:bYY(xYY),createFileSync:uYY}});var HD4=C((mZ_,OD4)=>{var BYY=T$().fromCallback,wD4=g6("path"),H16=gw(),_D4=Ex(),mYY=$16().pathExists,{areIdentical:$D4}=Cz6();function gYY(A,q,K){function Y(z,w){H16.link(z,w,(_)=>{if(_)return K(_);K(null)})}H16.lstat(q,(z,w)=>{H16.lstat(A,(_,$)=>{if(_)return _.message=_.message.replace("lstat","ensureLink"),K(_);if(w&&$D4($,w))return K(null);let O=wD4.dirname(q);mYY(O,(H,j)=>{if(H)return K(H);if(j)return Y(A,q);_D4.mkdirs(O,(J)=>{if(J)return K(J);Y(A,q)})})})})}function FYY(A,q){let K;try{K=H16.lstatSync(q)}catch{}try{let w=H16.lstatSync(A);if(K&&$D4(w,K))return}catch(w){throw w.message=w.message.replace("lstat","ensureLink"),w}let Y=wD4.dirname(q);if(H16.existsSync(Y))return H16.linkSync(A,q);return _D4.mkdirsSync(Y),H16.linkSync(A,q)}OD4.exports={createLink:BYY(gYY),createLinkSync:FYY}});var JD4=C((gZ_,jD4)=>{var j16=g6("path"),Xc6=gw(),QYY=$16().pathExists;function UYY(A,q,K){if(j16.isAbsolute(A))return Xc6.lstat(A,(Y)=>{if(Y)return Y.message=Y.message.replace("lstat","ensureSymlink"),K(Y);return K(null,{toCwd:A,toDst:A})});else{let Y=j16.dirname(q),z=j16.join(Y,A);return QYY(z,(w,_)=>{if(w)return K(w);if(_)return K(null,{toCwd:z,toDst:A});else return Xc6.lstat(A,($)=>{if($)return $.message=$.message.replace("lstat","ensureSymlink"),K($);return K(null,{toCwd:A,toDst:j16.relative(Y,A)})})})}}function pYY(A,q){let K;if(j16.isAbsolute(A)){if(K=Xc6.existsSync(A),!K)throw Error("absolute srcpath does not exist");return{toCwd:A,toDst:A}}else{let Y=j16.dirname(q),z=j16.join(Y,A);if(K=Xc6.existsSync(z),K)return{toCwd:z,toDst:A};else{if(K=Xc6.existsSync(A),!K)throw Error("relative srcpath does not exist");return{toCwd:A,toDst:j16.relative(Y,A)}}}}jD4.exports={symlinkPaths:UYY,symlinkPathsSync:pYY}});var XD4=C((FZ_,DD4)=>{var MD4=gw();function dYY(A,q,K){if(K=typeof q==="function"?q:K,q=typeof q==="function"?!1:q,q)return K(null,q);MD4.lstat(A,(Y,z)=>{if(Y)return K(null,"file");q=z&&z.isDirectory()?"dir":"file",K(null,q)})}function cYY(A,q){let K;if(q)return q;try{K=MD4.lstatSync(A)}catch{return"file"}return K&&K.isDirectory()?"dir":"file"}DD4.exports={symlinkType:dYY,symlinkTypeSync:cYY}});var ND4=C((QZ_,VD4)=>{var lYY=T$().fromCallback,WD4=g6("path"),Lx=Sz6(),ZD4=Ex(),iYY=ZD4.mkdirs,nYY=ZD4.mkdirsSync,GD4=JD4(),rYY=GD4.symlinkPaths,oYY=GD4.symlinkPathsSync,fD4=XD4(),aYY=fD4.symlinkType,sYY=fD4.symlinkTypeSync,tYY=$16().pathExists,{areIdentical:TD4}=Cz6();function eYY(A,q,K,Y){Y=typeof K==="function"?K:Y,K=typeof K==="function"?!1:K,Lx.lstat(q,(z,w)=>{if(!z&&w.isSymbolicLink())Promise.all([Lx.stat(A),Lx.stat(q)]).then(([_,$])=>{if(TD4(_,$))return Y(null);PD4(A,q,K,Y)});else PD4(A,q,K,Y)})}function PD4(A,q,K,Y){rYY(A,q,(z,w)=>{if(z)return Y(z);A=w.toDst,aYY(w.toCwd,K,(_,$)=>{if(_)return Y(_);let O=WD4.dirname(q);tYY(O,(H,j)=>{if(H)return Y(H);if(j)return Lx.symlink(A,q,$,Y);iYY(O,(J)=>{if(J)return Y(J);Lx.symlink(A,q,$,Y)})})})})}function AzY(A,q,K){let Y;try{Y=Lx.lstatSync(q)}catch{}if(Y&&Y.isSymbolicLink()){let $=Lx.statSync(A),O=Lx.statSync(q);if(TD4($,O))return}let z=oYY(A,q);A=z.toDst,K=sYY(z.toCwd,K);let w=WD4.dirname(q);if(Lx.existsSync(w))return Lx.symlinkSync(A,q,K);return nYY(w),Lx.symlinkSync(A,q,K)}VD4.exports={createSymlink:lYY(eYY),createSymlinkSync:AzY}});var CD4=C((UZ_,SD4)=>{var{createFile:vD4,createFileSync:kD4}=zD4(),{createLink:ED4,createLinkSync:LD4}=HD4(),{createSymlink:yD4,createSymlinkSync:RD4}=ND4();SD4.exports={createFile:vD4,createFileSync:kD4,ensureFile:vD4,ensureFileSync:kD4,createLink:ED4,createLinkSync:LD4,ensureLink:ED4,ensureLinkSync:LD4,createSymlink:yD4,createSymlinkSync:RD4,ensureSymlink:yD4,ensureSymlinkSync:RD4}});var ID4=C((pZ_,hD4)=>{var pG1=oy8();hD4.exports={readJson:pG1.readFile,readJsonSync:pG1.readFileSync,writeJson:pG1.writeFile,writeJsonSync:pG1.writeFileSync}});var dG1=C((dZ_,uD4)=>{var qzY=T$().fromCallback,Pc6=gw(),bD4=g6("path"),xD4=Ex(),KzY=$16().pathExists;function YzY(A,q,K,Y){if(typeof K==="function")Y=K,K="utf8";let z=bD4.dirname(A);KzY(z,(w,_)=>{if(w)return Y(w);if(_)return Pc6.writeFile(A,q,K,Y);xD4.mkdirs(z,($)=>{if($)return Y($);Pc6.writeFile(A,q,K,Y)})})}function zzY(A,...q){let K=bD4.dirname(A);if(Pc6.existsSync(K))return Pc6.writeFileSync(A,...q);xD4.mkdirsSync(K),Pc6.writeFileSync(A,...q)}uD4.exports={outputFile:qzY(YzY),outputFileSync:zzY}});var mD4=C((cZ_,BD4)=>{var{stringify:wzY}=if6(),{outputFile:_zY}=dG1();async function $zY(A,q,K={}){let Y=wzY(q,K);await _zY(A,Y,K)}BD4.exports=$zY});var FD4=C((lZ_,gD4)=>{var{stringify:OzY}=if6(),{outputFileSync:HzY}=dG1();function jzY(A,q,K){let Y=OzY(q,K);HzY(A,Y,K)}gD4.exports=jzY});var UD4=C((iZ_,QD4)=>{var JzY=T$().fromPromise,bT=ID4();bT.outputJson=JzY(mD4());bT.outputJsonSync=FD4();bT.outputJSON=bT.outputJson;bT.outputJSONSync=bT.outputJsonSync;bT.writeJSON=bT.writeJson;bT.writeJSONSync=bT.writeJsonSync;bT.readJSON=bT.readJson;bT.readJSONSync=bT.readJsonSync;QD4.exports=bT});var iD4=C((nZ_,lD4)=>{var MzY=gw(),HR8=g6("path"),DzY=gG1().copy,cD4=Dc6().remove,XzY=Ex().mkdirp,PzY=$16().pathExists,pD4=Cz6();function WzY(A,q,K,Y){if(typeof K==="function")Y=K,K={};K=K||{};let z=K.overwrite||K.clobber||!1;pD4.checkPaths(A,q,"move",K,(w,_)=>{if(w)return Y(w);let{srcStat:$,isChangingCase:O=!1}=_;pD4.checkParentPaths(A,$,q,"move",(H)=>{if(H)return Y(H);if(ZzY(q))return dD4(A,q,z,O,Y);XzY(HR8.dirname(q),(j)=>{if(j)return Y(j);return dD4(A,q,z,O,Y)})})})}function ZzY(A){let q=HR8.dirname(A);return HR8.parse(q).root===q}function dD4(A,q,K,Y,z){if(Y)return OR8(A,q,K,z);if(K)return cD4(q,(w)=>{if(w)return z(w);return OR8(A,q,K,z)});PzY(q,(w,_)=>{if(w)return z(w);if(_)return z(Error("dest already exists."));return OR8(A,q,K,z)})}function OR8(A,q,K,Y){MzY.rename(A,q,(z)=>{if(!z)return Y();if(z.code!=="EXDEV")return Y(z);return GzY(A,q,K,Y)})}function GzY(A,q,K,Y){DzY(A,q,{overwrite:K,errorOnExist:!0},(w)=>{if(w)return Y(w);return cD4(A,Y)})}lD4.exports=WzY});var sD4=C((rZ_,aD4)=>{var rD4=gw(),JR8=g6("path"),fzY=gG1().copySync,oD4=Dc6().removeSync,TzY=Ex().mkdirpSync,nD4=Cz6();function VzY(A,q,K){K=K||{};let Y=K.overwrite||K.clobber||!1,{srcStat:z,isChangingCase:w=!1}=nD4.checkPathsSync(A,q,"move",K);if(nD4.checkParentPathsSync(A,z,q,"move"),!NzY(q))TzY(JR8.dirname(q));return vzY(A,q,Y,w)}function NzY(A){let q=JR8.dirname(A);return JR8.parse(q).root===q}function vzY(A,q,K,Y){if(Y)return jR8(A,q,K);if(K)return oD4(q),jR8(A,q,K);if(rD4.existsSync(q))throw Error("dest already exists.");return jR8(A,q,K)}function jR8(A,q,K){try{rD4.renameSync(A,q)}catch(Y){if(Y.code!=="EXDEV")throw Y;return kzY(A,q,K)}}function kzY(A,q,K){return fzY(A,q,{overwrite:K,errorOnExist:!0}),oD4(A)}aD4.exports=VzY});var eD4=C((oZ_,tD4)=>{var EzY=T$().fromCallback;tD4.exports={move:EzY(iD4()),moveSync:sD4()}});var qX4=C((aZ_,AX4)=>{AX4.exports={...Sz6(),...gG1(),...AD4(),...CD4(),...UD4(),...Ex(),...eD4(),...dG1(),...$16(),...Dc6()}});var MR8=C((YX4)=>{Object.defineProperty(YX4,"__esModule",{value:!0});YX4.childDepType=YX4.depTypeGreater=YX4.DepType=void 0;var n3;(function(A){A[A.PROD=0]="PROD",A[A.DEV=1]="DEV",A[A.OPTIONAL=2]="OPTIONAL",A[A.DEV_OPTIONAL=3]="DEV_OPTIONAL",A[A.ROOT=4]="ROOT"})(n3=YX4.DepType||(YX4.DepType={}));var LzY=(A,q)=>{switch(q){case n3.DEV:switch(A){case n3.OPTIONAL:case n3.PROD:case n3.ROOT:return!0;case n3.DEV:case n3.DEV_OPTIONAL:default:return!1}case n3.DEV_OPTIONAL:switch(A){case n3.OPTIONAL:case n3.PROD:case n3.ROOT:case n3.DEV:return!0;case n3.DEV_OPTIONAL:default:return!1}case n3.OPTIONAL:switch(A){case n3.PROD:case n3.ROOT:return!0;case n3.OPTIONAL:case n3.DEV:case n3.DEV_OPTIONAL:default:return!1}case n3.PROD:switch(A){case n3.ROOT:return!0;case n3.PROD:case n3.OPTIONAL:case n3.DEV:case n3.DEV_OPTIONAL:default:return!1}case n3.ROOT:switch(A){case n3.ROOT:case n3.PROD:case n3.OPTIONAL:case n3.DEV:case n3.DEV_OPTIONAL:default:return!1}default:return!1}};YX4.depTypeGreater=LzY;var yzY=(A,q)=>{if(q===n3.ROOT)throw Error("Something went wrong, a child dependency can't be marked as the ROOT");switch(A){case n3.ROOT:return q;case n3.PROD:if(q===n3.OPTIONAL)return n3.OPTIONAL;return n3.PROD;case n3.OPTIONAL:return n3.OPTIONAL;case n3.DEV_OPTIONAL:return n3.DEV_OPTIONAL;case n3.DEV:if(q===n3.OPTIONAL)return n3.DEV_OPTIONAL;return n3.DEV}};YX4.childDepType=yzY});var _X4=C((wX4)=>{Object.defineProperty(wX4,"__esModule",{value:!0});wX4.NativeModuleType=void 0;var SzY;(function(A){A[A.NONE=0]="NONE",A[A.NODE_GYP=1]="NODE_GYP",A[A.PREBUILD=2]="PREBUILD"})(SzY=wX4.NativeModuleType||(wX4.NativeModuleType={}))});var jX4=C((OX4)=>{Object.defineProperty(OX4,"__esModule",{value:!0});OX4.Walker=void 0;var CzY=Vq6(),cG1=qX4(),J16=g6("path"),YC=MR8(),XR8=_X4(),vi=CzY("flora-colossus");class $X4{constructor(A){if(this.modules=[],this.walkHistory=new Set,this.cache=null,!A||typeof A!=="string")throw Error("modulePath must be provided as a string");vi(`creating walker with rootModule=${A}`),this.rootModule=A}relativeModule(A,q){return J16.resolve(A,"node_modules",q)}async loadPackageJSON(A){let q=J16.resolve(A,"package.json");if(await cG1.pathExists(q)){let K=await cG1.readJson(q);if(!K.dependencies)K.dependencies={};if(!K.devDependencies)K.devDependencies={};if(!K.optionalDependencies)K.optionalDependencies={};return K}return null}async walkDependenciesForModuleInModule(A,q,K){let Y=q,z=null,w=null;while(!z&&this.relativeModule(Y,A)!==w)if(w=this.relativeModule(Y,A),await cG1.pathExists(w))z=w;else{if(J16.basename(J16.dirname(Y))!=="node_modules")Y=J16.dirname(Y);Y=J16.dirname(J16.dirname(Y))}if(!z&&K!==YC.DepType.OPTIONAL&&K!==YC.DepType.DEV_OPTIONAL)throw Error(`Failed to locate module "${A}" from "${q}" This normally means that either you have deleted this package already somehow (check your ignore settings if using electron-packager). Or your module installation failed.`);if(z)await this.walkDependenciesForModule(z,K)}async detectNativeModuleType(A,q){if(q.dependencies["prebuild-install"])return XR8.NativeModuleType.PREBUILD;else if(await cG1.pathExists(J16.join(A,"binding.gyp")))return XR8.NativeModuleType.NODE_GYP;return XR8.NativeModuleType.NONE}async walkDependenciesForModule(A,q){if(vi("walk reached:",A," Type is:",YC.DepType[q]),this.walkHistory.has(A)){vi("already walked this route");let Y=this.modules.find((z)=>z.path===A);if((0,YC.depTypeGreater)(q,Y.depType))vi(`existing module has a type of "${Y.depType}", new module type would be "${q}" therefore updating`),Y.depType=q;return}let K=await this.loadPackageJSON(A);if(!K){vi("walk hit a dead end, this module is incomplete");return}this.walkHistory.add(A),this.modules.push({depType:q,nativeModuleType:await this.detectNativeModuleType(A,K),path:A,name:K.name});for(let Y in K.dependencies){if(Y in K.optionalDependencies){vi(`found ${Y} in prod deps of ${A} but it is also marked optional`);continue}await this.walkDependenciesForModuleInModule(Y,A,(0,YC.childDepType)(q,YC.DepType.PROD))}for(let Y in K.optionalDependencies)await this.walkDependenciesForModuleInModule(Y,A,(0,YC.childDepType)(q,YC.DepType.OPTIONAL));if(q===YC.DepType.ROOT){vi("we're still at the beginning, walking down the dev route");for(let Y in K.devDependencies)await this.walkDependenciesForModuleInModule(Y,A,(0,YC.childDepType)(q,YC.DepType.DEV))}}async walkTree(){if(vi("starting tree walk"),!this.cache)this.cache=new Promise(async(A,q)=>{this.modules=[];try{await this.walkDependenciesForModule(this.rootModule,YC.DepType.ROOT)}catch(K){q(K);return}A(this.modules)});else vi("tree walk in progress / completed already, waiting for existing walk to complete");return await this.cache}getRootModule(){return this.rootModule}}OX4.Walker=$X4});var PR8=C((M16)=>{var hzY=M16&&M16.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),JX4=M16&&M16.__exportStar||function(A,q){for(var K in A)if(K!=="default"&&!Object.prototype.hasOwnProperty.call(q,K))hzY(q,A,K)};Object.defineProperty(M16,"__esModule",{value:!0});JX4(jX4(),M16);JX4(MR8(),M16)});var PX4=C((DX4)=>{Object.defineProperty(DX4,"__esModule",{value:!0});DX4.DestroyerOfModules=void 0;var lG1=$M4(),af6=g6("path"),WR8=PR8();class MX4{constructor({rootDirectory:A,walker:q,shouldKeepModuleTest:K}){if(A)this.walker=new WR8.Walker(A);else if(q)this.walker=q;else throw Error("Must either provide rootDirectory or walker argument");if(K)this.shouldKeepFn=K}async destroyModule(A,q){if(q.get(A)){let Y=af6.resolve(A,"node_modules");if(!await lG1.pathExists(Y))return;for(let z of await lG1.readdir(Y))if(z.startsWith("@"))for(let w of await lG1.readdir(af6.resolve(Y,z)))await this.destroyModule(af6.resolve(Y,z,w),q);else await this.destroyModule(af6.resolve(Y,z),q)}else await lG1.remove(A)}async collectKeptModules({relativePaths:A=!1}){let q=await this.walker.walkTree(),K=new Map,Y=af6.resolve(this.walker.getRootModule());for(let z of q)if(this.shouldKeepModule(z)){let w=z.path;if(A)w=w.replace(`${Y}${af6.sep}`,"");K.set(w,z)}return K}async destroy(){await this.destroyModule(this.walker.getRootModule(),await this.collectKeptModules({relativePaths:!1}))}shouldKeepModule(A){let q=A.depType===WR8.DepType.DEV||A.depType===WR8.DepType.DEV_OPTIONAL;return this.shouldKeepFn?this.shouldKeepFn(A,q):!q}}DX4.DestroyerOfModules=MX4});var ZX4=C((D16)=>{var IzY=D16&&D16.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),WX4=D16&&D16.__exportStar||function(A,q){for(var K in A)if(K!=="default"&&!Object.prototype.hasOwnProperty.call(q,K))IzY(q,A,K)};Object.defineProperty(D16,"__esModule",{value:!0});WX4(PX4(),D16);WX4(PR8(),D16)});var TX4=C((YG_,fX4)=>{var bzY=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],xzY=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],uzY=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],BzY=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],GX4=(A,q,K)=>{let Y=A;if(typeof q==="string"||Array.isArray(q))Y=A.toLocaleString(q,K);else if(q===!0||K!==void 0)Y=A.toLocaleString(void 0,K);return Y};fX4.exports=(A,q)=>{if(!Number.isFinite(A))throw TypeError(`Expected a finite number, got ${typeof A}: ${A}`);q=Object.assign({bits:!1,binary:!1},q);let K=q.bits?q.binary?BzY:uzY:q.binary?xzY:bzY;if(q.signed&&A===0)return` 0 ${K[0]}`;let Y=A<0,z=Y?"-":q.signed?"+":"";if(Y)A=-A;let w;if(q.minimumFractionDigits!==void 0)w={minimumFractionDigits:q.minimumFractionDigits};if(q.maximumFractionDigits!==void 0)w=Object.assign({maximumFractionDigits:q.maximumFractionDigits},w);if(A<1){let H=GX4(A,q.locale,w);return z+H+" "+K[0]}let _=Math.min(Math.floor(q.binary?Math.log(A)/Math.log(1024):Math.log10(A)/3),K.length-1);if(A/=Math.pow(q.binary?1024:1000,_),!w)A=A.toPrecision(3);let $=GX4(Number(A),q.locale,w),O=K[_];return z+$+" "+O}});var w9=C((zG_,VX4)=>{VX4.exports={options:{usePureJavaScript:!1}}});var kX4=C((wG_,vX4)=>{var ZR8={};vX4.exports=ZR8;var NX4={};ZR8.encode=function(A,q,K){if(typeof q!=="string")throw TypeError('"alphabet" must be a string.');if(K!==void 0&&typeof K!=="number")throw TypeError('"maxline" must be a number.');var Y="";if(!(A instanceof Uint8Array))Y=mzY(A,q);else{var z=0,w=q.length,_=q.charAt(0),$=[0];for(z=0;z0)$.push(H%w),H=H/w|0}for(z=0;A[z]===0&&z=0;--z)Y+=q[$[z]]}if(K){var j=new RegExp(".{1,"+K+"}","g");Y=Y.match(j).join(`\r `)}return Y};ZR8.decode=function(A,q){if(typeof A!=="string")throw TypeError('"input" must be a string.');if(typeof q!=="string")throw TypeError('"alphabet" must be a string.');var K=NX4[q];if(!K){K=NX4[q]=[];for(var Y=0;Y>=8;while(H>0)_.push(H&255),H>>=8}for(var j=0;A[j]===w&&j0)w.push($%Y),$=$/Y|0}var O="";for(K=0;A.at(K)===0&&K=0;--K)O+=q[w[K]];return O}});var bz=C((_G_,RX4)=>{var EX4=w9(),LX4=kX4(),Y8=RX4.exports=EX4.util=EX4.util||{};(function(){if(typeof process<"u"&&process.nextTick){if(Y8.nextTick=process.nextTick,typeof setImmediate==="function")Y8.setImmediate=setImmediate;else Y8.setImmediate=Y8.nextTick;return}if(typeof setImmediate==="function"){Y8.setImmediate=function(){return setImmediate.apply(void 0,arguments)},Y8.nextTick=function($){return setImmediate($)};return}if(Y8.setImmediate=function($){setTimeout($,0)},typeof window<"u"&&typeof window.postMessage==="function"){let $=function(O){if(O.source===window&&O.data===A){O.stopPropagation();var H=q.slice();q.length=0,H.forEach(function(j){j()})}};var _=$,A="forge.setImmediate",q=[];Y8.setImmediate=function(O){if(q.push(O),q.length===1)window.postMessage(A,"*")},window.addEventListener("message",$,!0)}if(typeof MutationObserver<"u"){var K=Date.now(),Y=!0,z=document.createElement("div"),q=[];new MutationObserver(function(){var O=q.slice();q.length=0,O.forEach(function(H){H()})}).observe(z,{attributes:!0});var w=Y8.setImmediate;Y8.setImmediate=function(O){if(Date.now()-K>15)K=Date.now(),w(O);else if(q.push(O),q.length===1)z.setAttribute("a",Y=!Y)}}Y8.nextTick=Y8.setImmediate})();Y8.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;Y8.globalScope=function(){if(Y8.isNodejs)return global;return typeof self>"u"?window:self}();Y8.isArray=Array.isArray||function(A){return Object.prototype.toString.call(A)==="[object Array]"};Y8.isArrayBuffer=function(A){return typeof ArrayBuffer<"u"&&A instanceof ArrayBuffer};Y8.isArrayBufferView=function(A){return A&&Y8.isArrayBuffer(A.buffer)&&A.byteLength!==void 0};function Wc6(A){if(!(A===8||A===16||A===24||A===32))throw Error("Only 8, 16, 24, or 32 bits supported: "+A)}Y8.ByteBuffer=GR8;function GR8(A){if(this.data="",this.read=0,typeof A==="string")this.data=A;else if(Y8.isArrayBuffer(A)||Y8.isArrayBufferView(A))if(typeof Buffer<"u"&&A instanceof Buffer)this.data=A.toString("binary");else{var q=new Uint8Array(A);try{this.data=String.fromCharCode.apply(null,q)}catch(Y){for(var K=0;KgzY)this.data.substr(0,1),this._constructedStringLength=0};Y8.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};Y8.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};Y8.ByteStringBuffer.prototype.putByte=function(A){return this.putBytes(String.fromCharCode(A))};Y8.ByteStringBuffer.prototype.fillWithByte=function(A,q){A=String.fromCharCode(A);var K=this.data;while(q>0){if(q&1)K+=A;if(q>>>=1,q>0)A+=A}return this.data=K,this._optimizeConstructedString(q),this};Y8.ByteStringBuffer.prototype.putBytes=function(A){return this.data+=A,this._optimizeConstructedString(A.length),this};Y8.ByteStringBuffer.prototype.putString=function(A){return this.putBytes(Y8.encodeUtf8(A))};Y8.ByteStringBuffer.prototype.putInt16=function(A){return this.putBytes(String.fromCharCode(A>>8&255)+String.fromCharCode(A&255))};Y8.ByteStringBuffer.prototype.putInt24=function(A){return this.putBytes(String.fromCharCode(A>>16&255)+String.fromCharCode(A>>8&255)+String.fromCharCode(A&255))};Y8.ByteStringBuffer.prototype.putInt32=function(A){return this.putBytes(String.fromCharCode(A>>24&255)+String.fromCharCode(A>>16&255)+String.fromCharCode(A>>8&255)+String.fromCharCode(A&255))};Y8.ByteStringBuffer.prototype.putInt16Le=function(A){return this.putBytes(String.fromCharCode(A&255)+String.fromCharCode(A>>8&255))};Y8.ByteStringBuffer.prototype.putInt24Le=function(A){return this.putBytes(String.fromCharCode(A&255)+String.fromCharCode(A>>8&255)+String.fromCharCode(A>>16&255))};Y8.ByteStringBuffer.prototype.putInt32Le=function(A){return this.putBytes(String.fromCharCode(A&255)+String.fromCharCode(A>>8&255)+String.fromCharCode(A>>16&255)+String.fromCharCode(A>>24&255))};Y8.ByteStringBuffer.prototype.putInt=function(A,q){Wc6(q);var K="";do q-=8,K+=String.fromCharCode(A>>q&255);while(q>0);return this.putBytes(K)};Y8.ByteStringBuffer.prototype.putSignedInt=function(A,q){if(A<0)A+=2<0);return q};Y8.ByteStringBuffer.prototype.getSignedInt=function(A){var q=this.getInt(A),K=2<=K)q-=K<<1;return q};Y8.ByteStringBuffer.prototype.getBytes=function(A){var q;if(A)A=Math.min(this.length(),A),q=this.data.slice(this.read,this.read+A),this.read+=A;else if(A===0)q="";else q=this.read===0?this.data:this.data.slice(this.read),this.clear();return q};Y8.ByteStringBuffer.prototype.bytes=function(A){return typeof A>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+A)};Y8.ByteStringBuffer.prototype.at=function(A){return this.data.charCodeAt(this.read+A)};Y8.ByteStringBuffer.prototype.setAt=function(A,q){return this.data=this.data.substr(0,this.read+A)+String.fromCharCode(q)+this.data.substr(this.read+A+1),this};Y8.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};Y8.ByteStringBuffer.prototype.copy=function(){var A=Y8.createBuffer(this.data);return A.read=this.read,A};Y8.ByteStringBuffer.prototype.compact=function(){if(this.read>0)this.data=this.data.slice(this.read),this.read=0;return this};Y8.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};Y8.ByteStringBuffer.prototype.truncate=function(A){var q=Math.max(0,this.length()-A);return this.data=this.data.substr(this.read,q),this.read=0,this};Y8.ByteStringBuffer.prototype.toHex=function(){var A="";for(var q=this.read;q=A)return this;q=Math.max(q||this.growSize,A);var K=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),Y=new Uint8Array(this.length()+q);return Y.set(K),this.data=new DataView(Y.buffer),this};Y8.DataBuffer.prototype.putByte=function(A){return this.accommodate(1),this.data.setUint8(this.write++,A),this};Y8.DataBuffer.prototype.fillWithByte=function(A,q){this.accommodate(q);for(var K=0;K>8&65535),this.data.setInt8(this.write,A>>16&255),this.write+=3,this};Y8.DataBuffer.prototype.putInt32=function(A){return this.accommodate(4),this.data.setInt32(this.write,A),this.write+=4,this};Y8.DataBuffer.prototype.putInt16Le=function(A){return this.accommodate(2),this.data.setInt16(this.write,A,!0),this.write+=2,this};Y8.DataBuffer.prototype.putInt24Le=function(A){return this.accommodate(3),this.data.setInt8(this.write,A>>16&255),this.data.setInt16(this.write,A>>8&65535,!0),this.write+=3,this};Y8.DataBuffer.prototype.putInt32Le=function(A){return this.accommodate(4),this.data.setInt32(this.write,A,!0),this.write+=4,this};Y8.DataBuffer.prototype.putInt=function(A,q){Wc6(q),this.accommodate(q/8);do q-=8,this.data.setInt8(this.write++,A>>q&255);while(q>0);return this};Y8.DataBuffer.prototype.putSignedInt=function(A,q){if(Wc6(q),this.accommodate(q/8),A<0)A+=2<0);return q};Y8.DataBuffer.prototype.getSignedInt=function(A){var q=this.getInt(A),K=2<=K)q-=K<<1;return q};Y8.DataBuffer.prototype.getBytes=function(A){var q;if(A)A=Math.min(this.length(),A),q=this.data.slice(this.read,this.read+A),this.read+=A;else if(A===0)q="";else q=this.read===0?this.data:this.data.slice(this.read),this.clear();return q};Y8.DataBuffer.prototype.bytes=function(A){return typeof A>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+A)};Y8.DataBuffer.prototype.at=function(A){return this.data.getUint8(this.read+A)};Y8.DataBuffer.prototype.setAt=function(A,q){return this.data.setUint8(A,q),this};Y8.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};Y8.DataBuffer.prototype.copy=function(){return new Y8.DataBuffer(this)};Y8.DataBuffer.prototype.compact=function(){if(this.read>0){var A=new Uint8Array(this.data.buffer,this.read),q=new Uint8Array(A.byteLength);q.set(A),this.data=new DataView(q),this.write-=this.read,this.read=0}return this};Y8.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};Y8.DataBuffer.prototype.truncate=function(A){return this.write=Math.max(0,this.length()-A),this.read=Math.min(this.read,this.write),this};Y8.DataBuffer.prototype.toHex=function(){var A="";for(var q=this.read;q0){if(q&1)K+=A;if(q>>>=1,q>0)A+=A}return K};Y8.xorBytes=function(A,q,K){var Y="",z="",w="",_=0,$=0;for(;K>0;--K,++_){if(z=A.charCodeAt(_)^q.charCodeAt(_),$>=10)Y+=w,w="",$=0;w+=String.fromCharCode(z),++$}return Y+=w,Y};Y8.hexToBytes=function(A){var q="",K=0;if(A.length&!0)K=1,q+=String.fromCharCode(parseInt(A[0],16));for(;K>24&255)+String.fromCharCode(A>>16&255)+String.fromCharCode(A>>8&255)+String.fromCharCode(A&255)};var X16="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",P16=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],yX4="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";Y8.encode64=function(A,q){var K="",Y="",z,w,_,$=0;while($>2),K+=X16.charAt((z&3)<<4|w>>4),isNaN(w))K+="==";else K+=X16.charAt((w&15)<<2|_>>6),K+=isNaN(_)?"=":X16.charAt(_&63);if(q&&K.length>q)Y+=K.substr(0,q)+`\r `,K=K.substr(q)}return Y+=K,Y};Y8.decode64=function(A){A=A.replace(/[^A-Za-z0-9\+\/\=]/g,"");var q="",K,Y,z,w,_=0;while(_>4),z!==64){if(q+=String.fromCharCode((Y&15)<<4|z>>2),w!==64)q+=String.fromCharCode((z&3)<<6|w)}return q};Y8.encodeUtf8=function(A){return unescape(encodeURIComponent(A))};Y8.decodeUtf8=function(A){return decodeURIComponent(escape(A))};Y8.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:LX4.encode,decode:LX4.decode}};Y8.binary.raw.encode=function(A){return String.fromCharCode.apply(null,A)};Y8.binary.raw.decode=function(A,q,K){var Y=q;if(!Y)Y=new Uint8Array(A.length);K=K||0;var z=K;for(var w=0;w>2),K+=X16.charAt((z&3)<<4|w>>4),isNaN(w))K+="==";else K+=X16.charAt((w&15)<<2|_>>6),K+=isNaN(_)?"=":X16.charAt(_&63);if(q&&K.length>q)Y+=K.substr(0,q)+`\r `,K=K.substr(q)}return Y+=K,Y};Y8.binary.base64.decode=function(A,q,K){var Y=q;if(!Y)Y=new Uint8Array(Math.ceil(A.length/4)*3);A=A.replace(/[^A-Za-z0-9\+\/\=]/g,""),K=K||0;var z,w,_,$,O=0,H=K;while(O>4,_!==64){if(Y[H++]=(w&15)<<4|_>>2,$!==64)Y[H++]=(_&3)<<6|$}return q?H-K:Y.subarray(0,H)};Y8.binary.base58.encode=function(A,q){return Y8.binary.baseN.encode(A,yX4,q)};Y8.binary.base58.decode=function(A,q){return Y8.binary.baseN.decode(A,yX4,q)};Y8.text={utf8:{},utf16:{}};Y8.text.utf8.encode=function(A,q,K){A=Y8.encodeUtf8(A);var Y=q;if(!Y)Y=new Uint8Array(A.length);K=K||0;var z=K;for(var w=0;w"u")K=["web","flash"];var z,w=!1,_=null;for(var $ in K){z=K[$];try{if(z==="flash"||z==="both"){if(q[0]===null)throw Error("Flash local storage not available.");Y=A.apply(this,q),w=z==="flash"}if(z==="web"||z==="both")q[0]=localStorage,Y=A.apply(this,q),w=!0}catch(O){_=O}if(w)break}if(!w)throw _;return Y};Y8.setItem=function(A,q,K,Y,z){iG1(QzY,arguments,z)};Y8.getItem=function(A,q,K,Y){return iG1(UzY,arguments,Y)};Y8.removeItem=function(A,q,K,Y){iG1(pzY,arguments,Y)};Y8.clearItems=function(A,q,K){iG1(dzY,arguments,K)};Y8.isEmpty=function(A){for(var q in A)if(A.hasOwnProperty(q))return!1;return!0};Y8.format=function(A){var q=/%./g,K,Y,z=0,w=[],_=0;while(K=q.exec(A)){if(Y=A.substring(_,q.lastIndex-2),Y.length>0)w.push(Y);_=q.lastIndex;var $=K[0][1];switch($){case"s":case"o":if(z");break;case"%":w.push("%");break;default:w.push("<%"+$+"?>")}}return w.push(A.substring(_)),w.join("")};Y8.formatNumber=function(A,q,K,Y){var z=A,w=isNaN(q=Math.abs(q))?2:q,_=K===void 0?",":K,$=Y===void 0?".":Y,O=z<0?"-":"",H=parseInt(z=Math.abs(+z||0).toFixed(w),10)+"",j=H.length>3?H.length%3:0;return O+(j?H.substr(0,j)+$:"")+H.substr(j).replace(/(\d{3})(?=\d)/g,"$1"+$)+(w?_+Math.abs(z-H).toFixed(w).slice(2):"")};Y8.formatSize=function(A){if(A>=1073741824)A=Y8.formatNumber(A/1073741824,2,".","")+" GiB";else if(A>=1048576)A=Y8.formatNumber(A/1048576,2,".","")+" MiB";else if(A>=1024)A=Y8.formatNumber(A/1024,0)+" KiB";else A=Y8.formatNumber(A,0)+" bytes";return A};Y8.bytesFromIP=function(A){if(A.indexOf(".")!==-1)return Y8.bytesFromIPv4(A);if(A.indexOf(":")!==-1)return Y8.bytesFromIPv6(A);return null};Y8.bytesFromIPv4=function(A){if(A=A.split("."),A.length!==4)return null;var q=Y8.createBuffer();for(var K=0;KK[Y].end-K[Y].start)Y=K.length-1}q.push(w)}if(K.length>0){var O=K[Y];if(O.end-O.start>0){if(q.splice(O.start,O.end-O.start+1,""),O.start===0)q.unshift("");if(O.end===7)q.push("")}}return q.join(":")};Y8.estimateCores=function(A,q){if(typeof A==="function")q=A,A={};if(A=A||{},"cores"in Y8&&!A.update)return q(null,Y8.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return Y8.cores=navigator.hardwareConcurrency,q(null,Y8.cores);if(typeof Worker>"u")return Y8.cores=1,q(null,Y8.cores);if(typeof Blob>"u")return Y8.cores=2,q(null,Y8.cores);var K=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(_){var $=Date.now(),O=$+4;while(Date.now()D.st&&j.stj.st&&D.st{var VP=w9();bz();SX4.exports=VP.cipher=VP.cipher||{};VP.cipher.algorithms=VP.cipher.algorithms||{};VP.cipher.createCipher=function(A,q){var K=A;if(typeof K==="string"){if(K=VP.cipher.getAlgorithm(K),K)K=K()}if(!K)throw Error("Unsupported algorithm: "+A);return new VP.cipher.BlockCipher({algorithm:K,key:q,decrypt:!1})};VP.cipher.createDecipher=function(A,q){var K=A;if(typeof K==="string"){if(K=VP.cipher.getAlgorithm(K),K)K=K()}if(!K)throw Error("Unsupported algorithm: "+A);return new VP.cipher.BlockCipher({algorithm:K,key:q,decrypt:!0})};VP.cipher.registerAlgorithm=function(A,q){A=A.toUpperCase(),VP.cipher.algorithms[A]=q};VP.cipher.getAlgorithm=function(A){if(A=A.toUpperCase(),A in VP.cipher.algorithms)return VP.cipher.algorithms[A];return null};var VR8=VP.cipher.BlockCipher=function(A){this.algorithm=A.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=A.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=A.decrypt,this.algorithm.initialize(A)};VR8.prototype.start=function(A){A=A||{};var q={};for(var K in A)q[K]=A[K];q.decrypt=this._decrypt,this._finish=!1,this._input=VP.util.createBuffer(),this.output=A.output||VP.util.createBuffer(),this.mode.start(q)};VR8.prototype.update=function(A){if(A)this._input.putBuffer(A);while(!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish);this._input.compact()};VR8.prototype.finish=function(A){if(A&&(this.mode.name==="ECB"||this.mode.name==="CBC"))this.mode.pad=function(K){return A(this.blockSize,K,!1)},this.mode.unpad=function(K){return A(this.blockSize,K,!0)};var q={};if(q.decrypt=this._decrypt,q.overflow=this._input.length()%this.blockSize,!this._decrypt&&this.mode.pad){if(!this.mode.pad(this._input,q))return!1}if(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad){if(!this.mode.unpad(this.output,q))return!1}if(this.mode.afterFinish){if(!this.mode.afterFinish(this.output,q))return!1}return!0}});var vR8=C((OG_,CX4)=>{var NP=w9();bz();NP.cipher=NP.cipher||{};var zY=CX4.exports=NP.cipher.modes=NP.cipher.modes||{};zY.ecb=function(A){A=A||{},this.name="ECB",this.cipher=A.cipher,this.blockSize=A.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints)};zY.ecb.prototype.start=function(A){};zY.ecb.prototype.encrypt=function(A,q,K){if(A.length()0))return!0;for(var Y=0;Y0))return!0;for(var Y=0;Y0)return!1;var K=A.length(),Y=A.at(K-1);if(Y>this.blockSize<<2)return!1;return A.truncate(Y),!0};zY.cbc=function(A){A=A||{},this.name="CBC",this.cipher=A.cipher,this.blockSize=A.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints)};zY.cbc.prototype.start=function(A){if(A.iv===null){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if(!("iv"in A))throw Error("Invalid IV parameter.");else this._iv=rG1(A.iv,this.blockSize),this._prev=this._iv.slice(0)};zY.cbc.prototype.encrypt=function(A,q,K){if(A.length()0))return!0;for(var Y=0;Y0))return!0;for(var Y=0;Y0)return!1;var K=A.length(),Y=A.at(K-1);if(Y>this.blockSize<<2)return!1;return A.truncate(Y),!0};zY.cfb=function(A){A=A||{},this.name="CFB",this.cipher=A.cipher,this.blockSize=A.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialBlock=Array(this._ints),this._partialOutput=NP.util.createBuffer(),this._partialBytes=0};zY.cfb.prototype.start=function(A){if(!("iv"in A))throw Error("Invalid IV parameter.");this._iv=rG1(A.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};zY.cfb.prototype.encrypt=function(A,q,K){var Y=A.length();if(Y===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&Y>=this.blockSize){for(var z=0;z0)w=this.blockSize-w;this._partialOutput.clear();for(var z=0;z0)A.read-=this.blockSize;else for(var z=0;z0)this._partialOutput.getBytes(this._partialBytes);if(w>0&&!K)return q.putBytes(this._partialOutput.getBytes(w-this._partialBytes)),this._partialBytes=w,!0;q.putBytes(this._partialOutput.getBytes(Y-this._partialBytes)),this._partialBytes=0};zY.cfb.prototype.decrypt=function(A,q,K){var Y=A.length();if(Y===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&Y>=this.blockSize){for(var z=0;z0)w=this.blockSize-w;this._partialOutput.clear();for(var z=0;z0)A.read-=this.blockSize;else for(var z=0;z0)this._partialOutput.getBytes(this._partialBytes);if(w>0&&!K)return q.putBytes(this._partialOutput.getBytes(w-this._partialBytes)),this._partialBytes=w,!0;q.putBytes(this._partialOutput.getBytes(Y-this._partialBytes)),this._partialBytes=0};zY.ofb=function(A){A=A||{},this.name="OFB",this.cipher=A.cipher,this.blockSize=A.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialOutput=NP.util.createBuffer(),this._partialBytes=0};zY.ofb.prototype.start=function(A){if(!("iv"in A))throw Error("Invalid IV parameter.");this._iv=rG1(A.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};zY.ofb.prototype.encrypt=function(A,q,K){var Y=A.length();if(A.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&Y>=this.blockSize){for(var z=0;z0)w=this.blockSize-w;this._partialOutput.clear();for(var z=0;z0)A.read-=this.blockSize;else for(var z=0;z0)this._partialOutput.getBytes(this._partialBytes);if(w>0&&!K)return q.putBytes(this._partialOutput.getBytes(w-this._partialBytes)),this._partialBytes=w,!0;q.putBytes(this._partialOutput.getBytes(Y-this._partialBytes)),this._partialBytes=0};zY.ofb.prototype.decrypt=zY.ofb.prototype.encrypt;zY.ctr=function(A){A=A||{},this.name="CTR",this.cipher=A.cipher,this.blockSize=A.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialOutput=NP.util.createBuffer(),this._partialBytes=0};zY.ctr.prototype.start=function(A){if(!("iv"in A))throw Error("Invalid IV parameter.");this._iv=rG1(A.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};zY.ctr.prototype.encrypt=function(A,q,K){var Y=A.length();if(Y===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&Y>=this.blockSize)for(var z=0;z0)w=this.blockSize-w;this._partialOutput.clear();for(var z=0;z0)A.read-=this.blockSize;if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if(w>0&&!K)return q.putBytes(this._partialOutput.getBytes(w-this._partialBytes)),this._partialBytes=w,!0;q.putBytes(this._partialOutput.getBytes(Y-this._partialBytes)),this._partialBytes=0}oG1(this._inBlock)};zY.ctr.prototype.decrypt=zY.ctr.prototype.encrypt;zY.gcm=function(A){A=A||{},this.name="GCM",this.cipher=A.cipher,this.blockSize=A.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints),this._partialOutput=NP.util.createBuffer(),this._partialBytes=0,this._R=3774873600};zY.gcm.prototype.start=function(A){if(!("iv"in A))throw Error("Invalid IV parameter.");var q=NP.util.createBuffer(A.iv);this._cipherLength=0;var K;if("additionalData"in A)K=NP.util.createBuffer(A.additionalData);else K=NP.util.createBuffer();if("tagLength"in A)this._tagLength=A.tagLength;else this._tagLength=128;if(this._tag=null,A.decrypt){if(this._tag=NP.util.createBuffer(A.tag).getBytes(),this._tag.length!==this._tagLength/8)throw Error("Authentication tag does not match tag length.")}this._hashBlock=Array(this._ints),this.tag=null,this._hashSubkey=Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var Y=q.length();if(Y===12)this._j0=[q.getInt32(),q.getInt32(),q.getInt32(),1];else{this._j0=[0,0,0,0];while(q.length()>0)this._j0=this.ghash(this._hashSubkey,this._j0,[q.getInt32(),q.getInt32(),q.getInt32(),q.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(NR8(Y*8)))}this._inBlock=this._j0.slice(0),oG1(this._inBlock),this._partialBytes=0,K=NP.util.createBuffer(K),this._aDataLength=NR8(K.length()*8);var z=K.length()%this.blockSize;if(z)K.fillWithByte(0,this.blockSize-z);this._s=[0,0,0,0];while(K.length()>0)this._s=this.ghash(this._hashSubkey,this._s,[K.getInt32(),K.getInt32(),K.getInt32(),K.getInt32()])};zY.gcm.prototype.encrypt=function(A,q,K){var Y=A.length();if(Y===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&Y>=this.blockSize){for(var z=0;z0)w=this.blockSize-w;this._partialOutput.clear();for(var z=0;z0)this._partialOutput.getBytes(this._partialBytes);if(w>0&&!K)return A.read-=this.blockSize,q.putBytes(this._partialOutput.getBytes(w-this._partialBytes)),this._partialBytes=w,!0;q.putBytes(this._partialOutput.getBytes(Y-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),oG1(this._inBlock)};zY.gcm.prototype.decrypt=function(A,q,K){var Y=A.length();if(Y0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),oG1(this._inBlock),this._hashBlock[0]=A.getInt32(),this._hashBlock[1]=A.getInt32(),this._hashBlock[2]=A.getInt32(),this._hashBlock[3]=A.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var z=0;z0;--Y)q[Y]=A[Y]>>>1|(A[Y-1]&1)<<31;if(q[0]=A[0]>>>1,K)q[0]^=this._R};zY.gcm.prototype.tableMultiply=function(A){var q=[0,0,0,0];for(var K=0;K<32;++K){var Y=K/8|0,z=A[Y]>>>(7-K%8)*4&15,w=this._m[K][z];q[0]^=w[0],q[1]^=w[1],q[2]^=w[2],q[3]^=w[3]}return q};zY.gcm.prototype.ghash=function(A,q,K){return q[0]^=K[0],q[1]^=K[1],q[2]^=K[2],q[3]^=K[3],this.tableMultiply(q)};zY.gcm.prototype.generateHashTable=function(A,q){var K=8/q,Y=4*K,z=16*K,w=Array(z);for(var _=0;_>>1,z=Array(K);z[Y]=A.slice(0);var w=Y>>>1;while(w>0)this.pow(z[2*w],z[w]=[]),w>>=1;w=2;while(w4){var K=A;A=NP.util.createBuffer();for(var Y=0;Y{var V$=w9();nG1();vR8();bz();xX4.exports=V$.aes=V$.aes||{};V$.aes.startEncrypting=function(A,q,K,Y){var z=aG1({key:A,output:K,decrypt:!1,mode:Y});return z.start(q),z};V$.aes.createEncryptionCipher=function(A,q){return aG1({key:A,output:null,decrypt:!1,mode:q})};V$.aes.startDecrypting=function(A,q,K,Y){var z=aG1({key:A,output:K,decrypt:!0,mode:Y});return z.start(q),z};V$.aes.createDecryptionCipher=function(A,q){return aG1({key:A,output:null,decrypt:!0,mode:q})};V$.aes.Algorithm=function(A,q){if(!LR8)IX4();var K=this;K.name=A,K.mode=new q({blockSize:16,cipher:{encrypt:function(Y,z){return ER8(K._w,Y,z,!1)},decrypt:function(Y,z){return ER8(K._w,Y,z,!0)}}}),K._init=!1};V$.aes.Algorithm.prototype.initialize=function(A){if(this._init)return;var q=A.key,K;if(typeof q==="string"&&(q.length===16||q.length===24||q.length===32))q=V$.util.createBuffer(q);else if(V$.util.isArray(q)&&(q.length===16||q.length===24||q.length===32)){K=q,q=V$.util.createBuffer();for(var Y=0;Y>>2;for(var Y=0;Y>8^$&255^99,xT[K]=$,kR8[$]=K,O=A[$],z=A[K],w=A[z],_=A[w],H=O<<24^$<<16^$<<8^($^O),j=(z^w^_)<<24^(K^_)<<16^(K^w^_)<<8^(K^z^_);for(var J=0;J<4;++J)hz6[J][K]=H,yx[J][$]=j,H=H<<24|H>>>8,j=j<<24|j>>>8;if(K===0)K=Y=1;else K=z^A[A[A[z^_]]],Y^=A[A[Y]]}}function bX4(A,q){var K=A.slice(0),Y,z=1,w=K.length,_=w+6+1,$=sf6*_;for(var O=w;O<$;++O){if(Y=K[O-1],O%w===0)Y=xT[Y>>>16&255]<<24^xT[Y>>>8&255]<<16^xT[Y&255]<<8^xT[Y>>>24]^hX4[z]<<24,z++;else if(w>6&&O%w===4)Y=xT[Y>>>24]<<24^xT[Y>>>16&255]<<16^xT[Y>>>8&255]<<8^xT[Y&255];K[O]=K[O-w]^Y}if(q){var H,j=yx[0],J=yx[1],M=yx[2],D=yx[3],X=K.slice(0);$=K.length;for(var O=0,P=$-sf6;O<$;O+=sf6,P-=sf6)if(O===0||O===$-sf6)X[O]=K[P],X[O+1]=K[P+3],X[O+2]=K[P+2],X[O+3]=K[P+1];else for(var W=0;W>>24]]^J[xT[H>>>16&255]]^M[xT[H>>>8&255]]^D[xT[H&255]];K=X}return K}function ER8(A,q,K,Y){var z=A.length/4-1,w,_,$,O,H;if(Y)w=yx[0],_=yx[1],$=yx[2],O=yx[3],H=kR8;else w=hz6[0],_=hz6[1],$=hz6[2],O=hz6[3],H=xT;var j,J,M,D,X,P,W;j=q[0]^A[0],J=q[Y?3:1]^A[1],M=q[2]^A[2],D=q[Y?1:3]^A[3];var Z=3;for(var G=1;G>>24]^_[J>>>16&255]^$[M>>>8&255]^O[D&255]^A[++Z],P=w[J>>>24]^_[M>>>16&255]^$[D>>>8&255]^O[j&255]^A[++Z],W=w[M>>>24]^_[D>>>16&255]^$[j>>>8&255]^O[J&255]^A[++Z],D=w[D>>>24]^_[j>>>16&255]^$[J>>>8&255]^O[M&255]^A[++Z],j=X,J=P,M=W;K[0]=H[j>>>24]<<24^H[J>>>16&255]<<16^H[M>>>8&255]<<8^H[D&255]^A[++Z],K[Y?3:1]=H[J>>>24]<<24^H[M>>>16&255]<<16^H[D>>>8&255]<<8^H[j&255]^A[++Z],K[2]=H[M>>>24]<<24^H[D>>>16&255]<<16^H[j>>>8&255]<<8^H[J&255]^A[++Z],K[Y?1:3]=H[D>>>24]<<24^H[j>>>16&255]<<16^H[J>>>8&255]<<8^H[M&255]^A[++Z]}function aG1(A){A=A||{};var q=(A.mode||"CBC").toUpperCase(),K="AES-"+q,Y;if(A.decrypt)Y=V$.cipher.createDecipher(K,A.key);else Y=V$.cipher.createCipher(K,A.key);var z=Y.start;return Y.start=function(w,_){var $=null;if(_ instanceof V$.util.ByteBuffer)$=_,_={};_=_||{},_.output=$,_.iv=w,z.call(Y,_)},Y}});var Z16=C((jG_,uX4)=>{var Zc6=w9();Zc6.pki=Zc6.pki||{};var yR8=uX4.exports=Zc6.pki.oids=Zc6.oids=Zc6.oids||{};function sA(A,q){yR8[A]=q,yR8[q]=A}function rw(A,q){yR8[A]=q}sA("1.2.840.113549.1.1.1","rsaEncryption");sA("1.2.840.113549.1.1.4","md5WithRSAEncryption");sA("1.2.840.113549.1.1.5","sha1WithRSAEncryption");sA("1.2.840.113549.1.1.7","RSAES-OAEP");sA("1.2.840.113549.1.1.8","mgf1");sA("1.2.840.113549.1.1.9","pSpecified");sA("1.2.840.113549.1.1.10","RSASSA-PSS");sA("1.2.840.113549.1.1.11","sha256WithRSAEncryption");sA("1.2.840.113549.1.1.12","sha384WithRSAEncryption");sA("1.2.840.113549.1.1.13","sha512WithRSAEncryption");sA("1.3.101.112","EdDSA25519");sA("1.2.840.10040.4.3","dsa-with-sha1");sA("1.3.14.3.2.7","desCBC");sA("1.3.14.3.2.26","sha1");sA("1.3.14.3.2.29","sha1WithRSASignature");sA("2.16.840.1.101.3.4.2.1","sha256");sA("2.16.840.1.101.3.4.2.2","sha384");sA("2.16.840.1.101.3.4.2.3","sha512");sA("2.16.840.1.101.3.4.2.4","sha224");sA("2.16.840.1.101.3.4.2.5","sha512-224");sA("2.16.840.1.101.3.4.2.6","sha512-256");sA("1.2.840.113549.2.2","md2");sA("1.2.840.113549.2.5","md5");sA("1.2.840.113549.1.7.1","data");sA("1.2.840.113549.1.7.2","signedData");sA("1.2.840.113549.1.7.3","envelopedData");sA("1.2.840.113549.1.7.4","signedAndEnvelopedData");sA("1.2.840.113549.1.7.5","digestedData");sA("1.2.840.113549.1.7.6","encryptedData");sA("1.2.840.113549.1.9.1","emailAddress");sA("1.2.840.113549.1.9.2","unstructuredName");sA("1.2.840.113549.1.9.3","contentType");sA("1.2.840.113549.1.9.4","messageDigest");sA("1.2.840.113549.1.9.5","signingTime");sA("1.2.840.113549.1.9.6","counterSignature");sA("1.2.840.113549.1.9.7","challengePassword");sA("1.2.840.113549.1.9.8","unstructuredAddress");sA("1.2.840.113549.1.9.14","extensionRequest");sA("1.2.840.113549.1.9.20","friendlyName");sA("1.2.840.113549.1.9.21","localKeyId");sA("1.2.840.113549.1.9.22.1","x509Certificate");sA("1.2.840.113549.1.12.10.1.1","keyBag");sA("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");sA("1.2.840.113549.1.12.10.1.3","certBag");sA("1.2.840.113549.1.12.10.1.4","crlBag");sA("1.2.840.113549.1.12.10.1.5","secretBag");sA("1.2.840.113549.1.12.10.1.6","safeContentsBag");sA("1.2.840.113549.1.5.13","pkcs5PBES2");sA("1.2.840.113549.1.5.12","pkcs5PBKDF2");sA("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");sA("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");sA("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");sA("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");sA("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");sA("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");sA("1.2.840.113549.2.7","hmacWithSHA1");sA("1.2.840.113549.2.8","hmacWithSHA224");sA("1.2.840.113549.2.9","hmacWithSHA256");sA("1.2.840.113549.2.10","hmacWithSHA384");sA("1.2.840.113549.2.11","hmacWithSHA512");sA("1.2.840.113549.3.7","des-EDE3-CBC");sA("2.16.840.1.101.3.4.1.2","aes128-CBC");sA("2.16.840.1.101.3.4.1.22","aes192-CBC");sA("2.16.840.1.101.3.4.1.42","aes256-CBC");sA("2.5.4.3","commonName");sA("2.5.4.4","surname");sA("2.5.4.5","serialNumber");sA("2.5.4.6","countryName");sA("2.5.4.7","localityName");sA("2.5.4.8","stateOrProvinceName");sA("2.5.4.9","streetAddress");sA("2.5.4.10","organizationName");sA("2.5.4.11","organizationalUnitName");sA("2.5.4.12","title");sA("2.5.4.13","description");sA("2.5.4.15","businessCategory");sA("2.5.4.17","postalCode");sA("2.5.4.42","givenName");sA("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");sA("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");sA("2.16.840.1.113730.1.1","nsCertType");sA("2.16.840.1.113730.1.13","nsComment");rw("2.5.29.1","authorityKeyIdentifier");rw("2.5.29.2","keyAttributes");rw("2.5.29.3","certificatePolicies");rw("2.5.29.4","keyUsageRestriction");rw("2.5.29.5","policyMapping");rw("2.5.29.6","subtreesConstraint");rw("2.5.29.7","subjectAltName");rw("2.5.29.8","issuerAltName");rw("2.5.29.9","subjectDirectoryAttributes");rw("2.5.29.10","basicConstraints");rw("2.5.29.11","nameConstraints");rw("2.5.29.12","policyConstraints");rw("2.5.29.13","basicConstraints");sA("2.5.29.14","subjectKeyIdentifier");sA("2.5.29.15","keyUsage");rw("2.5.29.16","privateKeyUsagePeriod");sA("2.5.29.17","subjectAltName");sA("2.5.29.18","issuerAltName");sA("2.5.29.19","basicConstraints");rw("2.5.29.20","cRLNumber");rw("2.5.29.21","cRLReason");rw("2.5.29.22","expirationDate");rw("2.5.29.23","instructionCode");rw("2.5.29.24","invalidityDate");rw("2.5.29.25","cRLDistributionPoints");rw("2.5.29.26","issuingDistributionPoint");rw("2.5.29.27","deltaCRLIndicator");rw("2.5.29.28","issuingDistributionPoint");rw("2.5.29.29","certificateIssuer");rw("2.5.29.30","nameConstraints");sA("2.5.29.31","cRLDistributionPoints");sA("2.5.29.32","certificatePolicies");rw("2.5.29.33","policyMappings");rw("2.5.29.34","policyConstraints");sA("2.5.29.35","authorityKeyIdentifier");rw("2.5.29.36","policyConstraints");sA("2.5.29.37","extKeyUsage");rw("2.5.29.46","freshestCRL");rw("2.5.29.54","inhibitAnyPolicy");sA("1.3.6.1.4.1.11129.2.4.2","timestampList");sA("1.3.6.1.5.5.7.1.1","authorityInfoAccess");sA("1.3.6.1.5.5.7.3.1","serverAuth");sA("1.3.6.1.5.5.7.3.2","clientAuth");sA("1.3.6.1.5.5.7.3.3","codeSigning");sA("1.3.6.1.5.5.7.3.4","emailProtection");sA("1.3.6.1.5.5.7.3.8","timeStamping")});var Rx=C((JG_,mX4)=>{var MO=w9();bz();Z16();var T4=mX4.exports=MO.asn1=MO.asn1||{};T4.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};T4.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};T4.create=function(A,q,K,Y,z){if(MO.util.isArray(Y)){var w=[];for(var _=0;_q){var Y=Error("Too few bytes to parse DER.");throw Y.available=A.length(),Y.remaining=q,Y.requested=K,Y}}var czY=function(A,q){var K=A.getByte();if(q--,K===128)return;var Y,z=K&128;if(!z)Y=K;else{var w=K&127;Gc6(A,q,w),Y=A.getInt(w<<3)}if(Y<0)throw Error("Negative length: "+Y);return Y};T4.fromDer=function(A,q){if(q===void 0)q={strict:!0,parseAllBytes:!0,decodeBitStrings:!0};if(typeof q==="boolean")q={strict:q,parseAllBytes:!0,decodeBitStrings:!0};if(!("strict"in q))q.strict=!0;if(!("parseAllBytes"in q))q.parseAllBytes=!0;if(!("decodeBitStrings"in q))q.decodeBitStrings=!0;if(typeof A==="string")A=MO.util.createBuffer(A);var K=A.length(),Y=sG1(A,A.length(),0,q);if(q.parseAllBytes&&A.length()!==0){var z=Error("Unparsed DER bytes remain after ASN.1 parsing.");throw z.byteCount=K,z.remaining=A.length(),z}return Y};function sG1(A,q,K,Y){var z;Gc6(A,q,2);var w=A.getByte();q--;var _=w&192,$=w&31;z=A.length();var O=czY(A,q);if(q-=z-A.length(),O!==void 0&&O>q){if(Y.strict){var H=Error("Too few bytes to read ASN.1 value.");throw H.available=A.length(),H.remaining=q,H.requested=O,H}O=q}var j,J,M=(w&32)===32;if(M)if(j=[],O===void 0)for(;;){if(Gc6(A,q,2),A.bytes(2)===String.fromCharCode(0,0)){A.getBytes(2),q-=2;break}z=A.length(),j.push(sG1(A,q,K+1,Y)),q-=z-A.length()}else while(O>0)z=A.length(),j.push(sG1(A,O,K+1,Y)),q-=z-A.length(),O-=z-A.length();if(j===void 0&&_===T4.Class.UNIVERSAL&&$===T4.Type.BITSTRING)J=A.bytes(O);if(j===void 0&&Y.decodeBitStrings&&_===T4.Class.UNIVERSAL&&$===T4.Type.BITSTRING&&O>1){var D=A.read,X=q,P=0;if($===T4.Type.BITSTRING)Gc6(A,q,1),P=A.getByte(),q--;if(P===0)try{z=A.length();var W={strict:!0,decodeBitStrings:!0},Z=sG1(A,q,K+1,W),G=z-A.length();if(q-=G,$==T4.Type.BITSTRING)G++;var f=Z.tagClass;if(G===O&&(f===T4.Class.UNIVERSAL||f===T4.Class.CONTEXT_SPECIFIC))j=[Z]}catch(N){}if(j===void 0)A.read=D,q=X}if(j===void 0){if(O===void 0){if(Y.strict)throw Error("Non-constructed ASN.1 object of indefinite length.");O=q}if($===T4.Type.BMPSTRING){j="";for(;O>0;O-=2)Gc6(A,q,2),j+=String.fromCharCode(A.getInt16()),q-=2}else j=A.getBytes(O),q-=O}var V=J===void 0?null:{bitStringContents:J};return T4.create(_,$,M,j,V)}T4.toDer=function(A){var q=MO.util.createBuffer(),K=A.tagClass|A.type,Y=MO.util.createBuffer(),z=!1;if("bitStringContents"in A){if(z=!0,A.original)z=T4.equals(A,A.original)}if(z)Y.putBytes(A.bitStringContents);else if(A.composed){if(A.constructed)K|=32;else Y.putByte(0);for(var w=0;w1&&(A.value.charCodeAt(0)===0&&(A.value.charCodeAt(1)&128)===0||A.value.charCodeAt(0)===255&&(A.value.charCodeAt(1)&128)===128))Y.putBytes(A.value.substr(1));else Y.putBytes(A.value);if(q.putByte(K),Y.length()<=127)q.putByte(Y.length()&127);else{var _=Y.length(),$="";do $+=String.fromCharCode(_&255),_=_>>>8;while(_>0);q.putByte($.length|128);for(var w=$.length-1;w>=0;--w)q.putByte($.charCodeAt(w))}return q.putBuffer(Y),q};T4.oidToDer=function(A){var q=A.split("."),K=MO.util.createBuffer();K.putByte(40*parseInt(q[0],10)+parseInt(q[1],10));var Y,z,w,_;for(var $=2;$>>7,!Y)_|=128;z.push(_),Y=!1}while(w>0);for(var O=z.length-1;O>=0;--O)K.putByte(z[O])}return K};T4.derToOid=function(A){var q;if(typeof A==="string")A=MO.util.createBuffer(A);var K=A.getByte();q=Math.floor(K/40)+"."+K%40;var Y=0;while(A.length()>0)if(K=A.getByte(),Y=Y<<7,K&128)Y+=K&127;else q+="."+(Y+K),Y=0;return q};T4.utcTimeToDate=function(A){var q=new Date,K=parseInt(A.substr(0,2),10);K=K>=50?1900+K:2000+K;var Y=parseInt(A.substr(2,2),10)-1,z=parseInt(A.substr(4,2),10),w=parseInt(A.substr(6,2),10),_=parseInt(A.substr(8,2),10),$=0;if(A.length>11){var O=A.charAt(10),H=10;if(O!=="+"&&O!=="-")$=parseInt(A.substr(10,2),10),H+=2}if(q.setUTCFullYear(K,Y,z),q.setUTCHours(w,_,$,0),H){if(O=A.charAt(H),O==="+"||O==="-"){var j=parseInt(A.substr(H+1,2),10),J=parseInt(A.substr(H+4,2),10),M=j*60+J;if(M*=60000,O==="+")q.setTime(+q-M);else q.setTime(+q+M)}}return q};T4.generalizedTimeToDate=function(A){var q=new Date,K=parseInt(A.substr(0,4),10),Y=parseInt(A.substr(4,2),10)-1,z=parseInt(A.substr(6,2),10),w=parseInt(A.substr(8,2),10),_=parseInt(A.substr(10,2),10),$=parseInt(A.substr(12,2),10),O=0,H=0,j=!1;if(A.charAt(A.length-1)==="Z")j=!0;var J=A.length-5,M=A.charAt(J);if(M==="+"||M==="-"){var D=parseInt(A.substr(J+1,2),10),X=parseInt(A.substr(J+4,2),10);if(H=D*60+X,H*=60000,M==="+")H*=-1;j=!0}if(A.charAt(14)===".")O=parseFloat(A.substr(14),10)*1000;if(j)q.setUTCFullYear(K,Y,z),q.setUTCHours(w,_,$,O),q.setTime(+q+H);else q.setFullYear(K,Y,z),q.setHours(w,_,$,O);return q};T4.dateToUtcTime=function(A){if(typeof A==="string")return A;var q="",K=[];K.push((""+A.getUTCFullYear()).substr(2)),K.push(""+(A.getUTCMonth()+1)),K.push(""+A.getUTCDate()),K.push(""+A.getUTCHours()),K.push(""+A.getUTCMinutes()),K.push(""+A.getUTCSeconds());for(var Y=0;Y=-128&&A<128)return q.putSignedInt(A,8);if(A>=-32768&&A<32768)return q.putSignedInt(A,16);if(A>=-8388608&&A<8388608)return q.putSignedInt(A,24);if(A>=-2147483648&&A<2147483648)return q.putSignedInt(A,32);var K=Error("Integer too large; max is 32-bits.");throw K.integer=A,K};T4.derToInteger=function(A){if(typeof A==="string")A=MO.util.createBuffer(A);var q=A.length()*8;if(q>32)throw Error("Integer too large; max is 32-bits.");return A.getSignedInt(q)};T4.validate=function(A,q,K,Y){var z=!1;if((A.tagClass===q.tagClass||typeof q.tagClass>"u")&&(A.type===q.type||typeof q.type>"u")){if(A.constructed===q.constructed||typeof q.constructed>"u"){if(z=!0,q.value&&MO.util.isArray(q.value)){var w=0;for(var _=0;z&&_0)Y+=` `;var z="";for(var w=0;w1)Y+="0x"+MO.util.bytesToHex(A.value.slice(1));else Y+="(none)";if(A.value.length>0){var H=A.value.charCodeAt(0);if(H==1)Y+=" (1 unused bit shown)";else if(H>1)Y+=" ("+H+" unused bits shown)"}}else if(A.type===T4.Type.OCTETSTRING){if(!BX4.test(A.value))Y+="("+A.value+") ";Y+="0x"+MO.util.bytesToHex(A.value)}else if(A.type===T4.Type.UTF8)try{Y+=MO.util.decodeUtf8(A.value)}catch(j){if(j.message==="URI malformed")Y+="0x"+MO.util.bytesToHex(A.value)+" (malformed UTF8)";else throw j}else if(A.type===T4.Type.PRINTABLESTRING||A.type===T4.Type.IA5String)Y+=A.value;else if(BX4.test(A.value))Y+="0x"+MO.util.bytesToHex(A.value);else if(A.value.length===0)Y+="[null]";else Y+=A.value}return Y}});var cF=C((MG_,gX4)=>{var tG1=w9();gX4.exports=tG1.md=tG1.md||{};tG1.md.algorithms=tG1.md.algorithms||{}});var ef6=C((DG_,FX4)=>{var ki=w9();cF();bz();var lzY=FX4.exports=ki.hmac=ki.hmac||{};lzY.create=function(){var A=null,q=null,K=null,Y=null,z={};return z.start=function(w,_){if(w!==null)if(typeof w==="string")if(w=w.toLowerCase(),w in ki.md.algorithms)q=ki.md.algorithms[w].create();else throw Error('Unknown hash algorithm "'+w+'"');else q=w;if(_===null)_=A;else{if(typeof _==="string")_=ki.util.createBuffer(_);else if(ki.util.isArray(_)){var $=_;_=ki.util.createBuffer();for(var O=0;O<$.length;++O)_.putByte($[O])}var H=_.length();if(H>q.blockLength)q.start(),q.update(_.bytes()),_=q.digest();K=ki.util.createBuffer(),Y=ki.util.createBuffer(),H=_.length();for(var O=0;O{var lF=w9();cF();bz();var UX4=dX4.exports=lF.md5=lF.md5||{};lF.md.md5=lF.md.algorithms.md5=UX4;UX4.create=function(){if(!pX4)izY();var A=null,q=lF.util.createBuffer(),K=Array(16),Y={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return Y.start=function(){Y.messageLength=0,Y.fullMessageLength=Y.messageLength64=[];var z=Y.messageLengthSize/4;for(var w=0;w>>0,_>>>0];for(var $=Y.fullMessageLength.length-1;$>=0;--$)Y.fullMessageLength[$]+=_[1],_[1]=_[0]+(Y.fullMessageLength[$]/4294967296>>>0),Y.fullMessageLength[$]=Y.fullMessageLength[$]>>>0,_[0]=_[1]/4294967296>>>0;if(q.putBytes(z),QX4(A,K,q),q.read>2048||q.length()===0)q.compact();return Y},Y.digest=function(){var z=lF.util.createBuffer();z.putBytes(q.bytes());var w=Y.fullMessageLength[Y.fullMessageLength.length-1]+Y.messageLengthSize,_=w&Y.blockLength-1;z.putBytes(RR8.substr(0,Y.blockLength-_));var $,O=0;for(var H=Y.fullMessageLength.length-1;H>=0;--H)$=Y.fullMessageLength[H]*8+O,O=$/4294967296>>>0,z.putInt32Le($>>>0);var j={h0:A.h0,h1:A.h1,h2:A.h2,h3:A.h3};QX4(j,K,z);var J=lF.util.createBuffer();return J.putInt32Le(j.h0),J.putInt32Le(j.h1),J.putInt32Le(j.h2),J.putInt32Le(j.h3),J},Y};var RR8=null,eG1=null,fc6=null,AT6=null,pX4=!1;function izY(){RR8=String.fromCharCode(128),RR8+=lF.util.fillString(String.fromCharCode(0),64),eG1=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],fc6=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],AT6=Array(64);for(var A=0;A<64;++A)AT6[A]=Math.floor(Math.abs(Math.sin(A+1))*4294967296);pX4=!0}function QX4(A,q,K){var Y,z,w,_,$,O,H,j,J=K.length();while(J>=64){z=A.h0,w=A.h1,_=A.h2,$=A.h3;for(j=0;j<16;++j)q[j]=K.getInt32Le(),O=$^w&(_^$),Y=z+O+AT6[j]+q[j],H=fc6[j],z=$,$=_,_=w,w+=Y<>>32-H;for(;j<32;++j)O=_^$&(w^_),Y=z+O+AT6[j]+q[eG1[j]],H=fc6[j],z=$,$=_,_=w,w+=Y<>>32-H;for(;j<48;++j)O=w^_^$,Y=z+O+AT6[j]+q[eG1[j]],H=fc6[j],z=$,$=_,_=w,w+=Y<>>32-H;for(;j<64;++j)O=_^(w|~$),Y=z+O+AT6[j]+q[eG1[j]],H=fc6[j],z=$,$=_,_=w,w+=Y<>>32-H;A.h0=A.h0+z|0,A.h1=A.h1+w|0,A.h2=A.h2+_|0,A.h3=A.h3+$|0,J-=64}}});var Iz6=C((PG_,lX4)=>{var Kf1=w9();bz();var cX4=lX4.exports=Kf1.pem=Kf1.pem||{};cX4.encode=function(A,q){q=q||{};var K="-----BEGIN "+A.type+`-----\r `,Y;if(A.procType)Y={name:"Proc-Type",values:[String(A.procType.version),A.procType.type]},K+=qf1(Y);if(A.contentDomain)Y={name:"Content-Domain",values:[A.contentDomain]},K+=qf1(Y);if(A.dekInfo){if(Y={name:"DEK-Info",values:[A.dekInfo.algorithm]},A.dekInfo.parameters)Y.values.push(A.dekInfo.parameters);K+=qf1(Y)}if(A.headers)for(var z=0;z65&&_!==-1){var $=q[_];if($===",")++_,q=q.substr(0,_)+`\r `+q.substr(_);else q=q.substr(0,_)+`\r `+$+q.substr(_+1);w=z-_-1,_=-1,++z}else if(q[z]===" "||q[z]==="\t"||q[z]===",")_=z;return q}function nzY(A){return A.replace(/^\s+/,"")}});var Tc6=C((WG_,nX4)=>{var HH=w9();nG1();vR8();bz();nX4.exports=HH.des=HH.des||{};HH.des.startEncrypting=function(A,q,K,Y){var z=Yf1({key:A,output:K,decrypt:!1,mode:Y||(q===null?"ECB":"CBC")});return z.start(q),z};HH.des.createEncryptionCipher=function(A,q){return Yf1({key:A,output:null,decrypt:!1,mode:q})};HH.des.startDecrypting=function(A,q,K,Y){var z=Yf1({key:A,output:K,decrypt:!0,mode:Y||(q===null?"ECB":"CBC")});return z.start(q),z};HH.des.createDecryptionCipher=function(A,q){return Yf1({key:A,output:null,decrypt:!0,mode:q})};HH.des.Algorithm=function(A,q){var K=this;K.name=A,K.mode=new q({blockSize:8,cipher:{encrypt:function(Y,z){return iX4(K._keys,Y,z,!1)},decrypt:function(Y,z){return iX4(K._keys,Y,z,!0)}}}),K._init=!1};HH.des.Algorithm.prototype.initialize=function(A){if(this._init)return;var q=HH.util.createBuffer(A.key);if(this.name.indexOf("3DES")===0){if(q.length()!==24)throw Error("Invalid Triple-DES key size: "+q.length()*8)}this._keys=KwY(q),this._init=!0};iF("DES-ECB",HH.cipher.modes.ecb);iF("DES-CBC",HH.cipher.modes.cbc);iF("DES-CFB",HH.cipher.modes.cfb);iF("DES-OFB",HH.cipher.modes.ofb);iF("DES-CTR",HH.cipher.modes.ctr);iF("3DES-ECB",HH.cipher.modes.ecb);iF("3DES-CBC",HH.cipher.modes.cbc);iF("3DES-CFB",HH.cipher.modes.cfb);iF("3DES-OFB",HH.cipher.modes.ofb);iF("3DES-CTR",HH.cipher.modes.ctr);function iF(A,q){var K=function(){return new HH.des.Algorithm(A,q)};HH.cipher.registerAlgorithm(A,K)}var rzY=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],ozY=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],azY=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],szY=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],tzY=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],ezY=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],AwY=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],qwY=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function KwY(A){var q=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],K=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],Y=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],z=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],w=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],_=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],$=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],O=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],H=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],j=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],J=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],M=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],D=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],X=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],P=A.length()>8?3:1,W=[],Z=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],G=0,f;for(var V=0;V>>4^v)&252645135,v^=f,N^=f<<4,f=(v>>>-16^N)&65535,N^=f,v^=f<<-16,f=(N>>>2^v)&858993459,v^=f,N^=f<<2,f=(v>>>-16^N)&65535,N^=f,v^=f<<-16,f=(N>>>1^v)&1431655765,v^=f,N^=f<<1,f=(v>>>8^N)&16711935,N^=f,v^=f<<8,f=(N>>>1^v)&1431655765,v^=f,N^=f<<1,f=N<<8|v>>>20&240,N=v<<24|v<<8&16711680|v>>>8&65280|v>>>24&240,v=f;for(var y=0;y>>26,v=v<<2|v>>>26;else N=N<<1|N>>>27,v=v<<1|v>>>27;N&=-15,v&=-15;var R=q[N>>>28]|K[N>>>24&15]|Y[N>>>20&15]|z[N>>>16&15]|w[N>>>12&15]|_[N>>>8&15]|$[N>>>4&15],h=O[v>>>28]|H[v>>>24&15]|j[v>>>20&15]|J[v>>>16&15]|M[v>>>12&15]|D[v>>>8&15]|X[v>>>4&15];f=(h>>>16^R)&65535,W[G++]=R^f,W[G++]=h^f<<16}}return W}function iX4(A,q,K,Y){var z=A.length===32?3:9,w;if(z===3)w=Y?[30,-2,-2]:[0,32,2];else w=Y?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var _,$=q[0],O=q[1];_=($>>>4^O)&252645135,O^=_,$^=_<<4,_=($>>>16^O)&65535,O^=_,$^=_<<16,_=(O>>>2^$)&858993459,$^=_,O^=_<<2,_=(O>>>8^$)&16711935,$^=_,O^=_<<8,_=($>>>1^O)&1431655765,O^=_,$^=_<<1,$=$<<1|$>>>31,O=O<<1|O>>>31;for(var H=0;H>>4|O<<28)^A[M+1];_=$,$=O,O=_^(ozY[D>>>24&63]|szY[D>>>16&63]|ezY[D>>>8&63]|qwY[D&63]|rzY[X>>>24&63]|azY[X>>>16&63]|tzY[X>>>8&63]|AwY[X&63])}_=$,$=O,O=_}$=$>>>1|$<<31,O=O>>>1|O<<31,_=($>>>1^O)&1431655765,O^=_,$^=_<<1,_=(O>>>8^$)&16711935,$^=_,O^=_<<8,_=(O>>>2^$)&858993459,$^=_,O^=_<<2,_=($>>>16^O)&65535,O^=_,$^=_<<16,_=($>>>4^O)&252645135,O^=_,$^=_<<4,K[0]=$,K[1]=O}function Yf1(A){A=A||{};var q=(A.mode||"CBC").toUpperCase(),K="DES-"+q,Y;if(A.decrypt)Y=HH.cipher.createDecipher(K,A.key);else Y=HH.cipher.createCipher(K,A.key);var z=Y.start;return Y.start=function(w,_){var $=null;if(_ instanceof HH.util.ByteBuffer)$=_,_={};_=_||{},_.output=$,_.iv=w,z.call(Y,_)},Y}});var zf1=C((ZG_,rX4)=>{var uT=w9();ef6();cF();bz();var YwY=uT.pkcs5=uT.pkcs5||{},Ei;if(uT.util.isNodejs&&!uT.options.usePureJavaScript)Ei=g6("crypto");rX4.exports=uT.pbkdf2=YwY.pbkdf2=function(A,q,K,Y,z,w){if(typeof z==="function")w=z,z=null;if(uT.util.isNodejs&&!uT.options.usePureJavaScript&&Ei.pbkdf2&&(z===null||typeof z!=="object")&&(Ei.pbkdf2Sync.length>4||(!z||z==="sha1"))){if(typeof z!=="string")z="sha1";if(A=Buffer.from(A,"binary"),q=Buffer.from(q,"binary"),!w){if(Ei.pbkdf2Sync.length===4)return Ei.pbkdf2Sync(A,q,K,Y).toString("binary");return Ei.pbkdf2Sync(A,q,K,Y,z).toString("binary")}if(Ei.pbkdf2Sync.length===4)return Ei.pbkdf2(A,q,K,Y,function(f,V){if(f)return w(f);w(null,V.toString("binary"))});return Ei.pbkdf2(A,q,K,Y,z,function(f,V){if(f)return w(f);w(null,V.toString("binary"))})}if(typeof z>"u"||z===null)z="sha1";if(typeof z==="string"){if(!(z in uT.md.algorithms))throw Error("Unknown hash algorithm: "+z);z=uT.md[z].create()}var _=z.digestLength;if(Y>4294967295*_){var $=Error("Derived key is too long.");if(w)return w($);throw $}var O=Math.ceil(Y/_),H=Y-(O-1)*_,j=uT.hmac.create();j.start(z,A);var J="",M,D,X;if(!w){for(var P=1;P<=O;++P){j.start(null,null),j.update(q),j.update(uT.util.int32ToBytes(P)),M=X=j.digest().getBytes();for(var W=2;W<=K;++W)j.start(null,null),j.update(X),D=j.digest().getBytes(),M=uT.util.xorBytes(M,D,_),X=D;J+=PO)return w(null,J);j.start(null,null),j.update(q),j.update(uT.util.int32ToBytes(P)),M=X=j.digest().getBytes(),W=2,G()}function G(){if(W<=K)return j.start(null,null),j.update(X),D=j.digest().getBytes(),M=uT.util.xorBytes(M,D,_),X=D,++W,uT.util.setImmediate(G);J+=P{var nF=w9();cF();bz();var aX4=eX4.exports=nF.sha256=nF.sha256||{};nF.md.sha256=nF.md.algorithms.sha256=aX4;aX4.create=function(){if(!sX4)zwY();var A=null,q=nF.util.createBuffer(),K=Array(64),Y={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return Y.start=function(){Y.messageLength=0,Y.fullMessageLength=Y.messageLength64=[];var z=Y.messageLengthSize/4;for(var w=0;w>>0,_>>>0];for(var $=Y.fullMessageLength.length-1;$>=0;--$)Y.fullMessageLength[$]+=_[1],_[1]=_[0]+(Y.fullMessageLength[$]/4294967296>>>0),Y.fullMessageLength[$]=Y.fullMessageLength[$]>>>0,_[0]=_[1]/4294967296>>>0;if(q.putBytes(z),oX4(A,K,q),q.read>2048||q.length()===0)q.compact();return Y},Y.digest=function(){var z=nF.util.createBuffer();z.putBytes(q.bytes());var w=Y.fullMessageLength[Y.fullMessageLength.length-1]+Y.messageLengthSize,_=w&Y.blockLength-1;z.putBytes(SR8.substr(0,Y.blockLength-_));var $,O,H=Y.fullMessageLength[0]*8;for(var j=0;j>>0,H+=O,z.putInt32(H>>>0),H=$>>>0;z.putInt32(H);var J={h0:A.h0,h1:A.h1,h2:A.h2,h3:A.h3,h4:A.h4,h5:A.h5,h6:A.h6,h7:A.h7};oX4(J,K,z);var M=nF.util.createBuffer();return M.putInt32(J.h0),M.putInt32(J.h1),M.putInt32(J.h2),M.putInt32(J.h3),M.putInt32(J.h4),M.putInt32(J.h5),M.putInt32(J.h6),M.putInt32(J.h7),M},Y};var SR8=null,sX4=!1,tX4=null;function zwY(){SR8=String.fromCharCode(128),SR8+=nF.util.fillString(String.fromCharCode(0),64),tX4=[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],sX4=!0}function oX4(A,q,K){var Y,z,w,_,$,O,H,j,J,M,D,X,P,W,Z,G=K.length();while(G>=64){for(H=0;H<16;++H)q[H]=K.getInt32();for(;H<64;++H)Y=q[H-2],Y=(Y>>>17|Y<<15)^(Y>>>19|Y<<13)^Y>>>10,z=q[H-15],z=(z>>>7|z<<25)^(z>>>18|z<<14)^z>>>3,q[H]=Y+q[H-7]+z+q[H-16]|0;j=A.h0,J=A.h1,M=A.h2,D=A.h3,X=A.h4,P=A.h5,W=A.h6,Z=A.h7;for(H=0;H<64;++H)_=(X>>>6|X<<26)^(X>>>11|X<<21)^(X>>>25|X<<7),$=W^X&(P^W),w=(j>>>2|j<<30)^(j>>>13|j<<19)^(j>>>22|j<<10),O=j&J|M&(j^J),Y=Z+_+$+tX4[H]+q[H],z=w+O,Z=W,W=P,P=X,X=D+Y>>>0,D=M,M=J,J=j,j=Y+z>>>0;A.h0=A.h0+j|0,A.h1=A.h1+J|0,A.h2=A.h2+M|0,A.h3=A.h3+D|0,A.h4=A.h4+X|0,A.h5=A.h5+P|0,A.h6=A.h6+W|0,A.h7=A.h7+Z|0,G-=64}}});var hR8=C((fG_,AP4)=>{var rF=w9();bz();var wf1=null;if(rF.util.isNodejs&&!rF.options.usePureJavaScript&&!process.versions["node-webkit"])wf1=g6("crypto");var wwY=AP4.exports=rF.prng=rF.prng||{};wwY.create=function(A){var q={plugin:A,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},K=A.md,Y=Array(32);for(var z=0;z<32;++z)Y[z]=K.create();q.pools=Y,q.pool=0,q.generate=function(H,j){if(!j)return q.generateSync(H);var J=q.plugin.cipher,M=q.plugin.increment,D=q.plugin.formatKey,X=q.plugin.formatSeed,P=rF.util.createBuffer();q.key=null,W();function W(Z){if(Z)return j(Z);if(P.length()>=H)return j(null,P.getBytes(H));if(q.generated>1048575)q.key=null;if(q.key===null)return rF.util.nextTick(function(){w(W)});var G=J(q.key,q.seed);q.generated+=G.length,P.putBytes(G),q.key=D(J(q.key,M(q.seed))),q.seed=X(J(q.key,q.seed)),rF.util.setImmediate(W)}},q.generateSync=function(H){var j=q.plugin.cipher,J=q.plugin.increment,M=q.plugin.formatKey,D=q.plugin.formatSeed;q.key=null;var X=rF.util.createBuffer();while(X.length()1048575)q.key=null;if(q.key===null)_();var P=j(q.key,q.seed);q.generated+=P.length,X.putBytes(P),q.key=M(j(q.key,J(q.seed))),q.seed=D(j(q.key,q.seed))}return X.getBytes(H)};function w(H){if(q.pools[0].messageLength>=32)return $(),H();var j=32-q.pools[0].messageLength<<5;q.seedFile(j,function(J,M){if(J)return H(J);q.collect(M),$(),H()})}function _(){if(q.pools[0].messageLength>=32)return $();var H=32-q.pools[0].messageLength<<5;q.collect(q.seedFileSync(H)),$()}function $(){q.reseeds=q.reseeds===4294967295?0:q.reseeds+1;var H=q.plugin.md.create();H.update(q.keyBytes);var j=1;for(var J=0;J<32;++J){if(q.reseeds%j===0)H.update(q.pools[J].digest().getBytes()),q.pools[J].start();j=j<<1}q.keyBytes=H.digest().getBytes(),H.start(),H.update(q.keyBytes);var M=H.digest().getBytes();q.key=q.plugin.formatKey(q.keyBytes),q.seed=q.plugin.formatSeed(M),q.generated=0}function O(H){var j=null,J=rF.util.globalScope,M=J.crypto||J.msCrypto;if(M&&M.getRandomValues)j=function(N){return M.getRandomValues(N)};var D=rF.util.createBuffer();if(j)while(D.length()>16),G+=(Z&32767)<<16,G+=Z>>15,G=(G&2147483647)+(G>>31),V=G&4294967295;for(var W=0;W<3;++W)f=V>>>(W<<3),f^=Math.floor(Math.random()*256),D.putByte(f&255)}}return D.getBytes(H)}if(wf1)q.seedFile=function(H,j){wf1.randomBytes(H,function(J,M){if(J)return j(J);j(null,M.toString())})},q.seedFileSync=function(H){return wf1.randomBytes(H).toString()};else q.seedFile=function(H,j){try{j(null,O(H))}catch(J){j(J)}},q.seedFileSync=O;return q.collect=function(H){var j=H.length;for(var J=0;J>M&255);q.collect(J)},q.registerWorker=function(H){if(H===self)q.seedFile=function(J,M){function D(X){var P=X.data;if(P.forge&&P.forge.prng)self.removeEventListener("message",D),M(P.forge.prng.err,P.forge.prng.bytes)}self.addEventListener("message",D),self.postMessage({forge:{prng:{needed:J}}})};else{var j=function(J){var M=J.data;if(M.forge&&M.forge.prng)q.seedFile(M.forge.prng.needed,function(D,X){H.postMessage({forge:{prng:{err:D,bytes:X}}})})};H.addEventListener("message",j)}},q}});var zC=C((TG_,IR8)=>{var vP=w9();W16();CR8();hR8();bz();(function(){if(vP.random&&vP.random.getBytes){IR8.exports=vP.random;return}(function(A){var q={},K=[,,,,],Y=vP.util.createBuffer();q.formatKey=function(J){var M=vP.util.createBuffer(J);return J=[,,,,],J[0]=M.getInt32(),J[1]=M.getInt32(),J[2]=M.getInt32(),J[3]=M.getInt32(),vP.aes._expandKey(J,!1)},q.formatSeed=function(J){var M=vP.util.createBuffer(J);return J=[,,,,],J[0]=M.getInt32(),J[1]=M.getInt32(),J[2]=M.getInt32(),J[3]=M.getInt32(),J},q.cipher=function(J,M){return vP.aes._updateBlock(J,M,K,!1),Y.putInt32(K[0]),Y.putInt32(K[1]),Y.putInt32(K[2]),Y.putInt32(K[3]),Y.getBytes()},q.increment=function(J){return++J[3],J},q.md=vP.md.sha256;function z(){var J=vP.prng.create(q);return J.getBytes=function(M,D){return J.generate(M,D)},J.getBytesSync=function(M){return J.generate(M)},J}var w=z(),_=null,$=vP.util.globalScope,O=$.crypto||$.msCrypto;if(O&&O.getRandomValues)_=function(J){return O.getRandomValues(J)};if(vP.options.usePureJavaScript||!vP.util.isNodejs&&!_){if(typeof window>"u"||window.document===void 0);if(w.collectInt(+new Date,32),typeof navigator<"u"){var H="";for(var j in navigator)try{if(typeof navigator[j]=="string")H+=navigator[j]}catch(J){}w.collect(H),H=null}if(A)A().mousemove(function(J){w.collectInt(J.clientX,16),w.collectInt(J.clientY,16)}),A().keypress(function(J){w.collectInt(J.charCode,8)})}if(!vP.random)vP.random=w;else for(var j in w)vP.random[j]=w[j];vP.random.createInstance=z,IR8.exports=vP.random})(typeof jQuery<"u"?jQuery:null)})()});var xR8=C((VG_,YP4)=>{var Av=w9();bz();var bR8=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],qP4=[1,2,3,5],_wY=function(A,q){return A<>16-q},$wY=function(A,q){return(A&65535)>>q|A<<16-q&65535};YP4.exports=Av.rc2=Av.rc2||{};Av.rc2.expandKey=function(A,q){if(typeof A==="string")A=Av.util.createBuffer(A);q=q||128;var K=A,Y=A.length(),z=q,w=Math.ceil(z/8),_=255>>(z&7),$;for($=Y;$<128;$++)K.putByte(bR8[K.at($-1)+K.at($-Y)&255]);K.setAt(128-w,bR8[K.at(128-w)&_]);for($=127-w;$>=0;$--)K.setAt($,bR8[K.at($+1)^K.at($+w)]);return K};var KP4=function(A,q,K){var Y=!1,z=null,w=null,_=null,$,O,H,j,J=[];A=Av.rc2.expandKey(A,q);for(H=0;H<64;H++)J.push(A.getInt16Le());if(K)$=function(X){for(H=0;H<4;H++)X[H]+=J[j]+(X[(H+3)%4]&X[(H+2)%4])+(~X[(H+3)%4]&X[(H+1)%4]),X[H]=_wY(X[H],qP4[H]),j++},O=function(X){for(H=0;H<4;H++)X[H]+=J[X[(H+3)%4]&63]};else $=function(X){for(H=3;H>=0;H--)X[H]=$wY(X[H],qP4[H]),X[H]-=J[j]+(X[(H+3)%4]&X[(H+2)%4])+(~X[(H+3)%4]&X[(H+1)%4]),j--},O=function(X){for(H=3;H>=0;H--)X[H]-=J[X[(H+3)%4]&63]};var M=function(X){var P=[];for(H=0;H<4;H++){var W=z.getInt16Le();if(_!==null)if(K)W^=_.getInt16Le();else _.putInt16Le(W);P.push(W&65535)}j=K?0:63;for(var Z=0;Z=8)M([[5,$],[1,O],[6,$],[1,O],[5,$]])},finish:function(X){var P=!0;if(K)if(X)P=X(8,z,!K);else{var W=z.length()===8?8:8-z.length();z.fillWithByte(W,W)}if(P)Y=!0,D.update();if(!K){if(P=z.length()===0,P)if(X)P=X(8,w,!K);else{var Z=w.length(),G=w.at(Z-1);if(G>Z)P=!1;else w.truncate(G)}}return P}},D};Av.rc2.startEncrypting=function(A,q,K){var Y=Av.rc2.createEncryptionCipher(A,128);return Y.start(q,K),Y};Av.rc2.createEncryptionCipher=function(A,q){return KP4(A,q,!0)};Av.rc2.startDecrypting=function(A,q,K){var Y=Av.rc2.createDecryptionCipher(A,128);return Y.start(q,K),Y};Av.rc2.createDecryptionCipher=function(A,q){return KP4(A,q,!1)}});var Nc6=C((NG_,JP4)=>{var uR8=w9();JP4.exports=uR8.jsbn=uR8.jsbn||{};var Li,OwY=244837814094590,zP4=(OwY&16777215)==15715070;function FA(A,q,K){if(this.data=[],A!=null)if(typeof A=="number")this.fromNumber(A,q,K);else if(q==null&&typeof A!="string")this.fromString(A,256);else this.fromString(A,q)}uR8.jsbn.BigInteger=FA;function xz(){return new FA(null)}function HwY(A,q,K,Y,z,w){while(--w>=0){var _=q*this.data[A++]+K.data[Y]+z;z=Math.floor(_/67108864),K.data[Y++]=_&67108863}return z}function jwY(A,q,K,Y,z,w){var _=q&32767,$=q>>15;while(--w>=0){var O=this.data[A]&32767,H=this.data[A++]>>15,j=$*O+H*_;O=_*O+((j&32767)<<15)+K.data[Y]+(z&1073741823),z=(O>>>30)+(j>>>15)+$*H+(z>>>30),K.data[Y++]=O&1073741823}return z}function wP4(A,q,K,Y,z,w){var _=q&16383,$=q>>14;while(--w>=0){var O=this.data[A]&16383,H=this.data[A++]>>14,j=$*O+H*_;O=_*O+((j&16383)<<14)+K.data[Y]+z,z=(O>>28)+(j>>14)+$*H,K.data[Y++]=O&268435455}return z}if(typeof navigator>"u")FA.prototype.am=wP4,Li=28;else if(zP4&&navigator.appName=="Microsoft Internet Explorer")FA.prototype.am=jwY,Li=30;else if(zP4&&navigator.appName!="Netscape")FA.prototype.am=HwY,Li=26;else FA.prototype.am=wP4,Li=28;FA.prototype.DB=Li;FA.prototype.DM=(1<=0;--q)A.data[q]=this.data[q];A.t=this.t,A.s=this.s}function DwY(A){if(this.t=1,this.s=A<0?-1:0,A>0)this.data[0]=A;else if(A<-1)this.data[0]=A+this.DV;else this.t=0}function G16(A){var q=xz();return q.fromInt(A),q}function XwY(A,q){var K;if(q==16)K=4;else if(q==8)K=3;else if(q==256)K=8;else if(q==2)K=1;else if(q==32)K=5;else if(q==4)K=2;else{this.fromRadix(A,q);return}this.t=0,this.s=0;var Y=A.length,z=!1,w=0;while(--Y>=0){var _=K==8?A[Y]&255:$P4(A,Y);if(_<0){if(A.charAt(Y)=="-")z=!0;continue}if(z=!1,w==0)this.data[this.t++]=_;else if(w+K>this.DB)this.data[this.t-1]|=(_&(1<>this.DB-w;else this.data[this.t-1]|=_<=this.DB)w-=this.DB}if(K==8&&(A[0]&128)!=0){if(this.s=-1,w>0)this.data[this.t-1]|=(1<0&&this.data[this.t-1]==A)--this.t}function WwY(A){if(this.s<0)return"-"+this.negate().toString(A);var q;if(A==16)q=4;else if(A==8)q=3;else if(A==2)q=1;else if(A==32)q=5;else if(A==4)q=2;else return this.toRadix(A);var K=(1<0){if($>$)>0)z=!0,w=_P4(Y);while(_>=0){if($>($+=this.DB-q);else if(Y=this.data[_]>>($-=q)&K,$<=0)$+=this.DB,--_;if(Y>0)z=!0;if(z)w+=_P4(Y)}}return z?w:"0"}function ZwY(){var A=xz();return FA.ZERO.subTo(this,A),A}function GwY(){return this.s<0?this.negate():this}function fwY(A){var q=this.s-A.s;if(q!=0)return q;var K=this.t;if(q=K-A.t,q!=0)return this.s<0?-q:q;while(--K>=0)if((q=this.data[K]-A.data[K])!=0)return q;return 0}function $f1(A){var q=1,K;if((K=A>>>16)!=0)A=K,q+=16;if((K=A>>8)!=0)A=K,q+=8;if((K=A>>4)!=0)A=K,q+=4;if((K=A>>2)!=0)A=K,q+=2;if((K=A>>1)!=0)A=K,q+=1;return q}function TwY(){if(this.t<=0)return 0;return this.DB*(this.t-1)+$f1(this.data[this.t-1]^this.s&this.DM)}function VwY(A,q){var K;for(K=this.t-1;K>=0;--K)q.data[K+A]=this.data[K];for(K=A-1;K>=0;--K)q.data[K]=0;q.t=this.t+A,q.s=this.s}function NwY(A,q){for(var K=A;K=0;--$)q.data[$+w+1]=this.data[$]>>Y|_,_=(this.data[$]&z)<=0;--$)q.data[$]=0;q.data[w]=_,q.t=this.t+w+1,q.s=this.s,q.clamp()}function kwY(A,q){q.s=this.s;var K=Math.floor(A/this.DB);if(K>=this.t){q.t=0;return}var Y=A%this.DB,z=this.DB-Y,w=(1<>Y;for(var _=K+1;_>Y;if(Y>0)q.data[this.t-K-1]|=(this.s&w)<>=this.DB;if(A.t>=this.DB;Y+=this.s}else{Y+=this.s;while(K>=this.DB;Y-=A.s}if(q.s=Y<0?-1:0,Y<-1)q.data[K++]=this.DV+Y;else if(Y>0)q.data[K++]=Y;q.t=K,q.clamp()}function LwY(A,q){var K=this.abs(),Y=A.abs(),z=K.t;q.t=z+Y.t;while(--z>=0)q.data[z]=0;for(z=0;z=0)A.data[K]=0;for(K=0;K=q.DV)A.data[K+q.t]-=q.DV,A.data[K+q.t+1]=1}if(A.t>0)A.data[A.t-1]+=q.am(K,q.data[K],A,2*K,0,1);A.s=0,A.clamp()}function RwY(A,q,K){var Y=A.abs();if(Y.t<=0)return;var z=this.abs();if(z.t0)Y.lShiftTo(O,w),z.lShiftTo(O,K);else Y.copyTo(w),z.copyTo(K);var H=w.t,j=w.data[H-1];if(j==0)return;var J=j*(1<1?w.data[H-2]>>this.F2:0),M=this.FV/J,D=(1<=0)K.data[K.t++]=1,K.subTo(Z,K);FA.ONE.dlShiftTo(H,Z),Z.subTo(w,w);while(w.t=0){var G=K.data[--P]==j?this.DM:Math.floor(K.data[P]*M+(K.data[P-1]+X)*D);if((K.data[P]+=w.am(0,G,K,W,0,H))0)K.rShiftTo(O,K);if(_<0)FA.ZERO.subTo(K,K)}function SwY(A){var q=xz();if(this.abs().divRemTo(A,null,q),this.s<0&&q.compareTo(FA.ZERO)>0)A.subTo(q,q);return q}function bz6(A){this.m=A}function CwY(A){if(A.s<0||A.compareTo(this.m)>=0)return A.mod(this.m);else return A}function hwY(A){return A}function IwY(A){A.divRemTo(this.m,null,A)}function bwY(A,q,K){A.multiplyTo(q,K),this.reduce(K)}function xwY(A,q){A.squareTo(q),this.reduce(q)}bz6.prototype.convert=CwY;bz6.prototype.revert=hwY;bz6.prototype.reduce=IwY;bz6.prototype.mulTo=bwY;bz6.prototype.sqrTo=xwY;function uwY(){if(this.t<1)return 0;var A=this.data[0];if((A&1)==0)return 0;var q=A&3;return q=q*(2-(A&15)*q)&15,q=q*(2-(A&255)*q)&255,q=q*(2-((A&65535)*q&65535))&65535,q=q*(2-A*q%this.DV)%this.DV,q>0?this.DV-q:-q}function xz6(A){this.m=A,this.mp=A.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<0)this.m.subTo(q,q);return q}function mwY(A){var q=xz();return A.copyTo(q),this.reduce(q),q}function gwY(A){while(A.t<=this.mt2)A.data[A.t++]=0;for(var q=0;q>15)*this.mpl&this.um)<<15)&A.DM;K=q+this.m.t,A.data[K]+=this.m.am(0,Y,A,q,0,this.m.t);while(A.data[K]>=A.DV)A.data[K]-=A.DV,A.data[++K]++}if(A.clamp(),A.drShiftTo(this.m.t,A),A.compareTo(this.m)>=0)A.subTo(this.m,A)}function FwY(A,q){A.squareTo(q),this.reduce(q)}function QwY(A,q,K){A.multiplyTo(q,K),this.reduce(K)}xz6.prototype.convert=BwY;xz6.prototype.revert=mwY;xz6.prototype.reduce=gwY;xz6.prototype.mulTo=QwY;xz6.prototype.sqrTo=FwY;function UwY(){return(this.t>0?this.data[0]&1:this.s)==0}function pwY(A,q){if(A>4294967295||A<1)return FA.ONE;var K=xz(),Y=xz(),z=q.convert(this),w=$f1(A)-1;z.copyTo(K);while(--w>=0)if(q.sqrTo(K,Y),(A&1<0)q.mulTo(Y,z,K);else{var _=K;K=Y,Y=_}return q.revert(K)}function dwY(A,q){var K;if(A<256||q.isEven())K=new bz6(q);else K=new xz6(q);return this.exp(A,K)}FA.prototype.copyTo=MwY;FA.prototype.fromInt=DwY;FA.prototype.fromString=XwY;FA.prototype.clamp=PwY;FA.prototype.dlShiftTo=VwY;FA.prototype.drShiftTo=NwY;FA.prototype.lShiftTo=vwY;FA.prototype.rShiftTo=kwY;FA.prototype.subTo=EwY;FA.prototype.multiplyTo=LwY;FA.prototype.squareTo=ywY;FA.prototype.divRemTo=RwY;FA.prototype.invDigit=uwY;FA.prototype.isEven=UwY;FA.prototype.exp=pwY;FA.prototype.toString=WwY;FA.prototype.negate=ZwY;FA.prototype.abs=GwY;FA.prototype.compareTo=fwY;FA.prototype.bitLength=TwY;FA.prototype.mod=SwY;FA.prototype.modPowInt=dwY;FA.ZERO=G16(0);FA.ONE=G16(1);function cwY(){var A=xz();return this.copyTo(A),A}function lwY(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this.data[0];else if(this.t==0)return 0;return(this.data[1]&(1<<32-this.DB)-1)<>24}function nwY(){return this.t==0?this.s:this.data[0]<<16>>16}function rwY(A){return Math.floor(Math.LN2*this.DB/Math.log(A))}function owY(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this.data[0]<=0)return 0;else return 1}function awY(A){if(A==null)A=10;if(this.signum()==0||A<2||A>36)return"0";var q=this.chunkSize(A),K=Math.pow(A,q),Y=G16(K),z=xz(),w=xz(),_="";this.divRemTo(Y,z,w);while(z.signum()>0)_=(K+w.intValue()).toString(A).substr(1)+_,z.divRemTo(Y,z,w);return w.intValue().toString(A)+_}function swY(A,q){if(this.fromInt(0),q==null)q=10;var K=this.chunkSize(q),Y=Math.pow(q,K),z=!1,w=0,_=0;for(var $=0;$=K)this.dMultiply(Y),this.dAddOffset(_,0),w=0,_=0}if(w>0)this.dMultiply(Math.pow(q,w)),this.dAddOffset(_,0);if(z)FA.ZERO.subTo(this,this)}function twY(A,q,K){if(typeof q=="number")if(A<2)this.fromInt(1);else{if(this.fromNumber(A,K),!this.testBit(A-1))this.bitwiseTo(FA.ONE.shiftLeft(A-1),mR8,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(q))if(this.dAddOffset(2,0),this.bitLength()>A)this.subTo(FA.ONE.shiftLeft(A-1),this)}else{var Y=[],z=A&7;if(Y.length=(A>>3)+1,q.nextBytes(Y),z>0)Y[0]&=(1<0){if(K>K)!=(this.s&this.DM)>>K)q[z++]=Y|this.s<=0){if(K<8)Y=(this.data[A]&(1<>(K+=this.DB-8);else if(Y=this.data[A]>>(K-=8)&255,K<=0)K+=this.DB,--A;if((Y&128)!=0)Y|=-256;if(z==0&&(this.s&128)!=(Y&128))++z;if(z>0||Y!=this.s)q[z++]=Y}}return q}function A2Y(A){return this.compareTo(A)==0}function q2Y(A){return this.compareTo(A)<0?this:A}function K2Y(A){return this.compareTo(A)>0?this:A}function Y2Y(A,q,K){var Y,z,w=Math.min(A.t,this.t);for(Y=0;Y>=16,q+=16;if((A&255)==0)A>>=8,q+=8;if((A&15)==0)A>>=4,q+=4;if((A&3)==0)A>>=2,q+=2;if((A&1)==0)++q;return q}function D2Y(){for(var A=0;A=this.t)return this.s!=0;return(this.data[q]&1<>=this.DB;if(A.t>=this.DB;Y+=this.s}else{Y+=this.s;while(K>=this.DB;Y+=A.s}if(q.s=Y<0?-1:0,Y>0)q.data[K++]=Y;else if(Y<-1)q.data[K++]=this.DV+Y;q.t=K,q.clamp()}function N2Y(A){var q=xz();return this.addTo(A,q),q}function v2Y(A){var q=xz();return this.subTo(A,q),q}function k2Y(A){var q=xz();return this.multiplyTo(A,q),q}function E2Y(A){var q=xz();return this.divRemTo(A,q,null),q}function L2Y(A){var q=xz();return this.divRemTo(A,null,q),q}function y2Y(A){var q=xz(),K=xz();return this.divRemTo(A,q,K),[q,K]}function R2Y(A){this.data[this.t]=this.am(0,A-1,this,0,0,this.t),++this.t,this.clamp()}function S2Y(A,q){if(A==0)return;while(this.t<=q)this.data[this.t++]=0;this.data[q]+=A;while(this.data[q]>=this.DV){if(this.data[q]-=this.DV,++q>=this.t)this.data[this.t++]=0;++this.data[q]}}function Vc6(){}function jP4(A){return A}function C2Y(A,q,K){A.multiplyTo(q,K)}function h2Y(A,q){A.squareTo(q)}Vc6.prototype.convert=jP4;Vc6.prototype.revert=jP4;Vc6.prototype.mulTo=C2Y;Vc6.prototype.sqrTo=h2Y;function I2Y(A){return this.exp(A,new Vc6)}function b2Y(A,q,K){var Y=Math.min(this.t+A.t,q);K.s=0,K.t=Y;while(Y>0)K.data[--Y]=0;var z;for(z=K.t-this.t;Y=0)K.data[Y]=0;for(Y=Math.max(q-this.t,0);Y2*this.m.t)return A.mod(this.m);else if(A.compareTo(this.m)<0)return A;else{var q=xz();return A.copyTo(q),this.reduce(q),q}}function B2Y(A){return A}function m2Y(A){if(A.drShiftTo(this.m.t-1,this.r2),A.t>this.m.t+1)A.t=this.m.t+1,A.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(A.compareTo(this.r2)<0)A.dAddOffset(1,this.m.t+1);A.subTo(this.r2,A);while(A.compareTo(this.m)>=0)A.subTo(this.m,A)}function g2Y(A,q){A.squareTo(q),this.reduce(q)}function F2Y(A,q,K){A.multiplyTo(q,K),this.reduce(K)}KT6.prototype.convert=u2Y;KT6.prototype.revert=B2Y;KT6.prototype.reduce=m2Y;KT6.prototype.mulTo=F2Y;KT6.prototype.sqrTo=g2Y;function Q2Y(A,q){var K=A.bitLength(),Y,z=G16(1),w;if(K<=0)return z;else if(K<18)Y=1;else if(K<48)Y=3;else if(K<144)Y=4;else if(K<768)Y=5;else Y=6;if(K<8)w=new bz6(q);else if(q.isEven())w=new KT6(q);else w=new xz6(q);var _=[],$=3,O=Y-1,H=(1<1){var j=xz();w.sqrTo(_[1],j);while($<=H)_[$]=xz(),w.mulTo(j,_[$-2],_[$]),$+=2}var J=A.t-1,M,D=!0,X=xz(),P;K=$f1(A.data[J])-1;while(J>=0){if(K>=O)M=A.data[J]>>K-O&H;else if(M=(A.data[J]&(1<0)M|=A.data[J-1]>>this.DB+K-O;$=Y;while((M&1)==0)M>>=1,--$;if((K-=$)<0)K+=this.DB,--J;if(D)_[M].copyTo(z),D=!1;else{while($>1)w.sqrTo(z,X),w.sqrTo(X,z),$-=2;if($>0)w.sqrTo(z,X);else P=z,z=X,X=P;w.mulTo(X,_[M],z)}while(J>=0&&(A.data[J]&1<0)q.rShiftTo(w,q),K.rShiftTo(w,K);while(q.signum()>0){if((z=q.getLowestSetBit())>0)q.rShiftTo(z,q);if((z=K.getLowestSetBit())>0)K.rShiftTo(z,K);if(q.compareTo(K)>=0)q.subTo(K,q),q.rShiftTo(1,q);else K.subTo(q,K),K.rShiftTo(1,K)}if(w>0)K.lShiftTo(w,K);return K}function p2Y(A){if(A<=0)return 0;var q=this.DV%A,K=this.s<0?A-1:0;if(this.t>0)if(q==0)K=this.data[0]%A;else for(var Y=this.t-1;Y>=0;--Y)K=(q*K+this.data[Y])%A;return K}function d2Y(A){var q=A.isEven();if(this.isEven()&&q||A.signum()==0)return FA.ZERO;var K=A.clone(),Y=this.clone(),z=G16(1),w=G16(0),_=G16(0),$=G16(1);while(K.signum()!=0){while(K.isEven()){if(K.rShiftTo(1,K),q){if(!z.isEven()||!w.isEven())z.addTo(this,z),w.subTo(A,w);z.rShiftTo(1,z)}else if(!w.isEven())w.subTo(A,w);w.rShiftTo(1,w)}while(Y.isEven()){if(Y.rShiftTo(1,Y),q){if(!_.isEven()||!$.isEven())_.addTo(this,_),$.subTo(A,$);_.rShiftTo(1,_)}else if(!$.isEven())$.subTo(A,$);$.rShiftTo(1,$)}if(K.compareTo(Y)>=0){if(K.subTo(Y,K),q)z.subTo(_,z);w.subTo($,w)}else{if(Y.subTo(K,Y),q)_.subTo(z,_);$.subTo(w,$)}}if(Y.compareTo(FA.ONE)!=0)return FA.ZERO;if($.compareTo(A)>=0)return $.subtract(A);if($.signum()<0)$.addTo(A,$);else return $;if($.signum()<0)return $.add(A);else return $}var Sx=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],c2Y=67108864/Sx[Sx.length-1];function l2Y(A){var q,K=this.abs();if(K.t==1&&K.data[0]<=Sx[Sx.length-1]){for(q=0;q=0);var $=w.modPow(Y,this);if($.compareTo(FA.ONE)!=0&&$.compareTo(q)!=0){var O=1;while(O++{var oF=w9();cF();bz();var DP4=PP4.exports=oF.sha1=oF.sha1||{};oF.md.sha1=oF.md.algorithms.sha1=DP4;DP4.create=function(){if(!XP4)r2Y();var A=null,q=oF.util.createBuffer(),K=Array(80),Y={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return Y.start=function(){Y.messageLength=0,Y.fullMessageLength=Y.messageLength64=[];var z=Y.messageLengthSize/4;for(var w=0;w>>0,_>>>0];for(var $=Y.fullMessageLength.length-1;$>=0;--$)Y.fullMessageLength[$]+=_[1],_[1]=_[0]+(Y.fullMessageLength[$]/4294967296>>>0),Y.fullMessageLength[$]=Y.fullMessageLength[$]>>>0,_[0]=_[1]/4294967296>>>0;if(q.putBytes(z),MP4(A,K,q),q.read>2048||q.length()===0)q.compact();return Y},Y.digest=function(){var z=oF.util.createBuffer();z.putBytes(q.bytes());var w=Y.fullMessageLength[Y.fullMessageLength.length-1]+Y.messageLengthSize,_=w&Y.blockLength-1;z.putBytes(gR8.substr(0,Y.blockLength-_));var $,O,H=Y.fullMessageLength[0]*8;for(var j=0;j>>0,H+=O,z.putInt32(H>>>0),H=$>>>0;z.putInt32(H);var J={h0:A.h0,h1:A.h1,h2:A.h2,h3:A.h3,h4:A.h4};MP4(J,K,z);var M=oF.util.createBuffer();return M.putInt32(J.h0),M.putInt32(J.h1),M.putInt32(J.h2),M.putInt32(J.h3),M.putInt32(J.h4),M},Y};var gR8=null,XP4=!1;function r2Y(){gR8=String.fromCharCode(128),gR8+=oF.util.fillString(String.fromCharCode(0),64),XP4=!0}function MP4(A,q,K){var Y,z,w,_,$,O,H,j,J=K.length();while(J>=64){z=A.h0,w=A.h1,_=A.h2,$=A.h3,O=A.h4;for(j=0;j<16;++j)Y=K.getInt32(),q[j]=Y,H=$^w&(_^$),Y=(z<<5|z>>>27)+H+O+1518500249+Y,O=$,$=_,_=(w<<30|w>>>2)>>>0,w=z,z=Y;for(;j<20;++j)Y=q[j-3]^q[j-8]^q[j-14]^q[j-16],Y=Y<<1|Y>>>31,q[j]=Y,H=$^w&(_^$),Y=(z<<5|z>>>27)+H+O+1518500249+Y,O=$,$=_,_=(w<<30|w>>>2)>>>0,w=z,z=Y;for(;j<32;++j)Y=q[j-3]^q[j-8]^q[j-14]^q[j-16],Y=Y<<1|Y>>>31,q[j]=Y,H=w^_^$,Y=(z<<5|z>>>27)+H+O+1859775393+Y,O=$,$=_,_=(w<<30|w>>>2)>>>0,w=z,z=Y;for(;j<40;++j)Y=q[j-6]^q[j-16]^q[j-28]^q[j-32],Y=Y<<2|Y>>>30,q[j]=Y,H=w^_^$,Y=(z<<5|z>>>27)+H+O+1859775393+Y,O=$,$=_,_=(w<<30|w>>>2)>>>0,w=z,z=Y;for(;j<60;++j)Y=q[j-6]^q[j-16]^q[j-28]^q[j-32],Y=Y<<2|Y>>>30,q[j]=Y,H=w&_|$&(w^_),Y=(z<<5|z>>>27)+H+O+2400959708+Y,O=$,$=_,_=(w<<30|w>>>2)>>>0,w=z,z=Y;for(;j<80;++j)Y=q[j-6]^q[j-16]^q[j-28]^q[j-32],Y=Y<<2|Y>>>30,q[j]=Y,H=w^_^$,Y=(z<<5|z>>>27)+H+O+3395469782+Y,O=$,$=_,_=(w<<30|w>>>2)>>>0,w=z,z=Y;A.h0=A.h0+z|0,A.h1=A.h1+w|0,A.h2=A.h2+_|0,A.h3=A.h3+$|0,A.h4=A.h4+O|0,J-=64}}});var FR8=C((kG_,ZP4)=>{var aF=w9();bz();zC();YT6();var WP4=ZP4.exports=aF.pkcs1=aF.pkcs1||{};WP4.encode_rsa_oaep=function(A,q,K){var Y,z,w,_;if(typeof K==="string")Y=K,z=arguments[3]||void 0,w=arguments[4]||void 0;else if(K){if(Y=K.label||void 0,z=K.seed||void 0,w=K.md||void 0,K.mgf1&&K.mgf1.md)_=K.mgf1.md}if(!w)w=aF.md.sha1.create();else w.start();if(!_)_=w;var $=Math.ceil(A.n.bitLength()/8),O=$-2*w.digestLength-2;if(q.length>O){var H=Error("RSAES-OAEP input message length is too long.");throw H.length=q.length,H.maxLength=O,H}if(!Y)Y="";w.update(Y,"raw");var j=w.digest(),J="",M=O-q.length;for(var D=0;D>24&255,w>>16&255,w>>8&255,w&255);K.start(),K.update(A+_),Y+=K.digest().getBytes()}return Y.substring(0,q)}});var UR8=C((EG_,QR8)=>{var f16=w9();bz();Nc6();zC();(function(){if(f16.prime){QR8.exports=f16.prime;return}var A=QR8.exports=f16.prime=f16.prime||{},q=f16.jsbn.BigInteger,K=[6,4,2,4,2,4,6,2],Y=new q(null);Y.fromInt(30);var z=function(J,M){return J|M};A.generateProbablePrime=function(J,M,D){if(typeof M==="function")D=M,M={};M=M||{};var X=M.algorithm||"PRIMEINC";if(typeof X==="string")X={name:X};X.options=X.options||{};var P=M.prng||f16.random,W={nextBytes:function(Z){var G=P.getBytesSync(Z.length);for(var f=0;fM)J=H(M,D);if(J.isProbablePrime(P))return Z(null,J);J.dAddOffset(K[X++%8],0)}while(W<0||+new Date-G"u")return _(J,M,D,X);var P=H(J,M),W=D.workers,Z=D.workLoad||100,G=Z*30/8,f=D.workerScript||"forge/prime.worker.js";if(W===-1)return f16.util.estimateCores(function(N,v){if(N)v=2;W=v-1,V()});V();function V(){W=Math.max(1,W);var N=[];for(var v=0;vJ)P=H(J,M);var g=P.toString(16);B.target.postMessage({hex:g,workLoad:Z}),P.dAddOffset(G,0)}}}function H(J,M){var D=new q(J,M),X=J-1;if(!D.testBit(X))D.bitwiseTo(q.ONE.shiftLeft(X),z,D);return D.dAddOffset(31-D.mod(Y).byteValue(),0),D}function j(J){if(J<=100)return 27;if(J<=150)return 18;if(J<=200)return 15;if(J<=250)return 12;if(J<=300)return 9;if(J<=350)return 8;if(J<=400)return 7;if(J<=500)return 6;if(J<=600)return 5;if(J<=800)return 4;if(J<=1250)return 3;return 2}})()});var vc6=C((LG_,kP4)=>{var XK=w9();Rx();Nc6();Z16();FR8();UR8();zC();bz();if(typeof QY>"u")QY=XK.jsbn.BigInteger;var QY,pR8=XK.util.isNodejs?g6("crypto"):null,C8=XK.asn1,_C=XK.util;XK.pki=XK.pki||{};kP4.exports=XK.pki.rsa=XK.rsa=XK.rsa||{};var G5=XK.pki,o2Y=[6,4,2,4,2,4,6,2],a2Y={name:"PrivateKeyInfo",tagClass:C8.Class.UNIVERSAL,type:C8.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:C8.Class.UNIVERSAL,type:C8.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:C8.Class.UNIVERSAL,type:C8.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:C8.Class.UNIVERSAL,type:C8.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:C8.Class.UNIVERSAL,type:C8.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},s2Y={name:"RSAPrivateKey",tagClass:C8.Class.UNIVERSAL,type:C8.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:C8.Class.UNIVERSAL,type:C8.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:C8.Class.UNIVERSAL,type:C8.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:C8.Class.UNIVERSAL,type:C8.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:C8.Class.UNIVERSAL,type:C8.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:C8.Class.UNIVERSAL,type:C8.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:C8.Class.UNIVERSAL,type:C8.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:C8.Class.UNIVERSAL,type:C8.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:C8.Class.UNIVERSAL,type:C8.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:C8.Class.UNIVERSAL,type:C8.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},t2Y={name:"RSAPublicKey",tagClass:C8.Class.UNIVERSAL,type:C8.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:C8.Class.UNIVERSAL,type:C8.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:C8.Class.UNIVERSAL,type:C8.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},e2Y=XK.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:C8.Class.UNIVERSAL,type:C8.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:C8.Class.UNIVERSAL,type:C8.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:C8.Class.UNIVERSAL,type:C8.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:C8.Class.UNIVERSAL,type:C8.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:C8.Class.UNIVERSAL,type:C8.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A_Y={name:"DigestInfo",tagClass:C8.Class.UNIVERSAL,type:C8.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:C8.Class.UNIVERSAL,type:C8.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:C8.Class.UNIVERSAL,type:C8.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:C8.Class.UNIVERSAL,type:C8.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:C8.Class.UNIVERSAL,type:C8.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},q_Y=function(A){var q;if(A.algorithm in G5.oids)q=G5.oids[A.algorithm];else{var K=Error("Unknown message digest algorithm.");throw K.algorithm=A.algorithm,K}var Y=C8.oidToDer(q).getBytes(),z=C8.create(C8.Class.UNIVERSAL,C8.Type.SEQUENCE,!0,[]),w=C8.create(C8.Class.UNIVERSAL,C8.Type.SEQUENCE,!0,[]);w.value.push(C8.create(C8.Class.UNIVERSAL,C8.Type.OID,!1,Y)),w.value.push(C8.create(C8.Class.UNIVERSAL,C8.Type.NULL,!1,""));var _=C8.create(C8.Class.UNIVERSAL,C8.Type.OCTETSTRING,!1,A.digest().getBytes());return z.value.push(w),z.value.push(_),C8.toDer(z).getBytes()},NP4=function(A,q,K){if(K)return A.modPow(q.e,q.n);if(!q.p||!q.q)return A.modPow(q.d,q.n);if(!q.dP)q.dP=q.d.mod(q.p.subtract(QY.ONE));if(!q.dQ)q.dQ=q.d.mod(q.q.subtract(QY.ONE));if(!q.qInv)q.qInv=q.q.modInverse(q.p);var Y;do Y=new QY(XK.util.bytesToHex(XK.random.getBytes(q.n.bitLength()/8)),16);while(Y.compareTo(q.n)>=0||!Y.gcd(q.n).equals(QY.ONE));A=A.multiply(Y.modPow(q.e,q.n)).mod(q.n);var z=A.mod(q.p).modPow(q.dP,q.p),w=A.mod(q.q).modPow(q.dQ,q.q);while(z.compareTo(w)<0)z=z.add(q.p);var _=z.subtract(w).multiply(q.qInv).mod(q.p).multiply(q.q).add(w);return _=_.multiply(Y.modInverse(q.n)).mod(q.n),_};G5.rsa.encrypt=function(A,q,K){var Y=K,z,w=Math.ceil(q.n.bitLength()/8);if(K!==!1&&K!==!0)Y=K===2,z=vP4(A,q,K);else z=XK.util.createBuffer(),z.putBytes(A);var _=new QY(z.toHex(),16),$=NP4(_,q,Y),O=$.toString(16),H=XK.util.createBuffer(),j=w-Math.ceil(O.length/2);while(j>0)H.putByte(0),--j;return H.putBytes(XK.util.hexToBytes(O)),H.getBytes()};G5.rsa.decrypt=function(A,q,K,Y){var z=Math.ceil(q.n.bitLength()/8);if(A.length!==z){var w=Error("Encrypted message length is invalid.");throw w.length=A.length,w.expected=z,w}var _=new QY(XK.util.createBuffer(A).toHex(),16);if(_.compareTo(q.n)>=0)throw Error("Encrypted message is invalid.");var $=NP4(_,q,K),O=$.toString(16),H=XK.util.createBuffer(),j=z-Math.ceil(O.length/2);while(j>0)H.putByte(0),--j;if(H.putBytes(XK.util.hexToBytes(O)),Y!==!1)return Hf1(H.getBytes(),q,K);return H.getBytes()};G5.rsa.createKeyPairGenerationState=function(A,q,K){if(typeof A==="string")A=parseInt(A,10);A=A||2048,K=K||{};var Y=K.prng||XK.random,z={nextBytes:function($){var O=Y.getBytesSync($.length);for(var H=0;H<$.length;++H)$[H]=O.charCodeAt(H)}},w=K.algorithm||"PRIMEINC",_;if(w==="PRIMEINC")_={algorithm:w,state:0,bits:A,rng:z,eInt:q||65537,e:new QY(null),p:null,q:null,qBits:A>>1,pBits:A-(A>>1),pqState:0,num:null,keys:null},_.e.fromInt(_.eInt);else throw Error("Invalid key generation algorithm: "+w);return _};G5.rsa.stepKeyPairGenerationState=function(A,q){if(!("algorithm"in A))A.algorithm="PRIMEINC";var K=new QY(null);K.fromInt(30);var Y=0,z=function(J,M){return J|M},w=+new Date,_,$=0;while(A.keys===null&&(q<=0||$O)A.pqState=0;else if(A.num.isProbablePrime(Y_Y(A.num.bitLength())))++A.pqState;else A.num.dAddOffset(o2Y[Y++%8],0);else if(A.pqState===2)A.pqState=A.num.subtract(QY.ONE).gcd(A.e).compareTo(QY.ONE)===0?3:0;else if(A.pqState===3){if(A.pqState=0,A.p===null)A.p=A.num;else A.q=A.num;if(A.p!==null&&A.q!==null)++A.state;A.num=null}}else if(A.state===1){if(A.p.compareTo(A.q)<0)A.num=A.p,A.p=A.q,A.q=A.num;++A.state}else if(A.state===2)A.p1=A.p.subtract(QY.ONE),A.q1=A.q.subtract(QY.ONE),A.phi=A.p1.multiply(A.q1),++A.state;else if(A.state===3)if(A.phi.gcd(A.e).compareTo(QY.ONE)===0)++A.state;else A.p=null,A.q=null,A.state=0;else if(A.state===4)if(A.n=A.p.multiply(A.q),A.n.bitLength()===A.bits)++A.state;else A.q=null,A.state=0;else if(A.state===5){var j=A.e.modInverse(A.phi);A.keys={privateKey:G5.rsa.setPrivateKey(A.n,A.e,j,A.p,A.q,j.mod(A.p1),j.mod(A.q1),A.q.modInverse(A.p)),publicKey:G5.rsa.setPublicKey(A.n,A.e)}}_=+new Date,$+=_-w,w=_}return A.keys!==null};G5.rsa.generateKeyPair=function(A,q,K,Y){if(arguments.length===1){if(typeof A==="object")K=A,A=void 0;else if(typeof A==="function")Y=A,A=void 0}else if(arguments.length===2)if(typeof A==="number"){if(typeof q==="function")Y=q,q=void 0;else if(typeof q!=="number")K=q,q=void 0}else K=A,Y=q,A=void 0,q=void 0;else if(arguments.length===3)if(typeof q==="number"){if(typeof K==="function")Y=K,K=void 0}else Y=K,K=q,q=void 0;if(K=K||{},A===void 0)A=K.bits||2048;if(q===void 0)q=K.e||65537;if(!XK.options.usePureJavaScript&&!K.prng&&A>=256&&A<=16384&&(q===65537||q===3)){if(Y){if(GP4("generateKeyPair"))return pR8.generateKeyPair("rsa",{modulusLength:A,publicExponent:q,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function($,O,H){if($)return Y($);Y(null,{privateKey:G5.privateKeyFromPem(H),publicKey:G5.publicKeyFromPem(O)})});if(fP4("generateKey")&&fP4("exportKey"))return _C.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:A,publicExponent:VP4(q),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function($){return _C.globalScope.crypto.subtle.exportKey("pkcs8",$.privateKey)}).then(void 0,function($){Y($)}).then(function($){if($){var O=G5.privateKeyFromAsn1(C8.fromDer(XK.util.createBuffer($)));Y(null,{privateKey:O,publicKey:G5.setRsaPublicKey(O.n,O.e)})}});if(TP4("generateKey")&&TP4("exportKey")){var z=_C.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:A,publicExponent:VP4(q),hash:{name:"SHA-256"}},!0,["sign","verify"]);z.oncomplete=function($){var O=$.target.result,H=_C.globalScope.msCrypto.subtle.exportKey("pkcs8",O.privateKey);H.oncomplete=function(j){var J=j.target.result,M=G5.privateKeyFromAsn1(C8.fromDer(XK.util.createBuffer(J)));Y(null,{privateKey:M,publicKey:G5.setRsaPublicKey(M.n,M.e)})},H.onerror=function(j){Y(j)}},z.onerror=function($){Y($)};return}}else if(GP4("generateKeyPairSync")){var w=pR8.generateKeyPairSync("rsa",{modulusLength:A,publicExponent:q,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:G5.privateKeyFromPem(w.privateKey),publicKey:G5.publicKeyFromPem(w.publicKey)}}}var _=G5.rsa.createKeyPairGenerationState(A,q,K);if(!Y)return G5.rsa.stepKeyPairGenerationState(_,0),_.keys;K_Y(_,K,Y)};G5.setRsaPublicKey=G5.rsa.setPublicKey=function(A,q){var K={n:A,e:q};return K.encrypt=function(Y,z,w){if(typeof z==="string")z=z.toUpperCase();else if(z===void 0)z="RSAES-PKCS1-V1_5";if(z==="RSAES-PKCS1-V1_5")z={encode:function($,O,H){return vP4($,O,2).getBytes()}};else if(z==="RSA-OAEP"||z==="RSAES-OAEP")z={encode:function($,O){return XK.pkcs1.encode_rsa_oaep(O,$,w)}};else if(["RAW","NONE","NULL",null].indexOf(z)!==-1)z={encode:function($){return $}};else if(typeof z==="string")throw Error('Unsupported encryption scheme: "'+z+'".');var _=z.encode(Y,K,!0);return G5.rsa.encrypt(_,K,!0)},K.verify=function(Y,z,w,_){if(typeof w==="string")w=w.toUpperCase();else if(w===void 0)w="RSASSA-PKCS1-V1_5";if(_===void 0)_={_parseAllDigestBytes:!0};if(!("_parseAllDigestBytes"in _))_._parseAllDigestBytes=!0;if(w==="RSASSA-PKCS1-V1_5")w={verify:function(O,H){H=Hf1(H,K,!0);var j=C8.fromDer(H,{parseAllBytes:_._parseAllDigestBytes}),J={},M=[];if(!C8.validate(j,A_Y,J,M)){var D=Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw D.errors=M,D}var X=C8.derToOid(J.algorithmIdentifier);if(!(X===XK.oids.md2||X===XK.oids.md5||X===XK.oids.sha1||X===XK.oids.sha224||X===XK.oids.sha256||X===XK.oids.sha384||X===XK.oids.sha512||X===XK.oids["sha512-224"]||X===XK.oids["sha512-256"])){var D=Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw D.oid=X,D}if(X===XK.oids.md2||X===XK.oids.md5){if(!("parameters"in J))throw Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.")}return O===J.digest}};else if(w==="NONE"||w==="NULL"||w===null)w={verify:function(O,H){return H=Hf1(H,K,!0),O===H}};var $=G5.rsa.decrypt(z,K,!0,!1);return w.verify(Y,$,K.n.bitLength())},K};G5.setRsaPrivateKey=G5.rsa.setPrivateKey=function(A,q,K,Y,z,w,_,$){var O={n:A,e:q,d:K,p:Y,q:z,dP:w,dQ:_,qInv:$};return O.decrypt=function(H,j,J){if(typeof j==="string")j=j.toUpperCase();else if(j===void 0)j="RSAES-PKCS1-V1_5";var M=G5.rsa.decrypt(H,O,!1,!1);if(j==="RSAES-PKCS1-V1_5")j={decode:Hf1};else if(j==="RSA-OAEP"||j==="RSAES-OAEP")j={decode:function(D,X){return XK.pkcs1.decode_rsa_oaep(X,D,J)}};else if(["RAW","NONE","NULL",null].indexOf(j)!==-1)j={decode:function(D){return D}};else throw Error('Unsupported encryption scheme: "'+j+'".');return j.decode(M,O,!1)},O.sign=function(H,j){var J=!1;if(typeof j==="string")j=j.toUpperCase();if(j===void 0||j==="RSASSA-PKCS1-V1_5")j={encode:q_Y},J=1;else if(j==="NONE"||j==="NULL"||j===null)j={encode:function(){return H}},J=1;var M=j.encode(H,O.n.bitLength());return G5.rsa.encrypt(M,O,J)},O};G5.wrapRsaPrivateKey=function(A){return C8.create(C8.Class.UNIVERSAL,C8.Type.SEQUENCE,!0,[C8.create(C8.Class.UNIVERSAL,C8.Type.INTEGER,!1,C8.integerToDer(0).getBytes()),C8.create(C8.Class.UNIVERSAL,C8.Type.SEQUENCE,!0,[C8.create(C8.Class.UNIVERSAL,C8.Type.OID,!1,C8.oidToDer(G5.oids.rsaEncryption).getBytes()),C8.create(C8.Class.UNIVERSAL,C8.Type.NULL,!1,"")]),C8.create(C8.Class.UNIVERSAL,C8.Type.OCTETSTRING,!1,C8.toDer(A).getBytes())])};G5.privateKeyFromAsn1=function(A){var q={},K=[];if(C8.validate(A,a2Y,q,K))A=C8.fromDer(XK.util.createBuffer(q.privateKey));if(q={},K=[],!C8.validate(A,s2Y,q,K)){var Y=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw Y.errors=K,Y}var z,w,_,$,O,H,j,J;return z=XK.util.createBuffer(q.privateKeyModulus).toHex(),w=XK.util.createBuffer(q.privateKeyPublicExponent).toHex(),_=XK.util.createBuffer(q.privateKeyPrivateExponent).toHex(),$=XK.util.createBuffer(q.privateKeyPrime1).toHex(),O=XK.util.createBuffer(q.privateKeyPrime2).toHex(),H=XK.util.createBuffer(q.privateKeyExponent1).toHex(),j=XK.util.createBuffer(q.privateKeyExponent2).toHex(),J=XK.util.createBuffer(q.privateKeyCoefficient).toHex(),G5.setRsaPrivateKey(new QY(z,16),new QY(w,16),new QY(_,16),new QY($,16),new QY(O,16),new QY(H,16),new QY(j,16),new QY(J,16))};G5.privateKeyToAsn1=G5.privateKeyToRSAPrivateKey=function(A){return C8.create(C8.Class.UNIVERSAL,C8.Type.SEQUENCE,!0,[C8.create(C8.Class.UNIVERSAL,C8.Type.INTEGER,!1,C8.integerToDer(0).getBytes()),C8.create(C8.Class.UNIVERSAL,C8.Type.INTEGER,!1,sF(A.n)),C8.create(C8.Class.UNIVERSAL,C8.Type.INTEGER,!1,sF(A.e)),C8.create(C8.Class.UNIVERSAL,C8.Type.INTEGER,!1,sF(A.d)),C8.create(C8.Class.UNIVERSAL,C8.Type.INTEGER,!1,sF(A.p)),C8.create(C8.Class.UNIVERSAL,C8.Type.INTEGER,!1,sF(A.q)),C8.create(C8.Class.UNIVERSAL,C8.Type.INTEGER,!1,sF(A.dP)),C8.create(C8.Class.UNIVERSAL,C8.Type.INTEGER,!1,sF(A.dQ)),C8.create(C8.Class.UNIVERSAL,C8.Type.INTEGER,!1,sF(A.qInv))])};G5.publicKeyFromAsn1=function(A){var q={},K=[];if(C8.validate(A,e2Y,q,K)){var Y=C8.derToOid(q.publicKeyOid);if(Y!==G5.oids.rsaEncryption){var z=Error("Cannot read public key. Unknown OID.");throw z.oid=Y,z}A=q.rsaPublicKey}if(K=[],!C8.validate(A,t2Y,q,K)){var z=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw z.errors=K,z}var w=XK.util.createBuffer(q.publicKeyModulus).toHex(),_=XK.util.createBuffer(q.publicKeyExponent).toHex();return G5.setRsaPublicKey(new QY(w,16),new QY(_,16))};G5.publicKeyToAsn1=G5.publicKeyToSubjectPublicKeyInfo=function(A){return C8.create(C8.Class.UNIVERSAL,C8.Type.SEQUENCE,!0,[C8.create(C8.Class.UNIVERSAL,C8.Type.SEQUENCE,!0,[C8.create(C8.Class.UNIVERSAL,C8.Type.OID,!1,C8.oidToDer(G5.oids.rsaEncryption).getBytes()),C8.create(C8.Class.UNIVERSAL,C8.Type.NULL,!1,"")]),C8.create(C8.Class.UNIVERSAL,C8.Type.BITSTRING,!1,[G5.publicKeyToRSAPublicKey(A)])])};G5.publicKeyToRSAPublicKey=function(A){return C8.create(C8.Class.UNIVERSAL,C8.Type.SEQUENCE,!0,[C8.create(C8.Class.UNIVERSAL,C8.Type.INTEGER,!1,sF(A.n)),C8.create(C8.Class.UNIVERSAL,C8.Type.INTEGER,!1,sF(A.e))])};function vP4(A,q,K){var Y=XK.util.createBuffer(),z=Math.ceil(q.n.bitLength()/8);if(A.length>z-11){var w=Error("Message is too long for PKCS#1 v1.5 padding.");throw w.length=A.length,w.max=z-11,w}Y.putByte(0),Y.putByte(K);var _=z-3-A.length,$;if(K===0||K===1){$=K===0?0:255;for(var O=0;O<_;++O)Y.putByte($)}else while(_>0){var H=0,j=XK.random.getBytes(_);for(var O=0;O<_;++O)if($=j.charCodeAt(O),$===0)++H;else Y.putByte($);_=H}return Y.putByte(0),Y.putBytes(A),Y}function Hf1(A,q,K,Y){var z=Math.ceil(q.n.bitLength()/8),w=XK.util.createBuffer(A),_=w.getByte(),$=w.getByte();if(_!==0||K&&$!==0&&$!==1||!K&&$!=2||K&&$===0&&typeof Y>"u")throw Error("Encryption block is invalid.");var O=0;if($===0){O=z-3-Y;for(var H=0;H1){if(w.getByte()!==255){--w.read;break}++O}}else if($===2){O=0;while(w.length()>1){if(w.getByte()===0){--w.read;break}++O}}var j=w.getByte();if(j!==0||O!==z-3-w.length())throw Error("Encryption block is invalid.");return w.getBytes()}function K_Y(A,q,K){if(typeof q==="function")K=q,q={};q=q||{};var Y={algorithm:{name:q.algorithm||"PRIMEINC",options:{workers:q.workers||2,workLoad:q.workLoad||100,workerScript:q.workerScript}}};if("prng"in q)Y.prng=q.prng;z();function z(){w(A.pBits,function($,O){if($)return K($);if(A.p=O,A.q!==null)return _($,A.q);w(A.qBits,_)})}function w($,O){XK.prime.generateProbablePrime($,Y,O)}function _($,O){if($)return K($);if(A.q=O,A.p.compareTo(A.q)<0){var H=A.p;A.p=A.q,A.q=H}if(A.p.subtract(QY.ONE).gcd(A.e).compareTo(QY.ONE)!==0){A.p=null,z();return}if(A.q.subtract(QY.ONE).gcd(A.e).compareTo(QY.ONE)!==0){A.q=null,w(A.qBits,_);return}if(A.p1=A.p.subtract(QY.ONE),A.q1=A.q.subtract(QY.ONE),A.phi=A.p1.multiply(A.q1),A.phi.gcd(A.e).compareTo(QY.ONE)!==0){A.p=A.q=null,z();return}if(A.n=A.p.multiply(A.q),A.n.bitLength()!==A.bits){A.q=null,w(A.qBits,_);return}var j=A.e.modInverse(A.phi);A.keys={privateKey:G5.rsa.setPrivateKey(A.n,A.e,j,A.p,A.q,j.mod(A.p1),j.mod(A.q1),A.q.modInverse(A.p)),publicKey:G5.rsa.setPublicKey(A.n,A.e)},K(null,A.keys)}}function sF(A){var q=A.toString(16);if(q[0]>="8")q="00"+q;var K=XK.util.hexToBytes(q);if(K.length>1&&(K.charCodeAt(0)===0&&(K.charCodeAt(1)&128)===0||K.charCodeAt(0)===255&&(K.charCodeAt(1)&128)===128))return K.substr(1);return K}function Y_Y(A){if(A<=100)return 27;if(A<=150)return 18;if(A<=200)return 15;if(A<=250)return 12;if(A<=300)return 9;if(A<=350)return 8;if(A<=400)return 7;if(A<=500)return 6;if(A<=600)return 5;if(A<=800)return 4;if(A<=1250)return 3;return 2}function GP4(A){return XK.util.isNodejs&&typeof pR8[A]==="function"}function fP4(A){return typeof _C.globalScope<"u"&&typeof _C.globalScope.crypto==="object"&&typeof _C.globalScope.crypto.subtle==="object"&&typeof _C.globalScope.crypto.subtle[A]==="function"}function TP4(A){return typeof _C.globalScope<"u"&&typeof _C.globalScope.msCrypto==="object"&&typeof _C.globalScope.msCrypto.subtle==="object"&&typeof _C.globalScope.msCrypto.subtle[A]==="function"}function VP4(A){var q=XK.util.hexToBytes(A.toString(16)),K=new Uint8Array(q.length);for(var Y=0;Y{var b4=w9();W16();Rx();Tc6();cF();Z16();zf1();Iz6();zC();xR8();vc6();bz();if(typeof dR8>"u")dR8=b4.jsbn.BigInteger;var dR8,jA=b4.asn1,n5=b4.pki=b4.pki||{};RP4.exports=n5.pbe=b4.pbe=b4.pbe||{};var uz6=n5.oids,z_Y={name:"EncryptedPrivateKeyInfo",tagClass:jA.Class.UNIVERSAL,type:jA.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:jA.Class.UNIVERSAL,type:jA.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:jA.Class.UNIVERSAL,type:jA.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:jA.Class.UNIVERSAL,type:jA.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:jA.Class.UNIVERSAL,type:jA.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},w_Y={name:"PBES2Algorithms",tagClass:jA.Class.UNIVERSAL,type:jA.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:jA.Class.UNIVERSAL,type:jA.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:jA.Class.UNIVERSAL,type:jA.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:jA.Class.UNIVERSAL,type:jA.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:jA.Class.UNIVERSAL,type:jA.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:jA.Class.UNIVERSAL,type:jA.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:jA.Class.UNIVERSAL,type:jA.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:jA.Class.UNIVERSAL,type:jA.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:jA.Class.UNIVERSAL,type:jA.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:jA.Class.UNIVERSAL,type:jA.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:jA.Class.UNIVERSAL,type:jA.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:jA.Class.UNIVERSAL,type:jA.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},__Y={name:"pkcs-12PbeParams",tagClass:jA.Class.UNIVERSAL,type:jA.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:jA.Class.UNIVERSAL,type:jA.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:jA.Class.UNIVERSAL,type:jA.Type.INTEGER,constructed:!1,capture:"iterations"}]};n5.encryptPrivateKeyInfo=function(A,q,K){K=K||{},K.saltSize=K.saltSize||8,K.count=K.count||2048,K.algorithm=K.algorithm||"aes128",K.prfAlgorithm=K.prfAlgorithm||"sha1";var Y=b4.random.getBytesSync(K.saltSize),z=K.count,w=jA.integerToDer(z),_,$,O;if(K.algorithm.indexOf("aes")===0||K.algorithm==="des"){var H,j,J;switch(K.algorithm){case"aes128":_=16,H=16,j=uz6["aes128-CBC"],J=b4.aes.createEncryptionCipher;break;case"aes192":_=24,H=16,j=uz6["aes192-CBC"],J=b4.aes.createEncryptionCipher;break;case"aes256":_=32,H=16,j=uz6["aes256-CBC"],J=b4.aes.createEncryptionCipher;break;case"des":_=8,H=8,j=uz6.desCBC,J=b4.des.createEncryptionCipher;break;default:var M=Error("Cannot encrypt private key. Unknown encryption algorithm.");throw M.algorithm=K.algorithm,M}var D="hmacWith"+K.prfAlgorithm.toUpperCase(),X=yP4(D),P=b4.pkcs5.pbkdf2(q,Y,z,_,X),W=b4.random.getBytesSync(H),Z=J(P);Z.start(W),Z.update(jA.toDer(A)),Z.finish(),O=Z.output.getBytes();var G=$_Y(Y,w,_,D);$=jA.create(jA.Class.UNIVERSAL,jA.Type.SEQUENCE,!0,[jA.create(jA.Class.UNIVERSAL,jA.Type.OID,!1,jA.oidToDer(uz6.pkcs5PBES2).getBytes()),jA.create(jA.Class.UNIVERSAL,jA.Type.SEQUENCE,!0,[jA.create(jA.Class.UNIVERSAL,jA.Type.SEQUENCE,!0,[jA.create(jA.Class.UNIVERSAL,jA.Type.OID,!1,jA.oidToDer(uz6.pkcs5PBKDF2).getBytes()),G]),jA.create(jA.Class.UNIVERSAL,jA.Type.SEQUENCE,!0,[jA.create(jA.Class.UNIVERSAL,jA.Type.OID,!1,jA.oidToDer(j).getBytes()),jA.create(jA.Class.UNIVERSAL,jA.Type.OCTETSTRING,!1,W)])])])}else if(K.algorithm==="3des"){_=24;var f=new b4.util.ByteBuffer(Y),P=n5.pbe.generatePkcs12Key(q,f,1,z,_),W=n5.pbe.generatePkcs12Key(q,f,2,z,_),Z=b4.des.createEncryptionCipher(P);Z.start(W),Z.update(jA.toDer(A)),Z.finish(),O=Z.output.getBytes(),$=jA.create(jA.Class.UNIVERSAL,jA.Type.SEQUENCE,!0,[jA.create(jA.Class.UNIVERSAL,jA.Type.OID,!1,jA.oidToDer(uz6["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),jA.create(jA.Class.UNIVERSAL,jA.Type.SEQUENCE,!0,[jA.create(jA.Class.UNIVERSAL,jA.Type.OCTETSTRING,!1,Y),jA.create(jA.Class.UNIVERSAL,jA.Type.INTEGER,!1,w.getBytes())])])}else{var M=Error("Cannot encrypt private key. Unknown encryption algorithm.");throw M.algorithm=K.algorithm,M}var V=jA.create(jA.Class.UNIVERSAL,jA.Type.SEQUENCE,!0,[$,jA.create(jA.Class.UNIVERSAL,jA.Type.OCTETSTRING,!1,O)]);return V};n5.decryptPrivateKeyInfo=function(A,q){var K=null,Y={},z=[];if(!jA.validate(A,z_Y,Y,z)){var w=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw w.errors=z,w}var _=jA.derToOid(Y.encryptionOid),$=n5.pbe.getCipher(_,Y.encryptionParams,q),O=b4.util.createBuffer(Y.encryptedData);if($.update(O),$.finish())K=jA.fromDer($.output);return K};n5.encryptedPrivateKeyToPem=function(A,q){var K={type:"ENCRYPTED PRIVATE KEY",body:jA.toDer(A).getBytes()};return b4.pem.encode(K,{maxline:q})};n5.encryptedPrivateKeyFromPem=function(A){var q=b4.pem.decode(A)[0];if(q.type!=="ENCRYPTED PRIVATE KEY"){var K=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw K.headerType=q.type,K}if(q.procType&&q.procType.type==="ENCRYPTED")throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return jA.fromDer(q.body)};n5.encryptRsaPrivateKey=function(A,q,K){if(K=K||{},!K.legacy){var Y=n5.wrapRsaPrivateKey(n5.privateKeyToAsn1(A));return Y=n5.encryptPrivateKeyInfo(Y,q,K),n5.encryptedPrivateKeyToPem(Y)}var z,w,_,$;switch(K.algorithm){case"aes128":z="AES-128-CBC",_=16,w=b4.random.getBytesSync(16),$=b4.aes.createEncryptionCipher;break;case"aes192":z="AES-192-CBC",_=24,w=b4.random.getBytesSync(16),$=b4.aes.createEncryptionCipher;break;case"aes256":z="AES-256-CBC",_=32,w=b4.random.getBytesSync(16),$=b4.aes.createEncryptionCipher;break;case"3des":z="DES-EDE3-CBC",_=24,w=b4.random.getBytesSync(8),$=b4.des.createEncryptionCipher;break;case"des":z="DES-CBC",_=8,w=b4.random.getBytesSync(8),$=b4.des.createEncryptionCipher;break;default:var O=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+K.algorithm+'".');throw O.algorithm=K.algorithm,O}var H=b4.pbe.opensslDeriveBytes(q,w.substr(0,8),_),j=$(H);j.start(w),j.update(jA.toDer(n5.privateKeyToAsn1(A))),j.finish();var J={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:z,parameters:b4.util.bytesToHex(w).toUpperCase()},body:j.output.getBytes()};return b4.pem.encode(J)};n5.decryptRsaPrivateKey=function(A,q){var K=null,Y=b4.pem.decode(A)[0];if(Y.type!=="ENCRYPTED PRIVATE KEY"&&Y.type!=="PRIVATE KEY"&&Y.type!=="RSA PRIVATE KEY"){var z=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw z.headerType=z,z}if(Y.procType&&Y.procType.type==="ENCRYPTED"){var w,_;switch(Y.dekInfo.algorithm){case"DES-CBC":w=8,_=b4.des.createDecryptionCipher;break;case"DES-EDE3-CBC":w=24,_=b4.des.createDecryptionCipher;break;case"AES-128-CBC":w=16,_=b4.aes.createDecryptionCipher;break;case"AES-192-CBC":w=24,_=b4.aes.createDecryptionCipher;break;case"AES-256-CBC":w=32,_=b4.aes.createDecryptionCipher;break;case"RC2-40-CBC":w=5,_=function(J){return b4.rc2.createDecryptionCipher(J,40)};break;case"RC2-64-CBC":w=8,_=function(J){return b4.rc2.createDecryptionCipher(J,64)};break;case"RC2-128-CBC":w=16,_=function(J){return b4.rc2.createDecryptionCipher(J,128)};break;default:var z=Error('Could not decrypt private key; unsupported encryption algorithm "'+Y.dekInfo.algorithm+'".');throw z.algorithm=Y.dekInfo.algorithm,z}var $=b4.util.hexToBytes(Y.dekInfo.parameters),O=b4.pbe.opensslDeriveBytes(q,$.substr(0,8),w),H=_(O);if(H.start($),H.update(b4.util.createBuffer(Y.body)),H.finish())K=H.output.getBytes();else return K}else K=Y.body;if(Y.type==="ENCRYPTED PRIVATE KEY")K=n5.decryptPrivateKeyInfo(jA.fromDer(K),q);else K=jA.fromDer(K);if(K!==null)K=n5.privateKeyFromAsn1(K);return K};n5.pbe.generatePkcs12Key=function(A,q,K,Y,z,w){var _,$;if(typeof w>"u"||w===null){if(!("sha1"in b4.md))throw Error('"sha1" hash algorithm unavailable.');w=b4.md.sha1.create()}var{digestLength:O,blockLength:H}=w,j=new b4.util.ByteBuffer,J=new b4.util.ByteBuffer;if(A!==null&&A!==void 0){for($=0;$=0;$--)F=F>>8,F+=R.at($)+x.at($),x.setAt($,F&255);B.putBuffer(x)}f=B,j.putBuffer(v)}return j.truncate(j.length()-z),j};n5.pbe.getCipher=function(A,q,K){switch(A){case n5.oids.pkcs5PBES2:return n5.pbe.getCipherForPBES2(A,q,K);case n5.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case n5.oids["pbewithSHAAnd40BitRC2-CBC"]:return n5.pbe.getCipherForPKCS12PBE(A,q,K);default:var Y=Error("Cannot read encrypted PBE data block. Unsupported OID.");throw Y.oid=A,Y.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],Y}};n5.pbe.getCipherForPBES2=function(A,q,K){var Y={},z=[];if(!jA.validate(q,w_Y,Y,z)){var w=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw w.errors=z,w}if(A=jA.derToOid(Y.kdfOid),A!==n5.oids.pkcs5PBKDF2){var w=Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw w.oid=A,w.supportedOids=["pkcs5PBKDF2"],w}if(A=jA.derToOid(Y.encOid),A!==n5.oids["aes128-CBC"]&&A!==n5.oids["aes192-CBC"]&&A!==n5.oids["aes256-CBC"]&&A!==n5.oids["des-EDE3-CBC"]&&A!==n5.oids.desCBC){var w=Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw w.oid=A,w.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],w}var _=Y.kdfSalt,$=b4.util.createBuffer(Y.kdfIterationCount);$=$.getInt($.length()<<3);var O,H;switch(n5.oids[A]){case"aes128-CBC":O=16,H=b4.aes.createDecryptionCipher;break;case"aes192-CBC":O=24,H=b4.aes.createDecryptionCipher;break;case"aes256-CBC":O=32,H=b4.aes.createDecryptionCipher;break;case"des-EDE3-CBC":O=24,H=b4.des.createDecryptionCipher;break;case"desCBC":O=8,H=b4.des.createDecryptionCipher;break}var j=LP4(Y.prfOid),J=b4.pkcs5.pbkdf2(K,_,$,O,j),M=Y.encIv,D=H(J);return D.start(M),D};n5.pbe.getCipherForPKCS12PBE=function(A,q,K){var Y={},z=[];if(!jA.validate(q,__Y,Y,z)){var w=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw w.errors=z,w}var _=b4.util.createBuffer(Y.salt),$=b4.util.createBuffer(Y.iterations);$=$.getInt($.length()<<3);var O,H,j;switch(A){case n5.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:O=24,H=8,j=b4.des.startDecrypting;break;case n5.oids["pbewithSHAAnd40BitRC2-CBC"]:O=5,H=8,j=function(P,W){var Z=b4.rc2.createDecryptionCipher(P,40);return Z.start(W,null),Z};break;default:var w=Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw w.oid=A,w}var J=LP4(Y.prfOid),M=n5.pbe.generatePkcs12Key(K,_,1,$,O,J);J.start();var D=n5.pbe.generatePkcs12Key(K,_,2,$,H,J);return j(M,D)};n5.pbe.opensslDeriveBytes=function(A,q,K,Y){if(typeof Y>"u"||Y===null){if(!("md5"in b4.md))throw Error('"md5" hash algorithm unavailable.');Y=b4.md.md5.create()}if(q===null)q="";var z=[EP4(Y,A+q)];for(var w=16,_=1;w{var zT6=w9();Rx();bz();var N4=zT6.asn1,wT6=hP4.exports=zT6.pkcs7asn1=zT6.pkcs7asn1||{};zT6.pkcs7=zT6.pkcs7||{};zT6.pkcs7.asn1=wT6;var SP4={name:"ContentInfo",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:N4.Class.UNIVERSAL,type:N4.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:N4.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};wT6.contentInfoValidator=SP4;var CP4={name:"EncryptedContentInfo",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:N4.Class.UNIVERSAL,type:N4.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:N4.Class.UNIVERSAL,type:N4.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:N4.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:N4.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};wT6.envelopedDataValidator={name:"EnvelopedData",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:N4.Class.UNIVERSAL,type:N4.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(CP4)};wT6.encryptedDataValidator={name:"EncryptedData",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:N4.Class.UNIVERSAL,type:N4.Type.INTEGER,constructed:!1,capture:"version"}].concat(CP4)};var O_Y={name:"SignerInfo",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:N4.Class.UNIVERSAL,type:N4.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:N4.Class.UNIVERSAL,type:N4.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:N4.Class.UNIVERSAL,type:N4.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:N4.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:N4.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:N4.Class.UNIVERSAL,type:N4.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:N4.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};wT6.signedDataValidator={name:"SignedData",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:N4.Class.UNIVERSAL,type:N4.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},SP4,{name:"SignedData.Certificates",tagClass:N4.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:N4.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SET,capture:"signerInfos",optional:!0,value:[O_Y]}]};wT6.recipientInfoValidator={name:"RecipientInfo",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:N4.Class.UNIVERSAL,type:N4.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:N4.Class.UNIVERSAL,type:N4.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:N4.Class.UNIVERSAL,type:N4.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:N4.Class.UNIVERSAL,type:N4.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:N4.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:N4.Class.UNIVERSAL,type:N4.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var iR8=C((SG_,IP4)=>{var Bz6=w9();bz();Bz6.mgf=Bz6.mgf||{};var H_Y=IP4.exports=Bz6.mgf.mgf1=Bz6.mgf1=Bz6.mgf1||{};H_Y.create=function(A){var q={generate:function(K,Y){var z=new Bz6.util.ByteBuffer,w=Math.ceil(Y/A.digestLength);for(var _=0;_{var jf1=w9();iR8();bP4.exports=jf1.mgf=jf1.mgf||{};jf1.mgf.mgf1=jf1.mgf1});var Jf1=C((hG_,uP4)=>{var mz6=w9();zC();bz();var j_Y=uP4.exports=mz6.pss=mz6.pss||{};j_Y.create=function(A){if(arguments.length===3)A={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]};var{md:q,mgf:K}=A,Y=q.digestLength,z=A.salt||null;if(typeof z==="string")z=mz6.util.createBuffer(z);var w;if("saltLength"in A)w=A.saltLength;else if(z!==null)w=z.length();else throw Error("Salt length not specified or specific salt not given.");if(z!==null&&z.length()!==w)throw Error("Given salt length does not match length of given salt.");var _=A.prng||mz6.random,$={};return $.encode=function(O,H){var j,J=H-1,M=Math.ceil(J/8),D=O.digest().getBytes();if(M>8*M-J&255;return N=String.fromCharCode(N.charCodeAt(0)&~v)+N.substr(1),N+W+String.fromCharCode(188)},$.verify=function(O,H,j){var J,M=j-1,D=Math.ceil(M/8);if(H=H.substr(-D),D>8*D-M&255;if((P.charCodeAt(0)&Z)!==0)throw Error("Bits beyond keysize not zero as expected.");var G=K.generate(W,X),f="";for(J=0;J{var PK=w9();W16();Rx();Tc6();cF();xP4();Z16();Iz6();Jf1();vc6();bz();var z1=PK.asn1,F7=QP4.exports=PK.pki=PK.pki||{},Jz=F7.oids,sj={};sj.CN=Jz.commonName;sj.commonName="CN";sj.C=Jz.countryName;sj.countryName="C";sj.L=Jz.localityName;sj.localityName="L";sj.ST=Jz.stateOrProvinceName;sj.stateOrProvinceName="ST";sj.O=Jz.organizationName;sj.organizationName="O";sj.OU=Jz.organizationalUnitName;sj.organizationalUnitName="OU";sj.E=Jz.emailAddress;sj.emailAddress="E";var mP4=PK.pki.rsa.publicKeyValidator,J_Y={name:"Certificate",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:z1.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:z1.Class.UNIVERSAL,type:z1.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:z1.Class.UNIVERSAL,type:z1.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:z1.Class.UNIVERSAL,type:z1.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:z1.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:z1.Class.UNIVERSAL,type:z1.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:z1.Class.UNIVERSAL,type:z1.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:z1.Class.UNIVERSAL,type:z1.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:z1.Class.UNIVERSAL,type:z1.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},mP4,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:z1.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:z1.Class.UNIVERSAL,type:z1.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:z1.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:z1.Class.UNIVERSAL,type:z1.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:z1.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:z1.Class.UNIVERSAL,type:z1.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:z1.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:z1.Class.UNIVERSAL,type:z1.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},M_Y={name:"rsapss",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:z1.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:z1.Class.UNIVERSAL,type:z1.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:z1.Class.UNIVERSAL,type:z1.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:z1.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:z1.Class.UNIVERSAL,type:z1.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:z1.Class.UNIVERSAL,type:z1.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:z1.Class.UNIVERSAL,type:z1.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:z1.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:z1.Class.UNIVERSAL,type:z1.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:z1.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:z1.Class.UNIVERSAL,type:z1.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},D_Y={name:"CertificationRequestInfo",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:z1.Class.UNIVERSAL,type:z1.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},mP4,{name:"CertificationRequestInfo.attributes",tagClass:z1.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:z1.Class.UNIVERSAL,type:z1.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SET,constructed:!0}]}]}]},X_Y={name:"CertificationRequest",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[D_Y,{name:"CertificationRequest.signatureAlgorithm",tagClass:z1.Class.UNIVERSAL,type:z1.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:z1.Class.UNIVERSAL,type:z1.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:z1.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:z1.Class.UNIVERSAL,type:z1.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};F7.RDNAttributesAsArray=function(A,q){var K=[],Y,z,w;for(var _=0;_2)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(O.length<2)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(_.validity.notBefore=O[0],_.validity.notAfter=O[1],_.tbsCertificate=K.tbsCertificate,q){_.md=Df1({signatureOid:_.signatureOid,type:"certificate"});var H=z1.toDer(_.tbsCertificate);_.md.update(H.getBytes())}var j=PK.md.sha1.create(),J=z1.toDer(K.certIssuer);if(j.update(J.getBytes()),_.issuer.getField=function(X){return T16(_.issuer,X)},_.issuer.addField=function(X){$C([X]),_.issuer.attributes.push(X)},_.issuer.attributes=F7.RDNAttributesAsArray(K.certIssuer),K.certIssuerUniqueId)_.issuer.uniqueId=K.certIssuerUniqueId;_.issuer.hash=j.digest().toHex();var M=PK.md.sha1.create(),D=z1.toDer(K.certSubject);if(M.update(D.getBytes()),_.subject.getField=function(X){return T16(_.subject,X)},_.subject.addField=function(X){$C([X]),_.subject.attributes.push(X)},_.subject.attributes=F7.RDNAttributesAsArray(K.certSubject),K.certSubjectUniqueId)_.subject.uniqueId=K.certSubjectUniqueId;if(_.subject.hash=M.digest().toHex(),K.certExtensions)_.extensions=F7.certificateExtensionsFromAsn1(K.certExtensions);else _.extensions=[];return _.publicKey=F7.publicKeyFromAsn1(K.subjectPublicKeyInfo),_};F7.certificateExtensionsFromAsn1=function(A){var q=[];for(var K=0;K1)Y=K.value.charCodeAt(1),z=K.value.length>2?K.value.charCodeAt(2):0;q.digitalSignature=(Y&128)===128,q.nonRepudiation=(Y&64)===64,q.keyEncipherment=(Y&32)===32,q.dataEncipherment=(Y&16)===16,q.keyAgreement=(Y&8)===8,q.keyCertSign=(Y&4)===4,q.cRLSign=(Y&2)===2,q.encipherOnly=(Y&1)===1,q.decipherOnly=(z&128)===128}else if(q.name==="basicConstraints"){var K=z1.fromDer(q.value);if(K.value.length>0&&K.value[0].type===z1.Type.BOOLEAN)q.cA=K.value[0].value.charCodeAt(0)!==0;else q.cA=!1;var w=null;if(K.value.length>0&&K.value[0].type===z1.Type.INTEGER)w=K.value[0].value;else if(K.value.length>1)w=K.value[1].value;if(w!==null)q.pathLenConstraint=z1.derToInteger(w)}else if(q.name==="extKeyUsage"){var K=z1.fromDer(q.value);for(var _=0;_1)Y=K.value.charCodeAt(1);q.client=(Y&128)===128,q.server=(Y&64)===64,q.email=(Y&32)===32,q.objsign=(Y&16)===16,q.reserved=(Y&8)===8,q.sslCA=(Y&4)===4,q.emailCA=(Y&2)===2,q.objCA=(Y&1)===1}else if(q.name==="subjectAltName"||q.name==="issuerAltName"){q.altNames=[];var O,K=z1.fromDer(q.value);for(var H=0;H"u"){if(q.type&&q.type in F7.oids)q.name=F7.oids[q.type];else if(q.shortName&&q.shortName in sj)q.name=F7.oids[sj[q.shortName]]}if(typeof q.type>"u")if(q.name&&q.name in F7.oids)q.type=F7.oids[q.name];else{var Y=Error("Attribute type not specified.");throw Y.attribute=q,Y}if(typeof q.shortName>"u"){if(q.name&&q.name in sj)q.shortName=sj[q.name]}if(q.type===Jz.extensionRequest){if(q.valueConstructed=!0,q.valueTagClass=z1.Type.SEQUENCE,!q.value&&q.extensions){q.value=[];for(var z=0;z"u"){var Y=Error("Attribute value not specified.");throw Y.attribute=q,Y}}}function FP4(A,q){if(q=q||{},typeof A.name>"u"){if(A.id&&A.id in F7.oids)A.name=F7.oids[A.id]}if(typeof A.id>"u")if(A.name&&A.name in F7.oids)A.id=F7.oids[A.name];else{var K=Error("Extension ID not specified.");throw K.extension=A,K}if(typeof A.value<"u")return A;if(A.name==="keyUsage"){var Y=0,z=0,w=0;if(A.digitalSignature)z|=128,Y=7;if(A.nonRepudiation)z|=64,Y=6;if(A.keyEncipherment)z|=32,Y=5;if(A.dataEncipherment)z|=16,Y=4;if(A.keyAgreement)z|=8,Y=3;if(A.keyCertSign)z|=4,Y=2;if(A.cRLSign)z|=2,Y=1;if(A.encipherOnly)z|=1,Y=0;if(A.decipherOnly)w|=128,Y=7;var _=String.fromCharCode(Y);if(w!==0)_+=String.fromCharCode(z)+String.fromCharCode(w);else if(z!==0)_+=String.fromCharCode(z);A.value=z1.create(z1.Class.UNIVERSAL,z1.Type.BITSTRING,!1,_)}else if(A.name==="basicConstraints"){if(A.value=z1.create(z1.Class.UNIVERSAL,z1.Type.SEQUENCE,!0,[]),A.cA)A.value.value.push(z1.create(z1.Class.UNIVERSAL,z1.Type.BOOLEAN,!1,String.fromCharCode(255)));if("pathLenConstraint"in A)A.value.value.push(z1.create(z1.Class.UNIVERSAL,z1.Type.INTEGER,!1,z1.integerToDer(A.pathLenConstraint).getBytes()))}else if(A.name==="extKeyUsage"){A.value=z1.create(z1.Class.UNIVERSAL,z1.Type.SEQUENCE,!0,[]);var $=A.value.value;for(var O in A){if(A[O]!==!0)continue;if(O in Jz)$.push(z1.create(z1.Class.UNIVERSAL,z1.Type.OID,!1,z1.oidToDer(Jz[O]).getBytes()));else if(O.indexOf(".")!==-1)$.push(z1.create(z1.Class.UNIVERSAL,z1.Type.OID,!1,z1.oidToDer(O).getBytes()))}}else if(A.name==="nsCertType"){var Y=0,z=0;if(A.client)z|=128,Y=7;if(A.server)z|=64,Y=6;if(A.email)z|=32,Y=5;if(A.objsign)z|=16,Y=4;if(A.reserved)z|=8,Y=3;if(A.sslCA)z|=4,Y=2;if(A.emailCA)z|=2,Y=1;if(A.objCA)z|=1,Y=0;var _=String.fromCharCode(Y);if(z!==0)_+=String.fromCharCode(z);A.value=z1.create(z1.Class.UNIVERSAL,z1.Type.BITSTRING,!1,_)}else if(A.name==="subjectAltName"||A.name==="issuerAltName"){A.value=z1.create(z1.Class.UNIVERSAL,z1.Type.SEQUENCE,!0,[]);var H;for(var j=0;j128)throw Error('Invalid "nsComment" content.');A.value=z1.create(z1.Class.UNIVERSAL,z1.Type.IA5STRING,!1,A.comment)}else if(A.name==="subjectKeyIdentifier"&&q.cert){var J=q.cert.generateSubjectKeyIdentifier();A.subjectKeyIdentifier=J.toHex(),A.value=z1.create(z1.Class.UNIVERSAL,z1.Type.OCTETSTRING,!1,J.getBytes())}else if(A.name==="authorityKeyIdentifier"&&q.cert){A.value=z1.create(z1.Class.UNIVERSAL,z1.Type.SEQUENCE,!0,[]);var $=A.value.value;if(A.keyIdentifier){var M=A.keyIdentifier===!0?q.cert.generateSubjectKeyIdentifier().getBytes():A.keyIdentifier;$.push(z1.create(z1.Class.CONTEXT_SPECIFIC,0,!1,M))}if(A.authorityCertIssuer){var D=[z1.create(z1.Class.CONTEXT_SPECIFIC,4,!0,[_T6(A.authorityCertIssuer===!0?q.cert.issuer:A.authorityCertIssuer)])];$.push(z1.create(z1.Class.CONTEXT_SPECIFIC,1,!0,D))}if(A.serialNumber){var X=PK.util.hexToBytes(A.serialNumber===!0?q.cert.serialNumber:A.serialNumber);$.push(z1.create(z1.Class.CONTEXT_SPECIFIC,2,!1,X))}}else if(A.name==="cRLDistributionPoints"){A.value=z1.create(z1.Class.UNIVERSAL,z1.Type.SEQUENCE,!0,[]);var $=A.value.value,P=z1.create(z1.Class.UNIVERSAL,z1.Type.SEQUENCE,!0,[]),W=z1.create(z1.Class.CONTEXT_SPECIFIC,0,!0,[]),H;for(var j=0;j"u"){var K=Error("Extension value not specified.");throw K.extension=A,K}return A}function nR8(A,q){switch(A){case Jz["RSASSA-PSS"]:var K=[];if(q.hash.algorithmOid!==void 0)K.push(z1.create(z1.Class.CONTEXT_SPECIFIC,0,!0,[z1.create(z1.Class.UNIVERSAL,z1.Type.SEQUENCE,!0,[z1.create(z1.Class.UNIVERSAL,z1.Type.OID,!1,z1.oidToDer(q.hash.algorithmOid).getBytes()),z1.create(z1.Class.UNIVERSAL,z1.Type.NULL,!1,"")])]));if(q.mgf.algorithmOid!==void 0)K.push(z1.create(z1.Class.CONTEXT_SPECIFIC,1,!0,[z1.create(z1.Class.UNIVERSAL,z1.Type.SEQUENCE,!0,[z1.create(z1.Class.UNIVERSAL,z1.Type.OID,!1,z1.oidToDer(q.mgf.algorithmOid).getBytes()),z1.create(z1.Class.UNIVERSAL,z1.Type.SEQUENCE,!0,[z1.create(z1.Class.UNIVERSAL,z1.Type.OID,!1,z1.oidToDer(q.mgf.hash.algorithmOid).getBytes()),z1.create(z1.Class.UNIVERSAL,z1.Type.NULL,!1,"")])])]));if(q.saltLength!==void 0)K.push(z1.create(z1.Class.CONTEXT_SPECIFIC,2,!0,[z1.create(z1.Class.UNIVERSAL,z1.Type.INTEGER,!1,z1.integerToDer(q.saltLength).getBytes())]));return z1.create(z1.Class.UNIVERSAL,z1.Type.SEQUENCE,!0,K);default:return z1.create(z1.Class.UNIVERSAL,z1.Type.NULL,!1,"")}}function P_Y(A){var q=z1.create(z1.Class.CONTEXT_SPECIFIC,0,!0,[]);if(A.attributes.length===0)return q;var K=A.attributes;for(var Y=0;Y=W_Y&&A0)Y.value.push(F7.certificateExtensionsToAsn1(A.extensions));return Y};F7.getCertificationRequestInfo=function(A){var q=z1.create(z1.Class.UNIVERSAL,z1.Type.SEQUENCE,!0,[z1.create(z1.Class.UNIVERSAL,z1.Type.INTEGER,!1,z1.integerToDer(A.version).getBytes()),_T6(A.subject),F7.publicKeyToAsn1(A.publicKey),P_Y(A)]);return q};F7.distinguishedNameToAsn1=function(A){return _T6(A)};F7.certificateToAsn1=function(A){var q=A.tbsCertificate||F7.getTBSCertificate(A);return z1.create(z1.Class.UNIVERSAL,z1.Type.SEQUENCE,!0,[q,z1.create(z1.Class.UNIVERSAL,z1.Type.SEQUENCE,!0,[z1.create(z1.Class.UNIVERSAL,z1.Type.OID,!1,z1.oidToDer(A.signatureOid).getBytes()),nR8(A.signatureOid,A.signatureParameters)]),z1.create(z1.Class.UNIVERSAL,z1.Type.BITSTRING,!1,String.fromCharCode(0)+A.signature)])};F7.certificateExtensionsToAsn1=function(A){var q=z1.create(z1.Class.CONTEXT_SPECIFIC,3,!0,[]),K=z1.create(z1.Class.UNIVERSAL,z1.Type.SEQUENCE,!0,[]);q.value.push(K);for(var Y=0;Y"u")z=new Date;var w=!0,_=null,$=0;do{var O=q.shift(),H=null,j=!1;if(z){if(zO.validity.notAfter)_={message:"Certificate is not valid yet or has expired.",error:F7.certificateError.certificate_expired,notBefore:O.validity.notBefore,notAfter:O.validity.notAfter,now:z}}if(_===null){if(H=q[0]||A.getIssuer(O),H===null){if(O.isIssuer(O))j=!0,H=O}if(H){var J=H;if(!PK.util.isArray(J))J=[J];var M=!1;while(!M&&J.length>0){H=J.shift();try{M=H.verify(O)}catch(N){}}if(!M)_={message:"Certificate signature is invalid.",error:F7.certificateError.bad_certificate}}if(_===null&&(!H||j)&&!A.hasCertificate(O))_={message:"Certificate is not trusted.",error:F7.certificateError.unknown_ca}}if(_===null&&H&&!O.isIssuer(H))_={message:"Certificate issuer is invalid.",error:F7.certificateError.bad_certificate};if(_===null){var D={keyUsage:!0,basicConstraints:!0};for(var X=0;_===null&&XW.pathLenConstraint)_={message:"Certificate basicConstraints pathLenConstraint violated.",error:F7.certificateError.bad_certificate}}}var f=_===null?!0:_.error,V=K.verify?K.verify(f,$,Y):f;if(V===!0)_=null;else{if(f===!0)_={message:"The application rejected the certificate.",error:F7.certificateError.bad_certificate};if(V||V===0){if(typeof V==="object"&&!PK.util.isArray(V)){if(V.message)_.message=V.message;if(V.error)_.error=V.error}else if(typeof V==="string")_.error=V}throw _}w=!1,++$}while(q.length>0);return!0}});var oR8=C((bG_,pP4)=>{var N$=w9();Rx();ef6();Z16();lR8();cR8();zC();vc6();YT6();bz();Xf1();var{asn1:U1,pki:wY}=N$,Ec6=pP4.exports=N$.pkcs12=N$.pkcs12||{},UP4={name:"ContentInfo",tagClass:U1.Class.UNIVERSAL,type:U1.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:U1.Class.UNIVERSAL,type:U1.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:U1.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},G_Y={name:"PFX",tagClass:U1.Class.UNIVERSAL,type:U1.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:U1.Class.UNIVERSAL,type:U1.Type.INTEGER,constructed:!1,capture:"version"},UP4,{name:"PFX.macData",tagClass:U1.Class.UNIVERSAL,type:U1.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:U1.Class.UNIVERSAL,type:U1.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:U1.Class.UNIVERSAL,type:U1.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:U1.Class.UNIVERSAL,type:U1.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:U1.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:U1.Class.UNIVERSAL,type:U1.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:U1.Class.UNIVERSAL,type:U1.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:U1.Class.UNIVERSAL,type:U1.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},f_Y={name:"SafeBag",tagClass:U1.Class.UNIVERSAL,type:U1.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:U1.Class.UNIVERSAL,type:U1.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:U1.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:U1.Class.UNIVERSAL,type:U1.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},T_Y={name:"Attribute",tagClass:U1.Class.UNIVERSAL,type:U1.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:U1.Class.UNIVERSAL,type:U1.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:U1.Class.UNIVERSAL,type:U1.Type.SET,constructed:!0,capture:"values"}]},V_Y={name:"CertBag",tagClass:U1.Class.UNIVERSAL,type:U1.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:U1.Class.UNIVERSAL,type:U1.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:U1.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:U1.Class.UNIVERSAL,type:U1.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function kc6(A,q,K,Y){var z=[];for(var w=0;w=0)z.push($)}return z}Ec6.pkcs12FromAsn1=function(A,q,K){if(typeof q==="string")K=q,q=!0;else if(q===void 0)q=!0;var Y={},z=[];if(!U1.validate(A,G_Y,Y,z)){var w=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw w.errors=w,w}var _={version:Y.version.charCodeAt(0),safeContents:[],getBags:function(W){var Z={},G;if("localKeyId"in W)G=W.localKeyId;else if("localKeyIdHex"in W)G=N$.util.hexToBytes(W.localKeyIdHex);if(G===void 0&&!("friendlyName"in W)&&"bagType"in W)Z[W.bagType]=kc6(_.safeContents,null,null,W.bagType);if(G!==void 0)Z.localKeyId=kc6(_.safeContents,"localKeyId",G,W.bagType);if("friendlyName"in W)Z.friendlyName=kc6(_.safeContents,"friendlyName",W.friendlyName,W.bagType);return Z},getBagsByFriendlyName:function(W,Z){return kc6(_.safeContents,"friendlyName",W,Z)},getBagsByLocalKeyId:function(W,Z){return kc6(_.safeContents,"localKeyId",W,Z)}};if(Y.version.charCodeAt(0)!==3){var w=Error("PKCS#12 PFX of version other than 3 not supported.");throw w.version=Y.version.charCodeAt(0),w}if(U1.derToOid(Y.contentType)!==wY.oids.data){var w=Error("Only PKCS#12 PFX in password integrity mode supported.");throw w.oid=U1.derToOid(Y.contentType),w}var $=Y.content.value[0];if($.tagClass!==U1.Class.UNIVERSAL||$.type!==U1.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");if($=rR8($),Y.mac){var O=null,H=0,j=U1.derToOid(Y.macAlgorithm);switch(j){case wY.oids.sha1:O=N$.md.sha1.create(),H=20;break;case wY.oids.sha256:O=N$.md.sha256.create(),H=32;break;case wY.oids.sha384:O=N$.md.sha384.create(),H=48;break;case wY.oids.sha512:O=N$.md.sha512.create(),H=64;break;case wY.oids.md5:O=N$.md.md5.create(),H=16;break}if(O===null)throw Error("PKCS#12 uses unsupported MAC algorithm: "+j);var J=new N$.util.ByteBuffer(Y.macSalt),M="macIterations"in Y?parseInt(N$.util.bytesToHex(Y.macIterations),16):1,D=Ec6.generateKey(K,J,3,M,H,O),X=N$.hmac.create();X.start(O,D),X.update($.value);var P=X.getMac();if(P.getBytes()!==Y.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?")}return N_Y(_,$.value,q,K),_};function rR8(A){if(A.composed||A.constructed){var q=N$.util.createBuffer();for(var K=0;K0)w=U1.create(U1.Class.UNIVERSAL,U1.Type.SET,!0,O);var H=[],j=[];if(q!==null)if(N$.util.isArray(q))j=q;else j=[q];var J=[];for(var M=0;M0){var W=U1.create(U1.Class.UNIVERSAL,U1.Type.SEQUENCE,!0,J),Z=U1.create(U1.Class.UNIVERSAL,U1.Type.SEQUENCE,!0,[U1.create(U1.Class.UNIVERSAL,U1.Type.OID,!1,U1.oidToDer(wY.oids.data).getBytes()),U1.create(U1.Class.CONTEXT_SPECIFIC,0,!0,[U1.create(U1.Class.UNIVERSAL,U1.Type.OCTETSTRING,!1,U1.toDer(W).getBytes())])]);H.push(Z)}var G=null;if(A!==null){var f=wY.wrapRsaPrivateKey(wY.privateKeyToAsn1(A));if(K===null)G=U1.create(U1.Class.UNIVERSAL,U1.Type.SEQUENCE,!0,[U1.create(U1.Class.UNIVERSAL,U1.Type.OID,!1,U1.oidToDer(wY.oids.keyBag).getBytes()),U1.create(U1.Class.CONTEXT_SPECIFIC,0,!0,[f]),w]);else G=U1.create(U1.Class.UNIVERSAL,U1.Type.SEQUENCE,!0,[U1.create(U1.Class.UNIVERSAL,U1.Type.OID,!1,U1.oidToDer(wY.oids.pkcs8ShroudedKeyBag).getBytes()),U1.create(U1.Class.CONTEXT_SPECIFIC,0,!0,[wY.encryptPrivateKeyInfo(f,K,Y)]),w]);var V=U1.create(U1.Class.UNIVERSAL,U1.Type.SEQUENCE,!0,[G]),N=U1.create(U1.Class.UNIVERSAL,U1.Type.SEQUENCE,!0,[U1.create(U1.Class.UNIVERSAL,U1.Type.OID,!1,U1.oidToDer(wY.oids.data).getBytes()),U1.create(U1.Class.CONTEXT_SPECIFIC,0,!0,[U1.create(U1.Class.UNIVERSAL,U1.Type.OCTETSTRING,!1,U1.toDer(V).getBytes())])]);H.push(N)}var v=U1.create(U1.Class.UNIVERSAL,U1.Type.SEQUENCE,!0,H),y;if(Y.useMac){var $=N$.md.sha1.create(),R=new N$.util.ByteBuffer(N$.random.getBytes(Y.saltSize)),h=Y.count,A=Ec6.generateKey(K,R,3,h,20),B=N$.hmac.create();B.start($,A),B.update(U1.toDer(v).getBytes());var x=B.getMac();y=U1.create(U1.Class.UNIVERSAL,U1.Type.SEQUENCE,!0,[U1.create(U1.Class.UNIVERSAL,U1.Type.SEQUENCE,!0,[U1.create(U1.Class.UNIVERSAL,U1.Type.SEQUENCE,!0,[U1.create(U1.Class.UNIVERSAL,U1.Type.OID,!1,U1.oidToDer(wY.oids.sha1).getBytes()),U1.create(U1.Class.UNIVERSAL,U1.Type.NULL,!1,"")]),U1.create(U1.Class.UNIVERSAL,U1.Type.OCTETSTRING,!1,x.getBytes())]),U1.create(U1.Class.UNIVERSAL,U1.Type.OCTETSTRING,!1,R.getBytes()),U1.create(U1.Class.UNIVERSAL,U1.Type.INTEGER,!1,U1.integerToDer(h).getBytes())])}return U1.create(U1.Class.UNIVERSAL,U1.Type.SEQUENCE,!0,[U1.create(U1.Class.UNIVERSAL,U1.Type.INTEGER,!1,U1.integerToDer(3).getBytes()),U1.create(U1.Class.UNIVERSAL,U1.Type.SEQUENCE,!0,[U1.create(U1.Class.UNIVERSAL,U1.Type.OID,!1,U1.oidToDer(wY.oids.data).getBytes()),U1.create(U1.Class.CONTEXT_SPECIFIC,0,!0,[U1.create(U1.Class.UNIVERSAL,U1.Type.OCTETSTRING,!1,U1.toDer(v).getBytes())])]),y])};Ec6.generateKey=N$.pbe.generatePkcs12Key});var sR8=C((xG_,dP4)=>{var V16=w9();Rx();Z16();cR8();Iz6();zf1();oR8();Jf1();vc6();bz();Xf1();var aR8=V16.asn1,$T6=dP4.exports=V16.pki=V16.pki||{};$T6.pemToDer=function(A){var q=V16.pem.decode(A)[0];if(q.procType&&q.procType.type==="ENCRYPTED")throw Error("Could not convert PEM to DER; PEM is encrypted.");return V16.util.createBuffer(q.body)};$T6.privateKeyFromPem=function(A){var q=V16.pem.decode(A)[0];if(q.type!=="PRIVATE KEY"&&q.type!=="RSA PRIVATE KEY"){var K=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw K.headerType=q.type,K}if(q.procType&&q.procType.type==="ENCRYPTED")throw Error("Could not convert private key from PEM; PEM is encrypted.");var Y=aR8.fromDer(q.body);return $T6.privateKeyFromAsn1(Y)};$T6.privateKeyToPem=function(A,q){var K={type:"RSA PRIVATE KEY",body:aR8.toDer($T6.privateKeyToAsn1(A)).getBytes()};return V16.pem.encode(K,{maxline:q})};$T6.privateKeyInfoToPem=function(A,q){var K={type:"PRIVATE KEY",body:aR8.toDer(A).getBytes()};return V16.pem.encode(K,{maxline:q})}});var YS8=C((uG_,sP4)=>{var QA=w9();Rx();ef6();Af1();Iz6();sR8();zC();YT6();bz();var Zf1=function(A,q,K,Y){var z=QA.util.createBuffer(),w=A.length>>1,_=w+(A.length&1),$=A.substr(0,_),O=A.substr(w,_),H=QA.util.createBuffer(),j=QA.hmac.create();K=q+K;var J=Math.ceil(Y/16),M=Math.ceil(Y/20);j.start("MD5",$);var D=QA.util.createBuffer();H.putBytes(K);for(var X=0;X0)j1.queue(A,j1.createAlert(A,{level:j1.Alert.Level.warning,description:j1.Alert.Description.no_renegotiation})),j1.flush(A);A.process()};j1.parseHelloMessage=function(A,q,K){var Y=null,z=A.entity===j1.ConnectionEnd.client;if(K<38)A.error(A,{message:z?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.illegal_parameter}});else{var w=q.fragment,_=w.length();if(Y={version:{major:w.getByte(),minor:w.getByte()},random:QA.util.createBuffer(w.getBytes(32)),session_id:zL(w,1),extensions:[]},z)Y.cipher_suite=w.getBytes(2),Y.compression_method=w.getByte();else Y.cipher_suites=zL(w,2),Y.compression_methods=zL(w,1);if(_=K-(_-w.length()),_>0){var $=zL(w,2);while($.length()>0)Y.extensions.push({type:[$.getByte(),$.getByte()],data:zL($,2)});if(!z)for(var O=0;O0){var J=j.getByte();if(J!==0)break;A.session.extensions.server_name.serverNameList.push(zL(j,2).getBytes())}}}}if(A.session.version){if(Y.version.major!==A.session.version.major||Y.version.minor!==A.session.version.minor)return A.error(A,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.protocol_version}})}if(z)A.session.cipherSuite=j1.getCipherSuite(Y.cipher_suite);else{var M=QA.util.createBuffer(Y.cipher_suites.bytes());while(M.length()>0)if(A.session.cipherSuite=j1.getCipherSuite(M.getBytes(2)),A.session.cipherSuite!==null)break}if(A.session.cipherSuite===null)return A.error(A,{message:"No cipher suites in common.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.handshake_failure},cipherSuite:QA.util.bytesToHex(Y.cipher_suite)});if(z)A.session.compressionMethod=Y.compression_method;else A.session.compressionMethod=j1.CompressionMethod.none}return Y};j1.createSecurityParameters=function(A,q){var K=A.entity===j1.ConnectionEnd.client,Y=q.random.bytes(),z=K?A.session.sp.client_random:Y,w=K?Y:j1.createRandom().getBytes();A.session.sp={entity:A.entity,prf_algorithm:j1.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:A.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:z,server_random:w}};j1.handleServerHello=function(A,q,K){var Y=j1.parseHelloMessage(A,q,K);if(A.fail)return;if(Y.version.minor<=A.version.minor)A.version.minor=Y.version.minor;else return A.error(A,{message:"Incompatible TLS version.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.protocol_version}});A.session.version=A.version;var z=Y.session_id.bytes();if(z.length>0&&z===A.session.id)A.expect=iP4,A.session.resuming=!0,A.session.sp.server_random=Y.random.bytes();else A.expect=C_Y,A.session.resuming=!1,j1.createSecurityParameters(A,Y);A.session.id=z,A.process()};j1.handleClientHello=function(A,q,K){var Y=j1.parseHelloMessage(A,q,K);if(A.fail)return;var z=Y.session_id.bytes(),w=null;if(A.sessionCache){if(w=A.sessionCache.getSession(z),w===null)z="";else if(w.version.major!==Y.version.major||w.version.minor>Y.version.minor)w=null,z=""}if(z.length===0)z=QA.random.getBytes(32);if(A.session.id=z,A.session.clientHelloVersion=Y.version,A.session.sp={},w)A.version=A.session.version=w.version,A.session.sp=w.sp;else{var _;for(var $=1;$0)w=zL(z.certificate_list,3),_=QA.asn1.fromDer(w),w=QA.pki.certificateFromAsn1(_,!0),$.push(w)}catch(H){return A.error(A,{message:"Could not parse certificate list.",cause:H,send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.bad_certificate}})}var O=A.entity===j1.ConnectionEnd.client;if((O||A.verifyClient===!0)&&$.length===0)A.error(A,{message:O?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.illegal_parameter}});else if($.length===0)A.expect=O?cP4:AS8;else{if(O)A.session.serverCertificate=$[0];else A.session.clientCertificate=$[0];if(j1.verifyCertificateChain(A,$))A.expect=O?cP4:AS8}A.process()};j1.handleServerKeyExchange=function(A,q,K){if(K>0)return A.error(A,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.unsupported_certificate}});A.expect=h_Y,A.process()};j1.handleClientKeyExchange=function(A,q,K){if(K<48)return A.error(A,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.unsupported_certificate}});var Y=q.fragment,z={enc_pre_master_secret:zL(Y,2).getBytes()},w=null;if(A.getPrivateKey)try{w=A.getPrivateKey(A,A.session.serverCertificate),w=QA.pki.privateKeyFromPem(w)}catch(O){A.error(A,{message:"Could not get private key.",cause:O,send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.internal_error}})}if(w===null)return A.error(A,{message:"No private key set.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.internal_error}});try{var _=A.session.sp;_.pre_master_secret=w.decrypt(z.enc_pre_master_secret);var $=A.session.clientHelloVersion;if($.major!==_.pre_master_secret.charCodeAt(0)||$.minor!==_.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.")}catch(O){_.pre_master_secret=QA.random.getBytes(48)}if(A.expect=qS8,A.session.clientCertificate!==null)A.expect=g_Y;A.process()};j1.handleCertificateRequest=function(A,q,K){if(K<3)return A.error(A,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.illegal_parameter}});var Y=q.fragment,z={certificate_types:zL(Y,1),certificate_authorities:zL(Y,2)};A.session.certificateRequest=z,A.expect=I_Y,A.process()};j1.handleCertificateVerify=function(A,q,K){if(K<2)return A.error(A,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.illegal_parameter}});var Y=q.fragment;Y.read-=4;var z=Y.bytes();Y.read+=4;var w={signature:zL(Y,2).getBytes()},_=QA.util.createBuffer();_.putBuffer(A.session.md5.digest()),_.putBuffer(A.session.sha1.digest()),_=_.getBytes();try{var $=A.session.clientCertificate;if(!$.publicKey.verify(_,w.signature,"NONE"))throw Error("CertificateVerify signature does not match.");A.session.md5.update(z),A.session.sha1.update(z)}catch(O){return A.error(A,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.handshake_failure}})}A.expect=qS8,A.process()};j1.handleServerHelloDone=function(A,q,K){if(K>0)return A.error(A,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.record_overflow}});if(A.serverCertificate===null){var Y={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.insufficient_security}},z=0,w=A.verify(A,Y.alert.description,z,[]);if(w!==!0){if(w||w===0){if(typeof w==="object"&&!QA.util.isArray(w)){if(w.message)Y.message=w.message;if(w.alert)Y.alert.description=w.alert}else if(typeof w==="number")Y.alert.description=w}return A.error(A,Y)}}if(A.session.certificateRequest!==null)q=j1.createRecord(A,{type:j1.ContentType.handshake,data:j1.createCertificate(A)}),j1.queue(A,q);q=j1.createRecord(A,{type:j1.ContentType.handshake,data:j1.createClientKeyExchange(A)}),j1.queue(A,q),A.expect=u_Y;var _=function($,O){if($.session.certificateRequest!==null&&$.session.clientCertificate!==null)j1.queue($,j1.createRecord($,{type:j1.ContentType.handshake,data:j1.createCertificateVerify($,O)}));j1.queue($,j1.createRecord($,{type:j1.ContentType.change_cipher_spec,data:j1.createChangeCipherSpec()})),$.state.pending=j1.createConnectionState($),$.state.current.write=$.state.pending.write,j1.queue($,j1.createRecord($,{type:j1.ContentType.handshake,data:j1.createFinished($)})),$.expect=iP4,j1.flush($),$.process()};if(A.session.certificateRequest===null||A.session.clientCertificate===null)return _(A,null);j1.getClientSignature(A,_)};j1.handleChangeCipherSpec=function(A,q){if(q.fragment.getByte()!==1)return A.error(A,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.illegal_parameter}});var K=A.entity===j1.ConnectionEnd.client;if(A.session.resuming&&K||!A.session.resuming&&!K)A.state.pending=j1.createConnectionState(A);if(A.state.current.read=A.state.pending.read,!A.session.resuming&&K||A.session.resuming&&!K)A.state.pending=null;A.expect=K?b_Y:F_Y,A.process()};j1.handleFinished=function(A,q,K){var Y=q.fragment;Y.read-=4;var z=Y.bytes();Y.read+=4;var w=q.fragment.getBytes();Y=QA.util.createBuffer(),Y.putBuffer(A.session.md5.digest()),Y.putBuffer(A.session.sha1.digest());var _=A.entity===j1.ConnectionEnd.client,$=_?"server finished":"client finished",O=A.session.sp,H=12,j=Zf1;if(Y=j(O.master_secret,$,Y.getBytes(),H),Y.getBytes()!==w)return A.error(A,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.decrypt_error}});if(A.session.md5.update(z),A.session.sha1.update(z),A.session.resuming&&_||!A.session.resuming&&!_)j1.queue(A,j1.createRecord(A,{type:j1.ContentType.change_cipher_spec,data:j1.createChangeCipherSpec()})),A.state.current.write=A.state.pending.write,A.state.pending=null,j1.queue(A,j1.createRecord(A,{type:j1.ContentType.handshake,data:j1.createFinished(A)}));A.expect=_?x_Y:Q_Y,A.handshaking=!1,++A.handshakes,A.peerCertificate=_?A.session.serverCertificate:A.session.clientCertificate,j1.flush(A),A.isConnected=!0,A.connected(A),A.process()};j1.handleAlert=function(A,q){var K=q.fragment,Y={level:K.getByte(),description:K.getByte()},z;switch(Y.description){case j1.Alert.Description.close_notify:z="Connection closed.";break;case j1.Alert.Description.unexpected_message:z="Unexpected message.";break;case j1.Alert.Description.bad_record_mac:z="Bad record MAC.";break;case j1.Alert.Description.decryption_failed:z="Decryption failed.";break;case j1.Alert.Description.record_overflow:z="Record overflow.";break;case j1.Alert.Description.decompression_failure:z="Decompression failed.";break;case j1.Alert.Description.handshake_failure:z="Handshake failure.";break;case j1.Alert.Description.bad_certificate:z="Bad certificate.";break;case j1.Alert.Description.unsupported_certificate:z="Unsupported certificate.";break;case j1.Alert.Description.certificate_revoked:z="Certificate revoked.";break;case j1.Alert.Description.certificate_expired:z="Certificate expired.";break;case j1.Alert.Description.certificate_unknown:z="Certificate unknown.";break;case j1.Alert.Description.illegal_parameter:z="Illegal parameter.";break;case j1.Alert.Description.unknown_ca:z="Unknown certificate authority.";break;case j1.Alert.Description.access_denied:z="Access denied.";break;case j1.Alert.Description.decode_error:z="Decode error.";break;case j1.Alert.Description.decrypt_error:z="Decrypt error.";break;case j1.Alert.Description.export_restriction:z="Export restriction.";break;case j1.Alert.Description.protocol_version:z="Unsupported protocol version.";break;case j1.Alert.Description.insufficient_security:z="Insufficient security.";break;case j1.Alert.Description.internal_error:z="Internal error.";break;case j1.Alert.Description.user_canceled:z="User canceled.";break;case j1.Alert.Description.no_renegotiation:z="Renegotiation not supported.";break;default:z="Unknown error.";break}if(Y.description===j1.Alert.Description.close_notify)return A.close();A.error(A,{message:z,send:!1,origin:A.entity===j1.ConnectionEnd.client?"server":"client",alert:Y}),A.process()};j1.handleHandshake=function(A,q){var K=q.fragment,Y=K.getByte(),z=K.getInt24();if(z>K.length())return A.fragmented=q,q.fragment=QA.util.createBuffer(),K.read-=4,A.process();A.fragmented=null,K.read-=4;var w=K.bytes(z+4);if(K.read+=4,Y in Wf1[A.entity][A.expect]){if(A.entity===j1.ConnectionEnd.server&&!A.open&&!A.fail)A.handshaking=!0,A.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:QA.md.md5.create(),sha1:QA.md.sha1.create()};if(Y!==j1.HandshakeType.hello_request&&Y!==j1.HandshakeType.certificate_verify&&Y!==j1.HandshakeType.finished)A.session.md5.update(w),A.session.sha1.update(w);Wf1[A.entity][A.expect][Y](A,q,z)}else j1.handleUnexpected(A,q)};j1.handleApplicationData=function(A,q){A.data.putBuffer(q.fragment),A.dataReady(A),A.process()};j1.handleHeartbeat=function(A,q){var K=q.fragment,Y=K.getByte(),z=K.getInt16(),w=K.getBytes(z);if(Y===j1.HeartbeatMessageType.heartbeat_request){if(A.handshaking||z>w.length)return A.process();j1.queue(A,j1.createRecord(A,{type:j1.ContentType.heartbeat,data:j1.createHeartbeat(j1.HeartbeatMessageType.heartbeat_response,w)})),j1.flush(A)}else if(Y===j1.HeartbeatMessageType.heartbeat_response){if(w!==A.expectedHeartbeatPayload)return A.process();if(A.heartbeatReceived)A.heartbeatReceived(A,QA.util.createBuffer(w))}A.process()};var S_Y=0,C_Y=1,cP4=2,h_Y=3,I_Y=4,iP4=5,b_Y=6,x_Y=7,u_Y=8,B_Y=0,m_Y=1,AS8=2,g_Y=3,qS8=4,F_Y=5,Q_Y=6,_1=j1.handleUnexpected,nP4=j1.handleChangeCipherSpec,PW=j1.handleAlert,BT=j1.handleHandshake,rP4=j1.handleApplicationData,WW=j1.handleHeartbeat,KS8=[];KS8[j1.ConnectionEnd.client]=[[_1,PW,BT,_1,WW],[_1,PW,BT,_1,WW],[_1,PW,BT,_1,WW],[_1,PW,BT,_1,WW],[_1,PW,BT,_1,WW],[nP4,PW,_1,_1,WW],[_1,PW,BT,_1,WW],[_1,PW,BT,rP4,WW],[_1,PW,BT,_1,WW]];KS8[j1.ConnectionEnd.server]=[[_1,PW,BT,_1,WW],[_1,PW,BT,_1,WW],[_1,PW,BT,_1,WW],[_1,PW,BT,_1,WW],[nP4,PW,_1,_1,WW],[_1,PW,BT,_1,WW],[_1,PW,BT,rP4,WW],[_1,PW,BT,_1,WW]];var{handleHelloRequest:N16,handleServerHello:U_Y,handleCertificate:oP4,handleServerKeyExchange:lP4,handleCertificateRequest:tR8,handleServerHelloDone:Pf1,handleFinished:aP4}=j1,Wf1=[];Wf1[j1.ConnectionEnd.client]=[[_1,_1,U_Y,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1],[N16,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,oP4,lP4,tR8,Pf1,_1,_1,_1,_1,_1,_1],[N16,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,lP4,tR8,Pf1,_1,_1,_1,_1,_1,_1],[N16,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,tR8,Pf1,_1,_1,_1,_1,_1,_1],[N16,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,Pf1,_1,_1,_1,_1,_1,_1],[N16,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1],[N16,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,aP4],[N16,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1],[N16,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1]];var{handleClientHello:p_Y,handleClientKeyExchange:d_Y,handleCertificateVerify:c_Y}=j1;Wf1[j1.ConnectionEnd.server]=[[_1,p_Y,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1],[_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,oP4,_1,_1,_1,_1,_1,_1,_1,_1,_1],[_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,d_Y,_1,_1,_1,_1],[_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,c_Y,_1,_1,_1,_1,_1],[_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1],[_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,aP4],[_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1],[_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1,_1]];j1.generateKeys=function(A,q){var K=Zf1,Y=q.client_random+q.server_random;if(!A.session.resuming)q.master_secret=K(q.pre_master_secret,"master secret",Y,48).bytes(),q.pre_master_secret=null;Y=q.server_random+q.client_random;var z=2*q.mac_key_length+2*q.enc_key_length,w=A.version.major===j1.Versions.TLS_1_0.major&&A.version.minor===j1.Versions.TLS_1_0.minor;if(w)z+=2*q.fixed_iv_length;var _=K(q.master_secret,"key expansion",Y,z),$={client_write_MAC_key:_.getBytes(q.mac_key_length),server_write_MAC_key:_.getBytes(q.mac_key_length),client_write_key:_.getBytes(q.enc_key_length),server_write_key:_.getBytes(q.enc_key_length)};if(w)$.client_write_IV=_.getBytes(q.fixed_iv_length),$.server_write_IV=_.getBytes(q.fixed_iv_length);return $};j1.createConnectionState=function(A){var q=A.entity===j1.ConnectionEnd.client,K=function(){var w={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(_){return!0},compressionState:null,compressFunction:function(_){return!0},updateSequenceNumber:function(){if(w.sequenceNumber[1]===4294967295)w.sequenceNumber[1]=0,++w.sequenceNumber[0];else++w.sequenceNumber[1]}};return w},Y={read:K(),write:K()};if(Y.read.update=function(w,_){if(!Y.read.cipherFunction(_,Y.read))w.error(w,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.bad_record_mac}});else if(!Y.read.compressFunction(w,_,Y.read))w.error(w,{message:"Could not decompress record.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.decompression_failure}});return!w.fail},Y.write.update=function(w,_){if(!Y.write.compressFunction(w,_,Y.write))w.error(w,{message:"Could not compress record.",send:!1,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.internal_error}});else if(!Y.write.cipherFunction(_,Y.write))w.error(w,{message:"Could not encrypt record.",send:!1,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.internal_error}});return!w.fail},A.session){var z=A.session.sp;switch(A.session.cipherSuite.initSecurityParameters(z),z.keys=j1.generateKeys(A,z),Y.read.macKey=q?z.keys.server_write_MAC_key:z.keys.client_write_MAC_key,Y.write.macKey=q?z.keys.client_write_MAC_key:z.keys.server_write_MAC_key,A.session.cipherSuite.initConnectionState(Y,A,z),z.compression_algorithm){case j1.CompressionMethod.none:break;case j1.CompressionMethod.deflate:Y.read.compressFunction=R_Y,Y.write.compressFunction=y_Y;break;default:throw Error("Unsupported compression algorithm.")}}return Y};j1.createRandom=function(){var A=new Date,q=+A+A.getTimezoneOffset()*60000,K=QA.util.createBuffer();return K.putInt32(q),K.putBytes(QA.random.getBytes(28)),K};j1.createRecord=function(A,q){if(!q.data)return null;var K={type:q.type,version:{major:A.version.major,minor:A.version.minor},length:q.data.length(),fragment:q.data};return K};j1.createAlert=function(A,q){var K=QA.util.createBuffer();return K.putByte(q.level),K.putByte(q.description),j1.createRecord(A,{type:j1.ContentType.alert,data:K})};j1.createClientHello=function(A){A.session.clientHelloVersion={major:A.version.major,minor:A.version.minor};var q=QA.util.createBuffer();for(var K=0;K0)J+=2;var M=A.session.id,D=M.length+1+2+4+28+2+z+1+_+J,X=QA.util.createBuffer();if(X.putByte(j1.HandshakeType.client_hello),X.putInt24(D),X.putByte(A.version.major),X.putByte(A.version.minor),X.putBytes(A.session.sp.client_random),OC(X,1,QA.util.createBuffer(M)),OC(X,2,q),OC(X,1,w),J>0)OC(X,2,$);return X};j1.createServerHello=function(A){var q=A.session.id,K=q.length+1+2+4+28+2+1,Y=QA.util.createBuffer();return Y.putByte(j1.HandshakeType.server_hello),Y.putInt24(K),Y.putByte(A.version.major),Y.putByte(A.version.minor),Y.putBytes(A.session.sp.server_random),OC(Y,1,QA.util.createBuffer(q)),Y.putByte(A.session.cipherSuite.id[0]),Y.putByte(A.session.cipherSuite.id[1]),Y.putByte(A.session.compressionMethod),Y};j1.createCertificate=function(A){var q=A.entity===j1.ConnectionEnd.client,K=null;if(A.getCertificate){var Y;if(q)Y=A.session.certificateRequest;else Y=A.session.extensions.server_name.serverNameList;K=A.getCertificate(A,Y)}var z=QA.util.createBuffer();if(K!==null)try{if(!QA.util.isArray(K))K=[K];var w=null;for(var _=0;_0)K.putByte(j1.HandshakeType.server_key_exchange),K.putInt24(q);return K};j1.getClientSignature=function(A,q){var K=QA.util.createBuffer();K.putBuffer(A.session.md5.digest()),K.putBuffer(A.session.sha1.digest()),K=K.getBytes(),A.getSignature=A.getSignature||function(Y,z,w){var _=null;if(Y.getPrivateKey)try{_=Y.getPrivateKey(Y,Y.session.clientCertificate),_=QA.pki.privateKeyFromPem(_)}catch($){Y.error(Y,{message:"Could not get private key.",cause:$,send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.internal_error}})}if(_===null)Y.error(Y,{message:"No private key set.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.internal_error}});else z=_.sign(z,null);w(Y,z)},A.getSignature(A,K,q)};j1.createCertificateVerify=function(A,q){var K=q.length+2,Y=QA.util.createBuffer();return Y.putByte(j1.HandshakeType.certificate_verify),Y.putInt24(K),Y.putInt16(q.length),Y.putBytes(q),Y};j1.createCertificateRequest=function(A){var q=QA.util.createBuffer();q.putByte(1);var K=QA.util.createBuffer();for(var Y in A.caStore.certs){var z=A.caStore.certs[Y],w=QA.pki.distinguishedNameToAsn1(z.subject),_=QA.asn1.toDer(w);K.putInt16(_.length()),K.putBuffer(_)}var $=1+q.length()+2+K.length(),O=QA.util.createBuffer();return O.putByte(j1.HandshakeType.certificate_request),O.putInt24($),OC(O,1,q),OC(O,2,K),O};j1.createServerHelloDone=function(A){var q=QA.util.createBuffer();return q.putByte(j1.HandshakeType.server_hello_done),q.putInt24(0),q};j1.createChangeCipherSpec=function(){var A=QA.util.createBuffer();return A.putByte(1),A};j1.createFinished=function(A){var q=QA.util.createBuffer();q.putBuffer(A.session.md5.digest()),q.putBuffer(A.session.sha1.digest());var K=A.entity===j1.ConnectionEnd.client,Y=A.session.sp,z=12,w=Zf1,_=K?"client finished":"server finished";q=w(Y.master_secret,_,q.getBytes(),z);var $=QA.util.createBuffer();return $.putByte(j1.HandshakeType.finished),$.putInt24(q.length()),$.putBuffer(q),$};j1.createHeartbeat=function(A,q,K){if(typeof K>"u")K=q.length;var Y=QA.util.createBuffer();Y.putByte(A),Y.putInt16(K),Y.putBytes(q);var z=Y.length(),w=Math.max(16,z-K-3);return Y.putBytes(QA.random.getBytes(w)),Y};j1.queue=function(A,q){if(!q)return;if(q.fragment.length()===0){if(q.type===j1.ContentType.handshake||q.type===j1.ContentType.alert||q.type===j1.ContentType.change_cipher_spec)return}if(q.type===j1.ContentType.handshake){var K=q.fragment.bytes();A.session.md5.update(K),A.session.sha1.update(K),K=null}var Y;if(q.fragment.length()<=j1.MaxFragment)Y=[q];else{Y=[];var z=q.fragment.bytes();while(z.length>j1.MaxFragment)Y.push(j1.createRecord(A,{type:q.type,data:QA.util.createBuffer(z.slice(0,j1.MaxFragment))})),z=z.slice(j1.MaxFragment);if(z.length>0)Y.push(j1.createRecord(A,{type:q.type,data:QA.util.createBuffer(z)}))}for(var w=0;w0)_=K.order[0];if(_!==null&&_ in K.cache){w=K.cache[_],delete K.cache[_];for(var $ in K.order)if(K.order[$]===_){K.order.splice($,1);break}}return w},K.setSession=function(z,w){if(K.order.length===K.capacity){var _=K.order.shift();delete K.cache[_]}var _=QA.util.bytesToHex(z);K.order.push(_),K.cache[_]=w}}return K};j1.createConnection=function(A){var q=null;if(A.caStore)if(QA.util.isArray(A.caStore))q=QA.pki.createCaStore(A.caStore);else q=A.caStore;else q=QA.pki.createCaStore();var K=A.cipherSuites||null;if(K===null){K=[];for(var Y in j1.CipherSuites)K.push(j1.CipherSuites[Y])}var z=A.server?j1.ConnectionEnd.server:j1.ConnectionEnd.client,w=A.sessionCache?j1.createSessionCache(A.sessionCache):null,_={version:{major:j1.Version.major,minor:j1.Version.minor},entity:z,sessionId:A.sessionId,caStore:q,sessionCache:w,cipherSuites:K,connected:A.connected,virtualHost:A.virtualHost||null,verifyClient:A.verifyClient||!1,verify:A.verify||function(j,J,M,D){return J},verifyOptions:A.verifyOptions||{},getCertificate:A.getCertificate||null,getPrivateKey:A.getPrivateKey||null,getSignature:A.getSignature||null,input:QA.util.createBuffer(),tlsData:QA.util.createBuffer(),data:QA.util.createBuffer(),tlsDataReady:A.tlsDataReady,dataReady:A.dataReady,heartbeatReceived:A.heartbeatReceived,closed:A.closed,error:function(j,J){if(J.origin=J.origin||(j.entity===j1.ConnectionEnd.client?"client":"server"),J.send)j1.queue(j,j1.createAlert(j,J.alert)),j1.flush(j);var M=J.fatal!==!1;if(M)j.fail=!0;if(A.error(j,J),M)j.close(!1)},deflate:A.deflate||null,inflate:A.inflate||null};_.reset=function(j){_.version={major:j1.Version.major,minor:j1.Version.minor},_.record=null,_.session=null,_.peerCertificate=null,_.state={pending:null,current:null},_.expect=_.entity===j1.ConnectionEnd.client?S_Y:B_Y,_.fragmented=null,_.records=[],_.open=!1,_.handshakes=0,_.handshaking=!1,_.isConnected=!1,_.fail=!(j||typeof j>"u"),_.input.clear(),_.tlsData.clear(),_.data.clear(),_.state.current=j1.createConnectionState(_)},_.reset();var $=function(j,J){var M=J.type-j1.ContentType.change_cipher_spec,D=KS8[j.entity][j.expect];if(M in D)D[M](j,J);else j1.handleUnexpected(j,J)},O=function(j){var J=0,M=j.input,D=M.length();if(D<5)J=5-D;else{j.record={type:M.getByte(),version:{major:M.getByte(),minor:M.getByte()},length:M.getInt16(),fragment:QA.util.createBuffer(),ready:!1};var X=j.record.version.major===j.version.major;if(X&&j.session&&j.session.version)X=j.record.version.minor===j.version.minor;if(!X)j.error(j,{message:"Incompatible TLS version.",send:!0,alert:{level:j1.Alert.Level.fatal,description:j1.Alert.Description.protocol_version}})}return J},H=function(j){var J=0,M=j.input,D=M.length();if(D0){if(_.sessionCache)J=_.sessionCache.getSession(j);if(J===null)j=""}if(j.length===0&&_.sessionCache){if(J=_.sessionCache.getSession(),J!==null)j=J.id}if(_.session={id:j,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:QA.md.md5.create(),sha1:QA.md.sha1.create()},J)_.version=J.version,_.session.sp=J.sp;_.session.sp.client_random=j1.createRandom().getBytes(),_.open=!0,j1.queue(_,j1.createRecord(_,{type:j1.ContentType.handshake,data:j1.createClientHello(_)})),j1.flush(_)}},_.process=function(j){var J=0;if(j)_.input.putBytes(j);if(!_.fail){if(_.record!==null&&_.record.ready&&_.record.fragment.isEmpty())_.record=null;if(_.record===null)J=O(_);if(!_.fail&&_.record!==null&&!_.record.ready)J=H(_);if(!_.fail&&_.record!==null&&_.record.ready)$(_,_.record)}return J},_.prepare=function(j){return j1.queue(_,j1.createRecord(_,{type:j1.ContentType.application_data,data:QA.util.createBuffer(j)})),j1.flush(_)},_.prepareHeartbeatRequest=function(j,J){if(j instanceof QA.util.ByteBuffer)j=j.bytes();if(typeof J>"u")J=j.length;return _.expectedHeartbeatPayload=j,j1.queue(_,j1.createRecord(_,{type:j1.ContentType.heartbeat,data:j1.createHeartbeat(j1.HeartbeatMessageType.heartbeat_request,j,J)})),j1.flush(_)},_.close=function(j){if(!_.fail&&_.sessionCache&&_.session){var J={id:_.session.id,version:_.session.version,sp:_.session.sp};J.sp.keys=null,_.sessionCache.setSession(J.id,J)}if(_.open){if(_.open=!1,_.input.clear(),_.isConnected||_.handshaking)_.isConnected=_.handshaking=!1,j1.queue(_,j1.createAlert(_,{level:j1.Alert.Level.warning,description:j1.Alert.Description.close_notify})),j1.flush(_);_.closed(_)}_.reset(j)},_};sP4.exports=QA.tls=QA.tls||{};for(Lc6 in j1)if(typeof j1[Lc6]!=="function")QA.tls[Lc6]=j1[Lc6];var Lc6;QA.tls.prf_tls1=Zf1;QA.tls.hmac_sha1=L_Y;QA.tls.createSessionCache=j1.createSessionCache;QA.tls.createConnection=j1.createConnection});var A04=C((BG_,eP4)=>{var v16=w9();W16();YS8();var HC=eP4.exports=v16.tls;HC.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(A){A.bulk_cipher_algorithm=HC.BulkCipherAlgorithm.aes,A.cipher_type=HC.CipherType.block,A.enc_key_length=16,A.block_length=16,A.fixed_iv_length=16,A.record_iv_length=16,A.mac_algorithm=HC.MACAlgorithm.hmac_sha1,A.mac_length=20,A.mac_key_length=20},initConnectionState:tP4};HC.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(A){A.bulk_cipher_algorithm=HC.BulkCipherAlgorithm.aes,A.cipher_type=HC.CipherType.block,A.enc_key_length=32,A.block_length=16,A.fixed_iv_length=16,A.record_iv_length=16,A.mac_algorithm=HC.MACAlgorithm.hmac_sha1,A.mac_length=20,A.mac_key_length=20},initConnectionState:tP4};function tP4(A,q,K){var Y=q.entity===v16.tls.ConnectionEnd.client;A.read.cipherState={init:!1,cipher:v16.cipher.createDecipher("AES-CBC",Y?K.keys.server_write_key:K.keys.client_write_key),iv:Y?K.keys.server_write_IV:K.keys.client_write_IV},A.write.cipherState={init:!1,cipher:v16.cipher.createCipher("AES-CBC",Y?K.keys.client_write_key:K.keys.server_write_key),iv:Y?K.keys.client_write_IV:K.keys.server_write_IV},A.read.cipherFunction=o_Y,A.write.cipherFunction=i_Y,A.read.macLength=A.write.macLength=K.mac_length,A.read.macFunction=A.write.macFunction=HC.hmac_sha1}function i_Y(A,q){var K=!1,Y=q.macFunction(q.macKey,q.sequenceNumber,A);A.fragment.putBytes(Y),q.updateSequenceNumber();var z;if(A.version.minor===HC.Versions.TLS_1_0.minor)z=q.cipherState.init?null:q.cipherState.iv;else z=v16.random.getBytesSync(16);q.cipherState.init=!0;var w=q.cipherState.cipher;if(w.start({iv:z}),A.version.minor>=HC.Versions.TLS_1_1.minor)w.output.putBytes(z);if(w.update(A.fragment),w.finish(n_Y))A.fragment=w.output,A.length=A.fragment.length(),K=!0;return K}function n_Y(A,q,K){if(!K){var Y=A-q.length()%A;q.fillWithByte(Y-1,Y)}return!0}function r_Y(A,q,K){var Y=!0;if(K){var z=q.length(),w=q.last();for(var _=z-1-w;_=w)A.fragment=z.output.getBytes($-w),_=z.output.getBytes(w);else A.fragment=z.output.getBytes();A.fragment=v16.util.createBuffer(A.fragment),A.length=A.fragment.length();var O=q.macFunction(q.macKey,q.sequenceNumber,A);return q.updateSequenceNumber(),K=a_Y(q.macKey,_,O)&&K,K}function a_Y(A,q,K){var Y=v16.hmac.create();return Y.start("SHA1",A),Y.update(q),q=Y.digest().getBytes(),Y.start(null,null),Y.update(K),K=Y.digest().getBytes(),q===K}});var _S8=C((mG_,z04)=>{var DO=w9();cF();bz();var yc6=z04.exports=DO.sha512=DO.sha512||{};DO.md.sha512=DO.md.algorithms.sha512=yc6;var K04=DO.sha384=DO.sha512.sha384=DO.sha512.sha384||{};K04.create=function(){return yc6.create("SHA-384")};DO.md.sha384=DO.md.algorithms.sha384=K04;DO.sha512.sha256=DO.sha512.sha256||{create:function(){return yc6.create("SHA-512/256")}};DO.md["sha512/256"]=DO.md.algorithms["sha512/256"]=DO.sha512.sha256;DO.sha512.sha224=DO.sha512.sha224||{create:function(){return yc6.create("SHA-512/224")}};DO.md["sha512/224"]=DO.md.algorithms["sha512/224"]=DO.sha512.sha224;yc6.create=function(A){if(!Y04)s_Y();if(typeof A>"u")A="SHA-512";if(!(A in gz6))throw Error("Invalid SHA-512 algorithm: "+A);var q=gz6[A],K=null,Y=DO.util.createBuffer(),z=Array(80);for(var w=0;w<80;++w)z[w]=[,,];var _=64;switch(A){case"SHA-384":_=48;break;case"SHA-512/256":_=32;break;case"SHA-512/224":_=28;break}var $={algorithm:A.replace("-","").toLowerCase(),blockLength:128,digestLength:_,messageLength:0,fullMessageLength:null,messageLengthSize:16};return $.start=function(){$.messageLength=0,$.fullMessageLength=$.messageLength128=[];var O=$.messageLengthSize/4;for(var H=0;H>>0,j>>>0];for(var J=$.fullMessageLength.length-1;J>=0;--J)$.fullMessageLength[J]+=j[1],j[1]=j[0]+($.fullMessageLength[J]/4294967296>>>0),$.fullMessageLength[J]=$.fullMessageLength[J]>>>0,j[0]=j[1]/4294967296>>>0;if(Y.putBytes(O),q04(K,z,Y),Y.read>2048||Y.length()===0)Y.compact();return $},$.digest=function(){var O=DO.util.createBuffer();O.putBytes(Y.bytes());var H=$.fullMessageLength[$.fullMessageLength.length-1]+$.messageLengthSize,j=H&$.blockLength-1;O.putBytes(zS8.substr(0,$.blockLength-j));var J,M,D=$.fullMessageLength[0]*8;for(var X=0;X<$.fullMessageLength.length-1;++X)J=$.fullMessageLength[X+1]*8,M=J/4294967296>>>0,D+=M,O.putInt32(D>>>0),D=J>>>0;O.putInt32(D);var P=Array(K.length);for(var X=0;X=128){for(U=0;U<16;++U)q[U][0]=K.getInt32()>>>0,q[U][1]=K.getInt32()>>>0;for(;U<80;++U)t=q[U-2],d=t[0],l=t[1],Y=((d>>>19|l<<13)^(l>>>29|d<<3)^d>>>6)>>>0,z=((d<<13|l>>>19)^(l<<3|d>>>29)^(d<<26|l>>>6))>>>0,H6=q[U-15],d=H6[0],l=H6[1],w=((d>>>1|l<<31)^(d>>>8|l<<24)^d>>>7)>>>0,_=((d<<31|l>>>1)^(d<<24|l>>>8)^(d<<25|l>>>7))>>>0,s=q[U-7],Z6=q[U-16],l=z+s[1]+_+Z6[1],q[U][0]=Y+s[0]+w+Z6[0]+(l/4294967296>>>0)>>>0,q[U][1]=l>>>0;P=A[0][0],W=A[0][1],Z=A[1][0],G=A[1][1],f=A[2][0],V=A[2][1],N=A[3][0],v=A[3][1],y=A[4][0],R=A[4][1],h=A[5][0],B=A[5][1],x=A[6][0],F=A[6][1],g=A[7][0],b=A[7][1];for(U=0;U<80;++U)H=((y>>>14|R<<18)^(y>>>18|R<<14)^(R>>>9|y<<23))>>>0,j=((y<<18|R>>>14)^(y<<14|R>>>18)^(R<<23|y>>>9))>>>0,J=(x^y&(h^x))>>>0,M=(F^R&(B^F))>>>0,$=((P>>>28|W<<4)^(W>>>2|P<<30)^(W>>>7|P<<25))>>>0,O=((P<<4|W>>>28)^(W<<30|P>>>2)^(W<<25|P>>>7))>>>0,D=(P&Z|f&(P^Z))>>>0,X=(W&G|V&(W^G))>>>0,l=b+j+M+wS8[U][1]+q[U][1],Y=g+H+J+wS8[U][0]+q[U][0]+(l/4294967296>>>0)>>>0,z=l>>>0,l=O+X,w=$+D+(l/4294967296>>>0)>>>0,_=l>>>0,g=x,b=F,x=h,F=B,h=y,B=R,l=v+z,y=N+Y+(l/4294967296>>>0)>>>0,R=l>>>0,N=f,v=V,f=Z,V=G,Z=P,G=W,l=z+_,P=Y+w+(l/4294967296>>>0)>>>0,W=l>>>0;l=A[0][1]+W,A[0][0]=A[0][0]+P+(l/4294967296>>>0)>>>0,A[0][1]=l>>>0,l=A[1][1]+G,A[1][0]=A[1][0]+Z+(l/4294967296>>>0)>>>0,A[1][1]=l>>>0,l=A[2][1]+V,A[2][0]=A[2][0]+f+(l/4294967296>>>0)>>>0,A[2][1]=l>>>0,l=A[3][1]+v,A[3][0]=A[3][0]+N+(l/4294967296>>>0)>>>0,A[3][1]=l>>>0,l=A[4][1]+R,A[4][0]=A[4][0]+y+(l/4294967296>>>0)>>>0,A[4][1]=l>>>0,l=A[5][1]+B,A[5][0]=A[5][0]+h+(l/4294967296>>>0)>>>0,A[5][1]=l>>>0,l=A[6][1]+F,A[6][0]=A[6][0]+x+(l/4294967296>>>0)>>>0,A[6][1]=l>>>0,l=A[7][1]+b,A[7][0]=A[7][0]+g+(l/4294967296>>>0)>>>0,A[7][1]=l>>>0,G6-=128}}});var w04=C((e_Y)=>{var t_Y=w9();Rx();var kP=t_Y.asn1;e_Y.privateKeyValidator={name:"PrivateKeyInfo",tagClass:kP.Class.UNIVERSAL,type:kP.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:kP.Class.UNIVERSAL,type:kP.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:kP.Class.UNIVERSAL,type:kP.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:kP.Class.UNIVERSAL,type:kP.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:kP.Class.UNIVERSAL,type:kP.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};e_Y.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:kP.Class.UNIVERSAL,type:kP.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:kP.Class.UNIVERSAL,type:kP.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:kP.Class.UNIVERSAL,type:kP.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:kP.Class.UNIVERSAL,type:kP.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var Z04=C((FG_,W04)=>{var ZW=w9();Nc6();zC();_S8();bz();var j04=w04(),K$Y=j04.publicKeyValidator,Y$Y=j04.privateKeyValidator;if(typeof HS8>"u")HS8=ZW.jsbn.BigInteger;var HS8,jS8=ZW.util.ByteBuffer,qv=typeof Buffer>"u"?Uint8Array:Buffer;ZW.pki=ZW.pki||{};W04.exports=ZW.pki.ed25519=ZW.ed25519=ZW.ed25519||{};var _Y=ZW.ed25519;_Y.constants={};_Y.constants.PUBLIC_KEY_BYTE_LENGTH=32;_Y.constants.PRIVATE_KEY_BYTE_LENGTH=64;_Y.constants.SEED_BYTE_LENGTH=32;_Y.constants.SIGN_BYTE_LENGTH=64;_Y.constants.HASH_BYTE_LENGTH=64;_Y.generateKeyPair=function(A){A=A||{};var q=A.seed;if(q===void 0)q=ZW.random.getBytesSync(_Y.constants.SEED_BYTE_LENGTH);else if(typeof q==="string"){if(q.length!==_Y.constants.SEED_BYTE_LENGTH)throw TypeError('"seed" must be '+_Y.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(q instanceof Uint8Array))throw TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');q=yi({message:q,encoding:"binary"});var K=new qv(_Y.constants.PUBLIC_KEY_BYTE_LENGTH),Y=new qv(_Y.constants.PRIVATE_KEY_BYTE_LENGTH);for(var z=0;z<32;++z)Y[z]=q[z];return $$Y(K,Y),{publicKey:K,privateKey:Y}};_Y.privateKeyFromAsn1=function(A){var q={},K=[],Y=ZW.asn1.validate(A,Y$Y,q,K);if(!Y){var z=Error("Invalid Key.");throw z.errors=K,z}var w=ZW.asn1.derToOid(q.privateKeyOid),_=ZW.oids.EdDSA25519;if(w!==_)throw Error('Invalid OID "'+w+'"; OID must be "'+_+'".');var $=q.privateKey,O=yi({message:ZW.asn1.fromDer($).value,encoding:"binary"});return{privateKeyBytes:O}};_Y.publicKeyFromAsn1=function(A){var q={},K=[],Y=ZW.asn1.validate(A,K$Y,q,K);if(!Y){var z=Error("Invalid Key.");throw z.errors=K,z}var w=ZW.asn1.derToOid(q.publicKeyOid),_=ZW.oids.EdDSA25519;if(w!==_)throw Error('Invalid OID "'+w+'"; OID must be "'+_+'".');var $=q.ed25519PublicKey;if($.length!==_Y.constants.PUBLIC_KEY_BYTE_LENGTH)throw Error("Key length is invalid.");return yi({message:$,encoding:"binary"})};_Y.publicKeyFromPrivateKey=function(A){A=A||{};var q=yi({message:A.privateKey,encoding:"binary"});if(q.length!==_Y.constants.PRIVATE_KEY_BYTE_LENGTH)throw TypeError('"options.privateKey" must have a byte length of '+_Y.constants.PRIVATE_KEY_BYTE_LENGTH);var K=new qv(_Y.constants.PUBLIC_KEY_BYTE_LENGTH);for(var Y=0;Y=0};function yi(A){var q=A.message;if(q instanceof Uint8Array||q instanceof qv)return q;var K=A.encoding;if(q===void 0)if(A.md)q=A.md.digest().getBytes(),K="binary";else throw TypeError('"options.message" or "options.md" not specified.');if(typeof q==="string"&&!K)throw TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof q==="string"){if(typeof Buffer<"u")return Buffer.from(q,K);q=new jS8(q,K)}else if(!(q instanceof jS8))throw TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');var Y=new qv(q.length());for(var z=0;z=32;--Y){K=0;for(z=Y-32,w=Y-12;z>8,q[z]-=K*256;q[z]+=K,q[Y]=0}K=0;for(z=0;z<32;++z)q[z]+=K-(q[31]>>4)*$S8[z],K=q[z]>>8,q[z]&=255;for(z=0;z<32;++z)q[z]-=K*$S8[z];for(Y=0;Y<32;++Y)q[Y+1]+=q[Y]>>8,A[Y]=q[Y]&255}function MS8(A){var q=new Float64Array(64);for(var K=0;K<64;++K)q[K]=A[K],A[K]=0;J04(A,q)}function DS8(A,q){var K=aK(),Y=aK(),z=aK(),w=aK(),_=aK(),$=aK(),O=aK(),H=aK(),j=aK();HT6(K,A[1],A[0]),HT6(j,q[1],q[0]),I_(K,K,j),OT6(Y,A[0],A[1]),OT6(j,q[0],q[1]),I_(Y,Y,j),I_(z,A[3],q[3]),I_(z,z,w$Y),I_(w,A[2],q[2]),OT6(w,w,w),HT6(_,Y,K),HT6($,w,z),OT6(O,w,z),OT6(H,Y,K),I_(A[0],_,$),I_(A[1],H,O),I_(A[2],O,$),I_(A[3],_,H)}function O04(A,q,K){for(var Y=0;Y<4;++Y)P04(A[Y],q[Y],K)}function XS8(A,q){var K=aK(),Y=aK(),z=aK();X$Y(z,q[2]),I_(K,q[0],z),I_(Y,q[1],z),ff1(A,Y),A[31]^=D04(K)<<7}function ff1(A,q){var K,Y,z,w=aK(),_=aK();for(K=0;K<16;++K)_[K]=q[K];OS8(_),OS8(_),OS8(_);for(Y=0;Y<2;++Y){w[0]=_[0]-65517;for(K=1;K<15;++K)w[K]=_[K]-65535-(w[K-1]>>16&1),w[K-1]&=65535;w[15]=_[15]-32767-(w[14]>>16&1),z=w[15]>>16&1,w[14]&=65535,P04(_,w,1-z)}for(K=0;K<16;K++)A[2*K]=_[K]&255,A[2*K+1]=_[K]>>8}function j$Y(A,q){var K=aK(),Y=aK(),z=aK(),w=aK(),_=aK(),$=aK(),O=aK();if(k16(A[2],Gf1),J$Y(A[1],q),Fz6(z,A[1]),I_(w,z,z$Y),HT6(z,z,A[2]),OT6(w,A[2],w),Fz6(_,w),Fz6($,_),I_(O,$,_),I_(K,O,z),I_(K,K,w),M$Y(K,K),I_(K,K,z),I_(K,K,w),I_(K,K,w),I_(A[0],K,w),Fz6(Y,A[0]),I_(Y,Y,w),H04(Y,z))I_(A[0],A[0],_$Y);if(Fz6(Y,A[0]),I_(Y,Y,w),H04(Y,z))return-1;if(D04(A[0])===q[31]>>7)HT6(A[0],JS8,A[0]);return I_(A[3],A[0],A[1]),0}function J$Y(A,q){var K;for(K=0;K<16;++K)A[K]=q[2*K]+(q[2*K+1]<<8);A[15]&=32767}function M$Y(A,q){var K=aK(),Y;for(Y=0;Y<16;++Y)K[Y]=q[Y];for(Y=250;Y>=0;--Y)if(Fz6(K,K),Y!==1)I_(K,K,q);for(Y=0;Y<16;++Y)A[Y]=K[Y]}function H04(A,q){var K=new qv(32),Y=new qv(32);return ff1(K,A),ff1(Y,q),M04(K,0,Y,0)}function M04(A,q,K,Y){return D$Y(A,q,K,Y,32)}function D$Y(A,q,K,Y,z){var w,_=0;for(w=0;w>>8)-1}function D04(A){var q=new qv(32);return ff1(q,A),q[0]&1}function X04(A,q,K){var Y,z;k16(A[0],JS8),k16(A[1],Gf1),k16(A[2],Gf1),k16(A[3],JS8);for(z=255;z>=0;--z)Y=K[z/8|0]>>(z&7)&1,O04(A,q,Y),DS8(q,A),DS8(A,A),O04(A,q,Y)}function PS8(A,q){var K=[aK(),aK(),aK(),aK()];k16(K[0],_04),k16(K[1],$04),k16(K[2],Gf1),I_(K[3],_04,$04),X04(A,K,q)}function k16(A,q){var K;for(K=0;K<16;K++)A[K]=q[K]|0}function X$Y(A,q){var K=aK(),Y;for(Y=0;Y<16;++Y)K[Y]=q[Y];for(Y=253;Y>=0;--Y)if(Fz6(K,K),Y!==2&&Y!==4)I_(K,K,q);for(Y=0;Y<16;++Y)A[Y]=K[Y]}function OS8(A){var q,K,Y=1;for(q=0;q<16;++q)K=A[q]+Y+65535,Y=Math.floor(K/65536),A[q]=K-Y*65536;A[0]+=Y-1+37*(Y-1)}function P04(A,q,K){var Y,z=~(K-1);for(var w=0;w<16;++w)Y=z&(A[w]^q[w]),A[w]^=Y,q[w]^=Y}function aK(A){var q,K=new Float64Array(16);if(A)for(q=0;q{var wL=w9();bz();zC();Nc6();T04.exports=wL.kem=wL.kem||{};var G04=wL.jsbn.BigInteger;wL.kem.rsa={};wL.kem.rsa.create=function(A,q){q=q||{};var K=q.prng||wL.random,Y={};return Y.encrypt=function(z,w){var _=Math.ceil(z.n.bitLength()/8),$;do $=new G04(wL.util.bytesToHex(K.getBytesSync(_)),16).mod(z.n);while($.compareTo(G04.ONE)<=0);$=wL.util.hexToBytes($.toString(16));var O=_-$.length;if(O>0)$=wL.util.fillString(String.fromCharCode(0),O)+$;var H=z.encrypt($,"NONE"),j=A.generate($,w);return{encapsulation:H,key:j}},Y.decrypt=function(z,w,_){var $=z.decrypt(w,"NONE");return A.generate($,_)},Y};wL.kem.kdf1=function(A,q){f04(this,A,0,q||A.digestLength)};wL.kem.kdf2=function(A,q){f04(this,A,1,q||A.digestLength)};function f04(A,q,K,Y){A.generate=function(z,w){var _=new wL.util.ByteBuffer,$=Math.ceil(w/Y)+K,O=new wL.util.ByteBuffer;for(var H=K;H<$;++H){O.putInt32(H),q.start(),q.update(z+O.getBytes());var j=q.digest();_.putBytes(j.getBytes(Y))}return _.truncate(_.length()-w),_.getBytes()}}});var v04=C((UG_,N04)=>{var EY=w9();bz();N04.exports=EY.log=EY.log||{};EY.log.levels=["none","error","warning","info","debug","verbose","max"];var Nf1={},WS8=[],Sc6=null;EY.log.LEVEL_LOCKED=2;EY.log.NO_LEVEL_CHECK=4;EY.log.INTERPOLATE=8;for(jC=0;jC"u"||q)A.flags|=EY.log.LEVEL_LOCKED;else A.flags&=~EY.log.LEVEL_LOCKED};EY.log.addLogger=function(A){WS8.push(A)};if(typeof console<"u"&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)ZS8={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},JT6=function(A,q){EY.log.prepareStandard(q);var K=ZS8[q.level],Y=[q.standard];Y=Y.concat(q.arguments.slice()),K.apply(console,Y)},Qz6=EY.log.makeLogger(JT6);else JT6=function(q,K){EY.log.prepareStandardFull(K),console.log(K.standardFull)},Qz6=EY.log.makeLogger(JT6);EY.log.setLevel(Qz6,"debug"),EY.log.addLogger(Qz6),Sc6=Qz6}else console={log:function(){}};var Qz6,ZS8,JT6;if(Sc6!==null&&typeof window<"u"&&window.location){if(jT6=new URL(window.location.href).searchParams,jT6.has("console.level"))EY.log.setLevel(Sc6,jT6.get("console.level").slice(-1)[0]);if(jT6.has("console.lock")){if(GS8=jT6.get("console.lock").slice(-1)[0],GS8=="true")EY.log.lock(Sc6)}}var jT6,GS8;EY.log.consoleLogger=Sc6});var E04=C((pG_,k04)=>{k04.exports=cF();Af1();YT6();CR8();_S8()});var R04=C((dG_,y04)=>{var O4=w9();W16();Rx();Tc6();Z16();Iz6();lR8();zC();bz();Xf1();var s1=O4.asn1,mT=y04.exports=O4.pkcs7=O4.pkcs7||{};mT.messageFromPem=function(A){var q=O4.pem.decode(A)[0];if(q.type!=="PKCS7"){var K=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw K.headerType=q.type,K}if(q.procType&&q.procType.type==="ENCRYPTED")throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var Y=s1.fromDer(q.body);return mT.messageFromAsn1(Y)};mT.messageToPem=function(A,q){var K={type:"PKCS7",body:s1.toDer(A.toAsn1()).getBytes()};return O4.pem.encode(K,{maxline:q})};mT.messageFromAsn1=function(A){var q={},K=[];if(!s1.validate(A,mT.asn1.contentInfoValidator,q,K)){var Y=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw Y.errors=K,Y}var z=s1.derToOid(q.contentType),w;switch(z){case O4.pki.oids.envelopedData:w=mT.createEnvelopedData();break;case O4.pki.oids.encryptedData:w=mT.createEncryptedData();break;case O4.pki.oids.signedData:w=mT.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+z+" is not (yet) supported.")}return w.fromAsn1(q.content.value[0]),w};mT.createSignedData=function(){var A=null;return A={type:O4.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(Y){if(TS8(A,Y,mT.asn1.signedDataValidator),A.certificates=[],A.crls=[],A.digestAlgorithmIdentifiers=[],A.contentInfo=null,A.signerInfos=[],A.rawCapture.certificates){var z=A.rawCapture.certificates.value;for(var w=0;w0)_.value[0].value.push(s1.create(s1.Class.CONTEXT_SPECIFIC,0,!0,Y));if(w.length>0)_.value[0].value.push(s1.create(s1.Class.CONTEXT_SPECIFIC,1,!0,w));return _.value[0].value.push(s1.create(s1.Class.UNIVERSAL,s1.Type.SET,!0,A.signerInfos)),s1.create(s1.Class.UNIVERSAL,s1.Type.SEQUENCE,!0,[s1.create(s1.Class.UNIVERSAL,s1.Type.OID,!1,s1.oidToDer(A.type).getBytes()),_])},addSigner:function(Y){var{issuer:z,serialNumber:w}=Y;if(Y.certificate){var _=Y.certificate;if(typeof _==="string")_=O4.pki.certificateFromPem(_);z=_.issuer.attributes,w=_.serialNumber}var $=Y.key;if(!$)throw Error("Could not add PKCS#7 signer; no private key specified.");if(typeof $==="string")$=O4.pki.privateKeyFromPem($);var O=Y.digestAlgorithm||O4.pki.oids.sha1;switch(O){case O4.pki.oids.sha1:case O4.pki.oids.sha256:case O4.pki.oids.sha384:case O4.pki.oids.sha512:case O4.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+O)}var H=Y.authenticatedAttributes||[];if(H.length>0){var j=!1,J=!1;for(var M=0;M0){var K=s1.create(s1.Class.CONTEXT_SPECIFIC,1,!0,[]);for(var Y=0;Y=K&&z{var AD=w9();W16();ef6();Af1();YT6();bz();var kf1=S04.exports=AD.ssh=AD.ssh||{};kf1.privateKeyToPutty=function(A,q,K){K=K||"",q=q||"";var Y="ssh-rsa",z=q===""?"none":"aes256-cbc",w="PuTTY-User-Key-File-2: "+Y+`\r `;w+="Encryption: "+z+`\r `,w+="Comment: "+K+`\r `;var _=AD.util.createBuffer();MT6(_,Y),tF(_,A.e),tF(_,A.n);var $=AD.util.encode64(_.bytes(),64),O=Math.floor($.length/66)+1;w+="Public-Lines: "+O+`\r `,w+=$;var H=AD.util.createBuffer();tF(H,A.d),tF(H,A.p),tF(H,A.q),tF(H,A.qInv);var j;if(!q)j=AD.util.encode64(H.bytes(),64);else{var J=H.length()+16-1;J-=J%16;var M=vf1(H.bytes());M.truncate(M.length()-J+H.length()),H.putBuffer(M);var D=AD.util.createBuffer();D.putBuffer(vf1("\x00\x00\x00\x00",q)),D.putBuffer(vf1("\x00\x00\x00\x01",q));var X=AD.aes.createEncryptionCipher(D.truncate(8),"CBC");X.start(AD.util.createBuffer().fillWithByte(0,16)),X.update(H.copy()),X.finish();var P=X.output;P.truncate(16),j=AD.util.encode64(P.bytes(),64)}O=Math.floor(j.length/66)+1,w+=`\r Private-Lines: `+O+`\r `,w+=j;var W=vf1("putty-private-key-file-mac-key",q),Z=AD.util.createBuffer();MT6(Z,Y),MT6(Z,z),MT6(Z,K),Z.putInt32(_.length()),Z.putBuffer(_),Z.putInt32(H.length()),Z.putBuffer(H);var G=AD.hmac.create();return G.start("sha1",W),G.update(Z.bytes()),w+=`\r Private-MAC: `+G.digest().toHex()+`\r `,w};kf1.publicKeyToOpenSSH=function(A,q){var K="ssh-rsa";q=q||"";var Y=AD.util.createBuffer();return MT6(Y,K),tF(Y,A.e),tF(Y,A.n),K+" "+AD.util.encode64(Y.bytes())+" "+q};kf1.privateKeyToOpenSSH=function(A,q){if(!q)return AD.pki.privateKeyToPem(A);return AD.pki.encryptRsaPrivateKey(A,q,{legacy:!0,algorithm:"aes128"})};kf1.getPublicKeyFingerprint=function(A,q){q=q||{};var K=q.md||AD.md.md5.create(),Y="ssh-rsa",z=AD.util.createBuffer();MT6(z,Y),tF(z,A.e),tF(z,A.n),K.start(),K.update(z.getBytes());var w=K.digest();if(q.encoding==="hex"){var _=w.toHex();if(q.delimiter)return _.match(/.{2}/g).join(q.delimiter);return _}else if(q.encoding==="binary")return w.getBytes();else if(q.encoding)throw Error('Unknown encoding "'+q.encoding+'".');return w};function tF(A,q){var K=q.toString(16);if(K[0]>="8")K="00"+K;var Y=AD.util.hexToBytes(K);A.putInt32(Y.length),A.putBytes(Y)}function MT6(A,q){A.putInt32(q.length),A.putString(q)}function vf1(){var A=AD.md.sha1.create(),q=arguments.length;for(var K=0;K{h04.exports=w9();W16();A04();Rx();nG1();Tc6();Z04();ef6();V04();v04();E04();iR8();zf1();Iz6();FR8();oR8();R04();sR8();UR8();hR8();Jf1();zC();xR8();C04();YS8();bz()});import{execFile as N$Y}from"child_process";import{readFileSync as DT6,writeFileSync as x04}from"fs";import{mkdtemp as v$Y,rm as k$Y,writeFile as E$Y}from"fs/promises";import{tmpdir as L$Y}from"os";import{join as b04}from"path";import{promisify as y$Y}from"util";function R$Y(A,q,K,Y){let z=DT6(A),w=DT6(q,"utf-8"),_=DT6(K,"utf-8"),$=Y?.map((P)=>DT6(P,"utf-8")),O=aH.default.pkcs7.createSignedData();O.content=aH.default.util.createBuffer(z);let H=aH.default.pki.certificateFromPem(w),j=aH.default.pki.privateKeyFromPem(_);if(O.addCertificate(H),$)for(let P of $)O.addCertificate(aH.default.pki.certificateFromPem(P));O.addSigner({key:j,certificate:H,digestAlgorithm:aH.default.pki.oids.sha256,authenticatedAttributes:[{type:aH.default.pki.oids.contentType,value:aH.default.pki.oids.data},{type:aH.default.pki.oids.messageDigest},{type:aH.default.pki.oids.signingTime}]}),O.sign({detached:!0});let J=aH.default.asn1.toDer(O.toAsn1()),M=Buffer.from(J.getBytes(),"binary"),D=C$Y(M),X=Buffer.concat([z,D]);x04(A,X)}async function S$Y(A){try{let q=DT6(A),{originalContent:K,pkcs7Signature:Y}=Cc6(q);if(!Y)return{status:"unsigned"};let z=aH.default.asn1.fromDer(Y.toString("binary")),w=aH.default.pkcs7.messageFromAsn1(z);if(!("type"in w)||w.type!==aH.default.pki.oids.signedData)return{status:"unsigned"};let _=w,$=_.certificates||[];if($.length===0)return{status:"unsigned"};let O=$[0],H=aH.default.util.createBuffer(K);try{_.verify({authenticatedAttributes:!0});let P=_.signerInfos?.[0];if(P){let W=aH.default.md.sha256.create();W.update(H.getBytes());let Z=W.digest().getBytes(),G=null;for(let f of P.authenticatedAttributes)if(f.type===aH.default.pki.oids.messageDigest){G=f.value;break}if(!G||G!==Z)return{status:"unsigned"}}}catch(X){return{status:"unsigned"}}let j=aH.default.pki.certificateToPem(O),J=$.slice(1).map((X)=>Buffer.from(aH.default.pki.certificateToPem(X)));if(!await m04(Buffer.from(j),J))return{status:"unsigned"};return{status:O.issuer.getField("CN")?.value===O.subject.getField("CN")?.value?"self-signed":"signed",publisher:O.subject.getField("CN")?.value||"Unknown",issuer:O.issuer.getField("CN")?.value||"Unknown",valid_from:O.validity.notBefore.toISOString(),valid_to:O.validity.notAfter.toISOString(),fingerprint:aH.default.md.sha256.create().update(aH.default.asn1.toDer(aH.default.pki.certificateToAsn1(O)).getBytes()).digest().toHex()}}catch(q){throw Error(`Failed to verify MCPB file: ${q}`)}}function C$Y(A){let q=[];q.push(Buffer.from(u04,"utf-8"));let K=Buffer.alloc(4);return K.writeUInt32LE(A.length,0),q.push(K),q.push(A),q.push(Buffer.from(B04,"utf-8")),Buffer.concat(q)}function Cc6(A){let q=Buffer.from(B04,"utf-8"),K=A.lastIndexOf(q);if(K===-1)return{originalContent:A};let Y=Buffer.from(u04,"utf-8"),z=-1;for(let $=K-1;$>=0;$--)if(A.slice($,$+Y.length).equals(Y)){z=$;break}if(z===-1)return{originalContent:A};let w=A.slice(0,z),_=z+Y.length;try{let $=A.readUInt32LE(_);_+=4;let O=A.slice(_,_+$);return{originalContent:w,pkcs7Signature:O}}catch{return{originalContent:A}}}async function m04(A,q){let K=null;try{K=await v$Y(b04(L$Y(),"mcpb-verify-"));let Y=b04(K,"chain.pem"),z=[A,...q||[]].join(` `);if(await E$Y(Y,z),process.platform==="darwin")try{return await VS8("security",["verify-cert","-c",Y,"-p","codeSign"]),!0}catch(w){return!1}else if(process.platform==="win32"){let w=` $ErrorActionPreference = 'Stop' $certCollection = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2Collection $certCollection.Import('${Y}') if ($certCollection.Count -eq 0) { Write-Error 'No certificates found' exit 1 } $leafCert = $certCollection[0] $chain = New-Object System.Security.Cryptography.X509Certificates.X509Chain # Enable revocation checking $chain.ChainPolicy.RevocationMode = 'Online' $chain.ChainPolicy.RevocationFlag = 'EntireChain' $chain.ChainPolicy.UrlRetrievalTimeout = New-TimeSpan -Seconds 30 # Add code signing application policy $codeSignOid = New-Object System.Security.Cryptography.Oid '1.3.6.1.5.5.7.3.3' $chain.ChainPolicy.ApplicationPolicy.Add($codeSignOid) # Add intermediate certificates to extra store for ($i = 1; $i -lt $certCollection.Count; $i++) { [void]$chain.ChainPolicy.ExtraStore.Add($certCollection[$i]) } # Build and validate chain $result = $chain.Build($leafCert) if ($result) { 'Valid' } else { $chain.ChainStatus | ForEach-Object { Write-Error "$($_.Status): $($_.StatusInformation)" } exit 1 } `.trim(),{stdout:_}=await VS8("powershell.exe",["-NoProfile","-NonInteractive","-Command",w]);return _.includes("Valid")}else try{return await VS8("openssl",["verify","-purpose","codesigning","-CApath","/etc/ssl/certs",Y]),!0}catch(w){return!1}}catch(Y){return!1}finally{if(K)try{await k$Y(K,{recursive:!0,force:!0})}catch{}}}function h$Y(A){let q=DT6(A),{originalContent:K}=Cc6(q);x04(A,K)}var aH,u04="MCPB_SIG_V1",B04="MCPB_SIG_END",VS8;var NS8=k(()=>{aH=e(I04(),1),VS8=y$Y(N$Y)});function Ef1({silent:A=!1}={}){return{log:(...q)=>{if(!A)console.log(...q)},error:(...q)=>{if(!A)console.error(...q)},warn:(...q)=>{if(!A)console.warn(...q)},info:(...q)=>{if(!A)console.info(...q)},debug:(...q)=>{if(!A)console.debug(...q)}}}import{chmodSync as I$Y,existsSync as vS8,mkdirSync as g04,readFileSync as b$Y,writeFileSync as x$Y}from"fs";import{join as F04,resolve as Lf1,sep as u$Y}from"path";async function kS8({mcpbPath:A,outputDir:q,silent:K}){let Y=Ef1({silent:K}),z=Lf1(A);if(!vS8(z))return Y.error(`ERROR: MCPB file not found: ${A}`),!1;let w=q?Lf1(q):process.cwd();if(!vS8(w))g04(w,{recursive:!0});try{let _=b$Y(z),{originalContent:$}=Cc6(_),O=new Map,H=process.platform!=="win32";if(H){let J=$,M=-1;for(let D=J.length-22;D>=0;D--)if(J.readUInt32LE(D)===101010256){M=D;break}if(M!==-1){let D=J.readUInt32LE(M+16),X=J.readUInt16LE(M+8),P=D;for(let W=0;W>16&511;if(V>0)O.set(f,V);let N=J.readUInt16LE(P+30),v=J.readUInt16LE(P+32);P+=46+G+N+v}else break}}let j=xy8($);for(let J in j)if(Object.prototype.hasOwnProperty.call(j,J)){let M=j[J],D=F04(w,J),X=Lf1(D),P=Lf1(w);if(!X.startsWith(P+u$Y)&&X!==P)throw Error(`Path traversal attempt detected: ${J}`);let W=F04(D,"..");if(!vS8(W))g04(W,{recursive:!0});if(x$Y(D,M),H&&O.has(J))try{let Z=O.get(J);if(Z!==void 0)I$Y(D,Z)}catch(Z){}}return Y.log(`Extension unpacked successfully to ${w}`),!0}catch(_){if(_ instanceof Error)Y.error(`ERROR: Failed to unpack extension: ${_.message}`);else Y.error("ERROR: An unknown error occurred during unpacking.");return!1}}var ES8=k(()=>{sd6();NS8()});var Q04,B$Y,m$Y,g$Y,F$Y,Q$Y,U$Y,p$Y,d$Y,c$Y,_f_,U04,$f_;var p04=k(()=>{aK6();Q04=Ik({command:cA(),args:Ej(cA()).optional(),env:OI(cA(),cA()).optional()}),B$Y=Ik({name:cA(),email:cA().email().optional(),url:cA().url().optional()}),m$Y=Ik({type:cA(),url:cA().url()}),g$Y=Q04.partial(),F$Y=Q04.extend({platform_overrides:OI(cA(),g$Y).optional()}),Q$Y=Ik({type:HI(["python","node","binary"]),entry_point:cA(),mcp_config:F$Y}),U$Y=Ik({claude_desktop:cA().optional(),platforms:Ej(HI(["darwin","win32","linux"])).optional(),runtimes:Ik({python:cA().optional(),node:cA().optional()}).optional()}).passthrough(),p$Y=Ik({name:cA(),description:cA().optional()}),d$Y=Ik({name:cA(),description:cA().optional(),arguments:Ej(cA()).optional(),text:cA()}),c$Y=Ik({type:HI(["string","number","boolean","directory","file"]),title:cA(),description:cA(),required:mX().optional(),default:Oq6([cA(),my(),mX(),Ej(cA())]).optional(),multiple:mX().optional(),sensitive:mX().optional(),min:my().optional(),max:my().optional()}),_f_=OI(cA(),Oq6([cA(),my(),mX(),Ej(cA())])),U04=Ik({$schema:cA().optional(),dxt_version:cA().optional().describe("@deprecated Use manifest_version instead"),manifest_version:cA().optional(),name:cA(),display_name:cA().optional(),version:cA(),description:cA(),long_description:cA().optional(),author:B$Y,repository:m$Y.optional(),homepage:cA().url().optional(),documentation:cA().url().optional(),support:cA().url().optional(),icon:cA().optional(),screenshots:Ej(cA()).optional(),server:Q$Y,tools:Ej(p$Y).optional(),tools_generated:mX().optional(),prompts:Ej(d$Y).optional(),prompts_generated:mX().optional(),keywords:Ej(cA()).optional(),license:cA().optional(),compatibility:U$Y.optional(),user_config:OI(cA(),c$Y).optional()}).refine((A)=>!!(A.dxt_version||A.manifest_version),{message:"Either 'dxt_version' (deprecated) or 'manifest_version' must be provided"}),$f_=Ik({status:HI(["signed","unsigned","self-signed"]),publisher:cA().optional(),issuer:cA().optional(),valid_from:cA().optional(),valid_to:cA().optional(),fingerprint:cA().optional()})});import{existsSync as LS8,readFileSync as l$Y,statSync as d04}from"fs";import*as Kv from"fs/promises";import*as l04 from"os";import{join as i$Y,resolve as E16}from"path";function RS8(A){try{let q=E16(A),K=q;if(LS8(q)&&d04(q).isDirectory())K=i$Y(q,"manifest.json");let Y=l$Y(K,"utf-8"),z=JSON.parse(Y),w=pd6.safeParse(z);if(w.success)return console.log("Manifest schema validation passes!"),!0;else return console.log(`ERROR: Manifest validation failed: `),w.error.issues.forEach((_)=>{let $=_.path.join(".");console.log(` - ${$?`${$}: `:""}${_.message}`)}),!1}catch(q){if(q instanceof Error)if(q.message.includes("ENOENT")){if(console.error(`ERROR: File not found: ${A}`),LS8(E16(A))&&d04(E16(A)).isDirectory())console.error(" (No manifest.json found in directory)")}else if(q.message.includes("JSON"))console.error(`ERROR: Invalid JSON in manifest file: ${q.message}`);else console.error(`ERROR: Error reading manifest: ${q.message}`);else console.error("ERROR: Unknown error occurred");return!1}}async function n$Y(A){let q=await Kv.mkdtemp(E16(l04.tmpdir(),"mcpb-clean-")),K=E16(q,"in.mcpb"),Y=E16(q,"out");console.log(" -- Cleaning MCPB...");try{await Kv.copyFile(A,K),console.log(" -- Unpacking MCPB..."),await kS8({mcpbPath:K,silent:!0,outputDir:Y});let z=E16(Y,"manifest.json"),w=await Kv.readFile(z,"utf-8"),_=JSON.parse(w),$=U04.safeParse(_);if(!$.success)throw Error('Unrecoverable manifest issues, please run "mcpb validate"');if(await Kv.writeFile(z,JSON.stringify($.data,null,2)),w.trim()!==(await Kv.readFile(z,"utf8")).trim())console.log(" -- Update manifest to be valid per MCPB schema");else console.log(" -- Manifest already valid per MCPB schema");let O=E16(Y,"node_modules");if(LS8(O)){console.log(" -- node_modules found, deleting development dependencies");let M=new c04.DestroyerOfModules({rootDirectory:Y});try{await M.destroy()}catch(D){if(D instanceof Error&&D.message.includes("Failed to locate module"))console.log(" -- Some modules already removed, skipping remaining cleanup");else throw D}console.log(" -- Removed development dependencies from node_modules")}else console.log(" -- No node_modules, not pruning");let H=await Kv.stat(A),{packExtension:j}=await Promise.resolve().then(() => (CS8(),i04));await j({extensionPath:Y,outputPath:A,silent:!0});let J=await Kv.stat(A);console.log(` Clean Complete:`),console.log("Before:",yS8.default(H.size)),console.log("After:",yS8.default(J.size))}finally{await Kv.rm(q,{recursive:!0,force:!0})}}var c04,yS8;var SS8=k(()=>{ES8();dd6();p04();c04=e(ZX4(),1),yS8=e(TX4(),1)});var i04={};m1(i04,{packExtension:()=>o04});import{createHash as r$Y}from"crypto";import{existsSync as n04,mkdirSync as o$Y,readFileSync as a$Y,statSync as s$Y,writeFileSync as t$Y}from"fs";import{basename as e$Y,join as r04,relative as AOY,resolve as hS8,sep as qOY}from"path";function hc6(A){if(A<1024)return`${A}B`;else if(A<1048576)return`${(A/1024).toFixed(1)}kB`;else return`${(A/1048576).toFixed(1)}MB`}function KOY(A){return A.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-_.]/g,"").replace(/-+/g,"-").replace(/^-+|-+$/g,"").substring(0,100)}async function o04({extensionPath:A,outputPath:q,silent:K}){let Y=hS8(A),z=Ef1({silent:K});if(!n04(Y)||!s$Y(Y).isDirectory())return z.error(`ERROR: Directory not found: ${A}`),!1;let w=r04(Y,"manifest.json");if(!n04(w))if(z.log(`No manifest.json found in ${A}`),await k2({message:"Would you like to create a manifest.json file?",default:!0})){if(!await Oy8(A))return z.error("ERROR: Failed to create manifest"),!1}else return z.error("ERROR: Cannot pack extension without manifest.json"),!1;if(z.log("Validating manifest..."),!RS8(w))return z.error("ERROR: Cannot pack extension with invalid manifest"),!1;let _;try{let J=a$Y(w,"utf-8"),M=JSON.parse(J);_=pd6.parse(M)}catch(J){if(z.error("ERROR: Failed to parse manifest.json"),J instanceof Error)z.error(` ${J.message}`);return!1}let $=_.manifest_version||_.dxt_version;if($!==kz6)return z.error(`ERROR: Manifest version mismatch. Expected "${kz6}", found "${$}"`),z.error(` Please update the manifest_version in your manifest.json to "${kz6}"`),!1;let O=e$Y(Y),H=q?hS8(q):hS8(`${O}.mcpb`),j=r04(H,"..");o$Y(j,{recursive:!0});try{let J=gy8(Y),{files:M,ignoredCount:D}=kG1(Y,Y,{},J);z.log(` \uD83D\uDCE6 ${_.name}@${_.version}`),z.log("Archive Contents");let X=Object.entries(M),P=0;X.sort(([R],[h])=>R.localeCompare(h));let W=new Map,Z=[];for(let[R,h]of X){let B=AOY(Y,R),x=h.data,F=typeof x==="string"?Buffer.byteLength(x,"utf8"):x.length;P+=F;let g=B.split(qOY);if(g.length>3){let b=g.slice(0,3).join("/");if(!W.has(b))W.set(b,{files:[],totalSize:0});let U=W.get(b);U.files.push(B),U.totalSize+=F}else Z.push({path:B,size:F})}for(let{path:R,size:h}of Z)z.log(`${hc6(h).padStart(8)} ${R}`);for(let[R,{files:h,totalSize:B}]of W)if(h.length===1){let x=h[0],F=B;z.log(`${hc6(F).padStart(8)} ${x}`)}else z.log(`${hc6(B).padStart(8)} ${R}/ [and ${h.length} more files]`);let G={},f=process.platform!=="win32";for(let[R,h]of Object.entries(M))if(f)G[R]=[h.data,{os:3,attrs:(h.mode&511)<<16}];else G[R]=h.data;let V=by8(G,{level:9,mtime:new Date});t$Y(H,V);let N=r$Y("sha1").update(V).digest("hex"),y=`${KOY(_.name)}-${_.version}.mcpb`;return z.log(` Archive Details`),z.log(`name: ${_.name}`),z.log(`version: ${_.version}`),z.log(`filename: ${y}`),z.log(`package size: ${hc6(V.length)}`),z.log(`unpacked size: ${hc6(P)}`),z.log(`shasum: ${N}`),z.log(`total files: ${X.length}`),z.log(`ignored (.mcpbignore) files: ${D}`),z.log(` Output: ${H}`),!0}catch(J){if(J instanceof Error)z.error(`ERROR: Archive error: ${J.message}`);else z.error("ERROR: Unknown archive error occurred");return!1}}var CS8=k(()=>{qy8();sd6();Qy8();SS8();dd6();Hy8()});function yf1(A,q){if(typeof A==="string"){let K=A;for(let[Y,z]of Object.entries(q)){let w=new RegExp(`\\$\\{${Y}\\}`,"g");if(K.match(w))if(Array.isArray(z))console.warn(`Cannot replace ${Y} with array value in string context: "${A}"`,{key:Y,replacement:z});else K=K.replace(w,z)}return K}else if(Array.isArray(A)){let K=[];for(let Y of A)if(typeof Y==="string"&&Y.match(/^\$\{user_config\.[^}]+\}$/)){let z=Y.match(/^\$\{([^}]+)\}$/)?.[1];if(z&&q[z]){let w=q[z];if(Array.isArray(w))K.push(...w);else K.push(w)}else K.push(Y)}else K.push(yf1(Y,q));return K}else if(A&&typeof A==="object"){let K={};for(let[Y,z]of Object.entries(A))K[Y]=yf1(z,q);return K}return A}async function YOY(A){let{manifest:q,extensionPath:K,systemDirs:Y,userConfig:z,pathSeparator:w,logger:_}=A,$=q.server?.mcp_config;if(!$)return;let O={...$};if($.platform_overrides){if(process.platform in $.platform_overrides){let J=$.platform_overrides[process.platform];O.command=J.command||O.command,O.args=J.args||O.args,O.env=J.env||O.env}}if(s04({manifest:q,userConfig:z})){_?.warn(`Extension ${q.name} has missing required configuration, skipping MCP config`);return}let H={__dirname:K,pathSeparator:w,"/":w,...Y},j={};if(q.user_config){for(let[J,M]of Object.entries(q.user_config))if(M.default!==void 0)j[J]=M.default}if(z)Object.assign(j,z);for(let[J,M]of Object.entries(j)){let D=`user_config.${J}`;if(Array.isArray(M))H[D]=M.map(String);else if(typeof M==="boolean")H[D]=M?"true":"false";else H[D]=String(M)}return O=yf1(O,H),O}function a04(A){return A===void 0||A===null||A===""}function s04({manifest:A,userConfig:q}){if(!A.user_config)return!1;let K=q||{};for(let[Y,z]of Object.entries(A.user_config))if(z.required){let w=K[Y];if(a04(w)||Array.isArray(w)&&(w.length===0||w.some(a04)))return!0}return!1}var t04=()=>{};var IS8={};m1(IS8,{verifyMcpbFile:()=>S$Y,verifyCertificateChain:()=>m04,validateManifest:()=>RS8,unsignMcpbFile:()=>h$Y,unpackExtension:()=>kS8,signMcpbFile:()=>R$Y,shouldExclude:()=>P3Y,replaceVariables:()=>yf1,readPackageJson:()=>wH4,readMcpbIgnorePatterns:()=>gy8,promptVisualAssets:()=>fH4,promptUserConfig:()=>VH4,promptUrls:()=>GH4,promptTools:()=>XH4,promptServerConfig:()=>DH4,promptPrompts:()=>PH4,promptOptionalFields:()=>WH4,promptLongDescription:()=>ZH4,promptCompatibility:()=>TH4,promptBasicInfo:()=>JH4,promptAuthorInfo:()=>MH4,printNextSteps:()=>vH4,packExtension:()=>o04,initExtension:()=>Oy8,hasRequiredConfigMissing:()=>s04,getMcpConfigForManifest:()=>YOY,getDefaultServerConfig:()=>HH4,getDefaultRepositoryUrl:()=>_H4,getDefaultOptionalFields:()=>jH4,getDefaultEntryPoint:()=>$y8,getDefaultBasicInfo:()=>$H4,getDefaultAuthorUrl:()=>wy8,getDefaultAuthorName:()=>Yy8,getDefaultAuthorInfo:()=>OH4,getDefaultAuthorEmail:()=>zy8,getAllFilesWithCount:()=>kG1,getAllFiles:()=>Hj4,extractSignatureBlock:()=>Cc6,createMcpConfig:()=>_y8,cleanMcpb:()=>n$Y,buildManifest:()=>NH4,McpbUserConfigurationOptionSchema:()=>qH4,McpbUserConfigValuesSchema:()=>QKY,McpbSignatureInfoSchema:()=>UKY,McpbManifestToolSchema:()=>eO4,McpbManifestServerSchema:()=>sO4,McpbManifestSchema:()=>pd6,McpbManifestRepositorySchema:()=>rO4,McpbManifestPromptSchema:()=>AH4,McpbManifestPlatformOverrideSchema:()=>oO4,McpbManifestMcpConfigSchema:()=>aO4,McpbManifestCompatibilitySchema:()=>tO4,McpbManifestAuthorSchema:()=>nO4,McpServerConfigSchema:()=>Ky8,EXCLUDE_PATTERNS:()=>Oj4,CURRENT_MANIFEST_VERSION:()=>kz6});var bS8=k(()=>{Hy8();CS8();ES8();Qy8();NS8();SS8();dd6();t04()});async function zOY(A){let{McpbManifestSchema:q}=await Promise.resolve().then(() => (bS8(),IS8)),K=q.safeParse(A);if(!K.success){let Y=K.error.flatten(),z=[...Object.entries(Y.fieldErrors).map(([w,_])=>`${w}: ${_?.join(", ")}`),...Y.formErrors||[]].filter(Boolean).join("; ");throw Error(`Invalid manifest: ${z}`)}return K.data}async function wOY(A){let q;try{q=O8(A)}catch(K){throw Error(`Invalid JSON in manifest.json: ${D1(K)}`)}return zOY(q)}async function xS8(A){let q=new TextDecoder().decode(A);return wOY(q)}var e04=k(()=>{a1();MA()});import*as Rf1 from"path";function _OY(A){if(Ua(A))return!1;let q=Rf1.normalize(A);if(Rf1.isAbsolute(q))return!1;return!0}function $OY(A,q){q.fileCount++;let K;if(q.fileCount>L16.MAX_FILE_COUNT)K=`Archive contains too many files: ${q.fileCount} (max: ${L16.MAX_FILE_COUNT})`;if(!_OY(A.name))K=`Unsafe file path detected: "${A.name}". Path traversal or absolute paths are not allowed.`;let Y=A.originalSize||0;if(Y>L16.MAX_FILE_SIZE)K=`File "${A.name}" is too large: ${Math.round(Y/1024/1024)}MB (max: ${Math.round(L16.MAX_FILE_SIZE/1024/1024)}MB)`;if(q.totalUncompressedSize+=Y,q.totalUncompressedSize>L16.MAX_TOTAL_SIZE)K=`Archive total size is too large: ${Math.round(q.totalUncompressedSize/1024/1024)}MB (max: ${Math.round(L16.MAX_TOTAL_SIZE/1024/1024)}MB)`;let z=q.totalUncompressedSize/q.compressedSize;if(z>L16.MAX_COMPRESSION_RATIO)K=`Suspicious compression ratio detected: ${z.toFixed(1)}:1 (max: ${L16.MAX_COMPRESSION_RATIO}:1). This may be a zip bomb.`;return K?{isValid:!1,error:K}:{isValid:!0}}async function OOY(A){let{unzipSync:q}=await Promise.resolve().then(() => (sd6(),uy8)),Y={fileCount:0,totalUncompressedSize:0,compressedSize:A.length,errors:[]},z=q(new Uint8Array(A),{filter:(w)=>{let _=$OY(w,Y);if(!_.isValid)throw Error(_.error);return!0}});return L(`Zip extraction completed: ${Y.fileCount} files, ${Math.round(Y.totalUncompressedSize/1024)}KB uncompressed`),z}async function Sf1(A){let q=P1();try{let K=await q.readFileBytes(A);return await OOY(K)}catch(K){if(K.code==="ENOENT")throw K;let Y=K instanceof Error?K.message:String(K);throw Error(`Failed to read or unzip file: ${Y}`)}}var L16;var uS8=k(()=>{G1();Y7();Kz();L16={MAX_FILE_SIZE:536870912,MAX_TOTAL_SIZE:1073741824,MAX_FILE_COUNT:1e5,MAX_COMPRESSION_RATIO:50,MIN_COMPRESSION_RATIO:0.5}});import*as AW4 from"os";import*as Uz6 from"path";function qW4(A){let q=A?.platform??c8(),K=A?.homedir??AW4.homedir(),Y=A?.env??process.env,z={HOME:K,DESKTOP:Uz6.join(K,"Desktop"),DOCUMENTS:Uz6.join(K,"Documents"),DOWNLOADS:Uz6.join(K,"Downloads")};switch(q){case"windows":{let w=Y.USERPROFILE||K;return{HOME:K,DESKTOP:Uz6.join(w,"Desktop"),DOCUMENTS:Uz6.join(w,"Documents"),DOWNLOADS:Uz6.join(w,"Downloads")}}case"linux":case"wsl":return{HOME:K,DESKTOP:Y.XDG_DESKTOP_DIR||z.DESKTOP,DOCUMENTS:Y.XDG_DOCUMENTS_DIR||z.DOCUMENTS,DOWNLOADS:Y.XDG_DOWNLOAD_DIR||z.DOWNLOADS};case"macos":default:{if(q==="unknown")L("Unknown platform detected, using default paths");return z}}}var KW4=k(()=>{uK();G1()});import{createHash as mS8}from"crypto";import{mkdir as hf1,writeFile as If1}from"fs/promises";import{join as y16,dirname as HOY}from"path";function JC(A){return A.endsWith(".mcpb")||A.endsWith(".dxt")}function _W4(A){return A.startsWith("http://")||A.startsWith("https://")}function jOY(A){return mS8("sha256").update(A).digest("hex").substring(0,16)}function $W4(A){return y16(A,".mcpb-cache")}function OW4(A,q){let K=mS8("md5").update(q).digest("hex").substring(0,8);return y16(A,`${K}.metadata.json`)}function YW4(A,q){try{let Y=BA().pluginConfigs?.[A]?.mcpServers?.[q];if(!Y)return null;return L(`Loaded user config for ${A}/${q} from settings`),Y}catch(K){let Y=K instanceof Error?K:Error(String(K));return $6(Y),L(`Failed to load user config for ${A}/${q}: ${K}`,{level:"error"}),null}}function zW4(A,q,K){try{let Y=BA();if(!Y.pluginConfigs)Y.pluginConfigs={};if(!Y.pluginConfigs[A])Y.pluginConfigs[A]={};if(!Y.pluginConfigs[A].mcpServers)Y.pluginConfigs[A].mcpServers={};Y.pluginConfigs[A].mcpServers[q]=K;let z=xA("userSettings",Y);if(z.error)throw z.error;L(`Saved user config for ${A}/${q} to user settings`)}catch(Y){let z=Y instanceof Error?Y:Error(String(Y));throw $6(z),Error(`Failed to save user configuration for ${A}/${q}: ${z.message}`)}}function wW4(A,q){let K=[];for(let[Y,z]of Object.entries(q)){let w=A[Y];if(z.required&&(w===void 0||w==="")){K.push(`${z.title||Y} is required but not provided`);continue}if(w===void 0||w==="")continue;if(z.type==="string"){if(Array.isArray(w)){if(!z.multiple)K.push(`${z.title||Y} must be a string, not an array`);else if(!w.every((_)=>typeof _==="string"))K.push(`${z.title||Y} must be an array of strings`)}else if(typeof w!=="string")K.push(`${z.title||Y} must be a string`)}else if(z.type==="number"&&typeof w!=="number")K.push(`${z.title||Y} must be a number`);else if(z.type==="boolean"&&typeof w!=="boolean")K.push(`${z.title||Y} must be a boolean`);else if((z.type==="file"||z.type==="directory")&&typeof w!=="string")K.push(`${z.title||Y} must be a path string`);if(z.type==="number"&&typeof w==="number"){if(z.min!==void 0&&wz.max)K.push(`${z.title||Y} must be at most ${z.max}`)}}return{valid:K.length===0,errors:K}}async function Cf1(A,q,K={}){let{getMcpConfigForManifest:Y}=await Promise.resolve().then(() => (bS8(),IS8)),z=await Y({manifest:A,extensionPath:q,systemDirs:qW4(),userConfig:K,pathSeparator:"/"});if(!z){let w=Error(`Failed to generate MCP server configuration from manifest "${A.name}"`);throw $6(w),w}return z}async function HW4(A,q){let K=P1(),Y=OW4(A,q);try{let z=await K.readFile(Y,{encoding:"utf-8"});return O8(z)}catch(z){if(z.code==="ENOENT")return null;let _=z instanceof Error?z:Error(String(z));return $6(_),L(`Failed to load MCPB cache metadata: ${z}`,{level:"error"}),null}}async function BS8(A,q,K){let Y=OW4(A,q);await hf1(A,{recursive:!0}),await If1(Y,U6(K,null,2),"utf-8")}async function JOY(A,q,K){if(L(`Downloading MCPB from ${A}`),K)K(`Downloading ${A}...`);try{let Y=await I8.get(A,{timeout:120000,responseType:"arraybuffer",maxRedirects:5,onDownloadProgress:(w)=>{if(w.total&&K){let _=Math.round(w.loaded/w.total*100);K(`Downloading... ${_}%`)}}}),z=new Uint8Array(Y.data);if(await If1(q,Buffer.from(z)),L(`Downloaded ${z.length} bytes to ${q}`),K)K("Download complete");return z}catch(Y){let z=D1(Y),w=Error(`Failed to download MCPB file from ${A}: ${z}`);throw $6(w),w}}async function MOY(A,q,K){if(K)K("Extracting files...");await hf1(q,{recursive:!0});let Y=0,z=Object.keys(A).length;for(let[w,_]of Object.entries(A)){let $=y16(q,w),O=HOY($);if(O!==q)await hf1(O,{recursive:!0});if(w.endsWith(".json")||w.endsWith(".js")||w.endsWith(".ts")||w.endsWith(".txt")||w.endsWith(".md")||w.endsWith(".yml")||w.endsWith(".yaml")){let j=new TextDecoder().decode(_);await If1($,j,"utf-8")}else await If1($,Buffer.from(_));if(Y++,K&&Y%10===0)K(`Extracted ${Y}/${z} files`)}if(L(`Extracted ${Y} files to ${q}`),K)K(`Extraction complete (${Y} files)`)}async function DOY(A,q){let K=P1(),Y=$W4(q),z=await HW4(Y,A);if(!z)return!0;try{await K.stat(z.extractedPath)}catch(w){if(w.code==="ENOENT")L(`MCPB extraction path missing: ${z.extractedPath}`);else L(`MCPB extraction path inaccessible: ${z.extractedPath}: ${w}`,{level:"error"});return!0}if(!_W4(A)){let w=y16(q,A),_;try{_=await K.stat(w)}catch(H){if(H.code==="ENOENT")L(`MCPB source file missing: ${w}`);else L(`MCPB source file inaccessible: ${w}: ${H}`,{level:"error"});return!0}let $=new Date(z.cachedAt).getTime(),O=_.mtimeMs;if(O>$)return L(`MCPB file modified: ${new Date(O)} > ${new Date($)}`),!0}return!1}async function Ic6(A,q,K,Y,z,w){let _=P1(),$=$W4(q);await hf1($,{recursive:!0}),L(`Loading MCPB from source: ${A}`);let O=await HW4($,A);if(O&&!await DOY(A,q)){L(`Using cached MCPB from ${O.extractedPath} (hash: ${O.contentHash})`);let G=y16(O.extractedPath,"manifest.json"),f;try{f=await _.readFile(G,{encoding:"utf-8"})}catch(y){if(y.code==="ENOENT"){let R=Error(`Cached manifest not found: ${G}`);throw $6(R),R}throw y}let V=new TextEncoder().encode(f),N=await xS8(V);if(N.user_config&&Object.keys(N.user_config).length>0){let y=N.name,R=YW4(K,y),h=z||R||{},B=wW4(h,N.user_config);if(w||!B.valid)return{status:"needs-config",manifest:N,extractedPath:O.extractedPath,contentHash:O.contentHash,configSchema:N.user_config,existingConfig:R||{},validationErrors:B.valid?[]:B.errors};if(z)zW4(K,y,z);let x=await Cf1(N,O.extractedPath,h);return{manifest:N,mcpConfig:x,extractedPath:O.extractedPath,contentHash:O.contentHash}}let v=await Cf1(N,O.extractedPath);return{manifest:N,mcpConfig:v,extractedPath:O.extractedPath,contentHash:O.contentHash}}let H,j;if(_W4(A)){let G=mS8("md5").update(A).digest("hex").substring(0,8);j=y16($,`${G}.mcpb`),H=await JOY(A,j,Y)}else{let G=y16(q,A);if(Y)Y(`Loading ${A}...`);try{H=await _.readFileBytes(G),j=G}catch(f){if(f.code==="ENOENT"){let V=Error(`MCPB file not found: ${G}`);throw $6(V),V}throw f}}let J=jOY(H);if(L(`MCPB content hash: ${J}`),Y)Y("Extracting MCPB archive...");let M=await Sf1(j),D=M["manifest.json"];if(!D){let G=Error("No manifest.json found in MCPB file");throw $6(G),G}let X=await xS8(D);if(L(`MCPB manifest: ${X.name} v${X.version} by ${X.author.name}`),!X.server){let G=Error(`MCPB manifest for "${X.name}" does not define a server configuration`);throw $6(G),G}let P=y16($,J);if(await MOY(M,P,Y),X.user_config&&Object.keys(X.user_config).length>0){let G=X.name,f=YW4(K,G),V=z||f||{},N=wW4(V,X.user_config);if(!N.valid){let R={source:A,contentHash:J,extractedPath:P,cachedAt:new Date().toISOString(),lastChecked:new Date().toISOString()};return await BS8($,A,R),{status:"needs-config",manifest:X,extractedPath:P,contentHash:J,configSchema:X.user_config,existingConfig:f||{},validationErrors:N.errors}}if(z)zW4(K,G,z);if(Y)Y("Generating MCP server configuration...");let v=await Cf1(X,P,V),y={source:A,contentHash:J,extractedPath:P,cachedAt:new Date().toISOString(),lastChecked:new Date().toISOString()};return await BS8($,A,y),{manifest:X,mcpConfig:v,extractedPath:P,contentHash:J}}if(Y)Y("Generating MCP server configuration...");let W=await Cf1(X,P),Z={source:A,contentHash:J,extractedPath:P,cachedAt:new Date().toISOString(),lastChecked:new Date().toISOString()};return await BS8($,A,Z),L(`Successfully loaded MCPB: ${X.name} (extracted to ${P})`),{manifest:X,mcpConfig:W,extractedPath:P,contentHash:J}}var gS8=k(()=>{A3();e04();uS8();Y7();G1();x1();KW4();GA();a1();MA()});function XT6(A){let q=[];return{expanded:A.replace(/\$\{([^}]+)\}/g,(Y,z)=>{let[w,_]=z.split(":-",2),$=process.env[w];if($!==void 0)return $;if(_!==void 0)return _;return q.push(w),Y}),missingVars:q}}import{join as XOY}from"path";async function jW4(A,q,K){try{L(`Loading MCP servers from MCPB: ${q}`);let Y=A.repository,z=await Ic6(q,A.path,Y,($)=>{L(`MCPB [${A.name}]: ${$}`)});if("status"in z&&z.status==="needs-config")return L(`MCPB ${q} requires user configuration. `+`User can configure via: /plugin → Manage plugins → ${A.name} → Configure`),null;let w=z,_=w.manifest.name;return L(`Loaded MCP server "${_}" from MCPB (extracted to ${w.extractedPath})`),{[_]:w.mcpConfig}}catch(Y){let z=D1(Y);L(`Failed to load MCPB ${q}: ${z}`,{level:"error"});let w=`${A.name}@${A.repository}`;if(q.startsWith("http")&&(z.includes("download")||z.includes("network")))K.push({type:"mcpb-download-failed",source:w,plugin:A.name,url:q,reason:z});else if(z.includes("manifest")||z.includes("user configuration"))K.push({type:"mcpb-invalid-manifest",source:w,plugin:A.name,mcpbPath:q,validationError:z});else K.push({type:"mcpb-extract-failed",source:w,plugin:A.name,mcpbPath:q,reason:z});return null}}async function pz6(A,q=[]){let K={},Y=await FS8(A.path,".mcp.json");if(Y)K={...K,...Y};if(A.manifest.mcpServers){let z=A.manifest.mcpServers;if(typeof z==="string")if(JC(z)){let w=await jW4(A,z,q);if(w)K={...K,...w}}else{let w=await FS8(A.path,z);if(w)K={...K,...w}}else if(Array.isArray(z)){let w=await Promise.all(z.map(async(_)=>{try{if(typeof _==="string"){if(JC(_))return await jW4(A,_,q);return await FS8(A.path,_)}return _}catch($){return L(`Failed to load MCP servers from spec for plugin ${A.name}: ${$}`,{level:"error"}),null}}));for(let _ of w)if(_)K={...K,..._}}else K={...K,...z}}return Object.keys(K).length>0?K:void 0}async function FS8(A,q){let K=P1(),Y=XOY(A,q),z;try{z=await K.readFile(Y,{encoding:"utf-8"})}catch(w){if(w.code==="ENOENT")return null;return L(`Failed to load MCP servers from ${Y}: ${w}`,{level:"error"}),null}try{let w=O8(z),_=w.mcpServers||w,$={};for(let[O,H]of Object.entries(_)){let j=jm().safeParse(H);if(j.success)$[O]=j.data;else L(`Invalid MCP server config for ${O} in ${Y}: ${j.error.message}`,{level:"error"})}return $}catch(w){return L(`Failed to load MCP servers from ${Y}: ${w}`,{level:"error"}),null}}function POY(A,q){let K={};for(let[Y,z]of Object.entries(A)){let w=`plugin:${q}:${Y}`;K[w]={...z,scope:"dynamic"}}return K}function bc6(A,q){let K=process.platform==="win32"?q.replace(/\\/g,"/"):q;return A.replace(/\$\{CLAUDE_PLUGIN_ROOT\}/g,K)}function WOY(A,q){return A.replace(/\$\{user_config\.([^}]+)\}/g,(K,Y)=>{let z=q[Y];if(z===void 0)throw Error(`Missing required user configuration value: ${Y}. This should have been validated before variable substitution.`);return String(z)})}function ZOY(A,q,K,Y,z,w){let _=[],$=(H)=>{let j=bc6(H,q);if(K)j=WOY(j,K);let{expanded:J,missingVars:M}=XT6(j);return _.push(...M),J},O;switch(A.type){case void 0:case"stdio":{let H={...A};if(H.command)H.command=$(H.command);if(H.args)H.args=H.args.map((J)=>$(J));let j={CLAUDE_PLUGIN_ROOT:q,...H.env||{}};for(let[J,M]of Object.entries(j))if(J!=="CLAUDE_PLUGIN_ROOT")j[J]=$(M);H.env=j,O=H;break}case"sse":case"http":case"ws":{let H={...A};if(H.url)H.url=$(H.url);if(H.headers){let j={};for(let[J,M]of Object.entries(H.headers))j[J]=$(M);H.headers=j}O=H;break}case"sse-ide":case"ws-ide":case"sdk":case"claudeai-proxy":O=A;break}if(Y&&_.length>0){let j=[...new Set(_)].join(", ");if(L(`Missing environment variables in plugin MCP config: ${j}`,{level:"warn"}),z&&w)Y.push({type:"mcp-config-invalid",source:`plugin:${z}`,plugin:z,serverName:w,validationError:`Missing environment variables: ${j}`})}return O}async function JW4(A,q=[]){if(!A.enabled)return;let K=A.mcpServers||await pz6(A,q);if(!K)return;let Y={};for(let[z,w]of Object.entries(K))Y[z]=ZOY(w,A.path,void 0,q,A.name,z);return POY(Y,A.name)}var PT6=k(()=>{Y7();G1();PK6();gS8();a1();MA()});import{join as WT6,basename as ZT6,dirname as Ri}from"path";function bf1(A){return/^skill\.md$/i.test(ZT6(A))}function GOY(A,q,K){if(bf1(A)){let z=Ri(A),w=Ri(z),_=ZT6(z),$=w.startsWith(q)?w.slice(q.length).replace(/^\//,""):"",O=$?$.split("/").join(":"):"";return O?`${K}:${O}:${_}`:`${K}:${_}`}else{let z=Ri(A),w=ZT6(A).replace(/\.md$/,""),_=z.startsWith(q)?z.slice(q.length).replace(/^\//,""):"",$=_?_.split("/").join(":"):"";return $?`${K}:${$}:${w}`:`${K}:${w}`}}async function fOY(A,q,K){let Y=[],z=P1();async function w(_){try{let $=await z.readdir(_);if($.some((H)=>H.isFile()&&bf1(H.name))){await Promise.all($.map(async(H)=>{if(!H.isFile()||!H.name.toLowerCase().endsWith(".md"))return;let j=WT6(_,H.name);if(xB(z,j,K))return;let J=await z.readFile(j,{encoding:"utf-8"}),{frontmatter:M,content:D}=fJ(J,j);Y.push({filePath:j,baseDir:q,frontmatter:M,content:D})}));return}await Promise.all($.map(async(H)=>{let j=WT6(_,H.name);if(H.isDirectory())await w(j);else if(H.isFile()&&H.name.toLowerCase().endsWith(".md")){if(xB(z,j,K))return;let J=await z.readFile(j,{encoding:"utf-8"}),{frontmatter:M,content:D}=fJ(J,j);Y.push({filePath:j,baseDir:q,frontmatter:M,content:D})}}))}catch($){L(`Failed to scan directory ${_}: ${$}`,{level:"error"})}}return await w(A),Y}function TOY(A){let q=new Map;for(let Y of A){let z=Ri(Y.filePath),w=q.get(z)??[];w.push(Y),q.set(z,w)}let K=[];for(let[Y,z]of q){let w=z.filter((_)=>bf1(_.filePath));if(w.length>0){let _=w[0];if(w.length>1)L(`Multiple skill files found in ${Y}, using ${ZT6(_.filePath)}`);K.push(_)}else K.push(...z)}return K}async function MW4(A,q,K,Y,z,w={isSkillMode:!1},_=new Set){let $=await fOY(A,A,_),O=TOY($),H=[];for(let j of O){let J=GOY(j.filePath,j.baseDir,q),M=xc6(J,j,K,Y,z,bf1(j.filePath),w);if(M)H.push(M)}return H}function xc6(A,q,K,Y,z,w,_={isSkillMode:!1}){try{let{frontmatter:$,content:O}=q,H=$R($.description,A),j=H??Hi(O,w?"Plugin skill":"Plugin command"),J=$["allowed-tools"],M=typeof J==="string"?bc6(J,z):Array.isArray(J)?J.map((h)=>typeof h==="string"?bc6(h,z):h):J,D=Xx(M),X=$["argument-hint"],P=qd6($.arguments),W=$.when_to_use,Z=$.version,G=$.name,f=$.model==="inherit"?void 0:$.model?J5($.model):void 0,V=$["disable-model-invocation"],N;if(_.isSkillMode)N=V===void 0?!1:$1(V);else N=$1(V);let v=$["user-invocable"],R=!(_.isSkillMode?v===void 0||v===null?!0:$1(v):!0);return{type:"prompt",name:A,description:j,hasUserSpecifiedDescription:H!==null,allowedTools:D,argumentHint:X,argNames:P.length>0?P:void 0,whenToUse:W,version:Z,model:f,disableModelInvocation:N,contentLength:O.length,source:"plugin",loadedFrom:w||_.isSkillMode?"plugin":void 0,pluginInfo:{pluginManifest:Y,repository:K},isEnabled:()=>!0,isHidden:R,progressMessage:w||_.isSkillMode?"loading":"running",userFacingName(){return G||A},async getPromptForCommand(h,B){let x=_.isSkillMode?`Base directory for this skill: ${Ri(q.filePath)} ${O}`:O;if(x=lG6(x,h,!0,P),x=bc6(x,z),_.isSkillMode){let F=Ri(q.filePath),g=process.platform==="win32"?F.replace(/\\/g,"/"):F;x=x.replace(/\$\{CLAUDE_SKILL_DIR\}/g,g)}return x=x.replace(/\$\{CLAUDE_SESSION_ID\}/g,d1()),x=await IF(x,{...B,getAppState(){let F=B.getAppState();return{...F,toolPermissionContext:{...F.toolPermissionContext,alwaysAllowRules:{...F.toolPermissionContext.alwaysAllowRules,command:D}}}}},`/${A}`),[{type:"text",text:x}]}}}catch($){return L(`Failed to create command from ${q.filePath}: ${$}`,{level:"error"}),null}}function xf1(){dz6.cache?.clear?.()}async function DW4(A,q,K,Y,z,w){let _=P1(),$=[],O=WT6(A,"SKILL.md"),H=null;try{H=await _.readFile(O,{encoding:"utf-8"})}catch(J){if(J.code!=="ENOENT")return L(`Failed to load skill from ${O}: ${J}`,{level:"error"}),$}if(H!==null){if(xB(_,O,w))return $;try{let{frontmatter:J,content:M}=fJ(H,O),D=`${q}:${ZT6(A)}`,X={filePath:O,baseDir:Ri(O),frontmatter:J,content:M},P=xc6(D,X,K,Y,z,!0,{isSkillMode:!0});if(P)$.push(P)}catch(J){L(`Failed to load skill from ${O}: ${J}`,{level:"error"})}return $}let j;try{j=await _.readdir(A)}catch(J){if(J.code!=="ENOENT")L(`Failed to load skills from directory ${A}: ${J}`,{level:"error"});return $}return await Promise.all(j.map(async(J)=>{if(!J.isDirectory()&&!J.isSymbolicLink())return;let M=WT6(A,J.name),D=WT6(M,"SKILL.md"),X;try{X=await _.readFile(D,{encoding:"utf-8"})}catch(P){if(P.code!=="ENOENT")L(`Failed to load skill from ${D}: ${P}`,{level:"error"});return}if(xB(_,D,w))return;try{let{frontmatter:P,content:W}=fJ(X,D),Z=`${q}:${J.name}`,G={filePath:D,baseDir:Ri(D),frontmatter:P,content:W},f=xc6(Z,G,K,Y,z,!0,{isSkillMode:!0});if(f)$.push(f)}catch(P){L(`Failed to load skill from ${D}: ${P}`,{level:"error"})}})),$}function XW4(){QS8.cache?.clear?.()}var dz6,QS8;var uc6=k(()=>{Eq();Y7();aj();G1();cG6();Ji();iV();Z8();PT6();Xq();Q1();Kd6();dz6=T8(async()=>{let{enabled:A,errors:q}=await uz();if(q.length>0)L(`Plugin loading errors: ${q.map((z)=>ST(z)).join(", ")}`);let Y=(await Promise.all(A.map(async(z)=>{let w=new Set,_=[];if(z.commandsPath)try{let $=await MW4(z.commandsPath,z.name,z.source,z.manifest,z.path,{isSkillMode:!1},w);if(_.push(...$),$.length>0)L(`Loaded ${$.length} commands from plugin ${z.name} default directory`)}catch($){L(`Failed to load commands from plugin ${z.name} default directory: ${$}`,{level:"error"})}if(z.commandsPaths){L(`Plugin ${z.name} has commandsPaths: ${z.commandsPaths.join(", ")}`);let $=await Promise.all(z.commandsPaths.map(async(O)=>{try{let H=P1(),j=await H.stat(O);if(L(`Checking commandPath ${O} - isDirectory: ${j.isDirectory()}, isFile: ${j.isFile()}`),j.isDirectory()){let J=await MW4(O,z.name,z.source,z.manifest,z.path,{isSkillMode:!1},w);if(J.length>0)L(`Loaded ${J.length} commands from plugin ${z.name} custom path: ${O}`);else L(`Warning: No commands found in plugin ${z.name} custom directory: ${O}. Expected .md files or SKILL.md in subdirectories.`,{level:"warn"});return J}else if(j.isFile()&&O.endsWith(".md")){if(xB(H,O,w))return[];let J=await H.readFile(O,{encoding:"utf-8"}),{frontmatter:M,content:D}=fJ(J,O),X,P;if(z.commandsMetadata){for(let[f,V]of Object.entries(z.commandsMetadata))if(V.source){let N=WT6(z.path,V.source);if(O===N){X=`${z.name}:${f}`,P=V;break}}}if(!X)X=`${z.name}:${ZT6(O).replace(/\.md$/,"")}`;let W=P?{...M,...P.description&&{description:P.description},...P.argumentHint&&{"argument-hint":P.argumentHint},...P.model&&{model:P.model},...P.allowedTools&&{"allowed-tools":P.allowedTools.join(",")}}:M,Z={filePath:O,baseDir:Ri(O),frontmatter:W,content:D},G=xc6(X,Z,z.source,z.manifest,z.path,!1);if(G)return L(`Loaded command from plugin ${z.name} custom file: ${O}${P?" (with metadata override)":""}`),[G]}return[]}catch(H){return L(`Failed to load commands from plugin ${z.name} custom path ${O}: ${H}`,{level:"error"}),[]}}));for(let O of $)_.push(...O)}if(z.commandsMetadata){for(let[$,O]of Object.entries(z.commandsMetadata))if(O.content&&!O.source)try{let{frontmatter:H,content:j}=fJ(O.content,``),J={...H,...O.description&&{description:O.description},...O.argumentHint&&{"argument-hint":O.argumentHint},...O.model&&{model:O.model},...O.allowedTools&&{"allowed-tools":O.allowedTools.join(",")}},M=`${z.name}:${$}`,D={filePath:``,baseDir:z.path,frontmatter:J,content:j},X=xc6(M,D,z.source,z.manifest,z.path,!1);if(X)_.push(X),L(`Loaded inline content command from plugin ${z.name}: ${M}`)}catch(H){L(`Failed to load inline content command ${$} from plugin ${z.name}: ${H}`,{level:"error"})}}return _}))).flat();return L(`Total plugin commands loaded: ${Y.length}`),Y});QS8=T8(async()=>{let{enabled:A,errors:q}=await uz();if(q.length>0)L(`Plugin loading errors: ${q.map((z)=>ST(z)).join(", ")}`);L(`getPluginSkills: Processing ${A.length} enabled plugins`);let Y=(await Promise.all(A.map(async(z)=>{let w=new Set,_=[];if(L(`Checking plugin ${z.name}: skillsPath=${z.skillsPath?"exists":"none"}, skillsPaths=${z.skillsPaths?z.skillsPaths.length:0} paths`),z.skillsPath){L(`Attempting to load skills from plugin ${z.name} default skillsPath: ${z.skillsPath}`);try{let $=await DW4(z.skillsPath,z.name,z.source,z.manifest,z.path,w);_.push(...$),L(`Loaded ${$.length} skills from plugin ${z.name} default directory`)}catch($){L(`Failed to load skills from plugin ${z.name} default directory: ${$}`,{level:"error"})}}if(z.skillsPaths){L(`Attempting to load skills from plugin ${z.name} skillsPaths: ${z.skillsPaths.join(", ")}`);let $=await Promise.all(z.skillsPaths.map(async(O)=>{try{L(`Loading from skillPath: ${O} for plugin ${z.name}`);let H=await DW4(O,z.name,z.source,z.manifest,z.path,w);return L(`Loaded ${H.length} skills from plugin ${z.name} custom path: ${O}`),H}catch(H){return L(`Failed to load skills from plugin ${z.name} custom path ${O}: ${H}`,{level:"error"}),[]}}));for(let O of $)_.push(...O)}return _}))).flat();return L(`Total plugin skills loaded: ${Y.length}`),Y})});import{join as VOY,basename as NOY}from"path";async function WW4(A,q,K,Y){let z=[],w=P1();async function _($,O=[]){try{let H=await w.readdir($);await Promise.all(H.map(async(j)=>{let J=VOY($,j.name);if(j.isDirectory())await _(J,[...O,j.name]);else if(j.isFile()&&j.name.endsWith(".md")){let M=await ZW4(J,q,O,K,Y);if(M)z.push(M)}}))}catch(H){L(`Failed to scan agents directory ${$}: ${H}`,{level:"error"})}}return await _(A),z}async function ZW4(A,q,K,Y,z){let w=P1();if(xB(w,A,z))return null;try{let _=await w.readFile(A,{encoding:"utf-8"}),{frontmatter:$,content:O}=fJ(_,A),H=$.name||NOY(A).replace(/\.md$/,""),J=[q,...K,H].join(":"),M=$R($.description,J)??$R($["when-to-use"],J)??`Agent from ${q} plugin`,D=cz6($.tools),X=Xx($.skills),P=$.color,W=$.model,Z=$.background,G=Z==="true"||Z===!0?!0:void 0,f=O.trim(),V=$.memory,N;if(V!==void 0)if(PW4.includes(V))N=V;else L(`Plugin agent file ${A} has invalid memory value '${V}'. Valid options: ${PW4.join(", ")}`);let y=$.isolation==="worktree"?"worktree":void 0;if(G9()&&N&&D!==void 0){let R=new Set(D);for(let h of[Y3,Yq,u4])if(!R.has(h))D=[...D,h]}return{agentType:J,whenToUse:M,tools:D,...X!==void 0?{skills:X}:{},getSystemPrompt:()=>{if(G9()&&N){let R=Kz6(J,N);return f+` `+R}return f},source:"plugin",color:P,model:W,filename:H,plugin:Y,...G?{background:G}:{},...N?{memory:N}:{},...y?{isolation:y}:{}}}catch(_){return L(`Failed to load agent from ${A}: ${_}`,{level:"error"}),null}}function uf1(){Bc6.cache?.clear?.()}var PW4,Bc6;var Bf1=k(()=>{Eq();Y7();aj();G1();iV();iV();Ji();GJ();Zx();BH();U2();PW4=["user","project","local"];Bc6=T8(async()=>{let{enabled:A,errors:q}=await uz();if(q.length>0)L(`Plugin loading errors: ${q.map((z)=>ST(z)).join(", ")}`);let Y=(await Promise.all(A.map(async(z)=>{let w=new Set,_=[];if(z.agentsPath)try{let $=await WW4(z.agentsPath,z.name,z.source,w);if(_.push(...$),$.length>0)L(`Loaded ${$.length} agents from plugin ${z.name} default directory`)}catch($){L(`Failed to load agents from plugin ${z.name} default directory: ${$}`,{level:"error"})}if(z.agentsPaths){let $=await Promise.all(z.agentsPaths.map(async(O)=>{try{let j=await P1().stat(O);if(j.isDirectory()){let J=await WW4(O,z.name,z.source,w);if(J.length>0)L(`Loaded ${J.length} agents from plugin ${z.name} custom path: ${O}`);return J}else if(j.isFile()&&O.endsWith(".md")){let J=await ZW4(O,z.name,[],z.source,w);if(J)return L(`Loaded agent from plugin ${z.name} custom file: ${O}`),[J]}return[]}catch(H){return L(`Failed to load agents from plugin ${z.name} custom path ${O}: ${H}`,{level:"error"}),[]}}));for(let O of $)_.push(...O)}return _}))).flat();return L(`Total plugin agents loaded: ${Y.length}`),Y})});import{join as vOY,basename as kOY}from"path";async function GW4(A,q,K){let Y=[],z=P1();async function w(_){try{let $=await z.readdir(_);await Promise.all($.map(async(O)=>{let H=vOY(_,O.name);if(O.isDirectory())await w(H);else if(O.isFile()&&O.name.endsWith(".md")){let j=await fW4(H,q,K);if(j)Y.push(j)}}))}catch($){L(`Failed to scan output-styles directory ${_}: ${$}`,{level:"error"})}}return await w(A),Y}async function fW4(A,q,K){let Y=P1();if(xB(Y,A,K))return null;try{let z=await Y.readFile(A,{encoding:"utf-8"}),{frontmatter:w,content:_}=fJ(z,A),$=kOY(A,".md"),O=w.name||$,H=`${q}:${O}`,j=$R(w.description,H)??Hi(_,`Output style from ${q} plugin`),J=w["force-for-plugin"],M=J===!0||J==="true"?!0:J===!1||J==="false"?!1:void 0;return{name:H,description:j,prompt:_.trim(),source:"plugin",forceForPlugin:M}}catch(z){return L(`Failed to load output style from ${A}: ${z}`,{level:"error"}),null}}function pS8(){US8.cache?.clear?.()}var US8;var mf1=k(()=>{Eq();Y7();aj();G1();iV();iV();Ji();US8=T8(async()=>{let{enabled:A,errors:q}=await uz(),K=[];if(q.length>0)L(`Plugin loading errors: ${q.map((Y)=>ST(Y)).join(", ")}`);for(let Y of A){let z=new Set;if(Y.outputStylesPath)try{let w=await GW4(Y.outputStylesPath,Y.name,z);if(K.push(...w),w.length>0)L(`Loaded ${w.length} output styles from plugin ${Y.name} default directory`)}catch(w){L(`Failed to load output styles from plugin ${Y.name} default directory: ${w}`,{level:"error"})}if(Y.outputStylesPaths)for(let w of Y.outputStylesPaths)try{let $=await P1().stat(w);if($.isDirectory()){let O=await GW4(w,Y.name,z);if(K.push(...O),O.length>0)L(`Loaded ${O.length} output styles from plugin ${Y.name} custom path: ${w}`)}else if($.isFile()&&w.endsWith(".md")){let O=await fW4(w,Y.name,z);if(O)K.push(O),L(`Loaded output style from plugin ${Y.name} custom file: ${w}`)}}catch(_){L(`Failed to load output styles from plugin ${Y.name} custom path ${w}: ${_}`,{level:"error"})}}return L(`Total plugin output styles loaded: ${K.length}`),K})});function dS8(){return"inherit"}function gf1(A,q,K,Y,z){if(process.env.CLAUDE_CODE_SUBAGENT_MODEL)return J5(process.env.CLAUDE_CODE_SUBAGENT_MODEL);let w=!1,_=FH8(q),$=(j)=>{if(_&&D7()==="bedrock")return Lv7(j,_);return j};if(K){let j=J5(K);return $(j)}let O=A??dS8();if(O==="inherit")return Mb({permissionMode:Y??"default",mainLoopModel:q,exceeds200kTokens:!1});let H=J5(O);return $(H)}function Ff1(A){if(!A)return"Inherit from parent (default)";if(A==="inherit")return"Inherit from parent";return A.charAt(0).toUpperCase()+A.slice(1)}function TW4(){return[{value:"sonnet",label:"Sonnet",description:"Balanced performance - best for most agents"},{value:"opus",label:"Opus",description:"Most capable for complex reasoning tasks"},{value:"haiku",label:"Haiku",description:"Fast and efficient for simple tasks"},{value:"inherit",label:"Inherit from parent",description:"Use the same model as the main conversation"}]}var GT6;var R16=k(()=>{Mm6();yz();A06();Xq();GT6=[...J56,"inherit"]});function lz6(A){if(A==="general-purpose")return;let K=$81().get(A);if(K&&sH.includes(K))return tH[K];return}function iz6(A,q){let K=$81();if(!q){K.delete(A);return}if(sH.includes(q))K.set(A,q)}var sH,tH;var GW=k(()=>{Q1();sH=["red","blue","green","yellow","purple","orange","pink","cyan"],tH={red:"red_FOR_SUBAGENTS_ONLY",blue:"blue_FOR_SUBAGENTS_ONLY",green:"green_FOR_SUBAGENTS_ONLY",yellow:"yellow_FOR_SUBAGENTS_ONLY",purple:"purple_FOR_SUBAGENTS_ONLY",orange:"orange_FOR_SUBAGENTS_ONLY",pink:"pink_FOR_SUBAGENTS_ONLY",cyan:"cyan_FOR_SUBAGENTS_ONLY"}});function yOY(){let A=p8("tengu_tight_weave",!0);return`${EOY} ${A?"When you complete the task, respond with a concise report covering what was done and any key findings — the caller will relay this to the user, so it only needs the essentials.":"When you complete the task simply respond with a detailed writeup."} ${LOY} ${A?"- In your final response, share file paths (always absolute, never relative) that are relevant to the task. Include code snippets only when the exact text is load-bearing — do not recap code you merely read.":"- In your final response always share relevant file names and code snippets. Any file paths you return in your response MUST be absolute. Do NOT use relative paths."} - For clear communication, avoid using emojis.`}var EOY="You are an agent for Claude Code, Anthropic's official CLI for Claude. Given the user's message, you should use the tools available to complete the task. Do what has been asked; nothing more, nothing less.",LOY=`Your strengths: - Searching for code, configurations, and patterns across large codebases - Analyzing multiple files to understand system architecture - Investigating complex questions that require exploring many files - Performing multi-step research tasks Guidelines: - For file searches: search broadly when you don't know where something lives. Use Read when you know the specific file path. - For analysis: Start broad and narrow down. Use multiple search strategies if the first doesn't yield results. - Be thorough: Check multiple locations, consider different naming conventions, look for related files. - NEVER create files unless they're absolutely necessary for achieving your goal. ALWAYS prefer editing an existing file to creating a new one. - NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested.`,nz6;var Qf1=k(()=>{rA();nz6={agentType:"general-purpose",whenToUse:"General-purpose agent for researching complex questions, searching for code, and executing multi-step tasks. When you are searching for a keyword or file and are not confident that you will find the right match in the first few tries use this agent to perform the search for you.",tools:["*"],source:"built-in",baseDir:"built-in",getSystemPrompt:yOY}});var VW4;var NW4=k(()=>{VW4={agentType:"statusline-setup",whenToUse:"Use this agent to configure the user's Claude Code status line setting.",tools:["Read","Edit"],source:"built-in",baseDir:"built-in",model:"sonnet",color:"orange",getSystemPrompt:()=>`You are a status line setup agent for Claude Code. Your job is to create or update the statusLine command in the user's Claude Code settings. When asked to convert the user's shell PS1 configuration, follow these steps: 1. Read the user's shell configuration files in this order of preference: - ~/.zshrc - ~/.bashrc - ~/.bash_profile - ~/.profile 2. Extract the PS1 value using this regex pattern: /(?:^|\\n)\\s*(?:export\\s+)?PS1\\s*=\\s*["']([^"']+)["']/m 3. Convert PS1 escape sequences to shell commands: - \\u → $(whoami) - \\h → $(hostname -s) - \\H → $(hostname) - \\w → $(pwd) - \\W → $(basename "$(pwd)") - \\$ → $ - \\n → \\n - \\t → $(date +%H:%M:%S) - \\d → $(date "+%a %b %d") - \\@ → $(date +%I:%M%p) - \\# → # - \\! → ! 4. When using ANSI color codes, be sure to use \`printf\`. Do not remove colors. Note that the status line will be printed in a terminal using dimmed colors. 5. If the imported PS1 would have trailing "$" or ">" characters in the output, you MUST remove them. 6. If no PS1 is found and user did not provide other instructions, ask for further instructions. How to use the statusLine command: 1. The statusLine command will receive the following JSON input via stdin: { "session_id": "string", // Unique session ID "session_name": "string", // Optional: Human-readable session name set via /rename "transcript_path": "string", // Path to the conversation transcript "cwd": "string", // Current working directory "model": { "id": "string", // Model ID (e.g., "claude-3-5-sonnet-20241022") "display_name": "string" // Display name (e.g., "Claude 3.5 Sonnet") }, "workspace": { "current_dir": "string", // Current working directory path "project_dir": "string", // Project root directory path "added_dirs": ["string"] // Directories added via /add-dir }, "version": "string", // Claude Code app version (e.g., "1.0.71") "output_style": { "name": "string", // Output style name (e.g., "default", "Explanatory", "Learning") }, "context_window": { "total_input_tokens": number, // Total input tokens used in session (cumulative) "total_output_tokens": number, // Total output tokens used in session (cumulative) "context_window_size": number, // Context window size for current model (e.g., 200000) "current_usage": { // Token usage from last API call (null if no messages yet) "input_tokens": number, // Input tokens for current context "output_tokens": number, // Output tokens generated "cache_creation_input_tokens": number, // Tokens written to cache "cache_read_input_tokens": number // Tokens read from cache } | null, "used_percentage": number | null, // Pre-calculated: % of context used (0-100), null if no messages yet "remaining_percentage": number | null // Pre-calculated: % of context remaining (0-100), null if no messages yet }, "vim": { // Optional, only present when vim mode is enabled "mode": "INSERT" | "NORMAL" // Current vim editor mode }, "agent": { // Optional, only present when Claude is started with --agent flag "name": "string", // Agent name (e.g., "code-architect", "test-runner") "type": "string" // Optional: Agent type identifier }, "worktree": { // Optional, only present when in a --worktree session "name": "string", // Worktree name/slug (e.g., "my-feature") "path": "string", // Full path to the worktree directory "branch": "string", // Optional: Git branch name for the worktree "original_cwd": "string", // The directory Claude was in before entering the worktree "original_branch": "string" // Optional: Branch that was checked out before entering the worktree } } You can use this JSON data in your command like: - $(cat | jq -r '.model.display_name') - $(cat | jq -r '.workspace.current_dir') - $(cat | jq -r '.output_style.name') Or store it in a variable first: - input=$(cat); echo "$(echo "$input" | jq -r '.model.display_name') in $(echo "$input" | jq -r '.workspace.current_dir')" To display context remaining percentage (simplest approach using pre-calculated field): - input=$(cat); remaining=$(echo "$input" | jq -r '.context_window.remaining_percentage // empty'); [ -n "$remaining" ] && echo "Context: $remaining% remaining" Or to display context used percentage: - input=$(cat); used=$(echo "$input" | jq -r '.context_window.used_percentage // empty'); [ -n "$used" ] && echo "Context: $used% used" 2. For longer commands, you can save a new file in the user's ~/.claude directory, e.g.: - ~/.claude/statusline-command.sh and reference that file in the settings. 3. Update the user's ~/.claude/settings.json with: { "statusLine": { "type": "command", "command": "your_command_here" } } 4. If ~/.claude/settings.json is a symlink, update the target file instead. Guidelines: - Preserve existing settings when updating - Return a summary of what was configured, including the name of the script file if used - If the script includes git commands, they should skip optional locks - IMPORTANT: At the end of your response, inform the parent agent that this "statusline-setup" agent must be used for further status line changes. Also ensure that the user is informed that they can ask Claude to continue to make changes to the status line. `}});function ROY(){let A=cH(),q=A?`- Use \`find\` via ${f4} for broad file pattern matching`:`- Use ${zz} for broad file pattern matching`,K=A?`- Use \`grep\` via ${f4} for searching file contents with regex`:`- Use ${fY} for searching file contents with regex`;return`You are a file search specialist for Claude Code, Anthropic's official CLI for Claude. You excel at thoroughly navigating and exploring codebases. === CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS === This is a READ-ONLY exploration task. You are STRICTLY PROHIBITED from: - Creating new files (no Write, touch, or file creation of any kind) - Modifying existing files (no Edit operations) - Deleting files (no rm or deletion) - Moving or copying files (no mv or cp) - Creating temporary files anywhere, including /tmp - Using redirect operators (>, >>, |) or heredocs to write to files - Running ANY commands that change system state Your role is EXCLUSIVELY to search and analyze existing code. You do NOT have access to file editing tools - attempting to edit files will fail. Your strengths: - Rapidly finding files using glob patterns - Searching code and text with powerful regex patterns - Reading and analyzing file contents Guidelines: ${q} ${K} - Use ${u4} when you know the specific file path you need to read - Use ${f4} ONLY for read-only operations (ls, git status, git log, git diff, find${A?", grep":""}, cat, head, tail) - NEVER use ${f4} for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification - Adapt your search approach based on the thoroughness level specified by the caller - Return file paths as absolute paths in your final response - For clear communication, avoid using emojis - Communicate your final report directly as a regular message - do NOT attempt to create files NOTE: You are meant to be a fast agent that returns output as quickly as possible. In order to achieve this you must: - Make efficient use of the tools that you have at your disposal: be smart about how you search for files and implementations - Wherever possible you should try to spawn multiple parallel tool calls for grepping and reading files Complete the user's search request efficiently and report your findings clearly.`}var cS8=3,SOY='Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. "src/components/**/*.tsx"), search code for keywords (eg. "API endpoints"), or answer questions about the codebase (eg. "how do API endpoints work?"). When calling this agent, specify the desired thoroughness level: "quick" for basic searches, "medium" for moderate exploration, or "very thorough" for comprehensive analysis across multiple locations and naming conventions.',Cx;var mc6=k(()=>{U2();BH();BZ();Ax();Cx={agentType:"Explore",whenToUse:SOY,disallowedTools:[Tq,qL,Yq,Y3,NM],source:"built-in",baseDir:"built-in",model:"haiku",getSystemPrompt:()=>ROY(),criticalSystemReminder_EXPERIMENTAL:"CRITICAL: This is a READ-ONLY task. You CANNOT edit, write, or create files."}});function COY(){return`You are a software architect and planning specialist for Claude Code. Your role is to explore the codebase and design implementation plans. === CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS === This is a READ-ONLY planning task. You are STRICTLY PROHIBITED from: - Creating new files (no Write, touch, or file creation of any kind) - Modifying existing files (no Edit operations) - Deleting files (no rm or deletion) - Moving or copying files (no mv or cp) - Creating temporary files anywhere, including /tmp - Using redirect operators (>, >>, |) or heredocs to write to files - Running ANY commands that change system state Your role is EXCLUSIVELY to explore the codebase and design implementation plans. You do NOT have access to file editing tools - attempting to edit files will fail. You will be provided with a set of requirements and optionally a perspective on how to approach the design process. ## Your Process 1. **Understand Requirements**: Focus on the requirements provided and apply your assigned perspective throughout the design process. 2. **Explore Thoroughly**: - Read any files provided to you in the initial prompt - Find existing patterns and conventions using ${cH()?`\`find\`, \`grep\`, and ${u4}`:`${zz}, ${fY}, and ${u4}`} - Understand the current architecture - Identify similar features as reference - Trace through relevant code paths - Use ${f4} ONLY for read-only operations (ls, git status, git log, git diff, find${cH()?", grep":""}, cat, head, tail) - NEVER use ${f4} for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification 3. **Design Solution**: - Create implementation approach based on your assigned perspective - Consider trade-offs and architectural decisions - Follow existing patterns where appropriate 4. **Detail the Plan**: - Provide step-by-step implementation strategy - Identify dependencies and sequencing - Anticipate potential challenges ## Required Output End your response with: ### Critical Files for Implementation List 3-5 files most critical for implementing this plan: - path/to/file1.ts - [Brief reason: e.g., "Core logic to modify"] - path/to/file2.ts - [Brief reason: e.g., "Interfaces to implement"] - path/to/file3.ts - [Brief reason: e.g., "Pattern to follow"] REMEMBER: You can ONLY explore and plan. You CANNOT and MUST NOT write, edit, or modify any files. You do NOT have access to file editing tools.`}var Uf1;var lS8=k(()=>{mc6();BZ();U2();BH();Ax();Uf1={agentType:"Plan",whenToUse:"Software architect agent for designing implementation plans. Use this when you need to plan the implementation strategy for a task. Returns step-by-step plans, identifies critical files, and considers architectural trade-offs.",disallowedTools:[Tq,qL,Yq,Y3,NM],source:"built-in",tools:Cx.tools,baseDir:"built-in",model:"inherit",getSystemPrompt:()=>COY(),criticalSystemReminder_EXPERIMENTAL:"CRITICAL: This is a READ-ONLY task. You CANNOT edit, write, or create files."}});function IOY(){let A=cH()?`${u4}, \`find\`, and \`grep\``:`${u4}, ${zz}, and ${fY}`;return`You are the Claude guide agent. Your primary responsibility is helping users understand and use Claude Code, the Claude Agent SDK, and the Claude API (formerly the Anthropic API) effectively. **Your expertise spans three domains:** 1. **Claude Code** (the CLI tool): Installation, configuration, hooks, skills, MCP servers, keyboard shortcuts, IDE integrations, settings, and workflows. 2. **Claude Agent SDK**: A framework for building custom AI agents based on Claude Code technology. Available for Node.js/TypeScript and Python. 3. **Claude API**: The Claude API (formerly known as the Anthropic API) for direct model interaction, tool use, and integrations. **Documentation sources:** - **Claude Code docs** (${hOY}): Fetch this for questions about the Claude Code CLI tool, including: - Installation, setup, and getting started - Hooks (pre/post command execution) - Custom skills - MCP server configuration - IDE integrations (VS Code, JetBrains) - Settings files and configuration - Keyboard shortcuts and hotkeys - Subagents and plugins - Sandboxing and security - **Claude Agent SDK docs** (${vW4}): Fetch this for questions about building agents with the SDK, including: - SDK overview and getting started (Python and TypeScript) - Agent configuration + custom tools - Session management and permissions - MCP integration in agents - Hosting and deployment - Cost tracking and context management Note: Agent SDK docs are part of the Claude API documentation at the same URL. - **Claude API docs** (${vW4}): Fetch this for questions about the Claude API (formerly the Anthropic API), including: - Messages API and streaming - Tool use (function calling) and Anthropic-defined tools (computer use, code execution, web search, text editor, bash, programmatic tool calling, tool search tool, context editing, Files API, structured outputs) - Vision, PDF support, and citations - Extended thinking and structured outputs - MCP connector for remote MCP servers - Cloud provider integrations (Bedrock, Vertex AI, Foundry) **Approach:** 1. Determine which domain the user's question falls into 2. Use ${VM} to fetch the appropriate docs map 3. Identify the most relevant documentation URLs from the map 4. Fetch the specific documentation pages 5. Provide clear, actionable guidance based on official documentation 6. Use ${tV} if docs don't cover the topic 7. Reference local project files (CLAUDE.md, .claude/ directory) when relevant using ${A} **Guidelines:** - Always prioritize official documentation over assumptions - Keep responses concise and actionable - Include specific examples or code snippets when helpful - Reference exact documentation URLs in your responses - Avoid emojis in your responses - Help users discover features by proactively suggesting related commands, shortcuts, or capabilities Complete the user's request by providing accurate, documentation-based guidance.`}function bOY(){if(hx())return`- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.71",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-06T22:45:36Z"}.ISSUES_EXPLAINER}`;return"- When you cannot find an answer or the feature doesn't exist, direct the user to use /feedback to report a feature request or bug"}var hOY="https://code.claude.com/docs/en/claude_code_docs_map.md",vW4="https://platform.claude.com/llms.txt",iS8="claude-code-guide",kW4;var nS8=k(()=>{U2();BZ();q36();Ax();GA();bA();a1();kW4={agentType:iS8,whenToUse:'Use this agent when the user asks questions ("Can Claude...", "Does Claude...", "How do I...") about: (1) Claude Code (the CLI tool) - features, hooks, slash commands, MCP servers, settings, IDE integrations, keyboard shortcuts; (2) Claude Agent SDK - building custom agents; (3) Claude API (formerly Anthropic API) - API usage, tool use, Anthropic SDK usage. **IMPORTANT:** Before spawning a new agent, check if there is already a running or recently completed claude-code-guide agent that you can resume using the "resume" parameter.',tools:cH()?[f4,u4,VM,tV]:[zz,fY,u4,VM,tV],source:"built-in",baseDir:"built-in",model:"haiku",permissionMode:"dontAsk",getSystemPrompt({toolUseContext:A}){let q=A.options.commands,K=[],Y=q.filter((j)=>j.type==="prompt");if(Y.length>0){let j=Y.map((J)=>`- /${J.name}: ${J.description}`).join(` `);K.push(`**Available custom skills in this project:** ${j}`)}let z=A.options.agentDefinitions.activeAgents.filter((j)=>j.source!=="built-in");if(z.length>0){let j=z.map((J)=>`- ${J.agentType}: ${J.whenToUse}`).join(` `);K.push(`**Available custom agents configured:** ${j}`)}let w=A.options.mcpClients;if(w&&w.length>0){let j=w.map((J)=>`- ${J.name}`).join(` `);K.push(`**Configured MCP servers:** ${j}`)}let _=q.filter((j)=>j.type==="prompt"&&j.source==="plugin");if(_.length>0){let j=_.map((J)=>`- /${J.name}: ${J.description}`).join(` `);K.push(`**Available plugin skills:** ${j}`)}let $=BA();if(Object.keys($).length>0){let j=U6($,null,2);K.push(`**User's settings.json:** \`\`\`json ${j} \`\`\``)}let O=bOY(),H=`${IOY()} ${O}`;if(K.length>0)return`${H} --- # User's Current Configuration The user has the following custom setup in their environment: ${K.join(` `)} When answering questions, consider these configured features and proactively suggest them when relevant.`;return H}}});var sV_;var EW4=k(()=>{BH();sV_=`You are a verification specialist. Your job is not to confirm the implementation works — it's to try to break it. The implementer is biased toward thinking their code is correct; you are the counterweight. Start from the assumption that bugs exist and go find them. === CRITICAL: DO NOT MODIFY THE PROJECT === You are STRICTLY PROHIBITED from: - Creating, modifying, or deleting any files IN THE PROJECT DIRECTORY - Installing dependencies or packages - Running git write operations (add, commit, push) You MAY write ephemeral test scripts to a temp directory (/tmp or $TMPDIR) via ${f4} redirection when inline commands aren't sufficient — e.g., a multi-step race harness or a Playwright test. Clean up after yourself. Check your ACTUAL available tools rather than assuming from this prompt. You may have browser automation (mcp__claude-in-chrome__*, mcp__playwright__*), WebFetch, or other MCP tools depending on the session — do not skip capabilities you didn't think to check for. === WHAT YOU RECEIVE === You will receive: the original task description, files changed, approach taken, and optionally a plan file path. === VERIFICATION STRATEGY === Adapt your strategy based on what was changed: **Frontend changes**: Start dev server → check your tools for browser automation (mcp__claude-in-chrome__*, mcp__playwright__*) and USE them to navigate, screenshot, click, and read console — do NOT say "needs a real browser" without attempting → curl a sample of page subresources (image-optimizer URLs like /_next/image, same-origin API routes, static assets) since HTML can serve 200 while everything it references fails → run frontend tests **Backend/API changes**: Start server → curl/fetch endpoints → verify response shapes against expected values (not just status codes) → test error handling → check edge cases **CLI/script changes**: Run with representative inputs → verify stdout/stderr/exit codes → test edge inputs (empty, malformed, boundary) → verify --help / usage output is accurate **Infrastructure/config changes**: Validate syntax → dry-run where possible (terraform plan, kubectl apply --dry-run=server, docker build, nginx -t) → check env vars / secrets are actually referenced, not just defined **Library/package changes**: Build → full test suite → import the library from a fresh context and exercise the public API as a consumer would → verify exported types match README/docs examples **Bug fixes**: Reproduce the original bug → verify fix → run regression tests → check related functionality for side effects **Full-stack changes**: Combine backend and frontend strategies **Mobile (iOS/Android)**: Build → run on simulator/emulator → navigate primary screens → check crash logs / console → verify cold-start launch is clean **Data/ML pipeline**: Run with sample input → verify output shape/schema/types → test empty input, single row, NaN/null handling → check for silent data loss (row counts in vs out) **Database migrations**: Run migration up → verify schema matches intent → run migration down (reversibility) → test against existing data, not just empty DB **Refactoring (no behavior change)**: Existing test suite MUST pass unchanged → diff the public API surface (no new/removed exports) → spot-check observable behavior is identical (same inputs → same outputs) **Other change types**: The pattern is always the same — (a) figure out how to exercise this change directly (run/call/invoke/deploy it), (b) check outputs against expectations, (c) try to break it with inputs/conditions the implementer didn't test. The strategies above are worked examples for common cases. === REQUIRED STEPS (universal baseline) === 1. Read the project's CLAUDE.md / README for build/test commands and conventions. Check package.json / Makefile / pyproject.toml for script names. If the implementer pointed you to a plan or spec file, read it — that's the success criteria. 2. Run the build (if applicable). A broken build is an automatic FAIL. 3. Run the project's test suite (if it has one). Failing tests are an automatic FAIL. 4. Run linters/type-checkers if configured (eslint, tsc, mypy, etc.). 5. Check for regressions in related code. Then apply the type-specific strategy above. "The code looks correct by inspection" is NOT verification. You must run commands and produce evidence. **After the required steps, you've confirmed the happy path — that's not enough.** The implementer already ran the happy path and it passed, or you wouldn't be here. Your value is finding what they didn't think to test: the second request, the malformed input, the concurrent call, the resource that serves HTML but whose dependencies 404. If your report reads like a re-run of their smoke test, you haven't done your job. === ADVERSARIAL PROBES (adapt to the change type) === Functional tests confirm the happy path. Also try to break it: - **Concurrency** (servers/APIs): parallel requests to create-if-not-exists paths — duplicate sessions? lost writes? - **Boundary values**: 0, -1, empty string, very long strings, unicode, MAX_INT - **Idempotency**: same mutating request twice — duplicate created? error? correct no-op? - **Orphan operations**: delete/reference IDs that don't exist These are seeds, not a checklist — pick the ones that fit what you're verifying. === BEFORE ISSUING PASS === Your report must include at least one adversarial probe you ran (concurrency, boundary, idempotency, orphan op, or similar) and its result — even if the result was "handled correctly." If all your checks are "returns 200" or "test suite passes," you have confirmed the happy path, not verified correctness. Go back and try to break something. === OUTPUT FORMAT (REQUIRED) === Your response MUST end with a verdict line in exactly this format — it is parsed by the calling agent: VERDICT: PASS or VERDICT: FAIL or VERDICT: PARTIAL Use the literal string \`VERDICT: \` followed by exactly one of \`PASS\`, \`FAIL\`, or \`PARTIAL\`. Do not wrap it in markdown bold, do not add punctuation, do not vary the wording. Above the verdict line, include: - **PASS** — Each check performed, the command/probe used, and the result. - **FAIL** — What failed, exact error output or observed behavior, reproduction steps. If multiple issues, list all. - **PARTIAL** — What was verified (passed), what could not be verified and why (no test suite, missing tool, etc.), and what the implementer should know.`});function pf1(){if($1(process.env.CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS)&&u7())return[];let A=[nz6,VW4,Cx,Uf1];if(process.env.CLAUDE_CODE_ENTRYPOINT!=="sdk-ts"&&process.env.CLAUDE_CODE_ENTRYPOINT!=="sdk-py"&&process.env.CLAUDE_CODE_ENTRYPOINT!=="sdk-cli")A.push(kW4);return A}var LW4=k(()=>{Qf1();NW4();mc6();lS8();nS8();EW4();Z8();Q1();rA()});var yW4=k(()=>{W7();Zx();G1();a1()});var hW4={};m1(hW4,{parseAgentsFromJson:()=>Qc6,parseAgentFromJson:()=>CW4,isPluginAgent:()=>Fc6,isCustomAgent:()=>gc6,isBuiltInAgent:()=>gJ,hasRequiredMcpServers:()=>df1,getAgentDefinitionsWithOverrides:()=>Ix,getActiveAgentsFromList:()=>Yv,filterAgentsByMcpRequirements:()=>rS8,clearAgentDefinitionsCache:()=>oS8});import{basename as uOY}from"path";function gJ(A){return A.source==="built-in"}function gc6(A){return A.source!=="built-in"&&A.source!=="plugin"}function Fc6(A){return A.source==="plugin"}function Yv(A){let q=A.filter((H)=>H.source==="built-in"),K=A.filter((H)=>H.source==="plugin"),Y=A.filter((H)=>H.source==="userSettings"),z=A.filter((H)=>H.source==="projectSettings"),w=A.filter((H)=>H.source==="policySettings"),_=A.filter((H)=>H.source==="flagSettings"),$=[q,K,Y,z,_,w],O=new Map;for(let H of $)for(let j of H)O.set(j.agentType,j);return Array.from(O.values())}function df1(A,q){if(!A.requiredMcpServers||A.requiredMcpServers.length===0)return!0;return A.requiredMcpServers.every((K)=>q.some((Y)=>Y.toLowerCase().includes(K.toLowerCase())))}function rS8(A,q){return A.filter((K)=>df1(K,q))}function oS8(){Ix.cache.clear?.(),uf1()}function mOY(A){let{name:q,description:K,model:Y}=A;if(!q||typeof q!=="string")return'Missing required "name" field in frontmatter';if(!K||typeof K!=="string")return'Missing required "description" field in frontmatter';if(Y&&typeof Y==="string"&&!GT6.includes(Y))return`Invalid model "${Y}". Valid options: ${GT6.join(", ")}`;return"Unknown parsing error"}function gOY(A,q){if(!A.hooks)return;let K=qR().safeParse(A.hooks);if(!K.success){L(`Invalid hooks in agent '${q}': ${K.error.message}`);return}return K.data}function CW4(A,q,K="flagSettings"){try{let Y=SW4().parse(q),z=cz6(Y.tools);if(G9()&&Y.memory&&z!==void 0){let O=new Set(z);for(let H of[Y3,Yq,u4])if(!O.has(H))z=[...z,H]}let w=Y.disallowedTools!==void 0?cz6(Y.disallowedTools):void 0,_=Y.prompt;return{agentType:A,whenToUse:Y.description,...z!==void 0?{tools:z}:{},...w!==void 0?{disallowedTools:w}:{},getSystemPrompt:()=>{if(G9()&&Y.memory)return _+` `+Kz6(A,Y.memory);return _},source:K,...Y.model?{model:Y.model}:{},...Y.effort!==void 0?{effort:Y.effort}:{},...Y.permissionMode?{permissionMode:Y.permissionMode}:{},...Y.mcpServers&&Y.mcpServers.length>0?{mcpServers:Y.mcpServers}:{},...Y.hooks?{hooks:Y.hooks}:{},...Y.maxTurns!==void 0?{maxTurns:Y.maxTurns}:{},...Y.skills&&Y.skills.length>0?{skills:Y.skills}:{},...Y.background?{background:Y.background}:{},...Y.memory?{memory:Y.memory}:{},...Y.isolation?{isolation:Y.isolation}:{}}}catch(Y){let z=Y instanceof Error?Y.message:String(Y);return L(`Error parsing agent '${A}' from JSON: ${z}`),$6(Y),null}}function Qc6(A,q="flagSettings"){try{let K=BOY().parse(A);return Object.entries(K).map(([Y,z])=>CW4(Y,z,q)).filter((Y)=>Y!==null)}catch(K){let Y=K instanceof Error?K.message:String(K);return L(`Error parsing agents from JSON: ${Y}`),$6(K),[]}}function FOY(A,q,K,Y,z){try{let{name:w,description:_}=K;if(!w||typeof w!=="string")return null;if(!_||typeof _!=="string")return L(`Agent file ${A} is missing required 'description' in frontmatter`),null;_=_.replace(/\\n/g,` `);let{color:$,model:O,background:H}=K;if(H!==void 0&&H!=="true"&&H!=="false"&&H!==!0&&H!==!1)L(`Agent file ${A} has invalid background value '${H}'. Must be 'true', 'false', or omitted.`);let j=H==="true"||H===!0?!0:void 0,J=["user","project","local"],M=K.memory,D;if(M!==void 0)if(J.includes(M))D=M;else L(`Agent file ${A} has invalid memory value '${M}'. Valid options: ${J.join(", ")}`);let X=["worktree"],P=K.isolation,W;if(P!==void 0)if(X.includes(P))W=P;else L(`Agent file ${A} has invalid isolation value '${P}'. Valid options: ${X.join(", ")}`);let Z=O&&typeof O==="string"&>6.includes(O);if(O&&typeof O==="string"&&!Z){let t=`Agent file ${A} has invalid model '${O}'. Valid options: ${GT6.join(", ")}`;L(t)}let G=K.effort,f=G!==void 0?cd(G):void 0;if(G!==void 0&&f===void 0)L(`Agent file ${A} has invalid effort '${G}'. Valid options: ${cD6.join(", ")} or an integer`);let V=K.permissionMode,N=V&&hZ.includes(V);if(V&&!N){let t=`Agent file ${A} has invalid permissionMode '${V}'. Valid options: ${hZ.join(", ")}`;L(t)}let v=K.maxTurns,y=siA(v);if(v!==void 0&&y===void 0)L(`Agent file ${A} has invalid maxTurns '${v}'. Must be a positive integer.`);let R=uOY(A,".md"),h=cz6(K.tools);if(G9()&&D&&h!==void 0){let t=new Set(h);for(let s of[Y3,Yq,u4])if(!t.has(s))h=[...h,s]}let B=K.disallowedTools,x=B!==void 0?cz6(B):void 0,F=Xx(K.skills),g=K.mcpServers,b;if(Array.isArray(g))b=g.map((t)=>{let s=RW4().safeParse(t);if(s.success)return s.data;return L(`Agent file ${A} has invalid mcpServers item: ${U6(t)}. Error: ${s.error.message}`),null}).filter((t)=>t!==null);let U=gOY(K,w),d=Y.trim();return{baseDir:q,agentType:w,whenToUse:_,...h!==void 0?{tools:h}:{},...x!==void 0?{disallowedTools:x}:{},...F!==void 0?{skills:F}:{},...b!==void 0&&b.length>0?{mcpServers:b}:{},...U!==void 0?{hooks:U}:{},getSystemPrompt:()=>{if(G9()&&D){let t=Kz6(w,D);return d+` `+t}return d},source:z,filename:R,...$&&typeof $==="string"&&sH.includes($)?{color:$}:{},...Z?{model:O}:{},...f!==void 0?{effort:f}:{},...N?{permissionMode:V}:{},...y!==void 0?{maxTurns:y}:{},...j?{background:j}:{},...D?{memory:D}:{},...W?{isolation:W}:{}}}catch(w){let _=w instanceof Error?w.message:String(w);return L(`Error parsing agent from ${A}: ${_}`),$6(w),null}}var RW4,SW4,BOY,Ix;var fW=k(()=>{Eq();B7();B1();G1();Z8();iV();x1();Ji();R16();GW();LW4();hI();Bf1();k0();eV();PK6();a1();GJ();Zx();yW4();BH();U2();RW4=i6(()=>I.union([I.string(),I.record(I.string(),jm())])),SW4=i6(()=>I.object({description:I.string().min(1,"Description cannot be empty"),tools:I.array(I.string()).optional(),disallowedTools:I.array(I.string()).optional(),prompt:I.string().min(1,"Prompt cannot be empty"),model:I.enum(GT6).optional(),effort:I.union([I.enum(cD6),I.number().int()]).optional(),permissionMode:I.enum(hZ).optional(),mcpServers:I.array(RW4()).optional(),hooks:qR().optional(),maxTurns:I.number().int().positive().optional(),skills:I.array(I.string()).optional(),memory:I.enum(["user","project","local"]).optional(),background:I.boolean().optional(),isolation:I.enum(["worktree"]).optional()})),BOY=i6(()=>I.record(I.string(),SW4()));Ix=T8(async(A)=>{if($1(process.env.CLAUDE_CODE_SIMPLE)){let q=pf1();return{activeAgents:q,allAgents:q}}try{let q=await ji("agents",A),K=[],Y=q.map(({filePath:H,baseDir:j,frontmatter:J,content:M,source:D})=>{let X=FOY(H,j,J,M,D);if(!X){if(!J.name)return null;let P=mOY(J);return K.push({path:H,error:P}),L(`Failed to parse agent from ${H}: ${P}`),c("tengu_agent_parse_error",{error:P,location:D}),null}return X}).filter((H)=>H!==null),w=await Bc6(),$=[...pf1(),...w,...Y],O=Yv($);for(let H of O)if(H.color)iz6(H.agentType,H.color);return{activeAgents:O,allAgents:$,failedFiles:K.length>0?K:void 0}}catch(q){let K=q instanceof Error?q.message:String(q);L(`Error loading agent definitions: ${K}`),$6(q);let Y=pf1();return{activeAgents:Y,allAgents:Y,failedFiles:[{path:"unknown",error:K}]}}})});import{join as eF,dirname as bW4,basename as QOY}from"path";import{tmpdir as UOY}from"os";import{randomBytes as xW4}from"crypto";import{mkdir as Uc6,readdir as pOY,rm as sS8,readFile as dOY,writeFile as aS8,rename as cOY,stat as IW4,lstat as lOY}from"fs/promises";function bx(){return $1(process.env.CLAUDE_CODE_PLUGIN_USE_ZIP_CACHE)}function pc6(){if(!bx())return;return process.env.CLAUDE_CODE_PLUGIN_CACHE_DIR}function tS8(){let A=pc6();if(!A)throw Error("Plugin zip cache is not enabled");return eF(A,"known_marketplaces.json")}function uW4(){let A=pc6();if(!A)throw Error("Plugin zip cache is not enabled");return eF(A,"marketplaces")}function BW4(){let A=pc6();if(!A)throw Error("Plugin zip cache is not enabled");return eF(A,"plugins")}async function mW4(){if(rz6)return rz6;if(!cf1)cf1=(async()=>{let A=xW4(8).toString("hex"),q=eF(UOY(),`claude-plugin-session-${A}`);return await Uc6(q,{recursive:!0}),rz6=q,L(`Created session plugin cache at ${q}`),q})();return cf1}async function gW4(){if(!rz6)return;try{await sS8(rz6,{recursive:!0,force:!0}),L(`Cleaned up session plugin cache at ${rz6}`)}catch(A){L(`Failed to clean up session plugin cache: ${A}`)}finally{rz6=null,cf1=null}}async function lf1(A,q){let K=bW4(A);await Uc6(K,{recursive:!0});let Y=`.${QOY(A)}.tmp.${xW4(4).toString("hex")}`,z=eF(K,Y);try{if(typeof q==="string")await aS8(z,q,{encoding:"utf-8"});else await aS8(z,q);await cOY(z,A)}catch(w){try{await sS8(z,{force:!0})}catch{}throw w}}async function iOY(A){let q={};await FW4(A,"",q,new Set);let{zipSync:Y}=await Promise.resolve().then(() => (sd6(),uy8)),z=Y(q,{level:6});return L(`Created ZIP from ${A}: ${Object.keys(q).length} files, ${z.length} bytes`),z}async function FW4(A,q,K,Y){let z=q?eF(A,q):A,w;try{w=await pOY(z)}catch{return}try{let _=await IW4(z,{bigint:!0});if(_.dev!==0n||_.ino!==0n){let $=`${_.dev}:${_.ino}`;if(Y.has($)){L(`Skipping symlink cycle at ${z}`);return}Y.add($)}}catch{return}for(let _ of w){if(_===".git")continue;let $=eF(z,_),O=q?`${q}/${_}`:_,H;try{H=await lOY($)}catch{continue}if(H.isSymbolicLink())try{let j=await IW4($);if(j.isDirectory())continue;H=j}catch{continue}if(H.isDirectory())await FW4(A,O,K,Y);else if(H.isFile())try{let j=await dOY($);K[O]=new Uint8Array(j)}catch(j){L(`Failed to read file for zip: ${O}: ${j}`)}}}async function QW4(A,q){let K=await Sf1(A);await Uc6(q,{recursive:!0});for(let[Y,z]of Object.entries(K)){if(Y.endsWith("/")){await Uc6(eF(q,Y),{recursive:!0});continue}let w=eF(q,Y);await Uc6(bW4(w),{recursive:!0}),await aS8(w,z)}L(`Extracted ZIP to ${q}: ${Object.keys(K).length} entries`)}async function if1(A,q){let K=await iOY(A);await lf1(q,K),await sS8(A,{recursive:!0,force:!0})}function UW4(A){let q=A.replace(/[^a-zA-Z0-9\-_]/g,"-");return eF("marketplaces",`${q}.json`)}function pW4(A){if(typeof A==="string")return!1;return["github","git","url"].includes(A.source)}var rz6=null,cf1=null;var fT6=k(()=>{G1();uS8();Z8()});import{readdir as nOY,rm as cW4,stat as rOY,unlink as oOY,writeFile as aOY}from"fs/promises";import{join as nf1}from"path";function eOY(){vG(),xf1(),uf1(),of1(),pS8(),lW4()}function LY(){eOY(),AQ(),oS8(),pE8(),Wi()}async function TT6(A){try{await aOY(AC8(A),`${Date.now()}`,"utf-8")}catch(q){L(`Failed to write .orphaned_at: ${A}: ${q}`)}}async function eS8(){if(bx())return;try{let A=qHY();if(!A)return;let q=Vf6(),K=Date.now();await Promise.all([...A].map((Y)=>AHY(Y)));for(let Y of await rf1(q)){let z=nf1(q,Y);for(let w of await rf1(z)){let _=nf1(z,w);for(let $ of await rf1(_)){let O=nf1(_,$);if(A.has(O))continue;await KHY(O,K)}await dW4(_)}await dW4(z)}}catch(A){L(`Plugin cache cleanup failed: ${A}`)}}function AC8(A){return nf1(A,sOY)}async function AHY(A){let q=AC8(A);try{await oOY(q)}catch(K){if(K.code==="ENOENT")return;L(`Failed to remove .orphaned_at: ${A}: ${K}`)}}function qHY(){try{let A=new Set,q=Vx();for(let K of Object.values(q.plugins))for(let Y of K)A.add(Y.installPath);return A}catch(A){return L(`Failed to load installed plugins: ${A}`),null}}async function KHY(A,q){let K=AC8(A),Y;try{Y=(await rOY(K)).mtimeMs}catch(z){if(z.code==="ENOENT"){await TT6(A);return}L(`Failed to stat orphaned marker: ${A}: ${z}`);return}if(q-Y>tOY)try{await cW4(A,{recursive:!0,force:!0})}catch(z){L(`Failed to delete orphaned version: ${A}: ${z}`)}}async function dW4(A){if((await rf1(A)).length===0)try{await cW4(A,{recursive:!0,force:!0})}catch(q){L(`Failed to remove empty dir: ${A}: ${q}`)}}async function rf1(A){try{return(await nOY(A,{withFileTypes:!0})).filter((K)=>K.isDirectory()).map((K)=>K.name)}catch{return[]}}var sOY=".orphaned_at",tOY=604800000;var zv=k(()=>{aj();uc6();Bf1();oz6();mf1();xx();OH();fW();GP();G1();fT6();aY6();MW()});import{join as TW,basename as iW4,dirname as nW4,sep as YHY,resolve as qC8,isAbsolute as oW4}from"path";function sf1(){return TW(Rj(),"known_marketplaces.json")}function aW4(){return TW(Rj(),"marketplaces")}function ux(){DW.cache?.clear?.()}function C16(){return{...N$4(),...h7().extraKnownMarketplaces??{}}}function zHY(A){let q=["localSettings","projectSettings","userSettings"];for(let K of q)if(HA(K)?.extraKnownMarketplaces?.[A])return K;return null}function lc6(A,q,K="userSettings"){let z={...(HA(K)??{}).extraKnownMarketplaces};z[A]=q,xA(K,{extraKnownMarketplaces:z})}async function r3(){let A=P1(),q=sf1();try{let K=await A.readFile(q,{encoding:"utf-8"}),Y=O8(K),z=IM6().safeParse(Y);if(!z.success){let w=`Marketplace configuration file is corrupted: ${z.error.issues.map((_)=>`${_.path.join(".")}: ${_.message}`).join(", ")}`;throw L(w,{level:"error"}),new Rf(w,q,Y)}return z.data}catch(K){if(K.code==="ENOENT")return{};if(K instanceof Rf)throw K;let Y=`Failed to load marketplace configuration: ${D1(K)}`;throw L(Y,{level:"error"}),Error(Y)}}async function az6(A){let q=IM6().safeParse(A),K=sf1();if(!q.success)throw new Rf(`Invalid marketplace config: ${q.error.message}`,K,A);let Y=P1(),z=TW(K,"..");await Y.mkdir(z),pz(K,U6(q.data,null,2),{encoding:"utf-8",flush:!0})}async function tf1(){let A=wm();if(!A)return!1;let q=TW(A,"known_marketplaces.json"),K;try{let w=await P1().readFile(q,{encoding:"utf-8"}),_=IM6().safeParse(O8(w));if(!_.success)return L(`Seed known_marketplaces.json invalid: ${_.error.message}`,{level:"warn"}),!1;K=_.data}catch(w){if(w.code!=="ENOENT")L(`Failed to read seed known_marketplaces.json: ${w}`,{level:"warn"});return!1}let Y=await r3(),z=0;for(let[w,_]of Object.entries(K)){let $=await wHY(A,w);if(!$){L(`Seed marketplace '${w}' not found under ${A}/marketplaces/, skipping`,{level:"warn"});continue}let O={source:_.source,installLocation:$,lastUpdated:_.lastUpdated,autoUpdate:!1};if(QV(Y[w],O))continue;Y[w]=O,z++}if(z>0)return await az6(Y),L(`Synced ${z} marketplace(s) from seed dir`),!0;return!1}async function wHY(A,q){let K=TW(A,"marketplaces",q),Y=TW(A,"marketplaces",`${q}.json`);for(let z of[K,Y])try{return await cc6(z),z}catch{}return null}function ic6(A){let q=wm();if(!q)return!1;return A===q||A.startsWith(q+YHY)}function S16(){let A=process.env.CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS;if(A){let q=parseInt(A,10);if(!isNaN(q)&&q>0)return q}return _HY}async function $HY(A,q,K){L(`git pull: cwd=${A} ref=${q??"default"}`);let Y={...process.env,...dc6},z=K?.disableCredentialHelper?["-c","credential.helper="]:[];if(q){let _=await z7(nA(),[...z,"fetch","origin",q],{cwd:A,timeout:S16(),stdin:"ignore",env:Y});if(_.code!==0)return af1(_);let $=await z7(nA(),[...z,"checkout",q],{cwd:A,timeout:S16(),stdin:"ignore",env:Y});if($.code!==0)return af1($);let O=await z7(nA(),[...z,"pull","origin",q],{cwd:A,timeout:S16(),stdin:"ignore",env:Y});return af1(O)}let w=await z7(nA(),[...z,"pull","origin","HEAD"],{cwd:A,timeout:S16(),stdin:"ignore",env:Y});return af1(w)}function af1(A){if(A.code===0)return A;if(A.error?.includes("timed out")){let q=Math.round(S16()/1000);return{...A,stderr:`Git pull timed out after ${q}s. Try increasing the timeout via CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS environment variable. Original error: ${A.stderr}`}}if(A.stderr.includes("REMOTE HOST IDENTIFICATION HAS CHANGED"))return{...A,stderr:`SSH host key for this marketplace's git host has changed (server key rotation or possible MITM). Remove the stale entry with: ssh-keygen -R Then connect once manually to accept the new key. Original error: ${A.stderr}`};if(A.stderr.includes("Host key verification failed"))return{...A,stderr:`SSH host key verification failed while updating marketplace. The host key is not in your known_hosts file. Connect once manually to add it (e.g., ssh -T git@), or remove and re-add the marketplace with an HTTPS URL. Original error: ${A.stderr}`};if(A.stderr.includes("Permission denied (publickey)")||A.stderr.includes("Could not read from remote repository"))return{...A,stderr:`SSH authentication failed while updating marketplace. Please ensure your SSH keys are configured. Original error: ${A.stderr}`};if(A.stderr.includes("timed out")||A.stderr.includes("Could not resolve host"))return{...A,stderr:`Network error while updating marketplace. Please check your internet connection. Original error: ${A.stderr}`};return A}async function sW4(){try{let A=await W8("ssh",["-T","-o","BatchMode=yes","-o","ConnectTimeout=2","-o","StrictHostKeyChecking=yes","git@github.com"],{timeout:3000}),q=A.code===1&&(A.stderr?.includes("successfully authenticated")||A.stdout?.includes("successfully authenticated"));return L(`SSH config check: code=${A.code} configured=${q}`),q}catch(A){return L(`SSH configuration check failed: ${D1(A)}`,{level:"warn"}),!1}}function OHY(A){return A.includes("Authentication failed")||A.includes("could not read Username")||A.includes("terminal prompts disabled")||A.includes("403")||A.includes("401")}function rW4(A){return A.match(/^[^@]+@([^:]+):/)?.[1]??null}async function HHY(A,q,K,Y){let z=Y&&Y.length>0,w=["-c","core.sshCommand=ssh -o BatchMode=yes -o StrictHostKeyChecking=yes","clone","--depth","1"];if(z)w.push("--filter=blob:none","--no-checkout");else w.push("--recurse-submodules","--shallow-submodules");if(K)w.push("--branch",K);w.push(A,q);let _=S16();L(`git clone: url=${A} ref=${K??"default"} timeout=${_}ms`);let $=await z7(nA(),w,{timeout:_,stdin:"ignore",env:{...process.env,...dc6}});if($.code===0){if(z){let O=await z7(nA(),["sparse-checkout","set","--cone","--",...Y],{cwd:q,timeout:_,stdin:"ignore",env:{...process.env,...dc6}});if(O.code!==0)return{code:O.code,stderr:`git sparse-checkout set failed: ${O.stderr}`};let H=await z7(nA(),["checkout","HEAD"],{cwd:q,timeout:_,stdin:"ignore",env:{...process.env,...dc6}});if(H.code!==0)return{code:H.code,stderr:`git checkout after sparse-checkout failed: ${H.stderr}`}}return L(`git clone succeeded: ${A}`),$}if(L(`git clone failed: url=${A} code=${$.code} error=${$.error??"none"} stderr=${$.stderr}`,{level:"warn"}),$.error?.includes("timed out"))return{...$,stderr:`Git clone timed out after ${Math.round(_/1000)}s. The repository may be too large for the current timeout. Set CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS to increase it (e.g., 300000 for 5 minutes). Original error: ${$.stderr}`};if($.stderr){if($.stderr.includes("REMOTE HOST IDENTIFICATION HAS CHANGED")){let O=rW4(A),H=O?`ssh-keygen -R ${O}`:"ssh-keygen -R ";return{...$,stderr:`SSH host key has changed (server key rotation or possible MITM). Remove the stale known_hosts entry: ${H} Then connect once manually to verify and accept the new key. Original error: ${$.stderr}`}}if($.stderr.includes("Host key verification failed")){let O=rW4(A),H=O?`ssh -T git@${O}`:"ssh -T git@";return{...$,stderr:`SSH host key is not in your known_hosts file. To add it, connect once manually (this will show the fingerprint for you to verify): ${H} Or use an HTTPS URL instead (recommended for public repos). Original error: ${$.stderr}`}}if($.stderr.includes("Permission denied (publickey)")||$.stderr.includes("Could not read from remote repository"))return{...$,stderr:`SSH authentication failed. Please ensure your SSH keys are configured for GitHub, or use an HTTPS URL instead. Original error: ${$.stderr}`};if(OHY($.stderr))return{...$,stderr:`HTTPS authentication failed. Please ensure your credential helper is configured (e.g., gh auth login). Original error: ${$.stderr}`};if($.stderr.includes("timed out")||$.stderr.includes("timeout")||$.stderr.includes("Could not resolve host"))return{...$,stderr:`Network error or timeout while cloning repository. Please check your internet connection and try again. Original error: ${$.stderr}`}}return $}function MC(A,q){if(!A)return;try{A(q)}catch(K){L(`Progress callback error: ${D1(K)}`,{level:"warn"})}}async function jHY(A,q){let K={...process.env,...dc6};if(q&&q.length>0)return z7(nA(),["sparse-checkout","set","--cone","--",...q],{cwd:A,timeout:S16(),stdin:"ignore",env:K});let Y=await z7(nA(),["config","--get","core.sparseCheckout"],{cwd:A,stdin:"ignore",env:K});if(Y.code===0&&Y.stdout.trim()==="true")return{code:1,stderr:"sparsePaths removed from config but repository is sparse; re-cloning for full checkout"};return{code:0,stderr:""}}async function Si(A,q,K,Y,z,w){let _=P1(),$=Math.round(S16()/1000);MC(z,`Refreshing marketplace cache (timeout: ${$}s)…`);let O=await jHY(q,Y);if(O.code===0){let J=await $HY(q,K,{disableCredentialHelper:w?.disableCredentialHelper});if(J.code===0)return;L(`git pull failed, will re-clone: ${J.stderr}`,{level:"warn"})}else L(`sparse-checkout reconcile requires re-clone: ${O.stderr}`);try{await _.rm(q,{recursive:!0}),L(`Found stale marketplace directory at ${q}, cleaning up to allow re-clone`,{level:"warn"}),MC(z,"Found stale directory, cleaning up and re-cloning…")}catch(J){if(J.code!=="ENOENT"){let M=D1(J);throw Error(`Failed to clean up existing marketplace directory. Please manually delete the directory at ${q} and try again. Technical details: ${M}`)}}let H=K?` (ref: ${K})`:"";MC(z,`Cloning repository (timeout: ${$}s): ${A}${H}`);let j=await HHY(A,q,K,Y);if(j.code!==0){try{await _.rm(q,{recursive:!0,force:!0})}catch{}throw Error(`Failed to clone marketplace repository: ${j.stderr}`)}MC(z,"Clone complete, validating marketplace…")}function JHY(A){return Object.fromEntries(Object.entries(A).map(([q])=>[q,"***REDACTED***"]))}async function tW4(A,q,K,Y){let z=P1();if(MC(Y,`Downloading marketplace from ${A}`),L(`Downloading marketplace from URL: ${A}`),K&&Object.keys(K).length>0)L(`Using custom headers: ${U6(JHY(K))}`);let w={...K,"User-Agent":"Claude-Code-Plugin-Manager"},_;try{_=await I8.get(A,{timeout:1e4,headers:w})}catch(H){if(I8.isAxiosError(H)){if(H.code==="ECONNREFUSED"||H.code==="ENOTFOUND")throw Error(`Could not connect to ${A}. Please check your internet connection and verify the URL is correct. Technical details: ${H.message}`);if(H.code==="ETIMEDOUT")throw Error(`Request timed out while downloading marketplace from ${A}. The server may be slow or unreachable. Technical details: ${H.message}`);if(H.response)throw Error(`HTTP ${H.response.status} error while downloading marketplace from ${A}. The marketplace file may not exist at this URL. Technical details: ${H.message}`)}throw Error(`Failed to download marketplace from ${A}: ${D1(H)}`)}MC(Y,"Validating marketplace data");let $=ws().safeParse(_.data);if(!$.success)throw new Rf(`Invalid marketplace schema from URL: ${$.error.issues.map((H)=>`${H.path.join(".")}: ${H.message}`).join(", ")}`,A,_.data);MC(Y,"Saving marketplace to cache");let O=TW(q,"..");await z.mkdir(O),pz(q,U6($.data,null,2),{encoding:"utf-8",flush:!0})}function MHY(A){return A.source==="github"?A.repo.replace("/","-"):A.source==="npm"?A.package.replace("@","").replace("/","-"):A.source==="file"?iW4(A.path).replace(".json",""):A.source==="directory"?iW4(A.path):"temp_"+Date.now()}async function KC8(A,q){let Y=await P1().readFile(A,{encoding:"utf-8"}),z;try{z=O8(Y)}catch(_){throw new Rf(`Invalid JSON in ${A}: ${D1(_)}`,A,Y)}let w=q.safeParse(z);if(!w.success)throw new Rf(`Invalid schema: ${A} ${w.error?.issues.map((_)=>`${_.path.join(".")}: ${_.message}`).join(", ")}`,A,z);return w.data}async function YC8(A,q){let K=P1(),Y=aW4();await K.mkdir(Y);let z,w,_=!1,$=MHY(A);try{switch(A.source){case"url":{z=TW(Y,`${$}.json`),_=!0,await tW4(A.url,z,A.headers,q),w=z;break}case"github":{let J=`git@github.com:${A.repo}.git`,M=`https://github.com/${A.repo}.git`;z=TW(Y,$),_=!0;let D=null;if(await sW4()){MC(q,`Cloning via SSH: ${J}`);try{await Si(J,z,A.ref,A.sparsePaths,q)}catch(P){D=P instanceof Error?P:Error(String(P)),$6(D),MC(q,`SSH clone failed, retrying with HTTPS: ${M}`),L(`SSH clone failed for ${A.repo} despite SSH being configured, falling back to HTTPS`,{level:"info"}),await K.rm(z,{recursive:!0,force:!0});try{await Si(M,z,A.ref,A.sparsePaths,q),D=null}catch(W){D=W instanceof Error?W:Error(String(W)),$6(D)}}}else{MC(q,`SSH not configured, cloning via HTTPS: ${M}`),L(`SSH not configured for GitHub, using HTTPS for ${A.repo}`,{level:"info"});try{await Si(M,z,A.ref,A.sparsePaths,q)}catch(P){D=P instanceof Error?P:Error(String(P)),$6(D),MC(q,`HTTPS clone failed, retrying with SSH: ${J}`),L(`HTTPS clone failed for ${A.repo} (${D.message}), falling back to SSH`,{level:"info"}),await K.rm(z,{recursive:!0,force:!0});try{await Si(J,z,A.ref,A.sparsePaths,q),D=null}catch(W){D=W instanceof Error?W:Error(String(W)),$6(D)}}}if(D)throw D;w=TW(z,A.path||".claude-plugin/marketplace.json");break}case"git":{z=TW(Y,$),_=!0,await Si(A.url,z,A.ref,A.sparsePaths,q),w=TW(z,A.path||".claude-plugin/marketplace.json");break}case"npm":throw Error("NPM marketplace sources not yet implemented");case"file":{let J=qC8(A.path);w=J,z=nW4(nW4(J)),_=!1;break}case"directory":{let J=qC8(A.path);w=TW(J,".claude-plugin","marketplace.json"),z=J,_=!1;break}default:throw Error("Unsupported marketplace source type")}L(`Reading marketplace from ${w}`);let O;try{O=await KC8(w,ws())}catch(J){if(J.code==="ENOENT")throw Error(`Marketplace file not found at ${w}`);throw Error(`Failed to parse marketplace file at ${w}: ${D1(J)}`)}let H=TW(Y,O.name),j=A.source==="file"||A.source==="directory";if(z!==H&&!j)try{try{q?.("Cleaning up old marketplace cache…")}catch(J){L(`Progress callback error: ${D1(J)}`,{level:"warn"})}await K.rm(H,{recursive:!0,force:!0}),await K.rename(z,H),z=H,_=!1}catch(J){let M=D1(J);throw Error(`Failed to finalize marketplace cache. Please manually delete the directory at ${H} if it exists and try again. Technical details: ${M}`)}return{marketplace:O,cachePath:z}}catch(O){if(_&&z&&A.source!=="file"&&A.source!=="directory")try{await K.rm(z,{recursive:!0,force:!0})}catch(H){L(`Warning: Failed to clean up temporary marketplace cache at ${z}: ${D1(H)}`,{level:"warn"})}throw O}}async function qQ(A,q){let K=A;if((A.source==="directory"||A.source==="file")&&!oW4(A.path))K={...A,path:qC8(A.path)};if(!Xz6(K)){if(hd6(K))throw Error(`Marketplace source '${Tf6(K)}' is blocked by enterprise policy.`);let H=Dz6()||[],j=G$4(),J=vL8(K),M=`Marketplace source '${Tf6(K)}'`;if(J)M+=` (${J})`;if(M+=" is blocked by enterprise policy.",H.length>0)M+=` Allowed sources: ${H.map((D)=>Tf6(D)).join(", ")}`;else M+=" No external marketplaces are allowed.";if(K.source==="github"&&j.length>0)M+=` Tip: The shorthand "${K.repo}" assumes github.com. For internal GitHub Enterprise, use the full URL: git@your-github-host.com:${K.repo}.git`;throw Error(M)}let Y=await r3();for(let[H,j]of Object.entries(Y))if(QV(j.source,K))return L(`Source already materialized as '${H}', skipping clone`),{name:H,alreadyMaterialized:!0,resolvedSource:K};let{marketplace:z,cachePath:w}=await YC8(K,q),_=JpA(z.name,K);if(_)throw Error(_);let $=await r3(),O=$[z.name];if(O){if(ic6(O.installLocation))throw Error(`Marketplace '${z.name}' is seed-managed (${wm()}). To use a different source, ask your admin to update the seed, or use a different marketplace name.`);if(L(`Marketplace '${z.name}' exists with different source — overwriting`),O.source.source!=="directory"&&O.source.source!=="file")await P1().rm(O.installLocation,{recursive:!0,force:!0})}return $[z.name]={source:K,installLocation:w,lastUpdated:new Date().toISOString()},await az6($),L(`Added marketplace source: ${z.name}`),{name:z.name,alreadyMaterialized:!1,resolvedSource:K}}async function VT6(A){let q=await r3();if(!q[A])throw Error(`Marketplace '${A}' not found`);let K=q[A];if(ic6(K.installLocation)){let H=wm();throw Error(`Marketplace '${A}' is registered from the read-only seed directory (${H}) and will be re-registered on next startup. To stop using its plugins: claude plugin disable @${A}`)}delete q[A],await az6(q);let Y=P1(),z=aW4(),w=TW(z,A);await Y.rm(w,{recursive:!0,force:!0});let _=TW(z,`${A}.json`);await Y.rm(_,{force:!0});let $=["userSettings","projectSettings","localSettings"];for(let H of $){let j=HA(H);if(!j)continue;let J=!1,M={};if(j.extraKnownMarketplaces?.[A]){let D={...j.extraKnownMarketplaces};D[A]=void 0,M.extraKnownMarketplaces=D,J=!0}if(j.enabledPlugins){let D=`@${A}`,X={...j.enabledPlugins},P=!1;for(let W in X)if(W.endsWith(D))X[W]=void 0,P=!0;if(P)M.enabledPlugins=X,J=!0}if(J){let D=xA(H,M);if(D.error)$6(D.error),L(`Failed to clean up marketplace '${A}' from ${H} settings: ${D.error.message}`);else L(`Cleaned up marketplace '${A}' from ${H} settings`)}}let O=R$4(A);for(let H of O)await TT6(H);L(`Removed marketplace source: ${A}`)}async function cc6(A){let q=TW(A,".claude-plugin","marketplace.json");try{return await KC8(q,ws())}catch(K){if(K instanceof Rf)throw K;let Y=K.code;if(Y!=="ENOENT"&&Y!=="ENOTDIR")throw K}return await KC8(A,ws())}async function zC8(A){let q=P1(),K=sf1();try{let Y=await q.readFile(K,{encoding:"utf-8"}),w=O8(Y)[A];if(!w)return null;return await cc6(w.installLocation)}catch(Y){if(Y.code==="ENOENT")return null;return L(`Failed to read cached marketplace ${A}: ${D1(Y)}`,{level:"warn"}),null}}async function wC8(A){let{name:q,marketplace:K}=S_(A);if(!q||!K)return null;let Y=P1(),z=sf1();try{let w=await Y.readFile(z,{encoding:"utf-8"}),$=O8(w)[K];if(!$)return null;let O=await zC8(K);if(!O)return null;let H=O.plugins.find((j)=>j.name===q);if(!H)return null;return{entry:H,marketplaceInstallLocation:$.installLocation}}catch{return null}}async function aS(A){let q=await wC8(A);if(q)return q;let{name:K,marketplace:Y}=S_(A);if(!K||!Y)return null;try{let w=(await r3())[Y];if(!w)return null;let $=(await DW(Y)).plugins.find((O)=>O.name===K);if(!$)return null;return{entry:$,marketplaceInstallLocation:w.installLocation}}catch(z){return L(`Could not find plugin ${A}: ${D1(z)}`,{level:"debug"}),null}}async function eW4(){let A=await r3();for(let[q,K]of Object.entries(A)){if(ic6(K.installLocation)){L(`Skipping seed-managed marketplace '${q}' in bulk refresh`);continue}try{let{cachePath:Y}=await YC8(K.source);A[q].lastUpdated=new Date().toISOString(),A[q].installLocation=Y}catch(Y){L(`Failed to refresh marketplace ${q}: ${D1(Y)}`,{level:"error"})}}await az6(A)}async function h16(A,q,K){let Y=await r3(),z=Y[A];if(!z)throw Error(`Marketplace '${A}' not found. Available marketplaces: ${Object.keys(Y).join(", ")}`);DW.cache?.delete?.(A);try{let{installLocation:w,source:_}=z;if(ic6(w)){let $=wm();throw Error(`Marketplace '${A}' is seed-managed (${$}) and its content is controlled by the seed image. To update: ask your admin to update the seed.`)}if(_.source==="github"||_.source==="git"){if(_.source==="github"){let $=`git@github.com:${_.repo}.git`,O=`https://github.com/${_.repo}.git`;if($1(process.env.CLAUDE_CODE_REMOTE))await Si(O,w,_.ref,_.sparsePaths,q,K);else{let H=await sW4(),j=H?$:O,J=H?O:$;try{await Si(j,w,_.ref,_.sparsePaths,q,K)}catch{L(`Marketplace refresh failed with ${H?"SSH":"HTTPS"} for ${_.repo}, falling back to ${H?"HTTPS":"SSH"}`,{level:"info"}),await Si(J,w,_.ref,_.sparsePaths,q,K)}}}else await Si(_.url,w,_.ref,_.sparsePaths,q,K);try{await cc6(w)}catch{let $=_.source==="github"?_.repo:_.url;throw Error(`The marketplace.json file is no longer present in this repository. ${A==="claude-code-plugins"?`We've deprecated "claude-code-plugins" in favor of "claude-plugins-official".`:"This marketplace may have been deprecated or moved to a new location."} Source: ${$} You can remove this marketplace with: claude plugin marketplace remove "${A}"`)}}else if(_.source==="url")await tW4(_.url,w,_.headers,q);else if(_.source==="file"||_.source==="directory")MC(q,"Validating local marketplace"),await cc6(w);else throw Error("Unsupported marketplace source type for refresh");Y[A].lastUpdated=new Date().toISOString(),await az6(Y),L(`Successfully refreshed marketplace: ${A}`)}catch(w){let _=w instanceof Error?w.message:String(w);throw L(`Failed to refresh marketplace ${A}: ${_}`,{level:"error"}),Error(`Failed to refresh marketplace '${A}': ${_}`)}}async function AZ4(A,q){let K=await r3(),Y=K[A];if(!Y)throw Error(`Marketplace '${A}' not found. Available marketplaces: ${Object.keys(K).join(", ")}`);if(ic6(Y.installLocation))throw Error(`Marketplace '${A}' is seed-managed (${wm()}) and auto-update is always disabled for seed content. To update: ask your admin to update the seed.`);if(Y.autoUpdate===q)return;K[A]={...Y,autoUpdate:q},await az6(K);let z=zHY(A);if(z){let w=HA(z)?.extraKnownMarketplaces?.[A];if(w)lc6(A,{source:w.source,autoUpdate:q},z)}L(`Set autoUpdate=${q} for marketplace: ${A}`)}var dc6,_HY=120000,DW;var R_=k(()=>{A3();Eq();_M6();Z8();na();Y7();a1();G1();x1();aq();MA();GA();L0();gF();lZ1();FF();a1();GP();zv();U3();dc6={GIT_TERMINAL_PROMPT:"0",GIT_ASKPASS:""};DW=T8(async(A)=>{let q=await r3(),K=q[A];if(!K)throw Error(`Marketplace '${A}' not found in configuration. Available marketplaces: ${Object.keys(q).join(", ")}`);if((K.source.source==="directory"||K.source.source==="file")&&!oW4(K.source.path))throw Error(`Marketplace "${A}" has a relative source path (${K.source.path}) `+"in known_marketplaces.json — this is stale state from an older "+`Claude Code version. Run 'claude marketplace remove ${A}' and re-add it from the original project directory.`);try{return await cc6(K.installLocation)}catch(z){L(`Cache corrupted or missing for marketplace ${A}, re-fetching from source: ${D1(z)}`,{level:"warn"})}let Y;try{({marketplace:Y}=await YC8(K.source))}catch(z){throw Error(`Failed to load marketplace "${A}" from source (${K.source.source}): ${D1(z)}`)}return q[A].lastUpdated=new Date().toISOString(),await az6(q),Y})});async function Ci(A,q,K,Y,z,w){if(K?.version)return L(`Using manifest version for ${A}: ${K.version}`),K.version;if(z)return L(`Using provided version for ${A}: ${z}`),z;if(w){let _=w.substring(0,12);return L(`Using pre-resolved git SHA for ${A}: ${_}`),_}if(Y){let _=await DHY(Y);if(_){let $=_.substring(0,12);return L(`Using git SHA for ${A}: ${$}`),$}}return L(`No version found for ${A}, using 'unknown'`),"unknown"}function DHY(A){return I31(A)}var ef1=k(()=>{G1();ZK6()});import{mkdir as qZ4,rename as _C8,rm as XHY}from"fs/promises";import{dirname as $C8,sep as HC8,join as PHY,resolve as OC8}from"path";import{randomBytes as WHY}from"crypto";function KZ4(){return new Date().toISOString()}function NT6(A,q){let K=OC8(A,q),Y=OC8(A)+HC8;if(!K.startsWith(Y)&&K!==OC8(A))throw Error(`Path traversal detected: "${q}" would escape the base directory`);return K}async function sz6(A,q,K="user",Y,z){let w=typeof q.source==="string"&&z?z:q.source,_=await nc6(w,{manifest:q}),$=z||_.path,O=_.gitCommitSha??await iZ1($),H=KZ4(),j=await Ci(A,q.source,_.manifest,$,q.version,_.gitCommitSha),J=Nx(A,j),M=_.path;if(_.path!==J){await qZ4($C8(J),{recursive:!0}),await XHY(J,{recursive:!0,force:!0});let D=_.path.endsWith(HC8)?_.path:_.path+HC8;if(J.startsWith(D)){let P=PHY($C8(_.path),`.claude-plugin-temp-${Date.now()}-${WHY(4).toString("hex")}`);await _C8(_.path,P),await qZ4($C8(J),{recursive:!0}),await _C8(P,J)}else await _C8(_.path,J);M=J}if(bx()){let D=kT6(A,j);await if1(M,D),M=D}return hL8(A,{version:j,installedAt:H,lastUpdated:H,installPath:M,gitCommitSha:O},K,Y),M}function YZ4(A,q="user",K){let Y=KZ4();hL8(A.pluginId,{version:A.version||"unknown",installedAt:Y,lastUpdated:Y,installPath:A.installPath},q,K)}async function vT6({pluginId:A,entry:q,marketplaceName:K,scope:Y="user"}){try{let z=Tx(Y),{error:w}=xA(z,{enabledPlugins:{...HA(z)?.enabledPlugins,[A]:!0}});if(w)return{success:!1,error:`Failed to update settings: ${w.message}`};let _=Y!=="user"?I1():void 0,$,{source:O}=q;if(hM6(O)){let H=await aS(A);if(H)$=NT6(H.marketplaceInstallLocation,O)}return await sz6(A,q,Y,_,$),c("tengu_plugin_installed",{plugin_id:A,marketplace_name:K}),LY(),{success:!0,message:`✓ Installed ${q.name}. Run /reload-plugins to activate.`}}catch(z){let w=z instanceof Error?z.message:String(z);return $6(z instanceof Error?z:Error(`Failed to install plugin: ${String(z)}`)),{success:!1,error:`Failed to install: ${w}`}}}var tz6=k(()=>{L0();GP();aj();fT6();R_();FF();GA();W7();zv();B1();x1();ef1()});function zZ4(A){return A.endsWith(`@${rc6}`)}function wZ4(A){return jC8.get(A)}function JC8(){let A=BA(),q=[],K=[];for(let[Y,z]of jC8){if(z.isAvailable&&!z.isAvailable())continue;let w=`${Y}@${rc6}`,_=A?.enabledPlugins?.[w],$=_!==void 0?_===!0:z.defaultEnabled??!0,O={name:Y,manifest:{name:Y,description:z.description,version:z.version},path:rc6,source:w,repository:w,enabled:$,isBuiltin:!0,hooksConfig:z.hooks,mcpServers:z.mcpServers};if($)q.push(O);else K.push(O)}return{enabled:q,disabled:K}}function _Z4(){let{enabled:A}=JC8(),q=[];for(let K of A){let Y=jC8.get(K.name);if(!Y?.skills)continue;for(let z of Y.skills)q.push(ZHY(z))}return q}function ZHY(A){return{type:"prompt",name:A.name,description:A.description,hasUserSpecifiedDescription:!0,allowedTools:A.allowedTools??[],argumentHint:A.argumentHint,whenToUse:A.whenToUse,model:A.model,disableModelInvocation:A.disableModelInvocation??!1,userInvocable:A.userInvocable??!0,contentLength:0,source:"bundled",loadedFrom:"bundled",hooks:A.hooks,context:A.context,agent:A.agent,isEnabled:A.isEnabled??(()=>!0),isHidden:!(A.userInvocable??!0),progressMessage:"running",userFacingName:()=>A.name,getPromptForCommand:A.getPromptForCommand}}var jC8,rc6="builtin";var oc6=k(()=>{GA();jC8=new Map});import{copyFile as GHY,mkdir as KT1,readdir as ET6,readFile as ac6,readlink as fHY,realpath as AT1,rename as MZ4,rm as ez6,rmdir as THY,stat as VHY,symlink as MC8}from"fs/promises";import{join as v9,resolve as NHY,basename as vHY,relative as $Z4,dirname as DC8,sep as OZ4}from"path";function Vf6(){return v9(Rj(),"cache")}function XC8(A,q,K){let{name:Y,marketplace:z}=S_(q),w=(z||"unknown").replace(/[^a-zA-Z0-9\-_]/g,"-"),_=(Y||q).replace(/[^a-zA-Z0-9\-_]/g,"-"),$=K.replace(/[^a-zA-Z0-9\-_.]/g,"-");return v9(A,"cache",w,_,$)}function Nx(A,q){return XC8(Rj(),A,q)}function kT6(A,q){return`${Nx(A,q)}.zip`}async function DZ4(A,q){let K=wm();if(!K)return null;let Y=XC8(K,A,q);try{return(await ET6(Y)).length>0?Y:null}catch{return null}}async function kHY(A){let q=wm();if(!q)return null;let K=DC8(XC8(q,A,"_"));try{let Y=await ET6(K);if(Y.length!==1)return null;let z=v9(K,Y[0]);return(await ET6(z)).length>0?z:null}catch{return null}}async function sc6(A,q){await KT1(q,{recursive:!0});let K=await ET6(A,{withFileTypes:!0});for(let Y of K){let z=v9(A,Y.name),w=v9(q,Y.name);if(Y.isDirectory())await sc6(z,w);else if(Y.isFile())await GHY(z,w);else if(Y.isSymbolicLink()){let _=await fHY(z),$;try{$=await AT1(z)}catch{await MC8(_,w);continue}let O;try{O=await AT1(A)}catch{O=A}let H=O.endsWith(OZ4)?O:O+OZ4;if($.startsWith(H)||$===O){let j=$Z4(O,$),J=v9(q,j),M=$Z4(DC8(w),J);await MC8(M,w)}else await MC8($,w)}}}async function qT1(A,q,K,Y,z){let w=bx(),_=Nx(q,K),$=kT6(q,K);if(w){if(await $3($))return L(`Plugin ${q} version ${K} already cached at ${$}`),$}else if(await $3(_)){if((await ET6(_)).length>0)return L(`Plugin ${q} version ${K} already cached at ${_}`),_;L(`Removing empty cache directory for ${q} at ${_}`),await THY(_)}let O=await DZ4(q,K);if(O)return L(`Using seed cache for ${q}@${K} at ${O}`),O;if(await KT1(DC8(_),{recursive:!0}),Y&&typeof Y.source==="string"&&z){let J=NT6(z,Y.source);if(await $3(J))L(`Copying source directory ${Y.source} for plugin ${q}`),await sc6(J,_);else throw Error(`Plugin source directory not found: ${J} (from entry.source: ${Y.source})`)}else L(`Copying plugin ${q} to versioned cache (fallback to full copy)`),await sc6(A,_);let H=v9(_,".git");if(await ez6(H,{recursive:!0,force:!0}),(await ET6(_)).length===0)throw Error(`Failed to copy plugin ${q} to versioned cache: destination is empty after copy`);if(w)return await if1(_,$),L(`Successfully cached plugin ${q} as ZIP at ${$}`),$;return L(`Successfully cached plugin ${q} at ${_}`),_}function XZ4(A){try{let q=new URL(A);if(!["https:","http:","file:"].includes(q.protocol)){if(!/^git@[a-zA-Z0-9.-]+:/.test(A))throw Error(`Invalid git URL protocol: ${q.protocol}. Only HTTPS, HTTP, file:// and SSH (git@) URLs are supported.`)}return A}catch{if(/^git@[a-zA-Z0-9.-]+:/.test(A))return A;throw Error(`Invalid git URL: ${A}`)}}async function EHY(A,q,K={}){let Y=v9(Rj(),"npm-cache");await KT1(Y,{recursive:!0});let z=K.version?`${A}@${K.version}`:A,w=v9(Y,"node_modules",A);if(!await $3(w)){L(`Installing npm package ${z} to cache`);let $=["install",z,"--prefix",Y];if(K.registry)$.push("--registry",K.registry);let O=await W8("npm",$,{useCwd:!1});if(O.code!==0)throw Error(`Failed to install npm package: ${O.stderr}`)}await sc6(w,q),L(`Copied npm package ${A} from cache to ${q}`)}async function LHY(A,q,K,Y){let z=["clone","--depth","1","--recurse-submodules","--shallow-submodules"];if(K)z.push("--branch",K);if(Y)z.push("--no-checkout");z.push(A,q);let w=await W8(nA(),z);if(w.code!==0)throw Error(`Failed to clone repository: ${w.stderr}`);if(Y){if((await z7(nA(),["fetch","--depth","1","origin",Y],{cwd:q})).code!==0){L(`Shallow fetch of SHA ${Y} failed, falling back to unshallow fetch`);let O=await z7(nA(),["fetch","--unshallow"],{cwd:q});if(O.code!==0)throw Error(`Failed to fetch commit ${Y}: ${O.stderr}`)}let $=await z7(nA(),["checkout",Y],{cwd:q});if($.code!==0)throw Error(`Failed to checkout commit ${Y}: ${$.stderr}`)}}async function PZ4(A,q,K,Y){let z=XZ4(A);await LHY(z,q,K,Y);let w=K?` (ref: ${K})`:"";L(`Cloned repository from ${z}${w} to ${q}`)}async function yHY(A,q,K,Y){if(!/^[a-zA-Z0-9-_.]+\/[a-zA-Z0-9-_.]+$/.test(A))throw Error(`Invalid GitHub repository format: ${A}. Expected format: owner/repo`);let z=$1(process.env.CLAUDE_CODE_REMOTE)?`https://github.com/${A}.git`:`git@github.com:${A}.git`;return PZ4(z,q,K,Y)}function RHY(A){if(/^[a-zA-Z0-9-_.]+\/[a-zA-Z0-9-_.]+$/.test(A))return $1(process.env.CLAUDE_CODE_REMOTE)?`https://github.com/${A}.git`:`git@github.com:${A}.git`;return XZ4(A)}async function SHY(A,q,K,Y,z){if(!await Zf6())throw Error("git-subdir plugin source requires git to be installed and on PATH. Install git (version 2.25 or later for sparse-checkout cone mode) and try again.");let w=RHY(A),_=`${q}.clone`,$=["clone","--depth","1","--filter=tree:0","--no-checkout"];if(Y)$.push("--branch",Y);$.push(w,_);let O=await W8(nA(),$);if(O.code!==0)throw Error(`Failed to clone repository for git-subdir source: ${O.stderr}`);try{let H=await z7(nA(),["sparse-checkout","set","--cone","--",K],{cwd:_});if(H.code!==0)throw Error(`git sparse-checkout set failed (git >= 2.25 required for cone mode): ${H.stderr}`);let j;if(z){if((await z7(nA(),["fetch","--depth","1","origin",z],{cwd:_})).code!==0){L(`Shallow fetch of SHA ${z} failed for git-subdir, falling back to unshallow fetch`);let W=await z7(nA(),["fetch","--unshallow"],{cwd:_});if(W.code!==0)throw Error(`Failed to fetch commit ${z}: ${W.stderr}`)}let P=await z7(nA(),["checkout",z],{cwd:_});if(P.code!==0)throw Error(`Failed to checkout commit ${z}: ${P.stderr}`);j=z}else{let[X,P]=await Promise.all([z7(nA(),["checkout","HEAD"],{cwd:_}),z7(nA(),["rev-parse","HEAD"],{cwd:_})]);if(X.code!==0)throw Error(`git checkout after sparse-checkout failed: ${X.stderr}`);if(P.code===0)j=P.stdout.trim()}let J=NT6(_,K);try{await MZ4(J,q)}catch(X){if(X.code==="ENOENT")throw Error(`Subdirectory '${K}' not found in repository ${w}${Y?` (ref: ${Y})`:""}. Check that the path is correct and exists at the specified ref/sha.`);throw X}let M=Y?` ref=${Y}`:"",D=j?` sha=${j}`:"";return L(`Extracted subdir ${K} from ${w}${M}${D} to ${q}`),j}finally{await ez6(_,{recursive:!0,force:!0})}}async function CHY(A,q){if(!await $3(A))throw Error(`Source path does not exist: ${A}`);await sc6(A,q);let K=v9(q,".git");await ez6(K,{recursive:!0,force:!0})}function hHY(A){let q=Date.now(),K=Math.random().toString(36).substring(2,8),Y;if(typeof A==="string")Y="local";else switch(A.source){case"npm":Y="npm";break;case"pip":Y="pip";break;case"github":Y="github";break;case"url":Y="git";break;case"git-subdir":Y="subdir";break;default:Y="unknown"}return`temp_${Y}_${q}_${K}`}async function nc6(A,q){let K=Vf6();await KT1(K,{recursive:!0});let Y=hHY(A),z=v9(K,Y),w=!1,_;try{if(L(`Caching plugin from source: ${U6(A)} to temporary path ${z}`),w=!0,typeof A==="string")await CHY(A,z);else switch(A.source){case"npm":await EHY(A.package,z,{registry:A.registry,version:A.version});break;case"github":await yHY(A.repo,z,A.ref,A.sha);break;case"url":await PZ4(A.url,z,A.ref,A.sha);break;case"git-subdir":_=await SHY(A.url,z,A.path,A.ref,A.sha);break;case"pip":throw Error("Python package plugins are not yet supported");default:throw Error("Unsupported plugin source type")}}catch(M){if(w&&await $3(z)){L(`Cleaning up failed installation at ${z}`);try{await ez6(z,{recursive:!0,force:!0})}catch(D){L(`Failed to clean up installation: ${D}`,{level:"error"})}}throw M}let $=v9(z,".claude-plugin","plugin.json"),O=v9(z,"plugin.json"),H;if(await $3($))try{let M=await ac6($,{encoding:"utf-8"}),D=O8(M),X=WK6().safeParse(D);if(X.success)H=X.data;else{let P=X.error.issues.map((W)=>`${W.path.join(".")}: ${W.message}`).join(", ");throw L(`Invalid manifest at ${$}: ${P}`,{level:"error"}),Error(`Plugin has an invalid manifest file at ${$}. Validation errors: ${P}`)}}catch(M){if(M instanceof Error&&M.message.includes("invalid manifest file"))throw M;let D=D1(M);throw L(`Failed to parse manifest at ${$}: ${D}`,{level:"error"}),Error(`Plugin has a corrupt manifest file at ${$}. JSON parse error: ${D}`)}else if(await $3(O))try{let M=await ac6(O,{encoding:"utf-8"}),D=O8(M),X=WK6().safeParse(D);if(X.success)H=X.data;else{let P=X.error.issues.map((W)=>`${W.path.join(".")}: ${W.message}`).join(", ");throw L(`Invalid legacy manifest at ${O}: ${P}`,{level:"error"}),Error(`Plugin has an invalid manifest file at ${O}. Validation errors: ${P}`)}}catch(M){if(M instanceof Error&&M.message.includes("invalid manifest file"))throw M;let D=D1(M);throw L(`Failed to parse legacy manifest at ${O}: ${D}`,{level:"error"}),Error(`Plugin has a corrupt manifest file at ${O}. JSON parse error: ${D}`)}else H=q?.manifest||{name:Y,description:`Plugin cached from ${typeof A==="string"?A:A.source}`};let j=H.name.replace(/[^a-zA-Z0-9-_]/g,"-"),J=v9(K,j);if(await $3(J))L(`Removing old cached version at ${J}`),await ez6(J,{recursive:!0,force:!0});return await MZ4(z,J),L(`Successfully cached plugin ${H.name} to ${J}`),{path:J,manifest:H,..._&&{gitCommitSha:_}}}async function YT1(A,q,K){if(!await $3(A))return{name:q,description:`Plugin from ${K}`};try{let Y=await ac6(A,{encoding:"utf-8"}),z=O8(Y),w=WK6().safeParse(z);if(w.success)return w.data;let _=w.error.issues.map(($)=>$.path.length>0?`${$.path.join(".")}: ${$.message}`:$.message).join(", ");throw L(`Plugin ${q} has an invalid manifest file at ${A}. Validation errors: ${_}`,{level:"error"}),Error(`Plugin ${q} has an invalid manifest file at ${A}. Validation errors: ${_}`)}catch(Y){if(Y instanceof Error&&Y.message.includes("invalid manifest file"))throw Y;let z=D1(Y);throw L(`Plugin ${q} has a corrupt manifest file at ${A}. Parse error: ${z}`,{level:"error"}),Error(`Plugin ${q} has a corrupt manifest file at ${A}. JSON parse error: ${z}`)}}async function HZ4(A,q){if(!await $3(A))throw Error(`Hooks file not found at ${A} for plugin ${q}. If the manifest declares hooks, the file must exist.`);let K=await ac6(A,{encoding:"utf-8"}),Y=O8(K);return DpA().parse(Y).hooks}async function I16(A,q,K,Y,z,w,_,$){let O=await Promise.all(A.map(async(j)=>{let J=v9(q,j);return{relPath:j,fullPath:J,exists:await $3(J)}})),H=[];for(let{relPath:j,fullPath:J,exists:M}of O)if(M)H.push(J);else L(`${w} path ${j} ${_} not found at ${J} for ${K}`,{level:"warn"}),$6(Error(`Plugin component file not found: ${J} for ${K}`)),$.push({type:"path-not-found",source:Y,plugin:K,path:J,component:z});return H}async function WZ4(A,q,K,Y,z=!0){let w=[],_=v9(A,".claude-plugin","plugin.json"),$=await YT1(_,Y,q),O={name:$.name,manifest:$,path:A,source:q,repository:q,enabled:K},[H,j,J,M]=await Promise.all([!$.commands?$3(v9(A,"commands")):!1,!$.agents?$3(v9(A,"agents")):!1,!$.skills?$3(v9(A,"skills")):!1,!$.outputStyles?$3(v9(A,"output-styles")):!1]),D=v9(A,"commands");if(H)O.commandsPath=D;if($.commands){let N=Object.values($.commands)[0];if(typeof $.commands==="object"&&!Array.isArray($.commands)&&N&&typeof N==="object"&&(("source"in N)||("content"in N))){let v={},y=[],R=Object.entries($.commands),h=await Promise.all(R.map(async([B,x])=>{if(!x||typeof x!=="object")return{commandName:B,metadata:x,kind:"skip"};if(x.source){let F=v9(A,x.source);return{commandName:B,metadata:x,kind:"source",fullPath:F,exists:await $3(F)}}if(x.content)return{commandName:B,metadata:x,kind:"content"};return{commandName:B,metadata:x,kind:"skip"}}));for(let B of h){if(B.kind==="skip")continue;if(B.kind==="content"){v[B.commandName]=B.metadata;continue}if(B.exists)y.push(B.fullPath),v[B.commandName]=B.metadata;else L(`Command ${B.commandName} path ${B.metadata.source} specified in manifest but not found at ${B.fullPath} for ${$.name}`,{level:"warn"}),$6(Error(`Plugin component file not found: ${B.fullPath} for ${$.name}`)),w.push({type:"path-not-found",source:q,plugin:$.name,path:B.fullPath,component:"commands"})}if(y.length>0)O.commandsPaths=y;if(Object.keys(v).length>0)O.commandsMetadata=v}else{let v=Array.isArray($.commands)?$.commands:[$.commands],y=await Promise.all(v.map(async(h)=>{if(typeof h!=="string")return{cmdPath:h,kind:"invalid"};let B=v9(A,h);return{cmdPath:h,kind:"path",fullPath:B,exists:await $3(B)}})),R=[];for(let h of y){if(h.kind==="invalid"){L(`Unexpected command format in manifest for ${$.name}`,{level:"error"});continue}if(h.exists)R.push(h.fullPath);else L(`Command path ${h.cmdPath} specified in manifest but not found at ${h.fullPath} for ${$.name}`,{level:"warn"}),$6(Error(`Plugin component file not found: ${h.fullPath} for ${$.name}`)),w.push({type:"path-not-found",source:q,plugin:$.name,path:h.fullPath,component:"commands"})}if(R.length>0)O.commandsPaths=R}}let X=v9(A,"agents");if(j)O.agentsPath=X;if($.agents){let N=Array.isArray($.agents)?$.agents:[$.agents],v=await I16(N,A,$.name,q,"agents","Agent","specified in manifest but",w);if(v.length>0)O.agentsPaths=v}let P=v9(A,"skills");if(J)O.skillsPath=P;if($.skills){let N=Array.isArray($.skills)?$.skills:[$.skills],v=await I16(N,A,$.name,q,"skills","Skill","specified in manifest but",w);if(v.length>0)O.skillsPaths=v}let W=v9(A,"output-styles");if(M)O.outputStylesPath=W;if($.outputStyles){let N=Array.isArray($.outputStyles)?$.outputStyles:[$.outputStyles],v=await I16(N,A,$.name,q,"output-styles","Output style","specified in manifest but",w);if(v.length>0)O.outputStylesPaths=v}let Z,G=new Set,f=v9(A,"hooks","hooks.json");if(await $3(f))try{Z=await HZ4(f,$.name);try{G.add(await AT1(f))}catch{G.add(f)}L(`Loaded hooks from standard location for plugin ${$.name}: ${f}`)}catch(N){let v=D1(N);L(`Failed to load hooks for ${$.name}: ${v}`,{level:"error"}),$6(N instanceof Error?N:Error(v)),w.push({type:"hook-load-failed",source:q,plugin:$.name,hookPath:f,reason:v})}if($.hooks){let N=Array.isArray($.hooks)?$.hooks:[$.hooks];for(let v of N)if(typeof v==="string"){let y=v9(A,v);if(!await $3(y)){L(`Hooks file ${v} specified in manifest but not found at ${y} for ${$.name}`,{level:"error"}),$6(Error(`Plugin component file not found: ${y} for ${$.name}`)),w.push({type:"path-not-found",source:q,plugin:$.name,path:y,component:"hooks"});continue}let R;try{R=await AT1(y)}catch{R=y}if(G.has(R)){if(L(`Skipping duplicate hooks file for plugin ${$.name}: ${v} (resolves to already-loaded file: ${R})`),z){let h=`Duplicate hooks file detected: ${v} resolves to already-loaded file ${R}. The standard hooks/hooks.json is loaded automatically, so manifest.hooks should only reference additional hook files.`;$6(Error(h)),w.push({type:"hook-load-failed",source:q,plugin:$.name,hookPath:y,reason:h})}continue}try{let h=await HZ4(y,$.name);try{Z=JZ4(Z,h),G.add(R),L(`Loaded and merged hooks from manifest for plugin ${$.name}: ${v}`)}catch(B){let x=D1(B);L(`Failed to merge hooks from ${v} for ${$.name}: ${x}`,{level:"error"}),$6(B instanceof Error?B:Error(x)),w.push({type:"hook-load-failed",source:q,plugin:$.name,hookPath:y,reason:`Failed to merge: ${x}`})}}catch(h){let B=D1(h);L(`Failed to load hooks from ${v} for ${$.name}: ${B}`,{level:"error"}),$6(h instanceof Error?h:Error(B)),w.push({type:"hook-load-failed",source:q,plugin:$.name,hookPath:y,reason:B})}}else if(typeof v==="object")Z=JZ4(Z,v)}if(Z)O.hooksConfig=Z;let V=await bHY(A,$);if(V)O.settings=V;return{plugin:O,errors:w}}function jZ4(A){let q=IHY().safeParse(A);if(!q.success)return;let K=q.data;if(Object.keys(K).length===0)return;return K}async function bHY(A,q){let K=v9(A,"settings.json");try{let Y=await ac6(K,{encoding:"utf-8"}),z=O8(Y);if(FHY(z)){let w=jZ4(z);if(w)return L(`Loaded settings from settings.json for plugin ${q.name}`),w}}catch(Y){let z=Y.code;if(z!=="ENOENT"&&z!=="EACCES"&&z!=="EPERM")L(`Failed to parse settings.json for plugin ${q.name}: ${Y}`,{level:"warn"})}if(q.settings){let Y=jZ4(q.settings);if(Y)return L(`Loaded settings from manifest for plugin ${q.name}`),Y}return}function JZ4(A,q){if(!A)return q;let K={...A};for(let[Y,z]of Object.entries(q))if(!K[Y])K[Y]=z;else K[Y]=[...K[Y]||[],...z];return K}async function xHY(){let A=BA(),q={...Id6(),...A.enabledPlugins||{}},K=[],Y=[],z=Object.entries(q).filter(([j,J])=>{if(!CM6().safeParse(j).success||J===void 0)return!1;let{marketplace:D}=S_(j);return D!==rc6}),w=await r3(),_=new Set(z.map(([j])=>S_(j).marketplace).filter((j)=>!!j)),$=new Map;await Promise.all([..._].map(async(j)=>{$.set(j,await zC8(j))}));let O=xd6(),H=await Promise.allSettled(z.map(async([j,J])=>{let{name:M,marketplace:D}=S_(j),X=w[D];if(X&&!Xz6(X.source)){let G=hd6(X.source),f=Dz6()||[];return Y.push({type:"marketplace-blocked-by-policy",source:j,plugin:M,marketplace:D,blockedByBlocklist:G,allowedSources:G?[]:f.map((V)=>Tf6(V))}),null}let P=null,W=$.get(D);if(W&&X){let G=W.plugins.find((f)=>f.name===M);if(G)P={entry:G,marketplaceInstallLocation:X.installLocation}}else P=await wC8(j);if(!P)return Y.push({type:"plugin-not-found",source:j,pluginId:M,marketplace:D}),null;let Z=O.plugins[j]?.[0]?.version;return uHY(P.entry,P.marketplaceInstallLocation,j,J===!0,Y,Z)}));for(let[j,J]of H.entries())if(J.status==="fulfilled"&&J.value)K.push(J.value);else if(J.status==="rejected"){let M=J.reason instanceof Error?J.reason:Error(String(J.reason));$6(M);let D=z[j][0];Y.push({type:"generic-error",source:D,plugin:D.split("@")[0],error:M.message})}return{plugins:K,errors:Y}}async function uHY(A,q,K,Y,z,w){L(`Loading plugin ${A.name} from source: ${U6(A.source)}`);let _=[],$;if(typeof A.source==="string"){let M=(await VHY(q)).isDirectory()?q:v9(q,".."),D=v9(M,A.source);if(!await $3(D)){let X=Error(`Plugin path not found: ${D}`);return L(`Plugin path not found: ${D}`,{level:"error"}),$6(X),z.push({type:"generic-error",source:K,error:`Plugin directory not found at path: ${D}. Check that the marketplace entry has the correct path.`}),null}try{let X=v9(D,".claude-plugin","plugin.json"),P;try{P=await YT1(X,A.name,A.source)}catch{}let W=await Ci(K,A.source,P,M,A.version);$=await qT1(D,K,W,A,M),L(`Resolved local plugin ${A.name} to versioned cache: ${$}`)}catch(X){let P=D1(X);L(`Failed to copy plugin ${A.name} to versioned cache: ${P}. Using marketplace path.`,{level:"warn"}),$=D}}else try{let M=await Ci(K,A.source,void 0,void 0,w??A.version),D=Nx(K,M),X=kT6(K,M);if(bx()&&await $3(X))L(`Using versioned cached plugin ZIP ${A.name} from ${X}`),$=X;else if(await $3(D))L(`Using versioned cached plugin ${A.name} from ${D}`),$=D;else{let P=await DZ4(K,M)??(M==="unknown"?await kHY(K):null);if(P)$=P,L(`Using seed cache for external plugin ${A.name} at ${P}`);else{let W=await nc6(A.source,{manifest:{name:A.name}}),Z=await Ci(K,A.source,W.manifest,W.path,w??A.version);if($=await qT1(W.path,K,Z,A,void 0),W.path!==$)await ez6(W.path,{recursive:!0,force:!0})}}}catch(M){let D=D1(M);return L(`Failed to cache plugin ${A.name}: ${D}`,{level:"error"}),$6(M instanceof Error?M:Error(D)),z.push({type:"generic-error",source:K,error:`Failed to download/cache plugin ${A.name}: ${D}`}),null}if(bx()&&$.endsWith(".zip")){let M=await mW4(),D=v9(M,K.replace(/[^a-zA-Z0-9@\-_]/g,"-"));try{await QW4($,D),L(`Extracted plugin ZIP to session dir: ${D}`),$=D}catch(X){throw L(`Failed to extract plugin ZIP ${$}, deleting corrupt file: ${X}`),await ez6($,{force:!0}).catch(()=>{}),X}}let O=v9($,".claude-plugin","plugin.json"),H=await $3(O),{plugin:j,errors:J}=await WZ4($,K,Y,A.name,A.strict??!0);if(_.push(...J),typeof A.source==="object"&&"sha"in A.source&&A.source.sha)j.sha=A.source.sha;if(!H){if(j.manifest={...A,id:void 0,source:void 0,strict:void 0},j.name=j.manifest.name,A.commands){let M=Object.values(A.commands)[0];if(typeof A.commands==="object"&&!Array.isArray(A.commands)&&M&&typeof M==="object"&&(("source"in M)||("content"in M))){let D={},X=[],P=Object.entries(A.commands),W=await Promise.all(P.map(async([Z,G])=>{if(!G||typeof G!=="object"||!G.source)return{commandName:Z,metadata:G,skip:!0};let f=v9($,G.source);return{commandName:Z,metadata:G,skip:!1,fullPath:f,exists:await $3(f)}}));for(let Z of W){if(Z.skip)continue;if(Z.exists)X.push(Z.fullPath),D[Z.commandName]=Z.metadata;else L(`Command ${Z.commandName} path ${Z.metadata.source} from marketplace entry not found at ${Z.fullPath} for ${A.name}`,{level:"warn"}),$6(Error(`Plugin component file not found: ${Z.fullPath} for ${A.name}`)),_.push({type:"path-not-found",source:K,plugin:A.name,path:Z.fullPath,component:"commands"})}if(X.length>0)j.commandsPaths=X,j.commandsMetadata=D}else{let D=Array.isArray(A.commands)?A.commands:[A.commands],X=await Promise.all(D.map(async(W)=>{if(typeof W!=="string")return{cmdPath:W,kind:"invalid"};let Z=v9($,W);return{cmdPath:W,kind:"path",fullPath:Z,exists:await $3(Z)}})),P=[];for(let W of X){if(W.kind==="invalid"){L(`Unexpected command format in marketplace entry for ${A.name}`,{level:"error"});continue}if(W.exists)P.push(W.fullPath);else L(`Command path ${W.cmdPath} from marketplace entry not found at ${W.fullPath} for ${A.name}`,{level:"warn"}),$6(Error(`Plugin component file not found: ${W.fullPath} for ${A.name}`)),_.push({type:"path-not-found",source:K,plugin:A.name,path:W.fullPath,component:"commands"})}if(P.length>0)j.commandsPaths=P}}if(A.agents){let M=Array.isArray(A.agents)?A.agents:[A.agents],D=await I16(M,$,A.name,K,"agents","Agent","from marketplace entry",_);if(D.length>0)j.agentsPaths=D}if(A.skills){L(`Processing ${Array.isArray(A.skills)?A.skills.length:1} skill paths for plugin ${A.name}`);let M=Array.isArray(A.skills)?A.skills:[A.skills],D=await Promise.all(M.map(async(P)=>{let W=v9($,P);return{skillPath:P,fullPath:W,exists:await $3(W)}})),X=[];for(let{skillPath:P,fullPath:W,exists:Z}of D)if(L(`Checking skill path: ${P} -> ${W} (exists: ${Z})`),Z)X.push(W);else L(`Skill path ${P} from marketplace entry not found at ${W} for ${A.name}`,{level:"warn"}),$6(Error(`Plugin component file not found: ${W} for ${A.name}`)),_.push({type:"path-not-found",source:K,plugin:A.name,path:W,component:"skills"});if(L(`Found ${X.length} valid skill paths for plugin ${A.name}, setting skillsPaths`),X.length>0)j.skillsPaths=X}else L(`Plugin ${A.name} has no entry.skills defined`);if(A.outputStyles){let M=Array.isArray(A.outputStyles)?A.outputStyles:[A.outputStyles],D=await I16(M,$,A.name,K,"output-styles","Output style","from marketplace entry",_);if(D.length>0)j.outputStylesPaths=D}if(A.hooks)j.hooksConfig=A.hooks}else if(!A.strict&&H&&(A.commands||A.agents||A.skills||A.hooks||A.outputStyles)){let M=Error(`Plugin ${A.name} has both plugin.json and marketplace manifest entries for commands/agents/skills/hooks/outputStyles. This is a conflict.`);return L(`Plugin ${A.name} has both plugin.json and marketplace manifest entries for commands/agents/skills/hooks/outputStyles. This is a conflict.`,{level:"error"}),$6(M),z.push({type:"generic-error",source:K,error:`Plugin ${A.name} has conflicting manifests: both plugin.json and marketplace entry specify components. Set strict: true in marketplace entry or remove component specs from one location.`}),null}else if(H){if(A.commands){let M=Object.values(A.commands)[0];if(typeof A.commands==="object"&&!Array.isArray(A.commands)&&M&&typeof M==="object"&&(("source"in M)||("content"in M))){let D={...j.commandsMetadata||{}},X=[],P=Object.entries(A.commands),W=await Promise.all(P.map(async([Z,G])=>{if(!G||typeof G!=="object"||!G.source)return{commandName:Z,metadata:G,skip:!0};let f=v9($,G.source);return{commandName:Z,metadata:G,skip:!1,fullPath:f,exists:await $3(f)}}));for(let Z of W){if(Z.skip)continue;if(Z.exists)X.push(Z.fullPath),D[Z.commandName]=Z.metadata;else L(`Command ${Z.commandName} path ${Z.metadata.source} from marketplace entry not found at ${Z.fullPath} for ${A.name}`,{level:"warn"}),$6(Error(`Plugin component file not found: ${Z.fullPath} for ${A.name}`)),_.push({type:"path-not-found",source:K,plugin:A.name,path:Z.fullPath,component:"commands"})}if(X.length>0)j.commandsPaths=[...j.commandsPaths||[],...X],j.commandsMetadata=D}else{let D=Array.isArray(A.commands)?A.commands:[A.commands],X=await Promise.all(D.map(async(W)=>{if(typeof W!=="string")return{cmdPath:W,kind:"invalid"};let Z=v9($,W);return{cmdPath:W,kind:"path",fullPath:Z,exists:await $3(Z)}})),P=[];for(let W of X){if(W.kind==="invalid"){L(`Unexpected command format in marketplace entry for ${A.name}`,{level:"error"});continue}if(W.exists)P.push(W.fullPath);else L(`Command path ${W.cmdPath} from marketplace entry not found at ${W.fullPath} for ${A.name}`,{level:"warn"}),$6(Error(`Plugin component file not found: ${W.fullPath} for ${A.name}`)),_.push({type:"path-not-found",source:K,plugin:A.name,path:W.fullPath,component:"commands"})}if(P.length>0)j.commandsPaths=[...j.commandsPaths||[],...P]}}if(A.agents){let M=Array.isArray(A.agents)?A.agents:[A.agents],D=await I16(M,$,A.name,K,"agents","Agent","from marketplace entry",_);if(D.length>0)j.agentsPaths=[...j.agentsPaths||[],...D]}if(A.skills){let M=Array.isArray(A.skills)?A.skills:[A.skills],D=await I16(M,$,A.name,K,"skills","Skill","from marketplace entry",_);if(D.length>0)j.skillsPaths=[...j.skillsPaths||[],...D]}if(A.outputStyles){let M=Array.isArray(A.outputStyles)?A.outputStyles:[A.outputStyles],D=await I16(M,$,A.name,K,"output-styles","Output style","from marketplace entry",_);if(D.length>0)j.outputStylesPaths=[...j.outputStylesPaths||[],...D]}if(A.hooks)j.hooksConfig={...j.hooksConfig||{},...A.hooks}}return z.push(..._),j}async function BHY(A){if(A.length===0)return{plugins:[],errors:[]};let q=[],K=[];for(let[Y,z]of A.entries())try{let w=NHY(z);if(!await $3(w)){L(`Plugin path does not exist: ${w}, skipping`,{level:"warn"}),K.push({type:"path-not-found",source:`inline[${Y}]`,path:w,component:"commands"});continue}let _=vHY(w),{plugin:$,errors:O}=await WZ4(w,`${_}@inline`,!0,_);$.source=`${$.name}@inline`,$.repository=`${$.name}@inline`,q.push($),K.push(...O),L(`Loaded inline plugin from path: ${$.name}`)}catch(w){let _=D1(w);L(`Failed to load session plugin from ${z}: ${_}`,{level:"warn"}),K.push({type:"generic-error",source:`inline[${Y}]`,error:`Failed to load plugin: ${_}`})}if(q.length>0)L(`Loaded ${q.length} session-only plugins from --plugin-dir`);return{plugins:q,errors:K}}function vG(A){if(A)L(`clearPluginCache: invalidating loadAllPlugins cache (${A})`);if(uz.cache?.clear?.(),o11()!==void 0)HM();bqA()}function mHY(A){let q;for(let K of A){if(!K.settings)continue;if(!q)q={};for(let[Y,z]of Object.entries(K.settings)){if(Y in q)L(`Plugin "${K.name}" overrides setting "${Y}" (previously set by another plugin)`);q[Y]=z}}return q}function gHY(A){let q=mHY(A);if(IqA(q),q&&Object.keys(q).length>0)HM(),L(`Cached plugin settings with keys: ${Object.keys(q).join(", ")}`)}function FHY(A){return typeof A==="object"&&A!==null&&!Array.isArray(A)}var IHY,uz;var aj=k(()=>{Eq();Q1();L0();G1();x1();GA();hI();R_();gF();aq();Z8();lZ1();na();ef1();tz6();FF();GP();a1();U3();p7();fT6();cZ1();MA();oc6();IHY=i6(()=>dX().pick({agent:!0}).strip());uz=T8(async()=>{let A=b46(),[q,K]=await Promise.all([xHY(),A.length>0?BHY(A):Promise.resolve({plugins:[],errors:[]})]),Y=JC8(),z=[...q.plugins,...K.plugins,...Y.enabled,...Y.disabled],w=[...q.errors,...K.errors];L(`Found ${z.length} plugins (${z.filter(($)=>$.enabled).length} enabled, ${z.filter(($)=>!$.enabled).length} disabled)`);let _=z.filter(($)=>$.enabled);return gHY(_),{enabled:_,disabled:z.filter(($)=>!$.enabled),errors:w}})});var WC8={};m1(WC8,{setupPluginHookHotReload:()=>pHY,resetHotReloadState:()=>UHY,loadPluginHooks:()=>KQ,clearPluginHookCache:()=>of1});function QHY(A){let q={PreToolUse:[],PostToolUse:[],PostToolUseFailure:[],Notification:[],UserPromptSubmit:[],SessionStart:[],SessionEnd:[],Stop:[],SubagentStart:[],SubagentStop:[],PreCompact:[],PermissionRequest:[],Setup:[],TeammateIdle:[],TaskCompleted:[],Elicitation:[],ElicitationResult:[],ConfigChange:[],WorktreeCreate:[],WorktreeRemove:[],InstructionsLoaded:[]};if(!A.hooksConfig)return q;for(let[K,Y]of Object.entries(A.hooksConfig)){let z=K;if(!q[z])continue;for(let w of Y)if(w.hooks.length>0)q[z].push({matcher:w.matcher,hooks:w.hooks,pluginRoot:A.path,pluginName:A.name,pluginId:A.source})}return q}function of1(){KQ.cache?.clear?.()}function UHY(){PC8=!1,zT1=void 0}function ZZ4(){let A=BA().enabledPlugins;if(!A)return"{}";return U6(A,Object.keys(A).sort())}function pHY(){if(PC8)return;PC8=!0,zT1=ZZ4(),o$.subscribe((A)=>{if(A==="policySettings"){let q=ZZ4();if(q===zT1){L("Plugin hooks: skipping reload, enabledPlugins unchanged");return}zT1=q,L("Plugin hooks: reloading due to enabledPlugins change"),vG("loadPluginHooks: enabledPlugins settings changed"),of1(),KQ()}})}var PC8=!1,zT1,KQ;var oz6=k(()=>{Eq();aj();G1();Q1();Vm();GA();a1();KQ=T8(async()=>{let{enabled:A}=await uz(),q={PreToolUse:[],PostToolUse:[],PostToolUseFailure:[],Notification:[],UserPromptSubmit:[],SessionStart:[],SessionEnd:[],Stop:[],SubagentStart:[],SubagentStop:[],PreCompact:[],PermissionRequest:[],Setup:[],TeammateIdle:[],TaskCompleted:[],Elicitation:[],ElicitationResult:[],ConfigChange:[],WorktreeCreate:[],WorktreeRemove:[],InstructionsLoaded:[]};for(let Y of A){if(!Y.hooksConfig)continue;L(`Loading hooks from plugin: ${Y.name}`);let z=QHY(Y);for(let w of Object.keys(z))q[w].push(...z[w])}DF1(),u46(q);let K=Object.values(q).reduce((Y,z)=>Y+z.reduce((w,_)=>w+_.hooks.length,0),0);L(`Registered ${K} hooks from ${A.length} plugins`)})});async function VW(A,{sessionId:q,agentType:K,model:Y,forceSyncExecution:z}={}){let w=[],_=[];if(zR())L("Skipping plugin hooks - allowManagedHooksOnly is enabled");else try{await KQ()}catch(O){let H=O instanceof Error?Error(`Failed to load plugin hooks during ${A}: ${O.message}`):Error(`Failed to load plugin hooks during ${A}: ${String(O)}`);if(O instanceof Error&&O.stack)H.stack=O.stack;$6(H);let j=O instanceof Error?O.message:String(O),J="";if(j.includes("Failed to clone")||j.includes("network")||j.includes("ETIMEDOUT")||j.includes("ENOTFOUND"))J="This appears to be a network issue. Check your internet connection and try again.";else if(j.includes("Permission denied")||j.includes("EACCES")||j.includes("EPERM"))J="This appears to be a permissions issue. Check file permissions on ~/.claude/plugins/";else if(j.includes("Invalid")||j.includes("parse")||j.includes("JSON")||j.includes("schema"))J="This appears to be a configuration issue. Check your plugin settings in .claude/settings.json";else J="Please fix the plugin configuration or remove problematic plugins from your settings.";L(`Warning: Failed to load plugin hooks. SessionStart hooks from plugins will not execute. Error: ${j}. ${J}`,{level:"warn"})}let $=K??hp();for await(let O of ZC8(A,q,$,Y,void 0,void 0,z)){if(O.message)w.push(O.message);if(O.additionalContexts&&O.additionalContexts.length>0)_.push(...O.additionalContexts)}if(_.length>0){let O=m4({type:"hook_additional_context",content:_,hookName:"SessionStart",toolUseID:"SessionStart",hookEvent:"SessionStart"});w.push(O)}return w}async function wT1(A,{forceSyncExecution:q}={}){let K=[],Y=[];if(zR())L("Skipping plugin hooks - allowManagedHooksOnly is enabled");else try{await KQ()}catch(z){let w=z instanceof Error?z.message:String(z);L(`Warning: Failed to load plugin hooks. Setup hooks from plugins will not execute. Error: ${w}`,{level:"warn"})}for await(let z of GC8(A,void 0,void 0,q)){if(z.message)K.push(z.message);if(z.additionalContexts&&z.additionalContexts.length>0)Y.push(...z.additionalContexts)}if(Y.length>0){let z=m4({type:"hook_additional_context",content:Y,hookName:"Setup",toolUseID:"Setup",hookEvent:"Setup"});K.push(z)}return K}var b16=k(()=>{J$();oz6();x1();G1();MW();RK6();Q1()});function iHY(A){return A.map((q)=>{if(q.type!=="user")return q;let K=q.message.content;if(!Array.isArray(K))return q;let Y=!1,z=K.flatMap((w)=>{if(w.type==="image")return Y=!0,[{type:"text",text:"[image]"}];if(w.type==="document")return Y=!0,[{type:"text",text:"[document]"}];if(w.type==="tool_result"&&Array.isArray(w.content)){let _=!1,$=w.content.map((O)=>{if(O.type==="image")return _=!0,{type:"text",text:"[image]"};if(O.type==="document")return _=!0,{type:"text",text:"[document]"};return O});if(_)return Y=!0,[{...w,content:$}]}return[w]});if(!Y)return q;return{...q,message:{...q.message,content:z}}})}function Ii(A){return[A.boundaryMarker,...A.summaryMessages,...A.messagesToKeep??[],...A.attachments,...A.hookResults]}function fC8(A,q){if(!q)return A||void 0;if(!A)return q;return`${A} ${q}`}async function RT6(A,q,K,Y,z,w=!1,_){try{if(A.length===0)throw Error(yT6);let $=HG(A),O=H$4(A),H={};try{H=j$4(O)}catch(l){$6(l)}let j=q.getAppState();eW1(j.toolPermissionContext,"summary"),q.onCompactProgress?.({type:"hooks_start",hookType:"pre_compact"}),q.setSDKStatus?.("compacting");let J=await CT6({trigger:w?"auto":"manual",customInstructions:z??null},q.abortController.signal);z=fC8(z,J.newCustomInstructions);let M=J.userDisplayMessage;q.setStreamMode?.("requesting"),q.setResponseLength?.(()=>0),q.onCompactProgress?.({type:"compact_start"});let D=p8("tengu_compact_cache_prefix",!1),X=bz4(z),P=A8({content:X}),W=await vZ4({messages:A,summaryRequest:P,appState:j,context:q,preCompactTokenCount:$,cacheSafeParams:K}),Z=$T1(W);if(!Z)throw L(`Compact failed: no summary text in response. Response: ${U6(W)}`,{level:"error"}),c("tengu_compact_failed",{reason:"no_summary",preCompactTokenCount:$,promptCacheSharingEnabled:D}),Error("Failed to generate conversation summary - response did not contain valid text content");else if(Z.startsWith(wH))throw c("tengu_compact_failed",{reason:"api_error",preCompactTokenCount:$,promptCacheSharingEnabled:D}),Error(Z);else if(Z.startsWith(NF))throw c("tengu_compact_failed",{reason:"prompt_too_long",preCompactTokenCount:$,promptCacheSharingEnabled:D}),Error(TZ4);let G=ON8(q.readFileState);q.readFileState.clear(),Wi();let[f,V]=await Promise.all([kZ4(G,q,fZ4),yZ4(q)]),N=[...f,...V],v=_T1(q.agentId);if(v)N.push(v);let y=await LZ4(q);if(y)N.push(y);let R=EZ4(q.agentId);if(R)N.push(R);for(let l of gZ1(q.options.tools,q.options.mainLoopModel,[]))N.push(m4(l));for(let l of FZ1(q.options.mcpClients,q.options.tools,q.options.mainLoopModel,[]))N.push(m4(l));q.onCompactProgress?.({type:"hooks_start",hookType:"session_start"});let h=await VW("compact",{model:q.options.mainLoopModel}),B=Al6(w?"auto":"manual",$??0,A[A.length-1]?.uuid),x=ow(),F=[A8({content:Up6(Z,Y,x),isCompactSummary:!0,isVisibleInTranscriptOnly:!0})],g=cE([W]),b=Hp6([B,...F,...N,...h]),U=cl(W),d=_?.querySource??q.options.querySource??"unknown";return c("tengu_compact",{preCompactTokenCount:$,postCompactTokenCount:g,truePostCompactTokenCount:b,autoCompactThreshold:_?.autoCompactThreshold??-1,willRetriggerNextTurn:_!==void 0&&b>=_.autoCompactThreshold,isAutoCompact:w,querySource:d,queryChainId:q.queryTracking?.chainId??"",queryDepth:q.queryTracking?.depth??-1,isRecompactionInChain:_?.isRecompactionInChain??!1,turnsSincePreviousCompact:_?.turnsSincePreviousCompact??-1,previousCompactTurnId:_?.previousCompactTurnId??"",compactionInputTokens:U?.input_tokens,compactionOutputTokens:U?.output_tokens,compactionCacheReadTokens:U?.cache_read_input_tokens??0,compactionCacheCreationTokens:U?.cache_creation_input_tokens??0,compactionTotalTokens:U?U.input_tokens+(U.cache_creation_input_tokens??0)+(U.cache_read_input_tokens??0)+U.output_tokens:0,promptCacheSharingEnabled:D,...H}),OT1(),{boundaryMarker:B,summaryMessages:F,attachments:N,hookResults:h,userDisplayMessage:M,preCompactTokenCount:$,postCompactTokenCount:g,truePostCompactTokenCount:b,compactionUsage:U}}catch($){if(!w)NZ4($,q);throw $}finally{q.setStreamMode?.("requesting"),q.setResponseLength?.(()=>0),q.onCompactProgress?.({type:"compact_end"}),q.setSDKStatus?.(null)}}async function VZ4(A,q,K,Y,z){try{let w=A.slice(q),_=A.slice(0,q);if(w.length===0)throw Error("Nothing to summarize after the selected message.");let $=HG(A);K.onCompactProgress?.({type:"hooks_start",hookType:"pre_compact"}),K.setSDKStatus?.("compacting");let O=await CT6({trigger:"manual",customInstructions:null},K.abortController.signal),H;if(O.newCustomInstructions&&z)H=`${O.newCustomInstructions} User context: ${z}`;else if(O.newCustomInstructions)H=O.newCustomInstructions;else if(z)H=`User context: ${z}`;K.setStreamMode?.("requesting"),K.setResponseLength?.(()=>0),K.onCompactProgress?.({type:"compact_start"});let j=Iz4(H),J=A8({content:j}),M=await vZ4({messages:A,summaryRequest:J,appState:K.getAppState(),context:K,preCompactTokenCount:$,cacheSafeParams:Y}),D=$T1(M);if(!D)throw c("tengu_partial_compact_failed",{reason:"no_summary",preCompactTokenCount:$}),Error("Failed to generate conversation summary - response did not contain valid text content");else if(D.startsWith(wH))throw c("tengu_partial_compact_failed",{reason:"api_error",preCompactTokenCount:$}),Error(D);else if(D.startsWith(NF))throw c("tengu_partial_compact_failed",{reason:"prompt_too_long",preCompactTokenCount:$}),Error(TZ4);let X=ON8(K.readFileState);K.readFileState.clear(),Wi();let[P,W]=await Promise.all([kZ4(X,K,fZ4),yZ4(K)]),Z=[...P,...W],G=_T1(K.agentId);if(G)Z.push(G);let f=await LZ4(K);if(f)Z.push(f);let V=EZ4(K.agentId);if(V)Z.push(V);for(let x of gZ1(K.options.tools,K.options.mainLoopModel,_))Z.push(m4(x));for(let x of FZ1(K.options.mcpClients,K.options.tools,K.options.mainLoopModel,_))Z.push(m4(x));K.onCompactProgress?.({type:"hooks_start",hookType:"session_start"});let N=await VW("compact",{model:K.options.mainLoopModel}),v=cE([M]),y=cl(M);c("tengu_partial_compact",{preCompactTokenCount:$,postCompactTokenCount:v,messagesKept:_.length,messagesSummarized:w.length,trigger:"message_selector",compactionInputTokens:y?.input_tokens,compactionOutputTokens:y?.output_tokens,compactionCacheReadTokens:y?.cache_read_input_tokens??0,compactionCacheCreationTokens:y?.cache_creation_input_tokens??0});let R=Al6("manual",$??0,_[_.length-1]?.uuid,z,w.length),h=ow(),B=[A8({content:Up6(D,!1,h),isCompactSummary:!0,..._.length>0?{summarizeMetadata:{messagesSummarized:w.length,userContext:z}}:{isVisibleInTranscriptOnly:!0}})];return OT1(),{boundaryMarker:R,summaryMessages:B,messagesToKeep:_,attachments:Z,hookResults:N,preCompactTokenCount:$,postCompactTokenCount:v,compactionUsage:y}}catch(w){throw NZ4(w,K),w}finally{K.setStreamMode?.("requesting"),K.setResponseLength?.(()=>0),K.onCompactProgress?.({type:"compact_end"}),K.setSDKStatus?.(null)}}function NZ4(A,q){if(!pa(A,hi)&&!pa(A,yT6))q.addNotification?.({key:"error-compacting-conversation",text:"Error compacting conversation",priority:"immediate",color:"error"})}function nHY(){return async()=>({behavior:"deny",message:"Tool use is not allowed during compaction",decisionReason:{type:"other",reason:"compaction agent should only produce text summary"}})}async function vZ4({messages:A,summaryRequest:q,appState:K,context:Y,preCompactTokenCount:z,cacheSafeParams:w}){let _=p8("tengu_compact_cache_prefix",!1),$=P$4()?setInterval(()=>{X$4()},50000):void 0;try{if(_)try{let j=await DC({promptMessages:[q],cacheSafeParams:w,canUseTool:nHY(),querySource:"compact",forkLabel:"compact",maxTurns:1,skipCacheWrite:!0}),J=wv(j.messages);if(J&&$T1(J))return c("tengu_compact_cache_sharing_success",{preCompactTokenCount:z,outputTokens:j.totalUsage.output_tokens,cacheReadInputTokens:j.totalUsage.cache_read_input_tokens,cacheCreationInputTokens:j.totalUsage.cache_creation_input_tokens,cacheHitRate:j.totalUsage.cache_read_input_tokens>0?j.totalUsage.cache_read_input_tokens/(j.totalUsage.cache_read_input_tokens+j.totalUsage.cache_creation_input_tokens+j.totalUsage.input_tokens):0}),J;L(`Compact cache sharing: no text in response, falling back. Response: ${U6(J)}`,{level:"warn"}),c("tengu_compact_cache_sharing_fallback",{reason:"no_text_response",preCompactTokenCount:z})}catch(j){$6(j),c("tengu_compact_cache_sharing_fallback",{reason:"error",preCompactTokenCount:z})}let O=p8("tengu_compact_streaming_retry",!1),H=O?lHY:1;for(let j=1;j<=H;j++){let J=!1,M;Y.setResponseLength?.(()=>0);let X=await tc6(Y.options.mainLoopModel,Y.options.tools,async()=>K.toolPermissionContext,Y.options.agentDefinitions.activeAgents,"compact")?zW([KY,wd6,...K.mcp.tools],"name"):[KY],W=ST6({messages:oD(iHY([...XC(A),q])),systemPrompt:MK(["You are a helpful AI assistant tasked with summarizing conversations."]),thinkingConfig:{type:"disabled"},tools:X,signal:Y.abortController.signal,options:{async getToolPermissionContext(){return Y.getAppState().toolPermissionContext},model:Y.options.mainLoopModel,toolChoice:void 0,isNonInteractiveSession:Y.options.isNonInteractiveSession,hasAppendSystemPrompt:!!Y.options.appendSystemPrompt,maxOutputTokensOverride:Math.min(HUA,ec6(Y.options.mainLoopModel)),querySource:"compact",agents:Y.options.agentDefinitions.activeAgents,mcpTools:[],effortValue:K.effortValue}})[Symbol.asyncIterator](),Z=await W.next();while(!Z.done){let G=Z.value;if(!J&&G.type==="stream_event"&&G.event.type==="content_block_start"&&G.event.content_block.type==="text")J=!0,Y.setStreamMode?.("responding");if(G.type==="stream_event"&&G.event.type==="content_block_delta"&&G.event.delta.type==="text_delta"){let f=G.event.delta.text.length;Y.setResponseLength?.((V)=>V+f)}if(G.type==="assistant")M=G;Z=await W.next()}if(M)return M;if(j({filename:_,...$})).filter((_)=>!rHY(_.filename,q.agentId)).sort((_,$)=>$.timestamp-_.timestamp).slice(0,K),z=await Promise.all(Y.map(async(_)=>{let $=await ZL8(_.filename,{...q,fileReadingLimits:{maxTokens:cHY}},"tengu_post_compact_file_restore_success","tengu_post_compact_file_restore_error","compact");return $?m4($):null})),w=0;return z.filter((_)=>{if(_===null)return!1;let $=Iz(U6(_));if(w+$<=dHY)return w+=$,!0;return!1})}function _T1(A){let q=sM(A);if(!q)return null;let K=eD(A);return m4({type:"plan_file_reference",planFilePath:K,planContent:q})}function EZ4(A){let q=J81(A);if(q.size===0)return null;let K=Array.from(q.values()).sort((Y,z)=>z.invokedAt-Y.invokedAt).map((Y)=>({name:Y.skillName,path:Y.skillPath,content:Y.content}));return m4({type:"invoked_skills",skills:K})}async function LZ4(A){if(A.getAppState().toolPermissionContext.mode!=="plan")return null;let K=eD(A.agentId),Y=sM(A.agentId)!==null;return m4({type:"plan_mode",reminderType:"full",isSubAgent:!!A.agentId,planFilePath:K,planExists:Y})}async function yZ4(A){let q=A.getAppState();return Object.values(q.tasks).filter((Y)=>Y.type==="local_agent").flatMap((Y)=>{if(Y.retrieved)return[];let{status:z}=Y;if(z==="completed"||z==="failed"||z==="killed")return[m4({type:"task_status",taskId:Y.agentId,taskType:"local_agent",description:Y.description,status:z,deltaSummary:Y.error??null})];return[]})}function rHY(A,q){let K=t4(A);try{let Y=t4(eD(q));if(K===Y)return!0}catch{}try{if(new Set($$4.map((z)=>t4(Kx(z)))).has(K))return!0}catch{}return!1}var fZ4=5,dHY=50000,cHY=5000,lHY=2,yT6="Not enough messages to compact.",TZ4="Conversation too long. Press esc twice to go up a few messages and try again.",hi="API Error: Request was aborted.",LT6="Compaction interrupted · This may be due to network issues — please try again.";var bi=k(()=>{zi();zH();B66();vF();SA();B1();Uk8();MA();jG();Px();tW1();bF();OG();mE8();MW();Q8();uJ();Kz();VL8();PM();UN();J$4();x1();G1();rA();Yi();DF();J$();Wf6();b16();Q1();uq();a1();Bx()});function hZ4(){return RZ4}function x16(A){RZ4=A}function IZ4(){HT1=Date.now()}function bZ4(){HT1=void 0}async function xZ4(){let A=Date.now();while(HT1){if(Date.now()-HT1>aHY)return;if(Date.now()-A>oHY)return;await new Promise((K)=>setTimeout(K,1000))}}async function jT1(){let A=P1(),q=bT6();try{let K=await A.readFile(q,{encoding:"utf-8"});return c("tengu_session_memory_loaded",{content_length:K.length}),K}catch(K){let Y=K.code;if(Y==="ENOENT"||Y==="EACCES"||Y==="EPERM")return null;throw K}}function uZ4(A){hT6={...hT6,...A}}function BZ4(){return{...hT6}}function mZ4(A){SZ4=A}function gZ4(){return CZ4}function FZ4(){CZ4=!0}function QZ4(A){return A>=hT6.minimumMessageTokensToInit}function UZ4(A){return A-SZ4>=hT6.minimumTokensBetweenUpdate}function pZ4(){return hT6.toolCallsBetweenUpdates}var oHY=15000,aHY=60000,ql6,hT6,RZ4,HT1,SZ4=0,CZ4=!1;var IT6=k(()=>{Y7();iz();B1();ql6={minimumMessageTokensToInit:1e4,minimumTokensBetweenUpdate:5000,toolCallsBetweenUpdates:3},hT6={...ql6}});import{join as nZ4}from"path";import{readFile as rZ4}from"fs/promises";function lZ4(){return`IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "note-taking", "session notes extraction", or these update instructions in the notes content. Based on the user conversation above (EXCLUDING this note-taking instruction message as well as system prompt, claude.md entries, or any past session summaries), update the session notes file. The file {{notesPath}} has already been read for you. Here are its current contents: {{currentNotes}} Your ONLY task is to use the Edit tool to update the notes file, then stop. You can make multiple edits (update every section as needed) - make all Edit tool calls in parallel in a single message. Do not call any other tools. CRITICAL RULES FOR EDITING: - The file must maintain its exact structure with all sections, headers, and italic descriptions intact -- NEVER modify, delete, or add section headers (the lines starting with '#' like # Task specification) -- NEVER modify or delete the italic _section description_ lines (these are the lines in italics immediately following each header - they start and end with underscores) -- The italic _section descriptions_ are TEMPLATE INSTRUCTIONS that must be preserved exactly as-is - they guide what content belongs in each section -- ONLY update the actual content that appears BELOW the italic _section descriptions_ within each existing section -- Do NOT add any new sections, summaries, or information outside the existing structure - Do NOT reference this note-taking process or instructions anywhere in the notes - It's OK to skip updating a section if there are no substantial new insights to add. Do not add filler content like "No info yet", just leave sections blank/unedited if appropriate. - Write DETAILED, INFO-DENSE content for each section - include specifics like file paths, function names, error messages, exact commands, technical details, etc. - For "Key results", include the complete, exact output the user requested (e.g., full table, full answer, etc.) - Do not include information that's already in the CLAUDE.md files included in the context - Keep each section under ~${JT1} tokens/words - if a section is approaching this limit, condense it by cycling out less important details while preserving the most critical information - Focus on actionable, specific information that would help someone understand or recreate the work discussed in the conversation - IMPORTANT: Always update "Current State" to reflect the most recent work - this is critical for continuity after compaction Use the Edit tool with file_path: {{notesPath}} STRUCTURE PRESERVATION REMINDER: Each section has TWO parts that must be preserved exactly as they appear in the current file: 1. The section header (line starting with #) 2. The italic description line (the _italicized text_ immediately after the header - this is a template instruction) You ONLY update the actual content that comes AFTER these two preserved lines. The italic description lines starting and ending with underscores are part of the template structure, NOT content to be edited or removed. REMEMBER: Use the Edit tool in parallel and stop. Do not continue after the edits. Only include insights from the actual user conversation, never from these note-taking instructions. Do not delete or change section headers or italic _section descriptions_.`}async function TC8(){let A=nZ4(OA(),"session-memory","config","template.md");try{return await rZ4(A,{encoding:"utf-8"})}catch(q){if(q.code==="ENOENT")return cZ4;return $6(q instanceof Error?q:Error(`Failed to load custom session memory template: ${q}`)),cZ4}}async function sHY(){let A=nZ4(OA(),"session-memory","config","prompt.md");try{return await rZ4(A,{encoding:"utf-8"})}catch(q){if(q.code==="ENOENT")return lZ4();return $6(q instanceof Error?q:Error(`Failed to load custom session memory prompt: ${q}`)),lZ4()}}function tHY(A){let q={},K=A.split(` `),Y="",z=[];for(let w of K)if(w.startsWith("# ")){if(Y&&z.length>0){let _=z.join(` `).trim();q[Y]=Iz(_)}Y=w,z=[]}else z.push(w);if(Y&&z.length>0){let w=z.join(` `).trim();q[Y]=Iz(w)}return q}function eHY(A,q){let K=q>dZ4,Y=Object.entries(A).filter(([w,_])=>_>JT1).sort(([,w],[,_])=>_-w).map(([w,_])=>`- "${w}" is ~${_} tokens (limit: ${JT1})`);if(Y.length===0&&!K)return"";let z=[];if(K)z.push(` CRITICAL: The session memory file is currently ~${q} tokens, which exceeds the maximum of ${dZ4} tokens. You MUST condense the file to fit within this budget. Aggressively shorten oversized sections by removing less important details, merging related items, and summarizing older entries. Prioritize keeping "Current State" and "Errors & Corrections" accurate and detailed.`);if(Y.length>0)z.push(` ${K?"Oversized sections to condense":"IMPORTANT: The following sections exceed the per-section limit and MUST be condensed"}: ${Y.join(` `)}`);return z.join("")}function AjY(A,q){return A.replace(/\{\{(\w+)\}\}/g,(K,Y)=>Object.prototype.hasOwnProperty.call(q,Y)?q[Y]:K)}async function oZ4(A){let q=await TC8();return A.trim()===q.trim()}async function aZ4(A,q){let K=await sHY(),Y=tHY(A),z=Iz(A),w=eHY(Y,z);return AjY(K,{currentNotes:A,notesPath:q})+w}function sZ4(A){let q=A.split(` `),K=JT1*4,Y=[],z=[],w="",_=!1;for(let O of q)if(O.startsWith("# ")){let H=iZ4(w,z,K);Y.push(...H.lines),_=_||H.wasTruncated,w=O,z=[]}else z.push(O);let $=iZ4(w,z,K);return Y.push(...$.lines),_=_||$.wasTruncated,{truncatedContent:Y.join(` `),wasTruncated:_}}function iZ4(A,q,K){if(!A)return{lines:q,wasTruncated:!1};if(q.join(` `).length<=K)return{lines:[A,...q],wasTruncated:!1};let z=0,w=[A];for(let _ of q){if(z+_.length+1>K)break;w.push(_),z+=_.length+1}return w.push(` [... section truncated for length ...]`),{lines:w,wasTruncated:!0}}var JT1=2000,dZ4=12000,cZ4=` # Session Title _A short and distinctive 5-10 word descriptive title for the session. Super info dense, no filler_ # Current State _What is actively being worked on right now? Pending tasks not yet completed. Immediate next steps._ # Task specification _What did the user ask to build? Any design decisions or other explanatory context_ # Files and Functions _What are the important files? In short, what do they contain and why are they relevant?_ # Workflow _What bash commands are usually run and in what order? How to interpret their output if not obvious?_ # Errors & Corrections _Errors encountered and how they were fixed. What did the user correct? What approaches failed and should not be tried again?_ # Codebase and System Documentation _What are the important system components? How do they work/fit together?_ # Learnings _What has worked well? What has not? What to avoid? Do not duplicate items from other sections_ # Key results _If the user asked a specific output such as an answer to a question, a table, or other document, repeat the exact result here_ # Worklog _Step by step, what was attempted, done? Very terse summary for each step_ `;var VC8=k(()=>{Z8();x1();UN()});function tZ4(){MT1.forEach((A)=>A())}function Kl6(){NC8=!0,tZ4()}function eZ4(){NC8=!1,tZ4()}function AG4(){return NC8}function qG4(A){return MT1.push(A),()=>{MT1=MT1.filter((q)=>q!==A)}}var NC8=!1,MT1;var DT1=k(()=>{MT1=[]});function zG4(){let A=vC8;return vC8=null,A}function wG4(){if(!xT6)return[];return xT6.pinnedEdits}function _G4(A,q){if(xT6)xT6.pinnedEdits.push({userMessageIndex:A,block:q})}function YQ(){if(xT6&&KG4)KG4.resetCachedMCState(xT6);vC8=null}function KjY(A){if(!A.content)return 0;if(typeof A.content==="string")return Iz(A.content);return A.content.reduce((q,K)=>{if(K.type==="text")return q+Iz(K.text);else if(K.type==="image"||K.type==="document")return q+YG4;return q},0)}function uT6(A){let q=0;for(let K of A){if(K.type!=="user"&&K.type!=="assistant")continue;if(!Array.isArray(K.message.content))continue;for(let Y of K.message.content)if(Y.type==="text")q+=Iz(Y.text);else if(Y.type==="tool_result")q+=KjY(Y);else if(Y.type==="image"||Y.type==="document")q+=YG4;else q+=Iz(U6(Y))}return Math.ceil(q*1.3333333333333333)}async function zQ(A,q,K){return eZ4(),{messages:A}}var YG4=2000,wL_,KG4=null,xT6=null,vC8=null;var _L=k(()=>{UN();B1();B66();Xq();DT1();U2();pD6();BZ();q36();BH();a1();G1();wL_=new Set([u4,...dd,fY,zz,tV,VM,Yq,Y3,...[]])});function YjY(A){EC8={...EC8,...A}}function zjY(){return{...EC8}}async function wjY(){if($G4)return;$G4=!0;let A=await mx("tengu_sm_compact_config",{}),q={minTokens:A.minTokens&&A.minTokens>0?A.minTokens:XT1.minTokens,minTextBlockMessages:A.minTextBlockMessages&&A.minTextBlockMessages>0?A.minTextBlockMessages:XT1.minTextBlockMessages,maxTokens:A.maxTokens&&A.maxTokens>0?A.maxTokens:XT1.maxTokens};YjY(q)}function OG4(A){if(A.type==="assistant")return A.message.content.some((K)=>K.type==="text");if(A.type==="user"){let q=A.message.content;if(typeof q==="string")return q.length>0;if(Array.isArray(q))return q.some((K)=>K.type==="text")}return!1}function _jY(A){if(A.type!=="user")return[];let q=A.message.content;if(!Array.isArray(q))return[];let K=[];for(let Y of q)if(Y.type==="tool_result")K.push(Y.tool_use_id);return K}function $jY(A,q){if(A.type!=="assistant")return!1;let K=A.message.content;if(!Array.isArray(K))return!1;return K.some((Y)=>Y.type==="tool_use"&&q.has(Y.id))}function kC8(A,q){if(q<=0||q>=A.length)return q;let K=q,Y=[];for(let w=q;w0){let w=new Set;for(let $=K;$!w.has($)));for(let $=K-1;$>=0&&_.size>0;$--){let O=A[$];if($jY(O,_)){if(K=$,O.type==="assistant"&&Array.isArray(O.message.content)){for(let H of O.message.content)if(H.type==="tool_use"&&_.has(H.id))_.delete(H.id)}}}}let z=new Set;for(let w=K;w=0;w--){let _=A[w];if(_.type==="assistant"&&_.message.id&&z.has(_.message.id))K=w}return K}function OjY(A,q){if(A.length===0)return 0;let K=zjY(),Y=q>=0?q+1:A.length,z=0,w=0;for(let _=Y;_=K.maxTokens)return kC8(A,Y);if(z>=K.minTokens&&w>=K.minTextBlockMessages)return kC8(A,Y);for(let _=Y-1;_>=0;_--){let $=A[_],O=uT6([$]);if(z+=O,OG4($))w++;if(Y=_,z>=K.maxTokens)break;if(z>=K.minTokens&&w>=K.minTextBlockMessages)break}return kC8(A,Y)}function PT1(){if($1(process.env.ENABLE_CLAUDE_CODE_SM_COMPACT))return!0;if($1(process.env.DISABLE_CLAUDE_CODE_SM_COMPACT))return!1;let A=p8("tengu_session_memory",!1),q=p8("tengu_sm_compact",!1);return A&&q}function HjY(A,q,K,Y,z,w){let _=cE(A),$=Al6("auto",_??0,A[A.length-1]?.uuid),{truncatedContent:O,wasTruncated:H}=sZ4(q),j=Up6(O,!0,z,!0);if(H){let X=bT6();j+=` Some session memory sections were truncated for length. The full session memory can be viewed at: ${X}`}let J=[A8({content:j,isCompactSummary:!0,isVisibleInTranscriptOnly:!0})],M=_T1(w);return{boundaryMarker:$,summaryMessages:J,attachments:M?[M]:[],hookResults:Y,messagesToKeep:K,preCompactTokenCount:_,postCompactTokenCount:uT6(J),truePostCompactTokenCount:uT6(J)}}async function WT1(A,q,K){if(!PT1())return null;await wjY(),await xZ4();let Y=hZ4(),z=await jT1();if(!z)return c("tengu_sm_compact_no_session_memory",{}),null;if(await oZ4(z))return c("tengu_sm_compact_empty_template",{}),null;try{let w;if(Y){if(w=A.findIndex((D)=>D.uuid===Y),w===-1)return c("tengu_sm_compact_summarized_id_not_found",{}),null}else w=A.length-1,c("tengu_sm_compact_resumed_session",{});let _=OjY(A,w),$=A.slice(_).filter((D)=>!$L(D)),O=await VW("compact",{model:d5()}),H=ow(),j=HjY(A,z,$,O,H,q),J=Ii(j),M=uT6(J);if(K!==void 0&&M>=K)return c("tengu_sm_compact_threshold_exceeded",{postCompactTokenCount:M,autoCompactThreshold:K}),null;return{...j,postCompactTokenCount:M,truePostCompactTokenCount:M}}catch(w){return c("tengu_sm_compact_error",{}),null}}var XT1,EC8,$G4=!1;var ZT1=k(()=>{bi();jG();SA();Uk8();IT6();iz();VC8();rA();rA();B1();_L();b16();uq();Xq();G1();Z8();MA();XT1={minTokens:1e4,minTextBlockMessages:5,maxTokens:40000},EC8={...XT1}});function u16(A,q){return{name:A,compute:q,cacheBreak:!1}}function LC8(A,q,K){return{name:A,compute:q,cacheBreak:!0}}async function HG4(A){let q=ZF1();return Promise.all(A.map(async(K)=>{if(!K.cacheBreak&&q.has(K.name))return q.get(K.name)??null;let Y=await K.compute();return GF1(K.name,Y),Y}))}function GT1(){fF1()}var fT1=k(()=>{Q1()});function jG4(A){return}function JG4(A,q){Yl6.set(A,{classifier:"auto-mode",reason:q})}function MG4(A){let q=Yl6.get(A);if(!q||q.classifier!=="auto-mode")return;return q.reason}function RC8(){for(let A of yC8)A()}function VT1(A){TT1.add(A),RC8()}function wQ(A){TT1.delete(A),RC8()}function DG4(A){return yC8.add(A),()=>yC8.delete(A)}function XG4(A){return TT1.has(A)}function PG4(A){Yl6.delete(A)}function WG4(){Yl6.clear(),TT1.clear(),RC8()}var Yl6,TT1,yC8;var xi=k(()=>{Yl6=new Map,TT1=new Set,yC8=new Set});function SC8(A){let q=jjY[A],K=process.env[A];if(K===void 0)return q;return $1(K)}function mT6(){let A=ny(),q=d1(),K={"user.id":A};if(SC8("OTEL_METRICS_INCLUDE_SESSION_ID"))K["session.id"]=q;if(SC8("OTEL_METRICS_INCLUDE_VERSION"))K["app.version"]={ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.71",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-06T22:45:36Z"}.VERSION;let Y=Y9();if(Y){let{organizationUuid:z,emailAddress:w,accountUuid:_}=Y;if(z)K["organization.id"]=z;if(w)K["user.email"]=w;if(_&&SC8("OTEL_METRICS_INCLUDE_ACCOUNT_UUID"))K["user.account_uuid"]=_}if(pV.terminal)K["terminal.type"]=pV.terminal;return K}var jjY;var NT1=k(()=>{Q1();Q8();ta();Z8();bA();jjY={OTEL_METRICS_INCLUDE_SESSION_ID:!0,OTEL_METRICS_INCLUDE_VERSION:!1,OTEL_METRICS_INCLUDE_ACCOUNT_UUID:!0}});function MjY(){return $1(process.env.OTEL_LOG_USER_PROMPTS)}function vT1(A){return MjY()?A:""}async function AX(A,q={}){let K=dg1();if(!K){if(!ZG4)ZG4=!0,L(`[3P telemetry] Event dropped (no event logger initialized): ${A}`,{level:"warn"});return}let Y={...mT6(),"event.name":A,"event.timestamp":new Date().toISOString(),"event.sequence":JjY++},z=vF1();if(z)Y["prompt.id"]=z;for(let[w,_]of Object.entries(q))if(_!==void 0)Y[w]=_;K.emit({body:`claude_code.${A}`,attributes:Y})}var JjY=0,ZG4=!1;var B16=k(()=>{Q1();NT1();Z8();G1()});import{createHash as DjY}from"crypto";function fG4(){zl6.clear(),hC8.clear()}function qD(){if(!($1(process.env.ENABLE_BETA_TRACING_DETAILED)&&Boolean(process.env.BETA_TRACING_ENDPOINT)))return!1;return u7()||p8("tengu_trace_lantern",!1)}function ui(A,q=XjY){if(A.length<=q)return{content:A,truncated:!1};return{content:A.slice(0,q)+` [TRUNCATED - Content exceeds 60KB limit]`,truncated:!0}}function IC8(A){return DjY("sha256").update(A).digest("hex").slice(0,12)}function PjY(A){return`sp_${IC8(A)}`}function GG4(A){let q=U6(A.message.content);return`msg_${IC8(q)}`}function CC8(A){let q=A.trim().match(WjY);return q&&q[1]?q[1].trim():null}function ZjY(A){let q=[],K=[];for(let Y of A){let z=Y.message.content;if(typeof z==="string"){let w=CC8(z);if(w)K.push(w);else q.push(`[USER] ${z}`)}else if(Array.isArray(z)){for(let w of z)if(w.type==="text"){let _=CC8(w.text);if(_)K.push(_);else q.push(`[USER] ${w.text}`)}else if(w.type==="tool_result"){let _=typeof w.content==="string"?w.content:U6(w.content),$=CC8(_);if($)K.push($);else q.push(`[TOOL RESULT: ${w.tool_use_id}] ${_}`)}}}return{contextParts:q,systemReminders:K}}function TG4(A,q){if(!qD())return;let{content:K,truncated:Y}=ui(`[USER PROMPT] ${q}`);A.setAttributes({new_context:K,...Y&&{new_context_truncated:!0,new_context_original_length:q.length}})}function VG4(A,q,K){if(!qD())return;if(q?.systemPrompt){let Y=PjY(q.systemPrompt),z=q.systemPrompt.slice(0,500);if(A.setAttribute("system_prompt_hash",Y),A.setAttribute("system_prompt_preview",z),A.setAttribute("system_prompt_length",q.systemPrompt.length),!zl6.has(Y)){zl6.add(Y);let{content:w,truncated:_}=ui(q.systemPrompt);AX("system_prompt",{system_prompt_hash:Y,system_prompt:w,system_prompt_length:String(q.systemPrompt.length),..._&&{system_prompt_truncated:"true"}})}}if(q?.tools)try{let z=O8(q.tools).map((w)=>{let _=U6(w),$=IC8(_);return{name:typeof w.name==="string"?w.name:"unknown",hash:$,json:_}});A.setAttribute("tools",U6(z.map(({name:w,hash:_})=>({name:w,hash:_})))),A.setAttribute("tools_count",z.length);for(let{name:w,hash:_,json:$}of z)if(!zl6.has(`tool_${_}`)){zl6.add(`tool_${_}`);let{content:O,truncated:H}=ui($);AX("tool",{tool_name:wK(w),tool_hash:_,tool:O,...H&&{tool_truncated:"true"}})}}catch{A.setAttribute("tools_parse_error",!0)}if(K&&K.length>0&&q?.querySource){let Y=q.querySource,z=hC8.get(Y),w=0;if(z)for(let $=0;$$.type==="user");if(_.length>0){let{contextParts:$,systemReminders:O}=ZjY(_);if($.length>0){let j=$.join(` --- `),{content:J,truncated:M}=ui(j);A.setAttributes({new_context:J,new_context_message_count:_.length,...M&&{new_context_truncated:!0,new_context_original_length:j.length}})}if(O.length>0){let j=O.join(` --- `),{content:J,truncated:M}=ui(j);A.setAttributes({system_reminders:J,system_reminders_count:O.length,...M&&{system_reminders_truncated:!0,system_reminders_original_length:j.length}})}let H=K[K.length-1];if(H)hC8.set(Y,GG4(H))}}}function NG4(A,q){if(!qD()||!q)return;if(q.modelOutput!==void 0){let{content:K,truncated:Y}=ui(q.modelOutput);if(A["response.model_output"]=K,Y)A["response.model_output_truncated"]=!0,A["response.model_output_original_length"]=q.modelOutput.length}}function vG4(A,q,K){if(!qD())return;let{content:Y,truncated:z}=ui(`[TOOL RESULT: ${q}] ${K}`);if(A.new_context=Y,z)A.new_context_truncated=!0,A.new_context_original_length=K.length}var zl6,hC8,XjY=61440,WjY;var wl6=k(()=>{Z8();B16();ij();Q1();rA();a1();zl6=new Set,hC8=new Map;WjY=/^\n?([\s\S]*?)\n?<\/system-reminder>$/});function Bi(){YQ(),GT1(),WG4(),ET1(),DN8(),Wi(),fG4(),bC8()}var kT1=k(()=>{_L();fT1();MW();xi();gT();sD();wl6();uq()});function Hz6(A){let q=Math.min(ec6(A),fjY);return XM(A,kj())-q}function _l6(A){let q=Hz6(A),K=q-xC8,Y=process.env.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE;if(Y){let z=parseFloat(Y);if(!isNaN(z)&&z>0&&z<=100){let w=Math.floor(q*(z/100));return Math.min(w,K)}}return K}function Aw6(A,q){let K=_l6(q),Y=rS()?K:Hz6(q),z=Math.max(0,Math.round((Y-A)/Y*100)),w=Y-TjY,_=Y-VjY,$=A>=w,O=A>=_,H=rS()&&A>=K,J=XM(q,kj())-uC8,M=process.env.CLAUDE_CODE_BLOCKING_LIMIT_OVERRIDE,D=M?parseInt(M,10):NaN,X=!isNaN(D)&&D>0?D:J,P=A>=X;return{percentLeft:z,isAboveWarningThreshold:$,isAboveErrorThreshold:O,isAboveAutoCompactThreshold:H,isAtBlockingLimit:P}}function rS(){if($1(process.env.DISABLE_COMPACT))return!1;if($1(process.env.DISABLE_AUTO_COMPACT))return!1;return T1().autoCompactEnabled}async function NjY(A,q,K,Y=0){if(K==="session_memory"||K==="compact")return!1;if(!rS())return!1;let z=HG(A)-Y,w=_l6(q),_=Hz6(q);L(`autocompact: tokens=${z} threshold=${w} effectiveWindow=${_}${Y>0?` snipFreed=${Y}`:""}`);let{isAboveAutoCompactThreshold:$}=Aw6(z,q);return $}async function kG4(A,q,K,Y,z,w){if($1(process.env.DISABLE_COMPACT))return{wasCompacted:!1};let _=q.options.mainLoopModel;if(!await NjY(A,_,Y,w))return{wasCompacted:!1};let O={isRecompactionInChain:z?.compacted===!0,turnsSincePreviousCompact:z?.turnCounter??-1,previousCompactTurnId:z?.turnId,autoCompactThreshold:_l6(_),querySource:Y},H=await WT1(A,q.agentId,O.autoCompactThreshold);if(H)return x16(void 0),Bi(),{wasCompacted:!0,compactionResult:H};try{let j=await RT6(A,q,K,!0,void 0,!0,O);return x16(void 0),Bi(),{wasCompacted:!0,compactionResult:j}}catch(j){if(!pa(j,hi))$6(j);return{wasCompacted:!1}}}var fjY=20000,xC8=13000,TjY=20000,VjY=20000,uC8=3000;var Zi=k(()=>{jG();bi();x1();G1();Q8();MA();zH();PM();Q1();Z8();ZT1();IT6();kT1();B66();rA()});var EG4=344;async function yG4({tools:A,signal:q,isNonInteractiveSession:K,lastAssistantText:Y}){if(A.length===0)return null;try{let z=A.map((O)=>{let H=LG4(O.input,300),j=LG4(O.output,300);return`Tool: ${O.name} Input: ${H} Output: ${j}`}).join(` `),w=Y?`User's intent (from assistant's last message): ${Y.slice(0,200)} `:"";return(await PG({systemPrompt:MK([vjY]),userPrompt:`${w}Tools completed: ${z} Provide a brief summary of what was accomplished:`,signal:q,options:{querySource:"tool_use_summary_generation",enablePromptCaching:!0,agents:[],isNonInteractiveSession:K,hasAppendSystemPrompt:!1,mcpTools:[]}})).message.content.filter((O)=>O.type==="text").map((O)=>O.type==="text"?O.text:"").join("").trim()||null}catch(z){let w=z instanceof Error?z:Error(String(z));return w.cause={errorId:EG4},$6(w),null}}function LG4(A,q){try{let K=U6(A);if(K.length<=q)return K;return K.slice(0,q-3)+"..."}catch{return"[unable to serialize]"}}var vjY=`You summarize what was accomplished by a coding assistant. Given the tools executed and their results, provide a brief summary. Rules: - Use past tense (e.g., "Read package.json", "Fixed type error in utils.ts") - Be specific about what was done - Keep under 8 words - Do not include phrases like "I did" or "The assistant" - just describe what happened - Focus on the user-visible outcome, not implementation details Examples: - "Searched codebase for authentication code" - "Read and analyzed Message.tsx component" - "Fixed null pointer exception in data processor" - "Created new user registration endpoint" - "Ran tests and fixed 3 failing assertions"`;var RG4=k(()=>{zH();a1();x1()});function CG4(A){SG4=A}function gx(A,q){SG4?.(A,q)}var SG4=null;function yT1(){if(!BC8)BC8=g6("perf_hooks").performance;return BC8}function EjY(){let A=yT1(),q=A.getEntriesByType("mark");for(let K of q)if(K.name.startsWith(Ol6))A.clearMarks(K.name)}function gC8(){if(!u7())return;if(!mC8)return;if($l6++,EjY(),yT1().mark(`${Ol6}turn_start`),LT1)L(`[headlessProfiler] Started turn ${$l6}`)}function qw6(A){if(!u7())return;if(!mC8)return;let q=yT1();if(q.mark(`${Ol6}${A}`),LT1)L(`[headlessProfiler] Checkpoint: ${A} at ${q.now().toFixed(1)}ms`)}function FC8(){if(!u7())return;if(!mC8)return;let K=yT1().getEntriesByType("mark").filter((j)=>j.name.startsWith(Ol6));if(K.length===0)return;let Y=new Map;for(let j of K){let J=j.name.slice(Ol6.length);Y.set(J,j.startTime)}let z=Y.get("turn_start");if(z===void 0)return;let w={turn_number:$l6},_=Y.get("system_message_yielded");if(_!==void 0&&$l6===0)w.time_to_system_message_ms=Math.round(_);let $=Y.get("query_started");if($!==void 0)w.time_to_query_start_ms=Math.round($-z);let O=Y.get("first_chunk");if(O!==void 0)w.time_to_first_response_ms=Math.round(O-z);let H=Y.get("api_request_sent");if($!==void 0&&H!==void 0)w.query_overhead_ms=Math.round(H-$);if(w.checkpoint_count=K.length,process.env.CLAUDE_CODE_ENTRYPOINT)w.entrypoint=process.env.CLAUDE_CODE_ENTRYPOINT;if(hG4)c("tengu_headless_latency",w);if(LT1)L(`[headlessProfiler] Turn ${$l6} metrics: ${U6(w)}`)}var LT1,kjY=0.05,hG4,mC8,BC8=null,Ol6="headless_",$l6=-1;var Hl6=k(()=>{G1();B1();Q1();a1();LT1=process.env.CLAUDE_CODE_PROFILE_STARTUP==="1",hG4=Math.random(){Ez();my_=`Wait for a specified duration. The user can interrupt the sleep at any time. Use this when the user tells you to sleep or rest, when you have nothing to do, or when you're waiting for something. You may receive <${Qk}> prompts — these are periodic check-ins. Look for useful work to do before sleeping. You can call this concurrently with other tools — it won't interfere with them. Prefer this over \`Bash(sleep ...)\` — it doesn't hold a shell process. Each wake-up costs an API call, but the prompt cache expires after 5 minutes of inactivity — balance accordingly.`});function bG4(A){IG4.push(A)}async function xG4(A,q,K,Y,z,w){let _={messages:A,systemPrompt:q,userContext:K,systemContext:Y,toolUseContext:z,querySource:w};for(let $ of IG4)try{await $(_)}catch(O){$6(O instanceof Error?O:Error(`Post-sampling hook failed: ${O}`))}}var IG4;var Jl6=k(()=>{x1();IG4=[]});import{dirname as py_,join as LjY}from"path";function ST1(A){RT1.delete(A)}function uG4(){RT1.clear()}function RjY(A){return}function SjY(A){return LjY(OA(),"dump-prompts",`${A??d1()}.jsonl`)}function BG4(A){let q=SjY(A);return async(K,Y)=>{let z=RT1.get(A);if(!z)z={initialized:!1,messageCountSeen:0,lastInitDataHash:""},RT1.set(A,z);let w;if(Y?.method==="POST"&&Y.body)try{let $=O8(Y.body);w=new Date().toISOString(),RjY($)}catch{}let _=await globalThis.fetch(K,Y);return w&&_.ok,_}}var yjY=5,QC8,RT1;var m16=k(()=>{Q1();Z8();a1();QC8=[],RT1=new Map});function pC8(A){return CjY.includes(A)}function dC8(A,q,K,Y){let z;if(A.getPath&&q){let w=A.inputSchema.safeParse(q);if(w.success){let _=A.getPath(w.data);if(_)z=g16(_)}}return{decision:K,source:Y,tool_name:A.name,...z&&{language:z}}}function hjY(A){if(A.type==="classifier")return"classifier";switch(A.type){case"hook":return"hook";case"user":return A.permanent?"user_permanent":"user_temporary";case"user_abort":return"user_abort";case"user_reject":return"user_reject";default:return"unknown"}}function gT6(A,q,K){return{messageID:A,toolName:wK(q),sandboxEnabled:mA.isSandboxingEnabled(),...K!==void 0&&{waiting_for_user_permission_ms:K}}}function IjY(A,q,K,Y){if(K==="config"){c("tengu_tool_use_granted_in_config",gT6(q,A.name,void 0));return}if(K.type==="classifier"){c("tengu_tool_use_granted_by_classifier",gT6(q,A.name,Y));return}switch(K.type){case"user":c(K.permanent?"tengu_tool_use_granted_in_prompt_permanent":"tengu_tool_use_granted_in_prompt_temporary",gT6(q,A.name,Y));break;case"hook":c("tengu_tool_use_granted_by_permission_hook",{...gT6(q,A.name,Y),permanent:K.permanent??!1});break;default:break}}function bjY(A,q,K,Y){if(K==="config"){c("tengu_tool_use_denied_in_config",gT6(q,A.name,void 0));return}c("tengu_tool_use_rejected_in_prompt",{...gT6(q,A.name,Y),...K.type==="hook"?{isHook:!0}:{hasFeedback:K.type==="user_reject"?K.hasFeedback:!1}})}function CT1(A,q,K){let{tool:Y,input:z,toolUseContext:w,messageId:_,toolUseID:$}=A,{decision:O,source:H}=q,j=K!==void 0?Date.now()-K:void 0;if(q.decision==="accept")IjY(Y,_,q.source,j);else bjY(Y,_,q.source,j);let J=H==="config"?"config":hjY(H);if(pC8(Y.name)){let M=dC8(Y,z,O,J);HR6()?.add(1,M)}if(!w.toolDecisions)w.toolDecisions=new Map;w.toolDecisions.set($,{source:J,decision:O,timestamp:Date.now()}),AX("tool_decision",{decision:O,source:J,tool_name:wK(Y.name)})}var CjY;var hT1=k(()=>{B1();ij();Q1();B16();p7();Pw();CjY=["Edit","Write","NotebookEdit"]});function gG4(A){let q=0;for(let K=0;K0?Math.round(w/(_/1000)*100)/100:void 0,J=$!==void 0&&_!==void 0?$-_:void 0,M=J!==void 0&&O!==void 0&&J>0?Math.round(O/(J/1000)*100)/100:void 0,D=H!==void 0&&w!==void 0&&w>0?Math.round(H/w*1e4)/100:void 0,X=q.requestSetupMs,P=q.attemptStartTimes,W={...K.args,ttft_ms:_,ttlt_ms:$,prompt_tokens:w,output_tokens:O,cache_read_tokens:H,cache_creation_tokens:q.cacheCreationTokens,message_id:q.messageId??K.args.message_id,success:q.success??!0,error:q.error,duration_ms:z/1000,request_setup_ms:X,itps:j,otps:M,cache_hit_rate_pct:D},Z=X!==void 0&&X>0?X*1000:0;if(Z>0){let G=K.startTime+Z;if(qX.push({name:"Request Setup",cat:"api,setup",ph:"B",ts:K.startTime,pid:K.agentInfo.processId,tid:K.agentInfo.threadId,args:{request_setup_ms:X,attempt_count:P?.length??1}}),P&&P.length>1){let f=P[0];for(let V=0;V0)qX.push({name:"Sampling",cat:"api,sampling",ph:"B",ts:f,pid:K.agentInfo.processId,tid:K.agentInfo.threadId,args:{sampling_ms:V,output_tokens:O,otps:M}}),qX.push({name:"Sampling",cat:"api,sampling",ph:"E",ts:f+V*1000,pid:K.agentInfo.processId,tid:K.agentInfo.threadId})}qX.push({name:K.name,cat:K.category,ph:"E",ts:Y,pid:K.agentInfo.processId,tid:K.agentInfo.threadId,args:W}),KD.delete(A)}function dG4(A,q){if(!PC)return"";let K=xT1(),Y=bT1();return KD.set(K,{name:`Tool: ${A}`,category:"tool",startTime:F16(),agentInfo:Y,args:{tool_name:A,...q}}),qX.push({name:`Tool: ${A}`,cat:"tool",ph:"B",ts:KD.get(K).startTime,pid:Y.processId,tid:Y.threadId,args:KD.get(K).args}),K}function cG4(A,q){if(!PC||!A)return;let K=KD.get(A);if(!K)return;let Y=F16(),z=Y-K.startTime,w={...K.args,success:q?.success??!0,error:q?.error,result_tokens:q?.resultTokens,duration_ms:z/1000};qX.push({name:K.name,cat:K.category,ph:"E",ts:Y,pid:K.agentInfo.processId,tid:K.agentInfo.threadId,args:w}),KD.delete(A)}function lG4(A){if(!PC)return"";let q=xT1(),K=bT1();return KD.set(q,{name:"Waiting for User Input",category:"user_input",startTime:F16(),agentInfo:K,args:{context:A}}),qX.push({name:"Waiting for User Input",cat:"user_input",ph:"B",ts:KD.get(q).startTime,pid:K.processId,tid:K.threadId,args:KD.get(q).args}),q}function iG4(A,q){if(!PC||!A)return;let K=KD.get(A);if(!K)return;let Y=F16(),z=Y-K.startTime,w={...K.args,decision:q?.decision,source:q?.source,duration_ms:z/1000};qX.push({name:K.name,cat:K.category,ph:"E",ts:Y,pid:K.agentInfo.processId,tid:K.agentInfo.threadId,args:w}),KD.delete(A)}function nG4(A){if(!PC)return"";let q=xT1(),K=bT1();return KD.set(q,{name:"Interaction",category:"interaction",startTime:F16(),agentInfo:K,args:{user_prompt_length:A?.length}}),qX.push({name:"Interaction",cat:"interaction",ph:"B",ts:KD.get(q).startTime,pid:K.processId,tid:K.threadId,args:KD.get(q).args}),q}function rG4(A){if(!PC||!A)return;let q=KD.get(A);if(!q)return;let K=F16(),Y=K-q.startTime;qX.push({name:q.name,cat:q.category,ph:"E",ts:K,pid:q.agentInfo.processId,tid:q.agentInfo.threadId,args:{...q.args,duration_ms:Y/1000}}),KD.delete(A)}var PC=!1,qX,KD,IT1,mG4=0,xjY=0,ujY=0,cC8=1,lC8;var FT6=k(()=>{Z8();Q1();a1();sz();sY();G1();MA();qX=[],KD=new Map,IT1=new Map,lC8=new Map});import{AsyncLocalStorage as sG4}from"async_hooks";function FJ(A){return A.spanContext().spanId||""}function gjY(){if(aG4)return;aG4=!0;let A=setInterval(()=>{let q=Date.now()-mjY;for(let[K,Y]of t2){let z=Y.deref();if(z===void 0)t2.delete(K),_v.delete(K);else if(z.startTime";oG4++;let w=QT6("interaction",{user_prompt:z,user_prompt_length:A.length,"interaction.sequence":oG4}),_=K.startSpan("claude_code.interaction",{attributes:w});TG4(_,A);let $=FJ(_),O={span:_,startTime:Date.now(),attributes:w,perfettoSpanId:q};return t2.set($,new WeakRef(O)),Q16.enterWith(O),_}function Ml6(){let A=Q16.getStore();if(!A)return;if(A.ended)return;if(A.perfettoSpanId)rG4(A.perfettoSpanId);if(!Fx()){A.ended=!0,t2.delete(FJ(A.span)),Q16.enterWith(void 0);return}let q=Date.now()-A.startTime;A.span.setAttributes({"interaction.duration_ms":q}),A.span.end(),A.ended=!0,t2.delete(FJ(A.span)),Q16.enterWith(void 0)}function eG4(A,q,K,Y){let z=mi()?UG4({model:A,querySource:q?.querySource,messageId:void 0}):void 0;if(!Fx()){if(z){let M=e2.trace.getActiveSpan()||kG().startSpan("dummy"),D=FJ(M),X={span:M,startTime:Date.now(),attributes:{model:A},perfettoSpanId:z};return t2.set(D,new WeakRef(X)),_v.set(D,X),M}return e2.trace.getActiveSpan()||kG().startSpan("dummy")}let w=kG(),_=Q16.getStore(),$=QT6("llm_request",{model:A,"llm_request.context":_?"interaction":"standalone",speed:Y?"fast":"normal"}),O=_?e2.trace.setSpan(e2.context.active(),_.span):e2.context.active(),H=w.startSpan("claude_code.llm_request",{attributes:$},O);if(q?.querySource)H.setAttribute("query_source",q.querySource);VG4(H,q,K);let j=FJ(H),J={span:H,startTime:Date.now(),attributes:$,perfettoSpanId:z};return t2.set(j,new WeakRef(J)),_v.set(j,J),H}function nC8(A,q){let K;if(A){let _=FJ(A);K=t2.get(_)?.deref()}else for(let[,_]of Array.from(t2.entries()).reverse()){let $=_.deref();if($===void 0)continue;if($.attributes["span.type"]==="llm_request"||$.attributes.model){K=$;break}}if(!K)return;let Y=Date.now()-K.startTime;if(K.perfettoSpanId)pG4(K.perfettoSpanId,{ttftMs:q?.ttftMs,ttltMs:Y,promptTokens:q?.inputTokens,outputTokens:q?.outputTokens,cacheReadTokens:q?.cacheReadTokens,cacheCreationTokens:q?.cacheCreationTokens,success:q?.success,error:q?.error,requestSetupMs:q?.requestSetupMs,attemptStartTimes:q?.attemptStartTimes});if(!Fx()){let _=FJ(K.span);t2.delete(_),_v.delete(_);return}let z={duration_ms:Y};if(q){if(q.inputTokens!==void 0)z.input_tokens=q.inputTokens;if(q.outputTokens!==void 0)z.output_tokens=q.outputTokens;if(q.cacheReadTokens!==void 0)z.cache_read_tokens=q.cacheReadTokens;if(q.cacheCreationTokens!==void 0)z.cache_creation_tokens=q.cacheCreationTokens;if(q.success!==void 0)z.success=q.success;if(q.statusCode!==void 0)z.status_code=q.statusCode;if(q.error!==void 0)z.error=q.error;if(q.attempt!==void 0)z.attempt=q.attempt;if(q.hasToolCall!==void 0)z["response.has_tool_call"]=q.hasToolCall;if(q.ttftMs!==void 0)z.ttft_ms=q.ttftMs;NG4(z,q)}K.span.setAttributes(z),K.span.end();let w=FJ(K.span);t2.delete(w),_v.delete(w)}function Af4(A,q){let K=mi()?dG4(A,q):void 0;if(!Fx()){if(K){let j=e2.trace.getActiveSpan()||kG().startSpan("dummy"),J=FJ(j),M={span:j,startTime:Date.now(),attributes:{"span.type":"tool",tool_name:A},perfettoSpanId:K};return t2.set(J,new WeakRef(M)),gi.enterWith(M),j}return e2.trace.getActiveSpan()||kG().startSpan("dummy")}let Y=kG(),z=Q16.getStore(),w=QT6("tool",{tool_name:A,...q}),_=z?e2.trace.setSpan(e2.context.active(),z.span):e2.context.active(),$=Y.startSpan("claude_code.tool",{attributes:w},_),O=FJ($),H={span:$,startTime:Date.now(),attributes:w,perfettoSpanId:K};return t2.set(O,new WeakRef(H)),gi.enterWith(H),$}function qf4(){let A=mi()?lG4("tool_permission"):void 0;if(!Fx()){if(A){let O=e2.trace.getActiveSpan()||kG().startSpan("dummy"),H=FJ(O),j={span:O,startTime:Date.now(),attributes:{"span.type":"tool.blocked_on_user"},perfettoSpanId:A};return t2.set(H,new WeakRef(j)),_v.set(H,j),O}return e2.trace.getActiveSpan()||kG().startSpan("dummy")}let q=kG(),K=gi.getStore(),Y=QT6("tool.blocked_on_user"),z=K?e2.trace.setSpan(e2.context.active(),K.span):e2.context.active(),w=q.startSpan("claude_code.tool.blocked_on_user",{attributes:Y},z),_=FJ(w),$={span:w,startTime:Date.now(),attributes:Y,perfettoSpanId:A};return t2.set(_,new WeakRef($)),_v.set(_,$),w}function rC8(A,q){let K;for(let[,_]of Array.from(t2.entries()).reverse()){let $=_.deref();if($===void 0)continue;if($.attributes["span.type"]==="tool.blocked_on_user"){K=$;break}}if(!K)return;if(K.perfettoSpanId)iG4(K.perfettoSpanId,{decision:A,source:q});if(!Fx()){let _=FJ(K.span);t2.delete(_),_v.delete(_);return}let z={duration_ms:Date.now()-K.startTime};if(A)z.decision=A;if(q)z.source=q;K.span.setAttributes(z),K.span.end();let w=FJ(K.span);t2.delete(w),_v.delete(w)}function Kf4(){if(!Fx())return e2.trace.getActiveSpan()||kG().startSpan("dummy");let A=kG(),q=gi.getStore(),K=QT6("tool.execution"),Y=q?e2.trace.setSpan(e2.context.active(),q.span):e2.context.active(),z=A.startSpan("claude_code.tool.execution",{attributes:K},Y),w=FJ(z),_={span:z,startTime:Date.now(),attributes:K};return t2.set(w,new WeakRef(_)),_v.set(w,_),z}function oC8(A){if(!Fx())return;let q;for(let[,w]of Array.from(t2.entries()).reverse()){let _=w.deref();if(_===void 0)continue;if(_.attributes["span.type"]==="tool.execution"){q=_;break}}if(!q)return;let Y={duration_ms:Date.now()-q.startTime};if(A){if(A.success!==void 0)Y.success=A.success;if(A.error!==void 0)Y.error=A.error}q.span.setAttributes(Y),q.span.end();let z=FJ(q.span);t2.delete(z),_v.delete(z)}function BT1(A,q){let K=gi.getStore();if(!K)return;if(K.perfettoSpanId)cG4(K.perfettoSpanId,{success:!0,resultTokens:q});if(!Fx()){let _=FJ(K.span);t2.delete(_),gi.enterWith(void 0);return}let z={duration_ms:Date.now()-K.startTime};if(A){let _=K.attributes.tool_name||"unknown";vG4(z,_,A)}if(q!==void 0)z.result_tokens=q;K.span.setAttributes(z),K.span.end();let w=FJ(K.span);t2.delete(w),gi.enterWith(void 0)}function FjY(){return $1(process.env.OTEL_LOG_TOOL_CONTENT)}function Yf4(A,q){if(!Fx()||!FjY())return;let K=gi.getStore();if(!K)return;let Y={};for(let[z,w]of Object.entries(q))if(typeof w==="string"){let{content:_,truncated:$}=ui(w);if(Y[z]=_,$)Y[`${z}_truncated`]=!0,Y[`${z}_original_length`]=w.length}else Y[z]=w;K.span.addEvent(A,Y)}function zf4(A,q,K,Y){if(!qD())return e2.trace.getActiveSpan()||kG().startSpan("dummy");let z=kG(),w=gi.getStore()??Q16.getStore(),_=QT6("hook",{hook_event:A,hook_name:q,num_hooks:K,hook_definitions:Y}),$=w?e2.trace.setSpan(e2.context.active(),w.span):e2.context.active(),O=z.startSpan("claude_code.hook",{attributes:_},$),H=FJ(O),j={span:O,startTime:Date.now(),attributes:_};return t2.set(H,new WeakRef(j)),_v.set(H,j),O}function wf4(A,q){if(!qD())return;let K=FJ(A),Y=t2.get(K)?.deref();if(!Y)return;let w={duration_ms:Date.now()-Y.startTime};if(q){if(q.numSuccess!==void 0)w.num_success=q.numSuccess;if(q.numBlocking!==void 0)w.num_blocking=q.numBlocking;if(q.numNonBlockingError!==void 0)w.num_non_blocking_error=q.numNonBlockingError;if(q.numCancelled!==void 0)w.num_cancelled=q.numCancelled}Y.span.setAttributes(w),Y.span.end(),t2.delete(K),_v.delete(K)}var e2,Q16,gi,t2,_v,oG4=0,aG4=!1,mjY=1800000;var U16=k(()=>{rA();NT1();Z8();wl6();FT6();e2=e(nq(),1),Q16=new sG4,gi=new sG4,t2=new Map,_v=new Map});import{randomUUID as QjY}from"crypto";function UT6(){return!1}function Of4(A){return A.some((q)=>{if(q.type!=="user")return!1;let K=q.message.content;if(!Array.isArray(K))return!1;return K.some((Y)=>Y.type==="text"&&Y.text.includes($f4))})}function Hf4(A,q){let K={...q,uuid:QjY(),message:{...q.message,content:[...q.message.content]}},Y=q.message.content.filter((_)=>_.type==="tool_use");if(Y.length===0)return L(`No tool_use blocks found in assistant message for fork directive: ${A.slice(0,50)}...`,{level:"error"}),[A8({content:[{type:"text",text:_f4(A)}]})];let z=Y.map((_)=>({type:"tool_result",tool_use_id:_.id,content:[{type:"text",text:pjY}]})),w=A8({content:[...z,{type:"text",text:_f4(A)}]});return[K,w]}function _f4(A){return`STOP. READ THIS FIRST. ${$f4}. You are NOT the main agent. RULES (non-negotiable): 1. Your system prompt says "default to forking." IGNORE IT — that's for the parent. You ARE the fork. Do NOT spawn sub-agents; execute directly. 2. Do NOT converse, ask questions, or suggest next steps 3. Do NOT editorialize or add meta-commentary 4. USE your tools directly: Bash, Read, Write, etc. 5. If you modify files, commit your changes before reporting. Include the commit hash in your report. 6. Do NOT emit text between tool calls. Use tools silently, then report once at the end. 7. Stay strictly within your directive's scope. If you discover related systems outside your scope, mention them in one sentence at most — other workers cover those areas. 8. Keep your report under 500 words unless the directive specifies otherwise. Be factual and concise. 9. Your response MUST begin with "Scope:". No preamble, no thinking-out-loud. 10. REPORT structured facts, then stop Your directive: ${A} Output format (plain text labels, not markdown headers): Scope: Result: Key files: Files changed: Issues: `}function jf4(A,q){return`You've inherited the conversation context above from a parent agent working in ${A}. You are operating in an isolated git worktree at ${q} — same repository, same relative file structure, separate working copy. Paths in the inherited context refer to the parent's working directory; translate them to your worktree root. Re-read files before editing if the parent may have modified them since they appear in the context. Your changes stay in this worktree and will not affect the parent's files.`}var UjY="fork",pT6,$f4="You are a forked worker process",pjY="Fork started — processing in background";var aC8=k(()=>{rA();SA();G1();pT6={agentType:UjY,whenToUse:"Implicit fork — inherits full conversation context. Not selectable via subagent_type; triggered by omitting subagent_type when the fork experiment is active.",tools:["*"],maxTurns:200,model:"inherit",permissionMode:"bubble",source:"built-in",baseDir:"built-in",getSystemPrompt:()=>""}});function djY(A){let{tools:q,disallowedTools:K}=A,Y=q&&q.length>0,z=K&&K.length>0;if(Y&&z){let w=new Set(K),_=q.filter(($)=>!w.has($));if(_.length===0)return"None";return _.join(", ")}else if(Y)return q.join(", ");else if(z)return`All tools except ${K.join(", ")}`;return"All tools"}async function Jf4(A,q,K){let Y=K?A.filter((P)=>K.includes(P.agentType)):A,z=UT6(),w=z?` ## When to fork Fork yourself (omit \`subagent_type\`) whenever the intermediate tool output isn't worth keeping: - **Research**: you need to investigate several files, modules, or questions that don't depend on each other. Launch one fork per area. - **Implementation**: the fix is well-understood. Fork it even if you're just going to wait — the diff/log/regen noise dies with the fork. Forks are cheap because they share your prompt cache. A sequential chain is fine to hand to a single fork; it doesn't need to be parallelizable. A single fork's commands run sequentially. **Don't peek.** The tool result includes an \`output_file\` path — do not Read or tail it unless the user explicitly asks for a progress check. You get a completion notification; trust it. Reading the transcript mid-flight pulls the fork's tool noise into your context, which defeats the point of forking. **Don't race.** After launching, you know nothing about what the fork found. Never fabricate or predict fork results in any format — not as prose, summary, or structured output. The notification arrives as a user-role message in a later turn; it is never something you write yourself. If the user asks a follow-up before the notification lands, tell them the fork is still running — give status, not a guess. `:"",_=z?` ## Writing the prompt How you write the prompt depends on whether the agent inherits your context. **When you omit \`subagent_type\`** — the agent inherits your full conversation context. It already knows everything you know. The prompt is a *directive*: what to do, not what the situation is. - Be specific about scope: what's in, what's out, what another agent is handling. - Don't re-explain background — the agent has it. - If you need a short response, say so ("report in under 200 words"). - Lookups: hand over the exact command. Investigations: hand over the question — prescribed steps become dead weight when the premise is wrong. **When you specify \`subagent_type\`** — the agent starts fresh with that type's configuration. It has zero context: hasn't seen this conversation, doesn't know what you've tried, doesn't understand why this task matters. - Brief it like a smart colleague who just walked into the room. Explain what you're trying to accomplish and why. - Describe what you've already learned or ruled out. - Give enough context about the surrounding problem that the agent can make judgment calls rather than just following a narrow instruction. - Terse, command-style prompts produce shallow, generic work. **Either way — never delegate understanding.** Don't write "based on your findings, fix the bug" or "based on the research, implement it." Those phrases push synthesis onto the agent instead of doing it yourself. Write prompts that prove you understood: include file paths, line numbers, what specifically to change. `:"",$=`Example usage: user: "What's left on this branch before we can ship?" assistant: Forking this — it's a survey question. I want the punch list, not the git output in my context. ${Tq}({ description: "Branch ship-readiness audit", prompt: "Audit what's left before this branch can ship. Check: uncommitted changes, commits ahead of main, whether tests exist, whether the GrowthBook gate is wired up, whether CI-relevant files changed. Report a punch list — done vs. missing. Under 200 words." }) assistant: Ship-readiness audit running. Turn ends here. The coordinator knows nothing about the findings yet. What follows is a SEPARATE turn — the notification arrives from outside, as a user-role message. It is not something the coordinator writes. [later turn — notification arrives as user message] assistant: Audit's back. Three blockers: no tests for the new prompt path, GrowthBook gate wired but not in build_flags.yaml, and one uncommitted file. user: "so is the gate wired up or not" User asks mid-wait. The audit fork was launched to answer exactly this, and it hasn't returned. The coordinator does not have this answer. Give status, not a fabricated result. assistant: Still waiting on the audit — that's one of the things it's checking. Should land shortly. user: "Can you get a second opinion on whether this migration is safe?" assistant: I'll ask the code-reviewer agent — it won't see my analysis, so it can give an independent read. A subagent_type is specified, so the agent starts fresh. It needs full context in the prompt. The briefing explains what to assess and why. ${Tq}({ description: "Independent migration review", subagent_type: "code-reviewer", prompt: "Review migration 0042_user_schema.sql for safety. Context: we're adding a NOT NULL column to a 50M-row table. Existing rows get a backfill default. I want a second opinion on whether the backfill approach is safe under concurrent writes — I've checked locking behavior but want independent verification. Report: is this safe, and if not, what specifically breaks?" }) `,O=`Example usage: "test-runner": use this agent after you are done writing code to run tests "greeting-responder": use this agent to respond to user greetings with a friendly joke user: "Please write a function that checks if a number is prime" assistant: I'm going to use the ${Y3} tool to write the following code: function isPrime(n) { if (n <= 1) return false for (let i = 2; i * i <= n; i++) { if (n % i === 0) return false } return true } Since a significant piece of code was written and the task was completed, now use the test-runner agent to run the tests assistant: Uses the ${dT6.name} tool to launch the test-runner agent user: "Hello" Since the user is greeting, use the greeting-responder agent to respond with a friendly joke assistant: "I'm going to use the ${dT6.name} tool to launch the greeting-responder agent" `,H=Y.map((P)=>{let W=djY(P);return`- ${P.agentType}: ${P.whenToUse} (Tools: ${W})`}).join(` `),j=`Launch a new agent to handle complex, multi-step tasks autonomously. The ${Tq} tool launches specialized agents (subprocesses) that autonomously handle complex tasks. Each agent type has specific capabilities and tools available to it. Available agent types and the tools they have access to: ${H} ${z?`When using the ${Tq} tool, specify a subagent_type to use a specialized agent, or omit it to fork yourself — a fork inherits your full conversation context.`:`When using the ${Tq} tool, specify a subagent_type parameter to select which agent type to use. If omitted, the general-purpose agent is used.`}`;if(q)return j;let J=cH(),M=J?"`find` via the Bash tool":`the ${zz} tool`,D=J?"`grep` via the Bash tool":`the ${zz} tool`,X=z?"":` When NOT to use the ${Tq} tool: - If you want to read a specific file path, use the ${u4} tool or ${M} instead of the ${Tq} tool, to find the match more quickly - If you are searching for a specific class definition like "class Foo", use ${D} instead, to find the match more quickly - If you are searching for code within a specific file or set of 2-3 files, use the ${u4} tool instead of the ${Tq} tool, to find the match more quickly - Other tasks that are not related to the agent descriptions above `;return`${j} ${X} Usage notes: - Always include a short description (3-5 words) summarizing what the agent will do${K3()!=="pro"?` - Launch multiple agents concurrently whenever possible, to maximize performance; to do that, use a single message with multiple tool uses`:""} - When the agent is done, it will return a single message back to you. The result returned by the agent is not visible to the user. To show the user the result, you should send a text message back to the user with a concise summary of the result.${!$1(process.env.CLAUDE_CODE_DISABLE_BACKGROUND_TASKS)&&!AW()&&!z?` - You can optionally run agents in the background using the run_in_background parameter. When an agent runs in the background, you will be automatically notified when it completes — do NOT sleep, poll, or proactively check on its progress. Continue with other work or respond to the user instead. - **Foreground vs background**: Use foreground (default) when you need the agent's results before you can proceed — e.g., research agents whose findings inform your next steps. Use background when you have genuinely independent work to do in parallel.`:""} - Agents can be resumed using the \`resume\` parameter by passing the agent ID from a previous invocation. When resumed, the agent continues with its full previous context preserved. ${z?"When NOT resuming and you specify a subagent_type, each invocation starts fresh and you should provide a detailed task description with all necessary context.":"When NOT resuming, each invocation starts fresh and you should provide a detailed task description with all necessary context."} - When the agent is done, it will return a single message back to you along with its agent ID. You can use this ID to resume the agent later if needed for follow-up work. ${!z?`- Provide clear, detailed prompts so the agent can work autonomously and return exactly the information you need. `:""}- The agent's outputs should generally be trusted - Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, web fetches, etc.)${z?"":", since it is not aware of the user's intent"} - If the agent description mentions that it should be used proactively, then you should try your best to use it without the user having to ask for it first. Use your judgement. - If the user specifies that they want you to run agents "in parallel", you MUST send a single message with multiple ${dT6.name} tool use content blocks. For example, if you need to launch both a build-validator agent and a test-runner agent in parallel, send a single message with both tool calls. - You can optionally set \`isolation: "worktree"\` to run the agent in a temporary git worktree, giving it an isolated copy of the repository. The worktree is automatically cleaned up if the agent makes no changes; if changes are made, the worktree path and branch are returned in the result.${AW()?` - The run_in_background, name, team_name, and mode parameters are not available in this context. Only synchronous subagents are supported.`:Oz()?` - The name, team_name, and mode parameters are not available in this context — teammates cannot spawn other teammates. Omit them to spawn a subagent.`:""}${w}${_} ${z?$:O}`}var Mf4=k(()=>{mT1();U2();BH();bA();Z8();Ax();lE();sz();aC8()});import{randomBytes as cjY}from"crypto";function OL(A){if(typeof A!=="string")return null;return ljY.test(A)?A:null}function Qx(A){let q=cjY(8).toString("hex");return A?`a${A}-${q}`:`a${q}`}var ljY;var Ux=k(()=>{ljY=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i});var p16="EnterPlanMode";var b_="AskUserQuestion",Df4=12,Xf4="Asks the user multiple choice questions to gather information, clarify ambiguity, understand preferences, make decisions or offer them choices.",Pf4,sC8;var d16=k(()=>{Pf4={markdown:` Preview feature: Use the optional \`preview\` field on options when presenting concrete artifacts that users need to visually compare: - ASCII mockups of UI layouts or components - Code snippets showing different implementations - Diagram variations - Configuration examples Preview content is rendered as markdown in a monospace box. Multi-line text with newlines is supported. When any option has a preview, the UI switches to a side-by-side layout with a vertical option list on the left and preview on the right. Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect). `,html:` Preview feature: Use the optional \`preview\` field on options when presenting concrete artifacts that users need to visually compare: - HTML mockups of UI layouts or components - Formatted code snippets showing different implementations - Visual comparisons or diagrams Preview content must be a self-contained HTML fragment (no / wrapper, no