@@ -1,90 +1,90 @@
import { createRequire as jF0 } from "node:module" ; var FF0 = Object . create ; var { getPrototypeOf : OF0 , defineProperty : RF , getOwnPropertyNames : NF0 } = Object ; var MF0 = Object . prototype . hasOwnProperty ; function AF0 ( $ ) { return this [ $ ] } var PF0 , TF0 , x7 = ( $ , I , z ) => { var q = $ != null && typeof $ === "object" ; if ( q ) { var U = I ? PF0 ? ? = new WeakMap : TF0 ? ? = new WeakMap , Y = U . get ( $ ) ; if ( Y ) return Y } z = $ != null ? FF0 ( OF0 ( $ ) ) : { } ; let J = I || ! $ || ! $ . _ _esModule ? RF ( z , "default" , { value : $ , enumerable : ! 0 } ) : z ; for ( let Q of NF0 ( $ ) ) if ( ! MF0 . call ( J , Q ) ) RF ( J , Q , { get : AF0 . bind ( $ , Q ) , enumerable : ! 0 } ) ; if ( q ) U . set ( $ , J ) ; return J } ; var O = ( $ , I ) => ( ) => ( I || $ ( ( I = { exports : { } } ) . exports , I ) , I . exports ) ; var EF0 = ( $ ) => $ ; function BF0 ( $ , I ) { this [ $ ] = EF0 . bind ( null , I ) } var Y5 = ( $ , I ) => { for ( var z in I ) RF ( $ , z , { get : I [ z ] , enumerable : ! 0 , configurable : ! 0 , set : BF0 . bind ( I , z ) } ) } ; var t = jF0 ( import . meta . url ) ; var aY = O ( ( $b ) => { Object . defineProperty ( $b , "__esModule" , { value : ! 0 } ) ; $b . regexpCode = $b . getEsmExportName = $b . getProperty = $b . safeStringify = $b . stringify = $b . strConcat = $b . addCodeArg = $b . str = $b . _ = $b . nil = $b . _Code = $b . Name = $b . IDENTIFIER = $b . _CodeOrName = void 0 ; class IG { } $b . _CodeOrName = IG ; $b . IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i ; class Wz extends IG { constructor ( $ ) { super ( ) ; if ( ! $b . IDENTIFIER . test ( $ ) ) throw Error ( "CodeGen: name must be a valid identifier" ) ; this . str = $ } toString ( ) { return this . str } emptyStr ( ) { return ! 1 } get names ( ) { return { [ this . str ] : 1 } } } $b . Name = Wz ; class a$ extends IG { constructor ( $ ) { super ( ) ; this . _items = typeof $ === "string" ? [ $ ] : $ } toString ( ) { return this . str } emptyStr ( ) { if ( this . _items . length > 1 ) return ! 1 ; let $ = this . _items [ 0 ] ; return $ === "" || $ === '""' } get str ( ) { var $ ; return ( $ = this . _str ) !== null && $ !== void 0 ? $ : this . _str = this . _items . reduce ( ( I , z ) => ` ${ I } ${ z } ` , "" ) } get names ( ) { var $ ; return ( $ = this . _names ) !== null && $ !== void 0 ? $ : this . _names = this . _items . reduce ( ( I , z ) => { if ( z instanceof Wz ) I [ z . str ] = ( I [ z . str ] || 0 ) + 1 ; return I } , { } ) } } $b . _Code = a$ ; $b . nil = new a$ ( "" ) ; function sn ( $ , ... I ) { let z = [ $ [ 0 ] ] , q = 0 ; while ( q < I . length ) iT ( z , I [ q ] ) , z . push ( $ [ ++ q ] ) ; return new a$ ( z ) } $b . _ = sn ; var bT = new a$ ( "+" ) ; function en ( $ , ... I ) { let z = [ tY ( $ [ 0 ] ) ] , q = 0 ; while ( q < I . length ) z . push ( bT ) , iT ( z , I [ q ] ) , z . push ( bT , tY ( $ [ ++ q ] ) ) ; return oA0 ( z ) , new a$ ( z ) } $b . str = en ; function iT ( $ , I ) { if ( I instanceof a$ ) $ . push ( ... I . _items ) ; else if ( I instanceof Wz ) $ . push ( I ) ; else $ . push ( aA0 ( I ) ) } $b . addCodeArg = iT ; function oA0 ( $ ) { let I = 1 ; while ( I < $ . length - 1 ) { if ( $ [ I ] === bT ) { let z = rA0 ( $ [ I - 1 ] , $ [ I + 1 ] ) ; if ( z !== void 0 ) { $ . splice ( I - 1 , 3 , z ) ; continue } $ [ I ++ ] = "+" } I ++ } } function rA0 ( $ , I ) { if ( I === '""' ) return $ ; if ( $ === '""' ) return I ; if ( typeof $ == "string" ) { if ( I instanceof Wz || $ [ $ . length - 1 ] !== '"' ) return ; if ( typeof I != "string" ) return ` ${ $ . slice ( 0 , - 1 ) } ${ I } " ` ; if ( I [ 0 ] === '"' ) return $ . slice ( 0 , - 1 ) + I . slice ( 1 ) ; return } if ( typeof I == "string" && I [ 0 ] === '"' && ! ( $ instanceof Wz ) ) return ` " ${ $ } ${ I . slice ( 1 ) } ` ; return } function tA0 ( $ , I ) { return I . emptyStr ( ) ? $ : $ . emptyStr ( ) ? I : en ` ${ $ } ${ I } ` } $b . strConcat = tA0 ; function aA0 ( $ ) { return typeof $ == "number" || typeof $ == "boolean" || $ === null ? $ : tY ( Array . isArray ( $ ) ? $ . join ( "," ) : $ ) } function sA0 ( $ ) { return new a$ ( tY ( $ ) ) } $b . stringify = sA0 ; function tY ( $ ) { return JSON . stringify ( $ ) . replace ( /\u2028/g , "\\u2028" ) . replace ( /\u2029/g , "\\u2029" ) } $b . safeStringify = tY ; function eA0 ( $ ) { return typeof $ == "string" && $b . IDENTIFIER . test ( $ ) ? new a$ ( ` . ${ $ } ` ) : sn ` [ ${ $ } ] ` } $b . getProperty = eA0 ; function $P0 ( $ ) { if ( typeof $ == "string" && $b . IDENTIFIER . test ( $ ) ) return new a$ ( ` ${ $ } ` ) ; throw Error ( ` CodeGen: invalid export name: ${ $ } , use explicit $ id name mapping ` ) } $b . getEsmExportName = $P0 ; function IP0 ( $ ) { return new a$ ( $ . toString ( ) ) } $b . regexpCode = IP0 } ) ; var mT = O ( ( Ub ) => { Object . defineProperty ( Ub , "__esModule" , { value : ! 0 } ) ; Ub . ValueScope = Ub . ValueScopeName = Ub . Scope = Ub . varKinds = Ub . UsedValueState = void 0 ; var d6 = aY ( ) ; class zb extends Error { constructor ( $ ) { super ( ` CodeGen: "code" for ${ $ } not defined ` ) ; this . value = $ . value } } var qG ; ( function ( $ ) { $ [ $ . Started = 0 ] = "Started" , $ [ $ . Completed = 1 ] = "Completed" } ) ( qG || ( Ub . UsedValueState = qG = { } ) ) ; Ub . varKinds = { const : new d6 . Name ( "const" ) , let : new d6 . Name ( "let" ) , var : new d6 . Name ( "var" ) } ; class cT { constructor ( { prefixes : $ , parent : I } = { } ) { this . _names = { } , this . _prefixes = $ , this . _parent = I } toName ( $ ) { return $ instanceof d6 . Name ? $ : this . name ( $ ) } name ( $ ) { return new d6 . Name ( this . _newName ( $ ) ) } _newName ( $ ) { let I = this . _names [ $ ] || this . _nameGroup ( $ ) ; return ` ${ $ } ${ I . index ++ } ` } _nameGroup ( $ ) { var I , z ; if ( ( ( z = ( I = this . _parent ) === null || I === void 0 ? void 0 : I . _prefixes ) === null || z === void 0 ? void 0 : z . has ( $ ) ) || this . _prefixes && ! this . _prefixes . has ( $ ) ) throw Error ( ` CodeGen: prefix " ${ $ } " is not allowed in this scope ` ) ; return this . _names [ $ ] = { prefix : $ , index : 0 } } } Ub . Scope = cT ; class dT extends d6 . Name { constructor ( $ , I ) { super ( I ) ; this . prefix = $ } setValue ( $ , { property : I , itemIndex : z } ) { this . value = $ , this . scopePath = d6 . _ ` . ${ new d6 . Name ( I ) } [ ${ z } ] ` } } Ub . ValueScopeName = dT ; var ZP0 = d6 . _ ` \n ` ; class qb extends cT { constructor ( $ ) { super ( $ ) ; this . _values = { } , this . _scope = $ . scope , this . opts = { ... $ , _n : $ . lines ? ZP0 : d6 . nil } } get ( ) { return this . _scope } name ( $ ) { return new dT ( $ , this . _newName ( $ ) ) } value ( $ , I ) { var z ; if ( I . ref === void 0 ) throw Error ( "CodeGen: ref must be passed in value" ) ; let q = this . toName ( $ ) , { prefix : U } = q , Y = ( z = I . key ) !== null && z !== void 0 ? z : I . ref , J = this . _values [ U ] ; if ( J ) { let K = J . get ( Y ) ; if ( Line truncated
` :""},this._extScope= $ ,this._scope=new s $ .Scope({parent: $ }),this._nodes=[new Wb]}toString(){return this._root.render(this.opts)}name( $ ){return this._scope.name( $ )}scopeName( $ ){return this._extScope.name( $ )}scopeValue( $ ,I){let z=this._extScope.value( $ ,I);return(this._values[z.prefix]||(this._values[z.prefix]=new Set)).add(z),z}getScopeValue( $ ,I){return this._extScope.getValue( $ ,I)}scopeRefs( $ ){return this._extScope.scopeRefs( $ ,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def( $ ,I,z,q){let U=this._scope.toName(I);if(z!==void 0&&q)this._constants[U.str]=z;return this._leafNode(new Jb( $ ,U,z)),U}const( $ ,I,z){return this._def(s $ .varKinds.const, $ ,I,z)}let( $ ,I,z){return this._def(s $ .varKinds.let, $ ,I,z)}var( $ ,I,z){return this._def(s $ .varKinds.var, $ ,I,z)}assign( $ ,I,z){return this._leafNode(new rT( $ ,I,z))}add( $ ,I){return this._leafNode(new Qb( $ ,m6.operators.ADD,I))}code( $ ){if(typeof $ =="function") $ ();else if( $ !==H1.nil)this._leafNode(new Gb( $ ));return this}object(... $ ){let I=["{"];for(let[z,q]of $ ){if(I.length>1)I.push(",");if(I.push(z),z!==q||this.opts.es5)I.push(":"),(0,H1.addCodeArg)(I,q)}return I.push("}"),new H1._Code(I)}if( $ ,I,z){if(this._blockNode(new H5( $ )),I&&z)this.code(I).else().code(z).endIf();else if(I)this.code(I).endIf();else if(z)throw Error('CodeGen: "else" body without "then" body');return this}elseIf( $ ){return this._elseNode(new H5( $ ))}else(){return this._elseNode(new sY)}endIf(){return this._endBlockNode(H5,sY)}_for( $ ,I){if(this._blockNode( $ ),I)this.code(I).endFor();return this}for( $ ,I){return this._for(new Vb( $ ),I)}forRange( $ ,I,z,q,U=this.opts.es5?s $ .varKinds.var:s $ .varKinds.let){let Y=this._scope.toName( $ );return this._for(new Zb(U,Y,I,z),()=>q(Y))}forOf( $ ,I,z,q=s $ .varKinds.const){let U=this._scope.toName( $ );if(this.opts.es5){let Y=I instanceof H1.Name?I:this.var("_arr",I);return this.forRange("_i",0,H1._ ` $ { Y } . length ` ,(J)=>{this.var(U,H1._ ` $ { Y } [ $ { J } ] ` ),z(U)})}return this._for(new lT("of",q,U,I),()=>z(U))}forIn( $ ,I,z,q=this.opts.es5?s $ .varKinds.var:s $ .varKinds.const){if(this.opts.ownProperties)return this.forOf( $ ,H1._ ` Object . keys ( $ { I } ) ` ,z);let U=this._scope.toName( $ );return this._for(new lT("in",q,U,I),()=>z(U))}endFor(){return this._endBlockNode(Vz)}label( $ ){return this._leafNode(new wb( $ ))}break( $ ){return this._leafNode(new Kb( $ ))}return( $ ){let I=new YG;if(this._blockNode(I),this.code( $ ),I.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(YG)}try( $ ,I,z){if(!I&&!z)throw Error('CodeGen: "try" without "catch" and "finally"');let q=new Xb;if(this._blockNode(q),this.code( $ ),I){let U=this.name("e");this._currNode=q.catch=new JG(U),I(U)}if(z)this._currNode=q.finally=new QG,this.code(z);return this._endBlockNode(JG,QG)}throw( $ ){return this._leafNode(new Hb( $ ))}block( $ ,I){if(this._blockStarts.push(this._nodes.length), $ )this.code( $ ).endBlock(I);return this}endBlock( $ ){let I=this._blockStarts.pop();if(I===void 0)throw Error("CodeGen: not in self-balancing block");let z=this._nodes.length-I;if(z<0|| $ !==void 0&&z!== $ )throw Error( ` CodeGen : wrong number of nodes : $ { z } vs $ { $ } expected ` );return this._nodes.length=I,this}func( $ ,I=H1.nil,z,q){if(this._blockNode(new UG( $ ,I,z)),q)this.code(q).endFunc();return this}endFunc(){return this._endBlockNode(UG)}optimize( $ =1){while( $ -- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode( $ ){return this._currNode.nodes.push( $ ),this}_blockNode( $ ){this._currNode.nodes.push( $ ),this._nodes.push( $ )}_endBlockNode( $ ,I){let z=this._currNode;if(z instanceof $ ||I&&z instanceof I)return this._nodes.pop(),this;throw Error( ` CodeGen : not in block "${I?`${$.kind}/${I.kind}`:$.kind}" ` )}_elseNode( $ ){let I=this._currNode;if(!(I instanceof H5))throw Error('CodeGen: "else" without "if"');return this._currNode=I.else= $ ,this}get _root(){return this._nodes[0]}get _currNode(){let $ =this._nodes;return $ [ $ .length-1]}set _currNode( $ ){let I=this._nodes;I[I.length-1]= $ }}m6.CodeGen=Lb;function l7( $ ,I){for(let z in I) $ [z]=( $ [z]||0)+(I[z]||0);return $ }function wG( $ ,I){return I instanceof H1._CodeOrName?l7( $ ,I.names): $ }function Zz( $ ,I,z){if( $ instanceof H1.Name)return q( $ );if(!U( $ ))return $ ;return new H1._Code( $ ._items.reduce((Y,J)=>{if(J instanceof H1.Name)J=q(J);if(J instanceof H1._Code)Y.push(...J._items);else Y.push(J);return Y},[]));function q(Y){let J=z[Y.str];if(J===void 0||I[Y.str]!==1)return Y;return delete I[Y.str],J}function U(Y){return Y instanceof H1._Code&&Y._items.some((J)=>J instanceof H1.Name&&I[J.str]===1&&z[J.str]!==void 0)}}function FP0( $ ,I){for(let z in I) $ [z]=( $ [z]||0)-(I[z]||0)}function Db( $ ){return typeof $ =="boolean"||typeof $ =="number"|| $ ===null?! $ :H1._ ` ! $ { oT ( $ ) } ` }m6.not=Db;var OP0=Fb(m6.operators.AND);function NP0(... $ ){return $ .reduce(OP0)}m6.and=NP0;var MP0=Fb(m6.operators.OR);function AP0(... $ ){return $ .reduce(MP0)}m6.or=AP0;function Fb( $ ){return(I,z)=>I===H1.nil?z:z===H1.nil?I:H1._ ` $ { oT ( I ) } $ { $ } $ { oT ( z ) } ` }function oT( $ ){return $ instanceof H1.Name? $ :H1._ ` ( $ { Line truncated
import { createRequire as SO0 } from "node:module" ; var BO0 = Object . create ; var { getPrototypeOf : jO0 , defineProperty : uO , getOwnPropertyNames : vO0 } = Object ; var gO0 = Object . prototype . hasOwnProperty ; function RO0 ( $ ) { return this [ $ ] } var _O0 , CO0 , f7 = ( $ , I , z ) => { var q = $ != null && typeof $ === "object" ; if ( q ) { var U = I ? _O0 ? ? = new WeakMap : CO0 ? ? = new WeakMap , Y = U . get ( $ ) ; if ( Y ) return Y } z = $ != null ? BO0 ( jO0 ( $ ) ) : { } ; let J = I || ! $ || ! $ . _ _esModule ? uO ( z , "default" , { value : $ , enumerable : ! 0 } ) : z ; for ( let Q of vO0 ( $ ) ) if ( ! gO0 . call ( J , Q ) ) uO ( J , Q , { get : RO0 . bind ( $ , Q ) , enumerable : ! 0 } ) ; if ( q ) U . set ( $ , J ) ; return J } ; var F = ( $ , I ) => ( ) => ( I || $ ( ( I = { exports : { } } ) . exports , I ) , I . exports ) ; var hO0 = ( $ ) => $ ; function uO0 ( $ , I ) { this [ $ ] = hO0 . bind ( null , I ) } var w5 = ( $ , I ) => { for ( var z in I ) uO ( $ , z , { get : I [ z ] , enumerable : ! 0 , configurable : ! 0 , set : uO0 . bind ( I , z ) } ) } ; var t = SO0 ( import . meta . url ) ; var $J = F ( ( zb ) => { Object . defineProperty ( zb , "__esModule" , { value : ! 0 } ) ; zb . regexpCode = zb . getEsmExportName = zb . getProperty = zb . safeStringify = zb . stringify = zb . strConcat = zb . addCodeArg = zb . str = zb . _ = zb . nil = zb . _Code = zb . Name = zb . IDENTIFIER = zb . _CodeOrName = void 0 ; class UG { } zb . _CodeOrName = UG ; zb . IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i ; class Zz extends UG { constructor ( $ ) { super ( ) ; if ( ! zb . IDENTIFIER . test ( $ ) ) throw Error ( "CodeGen: name must be a valid identifier" ) ; this . str = $ } toString ( ) { return this . str } emptyStr ( ) { return ! 1 } get names ( ) { return { [ this . str ] : 1 } } } zb . Name = Zz ; class e$ extends UG { constructor ( $ ) { super ( ) ; this . _items = typeof $ === "string" ? [ $ ] : $ } toString ( ) { return this . str } emptyStr ( ) { if ( this . _items . length > 1 ) return ! 1 ; let $ = this . _items [ 0 ] ; return $ === "" || $ === '""' } get str ( ) { var $ ; return ( $ = this . _str ) !== null && $ !== void 0 ? $ : this . _str = this . _items . reduce ( ( I , z ) => ` ${ I } ${ z } ` , "" ) } get names ( ) { var $ ; return ( $ = this . _names ) !== null && $ !== void 0 ? $ : this . _names = this . _items . reduce ( ( I , z ) => { if ( z instanceof Zz ) I [ z . str ] = ( I [ z . str ] || 0 ) + 1 ; return I } , { } ) } } zb . _Code = e$ ; zb . nil = new e$ ( "" ) ; function $b ( $ , ... I ) { let z = [ $ [ 0 ] ] , q = 0 ; while ( q < I . length ) lT ( z , I [ q ] ) , z . push ( $ [ ++ q ] ) ; return new e$ ( z ) } zb . _ = $b ; var mT = new e$ ( "+" ) ; function Ib ( $ , ... I ) { let z = [ eY ( $ [ 0 ] ) ] , q = 0 ; while ( q < I . length ) z . push ( mT ) , lT ( z , I [ q ] ) , z . push ( mT , eY ( $ [ ++ q ] ) ) ; return zP0 ( z ) , new e$ ( z ) } zb . str = Ib ; function lT ( $ , I ) { if ( I instanceof e$ ) $ . push ( ... I . _items ) ; else if ( I instanceof Zz ) $ . push ( I ) ; else $ . push ( YP0 ( I ) ) } zb . addCodeArg = lT ; function zP0 ( $ ) { let I = 1 ; while ( I < $ . length - 1 ) { if ( $ [ I ] === mT ) { let z = qP0 ( $ [ I - 1 ] , $ [ I + 1 ] ) ; if ( z !== void 0 ) { $ . splice ( I - 1 , 3 , z ) ; continue } $ [ I ++ ] = "+" } I ++ } } function qP0 ( $ , I ) { if ( I === '""' ) return $ ; if ( $ === '""' ) return I ; if ( typeof $ == "string" ) { if ( I instanceof Zz || $ [ $ . length - 1 ] !== '"' ) return ; if ( typeof I != "string" ) return ` ${ $ . slice ( 0 , - 1 ) } ${ I } " ` ; if ( I [ 0 ] === '"' ) return $ . slice ( 0 , - 1 ) + I . slice ( 1 ) ; return } if ( typeof I == "string" && I [ 0 ] === '"' && ! ( $ instanceof Zz ) ) return ` " ${ $ } ${ I . slice ( 1 ) } ` ; return } function UP0 ( $ , I ) { return I . emptyStr ( ) ? $ : $ . emptyStr ( ) ? I : Ib ` ${ $ } ${ I } ` } zb . strConcat = UP0 ; function YP0 ( $ ) { return typeof $ == "number" || typeof $ == "boolean" || $ === null ? $ : eY ( Array . isArray ( $ ) ? $ . join ( "," ) : $ ) } function JP0 ( $ ) { return new e$ ( eY ( $ ) ) } zb . stringify = JP0 ; function eY ( $ ) { return JSON . stringify ( $ ) . replace ( /\u2028/g , "\\u2028" ) . replace ( /\u2029/g , "\\u2029" ) } zb . safeStringify = eY ; function QP0 ( $ ) { return typeof $ == "string" && zb . IDENTIFIER . test ( $ ) ? new e$ ( ` . ${ $ } ` ) : $b ` [ ${ $ } ] ` } zb . getProperty = QP0 ; function wP0 ( $ ) { if ( typeof $ == "string" && zb . IDENTIFIER . test ( $ ) ) return new e$ ( ` ${ $ } ` ) ; throw Error ( ` CodeGen: invalid export name: ${ $ } , use explicit $ id name mapping ` ) } zb . getEsmExportName = wP0 ; function KP0 ( $ ) { return new e$ ( $ . toString ( ) ) } zb . regexpCode = KP0 } ) ; var aT = F ( ( Jb ) => { Object . defineProperty ( Jb , "__esModule" , { value : ! 0 } ) ; Jb . ValueScope = Jb . ValueScopeName = Jb . Scope = Jb . varKinds = Jb . UsedValueState = void 0 ; var l6 = $J ( ) ; class Ub extends Error { constructor ( $ ) { super ( ` CodeGen: "code" for ${ $ } not defined ` ) ; this . value = $ . value } } var JG ; ( function ( $ ) { $ [ $ . Started = 0 ] = "Started" , $ [ $ . Completed = 1 ] = "Completed" } ) ( JG || ( Jb . UsedValueState = JG = { } ) ) ; Jb . varKinds = { const : new l6 . Name ( "const" ) , let : new l6 . Name ( "let" ) , var : new l6 . Name ( "var" ) } ; class rT { constructor ( { prefixes : $ , parent : I } = { } ) { this . _names = { } , this . _prefixes = $ , this . _parent = I } toName ( $ ) { return $ instanceof l6 . Name ? $ : this . name ( $ ) } name ( $ ) { return new l6 . Name ( this . _newName ( $ ) ) } _newName ( $ ) { let I = this . _names [ $ ] || this . _nameGroup ( $ ) ; return ` ${ $ } ${ I . index ++ } ` } _nameGroup ( $ ) { var I , z ; if ( ( ( z = ( I = this . _parent ) === null || I === void 0 ? void 0 : I . _prefixes ) === null || z === void 0 ? void 0 : z . has ( $ ) ) || this . _prefixes && ! this . _prefixes . has ( $ ) ) throw Error ( ` CodeGen: prefix " ${ $ } " is not allowed in this scope ` ) ; return this . _names [ $ ] = { prefix : $ , index : 0 } } } Jb . Scope = rT ; class tT extends l6 . Name { constructor ( $ , I ) { super ( I ) ; this . prefix = $ } setValue ( $ , { property : I , itemIndex : z } ) { this . value = $ , this . scopePath = l6 . _ ` . ${ new l6 . Name ( I ) } [ ${ z } ] ` } } Jb . ValueScopeName = tT ; var AP0 = l6 . _ ` \n ` ; class Yb extends rT { constructor ( $ ) { super ( $ ) ; this . _values = { } , this . _scope = $ . scope , this . opts = { ... $ , _n : $ . lines ? AP0 : l6 . nil } } get ( ) { return this . _scope } name ( $ ) { return new tT ( $ , this . _newName ( $ ) ) } value ( $ , I ) { var z ; if ( I . ref === void 0 ) throw Error ( "CodeGen: ref must be passed in value" ) ; let q = this . toName ( $ ) , { prefix : U } = q , Y = ( z = I . key ) !== null && z !== void 0 ? z : I . ref , J = this . _values [ U ] ; if ( J ) { let K = J . get ( Y ) ; if ( Line truncated
` :""},this._extScope= $ ,this._scope=new $ 8.Scope({parent: $ }),this._nodes=[new Zb]}toString(){return this._root.render(this.opts)}name( $ ){return this._scope.name( $ )}scopeName( $ ){return this._extScope.name( $ )}scopeValue( $ ,I){let z=this._extScope.value( $ ,I);return(this._values[z.prefix]||(this._values[z.prefix]=new Set)).add(z),z}getScopeValue( $ ,I){return this._extScope.getValue( $ ,I)}scopeRefs( $ ){return this._extScope.scopeRefs( $ ,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def( $ ,I,z,q){let U=this._scope.toName(I);if(z!==void 0&&q)this._constants[U.str]=z;return this._leafNode(new wb( $ ,U,z)),U}const( $ ,I,z){return this._def( $ 8.varKinds.const, $ ,I,z)}let( $ ,I,z){return this._def( $ 8.varKinds.let, $ ,I,z)}var( $ ,I,z){return this._def( $ 8.varKinds.var, $ ,I,z)}assign( $ ,I,z){return this._leafNode(new $ E( $ ,I,z))}add( $ ,I){return this._leafNode(new Kb( $ ,o6.operators.ADD,I))}code( $ ){if(typeof $ =="function") $ ();else if( $ !==H1.nil)this._leafNode(new Vb( $ ));return this}object(... $ ){let I=["{"];for(let[z,q]of $ ){if(I.length>1)I.push(",");if(I.push(z),z!==q||this.opts.es5)I.push(":"),(0,H1.addCodeArg)(I,q)}return I.push("}"),new H1._Code(I)}if( $ ,I,z){if(this._blockNode(new V5( $ )),I&&z)this.code(I).else().code(z).endIf();else if(I)this.code(I).endIf();else if(z)throw Error('CodeGen: "else" body without "then" body');return this}elseIf( $ ){return this._elseNode(new V5( $ ))}else(){return this._elseNode(new IJ)}endIf(){return this._endBlockNode(V5,IJ)}_for( $ ,I){if(this._blockNode( $ ),I)this.code(I).endFor();return this}for( $ ,I){return this._for(new Xb( $ ),I)}forRange( $ ,I,z,q,U=this.opts.es5? $ 8.varKinds.var: $ 8.varKinds.let){let Y=this._scope.toName( $ );return this._for(new Lb(U,Y,I,z),()=>q(Y))}forOf( $ ,I,z,q= $ 8.varKinds.const){let U=this._scope.toName( $ );if(this.opts.es5){let Y=I instanceof H1.Name?I:this.var("_arr",I);return this.forRange("_i",0,H1._ ` $ { Y } . length ` ,(J)=>{this.var(U,H1._ ` $ { Y } [ $ { J } ] ` ),z(U)})}return this._for(new sT("of",q,U,I),()=>z(U))}forIn( $ ,I,z,q=this.opts.es5? $ 8.varKinds.var: $ 8.varKinds.const){if(this.opts.ownProperties)return this.forOf( $ ,H1._ ` Object . keys ( $ { I } ) ` ,z);let U=this._scope.toName( $ );return this._for(new sT("in",q,U,I),()=>z(U))}endFor(){return this._endBlockNode(Xz)}label( $ ){return this._leafNode(new Hb( $ ))}break( $ ){return this._leafNode(new Gb( $ ))}return( $ ){let I=new wG;if(this._blockNode(I),this.code( $ ),I.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(wG)}try( $ ,I,z){if(!I&&!z)throw Error('CodeGen: "try" without "catch" and "finally"');let q=new Db;if(this._blockNode(q),this.code( $ ),I){let U=this.name("e");this._currNode=q.catch=new KG(U),I(U)}if(z)this._currNode=q.finally=new HG,this.code(z);return this._endBlockNode(KG,HG)}throw( $ ){return this._leafNode(new Wb( $ ))}block( $ ,I){if(this._blockStarts.push(this._nodes.length), $ )this.code( $ ).endBlock(I);return this}endBlock( $ ){let I=this._blockStarts.pop();if(I===void 0)throw Error("CodeGen: not in self-balancing block");let z=this._nodes.length-I;if(z<0|| $ !==void 0&&z!== $ )throw Error( ` CodeGen : wrong number of nodes : $ { z } vs $ { $ } expected ` );return this._nodes.length=I,this}func( $ ,I=H1.nil,z,q){if(this._blockNode(new QG( $ ,I,z)),q)this.code(q).endFunc();return this}endFunc(){return this._endBlockNode(QG)}optimize( $ =1){while( $ -- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode( $ ){return this._currNode.nodes.push( $ ),this}_blockNode( $ ){this._currNode.nodes.push( $ ),this._nodes.push( $ )}_endBlockNode( $ ,I){let z=this._currNode;if(z instanceof $ ||I&&z instanceof I)return this._nodes.pop(),this;throw Error( ` CodeGen : not in block "${I?`${$.kind}/${I.kind}`:$.kind}" ` )}_elseNode( $ ){let I=this._currNode;if(!(I instanceof V5))throw Error('CodeGen: "else" without "if"');return this._currNode=I.else= $ ,this}get _root(){return this._nodes[0]}get _currNode(){let $ =this._nodes;return $ [ $ .length-1]}set _currNode( $ ){let I=this._nodes;I[I.length-1]= $ }}o6.CodeGen=Ob;function r7( $ ,I){for(let z in I) $ [z]=( $ [z]||0)+(I[z]||0);return $ }function GG( $ ,I){return I instanceof H1._CodeOrName?r7( $ ,I.names): $ }function Lz( $ ,I,z){if( $ instanceof H1.Name)return q( $ );if(!U( $ ))return $ ;return new H1._Code( $ ._items.reduce((Y,J)=>{if(J instanceof H1.Name)J=q(J);if(J instanceof H1._Code)Y.push(...J._items);else Y.push(J);return Y},[]));function q(Y){let J=z[Y.str];if(J===void 0||I[Y.str]!==1)return Y;return delete I[Y.str],J}function U(Y){return Y instanceof H1._Code&&Y._items.some((J)=>J instanceof H1.Name&&I[J.str]===1&&z[J.str]!==void 0)}}function BP0( $ ,I){for(let z in I) $ [z]=( $ [z]||0)-(I[z]||0)}function Fb( $ ){return typeof $ =="boolean"||typeof $ =="number"|| $ ===null?! $ :H1._ ` ! $ { eT ( $ ) } ` }o6.not=Fb;var jP0=Nb(o6.operators.AND);function vP0(... $ ){return $ .reduce(jP0)}o6.and=vP0;var gP0=Nb(o6.operators.OR);function RP0(... $ ){return $ .reduce(gP0)}o6.or=RP0;function Nb( $ ){return(I,z)=>I===H1.nil?z:z===H1.nil?I:H1._ ` $ { eT ( I ) } $ { $ } $ { eT ( z ) } ` }function eT( $ ){return $ instanceof H1.Name? $ :H1._ ` ( $ { Line truncated
|| ( $ { J } == "string" && $ { U } && $ { U } == + $ { U } ) ` ).assign(Q,a0._ ` + $ { U } ` );return;case"integer":q.elseIf(a0._ ` $ { J } === "boolean" || $ { U } === null
|| ( $ { J } === "string" && $ { U } && $ { U } == + $ { U } && ! ( $ { U } % 1 ) ) ` ).assign(Q,a0._ ` + $ { U } ` );return;case"boolean":q.elseIf(a0._ ` $ { U } === "false" || $ { U } === 0 || $ { U } === null ` ).assign(Q,!1).elseIf(a0._ ` $ { U } === "true" || $ { U } === 1 ` ).assign(Q,!0);return;case"null":q.elseIf(a0._ ` $ { U } === "" || $ { U } === 0 || $ { U } === false ` ),q.assign(Q,null);return;case"array":q.elseIf(a0._ ` $ { J } === "string" || $ { J } === "number"
|| $ { J } === "boolean" || $ { U } === null ` ).assign(Q,a0._ ` [ $ { U } ] ` )}}}function yT0({gen: $ ,parentData:I,parentDataProperty:z},q){ $ .if(a0._ ` $ { I } !== undefined ` ,()=> $ .assign(a0._ ` $ { I } [ $ { z } ] ` ,q))}function zE( $ ,I,z,q=Xz.Correct){let U=q===Xz.Correct?a0.operators.EQ:a0.operators.NEQ,Y;switch( $ ){case"null":return a0._ ` $ { I } $ { U } null ` ;case"array":Y=a0._ ` Array . isArray ( $ { I } ) ` ;break;case"object":Y=a0._ ` $ { I } && typeof $ { I } == "object" && ! Array . isArray ( $ { I } ) ` ;break;case"integer":Y=J(a0._ ` ! ( $ { I } % 1 ) && ! isNaN ( $ { I } ) ` );break;case"number":Y=J();break;default:return a0._ ` typeof $ { I } $ { U } $ { $ } ` }return q===Xz.Correct?Y:(0,a0.not)(Y);function J(Q=a0.nil){return(0,a0.and)(a0._ ` typeof $ { I } == "number" ` ,Q,z?a0._ ` isFinite ( $ { I } ) ` :a0.nil)}}ob.checkDataType=zE;function qE( $ ,I,z,q){if( $ .length===1)return zE( $ [0],I,z,q);let U,Y=(0,db.toHash)( $ );if(Y.array&&Y.object){let J=a0._ ` typeof $ { I } != "object" ` ;U=Y.null?J:a0._ ` ! $ { I } || $ { J } ` ,delete Y.null,delete Y.array,delete Y.object}else U=a0.nil;if(Y.number)delete Y.integer;for(let J in Y)U=(0,a0.and)(U,zE(J,I,z,q));return U}ob.checkDataTypes=qE;var uT0={message:({schema: $ })=> ` must be $ { $ } ` ,params:({schema: $ ,schemaValue:I})=>typeof $ =="string"?a0._ ` { type : $ { $ } } ` :a0._ ` { type : $ { I } } ` };function UE( $ ){let I=xT0( $ );(0,gT0.reportError)(I,uT0)}ob.reportTypeError=UE;function xT0( $ ){let{gen:I,data:z,schema:q}= $ ,U=(0,db.schemaRefOrVal)( $ ,q,"type");return{gen:I,keyword:"type",data:z,schema:q.type,schemaCode:U,schemaValue:U,parentSchema:q,params:{},it: $ }}});var eb=O((ab)=>{Object.defineProperty(ab,"__esModule",{value:!0});ab.assignDefaults=void 0;var Lz=s0(),cT0=X1();function dT0( $ ,I){let{properties:z,items:q}= $ .schema;if(I==="object"&&z)for(let U in z)tb( $ ,U,z[U].default);else if(I==="array"&&Array.isArray(q))q.forEach((U,Y)=>tb( $ ,Y,U.default))}ab.assignDefaults=dT0;function tb( $ ,I,z){let{gen:q,compositeRule:U,data:Y,opts:J}= $ ;if(z===void 0)return;let Q=Lz._ ` $ { Y } $ { ( 0 , Lz . getProperty ) ( I ) } ` ;if(U){(0,cT0.checkStrictMode)( $ , ` default is ignored for : $ { Q } ` );return}let w=Lz._ ` $ { Q } === undefined ` ;if(J.useDefaults==="empty")w=Lz._ ` $ { w } || $ { Q } === null || $ { Q } === "" ` ;q.if(w,Lz._ ` $ { Q } = $ { ( 0 , Lz . stringify ) ( z ) } ` )}});var C $ =O((zi)=>{Object.defineProperty(zi,"__esModule",{value:!0});zi.validateUnion=zi.validateArray=zi.usePattern=zi.callValidateCode=zi.schemaProperties=zi.allSchemaProperties=zi.noPropertyInData=zi.propertyInData=zi.isOwnProperty=zi.hasPropFunc=zi.reportMissingProp=zi.checkMissingProp=zi.checkReportMissingProp=void 0;var a1=s0(),YE=X1(),A9=G5(),mT0=X1();function lT0( $ ,I){let{gen:z,data:q,it:U}= $ ;z.if(QE(z,q,I,U.opts.ownProperties),()=>{ $ .setParams({missingProperty:a1._ ` $ { I } ` },!0), $ .error()})}zi.checkReportMissingProp=lT0;function oT0({gen: $ ,data:I,it:{opts:z}},q,U){return(0,a1.or)(...q.map((Y)=>(0,a1.and)(QE( $ ,I,Y,z.ownProperties),a1._ ` $ { U } = $ { Y } ` )))}zi.checkMissingProp=oT0;function rT0( $ ,I){ $ .setParams({missingProperty:I},!0), $ .error()}zi.reportMissingProp=rT0;function $ i( $ ){return $ .scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:a1._ ` Object . prototype . hasOwnProperty ` })}zi.hasPropFunc= $ i;function JE( $ ,I,z){return a1._ ` $ { $i ( $ ) } . call ( $ { I } , $ { z } ) ` }zi.isOwnProperty=JE;function tT0( $ ,I,z,q){let U=a1._ ` $ { I } $ { ( 0 , a1 . getProperty ) ( z ) } !== undefined ` ;return q?a1._ ` $ { U } && $ { JE ( $ , I , z ) } ` :U}zi.propertyInData=tT0;function QE( $ ,I,z,q){let U=a1._ ` $ { I } $ { ( 0 , a1 . getProperty ) ( z ) } === undefined ` ;return q?(0,a1.or)(U,(0,a1.not)(JE( $ ,I,z))):U}zi.noPropertyInData=QE;function Ii( $ ){return $ ?Object.keys( $ ).filter((I)=>I!=="__proto__"):[]}zi.allSchemaProperties=Ii;function aT0( $ ,I){return Ii(I).filter((z)=>!(0,YE.alwaysValidSchema)( $ ,I[z]))}zi.schemaProperties=aT0;function sT0({schemaCode: $ ,data:I,it:{gen:z,topSchemaRef:q,schemaPath:U,errorPath:Y},it:J},Q,w,K){let H=K?a1._ ` $ { $ } , $ { I } , $ { q } $ { U } ` :I,G=[[A9.default.instancePath,(0,a1.strConcat)(A9.default.instancePath,Y)],[A9.default.parentData,J.parentData],[A9.default.parentDataProperty,J.parentDataProperty],[A9.default.rootData,A9.default.rootData]];if(J.opts.dynamicRef)G.push([A9.default.dynamicAnchors,A9.default.dynamicAnchors]);let W=a1._ ` $ { H } , $ { z . object ( ... G ) } ` ;return w!==a1.nil?a1._ ` $ { Q } . call ( $ { w } , $ { W } ) ` :a1._ ` $ { Q } ( $ { W } ) ` }zi.callValidateCode=sT0;var eT0=a1._ ` new RegExp ` ;function $ E0({gen: $ ,it:{opts:I}},z){let q=I.unicodeRegExp?"u":"",{regExp:U}=I.code,Y=U(z,q);return $ .scopeValue("pattern",{key:Y.toString(),ref:Y,code:a1._ ` $ { U . code === "new RegExp" ? eT0 : ( 0 , mT0 . useFunc ) ( $ , U ) } ( $ { z } , $ { q } ) ` })}zi.usePattern= $ E0;function IE0( $ ){let{gen:I,data:z,keyword:q,it:U}= $ ,Y=I.name("valid");if(U.allErrors){let Q=I.let("valid",!0);return J(()=>I.assign(Q,!1)),Q}return I.var(Y,!0),J(()=>I.break()),Y;function J(Q){let w=I.const("len",a1._ ` $ { z } . length ` );I.forRange("i",0,w,(K)=>{ $ .subschema({keyword:q,dataProp:K,dataPropType:YE.Type.Num},Y),I.if((0,a1.not)(Y),Q)})}}zi.validateArray=IE0;function zE0( $ ){let{gen:I,schema:z,keyword:q,it:U}= $ ;if(!Array.isArray(z))throw Error("ajv implementation error");if(z.some((w)=>(0,YE.alwaysValidSchema)(U,w))&&!U.opts.unevaluated)return;le
Line truncated
|| $ { J } === "boolean" || $ { U } === null ` ).assign(Q,a0._ ` [ $ { U } ] ` )}}}function pT0({gen: $ ,parentData:I,parentDataProperty:z},q){ $ .if(a0._ ` $ { I } !== undefined ` ,()=> $ .assign(a0._ ` $ { I } [ $ { z } ] ` ,q))}function QE( $ ,I,z,q=Dz.Correct){let U=q===Dz.Correct?a0.operators.EQ:a0.operators.NEQ,Y;switch( $ ){case"null":return a0._ ` $ { I } $ { U } null ` ;case"array":Y=a0._ ` Array . isArray ( $ { I } ) ` ;break;case"object":Y=a0._ ` $ { I } && typeof $ { I } == "object" && ! Array . isArray ( $ { I } ) ` ;break;case"integer":Y=J(a0._ ` ! ( $ { I } % 1 ) && ! isNaN ( $ { I } ) ` );break;case"number":Y=J();break;default:return a0._ ` typeof $ { I } $ { U } $ { $ } ` }return q===Dz.Correct?Y:(0,a0.not)(Y);function J(Q=a0.nil){return(0,a0.and)(a0._ ` typeof $ { I } == "number" ` ,Q,z?a0._ ` isFinite ( $ { I } ) ` :a0.nil)}}tb.checkDataType=QE;function wE( $ ,I,z,q){if( $ .length===1)return QE( $ [0],I,z,q);let U,Y=(0,lb.toHash)( $ );if(Y.array&&Y.object){let J=a0._ ` typeof $ { I } != "object" ` ;U=Y.null?J:a0._ ` ! $ { I } || $ { J } ` ,delete Y.null,delete Y.array,delete Y.object}else U=a0.nil;if(Y.number)delete Y.integer;for(let J in Y)U=(0,a0.and)(U,QE(J,I,z,q));return U}tb.checkDataTypes=wE;var cT0={message:({schema: $ })=> ` must be $ { $ } ` ,params:({schema: $ ,schemaValue:I})=>typeof $ =="string"?a0._ ` { type : $ { $ } } ` :a0._ ` { type : $ { I } } ` };function KE( $ ){let I=dT0( $ );(0,kT0.reportError)(I,cT0)}tb.reportTypeError=KE;function dT0( $ ){let{gen:I,data:z,schema:q}= $ ,U=(0,lb.schemaRefOrVal)( $ ,q,"type");return{gen:I,keyword:"type",data:z,schema:q.type,schemaCode:U,schemaValue:U,parentSchema:q,params:{},it: $ }}});var Ii=F((eb)=>{Object.defineProperty(eb,"__esModule",{value:!0});eb.assignDefaults=void 0;var Oz=s0(),sT0=X1();function eT0( $ ,I){let{properties:z,items:q}= $ .schema;if(I==="object"&&z)for(let U in z)sb( $ ,U,z[U].default);else if(I==="array"&&Array.isArray(q))q.forEach((U,Y)=>sb( $ ,Y,U.default))}eb.assignDefaults=eT0;function sb( $ ,I,z){let{gen:q,compositeRule:U,data:Y,opts:J}= $ ;if(z===void 0)return;let Q=Oz._ ` $ { Y } $ { ( 0 , Oz . getProperty ) ( I ) } ` ;if(U){(0,sT0.checkStrictMode)( $ , ` default is ignored for : $ { Q } ` );return}let w=Oz._ ` $ { Q } === undefined ` ;if(J.useDefaults==="empty")w=Oz._ ` $ { w } || $ { Q } === null || $ { Q } === "" ` ;q.if(w,Oz._ ` $ { Q } = $ { ( 0 , Oz . stringify ) ( z ) } ` )}});var h $ =F((Ui)=>{Object.defineProperty(Ui,"__esModule",{value:!0});Ui.validateUnion=Ui.validateArray=Ui.usePattern=Ui.callValidateCode=Ui.schemaProperties=Ui.allSchemaProperties=Ui.noPropertyInData=Ui.propertyInData=Ui.isOwnProperty=Ui.hasPropFunc=Ui.reportMissingProp=Ui.checkMissingProp=Ui.checkReportMissingProp=void 0;var a1=s0(),HE=X1(),E9=Z5(), $ E0=X1();function IE0( $ ,I){let{gen:z,data:q,it:U}= $ ;z.if(WE(z,q,I,U.opts.ownProperties),()=>{ $ .setParams({missingProperty:a1._ ` $ { I } ` },!0), $ .error()})}Ui.checkReportMissingProp=IE0;function zE0({gen: $ ,data:I,it:{opts:z}},q,U){return(0,a1.or)(...q.map((Y)=>(0,a1.and)(WE( $ ,I,Y,z.ownProperties),a1._ ` $ { U } = $ { Y } ` )))}Ui.checkMissingProp=zE0;function qE0( $ ,I){ $ .setParams({missingProperty:I},!0), $ .error()}Ui.reportMissingProp=qE0;function zi( $ ){return $ .scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:a1._ ` Object . prototype . hasOwnProperty ` })}Ui.hasPropFunc=zi;function GE( $ ,I,z){return a1._ ` $ { zi ( $ ) } . call ( $ { I } , $ { z } ) ` }Ui.isOwnProperty=GE;function UE0( $ ,I,z,q){let U=a1._ ` $ { I } $ { ( 0 , a1 . getProperty ) ( z ) } !== undefined ` ;return q?a1._ ` $ { U } && $ { GE ( $ , I , z ) } ` :U}Ui.propertyInData=UE0;function WE( $ ,I,z,q){let U=a1._ ` $ { I } $ { ( 0 , a1 . getProperty ) ( z ) } === undefined ` ;return q?(0,a1.or)(U,(0,a1.not)(GE( $ ,I,z))):U}Ui.noPropertyInData=WE;function qi( $ ){return $ ?Object.keys( $ ).filter((I)=>I!=="__proto__"):[]}Ui.allSchemaProperties=qi;function YE0( $ ,I){return qi(I).filter((z)=>!(0,HE.alwaysValidSchema)( $ ,I[z]))}Ui.schemaProperties=YE0;function JE0({schemaCode: $ ,data:I,it:{gen:z,topSchemaRef:q,schemaPath:U,errorPath:Y},it:J},Q,w,K){let H=K?a1._ ` $ { $ } , $ { I } , $ { q } $ { U } ` :I,G=[[E9.default.instancePath,(0,a1.strConcat)(E9.default.instancePath,Y)],[E9.default.parentData,J.parentData],[E9.default.parentDataProperty,J.parentDataProperty],[E9.default.rootData,E9.default.rootData]];if(J.opts.dynamicRef)G.push([E9.default.dynamicAnchors,E9.default.dynamicAnchors]);let W=a1._ ` $ { H } , $ { z . object ( ... G ) } ` ;return w!==a1.nil?a1._ ` $ { Q } . call ( $ { w } , $ { W } ) ` :a1._ ` $ { Q } ( $ { W } ) ` }Ui.callValidateCode=JE0;var QE0=a1._ ` new RegExp ` ;function wE0({gen: $ ,it:{opts:I}},z){let q=I.unicodeRegExp?"u":"",{regExp:U}=I.code,Y=U(z,q);return $ .scopeValue("pattern",{key:Y.toString(),ref:Y,code:a1._ ` $ { U . code === "new RegExp" ? QE0 : ( 0 , $E0 . useFunc ) ( $ , U ) } ( $ { z } , $ { q } ) ` })}Ui.usePattern=wE0;function KE0( $ ){let{gen:I,data:z,keyword:q,it:U}= $ ,Y=I.name("valid");if(U.allErrors){let Q=I.let("valid",!0);return J(()=>I.assign(Q,!1)),Q}return I.var(Y,!0),J(()=>I.break()),Y;function J(Q){let w=I.const("len",a1._ ` $ { z } . length ` );I.forRange("i",0,w,(K)=>{ $ .subschema({keyword:q,dataProp:K,dataPropType:HE.Type.Num},Y),I.if((0,a1.not)(Y),Q)})}}Ui.validateArray=KE0;function HE0( $ ){let{gen:I,schema:z,keyword:q,it:U}= $ ;if(!Array.isArray(z))throw Error("ajv implementation error");if(z.some((w)=>(0,HE.alwaysValidSchema)(U,w))&&!U.opts.unevaluated)return;le
Line truncated
missingProperty : $ { q } ,
depsCount : $ { I } ,
deps : $ { z } } ` };var MR0={keyword:"dependencies",type:"object",schemaType:"object",error:Oc.error,code( $ ){let[I,z]=AR0( $ );Dc( $ ,I),Fc( $ ,z)}};function AR0({schema: $ }){let I={},z={};for(let q in $ ){if(q==="__proto__")continue;let U=Array.isArray( $ [q])?I:z;U[q]= $ [q]}return[I,z]}function Dc( $ ,I= $ .schema){let{gen:z,data:q,it:U}= $ ;if(Object.keys(I).length===0)return;let Y=z.let("missing");for(let J in I){let Q=I[J];if(Q.length===0)continue;let w=(0,LJ.propertyInData)(z,q,J,U.opts.ownProperties);if( $ .setParams({property:J,depsCount:Q.length,deps:Q.join(", ")}),U.allErrors)z.if(w,()=>{for(let K of Q)(0,LJ.checkReportMissingProp)( $ ,K)});else z.if(gE._ ` $ { w } && ( $ { ( 0 , LJ . checkMissingProp ) ( $ , Q , Y ) } ) ` ),(0,LJ.reportMissingProp)( $ ,Y),z.else()}}Oc.validatePropertyDeps=Dc;function Fc( $ ,I= $ .schema){let{gen:z,data:q,keyword:U,it:Y}= $ ,J=z.name("valid");for(let Q in I){if((0,NR0.alwaysValidSchema)(Y,I[Q]))continue;z.if((0,LJ.propertyInData)(z,q,Q,Y.opts.ownProperties),()=>{let w= $ .subschema({keyword:U,schemaProp:Q},J); $ .mergeValidEvaluated(w,J)},()=>z.var(J,!0)), $ .ok(J)}}Oc.validateSchemaDeps=Fc;Oc.default=MR0});var Ec=O((Tc)=>{Object.defineProperty(Tc,"__esModule",{value:!0});var Pc=s0(),ER0=X1(),BR0={message:"property name must be valid",params:({params: $ })=>Pc._ ` { propertyName : $ { $ . propertyName } } ` },jR0={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:BR0,code( $ ){let{gen:I,schema:z,data:q,it:U}= $ ;if((0,ER0.alwaysValidSchema)(U,z))return;let Y=I.name("valid");I.forIn("key",q,(J)=>{ $ .setParams({propertyName:J}), $ .subschema({keyword:"propertyNames",data:J,dataTypes:["string"],propertyName:J,compositeRule:!0},Y),I.if((0,Pc.not)(Y),()=>{if( $ .error(!0),!U.allErrors)I.break()})}), $ .ok(Y)}};Tc.default=jR0});var _E=O((Bc)=>{Object.defineProperty(Bc,"__esModule",{value:!0});var gG=C $ (),I8=s0(),RR0=G5(),_G=X1(),gR0={message:"must NOT have additional properties",params:({params: $ })=>I8._ ` { additionalProperty : $ { $ . additionalProperty } } ` },_R0={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:gR0,code( $ ){let{gen:I,schema:z,parentSchema:q,data:U,errsCount:Y,it:J}= $ ;if(!Y)throw Error("ajv implementation error");let{allErrors:Q,opts:w}=J;if(J.props=!0,w.removeAdditional!=="all"&&(0,_G.alwaysValidSchema)(J,z))return;let K=(0,gG.allSchemaProperties)(q.properties),H=(0,gG.allSchemaProperties)(q.patternProperties);G(), $ .ok(I8._ ` $ { Y } === $ { RR0 . default . errors } ` );function G(){I.forIn("key",U,(D)=>{if(!K.length&&!H.length)X(D);else I.if(W(D),()=>X(D))})}function W(D){let F;if(K.length>8){let T=(0,_G.schemaRefOrVal)(J,q.properties,"properties");F=(0,gG.isOwnProperty)(I,T,D)}else if(K.length)F=(0,I8.or)(...K.map((T)=>I8._ ` $ { D } === $ { T } ` ));else F=I8.nil;if(H.length)F=(0,I8.or)(F,...H.map((T)=>I8._ ` $ { ( 0 , gG . usePattern ) ( $ , T ) } . test ( $ { D } ) ` ));return(0,I8.not)(F)}function Z(D){I.code(I8._ ` delete $ { U } [ $ { D } ] ` )}function X(D){if(w.removeAdditional==="all"||w.removeAdditional&&z===!1){Z(D);return}if(z===!1){if( $ .setParams({additionalProperty:D}), $ .error(),!Q)I.break();return}if(typeof z=="object"&&!(0,_G.alwaysValidSchema)(J,z)){let F=I.name("valid");if(w.removeAdditional==="failing")L(D,F,!1),I.if((0,I8.not)(F),()=>{ $ .reset(),Z(D)});else if(L(D,F),!Q)I.if((0,I8.not)(F),()=>I.break())}}function L(D,F,T){let P={keyword:"additionalProperties",dataProp:D,dataPropType:_G.Type.Str};if(T===!1)Object.assign(P,{compositeRule:!0,createErrors:!1,allErrors:!1}); $ .subschema(P,F)}}};Bc.default=_R0});var gc=O((Rc)=>{Object.defineProperty(Rc,"__esModule",{value:!0});var hR0=UJ(),jc=C $ (),CE=X1(),vc=_E(),SR0={keyword:"properties",type:"object",schemaType:"object",code( $ ){let{gen:I,schema:z,parentSchema:q,data:U,it:Y}= $ ;if(Y.opts.removeAdditional==="all"&&q.additionalProperties===void 0)vc.default.code(new hR0.KeywordCxt(Y,vc.default,"additionalProperties"));let J=(0,jc.allSchemaProperties)(z);for(let G of J)Y.definedProperties.add(G);if(Y.opts.unevaluated&&J.length&&Y.props!==!0)Y.props=CE.mergeEvaluated.props(I,(0,CE.toHash)(J),Y.props);let Q=J.filter((G)=>!(0,CE.alwaysValidSchema)(Y,z[G]));if(Q.length===0)return;let w=I.name("valid");for(let G of Q){if(K(G))H(G);else{if(I.if((0,jc.propertyInData)(I,U,G,Y.opts.ownProperties)),H(G),!Y.allErrors)I.else().var(w,!0);I.endIf()} $ .it.definedProperties.add(G), $ .ok(w)}function K(G){return Y.opts.useDefaults&&!Y.compositeRule&&z[G].default!==void 0}function H(G){ $ .subschema({keyword:"properties",schemaProp:G,dataProp:G},w)}}};Rc.default=SR0});var yc=O((Sc)=>{Object.defineProperty(Sc,"__esModule",{value:!0});var _c=C $ (),CG=s0(),Cc=X1(),hc=X1(),uR0={keyword:"patternProperties",type:"object",schemaType:"object",code( $ ){let{gen:I,schema:z,data:q,parentSchema:U,it:Y}= $ ,{opts:J}=Y,Q=(0,_c.allSchemaProperties)(z),w=Q.filter((L)=>(0,Cc.alwaysValidSchema)(Y,z[L]));if(Q.length===0||w.length===Q.length&&(!Y.opts.unevaluated||Y.props===!0))return;let K=J.strictSchema&&!J.allowMatchingProperties&&U.properties,H=I.name("valid");if(Y.props!==!0&&!(Y.props instanceo
Line truncated
\ x00 ` ,f+=o1(x,2),f+=Q.magic,f+=o1(D,2),f+=o1(F,2),f+=o1(h.crc32,4),f+=o1(h.compressedSize,4),f+=o1(h.uncompressedSize,4),f+=o1(K.length,2),f+=o1(T.length,2);var g=XV.LOCAL_FILE_HEADER+f+K+T,k=XV.CENTRAL_FILE_HEADER+o1(n,2)+f+o1(W.length,2)+" \x 00 \x 00 \x 00 \x 00"+o1(B,4)+o1(q,4)+K+T+W;return{fileRecord:g,dirRecord:k}},Vf0=function( $ ,I,z,q,U){var Y="",J=zq.transformTo("string",U(q));return Y=XV.CENTRAL_DIRECTORY_END+" \x 00 \x 00 \x 00 \x 00"+o1( $ ,2)+o1( $ ,2)+o1(I,4)+o1(z,4)+o1(J.length,2)+J,Y},Zf0=function( $ ){var I="";return I=XV.DATA_DESCRIPTOR+o1( $ .crc32,4)+o1( $ .compressedSize,4)+o1( $ .uncompressedSize,4),I};function K8( $ ,I,z,q){qq.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=I,this.zipPlatform=z,this.encodeFileName=q,this.streamFiles= $ ,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}zq.inherits(K8,qq);K8.prototype.push=function( $ ){var I= $ .meta.percent||0,z=this.entriesCount,q=this._sources.length;if(this.accumulate)this.contentBuffer.push( $ );else this.bytesWritten+= $ .data.length,qq.prototype.push.call(this,{data: $ .data,meta:{currentFile:this.currentFile,percent:z?(I+100*(z-q-1))/z:100}})};K8.prototype.openedSource=function( $ ){this.currentSourceOffset=this.bytesWritten,this.currentFile= $ .file.name;var I=this.streamFiles&&! $ .file.dir;if(I){var z=vs( $ ,I,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:z.fileRecord,meta:{percent:0}})}else this.accumulate=!0};K8.prototype.closedSource=function( $ ){this.accumulate=!1;var I=this.streamFiles&&! $ .file.dir,z=vs( $ ,I,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(z.dirRecord),I)this.push({data:Zf0( $ ),meta:{percent:100}});else{this.push({data:z.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null};K8.prototype.flush=function(){var $ =this.bytesWritten;for(var I=0;I<this.dirRecords.length;I++)this.push({data:this.dirRecords[I],meta:{percent:100}});var z=this.bytesWritten- $ ,q=Vf0(this.dirRecords.length,z, $ ,this.zipComment,this.encodeFileName);this.push({data:q,meta:{percent:100}})};K8.prototype.prepareNextSource=function(){if(this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused)this.previous.pause();else this.previous.resume()};K8.prototype.registerPrevious=function( $ ){this._sources.push( $ );var I=this;return $ .on("data",function(z){I.processChunk(z)}), $ .on("end",function(){if(I.closedSource(I.previous.streamInfo),I._sources.length)I.prepareNextSource();else I.end()}), $ .on("error",function(z){I.error(z)}),this};K8.prototype.resume=function(){if(!qq.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};K8.prototype.error=function( $ ){var I=this._sources;if(!qq.prototype.error.call(this, $ ))return!1;for(var z=0;z<I.length;z++)try{I[z].error( $ )}catch(q){}return!0};K8.prototype.lock=function(){qq.prototype.lock.call(this);var $ =this._sources;for(var I=0;I< $ .length;I++) $ [I].lock()};Rs.exports=K8});var _s=O((Ff0)=>{var Xf0=Vv(),Lf0=gs(),Df0=function( $ ,I){var z= $ ||I,q=Xf0[z];if(!q)throw Error(z+" is not a valid compression method !");return q};Ff0.generateWorker=function( $ ,I,z){var q=new Lf0(I.streamFiles,z,I.platform,I.encodeFileName),U=0;try{ $ .forEach(function(Y,J){U++;var Q=Df0(J.options.compression,I.compression),w=J.options.compressionOptions||I.compressionOptions||{},K=J.dir,H=J.date;J._compressWorker(Q,w).withStreamInfo("file",{name:Y,dir:K,date:H,comment:J.comment||"",unixPermissions:J.unixPermissions,dosPermissions:J.dosPermissions}).pipe(q)}),q.entriesCount=U}catch(Y){q.error(Y)}return q}});var hs=O((KB1,Cs)=>{var Nf0=W4(),LV=Z $ ();function FQ( $ ,I){LV.call(this,"Nodejs stream input adapter for "+ $ ),this._upstreamEnded=!1,this._bindStream(I)}Nf0.inherits(FQ,LV);FQ.prototype._bindStream=function( $ ){var I=this;this._stream= $ , $ .pause(), $ .on("data",function(z){I.push({data:z,meta:{percent:0}})}).on("error",function(z){if(I.isPaused)this.generatedError=z;else I.error(z)}).on("end",function(){if(I.isPaused)I._upstreamEnded=!0;else I.end()})};FQ.prototype.pause=function(){if(!LV.prototype.pause.call(this))return!1;return this._stream.pause(),!0};FQ.prototype.resume=function(){if(!LV.prototype.resume.call(this))return!1;if(this._upstreamEnded)this.end();else this._stream.resume();return!0};Cs.exports=FQ});var ps=O((HB1,is)=>{var Mf0=mz(),OQ=W4(),xs=Z $ (),Af0=Oj(),ks=Nj(),Ss=aW(),Pf0=yt(),Tf0=_s(),ys=aJ(),Ef0=hs(),fs=function( $ ,I,z){var q=OQ.getTypeOf(I),U,Y=OQ.extend(z||{},ks);if(Y.date=Y.date||new Date,Y.compression!==null)Y.compression=Y.compression.toUpperCase();if(typeof Y.unixPermissions==="string")Y.unixPermissions=parseInt(Y.unixPermissions,8);if(Y.unixPermissions&&Y.unixPermissions&16384)Y.dir=!0;if(Y.dosPermissions&&Y.dosPermissions&16)Y.dir=!0;if(Y.
Line truncated
` )}openNode( $ ,I){let z=this.tos,q=this._xml;if(z&&this.open)q.push(">");this._stack.push( $ ),q.push("<"),q.push( $ ),av (q,I),this.leaf=!0,this.open=!0}addAttribute( $ ,I){if(!this.open)throw Error("Cannot write attributes to node if it is not open");if(I!==void 0)h 00(this._xml, $ ,I)}addAttributes( $ ){if(!this.open)throw Error("Cannot write attributes to node if it is not open");av (this._xml, $ )}writeText( $ ){let I=this._xml;if(this.open)I.push(">"),this.open=!1;this.leaf=!1,I.push(C 00.xmlEncode( $ .toString()))}writeXml( $ ){if(this.open)this._xml.push(">"),this.open=!1;this.leaf=!1,this._xml.push( $ )}closeNode(){let $ =this._stack.pop(),I=this._xml;if(this.leaf)I.push("/>");else I.push("</"),I.push( $ ),I.push(">");this.open=!1,this.leaf=!1}leafNode( $ ,I,z){if(this.openNode( $ ,I),z!==void 0)this.writeText(z);this.closeNode()}closeAll(){while(this._stack.length)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){let $ =this._rollbacks.pop();if(this._xml.length> $ .xml)this._xml.splice( $ .xml,this._xml.length- $ .xml);if(this._stack.length> $ .stack)this._stack.splice( $ .stack,this._stack.length- $ .stack);this.leaf= $ .leaf,this.open= $ .open}get xml(){return this.closeAll(),this._xml.join("")}}sv .StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"};S 00.exports=sv });var ev=O ((L i0)=>{var y 00=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function X i0( $ ){if(typeof $ ==="string")return $ ;if(y 00)return y 00.decode( $ );return $ .toString()}L i0.bufferToString=X i0});var n 00=O ((x 00)=>{Object.defineProperty(x 00,"__esModule",{value:!0});x 00.CHAR= `
\ r - - � \uD800\uDC00 - \uDBFF\uDFFF ` ;x 00.S= ` \ r
` ;x 00.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-� \u D800 \u DC00- \u DB7F \u DFFF";x 00.NAME_CHAR="-"+x 00.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";x 00.CHAR_RE=new RegExp("^["+x 00.CHAR+"] $ ","u");x 00.S_RE=new RegExp("^["+x 00.S+"]+ $ ","u");x 00.NAME_START_CHAR_RE=new RegExp("^["+x 00.NAME_START_CHAR+"] $ ","u");x 00.NAME_CHAR_RE=new RegExp("^["+x 00.NAME_CHAR+"] $ ","u");x 00.NAME_RE=new RegExp("^["+x 00.NAME_START_CHAR+"]["+x 00.NAME_CHAR+"]* $ ","u");x 00.NMTOKEN_RE=new RegExp("^["+x 00.NAME_CHAR+"]+ $ ","u");var $ R =9,IR =10,zR =13,qR =32;x 00.S_LIST=[qR,IR,zR, $ R ];function F i0($ ){return $ >=qR && $ <=55295|| $ ===IR || $ ===zR || $ === $ R ||$ >=57344&& $ <=65533|| $ >=65536&& $ <=1114111}x 00.isChar=F i0;function O i0( $ ){return $ ===qR || $ ===IR || $ ===zR || $ === $ R}x 00.isS=O i0;function u 00($ ){return $ >=65&& $ <=90|| $ >=97&& $ <=122|| $ ===58|| $ ===95|| $ ===8204|| $ ===8205|| $ >=192&& $ <=214|| $ >=216&& $ <=246|| $ >=248&& $ <=767|| $ >=880&& $ <=893|| $ >=895&& $ <=8191|| $ >=8304&& $ <=8591|| $ >=11264&& $ <=12271|| $ >=12289&& $ <=55295|| $ >=63744&& $ <=64975|| $ >=65008&& $ <=65533|| $ >=65536&& $ <=983039}x 00.isNameStartChar=u 00;function N i0( $ ){return u 00( $ )|| $ >=48&& $ <=57|| $ ===45|| $ ===46|| $ ===183|| $ >=768&& $ <=879|| $ >=8255&& $ <=8256}x 00.isNameChar=N i0});var t 00=O ((m 00)=>{Object.defineProperty(m 00,"__esModule",{value:!0});m 00.CHAR=" \x 01--� \u D800 \u DC00- \u DBFF \u DFFF";m 00.RESTRICTED_CHAR=" \x 01- \b \v \f \x 0E- \x 1F --";m 00.S= ` \ r
` ;m00.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-� \u D800 \u DC00- \u DB7F \u DFFF";m00.NAME_CHAR="-"+m00.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";m00.CHAR_RE=new RegExp("^["+m00.CHAR+"] $ ","u");m00.RESTRICTED_CHAR_RE=new RegExp("^["+m00.RESTRICTED_CHAR+"] $ ","u");m00.S_RE=new RegExp("^["+m00.S+"]+ $ ","u");m00.NAME_START_CHAR_RE=new RegExp("^["+m00.NAME_START_CHAR+"] $ ","u");m00.NAME_CHAR_RE=new RegExp("^["+m00.NAME_CHAR+"] $ ","u");m00.NAME_RE=new RegExp("^["+m00.NAME_START_CHAR+"]["+m00.NAME_CHAR+"]* $ ","u");m00.NMTOKEN_RE=new RegExp("^["+m00.NAME_CHAR+"]+ $ ","u");var b00=9,i00=10,p00=13,c00=32;m00.S_LIST=[c00,i00,p00,b00];function Ci0( $ ){return $ >=1&& $ <=55295|| $ >=57344&& $ <=65533|| $ >=65536&& $ <=1114111}m00.isChar=Ci0;function hi0( $ ){return $ >=1&& $ <=8|| $ ===11|| $ ===12|| $ >=14&& $ <=31|| $ >=127&& $ <=132|| $ >=134&& $ <=159}m00.isRestrictedChar=hi0;function Si0( $ ){return $ ===9|| $ ===10|| $ ===13|| $ >31&& $ <127|| $ ===133|| $ >159&& $ <=55295|| $ >=57344&& $ <=65533|| $ >=65536&& $ <=1114111}m00.isCharAndNotRestricted=Si0;function yi0( $ ){return $ ===c00|| $ ===i00|| $ ===p00|| $ ===b00}m00.isS=yi0;function d00( $ ){return $ >=65&& $ <=90|| $ >=97&& $ <=122|| $ ===58|| $ ===95|| $ ===8204|| $ ===8205|| $ >=192&& $ <=214|| $ >=216&& $ <=246|| $ >=248&& $ <=767|| $ >=880&& $ <=893|| $ >=895&& $ <=8191|| $ >=8304&& $ <=8591|| $ >=11264&& $ <=12271|| $ >=12289&& $ <=55295|| $ >=63744&& $ <=64975|| $ >=65008&& $ <=65533|| $ >=65536&& $ <=983039}m00.isNameStartChar=d00;function ui0( $ ){return d00( $ )|| $ >=48&& $ <=57|| $ ===45|| $ ===46|| $ ===183|| $ >=768&& $ <=879|| $ >=8255&& $ <=8256}m00.isNameChar=ui0});var e00=O((s00)=>{Object.defineProperty(s00,"__esModule",{value:!0});s00.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-� \u D800 \u DC00- \u DB7F \u DFFF";s00.NC_NAME_CHAR="-"+s00.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";s00.NC_NAME_START_CHAR_RE=new RegExp("^["+s00.NC_NAME_START_CHAR+"] $ ","u");s00.NC_NAME_CHAR_RE=new RegExp("^["+s00.NC_NAME_CHAR+"] $ ","u");s00.NC_NAME_RE=new RegExp("^["+s00.NC_NAME_START_CHAR+"]["+s00.NC_NAME_CHAR+"]* $ ","u");function a00( $ ){return $ >=65&& $ <=90|| $ ===95|| $ >=97&& $ <=122|| $ >=192&& $ <=214|| $ >=216&& $ <=246|| $ >=248&& $ <=767|| $ >=880&& $ <=893|| $ >=895&& $ <=8191|| $ >=8204&& $ <=8205|| $ >=8304&& $ <=8591|| $ >=11264&& $ <=12271|| $ >=12289&& $ <=55295|| $ >=63744&& $ <=64975|| $ >=65008&& $ <=65533|| $ >=65536&& $ <=983039}s00.isNCNameStartChar=a00;function ai0( $ ){return a00( $ )||( $ ===45|| $ ===46|| $ >=48&& $ <=57|| $ ===183|| $ >=768&& $ <=879|| $ >=8255&& $ <=8256)}s00.isNCNameChar=ai0});var M10=O((N10)=>{Object.defineProperty(N10,"__esModule",{value:!0});var Zq=n00(),qp0=t00(),DR=e00(),a6=Zq.isS,Up0=Zq.isChar,CQ=Zq.isNameStartChar, $ 10=Zq.isNameChar,Z10=Zq.S_LIST,Yp0=Zq.NAME_RE,Jp0=qp0.isChar,Qp0=DR.isNCNameStartChar,wp0=DR.isNCNameChar,Kp0=DR.NC_NAME_RE,dV="http://www.w3.org/XML/1998/namespace",Vq="http://www.w3.org/2000/xmlns/",Hp0={__proto__:null,xml:dV,xmlns:Vq},Gp0={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},K4=-1,n8=-2,I10=0,Wp0=1,YR=2,Vp0=3,Hq=4,Zp0=5,Xp0=6,Lp0=7,JR=8,Dp0=9,Fp0=10,Op0=11,Np0=12,S6=13,nV=14,QR=15,Mp0=16,wR=17,Ap0=18,Pp0=19,KR=20,Tp0=21,Ep0=22,Bp0=23,z10=24,HR=25,bV=26,q10=27,jp0=28,vp0=29,U10=30,Rp0=31,gp0=32,N3=33,_p0=34,GR=35,hQ=36,WR=37,Cp0=38,Y10=39,J10=40,hp0=41,Q10=42,Sp0=43,yp0=44,VR=9,G8=10,ZR=13,w10=32,K10=33,X10=34,SQ=38,L10=39,iV=45,pV=47,up0=59,m9=60,Gq=61,u4=62,U6=63,D10=91,Wq=93,H10=133,G10=8232,cV=( $ )=> $ ===X10|| $ ===L10,F10=[X10,L10],xp0=[...F10,D10,u4],kp0=[...F10,m9,Wq],fp0=[Gq,U6,...Z10],np0=[...Z10,u4,SQ,m9];function LR( $ ,I,z){switch(I){case"xml":if(z!==dV) $ .fail( ` xml prefix must be bound to $ { dV } . ` );break;case"xmlns":if(z!==Vq) $ .fail( ` xmlns prefix must be bound to $ { Vq } . ` );break;default:}switch(z){case Vq: $ .fail(I===""? ` the default namespace may not be set to $ { z } . ` : ` may not assign a prefix ( even "xmlns" ) to the URI $ { Vq } . ` );break;case dV:switch(I){case"xml":break;case"": $ .fail( ` the default namespace may not be set to $ { z } . ` );break;default: $ .fail("may not assign the xml namespace to another prefix.")}break;default:}}function bp0( $ ,I){for(let z of Object.keys(I))LR( $ ,z,I[z])}var ip0=( $ )=>Kp0.test( $ ),pp0=( $ )=>Yp0.test( $ ),M3=0,W10=1,XR=2;N10.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];var V10={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class O10{constructor( $ ){this.opt= $ !==null&& $ !==void 0? $ :{},this.fragmentOpt=!!this.opt.fragment;let I=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,I){this.nameStartCheck=Qp0,this.nameCheck=wp0,this.isName=ip0,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},Hp0);let z=this.opt.additionalNamesp
Line truncated
` ,I=this.i}}captureToChar( $ ){let{i:I}=this,{chunk:z}=this;while(!0){let q=this.getCode();switch(q){case n 8:this.text+= ` $ { z . slice ( I , this . prevI ) }
` ,I=this.i,q=G 8;break;case K4:return this.text+=z.slice(I),!1;default:}if(q=== $ )return this.text+=z.slice(I,this.prevI),!0}}captureNameChars(){let{chunk: $ ,i:I}=this;while(!0){let z=this.getCode();if(z===K4)return this.name+= $ .slice(I),K4;if(! $ 10(z))return this.name+= $ .slice(I,this.prevI),z===n 8?G 8:z}}skipSpaces(){while(!0){let $ =this.getCodeNorm();if( $ ===K4||!a 6( $ ))return $ }}setXMLVersion( $ ){if(this.currentXMLVersion= $ , $ ==="1.0")this.isChar=U p0,this.getCode=this.getCode10;else this.isChar=J p0,this.getCode=this.getCode11}sBegin(){if(this.chunk.charCodeAt(0)===65279)this.i++,this.column++;this.state=W p0}sBeginWhitespace(){let $ =this.i,I=this.skipSpaces();if(this.prevI!== $ )this.xmlDeclPossible=!1;switch(I){case m 9:if(this.state=QR ,this.text.length!==0)throw Error("no-empty text at start");break;case K4:break;default:this.unget(),this.state=S 6,this.xmlDeclPossible=!1}}sDoctype(){var $ ;let I=this.captureTo(x p0);switch(I){case u 4:{( $ =this.doctypeHandler)===null|| $ ===void 0|| $ .call(this,this.text),this.text="",this.state=S 6,this.doctype=!0;break}case K4:break;default:if(this.text+=String.fromCodePoint(I),I===D 10)this.state=H q;else if(c V(I))this.state=V p0,this.q=I}}sDoctypeQuote(){let $ =this.q;if(this.captureToChar( $ ))this.text+=String.fromCodePoint( $ ),this.q=null,this.state=YR }sDTD(){let $ =this.captureTo(k p0);if( $ ===K4)return;if(this.text+=String.fromCodePoint( $ ), $ ===W q)this.state=YR ;else if( $ ===m 9)this.state=X p0;else if(c V( $ ))this.state=Z p0,this.q= $ }sDTDQuoted(){let $ =this.q;if(this.captureToChar( $ ))this.text+=String.fromCodePoint( $ ),this.state=H q,this.q=null}sDTDOpenWaka(){let $ =this.getCodeNorm();switch(this.text+=String.fromCodePoint( $ ), $ ){case K 10:this.state=L p0,this.openWakaBang="";break;case U6:this.state=O p0;break;default:this.state=H q}}sDTDOpenWakaBang(){let $ =String.fromCodePoint(this.getCodeNorm()),I=this.openWakaBang+= $ ;if(this.text+= $ ,I!=="-")this.state=I==="--"?JR:H q,this.openWakaBang=""}sDTDComment(){if(this.captureToChar(i V))this.text+="-",this.state=D p0}sDTDCommentEnding(){let $ =this.getCodeNorm();this.text+=String.fromCodePoint( $ ),this.state= $ ===i V?F p0:JR }sDTDCommentEnded(){let $ =this.getCodeNorm();if(this.text+=String.fromCodePoint( $ ), $ ===u 4)this.state=H q;else this.fail("malformed comment."),this.state=JR }sDTDPI(){if(this.captureToChar(U6))this.text+="?",this.state=N p0}sDTDPIEnding(){let $ =this.getCodeNorm();if(this.text+=String.fromCodePoint( $ ), $ ===u 4)this.state=H q}sText(){if(this.tags.length!==0)this.handleTextInRoot();else this.handleTextOutsideRoot()}sEntity(){let{i: $ }=this,{chunk:I}=this; $ :while(!0)switch(this.getCode()){case n 8:this.entity+= ` $ { I . slice ( $ , this . prevI ) }
` , $ =this.i;break;case up0:{let{entityReturnState:z}=this,q=this.entity+I.slice( $ ,this.prevI);this.state=z;let U;if(q==="")this.fail("empty entity name."),U="&;";else U=this.parseEntity(q),this.entity="";if(z!==S6||this.textHandler!==void 0)this.text+=U;break $ }case K4:this.entity+=I.slice( $ );break $ ;default:}}sOpenWaka(){let $ =this.getCode();if(CQ( $ ))this.state=_p0,this.unget(),this.xmlDeclPossible=!1;else switch( $ ){case pV:this.state=Sp0,this.xmlDeclPossible=!1;break;case K10:this.state=Mp0,this.openWakaBang="",this.xmlDeclPossible=!1;break;case U6:this.state=Bp0;break;default:this.fail("disallowed character in tag name"),this.state=S6,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":if(!this.sawRoot&&!this.reportedTextBeforeRoot)this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0;if(this.closedRoot&&!this.reportedTextAfterRoot)this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0;this.state=KR,this.openWakaBang="";break;case"--":this.state=wR,this.openWakaBang="";break;case"DOCTYPE":if(this.state=YR,this.doctype||this.sawRoot)this.fail("inappropriately located doctype declaration.");this.openWakaBang="";break;default:if(this.openWakaBang.length>=7)this.fail("incorrect syntax.")}}sComment(){if(this.captureToChar(iV))this.state=Ap0}sCommentEnding(){var $ ;let I=this.getCodeNorm();if(I===iV)this.state=Pp0,( $ =this.commentHandler)===null|| $ ===void 0|| $ .call(this,this.text),this.text="";else this.text+= ` - $ { String . fromCodePoint ( I ) } ` ,this.state=wR}sCommentEnded(){let $ =this.getCodeNorm();if( $ !==u4)this.fail("malformed comment."),this.text+= ` -- $ { String . fromCodePoint ( $ ) } ` ,this.state=wR;else this.state=S6}sCData(){if(this.captureToChar(Wq))this.state=Tp0}sCDataEnding(){let $ =this.getCodeNorm();if( $ ===Wq)this.state=Ep0;else this.text+= ` ] $ { String . fromCodePoint ( $ ) } ` ,this.state=KR}sCDataEnding2(){var $ ;let I=this.getCodeNorm();switch(I){case u4:{( $ =this.cdataHandler)===null|| $ ===void 0|| $ .call(this,this.text),this.text="",this.state=S6;break}case Wq:this.text+="]";break;default:this.text+= ` ] ] $ { String . fromCodePoint ( I ) } ` ,this.state=KR}}sPIFirstChar(){let $ =this.getCodeNorm();if(this.nameStartCheck( $ ))this.piTarget+=String.fromCodePoint( $ ),this.state=z10;else if( $ ===U6||a6( $ ))this.fail("processing instruction without a target."),this.state= $ ===U6?bV:HR;else this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint( $ ),this.state=z10}sPIRest(){let{chunk: $ ,i:I}=this;while(!0){let z=this.getCodeNorm();if(z===K4){this.piTarget+= $ .slice(I);return}if(!this.nameCheck(z)){this.piTarget+= $ .slice(I,this.prevI);let q=z===U6;if(q||a6(z))if(this.piTarget==="xml"){if(!this.xmlDeclPossible)this.fail("an XML declaration must be at the start of the document.");this.state=q?N3:q10}else this.state=q?bV:HR;else this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(z);break}}}sPIBody(){if(this.text.length===0){let $ =this.getCodeNorm();if( $ ===U6)this.state=bV;else if(!a6( $ ))this.text=String.fromCodePoint( $ )}else if(this.captureToChar(U6))this.state=bV}sPIEnding(){var $ ;let I=this.getCodeNorm();if(I===u4){let{piTarget:z}=this;if(z.toLowerCase()==="xml")this.fail("the XML declaration must appear at the start of the document.");( $ =this.piHandler)===null|| $ ===void 0|| $ .call(this,{target:z,body:this.text}),this.piTarget=this.text="",this.state=S6}else if(I===U6)this.text+="?";else this.text+= ` ? $ { String . fromCodePoint ( I ) } ` ,this.state=HR;this.xmlDeclPossible=!1}sXMLDeclNameStart(){let $ =this.skipSpaces();if( $ ===U6){this.state=N3;return}if( $ !==K4)this.state=jp0,this.name=String.fromCodePoint( $ )}sXMLDeclName(){let $ =this.captureTo(fp0);if( $ ===U6){this.state=N3,this.name+=this.text,this.text="",this.fail("XML declaration is incomplete.");return}if(!(a6( $ )|| $ ===Gq))return;if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail( ` expected the name $ { this . xmlDeclExpects [ 0 ] } . ` );break;default:this.fail( ` expected one of $ { this . xmlDeclExpects . join ( ", " ) } ` )}this.state= $ ===Gq?U10:vp0}sXMLDeclEq(){let $ =this.getCodeNorm();if( $ ===U6){this.state=N3,this.fail("XML declaration is incomplete.");return}if(a6( $ ))return;if( $ !==Gq)this.fail("value required.");this.state=U10}sXMLDeclValueStart(){let $ =this.getCodeNorm();if( $ ===U6){this.state=N3,this.fail("XML declaration is incomplete.");return}if(a6( $ ))return;if(!cV( $ ))this.fail("value must be quoted."),this.q=w10;else this.q= $ ;this.state=Rp0}sXMLDeclValue(){let $ =this.captureTo([this.q,U6]);if( $ ===U6){this.state=N3,this.text="",this.fail("XML declaration is incomplete.");return}if( $ ===K4)return;let I=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];let z=I;if(this.xmlDecl.version=z,!/^1 \. [0-9]+ $ /.test(z))this.fail("ver
Line truncated
` ; $ =this.i,I=M 3;break;case K4:if(q!==void 0)this.text+=z.slice( $ );break $ ;default:I=M 3}this.forbiddenState=I}handleTextOutsideRoot(){let{i: $ }=this,{chunk:I,textHandler:z}=this,q=!1; $ :while(!0){let U=this.getCode();switch(U){case m 9:{if(this.state=QR ,z!==void 0){let{text:Y}=this,J=I.slice( $ ,this.prevI);if(Y.length!==0)z(Y+J),this.text="";else if(J.length!==0)z(J)}break $ }case S Q:if(this.state=n V,this.entityReturnState=S 6,z!==void 0)this.text+=I.slice( $ ,this.prevI);q=!0;break $ ;case n 8:if(z!==void 0)this.text+= ` $ { I . slice ( $ , this . prevI ) }
` ; $ =this.i;break;case K4:if(z!==void 0)this.text+=I.slice( $ );break $ ;default:if(!a6(U))q=!0}}if(!q)return;if(!this.sawRoot&&!this.reportedTextBeforeRoot)this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0;if(this.closedRoot&&!this.reportedTextAfterRoot)this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0}pushAttribNS( $ ,I){var z;let{prefix:q,local:U}=this.qname( $ ),Y={name: $ ,prefix:q,local:U,value:I};if(this.attribList.push(Y),(z=this.attributeHandler)===null||z===void 0||z.call(this,Y),q==="xmlns"){let J=I.trim();if(this.currentXMLVersion==="1.0"&&J==="")this.fail("invalid attempt to undefine prefix in XML 1.0");this.topNS[U]=J,LR(this,U,J)}else if( $ ==="xmlns"){let J=I.trim();this.topNS[""]=J,LR(this,"",J)}}pushAttribPlain( $ ,I){var z;let q={name: $ ,value:I};this.attribList.push(q),(z=this.attributeHandler)===null||z===void 0||z.call(this,q)}end(){var $ ,I;if(!this.sawRoot)this.fail("document must contain a root element.");let{tags:z}=this;while(z.length>0){let U=z.pop();this.fail( ` unclosed tag : $ { U . name } ` )}if(this.state!==I10&&this.state!==S6)this.fail("unexpected end.");let{text:q}=this;if(q.length!==0)( $ =this.textHandler)===null|| $ ===void 0|| $ .call(this,q),this.text="";return this._closed=!0,(I=this.endHandler)===null||I===void 0||I.call(this),this._init(),this}resolve( $ ){var I,z;let q=this.topNS[ $ ];if(q!==void 0)return q;let{tags:U}=this;for(let Y=U.length-1;Y>=0;Y--)if(q=U[Y].ns[ $ ],q!==void 0)return q;if(q=this.ns[ $ ],q!==void 0)return q;return(z=(I=this.opt).resolvePrefix)===null||z===void 0?void 0:z.call(I, $ )}qname( $ ){let I= $ .indexOf(":");if(I===-1)return{prefix:"",local: $ };let z= $ .slice(I+1),q= $ .slice(0,I);if(q===""||z===""||z.includes(":"))this.fail( ` malformed name : $ { $ } . ` );return{prefix:q,local:z}}processAttribsNS(){var $ ;let{attribList:I}=this,z=this.tag;{let{prefix:Y,local:J}=this.qname(z.name);z.prefix=Y,z.local=J;let Q=z.uri=( $ =this.resolve(Y))!==null&& $ !==void 0? $ :"";if(Y!==""){if(Y==="xmlns")this.fail('tags may not have "xmlns" as prefix.');if(Q==="")this.fail( ` unbound namespace prefix : $ { JSON . stringify ( Y ) } . ` ),z.uri=Y}}if(I.length===0)return;let{attributes:q}=z,U=new Set;for(let Y of I){let{name:J,prefix:Q,local:w}=Y,K,H;if(Q==="")K=J==="xmlns"?Vq:"",H=J;else{if(K=this.resolve(Q),K===void 0)this.fail( ` unbound namespace prefix : $ { JSON . stringify ( Q ) } . ` ),K=Q;H= ` { $ { K } } $ { w } ` }if(U.has(H))this.fail( ` duplicate attribute : $ { H } . ` );U.add(H),Y.uri=K,q[J]=Y}this.attribList=[]}processAttribsPlain(){let{attribList: $ }=this,I=this.tag.attributes;for(let{name:z,value:q}of $ ){if(I[z]!==void 0)this.fail( ` duplicate attribute : $ { z } . ` );I[z]=q}this.attribList=[]}openTag(){var $ ;this.processAttribs();let{tags:I}=this,z=this.tag;z.isSelfClosing=!1,( $ =this.openTagHandler)===null|| $ ===void 0|| $ .call(this,z),I.push(z),this.state=S6,this.name=""}openSelfClosingTag(){var $ ,I,z;this.processAttribs();let{tags:q}=this,U=this.tag;if(U.isSelfClosing=!0,( $ =this.openTagHandler)===null|| $ ===void 0|| $ .call(this,U),(I=this.closeTagHandler)===null||I===void 0||I.call(this,U),(this.tag=(z=q[q.length-1])!==null&&z!==void 0?z:null)===null)this.closedRoot=!0;this.state=S6,this.name=""}closeTag(){let{tags: $ ,name:I}=this;if(this.state=S6,this.name="",I===""){this.fail("weird empty close tag."),this.text+="</>";return}let z=this.closeTagHandler,q= $ .length;while(q-- >0){let U=this.tag= $ .pop();if(this.topNS=U.ns,z===null||z===void 0||z(U),U.name===I)break;this.fail("unexpected close tag.")}if(q===0)this.closedRoot=!0;else if(q<0)this.fail( ` unmatched closing tag : $ { I } . ` ),this.text+= ` < /${I}>`}parseEntity($){if($[0]!=="#"){let z=this.ENTITIES[$];if(z!==void 0)return z;return this.fail(this.isName($)?"undefined entity.":"disallowed character in entity name."),`&${$};`}let I=NaN;if($[1]==="x"&&/ ^ # x [ 0 - 9 a - f ] + $ / i . test ( $ ) ) I = parseInt ( $ . slice ( 2 ) , 16 ) ; else if ( /^#[0-9]+$/ . test ( $ ) ) I = parseInt ( $ . slice ( 1 ) , 10 ) ; if ( ! this . isChar ( I ) ) return this . fail ( "malformed character entity." ) , ` & ${ $ } ; ` ; return String . fromCodePoint ( I ) } } N10 . SaxesParser = O10 } ) ; var yQ = O ( ( lB1 , A10 ) => { var { SaxesParser : mp0 } = M10 ( ) , { PassThrough : lp0 } = F6 ( ) , { bufferToString : op0 } = ev ( ) ; A10 . exports = async function * ( $ ) { if ( $ . pipe && ! $ [ Symbol . asyncIterator ] ) $ = $ . pipe ( new lp0 ) ; let I = new mp0 , z ; I . on ( "error" , ( U ) => { z = U } ) ; let q = [ ] ; I . on ( "opentag" , ( U ) => q . push ( { eventType : "opentag" , value : U } ) ) , I . on ( "text" , ( U ) => q . push ( { eventType : "text" , value : U } ) ) , I . on ( "closetag" , ( U ) => q . push ( { eventType : "closetag" , value : U } ) ) ; for await ( let U of $ ) { if ( I . write ( op0 ( U ) ) , z ) throw z ; yield q , q = [ ] } } } ) ; var D0 = O ( ( oB1 , P10 ) => { var rp0 = yQ ( ) , tp0 = q6 ( ) ; class Xq { prepare ( ) { } render ( ) { } parseOpen ( $ ) { } parseText ( $ ) { } parseClose ( $ ) { } reconcile ( $ , I ) { } reset ( ) { if ( this . model = null , this . map ) Object . values ( this . map ) . forEach ( ( $ ) => { if ( $ instanceof Xq ) $ . reset ( ) ; else if ( $ . xform ) $ . xform . reset ( ) } ) } mergeModel ( $ ) { this . model = Object . assign ( this . model || { } , $ ) } async parse ( $ ) { for await ( let I of $ ) for ( let { eventType : z , value : q } of I ) if ( z === "opentag" ) this . parseOpen ( q ) ; else if ( z === "text" ) this . parseText ( q ) ; else if ( z === "closetag" ) { if ( ! this . parseClose ( q . name ) ) return th Line truncated
< a : theme xmlns : a = "http://schemas.openxmlformats.org/drawingml/2006/main" name = "Office Theme" > < a : themeElements > < a : clrScheme name = "Office" > < a : dk1 > < a : sysClr val = "windowText" lastClr = "000000" / > < /a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/ > < /a:lt1> <a:dk2> <a:srgbClr val="1F497D"/ > < /a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/ > < /a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/ > < /a:accent1> <a:accent2> <a:srgbClr val="C0504D"/ > < /a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/ > < /a:accent3> <a:accent4> <a:srgbClr val="8064A2"/ > < /a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/ > < /a:accent5> <a:accent6> <a:srgbClr val="F79646"/ > < /a:accent6> <a:hlink> <a:srgbClr val="0000FF"/ > < /a:hlink> <a:folHlink> <a:srgbClr val="800080"/ > < / a : f o l H l i n k > < / a : c l r S c h e m e > < a : f o n t S c h e m e n a m e = " O f f i c e " > < a : m a j o r F o n t > < a : l a t i n t y p e f a c e = " C a m b r i a " / > < a : e a t y p e f a c e = " " / > < a : c s t y p e f a c e = " " / > < a : f o n t s c r i p t = " J p a n " t y p e f a c e = " M S P ゴ シ ッ ク " / > < a : f o n t s c r i p t = " H a n g " t y p e f a c e = " 맑 은 고 딕 " / > < a : f o n t s c r i p t = " H a n s " t y p e f a c e = " 宋 体 " / > < a : f o n t s c r i p t = " H a n t " t y p e f a c e = " 新 細 明 體 " / > < a : f o n t s c r i p t = " A r a b " t y p e f a c e = " T i m e s N e w R o m a n " / > < a : f o n t s c r i p t = " H e b r " t y p e f a c e = " T i m e s N e w R o m a n " / > < a : f o n t s c r i p t = " T h a i " t y p e f a c e = " T a h o m a " / > < a : f o n t s c r i p t = " E t h i " t y p e f a c e = " N y a l a " / > < a : f o n t s c r i p t = " B e n g " t y p e f a c e = " V r i n d a " / > < a : f o n t s c r i p t = " G u j r " t y p e f a c e = " S h r u t i " / > < a : f o n t s c r i p t = " K h m r " t y p e f a c e = " M o o l B o r a n " / > < a : f o n t s c r i p t = " K n d a " t y p e f a c e = " T u n g a " / > < a : f o n t s c r i p t = " G u r u " t y p e f a c e = " R a a v i " / > < a : f o n t s c r i p t = " C a n s " t y p e f a c e = " E u p h e m i a " / > < a : f o n t s c r i p t = " C h e r " t y p e f a c e = " P l a n t a g e n e t C h e r o k e e " / > < a : f o n t s c r i p t = " Y i i i " t y p e f a c e = " M i c r o s o f t Y i B a i t i " / > < a : f o n t s c r i p t = " T i b t " t y p e f a c e = " M i c r o s o f t H i m a l a y a " / > < a : f o n t s c r i p t = " T h a a " t y p e f a c e = " M V B o l i " / > < a : f o n t s c r i p t = " D e v a " t y p e f a c e = " M a n g a l " / > < a : f o n t s c r i p t = " T e l u " t y p e f a c e = " G a u t a m i " / > < a : f o n t s c r i p t = " T a m l " t y p e f a c e = " L a t h a " / > < a : f o n t s c r i p t = " S y r c " t y p e f a c e = " E s t r a n g e l o E d e s s a " / > < a : f o n t s c r i p t = " O r y a " t y p e f a c e = " K a l i n g a " / > < a : f o n t s c r i p t = " M l y m " t y p e f a c e = " K a r t i k a " / > < a : f o n t s c r i p t = " L a o o " t y p e f a c e = " D o k C h a m p a " / > < a : f o n t s c r i p t = " S i n h " t y p e f a c e = " I s k o o l a P o t a " / > < a : f o n t s c r i p t = " M o n g " t y p e f a c e = " M o n g o l i a n B a i t i " / > < a : f o n t s c r i p t = " V i e t " t y p e f a c e = " T i m e s N e w R o m a n " / > < a : f o n t s c r i p t = " U i g h " t y p e f a c e = " M i c r o s o f t U i g h u r " / > < a : f o n t s c r i p t = " G e o r " t y p e f a c e = " S y l f a e n " / > < / a : m a j o r F o n t > < a : m i n o r F o n t > < a : l a t i n t y p e f a c e = " C a l i b r i " / > < a : e a t y p e f a c e = " " / > < a : c s t y p e f a c e = " " / > < a : f o n t s c r i p t = " J p a n " t y p e f a c e = " M S P ゴ シ ッ ク " / > < a : f o n t s c r i p t = " H a n g " t y p e f a c e = " 맑 은 고 딕 " / > < a : f o n t s c r i p t = " H a n s " t y p e f a c e = " 宋 体 " / > < a : f o n t s c r i p t = " H a n t " t y p e f a c e = " 新 細 明 體 " / > < a : f o n t s c r i p t = " A r a b " t y p e f a c e = " A r i a l " / > < a : f o n t s c r i p t = " H e b r " t y p e f a c e = " A r i a l " / > < a : f o n t s c r i p t = " T h a i " t y p e f a c e = " T a h o m a " / > < a : f o n t s c r i p t = " E t h i " t y p e f a c e = " N y a l a " / > < a : f o n t s c r i p t = " B e n g " t y p e f a c e = " V r i n d a " / > < a : f o n t s c r i p t = " G u j r " t y p e f a c e = " S h r u t i " / > < a : f o n t s c r i p t = " K h m r " t y p e f a c e = " D a u n P e n h " / > < a : f o n t s c r i p t = " K n d a " t y p e f a c e = " T u n g a " / > < a : f o n t s c r i p t = " G u r u " t y p e f a c e = " R a a v i " / > < a : f o n t s c r i p t = " C a n s " t y p e f a c e = " E u p h e m i a " / > < a : f o n t s c r i p t = " C h e r " t y p e f a c e = " P l a n t a g e n e t C h e r o k e e " / > < a : f o n t s c r i p t = " Y i i i " t y p e f a c e = " M i c r o s o f t Y i B a i t i " / > < a : f o n t s c r i p t = " T i b t " t y p e f a c e = " M i c r o s o f t H i m a l a y a " / > < a : f o n t s c r i p t = " T h a a " t y p e f a c e = " M V B o l i " / > < a : f o n t s c r i p t = " D e v a " t y p e f a c e = " M a n g a l " / > < a : f o n t s c r i p t = " T e l u " t y p e f a c e = " G a u t a m i " / > < a : f o n t s c r i p t = " T a m l " t y p e f a c e = " L a t h a " / > < a : f o n t s c r i p t = " S y r c " t y p e f a c e = " E s t r a n g e l o E d e s s a " / > < a : f o n t s c r i p t = " O r y a " t y p e f a c e = " K a l i n g a " / > < a : f o n t s c r i p t = " M l y m " t y p e f a c e = " K a r t i k a " / > < a : f o n t s c r i p t = " L a o o " t y p e f a c e = " D o k C h a m p a " / > < a : f o n t s c r i p t = " S i n h " t y p e f a c e = " I s k o o l a P o t a " / > < a : f o n t s c r i p t = " M o n g " t y p e f a c e = " M o n g o l i a n B a i t i " / > < a : f o n t s c r i p t = " V i e t " t y p e f a c e = " A r i a l " / > < a : f o n t s c r i p t = " U i g h " t y p e f a c e = " M i c r o s o f t U i g h u r " / > < a : f o n t s c r i p t = " G e o r " t y p e f a c e = " S y l f a e n " / > < / a : m i n o r F o n t > < / a : f o n t S c h e m e > < a : f m t S c h e m e n a m e = " O f f i c e " > < a : f i l l S t y l e L s t > < a : s o l i d F i l l > < a : s c h e m e C l r v a l = " p h C l r " / > < / a : s o l i d F i l l > < a : g r a d F i l l r o t W i t h S h a p e = " 1 " > < a : g s L s t > < a : g s p o s = " 0 " > < a : s c h e m e C l r v a l = " p h C l r " > < a : t i n t v a l = " 5 0 0 0 0 " / > < a : s a t M o d v a l = " 3 0 0 0 0 0 " / > < / a : s c h e m e C l r > < / a : g s > < a : g s p o s = " 3 5 0 0 0 " > < a : s c h e m e C l r v a l = " p h C l r " > < a : t i n t v a l = " 3 7 0 0 0 " / > < a : s a t M o d v a l = " 3 0 0 0 0 0 " / > < / a : s c h e m e C l r > < / a : g s > < a : g s p o s = " 1 0 0 0 0 0 " > < a : s c h e m e C l r v a l = " p h C l r " > < a : t i n t v a l = " 1 5 0 0 0 " / > < a : s a t M o d v a l = " 3 5 0 0 0 0 " / > < / a : s c h e m e C l r > < / a : g s > < / a : g s L s t > < a : l i n a n g = " 1 6 2 0 0 0 0 0 " s c a l e d = " 1 " / > < / a : g r a d F i l l > < a : g r a d F i l l r o t W i t h S h a p e = " 1 " > < a : g s L s t > < a : g s p o s = " 0 " > < a : s c h e m e C l r v a l = " p h C l r " > < a : t i n t v a l = " 1 0 0 0 0 0 " / > < a : s h a d e v a l = " 1 0 0 0 0 0 " / > < a : s a t M o d v a l = " 1 3 0 0 0 0 " / > < / a : s c h e m e C l r > < / a : g s > < a : g s p o s = " 1 0 0 0 0 0 " > < a : s c h e m e C l r v a l = " p h C l r " > < a : t i n t v a l = " 5 0 0 0 0 " / > < a : s h a d e v a l = " 1 0 0 0 0 0 " / > < a : s a t M o d v a l = " 3 5 0 0 0 0 " / > < / a : s c h e m e C l r > < / a : g s > < / a : g s L s t > < a : l i n a n g = " 1 6 2 0 0 0 0 0 " s c a l e d = " 0 " / > < / a : g r a d F i l l > < / a : f i l l S t y l e L s t > < a : l n S t y l e L s t > < a : l n w = " 9 5 2 5 " c a p = " f l a t " c m p d = " s n g " a l g n = " c t r " > < a : s o l i d F i l l > < a : s c h e m e C l r v a l = " p h C l r " > < a : s h a d e v a l = " 9 5 0 0 0 " / > < a : s a t M o d v a l = " 1 0 5 0 0 0 " / > < / a : s c h e m e C l r > < / a : s o l i d F i l l > < a : p r s t D a s h v a l = " s o l i d " / > < / a : l n > < a : l n w = " 2 5 4 0 0 " c a p = " f l a t " c m p d = " s n g " a l g n = " c t r " > < a : s o l i d F i l l > < a : Line truncated
` ,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM=" \u FEFF",this.alwaysWriteHeaders=!1,Object.assign(this, $ ||{}),typeof( $ ===null|| $ ===void 0?void 0: $ .quoteHeaders)>"u")this.quoteHeaders=this.quoteColumns;if(( $ ===null|| $ ===void 0?void 0: $ .quote)===!0)this.quote='"';else if(( $ ===null|| $ ===void 0?void 0: $ .quote)===!1)this.quote="";if(typeof( $ ===null|| $ ===void 0?void 0: $ .escape)!=="string")this.escape=this.quote;this.shouldWriteHeaders=!!this.headers&&((I= $ .writeHeaders)!==null&&I!==void 0?I:!0),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote= ` $ { this . escape } $ { this . quote } ` }}e90.FormatterOptions=s90});var TZ=O((OR1,U70)=>{var Jt0="[object AsyncFunction]",Qt0="[object Function]",wt0="[object GeneratorFunction]",Kt0="[object Null]",Ht0="[object Proxy]",Gt0="[object Undefined]",Wt0=typeof global=="object"&&global&&global.Object===Object&&global,Vt0=typeof self=="object"&&self&&self.Object===Object&&self,Zt0=Wt0||Vt0||Function("return this")(),z70=Object.prototype,Xt0=z70.hasOwnProperty,q70=z70.toString,I70=Zt0.Symbol,v3=I70?I70.toStringTag:void 0;function Lt0( $ ){if( $ ==null)return $ ===void 0?Gt0:Kt0;return v3&&v3 in Object( $ )?Dt0( $ ):Ft0( $ )}function Dt0( $ ){var I=Xt0.call( $ ,v3),z= $ [v3];try{ $ [v3]=void 0;var q=!0}catch(Y){}var U=q70.call( $ );if(q)if(I) $ [v3]=z;else delete $ [v3];return U}function Ft0( $ ){return q70.call( $ )}function Ot0( $ ){if(!Nt0( $ ))return!1;var I=Lt0( $ );return I==Qt0||I==wt0||I==Jt0||I==Ht0}function Nt0( $ ){var I=typeof $ ;return $ !=null&&(I=="object"||I=="function")}U70.exports=Ot0});var f70=O((EZ,Eq)=>{var Mt0=200,ng="__lodash_hash_undefined__",hZ=1,L70=2,D70=9007199254740991,BZ="[object Arguments]",hg="[object Array]",At0="[object AsyncFunction]",F70="[object Boolean]",O70="[object Date]",N70="[object Error]",M70="[object Function]",Pt0="[object GeneratorFunction]",jZ="[object Map]",A70="[object Number]",Tt0="[object Null]",Tq="[object Object]",Y70="[object Promise]",Et0="[object Proxy]",P70="[object RegExp]",vZ="[object Set]",T70="[object String]",Bt0="[object Symbol]",jt0="[object Undefined]",Sg="[object WeakMap]",E70="[object ArrayBuffer]",RZ="[object DataView]",vt0="[object Float32Array]",Rt0="[object Float64Array]",gt0="[object Int8Array]",_t0="[object Int16Array]",Ct0="[object Int32Array]",ht0="[object Uint8Array]",St0="[object Uint8ClampedArray]",yt0="[object Uint16Array]",ut0="[object Uint32Array]",xt0=/[ \\ ^ $ .*+?()[ \] {}|]/g,kt0=/^ \[ object .+?Constructor \] $ /,ft0=/^(?:0|[1-9] \d *) $ /,e1={};e1[vt0]=e1[Rt0]=e1[gt0]=e1[_t0]=e1[Ct0]=e1[ht0]=e1[St0]=e1[yt0]=e1[ut0]=!0;e1[BZ]=e1[hg]=e1[E70]=e1[F70]=e1[RZ]=e1[O70]=e1[N70]=e1[M70]=e1[jZ]=e1[A70]=e1[Tq]=e1[P70]=e1[vZ]=e1[T70]=e1[Sg]=!1;var B70=typeof global=="object"&&global&&global.Object===Object&&global,nt0=typeof self=="object"&&self&&self.Object===Object&&self,g5=B70||nt0||Function("return this")(),j70=typeof EZ=="object"&&EZ&&!EZ.nodeType&&EZ,J70=j70&&typeof Eq=="object"&&Eq&&!Eq.nodeType&&Eq,v70=J70&&J70.exports===j70,gg=v70&&B70.process,Q70=function(){try{return gg&&gg.binding&&gg.binding("util")}catch( $ ){}}(),w70=Q70&&Q70.isTypedArray;function bt0( $ ,I){var z=-1,q= $ ==null?0: $ .length,U=0,Y=[];while(++z<q){var J= $ [z];if(I(J,z, $ ))Y[U++]=J}return Y}function it0( $ ,I){var z=-1,q=I.length,U= $ .length;while(++z<q) $ [U+z]=I[z];return $ }function pt0( $ ,I){var z=-1,q= $ ==null?0: $ .length;while(++z<q)if(I( $ [z],z, $ ))return!0;return!1}function ct0( $ ,I){var z=-1,q=Array( $ );while(++z< $ )q[z]=I(z);return q}function dt0( $ ){return function(I){return $ (I)}}function mt0( $ ,I){return $ .has(I)}function lt0( $ ,I){return $ ==null?void 0: $ [I]}function ot0( $ ){var I=-1,z=Array( $ .size);return $ .forEach(function(q,U){z[++I]=[U,q]}),z}function rt0( $ ,I){return function(z){return $ (I(z))}}function tt0( $ ){var I=-1,z=Array( $ .size);return $ .forEach(function(q){z[++I]=q}),z}var at0=Array.prototype,st0=Function.prototype,SZ=Object.prototype,_g=g5["__core-js_shared__"],R70=st0.toString,i8=SZ.hasOwnProperty,K70=function(){var $ =/[^.]+ $ /.exec(_g&&_g.keys&&_g.keys.IE_PROTO||"");return $ ?"Symbol(src)_1."+ $ :""}(),g70=SZ.toString,et0=RegExp("^"+R70.call(i8).replace(xt0," \\ $ &").replace(/hasOwnProperty|(function).*?(?= \\ \( )| for .+?(?= \\ \] )/g," $ 1.*?")+" $ "),H70=v70?g5.Buffer:void 0,gZ=g5.Symbol,G70=g5.Uint8Array,_70=SZ.propertyIsEnumerable, $ a0=at0.splice,R3=gZ?gZ.toStringTag:void 0,W70=Object.getOwnPropertySymbols,Ia0=H70?H70.isBuffer:void 0,za0=rt0(Object.keys,Object),yg=Bq(g5,"DataView"),iQ=Bq(g5,"Map"),ug=Bq(g5,"Promise"),xg=Bq(g5,"Set"),kg=Bq(g5,"WeakMap"),pQ=Bq(Object,"create"),qa0=C3(yg),Ua0=C3(iQ),Ya0=C3(ug),Ja0=C3(xg),Qa0=C3(kg),V70=gZ?gZ.prototype:void 0,Cg=V70?V70.valueOf:void 0;function g3( $ ){var I=-1,z= $ ==null?0: $ .length;this.clear();while(++I<z){var q= $ [I];this.set(q[0],q[1])}}function wa0(){this.__data__=pQ?pQ(null):{},this.size=0}function Ka0( $ ){var I=this.has( $ )&&delete this.__data__[ $ ];return this.size-=I?1:0,I}function Ha0( $ ){var I=this.__data
Line truncated
] ` ;this.ESCAPE_REGEXP=new RegExp(I)}set headers( $ ){this._headers= $ }shouldQuote( $ ,I){let z=I?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;if(Ls0.default(z))return z;if(Array.isArray(z))return z[ $ ];if(this._headers!==null)return z[this._headers[ $ ]];return!1}format( $ ,I,z){let q= ` $ { Ds0 . default ( $ ) ? "" : $ } ` .replace(/ \0 /g,""),{formatterOptions:U}=this;if(U.quote!==""){if(q.indexOf(U.quote)!==-1)return this.quoteField(q.replace(this.REPLACE_REGEXP,U.escapedQuote))}if(q.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(I,z))return this.quoteField(q);return q}quoteField( $ ){let{quote:I}=this.formatterOptions;return ` $ { I } $ { $ } $ { I } ` }}jq.FieldFormatter=o70});var dg=O((r70)=>{Object.defineProperty(r70,"__esModule",{value:!0});r70.isSyncTransform=void 0;r70.isSyncTransform=( $ )=> $ .length===1});var s70=O((vq)=>{var a70=vq&&vq.__importDefault||function( $ ){return $ && $ .__esModule? $ :{default: $ }};Object.defineProperty(vq,"__esModule",{value:!0});vq.RowFormatter=void 0;var Os0=a70(TZ()),Ns0=a70(f70()),Ms0=cg(),As0=dg();class h3{constructor( $ ){if(this.rowCount=0,this.formatterOptions= $ ,this.fieldFormatter=new Ms0.FieldFormatter( $ ),this.headers= $ .headers,this.shouldWriteHeaders= $ .shouldWriteHeaders,this.hasWrittenHeaders=!1,this.headers!==null)this.fieldFormatter.headers=this.headers;if( $ .transform)this.rowTransform= $ .transform}static isRowHashArray( $ ){if(Array.isArray( $ ))return Array.isArray( $ [0])&& $ [0].length===2;return!1}static isRowArray( $ ){return Array.isArray( $ )&&!this.isRowHashArray( $ )}static gatherHeaders( $ ){if(h3.isRowHashArray( $ ))return $ .map((I)=>I[0]);if(Array.isArray( $ ))return $ ;return Object.keys( $ )}static createTransform( $ ){if(As0.isSyncTransform( $ ))return(I,z)=>{let q=null;try{q= $ (I)}catch(U){return z(U)}return z(null,q)};return(I,z)=>{ $ (I,z)}}set rowTransform( $ ){if(!Os0.default( $ ))throw TypeError("The transform should be a function");this._rowTransform=h3.createTransform( $ )}format( $ ,I){this.callTransformer( $ ,(z,q)=>{if(z)return I(z);if(! $ )return I(null);let U=[];if(q){let{shouldFormatColumns:Y,headers:J}=this.checkHeaders(q);if(this.shouldWriteHeaders&&J&&!this.hasWrittenHeaders)U.push(this.formatColumns(J,!0)),this.hasWrittenHeaders=!0;if(Y){let Q=this.gatherColumns(q);U.push(this.formatColumns(Q,!1))}}return I(null,U)})}finish( $ ){let I=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return $ (Error(" ` alwaysWriteHeaders ` option is set to true but ` headers ` option not provided."));I.push(this.formatColumns(this.headers,!0))}if(this.formatterOptions.includeEndRowDelimiter)I.push(this.formatterOptions.rowDelimiter);return $ (null,I)}checkHeaders( $ ){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};let I=h3.gatherHeaders( $ );if(this.headers=I,this.fieldFormatter.headers=I,!this.shouldWriteHeaders)return{shouldFormatColumns:!0,headers:null};return{shouldFormatColumns:!Ns0.default(I, $ ),headers:I}}gatherColumns( $ ){if(this.headers===null)throw Error("Headers is currently null");if(!Array.isArray( $ ))return this.headers.map((I)=> $ [I]);if(h3.isRowHashArray( $ ))return this.headers.map((I,z)=>{let q= $ [z];if(q)return q[1];return""});if(h3.isRowArray( $ )&&!this.shouldWriteHeaders)return $ ;return this.headers.map((I,z)=> $ [z])}callTransformer( $ ,I){if(!this._rowTransform)return I(null, $ );return this._rowTransform( $ ,I)}formatColumns( $ ,I){let z= $ .map((U,Y)=>this.fieldFormatter.format(U,Y,I)).join(this.formatterOptions.delimiter),{rowCount:q}=this;if(this.rowCount+=1,q)return[this.formatterOptions.rowDelimiter,z].join("");return z}}vq.RowFormatter=h3});var e70=O((xZ)=>{Object.defineProperty(xZ,"__esModule",{value:!0});xZ.FieldFormatter=xZ.RowFormatter=void 0;var Ps0=s70();Object.defineProperty(xZ,"RowFormatter",{enumerable:!0,get:function(){return Ps0.RowFormatter}});var Ts0=cg();Object.defineProperty(xZ,"FieldFormatter",{enumerable:!0,get:function(){return Ts0.FieldFormatter}})});var mg=O((I30)=>{Object.defineProperty(I30,"__esModule",{value:!0});I30.CsvFormatterStream=void 0;var Bs0=t("stream"),js0=e70();class $ 30 extends Bs0.Transform{constructor( $ ){super({writableObjectMode: $ .objectMode});this.hasWrittenBOM=!1,this.formatterOptions= $ ,this.rowFormatter=new js0.RowFormatter( $ ),this.hasWrittenBOM=! $ .writeBOM}transform( $ ){return this.rowFormatter.rowTransform= $ ,this}_transform( $ ,I,z){let q=!1;try{if(!this.hasWrittenBOM)this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0;this.rowFormatter.format( $ ,(U,Y)=>{if(U)return q=!0,z(U);if(Y)Y.forEach((J)=>{this.push(Buffer.from(J,"utf8"))});return q=!0,z()})}catch(U){if(q)throw U;z(U)}}_flush( $ ){this.rowFormatter.finish((I,z)=>{if(I)return $ (I);if(z)z.forEach((q)=>{this.push(Buffer.from(q,"utf8"))});return $ ()})}}I30.CsvFormatterStream= $ 30});var U30=O((E1)=>{var q30=E1&&E1.__createBinding||(Object.create?function( $ ,I,z,q){if(q===void 0)q=z;Object.defineProperty( $ ,q,{enumerable:!0,get:function(){return I[z]}})}:function( $ ,I,z,q){if(q===void 0)q=z; $ [q]=I[z]}),vs0=E1&&E1.__setModuleDefault||(Object.create?function( $ ,I){Ob
Line truncated
deps : $ { z } } ` };var gg0={keyword:"dependencies",type:"object",schemaType:"object",error:Mc.error,code( $ ){let[I,z]=Rg0( $ );Fc( $ ,I),Nc( $ ,z)}};function Rg0({schema: $ }){let I={},z={};for(let q in $ ){if(q==="__proto__")continue;let U=Array.isArray( $ [q])?I:z;U[q]= $ [q]}return[I,z]}function Fc( $ ,I= $ .schema){let{gen:z,data:q,it:U}= $ ;if(Object.keys(I).length===0)return;let Y=z.let("missing");for(let J in I){let Q=I[J];if(Q.length===0)continue;let w=(0,FJ.propertyInData)(z,q,J,U.opts.ownProperties);if( $ .setParams({property:J,depsCount:Q.length,deps:Q.join(", ")}),U.allErrors)z.if(w,()=>{for(let K of Q)(0,FJ.checkReportMissingProp)( $ ,K)});else z.if(SE._ ` $ { w } && ( $ { ( 0 , FJ . checkMissingProp ) ( $ , Q , Y ) } ) ` ),(0,FJ.reportMissingProp)( $ ,Y),z.else()}}Mc.validatePropertyDeps=Fc;function Nc( $ ,I= $ .schema){let{gen:z,data:q,keyword:U,it:Y}= $ ,J=z.name("valid");for(let Q in I){if((0,vg0.alwaysValidSchema)(Y,I[Q]))continue;z.if((0,FJ.propertyInData)(z,q,Q,Y.opts.ownProperties),()=>{let w= $ .subschema({keyword:U,schemaProp:Q},J); $ .mergeValidEvaluated(w,J)},()=>z.var(J,!0)), $ .ok(J)}}Mc.validateSchemaDeps=Nc;Mc.default=gg0});var jc=F((Bc)=>{Object.defineProperty(Bc,"__esModule",{value:!0});var Ec=s0(),hg0=X1(),ug0={message:"property name must be valid",params:({params: $ })=>Ec._ ` { propertyName : $ { $ . propertyName } } ` },Sg0={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:ug0,code( $ ){let{gen:I,schema:z,data:q,it:U}= $ ;if((0,hg0.alwaysValidSchema)(U,z))return;let Y=I.name("valid");I.forIn("key",q,(J)=>{ $ .setParams({propertyName:J}), $ .subschema({keyword:"propertyNames",data:J,dataTypes:["string"],propertyName:J,compositeRule:!0},Y),I.if((0,Ec.not)(Y),()=>{if( $ .error(!0),!U.allErrors)I.break()})}), $ .ok(Y)}};Bc.default=Sg0});var yE=F((vc)=>{Object.defineProperty(vc,"__esModule",{value:!0});var hG=h $ (),q8=s0(),xg0=Z5(),uG=X1(),kg0={message:"must NOT have additional properties",params:({params: $ })=>q8._ ` { additionalProperty : $ { $ . additionalProperty } } ` },fg0={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:kg0,code( $ ){let{gen:I,schema:z,parentSchema:q,data:U,errsCount:Y,it:J}= $ ;if(!Y)throw Error("ajv implementation error");let{allErrors:Q,opts:w}=J;if(J.props=!0,w.removeAdditional!=="all"&&(0,uG.alwaysValidSchema)(J,z))return;let K=(0,hG.allSchemaProperties)(q.properties),H=(0,hG.allSchemaProperties)(q.patternProperties);G(), $ .ok(q8._ ` $ { Y } === $ { xg0 . default . errors } ` );function G(){I.forIn("key",U,(D)=>{if(!K.length&&!H.length)X(D);else I.if(W(D),()=>X(D))})}function W(D){let O;if(K.length>8){let T=(0,uG.schemaRefOrVal)(J,q.properties,"properties");O=(0,hG.isOwnProperty)(I,T,D)}else if(K.length)O=(0,q8.or)(...K.map((T)=>q8._ ` $ { D } === $ { T } ` ));else O=q8.nil;if(H.length)O=(0,q8.or)(O,...H.map((T)=>q8._ ` $ { ( 0 , hG . usePattern ) ( $ , T ) } . test ( $ { D } ) ` ));return(0,q8.not)(O)}function Z(D){I.code(q8._ ` delete $ { U } [ $ { D } ] ` )}function X(D){if(w.removeAdditional==="all"||w.removeAdditional&&z===!1){Z(D);return}if(z===!1){if( $ .setParams({additionalProperty:D}), $ .error(),!Q)I.break();return}if(typeof z=="object"&&!(0,uG.alwaysValidSchema)(J,z)){let O=I.name("valid");if(w.removeAdditional==="failing")L(D,O,!1),I.if((0,q8.not)(O),()=>{ $ .reset(),Z(D)});else if(L(D,O),!Q)I.if((0,q8.not)(O),()=>I.break())}}function L(D,O,T){let P={keyword:"additionalProperties",dataProp:D,dataPropType:uG.Type.Str};if(T===!1)Object.assign(P,{compositeRule:!0,createErrors:!1,allErrors:!1}); $ .subschema(P,O)}}};vc.default=fg0});var Cc=F((_c)=>{Object.defineProperty(_c,"__esModule",{value:!0});var bg0=QJ(),gc=h $ (),xE=X1(),Rc=yE(),ig0={keyword:"properties",type:"object",schemaType:"object",code( $ ){let{gen:I,schema:z,parentSchema:q,data:U,it:Y}= $ ;if(Y.opts.removeAdditional==="all"&&q.additionalProperties===void 0)Rc.default.code(new bg0.KeywordCxt(Y,Rc.default,"additionalProperties"));let J=(0,gc.allSchemaProperties)(z);for(let G of J)Y.definedProperties.add(G);if(Y.opts.unevaluated&&J.length&&Y.props!==!0)Y.props=xE.mergeEvaluated.props(I,(0,xE.toHash)(J),Y.props);let Q=J.filter((G)=>!(0,xE.alwaysValidSchema)(Y,z[G]));if(Q.length===0)return;let w=I.name("valid");for(let G of Q){if(K(G))H(G);else{if(I.if((0,gc.propertyInData)(I,U,G,Y.opts.ownProperties)),H(G),!Y.allErrors)I.else().var(w,!0);I.endIf()} $ .it.definedProperties.add(G), $ .ok(w)}function K(G){return Y.opts.useDefaults&&!Y.compositeRule&&z[G].default!==void 0}function H(G){ $ .subschema({keyword:"properties",schemaProp:G,dataProp:G},w)}}};_c.default=ig0});var xc=F((yc)=>{Object.defineProperty(yc,"__esModule",{value:!0});var hc=h $ (),SG=s0(),uc=X1(),Sc=X1(),cg0={keyword:"patternProperties",type:"object",schemaType:"object",code( $ ){let{gen:I,schema:z,data:q,parentSchema:U,it:Y}= $ ,{opts:J}=Y,Q=(0,hc.allSchemaProperties)(z),w=Q.filter((L)=>(0,uc.alwaysValidSchema)(Y,z[L]));if(Q.length===0||w.length===Q.length&&(!Y.opts.unevaluated||Y.props===!0))return;let K=J.strictSchema&&!J.allowMatchingProperties&&U.properties,H=I.name("valid");if(Y.props!==!0&&!(Y.props instanceo
Line truncated
\ x00 ` ,f+=o1(x,2),f+=Q.magic,f+=o1(D,2),f+=o1(O,2),f+=o1(h.crc32,4),f+=o1(h.compressedSize,4),f+=o1(h.uncompressedSize,4),f+=o1(K.length,2),f+=o1(T.length,2);var R=OV.LOCAL_FILE_HEADER+f+K+T,k=OV.CENTRAL_FILE_HEADER+o1(n,2)+f+o1(W.length,2)+" \x 00 \x 00 \x 00 \x 00"+o1(B,4)+o1(q,4)+K+T+W;return{fileRecord:R,dirRecord:k}},Mf0=function( $ ,I,z,q,U){var Y="",J=Uq.transformTo("string",U(q));return Y=OV.CENTRAL_DIRECTORY_END+" \x 00 \x 00 \x 00 \x 00"+o1( $ ,2)+o1( $ ,2)+o1(I,4)+o1(z,4)+o1(J.length,2)+J,Y},Af0=function( $ ){var I="";return I=OV.DATA_DESCRIPTOR+o1( $ .crc32,4)+o1( $ .compressedSize,4)+o1( $ .uncompressedSize,4),I};function G8( $ ,I,z,q){Yq.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=I,this.zipPlatform=z,this.encodeFileName=q,this.streamFiles= $ ,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}Uq.inherits(G8,Yq);G8.prototype.push=function( $ ){var I= $ .meta.percent||0,z=this.entriesCount,q=this._sources.length;if(this.accumulate)this.contentBuffer.push( $ );else this.bytesWritten+= $ .data.length,Yq.prototype.push.call(this,{data: $ .data,meta:{currentFile:this.currentFile,percent:z?(I+100*(z-q-1))/z:100}})};G8.prototype.openedSource=function( $ ){this.currentSourceOffset=this.bytesWritten,this.currentFile= $ .file.name;var I=this.streamFiles&&! $ .file.dir;if(I){var z=Rs( $ ,I,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:z.fileRecord,meta:{percent:0}})}else this.accumulate=!0};G8.prototype.closedSource=function( $ ){this.accumulate=!1;var I=this.streamFiles&&! $ .file.dir,z=Rs( $ ,I,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(z.dirRecord),I)this.push({data:Af0( $ ),meta:{percent:100}});else{this.push({data:z.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null};G8.prototype.flush=function(){var $ =this.bytesWritten;for(var I=0;I<this.dirRecords.length;I++)this.push({data:this.dirRecords[I],meta:{percent:100}});var z=this.bytesWritten- $ ,q=Mf0(this.dirRecords.length,z, $ ,this.zipComment,this.encodeFileName);this.push({data:q,meta:{percent:100}})};G8.prototype.prepareNextSource=function(){if(this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused)this.previous.pause();else this.previous.resume()};G8.prototype.registerPrevious=function( $ ){this._sources.push( $ );var I=this;return $ .on("data",function(z){I.processChunk(z)}), $ .on("end",function(){if(I.closedSource(I.previous.streamInfo),I._sources.length)I.prepareNextSource();else I.end()}), $ .on("error",function(z){I.error(z)}),this};G8.prototype.resume=function(){if(!Yq.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};G8.prototype.error=function( $ ){var I=this._sources;if(!Yq.prototype.error.call(this, $ ))return!1;for(var z=0;z<I.length;z++)try{I[z].error( $ )}catch(q){}return!0};G8.prototype.lock=function(){Yq.prototype.lock.call(this);var $ =this._sources;for(var I=0;I< $ .length;I++) $ [I].lock()};_s.exports=G8});var hs=F((Bf0)=>{var Pf0=Ov(),Tf0=Cs(),Ef0=function( $ ,I){var z= $ ||I,q=Pf0[z];if(!q)throw Error(z+" is not a valid compression method !");return q};Bf0.generateWorker=function( $ ,I,z){var q=new Tf0(I.streamFiles,z,I.platform,I.encodeFileName),U=0;try{ $ .forEach(function(Y,J){U++;var Q=Ef0(J.options.compression,I.compression),w=J.options.compressionOptions||I.compressionOptions||{},K=J.dir,H=J.date;J._compressWorker(Q,w).withStreamInfo("file",{name:Y,dir:K,date:H,comment:J.comment||"",unixPermissions:J.unixPermissions,dosPermissions:J.dosPermissions}).pipe(q)}),q.entriesCount=U}catch(Y){q.error(Y)}return q}});var Ss=F((jB1,us)=>{var vf0=W4(),FV=L $ ();function MQ( $ ,I){FV.call(this,"Nodejs stream input adapter for "+ $ ),this._upstreamEnded=!1,this._bindStream(I)}vf0.inherits(MQ,FV);MQ.prototype._bindStream=function( $ ){var I=this;this._stream= $ , $ .pause(), $ .on("data",function(z){I.push({data:z,meta:{percent:0}})}).on("error",function(z){if(I.isPaused)this.generatedError=z;else I.error(z)}).on("end",function(){if(I.isPaused)I._upstreamEnded=!0;else I.end()})};MQ.prototype.pause=function(){if(!FV.prototype.pause.call(this))return!1;return this._stream.pause(),!0};MQ.prototype.resume=function(){if(!FV.prototype.resume.call(this))return!1;if(this._upstreamEnded)this.end();else this._stream.resume();return!0};us.exports=MQ});var ds=F((vB1,cs)=>{var gf0=oz(),AQ=W4(),fs=L $ (),Rf0=Tj(),ns=Ej(),ys= $ V(),_f0=xt(),Cf0=hs(),xs= $ Q(),hf0=Ss(),bs=function( $ ,I,z){var q=AQ.getTypeOf(I),U,Y=AQ.extend(z||{},ns);if(Y.date=Y.date||new Date,Y.compression!==null)Y.compression=Y.compression.toUpperCase();if(typeof Y.unixPermissions==="string")Y.unixPermissions=parseInt(Y.unixPermissions,8);if(Y.unixPermissions&&Y.unixPermissions&16384)Y.dir=!0;if(Y.dosPermissions&&Y.dosPermissions&16)Y.dir=!0;if(Y.
Line truncated
` )}openNode( $ ,I){let z=this.tos,q=this._xml;if(z&&this.open)q.push(">");this._stack.push( $ ),q.push("<"),q.push( $ ),zg (q,I),this.leaf=!0,this.open=!0}addAttribute( $ ,I){if(!this.open)throw Error("Cannot write attributes to node if it is not open");if(I!==void 0)S 00(this._xml, $ ,I)}addAttributes( $ ){if(!this.open)throw Error("Cannot write attributes to node if it is not open");zg (this._xml, $ )}writeText( $ ){let I=this._xml;if(this.open)I.push(">"),this.open=!1;this.leaf=!1,I.push(u 00.xmlEncode( $ .toString()))}writeXml( $ ){if(this.open)this._xml.push(">"),this.open=!1;this.leaf=!1,this._xml.push( $ )}closeNode(){let $ =this._stack.pop(),I=this._xml;if(this.leaf)I.push("/>");else I.push("</"),I.push( $ ),I.push(">");this.open=!1,this.leaf=!1}leafNode( $ ,I,z){if(this.openNode( $ ,I),z!==void 0)this.writeText(z);this.closeNode()}closeAll(){while(this._stack.length)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){let $ =this._rollbacks.pop();if(this._xml.length> $ .xml)this._xml.splice( $ .xml,this._xml.length- $ .xml);if(this._stack.length> $ .stack)this._stack.splice( $ .stack,this._stack.length- $ .stack);this.leaf= $ .leaf,this.open= $ .open}get xml(){return this.closeAll(),this._xml.join("")}}qg .StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"};y 00.exports=qg });var Ug=F ((T i0)=>{var x 00=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function P i0( $ ){if(typeof $ ==="string")return $ ;if(x 00)return x 00.decode( $ );return $ .toString()}T i0.bufferToString=P i0});var i 00=F ((f 00)=>{Object.defineProperty(f 00,"__esModule",{value:!0});f 00.CHAR= `
\ r - - � \uD800\uDC00 - \uDBFF\uDFFF ` ;f 00.S= ` \ r
` ;f 00.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-� \u D800 \u DC00- \u DB7F \u DFFF";f 00.NAME_CHAR="-"+f 00.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";f 00.CHAR_RE=new RegExp("^["+f 00.CHAR+"] $ ","u");f 00.S_RE=new RegExp("^["+f 00.S+"]+ $ ","u");f 00.NAME_START_CHAR_RE=new RegExp("^["+f 00.NAME_START_CHAR+"] $ ","u");f 00.NAME_CHAR_RE=new RegExp("^["+f 00.NAME_CHAR+"] $ ","u");f 00.NAME_RE=new RegExp("^["+f 00.NAME_START_CHAR+"]["+f 00.NAME_CHAR+"]* $ ","u");f 00.NMTOKEN_RE=new RegExp("^["+f 00.NAME_CHAR+"]+ $ ","u");var Yg =9,Jg =10,Qg =13,wg =32;f 00.S_LIST=[wg,Jg,Qg,Yg ];function B i0( $ ){return $ >=wg && $ <=55295|| $ ===Jg || $ ===Qg || $ ===Yg || $ >=57344&& $ <=65533|| $ >=65536&& $ <=1114111}f 00.isChar=B i0;function j i0( $ ){return $ ===wg || $ ===Jg || $ ===Qg || $ ===Yg}f 00.isS=j i0;function k 00( $ ){return $ >=65&& $ <=90|| $ >=97&& $ <=122|| $ ===58|| $ ===95|| $ ===8204|| $ ===8205|| $ >=192&& $ <=214|| $ >=216&& $ <=246|| $ >=248&& $ <=767|| $ >=880&& $ <=893|| $ >=895&& $ <=8191|| $ >=8304&& $ <=8591|| $ >=11264&& $ <=12271|| $ >=12289&& $ <=55295|| $ >=63744&& $ <=64975|| $ >=65008&& $ <=65533|| $ >=65536&& $ <=983039}f 00.isNameStartChar=k 00;function v i0( $ ){return k 00( $ )|| $ >=48&& $ <=57|| $ ===45|| $ ===46|| $ ===183|| $ >=768&& $ <=879|| $ >=8255&& $ <=8256}f 00.isNameChar=v i0});var s 00=F ((o 00)=>{Object.defineProperty(o 00,"__esModule",{value:!0});o 00.CHAR=" \x 01--� \u D800 \u DC00- \u DBFF \u DFFF";o 00.RESTRICTED_CHAR=" \x 01- \b \v \f \x 0E- \x 1F --";o 00.S= ` \ r
` ;o00.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-� \u D800 \u DC00- \u DB7F \u DFFF";o00.NAME_CHAR="-"+o00.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";o00.CHAR_RE=new RegExp("^["+o00.CHAR+"] $ ","u");o00.RESTRICTED_CHAR_RE=new RegExp("^["+o00.RESTRICTED_CHAR+"] $ ","u");o00.S_RE=new RegExp("^["+o00.S+"]+ $ ","u");o00.NAME_START_CHAR_RE=new RegExp("^["+o00.NAME_START_CHAR+"] $ ","u");o00.NAME_CHAR_RE=new RegExp("^["+o00.NAME_CHAR+"] $ ","u");o00.NAME_RE=new RegExp("^["+o00.NAME_START_CHAR+"]["+o00.NAME_CHAR+"]* $ ","u");o00.NMTOKEN_RE=new RegExp("^["+o00.NAME_CHAR+"]+ $ ","u");var p00=9,c00=10,d00=13,m00=32;o00.S_LIST=[m00,c00,d00,p00];function ni0( $ ){return $ >=1&& $ <=55295|| $ >=57344&& $ <=65533|| $ >=65536&& $ <=1114111}o00.isChar=ni0;function bi0( $ ){return $ >=1&& $ <=8|| $ ===11|| $ ===12|| $ >=14&& $ <=31|| $ >=127&& $ <=132|| $ >=134&& $ <=159}o00.isRestrictedChar=bi0;function ii0( $ ){return $ ===9|| $ ===10|| $ ===13|| $ >31&& $ <127|| $ ===133|| $ >159&& $ <=55295|| $ >=57344&& $ <=65533|| $ >=65536&& $ <=1114111}o00.isCharAndNotRestricted=ii0;function pi0( $ ){return $ ===m00|| $ ===c00|| $ ===d00|| $ ===p00}o00.isS=pi0;function l00( $ ){return $ >=65&& $ <=90|| $ >=97&& $ <=122|| $ ===58|| $ ===95|| $ ===8204|| $ ===8205|| $ >=192&& $ <=214|| $ >=216&& $ <=246|| $ >=248&& $ <=767|| $ >=880&& $ <=893|| $ >=895&& $ <=8191|| $ >=8304&& $ <=8591|| $ >=11264&& $ <=12271|| $ >=12289&& $ <=55295|| $ >=63744&& $ <=64975|| $ >=65008&& $ <=65533|| $ >=65536&& $ <=983039}o00.isNameStartChar=l00;function ci0( $ ){return l00( $ )|| $ >=48&& $ <=57|| $ ===45|| $ ===46|| $ ===183|| $ >=768&& $ <=879|| $ >=8255&& $ <=8256}o00.isNameChar=ci0});var I10=F(( $ 10)=>{Object.defineProperty( $ 10,"__esModule",{value:!0}); $ 10.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-� \u D800 \u DC00- \u DB7F \u DFFF"; $ 10.NC_NAME_CHAR="-"+ $ 10.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀"; $ 10.NC_NAME_START_CHAR_RE=new RegExp("^["+ $ 10.NC_NAME_START_CHAR+"] $ ","u"); $ 10.NC_NAME_CHAR_RE=new RegExp("^["+ $ 10.NC_NAME_CHAR+"] $ ","u"); $ 10.NC_NAME_RE=new RegExp("^["+ $ 10.NC_NAME_START_CHAR+"]["+ $ 10.NC_NAME_CHAR+"]* $ ","u");function e00( $ ){return $ >=65&& $ <=90|| $ ===95|| $ >=97&& $ <=122|| $ >=192&& $ <=214|| $ >=216&& $ <=246|| $ >=248&& $ <=767|| $ >=880&& $ <=893|| $ >=895&& $ <=8191|| $ >=8204&& $ <=8205|| $ >=8304&& $ <=8591|| $ >=11264&& $ <=12271|| $ >=12289&& $ <=55295|| $ >=63744&& $ <=64975|| $ >=65008&& $ <=65533|| $ >=65536&& $ <=983039} $ 10.isNCNameStartChar=e00;function Yp0( $ ){return e00( $ )||( $ ===45|| $ ===46|| $ >=48&& $ <=57|| $ ===183|| $ >=768&& $ <=879|| $ >=8255&& $ <=8256)} $ 10.isNCNameChar=Yp0});var P10=F((A10)=>{Object.defineProperty(A10,"__esModule",{value:!0});var Lq=i00(),Gp0=s00(),Ag=I10(),e6=Lq.isS,Wp0=Lq.isChar,SQ=Lq.isNameStartChar,z10=Lq.isNameChar,L10=Lq.S_LIST,Vp0=Lq.NAME_RE,Zp0=Gp0.isChar,Xp0=Ag.isNCNameStartChar,Lp0=Ag.isNCNameChar,Dp0=Ag.NC_NAME_RE,oV="http://www.w3.org/XML/1998/namespace",Xq="http://www.w3.org/2000/xmlns/",Op0={__proto__:null,xml:oV,xmlns:Xq},Fp0={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},K4=-1,i8=-2,q10=0,Np0=1,Hg=2,Mp0=3,Wq=4,Ap0=5,Pp0=6,Tp0=7,Gg=8,Ep0=9,Bp0=10,jp0=11,vp0=12,y6=13,pV=14,Wg=15,gp0=16,Vg=17,Rp0=18,_p0=19,Zg=20,Cp0=21,hp0=22,up0=23,U10=24,Xg=25,cV=26,Y10=27,Sp0=28,yp0=29,J10=30,xp0=31,kp0=32,A3=33,fp0=34,Lg=35,yQ=36,Dg=37,np0=38,Q10=39,w10=40,bp0=41,K10=42,ip0=43,pp0=44,Og=9,V8=10,Fg=13,H10=32,G10=33,D10=34,xQ=38,O10=39,dV=45,mV=47,cp0=59,r9=60,Vq=61,y4=62,U6=63,F10=91,Zq=93,W10=133,V10=8232,lV=( $ )=> $ ===D10|| $ ===O10,N10=[D10,O10],dp0=[...N10,F10,y4],mp0=[...N10,r9,Zq],lp0=[Vq,U6,...L10],op0=[...L10,y4,xQ,r9];function Mg( $ ,I,z){switch(I){case"xml":if(z!==oV) $ .fail( ` xml prefix must be bound to $ { oV } . ` );break;case"xmlns":if(z!==Xq) $ .fail( ` xmlns prefix must be bound to $ { Xq } . ` );break;default:}switch(z){case Xq: $ .fail(I===""? ` the default namespace may not be set to $ { z } . ` : ` may not assign a prefix ( even "xmlns" ) to the URI $ { Xq } . ` );break;case oV:switch(I){case"xml":break;case"": $ .fail( ` the default namespace may not be set to $ { z } . ` );break;default: $ .fail("may not assign the xml namespace to another prefix.")}break;default:}}function rp0( $ ,I){for(let z of Object.keys(I))Mg( $ ,z,I[z])}var tp0=( $ )=>Dp0.test( $ ),ap0=( $ )=>Vp0.test( $ ),P3=0,Z10=1,Ng=2;A10.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];var X10={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class M10{constructor( $ ){this.opt= $ !==null&& $ !==void 0? $ :{},this.fragmentOpt=!!this.opt.fragment;let I=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,I){this.nameStartCheck=Xp0,this.nameCheck=Lp0,this.isName=tp0,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},Op0);let z=this.opt.additionalNamesp
Line truncated
` ,I=this.i}}captureToChar( $ ){let{i:I}=this,{chunk:z}=this;while(!0){let q=this.getCode();switch(q){case i 8:this.text+= ` $ { z . slice ( I , this . prevI ) }
` ,I=this.i,q=V 8;break;case K4:return this.text+=z.slice(I),!1;default:}if(q=== $ )return this.text+=z.slice(I,this.prevI),!0}}captureNameChars(){let{chunk: $ ,i:I}=this;while(!0){let z=this.getCode();if(z===K4)return this.name+= $ .slice(I),K4;if(!z 10(z))return this.name+= $ .slice(I,this.prevI),z===i 8?V 8:z}}skipSpaces(){while(!0){let $ =this.getCodeNorm();if( $ ===K4||!e 6( $ ))return $ }}setXMLVersion( $ ){if(this.currentXMLVersion= $ , $ ==="1.0")this.isChar=W p0,this.getCode=this.getCode10;else this.isChar=Z p0,this.getCode=this.getCode11}sBegin(){if(this.chunk.charCodeAt(0)===65279)this.i++,this.column++;this.state=N p0}sBeginWhitespace(){let $ =this.i,I=this.skipSpaces();if(this.prevI!== $ )this.xmlDeclPossible=!1;switch(I){case r 9:if(this.state=Wg ,this.text.length!==0)throw Error("no-empty text at start");break;case K4:break;default:this.unget(),this.state=y 6,this.xmlDeclPossible=!1}}sDoctype(){var $ ;let I=this.captureTo(d p0);switch(I){case y 4:{( $ =this.doctypeHandler)===null|| $ ===void 0|| $ .call(this,this.text),this.text="",this.state=y 6,this.doctype=!0;break}case K4:break;default:if(this.text+=String.fromCodePoint(I),I===F 10)this.state=W q;else if(l V(I))this.state=M p0,this.q=I}}sDoctypeQuote(){let $ =this.q;if(this.captureToChar( $ ))this.text+=String.fromCodePoint( $ ),this.q=null,this.state=Hg }sDTD(){let $ =this.captureTo(m p0);if( $ ===K4)return;if(this.text+=String.fromCodePoint( $ ), $ ===Z q)this.state=Hg ;else if( $ ===r 9)this.state=P p0;else if(l V( $ ))this.state=A p0,this.q= $ }sDTDQuoted(){let $ =this.q;if(this.captureToChar( $ ))this.text+=String.fromCodePoint( $ ),this.state=W q,this.q=null}sDTDOpenWaka(){let $ =this.getCodeNorm();switch(this.text+=String.fromCodePoint( $ ), $ ){case G 10:this.state=T p0,this.openWakaBang="";break;case U6:this.state=j p0;break;default:this.state=W q}}sDTDOpenWakaBang(){let $ =String.fromCodePoint(this.getCodeNorm()),I=this.openWakaBang+= $ ;if(this.text+= $ ,I!=="-")this.state=I==="--"?Gg:W q,this.openWakaBang=""}sDTDComment(){if(this.captureToChar(d V))this.text+="-",this.state=E p0}sDTDCommentEnding(){let $ =this.getCodeNorm();this.text+=String.fromCodePoint( $ ),this.state= $ ===d V?B p0:Gg }sDTDCommentEnded(){let $ =this.getCodeNorm();if(this.text+=String.fromCodePoint( $ ), $ ===y 4)this.state=W q;else this.fail("malformed comment."),this.state=Gg }sDTDPI(){if(this.captureToChar(U6))this.text+="?",this.state=v p0}sDTDPIEnding(){let $ =this.getCodeNorm();if(this.text+=String.fromCodePoint( $ ), $ ===y 4)this.state=W q}sText(){if(this.tags.length!==0)this.handleTextInRoot();else this.handleTextOutsideRoot()}sEntity(){let{i: $ }=this,{chunk:I}=this; $ :while(!0)switch(this.getCode()){case i 8:this.entity+= ` $ { I . slice ( $ , this . prevI ) }
` , $ =this.i;break;case cp0:{let{entityReturnState:z}=this,q=this.entity+I.slice( $ ,this.prevI);this.state=z;let U;if(q==="")this.fail("empty entity name."),U="&;";else U=this.parseEntity(q),this.entity="";if(z!==y6||this.textHandler!==void 0)this.text+=U;break $ }case K4:this.entity+=I.slice( $ );break $ ;default:}}sOpenWaka(){let $ =this.getCode();if(SQ( $ ))this.state=fp0,this.unget(),this.xmlDeclPossible=!1;else switch( $ ){case mV:this.state=ip0,this.xmlDeclPossible=!1;break;case G10:this.state=gp0,this.openWakaBang="",this.xmlDeclPossible=!1;break;case U6:this.state=up0;break;default:this.fail("disallowed character in tag name"),this.state=y6,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":if(!this.sawRoot&&!this.reportedTextBeforeRoot)this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0;if(this.closedRoot&&!this.reportedTextAfterRoot)this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0;this.state=Zg,this.openWakaBang="";break;case"--":this.state=Vg,this.openWakaBang="";break;case"DOCTYPE":if(this.state=Hg,this.doctype||this.sawRoot)this.fail("inappropriately located doctype declaration.");this.openWakaBang="";break;default:if(this.openWakaBang.length>=7)this.fail("incorrect syntax.")}}sComment(){if(this.captureToChar(dV))this.state=Rp0}sCommentEnding(){var $ ;let I=this.getCodeNorm();if(I===dV)this.state=_p0,( $ =this.commentHandler)===null|| $ ===void 0|| $ .call(this,this.text),this.text="";else this.text+= ` - $ { String . fromCodePoint ( I ) } ` ,this.state=Vg}sCommentEnded(){let $ =this.getCodeNorm();if( $ !==y4)this.fail("malformed comment."),this.text+= ` -- $ { String . fromCodePoint ( $ ) } ` ,this.state=Vg;else this.state=y6}sCData(){if(this.captureToChar(Zq))this.state=Cp0}sCDataEnding(){let $ =this.getCodeNorm();if( $ ===Zq)this.state=hp0;else this.text+= ` ] $ { String . fromCodePoint ( $ ) } ` ,this.state=Zg}sCDataEnding2(){var $ ;let I=this.getCodeNorm();switch(I){case y4:{( $ =this.cdataHandler)===null|| $ ===void 0|| $ .call(this,this.text),this.text="",this.state=y6;break}case Zq:this.text+="]";break;default:this.text+= ` ] ] $ { String . fromCodePoint ( I ) } ` ,this.state=Zg}}sPIFirstChar(){let $ =this.getCodeNorm();if(this.nameStartCheck( $ ))this.piTarget+=String.fromCodePoint( $ ),this.state=U10;else if( $ ===U6||e6( $ ))this.fail("processing instruction without a target."),this.state= $ ===U6?cV:Xg;else this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint( $ ),this.state=U10}sPIRest(){let{chunk: $ ,i:I}=this;while(!0){let z=this.getCodeNorm();if(z===K4){this.piTarget+= $ .slice(I);return}if(!this.nameCheck(z)){this.piTarget+= $ .slice(I,this.prevI);let q=z===U6;if(q||e6(z))if(this.piTarget==="xml"){if(!this.xmlDeclPossible)this.fail("an XML declaration must be at the start of the document.");this.state=q?A3:Y10}else this.state=q?cV:Xg;else this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(z);break}}}sPIBody(){if(this.text.length===0){let $ =this.getCodeNorm();if( $ ===U6)this.state=cV;else if(!e6( $ ))this.text=String.fromCodePoint( $ )}else if(this.captureToChar(U6))this.state=cV}sPIEnding(){var $ ;let I=this.getCodeNorm();if(I===y4){let{piTarget:z}=this;if(z.toLowerCase()==="xml")this.fail("the XML declaration must appear at the start of the document.");( $ =this.piHandler)===null|| $ ===void 0|| $ .call(this,{target:z,body:this.text}),this.piTarget=this.text="",this.state=y6}else if(I===U6)this.text+="?";else this.text+= ` ? $ { String . fromCodePoint ( I ) } ` ,this.state=Xg;this.xmlDeclPossible=!1}sXMLDeclNameStart(){let $ =this.skipSpaces();if( $ ===U6){this.state=A3;return}if( $ !==K4)this.state=Sp0,this.name=String.fromCodePoint( $ )}sXMLDeclName(){let $ =this.captureTo(lp0);if( $ ===U6){this.state=A3,this.name+=this.text,this.text="",this.fail("XML declaration is incomplete.");return}if(!(e6( $ )|| $ ===Vq))return;if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail( ` expected the name $ { this . xmlDeclExpects [ 0 ] } . ` );break;default:this.fail( ` expected one of $ { this . xmlDeclExpects . join ( ", " ) } ` )}this.state= $ ===Vq?J10:yp0}sXMLDeclEq(){let $ =this.getCodeNorm();if( $ ===U6){this.state=A3,this.fail("XML declaration is incomplete.");return}if(e6( $ ))return;if( $ !==Vq)this.fail("value required.");this.state=J10}sXMLDeclValueStart(){let $ =this.getCodeNorm();if( $ ===U6){this.state=A3,this.fail("XML declaration is incomplete.");return}if(e6( $ ))return;if(!lV( $ ))this.fail("value must be quoted."),this.q=H10;else this.q= $ ;this.state=xp0}sXMLDeclValue(){let $ =this.captureTo([this.q,U6]);if( $ ===U6){this.state=A3,this.text="",this.fail("XML declaration is incomplete.");return}if( $ ===K4)return;let I=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];let z=I;if(this.xmlDecl.version=z,!/^1 \. [0-9]+ $ /.test(z))this.fail("ver
Line truncated
` ; $ =this.i,I=P 3;break;case K4:if(q!==void 0)this.text+=z.slice( $ );break $ ;default:I=P 3}this.forbiddenState=I}handleTextOutsideRoot(){let{i: $ }=this,{chunk:I,textHandler:z}=this,q=!1; $ :while(!0){let U=this.getCode();switch(U){case r 9:{if(this.state=Wg ,z!==void 0){let{text:Y}=this,J=I.slice( $ ,this.prevI);if(Y.length!==0)z(Y+J),this.text="";else if(J.length!==0)z(J)}break $ }case x Q:if(this.state=p V,this.entityReturnState=y 6,z!==void 0)this.text+=I.slice( $ ,this.prevI);q=!0;break $ ;case i 8:if(z!==void 0)this.text+= ` $ { I . slice ( $ , this . prevI ) }
` ; $ =this.i;break;case K4:if(z!==void 0)this.text+=I.slice( $ );break $ ;default:if(!e6(U))q=!0}}if(!q)return;if(!this.sawRoot&&!this.reportedTextBeforeRoot)this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0;if(this.closedRoot&&!this.reportedTextAfterRoot)this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0}pushAttribNS( $ ,I){var z;let{prefix:q,local:U}=this.qname( $ ),Y={name: $ ,prefix:q,local:U,value:I};if(this.attribList.push(Y),(z=this.attributeHandler)===null||z===void 0||z.call(this,Y),q==="xmlns"){let J=I.trim();if(this.currentXMLVersion==="1.0"&&J==="")this.fail("invalid attempt to undefine prefix in XML 1.0");this.topNS[U]=J,Mg(this,U,J)}else if( $ ==="xmlns"){let J=I.trim();this.topNS[""]=J,Mg(this,"",J)}}pushAttribPlain( $ ,I){var z;let q={name: $ ,value:I};this.attribList.push(q),(z=this.attributeHandler)===null||z===void 0||z.call(this,q)}end(){var $ ,I;if(!this.sawRoot)this.fail("document must contain a root element.");let{tags:z}=this;while(z.length>0){let U=z.pop();this.fail( ` unclosed tag : $ { U . name } ` )}if(this.state!==q10&&this.state!==y6)this.fail("unexpected end.");let{text:q}=this;if(q.length!==0)( $ =this.textHandler)===null|| $ ===void 0|| $ .call(this,q),this.text="";return this._closed=!0,(I=this.endHandler)===null||I===void 0||I.call(this),this._init(),this}resolve( $ ){var I,z;let q=this.topNS[ $ ];if(q!==void 0)return q;let{tags:U}=this;for(let Y=U.length-1;Y>=0;Y--)if(q=U[Y].ns[ $ ],q!==void 0)return q;if(q=this.ns[ $ ],q!==void 0)return q;return(z=(I=this.opt).resolvePrefix)===null||z===void 0?void 0:z.call(I, $ )}qname( $ ){let I= $ .indexOf(":");if(I===-1)return{prefix:"",local: $ };let z= $ .slice(I+1),q= $ .slice(0,I);if(q===""||z===""||z.includes(":"))this.fail( ` malformed name : $ { $ } . ` );return{prefix:q,local:z}}processAttribsNS(){var $ ;let{attribList:I}=this,z=this.tag;{let{prefix:Y,local:J}=this.qname(z.name);z.prefix=Y,z.local=J;let Q=z.uri=( $ =this.resolve(Y))!==null&& $ !==void 0? $ :"";if(Y!==""){if(Y==="xmlns")this.fail('tags may not have "xmlns" as prefix.');if(Q==="")this.fail( ` unbound namespace prefix : $ { JSON . stringify ( Y ) } . ` ),z.uri=Y}}if(I.length===0)return;let{attributes:q}=z,U=new Set;for(let Y of I){let{name:J,prefix:Q,local:w}=Y,K,H;if(Q==="")K=J==="xmlns"?Xq:"",H=J;else{if(K=this.resolve(Q),K===void 0)this.fail( ` unbound namespace prefix : $ { JSON . stringify ( Q ) } . ` ),K=Q;H= ` { $ { K } } $ { w } ` }if(U.has(H))this.fail( ` duplicate attribute : $ { H } . ` );U.add(H),Y.uri=K,q[J]=Y}this.attribList=[]}processAttribsPlain(){let{attribList: $ }=this,I=this.tag.attributes;for(let{name:z,value:q}of $ ){if(I[z]!==void 0)this.fail( ` duplicate attribute : $ { z } . ` );I[z]=q}this.attribList=[]}openTag(){var $ ;this.processAttribs();let{tags:I}=this,z=this.tag;z.isSelfClosing=!1,( $ =this.openTagHandler)===null|| $ ===void 0|| $ .call(this,z),I.push(z),this.state=y6,this.name=""}openSelfClosingTag(){var $ ,I,z;this.processAttribs();let{tags:q}=this,U=this.tag;if(U.isSelfClosing=!0,( $ =this.openTagHandler)===null|| $ ===void 0|| $ .call(this,U),(I=this.closeTagHandler)===null||I===void 0||I.call(this,U),(this.tag=(z=q[q.length-1])!==null&&z!==void 0?z:null)===null)this.closedRoot=!0;this.state=y6,this.name=""}closeTag(){let{tags: $ ,name:I}=this;if(this.state=y6,this.name="",I===""){this.fail("weird empty close tag."),this.text+="</>";return}let z=this.closeTagHandler,q= $ .length;while(q-- >0){let U=this.tag= $ .pop();if(this.topNS=U.ns,z===null||z===void 0||z(U),U.name===I)break;this.fail("unexpected close tag.")}if(q===0)this.closedRoot=!0;else if(q<0)this.fail( ` unmatched closing tag : $ { I } . ` ),this.text+= ` < /${I}>`}parseEntity($){if($[0]!=="#"){let z=this.ENTITIES[$];if(z!==void 0)return z;return this.fail(this.isName($)?"undefined entity.":"disallowed character in entity name."),`&${$};`}let I=NaN;if($[1]==="x"&&/ ^ # x [ 0 - 9 a - f ] + $ / i . test ( $ ) ) I = parseInt ( $ . slice ( 2 ) , 16 ) ; else if ( /^#[0-9]+$/ . test ( $ ) ) I = parseInt ( $ . slice ( 1 ) , 10 ) ; if ( ! this . isChar ( I ) ) return this . fail ( "malformed character entity." ) , ` & ${ $ } ; ` ; return String . fromCodePoint ( I ) } } A10 . SaxesParser = M10 } ) ; var kQ = F ( ( Gj1 , T10 ) => { var { SaxesParser : $c0 } = P10 ( ) , { PassThrough : Ic0 } = O6 ( ) , { bufferToString : zc0 } = Ug ( ) ; T10 . exports = async function * ( $ ) { if ( $ . pipe && ! $ [ Symbol . asyncIterator ] ) $ = $ . pipe ( new Ic0 ) ; let I = new $c0 , z ; I . on ( "error" , ( U ) => { z = U } ) ; let q = [ ] ; I . on ( "opentag" , ( U ) => q . push ( { eventType : "opentag" , value : U } ) ) , I . on ( "text" , ( U ) => q . push ( { eventType : "text" , value : U } ) ) , I . on ( "closetag" , ( U ) => q . push ( { eventType : "closetag" , value : U } ) ) ; for await ( let U of $ ) { if ( I . write ( zc0 ( U ) ) , z ) throw z ; yield q , q = [ ] } } } ) ; var D0 = F ( ( Wj1 , E10 ) => { var qc0 = kQ ( ) , Uc0 = q6 ( ) ; class Dq { prepare ( ) { } render ( ) { } parseOpen ( $ ) { } parseText ( $ ) { } parseClose ( $ ) { } reconcile ( $ , I ) { } reset ( ) { if ( this . model = null , this . map ) Object . values ( this . map ) . forEach ( ( $ ) => { if ( $ instanceof Dq ) $ . reset ( ) ; else if ( $ . xform ) $ . xform . reset ( ) } ) } mergeModel ( $ ) { this . model = Object . assign ( this . model || { } , $ ) } async parse ( $ ) { for await ( let I of $ ) for ( let { eventType : z , value : q } of I ) if ( z === "opentag" ) this . parseOpen ( q ) ; else if ( z === "text" ) this . parseText ( q ) ; else if ( z === "closetag" ) { if ( ! this . parseClose ( q . name ) ) return th Line truncated
< a : theme xmlns : a = "http://schemas.openxmlformats.org/drawingml/2006/main" name = "Office Theme" > < a : themeElements > < a : clrScheme name = "Office" > < a : dk1 > < a : sysClr val = "windowText" lastClr = "000000" / > < /a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/ > < /a:lt1> <a:dk2> <a:srgbClr val="1F497D"/ > < /a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/ > < /a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/ > < /a:accent1> <a:accent2> <a:srgbClr val="C0504D"/ > < /a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/ > < /a:accent3> <a:accent4> <a:srgbClr val="8064A2"/ > < /a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/ > < /a:accent5> <a:accent6> <a:srgbClr val="F79646"/ > < /a:accent6> <a:hlink> <a:srgbClr val="0000FF"/ > < /a:hlink> <a:folHlink> <a:srgbClr val="800080"/ > < / a : f o l H l i n k > < / a : c l r S c h e m e > < a : f o n t S c h e m e n a m e = " O f f i c e " > < a : m a j o r F o n t > < a : l a t i n t y p e f a c e = " C a m b r i a " / > < a : e a t y p e f a c e = " " / > < a : c s t y p e f a c e = " " / > < a : f o n t s c r i p t = " J p a n " t y p e f a c e = " M S P ゴ シ ッ ク " / > < a : f o n t s c r i p t = " H a n g " t y p e f a c e = " 맑 은 고 딕 " / > < a : f o n t s c r i p t = " H a n s " t y p e f a c e = " 宋 体 " / > < a : f o n t s c r i p t = " H a n t " t y p e f a c e = " 新 細 明 體 " / > < a : f o n t s c r i p t = " A r a b " t y p e f a c e = " T i m e s N e w R o m a n " / > < a : f o n t s c r i p t = " H e b r " t y p e f a c e = " T i m e s N e w R o m a n " / > < a : f o n t s c r i p t = " T h a i " t y p e f a c e = " T a h o m a " / > < a : f o n t s c r i p t = " E t h i " t y p e f a c e = " N y a l a " / > < a : f o n t s c r i p t = " B e n g " t y p e f a c e = " V r i n d a " / > < a : f o n t s c r i p t = " G u j r " t y p e f a c e = " S h r u t i " / > < a : f o n t s c r i p t = " K h m r " t y p e f a c e = " M o o l B o r a n " / > < a : f o n t s c r i p t = " K n d a " t y p e f a c e = " T u n g a " / > < a : f o n t s c r i p t = " G u r u " t y p e f a c e = " R a a v i " / > < a : f o n t s c r i p t = " C a n s " t y p e f a c e = " E u p h e m i a " / > < a : f o n t s c r i p t = " C h e r " t y p e f a c e = " P l a n t a g e n e t C h e r o k e e " / > < a : f o n t s c r i p t = " Y i i i " t y p e f a c e = " M i c r o s o f t Y i B a i t i " / > < a : f o n t s c r i p t = " T i b t " t y p e f a c e = " M i c r o s o f t H i m a l a y a " / > < a : f o n t s c r i p t = " T h a a " t y p e f a c e = " M V B o l i " / > < a : f o n t s c r i p t = " D e v a " t y p e f a c e = " M a n g a l " / > < a : f o n t s c r i p t = " T e l u " t y p e f a c e = " G a u t a m i " / > < a : f o n t s c r i p t = " T a m l " t y p e f a c e = " L a t h a " / > < a : f o n t s c r i p t = " S y r c " t y p e f a c e = " E s t r a n g e l o E d e s s a " / > < a : f o n t s c r i p t = " O r y a " t y p e f a c e = " K a l i n g a " / > < a : f o n t s c r i p t = " M l y m " t y p e f a c e = " K a r t i k a " / > < a : f o n t s c r i p t = " L a o o " t y p e f a c e = " D o k C h a m p a " / > < a : f o n t s c r i p t = " S i n h " t y p e f a c e = " I s k o o l a P o t a " / > < a : f o n t s c r i p t = " M o n g " t y p e f a c e = " M o n g o l i a n B a i t i " / > < a : f o n t s c r i p t = " V i e t " t y p e f a c e = " T i m e s N e w R o m a n " / > < a : f o n t s c r i p t = " U i g h " t y p e f a c e = " M i c r o s o f t U i g h u r " / > < a : f o n t s c r i p t = " G e o r " t y p e f a c e = " S y l f a e n " / > < / a : m a j o r F o n t > < a : m i n o r F o n t > < a : l a t i n t y p e f a c e = " C a l i b r i " / > < a : e a t y p e f a c e = " " / > < a : c s t y p e f a c e = " " / > < a : f o n t s c r i p t = " J p a n " t y p e f a c e = " M S P ゴ シ ッ ク " / > < a : f o n t s c r i p t = " H a n g " t y p e f a c e = " 맑 은 고 딕 " / > < a : f o n t s c r i p t = " H a n s " t y p e f a c e = " 宋 体 " / > < a : f o n t s c r i p t = " H a n t " t y p e f a c e = " 新 細 明 體 " / > < a : f o n t s c r i p t = " A r a b " t y p e f a c e = " A r i a l " / > < a : f o n t s c r i p t = " H e b r " t y p e f a c e = " A r i a l " / > < a : f o n t s c r i p t = " T h a i " t y p e f a c e = " T a h o m a " / > < a : f o n t s c r i p t = " E t h i " t y p e f a c e = " N y a l a " / > < a : f o n t s c r i p t = " B e n g " t y p e f a c e = " V r i n d a " / > < a : f o n t s c r i p t = " G u j r " t y p e f a c e = " S h r u t i " / > < a : f o n t s c r i p t = " K h m r " t y p e f a c e = " D a u n P e n h " / > < a : f o n t s c r i p t = " K n d a " t y p e f a c e = " T u n g a " / > < a : f o n t s c r i p t = " G u r u " t y p e f a c e = " R a a v i " / > < a : f o n t s c r i p t = " C a n s " t y p e f a c e = " E u p h e m i a " / > < a : f o n t s c r i p t = " C h e r " t y p e f a c e = " P l a n t a g e n e t C h e r o k e e " / > < a : f o n t s c r i p t = " Y i i i " t y p e f a c e = " M i c r o s o f t Y i B a i t i " / > < a : f o n t s c r i p t = " T i b t " t y p e f a c e = " M i c r o s o f t H i m a l a y a " / > < a : f o n t s c r i p t = " T h a a " t y p e f a c e = " M V B o l i " / > < a : f o n t s c r i p t = " D e v a " t y p e f a c e = " M a n g a l " / > < a : f o n t s c r i p t = " T e l u " t y p e f a c e = " G a u t a m i " / > < a : f o n t s c r i p t = " T a m l " t y p e f a c e = " L a t h a " / > < a : f o n t s c r i p t = " S y r c " t y p e f a c e = " E s t r a n g e l o E d e s s a " / > < a : f o n t s c r i p t = " O r y a " t y p e f a c e = " K a l i n g a " / > < a : f o n t s c r i p t = " M l y m " t y p e f a c e = " K a r t i k a " / > < a : f o n t s c r i p t = " L a o o " t y p e f a c e = " D o k C h a m p a " / > < a : f o n t s c r i p t = " S i n h " t y p e f a c e = " I s k o o l a P o t a " / > < a : f o n t s c r i p t = " M o n g " t y p e f a c e = " M o n g o l i a n B a i t i " / > < a : f o n t s c r i p t = " V i e t " t y p e f a c e = " A r i a l " / > < a : f o n t s c r i p t = " U i g h " t y p e f a c e = " M i c r o s o f t U i g h u r " / > < a : f o n t s c r i p t = " G e o r " t y p e f a c e = " S y l f a e n " / > < / a : m i n o r F o n t > < / a : f o n t S c h e m e > < a : f m t S c h e m e n a m e = " O f f i c e " > < a : f i l l S t y l e L s t > < a : s o l i d F i l l > < a : s c h e m e C l r v a l = " p h C l r " / > < / a : s o l i d F i l l > < a : g r a d F i l l r o t W i t h S h a p e = " 1 " > < a : g s L s t > < a : g s p o s = " 0 " > < a : s c h e m e C l r v a l = " p h C l r " > < a : t i n t v a l = " 5 0 0 0 0 " / > < a : s a t M o d v a l = " 3 0 0 0 0 0 " / > < / a : s c h e m e C l r > < / a : g s > < a : g s p o s = " 3 5 0 0 0 " > < a : s c h e m e C l r v a l = " p h C l r " > < a : t i n t v a l = " 3 7 0 0 0 " / > < a : s a t M o d v a l = " 3 0 0 0 0 0 " / > < / a : s c h e m e C l r > < / a : g s > < a : g s p o s = " 1 0 0 0 0 0 " > < a : s c h e m e C l r v a l = " p h C l r " > < a : t i n t v a l = " 1 5 0 0 0 " / > < a : s a t M o d v a l = " 3 5 0 0 0 0 " / > < / a : s c h e m e C l r > < / a : g s > < / a : g s L s t > < a : l i n a n g = " 1 6 2 0 0 0 0 0 " s c a l e d = " 1 " / > < / a : g r a d F i l l > < a : g r a d F i l l r o t W i t h S h a p e = " 1 " > < a : g s L s t > < a : g s p o s = " 0 " > < a : s c h e m e C l r v a l = " p h C l r " > < a : t i n t v a l = " 1 0 0 0 0 0 " / > < a : s h a d e v a l = " 1 0 0 0 0 0 " / > < a : s a t M o d v a l = " 1 3 0 0 0 0 " / > < / a : s c h e m e C l r > < / a : g s > < a : g s p o s = " 1 0 0 0 0 0 " > < a : s c h e m e C l r v a l = " p h C l r " > < a : t i n t v a l = " 5 0 0 0 0 " / > < a : s h a d e v a l = " 1 0 0 0 0 0 " / > < a : s a t M o d v a l = " 3 5 0 0 0 0 " / > < / a : s c h e m e C l r > < / a : g s > < / a : g s L s t > < a : l i n a n g = " 1 6 2 0 0 0 0 0 " s c a l e d = " 0 " / > < / a : g r a d F i l l > < / a : f i l l S t y l e L s t > < a : l n S t y l e L s t > < a : l n w = " 9 5 2 5 " c a p = " f l a t " c m p d = " s n g " a l g n = " c t r " > < a : s o l i d F i l l > < a : s c h e m e C l r v a l = " p h C l r " > < a : s h a d e v a l = " 9 5 0 0 0 " / > < a : s a t M o d v a l = " 1 0 5 0 0 0 " / > < / a : s c h e m e C l r > < / a : s o l i d F i l l > < a : p r s t D a s h v a l = " s o l i d " / > < / a : l n > < a : l n w = " 2 5 4 0 0 " c a p = " f l a t " c m p d = " s n g " a l g n = " c t r " > < a : s o l i d F i l l > < a : Line truncated
` ,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM=" \u FEFF",this.alwaysWriteHeaders=!1,Object.assign(this, $ ||{}),typeof( $ ===null|| $ ===void 0?void 0: $ .quoteHeaders)>"u")this.quoteHeaders=this.quoteColumns;if(( $ ===null|| $ ===void 0?void 0: $ .quote)===!0)this.quote='"';else if(( $ ===null|| $ ===void 0?void 0: $ .quote)===!1)this.quote="";if(typeof( $ ===null|| $ ===void 0?void 0: $ .escape)!=="string")this.escape=this.quote;this.shouldWriteHeaders=!!this.headers&&((I= $ .writeHeaders)!==null&&I!==void 0?I:!0),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote= ` $ { this . escape } $ { this . quote } ` }}I70.FormatterOptions= $ 70});var jZ=F((xg1,J70)=>{var Zt0="[object AsyncFunction]",Xt0="[object Function]",Lt0="[object GeneratorFunction]",Dt0="[object Null]",Ot0="[object Proxy]",Ft0="[object Undefined]",Nt0=typeof global=="object"&&global&&global.Object===Object&&global,Mt0=typeof self=="object"&&self&&self.Object===Object&&self,At0=Nt0||Mt0||Function("return this")(),U70=Object.prototype,Pt0=U70.hasOwnProperty,Y70=U70.toString,q70=At0.Symbol,R3=q70?q70.toStringTag:void 0;function Tt0( $ ){if( $ ==null)return $ ===void 0?Ft0:Dt0;return R3&&R3 in Object( $ )?Et0( $ ):Bt0( $ )}function Et0( $ ){var I=Pt0.call( $ ,R3),z= $ [R3];try{ $ [R3]=void 0;var q=!0}catch(Y){}var U=Y70.call( $ );if(q)if(I) $ [R3]=z;else delete $ [R3];return U}function Bt0( $ ){return Y70.call( $ )}function jt0( $ ){if(!vt0( $ ))return!1;var I=Tt0( $ );return I==Xt0||I==Lt0||I==Zt0||I==Ot0}function vt0( $ ){var I=typeof $ ;return $ !=null&&(I=="object"||I=="function")}J70.exports=jt0});var b70=F((vZ,jq)=>{var gt0=200,dR="__lodash_hash_undefined__",yZ=1,O70=2,F70=9007199254740991,gZ="[object Arguments]",kR="[object Array]",Rt0="[object AsyncFunction]",N70="[object Boolean]",M70="[object Date]",A70="[object Error]",P70="[object Function]",_t0="[object GeneratorFunction]",RZ="[object Map]",T70="[object Number]",Ct0="[object Null]",Bq="[object Object]",Q70="[object Promise]",ht0="[object Proxy]",E70="[object RegExp]",_Z="[object Set]",B70="[object String]",ut0="[object Symbol]",St0="[object Undefined]",fR="[object WeakMap]",j70="[object ArrayBuffer]",CZ="[object DataView]",yt0="[object Float32Array]",xt0="[object Float64Array]",kt0="[object Int8Array]",ft0="[object Int16Array]",nt0="[object Int32Array]",bt0="[object Uint8Array]",it0="[object Uint8ClampedArray]",pt0="[object Uint16Array]",ct0="[object Uint32Array]",dt0=/[ \\ ^ $ .*+?()[ \] {}|]/g,mt0=/^ \[ object .+?Constructor \] $ /,lt0=/^(?:0|[1-9] \d *) $ /,e1={};e1[yt0]=e1[xt0]=e1[kt0]=e1[ft0]=e1[nt0]=e1[bt0]=e1[it0]=e1[pt0]=e1[ct0]=!0;e1[gZ]=e1[kR]=e1[j70]=e1[N70]=e1[CZ]=e1[M70]=e1[A70]=e1[P70]=e1[RZ]=e1[T70]=e1[Bq]=e1[E70]=e1[_Z]=e1[B70]=e1[fR]=!1;var v70=typeof global=="object"&&global&&global.Object===Object&&global,ot0=typeof self=="object"&&self&&self.Object===Object&&self,h5=v70||ot0||Function("return this")(),g70=typeof vZ=="object"&&vZ&&!vZ.nodeType&&vZ,w70=g70&&typeof jq=="object"&&jq&&!jq.nodeType&&jq,R70=w70&&w70.exports===g70,SR=R70&&v70.process,K70=function(){try{return SR&&SR.binding&&SR.binding("util")}catch( $ ){}}(),H70=K70&&K70.isTypedArray;function rt0( $ ,I){var z=-1,q= $ ==null?0: $ .length,U=0,Y=[];while(++z<q){var J= $ [z];if(I(J,z, $ ))Y[U++]=J}return Y}function tt0( $ ,I){var z=-1,q=I.length,U= $ .length;while(++z<q) $ [U+z]=I[z];return $ }function at0( $ ,I){var z=-1,q= $ ==null?0: $ .length;while(++z<q)if(I( $ [z],z, $ ))return!0;return!1}function st0( $ ,I){var z=-1,q=Array( $ );while(++z< $ )q[z]=I(z);return q}function et0( $ ){return function(I){return $ (I)}}function $ a0( $ ,I){return $ .has(I)}function Ia0( $ ,I){return $ ==null?void 0: $ [I]}function za0( $ ){var I=-1,z=Array( $ .size);return $ .forEach(function(q,U){z[++I]=[U,q]}),z}function qa0( $ ,I){return function(z){return $ (I(z))}}function Ua0( $ ){var I=-1,z=Array( $ .size);return $ .forEach(function(q){z[++I]=q}),z}var Ya0=Array.prototype,Ja0=Function.prototype,xZ=Object.prototype,yR=h5["__core-js_shared__"],_70=Ja0.toString,c8=xZ.hasOwnProperty,G70=function(){var $ =/[^.]+ $ /.exec(yR&&yR.keys&&yR.keys.IE_PROTO||"");return $ ?"Symbol(src)_1."+ $ :""}(),C70=xZ.toString,Qa0=RegExp("^"+_70.call(c8).replace(dt0," \\ $ &").replace(/hasOwnProperty|(function).*?(?= \\ \( )| for .+?(?= \\ \] )/g," $ 1.*?")+" $ "),W70=R70?h5.Buffer:void 0,hZ=h5.Symbol,V70=h5.Uint8Array,h70=xZ.propertyIsEnumerable,wa0=Ya0.splice,_3=hZ?hZ.toStringTag:void 0,Z70=Object.getOwnPropertySymbols,Ka0=W70?W70.isBuffer:void 0,Ha0=qa0(Object.keys,Object),nR=vq(h5,"DataView"),dQ=vq(h5,"Map"),bR=vq(h5,"Promise"),iR=vq(h5,"Set"),pR=vq(h5,"WeakMap"),mQ=vq(Object,"create"),Ga0=u3(nR),Wa0=u3(dQ),Va0=u3(bR),Za0=u3(iR),Xa0=u3(pR),X70=hZ?hZ.prototype:void 0,xR=X70?X70.valueOf:void 0;function C3( $ ){var I=-1,z= $ ==null?0: $ .length;this.clear();while(++I<z){var q= $ [I];this.set(q[0],q[1])}}function La0(){this.__data__=mQ?mQ(null):{},this.size=0}function Da0( $ ){var I=this.has( $ )&&delete this.__data__[ $ ];return this.size-=I?1:0,I}function Oa0( $ ){var I=this.__data
Line truncated
] ` ;this.ESCAPE_REGEXP=new RegExp(I)}set headers( $ ){this._headers= $ }shouldQuote( $ ,I){let z=I?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;if(Ts0.default(z))return z;if(Array.isArray(z))return z[ $ ];if(this._headers!==null)return z[this._headers[ $ ]];return!1}format( $ ,I,z){let q= ` $ { Es0 . default ( $ ) ? "" : $ } ` .replace(/ \0 /g,""),{formatterOptions:U}=this;if(U.quote!==""){if(q.indexOf(U.quote)!==-1)return this.quoteField(q.replace(this.REPLACE_REGEXP,U.escapedQuote))}if(q.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(I,z))return this.quoteField(q);return q}quoteField( $ ){let{quote:I}=this.formatterOptions;return ` $ { I } $ { $ } $ { I } ` }}gq.FieldFormatter=t70});var tR=F((a70)=>{Object.defineProperty(a70,"__esModule",{value:!0});a70.isSyncTransform=void 0;a70.isSyncTransform=( $ )=> $ .length===1});var $ 30=F((Rq)=>{var e70=Rq&&Rq.__importDefault||function( $ ){return $ && $ .__esModule? $ :{default: $ }};Object.defineProperty(Rq,"__esModule",{value:!0});Rq.RowFormatter=void 0;var js0=e70(jZ()),vs0=e70(b70()),gs0=rR(),Rs0=tR();class S3{constructor( $ ){if(this.rowCount=0,this.formatterOptions= $ ,this.fieldFormatter=new gs0.FieldFormatter( $ ),this.headers= $ .headers,this.shouldWriteHeaders= $ .shouldWriteHeaders,this.hasWrittenHeaders=!1,this.headers!==null)this.fieldFormatter.headers=this.headers;if( $ .transform)this.rowTransform= $ .transform}static isRowHashArray( $ ){if(Array.isArray( $ ))return Array.isArray( $ [0])&& $ [0].length===2;return!1}static isRowArray( $ ){return Array.isArray( $ )&&!this.isRowHashArray( $ )}static gatherHeaders( $ ){if(S3.isRowHashArray( $ ))return $ .map((I)=>I[0]);if(Array.isArray( $ ))return $ ;return Object.keys( $ )}static createTransform( $ ){if(Rs0.isSyncTransform( $ ))return(I,z)=>{let q=null;try{q= $ (I)}catch(U){return z(U)}return z(null,q)};return(I,z)=>{ $ (I,z)}}set rowTransform( $ ){if(!js0.default( $ ))throw TypeError("The transform should be a function");this._rowTransform=S3.createTransform( $ )}format( $ ,I){this.callTransformer( $ ,(z,q)=>{if(z)return I(z);if(! $ )return I(null);let U=[];if(q){let{shouldFormatColumns:Y,headers:J}=this.checkHeaders(q);if(this.shouldWriteHeaders&&J&&!this.hasWrittenHeaders)U.push(this.formatColumns(J,!0)),this.hasWrittenHeaders=!0;if(Y){let Q=this.gatherColumns(q);U.push(this.formatColumns(Q,!1))}}return I(null,U)})}finish( $ ){let I=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return $ (Error(" ` alwaysWriteHeaders ` option is set to true but ` headers ` option not provided."));I.push(this.formatColumns(this.headers,!0))}if(this.formatterOptions.includeEndRowDelimiter)I.push(this.formatterOptions.rowDelimiter);return $ (null,I)}checkHeaders( $ ){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};let I=S3.gatherHeaders( $ );if(this.headers=I,this.fieldFormatter.headers=I,!this.shouldWriteHeaders)return{shouldFormatColumns:!0,headers:null};return{shouldFormatColumns:!vs0.default(I, $ ),headers:I}}gatherColumns( $ ){if(this.headers===null)throw Error("Headers is currently null");if(!Array.isArray( $ ))return this.headers.map((I)=> $ [I]);if(S3.isRowHashArray( $ ))return this.headers.map((I,z)=>{let q= $ [z];if(q)return q[1];return""});if(S3.isRowArray( $ )&&!this.shouldWriteHeaders)return $ ;return this.headers.map((I,z)=> $ [z])}callTransformer( $ ,I){if(!this._rowTransform)return I(null, $ );return this._rowTransform( $ ,I)}formatColumns( $ ,I){let z= $ .map((U,Y)=>this.fieldFormatter.format(U,Y,I)).join(this.formatterOptions.delimiter),{rowCount:q}=this;if(this.rowCount+=1,q)return[this.formatterOptions.rowDelimiter,z].join("");return z}}Rq.RowFormatter=S3});var I30=F((nZ)=>{Object.defineProperty(nZ,"__esModule",{value:!0});nZ.FieldFormatter=nZ.RowFormatter=void 0;var _s0= $ 30();Object.defineProperty(nZ,"RowFormatter",{enumerable:!0,get:function(){return _s0.RowFormatter}});var Cs0=rR();Object.defineProperty(nZ,"FieldFormatter",{enumerable:!0,get:function(){return Cs0.FieldFormatter}})});var aR=F((q30)=>{Object.defineProperty(q30,"__esModule",{value:!0});q30.CsvFormatterStream=void 0;var us0=t("stream"),Ss0=I30();class z30 extends us0.Transform{constructor( $ ){super({writableObjectMode: $ .objectMode});this.hasWrittenBOM=!1,this.formatterOptions= $ ,this.rowFormatter=new Ss0.RowFormatter( $ ),this.hasWrittenBOM=! $ .writeBOM}transform( $ ){return this.rowFormatter.rowTransform= $ ,this}_transform( $ ,I,z){let q=!1;try{if(!this.hasWrittenBOM)this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0;this.rowFormatter.format( $ ,(U,Y)=>{if(U)return q=!0,z(U);if(Y)Y.forEach((J)=>{this.push(Buffer.from(J,"utf8"))});return q=!0,z()})}catch(U){if(q)throw U;z(U)}}_flush( $ ){this.rowFormatter.finish((I,z)=>{if(I)return $ (I);if(z)z.forEach((q)=>{this.push(Buffer.from(q,"utf8"))});return $ ()})}}q30.CsvFormatterStream=z30});var J30=F((E1)=>{var Y30=E1&&E1.__createBinding||(Object.create?function( $ ,I,z,q){if(q===void 0)q=z;Object.defineProperty( $ ,q,{enumerable:!0,get:function(){return I[z]}})}:function( $ ,I,z,q){if(q===void 0)q=z; $ [q]=I[z]}),ys0=E1&&E1.__setModuleDefault||(Object.create?function( $ ,I){Ob
Line truncated
` ||I=== ` \ r
` }static isTokenCarriageReturn( $ ,I){return $ .token===I.carriageReturn}static isTokenComment( $ ,I){return I.supportsComments&&!! $ && $ .token===I.comment}static isTokenEscapeCharacter( $ ,I){return $ .token===I.escapeChar}static isTokenQuote( $ ,I){return $ .token===I.quote}static isTokenDelimiter( $ ,I){return $ .token===I.delimiter}}YI0.Token=UI0});var L_=O((KI0)=>{Object.defineProperty(KI0,"__esModule",{value:!0});KI0.Scanner=void 0;var QI0=q7(),u11=/((?: \r \n )| \n | \r )/;class wI0{constructor( $ ){this.cursor=0,this.line= $ .line,this.lineLength=this.line.length,this.parserOptions= $ .parserOptions,this.hasMoreData= $ .hasMoreData,this.cursor= $ .cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){let{lineFromCursor: $ }=this,I=this.parserOptions.NEXT_TOKEN_REGEXP;if( $ .search(I)===-1)return null;let z=I.exec( $ );if(z==null)return null;let q=z[1],U=this.cursor+(z.index||0);return new QI0.Token({token:q,startCursor:U,endCursor:U+q.length-1})}get nextCharacterToken(){let{cursor: $ ,lineLength:I}=this;if(I<= $ )return null;return new QI0.Token({token:this.line[ $ ],startCursor: $ ,endCursor: $ })}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){let $ =u11.exec(this.lineFromCursor);if(! $ ){if(this.hasMoreData)return null;return this.cursor=this.lineLength,this}return this.cursor+=( $ .index||0)+ $ [0].length,this}advanceTo( $ ){return this.cursor= $ ,this}advanceToToken( $ ){return this.cursor= $ .startCursor,this}advancePastToken( $ ){return this.cursor= $ .endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}KI0.Scanner=wI0});var JX=O((WI0)=>{Object.defineProperty(WI0,"__esModule",{value:!0});WI0.ColumnFormatter=void 0;class GI0{constructor( $ ){if( $ .trim)this.format=(I)=>I.trim();else if( $ .ltrim)this.format=(I)=>I.trimLeft();else if( $ .rtrim)this.format=(I)=>I.trimRight();else this.format=(I)=>I}}WI0.ColumnFormatter=GI0});var D_=O((LI0)=>{Object.defineProperty(LI0,"__esModule",{value:!0});LI0.NonQuotedColumnParser=void 0;var x11=JX(),ZI0=q7();class XI0{constructor( $ ){this.parserOptions= $ ,this.columnFormatter=new x11.ColumnFormatter( $ )}parse( $ ){if(! $ .hasMoreCharacters)return null;let{parserOptions:I}=this,z=[],q= $ .nextCharacterToken;for(;q;q= $ .nextCharacterToken){if(ZI0.Token.isTokenDelimiter(q,I)||ZI0.Token.isTokenRowDelimiter(q))break;z.push(q.token), $ .advancePastToken(q)}return this.columnFormatter.format(z.join(""))}}LI0.NonQuotedColumnParser=XI0});var F_=O((OI0)=>{Object.defineProperty(OI0,"__esModule",{value:!0});OI0.QuotedColumnParser=void 0;var k11=JX(),fq=q7();class FI0{constructor( $ ){this.parserOptions= $ ,this.columnFormatter=new k11.ColumnFormatter( $ )}parse( $ ){if(! $ .hasMoreCharacters)return null;let I= $ .cursor,{foundClosingQuote:z,col:q}=this.gatherDataBetweenQuotes( $ );if(!z){if( $ .advanceTo(I),! $ .hasMoreData)throw Error( ` Parse Error : missing closing : '${this.parserOptions.quote||""}' in line : at '${$.lineFromCursor.replace(/[\r\n]/g,"\\n' ")}'`);return null}return this.checkForMalformedColumn($),q}gatherDataBetweenQuotes($){let{parserOptions:I}=this,z=!1,q=!1,U=[],Y=$.nextCharacterToken;for(;!q&&Y!==null;Y=$.nextCharacterToken){let J=fq.Token.isTokenQuote(Y,I);if(!z&&J)z=!0;else if(z)if(fq.Token.isTokenEscapeCharacter(Y,I)){$.advancePastToken(Y);let Q=$.nextCharacterToken;if(Q!==null&&(fq.Token.isTokenQuote(Q,I)||fq.Token.isTokenEscapeCharacter(Q,I)))U.push(Q.token),Y=Q;else if(J)q=!0;else U.push(Y.token)}else if(J)q=!0;else U.push(Y.token);$.advancePastToken(Y)}return{col:this.columnFormatter.format(U.join(" ")),foundClosingQuote:q}}checkForMalformedColumn($){let{parserOptions:I}=this,{nextNonSpaceToken:z}=$;if(z){let q=fq.Token.isTokenDelimiter(z,I),U=fq.Token.isTokenRowDelimiter(z);if(!(q||U)){let Y=$.lineFromCursor.substr(0,10).replace(/[\r\n]/g," \ \ n '");throw Error(`Parse Error: expected: ' $ { I . escapedDelimiter } ' OR new line got: ' $ { z . token } '. at ' $ { Y } ` )} $ .advanceToToken(z)}else if(! $ .hasMoreData) $ .advancePastLine()}}OI0.QuotedColumnParser=FI0});var TI0=O((AI0)=>{Object.defineProperty(AI0,"__esModule",{value:!0});AI0.ColumnParser=void 0;var f11=D_(),n11=F_(),b11=q7();class MI0{constructor( $ ){this.parserOptions= $ ,this.quotedColumnParser=new n11.QuotedColumnParser( $ ),this.nonQuotedColumnParser=new f11.NonQuotedColumnParser( $ )}parse( $ ){let{nextNonSpaceToken:I}= $ ;if(I!==null&&b11.Token.isTokenQuote(I,this.parserOptions))return $ .advanceToToken(I),this.quotedColumnParser.parse( $ );return this.nonQuotedColumnParser.parse( $ )}}AI0.ColumnParser=MI0});var O_=O((nq)=>{Object.defineProperty(nq,"__esModule",{value:!0});nq.ColumnFormatter=nq.QuotedColumnParser=nq.NonQuotedColumnParser=nq.ColumnParser=void 0;var i11=TI0();Object.defineProperty(nq,"ColumnParser",{enumerable:!0,get:function(){return i11.ColumnParser}});var p11=D_();Object.defineProperty(nq,"NonQuotedColumnParser",{enumerable:!0,get:function(){return p11.NonQuotedColumnParser}});var c11=F_();Object.defineProperty(nq,"QuotedColumnParser",{enumerable:!0,get:function(){re
Line truncated
% s ` ,u,u,Z,q);let h=Z.type==="*"?y_:Z.type==="?"?k_:" \\ "+Z.type;U=!0,q=q.slice(0,Z.reStart)+h+" \\ ("+u}if(P(),Y)q+=" \\ \\ ";let M=y41[q.charAt(0)];for(let u=Q.length-1;u>-1;u--){let h=Q[u],x=q.slice(0,h.reStart),B=q.slice(h.reStart,h.reEnd-8),n=q.slice(h.reEnd),f=q.slice(h.reEnd-8,h.reEnd)+n,g=x.split(")").length,k=x.split("(").length-g,p=n;for(let R=0;R<k;R++)p=p.replace(/ \) [+*?]?/,"");n=p;let z0=n===""&&I!==u_?"(?: $ | \\ /)":"";q=x+B+n+z0+f}if(q!==""&&U)q="(?=.)"+q;if(M)q=F()+q;if(I===u_)return[q,U];if(z.nocase&&!U)U= $ .toUpperCase()!== $ .toLowerCase();if(!U)return x41( $ );let v=z.nocase?"i":"";try{return Object.assign(new RegExp("^"+q+" $ ",v),{_glob: $ ,_src:q})}catch(u){return new RegExp(" $ .")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let $ =this.set;if(! $ .length)return this.regexp=!1,this.regexp;let I=this.options,z=I.noglobstar?y_:I.dot?h41:S41,q=I.nocase?"i":"",U= $ .map((Y)=>{return Y=Y.map((J)=>typeof J==="string"?f41(J):J===y6?y6:J._src).reduce((J,Q)=>{if(!(J[J.length-1]===y6&&Q===y6))J.push(Q);return J},[]),Y.forEach((J,Q)=>{if(J!==y6||Y[Q-1]===y6)return;if(Q===0)if(Y.length>1)Y[Q+1]="(?: \\ /|"+z+" \\ /)?"+Y[Q+1];else Y[Q]=z;else if(Q===Y.length-1)Y[Q-1]+="(?: \\ /|"+z+")?";else Y[Q-1]+="(?: \\ /| \\ /"+z+" \\ /)"+Y[Q+1],Y[Q+1]=y6}),Y.filter((J)=>J!==y6).join("/")}).join("|");if(U="^(?:"+U+") $ ",this.negate)U="^(?!"+U+").* $ ";try{this.regexp=new RegExp(U,q)}catch(Y){this.regexp=!1}return this.regexp}match( $ ,I=this.partial){if(this.debug("match", $ ,this.pattern),this.comment)return!1;if(this.empty)return $ ==="";if( $ ==="/"&&I)return!0;let z=this.options;if(x_.sep!=="/") $ = $ .split(x_.sep).join("/"); $ = $ .split(Lz0),this.debug(this.pattern,"split", $ );let q=this.set;this.debug(this.pattern,"set",q);let U;for(let Y= $ .length-1;Y>=0;Y--)if(U= $ [Y],U)break;for(let Y=0;Y<q.length;Y++){let J=q[Y],Q= $ ;if(z.matchBase&&J.length===1)Q=[U];if(this.matchOne(Q,J,I)){if(z.flipNegate)return!0;return!this.negate}}if(z.flipNegate)return!1;return this.negate}static defaults( $ ){return D $ .defaults( $ ).Minimatch}}D $ .Minimatch=aQ});var Tz0=O((vg1,Pz0)=>{Pz0.exports=Az0;var b_=t("fs"),{EventEmitter:b41}=t("events"),{Minimatch:n_}=Oz0(),{resolve:i41}=t("path");function p41( $ ,I){return new Promise((z,q)=>{b_.readdir( $ ,{withFileTypes:!0},(U,Y)=>{if(U)switch(U.code){case"ENOTDIR":if(I)q(U);else z([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":z([]);break;case"ELOOP":default:q(U);break}else z(Y)})})}function Nz0( $ ,I){return new Promise((z,q)=>{(I?b_.stat:b_.lstat)( $ ,(Y,J)=>{if(Y)switch(Y.code){case"ENOENT":if(I)z(Nz0( $ ,!1));else z(null);break;default:z(null);break}else z(J)})})}async function*Mz0( $ ,I,z,q,U,Y){let J=await p41(I+ $ ,Y);for(let Q of J){let w=Q.name;if(w===void 0)w=Q,q=!0;let K= $ +"/"+w,H=K.slice(1),G=I+"/"+H,W=null;if(q||z)W=await Nz0(G,z);if(!W&&Q.name!==void 0)W=Q;if(W===null)W={isDirectory:()=>!1};if(W.isDirectory()){if(!U(H))yield{relative:H,absolute:G,stats:W},yield*Mz0(K,I,z,q,U,!1)}else yield{relative:H,absolute:G,stats:W}}}async function*c41( $ ,I,z,q){yield*Mz0("", $ ,I,z,q,!0)}function d41( $ ){return{pattern: $ .pattern,dot:!! $ .dot,noglobstar:!! $ .noglobstar,matchBase:!! $ .matchBase,nocase:!! $ .nocase,ignore: $ .ignore,skip: $ .skip,follow:!! $ .follow,stat:!! $ .stat,nodir:!! $ .nodir,mark:!! $ .mark,silent:!! $ .silent,absolute:!! $ .absolute}}class i_ extends b41{constructor( $ ,I,z){super();if(typeof I==="function")z=I,I=null;if(this.options=d41(I||{}),this.matchers=[],this.options.pattern){let q=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=q.map((U)=>new n_(U,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let q=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=q.map((U)=>new n_(U,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let q=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=q.map((U)=>new n_(U,{dot:!0}))}if(this.iterator=c41(i41( $ ||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,z)this._matches=[],this.on("match",(q)=>this._matches.push(this.options.absolute?q.absolute:q.relative)),this.on("error",(q)=>z(q)),this.on("end",()=>z(null,this._matches));setTimeout(()=>this._next(),0)}_shouldSkipDirectory( $ ){return this.skipMatchers.some((I)=>I.match( $ ))}_fileMatches( $ ,I){let z= $ +(I?"/":"");return(this.matchers.length===0||this.matchers.some((q)=>q.match(z)))&&!this.ignoreMatchers.some((q)=>q.match(z))&&(!this.options.nodir||!I)}_next(){if(!this.paused&&!this.aborted)this.iterator.next().then(( $ )=>{if(! $ .done){let I= $ .value.stats.isDirectory();if(this._fileMatches( $ .value.relative,I)){let z= $ .value.relative,q= $ .value.absolute;if(this.options.mark&&I)z+="/",q+="/";if(this.options.stat)this.emit("match",{relative:z,absolute:q,stat: $ .value.stats});else this.emit("match",{relative:z,ab
Line truncated
` ,y );y = $ 0===-1?E.length: $ 0}else if(d!==-1&&E[y ]==="/"&&E[y +1]==="*"){let $ 0=E.indexOf("*/",y );if( $ 0!==-1)y = $ 0+2,d=E.indexOf("*/",y );else C+=E[y ],y ++}else C+=E[y ],y ++;return C}function B $ (E){let C=T 6(E.toString()),y =C.match(b4);if(!y)y =C.match(n 6);if(!y )throw Error( ` could not parse args in autoInject
` }static isTokenCarriageReturn( $ ,I){return $ .token===I.carriageReturn}static isTokenComment( $ ,I){return I.supportsComments&&!! $ && $ .token===I.comment}static isTokenEscapeCharacter( $ ,I){return $ .token===I.escapeChar}static isTokenQuote( $ ,I){return $ .token===I.quote}static isTokenDelimiter( $ ,I){return $ .token===I.delimiter}}QI0.Token=JI0});var M_=F((GI0)=>{Object.defineProperty(GI0,"__esModule",{value:!0});GI0.Scanner=void 0;var KI0=J7(),c11=/((?: \r \n )| \n | \r )/;class HI0{constructor( $ ){this.cursor=0,this.line= $ .line,this.lineLength=this.line.length,this.parserOptions= $ .parserOptions,this.hasMoreData= $ .hasMoreData,this.cursor= $ .cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){let{lineFromCursor: $ }=this,I=this.parserOptions.NEXT_TOKEN_REGEXP;if( $ .search(I)===-1)return null;let z=I.exec( $ );if(z==null)return null;let q=z[1],U=this.cursor+(z.index||0);return new KI0.Token({token:q,startCursor:U,endCursor:U+q.length-1})}get nextCharacterToken(){let{cursor: $ ,lineLength:I}=this;if(I<= $ )return null;return new KI0.Token({token:this.line[ $ ],startCursor: $ ,endCursor: $ })}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){let $ =c11.exec(this.lineFromCursor);if(! $ ){if(this.hasMoreData)return null;return this.cursor=this.lineLength,this}return this.cursor+=( $ .index||0)+ $ [0].length,this}advanceTo( $ ){return this.cursor= $ ,this}advanceToToken( $ ){return this.cursor= $ .startCursor,this}advancePastToken( $ ){return this.cursor= $ .endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}GI0.Scanner=HI0});var KX=F((ZI0)=>{Object.defineProperty(ZI0,"__esModule",{value:!0});ZI0.ColumnFormatter=void 0;class VI0{constructor( $ ){if( $ .trim)this.format=(I)=>I.trim();else if( $ .ltrim)this.format=(I)=>I.trimLeft();else if( $ .rtrim)this.format=(I)=>I.trimRight();else this.format=(I)=>I}}ZI0.ColumnFormatter=VI0});var A_=F((OI0)=>{Object.defineProperty(OI0,"__esModule",{value:!0});OI0.NonQuotedColumnParser=void 0;var d11=KX(),LI0=J7();class DI0{constructor( $ ){this.parserOptions= $ ,this.columnFormatter=new d11.ColumnFormatter( $ )}parse( $ ){if(! $ .hasMoreCharacters)return null;let{parserOptions:I}=this,z=[],q= $ .nextCharacterToken;for(;q;q= $ .nextCharacterToken){if(LI0.Token.isTokenDelimiter(q,I)||LI0.Token.isTokenRowDelimiter(q))break;z.push(q.token), $ .advancePastToken(q)}return this.columnFormatter.format(z.join(""))}}OI0.NonQuotedColumnParser=DI0});var P_=F((MI0)=>{Object.defineProperty(MI0,"__esModule",{value:!0});MI0.QuotedColumnParser=void 0;var m11=KX(),bq=J7();class NI0{constructor( $ ){this.parserOptions= $ ,this.columnFormatter=new m11.ColumnFormatter( $ )}parse( $ ){if(! $ .hasMoreCharacters)return null;let I= $ .cursor,{foundClosingQuote:z,col:q}=this.gatherDataBetweenQuotes( $ );if(!z){if( $ .advanceTo(I),! $ .hasMoreData)throw Error( ` Parse Error : missing closing : '${this.parserOptions.quote||""}' in line : at '${$.lineFromCursor.replace(/[\r\n]/g,"\\n' ")}'`);return null}return this.checkForMalformedColumn($),q}gatherDataBetweenQuotes($){let{parserOptions:I}=this,z=!1,q=!1,U=[],Y=$.nextCharacterToken;for(;!q&&Y!==null;Y=$.nextCharacterToken){let J=bq.Token.isTokenQuote(Y,I);if(!z&&J)z=!0;else if(z)if(bq.Token.isTokenEscapeCharacter(Y,I)){$.advancePastToken(Y);let Q=$.nextCharacterToken;if(Q!==null&&(bq.Token.isTokenQuote(Q,I)||bq.Token.isTokenEscapeCharacter(Q,I)))U.push(Q.token),Y=Q;else if(J)q=!0;else U.push(Y.token)}else if(J)q=!0;else U.push(Y.token);$.advancePastToken(Y)}return{col:this.columnFormatter.format(U.join(" ")),foundClosingQuote:q}}checkForMalformedColumn($){let{parserOptions:I}=this,{nextNonSpaceToken:z}=$;if(z){let q=bq.Token.isTokenDelimiter(z,I),U=bq.Token.isTokenRowDelimiter(z);if(!(q||U)){let Y=$.lineFromCursor.substr(0,10).replace(/[\r\n]/g," \ \ n '");throw Error(`Parse Error: expected: ' $ { I . escapedDelimiter } ' OR new line got: ' $ { z . token } '. at ' $ { Y } ` )} $ .advanceToToken(z)}else if(! $ .hasMoreData) $ .advancePastLine()}}MI0.QuotedColumnParser=NI0});var BI0=F((TI0)=>{Object.defineProperty(TI0,"__esModule",{value:!0});TI0.ColumnParser=void 0;var l11=A_(),o11=P_(),r11=J7();class PI0{constructor( $ ){this.parserOptions= $ ,this.quotedColumnParser=new o11.QuotedColumnParser( $ ),this.nonQuotedColumnParser=new l11.NonQuotedColumnParser( $ )}parse( $ ){let{nextNonSpaceToken:I}= $ ;if(I!==null&&r11.Token.isTokenQuote(I,this.parserOptions))return $ .advanceToToken(I),this.quotedColumnParser.parse( $ );return this.nonQuotedColumnParser.parse( $ )}}TI0.ColumnParser=PI0});var T_=F((iq)=>{Object.defineProperty(iq,"__esModule",{value:!0});iq.ColumnFormatter=iq.QuotedColumnParser=iq.NonQuotedColumnParser=iq.ColumnParser=void 0;var t11=BI0();Object.defineProperty(iq,"ColumnParser",{enumerable:!0,get:function(){return t11.ColumnParser}});var a11=A_();Object.defineProperty(iq,"NonQuotedColumnParser",{enumerable:!0,get:function(){return a11.NonQuotedColumnParser}});var s11=P_();Object.defineProperty(iq,"QuotedColumnParser",{enumerable:!0,get:function(){re
Line truncated
% s ` ,y,y,Z,q);let h=Z.type==="*"?n_:Z.type==="?"?p_:" \\ "+Z.type;U=!0,q=q.slice(0,Z.reStart)+h+" \\ ("+y}if(P(),Y)q+=" \\ \\ ";let M=p41[q.charAt(0)];for(let y=Q.length-1;y>-1;y--){let h=Q[y],x=q.slice(0,h.reStart),B=q.slice(h.reStart,h.reEnd-8),n=q.slice(h.reEnd),f=q.slice(h.reEnd-8,h.reEnd)+n,R=x.split(")").length,k=x.split("(").length-R,p=n;for(let g=0;g<k;g++)p=p.replace(/ \) [+*?]?/,"");n=p;let z0=n===""&&I!==b_?"(?: $ | \\ /)":"";q=x+B+n+z0+f}if(q!==""&&U)q="(?=.)"+q;if(M)q=O()+q;if(I===b_)return[q,U];if(z.nocase&&!U)U= $ .toUpperCase()!== $ .toLowerCase();if(!U)return d41( $ );let v=z.nocase?"i":"";try{return Object.assign(new RegExp("^"+q+" $ ",v),{_glob: $ ,_src:q})}catch(y){return new RegExp(" $ .")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let $ =this.set;if(! $ .length)return this.regexp=!1,this.regexp;let I=this.options,z=I.noglobstar?n_:I.dot?b41:i41,q=I.nocase?"i":"",U= $ .map((Y)=>{return Y=Y.map((J)=>typeof J==="string"?l41(J):J===x6?x6:J._src).reduce((J,Q)=>{if(!(J[J.length-1]===x6&&Q===x6))J.push(Q);return J},[]),Y.forEach((J,Q)=>{if(J!==x6||Y[Q-1]===x6)return;if(Q===0)if(Y.length>1)Y[Q+1]="(?: \\ /|"+z+" \\ /)?"+Y[Q+1];else Y[Q]=z;else if(Q===Y.length-1)Y[Q-1]+="(?: \\ /|"+z+")?";else Y[Q-1]+="(?: \\ /| \\ /"+z+" \\ /)"+Y[Q+1],Y[Q+1]=x6}),Y.filter((J)=>J!==x6).join("/")}).join("|");if(U="^(?:"+U+") $ ",this.negate)U="^(?!"+U+").* $ ";try{this.regexp=new RegExp(U,q)}catch(Y){this.regexp=!1}return this.regexp}match( $ ,I=this.partial){if(this.debug("match", $ ,this.pattern),this.comment)return!1;if(this.empty)return $ ==="";if( $ ==="/"&&I)return!0;let z=this.options;if(i_.sep!=="/") $ = $ .split(i_.sep).join("/"); $ = $ .split(Oz0),this.debug(this.pattern,"split", $ );let q=this.set;this.debug(this.pattern,"set",q);let U;for(let Y= $ .length-1;Y>=0;Y--)if(U= $ [Y],U)break;for(let Y=0;Y<q.length;Y++){let J=q[Y],Q= $ ;if(z.matchBase&&J.length===1)Q=[U];if(this.matchOne(Q,J,I)){if(z.flipNegate)return!0;return!this.negate}}if(z.flipNegate)return!1;return this.negate}static defaults( $ ){return F $ .defaults( $ ).Minimatch}}F $ .Minimatch= $ 2});var Bz0=F((mR1,Ez0)=>{Ez0.exports=Tz0;var m_=t("fs"),{EventEmitter:r41}=t("events"),{Minimatch:d_}=Mz0(),{resolve:t41}=t("path");function a41( $ ,I){return new Promise((z,q)=>{m_.readdir( $ ,{withFileTypes:!0},(U,Y)=>{if(U)switch(U.code){case"ENOTDIR":if(I)q(U);else z([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":z([]);break;case"ELOOP":default:q(U);break}else z(Y)})})}function Az0( $ ,I){return new Promise((z,q)=>{(I?m_.stat:m_.lstat)( $ ,(Y,J)=>{if(Y)switch(Y.code){case"ENOENT":if(I)z(Az0( $ ,!1));else z(null);break;default:z(null);break}else z(J)})})}async function*Pz0( $ ,I,z,q,U,Y){let J=await a41(I+ $ ,Y);for(let Q of J){let w=Q.name;if(w===void 0)w=Q,q=!0;let K= $ +"/"+w,H=K.slice(1),G=I+"/"+H,W=null;if(q||z)W=await Az0(G,z);if(!W&&Q.name!==void 0)W=Q;if(W===null)W={isDirectory:()=>!1};if(W.isDirectory()){if(!U(H))yield{relative:H,absolute:G,stats:W},yield*Pz0(K,I,z,q,U,!1)}else yield{relative:H,absolute:G,stats:W}}}async function*s41( $ ,I,z,q){yield*Pz0("", $ ,I,z,q,!0)}function e41( $ ){return{pattern: $ .pattern,dot:!! $ .dot,noglobstar:!! $ .noglobstar,matchBase:!! $ .matchBase,nocase:!! $ .nocase,ignore: $ .ignore,skip: $ .skip,follow:!! $ .follow,stat:!! $ .stat,nodir:!! $ .nodir,mark:!! $ .mark,silent:!! $ .silent,absolute:!! $ .absolute}}class l_ extends r41{constructor( $ ,I,z){super();if(typeof I==="function")z=I,I=null;if(this.options=e41(I||{}),this.matchers=[],this.options.pattern){let q=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=q.map((U)=>new d_(U,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let q=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=q.map((U)=>new d_(U,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let q=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=q.map((U)=>new d_(U,{dot:!0}))}if(this.iterator=s41(t41( $ ||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,z)this._matches=[],this.on("match",(q)=>this._matches.push(this.options.absolute?q.absolute:q.relative)),this.on("error",(q)=>z(q)),this.on("end",()=>z(null,this._matches));setTimeout(()=>this._next(),0)}_shouldSkipDirectory( $ ){return this.skipMatchers.some((I)=>I.match( $ ))}_fileMatches( $ ,I){let z= $ +(I?"/":"");return(this.matchers.length===0||this.matchers.some((q)=>q.match(z)))&&!this.ignoreMatchers.some((q)=>q.match(z))&&(!this.options.nodir||!I)}_next(){if(!this.paused&&!this.aborted)this.iterator.next().then(( $ )=>{if(! $ .done){let I= $ .value.stats.isDirectory();if(this._fileMatches( $ .value.relative,I)){let z= $ .value.relative,q= $ .value.absolute;if(this.options.mark&&I)z+="/",q+="/";if(this.options.stat)this.emit("match",{relative:z,absolute:q,stat: $ .value.stats});else this.emit("match",{relative:z,ab
Line truncated
` ,S );S = $ 0===-1?E.length: $ 0}else if(d!==-1&&E[S ]==="/"&&E[S +1]==="*"){let $ 0=E.indexOf("*/",S );if( $ 0!==-1)S = $ 0+2,d=E.indexOf("*/",S );else C+=E[S ],S ++}else C+=E[S ],S ++;return C}function j $ (E){let C=B 6(E.toString()),S =C.match(b4);if(!S)S =C.match(i 6);if(!S )throw Error( ` could not parse args in autoInject
Source :
` +C);let[,d]=y;return d.replace(/ \s /g,"").split(E $ ).map(( $ 0)=> $ 0.replace(b6,"").trim())}function Q $ (E,C){var y={};return Object.keys(E).forEach((d)=>{var $ 0=E[d],q0,w0=Z( $ 0),K0=!w0&& $ 0.length===1||w0&& $ 0.length===0;if(Array.isArray( $ 0))q0=[... $ 0], $ 0=q0.pop(),y[d]=q0.concat(q0.length>0?X0: $ 0);else if(K0)y[d]= $ 0;else{if(q0=B $ ( $ 0), $ 0.length===0&&!w0&&q0.length===0)throw Error("autoInject task functions require explicit parameters.");if(!w0)q0.pop();y[d]=q0.concat(X0)}function X0(C0,K1){var M1=q0.map((V1)=>C0[V1]);M1.push(K1),D( $ 0)(...M1)}}),N1(y,C)}class S7{constructor(){this.head=this.tail=null,this.length=0}removeLink(E){if(E.prev)E.prev.next=E.next;else this.head=E.next;if(E.next)E.next.prev=E.prev;else this.tail=E.prev;return E.prev=E.next=null,this.length-=1,E}empty(){while(this.head)this.shift();return this}insertAfter(E,C){if(C.prev=E,C.next=E.next,E.next)E.next.prev=C;else this.tail=C;E.next=C,this.length+=1}insertBefore(E,C){if(C.prev=E.prev,C.next=E,E.prev)E.prev.next=C;else this.head=C;E.prev=C,this.length+=1}unshift(E){if(this.head)this.insertBefore(this.head,E);else w $ (this,E)}push(E){if(this.tail)this.insertAfter(this.tail,E);else w $ (this,E)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){var E=this.head;while(E)yield E.data,E=E.next}remove(E){var C=this.head;while(C){var{next:y}=C;if(E(C))this.removeLink(C);C=y}return this}}function w $ (E,C){E.length=1,E.head=E.tail=C}function U9(E,C,y){if(C==null)C=1;else if(C===0)throw RangeError("Concurrency must not be zero");var d=D(E), $ 0=0,q0=[];let w0={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function K0(x0,g0){w0[x0].push(g0)}function X0(x0,g0){let k0=(...Z1)=>{C0(x0,k0),g0(...Z1)};w0[x0].push(k0)}function C0(x0,g0){if(!x0)return Object.keys(w0).forEach((k0)=>w0[k0]=[]);if(!g0)return w0[x0]=[];w0[x0]=w0[x0].filter((k0)=>k0!==g0)}function K1(x0,...g0){w0[x0].forEach((k0)=>k0(...g0))}var M1=!1;function V1(x0,g0,k0,Z1){if(Z1!=null&&typeof Z1!=="function")throw Error("task callback must be a function");A1.started=!0;var Q4,i4;function v $ (u7,...sU){if(u7)return k0?i4(u7):Q4();if(sU.length<=1)return Q4(sU[0]);Q4(sU)}var vI=A1._createTaskItem(x0,k0?v $ :Z1||v $ );if(g0)A1._tasks.unshift(vI);else A1._tasks.push(vI);if(!M1)M1=!0,K(()=>{M1=!1,A1.process()});if(k0||!Z1)return new Promise((u7,sU)=>{Q4=u7,i4=sU})}function j $ (x0){return function(g0,...k0){ $ 0-=1;for(var Z1=0,Q4=x0.length;Z1<Q4;Z1++){var i4=x0[Z1],v $ =q0.indexOf(i4);if(v $ ===0)q0.shift();else if(v $ >0)q0.splice(v $ ,1);if(i4.callback(g0,...k0),g0!=null)K1("error",g0,i4.data)}if( $ 0<=A1.concurrency-A1.buffer)K1("unsaturated");if(A1.idle())K1("drain");A1.process()}}function jI(x0){if(x0.length===0&&A1.idle())return K(()=>K1("drain")),!0;return!1}let y7=(x0)=>(g0)=>{if(!g0)return new Promise((k0,Z1)=>{X0(x0,(Q4,i4)=>{if(Q4)return Z1(Q4);k0(i4)})});C0(x0),K0(x0,g0)};var aU=!1,A1={_tasks:new S7,_createTaskItem(x0,g0){return{data:x0,callback:g0}},*[Symbol.iterator](){yield*A1._tasks[Symbol.iterator]()},concurrency:C,payload:y,buffer:C/4,started:!1,paused:!1,push(x0,g0){if(Array.isArray(x0)){if(jI(x0))return;return x0.map((k0)=>V1(k0,!1,!1,g0))}return V1(x0,!1,!1,g0)},pushAsync(x0,g0){if(Array.isArray(x0)){if(jI(x0))return;return x0.map((k0)=>V1(k0,!1,!0,g0))}return V1(x0,!1,!0,g0)},kill(){C0(),A1._tasks.empty()},unshift(x0,g0){if(Array.isArray(x0)){if(jI(x0))return;return x0.map((k0)=>V1(k0,!0,!1,g0))}return V1(x0,!0,!1,g0)},unshiftAsync(x0,g0){if(Array.isArray(x0)){if(jI(x0))return;return x0.map((k0)=>V1(k0,!0,!0,g0))}return V1(x0,!0,!0,g0)},remove(x0){A1._tasks.remove(x0)},process(){if(aU)return;aU=!0;while(!A1.paused&& $ 0<A1.concurrency&&A1._tasks.length){var x0=[],g0=[],k0=A1._tasks.length;if(A1.payload)k0=Math.min(k0,A1.payload);for(var Z1=0;Z1<k0;Z1++){var Q4=A1._tasks.shift();x0.push(Q4),q0.push(Q4),g0.push(Q4.data)}if( $ 0+=1,A1._tasks.length===0)K1("empty");if( $ 0===A1.concurrency)K1("saturated");var i4=g(j $ (x0));d(g0,i4)}aU=!1},length(){return A1._tasks.length},running(){return $ 0},workersList(){return q0},idle(){return A1._tasks.length+ $ 0===0},pause(){A1.paused=!0},resume(){if(A1.paused===!1)return;A1.paused=!1,K(A1.process)}};return Object.defineProperties(A1,{saturated:{writable:!1,value:y7("saturated")},unsaturated:{writable:!1,value:y7("unsaturated")},empty:{writable:!1,value:y7("empty")},drain:{writable:!1,value:y7("drain")},error:{writable:!1,value:y7("error")}}),A1}function j0(E,C){return U9(E,1,C)}function a(E,C,y){return U9(E,C,y)}function N(E,C,y,d){d=u(d);var $ 0=D(y);return f0(E,(q0,w0,K0)=>{ $ 0(C,q0,(X0,C0)=>{C=C0,K0(X0)})},(q0)=>d(q0,C))}var A=F(N,4);function S(...E){var C=E.map(D);return function(...y){var d=this, $ 0=y[y.length-1];if(typeof $ 0=="function")y.pop();else $ 0=q1();return A(C,y,(q0,w0,K0)=>{w0.apply(d,q0.concat((X0,...C0)=>{K0(X0,C0)}))},(q0,w0)=> $ 0(q0,...w0)), $ 0[v0]}}function b(...E){return S(...E.reverse())}function s(E,C,y,d){return P(p(C),E,y,d)}var m=F(s,4);function e(
Line truncated
GFS4 : ` ),console.error( $ )};if(!Z4[J6]){if(p_=global[J6]||[],yz0(Z4,p_),Z4.close=function( $ ){function I(z,q){return $ .call(Z4,z,function(U){if(!U)Sz0();if(typeof q==="function")q.apply(this,arguments)})}return Object.defineProperty(I,LX,{value: $ }),I}(Z4.close),Z4.closeSync=function( $ ){function I(z){ $ .apply(Z4,arguments),Sz0()}return Object.defineProperty(I,LX,{value: $ }),I}(Z4.closeSync),/ \b gfs4 \b /i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){x3(Z4[J6]),t("assert").equal(Z4[J6].length,0)})}var p_;if(!global[J6])yz0(global,Z4[J6]);m_.exports=c_( $ 61(Z4));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Z4.__patched)m_.exports=c_(Z4),Z4.__patched=!0;function c_( $ ){s41( $ ), $ .gracefulify=c_, $ .createReadStream=v, $ .createWriteStream=u;var I= $ .readFile; $ .readFile=z;function z(B,n,f){if(typeof n==="function")f=n,n=null;return g(B,n,f);function g(k,p,z0,R){return I(k,p,function(i){if(i&&(i.code==="EMFILE"||i.code==="ENFILE"))pq([g,[k,p,z0],i,R||Date.now(),Date.now()]);else if(typeof z0==="function")z0.apply(this,arguments)})}}var q= $ .writeFile; $ .writeFile=U;function U(B,n,f,g){if(typeof f==="function")g=f,f=null;return k(B,n,f,g);function k(p,z0,R,i,c){return q(p,z0,R,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))pq([k,[p,z0,R,i],r,c||Date.now(),Date.now()]);else if(typeof i==="function")i.apply(this,arguments)})}}var Y= $ .appendFile;if(Y) $ .appendFile=J;function J(B,n,f,g){if(typeof f==="function")g=f,f=null;return k(B,n,f,g);function k(p,z0,R,i,c){return Y(p,z0,R,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))pq([k,[p,z0,R,i],r,c||Date.now(),Date.now()]);else if(typeof i==="function")i.apply(this,arguments)})}}var Q= $ .copyFile;if(Q) $ .copyFile=w;function w(B,n,f,g){if(typeof f==="function")g=f,f=0;return k(B,n,f,g);function k(p,z0,R,i,c){return Q(p,z0,R,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))pq([k,[p,z0,R,i],r,c||Date.now(),Date.now()]);else if(typeof i==="function")i.apply(this,arguments)})}}var K= $ .readdir; $ .readdir=G;var H=/^v[0-5] \. /;function G(B,n,f){if(typeof n==="function")f=n,n=null;var g=H.test(process.version)?function(z0,R,i,c){return K(z0,k(z0,R,i,c))}:function(z0,R,i,c){return K(z0,R,k(z0,R,i,c))};return g(B,n,f);function k(p,z0,R,i){return function(c,r){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))pq([g,[p,z0,R],c,i||Date.now(),Date.now()]);else{if(r&&r.sort)r.sort();if(typeof R==="function")R.call(this,c,r)}}}}if(process.version.substr(0,4)==="v0.8"){var W=e41( $ );F=W.ReadStream,P=W.WriteStream}var Z= $ .ReadStream;if(Z)F.prototype=Object.create(Z.prototype),F.prototype.open=T;var X= $ .WriteStream;if(X)P.prototype=Object.create(X.prototype),P.prototype.open=M;Object.defineProperty( $ ,"ReadStream",{get:function(){return F},set:function(B){F=B},enumerable:!0,configurable:!0}),Object.defineProperty( $ ,"WriteStream",{get:function(){return P},set:function(B){P=B},enumerable:!0,configurable:!0});var L=F;Object.defineProperty( $ ,"FileReadStream",{get:function(){return L},set:function(B){L=B},enumerable:!0,configurable:!0});var D=P;Object.defineProperty( $ ,"FileWriteStream",{get:function(){return D},set:function(B){D=B},enumerable:!0,configurable:!0});function F(B,n){if(this instanceof F)return Z.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function T(){var B=this;x(B.path,B.flags,B.mode,function(n,f){if(n){if(B.autoClose)B.destroy();B.emit("error",n)}else B.fd=f,B.emit("open",f),B.read()})}function P(B,n){if(this instanceof P)return X.apply(this,arguments),this;else return P.apply(Object.create(P.prototype),arguments)}function M(){var B=this;x(B.path,B.flags,B.mode,function(n,f){if(n)B.destroy(),B.emit("error",n);else B.fd=f,B.emit("open",f)})}function v(B,n){return new $ .ReadStream(B,n)}function u(B,n){return new $ .WriteStream(B,n)}var h= $ .open; $ .open=x;function x(B,n,f,g){if(typeof f==="function")g=f,f=null;return k(B,n,f,g);function k(p,z0,R,i,c){return h(p,z0,R,function(r,U0){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))pq([k,[p,z0,R,i],r,c||Date.now(),Date.now()]);else if(typeof i==="function")i.apply(this,arguments)})}}return $ }function pq( $ ){x3("ENQUEUE", $ [0].name, $ [1]),Z4[J6].push( $ ),d_()}var XX;function Sz0(){var $ =Date.now();for(var I=0;I<Z4[J6].length;++I)if(Z4[J6][I].length>2)Z4[J6][I][3]= $ ,Z4[J6][I][4]= $ ;d_()}function d_(){if(clearTimeout(XX),XX=void 0,Z4[J6].length===0)return;var $ =Z4[J6].shift(),I= $ [0],z= $ [1],q= $ [2],U= $ [3],Y= $ [4];if(U===void 0)x3("RETRY",I.name,z),I.apply(null,z);else if(Date.now()-U>=60000){x3("TIMEOUT",I.name,z);var J=z.pop();if(typeof J==="function")J.call(null,q)}else{var Q=Date.now()-Y,w=Math.max(Y-U,1),K=Math.min(w*1.2,100);if(Q>=K)x3("RETRY",I.name,z),I.apply(null,z.concat([U]));else Z4[J6].push( $ )}if(XX===void 0)XX=setTimeout(d_,0)}});var xz0=O((hg1,l_)=>{function z61( $ ,I){if(!( $ instanceof I))throw TypeError("Cannot call a class as a function")}var uz0=E4().Buffer,sQ=t("util");function q61( $ ,I,z){ $ .copy(I,z)}l_.exports=function(){function $ (){z61(this, $ ),this.head=null,this.tail=null,th
Line truncated
` +C);let[,d]=S;return d.replace(/ \s /g,"").split(B $ ).map(( $ 0)=> $ 0.replace(p6,"").trim())}function K $ (E,C){var S={};return Object.keys(E).forEach((d)=>{var $ 0=E[d],q0,w0=Z( $ 0),K0=!w0&& $ 0.length===1||w0&& $ 0.length===0;if(Array.isArray( $ 0))q0=[... $ 0], $ 0=q0.pop(),S[d]=q0.concat(q0.length>0?X0: $ 0);else if(K0)S[d]= $ 0;else{if(q0=j $ ( $ 0), $ 0.length===0&&!w0&&q0.length===0)throw Error("autoInject task functions require explicit parameters.");if(!w0)q0.pop();S[d]=q0.concat(X0)}function X0(C0,K1){var M1=q0.map((V1)=>C0[V1]);M1.push(K1),D( $ 0)(...M1)}}),N1(S,C)}class y7{constructor(){this.head=this.tail=null,this.length=0}removeLink(E){if(E.prev)E.prev.next=E.next;else this.head=E.next;if(E.next)E.next.prev=E.prev;else this.tail=E.prev;return E.prev=E.next=null,this.length-=1,E}empty(){while(this.head)this.shift();return this}insertAfter(E,C){if(C.prev=E,C.next=E.next,E.next)E.next.prev=C;else this.tail=C;E.next=C,this.length+=1}insertBefore(E,C){if(C.prev=E.prev,C.next=E,E.prev)E.prev.next=C;else this.head=C;E.prev=C,this.length+=1}unshift(E){if(this.head)this.insertBefore(this.head,E);else H $ (this,E)}push(E){if(this.tail)this.insertAfter(this.tail,E);else H $ (this,E)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){var E=this.head;while(E)yield E.data,E=E.next}remove(E){var C=this.head;while(C){var{next:S}=C;if(E(C))this.removeLink(C);C=S}return this}}function H $ (E,C){E.length=1,E.head=E.tail=C}function Q9(E,C,S){if(C==null)C=1;else if(C===0)throw RangeError("Concurrency must not be zero");var d=D(E), $ 0=0,q0=[];let w0={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function K0(x0,R0){w0[x0].push(R0)}function X0(x0,R0){let k0=(...Z1)=>{C0(x0,k0),R0(...Z1)};w0[x0].push(k0)}function C0(x0,R0){if(!x0)return Object.keys(w0).forEach((k0)=>w0[k0]=[]);if(!R0)return w0[x0]=[];w0[x0]=w0[x0].filter((k0)=>k0!==R0)}function K1(x0,...R0){w0[x0].forEach((k0)=>k0(...R0))}var M1=!1;function V1(x0,R0,k0,Z1){if(Z1!=null&&typeof Z1!=="function")throw Error("task callback must be a function");A1.started=!0;var Q4,i4;function g $ (k7,...IY){if(k7)return k0?i4(k7):Q4();if(IY.length<=1)return Q4(IY[0]);Q4(IY)}var RI=A1._createTaskItem(x0,k0?g $ :Z1||g $ );if(R0)A1._tasks.unshift(RI);else A1._tasks.push(RI);if(!M1)M1=!0,K(()=>{M1=!1,A1.process()});if(k0||!Z1)return new Promise((k7,IY)=>{Q4=k7,i4=IY})}function v $ (x0){return function(R0,...k0){ $ 0-=1;for(var Z1=0,Q4=x0.length;Z1<Q4;Z1++){var i4=x0[Z1],g $ =q0.indexOf(i4);if(g $ ===0)q0.shift();else if(g $ >0)q0.splice(g $ ,1);if(i4.callback(R0,...k0),R0!=null)K1("error",R0,i4.data)}if( $ 0<=A1.concurrency-A1.buffer)K1("unsaturated");if(A1.idle())K1("drain");A1.process()}}function gI(x0){if(x0.length===0&&A1.idle())return K(()=>K1("drain")),!0;return!1}let x7=(x0)=>(R0)=>{if(!R0)return new Promise((k0,Z1)=>{X0(x0,(Q4,i4)=>{if(Q4)return Z1(Q4);k0(i4)})});C0(x0),K0(x0,R0)};var $ Y=!1,A1={_tasks:new y7,_createTaskItem(x0,R0){return{data:x0,callback:R0}},*[Symbol.iterator](){yield*A1._tasks[Symbol.iterator]()},concurrency:C,payload:S,buffer:C/4,started:!1,paused:!1,push(x0,R0){if(Array.isArray(x0)){if(gI(x0))return;return x0.map((k0)=>V1(k0,!1,!1,R0))}return V1(x0,!1,!1,R0)},pushAsync(x0,R0){if(Array.isArray(x0)){if(gI(x0))return;return x0.map((k0)=>V1(k0,!1,!0,R0))}return V1(x0,!1,!0,R0)},kill(){C0(),A1._tasks.empty()},unshift(x0,R0){if(Array.isArray(x0)){if(gI(x0))return;return x0.map((k0)=>V1(k0,!0,!1,R0))}return V1(x0,!0,!1,R0)},unshiftAsync(x0,R0){if(Array.isArray(x0)){if(gI(x0))return;return x0.map((k0)=>V1(k0,!0,!0,R0))}return V1(x0,!0,!0,R0)},remove(x0){A1._tasks.remove(x0)},process(){if( $ Y)return; $ Y=!0;while(!A1.paused&& $ 0<A1.concurrency&&A1._tasks.length){var x0=[],R0=[],k0=A1._tasks.length;if(A1.payload)k0=Math.min(k0,A1.payload);for(var Z1=0;Z1<k0;Z1++){var Q4=A1._tasks.shift();x0.push(Q4),q0.push(Q4),R0.push(Q4.data)}if( $ 0+=1,A1._tasks.length===0)K1("empty");if( $ 0===A1.concurrency)K1("saturated");var i4=R(v $ (x0));d(R0,i4)} $ Y=!1},length(){return A1._tasks.length},running(){return $ 0},workersList(){return q0},idle(){return A1._tasks.length+ $ 0===0},pause(){A1.paused=!0},resume(){if(A1.paused===!1)return;A1.paused=!1,K(A1.process)}};return Object.defineProperties(A1,{saturated:{writable:!1,value:x7("saturated")},unsaturated:{writable:!1,value:x7("unsaturated")},empty:{writable:!1,value:x7("empty")},drain:{writable:!1,value:x7("drain")},error:{writable:!1,value:x7("error")}}),A1}function j0(E,C){return Q9(E,1,C)}function a(E,C,S){return Q9(E,C,S)}function N(E,C,S,d){d=y(d);var $ 0=D(S);return f0(E,(q0,w0,K0)=>{ $ 0(C,q0,(X0,C0)=>{C=C0,K0(X0)})},(q0)=>d(q0,C))}var A=O(N,4);function u(...E){var C=E.map(D);return function(...S){var d=this, $ 0=S[S.length-1];if(typeof $ 0=="function")S.pop();else $ 0=q1();return A(C,S,(q0,w0,K0)=>{w0.apply(d,q0.concat((X0,...C0)=>{K0(X0,C0)}))},(q0,w0)=> $ 0(q0,...w0)), $ 0[v0]}}function b(...E){return u(...E.reverse())}function s(E,C,S,d){return P(p(C),E,S,d)}var m=O(s,4);function e(
Line truncated
GFS4 : ` ),console.error( $ )};if(!Z4[J6]){if(o_=global[J6]||[],xz0(Z4,o_),Z4.close=function( $ ){function I(z,q){return $ .call(Z4,z,function(U){if(!U)yz0();if(typeof q==="function")q.apply(this,arguments)})}return Object.defineProperty(I,FX,{value: $ }),I}(Z4.close),Z4.closeSync=function( $ ){function I(z){ $ .apply(Z4,arguments),yz0()}return Object.defineProperty(I,FX,{value: $ }),I}(Z4.closeSync),/ \b gfs4 \b /i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){f3(Z4[J6]),t("assert").equal(Z4[J6].length,0)})}var o_;if(!global[J6])xz0(global,Z4[J6]);a_.exports=r_(w61(Z4));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Z4.__patched)a_.exports=r_(Z4),Z4.__patched=!0;function r_( $ ){J61( $ ), $ .gracefulify=r_, $ .createReadStream=v, $ .createWriteStream=y;var I= $ .readFile; $ .readFile=z;function z(B,n,f){if(typeof n==="function")f=n,n=null;return R(B,n,f);function R(k,p,z0,g){return I(k,p,function(i){if(i&&(i.code==="EMFILE"||i.code==="ENFILE"))dq([R,[k,p,z0],i,g||Date.now(),Date.now()]);else if(typeof z0==="function")z0.apply(this,arguments)})}}var q= $ .writeFile; $ .writeFile=U;function U(B,n,f,R){if(typeof f==="function")R=f,f=null;return k(B,n,f,R);function k(p,z0,g,i,c){return q(p,z0,g,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))dq([k,[p,z0,g,i],r,c||Date.now(),Date.now()]);else if(typeof i==="function")i.apply(this,arguments)})}}var Y= $ .appendFile;if(Y) $ .appendFile=J;function J(B,n,f,R){if(typeof f==="function")R=f,f=null;return k(B,n,f,R);function k(p,z0,g,i,c){return Y(p,z0,g,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))dq([k,[p,z0,g,i],r,c||Date.now(),Date.now()]);else if(typeof i==="function")i.apply(this,arguments)})}}var Q= $ .copyFile;if(Q) $ .copyFile=w;function w(B,n,f,R){if(typeof f==="function")R=f,f=0;return k(B,n,f,R);function k(p,z0,g,i,c){return Q(p,z0,g,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))dq([k,[p,z0,g,i],r,c||Date.now(),Date.now()]);else if(typeof i==="function")i.apply(this,arguments)})}}var K= $ .readdir; $ .readdir=G;var H=/^v[0-5] \. /;function G(B,n,f){if(typeof n==="function")f=n,n=null;var R=H.test(process.version)?function(z0,g,i,c){return K(z0,k(z0,g,i,c))}:function(z0,g,i,c){return K(z0,g,k(z0,g,i,c))};return R(B,n,f);function k(p,z0,g,i){return function(c,r){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))dq([R,[p,z0,g],c,i||Date.now(),Date.now()]);else{if(r&&r.sort)r.sort();if(typeof g==="function")g.call(this,c,r)}}}}if(process.version.substr(0,4)==="v0.8"){var W=Q61( $ );O=W.ReadStream,P=W.WriteStream}var Z= $ .ReadStream;if(Z)O.prototype=Object.create(Z.prototype),O.prototype.open=T;var X= $ .WriteStream;if(X)P.prototype=Object.create(X.prototype),P.prototype.open=M;Object.defineProperty( $ ,"ReadStream",{get:function(){return O},set:function(B){O=B},enumerable:!0,configurable:!0}),Object.defineProperty( $ ,"WriteStream",{get:function(){return P},set:function(B){P=B},enumerable:!0,configurable:!0});var L=O;Object.defineProperty( $ ,"FileReadStream",{get:function(){return L},set:function(B){L=B},enumerable:!0,configurable:!0});var D=P;Object.defineProperty( $ ,"FileWriteStream",{get:function(){return D},set:function(B){D=B},enumerable:!0,configurable:!0});function O(B,n){if(this instanceof O)return Z.apply(this,arguments),this;else return O.apply(Object.create(O.prototype),arguments)}function T(){var B=this;x(B.path,B.flags,B.mode,function(n,f){if(n){if(B.autoClose)B.destroy();B.emit("error",n)}else B.fd=f,B.emit("open",f),B.read()})}function P(B,n){if(this instanceof P)return X.apply(this,arguments),this;else return P.apply(Object.create(P.prototype),arguments)}function M(){var B=this;x(B.path,B.flags,B.mode,function(n,f){if(n)B.destroy(),B.emit("error",n);else B.fd=f,B.emit("open",f)})}function v(B,n){return new $ .ReadStream(B,n)}function y(B,n){return new $ .WriteStream(B,n)}var h= $ .open; $ .open=x;function x(B,n,f,R){if(typeof f==="function")R=f,f=null;return k(B,n,f,R);function k(p,z0,g,i,c){return h(p,z0,g,function(r,U0){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))dq([k,[p,z0,g,i],r,c||Date.now(),Date.now()]);else if(typeof i==="function")i.apply(this,arguments)})}}return $ }function dq( $ ){f3("ENQUEUE", $ [0].name, $ [1]),Z4[J6].push( $ ),t_()}var OX;function yz0(){var $ =Date.now();for(var I=0;I<Z4[J6].length;++I)if(Z4[J6][I].length>2)Z4[J6][I][3]= $ ,Z4[J6][I][4]= $ ;t_()}function t_(){if(clearTimeout(OX),OX=void 0,Z4[J6].length===0)return;var $ =Z4[J6].shift(),I= $ [0],z= $ [1],q= $ [2],U= $ [3],Y= $ [4];if(U===void 0)f3("RETRY",I.name,z),I.apply(null,z);else if(Date.now()-U>=60000){f3("TIMEOUT",I.name,z);var J=z.pop();if(typeof J==="function")J.call(null,q)}else{var Q=Date.now()-Y,w=Math.max(Y-U,1),K=Math.min(w*1.2,100);if(Q>=K)f3("RETRY",I.name,z),I.apply(null,z.concat([U]));else Z4[J6].push( $ )}if(OX===void 0)OX=setTimeout(t_,0)}});var fz0=F((aR1,s_)=>{function H61( $ ,I){if(!( $ instanceof I))throw TypeError("Cannot call a class as a function")}var kz0=E4().Buffer,I2=t("util");function G61( $ ,I,z){ $ .copy(I,z)}s_.exports=function(){function $ (){H61(this, $ ),this.head=null,this.tail=null,th
Line truncated
* normalize - path < https : //github.com/jonschlinkert/normalize-path>
*
* Copyright ( c ) 2014 - 2018 , Jon Schlinkert .
* Released under the MIT License .
* /Pq0.exports=function($,I){if(typeof $!=="string")throw TypeError("expected path to be a string");if($==="\\"||$==="/ ")return" / ";var z=$.length;if(z<=1)return $;var q=" ";if(z>4&&$[3]===" \ \ "){var U=$[2];if((U===" ? "||U===" . ")&&$.slice(0,2)===" \ \ \ \ ")$=$.slice(2),q=" //"}var Y=$.split(/[/\\]+/);if(I!==!1&&Y[Y.length-1]==="")Y.pop();return q+Y.join("/")}});var VC=O((dg1,gq0)=>{var Eq0=9007199254740991,K$1="[object Arguments]",H$1="[object Function]",G$1="[object GeneratorFunction]",W$1=/^(?:0|[1-9]\d*)$/;function Bq0($,I,z){switch(z.length){case 0:return $.call(I);case 1:return $.call(I,z[0]);case 2:return $.call(I,z[0],z[1]);case 3:return $.call(I,z[0],z[1],z[2])}return $.apply(I,z)}function V$1($,I){var z=-1,q=Array($);while(++z<$)q[z]=I(z);return q}var Q2=Object.prototype,w2=Q2.hasOwnProperty,jq0=Q2.toString,Z$1=Q2.propertyIsEnumerable,Tq0=Math.max;function X$1($,I){var z=E$1($)||T$1($)?V$1($.length,String):[],q=z.length,U=!!q;for(var Y in $)if((I||w2.call($,Y))&&!(U&&(Y=="length"||Rq0(Y,q))))z.push(Y);return z}function L$1($,I,z,q){if($===void 0||HC($,Q2[z])&&!w2.call(q,z))return I;return $}function D$1($,I,z){var q=$[I];if(!(w2.call($,I)&&HC(q,z))||z===void 0&&!(I in $))$[I]=z}function F$1($){if(!WC($))return P$1($);var I=A$1($),z=[];for(var q in $)if(!(q=="constructor"&&(I||!w2.call($,q))))z.push(q);return z}function vq0($,I){return I=Tq0(I===void 0?$.length-1:I,0),function(){var z=arguments,q=-1,U=Tq0(z.length-I,0),Y=Array(U);while(++q<U)Y[q]=z[I+q];q=-1;var J=Array(I+1);while(++q<I)J[q]=z[q];return J[I]=Y,Bq0($,this,J)}}function O$1($,I,z,q){z||(z={});var U=-1,Y=I.length;while(++U<Y){var J=I[U],Q=q?q(z[J],$[J],J,z,$):void 0;D$1(z,J,Q===void 0?$[J]:Q)}return z}function N$1($){return vq0(function(I,z){var q=-1,U=z.length,Y=U>1?z[U-1]:void 0,J=U>2?z[2]:void 0;if(Y=$.length>3&&typeof Y=="function"?(U--,Y):void 0,J&&M$1(z[0],z[1],J))Y=U<3?void 0:Y,U=1;I=Object(I);while(++q<U){var Q=z[q];if(Q)$(I,Q,q,Y)}return I})}function Rq0($,I){return I=I==null?Eq0:I,!!I&&(typeof $=="number"||W$1.test($))&&($>-1&&$%1==0&&$<I)}function M$1($,I,z){if(!WC(z))return!1;var q=typeof I;if(q=="number"?GC(z)&&Rq0(I,z.length):q=="string"&&(I in z))return HC(z[I],$);return!1}function A$1($){var I=$&&$.constructor,z=typeof I=="function"&&I.prototype||Q2;return $===z}function P$1($){var I=[];if($!=null)for(var z in Object($))I.push(z);return I}function HC($,I){return $===I||$!==$&&I!==I}function T$1($){return B$1($)&&w2.call($,"callee")&&(!Z$1.call($,"callee")||jq0.call($)==K$1)}var E$1=Array.isArray;function GC($){return $!=null&&v$1($.length)&&!j$1($)}function B$1($){return R$1($)&&GC($)}function j$1($){var I=WC($)?jq0.call($):"";return I==H$1||I==G$1}function v$1($){return typeof $=="number"&&$>-1&&$%1==0&&$<=Eq0}function WC($){var I=typeof $;return!!$&&(I=="object"||I=="function")}function R$1($){return!!$&&typeof $=="object"}var g$1=N$1(function($,I,z,q){O$1(I,C$1(I),$,q)}),_$1=vq0(function($){return $.push(void 0,L$1),Bq0(g$1,void 0,$)});function C$1($){return GC($)?X$1($,!0):F$1($)}gq0.exports=_$1});var Cq0=O((mg1,ZC)=>{function h$1($,I){if(!($ instanceof I))throw TypeError("Cannot call a class as a function")}var _q0=E4().Buffer,K2=t("util");function S$1($,I,z){$.copy(I,z)}ZC.exports=function(){function $(){h$1(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(z){var q={data:z,next:null};if(this.length>0)this.tail.next=q;else this.head=q;this.tail=q,++this.length},$.prototype.unshift=function(z){var q={data:z,next:this.head};if(this.length===0)this.tail=q;this.head=q,++this.length},$.prototype.shift=function(){if(this.length===0)return;var z=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,z},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(z){if(this.length===0)return"";var q=this.head,U=""+q.data;while(q=q.next)U+=z+q.data;return U},$.prototype.concat=function(z){if(this.length===0)return _q0.alloc(0);var q=_q0.allocUnsafe(z>>>0),U=this.head,Y=0;while(U)S$1(U.data,q,Y),Y+=U.data.length,U=U.next;return q},$}();if(K2&&K2.inspect&&K2.inspect.custom)ZC.exports.prototype[K2.inspect.custom]=function(){var $=K2.inspect({length:this.length});return this.constructor.name+" "+$}});var XC=O((lg1,hq0)=>{var RX=T4();function y$1($,I){var z=this,q=this._readableState&&this._readableState.destroyed,U=this._writableState&&this._writableState.destroyed;if(q||U){if(I)I($);else if($){if(!this._writableState)RX.nextTick(gX,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,RX.nextTick(gX,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(Y){if(!I&&Y){if(!z._writableState)RX.nextTick(gX,z,Y);else if(!z._writableState.errorEmitted)z._writableState.errorEmitted=!0,RX.nextTick(gX,z,Y)}else if(I)I(Y)}),this}function u$1(){if(this._readableState)this._readable
Line truncated
% s ` ,v,v,T,q);var u=T.type==="*"?eC:T.type==="?"?sC:" \\ "+T.type;U=!0,q=q.slice(0,T.reStart)+u+" \\ ("+v}if(X(),Y)q+=" \\ \\ ";var h=!1;switch(q.charAt(0)){case"[":case".":case"(":h=!0}for(var x=Q.length-1;x>-1;x--){var B=Q[x],n=q.slice(0,B.reStart),f=q.slice(B.reStart,B.reEnd-8),g=q.slice(B.reEnd-8,B.reEnd),k=q.slice(B.reEnd);g+=k;var p=n.split("(").length-1,z0=k;for(L=0;L<p;L++)z0=z0.replace(/ \) [+*?]?/,"");k=z0;var R="";if(k===""&&I!==mX)R=" $ ";var i=n+f+k+R+g;q=i}if(q!==""&&U)q="(?=.)"+q;if(h)q=W+q;if(I===mX)return[q,U];if(!U)return I31( $ );var c=z.nocase?"i":"";try{var r=new RegExp("^"+q+" $ ",c)}catch(U0){return new RegExp(" $ .")}return r._glob= $ ,r._src=q,r}F $ .makeRe=function( $ ,I){return new g4( $ ,I||{}).makeRe()};g4.prototype.makeRe= $ 31;function $ 31(){if(this.regexp||this.regexp===!1)return this.regexp;var $ =this.set;if(! $ .length)return this.regexp=!1,this.regexp;var I=this.options,z=I.noglobstar?eC:I.dot?m71:l71,q=I.nocase?"i":"",U= $ .map(function(Y){return Y.map(function(J){return J===d3?z:typeof J==="string"?z31(J):J._src}).join(" \\ /")}).join("|");if(U="^(?:"+U+") $ ",this.negate)U="^(?!"+U+").* $ ";try{this.regexp=new RegExp(U,q)}catch(Y){this.regexp=!1}return this.regexp}F $ .match=function( $ ,I,z){z=z||{};var q=new g4(I,z);if( $ = $ .filter(function(U){return q.match(U)}),q.options.nonull&&! $ .length) $ .push(I);return $ };g4.prototype.match=function(I,z){if(typeof z>"u")z=this.partial;if(this.debug("match",I,this.pattern),this.comment)return!1;if(this.empty)return I==="";if(I==="/"&&z)return!0;var q=this.options;if(M2.sep!=="/")I=I.split(M2.sep).join("/");I=I.split(QY0),this.debug(this.pattern,"split",I);var U=this.set;this.debug(this.pattern,"set",U);var Y,J;for(J=I.length-1;J>=0;J--)if(Y=I[J],Y)break;for(J=0;J<U.length;J++){var Q=U[J],w=I;if(q.matchBase&&Q.length===1)w=[Y];var K=this.matchOne(w,Q,z);if(K){if(q.flipNegate)return!0;return!this.negate}}if(q.flipNegate)return!1;return this.negate};g4.prototype.matchOne=function( $ ,I,z){if(I.indexOf(d3)!==-1)return this._matchGlobstar( $ ,I,z,0,0);return this._matchOne( $ ,I,z,0,0)};g4.prototype._matchGlobstar=function( $ ,I,z,q,U){var Y,J=-1;for(Y=U;Y<I.length;Y++)if(I[Y]===d3){J=Y;break}var Q=-1;for(Y=I.length-1;Y>=0;Y--)if(I[Y]===d3){Q=Y;break}var w=I.slice(U,J),K=z?I.slice(J+1):I.slice(J+1,Q),H=z?[]:I.slice(Q+1);if(w.length){var G= $ .slice(q,q+w.length);if(!this._matchOne(G,w,z,0,0))return!1;q+=w.length}var W=0;if(H.length){if(H.length+q> $ .length)return!1;var Z= $ .length-H.length;if(this._matchOne( $ ,H,z,Z,0))W=H.length;else{if( $ [ $ .length-1]!==""||q+H.length=== $ .length)return!1;if(Z--,!this._matchOne( $ ,H,z,Z,0))return!1;W=H.length+1}}if(!K.length){var X=!!W;for(Y=q;Y< $ .length-W;Y++){var L=String( $ [Y]);if(X=!0,L==="."||L===".."||!this.options.dot&&L.charAt(0)===".")return!1}return z||X}var D=[[[],0]],F=D[0],T=0,P=[0];for(var M=0;M<K.length;M++){var v=K[M];if(v===d3)P.push(T),F=[[],0],D.push(F);else F[0].push(v),T++}var u=D.length-1,h= $ .length-W;for(var x=0;x<D.length;x++)D[x][1]=h-(P[u--]+D[x][0].length);return!!this._matchGlobStarBodySections( $ ,D,q,0,z,0,!!W)};g4.prototype._matchGlobStarBodySections=function( $ ,I,z,q,U,Y,J){var Q=I[q];if(!Q){for(var w=z;w< $ .length;w++){J=!0;var K= $ [w];if(K==="."||K===".."||!this.options.dot&&K.charAt(0)===".")return!1}return J}var H=Q[0],G=Q[1];while(z<=G){var W=this._matchOne( $ .slice(0,z+H.length),H,U,z,0);if(W&&Y<this.maxGlobstarRecursion){var Z=this._matchGlobStarBodySections( $ ,I,z+H.length,q+1,U,Y+1,J);if(Z!==!1)return Z}var K= $ [z];if(K==="."||K===".."||!this.options.dot&&K.charAt(0)===".")return!1;z++}return U||null};g4.prototype._matchOne=function( $ ,I,z,q,U){var Y,J,Q,w;for(Y=q,J=U,Q= $ .length,w=I.length;Y<Q&&J<w;Y++,J++){this.debug("matchOne loop");var K=I[J],H= $ [Y];if(this.debug(I,K,H),K===!1||K===d3)return!1;var G;if(typeof K==="string")G=H===K,this.debug("string match",K,H,G);else G=H.match(K),this.debug("pattern match",K,H,G);if(!G)return!1}if(Y===Q&&J===w)return!0;else if(Y===Q)return z;else if(J===w)return Y===Q-1&& $ [Y]==="";throw Error("wtf?")};function I31( $ ){return $ .replace(/ \\ (.)/g," $ 1")}function z31( $ ){return $ .replace(/[-[ \] {}()*+?., \\ ^ $ |# \s ]/g," \\ $ &")}});var tX=O((W_1,rX)=>{function HY0( $ ){return $ .charAt(0)==="/"}function GY0( $ ){var I=/^([a-zA-Z]:|[ \\ \/ ]{2}[^ \\ \/ ]+[ \\ \/ ]+[^ \\ \/ ]+)?([ \\ \/ ])?([ \s \S ]*?) $ /,z=I.exec( $ ),q=z[1]||"",U=Boolean(q&&q.charAt(1)!==":");return Boolean(z[2]||U)}rX.exports=process.platform==="win32"?GY0:HY0;rX.exports.posix=HY0;rX.exports.win32=GY0});var Ih=O((W31)=>{W31.setopts=w31;W31.ownProp=WY0;W31.makeAbs=A2;W31.finish=K31;W31.mark=H31;W31.isIgnored=ZY0;W31.childrenIgnored=G31;function WY0( $ ,I){return Object.prototype.hasOwnProperty.call( $ ,I)}var q31=t("fs"),zU=t("path"),U31=oX(),VY0=tX(), $ h=U31.Minimatch;function Y31( $ ,I){return $ .localeCompare(I,"en")}function J31( $ ,I){if( $ .ignore=I.ignore||[],!Array.isArray( $ .ignore)) $ .ignore=[ $ .ignore];if( $ .ignore.length) $ .ignore= $ .ignore.map(Q31)}function Q31( $ ){var I=null;if( $ .slice(-3)==="/**"){var z= $ .replace(/( \/ \* \* )+ $ /,"");I=new $ h(z,{dot:!0})}return{matcher
Line truncated
* /Eq0.exports=function($,I){if(typeof $!=="string")throw TypeError("expected path to be a string");if($==="\\"||$==="/ ")return" / ";var z=$.length;if(z<=1)return $;var q=" ";if(z>4&&$[3]===" \ \ "){var U=$[2];if((U===" ? "||U===" . ")&&$.slice(0,2)===" \ \ \ \ ")$=$.slice(2),q=" //"}var Y=$.split(/[/\\]+/);if(I!==!1&&Y[Y.length-1]==="")Y.pop();return q+Y.join("/")}});var OC=F((K_1,Cq0)=>{var jq0=9007199254740991,D$1="[object Arguments]",O$1="[object Function]",F$1="[object GeneratorFunction]",N$1=/^(?:0|[1-9]\d*)$/;function vq0($,I,z){switch(z.length){case 0:return $.call(I);case 1:return $.call(I,z[0]);case 2:return $.call(I,z[0],z[1]);case 3:return $.call(I,z[0],z[1],z[2])}return $.apply(I,z)}function M$1($,I){var z=-1,q=Array($);while(++z<$)q[z]=I(z);return q}var H2=Object.prototype,G2=H2.hasOwnProperty,gq0=H2.toString,A$1=H2.propertyIsEnumerable,Bq0=Math.max;function P$1($,I){var z=h$1($)||C$1($)?M$1($.length,String):[],q=z.length,U=!!q;for(var Y in $)if((I||G2.call($,Y))&&!(U&&(Y=="length"||_q0(Y,q))))z.push(Y);return z}function T$1($,I,z,q){if($===void 0||XC($,H2[z])&&!G2.call(q,z))return I;return $}function E$1($,I,z){var q=$[I];if(!(G2.call($,I)&&XC(q,z))||z===void 0&&!(I in $))$[I]=z}function B$1($){if(!DC($))return _$1($);var I=R$1($),z=[];for(var q in $)if(!(q=="constructor"&&(I||!G2.call($,q))))z.push(q);return z}function Rq0($,I){return I=Bq0(I===void 0?$.length-1:I,0),function(){var z=arguments,q=-1,U=Bq0(z.length-I,0),Y=Array(U);while(++q<U)Y[q]=z[I+q];q=-1;var J=Array(I+1);while(++q<I)J[q]=z[q];return J[I]=Y,vq0($,this,J)}}function j$1($,I,z,q){z||(z={});var U=-1,Y=I.length;while(++U<Y){var J=I[U],Q=q?q(z[J],$[J],J,z,$):void 0;E$1(z,J,Q===void 0?$[J]:Q)}return z}function v$1($){return Rq0(function(I,z){var q=-1,U=z.length,Y=U>1?z[U-1]:void 0,J=U>2?z[2]:void 0;if(Y=$.length>3&&typeof Y=="function"?(U--,Y):void 0,J&&g$1(z[0],z[1],J))Y=U<3?void 0:Y,U=1;I=Object(I);while(++q<U){var Q=z[q];if(Q)$(I,Q,q,Y)}return I})}function _q0($,I){return I=I==null?jq0:I,!!I&&(typeof $=="number"||N$1.test($))&&($>-1&&$%1==0&&$<I)}function g$1($,I,z){if(!DC(z))return!1;var q=typeof I;if(q=="number"?LC(z)&&_q0(I,z.length):q=="string"&&(I in z))return XC(z[I],$);return!1}function R$1($){var I=$&&$.constructor,z=typeof I=="function"&&I.prototype||H2;return $===z}function _$1($){var I=[];if($!=null)for(var z in Object($))I.push(z);return I}function XC($,I){return $===I||$!==$&&I!==I}function C$1($){return u$1($)&&G2.call($,"callee")&&(!A$1.call($,"callee")||gq0.call($)==D$1)}var h$1=Array.isArray;function LC($){return $!=null&&y$1($.length)&&!S$1($)}function u$1($){return x$1($)&&LC($)}function S$1($){var I=DC($)?gq0.call($):"";return I==O$1||I==F$1}function y$1($){return typeof $=="number"&&$>-1&&$%1==0&&$<=jq0}function DC($){var I=typeof $;return!!$&&(I=="object"||I=="function")}function x$1($){return!!$&&typeof $=="object"}var k$1=v$1(function($,I,z,q){j$1(I,n$1(I),$,q)}),f$1=Rq0(function($){return $.push(void 0,T$1),vq0(k$1,void 0,$)});function n$1($){return LC($)?P$1($,!0):B$1($)}Cq0.exports=f$1});var uq0=F((H_1,FC)=>{function b$1($,I){if(!($ instanceof I))throw TypeError("Cannot call a class as a function")}var hq0=E4().Buffer,W2=t("util");function i$1($,I,z){$.copy(I,z)}FC.exports=function(){function $(){b$1(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(z){var q={data:z,next:null};if(this.length>0)this.tail.next=q;else this.head=q;this.tail=q,++this.length},$.prototype.unshift=function(z){var q={data:z,next:this.head};if(this.length===0)this.tail=q;this.head=q,++this.length},$.prototype.shift=function(){if(this.length===0)return;var z=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,z},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(z){if(this.length===0)return"";var q=this.head,U=""+q.data;while(q=q.next)U+=z+q.data;return U},$.prototype.concat=function(z){if(this.length===0)return hq0.alloc(0);var q=hq0.allocUnsafe(z>>>0),U=this.head,Y=0;while(U)i$1(U.data,q,Y),Y+=U.data.length,U=U.next;return q},$}();if(W2&&W2.inspect&&W2.inspect.custom)FC.exports.prototype[W2.inspect.custom]=function(){var $=W2.inspect({length:this.length});return this.constructor.name+" "+$}});var NC=F((G_1,Sq0)=>{var CX=T4();function p$1($,I){var z=this,q=this._readableState&&this._readableState.destroyed,U=this._writableState&&this._writableState.destroyed;if(q||U){if(I)I($);else if($){if(!this._writableState)CX.nextTick(hX,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,CX.nextTick(hX,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(Y){if(!I&&Y){if(!z._writableState)CX.nextTick(hX,z,Y);else if(!z._writableState.errorEmitted)z._writableState.errorEmitted=!0,CX.nextTick(hX,z,Y)}else if(I)I(Y)}),this}function c$1(){if(this._readableState)this._readable
Line truncated
% s ` ,v,v,T,q);var y=T.type==="*"?Uh:T.type==="?"?qh:" \\ "+T.type;U=!0,q=q.slice(0,T.reStart)+y+" \\ ("+v}if(X(),Y)q+=" \\ \\ ";var h=!1;switch(q.charAt(0)){case"[":case".":case"(":h=!0}for(var x=Q.length-1;x>-1;x--){var B=Q[x],n=q.slice(0,B.reStart),f=q.slice(B.reStart,B.reEnd-8),R=q.slice(B.reEnd-8,B.reEnd),k=q.slice(B.reEnd);R+=k;var p=n.split("(").length-1,z0=k;for(L=0;L<p;L++)z0=z0.replace(/ \) [+*?]?/,"");k=z0;var g="";if(k===""&&I!==rX)g=" $ ";var i=n+f+k+g+R;q=i}if(q!==""&&U)q="(?=.)"+q;if(h)q=W+q;if(I===rX)return[q,U];if(!U)return K31( $ );var c=z.nocase?"i":"";try{var r=new RegExp("^"+q+" $ ",c)}catch(U0){return new RegExp(" $ .")}return r._glob= $ ,r._src=q,r}N $ .makeRe=function( $ ,I){return new R4( $ ,I||{}).makeRe()};R4.prototype.makeRe=w31;function w31(){if(this.regexp||this.regexp===!1)return this.regexp;var $ =this.set;if(! $ .length)return this.regexp=!1,this.regexp;var I=this.options,z=I.noglobstar?Uh:I.dot? $ 31:I31,q=I.nocase?"i":"",U= $ .map(function(Y){return Y.map(function(J){return J===l3?z:typeof J==="string"?H31(J):J._src}).join(" \\ /")}).join("|");if(U="^(?:"+U+") $ ",this.negate)U="^(?!"+U+").* $ ";try{this.regexp=new RegExp(U,q)}catch(Y){this.regexp=!1}return this.regexp}N $ .match=function( $ ,I,z){z=z||{};var q=new R4(I,z);if( $ = $ .filter(function(U){return q.match(U)}),q.options.nonull&&! $ .length) $ .push(I);return $ };R4.prototype.match=function(I,z){if(typeof z>"u")z=this.partial;if(this.debug("match",I,this.pattern),this.comment)return!1;if(this.empty)return I==="";if(I==="/"&&z)return!0;var q=this.options;if(T2.sep!=="/")I=I.split(T2.sep).join("/");I=I.split(KY0),this.debug(this.pattern,"split",I);var U=this.set;this.debug(this.pattern,"set",U);var Y,J;for(J=I.length-1;J>=0;J--)if(Y=I[J],Y)break;for(J=0;J<U.length;J++){var Q=U[J],w=I;if(q.matchBase&&Q.length===1)w=[Y];var K=this.matchOne(w,Q,z);if(K){if(q.flipNegate)return!0;return!this.negate}}if(q.flipNegate)return!1;return this.negate};R4.prototype.matchOne=function( $ ,I,z){if(I.indexOf(l3)!==-1)return this._matchGlobstar( $ ,I,z,0,0);return this._matchOne( $ ,I,z,0,0)};R4.prototype._matchGlobstar=function( $ ,I,z,q,U){var Y,J=-1;for(Y=U;Y<I.length;Y++)if(I[Y]===l3){J=Y;break}var Q=-1;for(Y=I.length-1;Y>=0;Y--)if(I[Y]===l3){Q=Y;break}var w=I.slice(U,J),K=z?I.slice(J+1):I.slice(J+1,Q),H=z?[]:I.slice(Q+1);if(w.length){var G= $ .slice(q,q+w.length);if(!this._matchOne(G,w,z,0,0))return!1;q+=w.length}var W=0;if(H.length){if(H.length+q> $ .length)return!1;var Z= $ .length-H.length;if(this._matchOne( $ ,H,z,Z,0))W=H.length;else{if( $ [ $ .length-1]!==""||q+H.length=== $ .length)return!1;if(Z--,!this._matchOne( $ ,H,z,Z,0))return!1;W=H.length+1}}if(!K.length){var X=!!W;for(Y=q;Y< $ .length-W;Y++){var L=String( $ [Y]);if(X=!0,L==="."||L===".."||!this.options.dot&&L.charAt(0)===".")return!1}return z||X}var D=[[[],0]],O=D[0],T=0,P=[0];for(var M=0;M<K.length;M++){var v=K[M];if(v===l3)P.push(T),O=[[],0],D.push(O);else O[0].push(v),T++}var y=D.length-1,h= $ .length-W;for(var x=0;x<D.length;x++)D[x][1]=h-(P[y--]+D[x][0].length);return!!this._matchGlobStarBodySections( $ ,D,q,0,z,0,!!W)};R4.prototype._matchGlobStarBodySections=function( $ ,I,z,q,U,Y,J){var Q=I[q];if(!Q){for(var w=z;w< $ .length;w++){J=!0;var K= $ [w];if(K==="."||K===".."||!this.options.dot&&K.charAt(0)===".")return!1}return J}var H=Q[0],G=Q[1];while(z<=G){var W=this._matchOne( $ .slice(0,z+H.length),H,U,z,0);if(W&&Y<this.maxGlobstarRecursion){var Z=this._matchGlobStarBodySections( $ ,I,z+H.length,q+1,U,Y+1,J);if(Z!==!1)return Z}var K= $ [z];if(K==="."||K===".."||!this.options.dot&&K.charAt(0)===".")return!1;z++}return U||null};R4.prototype._matchOne=function( $ ,I,z,q,U){var Y,J,Q,w;for(Y=q,J=U,Q= $ .length,w=I.length;Y<Q&&J<w;Y++,J++){this.debug("matchOne loop");var K=I[J],H= $ [Y];if(this.debug(I,K,H),K===!1||K===l3)return!1;var G;if(typeof K==="string")G=H===K,this.debug("string match",K,H,G);else G=H.match(K),this.debug("pattern match",K,H,G);if(!G)return!1}if(Y===Q&&J===w)return!0;else if(Y===Q)return z;else if(J===w)return Y===Q-1&& $ [Y]==="";throw Error("wtf?")};function K31( $ ){return $ .replace(/ \\ (.)/g," $ 1")}function H31( $ ){return $ .replace(/[-[ \] {}()*+?., \\ ^ $ |# \s ]/g," \\ $ &")}});var eX=F((R_1,sX)=>{function WY0( $ ){return $ .charAt(0)==="/"}function VY0( $ ){var I=/^([a-zA-Z]:|[ \\ \/ ]{2}[^ \\ \/ ]+[ \\ \/ ]+[^ \\ \/ ]+)?([ \\ \/ ])?([ \s \S ]*?) $ /,z=I.exec( $ ),q=z[1]||"",U=Boolean(q&&q.charAt(1)!==":");return Boolean(z[2]||U)}sX.exports=process.platform==="win32"?VY0:WY0;sX.exports.posix=WY0;sX.exports.win32=VY0});var Jh=F((N31)=>{N31.setopts=L31;N31.ownProp=ZY0;N31.makeAbs=E2;N31.finish=D31;N31.mark=O31;N31.isIgnored=LY0;N31.childrenIgnored=F31;function ZY0( $ ,I){return Object.prototype.hasOwnProperty.call( $ ,I)}var G31=t("fs"),UU=t("path"),W31=aX(),XY0=eX(),Yh=W31.Minimatch;function V31( $ ,I){return $ .localeCompare(I,"en")}function Z31( $ ,I){if( $ .ignore=I.ignore||[],!Array.isArray( $ .ignore)) $ .ignore=[ $ .ignore];if( $ .ignore.length) $ .ignore= $ .ignore.map(X31)}function X31( $ ){var I=null;if( $ .slice(-3)==="/**"){var z= $ .replace(/( \/ \* \* )+ $ /,"");I=new Yh(z,{dot:!0})}return{matcher
Line truncated
See : https : //github.com/isaacs/node-glob/issues/167`);return new x4($,I).found}function x4($,I){if(!$)throw Error("must provide pattern");if(typeof I==="function"||arguments.length===3)throw TypeError(`callback provided to sync glob
See : https : //github.com/isaacs/node-glob/issues/167`);if(!(this instanceof x4))return new x4($,I);if(M31(this,$,I),this.noprocess)return this;var z=this.minimatch.set.length;this.matches=Array(z);for(var q=0;q<z;q++)this._process(this.minimatch.set[q],q,!1);this._finish()}x4.prototype._finish=function(){if(LY0.ok(this instanceof x4),this.realpath){var $=this;this.matches.forEach(function(I,z){var q=$.matches[z]=Object.create(null);for(var U in I)try{U=$._makeAbs(U);var Y=N31.realpathSync(U,$.realpathCache);q[Y]=!0}catch(J){if(J.syscall==="stat")q[$._makeAbs(U)]=!0;else throw J}})}m3.finish(this)};x4.prototype._process=function($,I,z){LY0.ok(this instanceof x4);var q=0;while(typeof $[q]==="string")q++;var U;switch(q){case $.length:this._processSimple($.join("/"),I);return;case 0:U=null;break;default:U=$.slice(0,q).join("/");break}var Y=$.slice(q),J;if(U===null)J=".";else if(aX(U)||aX($.map(function(K){return typeof K==="string"?K:"[*]"}).join("/"))){if(!U||!aX(U))U="/"+U;J=U}else J=U;var Q=this._makeAbs(J);if(A31(this,J))return;var w=Y[0]===XY0.GLOBSTAR;if(w)this._processGlobStar(U,J,Q,Y,I,z);else this._processReaddir(U,J,Q,Y,I,z)};x4.prototype._processReaddir=function($,I,z,q,U,Y){var J=this._readdir(z,Y);if(!J)return;var Q=q[0],w=!!this.minimatch.negate,K=Q._glob,H=this.dot||K.charAt(0)===".",G=[];for(var W=0;W<J.length;W++){var Z=J[W];if(Z.charAt(0)!=="."||H){var X;if(w&&!$)X=!Z.match(Q);else X=Z.match(Q);if(X)G.push(Z)}}var L=G.length;if(L===0)return;if(q.length===1&&!this.mark&&!this.stat){if(!this.matches[U])this.matches[U]=Object.create(null);for(var W=0;W<L;W++){var Z=G[W];if($)if($.slice(-1)!=="/")Z=$+"/"+Z;else Z=$+Z;if(Z.charAt(0)==="/"&&!this.nomount)Z=zh.join(this.root,Z);this._emitMatch(U,Z)}return}q.shift();for(var W=0;W<L;W++){var Z=G[W],D;if($)D=[$,Z];else D=[Z];this._process(D.concat(q),U,Y)}};x4.prototype._emitMatch=function($,I){if(P31(this,I))return;var z=this._makeAbs(I);if(this.mark)I=this._mark(I);if(this.absolute)I=z;if(this.matches[$][I])return;if(this.nodir){var q=this.cache[z];if(q==="DIR"||Array.isArray(q))return}if(this.matches[$][I]=!0,this.stat)this._stat(I)};x4.prototype._readdirInGlobStar=function($){if(this.follow)return this._readdir($,!1);var I,z,q;try{z=this.fs.lstatSync($)}catch(Y){if(Y.code==="ENOENT")return null}var U=z&&z.isSymbolicLink();if(this.symlinks[$]=U,!U&&z&&!z.isDirectory())this.cache[$]="FILE";else I=this._readdir($,!1);return I};x4.prototype._readdir=function($,I){var z;if(I&&!qh(this.symlinks,$))return this._readdirInGlobStar($);if(qh(this.cache,$)){var q=this.cache[$];if(!q||q==="FILE")return null;if(Array.isArray(q))return q}try{return this._readdirEntries($,this.fs.readdirSync($))}catch(U){return this._readdirError($,U),null}};x4.prototype._readdirEntries=function($,I){if(!this.mark&&!this.stat)for(var z=0;z<I.length;z++){var q=I[z];if($==="/")q=$+q;else q=$+"/"+q;this.cache[q]=!0}return this.cache[$]=I,I};x4.prototype._readdirError=function($,I){switch(I.code){case"ENOTSUP":case"ENOTDIR":var z=this._makeAbs($);if(this.cache[z]="FILE",z===this.cwdAbs){var q=Error(I.code+" invalid cwd "+this.cwd);throw q.path=this.cwd,q.code=I.code,q}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs($)]=!1;break;default:if(this.cache[this._makeAbs($)]=!1,this.strict)throw I;if(!this.silent)console.error("glob error",I);break}};x4.prototype._processGlobStar=function($,I,z,q,U,Y){var J=this._readdir(z,Y);if(!J)return;var Q=q.slice(1),w=$?[$]:[],K=w.concat(Q);this._process(K,U,!1);var H=J.length,G=this.symlinks[z];if(G&&Y)return;for(var W=0;W<H;W++){var Z=J[W];if(Z.charAt(0)==="."&&!this.dot)continue;var X=w.concat(J[W],Q);this._process(X,U,!0);var L=w.concat(J[W],q);this._process(L,U,!0)}};x4.prototype._processSimple=function($,I){var z=this._stat($);if(!this.matches[I])this.matches[I]=Object.create(null);if(!z)return;if($&&aX($)&&!this.nomount){var q=/[\/\\]$/.test($);if($.charAt(0)==="/")$=zh.join(this.root,$);else if($=zh.resolve(this.root,$),q)$+="/"}if(process.platform==="win32")$=$.replace(/\\/g,"/");this._emitMatch(I,$)};x4.prototype._stat=function($){var I=this._makeAbs($),z=$.slice(-1)==="/";if($.length>this.maxLength)return!1;if(!this.stat&&qh(this.cache,I)){var J=this.cache[I];if(Array.isArray(J))J="DIR";if(!z||J==="DIR")return J;if(z&&J==="FILE")return!1}var q,U=this.statCache[I];if(!U){var Y;try{Y=this.fs.lstatSync(I)}catch(Q){if(Q&&(Q.code==="ENOENT"||Q.code==="ENOTDIR"))return this.statCache[I]=!1,!1}if(Y&&Y.isSymbolicLink())try{U=this.fs.statSync(I)}catch(Q){U=Y}else U=Y}this.statCache[I]=U;var J=!0;if(U)J=U.isDirectory()?"DIR":"FILE";if(this.cache[I]=this.cache[I]||J,z&&J==="FILE")return!1;return J};x4.prototype._mark=function($){return m3.mark(this,$)};x4.prototype._makeAbs=function($){return m3.makeAbs(this,$)}});var Uh=O((F_1,MY0)=>{MY0.exports=NY0;function NY0($,I){if($&&I)return NY0($)(I);if(typeof $!=="function")throw TypeError("need wrapper function");return Object.keys($).forEach(function(q){z[q]=$[q]}),z;f
Line truncated
` );if( $ .linkname)I+=u h(" linkpath="+ $ .linkname+ `
` );var z= $ .pax;if(z)for(var q in z)I+=u h(" "+q+"="+z[q]+ `
` );return Buffer.from(I)};fI1.decodePax=function( $ ){var I={};while( $ .length){var z=0;while(z< $ .length&& $ [z]!==32)z++;var q=parseInt( $ .slice(0,z).toString(),10);if(!q)return I;var U= $ .slice(z+1,q-1).toString(),Y=U.indexOf("=");if(Y===-1)return I;I[U.slice(0,Y)]=U.slice(Y+1), $ = $ .slice(q)}return I};fI1.encode=function( $ ){var I=vI1(512),z= $ .name,q="";if( $ .typeflag===5&&z[z.length-1]!=="/")z+="/";if(Buffer.byteLength(z)!==z.length)return null;while(Buffer.byteLength(z)>100){var U=z.indexOf("/");if(U===-1)return null;q+=q?"/"+z.slice(0,U):z.slice(0,U),z=z.slice(U+1)}if(Buffer.byteLength(z)>100||Buffer.byteLength(q)>155)return null;if( $ .linkname&&Buffer.byteLength( $ .linkname)>100)return null;if(I.write(z),I.write(V7( $ .mode&SI1,6),100),I.write(V7( $ .uid,6),108),I.write(V7( $ .gid,6),116),I.write(V7( $ .size,11),124),I.write(V7( $ .mtime.getTime()/1000|0,11),136),I[156]=fJ0+xI1( $ .type), $ .linkname)I.write( $ .linkname,157);if(nJ0.copy(I,v2),_I1.copy(I,xh), $ .uname)I.write( $ .uname,265);if( $ .gname)I.write( $ .gname,297);if(I.write(V7( $ .devmajor||0,6),329),I.write(V7( $ .devminor||0,6),337),q)I.write(q,345);return I.write(V7(iJ0(I),6),148),I};fI1.decode=function( $ ,I,z){var q= $ [156]===0?0: $ [156]-fJ0,U=JU( $ ,0,100,I),Y=Z7( $ ,100,8),J=Z7( $ ,108,8),Q=Z7( $ ,116,8),w=Z7( $ ,124,12),K=Z7( $ ,136,12),H=uI1(q),G= $ [157]===0?null:JU( $ ,157,100,I),W=JU( $ ,265,32),Z=JU( $ ,297,32),X=Z7( $ ,329,8),L=Z7( $ ,337,8),D=iJ0( $ );if(D===256)return null;if(D!==Z7( $ ,148,8))throw Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(nJ0.compare( $ ,v2,v2+6)===0){if( $ [345])U=JU( $ ,345,155,I)+"/"+U}else if(CI1.compare( $ ,v2,v2+6)===0&&hI1.compare( $ ,xh,xh+2)===0);else if(!z)throw Error("Invalid tar header: unknown format.");if(q===0&&U&&U[U.length-1]==="/")q=5;return{name:U,mode:Y,uid:J,gid:Q,size:w,mtime:new Date(1000*K),type:H,linkname:G,uname:W,gname:Z,devmajor:X,devminor:L}}});var rJ0=O((e_1,oJ0)=>{var cJ0=t("util"),dI1=kJ0(),R2=kh(),dJ0=F6().Writable,mJ0=F6().PassThrough,lJ0=function(){},pJ0=function( $ ){return $ &=511, $ &&512- $ },mI1=function( $ ,I){var z=new UL( $ ,I);return z.end(),z},lI1=function( $ ,I){if(I.path) $ .name=I.path;if(I.linkpath) $ .linkname=I.linkpath;if(I.size) $ .size=parseInt(I.size,10);return $ .pax=I, $ },UL=function( $ ,I){this._parent= $ ,this.offset=I,mJ0.call(this,{autoDestroy:!1})};cJ0.inherits(UL,mJ0);UL.prototype.destroy=function( $ ){this._parent.destroy( $ )};var n5=function( $ ){if(!(this instanceof n5))return new n5( $ );dJ0.call(this, $ ), $ = $ ||{},this._offset=0,this._buffer=dI1(),this._missing=0,this._partial=!1,this._onparse=lJ0,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var I=this,z=I._buffer,q=function(){I._continue()},U=function(W){if(I._locked=!1,W)return I.destroy(W);if(!I._stream)q()},Y=function(){I._stream=null;var W=pJ0(I._header.size);if(W)I._parse(W,J);else I._parse(512,G);if(!I._locked)q()},J=function(){I._buffer.consume(pJ0(I._header.size)),I._parse(512,G),q()},Q=function(){var W=I._header.size;I._paxGlobal=R2.decodePax(z.slice(0,W)),z.consume(W),Y()},w=function(){var W=I._header.size;if(I._pax=R2.decodePax(z.slice(0,W)),I._paxGlobal)I._pax=Object.assign({},I._paxGlobal,I._pax);z.consume(W),Y()},K=function(){var W=I._header.size;this._gnuLongPath=R2.decodeLongPath(z.slice(0,W), $ .filenameEncoding),z.consume(W),Y()},H=function(){var W=I._header.size;this._gnuLongLinkPath=R2.decodeLongPath(z.slice(0,W), $ .filenameEncoding),z.consume(W),Y()},G=function(){var W=I._offset,Z;try{Z=I._header=R2.decode(z.slice(0,512), $ .filenameEncoding, $ .allowUnknownFormat)}catch(X){I.emit("error",X)}if(z.consume(512),!Z){I._parse(512,G),q();return}if(Z.type==="gnu-long-path"){I._parse(Z.size,K),q();return}if(Z.type==="gnu-long-link-path"){I._parse(Z.size,H),q();return}if(Z.type==="pax-global-header"){I._parse(Z.size,Q),q();return}if(Z.type==="pax-header"){I._parse(Z.size,w),q();return}if(I._gnuLongPath)Z.name=I._gnuLongPath,I._gnuLongPath=null;if(I._gnuLongLinkPath)Z.linkname=I._gnuLongLinkPath,I._gnuLongLinkPath=null;if(I._pax)I._header=Z=lI1(Z,I._pax),I._pax=null;if(I._locked=!0,!Z.size||Z.type==="directory"){I._parse(512,G),I.emit("entry",Z,mI1(I,W),U);return}I._stream=new UL(I,W),I.emit("entry",Z,I._stream,U),I._parse(Z.size,Y),q()};this._onheader=G,this._parse(512,G)};cJ0.inherits(n5,dJ0);n5.prototype.destroy=function( $ ){if(this._destroyed)return;if(this._destroyed=!0, $ )this.emit("error", $ );if(this.emit("close"),this._stream)this._stream.emit("close")};n5.prototype._parse=function( $ ,I){if(this._destroyed)return;if(this._offset+= $ ,this._missing= $ ,I===this._onheader)this._partial=!1;this._onparse=I};n5.prototype._continue=function(){if(this._destroyed)return;var $ =this._cb;if(this._cb=lJ0,this._overflow)this._write(this._overflow,void 0, $ );else $ ()};n5.prototype._write=function( $ ,I,z){if(this._destroyed)return;var q=this._stream,U=this._buffer,Y=this._missing;if( $ .length)this._partial=!0;if( $ .length<Y){
Line truncated
< Relationships xmlns = "http://schemas.openxmlformats.org/package/2006/relationships" > ` )}_writeRelationship( $ ){if(!this.count)this._writeOpen();let I= ` rId$ { ++ this . count } ` ;if( $ .TargetMode)this.stream.write( ` < Relationship Id = "${I}" Type = "${$.Type}" Target = "${Wz1.xmlEncode($.Target)}" TargetMode = "${$.TargetMode}" / > ` );else this.stream.write( ` < Relationship Id = "${I}" Type = "${$.Type}" Target = "${$.Target}" / > ` );return I}_writeClose(){this.stream.write("</Relationships>")}}MQ0.exports=NQ0});var jQ0=O((KC1,BQ0)=>{var PQ0=q6(),TQ0=t9(),Zz1=G4(),Xz1=Dg(),Lz1=Og();class EQ0{constructor( $ ,I,z){this.id=z.id,this.count=0,this._worksheet= $ ,this._workbook=z.workbook,this._sheetRelsWriter=I}get commentsStream(){if(!this._commentsStream)this._commentsStream=this._workbook._openStream( ` / xl / comments$ { this . id } . xml ` );return this._commentsStream}get vmlStream(){if(!this._vmlStream)this._vmlStream=this._workbook._openStream( ` xl / drawings / vmlDrawing$ { this . id } . vml ` );return this._vmlStream}_addRelationships(){let $ ={Type:TQ0.Comments,Target: ` . . / comments$ { this . id } . xml ` };this._sheetRelsWriter.addRelationship( $ );let I={Type:TQ0.VmlDrawing,Target: ` . . / drawings / vmlDrawing$ { this . id } . vml ` };this.vmlRelId=this._sheetRelsWriter.addRelationship(I)}_addCommentRefs(){this._workbook.commentRefs.push({commentName: ` comments$ { this . id } ` ,vmlDrawing: ` vmlDrawing$ { this . id } ` })}_writeOpen(){this.commentsStream.write('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><comments xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><authors><author>Author</author></authors><commentList>'),this.vmlStream.write('<?xml version="1.0" encoding="UTF-8"?><xml xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:x="urn:schemas-microsoft-com:office:excel"><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1" /></o:shapelayout><v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe"><v:stroke joinstyle="miter" /><v:path gradientshapeok="t" o:connecttype="rect" /></v:shapetype>')}_writeComment( $ ,I){let z=new Xz1,q=new PQ0;z.render(q, $ ),this.commentsStream.write(q.xml);let U=new Lz1,Y=new PQ0;U.render(Y, $ ,I),this.vmlStream.write(Y.xml)}_writeClose(){this.commentsStream.write("</commentList></comments>"),this.vmlStream.write("</xml>")}addComments( $ ){if( $ && $ .length){if(!this.startedData)this._worksheet.comments=[],this._writeOpen(),this._addRelationships(),this._addCommentRefs(),this.startedData=!0; $ .forEach((I)=>{I.refAddress=Zz1.decodeAddress(I.ref)}), $ .forEach((I)=>{this._writeComment(I,this.count),this.count+=1})}}commit(){if(this.count)this._writeClose(),this.commentsStream.end(),this.vmlStream.end()}}BQ0.exports=EQ0});var hQ0=O((HC1,CQ0)=>{var Dz1=F4(),Fz1=t9(),bh=G4(),vQ0=yB(),RQ0=F5(),Oz1=tv(),gQ0=AW(),ih=TW(),Nz1=AQ0(),Mz1=jQ0(),Az1=hB(),c4=new Oz1,ph=l9(),Pz1=dR(),Tz1=mR(),Ez1=lR(),Bz1=bR(),jz1=fR(),vz1=iR(),Rz1=oR(),gz1=rR(),_z1=tR(),Cz1=aR(),hz1=sR(),Sz1=eR(),yz1=Ug(),uz1=Ig(),xz1= $ g(),d4={dataValidations:new Pz1,sheetProperties:new Tz1,sheetFormatProperties:new Ez1,columns:new ph({tag:"cols",length:!1,childXform:new Bz1}),row:new jz1,hyperlinks:new ph({tag:"hyperlinks",length:!1,childXform:new vz1}),sheetViews:new ph({tag:"sheetViews",length:!1,childXform:new Rz1}),sheetProtection:new gz1,pageMargins:new _z1,pageSeteup:new Cz1,autoFilter:new hz1,picture:new Sz1,conditionalFormattings:new yz1,headerFooter:new uz1,rowBreaks:new xz1};class _Q0{constructor( $ ){this.id= $ .id,this.name= $ .name|| ` Sheet$ { this . id } ` ,this.state= $ .state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges=[],this._merges.add=function(){},this._sheetRelsWriter=new Nz1( $ ),this._sheetCommentsWriter=new Mz1(this,this._sheetRelsWriter, $ ),this._dimensions=new RQ0,this._rowZero=1,this.committed=!1,this.dataValidations=new Az1,this._formulae={},this._siFormulae=0,this.conditionalFormatting=[],this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0}, $ .properties),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null}, $ .headerFooter),this.pageSetup=Object.assign({},{margins:{left:0.7,right:0.7,top:0.75,bottom:0.75,header:0.3,footer:0.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!!( $ .pageSetup&&( $ .pageSetup.fitToWidth|| $ .pageSetup.fitToHeight)&&! $ .pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null}, $ .pageSetup),this.useSharedStrings= $ .useSharedStrings||!1,this._workbook= $ .workbook,this.hasComments=!1,this._views= $ .views||[],this.autoFilter= $ .autoFilter||null,this._media=[],this.sheetProtection=null,this._writeOpenWorksheet(),this.startedData=!1}get
Line truncated
See : https : //github.com/isaacs/node-glob/issues/167`);if(!(this instanceof x4))return new x4($,I);if(g31(this,$,I),this.noprocess)return this;var z=this.minimatch.set.length;this.matches=Array(z);for(var q=0;q<z;q++)this._process(this.minimatch.set[q],q,!1);this._finish()}x4.prototype._finish=function(){if(OY0.ok(this instanceof x4),this.realpath){var $=this;this.matches.forEach(function(I,z){var q=$.matches[z]=Object.create(null);for(var U in I)try{U=$._makeAbs(U);var Y=v31.realpathSync(U,$.realpathCache);q[Y]=!0}catch(J){if(J.syscall==="stat")q[$._makeAbs(U)]=!0;else throw J}})}o3.finish(this)};x4.prototype._process=function($,I,z){OY0.ok(this instanceof x4);var q=0;while(typeof $[q]==="string")q++;var U;switch(q){case $.length:this._processSimple($.join("/"),I);return;case 0:U=null;break;default:U=$.slice(0,q).join("/");break}var Y=$.slice(q),J;if(U===null)J=".";else if($L(U)||$L($.map(function(K){return typeof K==="string"?K:"[*]"}).join("/"))){if(!U||!$L(U))U="/"+U;J=U}else J=U;var Q=this._makeAbs(J);if(R31(this,J))return;var w=Y[0]===DY0.GLOBSTAR;if(w)this._processGlobStar(U,J,Q,Y,I,z);else this._processReaddir(U,J,Q,Y,I,z)};x4.prototype._processReaddir=function($,I,z,q,U,Y){var J=this._readdir(z,Y);if(!J)return;var Q=q[0],w=!!this.minimatch.negate,K=Q._glob,H=this.dot||K.charAt(0)===".",G=[];for(var W=0;W<J.length;W++){var Z=J[W];if(Z.charAt(0)!=="."||H){var X;if(w&&!$)X=!Z.match(Q);else X=Z.match(Q);if(X)G.push(Z)}}var L=G.length;if(L===0)return;if(q.length===1&&!this.mark&&!this.stat){if(!this.matches[U])this.matches[U]=Object.create(null);for(var W=0;W<L;W++){var Z=G[W];if($)if($.slice(-1)!=="/")Z=$+"/"+Z;else Z=$+Z;if(Z.charAt(0)==="/"&&!this.nomount)Z=Qh.join(this.root,Z);this._emitMatch(U,Z)}return}q.shift();for(var W=0;W<L;W++){var Z=G[W],D;if($)D=[$,Z];else D=[Z];this._process(D.concat(q),U,Y)}};x4.prototype._emitMatch=function($,I){if(_31(this,I))return;var z=this._makeAbs(I);if(this.mark)I=this._mark(I);if(this.absolute)I=z;if(this.matches[$][I])return;if(this.nodir){var q=this.cache[z];if(q==="DIR"||Array.isArray(q))return}if(this.matches[$][I]=!0,this.stat)this._stat(I)};x4.prototype._readdirInGlobStar=function($){if(this.follow)return this._readdir($,!1);var I,z,q;try{z=this.fs.lstatSync($)}catch(Y){if(Y.code==="ENOENT")return null}var U=z&&z.isSymbolicLink();if(this.symlinks[$]=U,!U&&z&&!z.isDirectory())this.cache[$]="FILE";else I=this._readdir($,!1);return I};x4.prototype._readdir=function($,I){var z;if(I&&!wh(this.symlinks,$))return this._readdirInGlobStar($);if(wh(this.cache,$)){var q=this.cache[$];if(!q||q==="FILE")return null;if(Array.isArray(q))return q}try{return this._readdirEntries($,this.fs.readdirSync($))}catch(U){return this._readdirError($,U),null}};x4.prototype._readdirEntries=function($,I){if(!this.mark&&!this.stat)for(var z=0;z<I.length;z++){var q=I[z];if($==="/")q=$+q;else q=$+"/"+q;this.cache[q]=!0}return this.cache[$]=I,I};x4.prototype._readdirError=function($,I){switch(I.code){case"ENOTSUP":case"ENOTDIR":var z=this._makeAbs($);if(this.cache[z]="FILE",z===this.cwdAbs){var q=Error(I.code+" invalid cwd "+this.cwd);throw q.path=this.cwd,q.code=I.code,q}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs($)]=!1;break;default:if(this.cache[this._makeAbs($)]=!1,this.strict)throw I;if(!this.silent)console.error("glob error",I);break}};x4.prototype._processGlobStar=function($,I,z,q,U,Y){var J=this._readdir(z,Y);if(!J)return;var Q=q.slice(1),w=$?[$]:[],K=w.concat(Q);this._process(K,U,!1);var H=J.length,G=this.symlinks[z];if(G&&Y)return;for(var W=0;W<H;W++){var Z=J[W];if(Z.charAt(0)==="."&&!this.dot)continue;var X=w.concat(J[W],Q);this._process(X,U,!0);var L=w.concat(J[W],q);this._process(L,U,!0)}};x4.prototype._processSimple=function($,I){var z=this._stat($);if(!this.matches[I])this.matches[I]=Object.create(null);if(!z)return;if($&&$L($)&&!this.nomount){var q=/[\/\\]$/.test($);if($.charAt(0)==="/")$=Qh.join(this.root,$);else if($=Qh.resolve(this.root,$),q)$+="/"}if(process.platform==="win32")$=$.replace(/\\/g,"/");this._emitMatch(I,$)};x4.prototype._stat=function($){var I=this._makeAbs($),z=$.slice(-1)==="/";if($.length>this.maxLength)return!1;if(!this.stat&&wh(this.cache,I)){var J=this.cache[I];if(Array.isArray(J))J="DIR";if(!z||J==="DIR")return J;if(z&&J==="FILE")return!1}var q,U=this.statCache[I];if(!U){var Y;try{Y=this.fs.lstatSync(I)}catch(Q){if(Q&&(Q.code==="ENOENT"||Q.code==="ENOTDIR"))return this.statCache[I]=!1,!1}if(Y&&Y.isSymbolicLink())try{U=this.fs.statSync(I)}catch(Q){U=Y}else U=Y}this.statCache[I]=U;var J=!0;if(U)J=U.isDirectory()?"DIR":"FILE";if(this.cache[I]=this.cache[I]||J,z&&J==="FILE")return!1;return J};x4.prototype._mark=function($){return o3.mark(this,$)};x4.prototype._makeAbs=function($){return o3.makeAbs(this,$)}});var Kh=F((y_1,PY0)=>{PY0.exports=AY0;function AY0($,I){if($&&I)return AY0($)(I);if(typeof $!=="function")throw TypeError("need wrapper function");return Object.keys($).forEach(function(q){z[q]=$[q]}),z;f
Line truncated
` );if( $ .linkname)I+=b h(" linkpath="+ $ .linkname+ `
` );var z= $ .pax;if(z)for(var q in z)I+=b h(" "+q+"="+z[q]+ `
` );return Buffer.from(I)};lI1.decodePax=function( $ ){var I={};while( $ .length){var z=0;while(z< $ .length&& $ [z]!==32)z++;var q=parseInt( $ .slice(0,z).toString(),10);if(!q)return I;var U= $ .slice(z+1,q-1).toString(),Y=U.indexOf("=");if(Y===-1)return I;I[U.slice(0,Y)]=U.slice(Y+1), $ = $ .slice(q)}return I};lI1.encode=function( $ ){var I=yI1(512),z= $ .name,q="";if( $ .typeflag===5&&z[z.length-1]!=="/")z+="/";if(Buffer.byteLength(z)!==z.length)return null;while(Buffer.byteLength(z)>100){var U=z.indexOf("/");if(U===-1)return null;q+=q?"/"+z.slice(0,U):z.slice(0,U),z=z.slice(U+1)}if(Buffer.byteLength(z)>100||Buffer.byteLength(q)>155)return null;if( $ .linkname&&Buffer.byteLength( $ .linkname)>100)return null;if(I.write(z),I.write(L7( $ .mode&iI1,6),100),I.write(L7( $ .uid,6),108),I.write(L7( $ .gid,6),116),I.write(L7( $ .size,11),124),I.write(L7( $ .mtime.getTime()/1000|0,11),136),I[156]=bJ0+dI1( $ .type), $ .linkname)I.write( $ .linkname,157);if(iJ0.copy(I,_2),fI1.copy(I,ih), $ .uname)I.write( $ .uname,265);if( $ .gname)I.write( $ .gname,297);if(I.write(L7( $ .devmajor||0,6),329),I.write(L7( $ .devminor||0,6),337),q)I.write(q,345);return I.write(L7(cJ0(I),6),148),I};lI1.decode=function( $ ,I,z){var q= $ [156]===0?0: $ [156]-bJ0,U=wU( $ ,0,100,I),Y=D7( $ ,100,8),J=D7( $ ,108,8),Q=D7( $ ,116,8),w=D7( $ ,124,12),K=D7( $ ,136,12),H=cI1(q),G= $ [157]===0?null:wU( $ ,157,100,I),W=wU( $ ,265,32),Z=wU( $ ,297,32),X=D7( $ ,329,8),L=D7( $ ,337,8),D=cJ0( $ );if(D===256)return null;if(D!==D7( $ ,148,8))throw Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(iJ0.compare( $ ,_2,_2+6)===0){if( $ [345])U=wU( $ ,345,155,I)+"/"+U}else if(nI1.compare( $ ,_2,_2+6)===0&&bI1.compare( $ ,ih,ih+2)===0);else if(!z)throw Error("Invalid tar header: unknown format.");if(q===0&&U&&U[U.length-1]==="/")q=5;return{name:U,mode:Y,uid:J,gid:Q,size:w,mtime:new Date(1000*K),type:H,linkname:G,uname:W,gname:Z,devmajor:X,devminor:L}}});var aJ0=F((DC1,tJ0)=>{var mJ0=t("util"),eI1=nJ0(),C2=ph(),lJ0=O6().Writable,oJ0=O6().PassThrough,rJ0=function(){},dJ0=function( $ ){return $ &=511, $ &&512- $ }, $ z1=function( $ ,I){var z=new QL( $ ,I);return z.end(),z},Iz1=function( $ ,I){if(I.path) $ .name=I.path;if(I.linkpath) $ .linkname=I.linkpath;if(I.size) $ .size=parseInt(I.size,10);return $ .pax=I, $ },QL=function( $ ,I){this._parent= $ ,this.offset=I,oJ0.call(this,{autoDestroy:!1})};mJ0.inherits(QL,oJ0);QL.prototype.destroy=function( $ ){this._parent.destroy( $ )};var p5=function( $ ){if(!(this instanceof p5))return new p5( $ );lJ0.call(this, $ ), $ = $ ||{},this._offset=0,this._buffer=eI1(),this._missing=0,this._partial=!1,this._onparse=rJ0,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var I=this,z=I._buffer,q=function(){I._continue()},U=function(W){if(I._locked=!1,W)return I.destroy(W);if(!I._stream)q()},Y=function(){I._stream=null;var W=dJ0(I._header.size);if(W)I._parse(W,J);else I._parse(512,G);if(!I._locked)q()},J=function(){I._buffer.consume(dJ0(I._header.size)),I._parse(512,G),q()},Q=function(){var W=I._header.size;I._paxGlobal=C2.decodePax(z.slice(0,W)),z.consume(W),Y()},w=function(){var W=I._header.size;if(I._pax=C2.decodePax(z.slice(0,W)),I._paxGlobal)I._pax=Object.assign({},I._paxGlobal,I._pax);z.consume(W),Y()},K=function(){var W=I._header.size;this._gnuLongPath=C2.decodeLongPath(z.slice(0,W), $ .filenameEncoding),z.consume(W),Y()},H=function(){var W=I._header.size;this._gnuLongLinkPath=C2.decodeLongPath(z.slice(0,W), $ .filenameEncoding),z.consume(W),Y()},G=function(){var W=I._offset,Z;try{Z=I._header=C2.decode(z.slice(0,512), $ .filenameEncoding, $ .allowUnknownFormat)}catch(X){I.emit("error",X)}if(z.consume(512),!Z){I._parse(512,G),q();return}if(Z.type==="gnu-long-path"){I._parse(Z.size,K),q();return}if(Z.type==="gnu-long-link-path"){I._parse(Z.size,H),q();return}if(Z.type==="pax-global-header"){I._parse(Z.size,Q),q();return}if(Z.type==="pax-header"){I._parse(Z.size,w),q();return}if(I._gnuLongPath)Z.name=I._gnuLongPath,I._gnuLongPath=null;if(I._gnuLongLinkPath)Z.linkname=I._gnuLongLinkPath,I._gnuLongLinkPath=null;if(I._pax)I._header=Z=Iz1(Z,I._pax),I._pax=null;if(I._locked=!0,!Z.size||Z.type==="directory"){I._parse(512,G),I.emit("entry",Z, $ z1(I,W),U);return}I._stream=new QL(I,W),I.emit("entry",Z,I._stream,U),I._parse(Z.size,Y),q()};this._onheader=G,this._parse(512,G)};mJ0.inherits(p5,lJ0);p5.prototype.destroy=function( $ ){if(this._destroyed)return;if(this._destroyed=!0, $ )this.emit("error", $ );if(this.emit("close"),this._stream)this._stream.emit("close")};p5.prototype._parse=function( $ ,I){if(this._destroyed)return;if(this._offset+= $ ,this._missing= $ ,I===this._onheader)this._partial=!1;this._onparse=I};p5.prototype._continue=function(){if(this._destroyed)return;var $ =this._cb;if(this._cb=rJ0,this._overflow)this._write(this._overflow,void 0, $ );else $ ()};p5.prototype._write=function( $ ,I,z){if(this._destroyed)return;var q=this._stream,U=this._buffer,Y=this._missing;if( $ .length)this._partial=!0;if( $ .length<Y){
Line truncated
< Relationships xmlns = "http://schemas.openxmlformats.org/package/2006/relationships" > ` )}_writeRelationship( $ ){if(!this.count)this._writeOpen();let I= ` rId$ { ++ this . count } ` ;if( $ .TargetMode)this.stream.write( ` < Relationship Id = "${I}" Type = "${$.Type}" Target = "${Nz1.xmlEncode($.Target)}" TargetMode = "${$.TargetMode}" / > ` );else this.stream.write( ` < Relationship Id = "${I}" Type = "${$.Type}" Target = "${$.Target}" / > ` );return I}_writeClose(){this.stream.write("</Relationships>")}}PQ0.exports=AQ0});var gQ0=F((jC1,vQ0)=>{var EQ0=q6(),BQ0=e9(),Az1=G4(),Pz1=AR(),Tz1=TR();class jQ0{constructor( $ ,I,z){this.id=z.id,this.count=0,this._worksheet= $ ,this._workbook=z.workbook,this._sheetRelsWriter=I}get commentsStream(){if(!this._commentsStream)this._commentsStream=this._workbook._openStream( ` / xl / comments$ { this . id } . xml ` );return this._commentsStream}get vmlStream(){if(!this._vmlStream)this._vmlStream=this._workbook._openStream( ` xl / drawings / vmlDrawing$ { this . id } . vml ` );return this._vmlStream}_addRelationships(){let $ ={Type:BQ0.Comments,Target: ` . . / comments$ { this . id } . xml ` };this._sheetRelsWriter.addRelationship( $ );let I={Type:BQ0.VmlDrawing,Target: ` . . / drawings / vmlDrawing$ { this . id } . vml ` };this.vmlRelId=this._sheetRelsWriter.addRelationship(I)}_addCommentRefs(){this._workbook.commentRefs.push({commentName: ` comments$ { this . id } ` ,vmlDrawing: ` vmlDrawing$ { this . id } ` })}_writeOpen(){this.commentsStream.write('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><comments xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><authors><author>Author</author></authors><commentList>'),this.vmlStream.write('<?xml version="1.0" encoding="UTF-8"?><xml xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:x="urn:schemas-microsoft-com:office:excel"><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1" /></o:shapelayout><v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe"><v:stroke joinstyle="miter" /><v:path gradientshapeok="t" o:connecttype="rect" /></v:shapetype>')}_writeComment( $ ,I){let z=new Pz1,q=new EQ0;z.render(q, $ ),this.commentsStream.write(q.xml);let U=new Tz1,Y=new EQ0;U.render(Y, $ ,I),this.vmlStream.write(Y.xml)}_writeClose(){this.commentsStream.write("</commentList></comments>"),this.vmlStream.write("</xml>")}addComments( $ ){if( $ && $ .length){if(!this.startedData)this._worksheet.comments=[],this._writeOpen(),this._addRelationships(),this._addCommentRefs(),this.startedData=!0; $ .forEach((I)=>{I.refAddress=Az1.decodeAddress(I.ref)}), $ .forEach((I)=>{this._writeComment(I,this.count),this.count+=1})}}commit(){if(this.count)this._writeClose(),this.commentsStream.end(),this.vmlStream.end()}}vQ0.exports=jQ0});var SQ0=F((vC1,uQ0)=>{var Ez1=O4(),Bz1=e9(),mh=G4(),RQ0=nB(),_Q0=M5(),jz1=Ig(),CQ0=EW(),lh=jW(),vz1=TQ0(),gz1=gQ0(),Rz1=kB(),c4=new jz1,oh=t9(),_z1=tg(),Cz1=ag(),hz1=sg(),uz1=mg(),Sz1=cg(),yz1=lg(),xz1=eg(),kz1= $ R(),fz1=IR(),nz1=zR(),bz1=qR(),iz1=UR(),pz1=KR(),cz1=JR(),dz1=YR(),d4={dataValidations:new _z1,sheetProperties:new Cz1,sheetFormatProperties:new hz1,columns:new oh({tag:"cols",length:!1,childXform:new uz1}),row:new Sz1,hyperlinks:new oh({tag:"hyperlinks",length:!1,childXform:new yz1}),sheetViews:new oh({tag:"sheetViews",length:!1,childXform:new xz1}),sheetProtection:new kz1,pageMargins:new fz1,pageSeteup:new nz1,autoFilter:new bz1,picture:new iz1,conditionalFormattings:new pz1,headerFooter:new cz1,rowBreaks:new dz1};class hQ0{constructor( $ ){this.id= $ .id,this.name= $ .name|| ` Sheet$ { this . id } ` ,this.state= $ .state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges=[],this._merges.add=function(){},this._sheetRelsWriter=new vz1( $ ),this._sheetCommentsWriter=new gz1(this,this._sheetRelsWriter, $ ),this._dimensions=new _Q0,this._rowZero=1,this.committed=!1,this.dataValidations=new Rz1,this._formulae={},this._siFormulae=0,this.conditionalFormatting=[],this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0}, $ .properties),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null}, $ .headerFooter),this.pageSetup=Object.assign({},{margins:{left:0.7,right:0.7,top:0.75,bottom:0.75,header:0.3,footer:0.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!!( $ .pageSetup&&( $ .pageSetup.fitToWidth|| $ .pageSetup.fitToHeight)&&! $ .pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null}, $ .pageSetup),this.useSharedStrings= $ .useSharedStrings||!1,this._workbook= $ .workbook,this.hasComments=!1,this._views= $ .views||[],this.autoFilter= $ .autoFilter||null,this._media=[],this.sheetProtection=null,this._writeOpenWorksheet(),this.startedData=!1}get
Line truncated
See http : //goo.gl/MqrFmX
` )},QS=wS .getNativePromise();if(wS .isNode&&typeof MutationObserver>"u")KS =global.setImmediate,HS =process.nextTick, $ I=wS .isRecentNode?function($ ){KS .call(global, $ )}:function( $ ){HS .call(process, $ )};else if(typeof QS ==="function"&&typeof QS .resolve==="function")GS=QS .resolve(), $ I=function( $ ){GS .then( $ )};else if(typeof MutationObserver<"u"&&!(typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova))) $ I=function(){var $ =document.createElement("div"),I={attributes:!0},z=!1,q=document.createElement("div"),U=new MutationObserver(function(){ $ .classList.toggle("foo"),z=!1});U.observe(q,I);var Y=function(){if(z)return;z=!0,q.classList.toggle("foo")};return function(Q){var w=new MutationObserver(function(){w.disconnect(),Q()});w.observe( $ ,I),Y()}}();else if(typeof setImmediate<"u") $ I=function( $ ){setImmediate( $ )};else if(typeof setTimeout<"u") $ I=function( $ ){setTimeout( $ ,0)};else $ I=v q1;var KS,HS,GS;W 20.exports= $ I});var X 20=O ((A C1,Z 20)=>{function R q1( $ ,I,z,q,U){for(var Y=0;Y<U;++Y)z[Y+q]= $ [Y+I], $ [Y+I]=void 0}function D 7( $ ){this._capacity= $ ,this._length=0,this._front=0}D 7.prototype._willBeOverCapacity=function( $ ){return this._capacity< $ };D 7.prototype._pushOne=function( $ ){var I=this.length();this._checkCapacity(I+1);var z=this._front+I&this._capacity-1;this[z]= $ ,this._length=I+1};D 7.prototype.push=function( $ ,I,z){var q=this.length()+3;if(this._willBeOverCapacity(q)){this._pushOne( $ ),this._pushOne(I),this._pushOne(z);return}var U=this._front+q-3;this._checkCapacity(q);var Y=this._capacity-1;this[U+0&Y]= $ ,this[U+1&Y]=I,this[U+2&Y]=z,this._length=q};D 7.prototype.shift=function(){var $ =this._front,I=this[ $ ];return this[ $ ]=void 0,this._front= $ +1&this._capacity-1,this._length--,I};D 7.prototype.length=function(){return this._length};D 7.prototype._checkCapacity=function( $ ){if(this._capacity< $ )this._resizeTo(this._capacity<<1)};D 7.prototype._resizeTo=function( $ ){var I=this._capacity;this._capacity= $ ;var z=this._front,q=this._length,U=z+q&I-1;R q1(this,0,this,I,U)};Z 20.exports=D 7});var A 20=O ((P C1,WS )=>{var N 20;try{throw Error()}catch( $ ){N 20= $ }var g q1=V 20(),L 20=X 20(),M 20=d1();function m4(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new L 20(16),this._normalQueue=new L 20(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var $ =this;this.drainQueues=function(){ $ ._drainQueues()},this._schedule=g q1}m4.prototype.setScheduler=function( $ ){var I=this._schedule;return this._schedule= $ ,this._customScheduler=!0,I};m4.prototype.hasCustomScheduler=function(){return this._customScheduler};m4.prototype.enableTrampoline=function(){this._trampolineEnabled=!0};m4.prototype.disableTrampolineIfNecessary=function(){if(M 20.hasDevTools)this._trampolineEnabled=!1};m4.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};m4.prototype.fatalError=function( $ ,I){if(I)process.stderr.write("Fatal "+( $ instanceof Error? $ .stack: $ )+ `
` )},Wu=Vu .getNativePromise();if(Vu .isNode&&typeof MutationObserver>"u")Zu =global.setImmediate,Xu =process.nextTick,zI=Vu .isRecentNode?function( $ ){Zu .call(global, $ )}:function( $ ){Xu .call(process, $ )};else if(typeof Wu ==="function"&&typeof Wu .resolve==="function")Lu=Wu .resolve(),z I=function( $ ){Lu .then( $ )};else if(typeof MutationObserver<"u"&&!(typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova)))z I=function(){var $ =document.createElement("div"),I={attributes:!0},z=!1,q=document.createElement("div"),U=new MutationObserver(function(){ $ .classList.toggle("foo"),z=!1});U.observe(q,I);var Y=function(){if(z)return;z=!0,q.classList.toggle("foo")};return function(Q){var w=new MutationObserver(function(){w.disconnect(),Q()});w.observe( $ ,I),Y()}}();else if(typeof setImmediate<"u")z I=function( $ ){setImmediate( $ )};else if(typeof setTimeout<"u")z I=function( $ ){setTimeout( $ ,0)};else z I=y q1;var Zu,Xu,Lu;Z 20.exports=z I});var D 20=F ((n C1,L 20)=>{function x q1( $ ,I,z,q,U){for(var Y=0;Y<U;++Y)z[Y+q]= $ [Y+I], $ [Y+I]=void 0}function N 7( $ ){this._capacity= $ ,this._length=0,this._front=0}N 7.prototype._willBeOverCapacity=function( $ ){return this._capacity< $ };N 7.prototype._pushOne=function( $ ){var I=this.length();this._checkCapacity(I+1);var z=this._front+I&this._capacity-1;this[z]= $ ,this._length=I+1};N 7.prototype.push=function( $ ,I,z){var q=this.length()+3;if(this._willBeOverCapacity(q)){this._pushOne( $ ),this._pushOne(I),this._pushOne(z);return}var U=this._front+q-3;this._checkCapacity(q);var Y=this._capacity-1;this[U+0&Y]= $ ,this[U+1&Y]=I,this[U+2&Y]=z,this._length=q};N 7.prototype.shift=function(){var $ =this._front,I=this[ $ ];return this[ $ ]=void 0,this._front= $ +1&this._capacity-1,this._length--,I};N 7.prototype.length=function(){return this._length};N 7.prototype._checkCapacity=function( $ ){if(this._capacity< $ )this._resizeTo(this._capacity<<1)};N 7.prototype._resizeTo=function( $ ){var I=this._capacity;this._capacity= $ ;var z=this._front,q=this._length,U=z+q&I-1;x q1(this,0,this,I,U)};L 20.exports=N 7});var T 20=F ((b C1,Du )=>{var A 20;try{throw Error()}catch( $ ){A 20= $ }var k q1=X 20(),O 20=D 20(),P 20=d1();function m4(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new O 20(16),this._normalQueue=new O 20(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var $ =this;this.drainQueues=function(){ $ ._drainQueues()},this._schedule=k q1}m4.prototype.setScheduler=function( $ ){var I=this._schedule;return this._schedule= $ ,this._customScheduler=!0,I};m4.prototype.hasCustomScheduler=function(){return this._customScheduler};m4.prototype.enableTrampoline=function(){this._trampolineEnabled=!0};m4.prototype.disableTrampolineIfNecessary=function(){if(P 20.hasDevTools)this._trampolineEnabled=!1};m4.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};m4.prototype.fatalError=function( $ ,I){if(I)process.stderr.write("Fatal "+( $ instanceof Error? $ .stack: $ )+ `
` ),process.exit(2);else this.throwLater( $ )};m4.prototype.throwLater=function( $ ,I){if(arguments.length===1)I= $ , $ =function(){throw I};if(typeof setTimeout<"u")setTimeout(function(){ $ (I)},0);else try{this._schedule(function(){ $ (I)})}catch(z){throw Error( ` No async scheduler available
See http : //goo.gl/MqrFmX
` )}};function D 20( $ ,I,z){this._lateQueue.push( $ ,I,z),this._queueTick()}function F 20( $ ,I,z){this._normalQueue.push( $ ,I,z),this._queueTick()}function O 20( $ ){this._normalQueue._pushOne( $ ),this._queueTick()}if(!M 20.hasDevTools)m4.prototype.invokeLater=D 20,m4.prototype.invoke=F 20,m4.prototype.settlePromises=O 20;else m4.prototype.invokeLater=function( $ ,I,z){if(this._trampolineEnabled)D 20.call(this, $ ,I,z);else this._schedule(function(){setTimeout(function(){ $ .call(I,z)},100)})},m4.prototype.invoke=function( $ ,I,z){if(this._trampolineEnabled)F 20.call(this, $ ,I,z);else this._schedule(function(){ $ .call(I,z)})},m4.prototype.settlePromises=function( $ ){if(this._trampolineEnabled)O 20.call(this, $ );else this._schedule(function(){ $ ._settlePromises()})};m4.prototype._drainQueue=function( $ ){while( $ .length()>0){var I= $ .shift();if(typeof I!=="function"){I._settlePromises();continue}var z= $ .shift(),q= $ .shift();I.call(z,q)}};m4.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)};m4.prototype._queueTick=function(){if(!this._isTickUsed)this._isTickUsed=!0,this._schedule(this.drainQueues)};m4.prototype._reset=function(){this._isTickUsed=!1};WS .exports=m4;WS .exports.firstLineError=N 20});var i 5=O ((T C1,E 20)=>{var XS=e3 (),_ q1=XS .freeze,P 20=d1(),T 20=P 20.inherits,G U=P 20.notEnumerableProp;function W U( $ ,I){function z(q){if(!(this instanceof z))return new z(q);if(G U(this,"message",typeof q==="string"?q:I),G U(this,"name", $ ),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else Error.call(this)}return T 20(z,Error),z}var VS,ZS,C q1=W U("Warning","warning"),h q1=W U("CancellationError","cancellation error"),S q1=W U("TimeoutError","timeout error"),y 2=W U("AggregateError","aggregate error");try{VS =TypeError,ZS =RangeError}catch( $ ){VS=W U("TypeError","type error"),ZS=W U("RangeError","range error")}var V L="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" ");for(I I=0;I I<V L.length;++I I)if(typeof Array.prototype[V L[I I]]==="function")y 2.prototype[V L[I I]]=Array.prototype[V L[I I]];var I I;XS .defineProperty(y 2.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0});y 2.prototype.isOperational=!0;var Z L=0;y 2.prototype.toString=function(){var $ =Array(Z L*4+1).join(" "),I= `
` )}};function F 20( $ ,I,z){this._lateQueue.push( $ ,I,z),this._queueTick()}function N 20( $ ,I,z){this._normalQueue.push( $ ,I,z),this._queueTick()}function M 20( $ ){this._normalQueue._pushOne( $ ),this._queueTick()}if(!P 20.hasDevTools)m4.prototype.invokeLater=F 20,m4.prototype.invoke=N 20,m4.prototype.settlePromises=M 20;else m4.prototype.invokeLater=function( $ ,I,z){if(this._trampolineEnabled)F 20.call(this, $ ,I,z);else this._schedule(function(){setTimeout(function(){ $ .call(I,z)},100)})},m4.prototype.invoke=function( $ ,I,z){if(this._trampolineEnabled)N 20.call(this, $ ,I,z);else this._schedule(function(){ $ .call(I,z)})},m4.prototype.settlePromises=function( $ ){if(this._trampolineEnabled)M 20.call(this, $ );else this._schedule(function(){ $ ._settlePromises()})};m4.prototype._drainQueue=function( $ ){while( $ .length()>0){var I= $ .shift();if(typeof I!=="function"){I._settlePromises();continue}var z= $ .shift(),q= $ .shift();I.call(z,q)}};m4.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)};m4.prototype._queueTick=function(){if(!this._isTickUsed)this._isTickUsed=!0,this._schedule(this.drainQueues)};m4.prototype._reset=function(){this._isTickUsed=!1};Du .exports=m4;Du .exports.firstLineError=A 20});var d 5=F ((i C1,j 20)=>{var Nu=II (),f q1=Nu .freeze,E 20=d1(),B 20=E 20.inherits,V U=E 20.notEnumerableProp;function Z U( $ ,I){function z(q){if(!(this instanceof z))return new z(q);if(V U(this,"message",typeof q==="string"?q:I),V U(this,"name", $ ),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else Error.call(this)}return B 20(z,Error),z}var Ou,Fu,n q1=Z U("Warning","warning"),b q1=Z U("CancellationError","cancellation error"),i q1=Z U("TimeoutError","timeout error"),k 2=Z U("AggregateError","aggregate error");try{Ou =TypeError,Fu =RangeError}catch( $ ){Ou=Z U("TypeError","type error"),Fu=Z U("RangeError","range error")}var L L="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" ");for(q I=0;q I<L L.length;++q I)if(typeof Array.prototype[L L[q I]]==="function")k 2.prototype[L L[q I]]=Array.prototype[L L[q I]];var q I;Nu .defineProperty(k 2.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0});k 2.prototype.isOperational=!0;var D L=0;k 2.prototype.toString=function(){var $ =Array(D L*4+1).join(" "),I= `
` + $ + ` AggregateError of :
` ;Z L++, $ =Array(Z L*4+1).join(" ");for(var z=0;z<this.length;++z){var q=this[z]===this?"[Circular AggregateError]":this[z]+"",U=q.split( `
` ;D L++, $ =Array(D L*4+1).join(" ");for(var z=0;z<this.length;++z){var q=this[z]===this?"[Circular AggregateError]":this[z]+"",U=q.split( `
` );for(var Y=0;Y<U.length;++Y)U[Y]= $ +U[Y];q=U.join( `
` ),I+=q+ `
` }return ZL--,I};function S2( $ ){if(!(this instanceof S2))return new S2( $ );if(GU(this,"name","OperationalError"),GU(this,"message", $ ),this.cause= $ ,this.isOperational=!0, $ instanceof Error)GU(this,"message", $ .message),GU(this,"stack", $ .stack);else if(Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)}T20(S2,Error);var zI=Error.__BluebirdErrorTypes__;if(!zI)zI=_q1({CancellationError:hq1,TimeoutError:Sq1,OperationalError:S2,RejectionError:S2,AggregateError:y2}),XS.defineProperty(Error,"__BluebirdErrorTypes__",{value:zI,writable:!1,enumerable:!1,configurable:!1});E20.exports={Error,TypeError:VS,RangeError:ZS,CancellationError:zI.CancellationError,OperationalError:zI.OperationalError,TimeoutError:zI.TimeoutError,AggregateError:zI.AggregateError,Warning:Cq1}});var j20=O((EC1,B20)=>{B20.exports=function( $ ,I){var z=d1(),q=z.errorObj,U=z.isObject;function Y(G,W){if(U(G)){if(G instanceof $ )return G;var Z=Q(G);if(Z===q){if(W)W._pushContext();var X= $ .reject(Z.e);if(W)W._popContext();return X}else if(typeof Z==="function"){if(K(G)){var X=new $ (I);return G._then(X._fulfill,X._reject,void 0,X,null),X}return H(G,Z,W)}}return G}function J(G){return G.then}function Q(G){try{return J(G)}catch(W){return q.e=W,q}}var w={}.hasOwnProperty;function K(G){try{return w.call(G,"_promise0")}catch(W){return!1}}function H(G,W,Z){var X=new $ (I),L=X;if(Z)Z._pushContext();if(X._captureStackTrace(),Z)Z._popContext();var D=!0,F=z.tryCatch(W).call(G,T,P);if(D=!1,X&&F===q)X._rejectCallback(F.e,!0,!0),X=null;function T(M){if(!X)return;X._resolveCallback(M),X=null}function P(M){if(!X)return;X._rejectCallback(M,D,!0),X=null}return L}return Y}});var R20=O((BC1,v20)=>{v20.exports=function( $ ,I,z,q,U){var Y=d1(),J=Y.isArray;function Q(K){switch(K){case-2:return[];case-3:return{}}}function w(K){var H=this._promise=new $ (I);if(K instanceof $ )H._propagateFrom(K,3);H._setOnCancel(this),this._values=K,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return Y.inherits(w,U),w.prototype.length=function(){return this._length},w.prototype.promise=function(){return this._promise},w.prototype._init=function K(H,G){var W=z(this._values,this._promise);if(W instanceof $ ){W=W._target();var Z=W._bitField;if(this._values=W,(Z&50397184)===0)return this._promise._setAsyncGuaranteed(),W._then(K,this._reject,void 0,this,G);else if((Z&33554432)!==0)W=W._value();else if((Z&16777216)!==0)return this._reject(W._reason());else return this._cancel()}if(W=Y.asArray(W),W===null){var X=q("expecting an array or an iterable object but got "+Y.classString(W)).reason();this._promise._rejectCallback(X,!1);return}if(W.length===0){if(G===-5)this._resolveEmptyArray();else this._resolve(Q(G));return}this._iterate(W)},w.prototype._iterate=function(K){var H=this.getActualLength(K.length);this._length=H,this._values=this.shouldCopyValues()?Array(H):this._values;var G=this._promise,W=!1,Z=null;for(var X=0;X<H;++X){var L=z(K[X],G);if(L instanceof $ )L=L._target(),Z=L._bitField;else Z=null;if(W){if(Z!==null)L.suppressUnhandledRejections()}else if(Z!==null)if((Z&50397184)===0)L._proxy(this,X),this._values[X]=L;else if((Z&33554432)!==0)W=this._promiseFulfilled(L._value(),X);else if((Z&16777216)!==0)W=this._promiseRejected(L._reason(),X);else W=this._promiseCancelled(X);else W=this._promiseFulfilled(L,X)}if(!W)G._setAsyncGuaranteed()},w.prototype._isResolved=function(){return this._values===null},w.prototype._resolve=function(K){this._values=null,this._promise._fulfill(K)},w.prototype._cancel=function(){if(this._isResolved()||!this._promise._isCancellable())return;this._values=null,this._promise._cancel()},w.prototype._reject=function(K){this._values=null,this._promise._rejectCallback(K,!1)},w.prototype._promiseFulfilled=function(K,H){this._values[H]=K;var G=++this._totalResolved;if(G>=this._length)return this._resolve(this._values),!0;return!1},w.prototype._promiseCancelled=function(){return this._cancel(),!0},w.prototype._promiseRejected=function(K){return this._totalResolved++,this._reject(K),!0},w.prototype._resultCancelled=function(){if(this._isResolved())return;var K=this._values;if(this._cancel(),K instanceof $ )K.cancel();else for(var H=0;H<K.length;++H)if(K[H]instanceof $ )K[H].cancel()},w.prototype.shouldCopyValues=function(){return!0},w.prototype.getActualLength=function(K){return K},w}});var _20=O((jC1,g20)=>{g20.exports=function( $ ){var I=!1,z=[]; $ .prototype._promiseCreated=function(){}, $ .prototype._pushContext=function(){}, $ .prototype._popContext=function(){return null}, $ ._peekContext= $ .prototype._peekContext=function(){};function q(){this._trace=new q.CapturedTrace(Y())}q.prototype._pushContext=function(){if(this._trace!==void 0)this._trace._promiseCreated=null,z.push(this._trace)},q.prototype._popContext=function(){if(this._trace!==void 0){var J=z.pop(),Q=J._promiseCreated;return J._promiseCreated=null,Q}return null};function U(){if(I)return new q}function Y(){var J=z.length-1;if(J>=0)return z[J];return}return q.CapturedTrace=null,q.create=U,q.deactivateLong
Line truncated
` }return DL--,I};function x2( $ ){if(!(this instanceof x2))return new x2( $ );if(VU(this,"name","OperationalError"),VU(this,"message", $ ),this.cause= $ ,this.isOperational=!0, $ instanceof Error)VU(this,"message", $ .message),VU(this,"stack", $ .stack);else if(Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)}B20(x2,Error);var UI=Error.__BluebirdErrorTypes__;if(!UI)UI=fq1({CancellationError:bq1,TimeoutError:iq1,OperationalError:x2,RejectionError:x2,AggregateError:k2}),Nu.defineProperty(Error,"__BluebirdErrorTypes__",{value:UI,writable:!1,enumerable:!1,configurable:!1});j20.exports={Error,TypeError:Ou,RangeError:Fu,CancellationError:UI.CancellationError,OperationalError:UI.OperationalError,TimeoutError:UI.TimeoutError,AggregateError:UI.AggregateError,Warning:nq1}});var g20=F((pC1,v20)=>{v20.exports=function( $ ,I){var z=d1(),q=z.errorObj,U=z.isObject;function Y(G,W){if(U(G)){if(G instanceof $ )return G;var Z=Q(G);if(Z===q){if(W)W._pushContext();var X= $ .reject(Z.e);if(W)W._popContext();return X}else if(typeof Z==="function"){if(K(G)){var X=new $ (I);return G._then(X._fulfill,X._reject,void 0,X,null),X}return H(G,Z,W)}}return G}function J(G){return G.then}function Q(G){try{return J(G)}catch(W){return q.e=W,q}}var w={}.hasOwnProperty;function K(G){try{return w.call(G,"_promise0")}catch(W){return!1}}function H(G,W,Z){var X=new $ (I),L=X;if(Z)Z._pushContext();if(X._captureStackTrace(),Z)Z._popContext();var D=!0,O=z.tryCatch(W).call(G,T,P);if(D=!1,X&&O===q)X._rejectCallback(O.e,!0,!0),X=null;function T(M){if(!X)return;X._resolveCallback(M),X=null}function P(M){if(!X)return;X._rejectCallback(M,D,!0),X=null}return L}return Y}});var _20=F((cC1,R20)=>{R20.exports=function( $ ,I,z,q,U){var Y=d1(),J=Y.isArray;function Q(K){switch(K){case-2:return[];case-3:return{}}}function w(K){var H=this._promise=new $ (I);if(K instanceof $ )H._propagateFrom(K,3);H._setOnCancel(this),this._values=K,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return Y.inherits(w,U),w.prototype.length=function(){return this._length},w.prototype.promise=function(){return this._promise},w.prototype._init=function K(H,G){var W=z(this._values,this._promise);if(W instanceof $ ){W=W._target();var Z=W._bitField;if(this._values=W,(Z&50397184)===0)return this._promise._setAsyncGuaranteed(),W._then(K,this._reject,void 0,this,G);else if((Z&33554432)!==0)W=W._value();else if((Z&16777216)!==0)return this._reject(W._reason());else return this._cancel()}if(W=Y.asArray(W),W===null){var X=q("expecting an array or an iterable object but got "+Y.classString(W)).reason();this._promise._rejectCallback(X,!1);return}if(W.length===0){if(G===-5)this._resolveEmptyArray();else this._resolve(Q(G));return}this._iterate(W)},w.prototype._iterate=function(K){var H=this.getActualLength(K.length);this._length=H,this._values=this.shouldCopyValues()?Array(H):this._values;var G=this._promise,W=!1,Z=null;for(var X=0;X<H;++X){var L=z(K[X],G);if(L instanceof $ )L=L._target(),Z=L._bitField;else Z=null;if(W){if(Z!==null)L.suppressUnhandledRejections()}else if(Z!==null)if((Z&50397184)===0)L._proxy(this,X),this._values[X]=L;else if((Z&33554432)!==0)W=this._promiseFulfilled(L._value(),X);else if((Z&16777216)!==0)W=this._promiseRejected(L._reason(),X);else W=this._promiseCancelled(X);else W=this._promiseFulfilled(L,X)}if(!W)G._setAsyncGuaranteed()},w.prototype._isResolved=function(){return this._values===null},w.prototype._resolve=function(K){this._values=null,this._promise._fulfill(K)},w.prototype._cancel=function(){if(this._isResolved()||!this._promise._isCancellable())return;this._values=null,this._promise._cancel()},w.prototype._reject=function(K){this._values=null,this._promise._rejectCallback(K,!1)},w.prototype._promiseFulfilled=function(K,H){this._values[H]=K;var G=++this._totalResolved;if(G>=this._length)return this._resolve(this._values),!0;return!1},w.prototype._promiseCancelled=function(){return this._cancel(),!0},w.prototype._promiseRejected=function(K){return this._totalResolved++,this._reject(K),!0},w.prototype._resultCancelled=function(){if(this._isResolved())return;var K=this._values;if(this._cancel(),K instanceof $ )K.cancel();else for(var H=0;H<K.length;++H)if(K[H]instanceof $ )K[H].cancel()},w.prototype.shouldCopyValues=function(){return!0},w.prototype.getActualLength=function(K){return K},w}});var h20=F((dC1,C20)=>{C20.exports=function( $ ){var I=!1,z=[]; $ .prototype._promiseCreated=function(){}, $ .prototype._pushContext=function(){}, $ .prototype._popContext=function(){return null}, $ ._peekContext= $ .prototype._peekContext=function(){};function q(){this._trace=new q.CapturedTrace(Y())}q.prototype._pushContext=function(){if(this._trace!==void 0)this._trace._promiseCreated=null,z.push(this._trace)},q.prototype._popContext=function(){if(this._trace!==void 0){var J=z.pop(),Q=J._promiseCreated;return J._promiseCreated=null,Q}return null};function U(){if(I)return new q}function Y(){var J=z.length-1;if(J>=0)return z[J];return}return q.CapturedTrace=null,q.create=U,q.deactivateLong
Line truncated
See http : //goo.gl/MqrFmX
` );if(!j0.longStackTraces&&b 6()){var a= $ .prototype._captureStackTrace,N= $ .prototype._attachExtraTrace;j0.longStackTraces=!0,M=function(){if(q.haveItemsQueued()&&!j0.longStackTraces)throw Error( ` cannot enable long stack traces after promises have been created
` );if(!j0.longStackTraces&&p 6()){var a= $ .prototype._captureStackTrace,N= $ .prototype._attachExtraTrace;j0.longStackTraces=!0,M=function(){if(q.haveItemsQueued()&&!j0.longStackTraces)throw Error( ` cannot enable long stack traces after promises have been created
See http : //goo.gl/MqrFmX
` ); $ .prototype._captureStackTrace=a, $ .prototype._attachExtraTrace=N,I.deactivateLongStackTraces(),q.enableTrampoline(),j0.longStackTraces=!1}, $ .prototype._captureStackTrace=U0, $ .prototype._attachExtraTrace=G0,I.activateLongStackTraces(),q.disableTrampolineIfNecessary()}}, $ .hasLongStackTraces=function(){return j0.longStackTraces&&b 6()};var v=function(){try{if(typeof CustomEvent==="function"){var a=new CustomEvent("CustomEvent");return Y.global.dispatchEvent(a),function(N,A){var S =new CustomEvent(N.toLowerCase(),{detail:A,cancelable:!0});return!Y.global.dispatchEvent(S )}}else if(typeof Event==="function"){var a=new Event("CustomEvent");return Y.global.dispatchEvent(a),function(A,S ){var b=new Event(A.toLowerCase(),{cancelable:!0});return b.detail=S ,!Y.global.dispatchEvent(b)}}else{var a=document.createEvent("CustomEvent");return a.initCustomEvent("testingtheevent",!1,!0,{}),Y.global.dispatchEvent(a),function(A,S ){var b=document.createEvent("CustomEvent");return b.initCustomEvent(A.toLowerCase(),!1,!0,S ),!Y.global.dispatchEvent(b)}}}catch(N){}return function(){return!1}}(),u =function(){if(Y.isNode)return function(){return process.emit.apply(process,arguments)};else{if(!Y.global)return function(){return!1};return function(a){var N="on"+a.toLowerCase(),A=Y.global[N];if(!A)return!1;return A.apply(Y.global,[].slice.call(arguments,1)),!0}}}();function h(a,N){return{promise:N}}var x={promiseCreated:h,promiseFulfilled:h,promiseRejected:h,promiseResolved:h,promiseCancelled:h,promiseChained:function(a,N,A){return{promise:N,child:A}},warning:function(a,N){return{warning:N}},unhandledRejection:function(a,N,A){return{reason:N,promise:A}},rejectionHandled:h},B=function(a){var N=!1;try{N=u .apply(null,arguments)}catch(S ){q.throwLater(S ),N=!0}var A=!1;try{A=v(a,x[a].apply(null,arguments))}catch(S ){q.throwLater(S ),A=!0}return A||N}; $ .config=function(a){if(a=Object(a),"longStackTraces"in a){if(a.longStackTraces) $ .longStackTraces();else if(!a.longStackTraces&& $ .hasLongStackTraces())M()}if("warnings"in a){var N=a.warnings;if(j0.warnings=!!N,P=j0.warnings,Y.isObject(N)){if("wForgottenReturn"in N)P=!!N.wForgottenReturn}}if("cancellation"in a&&a.cancellation&&!j0.cancellation){if(q.haveItemsQueued())throw Error("cannot enable cancellation after promises are in use"); $ .prototype._clearCancellationData=z0, $ .prototype._propagateFrom=R , $ .prototype._onCancel=k, $ .prototype._setOnCancel=p, $ .prototype._attachCancellationCallback=g , $ .prototype._execute=f,c=R ,j0.cancellation=!0}if("monitoring"in a){if(a.monitoring&&!j0.monitoring)j0.monitoring=!0, $ .prototype._fireEvent=B;else if(!a.monitoring&&j0.monitoring)j0.monitoring=!1, $ .prototype._fireEvent=n}return $ };function n(){return!1} $ .prototype._fireEvent=n, $ .prototype._execute=function(a,N,A){try{a(N,A)}catch(S ){return S }}, $ .prototype._onCancel=function(){}, $ .prototype._setOnCancel=function(a){}, $ .prototype._attachCancellationCallback=function(a){}, $ .prototype._captureStackTrace=function(){}, $ .prototype._attachExtraTrace=function(){}, $ .prototype._clearCancellationData=function(){}, $ .prototype._propagateFrom=function(a,N){};function f(a,N,A){var S =this;try{a(N,A,function(b){if(typeof b!=="function")throw TypeError("onCancel must be a function, got: "+Y.toString(b));S ._attachCancellationCallback(b)})}catch(b){return b}}function g (a){if(!this._isCancellable())return this;var N=this._onCancel();if(N!==void 0)if(Y.isArray(N))N.push(a);else this._setOnCancel([N,a]);else this._setOnCancel(a)}function k(){return this._onCancelField}function p(a){this._onCancelField=a}function z0(){this._cancellationParent=void 0,this._onCancelField=void 0}function R (a,N){if((N&1)!==0){this._cancellationParent=a;var A=a._branchesRemainingToCancel;if(A===void 0)A=0;a._branchesRemainingToCancel=A+1}if((N&2)!==0&&a._isBound())this._setBoundTo(a._boundTo)}function i(a,N){if((N&2)!==0&&a._isBound())this._setBoundTo(a._boundTo)}var c=i;function r(){var a=this._boundTo;if(a!==void 0){if(a instanceof $ )if(a.isFulfilled())return a.value();else return}return a}function U0(){this._trace=new w $ (this._peekContext())}function G0(a,N){if(J(a)){var A=this._trace;if(A!==void 0){if(N)A=A._parent}if(A!==void 0)A.attachExtraTrace(a);else if(!a.__stackCleaned__){var S =q1(a);Y.notEnumerableProp(a,"stack",S .message+ `
` +S .stack.join( `
` )),Y.notEnumerableProp(a,"__stackCleaned__",!0)}}}function A0(a,N,A,S ,b){if(a===void 0&&N!==null&&P){if(b!==void 0&&b._returnedNonUndefined())return;if((S ._bitField&65535)===0)return;if(A)A=A+" ";var s="",m="";if(N._trace){var e=N._trace.stack.split( `
` ); $ .prototype._captureStackTrace=a, $ .prototype._attachExtraTrace=N,I.deactivateLongStackTraces(),q.enableTrampoline(),j0.longStackTraces=!1}, $ .prototype._captureStackTrace=U0, $ .prototype._attachExtraTrace=G0,I.activateLongStackTraces(),q.disableTrampolineIfNecessary()}}, $ .hasLongStackTraces=function(){return j0.longStackTraces&&p 6()};var v=function(){try{if(typeof CustomEvent==="function"){var a=new CustomEvent("CustomEvent");return Y.global.dispatchEvent(a),function(N,A){var u =new CustomEvent(N.toLowerCase(),{detail:A,cancelable:!0});return!Y.global.dispatchEvent(u )}}else if(typeof Event==="function"){var a=new Event("CustomEvent");return Y.global.dispatchEvent(a),function(A,u ){var b=new Event(A.toLowerCase(),{cancelable:!0});return b.detail=u ,!Y.global.dispatchEvent(b)}}else{var a=document.createEvent("CustomEvent");return a.initCustomEvent("testingtheevent",!1,!0,{}),Y.global.dispatchEvent(a),function(A,u ){var b=document.createEvent("CustomEvent");return b.initCustomEvent(A.toLowerCase(),!1,!0,u ),!Y.global.dispatchEvent(b)}}}catch(N){}return function(){return!1}}(),y =function(){if(Y.isNode)return function(){return process.emit.apply(process,arguments)};else{if(!Y.global)return function(){return!1};return function(a){var N="on"+a.toLowerCase(),A=Y.global[N];if(!A)return!1;return A.apply(Y.global,[].slice.call(arguments,1)),!0}}}();function h(a,N){return{promise:N}}var x={promiseCreated:h,promiseFulfilled:h,promiseRejected:h,promiseResolved:h,promiseCancelled:h,promiseChained:function(a,N,A){return{promise:N,child:A}},warning:function(a,N){return{warning:N}},unhandledRejection:function(a,N,A){return{reason:N,promise:A}},rejectionHandled:h},B=function(a){var N=!1;try{N=y .apply(null,arguments)}catch(u ){q.throwLater(u ),N=!0}var A=!1;try{A=v(a,x[a].apply(null,arguments))}catch(u ){q.throwLater(u ),A=!0}return A||N}; $ .config=function(a){if(a=Object(a),"longStackTraces"in a){if(a.longStackTraces) $ .longStackTraces();else if(!a.longStackTraces&& $ .hasLongStackTraces())M()}if("warnings"in a){var N=a.warnings;if(j0.warnings=!!N,P=j0.warnings,Y.isObject(N)){if("wForgottenReturn"in N)P=!!N.wForgottenReturn}}if("cancellation"in a&&a.cancellation&&!j0.cancellation){if(q.haveItemsQueued())throw Error("cannot enable cancellation after promises are in use"); $ .prototype._clearCancellationData=z0, $ .prototype._propagateFrom=g , $ .prototype._onCancel=k, $ .prototype._setOnCancel=p, $ .prototype._attachCancellationCallback=R , $ .prototype._execute=f,c=g ,j0.cancellation=!0}if("monitoring"in a){if(a.monitoring&&!j0.monitoring)j0.monitoring=!0, $ .prototype._fireEvent=B;else if(!a.monitoring&&j0.monitoring)j0.monitoring=!1, $ .prototype._fireEvent=n}return $ };function n(){return!1} $ .prototype._fireEvent=n, $ .prototype._execute=function(a,N,A){try{a(N,A)}catch(u ){return u }}, $ .prototype._onCancel=function(){}, $ .prototype._setOnCancel=function(a){}, $ .prototype._attachCancellationCallback=function(a){}, $ .prototype._captureStackTrace=function(){}, $ .prototype._attachExtraTrace=function(){}, $ .prototype._clearCancellationData=function(){}, $ .prototype._propagateFrom=function(a,N){};function f(a,N,A){var u =this;try{a(N,A,function(b){if(typeof b!=="function")throw TypeError("onCancel must be a function, got: "+Y.toString(b));u ._attachCancellationCallback(b)})}catch(b){return b}}function R (a){if(!this._isCancellable())return this;var N=this._onCancel();if(N!==void 0)if(Y.isArray(N))N.push(a);else this._setOnCancel([N,a]);else this._setOnCancel(a)}function k(){return this._onCancelField}function p(a){this._onCancelField=a}function z0(){this._cancellationParent=void 0,this._onCancelField=void 0}function g (a,N){if((N&1)!==0){this._cancellationParent=a;var A=a._branchesRemainingToCancel;if(A===void 0)A=0;a._branchesRemainingToCancel=A+1}if((N&2)!==0&&a._isBound())this._setBoundTo(a._boundTo)}function i(a,N){if((N&2)!==0&&a._isBound())this._setBoundTo(a._boundTo)}var c=i;function r(){var a=this._boundTo;if(a!==void 0){if(a instanceof $ )if(a.isFulfilled())return a.value();else return}return a}function U0(){this._trace=new H $ (this._peekContext())}function G0(a,N){if(J(a)){var A=this._trace;if(A!==void 0){if(N)A=A._parent}if(A!==void 0)A.attachExtraTrace(a);else if(!a.__stackCleaned__){var u =q1(a);Y.notEnumerableProp(a,"stack",u .message+ `
` +u .stack.join( `
` )),Y.notEnumerableProp(a,"__stackCleaned__",!0)}}}function A0(a,N,A,u ,b){if(a===void 0&&N!==null&&P){if(b!==void 0&&b._returnedNonUndefined())return;if((u ._bitField&65535)===0)return;if(A)A=A+" ";var s="",m="";if(N._trace){var e=N._trace.stack.split( `
` ),J0=Y0(e);for(var H0=J0.length-1;H0>=0;--H0){var _0=J0[H0];if(!H.test(_0)){var i0=_0.match(G);if(i0)s="at "+i0[1]+":"+i0[2]+":"+i0[3]+" ";break}}if(J0.length>0){var n0=J0[0];for(var H0=0;H0<e.length;++H0)if(e[H0]===n0){if(H0>0)m= `
` +e[H0-1];break}}}var w1="a promise was created in a "+A+"handler "+s+"but was not returned from it, see http://goo.gl/rRqMUw"+m;S ._warn(w1,!0,N)}}function R 0(a,N){var A=a+" is deprecated and will be removed in a future version.";if(N)A+=" Use "+N+" instead.";return Q1(A)}function Q1(a,N,A){if(!j0.warnings)return;var S =new U(a),b;if(N)A._attachExtraTrace(S );else if(j0.longStackTraces&&(b= $ ._peekContext()))b.attachExtraTrace(S );else{var s=q1(S );S .stack=s.message+ `
` +e[H0-1];break}}}var w1="a promise was created in a "+A+"handler "+s+"but was not returned from it, see http://goo.gl/rRqMUw"+m;u ._warn(w1,!0,N)}}function g 0(a,N){var A=a+" is deprecated and will be removed in a future version.";if(N)A+=" Use "+N+" instead.";return Q1(A)}function Q1(a,N,A){if(!j0.warnings)return;var u =new U(a),b;if(N)A._attachExtraTrace(u );else if(j0.longStackTraces&&(b= $ ._peekContext()))b.attachExtraTrace(u );else{var s=q1(u );u .stack=s.message+ `
` +s.stack.join( `
` )}if(!B("warning",S ))N1(S ,"",!0)}function f0(a,N){for(var A=0;A<N.length-1;++A)N[A].push("From previous event:"),N[A]=N[A].join( `
` )}if(!B("warning",u ))N1(u ,"",!0)}function f0(a,N){for(var A=0;A<N.length-1;++A)N[A].push("From previous event:"),N[A]=N[A].join( `
` );if(A<N.length)N[A]=N[A].join( `
` );return a+ `
` +N.join( `
` )}function z1(a){for(var N=0;N<a.length;++N)if(a[N].length===0||N+1<a.length&&a[N][0]===a[N+1][0])a.splice(N,1),N--}function M0(a){var N=a[0];for(var A=1;A<a.length;++A){var S =a[A],b=N.length-1,s=N[b],m=-1;for(var e=S .length-1;e>=0;--e)if(S [e]===s){m=e;break}for(var e=m;e>=0;--e){var J0=S [e];if(N[b]===J0)N.pop(),b--;else break}N=S }}function Y0(a){var N=[];for(var A=0;A<a.length;++A){var S =a[A],b=S ===" (No stack trace)"||W.test(S ),s=b&&T 6(S );if(b&&!s){if(X&&S .charAt(0)!==" ")S =" "+S ;N.push(S )}}return N}function v0(a){var N=a.stack.replace(/ \s + $ /g,"").split( `
` );for(var A=0;A<N.length;++A){var S =N[A];if(S ===" (No stack trace)"||W.test(S ))break}if(A>0&&a.name!="SyntaxError")N=N.slice(A);return N}function q1(a){var N=a.stack,A=a.toString();return N=typeof N==="string"&&N.length>0?v0(a):[" (No stack trace)"],{message:A,stack:a.name=="SyntaxError"?N:Y0(N)}}function N1(a,N,A){if(typeof console<"u"){var S ;if(Y.isObject(a)){var b=a.stack;S =N+Z(b,a)}else S =N+String(a);if(typeof L==="function")L(S ,A);else if(typeof console.log==="function"||typeof console.log==="object")console.log(S )}}function b4(a,N,A,S ){var b=!1;try{if(typeof N==="function")if(b=!0,a==="rejectionHandled")N(S );else N(A,S )}catch(s){q.throwLater(s)}if(a==="unhandledRejection"){if(!B(a,A,S )&&!b)N1(A,"Unhandled rejection ")}else B(a,S )}function n 6(a){var N;if(typeof a==="function")N="[function "+(a.name||"anonymous")+"]";else{N=a&&typeof a.toString==="function"?a.toString():Y.toString(a);var A=/ \[ object [a-zA-Z0-9 $ _]+ \] /;if(A.test(N))try{var S =JSON.stringify(a);N=S }catch(b){}if(N.length===0)N="(empty array)"}return"(<"+E $ (N)+">, no stack trace)"}function E $ (a){var N=41;if(a.length<N)return a;return a.substr(0,N-3)+"..."}function b 6(){return typeof U 9==="function"}var T 6=function(){return!1},B $ =/[ \/ < \( ]([^: \/ ]+):( \d +):(?: \d +) \) ? \s * $ /;function Q $ (a){var N=a.match(B $ );if(N)return{fileName:N[1],line:parseInt(N[2],10)}}function S 7(a,N){if(!b 6())return;var A=a.stack.split( `
` ),S =N.stack.split( `
` ),b=-1,s=-1,m,e;for(var J0=0;J0<A.length;++J0){var H0=Q $ (A[J0]);if(H0){m=H0.fileName,b=H0.line;break}}for(var J0=0;J0<S .length;++J0){var H0=Q $ (S [J0]);if(H0){e=H0.fileName,s=H0.line;break}}if(b<0||s<0||!m||!e||m!==e||b>=s)return;T 6=function(_0){if(K.test(_0))return!0;var i0=Q $ (_0);if(i0){if(i0.fileName===m&&(b<=i0.line&&i0.line<=s))return!0}return!1}}function w $ (a){this._parent=a,this._promisesCreated=0;var N=this._length=1+(a===void 0?0:a._length);if(U 9(this,w $ ),N>32)this.uncycle()}Y.inherits(w $ ,Error),I.CapturedTrace=w $ ,w $ .prototype.uncycle=function(){var a=this._length;if(a<2)return;var N=[],A={};for(var S =0,b=this;b!==void 0;++S )N.push(b),b=b._parent;a=this._length=S ;for(var S =a-1;S >=0;--S ){var s=N[S ].stack;if(A[s]===void 0)A[s]=S }for(var S =0;S <a;++S ){var m=N[S ].stack,e=A[m];if(e!==void 0&&e!==S ){if(e>0)N[e-1]._parent=void 0,N[e-1]._length=1;N[S ]._parent=void 0,N[S ]._length=1;var J0=S >0?N[S -1]:this;if(e<a-1)J0._parent=N[e+1],J0._parent.uncycle(),J0._length=J0._parent._length+1;else J0._parent=void 0,J0._length=1;var H0=J0._length+1;for(var _0=S -2;_0>=0;--_0)N[_0]._length=H0,H0++;return}}},w $ .prototype.attachExtraTrace=function(a){if(a.__stackCleaned__)return;this.uncycle();var N=q1(a),A=N.message,S =[N.stack],b=this;while(b!==void 0)S .push(Y0(b.stack.split( `
` ))),b=b._parent;M0(S ),z1(S ),Y.notEnumerableProp(a,"stack",f0(A,S )),Y.notEnumerableProp(a,"__stackCleaned__",!0)};var U 9=function(){var N=/^ \s *at \s */,A=function(m,e){if(typeof m==="string")return m;if(e.name!==void 0&&e.message!==void 0)return e.toString();return n 6(e)};if(typeof Error.stackTraceLimit==="number"&&typeof Error.captureStackTrace==="function"){Error.stackTraceLimit+=6,W=N,Z=A;var S =Error.captureStackTrace;return T 6=function(m){return K.test(m)},function(m,e){Error.stackTraceLimit+=6,S (m,e),Error.stackTraceLimit-=6}}var b=Error();if(typeof b.stack==="string"&&b.stack.split( `
` )[0].indexOf("stackDetection@")>=0)return W=/@/,Z=A,X=!0,function(e){e.stack=Error().stack};var s;try{throw Error()}catch(m){s="stack"in m}if(!("stack"in b)&&s&&typeof Error.stackTraceLimit==="number")return W=N,Z=A,function(e){Error.stackTraceLimit+=6;try{throw Error()}catch(J0){e.stack=J0.stack}Error.stackTraceLimit-=6};return Z=function(m,e){if(typeof m==="string")return m;if((typeof e==="object"||typeof e==="function")&&e.name!==void 0&&e.message!==void 0)return e.toString();return n 6(e)},null}([]);if(typeof console<"u"&&typeof console.warn<"u"){if(L=function(a){console.warn(a)},Y.isNode&&process.stderr.isTTY)L=function(a,N){var A=N?" \x 1B[33m":" \x 1B[31m";console.warn(A+a+ ` \ x1B [ 0 m
` )};else if(!Y.isNode&&typeof Error().stack==="string")L=function(a,N){console.warn("%c"+a,N?"color: darkorange":"color: red")}}var j0={warnings:F,longStackTraces:!1,cancellation:!1,monitoring:!1};if(T) $ .longStackTraces();return{longStackTraces:function(){return j0.longStackTraces},warnings:function(){return j0.warnings},cancellation:function(){return j0.cancellation},monitoring:function(){return j0.monitoring},propagateFromFunction:function(){return c},boundValueFunction:function(){return r},checkForgottenReturns:A0,setBounds:S7,warn:Q1,deprecated:R0,CapturedTrace:w $ ,fireDomEvent:v,fireGlobalEvent:u}}});var y20=O((RC1,S20)=>{S20.exports=function( $ ,I){var z=d1(),q= $ .CancellationError,U=z.errorObj;function Y(G,W,Z){this.promise=G,this.type=W,this.handler=Z,this.called=!1,this.cancelPromise=null}Y.prototype.isFinallyHandler=function(){return this.type===0};function J(G){this.finallyHandler=G}J.prototype._resultCancelled=function(){Q(this.finallyHandler)};function Q(G,W){if(G.cancelPromise!=null){if(arguments.length>1)G.cancelPromise._reject(W);else G.cancelPromise._cancel();return G.cancelPromise=null,!0}return!1}function w(){return H.call(this,this.promise._target()._settledValue())}function K(G){if(Q(this,G))return;return U.e=G,U}function H(G){var W=this.promise,Z=this.handler;if(!this.called){this.called=!0;var X=this.isFinallyHandler()?Z.call(W._boundValue()):Z.call(W._boundValue(),G);if(X!==void 0){W._setReturnedNonUndefined();var L=I(X,W);if(L instanceof $ ){if(this.cancelPromise!=null){if(L._isCancelled()){var D=new q("late cancellation observer");return W._attachExtraTrace(D),U.e=D,U}else if(L.isPending())L._attachCancellationCallback(new J(this))}return L._then(w,K,void 0,this,void 0)}}}if(W.isRejected())return Q(this),U.e=G,U;else return Q(this),G}return $ .prototype._passThrough=function(G,W,Z,X){if(typeof G!=="function")return this.then();return this._then(Z,X,void 0,new Y(this,W,G),void 0)}, $ .prototype.lastly= $ .prototype.finally=function(G){return this._passThrough(G,0,H,H)}, $ .prototype.tap=function(G){return this._passThrough(G,1,H)},Y}});var x20=O((gC1,u20)=>{u20.exports=function( $ ){var I=d1(),z=e3().keys,q=I.tryCatch,U=I.errorObj;function Y(J,Q,w){return function(K){var H=w._boundValue(); $ :for(var G=0;G<J.length;++G){var W=J[G];if(W===Error||W!=null&&W.prototype instanceof Error){if(K instanceof W)return q(Q).call(H,K)}else if(typeof W==="function"){var Z=q(W).call(H,K);if(Z===U)return Z;else if(Z)return q(Q).call(H,K)}else if(I.isObject(K)){var X=z(W);for(var L=0;L<X.length;++L){var D=X[L];if(W[D]!=K[D])continue $ }return q(Q).call(H,K)}}return $ }}return Y}});var LS=O((_C1,n20)=>{var k20=d1(),yq1=k20.maybeWrapAsError,uq1=i5(),xq1=uq1.OperationalError,f20=e3();function kq1( $ ){return $ instanceof Error&&f20.getPrototypeOf( $ )===Error.prototype}var fq1=/^(?:name|message|stack|cause) $ /;function nq1( $ ){var I;if(kq1( $ )){I=new xq1( $ ),I.name= $ .name,I.message= $ .message,I.stack= $ .stack;var z=f20.keys( $ );for(var q=0;q<z.length;++q){var U=z[q];if(!fq1.test(U))I[U]= $ [U]}return I}return k20.markAsOriginatingFromRejection( $ ), $ }function bq1( $ ,I){return function(z,q){if( $ ===null)return;if(z){var U=nq1(yq1(z)); $ ._attachExtraTrace(U), $ ._reject(U)}else if(!I) $ ._fulfill(q);else{var Y=arguments.length,J=Array(Math.max(Y-1,0));for(var Q=1;Q<Y;++Q)J[Q-1]=arguments[Q]; $ ._fulfill(J)} $ =null}}n20.exports=bq1});var i20=O((CC1,b20)=>{b20.exports=function( $ ,I,z,q,U){var Y=d1(),J=Y.tryCatch; $ .method=function(Q){if(typeof Q!=="function")throw new $ .TypeError("expecting a function but got "+Y.classString(Q));return function(){var w=new $ (I);w._captureStackTrace(),w._pushContext();var K=J(Q).apply(this,arguments),H=w._popContext();return U.checkForgottenReturns(K,H,"Promise.method",w),w._resolveFromSyncValue(K),w}}, $ .attempt= $ .try=function(Q){if(typeof Q!=="function")return q("expecting a function but got "+Y.classString(Q));var w=new $ (I);w._captureStackTrace(),w._pushContext();var K;if(arguments.length>1){U.deprecated("calling Promise.try with more than 1 argument");var H=arguments[1],G=arguments[2];K=Y.isArray(H)?J(Q).apply(G,H):J(Q).call(G,H)}else K=J(Q)();var W=w._popContext();return U.checkForgottenReturns(K,W,"Promise.try",w),w._resolveFromSyncValue(K),w}, $ .prototype._resolveFromSyncValue=function(Q){if(Q===Y.errorObj)this._rejectCallback(Q.e,!1);else this._resolveCallback(Q,!0)}}});var c20=O((hC1,p20)=>{p20.exports=function( $ ,I,z,q){var U=!1,Y=function(K,H){this._reject(H)},J=function(K,H){H.promiseRejectionQueued=!0,H.bindingPromise._then(Y,Y,null,this,K)},Q=function(K,H){if((this._bitField&50397184)===0)this._resolveCallback(H.target)},w=function(K,H){if(!H.promiseRejectionQueued)this._reject(K)}; $ .prototype.bind=function(K){if(!U)U=!0, $ .prototype._propagateFrom=q.propagateFromFunction(), $ .prototype._boundValue=q.boundValueFunction();var H=z(K),G=new $ (I);G._propagateFrom(this,1);var W=this._target();if(G._setBoundTo(H),H instanceof $ ){var Z={promiseRejectionQueued:!1,promise:G,target:W,bindingPromise:H};W._then(I,J,voi
Line truncated
` )}function z1(a){for(var N=0;N<a.length;++N)if(a[N].length===0||N+1<a.length&&a[N][0]===a[N+1][0])a.splice(N,1),N--}function M0(a){var N=a[0];for(var A=1;A<a.length;++A){var u =a[A],b=N.length-1,s=N[b],m=-1;for(var e=u .length-1;e>=0;--e)if(u [e]===s){m=e;break}for(var e=m;e>=0;--e){var J0=u [e];if(N[b]===J0)N.pop(),b--;else break}N=u }}function Y0(a){var N=[];for(var A=0;A<a.length;++A){var u =a[A],b=u ===" (No stack trace)"||W.test(u ),s=b&&B 6(u );if(b&&!s){if(X&&u .charAt(0)!==" ")u =" "+u ;N.push(u )}}return N}function v0(a){var N=a.stack.replace(/ \s + $ /g,"").split( `
` );for(var A=0;A<N.length;++A){var u =N[A];if(u ===" (No stack trace)"||W.test(u ))break}if(A>0&&a.name!="SyntaxError")N=N.slice(A);return N}function q1(a){var N=a.stack,A=a.toString();return N=typeof N==="string"&&N.length>0?v0(a):[" (No stack trace)"],{message:A,stack:a.name=="SyntaxError"?N:Y0(N)}}function N1(a,N,A){if(typeof console<"u"){var u ;if(Y.isObject(a)){var b=a.stack;u =N+Z(b,a)}else u =N+String(a);if(typeof L==="function")L(u ,A);else if(typeof console.log==="function"||typeof console.log==="object")console.log(u )}}function b4(a,N,A,u ){var b=!1;try{if(typeof N==="function")if(b=!0,a==="rejectionHandled")N(u );else N(A,u )}catch(s){q.throwLater(s)}if(a==="unhandledRejection"){if(!B(a,A,u )&&!b)N1(A,"Unhandled rejection ")}else B(a,u )}function i 6(a){var N;if(typeof a==="function")N="[function "+(a.name||"anonymous")+"]";else{N=a&&typeof a.toString==="function"?a.toString():Y.toString(a);var A=/ \[ object [a-zA-Z0-9 $ _]+ \] /;if(A.test(N))try{var u =JSON.stringify(a);N=u }catch(b){}if(N.length===0)N="(empty array)"}return"(<"+B $ (N)+">, no stack trace)"}function B $ (a){var N=41;if(a.length<N)return a;return a.substr(0,N-3)+"..."}function p 6(){return typeof Q 9==="function"}var B 6=function(){return!1},j $ =/[ \/ < \( ]([^: \/ ]+):( \d +):(?: \d +) \) ? \s * $ /;function K $ (a){var N=a.match(j $ );if(N)return{fileName:N[1],line:parseInt(N[2],10)}}function y 7(a,N){if(!p 6())return;var A=a.stack.split( `
` ),u =N.stack.split( `
` ),b=-1,s=-1,m,e;for(var J0=0;J0<A.length;++J0){var H0=K $ (A[J0]);if(H0){m=H0.fileName,b=H0.line;break}}for(var J0=0;J0<u .length;++J0){var H0=K $ (u [J0]);if(H0){e=H0.fileName,s=H0.line;break}}if(b<0||s<0||!m||!e||m!==e||b>=s)return;B 6=function(_0){if(K.test(_0))return!0;var i0=K $ (_0);if(i0){if(i0.fileName===m&&(b<=i0.line&&i0.line<=s))return!0}return!1}}function H $ (a){this._parent=a,this._promisesCreated=0;var N=this._length=1+(a===void 0?0:a._length);if(Q 9(this,H $ ),N>32)this.uncycle()}Y.inherits(H $ ,Error),I.CapturedTrace=H $ ,H $ .prototype.uncycle=function(){var a=this._length;if(a<2)return;var N=[],A={};for(var u =0,b=this;b!==void 0;++u )N.push(b),b=b._parent;a=this._length=u ;for(var u =a-1;u >=0;--u ){var s=N[u ].stack;if(A[s]===void 0)A[s]=u }for(var u =0;u <a;++u ){var m=N[u ].stack,e=A[m];if(e!==void 0&&e!==u ){if(e>0)N[e-1]._parent=void 0,N[e-1]._length=1;N[u ]._parent=void 0,N[u ]._length=1;var J0=u >0?N[u -1]:this;if(e<a-1)J0._parent=N[e+1],J0._parent.uncycle(),J0._length=J0._parent._length+1;else J0._parent=void 0,J0._length=1;var H0=J0._length+1;for(var _0=u -2;_0>=0;--_0)N[_0]._length=H0,H0++;return}}},H $ .prototype.attachExtraTrace=function(a){if(a.__stackCleaned__)return;this.uncycle();var N=q1(a),A=N.message,u =[N.stack],b=this;while(b!==void 0)u .push(Y0(b.stack.split( `
` ))),b=b._parent;M0(u ),z1(u ),Y.notEnumerableProp(a,"stack",f0(A,u )),Y.notEnumerableProp(a,"__stackCleaned__",!0)};var Q 9=function(){var N=/^ \s *at \s */,A=function(m,e){if(typeof m==="string")return m;if(e.name!==void 0&&e.message!==void 0)return e.toString();return i 6(e)};if(typeof Error.stackTraceLimit==="number"&&typeof Error.captureStackTrace==="function"){Error.stackTraceLimit+=6,W=N,Z=A;var u =Error.captureStackTrace;return B 6=function(m){return K.test(m)},function(m,e){Error.stackTraceLimit+=6,u (m,e),Error.stackTraceLimit-=6}}var b=Error();if(typeof b.stack==="string"&&b.stack.split( `
` )[0].indexOf("stackDetection@")>=0)return W=/@/,Z=A,X=!0,function(e){e.stack=Error().stack};var s;try{throw Error()}catch(m){s="stack"in m}if(!("stack"in b)&&s&&typeof Error.stackTraceLimit==="number")return W=N,Z=A,function(e){Error.stackTraceLimit+=6;try{throw Error()}catch(J0){e.stack=J0.stack}Error.stackTraceLimit-=6};return Z=function(m,e){if(typeof m==="string")return m;if((typeof e==="object"||typeof e==="function")&&e.name!==void 0&&e.message!==void 0)return e.toString();return i 6(e)},null}([]);if(typeof console<"u"&&typeof console.warn<"u"){if(L=function(a){console.warn(a)},Y.isNode&&process.stderr.isTTY)L=function(a,N){var A=N?" \x 1B[33m":" \x 1B[31m";console.warn(A+a+ ` \ x1B [ 0 m
` )};else if(!Y.isNode&&typeof Error().stack==="string")L=function(a,N){console.warn("%c"+a,N?"color: darkorange":"color: red")}}var j0={warnings:O,longStackTraces:!1,cancellation:!1,monitoring:!1};if(T) $ .longStackTraces();return{longStackTraces:function(){return j0.longStackTraces},warnings:function(){return j0.warnings},cancellation:function(){return j0.cancellation},monitoring:function(){return j0.monitoring},propagateFromFunction:function(){return c},boundValueFunction:function(){return r},checkForgottenReturns:A0,setBounds:y7,warn:Q1,deprecated:g0,CapturedTrace:H $ ,fireDomEvent:v,fireGlobalEvent:y}}});var x20=F((lC1,y20)=>{y20.exports=function( $ ,I){var z=d1(),q= $ .CancellationError,U=z.errorObj;function Y(G,W,Z){this.promise=G,this.type=W,this.handler=Z,this.called=!1,this.cancelPromise=null}Y.prototype.isFinallyHandler=function(){return this.type===0};function J(G){this.finallyHandler=G}J.prototype._resultCancelled=function(){Q(this.finallyHandler)};function Q(G,W){if(G.cancelPromise!=null){if(arguments.length>1)G.cancelPromise._reject(W);else G.cancelPromise._cancel();return G.cancelPromise=null,!0}return!1}function w(){return H.call(this,this.promise._target()._settledValue())}function K(G){if(Q(this,G))return;return U.e=G,U}function H(G){var W=this.promise,Z=this.handler;if(!this.called){this.called=!0;var X=this.isFinallyHandler()?Z.call(W._boundValue()):Z.call(W._boundValue(),G);if(X!==void 0){W._setReturnedNonUndefined();var L=I(X,W);if(L instanceof $ ){if(this.cancelPromise!=null){if(L._isCancelled()){var D=new q("late cancellation observer");return W._attachExtraTrace(D),U.e=D,U}else if(L.isPending())L._attachCancellationCallback(new J(this))}return L._then(w,K,void 0,this,void 0)}}}if(W.isRejected())return Q(this),U.e=G,U;else return Q(this),G}return $ .prototype._passThrough=function(G,W,Z,X){if(typeof G!=="function")return this.then();return this._then(Z,X,void 0,new Y(this,W,G),void 0)}, $ .prototype.lastly= $ .prototype.finally=function(G){return this._passThrough(G,0,H,H)}, $ .prototype.tap=function(G){return this._passThrough(G,1,H)},Y}});var f20=F((oC1,k20)=>{k20.exports=function( $ ){var I=d1(),z=II().keys,q=I.tryCatch,U=I.errorObj;function Y(J,Q,w){return function(K){var H=w._boundValue(); $ :for(var G=0;G<J.length;++G){var W=J[G];if(W===Error||W!=null&&W.prototype instanceof Error){if(K instanceof W)return q(Q).call(H,K)}else if(typeof W==="function"){var Z=q(W).call(H,K);if(Z===U)return Z;else if(Z)return q(Q).call(H,K)}else if(I.isObject(K)){var X=z(W);for(var L=0;L<X.length;++L){var D=X[L];if(W[D]!=K[D])continue $ }return q(Q).call(H,K)}}return $ }}return Y}});var Mu=F((rC1,i20)=>{var n20=d1(),pq1=n20.maybeWrapAsError,cq1=d5(),dq1=cq1.OperationalError,b20=II();function mq1( $ ){return $ instanceof Error&&b20.getPrototypeOf( $ )===Error.prototype}var lq1=/^(?:name|message|stack|cause) $ /;function oq1( $ ){var I;if(mq1( $ )){I=new dq1( $ ),I.name= $ .name,I.message= $ .message,I.stack= $ .stack;var z=b20.keys( $ );for(var q=0;q<z.length;++q){var U=z[q];if(!lq1.test(U))I[U]= $ [U]}return I}return n20.markAsOriginatingFromRejection( $ ), $ }function rq1( $ ,I){return function(z,q){if( $ ===null)return;if(z){var U=oq1(pq1(z)); $ ._attachExtraTrace(U), $ ._reject(U)}else if(!I) $ ._fulfill(q);else{var Y=arguments.length,J=Array(Math.max(Y-1,0));for(var Q=1;Q<Y;++Q)J[Q-1]=arguments[Q]; $ ._fulfill(J)} $ =null}}i20.exports=rq1});var c20=F((tC1,p20)=>{p20.exports=function( $ ,I,z,q,U){var Y=d1(),J=Y.tryCatch; $ .method=function(Q){if(typeof Q!=="function")throw new $ .TypeError("expecting a function but got "+Y.classString(Q));return function(){var w=new $ (I);w._captureStackTrace(),w._pushContext();var K=J(Q).apply(this,arguments),H=w._popContext();return U.checkForgottenReturns(K,H,"Promise.method",w),w._resolveFromSyncValue(K),w}}, $ .attempt= $ .try=function(Q){if(typeof Q!=="function")return q("expecting a function but got "+Y.classString(Q));var w=new $ (I);w._captureStackTrace(),w._pushContext();var K;if(arguments.length>1){U.deprecated("calling Promise.try with more than 1 argument");var H=arguments[1],G=arguments[2];K=Y.isArray(H)?J(Q).apply(G,H):J(Q).call(G,H)}else K=J(Q)();var W=w._popContext();return U.checkForgottenReturns(K,W,"Promise.try",w),w._resolveFromSyncValue(K),w}, $ .prototype._resolveFromSyncValue=function(Q){if(Q===Y.errorObj)this._rejectCallback(Q.e,!1);else this._resolveCallback(Q,!0)}}});var m20=F((aC1,d20)=>{d20.exports=function( $ ,I,z,q){var U=!1,Y=function(K,H){this._reject(H)},J=function(K,H){H.promiseRejectionQueued=!0,H.bindingPromise._then(Y,Y,null,this,K)},Q=function(K,H){if((this._bitField&50397184)===0)this._resolveCallback(H.target)},w=function(K,H){if(!H.promiseRejectionQueued)this._reject(K)}; $ .prototype.bind=function(K){if(!U)U=!0, $ .prototype._propagateFrom=q.propagateFromFunction(), $ .prototype._boundValue=q.boundValueFunction();var H=z(K),G=new $ (I);G._propagateFrom(this,1);var W=this._target();if(G._setBoundTo(H),H instanceof $ ){var Z={promiseRejectionQueued:!1,promise:G,target:W,bindingPromise:H};W._then(I,J,voi
Line truncated
See http : //goo.gl/MqrFmX
` );return this._settledValue()},q=I.prototype.error=I.prototype.reason=function(){if(!this.isRejected())throw TypeError( ` cannot get rejection reason of a non - rejected promise
See http : //goo.gl/MqrFmX
` );return this._settledValue()},U=I.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0},Y=I.prototype.isRejected=function(){return(this._bitField&16777216)!==0},J=I.prototype.isPending=function(){return(this._bitField&50397184)===0},Q=I.prototype.isResolved=function(){return(this._bitField&50331648)!==0};I.prototype.isCancelled=function(){return(this._bitField&8454144)!==0}, $ .prototype.__isCancelled=function(){return(this._bitField&65536)===65536}, $ .prototype._isCancelled=function(){return this._target().__isCancelled()}, $ .prototype.isCancelled=function(){return(this._target()._bitField&8454144)!==0}, $ .prototype.isPending=function(){return J.call(this._target())}, $ .prototype.isRejected=function(){return Y.call(this._target())}, $ .prototype.isFulfilled=function(){return U.call(this._target())}, $ .prototype.isResolved=function(){return Q.call(this._target())}, $ .prototype.value=function(){return z.call(this._target())}, $ .prototype.reason=function(){var w=this._target();return w._unsetRejectionIsUnhandled(),q.call(w)}, $ .prototype._value=function(){return this._settledValue()}, $ .prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()}, $ .PromiseInspection=I}});var s2 0=O ((xC 1,a 20)=>{a 20.exports=function( $ ,I,z,q,U,Y){var J=d1(),Q=J.canEvaluate,w=J.tryCatch,K=J.errorObj,H;if(Q){var G=function(T){return Function("value","holder", `
` );return this._settledValue()},U=I.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0},Y=I.prototype.isRejected=function(){return(this._bitField&16777216)!==0},J=I.prototype.isPending=function(){return(this._bitField&50397184)===0},Q=I.prototype.isResolved=function(){return(this._bitField&50331648)!==0};I.prototype.isCancelled=function(){return(this._bitField&8454144)!==0}, $ .prototype.__isCancelled=function(){return(this._bitField&65536)===65536}, $ .prototype._isCancelled=function(){return this._target().__isCancelled()}, $ .prototype.isCancelled=function(){return(this._target()._bitField&8454144)!==0}, $ .prototype.isPending=function(){return J.call(this._target())}, $ .prototype.isRejected=function(){return Y.call(this._target())}, $ .prototype.isFulfilled=function(){return U.call(this._target())}, $ .prototype.isResolved=function(){return Q.call(this._target())}, $ .prototype.value=function(){return z.call(this._target())}, $ .prototype.reason=function(){var w=this._target();return w._unsetRejectionIsUnhandled(),q.call(w)}, $ .prototype._value=function(){return this._settledValue()}, $ .prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()}, $ .PromiseInspection=I}});var $ w 0=F ((Ih 1,e 20)=>{e 20.exports=function($ ,I,z,q,U,Y){var J=d1(),Q=J.canEvaluate,w=J.tryCatch,K=J.errorObj,H;if(Q){var G=function(T){return Function("value","holder", `
'use strict' ;
holder . pIndex = value ;
holder . checkFulfillment ( this ) ;
` .replace(/Index/g,T))},W=function(T){return Function("promise","holder", `
'use strict' ;
holder . pIndex = promise ;
` .replace(/Index/g,T))},Z=function(T){var P=Array(T);for(var M=0;M<P.length;++M)P[M]="this.p"+(M+1);var v=P.join(" = ")+" = null;",u = ` var promise ;
` .replace(/Index/g,T))},Z=function(T){var P=Array(T);for(var M=0;M<P.length;++M)P[M]="this.p"+(M+1);var v=P.join(" = ")+" = null;",y = ` var promise ;
` +P.map(function(n){return `
promise = ` +n+ ` ;
if ( promise instanceof Promise ) {
@@ -129,7 +129,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof x4))r
return [ TheName ] ;
} ( tryCatch , errorObj , Promise , async ) ;
` ;return B=B.replace(/ \[ TheName \] /g,x).replace(/ \[ TheTotal \] /g,T).replace(/ \[ ThePassedArguments \] /g,h).replace(/ \[ TheProperties \] /g,v).replace(/ \[ CancellationCode \] /g,u ),Function("tryCatch","errorObj","Promise","async",B)(w,K, $ ,U)},X=[],L=[],D=[];for(var F =0;F <8;++F )X.push(Z(F +1)),L.push(G(F +1)),D.push(W(F +1));H=function(T){this._reject(T)}} $ .join=function(){var T=arguments.length-1,P;if(T>0&&typeof arguments[T]==="function"){if(P=arguments[T],T<=8&&Q){var p=new $ (q);p._captureStackTrace();var M=X[T-1],v=new M(P),u =L;for(var h=0;h<T;++h){var x=z(arguments[h],p);if(x instanceof $ ){x=x._target();var B=x._bitField;if((B&50397184)===0)x._then(u [h],H,void 0,p,v),D[h](x,v),v.asyncNeeded=!1;else if((B&33554432)!==0)u [h].call(p,x._value(),v);else if((B&16777216)!==0)p._reject(x._reason());else p._cancel()}else u [h].call(p,x,v)}if(!p._isFateSealed()){if(v.asyncNeeded){var n=Y();if(n!==null)v.fn=J.domainBind(n,v.fn)}p._setAsyncGuaranteed(),p._setOnCancel(v)}return p}}var f=arguments.length,g =Array(f);for(var k=0;k<f;++k)g [k]=arguments[k];if(P)g .pop();var p=new I(g ).promise();return P!==void 0?p.spread(P):p}}});var $ w0=O ((kC1,e2 0)=>{e2 0.exports=function( $ ,I,z,q,U,Y){var J= $ ._getDomain,Q=d1(),w=Q.tryCatch,K=Q.errorObj,H= $ ._async;function G(Z,X,L,D){this.constructor $ (Z),this._promise._captureStackTrace();var F =J();this._callback=F ===null?X:Q.domainBind(F ,X),this._preservedValues=D===U?Array(this.length()):null,this._limit=L,this._inFlight=0,this._queue=[],H.invoke(this._asyncInit,this,void 0)}Q.inherits(G,I),G.prototype._asyncInit=function(){this._init $ (void 0,-2)},G.prototype._init=function(){},G.prototype._promiseFulfilled=function(Z,X){var L=this._values,D=this.length(),F =this._preservedValues,T=this._limit;if(X<0){if(X=X*-1-1,L[X]=Z,T>=1){if(this._inFlight--,this._drainQueue(),this._isResolved())return!0}}else{if(T>=1&&this._inFlight>=T)return L[X]=Z,this._queue.push(X),!1;if(F !==null)F [X]=Z;var P=this._promise,M=this._callback,v=P._boundValue();P._pushContext();var u =w(M).call(v,Z,X,D),h=P._popContext();if(Y.checkForgottenReturns(u ,h,F !==null?"Promise.filter":"Promise.map",P),u ===K)return this._reject(u .e),!0;var x=q(u ,this._promise);if(x instanceof $ ){x=x._target();var B=x._bitField;if((B&50397184)===0){if(T>=1)this._inFlight++;return L[X]=x,x._proxy(this,(X+1)*-1),!1}else if((B&33554432)!==0)u =x._value();else if((B&16777216)!==0)return this._reject(x._reason()),!0;else return this._cancel(),!0}L[X]=u }var n=++this._totalResolved;if(n>=D){if(F !==null)this._filter(L,F );else this._resolve(L);return!0}return!1},G.prototype._drainQueue=function(){var Z=this._queue,X=this._limit,L=this._values;while(Z.length>0&&this._inFlight<X){if(this._isResolved())return;var D=Z.pop();this._promiseFulfilled(L[D],D)}},G.prototype._filter=function(Z,X){var L=X.length,D=Array(L),F =0;for(var T=0;T<L;++T)if(Z[T])D[F ++]=X[T];D.length=F ,this._resolve(D)},G.prototype.preservedValues=function(){return this._preservedValues};function W(Z,X,L,D){if(typeof X!=="function")return z("expecting a function but got "+Q.classString(X));var F =0;if(L!==void 0)if(typeof L==="object"&&L!==null){if(typeof L.concurrency!=="number")return $ .reject(TypeError("'concurrency' must be a number but it is "+Q.classString(L.concurrency)));F =L.concurrency}else return $ .reject(TypeError("options argument must be an object but it is "+Q.classString(L)));return F =typeof F ==="number"&&isFinite(F )&&F >=1?F :0,new G(Z,X,F ,D).promise()} $ .prototype.map=function(Z,X){return W(this,Z,X,null)}, $ .map=function(Z,X,L,D){return W(Z,X,L,D)}}});var z w0=O ((fC 1,I w0)=>{var DS =Object.create;if(DS)XL=DS (null),L L=DS (null),X L[" size"]=L L[" size"]=0;var X L,L L;I w0.exports=function( $ ){var I=d1(),z=I.canEvaluate,q=I.isIdentifier,U,Y,J=function(Z){return Function("ensureMethod", `
` ;return B=B.replace(/ \[ TheName \] /g,x).replace(/ \[ TheTotal \] /g,T).replace(/ \[ ThePassedArguments \] /g,h).replace(/ \[ TheProperties \] /g,v).replace(/ \[ CancellationCode \] /g,y ),Function("tryCatch","errorObj","Promise","async",B)(w,K, $ ,U)},X=[],L=[],D=[];for(var O =0;O <8;++O )X.push(Z(O +1)),L.push(G(O +1)),D.push(W(O +1));H=function(T){this._reject(T)}} $ .join=function(){var T=arguments.length-1,P;if(T>0&&typeof arguments[T]==="function"){if(P=arguments[T],T<=8&&Q){var p=new $ (q);p._captureStackTrace();var M=X[T-1],v=new M(P),y =L;for(var h=0;h<T;++h){var x=z(arguments[h],p);if(x instanceof $ ){x=x._target();var B=x._bitField;if((B&50397184)===0)x._then(y [h],H,void 0,p,v),D[h](x,v),v.asyncNeeded=!1;else if((B&33554432)!==0)y [h].call(p,x._value(),v);else if((B&16777216)!==0)p._reject(x._reason());else p._cancel()}else y [h].call(p,x,v)}if(!p._isFateSealed()){if(v.asyncNeeded){var n=Y();if(n!==null)v.fn=J.domainBind(n,v.fn)}p._setAsyncGuaranteed(),p._setOnCancel(v)}return p}}var f=arguments.length,R =Array(f);for(var k=0;k<f;++k)R [k]=arguments[k];if(P)R .pop();var p=new I(R ).promise();return P!==void 0?p.spread(P):p}}});var z w0=F ((zh1,Iw 0)=>{Iw 0.exports=function( $ ,I,z,q,U,Y){var J= $ ._getDomain,Q=d1(),w=Q.tryCatch,K=Q.errorObj,H= $ ._async;function G(Z,X,L,D){this.constructor $ (Z),this._promise._captureStackTrace();var O =J();this._callback=O ===null?X:Q.domainBind(O ,X),this._preservedValues=D===U?Array(this.length()):null,this._limit=L,this._inFlight=0,this._queue=[],H.invoke(this._asyncInit,this,void 0)}Q.inherits(G,I),G.prototype._asyncInit=function(){this._init $ (void 0,-2)},G.prototype._init=function(){},G.prototype._promiseFulfilled=function(Z,X){var L=this._values,D=this.length(),O =this._preservedValues,T=this._limit;if(X<0){if(X=X*-1-1,L[X]=Z,T>=1){if(this._inFlight--,this._drainQueue(),this._isResolved())return!0}}else{if(T>=1&&this._inFlight>=T)return L[X]=Z,this._queue.push(X),!1;if(O !==null)O [X]=Z;var P=this._promise,M=this._callback,v=P._boundValue();P._pushContext();var y =w(M).call(v,Z,X,D),h=P._popContext();if(Y.checkForgottenReturns(y ,h,O !==null?"Promise.filter":"Promise.map",P),y ===K)return this._reject(y .e),!0;var x=q(y ,this._promise);if(x instanceof $ ){x=x._target();var B=x._bitField;if((B&50397184)===0){if(T>=1)this._inFlight++;return L[X]=x,x._proxy(this,(X+1)*-1),!1}else if((B&33554432)!==0)y =x._value();else if((B&16777216)!==0)return this._reject(x._reason()),!0;else return this._cancel(),!0}L[X]=y }var n=++this._totalResolved;if(n>=D){if(O !==null)this._filter(L,O );else this._resolve(L);return!0}return!1},G.prototype._drainQueue=function(){var Z=this._queue,X=this._limit,L=this._values;while(Z.length>0&&this._inFlight<X){if(this._isResolved())return;var D=Z.pop();this._promiseFulfilled(L[D],D)}},G.prototype._filter=function(Z,X){var L=X.length,D=Array(L),O =0;for(var T=0;T<L;++T)if(Z[T])D[O ++]=X[T];D.length=O ,this._resolve(D)},G.prototype.preservedValues=function(){return this._preservedValues};function W(Z,X,L,D){if(typeof X!=="function")return z("expecting a function but got "+Q.classString(X));var O =0;if(L!==void 0)if(typeof L==="object"&&L!==null){if(typeof L.concurrency!=="number")return $ .reject(TypeError("'concurrency' must be a number but it is "+Q.classString(L.concurrency)));O =L.concurrency}else return $ .reject(TypeError("options argument must be an object but it is "+Q.classString(L)));return O =typeof O ==="number"&&isFinite(O )&&O >=1?O :0,new G(Z,X,O ,D).promise()} $ .prototype.map=function(Z,X){return W(this,Z,X,null)}, $ .map=function(Z,X,L,D){return W(Z,X,L,D)}}});var U w0=F ((qh 1,q w0)=>{var Au =Object.create;if(Au)OL=Au (null),F L=Au (null),O L[" size"]=F L[" size"]=0;var O L,F L;q w0.exports=function( $ ){var I=d1(),z=I.canEvaluate,q=I.isIdentifier,U,Y,J=function(Z){return Function("ensureMethod", `
return function ( obj ) {
'use strict'
var len = this . length ;
@@ -146,26 +146,26 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof x4))r
` .replace(/methodName/g,Z))(K)},Q=function(Z){return Function("obj", `
'use strict' ;
return obj . propertyName ;
` .replace("propertyName",Z))},w=function(Z,X,L){var D=L[Z];if(typeof D!=="function"){if(!q(Z))return null;if(D=X(Z),L[Z]=D,L[" size"]++,L[" size"]>512){var F=Object.keys(L);for(var T=0;T<256;++T)delete L[F[T]];L[" size"]=F.length-256}}return D};U=function(Z){return w(Z,J,XL)},Y=function(Z){return w(Z,Q,LL)};function K(Z,X){var L;if(Z!=null)L=Z[X];if(typeof L!=="function"){var D="Object "+I.classString(Z)+" has no method '"+I.toString(X)+"'";throw new $ .TypeError(D)}return L}function H(Z){var X=this.pop(),L=K(Z,X);return L.apply(Z,this)} $ .prototype.call=function(Z){var X=arguments.length,L=Array(Math.max(X-1,0));for(var D=1;D<X;++D)L[D-1]=arguments[D];if(z){var F=U(Z);if(F!==null)return this._then(F,void 0,void 0,L,void 0)}return L.push(Z),this._then(H,void 0,void 0,L,void 0)};function G(Z){return Z[this]}function W(Z){var X=+this;if(X<0)X=Math.max(0,X+Z.length);return Z[X]} $ .prototype.get=function(Z){var X=typeof Z==="number",L;if(!X)if(z){var D=Y(Z);L=D!==null?D:G}else L=G;else L=W;return this._then(L,void 0,void 0,Z,void 0)}}});var Uw0=O((nC1,qw0)=>{qw0.exports=function( $ ,I,z,q,U,Y){var J=d1(),Q=i5().TypeError,w=d1().inherits,K=J.errorObj,H=J.tryCatch,G={};function W(P){setTimeout(function(){throw P},0)}function Z(P){var M=z(P);if(M!==P&&typeof P._isDisposable==="function"&&typeof P._getDisposer==="function"&&P._isDisposable())M._setDisposable(P._getDisposer());return M}function X(P,M){var v=0,u=P.length,h=new $ (U);function x(){if(v>=u)return h._fulfill();var B=Z(P[v++]);if(B instanceof $ &&B._isDisposable()){try{B=z(B._getDisposer().tryDispose(M),P.promise)}catch(n){return W(n)}if(B instanceof $ )return B._then(x,W,null,null,null)}x()}return x(),h}function L(P,M,v){this._data=P,this._promise=M,this._context=v}L.prototype.data=function(){return this._data},L.prototype.promise=function(){return this._promise},L.prototype.resource=function(){if(this.promise().isFulfilled())return this.promise().value();return G},L.prototype.tryDispose=function(P){var M=this.resource(),v=this._context;if(v!==void 0)v._pushContext();var u=M!==G?this.doDispose(M,P):null;if(v!==void 0)v._popContext();return this._promise._unsetDisposable(),this._data=null,u},L.isDisposer=function(P){return P!=null&&typeof P.resource==="function"&&typeof P.tryDispose==="function"};function D(P,M,v){this.constructor $ (P,M,v)}w(D,L),D.prototype.doDispose=function(P,M){var v=this.data();return v.call(P,P,M)};function F(P){if(L.isDisposer(P))return this.resources[this.index]._setDisposable(P),P.promise();return P}function T(P){this.length=P,this.promise=null,this[P-1]=null}T.prototype._resultCancelled=function(){var P=this.length;for(var M=0;M<P;++M){var v=this[M];if(v instanceof $ )v.cancel()}}, $ .using=function(){var P=arguments.length;if(P<2)return I("you must pass at least 2 arguments to Promise.using");var M=arguments[P-1];if(typeof M!=="function")return I("expecting a function but got "+J.classString(M));var v,u=!0;if(P===2&&Array.isArray(arguments[0]))v=arguments[0],P=v.length,u=!1;else v=arguments,P--;var h=new T(P);for(var x=0;x<P;++x){var B=v[x];if(L.isDisposer(B)){var n=B;B=B.promise(),B._setDisposable(n)}else{var f=z(B);if(f instanceof $ )B=f._then(F,null,null,{resources:h,index:x},void 0)}h[x]=B}var g=Array(h.length);for(var x=0;x<g.length;++x)g[x]= $ .resolve(h[x]).reflect();var k= $ .all(g).then(function(z0){for(var R=0;R<z0.length;++R){var i=z0[R];if(i.isRejected())return K.e=i.error(),K;else if(!i.isFulfilled()){k.cancel();return}z0[R]=i.value()}p._pushContext(),M=H(M);var c=u?M.apply(void 0,z0):M(z0),r=p._popContext();return Y.checkForgottenReturns(c,r,"Promise.using",p),c}),p=k.lastly(function(){var z0=new $ .PromiseInspection(k);return X(h,z0)});return h.promise=p,p._setOnCancel(h),p}, $ .prototype._setDisposable=function(P){this._bitField=this._bitField|131072,this._disposer=P}, $ .prototype._isDisposable=function(){return(this._bitField&131072)>0}, $ .prototype._getDisposer=function(){return this._disposer}, $ .prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0}, $ .prototype.disposer=function(P){if(typeof P==="function")return new D(P,this,q());throw new Q}}});var Jw0=O((bC1,Yw0)=>{Yw0.exports=function( $ ,I,z){var q=d1(),U= $ .TimeoutError;function Y(G){this.handle=G}Y.prototype._resultCancelled=function(){clearTimeout(this.handle)};var J=function(G){return Q(+this).thenReturn(G)},Q= $ .delay=function(G,W){var Z,X;if(W!==void 0){if(Z= $ .resolve(W)._then(J,null,null,G,void 0),z.cancellation()&&W instanceof $ )Z._setOnCancel(W)}else{if(Z=new $ (I),X=setTimeout(function(){Z._fulfill()},+G),z.cancellation())Z._setOnCancel(new Y(X));Z._captureStackTrace()}return Z._setAsyncGuaranteed(),Z}; $ .prototype.delay=function(G){return Q(G,this)};var w=function(G,W,Z){var X;if(typeof W!=="string")if(W instanceof Error)X=W;else X=new U("operation timed out");else X=new U(W);if(q.markAsOriginatingFromRejection(X),G._attachExtraTrace(X),G._reject(X),Z!=null)Z.cancel()};function K(G){return clearTimeout(this.handle),G}f
Line truncated
` .replace("propertyName",Z))},w=function(Z,X,L){var D=L[Z];if(typeof D!=="function"){if(!q(Z))return null;if(D=X(Z),L[Z]=D,L[" size"]++,L[" size"]>512){var O=Object.keys(L);for(var T=0;T<256;++T)delete L[O[T]];L[" size"]=O.length-256}}return D};U=function(Z){return w(Z,J,OL)},Y=function(Z){return w(Z,Q,FL)};function K(Z,X){var L;if(Z!=null)L=Z[X];if(typeof L!=="function"){var D="Object "+I.classString(Z)+" has no method '"+I.toString(X)+"'";throw new $ .TypeError(D)}return L}function H(Z){var X=this.pop(),L=K(Z,X);return L.apply(Z,this)} $ .prototype.call=function(Z){var X=arguments.length,L=Array(Math.max(X-1,0));for(var D=1;D<X;++D)L[D-1]=arguments[D];if(z){var O=U(Z);if(O!==null)return this._then(O,void 0,void 0,L,void 0)}return L.push(Z),this._then(H,void 0,void 0,L,void 0)};function G(Z){return Z[this]}function W(Z){var X=+this;if(X<0)X=Math.max(0,X+Z.length);return Z[X]} $ .prototype.get=function(Z){var X=typeof Z==="number",L;if(!X)if(z){var D=Y(Z);L=D!==null?D:G}else L=G;else L=W;return this._then(L,void 0,void 0,Z,void 0)}}});var Jw0=F((Uh1,Yw0)=>{Yw0.exports=function( $ ,I,z,q,U,Y){var J=d1(),Q=d5().TypeError,w=d1().inherits,K=J.errorObj,H=J.tryCatch,G={};function W(P){setTimeout(function(){throw P},0)}function Z(P){var M=z(P);if(M!==P&&typeof P._isDisposable==="function"&&typeof P._getDisposer==="function"&&P._isDisposable())M._setDisposable(P._getDisposer());return M}function X(P,M){var v=0,y=P.length,h=new $ (U);function x(){if(v>=y)return h._fulfill();var B=Z(P[v++]);if(B instanceof $ &&B._isDisposable()){try{B=z(B._getDisposer().tryDispose(M),P.promise)}catch(n){return W(n)}if(B instanceof $ )return B._then(x,W,null,null,null)}x()}return x(),h}function L(P,M,v){this._data=P,this._promise=M,this._context=v}L.prototype.data=function(){return this._data},L.prototype.promise=function(){return this._promise},L.prototype.resource=function(){if(this.promise().isFulfilled())return this.promise().value();return G},L.prototype.tryDispose=function(P){var M=this.resource(),v=this._context;if(v!==void 0)v._pushContext();var y=M!==G?this.doDispose(M,P):null;if(v!==void 0)v._popContext();return this._promise._unsetDisposable(),this._data=null,y},L.isDisposer=function(P){return P!=null&&typeof P.resource==="function"&&typeof P.tryDispose==="function"};function D(P,M,v){this.constructor $ (P,M,v)}w(D,L),D.prototype.doDispose=function(P,M){var v=this.data();return v.call(P,P,M)};function O(P){if(L.isDisposer(P))return this.resources[this.index]._setDisposable(P),P.promise();return P}function T(P){this.length=P,this.promise=null,this[P-1]=null}T.prototype._resultCancelled=function(){var P=this.length;for(var M=0;M<P;++M){var v=this[M];if(v instanceof $ )v.cancel()}}, $ .using=function(){var P=arguments.length;if(P<2)return I("you must pass at least 2 arguments to Promise.using");var M=arguments[P-1];if(typeof M!=="function")return I("expecting a function but got "+J.classString(M));var v,y=!0;if(P===2&&Array.isArray(arguments[0]))v=arguments[0],P=v.length,y=!1;else v=arguments,P--;var h=new T(P);for(var x=0;x<P;++x){var B=v[x];if(L.isDisposer(B)){var n=B;B=B.promise(),B._setDisposable(n)}else{var f=z(B);if(f instanceof $ )B=f._then(O,null,null,{resources:h,index:x},void 0)}h[x]=B}var R=Array(h.length);for(var x=0;x<R.length;++x)R[x]= $ .resolve(h[x]).reflect();var k= $ .all(R).then(function(z0){for(var g=0;g<z0.length;++g){var i=z0[g];if(i.isRejected())return K.e=i.error(),K;else if(!i.isFulfilled()){k.cancel();return}z0[g]=i.value()}p._pushContext(),M=H(M);var c=y?M.apply(void 0,z0):M(z0),r=p._popContext();return Y.checkForgottenReturns(c,r,"Promise.using",p),c}),p=k.lastly(function(){var z0=new $ .PromiseInspection(k);return X(h,z0)});return h.promise=p,p._setOnCancel(h),p}, $ .prototype._setDisposable=function(P){this._bitField=this._bitField|131072,this._disposer=P}, $ .prototype._isDisposable=function(){return(this._bitField&131072)>0}, $ .prototype._getDisposer=function(){return this._disposer}, $ .prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0}, $ .prototype.disposer=function(P){if(typeof P==="function")return new D(P,this,q());throw new Q}}});var ww0=F((Yh1,Qw0)=>{Qw0.exports=function( $ ,I,z){var q=d1(),U= $ .TimeoutError;function Y(G){this.handle=G}Y.prototype._resultCancelled=function(){clearTimeout(this.handle)};var J=function(G){return Q(+this).thenReturn(G)},Q= $ .delay=function(G,W){var Z,X;if(W!==void 0){if(Z= $ .resolve(W)._then(J,null,null,G,void 0),z.cancellation()&&W instanceof $ )Z._setOnCancel(W)}else{if(Z=new $ (I),X=setTimeout(function(){Z._fulfill()},+G),z.cancellation())Z._setOnCancel(new Y(X));Z._captureStackTrace()}return Z._setAsyncGuaranteed(),Z}; $ .prototype.delay=function(G){return Q(G,this)};var w=function(G,W,Z){var X;if(typeof W!=="string")if(W instanceof Error)X=W;else X=new U("operation timed out");else X=new U(W);if(q.markAsOriginatingFromRejection(X),G._attachExtraTrace(X),G._reject(X),Z!=null)Z.cancel()};function K(G){return clearTimeout(this.handle),G}f
Line truncated
See http : //goo.gl/MqrFmX
` .replace("%s",D)+ ` From coroutine :
` +this._stack.split( `
` ).slice(1,-7).join( `
` )));return}}F=F ._target();var T=F ._bitField;if((T&50397184)===0)this._yieldedPromise=F,F ._proxy(this,null);else if((T&33554432)!==0) $ ._async.invoke(this._promiseFulfilled,this,F ._value());else if((T&16777216)!==0) $ ._async.invoke(this._promiseRejected,this,F ._reason());else this._promiseCancelled()}}, $ .coroutine=function(X,L){if(typeof X!=="function")throw new Q( ` generatorFunction must be a function
` )));return}}O=O ._target();var T=O ._bitField;if((T&50397184)===0)this._yieldedPromise=O,O ._proxy(this,null);else if((T&33554432)!==0) $ ._async.invoke(this._promiseFulfilled,this,O ._value());else if((T&16777216)!==0) $ ._async.invoke(this._promiseRejected,this,O ._reason());else this._promiseCancelled()}}, $ .coroutine=function(X,L){if(typeof X!=="function")throw new Q( ` generatorFunction must be a function
See http : //goo.gl/MqrFmX
` );var D=Object(L).yieldHandler,F =Z,T=Error().stack;return function(){var P=X.apply(this,arguments),M=new F (void 0,void 0,D,T),v=M.promise();return M._generator=P,M._promiseFulfilled(void 0),v}}, $ .coroutine.addYieldHandler=function(X){if(typeof X!=="function")throw new Q("expecting a function but got "+w.classString(X));G.push(X)}, $ .spawn=function(X){if(Y.deprecated("Promise.spawn()","Promise.coroutine()"),typeof X!=="function")return I( ` generatorFunction must be a function
` );var D=Object(L).yieldHandler,O =Z,T=Error().stack;return function(){var P=X.apply(this,arguments),M=new O (void 0,void 0,D,T),v=M.promise();return M._generator=P,M._promiseFulfilled(void 0),v}}, $ .coroutine.addYieldHandler=function(X){if(typeof X!=="function")throw new Q("expecting a function but got "+w.classString(X));G.push(X)}, $ .spawn=function(X){if(Y.deprecated("Promise.spawn()","Promise.coroutine()"),typeof X!=="function")return I( ` generatorFunction must be a function
See http : //goo.gl/MqrFmX
` );var L=new Z(X,this),D=L.promise();return L._run( $ .spawn),D}}});var H w0=O ((pC 1,K w0)=>{K w0.exports=function( $ ){var I=d1(),z= $ ._async,q=I.tryCatch,U=I.errorObj;function Y(w,K){var H=this;if(!I.isArray(w))return J.call(H,w,K);var G=q(K).apply(H._boundValue(),[null].concat(w));if(G===U)z.throwLater(G.e)}function J(w,K){var H=this,G=H._boundValue(),W=w===void 0?q(K).call(G,null):q(K).call(G,null,w);if(W===U)z.throwLater(W.e)}function Q(w,K){var H=this;if(!w){var G=Error(w+"");G.cause=w,w=G}var W=q(K).call(H._boundValue(),w);if(W===U)z.throwLater(W.e)} $ .prototype.asCallback= $ .prototype.nodeify=function(w,K){if(typeof w=="function"){var H=J;if(K!==void 0&&Object(K).spread)H=Y;this._then(H,Q,void 0,this,w)}return this}}});var W w0=O ((cC 1,G w0)=>{G w0.exports=function( $ ,I){var z={},q=d1(),U=LS (),Y=q.withAppended,J=q.maybeWrapAsError,Q=q.canEvaluate,w=i 5().TypeError,K="Async",H={__isPromisified__:!0},G=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],W=new RegExp("^(?:"+G.join("|")+") $ "),Z=function(k){return q.isIdentifier(k)&&k.charAt(0)!=="_"&&k!=="constructor"};function X(k){return!W.test(k)}function L(k){try{return k.__isPromisified__===!0}catch(p){return!1}}function D(k,p,z0){var R =q.getDataPropertyOrDefault(k,p+z0,H);return R ?L(R ):!1}function F (k,p,z0){for(var R =0;R <k.length;R +=2){var i=k[R ];if(z0.test(i)){var c=i.replace(z0,"");for(var r=0;r<k.length;r+=2)if(k[r]===c)throw new w( ` Cannot promisify an API that has normal methods with '%s' - suffix
` );var L=new Z(X,this),D=L.promise();return L._run( $ .spawn),D}}});var W w0=F ((Qh 1,G w0)=>{G w0.exports=function( $ ){var I=d1(),z= $ ._async,q=I.tryCatch,U=I.errorObj;function Y(w,K){var H=this;if(!I.isArray(w))return J.call(H,w,K);var G=q(K).apply(H._boundValue(),[null].concat(w));if(G===U)z.throwLater(G.e)}function J(w,K){var H=this,G=H._boundValue(),W=w===void 0?q(K).call(G,null):q(K).call(G,null,w);if(W===U)z.throwLater(W.e)}function Q(w,K){var H=this;if(!w){var G=Error(w+"");G.cause=w,w=G}var W=q(K).call(H._boundValue(),w);if(W===U)z.throwLater(W.e)} $ .prototype.asCallback= $ .prototype.nodeify=function(w,K){if(typeof w=="function"){var H=J;if(K!==void 0&&Object(K).spread)H=Y;this._then(H,Q,void 0,this,w)}return this}}});var Z w0=F ((wh 1,V w0)=>{V w0.exports=function( $ ,I){var z={},q=d1(),U=Mu (),Y=q.withAppended,J=q.maybeWrapAsError,Q=q.canEvaluate,w=d 5().TypeError,K="Async",H={__isPromisified__:!0},G=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],W=new RegExp("^(?:"+G.join("|")+") $ "),Z=function(k){return q.isIdentifier(k)&&k.charAt(0)!=="_"&&k!=="constructor"};function X(k){return!W.test(k)}function L(k){try{return k.__isPromisified__===!0}catch(p){return!1}}function D(k,p,z0){var g =q.getDataPropertyOrDefault(k,p+z0,H);return g ?L(g ):!1}function O (k,p,z0){for(var g =0;g <k.length;g +=2){var i=k[g ];if(z0.test(i)){var c=i.replace(z0,"");for(var r=0;r<k.length;r+=2)if(k[r]===c)throw new w( ` Cannot promisify an API that has normal methods with '%s' - suffix
See http : //goo.gl/MqrFmX
` .replace("%s",p))}}}function T(k,p,z0,R ){var i=q.inheritedDataKeys(k),c=[];for(var r=0;r<i.length;++r){var U0=i[r],G0=k[U0],A0=R ===Z?!0:Z(U0,G0,k);if(typeof G0==="function"&&!L(G0)&&!D(k,U0,p)&&R (U0,G0,k,A0))c.push(U0,G0)}return F (c,p,z0),c}var P=function(k){return k.replace(/([ $ ])/," \\ $ ")},M,v=function(k){var p=[k],z0=Math.max(0,k-1-3);for(var R =k-1;R >=z0;--R )p.push(R );for(var R =k+1;R <=3;++R )p.push(R );return p},u =function(k){return q.filledRange(k,"_arg","")},h=function(k){return q.filledRange(Math.max(k,3),"_arg","")},x=function(k){if(typeof k.length==="number")return Math.max(Math.min(k.length,1024),0);return 0};M=function(k,p,z0,R ,i,c){var r=Math.max(0,x(R )-1),U0=v(r),G0=typeof k==="string"||p===z;function A0(z1){var M0=u (z1).join(", "),Y0=z1>0?", ":"",v0;if(G0)v0= ` ret = callback . call ( this , { { args } } , nodeback ) ; break ;
` .replace("%s",p))}}}function T(k,p,z0,g ){var i=q.inheritedDataKeys(k),c=[];for(var r=0;r<i.length;++r){var U0=i[r],G0=k[U0],A0=g ===Z?!0:Z(U0,G0,k);if(typeof G0==="function"&&!L(G0)&&!D(k,U0,p)&&g (U0,G0,k,A0))c.push(U0,G0)}return O (c,p,z0),c}var P=function(k){return k.replace(/([ $ ])/," \\ $ ")},M,v=function(k){var p=[k],z0=Math.max(0,k-1-3);for(var g =k-1;g >=z0;--g )p.push(g );for(var g =k+1;g <=3;++g )p.push(g );return p},y =function(k){return q.filledRange(k,"_arg","")},h=function(k){return q.filledRange(Math.max(k,3),"_arg","")},x=function(k){if(typeof k.length==="number")return Math.max(Math.min(k.length,1024),0);return 0};M=function(k,p,z0,g ,i,c){var r=Math.max(0,x(g )-1),U0=v(r),G0=typeof k==="string"||p===z;function A0(z1){var M0=y (z1).join(", "),Y0=z1>0?", ":"",v0;if(G0)v0= ` ret = callback . call ( this , { { args } } , nodeback ) ; break ;
` ;else v0=p===void 0? ` ret = callback ( { { args } } , nodeback ) ; break ;
` : ` ret = callback . call ( receiver , { { args } } , nodeback ) ; break ;
` ;return v0.replace("{{args}}",M0).replace(", ",Y0)}function R 0(){var z1="";for(var M0=0;M0<U0.length;++M0)z1+="case "+U0[M0]+":"+A0(U0[M0]);return z1+= `
` ;return v0.replace("{{args}}",M0).replace(", ",Y0)}function g 0(){var z1="";for(var M0=0;M0<U0.length;++M0)z1+="case "+U0[M0]+":"+A0(U0[M0]);return z1+= `
default :
var args = new Array ( len + 1 ) ;
var i = 0 ;
@@ -197,25 +197,25 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof x4))r
} ;
notEnumerableProp ( ret , '__isPromisified__' , true ) ;
return ret ;
` .replace("[CodeForSwitchCase]",R 0()).replace("[GetFunctionCode]",Q1);return f0=f0.replace("Parameters",h(r)),Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",f0)( $ ,R ,p,Y,J,U,q.tryCatch,q.errorObj,q.notEnumerableProp,I)};function B(k,p,z0,R ,i,c){var r=function(){return this}(),U0=k;if(typeof U0==="string")k=R ;function G0(){var A0=p;if(p===z)A0=this;var R 0=new $ (I);R 0._captureStackTrace();var Q1=typeof U0==="string"&&this!==r?this[U0]:k,f0=U(R 0,c);try{Q1.apply(A0,Y(arguments,f0))}catch(z1){R 0._rejectCallback(J(z1),!0,!0)}if(!R 0._isFateSealed())R 0._setAsyncGuaranteed();return R 0}return q.notEnumerableProp(G0,"__isPromisified__",!0),G0}var n=Q?M:B;function f(k,p,z0,R ,i){var c=new RegExp(P(p)+" $ "),r=T(k,p,c,z0);for(var U0=0,G0=r.length;U0<G0;U0+=2){var A0=r[U0],R 0=r[U0+1],Q1=A0+p;if(R ===n)k[Q1]=n(A0,z,A0,R 0,p,i);else{var f0=R(R 0,function(){return n(A0,z,A0,R 0,p,i)});q.notEnumerableProp(f0,"__isPromisified__",!0),k[Q1]=f0}}return q.toFastProperties(k),k}function g (k,p,z0){return n(k,p,void 0,k,null,z0)} $ .promisify=function(k,p){if(typeof k!=="function")throw new w("expecting a function but got "+q.classString(k));if(L(k))return k;p=Object(p);var z0=p.context===void 0?z:p.context,R =!!p.multiArgs,i=g (k,z0,R );return q.copyDescriptors(k,i,X),i}, $ .promisifyAll=function(k,p){if(typeof k!=="function"&&typeof k!=="object")throw new w( ` the target of promisifyAll must be an object or a function
` .replace("[CodeForSwitchCase]",g 0()).replace("[GetFunctionCode]",Q1);return f0=f0.replace("Parameters",h(r)),Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",f0)( $ ,g ,p,Y,J,U,q.tryCatch,q.errorObj,q.notEnumerableProp,I)};function B(k,p,z0,g ,i,c){var r=function(){return this}(),U0=k;if(typeof U0==="string")k=g ;function G0(){var A0=p;if(p===z)A0=this;var g 0=new $ (I);g 0._captureStackTrace();var Q1=typeof U0==="string"&&this!==r?this[U0]:k,f0=U(g 0,c);try{Q1.apply(A0,Y(arguments,f0))}catch(z1){g 0._rejectCallback(J(z1),!0,!0)}if(!g 0._isFateSealed())g 0._setAsyncGuaranteed();return g 0}return q.notEnumerableProp(G0,"__isPromisified__",!0),G0}var n=Q?M:B;function f(k,p,z0,g ,i){var c=new RegExp(P(p)+" $ "),r=T(k,p,c,z0);for(var U0=0,G0=r.length;U0<G0;U0+=2){var A0=r[U0],g 0=r[U0+1],Q1=A0+p;if(g ===n)k[Q1]=n(A0,z,A0,g 0,p,i);else{var f0=g(g 0,function(){return n(A0,z,A0,g 0,p,i)});q.notEnumerableProp(f0,"__isPromisified__",!0),k[Q1]=f0}}return q.toFastProperties(k),k}function R (k,p,z0){return n(k,p,void 0,k,null,z0)} $ .promisify=function(k,p){if(typeof k!=="function")throw new w("expecting a function but got "+q.classString(k));if(L(k))return k;p=Object(p);var z0=p.context===void 0?z:p.context,g =!!p.multiArgs,i=R (k,z0,g );return q.copyDescriptors(k,i,X),i}, $ .promisifyAll=function(k,p){if(typeof k!=="function"&&typeof k!=="object")throw new w( ` the target of promisifyAll must be an object or a function
See http : //goo.gl/MqrFmX
` );p=Object(p);var z0=!!p.multiArgs,R =p.suffix;if(typeof R !=="string")R =K;var i=p.filter;if(typeof i!=="function")i=Z;var c=p.promisifier;if(typeof c!=="function")c=n;if(!q.isIdentifier(R ))throw RangeError( ` suffix must be a valid identifier
` );p=Object(p);var z0=!!p.multiArgs,g =p.suffix;if(typeof g !=="string")g =K;var i=p.filter;if(typeof i!=="function")i=Z;var c=p.promisifier;if(typeof c!=="function")c=n;if(!q.isIdentifier(g ))throw RangeError( ` suffix must be a valid identifier
See http : //goo.gl/MqrFmX
` );var r=q.inheritedDataKeys(k);for(var U0=0;U0<r.length;++U0){var G0=k[r[U0]];if(r[U0]!=="constructor"&&q.isClass(G0))f(G0.prototype,R ,i,c,z0),f(G0,R ,i,c,z0)}return f(k,R ,i,c,z0)}}});var Z w0=O ((dC 1,V w0)=>{V w0.exports=function( $ ,I,z,q){var U=d1(),Y=U.isObject,J=e3 (),Q;if(typeof Map==="function")Q=Map;var w=function(){var W=0,Z=0;function X(L,D){this[W]=L,this[W+Z]=D,W++}return function(D){Z=D.size,W=0;var F =Array(D.size*2);return D.forEach(X,F ),F }}(),K=function(W){var Z=new Q,X=W.length/2|0;for(var L=0;L<X;++L){var D=W[X+L],F =W[L];Z.set(D,F )}return Z};function H(W){var Z=!1,X;if(Q!==void 0&&W instanceof Q)X=w(W),Z=!0;else{var L=J.keys(W),D=L.length;X=Array(D*2);for(var F =0;F <D;++F ){var T=L[F ];X[F ]=W[T],X[F +D]=T}}this.constructor $ (X),this._isMap=Z,this._init $ (void 0,-3)}U.inherits(H,I),H.prototype._init=function(){},H.prototype._promiseFulfilled=function(W,Z){this._values[Z]=W;var X=++this._totalResolved;if(X>=this._length){var L;if(this._isMap)L=K(this._values);else{L={};var D=this.length();for(var F =0,T=this.length();F <T;++F )L[this._values[F +D]]=this._values[F ]}return this._resolve(L),!0}return!1},H.prototype.shouldCopyValues=function(){return!1},H.prototype.getActualLength=function(W){return W>>1};function G(W){var Z,X=z(W);if(!Y(X))return q( ` cannot await properties of a non - object
` );var r=q.inheritedDataKeys(k);for(var U0=0;U0<r.length;++U0){var G0=k[r[U0]];if(r[U0]!=="constructor"&&q.isClass(G0))f(G0.prototype,g ,i,c,z0),f(G0,g ,i,c,z0)}return f(k,g ,i,c,z0)}}});var L w0=F ((Kh 1,X w0)=>{X w0.exports=function( $ ,I,z,q){var U=d1(),Y=U.isObject,J=II (),Q;if(typeof Map==="function")Q=Map;var w=function(){var W=0,Z=0;function X(L,D){this[W]=L,this[W+Z]=D,W++}return function(D){Z=D.size,W=0;var O =Array(D.size*2);return D.forEach(X,O ),O }}(),K=function(W){var Z=new Q,X=W.length/2|0;for(var L=0;L<X;++L){var D=W[X+L],O =W[L];Z.set(D,O )}return Z};function H(W){var Z=!1,X;if(Q!==void 0&&W instanceof Q)X=w(W),Z=!0;else{var L=J.keys(W),D=L.length;X=Array(D*2);for(var O =0;O <D;++O ){var T=L[O ];X[O ]=W[T],X[O +D]=T}}this.constructor $ (X),this._isMap=Z,this._init $ (void 0,-3)}U.inherits(H,I),H.prototype._init=function(){},H.prototype._promiseFulfilled=function(W,Z){this._values[Z]=W;var X=++this._totalResolved;if(X>=this._length){var L;if(this._isMap)L=K(this._values);else{L={};var D=this.length();for(var O =0,T=this.length();O <T;++O )L[this._values[O +D]]=this._values[O ]}return this._resolve(L),!0}return!1},H.prototype.shouldCopyValues=function(){return!1},H.prototype.getActualLength=function(W){return W>>1};function G(W){var Z,X=z(W);if(!Y(X))return q( ` cannot await properties of a non - object
See http : //goo.gl/MqrFmX
` );else if(X instanceof $ )Z=X._then( $ .props,void 0,void 0,void 0,void 0);else Z=new H(X).promise();if(X instanceof $ )Z._propagateFrom(X,2);return Z} $ .prototype.props=function(){return G(this)}, $ .props=function(W){return G(W)}}});var Lw0=O((mC1,Xw0)=>{Xw0.exports=function( $ ,I,z,q){var U=d1(),Y=function(Q){return Q.then(function(w){return J(w,Q)})};function J(Q,w){var K=z(Q);if(K instanceof $ )return Y(K);else if(Q=U.asArray(Q),Q===null)return q("expecting an array or an iterable object but got "+U.classString(Q));var H=new $ (I);if(w!==void 0)H._propagateFrom(w,3);var{_fulfill:G,_reject:W}=H;for(var Z=0,X=Q.length;Z<X;++Z){var L=Q[Z];if(L===void 0&&!(Z in Q))continue; $ .cast(L)._then(G,W,void 0,H,null)}return H} $ .race=function(Q){return J(Q,void 0)}, $ .prototype.race=function(){return J(this,void 0)}}});var Fw0=O((lC1,Dw0)=>{Dw0.exports=function( $ ,I,z,q,U,Y){var J= $ ._getDomain,Q=d1(),w=Q.tryCatch;function K(X,L,D,F){this.constructor $ (X);var T=J();if(this._fn=T===null?L:Q.domainBind(T,L),D!==void 0)D= $ .resolve(D),D._attachCancellationCallback(this);if(this._initialValue=D,this._currentCancellable=null,F===U)this._eachValues=Array(this._length);else if(F===0)this._eachValues=null;else this._eachValues=void 0;this._promise._captureStackTrace(),this._init $ (void 0,-5)}Q.inherits(K,I),K.prototype._gotAccum=function(X){if(this._eachValues!==void 0&&this._eachValues!==null&&X!==U)this._eachValues.push(X)},K.prototype._eachComplete=function(X){if(this._eachValues!==null)this._eachValues.push(X);return this._eachValues},K.prototype._init=function(){},K.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==void 0?this._eachValues:this._initialValue)},K.prototype.shouldCopyValues=function(){return!1},K.prototype._resolve=function(X){this._promise._resolveCallback(X),this._values=null},K.prototype._resultCancelled=function(X){if(X===this._initialValue)return this._cancel();if(this._isResolved())return;if(this._resultCancelled $ (),this._currentCancellable instanceof $ )this._currentCancellable.cancel();if(this._initialValue instanceof $ )this._initialValue.cancel()},K.prototype._iterate=function(X){this._values=X;var L,D,F=X.length;if(this._initialValue!==void 0)L=this._initialValue,D=0;else L= $ .resolve(X[0]),D=1;if(this._currentCancellable=L,!L.isRejected())for(;D<F;++D){var T={accum:null,value:X[D],index:D,length:F,array:this};L=L._then(W,void 0,void 0,T,void 0)}if(this._eachValues!==void 0)L=L._then(this._eachComplete,void 0,void 0,this,void 0);L._then(H,H,void 0,L,this)}, $ .prototype.reduce=function(X,L){return G(this,X,L,null)}, $ .reduce=function(X,L,D,F){return G(X,L,D,F)};function H(X,L){if(this.isFulfilled())L._resolve(X);else L._reject(X)}function G(X,L,D,F){if(typeof L!=="function")return z("expecting a function but got "+Q.classString(L));var T=new K(X,L,D,F);return T.promise()}function W(X){this.accum=X,this.array._gotAccum(X);var L=q(this.value,this.array._promise);if(L instanceof $ )return this.array._currentCancellable=L,L._then(Z,void 0,void 0,this,void 0);else return Z.call(this,L)}function Z(X){var L=this.array,D=L._promise,F=w(L._fn);D._pushContext();var T;if(L._eachValues!==void 0)T=F.call(D._boundValue(),X,this.index,this.length);else T=F.call(D._boundValue(),this.accum,X,this.index,this.length);if(T instanceof $ )L._currentCancellable=T;var P=D._popContext();return Y.checkForgottenReturns(T,P,L._eachValues!==void 0?"Promise.each":"Promise.reduce",D),T}}});var Nw0=O((oC1,Ow0)=>{Ow0.exports=function( $ ,I,z){var q= $ .PromiseInspection,U=d1();function Y(J){this.constructor $ (J)}U.inherits(Y,I),Y.prototype._promiseResolved=function(J,Q){this._values[J]=Q;var w=++this._totalResolved;if(w>=this._length)return this._resolve(this._values),!0;return!1},Y.prototype._promiseFulfilled=function(J,Q){var w=new q;return w._bitField=33554432,w._settledValueField=J,this._promiseResolved(Q,w)},Y.prototype._promiseRejected=function(J,Q){var w=new q;return w._bitField=16777216,w._settledValueField=J,this._promiseResolved(Q,w)}, $ .settle=function(J){return z.deprecated(".settle()",".reflect()"),new Y(J).promise()}, $ .prototype.settle=function(){return $ .settle(this)}}});var Aw0=O((rC1,Mw0)=>{Mw0.exports=function( $ ,I,z){var q=d1(),U=i5().RangeError,Y=i5().AggregateError,J=q.isArray,Q={};function w(H){this.constructor $ (H),this._howMany=0,this._unwrap=!1,this._initialized=!1}q.inherits(w,I),w.prototype._init=function(){if(!this._initialized)return;if(this._howMany===0){this._resolve([]);return}this._init $ (void 0,-5);var H=J(this._values);if(!this._isResolved()&&H&&this._howMany>this._canPossiblyFulfill())this._reject(this._getRangeError(this.length()))},w.prototype.init=function(){this._initialized=!0,this._init()},w.prototype.setUnwrap=function(){this._unwrap=!0},w.prototype.howMany=function(){return this._howMany},w.prototype.setHowMany=function(H){this._howMany=H},w.prototype._promiseFulfilled=function(H){if(this._addFulfilled(H),this._fulfilled()===this.howMany()){if(this._values.length=this.howMany(),this.howMany()=
Line truncated
` );else if(X instanceof $ )Z=X._then( $ .props,void 0,void 0,void 0,void 0);else Z=new H(X).promise();if(X instanceof $ )Z._propagateFrom(X,2);return Z} $ .prototype.props=function(){return G(this)}, $ .props=function(W){return G(W)}}});var Ow0=F((Hh1,Dw0)=>{Dw0.exports=function( $ ,I,z,q){var U=d1(),Y=function(Q){return Q.then(function(w){return J(w,Q)})};function J(Q,w){var K=z(Q);if(K instanceof $ )return Y(K);else if(Q=U.asArray(Q),Q===null)return q("expecting an array or an iterable object but got "+U.classString(Q));var H=new $ (I);if(w!==void 0)H._propagateFrom(w,3);var{_fulfill:G,_reject:W}=H;for(var Z=0,X=Q.length;Z<X;++Z){var L=Q[Z];if(L===void 0&&!(Z in Q))continue; $ .cast(L)._then(G,W,void 0,H,null)}return H} $ .race=function(Q){return J(Q,void 0)}, $ .prototype.race=function(){return J(this,void 0)}}});var Nw0=F((Gh1,Fw0)=>{Fw0.exports=function( $ ,I,z,q,U,Y){var J= $ ._getDomain,Q=d1(),w=Q.tryCatch;function K(X,L,D,O){this.constructor $ (X);var T=J();if(this._fn=T===null?L:Q.domainBind(T,L),D!==void 0)D= $ .resolve(D),D._attachCancellationCallback(this);if(this._initialValue=D,this._currentCancellable=null,O===U)this._eachValues=Array(this._length);else if(O===0)this._eachValues=null;else this._eachValues=void 0;this._promise._captureStackTrace(),this._init $ (void 0,-5)}Q.inherits(K,I),K.prototype._gotAccum=function(X){if(this._eachValues!==void 0&&this._eachValues!==null&&X!==U)this._eachValues.push(X)},K.prototype._eachComplete=function(X){if(this._eachValues!==null)this._eachValues.push(X);return this._eachValues},K.prototype._init=function(){},K.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==void 0?this._eachValues:this._initialValue)},K.prototype.shouldCopyValues=function(){return!1},K.prototype._resolve=function(X){this._promise._resolveCallback(X),this._values=null},K.prototype._resultCancelled=function(X){if(X===this._initialValue)return this._cancel();if(this._isResolved())return;if(this._resultCancelled $ (),this._currentCancellable instanceof $ )this._currentCancellable.cancel();if(this._initialValue instanceof $ )this._initialValue.cancel()},K.prototype._iterate=function(X){this._values=X;var L,D,O=X.length;if(this._initialValue!==void 0)L=this._initialValue,D=0;else L= $ .resolve(X[0]),D=1;if(this._currentCancellable=L,!L.isRejected())for(;D<O;++D){var T={accum:null,value:X[D],index:D,length:O,array:this};L=L._then(W,void 0,void 0,T,void 0)}if(this._eachValues!==void 0)L=L._then(this._eachComplete,void 0,void 0,this,void 0);L._then(H,H,void 0,L,this)}, $ .prototype.reduce=function(X,L){return G(this,X,L,null)}, $ .reduce=function(X,L,D,O){return G(X,L,D,O)};function H(X,L){if(this.isFulfilled())L._resolve(X);else L._reject(X)}function G(X,L,D,O){if(typeof L!=="function")return z("expecting a function but got "+Q.classString(L));var T=new K(X,L,D,O);return T.promise()}function W(X){this.accum=X,this.array._gotAccum(X);var L=q(this.value,this.array._promise);if(L instanceof $ )return this.array._currentCancellable=L,L._then(Z,void 0,void 0,this,void 0);else return Z.call(this,L)}function Z(X){var L=this.array,D=L._promise,O=w(L._fn);D._pushContext();var T;if(L._eachValues!==void 0)T=O.call(D._boundValue(),X,this.index,this.length);else T=O.call(D._boundValue(),this.accum,X,this.index,this.length);if(T instanceof $ )L._currentCancellable=T;var P=D._popContext();return Y.checkForgottenReturns(T,P,L._eachValues!==void 0?"Promise.each":"Promise.reduce",D),T}}});var Aw0=F((Wh1,Mw0)=>{Mw0.exports=function( $ ,I,z){var q= $ .PromiseInspection,U=d1();function Y(J){this.constructor $ (J)}U.inherits(Y,I),Y.prototype._promiseResolved=function(J,Q){this._values[J]=Q;var w=++this._totalResolved;if(w>=this._length)return this._resolve(this._values),!0;return!1},Y.prototype._promiseFulfilled=function(J,Q){var w=new q;return w._bitField=33554432,w._settledValueField=J,this._promiseResolved(Q,w)},Y.prototype._promiseRejected=function(J,Q){var w=new q;return w._bitField=16777216,w._settledValueField=J,this._promiseResolved(Q,w)}, $ .settle=function(J){return z.deprecated(".settle()",".reflect()"),new Y(J).promise()}, $ .prototype.settle=function(){return $ .settle(this)}}});var Tw0=F((Vh1,Pw0)=>{Pw0.exports=function( $ ,I,z){var q=d1(),U=d5().RangeError,Y=d5().AggregateError,J=q.isArray,Q={};function w(H){this.constructor $ (H),this._howMany=0,this._unwrap=!1,this._initialized=!1}q.inherits(w,I),w.prototype._init=function(){if(!this._initialized)return;if(this._howMany===0){this._resolve([]);return}this._init $ (void 0,-5);var H=J(this._values);if(!this._isResolved()&&H&&this._howMany>this._canPossiblyFulfill())this._reject(this._getRangeError(this.length()))},w.prototype.init=function(){this._initialized=!0,this._init()},w.prototype.setUnwrap=function(){this._unwrap=!0},w.prototype.howMany=function(){return this._howMany},w.prototype.setHowMany=function(H){this._howMany=H},w.prototype._promiseFulfilled=function(H){if(this._addFulfilled(H),this._fulfilled()===this.howMany()){if(this._values.length=this.howMany(),this.howMany()=
Line truncated
See http : //goo.gl/MqrFmX
` );var W=new w(H),Z=W.promise();return W.setHowMany(G),W.init(),Z} $ .some=function(H,G){return K(H,G)}, $ .prototype.some=function(H){return K(this,H)}, $ ._SomePromiseArray=w}});var T w0=O ((tC 1,P w0)=>{P w0.exports=function( $ ,I){var z= $ .map; $ .prototype.filter=function(q,U){return z(this,q,U,I)}, $ .filter=function(q,U,Y){return z(q,U,Y,I)}}});var B w0=O ((aC 1,E w0)=>{E w0.exports=function( $ ,I){var{reduce:z,all:q}= $ ;function U(){return q(this)}function Y(J,Q){return z(J,Q,I,I)} $ .prototype.each=function(J){return z(this,J,I,0)._then(U,void 0,void 0,this,void 0)}, $ .prototype.mapSeries=function(J){return z(this,J,I,I)}, $ .each=function(J,Q){return z(J,Q,I,0)._then(U,void 0,void 0,J,void 0)}, $ .mapSeries=Y}});var v w0=O ((sC 1,j w0)=>{j w0.exports=function( $ ){var I= $ ._SomePromiseArray;function z(q){var U=new I(q),Y=U.promise();return U.setHowMany(1),U.setUnwrap(),U.init(),Y} $ .any=function(q){return z(q)}, $ .prototype.any=function(){return z(this)}}});var R w0=O ((eC1,FS )=>{FS .exports=function(){var $ =function(){return new G( ` circular promise resolution chain
` );var W=new w(H),Z=W.promise();return W.setHowMany(G),W.init(),Z} $ .some=function(H,G){return K(H,G)}, $ .prototype.some=function(H){return K(this,H)}, $ ._SomePromiseArray=w}});var B w0=F ((Zh 1,E w0)=>{E w0.exports=function( $ ,I){var z= $ .map; $ .prototype.filter=function(q,U){return z(this,q,U,I)}, $ .filter=function(q,U,Y){return z(q,U,Y,I)}}});var v w0=F ((Xh 1,j w0)=>{j w0.exports=function( $ ,I){var{reduce:z,all:q}= $ ;function U(){return q(this)}function Y(J,Q){return z(J,Q,I,I)} $ .prototype.each=function(J){return z(this,J,I,0)._then(U,void 0,void 0,this,void 0)}, $ .prototype.mapSeries=function(J){return z(this,J,I,I)}, $ .each=function(J,Q){return z(J,Q,I,0)._then(U,void 0,void 0,J,void 0)}, $ .mapSeries=Y}});var R w0=F ((Lh 1,g w0)=>{g w0.exports=function( $ ){var I= $ ._SomePromiseArray;function z(q){var U=new I(q),Y=U.promise();return U.setHowMany(1),U.setUnwrap(),U.init(),Y} $ .any=function(q){return z(q)}, $ .prototype.any=function(){return z(this)}}});var _ w0=F ((Dh1,Pu )=>{Pu .exports=function(){var $ =function(){return new G( ` circular promise resolution chain
See http : //goo.gl/MqrFmX
` )},I=function(){return new g .PromiseInspection(this._target())},z=function(R ){return g .reject(new G(R ))};function q(){}var U={},Y=d1(),J;if(Y.isNode)J=function(){var R =process.domain;if(R ===void 0)R =null;return R };else J=function(){return null};Y.notEnumerableProp(g ,"_getDomain",J);var Q=e3 (),w=A 20(),K=new w;Q.defineProperty(g ,"_async",{value:K});var H=i 5(),G=g .TypeError=H.TypeError;g .RangeError=H.RangeError;var W=g .CancellationError=H.CancellationError;g .TimeoutError=H.TimeoutError,g .OperationalError=H.OperationalError,g .RejectionError=H.OperationalError,g .AggregateError=H.AggregateError;var Z=function(){},X={},L={},D=j 20()(g ,Z),F=R 20()(g ,Z,D,z,q),T=_ 20()(g ),P=T.create,M=h 20()(g ,T),v=M.CapturedTrace,u=y 20()(g ,D),h=x 20()(L),x=LS (),B=Y.errorObj,n=Y.tryCatch;function f(R ,i){if(typeof i!=="function")throw new G("expecting a function but got "+Y.classString(i));if(R .constructor!==g )throw new G( ` the promise constructor cannot be invoked directly
` )},I=function(){return new R .PromiseInspection(this._target())},z=function(g ){return R .reject(new G(g ))};function q(){}var U={},Y=d1(),J;if(Y.isNode)J=function(){var g =process.domain;if(g ===void 0)g =null;return g };else J=function(){return null};Y.notEnumerableProp(R ,"_getDomain",J);var Q=II (),w=T 20(),K=new w;Q.defineProperty(R ,"_async",{value:K});var H=d 5(),G=R .TypeError=H.TypeError;R .RangeError=H.RangeError;var W=R .CancellationError=H.CancellationError;R .TimeoutError=H.TimeoutError,R .OperationalError=H.OperationalError,R .RejectionError=H.OperationalError,R .AggregateError=H.AggregateError;var Z=function(){},X={},L={},D=g 20()(R ,Z),O=_ 20()(R ,Z,D,z,q),T=h 20()(R ),P=T.create,M=S 20()(R ,T),v=M.CapturedTrace,y=x 20()(R ,D),h=f 20()(L),x=Mu (),B=Y.errorObj,n=Y.tryCatch;function f(g ,i){if(typeof i!=="function")throw new G("expecting a function but got "+Y.classString(i));if(g .constructor!==R )throw new G( ` the promise constructor cannot be invoked directly
See http : //goo.gl/MqrFmX
` )}function g(R){if(this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,R!==Z)f(this,R),this._resolveFromExecutor(R);this._promiseCreated(),this._fireEvent("promiseCreated",this)}g.prototype.toString=function(){return"[object Promise]"},g.prototype.caught=g.prototype.catch=function(R){var i=arguments.length;if(i>1){var c=Array(i-1),r=0,U0;for(U0=0;U0<i-1;++U0){var G0=arguments[U0];if(Y.isObject(G0))c[r++]=G0;else return z("expecting an object but got A catch statement predicate "+Y.classString(G0))}return c.length=r,R=arguments[U0],this.then(void 0,h(c,R,this))}return this.then(void 0,R)},g.prototype.reflect=function(){return this._then(I,I,void 0,this,void 0)},g.prototype.then=function(R,i){if(M.warnings()&&arguments.length>0&&typeof R!=="function"&&typeof i!=="function"){var c=".then() only accepts functions but was passed: "+Y.classString(R);if(arguments.length>1)c+=", "+Y.classString(i);this._warn(c)}return this._then(R,i,void 0,void 0,void 0)},g.prototype.done=function(R,i){var c=this._then(R,i,void 0,void 0,void 0);c._setIsFinal()},g.prototype.spread=function(R){if(typeof R!=="function")return z("expecting a function but got "+Y.classString(R));return this.all()._then(R,void 0,void 0,X,void 0)},g.prototype.toJSON=function(){var R={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};if(this.isFulfilled())R.fulfillmentValue=this.value(),R.isFulfilled=!0;else if(this.isRejected())R.rejectionReason=this.reason(),R.isRejected=!0;return R},g.prototype.all=function(){if(arguments.length>0)this._warn(".all() was passed arguments but it does not take any");return new F(this).promise()},g.prototype.error=function(R){return this.caught(Y.originatesFromRejection,R)},g.getNewLibraryCopy=FS.exports,g.is=function(R){return R instanceof g},g.fromNode=g.fromCallback=function(R){var i=new g(Z);i._captureStackTrace();var c=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=n(R)(x(i,c));if(r===B)i._rejectCallback(r.e,!0);if(!i._isFateSealed())i._setAsyncGuaranteed();return i},g.all=function(R){return new F(R).promise()},g.cast=function(R){var i=D(R);if(!(i instanceof g))i=new g(Z),i._captureStackTrace(),i._setFulfilled(),i._rejectionHandler0=R;return i},g.resolve=g.fulfilled=g.cast,g.reject=g.rejected=function(R){var i=new g(Z);return i._captureStackTrace(),i._rejectCallback(R,!0),i},g.setScheduler=function(R){if(typeof R!=="function")throw new G("expecting a function but got "+Y.classString(R));return K.setScheduler(R)},g.prototype._then=function(R,i,c,r,U0){var G0=U0!==void 0,A0=G0?U0:new g(Z),R0=this._target(),Q1=R0._bitField;if(!G0){if(A0._propagateFrom(this,3),A0._captureStackTrace(),r===void 0&&(this._bitField&2097152)!==0)if((Q1&50397184)!==0)r=this._boundValue();else r=R0===this?void 0:this._boundTo;this._fireEvent("promiseChained",this,A0)}var f0=J();if((Q1&50397184)!==0){var z1,M0,Y0=R0._settlePromiseCtx;if((Q1&33554432)!==0)M0=R0._rejectionHandler0,z1=R;else if((Q1&16777216)!==0)M0=R0._fulfillmentHandler0,z1=i,R0._unsetRejectionIsUnhandled();else Y0=R0._settlePromiseLateCancellationObserver,M0=new W("late cancellation observer"),R0._attachExtraTrace(M0),z1=i;K.invoke(Y0,R0,{handler:f0===null?z1:typeof z1==="function"&&Y.domainBind(f0,z1),promise:A0,receiver:r,value:M0})}else R0._addCallbacks(R,i,A0,r,f0);return A0},g.prototype._length=function(){return this._bitField&65535},g.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0},g.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864},g.prototype._setLength=function(R){this._bitField=this._bitField&-65536|R&65535},g.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432,this._fireEvent("promiseFulfilled",this)},g.prototype._setRejected=function(){this._bitField=this._bitField|16777216,this._fireEvent("promiseRejected",this)},g.prototype._setFollowing=function(){this._bitField=this._bitField|67108864,this._fireEvent("promiseResolved",this)},g.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304},g.prototype._isFinal=function(){return(this._bitField&4194304)>0},g.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},g.prototype._setCancelled=function(){this._bitField=this._bitField|65536,this._fireEvent("promiseCancelled",this)},g.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608},g.prototype._setAsyncGuaranteed=function(){if(K.hasCustomScheduler())return;this._bitField=this._bitField|134217728},g.prototype._receiverAt=function(R){var i=R===0?this._receiver0:this[R*4-4+3];if(i===U)return;else if(i===void 0&&this._isBound())return this._boundValue();return i},g.prototype._promiseAt=function(R){return this[R*4-4+2]},g.prototype._fulfillmentHandlerAt=function(R){return this[R*4-4+0]},g.prototype._rejectionHandlerAt=function(R){return this[R*4-4+1]},g.prototype._boundValue=function(){},g.prototype._migrateCallback0=function(R){var{_bit
Line truncated
` )}function R(g){if(this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,g!==Z)f(this,g),this._resolveFromExecutor(g);this._promiseCreated(),this._fireEvent("promiseCreated",this)}R.prototype.toString=function(){return"[object Promise]"},R.prototype.caught=R.prototype.catch=function(g){var i=arguments.length;if(i>1){var c=Array(i-1),r=0,U0;for(U0=0;U0<i-1;++U0){var G0=arguments[U0];if(Y.isObject(G0))c[r++]=G0;else return z("expecting an object but got A catch statement predicate "+Y.classString(G0))}return c.length=r,g=arguments[U0],this.then(void 0,h(c,g,this))}return this.then(void 0,g)},R.prototype.reflect=function(){return this._then(I,I,void 0,this,void 0)},R.prototype.then=function(g,i){if(M.warnings()&&arguments.length>0&&typeof g!=="function"&&typeof i!=="function"){var c=".then() only accepts functions but was passed: "+Y.classString(g);if(arguments.length>1)c+=", "+Y.classString(i);this._warn(c)}return this._then(g,i,void 0,void 0,void 0)},R.prototype.done=function(g,i){var c=this._then(g,i,void 0,void 0,void 0);c._setIsFinal()},R.prototype.spread=function(g){if(typeof g!=="function")return z("expecting a function but got "+Y.classString(g));return this.all()._then(g,void 0,void 0,X,void 0)},R.prototype.toJSON=function(){var g={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};if(this.isFulfilled())g.fulfillmentValue=this.value(),g.isFulfilled=!0;else if(this.isRejected())g.rejectionReason=this.reason(),g.isRejected=!0;return g},R.prototype.all=function(){if(arguments.length>0)this._warn(".all() was passed arguments but it does not take any");return new O(this).promise()},R.prototype.error=function(g){return this.caught(Y.originatesFromRejection,g)},R.getNewLibraryCopy=Pu.exports,R.is=function(g){return g instanceof R},R.fromNode=R.fromCallback=function(g){var i=new R(Z);i._captureStackTrace();var c=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=n(g)(x(i,c));if(r===B)i._rejectCallback(r.e,!0);if(!i._isFateSealed())i._setAsyncGuaranteed();return i},R.all=function(g){return new O(g).promise()},R.cast=function(g){var i=D(g);if(!(i instanceof R))i=new R(Z),i._captureStackTrace(),i._setFulfilled(),i._rejectionHandler0=g;return i},R.resolve=R.fulfilled=R.cast,R.reject=R.rejected=function(g){var i=new R(Z);return i._captureStackTrace(),i._rejectCallback(g,!0),i},R.setScheduler=function(g){if(typeof g!=="function")throw new G("expecting a function but got "+Y.classString(g));return K.setScheduler(g)},R.prototype._then=function(g,i,c,r,U0){var G0=U0!==void 0,A0=G0?U0:new R(Z),g0=this._target(),Q1=g0._bitField;if(!G0){if(A0._propagateFrom(this,3),A0._captureStackTrace(),r===void 0&&(this._bitField&2097152)!==0)if((Q1&50397184)!==0)r=this._boundValue();else r=g0===this?void 0:this._boundTo;this._fireEvent("promiseChained",this,A0)}var f0=J();if((Q1&50397184)!==0){var z1,M0,Y0=g0._settlePromiseCtx;if((Q1&33554432)!==0)M0=g0._rejectionHandler0,z1=g;else if((Q1&16777216)!==0)M0=g0._fulfillmentHandler0,z1=i,g0._unsetRejectionIsUnhandled();else Y0=g0._settlePromiseLateCancellationObserver,M0=new W("late cancellation observer"),g0._attachExtraTrace(M0),z1=i;K.invoke(Y0,g0,{handler:f0===null?z1:typeof z1==="function"&&Y.domainBind(f0,z1),promise:A0,receiver:r,value:M0})}else g0._addCallbacks(g,i,A0,r,f0);return A0},R.prototype._length=function(){return this._bitField&65535},R.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0},R.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864},R.prototype._setLength=function(g){this._bitField=this._bitField&-65536|g&65535},R.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432,this._fireEvent("promiseFulfilled",this)},R.prototype._setRejected=function(){this._bitField=this._bitField|16777216,this._fireEvent("promiseRejected",this)},R.prototype._setFollowing=function(){this._bitField=this._bitField|67108864,this._fireEvent("promiseResolved",this)},R.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304},R.prototype._isFinal=function(){return(this._bitField&4194304)>0},R.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},R.prototype._setCancelled=function(){this._bitField=this._bitField|65536,this._fireEvent("promiseCancelled",this)},R.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608},R.prototype._setAsyncGuaranteed=function(){if(K.hasCustomScheduler())return;this._bitField=this._bitField|134217728},R.prototype._receiverAt=function(g){var i=g===0?this._receiver0:this[g*4-4+3];if(i===U)return;else if(i===void 0&&this._isBound())return this._boundValue();return i},R.prototype._promiseAt=function(g){return this[g*4-4+2]},R.prototype._fulfillmentHandlerAt=function(g){return this[g*4-4+0]},R.prototype._rejectionHandlerAt=function(g){return this[g*4-4+1]},R.prototype._boundValue=function(){},R.prototype._migrateCallback0=function(g){var{_bit
Line truncated
path = % s
syscall = % s
fstream _type = % s
@@ -225,26 +225,26 @@ fstream_class = %s
fstream _stack =
% s
` ,I||"UNKNOWN",q.stack,q.path,q.syscall,q.fstream_type,q.fstream_path,q.fstream_unc_path,q.fstream_class,q.fstream_stack.join( `
` ));else z.emit("warn",q)};N7.prototype.info=function( $ ,I){this.emit("info", $ ,I)};N7.prototype.error=function( $ ,I,z){var q=wH0( $ ,I,this);if(z)throw q;else this.emit("error",q)};function wH0( $ ,I,z){if(!( $ instanceof Error)) $ =Error( $ );if( $ .code= $ .code||I, $ .path= $ .path||z.path, $ .fstream_type= $ .fstream_type||z.type, $ .fstream_path= $ .fstream_path||z.path,z._path!==z.path) $ .fstream_unc_path= $ .fstream_unc_path||z._path;if(z.linkpath) $ .fstream_linkpath= $ .fstream_linkpath||z.linkpath;return $ .fstream_class= $ .fstream_class||z.constructor.name, $ .fstream_stack= $ .fstream_stack||Error().stack.split(/ \n /).slice(3).map(function(q){return q.replace(/^ {4}at /,"")}), $ }});var Uw=O((Rh1,HH0)=>{HH0.exports=NJ1;function NJ1( $ ){var I=["Directory","File","SymbolicLink","Link","BlockDevice","CharacterDevice","FIFO","Socket"],z;if( $ .type&&I.indexOf( $ .type)!==-1)return $ [ $ .type]=!0, $ .type;for(var q=0,U=I.length;q<U;q++){z=I[q];var Y= $ [z]|| $ ["is"+z];if(typeof Y==="function")Y=Y.call( $ );if(Y)return $ [z]=!0, $ .type=z,z}return null}});var Uy=O((gh1,GH0)=>{GH0.exports=Yw;var MJ1= $ $ (),AJ1=d0(),qy=wI();AJ1(Yw,qy);function Yw( $ ){var I=this;if(!(I instanceof Yw))throw Error("LinkReader must be called as constructor.");if(!( $ .type==="Link"&& $ .Link|| $ .type==="SymbolicLink"&& $ .SymbolicLink))throw Error("Non-link type "+ $ .type);qy.call(I, $ )}Yw.prototype._stat=function( $ ){var I=this;MJ1.readlink(I._path,function(z,q){if(z)return I.error(z);I.linkpath=I.props.linkpath=q,I.emit("linkpath",q),qy.prototype._stat.call(I, $ )})};Yw.prototype._read=function(){var $ =this;if( $ ._paused)return;if(! $ ._ended) $ .emit("end"), $ .emit("close"), $ ._ended=!0}});var Jy=O((_h1,ZH0)=>{ZH0.exports=a8;var VH0= $ $ (),PJ1=d0(),Jw=t("path"),Yy=wI(),WH0=t("assert").ok;PJ1(a8,Yy);function a8( $ ){var I=this;if(!(I instanceof a8))throw Error("DirReader must be called as constructor.");if( $ .type!=="Directory"||! $ .Directory)throw Error("Non-directory type "+ $ .type);if(I.entries=null,I._index=-1,I._paused=!1,I._length=-1, $ .sort)this.sort= $ .sort;Yy.call(this, $ )}a8.prototype._getEntries=function(){var $ =this;if( $ ._gotEntries)return; $ ._gotEntries=!0,VH0.readdir( $ ._path,function(I,z){if(I)return $ .error(I);if( $ .entries=z, $ .emit("entries",z), $ ._paused) $ .once("resume",q);else q();function q(){if( $ ._length= $ .entries.length,typeof $ .sort==="function") $ .entries= $ .entries.sort( $ .sort.bind( $ )); $ ._read()}})};a8.prototype._read=function(){var $ =this;if(! $ .entries)return $ ._getEntries();if( $ ._paused|| $ ._currentEntry|| $ ._aborted)return;if( $ ._index++, $ ._index>= $ .entries.length){if(! $ ._ended) $ ._ended=!0, $ .emit("end"), $ .emit("close");return}var I=Jw.resolve( $ ._path, $ .entries[ $ ._index]);WH0(I!== $ ._path),WH0( $ .entries[ $ ._index]), $ ._currentEntry=I,VH0[ $ .props.follow?"stat":"lstat"](I,function(z,q){if(z)return $ .error(z);var U= $ ._proxy|| $ ;q.path=I,q.basename=Jw.basename(I),q.dirname=Jw.dirname(I);var Y= $ .getChildProps.call(U,q);Y.path=I,Y.basename=Jw.basename(I),Y.dirname=Jw.dirname(I);var J=Yy(Y,q); $ ._currentEntry=J,J.on("pause",function(K){if(! $ ._paused&&!J._disowned) $ .pause(K)}),J.on("resume",function(K){if( $ ._paused&&!J._disowned) $ .resume(K)}),J.on("stat",function(K){if( $ .emit("_entryStat",J,K),J._aborted)return;if(J._paused)J.once("resume",function(){ $ .emit("entryStat",J,K)});else $ .emit("entryStat",J,K)}),J.on("ready",function K(){if( $ ._paused)return J.pause( $ ), $ .once("resume",K);if(J.type==="Socket") $ .emit("socket",J);else $ .emitEntry(J)});var Q=!1;J.on("close",w),J.on("disown",w);function w(){if(Q)return;if(Q=!0, $ .emit("childEnd",J), $ .emit("entryEnd",J), $ ._currentEntry=null,! $ ._paused) $ ._read()}J.on("error",function(K){if(J._swallowErrors) $ .warn(K),J.emit("end"),J.emit("close");else $ .emit("error",K)}),["child","childEnd","warn"].forEach(function(K){J.on(K, $ .emit.bind( $ ,K))})})};a8.prototype.disown=function( $ ){if( $ .emit("beforeDisown"), $ ._disowned=!0, $ .parent= $ .root=null, $ ===this._currentEntry)this._currentEntry=null; $ .emit("disown")};a8.prototype.getChildProps=function(){return{depth:this.depth+1,root:this.root||this,parent:this,follow:this.follow,filter:this.filter,sort:this.props.sort,hardlinks:this.props.hardlinks}};a8.prototype.pause=function( $ ){var I=this;if(I._paused)return;if( $ = $ ||I,I._paused=!0,I._currentEntry&&I._currentEntry.pause)I._currentEntry.pause( $ );I.emit("pause", $ )};a8.prototype.resume=function( $ ){var I=this;if(!I._paused)return;if( $ = $ ||I,I._paused=!1,I.emit("resume", $ ),I._paused)return;if(I._currentEntry){if(I._currentEntry.resume)I._currentEntry.resume( $ )}else I._read()};a8.prototype.emitEntry=function( $ ){this.emit("entry", $ ),this.emit("child", $ )}});var Qy=O((Ch1,FH0)=>{FH0.exports=KI;var TJ1= $ $ (),EJ1=d0(),XH0=wI(),LH0={EOF:!0},DH0={CLOSE:!0};EJ1(KI,XH0);function KI( $ ){var I=this;if(!(I instanceof KI))throw Error("FileReader must be called as constructor.");if(!( $ .type==="Link"&& $ .Link|| $ .type==="File"&& $ .File))throw Error("Non-file type "+ $ .type);I._buffer=[],I._bytesEmitted=0,XH0.call(I, $ )}KI.prototype._getStream=function(){var $ =this,I= $ ._stream=TJ1.createReadStream( $ ._path, $ .pro
Line truncated
` ));else z.emit("warn",q)};P7.prototype.info=function( $ ,I){this.emit("info", $ ,I)};P7.prototype.error=function( $ ,I,z){var q=HH0( $ ,I,this);if(z)throw q;else this.emit("error",q)};function HH0( $ ,I,z){if(!( $ instanceof Error)) $ =Error( $ );if( $ .code= $ .code||I, $ .path= $ .path||z.path, $ .fstream_type= $ .fstream_type||z.type, $ .fstream_path= $ .fstream_path||z.path,z._path!==z.path) $ .fstream_unc_path= $ .fstream_unc_path||z._path;if(z.linkpath) $ .fstream_linkpath= $ .fstream_linkpath||z.linkpath;return $ .fstream_class= $ .fstream_class||z.constructor.name, $ .fstream_stack= $ .fstream_stack||Error().stack.split(/ \n /).slice(3).map(function(q){return q.replace(/^ {4}at /,"")}), $ }});var Qw=F((lh1,WH0)=>{WH0.exports=vJ1;function vJ1( $ ){var I=["Directory","File","SymbolicLink","Link","BlockDevice","CharacterDevice","FIFO","Socket"],z;if( $ .type&&I.indexOf( $ .type)!==-1)return $ [ $ .type]=!0, $ .type;for(var q=0,U=I.length;q<U;q++){z=I[q];var Y= $ [z]|| $ ["is"+z];if(typeof Y==="function")Y=Y.call( $ );if(Y)return $ [z]=!0, $ .type=z,z}return null}});var KS=F((oh1,VH0)=>{VH0.exports=ww;var gJ1=z $ (),RJ1=d0(),wS=HI();RJ1(ww,wS);function ww( $ ){var I=this;if(!(I instanceof ww))throw Error("LinkReader must be called as constructor.");if(!( $ .type==="Link"&& $ .Link|| $ .type==="SymbolicLink"&& $ .SymbolicLink))throw Error("Non-link type "+ $ .type);wS.call(I, $ )}ww.prototype._stat=function( $ ){var I=this;gJ1.readlink(I._path,function(z,q){if(z)return I.error(z);I.linkpath=I.props.linkpath=q,I.emit("linkpath",q),wS.prototype._stat.call(I, $ )})};ww.prototype._read=function(){var $ =this;if( $ ._paused)return;if(! $ ._ended) $ .emit("end"), $ .emit("close"), $ ._ended=!0}});var GS=F((rh1,LH0)=>{LH0.exports=e8;var XH0=z $ (),_J1=d0(),Kw=t("path"),HS=HI(),ZH0=t("assert").ok;_J1(e8,HS);function e8( $ ){var I=this;if(!(I instanceof e8))throw Error("DirReader must be called as constructor.");if( $ .type!=="Directory"||! $ .Directory)throw Error("Non-directory type "+ $ .type);if(I.entries=null,I._index=-1,I._paused=!1,I._length=-1, $ .sort)this.sort= $ .sort;HS.call(this, $ )}e8.prototype._getEntries=function(){var $ =this;if( $ ._gotEntries)return; $ ._gotEntries=!0,XH0.readdir( $ ._path,function(I,z){if(I)return $ .error(I);if( $ .entries=z, $ .emit("entries",z), $ ._paused) $ .once("resume",q);else q();function q(){if( $ ._length= $ .entries.length,typeof $ .sort==="function") $ .entries= $ .entries.sort( $ .sort.bind( $ )); $ ._read()}})};e8.prototype._read=function(){var $ =this;if(! $ .entries)return $ ._getEntries();if( $ ._paused|| $ ._currentEntry|| $ ._aborted)return;if( $ ._index++, $ ._index>= $ .entries.length){if(! $ ._ended) $ ._ended=!0, $ .emit("end"), $ .emit("close");return}var I=Kw.resolve( $ ._path, $ .entries[ $ ._index]);ZH0(I!== $ ._path),ZH0( $ .entries[ $ ._index]), $ ._currentEntry=I,XH0[ $ .props.follow?"stat":"lstat"](I,function(z,q){if(z)return $ .error(z);var U= $ ._proxy|| $ ;q.path=I,q.basename=Kw.basename(I),q.dirname=Kw.dirname(I);var Y= $ .getChildProps.call(U,q);Y.path=I,Y.basename=Kw.basename(I),Y.dirname=Kw.dirname(I);var J=HS(Y,q); $ ._currentEntry=J,J.on("pause",function(K){if(! $ ._paused&&!J._disowned) $ .pause(K)}),J.on("resume",function(K){if( $ ._paused&&!J._disowned) $ .resume(K)}),J.on("stat",function(K){if( $ .emit("_entryStat",J,K),J._aborted)return;if(J._paused)J.once("resume",function(){ $ .emit("entryStat",J,K)});else $ .emit("entryStat",J,K)}),J.on("ready",function K(){if( $ ._paused)return J.pause( $ ), $ .once("resume",K);if(J.type==="Socket") $ .emit("socket",J);else $ .emitEntry(J)});var Q=!1;J.on("close",w),J.on("disown",w);function w(){if(Q)return;if(Q=!0, $ .emit("childEnd",J), $ .emit("entryEnd",J), $ ._currentEntry=null,! $ ._paused) $ ._read()}J.on("error",function(K){if(J._swallowErrors) $ .warn(K),J.emit("end"),J.emit("close");else $ .emit("error",K)}),["child","childEnd","warn"].forEach(function(K){J.on(K, $ .emit.bind( $ ,K))})})};e8.prototype.disown=function( $ ){if( $ .emit("beforeDisown"), $ ._disowned=!0, $ .parent= $ .root=null, $ ===this._currentEntry)this._currentEntry=null; $ .emit("disown")};e8.prototype.getChildProps=function(){return{depth:this.depth+1,root:this.root||this,parent:this,follow:this.follow,filter:this.filter,sort:this.props.sort,hardlinks:this.props.hardlinks}};e8.prototype.pause=function( $ ){var I=this;if(I._paused)return;if( $ = $ ||I,I._paused=!0,I._currentEntry&&I._currentEntry.pause)I._currentEntry.pause( $ );I.emit("pause", $ )};e8.prototype.resume=function( $ ){var I=this;if(!I._paused)return;if( $ = $ ||I,I._paused=!1,I.emit("resume", $ ),I._paused)return;if(I._currentEntry){if(I._currentEntry.resume)I._currentEntry.resume( $ )}else I._read()};e8.prototype.emitEntry=function( $ ){this.emit("entry", $ ),this.emit("child", $ )}});var WS=F((th1,NH0)=>{NH0.exports=GI;var CJ1=z $ (),hJ1=d0(),DH0=HI(),OH0={EOF:!0},FH0={CLOSE:!0};hJ1(GI,DH0);function GI( $ ){var I=this;if(!(I instanceof GI))throw Error("FileReader must be called as constructor.");if(!( $ .type==="Link"&& $ .Link|| $ .type==="File"&& $ .File))throw Error("Non-file type "+ $ .type);I._buffer=[],I._bytesEmitted=0,DH0.call(I, $ )}GI.prototype._getStream=function(){var $ =this,I= $ ._stream=CJ1.createReadStream( $ ._path, $ .pro
Line truncated
expect : ` + $ .props.size+ `
actual : ` + $ ._bytesEmitted)}),I.on("close",function(){if( $ ._paused|| $ ._buffer.length) $ ._buffer.push(DH0), $ ._read();else $ .emit("close")}),I.on("error",function(z){ $ .emit("error",z)}), $ ._read()};KI.prototype._read=function(){var $ =this;if( $ ._paused)return;if(! $ ._stream)return $ ._getStream();if( $ ._buffer.length){var I= $ ._buffer;for(var z=0,q=I.length;z<q;z++){var U=I[z];if(U===LH0) $ .emit("end");else if(U===DH0) $ .emit("close");else $ .emit("data",U);if( $ ._paused){ $ ._buffer=I.slice(z);return}} $ ._buffer.length=0}};KI.prototype.pause=function( $ ){var I=this;if(I._paused)return;if( $ = $ ||I,I._paused=!0,I._stream)I._stream.pause();I.emit("pause", $ )};KI.prototype.resume=function( $ ){var I=this;if(!I._paused)return;if( $ = $ ||I,I.emit("resume", $ ),I._paused=!1,I._stream)I._stream.resume();I._read()}});var MH0=O((hh1,NH0)=>{NH0.exports=iL;var BJ1=d0(),OH0=wI();BJ1(iL,OH0);function iL( $ ){var I=this;if(!(I instanceof iL))throw Error("SocketReader must be called as constructor.");if(!( $ .type==="Socket"&& $ .Socket))throw Error("Non-socket type "+ $ .type);OH0.call(I, $ )}iL.prototype._read=function(){var $ =this;if( $ ._paused)return;if(! $ ._ended) $ .emit("end"), $ .emit("close"), $ ._ended=!0}});var Ky=O((Sh1,AH0)=>{AH0.exports=HI;var wy=wI(),jJ1=Uw(),vJ1=d0(),RJ1= $ $ ();vJ1(HI,wy);function HI( $ ){var I=this;if(!(I instanceof HI))throw Error("ProxyReader must be called as constructor.");I.props= $ ,I._buffer=[],I.ready=!1,wy.call(I, $ )}HI.prototype._stat=function(){var $ =this,I= $ .props,z=I.follow?"stat":"lstat";RJ1[z](I.path,function(q,U){var Y;if(q||!U)Y="File";else Y=jJ1(U);I[Y]=!0,I.type= $ .type=Y, $ ._old=U, $ ._addProxy(wy(I,U))})};HI.prototype._addProxy=function( $ ){var I=this;if(I._proxyTarget)return I.error("proxy already set");I._proxyTarget= $ , $ ._proxy=I,["error","data","end","close","linkpath","entry","entryEnd","child","childEnd","warn","stat"].forEach(function(q){ $ .on(q,I.emit.bind(I,q))}),I.emit("proxy", $ ), $ .on("ready",function(){I.ready=!0,I.emit("ready")});var z=I._buffer;I._buffer.length=0,z.forEach(function(q){ $ [q[0]].apply( $ ,q[1])})};HI.prototype.pause=function(){return this._proxyTarget?this._proxyTarget.pause():!1};HI.prototype.resume=function(){return this._proxyTarget?this._proxyTarget.resume():!1}});var wI=O((yh1,EH0)=>{EH0.exports=D8;var gJ1= $ $ (),_J1=t("stream").Stream,CJ1=d0(),Hy=t("path"),Gy=Uw(),pL=D8.hardLinks={},PH0=bL();CJ1(D8,PH0);var TH0=Uy();function D8( $ ,I){var z=this;if(!(z instanceof D8))return new D8( $ ,I);if(typeof $ ==="string") $ ={path: $ };var q,U;if( $ .type&&typeof $ .type==="function")q= $ .type,U=q;else q=Gy( $ ),U=D8;if(I&&!q)q=Gy(I), $ [q]=!0, $ .type=q;switch(q){case"Directory":U=Jy();break;case"Link":case"File":U=Qy();break;case"SymbolicLink":U=TH0;break;case"Socket":U=MH0();break;case null:U=Ky();break}if(!(z instanceof U))return new U( $ );if(PH0.call(z),! $ .path)z.error("Must provide a path",null,!0);if(z.readable=!0,z.writable=!1,z.type=q,z.props= $ ,z.depth= $ .depth= $ .depth||0,z.parent= $ .parent||null,z.root= $ .root|| $ .parent&& $ .parent.root||z,z._path=z.path=Hy.resolve( $ .path),process.platform==="win32"){if(z.path=z._path=z.path.replace(/ \? /g,"_"),z._path.length>=260)z._swallowErrors=!0,z._path=" \\ \\ ? \\ "+z.path.replace(/ \/ /g," \\ ")}if(z.basename= $ .basename=Hy.basename(z.path),z.dirname= $ .dirname=Hy.dirname(z.path), $ .parent= $ .root=null,z.size= $ .size,z.filter=typeof $ .filter==="function"? $ .filter:null, $ .sort==="alpha") $ .sort=hJ1;z._stat(I)}function hJ1( $ ,I){return $ ===I?0: $ .toLowerCase()>I.toLowerCase()?1: $ .toLowerCase()<I.toLowerCase()?-1: $ >I?1:-1}D8.prototype._stat=function( $ ){var I=this,z=I.props,q=z.follow?"stat":"lstat";if( $ )process.nextTick(U.bind(null,null, $ ));else gJ1[q](I._path,U);function U(Y,J){if(Y)return I.error(Y);if(Object.keys(J).forEach(function(Z){z[Z]=J[Z]}),I.size!==void 0&&z.size!==I.size)return I.error("incorrect size");I.size=z.size;var Q=Gy(z),w=z.hardlinks!==!1;if(w&&Q!=="Directory"&&z.nlink&&z.nlink>1){var K=z.dev+":"+z.ino;if(pL[K]===I._path||!pL[K])pL[K]=I._path;else Q=I.type=I.props.type="Link",I.Link=I.props.Link=!0,I.linkpath=I.props.linkpath=pL[K],I._stat=I._read=TH0.prototype._read}if(I.type&&I.type!==Q)I.error("Unexpected type: "+Q);if(I.filter){var H=I._proxy||I;if(!I.filter.call(H,H,z)){if(!I._disowned)I.abort(),I.emit("end"),I.emit("close");return}}var G=["_stat","stat","ready"],W=0;(function Z(){if(I._aborted){I.emit("end"),I.emit("close");return}if(I._paused&&I.type!=="Directory"){I.once("resume",Z);return}var X=G[W++];if(!X)return I._read();I.emit(X,z),Z()})()}};D8.prototype.pipe=function( $ ){var I=this;if(typeof $ .add==="function")I.on("entry",function(z){var q= $ .add(z);if(q===!1)I.pause()});return _J1.prototype.pipe.apply(this,arguments)};D8.prototype.pause=function( $ ){if(this._paused=!0, $ = $ ||this,this.emit("pause", $ ),this._stream)this._stream.pause( $ )};D8.prototype.resume=function( $ ){if(this._paused=!1, $ = $ ||this,this.emit("resume", $ ),this._stream)this._stream.resume( $ );this._read()};D8.prototype._read=function(){this.error("Cannot read unknown type: "+this.type)}});var Xy=O((uh1,hH0)=>{h
Line truncated
actual : ` + $ ._bytesEmitted)}),I.on("close",function(){if( $ ._paused|| $ ._buffer.length) $ ._buffer.push(FH0), $ ._read();else $ .emit("close")}),I.on("error",function(z){ $ .emit("error",z)}), $ ._read()};GI.prototype._read=function(){var $ =this;if( $ ._paused)return;if(! $ ._stream)return $ ._getStream();if( $ ._buffer.length){var I= $ ._buffer;for(var z=0,q=I.length;z<q;z++){var U=I[z];if(U===OH0) $ .emit("end");else if(U===FH0) $ .emit("close");else $ .emit("data",U);if( $ ._paused){ $ ._buffer=I.slice(z);return}} $ ._buffer.length=0}};GI.prototype.pause=function( $ ){var I=this;if(I._paused)return;if( $ = $ ||I,I._paused=!0,I._stream)I._stream.pause();I.emit("pause", $ )};GI.prototype.resume=function( $ ){var I=this;if(!I._paused)return;if( $ = $ ||I,I.emit("resume", $ ),I._paused=!1,I._stream)I._stream.resume();I._read()}});var PH0=F((ah1,AH0)=>{AH0.exports=dL;var uJ1=d0(),MH0=HI();uJ1(dL,MH0);function dL( $ ){var I=this;if(!(I instanceof dL))throw Error("SocketReader must be called as constructor.");if(!( $ .type==="Socket"&& $ .Socket))throw Error("Non-socket type "+ $ .type);MH0.call(I, $ )}dL.prototype._read=function(){var $ =this;if( $ ._paused)return;if(! $ ._ended) $ .emit("end"), $ .emit("close"), $ ._ended=!0}});var ZS=F((sh1,TH0)=>{TH0.exports=WI;var VS=HI(),SJ1=Qw(),yJ1=d0(),xJ1=z $ ();yJ1(WI,VS);function WI( $ ){var I=this;if(!(I instanceof WI))throw Error("ProxyReader must be called as constructor.");I.props= $ ,I._buffer=[],I.ready=!1,VS.call(I, $ )}WI.prototype._stat=function(){var $ =this,I= $ .props,z=I.follow?"stat":"lstat";xJ1[z](I.path,function(q,U){var Y;if(q||!U)Y="File";else Y=SJ1(U);I[Y]=!0,I.type= $ .type=Y, $ ._old=U, $ ._addProxy(VS(I,U))})};WI.prototype._addProxy=function( $ ){var I=this;if(I._proxyTarget)return I.error("proxy already set");I._proxyTarget= $ , $ ._proxy=I,["error","data","end","close","linkpath","entry","entryEnd","child","childEnd","warn","stat"].forEach(function(q){ $ .on(q,I.emit.bind(I,q))}),I.emit("proxy", $ ), $ .on("ready",function(){I.ready=!0,I.emit("ready")});var z=I._buffer;I._buffer.length=0,z.forEach(function(q){ $ [q[0]].apply( $ ,q[1])})};WI.prototype.pause=function(){return this._proxyTarget?this._proxyTarget.pause():!1};WI.prototype.resume=function(){return this._proxyTarget?this._proxyTarget.resume():!1}});var HI=F((eh1,jH0)=>{jH0.exports=F8;var kJ1=z $ (),fJ1=t("stream").Stream,nJ1=d0(),XS=t("path"),LS=Qw(),mL=F8.hardLinks={},EH0=cL();nJ1(F8,EH0);var BH0=KS();function F8( $ ,I){var z=this;if(!(z instanceof F8))return new F8( $ ,I);if(typeof $ ==="string") $ ={path: $ };var q,U;if( $ .type&&typeof $ .type==="function")q= $ .type,U=q;else q=LS( $ ),U=F8;if(I&&!q)q=LS(I), $ [q]=!0, $ .type=q;switch(q){case"Directory":U=GS();break;case"Link":case"File":U=WS();break;case"SymbolicLink":U=BH0;break;case"Socket":U=PH0();break;case null:U=ZS();break}if(!(z instanceof U))return new U( $ );if(EH0.call(z),! $ .path)z.error("Must provide a path",null,!0);if(z.readable=!0,z.writable=!1,z.type=q,z.props= $ ,z.depth= $ .depth= $ .depth||0,z.parent= $ .parent||null,z.root= $ .root|| $ .parent&& $ .parent.root||z,z._path=z.path=XS.resolve( $ .path),process.platform==="win32"){if(z.path=z._path=z.path.replace(/ \? /g,"_"),z._path.length>=260)z._swallowErrors=!0,z._path=" \\ \\ ? \\ "+z.path.replace(/ \/ /g," \\ ")}if(z.basename= $ .basename=XS.basename(z.path),z.dirname= $ .dirname=XS.dirname(z.path), $ .parent= $ .root=null,z.size= $ .size,z.filter=typeof $ .filter==="function"? $ .filter:null, $ .sort==="alpha") $ .sort=bJ1;z._stat(I)}function bJ1( $ ,I){return $ ===I?0: $ .toLowerCase()>I.toLowerCase()?1: $ .toLowerCase()<I.toLowerCase()?-1: $ >I?1:-1}F8.prototype._stat=function( $ ){var I=this,z=I.props,q=z.follow?"stat":"lstat";if( $ )process.nextTick(U.bind(null,null, $ ));else kJ1[q](I._path,U);function U(Y,J){if(Y)return I.error(Y);if(Object.keys(J).forEach(function(Z){z[Z]=J[Z]}),I.size!==void 0&&z.size!==I.size)return I.error("incorrect size");I.size=z.size;var Q=LS(z),w=z.hardlinks!==!1;if(w&&Q!=="Directory"&&z.nlink&&z.nlink>1){var K=z.dev+":"+z.ino;if(mL[K]===I._path||!mL[K])mL[K]=I._path;else Q=I.type=I.props.type="Link",I.Link=I.props.Link=!0,I.linkpath=I.props.linkpath=mL[K],I._stat=I._read=BH0.prototype._read}if(I.type&&I.type!==Q)I.error("Unexpected type: "+Q);if(I.filter){var H=I._proxy||I;if(!I.filter.call(H,H,z)){if(!I._disowned)I.abort(),I.emit("end"),I.emit("close");return}}var G=["_stat","stat","ready"],W=0;(function Z(){if(I._aborted){I.emit("end"),I.emit("close");return}if(I._paused&&I.type!=="Directory"){I.once("resume",Z);return}var X=G[W++];if(!X)return I._read();I.emit(X,z),Z()})()}};F8.prototype.pipe=function( $ ){var I=this;if(typeof $ .add==="function")I.on("entry",function(z){var q= $ .add(z);if(q===!1)I.pause()});return fJ1.prototype.pipe.apply(this,arguments)};F8.prototype.pause=function( $ ){if(this._paused=!0, $ = $ ||this,this.emit("pause", $ ),this._stream)this._stream.pause( $ )};F8.prototype.resume=function( $ ){if(this._paused=!1, $ = $ ||this,this.emit("resume", $ ),this._stream)this._stream.resume( $ );this._read()};F8.prototype._read=function(){this.error("Cannot read unknown type: "+this.type)}});var NS=F(( $ u1,SH0)=>{S
Line truncated
expect : ` + $ .size+ `
actual : ` + $ ._bytesWritten); $ D.prototype._finish.call( $ )}});var By=O(( $ S 1,A G0)=>{A G0.exports=E 7;var Ey=T U(),J Q1=U w(),Q Q1=d0(),w Q1=sL (),K Q1=t("fs");Q Q1(E 7,Ey );function E 7($ ){var I=this;if(!(I instanceof E 7))throw Error("ProxyWriter must be called as constructor.");I.props= $ ,I._needDrain=!1,Ey .call(I, $ )}E 7.prototype._stat=function(){var $ =this,I= $ .props,z=I.follow?"stat":"lstat";K Q1[z](I.path,function(q,U){var Y;if(q||!U)Y="File";else Y=J Q1(U);I[Y]=!0,I.type= $ .type=Y, $ ._old=U, $ ._addProxy(Ey (I,U))})};E 7.prototype._addProxy=function( $ ){var I=this;if(I._proxy)return I.error("proxy already set");I._proxy= $ ,["ready","error","close","pipe","drain","warn"].forEach(function(q){ $ .on(q,I.emit.bind(I,q))}),I.emit("proxy", $ );var z=I._buffer;if(z.forEach(function(q){ $ [q[0]].apply( $ ,q[1])}),I._buffer.length=0,I._needsDrain)I.emit("drain")};E 7.prototype.add=function( $ ){if(w Q1( $ ),!this._proxy)return this._buffer.push(["add",[ $ ]]),this._needDrain=!0,!1;return this._proxy.add( $ )};E 7.prototype.write=function( $ ){if(!this._proxy)return this._buffer.push(["write",[ $ ]]),this._needDrain=!0,!1;return this._proxy.write( $ )};E 7.prototype.end=function( $ ){if(!this._proxy)return this._buffer.push(["end",[ $ ]]),!1;return this._proxy.end( $ )}});var T U=O ((IS 1,_ G0)=>{_ G0.exports=d $ ;var c $ = $ $ (),H Q1=d0(),G Q1=Xy (),W Q1=Ny (),H w=t("path"),T G0=process.platform==="win32"?0:process.umask(),E G0=U w(),B G0=b L();H Q1(d $ ,B G0);d $ .dirmode=parseInt("0777",8)&~T G0;d $ .filemode=parseInt("0666",8)&~T G0;var V Q1=Ay (),Z Q1=Py (),X Q1=Ty (),L Q1=By ();function d $ ( $ ,I){var z=this;if(typeof $ ==="string") $ ={path: $ };var q=E G0( $ ),U=d $ ;switch(q){case"Directory":U=V Q1;break;case"File":U=X Q1;break;case"Link":case"SymbolicLink":U=Z Q1;break;case null:default:U=L Q1;break}if(!(z instanceof U))return new U( $ );if(B G0.call(z),! $ .path)z.error("Must provide a path",null,!0);if(z.type= $ .type,z.props= $ ,z.depth= $ .depth||0,z.clobber= $ .clobber===!1? $ .clobber:!0,z.parent= $ .parent||null,z.root= $ .root|| $ .parent&& $ .parent.root||z,z._path=z.path=H w.resolve( $ .path),process.platform==="win32"){if(z.path=z._path=z.path.replace(/ \? /g,"_"),z._path.length>=260)z._swallowErrors=!0,z._path=" \\ \\ ? \\ "+z.path.replace(/ \/ /g," \\ ")}if(z.basename=H w.basename( $ .path),z.dirname=H w.dirname( $ .path),z.linkpath= $ .linkpath||null, $ .parent= $ .root=null,z.size= $ .size,typeof $ .mode==="string") $ .mode=parseInt( $ .mode,8);z.readable=!1,z.writable=!0,z._buffer=[],z.ready=!1,z.filter=typeof $ .filter==="function"? $ .filter:null,z._stat(I)}d $ .prototype._create=function(){var $ =this;c $ [ $ .props.follow?"stat":"lstat"]( $ ._path,function(I){if(I)return $ .warn("Cannot create "+ $ ._path+ `
Unsupported type : ` + $ .type,"ENOTSUP"); $ ._finish()})};d $ .prototype._stat=function( $ ){var I=this,z=I.props,q=z.follow?"stat":"lstat",U=I._proxy||I;if( $ )Y(null, $ );else c $ [q](I._path,Y);function Y(J,Q){if(I.filter&&!I.filter.call(U,U,Q)){I._aborted=!0,I.emit("end"),I.emit("close");return}if(J||!Q)return jy(I);I._old=Q;var w=EG0(Q);if(w!==I.type||I.type==="File"&&Q.nlink>1)return GQ1(I._path,function(K){if(K)return I.error(K);I._old=null,jy(I)});jy(I)}};function jy( $ ){WQ1(Hw.dirname( $ ._path),d $ .dirmode,function(I,z){if(I)return $ .error(I);return $ ._madeDir=z, $ ._create()})}function jG0( $ ,I,z,q,U){var Y=I.mode,J=I.follow|| $ .type!=="SymbolicLink"?"chmod":"lchmod";if(!c $ [J])return U();if(typeof Y!=="number")return U();var Q=z.mode&parseInt("0777",8);if(Y=Y&parseInt("0777",8),Y===Q)return U();c $ [J](q,Y,U)}function vG0( $ ,I,z,q,U){if(process.platform==="win32")return U();if(!process.getuid||process.getuid()!==0)return U();if(typeof I.uid!=="number"&&typeof I.gid!=="number")return U();if(z.uid===I.uid&&z.gid===I.gid)return U();var Y= $ .props.follow|| $ .type!=="SymbolicLink"?"chown":"lchown";if(!c $ [Y])return U();if(typeof I.uid!=="number")I.uid=z.uid;if(typeof I.gid!=="number")I.gid=z.gid;c $ [Y](q,I.uid,I.gid,U)}function RG0( $ ,I,z,q,U){if(!c $ .utimes||process.platform==="win32")return U();var Y=I.follow|| $ .type!=="SymbolicLink"?"utimes":"lutimes";if(Y==="lutimes"&&!c $ [Y])Y="utimes";if(!c $ [Y])return U();var{atime:J,mtime:Q}=z,w=I.atime,K=I.mtime;if(w===void 0)w=J;if(K===void 0)K=Q;if(!PG0(w))w=new Date(w);if(!PG0(K))w=new Date(K);if(w.getTime()===J.getTime()&&K.getTime()===Q.getTime())return U();c $ [Y](q,w,K,U)}d $ .prototype._finish=function(){var $ =this;if( $ ._finishing)return; $ ._finishing=!0;var I=0,z=null,q=!1;if( $ ._old) $ ._old.atime=new Date(0), $ ._old.mtime=new Date(0),Y( $ ._old);else{var U= $ .props.follow?"stat":"lstat";c $ [U]( $ ._path,function(Q,w){if(Q)if(Q.code==="ENOENT"&&( $ .type==="Link"|| $ .type==="SymbolicLink")&&process.platform==="win32"){ $ .ready=!0, $ .emit("ready"), $ .emit("end"), $ .emit("close"), $ .end= $ ._finish=function(){};return}else return $ .error(Q);Y( $ ._old=w)})}return;function Y(Q){I+=3,jG0( $ , $ .props,Q, $ ._path,J("chmod")),vG0( $ , $ .props,Q, $ ._path,J("chown")),RG0( $ , $ .props,Q, $ ._path,J("utimes"))}function J(Q){return function(w){if(z)return;if(w)return w.fstream_finish_call=Q, $ .error(z=w);if(--I>0)return;if(q)return;if(q=!0,! $ ._madeDir)return K();else gG0( $ , $ ._path,K);function K(H){if(H)return H.fstream_finish_call="setupMadeDir", $ .error(H); $ .emit("end"), $ .emit("close")}}}};function gG0( $ ,I,z){var q= $ ._madeDir,U=Hw.dirname(I);DQ1( $ ,U,function(Y){if(Y)return z(Y);if(U===q)return z();gG0( $ ,U,z)})}function DQ1( $ ,I,z){var q={};Object.keys( $ .props).forEach(function(Q){if(q[Q]= $ .props[Q],Q==="mode"&& $ .type!=="Directory")q[Q]=q[Q]|parseInt("0111",8)});var U=3,Y=null;c $ .stat(I,function(Q,w){if(Q)return z(Y=Q);jG0( $ ,q,w,I,J),vG0( $ ,q,w,I,J),RG0( $ ,q,w,I,J)});function J(Q){if(Y)return;if(Q)return z(Y=Q);if(--U===0)return z()}}d $ .prototype.pipe=function(){this.error("Can't pipe from writable stream")};d $ .prototype.add=function(){this.error("Can't add to non-Directory type")};d $ .prototype.write=function(){return!0};function FQ1( $ ){return Object.prototype.toString.call( $ )}function PG0( $ ){return typeof $ ==="object"&&FQ1( $ )==="[object Date]"}});var Cy=O((OQ1)=>{OQ1.Abstract=bL();OQ1.Reader=wI();OQ1.Writer=TU();OQ1.File={Reader:Qy(),Writer:Ty()};OQ1.Dir={Reader:Jy(),Writer:Ay()};OQ1.Link={Reader:Uy(),Writer:Py()};OQ1.Proxy={Reader:Ky(),Writer:By()};OQ1.Reader.Dir=OQ1.DirReader=OQ1.Dir.Reader;OQ1.Reader.File=OQ1.FileReader=OQ1.File.Reader;OQ1.Reader.Link=OQ1.LinkReader=OQ1.Link.Reader;OQ1.Reader.Proxy=OQ1.ProxyReader=OQ1.Proxy.Reader;OQ1.Writer.Dir=OQ1.DirWriter=OQ1.Dir.Writer;OQ1.Writer.File=OQ1.FileWriter=OQ1.File.Writer;OQ1.Writer.Link=OQ1.LinkWriter=OQ1.Link.Writer;OQ1.Writer.Proxy=OQ1.ProxyWriter=OQ1.Proxy.Writer;OQ1.collect=sL()});var hG0=O((GS1,CG0)=>{CG0.exports=jQ1;var AQ1=CL(),PQ1=Cy().Writer,hy=t("path"),TQ1=t("stream"),EQ1=Iy(),BQ1=F7();function jQ1( $ ){ $ .path=hy.resolve(hy.normalize( $ .path));var I=new AQ1( $ ),z=new TQ1.Writable({objectMode:!0});z._write=function(U,Y,J){if(U.type=="Directory")return J();var Q=hy.join( $ .path,U.path);if(Q.indexOf( $ .path)!=0)return J();let w= $ .getWriter? $ .getWriter({path:Q}):PQ1({path:Q});U.pipe(w).on("error",J).on("close",J)};var q=EQ1(I,z);return I.once("crx-header",function(U){q.crxHeader=U}),I.pipe(z).on("finish",function(){q.emit("close")}),q.promise=function(){return new BQ1(function(U,Y){q.on("close",U),q.on("error",Y)})},q}});var SG0=O((WS1,ID)=>{var k4=function( $ ){var I=1e7,z=7,q=9007199254740992,U=W(q),Y="0123456789abcdefghijklmnopqrstuvwxyz",J=typeof BigInt==="function";function Q(N,A,S,b){if(typeof N>"u")return Q[0];if(typeof A<"u")return+A===10&&!S?j0(N):b6(N,A,S,b);return j0(N)}function w(N,A){this.value=N,this.sign=A,this.isSmall=!1}w.prototype=Object.create(Q.prototype);function K(N){this.value=N,this.sign=N<0,this.isSmall=!0}K.prototype=Object.create(Q.prototype);function H(N){th
Line truncated
actual : ` + $ ._bytesWritten);q D.prototype._finish.call( $ )}});var _S=F((Ou 1,T G0)=>{T G0.exports=v 7;var RS=B U(),Z Q1=Q w(),X Q1=d0(),L Q1=ID (),D Q1=t("fs");X Q1(v 7,RS );function v 7( $ ){var I=this;if(!(I instanceof v 7))throw Error("ProxyWriter must be called as constructor.");I.props= $ ,I._needDrain=!1,RS .call(I, $ )}v 7.prototype._stat=function(){var $ =this,I= $ .props,z=I.follow?"stat":"lstat";D Q1[z](I.path,function(q,U){var Y;if(q||!U)Y="File";else Y=Z Q1(U);I[Y]=!0,I.type= $ .type=Y, $ ._old=U, $ ._addProxy(RS (I,U))})};v 7.prototype._addProxy=function( $ ){var I=this;if(I._proxy)return I.error("proxy already set");I._proxy= $ ,["ready","error","close","pipe","drain","warn"].forEach(function(q){ $ .on(q,I.emit.bind(I,q))}),I.emit("proxy", $ );var z=I._buffer;if(z.forEach(function(q){ $ [q[0]].apply( $ ,q[1])}),I._buffer.length=0,I._needsDrain)I.emit("drain")};v 7.prototype.add=function( $ ){if(L Q1( $ ),!this._proxy)return this._buffer.push(["add",[ $ ]]),this._needDrain=!0,!1;return this._proxy.add( $ )};v 7.prototype.write=function( $ ){if(!this._proxy)return this._buffer.push(["write",[ $ ]]),this._needDrain=!0,!1;return this._proxy.write( $ )};v 7.prototype.end=function( $ ){if(!this._proxy)return this._buffer.push(["end",[ $ ]]),!1;return this._proxy.end( $ )}});var B U=F ((Fu 1,h G0)=>{h G0.exports=m $ ;var d $ =z $ (),O Q1=d0(),F Q1=NS (),N Q1=ES (),V w=t("path"),B G0=process.platform==="win32"?0:process.umask(),j G0=Q w(),v G0=c L();O Q1(m $ ,v G0);m $ .dirmode=parseInt("0777",8)&~B G0;m $ .filemode=parseInt("0666",8)&~B G0;var M Q1=jS (),A Q1=vS (),P Q1=gS (),T Q1=_S ();function m $ ( $ ,I){var z=this;if(typeof $ ==="string") $ ={path: $ };var q=j G0( $ ),U=m $ ;switch(q){case"Directory":U=M Q1;break;case"File":U=P Q1;break;case"Link":case"SymbolicLink":U=A Q1;break;case null:default:U=T Q1;break}if(!(z instanceof U))return new U( $ );if(v G0.call(z),! $ .path)z.error("Must provide a path",null,!0);if(z.type= $ .type,z.props= $ ,z.depth= $ .depth||0,z.clobber= $ .clobber===!1? $ .clobber:!0,z.parent= $ .parent||null,z.root= $ .root|| $ .parent&& $ .parent.root||z,z._path=z.path=V w.resolve( $ .path),process.platform==="win32"){if(z.path=z._path=z.path.replace(/ \? /g,"_"),z._path.length>=260)z._swallowErrors=!0,z._path=" \\ \\ ? \\ "+z.path.replace(/ \/ /g," \\ ")}if(z.basename=V w.basename( $ .path),z.dirname=V w.dirname( $ .path),z.linkpath= $ .linkpath||null, $ .parent= $ .root=null,z.size= $ .size,typeof $ .mode==="string") $ .mode=parseInt( $ .mode,8);z.readable=!1,z.writable=!0,z._buffer=[],z.ready=!1,z.filter=typeof $ .filter==="function"? $ .filter:null,z._stat(I)}m $ .prototype._create=function(){var $ =this;d $ [ $ .props.follow?"stat":"lstat"]( $ ._path,function(I){if(I)return $ .warn("Cannot create "+ $ ._path+ `
Unsupported type : ` + $ .type,"ENOTSUP"); $ ._finish()})};m $ .prototype._stat=function( $ ){var I=this,z=I.props,q=z.follow?"stat":"lstat",U=I._proxy||I;if( $ )Y(null, $ );else d $ [q](I._path,Y);function Y(J,Q){if(I.filter&&!I.filter.call(U,U,Q)){I._aborted=!0,I.emit("end"),I.emit("close");return}if(J||!Q)return CS(I);I._old=Q;var w=jG0(Q);if(w!==I.type||I.type==="File"&&Q.nlink>1)return FQ1(I._path,function(K){if(K)return I.error(K);I._old=null,CS(I)});CS(I)}};function CS( $ ){NQ1(Vw.dirname( $ ._path),m $ .dirmode,function(I,z){if(I)return $ .error(I);return $ ._madeDir=z, $ ._create()})}function gG0( $ ,I,z,q,U){var Y=I.mode,J=I.follow|| $ .type!=="SymbolicLink"?"chmod":"lchmod";if(!d $ [J])return U();if(typeof Y!=="number")return U();var Q=z.mode&parseInt("0777",8);if(Y=Y&parseInt("0777",8),Y===Q)return U();d $ [J](q,Y,U)}function RG0( $ ,I,z,q,U){if(process.platform==="win32")return U();if(!process.getuid||process.getuid()!==0)return U();if(typeof I.uid!=="number"&&typeof I.gid!=="number")return U();if(z.uid===I.uid&&z.gid===I.gid)return U();var Y= $ .props.follow|| $ .type!=="SymbolicLink"?"chown":"lchown";if(!d $ [Y])return U();if(typeof I.uid!=="number")I.uid=z.uid;if(typeof I.gid!=="number")I.gid=z.gid;d $ [Y](q,I.uid,I.gid,U)}function _G0( $ ,I,z,q,U){if(!d $ .utimes||process.platform==="win32")return U();var Y=I.follow|| $ .type!=="SymbolicLink"?"utimes":"lutimes";if(Y==="lutimes"&&!d $ [Y])Y="utimes";if(!d $ [Y])return U();var{atime:J,mtime:Q}=z,w=I.atime,K=I.mtime;if(w===void 0)w=J;if(K===void 0)K=Q;if(!EG0(w))w=new Date(w);if(!EG0(K))w=new Date(K);if(w.getTime()===J.getTime()&&K.getTime()===Q.getTime())return U();d $ [Y](q,w,K,U)}m $ .prototype._finish=function(){var $ =this;if( $ ._finishing)return; $ ._finishing=!0;var I=0,z=null,q=!1;if( $ ._old) $ ._old.atime=new Date(0), $ ._old.mtime=new Date(0),Y( $ ._old);else{var U= $ .props.follow?"stat":"lstat";d $ [U]( $ ._path,function(Q,w){if(Q)if(Q.code==="ENOENT"&&( $ .type==="Link"|| $ .type==="SymbolicLink")&&process.platform==="win32"){ $ .ready=!0, $ .emit("ready"), $ .emit("end"), $ .emit("close"), $ .end= $ ._finish=function(){};return}else return $ .error(Q);Y( $ ._old=w)})}return;function Y(Q){I+=3,gG0( $ , $ .props,Q, $ ._path,J("chmod")),RG0( $ , $ .props,Q, $ ._path,J("chown")),_G0( $ , $ .props,Q, $ ._path,J("utimes"))}function J(Q){return function(w){if(z)return;if(w)return w.fstream_finish_call=Q, $ .error(z=w);if(--I>0)return;if(q)return;if(q=!0,! $ ._madeDir)return K();else CG0( $ , $ ._path,K);function K(H){if(H)return H.fstream_finish_call="setupMadeDir", $ .error(H); $ .emit("end"), $ .emit("close")}}}};function CG0( $ ,I,z){var q= $ ._madeDir,U=Vw.dirname(I);EQ1( $ ,U,function(Y){if(Y)return z(Y);if(U===q)return z();CG0( $ ,U,z)})}function EQ1( $ ,I,z){var q={};Object.keys( $ .props).forEach(function(Q){if(q[Q]= $ .props[Q],Q==="mode"&& $ .type!=="Directory")q[Q]=q[Q]|parseInt("0111",8)});var U=3,Y=null;d $ .stat(I,function(Q,w){if(Q)return z(Y=Q);gG0( $ ,q,w,I,J),RG0( $ ,q,w,I,J),_G0( $ ,q,w,I,J)});function J(Q){if(Y)return;if(Q)return z(Y=Q);if(--U===0)return z()}}m $ .prototype.pipe=function(){this.error("Can't pipe from writable stream")};m $ .prototype.add=function(){this.error("Can't add to non-Directory type")};m $ .prototype.write=function(){return!0};function BQ1( $ ){return Object.prototype.toString.call( $ )}function EG0( $ ){return typeof $ ==="object"&&BQ1( $ )==="[object Date]"}});var xS=F((jQ1)=>{jQ1.Abstract=cL();jQ1.Reader=HI();jQ1.Writer=BU();jQ1.File={Reader:WS(),Writer:gS()};jQ1.Dir={Reader:GS(),Writer:jS()};jQ1.Link={Reader:KS(),Writer:vS()};jQ1.Proxy={Reader:ZS(),Writer:_S()};jQ1.Reader.Dir=jQ1.DirReader=jQ1.Dir.Reader;jQ1.Reader.File=jQ1.FileReader=jQ1.File.Reader;jQ1.Reader.Link=jQ1.LinkReader=jQ1.Link.Reader;jQ1.Reader.Proxy=jQ1.ProxyReader=jQ1.Proxy.Reader;jQ1.Writer.Dir=jQ1.DirWriter=jQ1.Dir.Writer;jQ1.Writer.File=jQ1.FileWriter=jQ1.File.Writer;jQ1.Writer.Link=jQ1.LinkWriter=jQ1.Link.Writer;jQ1.Writer.Proxy=jQ1.ProxyWriter=jQ1.Proxy.Writer;jQ1.collect=ID()});var SG0=F((gu1,uG0)=>{uG0.exports=SQ1;var RQ1=SL(),_Q1=xS().Writer,kS=t("path"),CQ1=t("stream"),hQ1=JS(),uQ1=M7();function SQ1( $ ){ $ .path=kS.resolve(kS.normalize( $ .path));var I=new RQ1( $ ),z=new CQ1.Writable({objectMode:!0});z._write=function(U,Y,J){if(U.type=="Directory")return J();var Q=kS.join( $ .path,U.path);if(Q.indexOf( $ .path)!=0)return J();let w= $ .getWriter? $ .getWriter({path:Q}):_Q1({path:Q});U.pipe(w).on("error",J).on("close",J)};var q=hQ1(I,z);return I.once("crx-header",function(U){q.crxHeader=U}),I.pipe(z).on("finish",function(){q.emit("close")}),q.promise=function(){return new uQ1(function(U,Y){q.on("close",U),q.on("error",Y)})},q}});var yG0=F((Ru1,UD)=>{var k4=function( $ ){var I=1e7,z=7,q=9007199254740992,U=W(q),Y="0123456789abcdefghijklmnopqrstuvwxyz",J=typeof BigInt==="function";function Q(N,A,u,b){if(typeof N>"u")return Q[0];if(typeof A<"u")return+A===10&&!u?j0(N):p6(N,A,u,b);return j0(N)}function w(N,A){this.value=N,this.sign=A,this.isSmall=!1}w.prototype=Object.create(Q.prototype);function K(N){this.value=N,this.sign=N<0,this.isSmall=!0}K.prototype=Object.create(Q.prototype);function H(N){th
Line truncated
* Tmp
*
* Copyright ( c ) 2011 - 2017 KARASZI Istvan < github @ spam . raszi . hu >
*
* MIT Licensed
* / v a r b 1 = t ( " f s " ) , Q D = t ( " o s " ) , f 4 = t ( " p a t h " ) , l G 0 = t ( " c r y p t o " ) , s 8 = { f s : b 1 . c o n s t a n t s , o s : Q D . c o n s t a n t s } , a G 0 = / X X X X X X / , s G 0 = ( s 8 . O _ C R E A T | | s 8 . f s . O _ C R E A T ) | ( s 8 . O _ E X C L | | s 8 . f s . O _ E X C L ) | ( s 8 . O _ R D W R | | s 8 . f s . O _ R D W R ) , a Q 1 = Q D . p l a t f o r m ( ) = = = " w i n 3 2 " , s Q 1 = s 8 . E B A D F | | s 8 . o s . e r r n o . E B A D F , e Q 1 = s 8 . E N O E N T | | s 8 . o s . e r r n o . E N O E N T , B U = [ ] , e G 0 = b 1 . r m d i r S y n c . b i n d ( b 1 ) , $ W 0 = ! 1 ; f u n c t i o n $ 2 1 ( $ , I ) { r e t u r n b 1 . r m ( $ , { r e c u r s i v e : ! 0 } , I ) } f u n c t i o n I W 0 ( $ ) { r e t u r n b 1 . r m S y n c ( $ , { r e c u r s i v e : ! 0 } ) } f u n c t i o n k y ( $ , I ) { l e t z = j U ( $ , I ) , q = z [ 0 ] , U = z [ 1 ] ; H 2 1 ( q , f u n c t i o n ( Y , J ) { i f ( Y ) r e t u r n U ( Y ) ; l e t Q = J . t r i e s ; ( f u n c t i o n w ( ) { t r y { l e t K = q W 0 ( J ) ; b 1 . s t a t ( K , f u n c t i o n ( H ) { i f ( ! H ) { i f ( Q - - > 0 ) r e t u r n w ( ) ; r e t u r n U ( E r r o r ( " C o u l d n o t g e t a u n i q u e t m p f i l e n a m e , m a x t r i e s r e a c h e d " + K ) ) } U ( n u l l , K ) } ) } c a t c h ( K ) { U ( K ) } } ) ( ) } ) } f u n c t i o n f y ( $ ) { l e t I = j U ( $ ) , z = I [ 0 ] , q = G 2 1 ( z ) , U = q . t r i e s ; d o { l e t Y = q W 0 ( q ) ; t r y { b 1 . s t a t S y n c ( Y ) } c a t c h ( J ) { r e t u r n Y } } w h i l e ( U - - > 0 ) ; t h r o w E r r o r ( " C o u l d n o t g e t a u n i q u e t m p f i l e n a m e , m a x t r i e s r e a c h e d " ) } f u n c t i o n I 2 1 ( $ , I ) { l e t z = j U ( $ , I ) , q = z [ 0 ] , U = z [ 1 ] ; k y ( q , f u n c t i o n ( J , Q ) { i f ( J ) r e t u r n U ( J ) ; b 1 . o p e n ( Q , s G 0 , q . m o d e | | 3 8 4 , f u n c t i o n ( K , H ) { i f ( K ) r e t u r n U ( K ) ; i f ( q . d i s c a r d D e s c r i p t o r ) r e t u r n b 1 . c l o s e ( H , f u n c t i o n ( W ) { r e t u r n U ( W , Q , v o i d 0 , u y ( Q , - 1 , q , ! 1 ) ) } ) ; e l s e { l e t G = q . d i s c a r d D e s c r i p t o r | | q . d e t a c h D e s c r i p t o r ; U ( n u l l , Q , H , u y ( Q , G ? - 1 : H , q , ! 1 ) ) } } ) } ) } f u n c t i o n z 2 1 ( $ ) { l e t I = j U ( $ ) , z = I [ 0 ] , q = z . d i s c a r d D e s c r i p t o r | | z . d e t a c h D e s c r i p t o r , U = f y ( z ) , Y = b 1 . o p e n S y n c ( U , s G 0 , z . m o d e | | 3 8 4 ) ; i f ( z . d i s c a r d D e s c r i p t o r ) b 1 . c l o s e S y n c ( Y ) , Y = v o i d 0 ; r e t u r n { n a m e : U , f d : Y , r e m o v e C a l l b a c k : u y ( U , q ? - 1 : Y , z , ! 0 ) } } f u n c t i o n q 2 1 ( $ , I ) { l e t z = j U ( $ , I ) , q = z [ 0 ] , U = z [ 1 ] ; k y ( q , f u n c t i o n ( J , Q ) { i f ( J ) r e t u r n U ( J ) ; b 1 . m k d i r ( Q , q . m o d e | | 4 4 8 , f u n c t i o n ( K ) { i f ( K ) r e t u r n U ( K ) ; U ( n u l l , Q , z W 0 ( Q , q , ! 1 ) ) } ) } ) } f u n c t i o n U 2 1 ( $ ) { l e t I = j U ( $ ) , z = I [ 0 ] , q = f y ( z ) ; r e t u r n b 1 . m k d i r S y n c ( q , z . m o d e | | 4 4 8 ) , { n a m e : q , r e m o v e C a l l b a c k : z W 0 ( q , z , ! 0 ) } } f u n c t i o n Y 2 1 ( $ , I ) { l e t z = f u n c t i o n ( q ) { i f ( q & & ! x y ( q ) ) r e t u r n I ( q ) ; I ( ) } ; i f ( 0 < = $ [ 0 ] ) b 1 . c l o s e ( $ [ 0 ] , f u n c t i o n ( ) { b 1 . u n l i n k ( $ [ 1 ] , z ) } ) ; e l s e b 1 . u n l i n k ( $ [ 1 ] , z ) } f u n c t i o n J 2 1 ( $ ) { l e t I = n u l l ; t r y { i f ( 0 < = $ [ 0 ] ) b 1 . c l o s e S y n c ( $ [ 0 ] ) } c a t c h ( z ) { i f ( ! W 2 1 ( z ) & & ! x y ( z ) ) t h r o w z } f i n a l l y { t r y { b 1 . u n l i n k S y n c ( $ [ 1 ] ) } c a t c h ( z ) { i f ( ! x y ( z ) ) I = z } } i f ( I ! = = n u l l ) t h r o w I } f u n c t i o n u y ( $ , I , z , q ) { l e t U = J D ( J 2 1 , [ I , $ ] , q ) , Y = J D ( Y 2 1 , [ I , $ ] , q , U ) ; i f ( ! z . k e e p ) B U . u n s h i f t ( U ) ; r e t u r n q ? U : Y } f u n c t i o n z W 0 ( $ , I , z ) { l e t q = I . u n s a f e C l e a n u p ? $ 2 1 : b 1 . r m d i r . b i n d ( b 1 ) , U = I . u n s a f e C l e a n u p ? I W 0 : e G 0 , Y = J D ( U , $ , z ) , J = J D ( q , $ , z , Y ) ; i f ( ! I . k e e p ) B U . u n s h i f t ( Y ) ; r e t u r n z ? Y : J } f u n c t i o n J D ( $ , I , z , q ) { l e t U = ! 1 ; r e t u r n f u n c t i o n Y ( J ) { i f ( ! U ) { l e t Q = q | | Y , w = B U . i n d e x O f ( Q ) ; i f ( w > = 0 ) B U . s p l i c e ( w , 1 ) ; i f ( U = ! 0 , z | | $ = = = e G 0 | | $ = = = I W 0 ) r e t u r n $ ( I ) ; e l s e r e t u r n $ ( I , J | | f u n c t i o n ( ) { } ) } } } f u n c t i o n Q 2 1 ( ) { i f ( ! $ W 0 ) r e t u r n ; w h i l e ( B U . l e n g t h ) t r y { B U [ 0 ] ( ) } c a t c h ( $ ) { } } f u n c t i o n o G 0 ( $ ) { l e t I = [ ] , z = n u l l ; t r y { z = l G 0 . r a n d o m B y t e s ( $ ) } c a t c h ( q ) { z = l G 0 . p s e u d o R a n d o m B y t e s ( $ ) } f o r ( l e t q = 0 ; q < $ ; q + + ) I . p u s h ( " 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z " [ z [ q ] % 6 2 ] ) ; r e t u r n I . j o i n ( " " ) } f u n c t i o n z $ ( $ ) { r e t u r n t y p e o f $ > " u " } f u n c t i o n j U ( $ , I ) { i f ( t y p e o f $ = = = " f u n c t i o n " ) r e t u r n [ { } , $ ] ; i f ( z $ ( $ ) ) r e t u r n [ { } , I ] ; l e t z = { } ; f o r ( l e t q o f O b j e c t . g e t O w n P r o p e r t y N a m e s ( $ ) ) z [ q ] = $ [ q ] ; r e t u r n [ z , I ] } f u n c t i o n w 2 1 ( $ , I , z ) { l e t q = f 4 . i s A b s o l u t e ( $ ) ? $ : f 4 . j o i n ( I , $ ) ; b 1 . s t a t ( q , f u n c t i o n ( U ) { i f ( U ) b 1 . r e a l p a t h ( f 4 . d i r n a m e ( q ) , f u n c t i o n ( Y , J ) { i f ( Y ) r e t u r n z ( Y ) ; z ( n u l l , f 4 . j o i n ( J , f 4 . b a s e n a m e ( q ) ) ) } ) ; e l s e b 1 . r e a l p a t h ( q , z ) } ) } f u n c t i o n K 2 1 ( $ , I ) { l e t z = f 4 . i s A b s o l u t e ( $ ) ? $ : f 4 . j o i n ( I , $ ) ; t r y { r e t u r n b 1 . s t a t S y n c ( z ) , b 1 . r e a l p a t h S y n c ( z ) } c a t c h ( q ) { l e t U = b 1 . r e a l p a t h S y n c ( f 4 . d i r n a m e ( z ) ) ; r e t u r n f 4 . j o i n ( U , f 4 . b a s e n a m e ( z ) ) } } f u n c t i o n q W 0 ( $ ) { l e t I = $ . t m p d i r ; i f ( ! z $ ( $ . n a m e ) ) r e t u r n f 4 . j o i n ( I , $ . d i r , $ . n a m e ) ; i f ( ! z $ ( $ . t e m p l a t e ) ) r e t u r n f 4 . j o i n ( I , $ . d i r , $ . t e m p l a t e ) . r e p l a c e ( a G 0 , o G 0 ( 6 ) ) ; l e t z = [ $ . p r e f i x ? $ . p r e f i x : " t m p " , " - " , p r o c e s s . p i d , " - " , o G 0 ( 1 2 ) , $ . p o s t f i x ? " - " + $ . p o s t f i x : " " ] . j o i n ( " " ) ; r e t u r n f 4 . j o i n ( I , $ . d i r , z ) } f u n c t i o n y y ( $ , I ) { i f ( t y p e o f I ! = = " s t r i n g " ) t h r o w E r r o r ( ` $ { $ } o p t i o n m u s t b e a s t r i n g , g o t " $ { t y p e o f I } " . ` ) ; i f ( I . i n c l u d e s ( " . . " ) ) t h r o w E r r o r ( " R e l a t i v e v a l u e n o t a l l o w e d " ) ; r e t u r n I } f u n c t i o n U W 0 ( $ ) { i f ( ! z $ ( $ . n a m e ) ) { l e t I = $ . n a m e ; i f ( f 4 . i s A b s o l u t e ( I ) ) t h r o w E r r o r ( ` n a m e o p t i o n m u s t n o t c o n t a i n a n a b s o l u t e p a t h , f o u n d " $ { I } " . ` ) ; l e t z = f 4 . b a s e n a m e ( I ) ; i f ( z = = = " . . " | | z = = = " . " | | z ! = = I ) t h r o w E r r o r ( ` n a m e o p t i o n m u s t n o t c o n t a i n a p a t h , f o u n d " $ { I } " . ` ) } i f ( ! z $ ( $ . t e m p l a t e ) ) { i f ( t y p e o f $ . t e m p l a t e ! = = " s t r i n g " ) t h r o w E r r o r ( ` t e m p l a t e o p t i o n m u s t b e a s t r i n g , g o t " $ { t y p e o f $ . t e m p l a t e } " . ` ) ; i f ( ! $ . t e m p l a t e . m a t c h ( a G 0 ) ) t h r o w E r r o r ( ` I n v a l i d t e m p l a t e , f o u n d " $ { $ . t e m p l a t e } " . ` ) } i f ( ! z $ ( $ . t r i e s ) & & i s N a N ( $ . t r i e s ) | | $ . t r i e s < 0 ) t h r o w E r r o r ( ` I n v a l i d t r i e s , f o u n d " $ { $ . t r i e s } " . ` ) ; $ . t r i e s = z $ ( $ . n a m e ) ? $ . t r i e s | | 3 : 1 , $ . k e e p = ! ! $ . k e e p , $ . d e t a c h D e s c r i p t o r = ! ! $ . d e t a c h D e s c r i p t o r , $ . d i s c a r d D e s c r i p t o r = ! ! $ . d i s c a r d D e s c r i p t o r , $ . u n s a f e C l e a n u p = ! ! $ . u n s a f e C l e a n u p , $ . p r e f i x = z $ ( $ . p r e f i x ) ? " " : y y ( " p r e f i x " , $ . p r e f i x ) , $ . p o s t f i x = z $ ( $ . p o s t f i x ) ? " " : y y ( " p o s t f i x " , $ . p o s t f i x ) , $ . t e m p l a t e = z $ ( $ . t e m p l a t e ) ? v o i d 0 : y y ( " t e m p l a t e " , $ . t e m p l a t e ) } f u n c t i o n r G 0 ( $ , I , z , q ) { i f ( z $ ( I ) ) r e t u r n q ( n u l l ) ; w 2 1 ( I , z , f u n c t i o n ( U , Y ) { i f ( U ) r e t u r n q ( U ) ; l e t J = f 4 . r e l a t i v e ( z , Y ) ; i f ( J . s t a r t s W i t h ( " . . " ) | | f 4 . i s A b s o l u t e ( J ) ) r e t u r n q ( E r r o r ( ` $ { $ } o p t i o n m u s t b e r e l a t i v e t o " $ { z } " , f o u n d " $ { J } " . ` ) ) ; q ( n u l l , J ) } ) } f u n c t i o n t G 0 ( $ , I , z ) { i f ( z $ ( I ) ) r e t u r n ; l e t q = K 2 1 ( I , z ) , U = f 4 . r e l a t i v e ( z , q ) ; i f ( U . s t a r t s W i t h ( " . . " ) | | f 4 . i s A b s o l u t e ( U ) ) t h r o w E Line truncated
* / v a r b 1 = t ( " f s " ) , H D = t ( " o s " ) , f 4 = t ( " p a t h " ) , r G 0 = t ( " c r y p t o " ) , $ 5 = { f s : b 1 . c o n s t a n t s , o s : H D . c o n s t a n t s } , e G 0 = / X X X X X X / , $ W 0 = ( $ 5 . O _ C R E A T | | $ 5 . f s . O _ C R E A T ) | ( $ 5 . O _ E X C L | | $ 5 . f s . O _ E X C L ) | ( $ 5 . O _ R D W R | | $ 5 . f s . O _ R D W R ) , Y 2 1 = H D . p l a t f o r m ( ) = = = " w i n 3 2 " , J 2 1 = $ 5 . E B A D F | | $ 5 . o s . e r r n o . E B A D F , Q 2 1 = $ 5 . E N O E N T | | $ 5 . o s . e r r n o . E N O E N T , v U = [ ] , I W 0 = b 1 . r m d i r S y n c . b i n d ( b 1 ) , z W 0 = ! 1 ; f u n c t i o n w 2 1 ( $ , I ) { r e t u r n b 1 . r m ( $ , { r e c u r s i v e : ! 0 } , I ) } f u n c t i o n q W 0 ( $ ) { r e t u r n b 1 . r m S y n c ( $ , { r e c u r s i v e : ! 0 } ) } f u n c t i o n p S ( $ , I ) { l e t z = g U ( $ , I ) , q = z [ 0 ] , U = z [ 1 ] ; O 2 1 ( q , f u n c t i o n ( Y , J ) { i f ( Y ) r e t u r n U ( Y ) ; l e t Q = J . t r i e s ; ( f u n c t i o n w ( ) { t r y { l e t K = Y W 0 ( J ) ; b 1 . s t a t ( K , f u n c t i o n ( H ) { i f ( ! H ) { i f ( Q - - > 0 ) r e t u r n w ( ) ; r e t u r n U ( E r r o r ( " C o u l d n o t g e t a u n i q u e t m p f i l e n a m e , m a x t r i e s r e a c h e d " + K ) ) } U ( n u l l , K ) } ) } c a t c h ( K ) { U ( K ) } } ) ( ) } ) } f u n c t i o n c S ( $ ) { l e t I = g U ( $ ) , z = I [ 0 ] , q = F 2 1 ( z ) , U = q . t r i e s ; d o { l e t Y = Y W 0 ( q ) ; t r y { b 1 . s t a t S y n c ( Y ) } c a t c h ( J ) { r e t u r n Y } } w h i l e ( U - - > 0 ) ; t h r o w E r r o r ( " C o u l d n o t g e t a u n i q u e t m p f i l e n a m e , m a x t r i e s r e a c h e d " ) } f u n c t i o n K 2 1 ( $ , I ) { l e t z = g U ( $ , I ) , q = z [ 0 ] , U = z [ 1 ] ; p S ( q , f u n c t i o n ( J , Q ) { i f ( J ) r e t u r n U ( J ) ; b 1 . o p e n ( Q , $ W 0 , q . m o d e | | 3 8 4 , f u n c t i o n ( K , H ) { i f ( K ) r e t u r n U ( K ) ; i f ( q . d i s c a r d D e s c r i p t o r ) r e t u r n b 1 . c l o s e ( H , f u n c t i o n ( W ) { r e t u r n U ( W , Q , v o i d 0 , b S ( Q , - 1 , q , ! 1 ) ) } ) ; e l s e { l e t G = q . d i s c a r d D e s c r i p t o r | | q . d e t a c h D e s c r i p t o r ; U ( n u l l , Q , H , b S ( Q , G ? - 1 : H , q , ! 1 ) ) } } ) } ) } f u n c t i o n H 2 1 ( $ ) { l e t I = g U ( $ ) , z = I [ 0 ] , q = z . d i s c a r d D e s c r i p t o r | | z . d e t a c h D e s c r i p t o r , U = c S ( z ) , Y = b 1 . o p e n S y n c ( U , $ W 0 , z . m o d e | | 3 8 4 ) ; i f ( z . d i s c a r d D e s c r i p t o r ) b 1 . c l o s e S y n c ( Y ) , Y = v o i d 0 ; r e t u r n { n a m e : U , f d : Y , r e m o v e C a l l b a c k : b S ( U , q ? - 1 : Y , z , ! 0 ) } } f u n c t i o n G 2 1 ( $ , I ) { l e t z = g U ( $ , I ) , q = z [ 0 ] , U = z [ 1 ] ; p S ( q , f u n c t i o n ( J , Q ) { i f ( J ) r e t u r n U ( J ) ; b 1 . m k d i r ( Q , q . m o d e | | 4 4 8 , f u n c t i o n ( K ) { i f ( K ) r e t u r n U ( K ) ; U ( n u l l , Q , U W 0 ( Q , q , ! 1 ) ) } ) } ) } f u n c t i o n W 2 1 ( $ ) { l e t I = g U ( $ ) , z = I [ 0 ] , q = c S ( z ) ; r e t u r n b 1 . m k d i r S y n c ( q , z . m o d e | | 4 4 8 ) , { n a m e : q , r e m o v e C a l l b a c k : U W 0 ( q , z , ! 0 ) } } f u n c t i o n V 2 1 ( $ , I ) { l e t z = f u n c t i o n ( q ) { i f ( q & & ! i S ( q ) ) r e t u r n I ( q ) ; I ( ) } ; i f ( 0 < = $ [ 0 ] ) b 1 . c l o s e ( $ [ 0 ] , f u n c t i o n ( ) { b 1 . u n l i n k ( $ [ 1 ] , z ) } ) ; e l s e b 1 . u n l i n k ( $ [ 1 ] , z ) } f u n c t i o n Z 2 1 ( $ ) { l e t I = n u l l ; t r y { i f ( 0 < = $ [ 0 ] ) b 1 . c l o s e S y n c ( $ [ 0 ] ) } c a t c h ( z ) { i f ( ! N 2 1 ( z ) & & ! i S ( z ) ) t h r o w z } f i n a l l y { t r y { b 1 . u n l i n k S y n c ( $ [ 1 ] ) } c a t c h ( z ) { i f ( ! i S ( z ) ) I = z } } i f ( I ! = = n u l l ) t h r o w I } f u n c t i o n b S ( $ , I , z , q ) { l e t U = K D ( Z 2 1 , [ I , $ ] , q ) , Y = K D ( V 2 1 , [ I , $ ] , q , U ) ; i f ( ! z . k e e p ) v U . u n s h i f t ( U ) ; r e t u r n q ? U : Y } f u n c t i o n U W 0 ( $ , I , z ) { l e t q = I . u n s a f e C l e a n u p ? w 2 1 : b 1 . r m d i r . b i n d ( b 1 ) , U = I . u n s a f e C l e a n u p ? q W 0 : I W 0 , Y = K D ( U , $ , z ) , J = K D ( q , $ , z , Y ) ; i f ( ! I . k e e p ) v U . u n s h i f t ( Y ) ; r e t u r n z ? Y : J } f u n c t i o n K D ( $ , I , z , q ) { l e t U = ! 1 ; r e t u r n f u n c t i o n Y ( J ) { i f ( ! U ) { l e t Q = q | | Y , w = v U . i n d e x O f ( Q ) ; i f ( w > = 0 ) v U . s p l i c e ( w , 1 ) ; i f ( U = ! 0 , z | | $ = = = I W 0 | | $ = = = q W 0 ) r e t u r n $ ( I ) ; e l s e r e t u r n $ ( I , J | | f u n c t i o n ( ) { } ) } } } f u n c t i o n X 2 1 ( ) { i f ( ! z W 0 ) r e t u r n ; w h i l e ( v U . l e n g t h ) t r y { v U [ 0 ] ( ) } c a t c h ( $ ) { } } f u n c t i o n t G 0 ( $ ) { l e t I = [ ] , z = n u l l ; t r y { z = r G 0 . r a n d o m B y t e s ( $ ) } c a t c h ( q ) { z = r G 0 . p s e u d o R a n d o m B y t e s ( $ ) } f o r ( l e t q = 0 ; q < $ ; q + + ) I . p u s h ( " 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z " [ z [ q ] % 6 2 ] ) ; r e t u r n I . j o i n ( " " ) } f u n c t i o n U $ ( $ ) { r e t u r n t y p e o f $ > " u " } f u n c t i o n g U ( $ , I ) { i f ( t y p e o f $ = = = " f u n c t i o n " ) r e t u r n [ { } , $ ] ; i f ( U $ ( $ ) ) r e t u r n [ { } , I ] ; l e t z = { } ; f o r ( l e t q o f O b j e c t . g e t O w n P r o p e r t y N a m e s ( $ ) ) z [ q ] = $ [ q ] ; r e t u r n [ z , I ] } f u n c t i o n L 2 1 ( $ , I , z ) { l e t q = f 4 . i s A b s o l u t e ( $ ) ? $ : f 4 . j o i n ( I , $ ) ; b 1 . s t a t ( q , f u n c t i o n ( U ) { i f ( U ) b 1 . r e a l p a t h ( f 4 . d i r n a m e ( q ) , f u n c t i o n ( Y , J ) { i f ( Y ) r e t u r n z ( Y ) ; z ( n u l l , f 4 . j o i n ( J , f 4 . b a s e n a m e ( q ) ) ) } ) ; e l s e b 1 . r e a l p a t h ( q , z ) } ) } f u n c t i o n D 2 1 ( $ , I ) { l e t z = f 4 . i s A b s o l u t e ( $ ) ? $ : f 4 . j o i n ( I , $ ) ; t r y { r e t u r n b 1 . s t a t S y n c ( z ) , b 1 . r e a l p a t h S y n c ( z ) } c a t c h ( q ) { l e t U = b 1 . r e a l p a t h S y n c ( f 4 . d i r n a m e ( z ) ) ; r e t u r n f 4 . j o i n ( U , f 4 . b a s e n a m e ( z ) ) } } f u n c t i o n Y W 0 ( $ ) { l e t I = $ . t m p d i r ; i f ( ! U $ ( $ . n a m e ) ) r e t u r n f 4 . j o i n ( I , $ . d i r , $ . n a m e ) ; i f ( ! U $ ( $ . t e m p l a t e ) ) r e t u r n f 4 . j o i n ( I , $ . d i r , $ . t e m p l a t e ) . r e p l a c e ( e G 0 , t G 0 ( 6 ) ) ; l e t z = [ $ . p r e f i x ? $ . p r e f i x : " t m p " , " - " , p r o c e s s . p i d , " - " , t G 0 ( 1 2 ) , $ . p o s t f i x ? " - " + $ . p o s t f i x : " " ] . j o i n ( " " ) ; r e t u r n f 4 . j o i n ( I , $ . d i r , z ) } f u n c t i o n n S ( $ , I ) { i f ( t y p e o f I ! = = " s t r i n g " ) t h r o w E r r o r ( ` $ { $ } o p t i o n m u s t b e a s t r i n g , g o t " $ { t y p e o f I } " . ` ) ; i f ( I . i n c l u d e s ( " . . " ) ) t h r o w E r r o r ( " R e l a t i v e v a l u e n o t a l l o w e d " ) ; r e t u r n I } f u n c t i o n J W 0 ( $ ) { i f ( ! U $ ( $ . n a m e ) ) { l e t I = $ . n a m e ; i f ( f 4 . i s A b s o l u t e ( I ) ) t h r o w E r r o r ( ` n a m e o p t i o n m u s t n o t c o n t a i n a n a b s o l u t e p a t h , f o u n d " $ { I } " . ` ) ; l e t z = f 4 . b a s e n a m e ( I ) ; i f ( z = = = " . . " | | z = = = " . " | | z ! = = I ) t h r o w E r r o r ( ` n a m e o p t i o n m u s t n o t c o n t a i n a p a t h , f o u n d " $ { I } " . ` ) } i f ( ! U $ ( $ . t e m p l a t e ) ) { i f ( t y p e o f $ . t e m p l a t e ! = = " s t r i n g " ) t h r o w E r r o r ( ` t e m p l a t e o p t i o n m u s t b e a s t r i n g , g o t " $ { t y p e o f $ . t e m p l a t e } " . ` ) ; i f ( ! $ . t e m p l a t e . m a t c h ( e G 0 ) ) t h r o w E r r o r ( ` I n v a l i d t e m p l a t e , f o u n d " $ { $ . t e m p l a t e } " . ` ) } i f ( ! U $ ( $ . t r i e s ) & & i s N a N ( $ . t r i e s ) | | $ . t r i e s < 0 ) t h r o w E r r o r ( ` I n v a l i d t r i e s , f o u n d " $ { $ . t r i e s } " . ` ) ; $ . t r i e s = U $ ( $ . n a m e ) ? $ . t r i e s | | 3 : 1 , $ . k e e p = ! ! $ . k e e p , $ . d e t a c h D e s c r i p t o r = ! ! $ . d e t a c h D e s c r i p t o r , $ . d i s c a r d D e s c r i p t o r = ! ! $ . d i s c a r d D e s c r i p t o r , $ . u n s a f e C l e a n u p = ! ! $ . u n s a f e C l e a n u p , $ . p r e f i x = U $ ( $ . p r e f i x ) ? " " : n S ( " p r e f i x " , $ . p r e f i x ) , $ . p o s t f i x = U $ ( $ . p o s t f i x ) ? " " : n S ( " p o s t f i x " , $ . p o s t f i x ) , $ . t e m p l a t e = U $ ( $ . t e m p l a t e ) ? v o i d 0 : n S ( " t e m p l a t e " , $ . t e m p l a t e ) } f u n c t i o n a G 0 ( $ , I , z , q ) { i f ( U $ ( I ) ) r e t u r n q ( n u l l ) ; L 2 1 ( I , z , f u n c t i o n ( U , Y ) { i f ( U ) r e t u r n q ( U ) ; l e t J = f 4 . r e l a t i v e ( z , Y ) ; i f ( J . s t a r t s W i t h ( " . . " ) | | f 4 . i s A b s o l u t e ( J ) ) r e t u r n q ( E r r o r ( ` $ { $ } o p t i o n m u s t b e r e l a t i v e t o " $ { z } " , f o u n d " $ { J } " . ` ) ) ; q ( n u l l , J ) } ) } f u n c t i o n s G 0 ( $ , I , z ) { i f ( U $ ( I ) ) r e t u r n ; l e t q = D 2 1 ( I , z ) , U = f 4 . r e l a t i v e ( z , q ) ; i f ( U . s t a r t s W i t h ( " . . " ) | | f 4 . i s A b s o l u t e ( U ) ) t h r o w E Line truncated
\ v \ f \ r \ x0E \ x0F \ x10 \ x11 \ x12 \ x13 \ x14 \ x15 \ x16 \ x17 \ x18 \ x19 \ x1A \ x1B \ x1C \ x1D \ x1E \ x1F ! "#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ °·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ� � ﻻﻼ� ﺂ£¤ﺄ� � ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■� `},ibm864:" cp864 ",csibm864:" cp864 ",cp865:{type:" _sbcs ",chars:" ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø £ Ø ₧ ƒáíóúñѪº ¿ ⌐ ¬ ½¼ ¡ « ¤ ░ ▒ ▓ │ ┤ ╡ ╢ ╖ ╕ ╣ ║ ╗ ╝ ╜ ╛ ┐ └ ┴ ┬ ├ ─ ┼ ╞ ╟ ╚ ╔ ╩ ╦ ╠ ═ ╬ ╧ ╨ ╤ ╥ ╙ ╘ ╒ ╓ ╫ ╪ ┘ ┌ █ ▄ ▌ ▐ ▀ αßΓπΣσµτΦΘΩδ ∞ φε ∩ ≡ ± ≥ ≤ ⌠ ⌡ ÷ ≈ ° ∙ · √ ⁿ² ■ "},ibm865:" cp865 ",csibm865:" cp865 ",cp866:{type:" _sbcs ",chars:" АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп ░ ▒ ▓ │ ┤ ╡ ╢ ╖ ╕ ╣ ║ ╗ ╝ ╜ ╛ ┐ └ ┴ ┬ ├ ─ ┼ ╞ ╟ ╚ ╔ ╩ ╦ ╠ ═ ╬ ╧ ╨ ╤ ╥ ╙ ╘ ╒ ╓ ╫ ╪ ┘ ┌ █ ▄ ▌ ▐ ▀ рстуфхцчшщъыьэюяЁёЄєЇїЎў ° ∙ · √ № ¤ ■ "},ibm866:" cp866 ",csibm866:" cp866 ",cp869:{type:" _sbcs ",chars:" � � � � � � Ά � · ¬ ¦ ‘ ’ Έ ― ΉΊΪΌ � � ΎΫ © Ώ²³ά £ έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ « » ░ ▒ ▓ │ ┤ ΚΛΜΝ ╣ ║ ╗ ╝ ΞΟ ┐ └ ┴ ┬ ├ ─ ┼ ΠΡ ╚ ╔ ╩ ╦ ╠ ═ ╬ ΣΤΥΦΧΨΩαβγ ┘ ┌ █ ▄ δε ▀ ζηθικλμνξοπρσςτ ΄ ± υφχ § ψ ΅ ° ¨ ωϋΰώ ■ "},ibm869:" cp869 ",csibm869:" cp869 ",cp922:{type:" _sbcs ",chars:"
¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ‾ ° ± ²³ ´ µ ¶ · ¸ ¹º » ¼½¾ ¿ ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ × ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö ÷ øùúûüýžÿ "},ibm922:" cp922 ",csibm922:" cp922 ",cp1046:{type:" _sbcs ",chars:" ﺈ × ÷ ﹱ ■ │ ─ ┐ ┌ └ ┘ ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ ﺋﺑﺗﺛﺟﺣ ، ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ ؛ ﺻﺿﻊ ؟ ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىي ً ٌ ٍ َ ُ ِ ّ ْ ﻗﻛﻟ ﻵﻷﻹﻻﻣﻧﻬﻩ � "},ibm1046:" cp1046 ",csibm1046:" cp1046 ",cp1124:{type:" _sbcs ",chars:"
ЁЂҐЄЅІЇЈЉЊЋЌ ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя № ёђґєѕіїјљњћќ § ўџ "},ibm1124:" cp1124 ",csibm1124:" cp1124 ",cp1125:{type:" _sbcs ",chars:" АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп ░ ▒ ▓ │ ┤ ╡ ╢ ╖ ╕ ╣ ║ ╗ ╝ ╜ ╛ ┐ └ ┴ ┬ ├ ─ ┼ ╞ ╟ ╚ ╔ ╩ ╦ ╠ ═ ╬ ╧ ╨ ╤ ╥ ╙ ╘ ╒ ╓ ╫ ╪ ┘ ┌ █ ▄ ▌ ▐ ▀ рстуфхцчшщъыьэюяЁёҐґЄєІіЇї · √ № ¤ ■ "},ibm1125:" cp1125 ",csibm1125:" cp1125 ",cp1129:{type:" _sbcs ",chars:"
¡ ¢ £ ¤ ¥ ¦ § œ © ª « ¬ ® ¯ ° ± ²³Ÿµ ¶ · Œ¹º » ¼½¾ ¿ ÀÁÂĂÄÅÆÇÈÉÊË ̀ ÍÎÏĐÑ ̉ ÓÔƠÖ × ØÙÚÛÜƯ ̃ ßàáâăäåæçèéêë ́ íîïđñ ̣ óôơö ÷ øùúûüư ₫ ÿ "},ibm1129:" cp1129 ",csibm1129:" cp1129 ",cp1133:{type:" _sbcs ",chars:"
ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ � � � ຯະາຳ ິ ີ ຶ ື ຸ ູ ຼ ັ ົ ຽ � � � ເແໂໃໄ ່ ້ ໊ ໋ ໌ ໍ ໆ � ໜໝ ₭ � � � � � � � � � � � � � � � � ໐໑໒໓໔໕໖໗໘໙ � � ¢ ¬ ¦ � "},ibm1133:" cp1133 ",csibm1133:" cp1133 ",cp1161:{type:" _sbcs ",chars:" � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � ่ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะ ั าำ ิ ี ึ ื ุ ู ฺ ้ ๊ ๋ € ฿ เแโใไๅๆ ็ ่ ้ ๊ ๋ ์ ํ ๎ ๏ ๐๑๒๓๔๕๖๗๘๙ ๚ ๛ ¢ ¬ ¦ "},ibm1161:" cp1161 ",csibm1161:" cp1161 ",cp1162:{type:" _sbcs ",chars:" € … ‘ ’ “ ” • – — กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะ ั าำ ิ ี ึ ื ุ ู ฺ � � � � ฿ เแโใไๅๆ ็ ่ ้ ๊ ๋ ์ ํ ๎ ๏ ๐๑๒๓๔๕๖๗๘๙ ๚ ๛ � � � � "},ibm1162:" cp1162 ",csibm1162:" cp1162 ",cp1163:{type:" _sbcs ",chars:"
¡ ¢ £ € ¥ ¦ § œ © ª « ¬ ® ¯ ° ± ²³Ÿµ ¶ · Œ¹º » ¼½¾ ¿ ÀÁÂĂÄÅÆÇÈÉÊË ̀ ÍÎÏĐÑ ̉ ÓÔƠÖ × ØÙÚÛÜƯ ̃ ßàáâăäåæçèéêë ́ íîïđñ ̣ óôơö ÷ øùúûüư ₫ ÿ "},ibm1163:" cp1163 " , csi Line truncated
\ v \ f \ r \ x0E \ x0F \ x10ỨỰỲỶỸÝỴ \ x18 \ x19 \ x1A \ x1B \ x1C \ x1D \ x1E \ x1F ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ`},georgianacademy:{type:" _sbcs ",chars:" ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ ‘ ’ “ ” • – — ˜ ™ š › œ Ÿ ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ²³ ´ µ ¶ · ¸ ¹º » ¼½¾ ¿ აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö ÷ øùúûüýþÿ "},georgianps:{type:" _sbcs ",chars:" ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ ‘ ’ “ ” • – — ˜ ™ š › œ Ÿ ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ²³ ´ µ ¶ · ¸ ¹º » ¼½¾ ¿ აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö ÷ øùúûüýþÿ "},pt154:{type:" _sbcs ",chars:" ҖҒӮғ „ … ҶҮҲүҠӢҢҚҺҸҗ ‘ ’ “ ” • – — ҳҷҡӣңқһҹ ЎўЈӨҘҰ § Ё © Ә « ¬ ӯ ® Ҝ ° ұІіҙө ¶ · ё № ә » јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя "},viscii:{type:" _sbcs " , chars : ` \x 00 \x 01Ẳ \x 03 \x 04ẴẪ \x 07 \b
\ v \ f \ r \ x0E \ x0F \ x10 \ x11 \ x12 \ x13Ỷ \ x15 \ x16 \ x17 \ x18Ỹ \ x1A \ x1B \ x1C \ x1DỴ \ x1F ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ`},iso646cn:{type:" _sbcs " , chars : ` \x 00 \x 01 \x 02 \x 03 \x 04 \x 05 \x 06 \x 07 \b
\ v \ f \ r \ x0E \ x0F \ x10 \ x11 \ x12 \ x13 \ x14 \ x15 \ x16 \ x17 \ x18 \ x19 \ x1A \ x1B \ x1C \ x1D \ x1E \ x1F ! "#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}‾ � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � `},iso646jp:{type:" _sbcs " , chars : ` \x 00 \x 01 \x 02 \x 03 \x 04 \x 05 \x 06 \x 07 \b
\ v \ f \ r \ x0E \ x0F \ x10 \ x11 \ x12 \ x13 \ x14 \ x15 \ x16 \ x17 \ x18 \ x19 \ x1A \ x1B \ x1C \ x1D \ x1E \ x1F ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_\`abcdefghijklmnopqrstuvwxyz{|}‾ � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � `},hproman8:{type:" _sbcs ",chars:"
ÀÂÈÊËÎÏ ´ ˋˆ ¨ ˜ ÙÛ ₤ ¯ Ýý ° ÇçÑñ ¡ ¿ ¤ £ ¥ § ƒ ¢ âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ · µ ¶ ¾ — ¼½ªº « ■ » ± � "},macintosh:{type:" _sbcs ",chars:" ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü † ° ¢ £ § • ¶ ß ® © ™ ´ ¨ ≠ ÆØ ∞ ± ≤ ≥ ¥ µ ∂ ∑ ∏ π ∫ ªºΩæø ¿ ¡ ¬ √ ƒ ≈ ∆ « » … ÀÃÕŒœ – — “ ” ‘ ’ ÷ ◊ ÿŸ ⁄ ¤ ‹ › fifl ‡ · ‚ „ ‰ ÂÊÁËÈÍÎÏÌÓÔ � ÒÚÛÙıˆ ˜ ¯ ˘ ˙ ˚ ¸ ˝ ˛ ˇ "},ascii:{type:" _sbcs ",chars:" � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � "},tis620:{type:" _sbcs ",chars:" � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะ ั าำ ิ ี ึ ื ุ ู ฺ � � � � ฿ เแโใไๅๆ ็ ่ ้ ๊ ๋ ์ ํ ๎ ๏ ๐๑๒๓๔๕๖๗๘๙ ๚ ๛ � � � � "}}});var iV0=O((tK1)=>{var fu=a5().Buffer;tK1._dbcs=e5;var W6=-1,bV0=-2,r$=-10,k6=-1000,fU=Array(256),Pw=-1;for(Aw=0;Aw<256;Aw++)fU[Aw]=W6;var Aw;function e5($,I){if(this.encodingName=$.encodingName,!$)throw Error(" DBCS codec is called without the data . ");if(!$.table)throw Error(" Encoding '"+this.encodingName+"' has no data . ");var z=$.table();this.decodeTables=[],this.decodeTables[0]=fU.slice(0),this.decodeTableSeq=[];for(var q=0;q<z.length;q++)this._addDecodeChunk(z[q]);if(typeof $.gb18030===" function "){this.gb18030=$.gb18030();var U=this.decodeTables.length;this.decodeTables.push(fU.slice(0));var Y=this.decodeTables.length;this.decodeTables.push(fU.slice(0));var J=this.decodeTables[0];for(var q=129;q<=254;q++){var Q=this.decodeTables[k6-J[q]];for(var w=48;w<=57;w++){if(Q[w]===W6)Q[w]=k6-U;else if(Q[w]>k6)throw Error(" gb18030 decode tables conflict at byte 2 ");var K=this.decodeTables[k6-Q[w]];for(var H=129;H<=254;H++){if(K[H]===W6)K[H]=k6-Y;else if(K[H]===k6-Y)continue;else if(K[H]>k6)throw Error(" gb18030 decode tables conflict at byte 3 ");var G=this.decodeTables[k6-K[H]];for(var W=48;W<=57;W++)if(G[W]===W6)G[W]=bV0}}}}this.defaultCharUnicode=I.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var Z={};if($.encodeSkipVals)for(var q=0;q<$.encodeSkipVals.length;q++){var X=$.encodeSkipVals[q];if(typeof X===" number ")Z[X]=!0;else for(var w=X.from;w<=X.to;w++)Z[w]=!0}if(this._fillEncodeTable(0,0,Z),$.encodeAdd){for(var L in $.encodeAdd)if(Object.prototype.hasOwnProperty.call($.encodeAdd,L))this._setEncodeChar(L.charCodeAt(0),$.encodeAdd[L])}if(this.defCharSB=this.encodeTable[0][I.defaultCharSingleByte.charCodeAt(0)],this.defCharSB===W6)this.defCharSB=this.encodeTable[0][" ? "];if(this.defCharSB===W6)this.defCharSB=63}e5.prototype.encoder=xD;e5.prototype.decoder=nu;e5.prototype._getDecodeTrieNode=function($){var I=[];for(;$>0;$>>>=8)I.push($&255);if(I.length==0)I.push(0);var z=this.decodeTables[0];for(var q=I.length-1;q>0;q--){var U=z[I[q]];if(U==W6)z[I[q]]=k6-this.decodeTables.length,this.decodeTables.push(z=fU.slice(0));else if(U<=k6)z=this.decodeTables[k6-U];else throw Error(" Overwrite byte in "+this.encodingName+" , addr : "+$.toString(16))}return z};e5.prototype._addDecodeChunk=function($){var I=parseInt($[0],16),z=this._getDecodeTrieNode(I);I=I&255;for(var q=1;q<$.length;q++){var U=$[q];if(typeof U===" string ")for(var Y=0;Y<U.length;){var J=U.charCodeAt(Y++);if(J>=55296&&J<56320){var Q=U.charCodeAt(Y++);if(Q>=56320&&Q<57344)z[I++]=65536+(J-55296)*1024+(Q-56320);else throw Error(" Incorrect surrogate pair in "+this.encodingName+" at chunk "+$[0])}else if(J>4080&&J<=4095){var w=4095-J+2,K=[];for(var H=0;H<w;H++)K.push(U.charCodeAt(Y++));z[I++]=r$-this.decodeTableSeq.length,this.decodeTableSeq.push(K)}else z[I++]=J}else if(typeof U===" number "){var G=z[I-1]+1;for(var Y=0;Y<U;Y++)z[I++]=G++}else throw Error(" Incorrect type '"+typeof U+"' given in "+this.encodingName+" at chunk "+$[0])}if(I>255)throw Error(" Incorrect chunk in " + this . enco Line truncated
` )}var CI=( $ )=>(I,z,q,U)=>{let Y=q?{...q,async:!1}:{async:!1},J=I._zod.run({value:z,issues:[]},Y);if(J instanceof Promise)throw new O8;if(J.issues.length){let Q=new(U?.Err?? $ )(J.issues.map((w)=>B6(w,Y,D4())));throw WK(Q,U?.callee),Q}return J.value},wY=CI(p6),hI=( $ )=>async(I,z,q,U)=>{let Y=q?{...q,async:!0}:{async:!0},J=I._zod.run({value:z,issues:[]},Y);if(J instanceof Promise)J=await J;if(J.issues.length){let Q=new(U?.Err?? $ )(J.issues.map((w)=>B6(w,Y,D4())));throw WK(Q,U?.callee),Q}return J.value},KY=hI(p6),SI=( $ )=>(I,z,q)=>{let U=q?{...q,async:!1}:{async:!1},Y=I._zod.run({value:z,issues:[]},U);if(Y instanceof Promise)throw new O8;return Y.issues.length?{success:!1,error:new( $ ??YY)(Y.issues.map((J)=>B6(J,U,D4())))}:{success:!0,data:Y.value}},yI=SI(p6),uI=( $ )=>async(I,z,q)=>{let U=q?{...q,async:!0}:{async:!0},Y=I._zod.run({value:z,issues:[]},U);if(Y instanceof Promise)Y=await Y;return Y.issues.length?{success:!1,error:new $ (Y.issues.map((J)=>B6(J,U,D4())))}:{success:!0,data:Y.value}},HY=uI(p6),VK=( $ )=>(I,z,q)=>{let U=q?{...q,direction:"backward"}:{direction:"backward"};return CI( $ )(I,z,U)},_k=VK(p6),ZK=( $ )=>(I,z,q)=>{return CI( $ )(I,z,q)},Ck=ZK(p6),XK=( $ )=>async(I,z,q)=>{let U=q?{...q,direction:"backward"}:{direction:"backward"};return hI( $ )(I,z,U)},hk=XK(p6),LK=( $ )=>async(I,z,q)=>{return hI( $ )(I,z,q)},Sk=LK(p6),DK=( $ )=>(I,z,q)=>{let U=q?{...q,direction:"backward"}:{direction:"backward"};return SI( $ )(I,z,U)},yk=DK(p6),FK=( $ )=>(I,z,q)=>{return SI( $ )(I,z,q)},uk=FK(p6),OK=( $ )=>async(I,z,q)=>{let U=q?{...q,direction:"backward"}:{direction:"backward"};return uI( $ )(I,z,U)},xk=OK(p6),NK=( $ )=>async(I,z,q)=>{return uI( $ )(I,z,q)},kk=NK(p6);var K $ ={};Y5(K $ ,{xid:()=>lF,uuid7:()=>qO0,uuid6:()=>zO0,uuid4:()=>IO0,uuid:()=>b7,uppercase:()=>FO,unicodeEmail:()=>fk,undefined:()=>LO,ulid:()=>mF,time:()=>KO,string:()=>GO,sha512_hex:()=>TO0,sha512_base64url:()=>BO0,sha512_base64:()=>EO0,sha384_hex:()=>MO0,sha384_base64url:()=>PO0,sha384_base64:()=>AO0,sha256_hex:()=>FO0,sha256_base64url:()=>NO0,sha256_base64:()=>OO0,sha1_hex:()=>XO0,sha1_base64url:()=>DO0,sha1_base64:()=>LO0,rfc5322Email:()=>YO0,number:()=>GY,null:()=>XO,nanoid:()=>rF,md5_hex:()=>WO0,md5_base64url:()=>ZO0,md5_base64:()=>VO0,mac:()=>zO,lowercase:()=>DO,ksuid:()=>oF,ipv6:()=>IO,ipv4:()=> $ O,integer:()=>VO,idnEmail:()=>JO0,httpProtocol:()=>JO,html5Email:()=>UO0,hostname:()=>KO0,hex:()=>GO0,guid:()=>aF,extendedDuration:()=> $ O0,emoji:()=>eF,email:()=>sF,e164:()=>QO,duration:()=>tF,domain:()=>HO0,datetime:()=>HO,date:()=>wO,cuid2:()=>dF,cuid:()=>cF,cidrv6:()=>UO,cidrv4:()=>qO,browserEmail:()=>QO0,boolean:()=>ZO,bigint:()=>WO,base64url:()=>MK,base64:()=>YO});var cF=/^[cC][0-9a-z]{6,} $ /,dF=/^[0-9a-z]+ $ /,mF=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26} $ /,lF=/^[0-9a-vA-V]{20} $ /,oF=/^[A-Za-z0-9]{27} $ /,rF=/^[a-zA-Z0-9_-]{21} $ /,tF=/^P(?:( \d +W)|(?!.*W)(?= \d |T \d )( \d +Y)?( \d +M)?( \d +D)?(T(?= \d )( \d +H)?( \d +M)?( \d +([.,] \d +)?S)?)?) $ /, $ O0=/^[-+]?P(?! $ )(?:(?:[-+]? \d +Y)|(?:[-+]? \d +[.,] \d +Y $ ))?(?:(?:[-+]? \d +M)|(?:[-+]? \d +[.,] \d +M $ ))?(?:(?:[-+]? \d +W)|(?:[-+]? \d +[.,] \d +W $ ))?(?:(?:[-+]? \d +D)|(?:[-+]? \d +[.,] \d +D $ ))?(?:T(?=[ \d +-])(?:(?:[-+]? \d +H)|(?:[-+]? \d +[.,] \d +H $ ))?(?:(?:[-+]? \d +M)|(?:[-+]? \d +[.,] \d +M $ ))?(?:[-+]? \d +(?:[.,] \d +)?S)?)?? $ /,aF=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}) $ /,b7=( $ )=>{if(! $ )return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff) $ /;return new RegExp( ` ^ ( [ 0 - 9 a - fA - F ] { 8 } - [ 0 - 9 a - fA - F ] { 4 } - $ { $ } [ 0 - 9 a - fA - F ] { 3 } - [ 89 abAB ] [ 0 - 9 a - fA - F ] { 3 } - [ 0 - 9 a - fA - F ] { 12 } ) $ ` )},IO0=b7(4),zO0=b7(6),qO0=b7(7),sF=/^(?! \. )(?!.* \. \. )([A-Za-z0-9_'+ \- \. ]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9 \- ]* \. )+[A-Za-z]{2,} $ /,UO0=/^[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 ] ) ? ) * $ / , YO0 = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ , fk = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u , JO0 = fk , QO0 = /^[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])?)*$/ , wO0 = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$" ; function eF ( ) { return new RegExp ( wO0 , "u" ) } var $O = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/ , IO = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/ , zO = ( $ ) => { let I = R$ ( $ ? ? ":" ) ; return new RegExp ( ` ^(?:[0-9A-F]{2} ${ I } ){5}[0-9A-F]{2} $ |^(?:[0-9a-f]{2} ${ I } ){5}[0-9a-f]{2} $ ` ) } , qO = / ^ ( ( 2 5 [ 0 - 5 ] | 2 [ 0 - 4 ] [ 0 - 9 ] | 1 [ 0 - 9 ] [ 0 - 9 ] | [ 1 - 9 ] [ 0 - 9 ] | [ 0 - 9 ] ) \ . ) { 3 } ( 2 5 [ 0 Line truncated
\ v \ f \ r \ x0E \ x0F \ x10 \ x11 \ x12 \ x13 \ x14 \ x15 \ x16 \ x17 \ x18 \ x19 \ x1A \ x1B \ x1C \ x1D \ x1E \ x1F ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_\`abcdefghijklmnopqrstuvwxyz{|}‾ � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � `},hproman8:{type:" _sbcs ",chars:"
ÀÂÈÊËÎÏ ´ ˋˆ ¨ ˜ ÙÛ ₤ ¯ Ýý ° ÇçÑñ ¡ ¿ ¤ £ ¥ § ƒ ¢ âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ · µ ¶ ¾ — ¼½ªº « ■ » ± � "},macintosh:{type:" _sbcs ",chars:" ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü † ° ¢ £ § • ¶ ß ® © ™ ´ ¨ ≠ ÆØ ∞ ± ≤ ≥ ¥ µ ∂ ∑ ∏ π ∫ ªºΩæø ¿ ¡ ¬ √ ƒ ≈ ∆ « » … ÀÃÕŒœ – — “ ” ‘ ’ ÷ ◊ ÿŸ ⁄ ¤ ‹ › fifl ‡ · ‚ „ ‰ ÂÊÁËÈÍÎÏÌÓÔ � ÒÚÛÙıˆ ˜ ¯ ˘ ˙ ˚ ¸ ˝ ˛ ˇ "},ascii:{type:" _sbcs ",chars:" � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � "},tis620:{type:" _sbcs ",chars:" � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะ ั าำ ิ ี ึ ื ุ ู ฺ � � � � ฿ เแโใไๅๆ ็ ่ ้ ๊ ๋ ์ ํ ๎ ๏ ๐๑๒๓๔๕๖๗๘๙ ๚ ๛ � � � � "}}});var tV0=F((ZH1)=>{var iy=$9().Buffer;ZH1._dbcs=z9;var W6=-1,rV0=-2,a$=-10,n6=-1000,iU=Array(256),Bw=-1;for(Ew=0;Ew<256;Ew++)iU[Ew]=W6;var Ew;function z9($,I){if(this.encodingName=$.encodingName,!$)throw Error(" DBCS codec is called without the data . ");if(!$.table)throw Error(" Encoding '"+this.encodingName+"' has no data . ");var z=$.table();this.decodeTables=[],this.decodeTables[0]=iU.slice(0),this.decodeTableSeq=[];for(var q=0;q<z.length;q++)this._addDecodeChunk(z[q]);if(typeof $.gb18030===" function "){this.gb18030=$.gb18030();var U=this.decodeTables.length;this.decodeTables.push(iU.slice(0));var Y=this.decodeTables.length;this.decodeTables.push(iU.slice(0));var J=this.decodeTables[0];for(var q=129;q<=254;q++){var Q=this.decodeTables[n6-J[q]];for(var w=48;w<=57;w++){if(Q[w]===W6)Q[w]=n6-U;else if(Q[w]>n6)throw Error(" gb18030 decode tables conflict at byte 2 ");var K=this.decodeTables[n6-Q[w]];for(var H=129;H<=254;H++){if(K[H]===W6)K[H]=n6-Y;else if(K[H]===n6-Y)continue;else if(K[H]>n6)throw Error(" gb18030 decode tables conflict at byte 3 ");var G=this.decodeTables[n6-K[H]];for(var W=48;W<=57;W++)if(G[W]===W6)G[W]=rV0}}}}this.defaultCharUnicode=I.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var Z={};if($.encodeSkipVals)for(var q=0;q<$.encodeSkipVals.length;q++){var X=$.encodeSkipVals[q];if(typeof X===" number ")Z[X]=!0;else for(var w=X.from;w<=X.to;w++)Z[w]=!0}if(this._fillEncodeTable(0,0,Z),$.encodeAdd){for(var L in $.encodeAdd)if(Object.prototype.hasOwnProperty.call($.encodeAdd,L))this._setEncodeChar(L.charCodeAt(0),$.encodeAdd[L])}if(this.defCharSB=this.encodeTable[0][I.defaultCharSingleByte.charCodeAt(0)],this.defCharSB===W6)this.defCharSB=this.encodeTable[0][" ? "];if(this.defCharSB===W6)this.defCharSB=63}z9.prototype.encoder=bD;z9.prototype.decoder=py;z9.prototype._getDecodeTrieNode=function($){var I=[];for(;$>0;$>>>=8)I.push($&255);if(I.length==0)I.push(0);var z=this.decodeTables[0];for(var q=I.length-1;q>0;q--){var U=z[I[q]];if(U==W6)z[I[q]]=n6-this.decodeTables.length,this.decodeTables.push(z=iU.slice(0));else if(U<=n6)z=this.decodeTables[n6-U];else throw Error(" Overwrite byte in "+this.encodingName+" , addr : "+$.toString(16))}return z};z9.prototype._addDecodeChunk=function($){var I=parseInt($[0],16),z=this._getDecodeTrieNode(I);I=I&255;for(var q=1;q<$.length;q++){var U=$[q];if(typeof U===" string ")for(var Y=0;Y<U.length;){var J=U.charCodeAt(Y++);if(J>=55296&&J<56320){var Q=U.charCodeAt(Y++);if(Q>=56320&&Q<57344)z[I++]=65536+(J-55296)*1024+(Q-56320);else throw Error(" Incorrect surrogate pair in "+this.encodingName+" at chunk "+$[0])}else if(J>4080&&J<=4095){var w=4095-J+2,K=[];for(var H=0;H<w;H++)K.push(U.charCodeAt(Y++));z[I++]=a$-this.decodeTableSeq.length,this.decodeTableSeq.push(K)}else z[I++]=J}else if(typeof U===" number "){var G=z[I-1]+1;for(var Y=0;Y<U;Y++)z[I++]=G++}else throw Error(" Incorrect type '"+typeof U+"' given in "+this.encodingName+" at chunk "+$[0])}if(I>255)throw Error(" Incorrect chunk in " + this . enco Line truncated
` )}var uI=( $ )=>(I,z,q,U)=>{let Y=q?{...q,async:!1}:{async:!1},J=I._zod.run({value:z,issues:[]},Y);if(J instanceof Promise)throw new M8;if(J.issues.length){let Q=new(U?.Err?? $ )(J.issues.map((w)=>v6(w,Y,D4())));throw XK(Q,U?.callee),Q}return J.value},GY=uI(d6),SI=( $ )=>async(I,z,q,U)=>{let Y=q?{...q,async:!0}:{async:!0},J=I._zod.run({value:z,issues:[]},Y);if(J instanceof Promise)J=await J;if(J.issues.length){let Q=new(U?.Err?? $ )(J.issues.map((w)=>v6(w,Y,D4())));throw XK(Q,U?.callee),Q}return J.value},WY=SI(d6),yI=( $ )=>(I,z,q)=>{let U=q?{...q,async:!1}:{async:!1},Y=I._zod.run({value:z,issues:[]},U);if(Y instanceof Promise)throw new M8;return Y.issues.length?{success:!1,error:new( $ ??wY)(Y.issues.map((J)=>v6(J,U,D4())))}:{success:!0,data:Y.value}},xI=yI(d6),kI=( $ )=>async(I,z,q)=>{let U=q?{...q,async:!0}:{async:!0},Y=I._zod.run({value:z,issues:[]},U);if(Y instanceof Promise)Y=await Y;return Y.issues.length?{success:!1,error:new $ (Y.issues.map((J)=>v6(J,U,D4())))}:{success:!0,data:Y.value}},VY=kI(d6),LK=( $ )=>(I,z,q)=>{let U=q?{...q,direction:"backward"}:{direction:"backward"};return uI( $ )(I,z,U)},hk=LK(d6),DK=( $ )=>(I,z,q)=>{return uI( $ )(I,z,q)},uk=DK(d6),OK=( $ )=>async(I,z,q)=>{let U=q?{...q,direction:"backward"}:{direction:"backward"};return SI( $ )(I,z,U)},Sk=OK(d6),FK=( $ )=>async(I,z,q)=>{return SI( $ )(I,z,q)},yk=FK(d6),NK=( $ )=>(I,z,q)=>{let U=q?{...q,direction:"backward"}:{direction:"backward"};return yI( $ )(I,z,U)},xk=NK(d6),MK=( $ )=>(I,z,q)=>{return yI( $ )(I,z,q)},kk=MK(d6),AK=( $ )=>async(I,z,q)=>{let U=q?{...q,direction:"backward"}:{direction:"backward"};return kI( $ )(I,z,U)},fk=AK(d6),PK=( $ )=>async(I,z,q)=>{return kI( $ )(I,z,q)},nk=PK(d6);var G $ ={};w5(G $ ,{xid:()=>sO,uuid7:()=>GF0,uuid6:()=>HF0,uuid4:()=>KF0,uuid:()=>p7,uppercase:()=>PF,unicodeEmail:()=>bk,undefined:()=>MF,ulid:()=>aO,time:()=>ZF,string:()=>LF,sha512_hex:()=>CF0,sha512_base64url:()=>uF0,sha512_base64:()=>hF0,sha384_hex:()=>gF0,sha384_base64url:()=>_F0,sha384_base64:()=>RF0,sha256_hex:()=>BF0,sha256_base64url:()=>vF0,sha256_base64:()=>jF0,sha1_hex:()=>PF0,sha1_base64url:()=>EF0,sha1_base64:()=>TF0,rfc5322Email:()=>VF0,number:()=>ZY,null:()=>NF,nanoid:()=> $ F,md5_hex:()=>NF0,md5_base64url:()=>AF0,md5_base64:()=>MF0,mac:()=>QF,lowercase:()=>AF,ksuid:()=>eO,ipv6:()=>JF,ipv4:()=>YF,integer:()=>OF,idnEmail:()=>ZF0,httpProtocol:()=>GF,html5Email:()=>WF0,hostname:()=>DF0,hex:()=>FF0,guid:()=>zF,extendedDuration:()=>wF0,emoji:()=>UF,email:()=>qF,e164:()=>WF,duration:()=>IF,domain:()=>OF0,datetime:()=>XF,date:()=>VF,cuid2:()=>tO,cuid:()=>rO,cidrv6:()=>KF,cidrv4:()=>wF,browserEmail:()=>XF0,boolean:()=>FF,bigint:()=>DF,base64url:()=>TK,base64:()=>HF});var rO=/^[cC][0-9a-z]{6,} $ /,tO=/^[0-9a-z]+ $ /,aO=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26} $ /,sO=/^[0-9a-vA-V]{20} $ /,eO=/^[A-Za-z0-9]{27} $ /, $ F=/^[a-zA-Z0-9_-]{21} $ /,IF=/^P(?:( \d +W)|(?!.*W)(?= \d |T \d )( \d +Y)?( \d +M)?( \d +D)?(T(?= \d )( \d +H)?( \d +M)?( \d +([.,] \d +)?S)?)?) $ /,wF0=/^[-+]?P(?! $ )(?:(?:[-+]? \d +Y)|(?:[-+]? \d +[.,] \d +Y $ ))?(?:(?:[-+]? \d +M)|(?:[-+]? \d +[.,] \d +M $ ))?(?:(?:[-+]? \d +W)|(?:[-+]? \d +[.,] \d +W $ ))?(?:(?:[-+]? \d +D)|(?:[-+]? \d +[.,] \d +D $ ))?(?:T(?=[ \d +-])(?:(?:[-+]? \d +H)|(?:[-+]? \d +[.,] \d +H $ ))?(?:(?:[-+]? \d +M)|(?:[-+]? \d +[.,] \d +M $ ))?(?:[-+]? \d +(?:[.,] \d +)?S)?)?? $ /,zF=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}) $ /,p7=( $ )=>{if(! $ )return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff) $ /;return new RegExp( ` ^ ( [ 0 - 9 a - fA - F ] { 8 } - [ 0 - 9 a - fA - F ] { 4 } - $ { $ } [ 0 - 9 a - fA - F ] { 3 } - [ 89 abAB ] [ 0 - 9 a - fA - F ] { 3 } - [ 0 - 9 a - fA - F ] { 12 } ) $ ` )},KF0=p7(4),HF0=p7(6),GF0=p7(7),qF=/^(?! \. )(?!.* \. \. )([A-Za-z0-9_'+ \- \. ]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9 \- ]* \. )+[A-Za-z]{2,} $ /,WF0=/^[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 ] ) ? ) * $ / , VF0 = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ , bk = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u , ZF0 = bk , XF0 = /^[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])?)*$/ , LF0 = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$" ; function UF ( ) { return new RegExp ( LF0 , "u" ) } var YF = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/ , JF = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/ , QF = ( $ ) => { let I = R$ ( $ ? ? ":" ) ; return new RegExp ( ` ^(?:[0-9A-F]{2} ${ I } ){5}[0-9A-F]{2} $ |^(?:[0-9a-f]{2} ${ I } ){5}[0-9a-f]{2} $ ` ) } , wF = / ^ ( ( 2 5 [ 0 - 5 ] | 2 [ 0 - 4 ] [ 0 - 9 ] | 1 [ 0 - 9 ] [ 0 - 9 ] | [ 1 - 9 ] [ 0 - 9 ] | [ 0 - 9 ] ) \ . ) { 3 } ( 2 5 [ 0 Line truncated
` ).filter((Y)=>Y),q=Math.min(...z.map((Y)=>Y.length-Y.trimStart().length)),U=z.map((Y)=>Y.slice(q)).map((Y)=>" ".repeat(this.indent*2)+Y);for(let Y of U)this.content.push(Y)}compile(){let $ =Function,I=this?.args,q=[...(this?.content??[""]).map((U)=> ` $ { U } ` )];return new $ (...I,q.join( `
` ))}}var xO={major:4,minor:4,patch:3};var p0=o(" $ ZodType",( $ ,I)=>{var z; $ ??( $ ={}), $ ._zod.def=I, $ ._zod.bag= $ ._zod.bag||{}, $ ._zod.version=xO;let q=[... $ ._zod.def.checks??[]];if( $ ._zod.traits.has(" $ ZodCheck"))q.unshift( $ );for(let U of q)for(let Y of U._zod.onattach)Y( $ );if(q.length===0)(z= $ ._zod).deferred??(z.deferred=[]), $ ._zod.deferred?.push(()=>{ $ ._zod.run= $ ._zod.parse});else{let U=(J,Q,w)=>{let K=K9(J),H;for(let G of Q){if(G._zod.def.when){if(bF(J))continue;if(!G._zod.def.when(J))continue}else if(K)continue;let W=J.issues.length,Z=G._zod.check(J);if(Z instanceof Promise&&w?.async===!1)throw new O8;if(H||Z instanceof Promise)H=(H??Promise.resolve()).then(async()=>{if(await Z,J.issues.length===W)return;if(!K)K=K9(J,W)});else{if(J.issues.length===W)continue;if(!K)K=K9(J,W)}}if(H)return H.then(()=>{return J});return J},Y=(J,Q,w)=>{if(K9(J))return J.aborted=!0,J;let K=U(Q,q,w);if(K instanceof Promise){if(w.async===!1)throw new O8;return K.then((H)=> $ ._zod.parse(H,w))}return $ ._zod.parse(K,w)}; $ ._zod.run=(J,Q)=>{if(Q.skipChecks)return $ ._zod.parse(J,Q);if(Q.direction==="backward"){let K= $ ._zod.parse({value:J.value,issues:[]},{...Q,skipChecks:!0});if(K instanceof Promise)return K.then((H)=>{return Y(H,J,Q)});return Y(K,J,Q)}let w= $ ._zod.parse(J,Q);if(w instanceof Promise){if(Q.async===!1)throw new O8;return w.then((K)=>U(K,q,Q))}return U(w,q,Q)}} $ 1( $ ,"~standard",()=>({validate:(U)=>{try{let Y=yI( $ ,U);return Y.success?{value:Y.data}:{issues:Y.error?.issues}}catch(Y){return HY( $ ,U).then((J)=>J.success?{value:J.data}:{issues:J.error?.issues})}},vendor:"zod",version:1}))}),i7=o(" $ ZodString",( $ ,I)=>{p0.init( $ ,I), $ ._zod.pattern=[... $ ?._zod.bag?.patterns??[]].pop()??GO( $ ._zod.bag), $ ._zod.parse=(z,q)=>{if(I.coerce)try{z.value=String(z.value)}catch(U){}if(typeof z.value==="string")return z;return z.issues.push({expected:"string",code:"invalid_type",input:z.value,inst: $ }),z}}),x1=o(" $ ZodStringFormat",( $ ,I)=>{xI.init( $ ,I),i7.init( $ ,I)}),fO=o(" $ ZodGUID",( $ ,I)=>{I.pattern??(I.pattern=aF),x1.init( $ ,I)}),nO=o(" $ ZodUUID",( $ ,I)=>{if(I.version){let q={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[I.version];if(q===void 0)throw Error( ` Invalid UUID version : "${I.version}" ` );I.pattern??(I.pattern=b7(q))}else I.pattern??(I.pattern=b7());x1.init( $ ,I)}),bO=o(" $ ZodEmail",( $ ,I)=>{I.pattern??(I.pattern=sF),x1.init( $ ,I)}),iO=o(" $ ZodURL",( $ ,I)=>{x1.init( $ ,I), $ ._zod.check=(z)=>{try{let q=z.value.trim();if(!I.normalize&&I.protocol?.source===JO.source){if(!/^https?: \/ \/ /i.test(q)){z.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:z.value,inst: $ ,continue:!I.abort});return}}let U=new URL(q);if(I.hostname){if(I.hostname.lastIndex=0,!I.hostname.test(U.hostname))z.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:I.hostname.source,input:z.value,inst: $ ,continue:!I.abort})}if(I.protocol){if(I.protocol.lastIndex=0,!I.protocol.test(U.protocol.endsWith(":")?U.protocol.slice(0,-1):U.protocol))z.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:I.protocol.source,input:z.value,inst: $ ,continue:!I.abort})}if(I.normalize)z.value=U.href;else z.value=q;return}catch(q){z.issues.push({code:"invalid_format",format:"url",input:z.value,inst: $ ,continue:!I.abort})}}}),pO=o(" $ ZodEmoji",( $ ,I)=>{I.pattern??(I.pattern=eF()),x1.init( $ ,I)}),cO=o(" $ ZodNanoID",( $ ,I)=>{I.pattern??(I.pattern=rF),x1.init( $ ,I)}),dO=o(" $ ZodCUID",( $ ,I)=>{I.pattern??(I.pattern=cF),x1.init( $ ,I)}),mO=o(" $ ZodCUID2",( $ ,I)=>{I.pattern??(I.pattern=dF),x1.init( $ ,I)}),lO=o(" $ ZodULID",( $ ,I)=>{I.pattern??(I.pattern=mF),x1.init( $ ,I)}),oO=o(" $ ZodXID",( $ ,I)=>{I.pattern??(I.pattern=lF),x1.init( $ ,I)}),rO=o(" $ ZodKSUID",( $ ,I)=>{I.pattern??(I.pattern=oF),x1.init( $ ,I)}),tO=o(" $ ZodISODateTime",( $ ,I)=>{I.pattern??(I.pattern=HO(I)),x1.init( $ ,I)}),aO=o(" $ ZodISODate",( $ ,I)=>{I.pattern??(I.pattern=wO),x1.init( $ ,I)}),sO=o(" $ ZodISOTime",( $ ,I)=>{I.pattern??(I.pattern=KO(I)),x1.init( $ ,I)}),eO=o(" $ ZodISODuration",( $ ,I)=>{I.pattern??(I.pattern=tF),x1.init( $ ,I)}), $ N=o(" $ ZodIPv4",( $ ,I)=>{I.pattern??(I.pattern= $ O),x1.init( $ ,I), $ ._zod.bag.format="ipv4"}),IN=o(" $ ZodIPv6",( $ ,I)=>{I.pattern??(I.pattern=IO),x1.init( $ ,I), $ ._zod.bag.format="ipv6", $ ._zod.check=(z)=>{try{new URL( ` http : //[${z.value}]`)}catch{z.issues.push({code:"invalid_format",format:"ipv6",input:z.value,inst:$,continue:!I.abort})}}}),zN=o("$ZodMAC",($,I)=>{I.pattern??(I.pattern=zO(I.delimiter)),x1.init($,I),$._zod.bag.format="mac"}),qN=o("$ZodCIDRv4",($,I)=>{I.pattern??(I.pattern=qO),x1.init($,I)}),UN=o("$ZodCIDRv6",($,I)=>{I.pattern??(I.pattern=UO),x1.init($,I),$._zod.check=(z)=>{let q=z.value.split("/");try{if(q.length!==2)throw Error();let[U,Y]=q;if(!Y)throw Error();let J=Number(Y);if(`${J}`!==Y)throw Error();if(J<0||J>128)throw Error();new URL(`http://[${U}]`)}catch{z.issues.push({code:"invalid_format",format:"cidrv6",input:z.value,inst:$,continue:!I.abort})}}});function YN($){if($==="")return!0;if(/\s/.test($))return!1;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}
Line truncated
` ))}}var iF={major:4,minor:4,patch:3};var p0=o(" $ ZodType",( $ ,I)=>{var z; $ ??( $ ={}), $ ._zod.def=I, $ ._zod.bag= $ ._zod.bag||{}, $ ._zod.version=iF;let q=[... $ ._zod.def.checks??[]];if( $ ._zod.traits.has(" $ ZodCheck"))q.unshift( $ );for(let U of q)for(let Y of U._zod.onattach)Y( $ );if(q.length===0)(z= $ ._zod).deferred??(z.deferred=[]), $ ._zod.deferred?.push(()=>{ $ ._zod.run= $ ._zod.parse});else{let U=(J,Q,w)=>{let K=W9(J),H;for(let G of Q){if(G._zod.def.when){if(mO(J))continue;if(!G._zod.def.when(J))continue}else if(K)continue;let W=J.issues.length,Z=G._zod.check(J);if(Z instanceof Promise&&w?.async===!1)throw new M8;if(H||Z instanceof Promise)H=(H??Promise.resolve()).then(async()=>{if(await Z,J.issues.length===W)return;if(!K)K=W9(J,W)});else{if(J.issues.length===W)continue;if(!K)K=W9(J,W)}}if(H)return H.then(()=>{return J});return J},Y=(J,Q,w)=>{if(W9(J))return J.aborted=!0,J;let K=U(Q,q,w);if(K instanceof Promise){if(w.async===!1)throw new M8;return K.then((H)=> $ ._zod.parse(H,w))}return $ ._zod.parse(K,w)}; $ ._zod.run=(J,Q)=>{if(Q.skipChecks)return $ ._zod.parse(J,Q);if(Q.direction==="backward"){let K= $ ._zod.parse({value:J.value,issues:[]},{...Q,skipChecks:!0});if(K instanceof Promise)return K.then((H)=>{return Y(H,J,Q)});return Y(K,J,Q)}let w= $ ._zod.parse(J,Q);if(w instanceof Promise){if(Q.async===!1)throw new M8;return w.then((K)=>U(K,q,Q))}return U(w,q,Q)}} $ 1( $ ,"~standard",()=>({validate:(U)=>{try{let Y=xI( $ ,U);return Y.success?{value:Y.data}:{issues:Y.error?.issues}}catch(Y){return VY( $ ,U).then((J)=>J.success?{value:J.data}:{issues:J.error?.issues})}},vendor:"zod",version:1}))}),c7=o(" $ ZodString",( $ ,I)=>{p0.init( $ ,I), $ ._zod.pattern=[... $ ?._zod.bag?.patterns??[]].pop()??LF( $ ._zod.bag), $ ._zod.parse=(z,q)=>{if(I.coerce)try{z.value=String(z.value)}catch(U){}if(typeof z.value==="string")return z;return z.issues.push({expected:"string",code:"invalid_type",input:z.value,inst: $ }),z}}),x1=o(" $ ZodStringFormat",( $ ,I)=>{fI.init( $ ,I),c7.init( $ ,I)}),cF=o(" $ ZodGUID",( $ ,I)=>{I.pattern??(I.pattern=zF),x1.init( $ ,I)}),dF=o(" $ ZodUUID",( $ ,I)=>{if(I.version){let q={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[I.version];if(q===void 0)throw Error( ` Invalid UUID version : "${I.version}" ` );I.pattern??(I.pattern=p7(q))}else I.pattern??(I.pattern=p7());x1.init( $ ,I)}),mF=o(" $ ZodEmail",( $ ,I)=>{I.pattern??(I.pattern=qF),x1.init( $ ,I)}),lF=o(" $ ZodURL",( $ ,I)=>{x1.init( $ ,I), $ ._zod.check=(z)=>{try{let q=z.value.trim();if(!I.normalize&&I.protocol?.source===GF.source){if(!/^https?: \/ \/ /i.test(q)){z.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:z.value,inst: $ ,continue:!I.abort});return}}let U=new URL(q);if(I.hostname){if(I.hostname.lastIndex=0,!I.hostname.test(U.hostname))z.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:I.hostname.source,input:z.value,inst: $ ,continue:!I.abort})}if(I.protocol){if(I.protocol.lastIndex=0,!I.protocol.test(U.protocol.endsWith(":")?U.protocol.slice(0,-1):U.protocol))z.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:I.protocol.source,input:z.value,inst: $ ,continue:!I.abort})}if(I.normalize)z.value=U.href;else z.value=q;return}catch(q){z.issues.push({code:"invalid_format",format:"url",input:z.value,inst: $ ,continue:!I.abort})}}}),oF=o(" $ ZodEmoji",( $ ,I)=>{I.pattern??(I.pattern=UF()),x1.init( $ ,I)}),rF=o(" $ ZodNanoID",( $ ,I)=>{I.pattern??(I.pattern= $ F),x1.init( $ ,I)}),tF=o(" $ ZodCUID",( $ ,I)=>{I.pattern??(I.pattern=rO),x1.init( $ ,I)}),aF=o(" $ ZodCUID2",( $ ,I)=>{I.pattern??(I.pattern=tO),x1.init( $ ,I)}),sF=o(" $ ZodULID",( $ ,I)=>{I.pattern??(I.pattern=aO),x1.init( $ ,I)}),eF=o(" $ ZodXID",( $ ,I)=>{I.pattern??(I.pattern=sO),x1.init( $ ,I)}), $ N=o(" $ ZodKSUID",( $ ,I)=>{I.pattern??(I.pattern=eO),x1.init( $ ,I)}),IN=o(" $ ZodISODateTime",( $ ,I)=>{I.pattern??(I.pattern=XF(I)),x1.init( $ ,I)}),zN=o(" $ ZodISODate",( $ ,I)=>{I.pattern??(I.pattern=VF),x1.init( $ ,I)}),qN=o(" $ ZodISOTime",( $ ,I)=>{I.pattern??(I.pattern=ZF(I)),x1.init( $ ,I)}),UN=o(" $ ZodISODuration",( $ ,I)=>{I.pattern??(I.pattern=IF),x1.init( $ ,I)}),YN=o(" $ ZodIPv4",( $ ,I)=>{I.pattern??(I.pattern=YF),x1.init( $ ,I), $ ._zod.bag.format="ipv4"}),JN=o(" $ ZodIPv6",( $ ,I)=>{I.pattern??(I.pattern=JF),x1.init( $ ,I), $ ._zod.bag.format="ipv6", $ ._zod.check=(z)=>{try{new URL( ` http : //[${z.value}]`)}catch{z.issues.push({code:"invalid_format",format:"ipv6",input:z.value,inst:$,continue:!I.abort})}}}),QN=o("$ZodMAC",($,I)=>{I.pattern??(I.pattern=QF(I.delimiter)),x1.init($,I),$._zod.bag.format="mac"}),wN=o("$ZodCIDRv4",($,I)=>{I.pattern??(I.pattern=wF),x1.init($,I)}),KN=o("$ZodCIDRv6",($,I)=>{I.pattern??(I.pattern=KF),x1.init($,I),$._zod.check=(z)=>{let q=z.value.split("/");try{if(q.length!==2)throw Error();let[U,Y]=q;if(!Y)throw Error();let J=Number(Y);if(`${J}`!==Y)throw Error();if(J<0||J>128)throw Error();new URL(`http://[${U}]`)}catch{z.issues.push({code:"invalid_format",format:"cidrv6",input:z.value,inst:$,continue:!I.abort})}}});function HN($){if($==="")return!0;if(/\s/.test($))return!1;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}
Line truncated
if ( $ { M } . issues . length ) {
if ( $ { v } in input ) {
payload . issues = payload . issues . concat ( $ { M } . issues . map ( iss => ( {
@@ -303,40 +303,363 @@ Unsupported type: `+$.type,"ENOTSUP");$._finish()})};d$.prototype._stat=function
newResult [ $ { v } ] = $ { M } . value ;
}
` )}Z.write("payload.value = newResult;"),Z.write("return payload;");let T=Z.compile();return(P,M)=>T(W,P,M)},Y,J=n7,Q=!k7.jitless,K=Q&&yF.value,H=I.catchall,G; $ ._zod.parse=(W,Z)=>{G??(G=q.value);let X=W.value;if(!J(X))return W.issues.push({expected:"object",code:"invalid_type",input:X,inst: $ }),W;if(Q&&K&&Z?.async===!1&&Z.jitless!==!0){if(!Y)Y=U(I.shape);if(W=Y(W,Z),!H)return W;return wf([],X,W,Z,G, $ )}return z(W,Z)}});function mk( $ ,I,z,q){for(let Y of $ )if(Y.issues.length===0)return I.value=Y.value,I;let U= $ .filter((Y)=>!K9(Y));if(U.length===1)return I.value=U[0].value,U[0];return I.issues.push({code:"invalid_union",input:I.value,inst:z,errors: $ .map((Y)=>Y.issues.map((J)=>B6(J,q,D4())))}),I}var XY=o(" $ ZodUnion",( $ ,I)=>{p0.init( $ ,I), $ 1( $ ._zod,"optin",()=>I.options.some((q)=>q._zod.optin==="optional")?"optional":void 0), $ 1( $ ._zod,"optout",()=>I.options.some((q)=>q._zod.optout==="optional")?"optional":void 0), $ 1( $ ._zod,"values",()=>{if(I.options.every((q)=>q._zod.values))return new Set(I.options.flatMap((q)=>Array.from(q._zod.values)));return}), $ 1( $ ._zod,"pattern",()=>{if(I.options.every((q)=>q._zod.pattern)){let q=I.options.map((U)=>U._zod.pattern);return new RegExp( ` ^ ( $ { q . map ( ( U ) => IY ( U . source ) ) . join ( "|" ) } ) $ ` )}return});let z=I.options.length===1?I.options[0]._zod.run:null; $ ._zod.parse=(q,U)=>{if(z)return z(q,U);let Y=!1,J=[];for(let Q of I.options){let w=Q._zod.run({value:q.value,issues:[]},U);if(w instanceof Promise)J.push(w),Y=!0;else{if(w.issues.length===0)return w;J.push(w)}}if(!Y)return mk(J,q, $ ,U);return Promise.all(J).then((Q)=>{return mk(Q,q, $ ,U)})}});function lk( $ ,I,z,q){let U= $ .filter((Y)=>Y.issues.length===0);if(U.length===1)return I.value=U[0].value,I;if(U.length===0)I.issues.push({code:"invalid_union",input:I.value,inst:z,errors: $ .map((Y)=>Y.issues.map((J)=>B6(J,q,D4())))});else I.issues.push({code:"invalid_union",input:I.value,inst:z,errors:[],inclusive:!1});return I}var PN=o(" $ ZodXor",( $ ,I)=>{XY.init( $ ,I),I.inclusive=!1;let z=I.options.length===1?I.options[0]._zod.run:null; $ ._zod.parse=(q,U)=>{if(z)return z(q,U);let Y=!1,J=[];for(let Q of I.options){let w=Q._zod.run({value:q.value,issues:[]},U);if(w instanceof Promise)J.push(w),Y=!0;else J.push(w)}if(!Y)return lk(J,q, $ ,U);return Promise.all(J).then((Q)=>{return lk(Q,q, $ ,U)})}}),TN=o(" $ ZodDiscriminatedUnion",( $ ,I)=>{I.inclusive=!1,XY.init( $ ,I);let z= $ ._zod.parse; $ 1( $ ._zod,"propValues",()=>{let U={};for(let Y of I.options){let J=Y._zod.propValues;if(!J||Object.keys(J).length===0)throw Error( ` Invalid discriminated union option at index "${I.options.indexOf(Y)}" ` );for(let[Q,w]of Object.entries(J)){if(!U[Q])U[Q]=new Set;for(let K of w)U[Q].add(K)}}return U});let q=gI(()=>{let U=I.options,Y=new Map;for(let J of U){let Q=J._zod.propValues?.[I.discriminator];if(!Q||Q.size===0)throw Error( ` Invalid discriminated union option at index "${I.options.indexOf(J)}" ` );for(let w of Q){if(Y.has(w))throw Error( ` Duplicate discriminator value "${String(w)}" ` );Y.set(w,J)}}return Y}); $ ._zod.parse=(U,Y)=>{let J=U.value;if(!n7(J))return U.issues.push({code:"invalid_type",expected:"object",input:J,inst: $ }),U;let Q=q.value.get(J?.[I.discriminator]);if(Q)return Q._zod.run(U,Y);if(I.unionFallback||Y.direction==="backward")return z(U,Y);return U.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:I.discriminator,options:Array.from(q.value.keys()),input:J,path:[I.discriminator],inst: $ }),U}}),EN=o(" $ ZodIntersection",( $ ,I)=>{p0.init( $ ,I), $ ._zod.parse=(z,q)=>{let U=z.value,Y=I.left._zod.run({value:U,issues:[]},q),J=I.right._zod.run({value:U,issues:[]},q);if(Y instanceof Promise||J instanceof Promise)return Promise.all([Y,J]).then(([w,K])=>{return ok(z,w,K)});return ok(z,Y,J)}});function kO( $ ,I){if( $ ===I)return{valid:!0,data: $ };if( $ instanceof Date&&I instanceof Date&&+ $ ===+I)return{valid:!0,data: $ };if(w9( $ )&&w9(I)){let z=Object.keys(I),q=Object.keys( $ ).filter((Y)=>z.indexOf(Y)!==-1),U={... $ ,...I};for(let Y of q){let J=kO( $ [Y],I[Y]);if(!J.valid)return{valid:!1,mergeErrorPath:[Y,...J.mergeErrorPath]};U[Y]=J.data}return{valid:!0,data:U}}if(Array.isArray( $ )&&Array.isArray(I)){if( $ .length!==I.length)return{valid:!1,mergeErrorPath:[]};let z=[];for(let q=0;q< $ .length;q++){let U= $ [q],Y=I[q],J=kO(U,Y);if(!J.valid)return{valid:!1,mergeErrorPath:[q,...J.mergeErrorPath]};z.push(J.data)}return{valid:!0,data:z}}return{valid:!1,mergeErrorPath:[]}}function ok( $ ,I,z){let q=new Map,U;for(let Q of I.issues)if(Q.code==="unrecognized_keys"){U??(U=Q);for(let w of Q.keys){if(!q.has(w))q.set(w,{});q.get(w).l=!0}}else $ .issues.push(Q);for(let Q of z.issues)if(Q.code==="unrecognized_keys")for(let w of Q.keys){if(!q.has(w))q.set(w,{});q.get(w).r=!0}else $ .issues.push(Q);let Y=[...q].filter(([,Q])=>Q.l&&Q.r).map(([Q])=>Q);if(Y.length&&U) $ .issues.push({...U,keys:Y});if(K9( $ ))return $ ;let J=kO(I.value,z.value);if(!J.valid)throw Error( ` Unmergable intersection . Error path : $ { JSON . stringify ( J . mergeErrorPath ) } ` );return $ .value=J.data, $ }var _K=o(" $ ZodTuple",( $ ,I)=>{p0.
Line truncated
` )}Z.write("payload.value = newResult;"),Z.write("return payload;");let T=Z.compile();return(P,M)=>T(W,P,M)},Y,J=i7,Q=!n7.jitless,K=Q&&nO.value,H=I.catchall,G; $ ._zod.parse=(W,Z)=>{G??(G=q.value);let X=W.value;if(!J(X))return W.issues.push({expected:"object",code:"invalid_type",input:X,inst: $ }),W;if(Q&&K&&Z?.async===!1&&Z.jitless!==!0){if(!Y)Y=U(I.shape);if(W=Y(W,Z),!H)return W;return Hf([],X,W,Z,G, $ )}return z(W,Z)}});function ok( $ ,I,z,q){for(let Y of $ )if(Y.issues.length===0)return I.value=Y.value,I;let U= $ .filter((Y)=>!W9(Y));if(U.length===1)return I.value=U[0].value,U[0];return I.issues.push({code:"invalid_union",input:I.value,inst:z,errors: $ .map((Y)=>Y.issues.map((J)=>v6(J,q,D4())))}),I}var OY=o(" $ ZodUnion",( $ ,I)=>{p0.init( $ ,I), $ 1( $ ._zod,"optin",()=>I.options.some((q)=>q._zod.optin==="optional")?"optional":void 0), $ 1( $ ._zod,"optout",()=>I.options.some((q)=>q._zod.optout==="optional")?"optional":void 0), $ 1( $ ._zod,"values",()=>{if(I.options.every((q)=>q._zod.values))return new Set(I.options.flatMap((q)=>Array.from(q._zod.values)));return}), $ 1( $ ._zod,"pattern",()=>{if(I.options.every((q)=>q._zod.pattern)){let q=I.options.map((U)=>U._zod.pattern);return new RegExp( ` ^ ( $ { q . map ( ( U ) => UY ( U . source ) ) . join ( "|" ) } ) $ ` )}return});let z=I.options.length===1?I.options[0]._zod.run:null; $ ._zod.parse=(q,U)=>{if(z)return z(q,U);let Y=!1,J=[];for(let Q of I.options){let w=Q._zod.run({value:q.value,issues:[]},U);if(w instanceof Promise)J.push(w),Y=!0;else{if(w.issues.length===0)return w;J.push(w)}}if(!Y)return ok(J,q, $ ,U);return Promise.all(J).then((Q)=>{return ok(Q,q, $ ,U)})}});function rk( $ ,I,z,q){let U= $ .filter((Y)=>Y.issues.length===0);if(U.length===1)return I.value=U[0].value,I;if(U.length===0)I.issues.push({code:"invalid_union",input:I.value,inst:z,errors: $ .map((Y)=>Y.issues.map((J)=>v6(J,q,D4())))});else I.issues.push({code:"invalid_union",input:I.value,inst:z,errors:[],inclusive:!1});return I}var vN=o(" $ ZodXor",( $ ,I)=>{OY.init( $ ,I),I.inclusive=!1;let z=I.options.length===1?I.options[0]._zod.run:null; $ ._zod.parse=(q,U)=>{if(z)return z(q,U);let Y=!1,J=[];for(let Q of I.options){let w=Q._zod.run({value:q.value,issues:[]},U);if(w instanceof Promise)J.push(w),Y=!0;else J.push(w)}if(!Y)return rk(J,q, $ ,U);return Promise.all(J).then((Q)=>{return rk(Q,q, $ ,U)})}}),gN=o(" $ ZodDiscriminatedUnion",( $ ,I)=>{I.inclusive=!1,OY.init( $ ,I);let z= $ ._zod.parse; $ 1( $ ._zod,"propValues",()=>{let U={};for(let Y of I.options){let J=Y._zod.propValues;if(!J||Object.keys(J).length===0)throw Error( ` Invalid discriminated union option at index "${I.options.indexOf(Y)}" ` );for(let[Q,w]of Object.entries(J)){if(!U[Q])U[Q]=new Set;for(let K of w)U[Q].add(K)}}return U});let q=CI(()=>{let U=I.options,Y=new Map;for(let J of U){let Q=J._zod.propValues?.[I.discriminator];if(!Q||Q.size===0)throw Error( ` Invalid discriminated union option at index "${I.options.indexOf(J)}" ` );for(let w of Q){if(Y.has(w))throw Error( ` Duplicate discriminator value "${String(w)}" ` );Y.set(w,J)}}return Y}); $ ._zod.parse=(U,Y)=>{let J=U.value;if(!i7(J))return U.issues.push({code:"invalid_type",expected:"object",input:J,inst: $ }),U;let Q=q.value.get(J?.[I.discriminator]);if(Q)return Q._zod.run(U,Y);if(I.unionFallback||Y.direction==="backward")return z(U,Y);return U.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:I.discriminator,options:Array.from(q.value.keys()),input:J,path:[I.discriminator],inst: $ }),U}}),RN=o(" $ ZodIntersection",( $ ,I)=>{p0.init( $ ,I), $ ._zod.parse=(z,q)=>{let U=z.value,Y=I.left._zod.run({value:U,issues:[]},q),J=I.right._zod.run({value:U,issues:[]},q);if(Y instanceof Promise||J instanceof Promise)return Promise.all([Y,J]).then(([w,K])=>{return tk(z,w,K)});return tk(z,Y,J)}});function pF( $ ,I){if( $ ===I)return{valid:!0,data: $ };if( $ instanceof Date&&I instanceof Date&&+ $ ===+I)return{valid:!0,data: $ };if(G9( $ )&&G9(I)){let z=Object.keys(I),q=Object.keys( $ ).filter((Y)=>z.indexOf(Y)!==-1),U={... $ ,...I};for(let Y of q){let J=pF( $ [Y],I[Y]);if(!J.valid)return{valid:!1,mergeErrorPath:[Y,...J.mergeErrorPath]};U[Y]=J.data}return{valid:!0,data:U}}if(Array.isArray( $ )&&Array.isArray(I)){if( $ .length!==I.length)return{valid:!1,mergeErrorPath:[]};let z=[];for(let q=0;q< $ .length;q++){let U= $ [q],Y=I[q],J=pF(U,Y);if(!J.valid)return{valid:!1,mergeErrorPath:[q,...J.mergeErrorPath]};z.push(J.data)}return{valid:!0,data:z}}return{valid:!1,mergeErrorPath:[]}}function tk( $ ,I,z){let q=new Map,U;for(let Q of I.issues)if(Q.code==="unrecognized_keys"){U??(U=Q);for(let w of Q.keys){if(!q.has(w))q.set(w,{});q.get(w).l=!0}}else $ .issues.push(Q);for(let Q of z.issues)if(Q.code==="unrecognized_keys")for(let w of Q.keys){if(!q.has(w))q.set(w,{});q.get(w).r=!0}else $ .issues.push(Q);let Y=[...q].filter(([,Q])=>Q.l&&Q.r).map(([Q])=>Q);if(Y.length&&U) $ .issues.push({...U,keys:Y});if(W9( $ ))return $ ;let J=pF(I.value,z.value);if(!J.valid)throw Error( ` Unmergable intersection . Error path : $ { JSON . stringify ( J . mergeErrorPath ) } ` );return $ .value=J.data, $ }var uK=o(" $ ZodTuple",( $ ,I)=>{p0.
Line truncated
Set the \ ` cycles \` parameter to \` "ref" \` to resolve cyclical schemas with defs. ` ) } for ( let J of $ . seen . entries ( ) ) { let Q = J [ 1 ] ; if ( I === J [ 0 ] ) { Y ( J ) ; continue } if ( $ . external ) { let K = $ . external . registry . get ( J [ 0 ] ) ? . id ; if ( I !== J [ 0 ] && K ) { Y ( J ) ; continue } } if ( $ . metadataRegistry . get ( J [ 0 ] ) ? . id ) { Y ( J ) ; continue } if ( Q . cycle ) { Y ( J ) ; continue } if ( Q . count > 1 ) { if ( $ . reused === "ref" ) { Y ( J ) ; continue } } } } function Z9 ( $ , I ) { let z = $ . seen . get ( I ) ; if ( ! z ) throw Error ( "Unprocessed schema. This is a bug in Zod." ) ; let q = ( Q ) => { let w = $ . seen . get ( Q ) ; if ( w . ref === null ) return ; let K = w . def ? ? w . schema , H = { ... K } , G = w . ref ; if ( w . ref = null , G ) { q ( G ) ; let Z = $ . seen . get ( G ) , X = Z . schema ; if ( X . $ref && ( $ . target === "draft-07" || $ . target === "draft-04" || $ . target === "openapi-3.0" ) ) K . allOf = K . allOf ? ? [ ] , K . allOf . push ( X ) ; else Object . assign ( K , X ) ; if ( Object . assign ( K , H ) , Q . _zod . parent === G ) for ( let D in K ) { if ( D === "$ref" || D === "allOf" ) continue ; if ( ! ( D in H ) ) delete K [ D ] } if ( X . $ref && Z . def ) for ( let D in K ) { if ( D === "$ref" || D === "allOf" ) continue ; if ( D in Z . def && JSON . stringify ( K [ D ] ) === JSON . stringify ( Z . def [ D ] ) ) delete K [ D ] } } let W = Q . _zod . parent ; if ( W && W !== G ) { q ( W ) ; let Z = $ . seen . get ( W ) ; if ( Z ? . schema . $ref ) { if ( K . $ref = Z . schema . $ref , Z . def ) for ( let X in K ) { if ( X === "$ref" || X === "allOf" ) continue ; if ( X in Z . def && JSON . stringify ( K [ X ] ) === JSON . stringify ( Z . def [ X ] ) ) delete K [ X ] } } } $ . override ( { zodSchema : Q , jsonSchema : K , path : w . path ? ? [ ] } ) } ; for ( let Q of [ ... $ . seen . entries ( ) ] . reverse ( ) ) q ( Q [ 0 ] ) ; let U = { } ; if ( $ . target === "draft-2020-12" ) U . $schema = "https://json-schema.org/draft/2020-12/schema" ; else if ( $ . target === "draft-07" ) U . $schema = "http://json-schema.org/draft-07/schema#" ; else if ( $ . target === "draft-04" ) U . $schema = "http://json-schema.org/draft-04/schema#" ; else if ( $ . target === "openapi-3.0" ) ; if ( $ . external ? . uri ) { let Q = $ . external . registry . get ( I ) ? . id ; if ( ! Q ) throw Error ( "Schema is missing an `id` property" ) ; U . $id = $ . external . uri ( Q ) } Object . assign ( U , z . def ? ? z . schema ) ; let Y = $ . metadataRegistry . get ( I ) ? . id ; if ( Y !== void 0 && U . id === Y ) delete U . id ; let J = $ . external ? . defs ? ? { } ; for ( let Q of $ . seen . entries ( ) ) { let w = Q [ 1 ] ; if ( w . def && w . defId ) { if ( w . def . id === w . defId ) delete w . def . id ; J [ w . defId ] = w . def } } if ( $ . external ) ; else if ( Object . keys ( J ) . length > 0 ) if ( $ . target === "draft-2020-12" ) U . $defs = J ; else U . definitions = J ; try { let Q = JSON . parse ( JSON . stringify ( U ) ) ; return Object . defineProperty ( Q , "~standard" , { value : { ... I [ "~standard" ] , jsonSchema : { input : sI ( I , "input" , $ . processors ) , output : sI ( I , "output" , $ . processors ) } } , enumerable : ! 1 , writable : ! 1 } ) , Q } catch ( Q ) { throw Error ( "Error converting schema to JSON." ) } } function v6 ( $ , I ) { let z = I ? ? { seen : new Set } ; if ( z . seen . has ( $ ) ) return ! 1 ; z . seen . add ( $ ) ; let q = $ . _zod . def ; if ( q . type === "transform" ) return ! 0 ; if ( q . type === "array" ) return v6 ( q . element , z ) ; if ( q . type === "set" ) return v6 ( q . valueType , z ) ; if ( q . type === "lazy" ) return v6 ( q . getter ( ) , z ) ; if ( q . type === "promise" || q . type === "optional" || q . type === "nonoptional" || q . type === "nullable" || q . type === "readonly" || q . type === "default" || q . type === "prefault" ) return v6 ( q . innerType , z ) ; if ( q . type === "intersection" ) return v6 ( q . left , z ) || v6 ( q . right , z ) ; if ( q . type === "record" || q . type === "map" ) return v6 ( q . keyType , z ) || v6 ( q . valueType , z ) ; if ( q . type === "pipe" ) { if ( $ . _zod . traits . has ( "$ZodCodec" ) ) return ! 0 ; return v6 ( q . in , z ) || v6 ( q . out , z ) } if ( q . type === "object" ) { for ( let U in q . shape ) if ( v6 ( q . shape [ U ] , z ) ) return ! 0 ; return ! 1 } if ( q . type === "union" ) { for ( let U of q . options ) if ( v6 ( U , z ) ) return ! 0 ; return ! 1 } if ( q . type === "tuple" ) { for ( let U of q . items ) if ( v6 ( U , z ) ) return ! 0 ; if ( q . rest && v6 ( q . rest , z ) ) return ! 0 ; return ! 1 } return ! 1 } var _A = ( $ , I = { } ) => ( z ) => { let q = W9 ( { ... z , processors : I } ) ; return S1 ( $ , q ) , V9 ( q , $ ) , Z9 ( q , $ ) } , sI = ( $ , I , z = { } ) => ( q ) => { let { libraryOptions : U , target : Y } = q ? ? { } , J = W9 ( { ... U ? ? { } , target : Y , io : I , processors : z } ) ; return S1 ( $ , J ) , V9 ( J , $ ) , Z9 ( J , $ ) } ; var oN0 = { guid : "uuid" , url : "uri" , datetime : "date-time" , json _string : "json-string" , regex : "" } , CA = ( $ , I , z , q ) => { let U = z ; U . type = "string" ; let { minimum : Y , maximum : J , format : Q , patterns : w , contentEncoding : K } = $ . _zod . bag ; if ( typeof Y === "number" ) U . minLength = Y ; if ( typeof J === "number" ) U . maxLength = J ; if ( Q ) { if ( U . format = oN0 [ Q ] ? ? Q , U . format === "" ) delete U . format ; if ( Q === "time" ) delete U . format } if ( K ) U . contentEncoding = K ; if ( w && w . size > 0 ) { let H = [ ... w ] ; if ( H . length === 1 ) U . pattern = H [ 0 ] . source ; else if ( H . length > 1 ) U . allOf = [ ... H . map ( ( G ) => ( { ... I . target === "draft-07" || I . target === "draft-04" || I . target === "openapi-3.0" ? { type : "string" } : { } , pattern : G . source } ) ) ] } } , hA = ( $ , I , z , q ) => { let U = z , { minimum : Y , maximum : J , format : Q , multipleOf : w , exclusiveMaximum : K , exclusiveMinimum : H } = $ . _zod . bag ; if ( typeof Q === "string" && Q . includes ( "int" ) ) U . type = "integer" ; else U . type = "number" ; let G = typeof H === "number" && H >= ( Y ? ? Number . NEGATIVE _INFINITY ) , W = typeof K === "number" && K <= ( J ? ? Number . POSITIVE _INFINITY ) , Z = I . target === "draft-04" || I . target === "openapi-3.0" ; if ( G ) if ( Z ) U . minimum = H , U . exclusiveMinimum = ! 0 ; else U . exclusiveMinimum = H ; else if ( typeof Y === "number" ) U . minimum = Y ; if ( W ) if ( Z ) U . maximum = K , U . exclusiveMaximum = ! 0 ; else U . exclusiveMaximum = K ; else if ( typeof J === "number" ) U . maximum = J ; if ( typeof w === "number" ) U . multipleOf = w } , SA = ( $ , I , z , q ) => { z . type = "boolean" } , yA = ( $ , I , z , q ) => { if ( I . unrepresentable === "throw" ) throw Error ( "BigInt cannot be represented in JSON Schema" ) } , uA = ( $ , I , z , q ) => { if ( I . unrepresentable == Line truncated
` );if( $ ===-1)return null;let I=this._buffer.toString("utf8",0, $ ).replace(/ \r $ /,"");return this._buffer=this._buffer.subarray( $ +1),L _0(I)}clear(){this._buffer=void 0}}function L _0( $ ){return n n.parse(JSON.parse( $ ))}function x d( $ ){return JSON.stringify( $ )+ `
` }class rE{constructor( $ =kd.stdin,I=kd.stdout){this._stdin= $ ,this._stdout=I,this._readBuffer=new oE,this._started=!1,this._ondata=(z)=>{this._readBuffer.append(z),this.processReadBuffer()},this._onerror=(z)=>{this.onerror?.(z)}}async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){while(!0)try{let $ =this._readBuffer.readMessage();if( $ ===null)break;this.onmessage?.( $ )}catch( $ ){this.onerror?.( $ )}}async close(){if(this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),this.onclose?.()}send( $ ){return new Promise((I)=>{let z=xd( $ );if(this._stdout.write(z))I();else this._stdout.once("drain",I)})}}import{dirname as bx,join as $ V1}from"node:path";import{fileURLToPath as IV1}from"node:url";class Z5 extends Error{name="KyError";get isKyError(){return!0}}class W $ extends Z5{name="HTTPError";response;request;options;data;constructor( $ ,I,z){let q= $ .status|| $ .status===0? $ .status:"",U= $ .statusText??"",Y= ` $ { q } $ { U } ` .trim(),J=Y? ` status code $ { Y } ` :"an unknown error";super( ` Request failed with $ { J } : $ { I . method } $ { I . url } ` );this.response= $ ,this.request=I,this.options=z}}class OJ extends Z5{name="NetworkError";request;constructor( $ ,I){super( ` Request failed due to a network error : $ { $ . method } $ { $ . url } ` ,I);this.request= $ }}class NJ extends Error{name="NonError";value;constructor( $ ){let I="Non-error value was thrown";try{if(typeof $ ==="string")I= $ ;else if( $ &&typeof $ ==="object"&&"message"in $ &&typeof $ .message==="string")I= $ .message}catch{}super(I);this.value= $ }}class Ez extends Z5{name="ForceRetryError";customDelay;code;customRequest;constructor( $ ){let I= $ ?.cause? $ .cause instanceof Error? $ .cause:new NJ( $ .cause):void 0;super( $ ?.code? ` Forced retry : $ { $ . code } ` :"Forced retry",I?{cause:I}:void 0);this.customDelay= $ ?.delay,this.code= $ ?.code,this.customRequest= $ ?.request}}class tE extends Error{name="SchemaValidationError";issues;constructor( $ ){super("Response schema validation failed");this.issues= $ }}class q8 extends Z5{name="TimeoutError";request;constructor( $ ){super( ` Request timed out : $ { $ . method } $ { $ . url } ` );this.request= $ }}var aE=(()=>{let $ =!1,I=!1,z=typeof globalThis.ReadableStream==="function",q=typeof globalThis.Request==="function";if(z&&q)try{I=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return $ =!0,"half"}}).headers.has("Content-Type")}catch(U){if(U instanceof Error&&U.message==="unsupported BodyInit type")return!1;throw U}return $ &&!I})(),fd=typeof globalThis.AbortController==="function",xG=typeof globalThis.AbortSignal==="function"&&typeof globalThis.AbortSignal.any==="function",nd=typeof globalThis.ReadableStream==="function",bd=typeof globalThis.FormData==="function",kG=["get","post","put","patch","head","delete"],D_0=()=>{return};D_0();var id={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},Bz=2147483647,pd=40,fG=Symbol("stop");class nG{options;constructor( $ ){this.options= $ }}var cd=( $ )=>new nG( $ ),dd={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},md={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0};var bG=new TextEncoder,F_0=( $ )=>{if(! $ )return 0;if( $ instanceof FormData){let I=0;for(let[z,q]of $ )I+=pd,I+=bG.encode( ` Content - Disposition : form - data ; name = "${z}" ` ).byteLength,I+=typeof q==="string"?bG.encode(q).byteLength:q.size;return I}if( $ instanceof Blob)return $ .size;if( $ instanceof ArrayBuffer||ArrayBuffer.isView( $ ))return $ .byteLength;if(typeof $ ==="string")return bG.encode( $ ).byteLength;if( $ instanceof URLSearchParams)return bG.encode( $ .toString()).byteLength;return 0},ld=( $ ,I,z)=>{let q,U=0;return $ .pipeThrough(new TransformStream({transform(Y,J){if(J.enqueue(Y),q){U+=q.byteLength;let Q=I===0?0:U/I;if(Q>=1)Q=1-Number.EPSILON;z?.({percent:Q,totalBytes:Math.max(I,U),transferredBytes:U},q)}q=Y},flush(){if(q)U+=q.byteLength,z?.({percent:1,totalBytes:Math.max(I,U),transferredBytes:U},q)}}))},od=( $ ,I)=>{if(! $ .body)return $ ;let z={status: $ .status,statusText: $ .statusText,headers: $ .headers};if( $ .status===204)return new Response(null,z);let q=Math.max(0,Number( $ .headers.get("content-length"))||0);return new Response(ld( $ .body,q,I),z)},rd=( $ ,I,z)=>{if(! $ .body)return $ ;let q=F_0(z?? $ .body);return new Request( $ ,{duplex:"half",body:ld( $ .body,q,I)})};var B8=( $ )=> $ !==null&&typeof $ ==="object";var O_0=Symbol("replaceOption"),sE=( $ )=>B8( $ )&& $ [O_0]===!0?{isReplace:!0,value: $ .value}:{isReplace:!1,value: $ };var AJ=(... $ )=>{for(let I of $ )if(
Line truncated
` ,{mode:384}),I}function r y( $ ){let I=p W0();for(let z of I){if(!A $ (z))continue;for(let q of X D(z).filter((U)=>U.endsWith(".json")).filter((U)=>!U.startsWith("example."))){let U=e8 (z,q);try{let Y=D D(U,"utf-8"),J=JSON.parse(Y);if(J&&typeof J==="object"&&J.id=== $ )return U}catch{}}}return}function j 7( $ ,I){let z=r y( $ );if(!z)throw Error( ` Enterprise config not found : $ { $ } ` );let U={...JSON.parse(D D(z,"utf-8")),...I};for(let J of Object.keys(I))if(I[J]===void 0)delete U[J];let Y=my .parse(U);return x W0(z, ` $ { JSON . stringify ( Y , null , 2 ) }
` ,"utf-8"),Y}function v7( $ ,I,z=[]){let q=I.corpId?.trim()||void 0,U=I.stateful?I.defaultCorpId?.trim()||void 0:void 0,Y=q??U;if(Y){let Q= $ .find((H)=>H.id===Y);if(Q)return Q;let w= $ .find((H)=>H.id.toLowerCase()===Y.toLowerCase());if(w)return w;let K= $ .find((H)=>H.name.toLowerCase()===Y.toLowerCase());if(K)return K;throw Error( ` No enterprise config found for $ { Y } ` )}if(!I.stateful)throw Error("Stateless mode is enabled. Every enterprise command requires --corp <corpId>. Use ` seal - home config mode stateful ` to enable a default enterprise.");let J= $ [0];if(J)return J;throw Error("No enterprise config found. Add a non-example JSON file under one of: "+(z.length?z.join(", "):"the configured enterprise directories"))}import{readFileSync as fH1}from"node:fs";import{randomBytes as nH1}from"node:crypto";var mW0=300000,cW0=new Map;function Ww1( $ ,I){return $ .map((z)=>z.trim()).filter(Boolean).map((z)=>I?z:z.toLowerCase())}function Vw1( $ ,I){return I? $ : $ .toLowerCase()}function Zw1( $ ,I,z,q){let U=Vw1( $ ,q),Y=I.filter((J)=>U.includes(J));if(z==="all"&&Y.length!==I.length)return[];return Y}function Xw1( $ ){if(typeof $ ==="string")return $ .split(/ \r ? \n /);return JSON.stringify( $ ,null,2).split(/ \r ? \n /)}function Lw1( $ ,I){if(I.fields&&!I.fields.has( $ .field))return[];let z=Xw1( $ .value),q=[];return z.forEach((U,Y)=>{let J=Zw1(U,I.keywords,I.matchMode,I.caseSensitive);if(J.length===0)return;let Q=Math.max(0,Y-I.contextLines),w=Math.min(z.length,Y+I.contextLines+1),K={area: $ .area,entityType: $ .entityType,entityId: $ .entityId,title: $ .title,field: $ .field,lineNumber:Y+1,matchedKeywords:J,matchedText:OD(U,I.maxChars),context:{before:I.snippetOnly?[]:z.slice(Q,Y).map((H)=>OD(H,I.maxChars)),line:OD(U,I.maxChars),after:I.snippetOnly?[]:z.slice(Y+1,w).map((H)=>OD(H,I.maxChars))},metadata: $ .metadata};if(I.snippetOnly)K.context={before:[],line:K.context.line,after:[]};q.push(K)}),q}function OD( $ ,I){if(!I|| $ .length<=I)return $ ;return ` $ { $ . slice ( 0 , Math . max ( 0 , I ) ) } ... ` }function Dw1( $ ){return[{area:"rules",entityType:"rule",entityId: $ .id,title: $ .scope,field:"description",value: $ .description,metadata:{scope: $ .scope,strictness: $ .strictness,status: $ .status}},{area:"rules",entityType:"rule",entityId: $ .id,title: $ .scope,field:"scope",value: $ .scope,metadata:{strictness: $ .strictness,status: $ .status}}]}function dW0( $ ){return $ .rules.flatMap((I,z)=>{let q= ` $ { $ . id } : $ { I . description . slice ( 0 , 32 ) } ` ,U={versionId: $ .id,versionNumber: $ .versionNumber,versionName: $ .versionName,publishedByName: $ .publishedByName,publishedAt: $ .publishedAt,scope:I.scope,strictness:I.strictness,code:"code"in I?I.code:void 0,index:z};return[{area:"rules",entityType:"rule",entityId:q,title: ` $ { $ . versionName } / $ { I . scope } ` ,field:"history.description",value:I.description,metadata:U},{area:"rules",entityType:"rule",entityId:q,title: ` $ { $ . versionName } / $ { I . scope } ` ,field:"history.scope",value:I.scope,metadata:U}]})}function Fw1( $ ){return[{area:"documents",entityType:"document",entityId: $ .id,title: $ .title,field:"title",value: $ .title,metadata:{status: $ .status,scenarios: $ .scenarios,tags: $ .tags}},{area:"documents",entityType:"document",entityId: $ .id,title: $ .title,field:"purpose",value: $ .purpose,metadata:{status: $ .status,scenarios: $ .scenarios,tags: $ .tags}},{area:"documents",entityType:"document",entityId: $ .id,title: $ .title,field:"content",value: $ .content,metadata:{status: $ .status,scenarios: $ .scenarios,tags: $ .tags}}]}function Ow1( $ ){let I=[];if( $ .decisionPreferences)for(let[z,q]of Object.entries( $ .decisionPreferences))I.push({area:"preferences",entityType:"preference",field: ` decisionPreferences . $ { z } ` ,value:q,metadata:{integrationSystem: $ .integrationSystem}});return $ .integrations.forEach((z,q)=>{I.push({area:"preferences",entityType:"integration",title:z.outboundName,field: ` integrations [ $ { q } ] ` ,value:z,metadata:{type:z.type,outboundName:z.outboundName,mode:z.mode,corporationId:z.corporationId}})}),I}async function Nw1( $ ,I,z){let q=z.ruleVersionScope??"current",U=[I.id, ` ruleVersionScope = $ { q } ` , ` ruleVersionId = $ { z . ruleVersionId ? ? "" } ` , ` ruleVersionNumber = $ { z . ruleVersionNumber ? ? "" } ` , ` latestRuleVersion = $ { z . latestRuleVersion ? ? ! 1 } ` , ` documentLimit = $ { z . documentLimit ? ? 100 } ` ].join("|"),Y=cW0.get(U);if(!z.refresh&&Y&&Date.now()<Y.expiresAt)return Y;let[J,Q,w]=await Promise.all([Mw1( $ ,{scope:q,versionId:z.ruleVersionId,versionNumber:z.ruleVersionNumber,latest:z.latestRuleVersion}),v9( $ ,{limit:z.documentLimit??100}),P1( $ ,I.seal.endpoints.approvalStylePreferences)]),K=Date.now(),H={entries:[...J,...Q.articles.flatMap(Fw1),...Ow1(w)],fetchedAt:K,expiresAt:K+mW0};return cW0.set(U,H),H}async function Mw1( $ ,I){if(I.scope==="current")return(await C6( $ )).rules.flatMap(Dw1);if(I.scope==="version"){let q=await Aw1( $ ,I);return dW0(q)}return(await S $ ( $ )).flatMap(dW0)}async function Aw1( $ ,I){if(I.versionId)return SJ( $ ,I.versionId);let z=await S $ ( $ ),q=I.versionNumber?z.find((U)=>U.versionNumber===I.versionNumber):z[0];if(!q)throw Error(I.versionNumber? ` Rule version not found : $ { I . versionNumber } ` :"No rule versions found");return q}async func
Line truncated
` +"为防止测试单据污染生产审批流,禁止向生产环境重放单据。请指定测试企业 (--target-corp <testCorpId>),或在确有需要时添加 --force。",1, ` seal - use webhook replay -- target - corp < testCorpId > $ { z . id !== q . id ? ` --source-corp ${ z . id } ` : "" } ` );return{sourceCorp:z,targetCorp:q}}async function _w1( $ ,I,z){let q=await Y8( $ ,I.seal.endpoints.approvalStylePreferences);if(z||q.length>0)return rW0(q,z,I.id);if(I.environment==="test"||I.id.toLowerCase().includes("test")){console.error( ` [ webhook - replay ] 测试企业 「 $ { I . name } 」 未配置 Webhook 通道 , 正在自动创建 「 ( Seal测 - 回放通道 ) 」 ... ` );let U=(I.seal.url??I.source?.sealUrl?? ` https : //${I.id.toLowerCase()}.sealai.cc`).replace(/\/+$/,"");return await WW($,U,{name:"(Seal测-回放通道)",mode:"assisted",outgoingResultWebhook:`${U}/api/v1/integrations/webhook/replay-mock-callback`},I.seal.endpoints.approvalStylePreferences)}throw new U$(`当前租户「${I.name}」未配置任何 Webhook 集成通道。`,1,`seal-use webhook add --name <name> --result-url <url> --corp ${I.id}`)}async function gU($){let{query:I,sourceClient:z,targetClient:q,sourceCorp:U,targetCorp:Y,webhookSelector:J,snPrefix:Q,snSuffix:w,docIdPrefix:K,docIdSuffix:H,dryRun:G,fetchFn:W=fetch}=$,Z=[];if(I.recordId){let v=await P4(z,I.recordId);Z.push(v)}else if(I.recordIds&&I.recordIds.length>0)for(let v of I.recordIds)Z.push(await P4(z,v));else if(I.sn){let v=await r6(z,{sourceDocumentSN:I.sn,limit:1});if(!v.records.length)throw Error(`在企业「${U.name}」中未找到单据编号为「${I.sn}」的审批记录。`);Z.push(v.records[0])}else if(I.sns&&I.sns.length>0)for(let v of I.sns){let u=await r6(z,{sourceDocumentSN:v,limit:1});if(!u.records.length)throw Error(`在企业「${U.name}」中未找到单据编号为「${v}」的审批记录。`);Z.push(u.records[0])}else if(I.limit!==void 0){let v=await r6(z,{limit:I.limit,status:I.status,startDate:I.startDate,endDate:I.endDate});if(!v.records.length)throw Error(`在企业「${U.name}」中未检索到符合条件的审批记录。`);Z=v.records}else throw Error("Usage: seal-use webhook replay <recordId> [--sn <documentSN>] [--limit <n>] [--webhook <idOrName>] [--source-corp <corpId>] [--target-corp <corpId>] [--dry-run]");let X=Z.map((v)=>({run:v,doc:vw1(v,{snPrefix:Q,snSuffix:w,docIdPrefix:K,docIdSuffix:H})}));if(G){let v={id:"preview-webhook",name:J??"预览目标通道",mode:"assisted",incomingDocumentWebhookUrl:`${Y.seal.url}/api/v1/integrations/webhook/preview`};try{let x=await Y8(q,Y.seal.endpoints.approvalStylePreferences);if(x.length>0){let B=rW0(x,J,Y.id);v={id:B.id,name:B.name,mode:B.mode,incomingDocumentWebhookUrl:B.incomingDocumentWebhook.url}}}catch{}let u=X.map(({run:x,doc:B})=>({originalRecord:{id:x.id,sourceSystem:x.sourceSystem,sourceDocumentSN:x.sourceDocumentSN,sourceDocumentId:x.sourceDocumentId},document:B,success:!0})),h=u.length===1;return{dryRun:!0,success:!0,sourceCorp:{id:U.id,name:U.name,environment:U.environment},targetCorp:{id:Y.id,name:Y.name,environment:Y.environment},targetWebhook:v,totalCount:u.length,successCount:u.length,failureCount:0,originalRecord:h?u[0].originalRecord:void 0,document:h?u[0].document:void 0,records:u}}let L=await _w1(q,Y,J),D={id:L.id,name:L.name,mode:L.mode,incomingDocumentWebhookUrl:L.incomingDocumentWebhook.url},F=[],T=0,P=0;for(let{run:v,doc:u}of X){console.error(`[webhook-replay] 正在向 Webhook 通道「${L.name}」推送单据: ${u.documentSN}...`);try{let h=await gw1(L.incomingDocumentWebhook.url,L.secret,u,W);F.push({originalRecord:{id:v.id,sourceSystem:v.sourceSystem,sourceDocumentSN:v.sourceDocumentSN,sourceDocumentId:v.sourceDocumentId},replayedDocument:{documentSN:u.documentSN,documentId:u.documentId,fieldCount:u.fields.length},pushResult:h,success:!0}),T+=1}catch(h){let x=h instanceof Error?h.message:String(h);F.push({originalRecord:{id:v.id,sourceSystem:v.sourceSystem,sourceDocumentSN:v.sourceDocumentSN,sourceDocumentId:v.sourceDocumentId},replayedDocument:{documentSN:u.documentSN,documentId:u.documentId,fieldCount:u.fields.length},error:x,success:!1}),P+=1}}let M=F.length===1;return{success:P===0,dryRun:!1,sourceCorp:{id:U.id,name:U.name,environment:U.environment},targetCorp:{id:Y.id,name:Y.name,environment:Y.environment},targetWebhook:D,totalCount:F.length,successCount:T,failureCount:P,originalRecord:M?F[0].originalRecord:void 0,replayedDocument:M?F[0].replayedDocument:void 0,pushResult:M?F[0].pushResult:void 0,records:F}}var tW0=V.object({level:V.enum(["error","warning","info"]),code:V.string(),message:V.string(),snippet:V.string().optional(),suggestion:V.string().optional()}),aS1=V.object({score:V.number().min(0).max(100),passed:V.boolean(),issues:V.array(tW0)}),Cw1=V.object({ruleId:V.string().optional(),ruleCode:V.string().optional(),ruleName:V.string().optional(),score:V.number().min(0).max(100),passed:V.boolean(),issues:V.array(tW0),description:V.string().optional()}),sS1=V.object({linter:V.string(),linterType:V.enum(["built
Line truncated
` ,"utf8"),z}function IV0( $ ){return $ .map((I,z)=>{let q;if(typeof I.code==="number")q= ` # $ { String ( I . code ) . padStart ( 4 , "0" ) } ` ;else if(typeof I.code==="string")q=I.code.startsWith("#")?I.code: ` # $ { I . code } ` ;else q= ` # $ { String ( z + 1 ) . padStart ( 4 , "0" ) } ` ;return{id:I.id,code:q,name:I.name,description:I.description,scope:I.scope,strictness:I.strictness}})}class m $ extends Error{errors;warnings;constructor( $ ,I=[]){super([ ` 材料包校验失败 : $ { $ . length } 个错误 ` ,... $ .map((z)=> ` - $ { z } ` )].join( `
` ));this.errors= $ ;this.warnings=I;this.name="MaterialPackValidationError"}}var du=x7(MV0(),1),HZ0=x7(KZ0(),1);var bD={maxEntries:1000,maxTotalSize:524288000,maxCompressionRatio:150};async function GZ0( $ ){return new Promise((I,z)=>{du.default.fromBuffer(Buffer.from( $ ),{lazyEntries:!0,autoClose:!0,decodeStrings:!1},(q,U)=>{if(q||!U)return z(q??Error("无法打开 ZIP"));let Y=[];U.readEntry(),U.on("entry",(J)=>{let Q=WZ0(J);if(!Q.endsWith("/")&&!MH1(Q))Y.push({fileName:Q,uncompressedSize:J.uncompressedSize,compressedSize:J.compressedSize,raw:J});U.readEntry()}),U.on("end",()=>I(Y)),U.on("error",z)})})}function WZ0( $ ){let I=Buffer.isBuffer( $ .fileName)? $ .fileName:Buffer.from(String( $ .fileName),"binary"),z=I.toString("utf8");if(!z.includes("� "))return z;let q=HZ0.default.decode(I,"gbk");if(!q.includes("� "))return q;return z}function MH1( $ ){let I= $ .split("/").pop()??"";return $ .split("/").includes("__MACOSX")||I===".DS_Store"||I.startsWith("._")||I.startsWith(".~")||I.startsWith("~ $ ")}function VZ0( $ ,I){let z=[],q=Cz(I);if( $ .length>bD.maxEntries)z.push( ` 文件数超过 $ { bD . maxEntries } ` );if( $ .reduce((J,Q)=>J+Q.uncompressedSize,0)>bD.maxTotalSize)z.push("解压后总大小超过 500MB");for(let J of $ ){if(J.fileName.startsWith("/")||J.fileName.split("/").includes(".."))z.push( ` 存在不安全路径 : $ { J . fileName } ` );if(J.compressedSize>0&&J.uncompressedSize/J.compressedSize>bD.maxCompressionRatio)z.push( ` 压缩比超过 150 : $ { J . fileName } ` );if(J.fileName==="信息表.xlsx")continue;AH1(J,q,z)}if(! $ .find((J)=>J.fileName==="信息表.xlsx"))z.push("ZIP 根目录缺少精确名为「信息表.xlsx」的文件");if( $ .some((J)=>J.fileName.toLowerCase().endsWith(".zip")))z.push("不允许嵌套 ZIP");if(z.length)throw new m $ (z)}function AH1( $ ,I,z){let q=PH1( $ .fileName);if(!q||!I.allowedExtensions.includes(q))z.push( ` 附件后缀不在白名单中 : $ { $ . fileName } ( 允许 : $ { I . allowedExtensions . join ( ", " ) } ) ` );if( $ .uncompressedSize<I.minFileSizeBytes)z.push( ` 附件文件过小 : $ { $ . fileName } ( $ { $ . uncompressedSize } B , 小于最小值 $ { I . minFileSizeBytes } B ) ` );if(I.maxFileSizeBytes!==void 0&&I.maxFileSizeBytes!==null&& $ .uncompressedSize>I.maxFileSizeBytes)z.push( ` 附件文件过大 : $ { $ . fileName } ( $ { $ . uncompressedSize } B , 大于最大值 $ { I . maxFileSizeBytes } B ) ` )}function PH1( $ ){let I= $ .split("/").pop()?? $ ,z=I.lastIndexOf(".");return z>0?I.slice(z).toLowerCase():""}function mu( $ ,I){return new Promise((z,q)=>{du.default.fromBuffer(Buffer.from( $ ),{lazyEntries:!0,autoClose:!0,decodeStrings:!1},(U,Y)=>{if(U||!Y)return q(U??Error("无法打开 ZIP"));Y.readEntry(),Y.on("entry",(J)=>{if(WZ0(J)!==I.fileName)return Y.readEntry();Y.openReadStream(J,(Q,w)=>{if(Q||!w)return q(Q??Error( ` 无法读取 $ { I . fileName } ` ));let K=[];w.on("data",(H)=>K.push(H)),w.on("end",()=>z(Buffer.concat(K))),w.on("error",q)})}),Y.on("error",q)})})}var XZ0=x7(KD(),1);function TH1( $ ){return $ .startsWith("[附件]")}function LZ0( $ ){return $ .startsWith("[附件]")? $ .slice(4): $ }function EH1( $ ){return LZ0( $ ).toLowerCase().replace(/ \s +/g,"_")||"attachment"}function BH1( $ ){if( $ ==null|| $ ==="")return[];return String( $ ).split(/[ \n ,;,;]/).map((I)=>I.trim()).filter(Boolean)}function lu( $ ,I){let z=[];for(let[q,U]of I.entries()){if(!TH1(q))continue;let Y= $ .getCell(U).value,J=BH1(Y);if(!J.length)continue;z.push({key:EH1(q),label:LZ0(q),paths:J})}return z}function ou( $ ){let I=new Map;return $ .map((z)=>{let q=(I.get(z.key)??0)+1;return I.set(z.key,q),q===1?z:{...z,key: ` $ { z . key } - $ { q } ` }})}function iD( $ ,I,z,q){return{key: $ ,label:I,type:z,value:q}}function DZ0( $ ,I,z){return iD( $ ,I,"TEXT",z==null?"":String(z))}function FZ0( $ ,I,z){return iD( $ ,I,"AMOUNT",typeof z==="number"?{amount:z,currency:"CNY"}:null)}function OZ0( $ ){if( $ instanceof Date)return $ .toISOString();if(typeof $ ==="string"&& $ .trim())return $ .trim();return null}function jH1( $ ){if( $ instanceof Date)return Math.floor( $ .getTime()/1000);if(typeof $ ==="string"&& $ .trim()){let I=Date.parse( $ .trim().replace(" ","T"));if(Number.isFinite(I))return Math.floor(I/1000)}return null}function jw( $ ){let I=new Map;return $ .getRow(1).eachCell((z,q)=>I.set(String(z.value??"").trim(),q)),I}function DI( $ ,I,z){let q=I.get(z);return q? $ .getCell(q).value:void 0}function vH1( $ ,I){return[["会议编号","meeting_id","TEXT"],["会议名称","meeting_name","TEXT"],["状态","status","TEXT"],["总金额","total_amount","AMOUNT"],["税前劳务总额","pretax_labor_total","AMOUNT"],["报销事由","reimbursement_reason","TEXT"],["po码","po_code","TEXT"],["快递单号","tracking_number","TEXT"],["申请日期","application_date","DATE"],["更新日期","updated_date","DATE"]].flatMap(([q,U,Y])=>{let J=DI( $ ,I,q);if(J==null||J==="")return[];return[Y==="TEXT"?DZ0(U,q,J):Y==="AMOUNT"?FZ0(U,q,J):iD(U,q,Y,OZ0(J))]})}function ZZ0( $ ,I,z){return z.flatMap(([q,U,Y])=>{let J=DI( $ ,I,q);if(J==null||J==="")return[];return[Y==="TEXT"?DZ0(U,q,J):Y==="AMOUNT"?FZ0(U,q,J):iD(U,q,Y,OZ0(J))]})}var RH1=[["姓名","name","TEXT"],["身份证号码","id_
Line truncated
` );let F=new FormData,T=await mu(q.fileBuffer,D),P=L.split("/").pop()??L;F.append("files",new File([new Uint8Array(T)],P));let M=await fetch( ` $ { U } / api / v1 / integrations / webhook / $ { encodeURIComponent ( Y ) } / attachments ` ,{method:"POST",headers:Ow({},z.secret),body:F});if(!M.ok)throw Error( ` 附件上传失败 $ { M . status } : $ { await M . text ( ) } ` );let v=await M.json();H.set(L,v.attachments?.map((u)=>u.data)??(v.data===void 0?[]:[v.data])),process.stderr.write( ` ✓ 附件上传成功 : $ { L }
Set the \ ` cycles \` parameter to \` "ref" \` to resolve cyclical schemas with defs. ` ) } for ( let J of $ . seen . entries ( ) ) { let Q = J [ 1 ] ; if ( I === J [ 0 ] ) { Y ( J ) ; continue } if ( $ . external ) { let K = $ . external . registry . get ( J [ 0 ] ) ? . id ; if ( I !== J [ 0 ] && K ) { Y ( J ) ; continue } } if ( $ . metadataRegistry . get ( J [ 0 ] ) ? . id ) { Y ( J ) ; continue } if ( Q . cycle ) { Y ( J ) ; continue } if ( Q . count > 1 ) { if ( $ . reused === "ref" ) { Y ( J ) ; continue } } } } function D9 ( $ , I ) { let z = $ . seen . get ( I ) ; if ( ! z ) throw Error ( "Unprocessed schema. This is a bug in Zod." ) ; let q = ( Q ) => { let w = $ . seen . get ( Q ) ; if ( w . ref === null ) return ; let K = w . def ? ? w . schema , H = { ... K } , G = w . ref ; if ( w . ref = null , G ) { q ( G ) ; let Z = $ . seen . get ( G ) , X = Z . schema ; if ( X . $ref && ( $ . target === "draft-07" || $ . target === "draft-04" || $ . target === "openapi-3.0" ) ) K . allOf = K . allOf ? ? [ ] , K . allOf . push ( X ) ; else Object . assign ( K , X ) ; if ( Object . assign ( K , H ) , Q . _zod . parent === G ) for ( let D in K ) { if ( D === "$ref" || D === "allOf" ) continue ; if ( ! ( D in H ) ) delete K [ D ] } if ( X . $ref && Z . def ) for ( let D in K ) { if ( D === "$ref" || D === "allOf" ) continue ; if ( D in Z . def && JSON . stringify ( K [ D ] ) === JSON . stringify ( Z . def [ D ] ) ) delete K [ D ] } } let W = Q . _zod . parent ; if ( W && W !== G ) { q ( W ) ; let Z = $ . seen . get ( W ) ; if ( Z ? . schema . $ref ) { if ( K . $ref = Z . schema . $ref , Z . def ) for ( let X in K ) { if ( X === "$ref" || X === "allOf" ) continue ; if ( X in Z . def && JSON . stringify ( K [ X ] ) === JSON . stringify ( Z . def [ X ] ) ) delete K [ X ] } } } $ . override ( { zodSchema : Q , jsonSchema : K , path : w . path ? ? [ ] } ) } ; for ( let Q of [ ... $ . seen . entries ( ) ] . reverse ( ) ) q ( Q [ 0 ] ) ; let U = { } ; if ( $ . target === "draft-2020-12" ) U . $schema = "https://json-schema.org/draft/2020-12/schema" ; else if ( $ . target === "draft-07" ) U . $schema = "http://json-schema.org/draft-07/schema#" ; else if ( $ . target === "draft-04" ) U . $schema = "http://json-schema.org/draft-04/schema#" ; else if ( $ . target === "openapi-3.0" ) ; if ( $ . external ? . uri ) { let Q = $ . external . registry . get ( I ) ? . id ; if ( ! Q ) throw Error ( "Schema is missing an `id` property" ) ; U . $id = $ . external . uri ( Q ) } Object . assign ( U , z . def ? ? z . schema ) ; let Y = $ . metadataRegistry . get ( I ) ? . id ; if ( Y !== void 0 && U . id === Y ) delete U . id ; let J = $ . external ? . defs ? ? { } ; for ( let Q of $ . seen . entries ( ) ) { let w = Q [ 1 ] ; if ( w . def && w . defId ) { if ( w . def . id === w . defId ) delete w . def . id ; J [ w . defId ] = w . def } } if ( $ . external ) ; else if ( Object . keys ( J ) . length > 0 ) if ( $ . target === "draft-2020-12" ) U . $defs = J ; else U . definitions = J ; try { let Q = JSON . parse ( JSON . stringify ( U ) ) ; return Object . defineProperty ( Q , "~standard" , { value : { ... I [ "~standard" ] , jsonSchema : { input : $z ( I , "input" , $ . processors ) , output : $z ( I , "output" , $ . processors ) } } , enumerable : ! 1 , writable : ! 1 } ) , Q } catch ( Q ) { throw Error ( "Error converting schema to JSON." ) } } function R6 ( $ , I ) { let z = I ? ? { seen : new Set } ; if ( z . seen . has ( $ ) ) return ! 1 ; z . seen . add ( $ ) ; let q = $ . _zod . def ; if ( q . type === "transform" ) return ! 0 ; if ( q . type === "array" ) return R6 ( q . element , z ) ; if ( q . type === "set" ) return R6 ( q . valueType , z ) ; if ( q . type === "lazy" ) return R6 ( q . getter ( ) , z ) ; if ( q . type === "promise" || q . type === "optional" || q . type === "nonoptional" || q . type === "nullable" || q . type === "readonly" || q . type === "default" || q . type === "prefault" ) return R6 ( q . innerType , z ) ; if ( q . type === "intersection" ) return R6 ( q . left , z ) || R6 ( q . right , z ) ; if ( q . type === "record" || q . type === "map" ) return R6 ( q . keyType , z ) || R6 ( q . valueType , z ) ; if ( q . type === "pipe" ) { if ( $ . _zod . traits . has ( "$ZodCodec" ) ) return ! 0 ; return R6 ( q . in , z ) || R6 ( q . out , z ) } if ( q . type === "object" ) { for ( let U in q . shape ) if ( R6 ( q . shape [ U ] , z ) ) return ! 0 ; return ! 1 } if ( q . type === "union" ) { for ( let U of q . options ) if ( R6 ( U , z ) ) return ! 0 ; return ! 1 } if ( q . type === "tuple" ) { for ( let U of q . items ) if ( R6 ( U , z ) ) return ! 0 ; if ( q . rest && R6 ( q . rest , z ) ) return ! 0 ; return ! 1 } return ! 1 } var yA = ( $ , I = { } ) => ( z ) => { let q = X9 ( { ... z , processors : I } ) ; return u1 ( $ , q ) , L9 ( q , $ ) , D9 ( q , $ ) } , $z = ( $ , I , z = { } ) => ( q ) => { let { libraryOptions : U , target : Y } = q ? ? { } , J = X9 ( { ... U ? ? { } , target : Y , io : I , processors : z } ) ; return u1 ( $ , J ) , L9 ( J , $ ) , D9 ( J , $ ) } ; var zM0 = { guid : "uuid" , url : "uri" , datetime : "date-time" , json _string : "json-string" , regex : "" } , xA = ( $ , I , z , q ) => { let U = z ; U . type = "string" ; let { minimum : Y , maximum : J , format : Q , patterns : w , contentEncoding : K } = $ . _zod . bag ; if ( typeof Y === "number" ) U . minLength = Y ; if ( typeof J === "number" ) U . maxLength = J ; if ( Q ) { if ( U . format = zM0 [ Q ] ? ? Q , U . format === "" ) delete U . format ; if ( Q === "time" ) delete U . format } if ( K ) U . contentEncoding = K ; if ( w && w . size > 0 ) { let H = [ ... w ] ; if ( H . length === 1 ) U . pattern = H [ 0 ] . source ; else if ( H . length > 1 ) U . allOf = [ ... H . map ( ( G ) => ( { ... I . target === "draft-07" || I . target === "draft-04" || I . target === "openapi-3.0" ? { type : "string" } : { } , pattern : G . source } ) ) ] } } , kA = ( $ , I , z , q ) => { let U = z , { minimum : Y , maximum : J , format : Q , multipleOf : w , exclusiveMaximum : K , exclusiveMinimum : H } = $ . _zod . bag ; if ( typeof Q === "string" && Q . includes ( "int" ) ) U . type = "integer" ; else U . type = "number" ; let G = typeof H === "number" && H >= ( Y ? ? Number . NEGATIVE _INFINITY ) , W = typeof K === "number" && K <= ( J ? ? Number . POSITIVE _INFINITY ) , Z = I . target === "draft-04" || I . target === "openapi-3.0" ; if ( G ) if ( Z ) U . minimum = H , U . exclusiveMinimum = ! 0 ; else U . exclusiveMinimum = H ; else if ( typeof Y === "number" ) U . minimum = Y ; if ( W ) if ( Z ) U . maximum = K , U . exclusiveMaximum = ! 0 ; else U . exclusiveMaximum = K ; else if ( typeof J === "number" ) U . maximum = J ; if ( typeof w === "number" ) U . multipleOf = w } , fA = ( $ , I , z , q ) => { z . type = "boolean" } , nA = ( $ , I , z , q ) => { if ( I . unrepresentable === "throw" ) throw Error ( "BigInt cannot be represented in JSON Schema" ) } , bA = ( $ , I , z , q ) => { if ( I . unrepresentable == Line truncated
` );if( $ ===-1)return null;let I=this._buffer.toString("utf8",0, $ ).replace(/ \r $ /,"");return this._buffer=this._buffer.subarray( $ +1),T _0(I)}clear(){this._buffer=void 0}}function T _0( $ ){return p n.parse(JSON.parse( $ ))}function f d( $ ){return JSON.stringify( $ )+ `
` }class $ B{constructor( $ =nd.stdin,I=nd.stdout){this._stdin= $ ,this._stdout=I,this._readBuffer=new eE,this._started=!1,this._ondata=(z)=>{this._readBuffer.append(z),this.processReadBuffer()},this._onerror=(z)=>{this.onerror?.(z)}}async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){while(!0)try{let $ =this._readBuffer.readMessage();if( $ ===null)break;this.onmessage?.( $ )}catch( $ ){this.onerror?.( $ )}}async close(){if(this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),this.onclose?.()}send( $ ){return new Promise((I)=>{let z=fd( $ );if(this._stdout.write(z))I();else this._stdout.once("drain",I)})}}import{dirname as px,join as OV1}from"node:path";import{fileURLToPath as FV1}from"node:url";class D5 extends Error{name="KyError";get isKyError(){return!0}}class Z $ extends D5{name="HTTPError";response;request;options;data;constructor( $ ,I,z){let q= $ .status|| $ .status===0? $ .status:"",U= $ .statusText??"",Y= ` $ { q } $ { U } ` .trim(),J=Y? ` status code $ { Y } ` :"an unknown error";super( ` Request failed with $ { J } : $ { I . method } $ { I . url } ` );this.response= $ ,this.request=I,this.options=z}}class AJ extends D5{name="NetworkError";request;constructor( $ ,I){super( ` Request failed due to a network error : $ { $ . method } $ { $ . url } ` ,I);this.request= $ }}class PJ extends Error{name="NonError";value;constructor( $ ){let I="Non-error value was thrown";try{if(typeof $ ==="string")I= $ ;else if( $ &&typeof $ ==="object"&&"message"in $ &&typeof $ .message==="string")I= $ .message}catch{}super(I);this.value= $ }}class jz extends D5{name="ForceRetryError";customDelay;code;customRequest;constructor( $ ){let I= $ ?.cause? $ .cause instanceof Error? $ .cause:new PJ( $ .cause):void 0;super( $ ?.code? ` Forced retry : $ { $ . code } ` :"Forced retry",I?{cause:I}:void 0);this.customDelay= $ ?.delay,this.code= $ ?.code,this.customRequest= $ ?.request}}class IB extends Error{name="SchemaValidationError";issues;constructor( $ ){super("Response schema validation failed");this.issues= $ }}class Y8 extends D5{name="TimeoutError";request;constructor( $ ){super( ` Request timed out : $ { $ . method } $ { $ . url } ` );this.request= $ }}var zB=(()=>{let $ =!1,I=!1,z=typeof globalThis.ReadableStream==="function",q=typeof globalThis.Request==="function";if(z&&q)try{I=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return $ =!0,"half"}}).headers.has("Content-Type")}catch(U){if(U instanceof Error&&U.message==="unsupported BodyInit type")return!1;throw U}return $ &&!I})(),bd=typeof globalThis.AbortController==="function",nG=typeof globalThis.AbortSignal==="function"&&typeof globalThis.AbortSignal.any==="function",id=typeof globalThis.ReadableStream==="function",pd=typeof globalThis.FormData==="function",bG=["get","post","put","patch","head","delete"],E_0=()=>{return};E_0();var cd={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},vz=2147483647,dd=40,iG=Symbol("stop");class pG{options;constructor( $ ){this.options= $ }}var md=( $ )=>new pG( $ ),ld={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},od={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0};var cG=new TextEncoder,B_0=( $ )=>{if(! $ )return 0;if( $ instanceof FormData){let I=0;for(let[z,q]of $ )I+=dd,I+=cG.encode( ` Content - Disposition : form - data ; name = "${z}" ` ).byteLength,I+=typeof q==="string"?cG.encode(q).byteLength:q.size;return I}if( $ instanceof Blob)return $ .size;if( $ instanceof ArrayBuffer||ArrayBuffer.isView( $ ))return $ .byteLength;if(typeof $ ==="string")return cG.encode( $ ).byteLength;if( $ instanceof URLSearchParams)return cG.encode( $ .toString()).byteLength;return 0},rd=( $ ,I,z)=>{let q,U=0;return $ .pipeThrough(new TransformStream({transform(Y,J){if(J.enqueue(Y),q){U+=q.byteLength;let Q=I===0?0:U/I;if(Q>=1)Q=1-Number.EPSILON;z?.({percent:Q,totalBytes:Math.max(I,U),transferredBytes:U},q)}q=Y},flush(){if(q)U+=q.byteLength,z?.({percent:1,totalBytes:Math.max(I,U),transferredBytes:U},q)}}))},td=( $ ,I)=>{if(! $ .body)return $ ;let z={status: $ .status,statusText: $ .statusText,headers: $ .headers};if( $ .status===204)return new Response(null,z);let q=Math.max(0,Number( $ .headers.get("content-length"))||0);return new Response(rd( $ .body,q,I),z)},ad=( $ ,I,z)=>{if(! $ .body)return $ ;let q=B_0(z?? $ .body);return new Request( $ ,{duplex:"half",body:rd( $ .body,q,I)})};var v8=( $ )=> $ !==null&&typeof $ ==="object";var j_0=Symbol("replaceOption"),qB=( $ )=>v8( $ )&& $ [j_0]===!0?{isReplace:!0,value: $ .value}:{isReplace:!1,value: $ };var EJ=(... $ )=>{for(let I of $ )if(
Line truncated
` ,{mode:384}),I}function $ y( $ ){let I=d W0();for(let z of I){if(!T $ (z))continue;for(let q of O D(z).filter((U)=>U.endsWith(".json")).filter((U)=>!U.startsWith("example."))){let U=I5 (z,q);try{let Y=N D(U,"utf-8"),J=JSON.parse(Y);if(J&&typeof J==="object"&&J.id=== $ )return U}catch{}}}return}function R 7( $ ,I){let z= $ y( $ );if(!z)throw Error( ` Enterprise config not found : $ { $ } ` );let U={...JSON.parse(N D(z,"utf-8")),...I};for(let J of Object.keys(I))if(I[J]===void 0)delete U[J];let Y=aS .parse(U);return f W0(z, ` $ { JSON . stringify ( Y , null , 2 ) }
` ,"utf-8"),Y}function _7( $ ,I,z=[]){let q=I.corpId?.trim()||void 0,U=I.stateful?I.defaultCorpId?.trim()||void 0:void 0,Y=q??U;if(Y){let Q= $ .find((H)=>H.id===Y);if(Q)return Q;let w= $ .find((H)=>H.id.toLowerCase()===Y.toLowerCase());if(w)return w;let K= $ .find((H)=>H.name.toLowerCase()===Y.toLowerCase());if(K)return K;throw Error( ` No enterprise config found for $ { Y } ` )}if(!I.stateful)throw Error("Stateless mode is enabled. Every enterprise command requires --corp <corpId>. Use ` seal - home config mode stateful ` to enable a default enterprise.");let J= $ [0];if(J)return J;throw Error("No enterprise config found. Add a non-example JSON file under one of: "+(z.length?z.join(", "):"the configured enterprise directories"))}import{readFileSync as qG1}from"node:fs";import{randomBytes as UG1}from"node:crypto";var oW0=300000,mW0=new Map;function Nw1( $ ,I){return $ .map((z)=>z.trim()).filter(Boolean).map((z)=>I?z:z.toLowerCase())}function Mw1( $ ,I){return I? $ : $ .toLowerCase()}function Aw1( $ ,I,z,q){let U=Mw1( $ ,q),Y=I.filter((J)=>U.includes(J));if(z==="all"&&Y.length!==I.length)return[];return Y}function Pw1( $ ){if(typeof $ ==="string")return $ .split(/ \r ? \n /);return JSON.stringify( $ ,null,2).split(/ \r ? \n /)}function Tw1( $ ,I){if(I.fields&&!I.fields.has( $ .field))return[];let z=Pw1( $ .value),q=[];return z.forEach((U,Y)=>{let J=Aw1(U,I.keywords,I.matchMode,I.caseSensitive);if(J.length===0)return;let Q=Math.max(0,Y-I.contextLines),w=Math.min(z.length,Y+I.contextLines+1),K={area: $ .area,entityType: $ .entityType,entityId: $ .entityId,title: $ .title,field: $ .field,lineNumber:Y+1,matchedKeywords:J,matchedText:AD(U,I.maxChars),context:{before:I.snippetOnly?[]:z.slice(Q,Y).map((H)=>AD(H,I.maxChars)),line:AD(U,I.maxChars),after:I.snippetOnly?[]:z.slice(Y+1,w).map((H)=>AD(H,I.maxChars))},metadata: $ .metadata};if(I.snippetOnly)K.context={before:[],line:K.context.line,after:[]};q.push(K)}),q}function AD( $ ,I){if(!I|| $ .length<=I)return $ ;return ` $ { $ . slice ( 0 , Math . max ( 0 , I ) ) } ... ` }function Ew1( $ ){return[{area:"rules",entityType:"rule",entityId: $ .id,title: $ .scope,field:"description",value: $ .description,metadata:{scope: $ .scope,strictness: $ .strictness,status: $ .status}},{area:"rules",entityType:"rule",entityId: $ .id,title: $ .scope,field:"scope",value: $ .scope,metadata:{strictness: $ .strictness,status: $ .status}}]}function lW0( $ ){return $ .rules.flatMap((I,z)=>{let q= ` $ { $ . id } : $ { I . description . slice ( 0 , 32 ) } ` ,U={versionId: $ .id,versionNumber: $ .versionNumber,versionName: $ .versionName,publishedByName: $ .publishedByName,publishedAt: $ .publishedAt,scope:I.scope,strictness:I.strictness,code:"code"in I?I.code:void 0,index:z};return[{area:"rules",entityType:"rule",entityId:q,title: ` $ { $ . versionName } / $ { I . scope } ` ,field:"history.description",value:I.description,metadata:U},{area:"rules",entityType:"rule",entityId:q,title: ` $ { $ . versionName } / $ { I . scope } ` ,field:"history.scope",value:I.scope,metadata:U}]})}function Bw1( $ ){return[{area:"documents",entityType:"document",entityId: $ .id,title: $ .title,field:"title",value: $ .title,metadata:{status: $ .status,scenarios: $ .scenarios,tags: $ .tags}},{area:"documents",entityType:"document",entityId: $ .id,title: $ .title,field:"purpose",value: $ .purpose,metadata:{status: $ .status,scenarios: $ .scenarios,tags: $ .tags}},{area:"documents",entityType:"document",entityId: $ .id,title: $ .title,field:"content",value: $ .content,metadata:{status: $ .status,scenarios: $ .scenarios,tags: $ .tags}}]}function jw1( $ ){let I=[];if( $ .decisionPreferences)for(let[z,q]of Object.entries( $ .decisionPreferences))I.push({area:"preferences",entityType:"preference",field: ` decisionPreferences . $ { z } ` ,value:q,metadata:{integrationSystem: $ .integrationSystem}});return $ .integrations.forEach((z,q)=>{I.push({area:"preferences",entityType:"integration",title:z.outboundName,field: ` integrations [ $ { q } ] ` ,value:z,metadata:{type:z.type,outboundName:z.outboundName,mode:z.mode,corporationId:z.corporationId}})}),I}async function vw1( $ ,I,z){let q=z.ruleVersionScope??"current",U=[I.id, ` ruleVersionScope = $ { q } ` , ` ruleVersionId = $ { z . ruleVersionId ? ? "" } ` , ` ruleVersionNumber = $ { z . ruleVersionNumber ? ? "" } ` , ` latestRuleVersion = $ { z . latestRuleVersion ? ? ! 1 } ` , ` documentLimit = $ { z . documentLimit ? ? 100 } ` ].join("|"),Y=mW0.get(U);if(!z.refresh&&Y&&Date.now()<Y.expiresAt)return Y;let[J,Q,w]=await Promise.all([gw1( $ ,{scope:q,versionId:z.ruleVersionId,versionNumber:z.ruleVersionNumber,latest:z.latestRuleVersion}),_9( $ ,{limit:z.documentLimit??100}),P1( $ ,I.seal.endpoints.approvalStylePreferences)]),K=Date.now(),H={entries:[...J,...Q.articles.flatMap(Bw1),...jw1(w)],fetchedAt:K,expiresAt:K+oW0};return mW0.set(U,H),H}async function gw1( $ ,I){if(I.scope==="current")return(await u6( $ )).rules.flatMap(Ew1);if(I.scope==="version"){let q=await Rw1( $ ,I);return lW0(q)}return(await S $ ( $ )).flatMap(lW0)}async function Rw1( $ ,I){if(I.versionId)return xJ( $ ,I.versionId);let z=await S $ ( $ ),q=I.versionNumber?z.find((U)=>U.versionNumber===I.versionNumber):z[0];if(!q)throw Error(I.versionNumber? ` Rule version not found : $ { I . versionNumber } ` :"No rule versions found");return q}async func
Line truncated
` +"为防止测试单据污染生产审批流,禁止向生产环境重放单据。请指定测试企业 (--target-corp <testCorpId>),或在确有需要时添加 --force。",1, ` seal - use webhook replay -- target - corp < testCorpId > $ { z . id !== q . id ? ` --source-corp ${ z . id } ` : "" } ` );return{sourceCorp:z,targetCorp:q}}async function fw1( $ ,I,z){let q=await Q8( $ ,I.seal.endpoints.approvalStylePreferences);if(z||q.length>0)return aW0(q,z,I.id);if(I.environment==="test"||I.id.toLowerCase().includes("test")){console.error( ` [ webhook - replay ] 测试企业 「 $ { I . name } 」 未配置 Webhook 通道 , 正在自动创建 「 ( Seal测 - 回放通道 ) 」 ... ` );let U=(I.seal.url??I.source?.sealUrl?? ` https : //${I.id.toLowerCase()}.sealai.cc`).replace(/\/+$/,"");return await XW($,U,{name:"(Seal测-回放通道)",mode:"assisted",outgoingResultWebhook:`${U}/api/v1/integrations/webhook/replay-mock-callback`},I.seal.endpoints.approvalStylePreferences)}throw new J$(`当前租户「${I.name}」未配置任何 Webhook 集成通道。`,1,`seal-use webhook add --name <name> --result-url <url> --corp ${I.id}`)}async function CU($){let{query:I,sourceClient:z,targetClient:q,sourceCorp:U,targetCorp:Y,webhookSelector:J,snPrefix:Q,snSuffix:w,docIdPrefix:K,docIdSuffix:H,dryRun:G,fetchFn:W=fetch}=$,Z=[];if(I.recordId){let v=await P4(z,I.recordId);Z.push(v)}else if(I.recordIds&&I.recordIds.length>0)for(let v of I.recordIds)Z.push(await P4(z,v));else if(I.sn){let v=await a6(z,{sourceDocumentSN:I.sn,limit:1});if(!v.records.length)throw Error(`在企业「${U.name}」中未找到单据编号为「${I.sn}」的审批记录。`);Z.push(v.records[0])}else if(I.sns&&I.sns.length>0)for(let v of I.sns){let y=await a6(z,{sourceDocumentSN:v,limit:1});if(!y.records.length)throw Error(`在企业「${U.name}」中未找到单据编号为「${v}」的审批记录。`);Z.push(y.records[0])}else if(I.limit!==void 0){let v=await a6(z,{limit:I.limit,status:I.status,startDate:I.startDate,endDate:I.endDate});if(!v.records.length)throw Error(`在企业「${U.name}」中未检索到符合条件的审批记录。`);Z=v.records}else throw Error("Usage: seal-use webhook replay <recordId> [--sn <documentSN>] [--limit <n>] [--webhook <idOrName>] [--source-corp <corpId>] [--target-corp <corpId>] [--dry-run]");let X=Z.map((v)=>({run:v,doc:yw1(v,{snPrefix:Q,snSuffix:w,docIdPrefix:K,docIdSuffix:H})}));if(G){let v={id:"preview-webhook",name:J??"预览目标通道",mode:"assisted",incomingDocumentWebhookUrl:`${Y.seal.url}/api/v1/integrations/webhook/preview`};try{let x=await Q8(q,Y.seal.endpoints.approvalStylePreferences);if(x.length>0){let B=aW0(x,J,Y.id);v={id:B.id,name:B.name,mode:B.mode,incomingDocumentWebhookUrl:B.incomingDocumentWebhook.url}}}catch{}let y=X.map(({run:x,doc:B})=>({originalRecord:{id:x.id,sourceSystem:x.sourceSystem,sourceDocumentSN:x.sourceDocumentSN,sourceDocumentId:x.sourceDocumentId},document:B,success:!0})),h=y.length===1;return{dryRun:!0,success:!0,sourceCorp:{id:U.id,name:U.name,environment:U.environment},targetCorp:{id:Y.id,name:Y.name,environment:Y.environment},targetWebhook:v,totalCount:y.length,successCount:y.length,failureCount:0,originalRecord:h?y[0].originalRecord:void 0,document:h?y[0].document:void 0,records:y}}let L=await fw1(q,Y,J),D={id:L.id,name:L.name,mode:L.mode,incomingDocumentWebhookUrl:L.incomingDocumentWebhook.url},O=[],T=0,P=0;for(let{run:v,doc:y}of X){console.error(`[webhook-replay] 正在向 Webhook 通道「${L.name}」推送单据: ${y.documentSN}...`);try{let h=await kw1(L.incomingDocumentWebhook.url,L.secret,y,W);O.push({originalRecord:{id:v.id,sourceSystem:v.sourceSystem,sourceDocumentSN:v.sourceDocumentSN,sourceDocumentId:v.sourceDocumentId},replayedDocument:{documentSN:y.documentSN,documentId:y.documentId,fieldCount:y.fields.length},pushResult:h,success:!0}),T+=1}catch(h){let x=h instanceof Error?h.message:String(h);O.push({originalRecord:{id:v.id,sourceSystem:v.sourceSystem,sourceDocumentSN:v.sourceDocumentSN,sourceDocumentId:v.sourceDocumentId},replayedDocument:{documentSN:y.documentSN,documentId:y.documentId,fieldCount:y.fields.length},error:x,success:!1}),P+=1}}let M=O.length===1;return{success:P===0,dryRun:!1,sourceCorp:{id:U.id,name:U.name,environment:U.environment},targetCorp:{id:Y.id,name:Y.name,environment:Y.environment},targetWebhook:D,totalCount:O.length,successCount:T,failureCount:P,originalRecord:M?O[0].originalRecord:void 0,replayedDocument:M?O[0].replayedDocument:void 0,pushResult:M?O[0].pushResult:void 0,records:O}}var sW0=V.object({level:V.enum(["error","warning","info"]),code:V.string(),message:V.string(),snippet:V.string().optional(),suggestion:V.string().optional()}),XS1=V.object({score:V.number().min(0).max(100),passed:V.boolean(),issues:V.array(sW0)}),nw1=V.object({ruleId:V.string().optional(),ruleCode:V.string().optional(),ruleName:V.string().optional(),score:V.number().min(0).max(100),passed:V.boolean(),issues:V.array(sW0),description:V.string().optional()}),LS1=V.object({linter:V.string(),linterType:V.enum(["built
Line truncated
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* Seal 官方标准规则校验器 ( Official Standard Rule Linter )
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
*
* 存放路径 : ~ / . c o n f i g / s e a l - u s e / l i n t e r s / o f f i c i a l / b u i l t i n . t s
* 维护说明 : 本文件由 seal - use 官方自动同步并保护 。
* 每次运行时系统会自动重写本文件并清理 official / 目录下的非官方文件 。
* 若您需要编写企业私有规则校验器 , 请将自定义 . ts 文件放置在外层的用户目录 :
* ~ / . c o n f i g / s e a l - u s e / l i n t e r s / 即 可 , 系 统 将 自 动 识 别 并 加 载 。
* /
export interface RuleLintTarget {
id ? : string ;
code ? : string ;
name ? : string ;
description : string ;
scope ? : string ;
strictness ? : string ;
}
export interface RuleLintIssue {
level : "error" | "warning" ;
code : string ;
message : string ;
snippet ? : string ;
suggestion ? : string ;
}
export interface RuleLintResult {
score : number ;
passed : boolean ;
issues : RuleLintIssue [ ] ;
}
export const BUILTIN _VAGUE _WORDS = [
"原则上" ,
"尽量" ,
"适当" ,
"酌情" ,
"一般情况下" ,
"尽可能" ,
"合理控制" ,
"视情况" ,
"视具体情况"
] ;
export const BUILTIN _EXCEPTION _TRIGGERS = [
"除非" ,
"特殊情况" ,
"特殊原因" ,
"经批准" ,
"经审批" ,
"经领导同意" ,
"除外" ,
"例外"
] ;
export const BUILTIN _EVIDENCE _KEYWORDS = [
"备注" ,
"说明" ,
"附件" ,
"证明" ,
"邮件" ,
"截图" ,
"凭证" ,
"审批" ,
"单据" ,
"发票"
] ;
export function lintRule ( rule : RuleLintTarget ) : RuleLintResult {
const text = ( rule . description || "" ) . trim ( ) ;
const issues : RuleLintIssue [ ] = [ ] ;
// 1. 规则过短检查
if ( text . length < 5 ) {
issues . push ( {
level : "error" ,
code : "TOO_SHORT" ,
message : "规则描述过于简短(少于 5 个字),大模型难以形成明确的判定逻辑" ,
suggestion : "请补充具体的费用类型、核验条件与限制标准"
} ) ;
}
// 2. 主观模糊词拦截
for ( const word of BUILTIN _VAGUE _WORDS ) {
if ( text . includes ( word ) ) {
issues . push ( {
level : "error" ,
code : "VAGUE_WORD" ,
snippet : word ,
message : \ ` 包含主观模糊词 " \$ {word}",容易导致大模型判定标准产生波动与幻觉 \` ,
suggestion : \ ` 建议移除 " \$ {word}",改为具体的金额上限、枚举范围或刚性判定条件 \`
} ) ;
}
}
// 3. 悬空例外条款检测
const matchedTrigger = BUILTIN _EXCEPTION _TRIGGERS . find ( ( trigger ) => text . includes ( trigger ) ) ;
const hasEvidence = BUILTIN _EVIDENCE _KEYWORDS . some ( ( kw ) => text . includes ( kw ) ) ;
if ( matchedTrigger && ! hasEvidence ) {
issues . push ( {
level : "warning" ,
code : "HANGING_EXCEPTION" ,
snippet : matchedTrigger ,
message : \ ` 包含例外条款 " \$ {matchedTrigger}",但未指定 AI 从何处核验该例外成立的依据 \` ,
suggestion : "建议补充明确的凭据来源(例如:需在【单据备注】中说明原因,或在【附件】中上传审批截图)"
} ) ;
}
const errorCount = issues . filter ( ( i ) => i . level === "error" ) . length ;
const warningCount = issues . filter ( ( i ) => i . level === "warning" ) . length ;
const score = Math . max ( 0 , 100 - errorCount * 25 - warningCount * 10 ) ;
return {
score ,
passed : errorCount === 0 ,
issues
} ;
}
export default lintRule ;
` ,"strict.ts": ` / * *
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
* Seal 官方严格风控规则校验器 ( Official Strict Risk Rule Linter )
* === === === === === === === === === === === === === === === === === === === === === === === === === ===
*
* 存放路径 : ~ / . c o n f i g / s e a l - u s e / l i n t e r s / o f f i c i a l / s t r i c t . t s
* 维护说明 : 本文件由 seal - use 官方自动同步并保护 。
* 每次运行时系统会自动重写本文件并清理 official / 目录下的非官方文件 。
* 若您需要编写企业私有规则校验器 , 请将自定义 . ts 文件放置在外层的用户目录 :
* ~ / . c o n f i g / s e a l - u s e / l i n t e r s / 即 可 , 系 统 将 自 动 识 别 并 加 载 。
* /
export interface RuleLintTarget {
id ? : string ;
code ? : string ;
name ? : string ;
description : string ;
scope ? : string ;
strictness ? : string ;
}
export interface RuleLintIssue {
level : "error" | "warning" ;
code : string ;
message : string ;
snippet ? : string ;
suggestion ? : string ;
}
export interface RuleLintResult {
score : number ;
passed : boolean ;
issues : RuleLintIssue [ ] ;
}
export const STRICT _VAGUE _WORDS = [
"原则上" ,
"尽量" ,
"适当" ,
"酌情" ,
"一般情况下" ,
"尽可能" ,
"合理控制" ,
"视情况" ,
"视具体情况" ,
"必要时" ,
"及时" ,
"适量" ,
"差不多" ,
"相关部门"
] ;
export const STRICT _EXCEPTION _TRIGGERS = [
"除非" ,
"特殊情况" ,
"特殊原因" ,
"经批准" ,
"经审批" ,
"经领导同意" ,
"除外" ,
"例外"
] ;
export const STRICT _EVIDENCE _KEYWORDS = [
"备注" ,
"说明" ,
"附件" ,
"证明" ,
"邮件" ,
"截图" ,
"凭证" ,
"审批" ,
"单据" ,
"发票"
] ;
export const STRICT _QUANTITATIVE _INDICATORS = [
"¥" ,
"$" ,
"€" ,
"元" ,
"不得超过" ,
"不超过" ,
"超过" ,
"低于" ,
"不低于" ,
"最高" ,
"封顶" ,
"限额" ,
"禁止" ,
"严禁" ,
"必须" ,
"不予" ,
"仅限" ,
"每人" ,
"每日" ,
"每月" ,
"每年" ,
"每次" ,
"单笔"
] ;
export const STRICT _SPECIFIC _APPROVERS = [
"总监" ,
"VP" ,
"总经理" ,
"直接上级" ,
"部门负责人" ,
"项目经理" ,
"财务" ,
"分管领导" ,
"HR" ,
"CEO"
] ;
export function lintRule ( rule : RuleLintTarget ) : RuleLintResult {
const text = ( rule . description || "" ) . trim ( ) ;
const issues : RuleLintIssue [ ] = [ ] ;
// 1. 规则长度检查 (严格模式下少于 10 字进行警告)
if ( text . length < 5 ) {
issues . push ( {
level : "error" ,
code : "TOO_SHORT" ,
message : "规则描述过于简短(少于 5 个字),大模型难以形成明确的判定逻辑" ,
suggestion : "请补充具体的费用类型、核验条件与限制标准"
} ) ;
} else if ( text . length < 10 ) {
issues . push ( {
level : "warning" ,
code : "SHORT_DESCRIPTION" ,
message : "规则描述偏短(少于 10 个字),可能缺少适用的单据范围或执行细节" ,
suggestion : "建议扩充核验场景、限制标准或异常处理方式"
} ) ;
}
// 2. 主观模糊词拦截(严格词库)
for ( const word of STRICT _VAGUE _WORDS ) {
if ( text . includes ( word ) ) {
issues . push ( {
level : "error" ,
code : "VAGUE_WORD" ,
snippet : word ,
message : \ ` 包含主观模糊词 " \$ {word}",在严格风控模式下容易引起审核判定分歧 \` ,
suggestion : \ ` 请移除 " \$ {word}",明确量化标准或枚举具体允许的情形 \`
} ) ;
}
}
// 3. 例外条款与凭据要求(严格模式下无凭据直接判定为 Error 阻断)
const matchedTrigger = STRICT _EXCEPTION _TRIGGERS . find ( ( trigger ) => text . includes ( trigger ) ) ;
const hasEvidence = STRICT _EVIDENCE _KEYWORDS . some ( ( kw ) => text . includes ( kw ) ) ;
if ( matchedTrigger && ! hasEvidence ) {
issues . push ( {
level : "error" ,
code : "HANGING_EXCEPTION" ,
snippet : matchedTrigger ,
message : \ ` 包含例外条款 " \$ {matchedTrigger}",但未指定 AI 从何处核验该例外成立的凭证依据 \` ,
suggestion : "严格模式要求必须补充明确的核验来源(如:需在【单据备注】中说明原因,或在【附件】中提供审批截图)"
} ) ;
}
// 4. 定量约束或刚性边界检查
const hasNumber = /\\d+/ . test ( text ) ;
const hasConstraint = STRICT _QUANTITATIVE _INDICATORS . some ( ( kw ) => text . includes ( kw ) ) ;
if ( ! hasNumber && ! hasConstraint ) {
issues . push ( {
level : "warning" ,
code : "LACKS_EXPLICIT_CONSTRAINT" ,
message : "规则缺乏明确的定量标准(如金额、天数、频次)或绝对刚性边界词(如不得、禁止、仅限)" ,
suggestion : "建议设定具体数值阈值或明确的禁止/准入条件,以便大模型精确判定"
} ) ;
}
// 5. 审批角色具体化检查
const mentionsApproval = /经(批准|审批|领导同意|领导签字)|审批通过/ . test ( text ) ;
const hasSpecificApprover = STRICT _SPECIFIC _APPROVERS . some ( ( approver ) => text . includes ( approver ) ) ;
if ( mentionsApproval && ! hasSpecificApprover ) {
issues . push ( {
level : "warning" ,
code : "AMBIGUOUS_APPROVER" ,
message : "规则提及审批例外,但未明确指定具体的审批角色(如部门总监、直接上级、财务负责人)" ,
suggestion : "建议明确审批人角色(例如:经【部门总监】批准,经【直接上级】邮件确认)"
} ) ;
}
const errorCount = issues . filter ( ( i ) => i . level === "error" ) . length ;
const warningCount = issues . filter ( ( i ) => i . level === "warning" ) . length ;
const score = Math . max ( 0 , 100 - errorCount * 30 - warningCount * 15 ) ;
return {
score ,
passed : errorCount === 0 ,
issues
} ;
}
export default lintRule ;
` };import{existsSync as DI,mkdirSync as rw1,readFileSync as tw1,readdirSync as zV0,rmSync as aw1,unlinkSync as sw1,writeFileSync as ew1}from"node:fs";import{homedir as $ K1}from"node:os";import{isAbsolute as IK1,join as T6,resolve as zK1}from"node:path";import{pathToFileURL as $ V0}from"node:url";var l $ =T6( $ K1(),".config","seal-use","linters"),qK1="official",q5=T6(l $ ,qK1),BD=T6(process.cwd(),"linters");function qV0( $ =q5){let I=[],z=[];try{if(!DI( $ ))rw1( $ ,{recursive:!0});let q=Object.keys(Iy);for(let[Y,J]of Object.entries(Iy)){let Q=T6( $ ,Y),w=!0;if(DI(Q))try{if(tw1(Q,"utf8")===J)w=!1}catch{w=!0}if(w)ew1(Q,J,"utf8");I.push(Y)}let U=zV0( $ ,{withFileTypes:!0});for(let Y of U)if(!q.includes(Y.name)){let J=T6( $ ,Y.name);try{if(Y.isDirectory())aw1(J,{recursive:!0,force:!0});else sw1(J);z.push(Y.name)}catch{}}}catch{}return{synced:I,pruned:z}}function UV0( $ ={syncOfficial:!0}){if( $ .syncOfficial!==!1)qV0();let I=[{name:"builtin",type:"builtin",path:T6(q5,"builtin.ts"),description:"Seal 官方标准校验器 (拦截过短描述、主观模糊词与悬空例外条款)"},{name:"strict",type:"official",path:T6(q5,"strict.ts"),description:"Seal 官方严格风控校验器 (强校验字数、刚性定量约束、凭证依据与具体审批人角色)"}],z=[l $ ,BD];for(let q of z)if(DI(q))try{let U=zV0(q,{withFileTypes:!0});for(let Y of U){if(Y.isDirectory())continue;let J=Y.name;if(J.endsWith(".ts")||J.endsWith(".js")||J.endsWith(".mjs")){let Q=J.replace(/ \. (ts|js|mjs) $ /,"");if(!I.some((w)=>w.name===Q))I.push({name:Q,type:"custom",path:T6(q,J),description: ` 用户自定义规则校验器 ( $ { J } ) ` })}}}catch{}return I}function UK1( $ ){let I=( $ ||"").trim();if(!I||I==="builtin"||I==="default"||I==="official/builtin"||I==="official/builtin.ts")return{path:T6(q5,"builtin.ts"),isOfficial:!0,officialKind:"builtin"};if(I==="strict"||I==="official/strict"||I==="official/strict.ts")return{path:T6(q5,"strict.ts"),isOfficial:!0,officialKind:"strict"};if(IK1(I)||I.startsWith("./")||I.startsWith("../")){let q=zK1(I);if(DI(q))return{path:q};for(let U of[".ts",".js",".mjs"])if(DI( ` $ { q } $ { U } ` ))return{path: ` $ { q } $ { U } ` }}let z=[T6(l $ , ` $ { I } . ts ` ),T6(l $ , ` $ { I } . js ` ),T6(l $ , ` $ { I } . mjs ` ),T6(BD, ` $ { I } . ts ` ),T6(BD, ` $ { I } . js ` ),T6(BD, ` $ { I } . mjs ` )];for(let q of z)if(DI(q))return{path:q};return{}}async function zy( $ ){qV0();let I=UK1( $ ??"builtin");if(I.isOfficial){let q=I.officialKind==="strict"?eW0:hU,U=I.officialKind==="strict"?"official":"builtin",Y=I.path;if(Y&&DI(Y))try{let Q=await import( $ V0(Y).href),w=Q.default??Q.lintRule??Q.linter??Q.lint;if(typeof w==="function")return{name:I.officialKind??"builtin",type:U,filePath:Y,linter:IV0(w,q)}}catch{}return{name:I.officialKind??"builtin",type:U,filePath:Y,linter:q}}let z=I.path;if(!z)return console.error( ` ⚠ ️ [ linter ] 未找到自定义校验器 "${$}" , 已自动安全降级至内置标准校验器 。 ` ),{name:"builtin",type:"builtin",linter:hU};try{let U=await import( $ V0(z).href),Y=U.default??U.lintRule??U.linter??U.lint;if(typeof Y!=="function")return console.error( ` ⚠ ️ [ linter ] 自定义校验器 "${z}" 未导出标准函数 ( default / l i n t R u l e ) , 已 安 全 降 级 至 内 置 标 准 校 验 器 。 ` ) , { n a m e : " b u i l t i n " , t y p e : " b u i l t i n " , l i n t e r : h U } ; r e t u r n { n a m e : $ ? ? " c u s t o m " , t y p e : " c u s t o m " , f i l e P a t h : z , l i n t e r : I V 0 ( Y , h U ) } } c a t c h ( q ) { r e t u r n c o n s o l e . e r r o r ( ` ⚠ ️ [ l i n t e r ] 加 载 自 定 义 校 验 器 脚 本 " $ { z } " 失 败 ( 语 法 错 误 或 依 赖 缺 失 : $ { q ? . m e s s a g e ? ? q } ) , 已 自 动 安 全 降 级 至 内 置 标 准 校 验 器 。 ` ) , { n a m e : " b u i l t i n " , t y p e : " b u i l t i n " , l i n t e r : h U } } } f u n c t i o n I V 0 ( $ , I ) { r e t u r n a s y n c ( z , q ) = > { t r y { l e t U = a w a i t $ ( z , q ) ; i f ( U & & t y p e o f U = = = " o b j e c t " & & t y p e o f U . s c o r e = = = " n u m b e r " & & A r r a y . i s A r r a y ( U . i s s u e s ) ) r e t u r n U ; r e t u r n c o n s o l e . e r r o r ( " ⚠ ️ [ l i n t e r ] 自 定 义 校 验 器 返 回 值 格 式 不 符 合 R u l e L i n t R e s u l t 契 约 , 已 回 退 至 内 置 结 果 。 " ) , I ( z , q ) } c a t c h ( U ) { r e t u r n c o n s o l e . e r r o r ( " ⚠ ️ [ l i n t e r ] 自 定 义 校 验 器 执 行 异 常 : " , U ) , I ( z , q ) } } } a s y n c f u n c t i o n q y ( $ , I , z ) { l e t q = a w a i t I . l i n t e r ( $ , z ) ; r e t u r n { r u l e I d : $ . i d , r u l e C o d e : $ . c o d e , r u l e N a m e : $ . n a m e , s c o r e : q . s c o r e , p a s s e d : q . p a s s e d , i s s u e s : q . i s s u e s , d e s c r i p t i o n : $ . d e s c r i p t i o n } } a s y n c f u n c t i o n Y V 0 ( $ , I , z , q ) { l e t U = q ? . m i n S c o r e ? ? 0 , Y = q ? . l e v e l ? ? " a l l " , J = [ ] , Q = 0 ; f o r ( l e t Z o f $ ) { l e t X = a w a i t q y ( Z , I , z ) ; Q + = X . s c o r e ; l e t L = X . i s s u e s ; i f ( Y = = = " e r r o r " ) L = X . i s s u e s . f i l t e r ( ( O ) = > O . l e v e l = = = " e r r o r " ) ; e l s e i f ( Y = = = " w a r n i n g " ) L = X . i s s u e s . f i l t e r ( ( O ) = > O . l e v e l = = = " w a r n i n g " | | O . l e v e l = = = " e r r o r " ) ; l e t D = L . e v e r y ( ( O ) = > O . l e v e l ! = = " e r r o r " ) ; i f ( q ? . s u m m a r y ) { i f ( L . l e n g t h > 0 ) J . p u s h ( { . . . X , p a s s e d : D , i s s u e s : L } ) } e l s e J . p u s h ( { . . . X , p a s s e d : D , i s s u e s : L } ) } l e t w = $ . l e n g t h , K = w = = = 0 ? 1 0 0 : M a t h . r o u n d ( Q / w ) , H = J . f i l t e r ( ( Z ) = > Z . i s s u e s . l e n g t h > 0 ) . l e n g t h , G = w - H , W = K > = U & & J . e v e r y ( ( Z ) = > Z . p a s s e d ) ; r e t u r n { l i n t e r : I . n a m e , l i n t e r T y p e : I . t y p e , t o t a l R u l e s : w , h e a l t h y C o u n t : G , i s s u e C o u n t : H , o v e r a l l S c o r e : K , p a s s e d : W , i s s u e s : J } } i m p o r t { e x i s t s S y n c a s Y K 1 , r e a d F i l e S y n c a s J K 1 , w r i t e F i l e S y n c a s Q K 1 , m k d i r S y n c a s w K 1 } f r o m " n o d e : f s " ; i m p o r t { d i r n a m e a s K K 1 , r e s o l v e a s Q V 0 } f r o m " n o d e : p a t h " ; f u n c t i o n H K 1 ( $ ) { l e t I ; t r y { I = J S O N . p a r s e ( $ ) } c a t c h ( z ) { t h r o w E r r o r ( ` 本 地 规 则 文 件 J S O N 解 析 失 败 : $ { z i n s t a n c e o f E r r o r ? z . m e s s a g e : S t r i n g ( z ) } ` ) } i Line truncated
` ,"utf8"),z}function KV0( $ ){return $ .map((I,z)=>{let q;if(typeof I.code==="number")q= ` # $ { String ( I . code ) . padStart ( 4 , "0" ) } ` ;else if(typeof I.code==="string")q=I.code.startsWith("#")?I.code: ` # $ { I . code } ` ;else q= ` # $ { String ( z + 1 ) . padStart ( 4 , "0" ) } ` ;return{id:I.id,code:q,name:I.name,description:I.description,scope:I.scope,strictness:I.strictness}})}class o $ extends Error{errors;warnings;constructor( $ ,I=[]){super([ ` 材料包校验失败 : $ { $ . length } 个错误 ` ,... $ .map((z)=> ` - $ { z } ` )].join( `
` ));this.errors= $ ;this.warnings=I;this.name="MaterialPackValidationError"}}var oy=f7(gV0(),1),OZ0=f7(DZ0(),1);var dD={maxEntries:1000,maxTotalSize:524288000,maxCompressionRatio:150};async function FZ0( $ ){return new Promise((I,z)=>{oy.default.fromBuffer(Buffer.from( $ ),{lazyEntries:!0,autoClose:!0,decodeStrings:!1},(q,U)=>{if(q||!U)return z(q??Error("无法打开 ZIP"));let Y=[];U.readEntry(),U.on("entry",(J)=>{let Q=NZ0(J);if(!Q.endsWith("/")&&!fH1(Q))Y.push({fileName:Q,uncompressedSize:J.uncompressedSize,compressedSize:J.compressedSize,raw:J});U.readEntry()}),U.on("end",()=>I(Y)),U.on("error",z)})})}function NZ0( $ ){let I=Buffer.isBuffer( $ .fileName)? $ .fileName:Buffer.from(String( $ .fileName),"binary"),z=I.toString("utf8");if(!z.includes("� "))return z;let q=OZ0.default.decode(I,"gbk");if(!q.includes("� "))return q;return z}function fH1( $ ){let I= $ .split("/").pop()??"";return $ .split("/").includes("__MACOSX")||I===".DS_Store"||I.startsWith("._")||I.startsWith(".~")||I.startsWith("~ $ ")}function MZ0( $ ,I){let z=[],q=uz(I);if( $ .length>dD.maxEntries)z.push( ` 文件数超过 $ { dD . maxEntries } ` );if( $ .reduce((J,Q)=>J+Q.uncompressedSize,0)>dD.maxTotalSize)z.push("解压后总大小超过 500MB");for(let J of $ ){if(J.fileName.startsWith("/")||J.fileName.split("/").includes(".."))z.push( ` 存在不安全路径 : $ { J . fileName } ` );if(J.compressedSize>0&&J.uncompressedSize/J.compressedSize>dD.maxCompressionRatio)z.push( ` 压缩比超过 150 : $ { J . fileName } ` );if(J.fileName==="信息表.xlsx")continue;nH1(J,q,z)}if(! $ .find((J)=>J.fileName==="信息表.xlsx"))z.push("ZIP 根目录缺少精确名为「信息表.xlsx」的文件");if( $ .some((J)=>J.fileName.toLowerCase().endsWith(".zip")))z.push("不允许嵌套 ZIP");if(z.length)throw new o $ (z)}function nH1( $ ,I,z){let q=bH1( $ .fileName);if(!q||!I.allowedExtensions.includes(q))z.push( ` 附件后缀不在白名单中 : $ { $ . fileName } ( 允许 : $ { I . allowedExtensions . join ( ", " ) } ) ` );if( $ .uncompressedSize<I.minFileSizeBytes)z.push( ` 附件文件过小 : $ { $ . fileName } ( $ { $ . uncompressedSize } B , 小于最小值 $ { I . minFileSizeBytes } B ) ` );if(I.maxFileSizeBytes!==void 0&&I.maxFileSizeBytes!==null&& $ .uncompressedSize>I.maxFileSizeBytes)z.push( ` 附件文件过大 : $ { $ . fileName } ( $ { $ . uncompressedSize } B , 大于最大值 $ { I . maxFileSizeBytes } B ) ` )}function bH1( $ ){let I= $ .split("/").pop()?? $ ,z=I.lastIndexOf(".");return z>0?I.slice(z).toLowerCase():""}function ry( $ ,I){return new Promise((z,q)=>{oy.default.fromBuffer(Buffer.from( $ ),{lazyEntries:!0,autoClose:!0,decodeStrings:!1},(U,Y)=>{if(U||!Y)return q(U??Error("无法打开 ZIP"));Y.readEntry(),Y.on("entry",(J)=>{if(NZ0(J)!==I.fileName)return Y.readEntry();Y.openReadStream(J,(Q,w)=>{if(Q||!w)return q(Q??Error( ` 无法读取 $ { I . fileName } ` ));let K=[];w.on("data",(H)=>K.push(H)),w.on("end",()=>z(Buffer.concat(K))),w.on("error",q)})}),Y.on("error",q)})})}var PZ0=f7(WD(),1);function iH1( $ ){return $ .startsWith("[附件]")}function TZ0( $ ){return $ .startsWith("[附件]")? $ .slice(4): $ }function pH1( $ ){return TZ0( $ ).toLowerCase().replace(/ \s +/g,"_")||"attachment"}function cH1( $ ){if( $ ==null|| $ ==="")return[];return String( $ ).split(/[ \n ,;,;]/).map((I)=>I.trim()).filter(Boolean)}function ty( $ ,I){let z=[];for(let[q,U]of I.entries()){if(!iH1(q))continue;let Y= $ .getCell(U).value,J=cH1(Y);if(!J.length)continue;z.push({key:pH1(q),label:TZ0(q),paths:J})}return z}function ay( $ ){let I=new Map;return $ .map((z)=>{let q=(I.get(z.key)??0)+1;return I.set(z.key,q),q===1?z:{...z,key: ` $ { z . key } - $ { q } ` }})}function mD( $ ,I,z,q){return{key: $ ,label:I,type:z,value:q}}function EZ0( $ ,I,z){return mD( $ ,I,"TEXT",z==null?"":String(z))}function BZ0( $ ,I,z){return mD( $ ,I,"AMOUNT",typeof z==="number"?{amount:z,currency:"CNY"}:null)}function jZ0( $ ){if( $ instanceof Date)return $ .toISOString();if(typeof $ ==="string"&& $ .trim())return $ .trim();return null}function dH1( $ ){if( $ instanceof Date)return Math.floor( $ .getTime()/1000);if(typeof $ ==="string"&& $ .trim()){let I=Date.parse( $ .trim().replace(" ","T"));if(Number.isFinite(I))return Math.floor(I/1000)}return null}function Rw( $ ){let I=new Map;return $ .getRow(1).eachCell((z,q)=>I.set(String(z.value??"").trim(),q)),I}function FI( $ ,I,z){let q=I.get(z);return q? $ .getCell(q).value:void 0}function mH1( $ ,I){return[["会议编号","meeting_id","TEXT"],["会议名称","meeting_name","TEXT"],["状态","status","TEXT"],["总金额","total_amount","AMOUNT"],["税前劳务总额","pretax_labor_total","AMOUNT"],["报销事由","reimbursement_reason","TEXT"],["po码","po_code","TEXT"],["快递单号","tracking_number","TEXT"],["申请日期","application_date","DATE"],["更新日期","updated_date","DATE"]].flatMap(([q,U,Y])=>{let J=FI( $ ,I,q);if(J==null||J==="")return[];return[Y==="TEXT"?EZ0(U,q,J):Y==="AMOUNT"?BZ0(U,q,J):mD(U,q,Y,jZ0(J))]})}function AZ0( $ ,I,z){return z.flatMap(([q,U,Y])=>{let J=FI( $ ,I,q);if(J==null||J==="")return[];return[Y==="TEXT"?EZ0(U,q,J):Y==="AMOUNT"?BZ0(U,q,J):mD(U,q,Y,jZ0(J))]})}var lH1=[["姓名","name","TEXT"],["身份证号码","id_
Line truncated
` );let O=new FormData,T=await ry(q.fileBuffer,D),P=L.split("/").pop()??L;O.append("files",new File([new Uint8Array(T)],P));let M=await fetch( ` $ { U } / api / v1 / integrations / webhook / $ { encodeURIComponent ( Y ) } / attachments ` ,{method:"POST",headers:Aw({},z.secret),body:O});if(!M.ok)throw Error( ` 附件上传失败 $ { M . status } : $ { await M . text ( ) } ` );let v=await M.json();H.set(L,v.attachments?.map((y)=>y.data)??(v.data===void 0?[]:[v.data])),process.stderr.write( ` ✓ 附件上传成功 : $ { L }
` )}process.stderr.write( ` \uD83D\uDCE4 推送单据 : $ { w . document . documentId }
` );let W=ru (w.document,K,H),Z=await fetch( ` $ { U } / api / v1 / integrations / webhook / $ { encodeURIComponent ( Y ) } / document ` ,{method:"POST",headers:{"Content-Type":"application/json",...O w({webhookId:Y,...W},z.secret)},body:JSON.stringify(W)});if(!Z.ok)throw Error( ` Webhook 单据推送失败 $ { Z . status } : $ { await Z . text ( ) } ` );J.push({documentId:W.documentId,document:W,pushResult:await Z.json()}),process.stderr.write( ` ✓ 单据推送成功 : $ { W . documentId }
` )}return{warnings:[],results:J}}function OI( $ ){return{fileBuffer:_H1( $ ),fileName: $ .split(/[ \\ \/ ]/).pop()??"material-pack.zip"}}import{existsSync as yH1}from"node:fs";async function cD( $ ,I,z={}){let U=Y4().stateful?"stateful":"stateless",Y="ok",J,Q,w;try{let M=await V $ ( $ );w={id:M.user.id,name:M.user.name,isAdmin:M.user.isAdmin},Q={id:M.tenant.id,name:M.tenant.name,tenantSlug:M.tenant.tenantSlug,corporationName:M.tenant.hoseCorpConfig?.corporationName}}catch(M){Y="error",J=M instanceof Error?M.message:String(M)}let K=[];if(Y==="ok")try{K=await Y8( $ ,I.seal.endpoints.approvalStylePreferences)}catch(M){Y="error",J= ` 读取 Webhook 配置失败 : $ { M instanceof Error ? M . message : String ( M ) } ` }let H=K.length===1,G=K.map((M)=>({id:M.id,name:M.name,mode:M.mode,incomingDocumentWebhookUrl:M.incomingDocumentWebhook.url,outgoingResultWebhookUrl:M.outgoingResultWebhook,autoApprovalRate:M.autoApprovalRate,...H?{isDefault:!0}:{}})),W=H?{id:K[0].id,name:K[0].name,mode:K[0].mode}:null,Z=z.webhook?R9(K,z.webhook):H?K[0]:void 0,X;if(z.filePath)if(!yH1(z.filePath))X={valid:!1,filePath:z.filePath,fileName:z.filePath.split(/[ \\ /]/).pop()??z.filePath,documentCount:0,errors:[ ` 文件不存在 : $ { z . filePath } ` ]};else try{let M=OI(z.filePath),v=await FI(M.fileBuffer,M.fileName,Z?.materialPackFilePolicy);X={valid:!0,filePath:z.filePath,fileName:M.fileName,documentCount:v.documents.length,warnings:v.warnings}}catch(M){X={valid:!1,filePath:z.filePath,fileName:z.filePath.split(/[ \\ /]/).pop()??z.filePath,documentCount:0,errors:[M instanceof Error?M.message:String(M)]}}let L=X?X.valid:!0,D=Y==="ok"&&G.length>0&&L,F=U==="stateful"?"": ` -- corp $ { I . id } ` ,T="",P="";if(Y!=="ok")P= ` 凭证鉴权异常 : $ { J } ` ,T= ` seal - use auth diagnose$ { F } ` ;else if(G.length===0)P="当前企业尚未配置任何 Webhook 集成通道",T= ` seal - use webhook add -- name "默认入站通道" -- result - url "https://your-domain.com/callback" $ { F } ` ;else if(X&&!X.valid)P= ` 材料包预检失败 : $ { X . errors ? . join ( "; " ) } ` ,T= ` seal - use webhook material - pack preview $ { X . filePath } $ { F } ` ;else{P=H?"所有通道正常,已自动锁定唯一 Webhook 通道,等待载入": ` 所有通道正常 , 检测到 $ { G . length } 个 Webhook 通道 , 等待载入 ` ;let M=X?.filePath??"<材料包.zip>",v=H?"": ` -- webhook $ { W ? W . id : "<webhookIdOrName>" } ` ;T= ` seal - use webhook material - pack push $ { M } $ { v } $ { F } ` }return{ready:D,corp:{id:I.id,name:I.name,sourceType:I.source.type,tenant:Q,user:w},stateMode:U,authStatus:Y,authError:J,activeWebhooks:G,defaultWebhook:W,materialPack:X,statusMessage:P,nextAction:T}}var BZ0=x7(KD(),1);import{existsSync as PZ0,mkdirSync as TZ0,statSync as uH1}from"node:fs";import{homedir as xH1}from"node:os";import{dirname as kH1,resolve as dD}from"node:path";function EZ0( $ ){if( $ .outputFile){let J=dD( $ .outputFile),Q=kH1(J);if(!PZ0(Q))TZ0(Q,{recursive:!0});return J}let z=( $ .corpName|| $ .corpId||"企业").replace(/[/ \\ ?%*:|"<>]/g,"_").trim()||"企业",q= $ .dateTag||new Date().toISOString().slice(0,10),U= ` $ { z } _智能洞察报告 _$ { q } . xlsx ` ,Y;if( $ .toDownloads)Y=dD(xH1(),"Downloads");else Y=dD(process.cwd(),"exports");if(!PZ0(Y))TZ0(Y,{recursive:!0});return dD(Y,U)}async function mD( $ ,I,z={}){let q=I.name||I.id,U=EZ0({outputFile:z.outputFile,toDownloads:z.toDownloads,corpName:q,corpId:I.id}),Y=new Date().toISOString(),[J,Q]=await Promise.all([DW( $ ,{startDate:z.startDate?String(z.startDate):void 0,endDate:z.endDate?String(z.endDate):void 0,limit:z.limit??100}),OW( $ ,{startDate:z.startDate,endDate:z.endDate}).catch(()=>({metrics:{},sankeyData:{nodes:[],links:[]}}))]),w=J.tagStats||[],K=[],H=Math.min(w.length,z.limit??50);for(let B=0;B<H;B++){let n=w[B];if(!n?.tagId)continue;try{let f=await FW( $ ,{tagId:n.tagId,startDate:z.startDate?String(z.startDate):void 0,endDate:z.endDate?String(z.endDate):void 0});for(let g of f.risks||[])K.push({tagId:n.tagId,tagName:n.tagName||n.tagId,documentSN:g.documentSN||"-",documentType:g.documentType||"-",riskLevel:g.riskLevel||"warning",confidence:g.confidence??0,riskDetails:g.riskDetails||"-",reasoning:g.reasoning||"-",sourceDocumentURL:g.sourceDocumentURL,createdAt:g.createdAt})}catch{}}let G=new BZ0.default.Workbook;G.creator="seal-use",G.lastModifiedBy="seal-use",G.created=new Date,G.modified=new Date;let W={type:"pattern",pattern:"solid",fgColor:{argb:"FF1E293B"}},Z={name:"Microsoft YaHei",size:11,bold:!0,color:{argb:"FFFFFFFF"}},X={top:{style:"thin",color:{argb:"FFE2E8F0"}},bottom:{style:"thin",color:{argb:"FFE2E8F0"}},left:{style:"thin",color:{argb:"FFE2E8F0"}},right:{style:"thin",color:{argb:"FFE2E8F0"}}},L=G.addWorksheet("审核效能与决策流向",{views:[{showGridLines:!0}]});L.columns=[{header:"分类",key:"category",width:20},{header:"指标名称",key:"name",width:28},{header:"数值",key:"val",width:22},{header:"环比/趋势",key:"trend",width:18},{header:"说明",key:"desc",width:36}],L.getRow(1).height=28,L.getRow(1).font=Z,L.getRow(1).fill=W,L.getRow(1).alignment={vertical:"middle",horizontal:"center"};let D=Q.metrics||{},F=[{category:"基本信息",name:"
Line truncated
` + ` • 身份主体 : $ { F } $ { T }
` );let W=sy (w.document,K,H),Z=await fetch( ` $ { U } / api / v1 / integrations / webhook / $ { encodeURIComponent ( Y ) } / document ` ,{method:"POST",headers:{"Content-Type":"application/json",...A w({webhookId:Y,...W},z.secret)},body:JSON.stringify(W)});if(!Z.ok)throw Error( ` Webhook 单据推送失败 $ { Z . status } : $ { await Z . text ( ) } ` );J.push({documentId:W.documentId,document:W,pushResult:await Z.json()}),process.stderr.write( ` ✓ 单据推送成功 : $ { W . documentId }
` )}return{warnings:[],results:J}}function MI( $ ){return{fileBuffer:rH1( $ ),fileName: $ .split(/[ \\ \/ ]/).pop()??"material-pack.zip"}}import{existsSync as eH1}from"node:fs";async function oD( $ ,I,z={}){let U=Y4().stateful?"stateful":"stateless",Y="ok",J,Q,w;try{let M=await X $ ( $ );w={id:M.user.id,name:M.user.name,isAdmin:M.user.isAdmin},Q={id:M.tenant.id,name:M.tenant.name,tenantSlug:M.tenant.tenantSlug,corporationName:M.tenant.hoseCorpConfig?.corporationName}}catch(M){Y="error",J=M instanceof Error?M.message:String(M)}let K=[];if(Y==="ok")try{K=await Q8( $ ,I.seal.endpoints.approvalStylePreferences)}catch(M){Y="error",J= ` 读取 Webhook 配置失败 : $ { M instanceof Error ? M . message : String ( M ) } ` }let H=K.length===1,G=K.map((M)=>({id:M.id,name:M.name,mode:M.mode,incomingDocumentWebhookUrl:M.incomingDocumentWebhook.url,outgoingResultWebhookUrl:M.outgoingResultWebhook,autoApprovalRate:M.autoApprovalRate,...H?{isDefault:!0}:{}})),W=H?{id:K[0].id,name:K[0].name,mode:K[0].mode}:null,Z=z.webhook?C9(K,z.webhook):H?K[0]:void 0,X;if(z.filePath)if(!eH1(z.filePath))X={valid:!1,filePath:z.filePath,fileName:z.filePath.split(/[ \\ /]/).pop()??z.filePath,documentCount:0,errors:[ ` 文件不存在 : $ { z . filePath } ` ]};else try{let M=MI(z.filePath),v=await NI(M.fileBuffer,M.fileName,Z?.materialPackFilePolicy);X={valid:!0,filePath:z.filePath,fileName:M.fileName,documentCount:v.documents.length,warnings:v.warnings}}catch(M){X={valid:!1,filePath:z.filePath,fileName:z.filePath.split(/[ \\ /]/).pop()??z.filePath,documentCount:0,errors:[M instanceof Error?M.message:String(M)]}}let L=X?X.valid:!0,D=Y==="ok"&&G.length>0&&L,O=U==="stateful"?"": ` -- corp $ { I . id } ` ,T="",P="";if(Y!=="ok")P= ` 凭证鉴权异常 : $ { J } ` ,T= ` seal - use auth diagnose$ { O } ` ;else if(G.length===0)P="当前企业尚未配置任何 Webhook 集成通道",T= ` seal - use webhook add -- name "默认入站通道" -- result - url "https://your-domain.com/callback" $ { O } ` ;else if(X&&!X.valid)P= ` 材料包预检失败 : $ { X . errors ? . join ( "; " ) } ` ,T= ` seal - use webhook material - pack preview $ { X . filePath } $ { O } ` ;else{P=H?"所有通道正常,已自动锁定唯一 Webhook 通道,等待载入": ` 所有通道正常 , 检测到 $ { G . length } 个 Webhook 通道 , 等待载入 ` ;let M=X?.filePath??"<材料包.zip>",v=H?"": ` -- webhook $ { W ? W . id : "<webhookIdOrName>" } ` ;T= ` seal - use webhook material - pack push $ { M } $ { v } $ { O } ` }return{ready:D,corp:{id:I.id,name:I.name,sourceType:I.source.type,tenant:Q,user:w},stateMode:U,authStatus:Y,authError:J,activeWebhooks:G,defaultWebhook:W,materialPack:X,statusMessage:P,nextAction:T}}var uZ0=f7(WD(),1);import{existsSync as _Z0,mkdirSync as CZ0,statSync as $ G1}from"node:fs";import{homedir as IG1}from"node:os";import{dirname as zG1,resolve as rD}from"node:path";function hZ0( $ ){if( $ .outputFile){let J=rD( $ .outputFile),Q=zG1(J);if(!_Z0(Q))CZ0(Q,{recursive:!0});return J}let z=( $ .corpName|| $ .corpId||"企业").replace(/[/ \\ ?%*:|"<>]/g,"_").trim()||"企业",q= $ .dateTag||new Date().toISOString().slice(0,10),U= ` $ { z } _智能洞察报告 _$ { q } . xlsx ` ,Y;if( $ .toDownloads)Y=rD(IG1(),"Downloads");else Y=rD(process.cwd(),"exports");if(!_Z0(Y))CZ0(Y,{recursive:!0});return rD(Y,U)}async function tD( $ ,I,z={}){let q=I.name||I.id,U=hZ0({outputFile:z.outputFile,toDownloads:z.toDownloads,corpName:q,corpId:I.id}),Y=new Date().toISOString(),[J,Q]=await Promise.all([NW( $ ,{startDate:z.startDate?String(z.startDate):void 0,endDate:z.endDate?String(z.endDate):void 0,limit:z.limit??100}),AW( $ ,{startDate:z.startDate,endDate:z.endDate}).catch(()=>({metrics:{},sankeyData:{nodes:[],links:[]}}))]),w=J.tagStats||[],K=[],H=Math.min(w.length,z.limit??50);for(let B=0;B<H;B++){let n=w[B];if(!n?.tagId)continue;try{let f=await MW( $ ,{tagId:n.tagId,startDate:z.startDate?String(z.startDate):void 0,endDate:z.endDate?String(z.endDate):void 0});for(let R of f.risks||[])K.push({tagId:n.tagId,tagName:n.tagName||n.tagId,documentSN:R.documentSN||"-",documentType:R.documentType||"-",riskLevel:R.riskLevel||"warning",confidence:R.confidence??0,riskDetails:R.riskDetails||"-",reasoning:R.reasoning||"-",sourceDocumentURL:R.sourceDocumentURL,createdAt:R.createdAt})}catch{}}let G=new uZ0.default.Workbook;G.creator="seal-use",G.lastModifiedBy="seal-use",G.created=new Date,G.modified=new Date;let W={type:"pattern",pattern:"solid",fgColor:{argb:"FF1E293B"}},Z={name:"Microsoft YaHei",size:11,bold:!0,color:{argb:"FFFFFFFF"}},X={top:{style:"thin",color:{argb:"FFE2E8F0"}},bottom:{style:"thin",color:{argb:"FFE2E8F0"}},left:{style:"thin",color:{argb:"FFE2E8F0"}},right:{style:"thin",color:{argb:"FFE2E8F0"}}},L=G.addWorksheet("审核效能与决策流向",{views:[{showGridLines:!0}]});L.columns=[{header:"分类",key:"category",width:20},{header:"指标名称",key:"name",width:28},{header:"数值",key:"val",width:22},{header:"环比/趋势",key:"trend",width:18},{header:"说明",key:"desc",width:36}],L.getRow(1).height=28,L.getRow(1).font=Z,L.getRow(1).fill=W,L.getRow(1).alignment={vertical:"middle",horizontal:"center"};let D=Q.metrics||{},O=[{category:"基本信息",name:"
Line truncated
` + ` • 身份主体 : $ { O } $ { T }
` + ` • 权限范围 : 持有该链接者在 Seal AI 中拥有该用户的完整操作权限 ( 含系统设置与规则编辑 )
` + ` • 时效性 : 换票凭证有效时间 $ { Z } 秒 ( $ { Math . round ( Z / 60 ) } 分钟 ) , 在浏览器打开后将保留 30 天会话
` +"• 安全边界:该凭证绝不包含且无法访问合思 (Hose) 主系统;仅限内部排查,严禁在外部公开分享!")}return{url:I.sso?H:K,sealResultUrl:K,ssoUrl:H,type:I.sso?"sso_link":"deep_link",expiresIn:I.sso?Z:void 0,identity:G,warning:W,enterpriseAssistUrl:J,enterpriseUrl:J,hoseDomain:Y.type==="hose"?wG1(Y.domain):void 0,documentUrl:Q,recordId:U?.id,sourceDocumentSN:U?.sourceDocumentSN,sourceDocumentId:U?.sourceDocumentId,sourceSystem:U?.sourceSystem,missing:{enterpriseAssistUrl:J?void 0:"Current enterprise source is not Hose, so no Hose enterprise assist URL is configured.",documentUrl:q&&!Q?"sourceExtendData.hosecloudViewUrl is absent from the approval run detail.":void 0}}}},{name:"seal_approval_run_pick",description:"按合思单号或关键字查询运行记录,返回候选记录及其当时使用的规则版本,便于再取详情或查版本规则",parameters:V.object({query:V.string().optional().describe("合思单号、源单据 ID、运行记录 ID 或 trace 关键字"),sn:V.string().optional().describe("合思/易快报单号;优先作为精确 sourceDocumentSN 查询"),batchId:V.string().optional().describe("模拟批次 ID"),latest:V.boolean().optional().describe("只返回最新一条匹配记录"),fields:V.union([V.string(),V.array(V.string())]).optional().describe("限制返回字段"),limit:V.number().int().positive().max(100).optional(),maxScan:V.number().int().positive().max(5000).optional().describe("最多扫描多少条运行记录用于本地匹配,默认 1000"),includeBridge:V.boolean().optional()}),handler:async( $ ,I)=>{let z=I.sn??I.query;if(!z)throw Error("query or sn is required");let q=await KG1( $ ,{query:z,sn:I.sn,batchId:I.batchId,latest:I.latest,limit:I.latest?1:I.limit??20,maxScan:I.maxScan??1000}),U=await Promise.all(q.records.map((Q)=>P4( $ ,Q.id))),Y=vZ0(I.fields),J=U.map((Q)=>YG1(Q,Y));return{query:z,sourceDocumentSN:I.sn,simulationBatchId:I.batchId,latest:I.latest??!1,total:q.total,scanned:q.scanned,matched:J.length,records:J,next:{getSummary:"seal-home approval-runs get <recordId> --summary",getRuleVersion:"seal-home rules version <ruleSetVersionNumber>",searchRuleVersion: ` seal - home tool seal _approval _search -- json '{"keywords":["关键词"],"areas":["rules"],"ruleVersionScope":"version","ruleVersionNumber":14}' ` ,getVersionContext: ` seal - home tool seal _approval _context _get -- json '{"ruleVersionNumber":14}' ` },...I.includeBridge?{bridge:rD(U)}:{}}}},{name:"seal_simulation_batch_records_get",description:"获取某一次 Seal 模拟批次的运行记录,并整理对应 Langfuse trace/session 桥接字段",parameters:V.object({batchId:V.string().describe("simulation batch ID"),query:V.string().optional().describe("在 id、sourceDocumentSN、sourceDocumentId、documentId、Langfuse traceId 中做本地包含匹配")}),handler:async( $ ,I)=>{let z=Ux(await BB( $ ,I.batchId),I.query);return{batchId:I.batchId,count:z.length,records:z.map(NI),bridge:rD(z)}}},{name:"seal_simulation_batch_create",description:"创建 Seal 模拟测试批次。支持合思指定单号(hosecloud)与材料包导入(material_pack)两种模式;其他取数模式通过 rawParams 预留透传。",parameters:V.object({mode:V.enum(["hosecloud","material_pack"]).default("hosecloud").describe("来源模式: hosecloud=合思指定单号; material_pack=材料包导入"),flowIds:V.array(V.string()).max(100).optional().describe("合思模式: 单据流水号列表"),rejectNodeName:V.string().nullable().optional().describe("仅关注特定节点: 节点名称, 不设为 null 表示不限制"),thinkingDepthOverride:V.enum(["default","medium","high"]).optional().describe("思考深度: default=按偏好设置, medium=标准, high=深度推理"),skipInvoiceGeneration:V.boolean().optional().describe("跳过发票生成, 默认 true"),skipExpenseExtraction:V.boolean().optional().describe("跳过费用提取, 默认 true"),disableAttachmentCache:V.boolean().optional().describe("不使用附件缓存, 默认 false"),signKey:V.string().optional().describe("合思集成标识; 缺省时自动取第一个合思集成"),packageIds:V.array(V.string()).optional().describe("材料包模式: 材料包 id 列表(来自 material-packages upload 响应)"),templateId:V.string().optional().describe("材料包模板 id, 例如 conference_reimbursement_v1; 缺省取 schemaConfig.id"),schemaConfig:V.record(V.string(),V.unknown()).optional().describe("材料包字段映射(确认参数), 建议使用 material-packages upload 返回的 schemaConfig"),noWait:V.boolean().optional().describe("创建后立即返回异步票据,不等待批次完成"),rawParams:V.record(V.string(),V.unknown()).optional().describe("预留: 其他取数模式(如时间范围 startTime/endTime)透传参数, 覆盖上述构建结果")}),handler:async( $ ,I)=>{let z=I.mode??"hosecloud",q=I.signKey;if(z==="hosecloud"&&!q){if(q=(await vB( $ )).find((Q)=>Q.signKey)?.signKey,!q)throw Error("未找到合思集成 signKey, 请通过 signKey
Line truncated
` );return{recordId: $ .id,sourceDocumentSN: $ .sourceDocumentSN,sourceDocumentId: $ .sourceDocumentId,document:nU({id:I?.id,sn:I?.sn??I?.sourceDocumentSN?? $ .sourceDocumentSN,title:I?.title??I?.name,template:sD(I,["template.name","templateName","form.name","formName","formTitle"]),amount:oD(z,["金额","报销金额","付款金额","合计","价税合计"])??sD(I,["amount","totalAmount","expenseAmount"]),expenseType:oD(z,["费用类型","费用类别","报销类型"]),costCompany:oD(z,["费用承担公司","承担公司","成本中心","费用归属"]),payee:oD(z,["收款方","收款账户","收款信息","开户名","银行账号"]),keyFields:z.slice(0,30)}),invoices:IG1( $ ),attachments:vU( $ ,{summary:!0}).attachments,aiResult: $ F( $ ),manualResult:MI( $ )?.value,hints:nU({amountMentions:gZ0(q,["金额","合计","税率"],8),partyMentions:gZ0(q,["买方","卖方","甲方","乙方","收款"],8)})}}function aH1( $ ){let I=[["result.citedRules", $ 9( $ ,"result.citedRules")],["result.matchedRules", $ 9( $ ,"result.matchedRules")],["result.ruleResults", $ 9( $ ,"result.ruleResults")],["result.rules", $ 9( $ ,"result.rules")],["pipelineData.citedRules", $ 9( $ ,"pipelineData.citedRules")],["pipelineData.matchedRules", $ 9( $ ,"pipelineData.matchedRules")]],z=[],q=new Set;for(let[U,Y]of I)(Array.isArray(Y)?Y:Y&&typeof Y==="object"?Object.values(Y):[]).forEach((Q,w)=>{let K=gw(Q);if(!K)return;let H=J4(K.runtimeRuleId)??J4(K.runtimeId)??J4(K.id)??J4(K.ruleId),G=J4(K.ruleCode)??J4(K.code)??(H?UG1(H):void 0),W=nU({runtimeRuleId:H,ruleCode:G,versionNumber:eH1(K.versionNumber)?? $ .ruleSetVersionNumber,scope:J4(K.scope),strictness:J4(K.strictness),appliedAnalysis:K.appliedAnalysis??K.analysis??K.reasoning,checkResult:K.checkResult??K.result??K.decision,findings:K.findings??K.riskPoints??K.evidence,sourcePath: ` $ { U } . $ { w } ` }),Z=JSON.stringify(W);if(!q.has(Z))q.add(Z),z.push(W)});return{recordId: $ .id,sourceDocumentSN: $ .sourceDocumentSN,sourceDocumentId: $ .sourceDocumentId,ruleSetVersionNumber: $ .ruleSetVersionNumber,count:z.length,rules:z}}function sD( $ ,I){if(! $ )return;for(let z of I){let q= $ 9( $ ,z);if(q!==void 0)return q}return}function RZ0( $ ,I){if(! $ )return 0;for(let z of I){let q= $ 9( $ ,z);if(Array.isArray(q))return q.length;if(q&&typeof q==="object")return Object.keys(q).length;if(typeof q==="number")return q}return 0}function $ 9( $ ,I){return I.split(".").reduce((z,q)=>{if(z===void 0||z===null)return;if(Array.isArray(z)){let U=Number(q);return Number.isInteger(U)?z[U]:void 0}if(typeof z==="object")return z[q];return}, $ )}function sH1( $ ,I,z){let q=I.split("."),U= $ ;for(let Y of q.slice(0,-1)){let J=U[Y];if(!J||typeof J!=="object"||Array.isArray(J))U[Y]={};U=U[Y]}U[q[q.length-1]??I]=z}function nU( $ ){return Object.fromEntries(Object.entries( $ ).filter(([,I])=>I!==void 0))}function gw( $ ){return $ &&typeof $ ==="object"&&!Array.isArray( $ )? $ :void 0}function eH1( $ ){return typeof $ ==="number"&&Number.isFinite( $ )? $ :void 0}function $ G1( $ ){let I=[];return su( $ ,"document",I),I}function su( $ ,I,z){if(Array.isArray( $ )){ $ .forEach((J,Q)=>su(J, ` $ { I } . $ { Q } ` ,z));return}let q=gw( $ );if(!q)return;let U=J4(q.label)??J4(q.name)??J4(q.title)??J4(q.fieldName),Y=q.value??q.displayValue??q.text??q.content;if(U&&Y!==void 0&&typeof Y!=="object")z.push(nU({path:I,label:U,value:Y,type:J4(q.type)??J4(q.fieldType)}));for(let[J,Q]of Object.entries(q)){if(J==="attachments")continue;su(Q, ` $ { I } . $ { J } ` ,z)}}function oD( $ ,I){return $ .find((q)=>{let U=J4(q.label)??"";return I.some((Y)=>U.includes(Y))})?.value}function IG1( $ ){let I=[];return eD( $ .result,"result",I),eD( $ .document,"document",I),I.slice(0,20)}function eD( $ ,I,z){if(Array.isArray( $ )){ $ .forEach((U,Y)=>eD(U, ` $ { I } . $ { Y } ` ,z));return}let q=gw( $ );if(!q)return;if(/invoice|发票/i.test(I))z.push(nU({path:I,fileName:J4(q.fileName)??J4(q.filename)??J4(q.name),buyer:q.buyer??q.buyerName??q.purchaserName,seller:q.seller??q.sellerName,amount:q.amount??q.totalAmount??q.total,taxRate:q.taxRate,category:q.category??q.type}));for(let[U,Y]of Object.entries(q))eD(Y, ` $ { I } . $ { U } ` ,z)}function gZ0( $ ,I,z){return $ .split(/ \r ? \n /).filter((q)=>I.some((U)=>q.includes(U))).slice(0,z)}function rD( $ ){return $ .map((I)=>{let z=NI(I);return{recordId:z.id,tenantId:z.tenantId,agentId:z.agentId,sourceDocumentSN:z.sourceDocumentSN,sourceDocumentId:z.sourceDocumentId,simulationBatchId:z.simulationBatchId,langfuseTraceId:z.langfuseTraceId,langfuseSessionFallback:z.langfuseSessionFallback,ruleSetVersionNumber:z.ruleSetVersionNumber,ruleSetPublishedAt:z.ruleSetPublishedAt,ruleSetPublishedByName:z.ruleSetPublishedByName,resolution:z.langfuseTraceId?"trace":z.langfuseSessionFallback?"session-fallback":"unresolved"}})}function tu( $ ){return{id: $ .id,tenantId: $ .tenantId,versionNumber: $ .versionNumber,versionName: $ .versionName,publishedBy: $ .publishedBy,publishedByName: $ .publishedByName,rulesCount: $ .rules.length,publishedAt: $ .publishedAt,createdAt: $ .createdAt}}async function zG1( $ ,I){if(I.recordId&&!I.versionId&&!I.versionNumber&&!I.latest){let z=await P4( $ ,I.recordId);if(!z.ruleSetVersionNumber)throw Er
Line truncated
` )}function D G1( $ ){let I=[];if(I.push( ` seal - use $ { $ . area } - $ { $ . title } ` ), $ .description)I.push( $ .description);I.push(""),I.push("Usage:");for(let z of $ .commands)for(let q of z.usage)I.push( ` $ { q } ` );if( $ .commands.some((z)=>z.name))I.push(""),I.push( ` Run 'seal-use ${$.area} <command> --help' for details on a specific command . ` );return I.join( `
` )}function sZ 0(){let $ =[]; $ .push("seal-use CLI"), $ .push(""), $ .push("Usage:"), $ .push(" seal-use version");for(let I of eZ 0)for(let z of I.commands)for(let q of z.usage) $ .push( ` $ { q } ` );return $ .push(""), $ .push("Run 'seal-use <command> --help' for details on a specific command."), $ .join( `
` )}var O G1=100,N G1=120000,z X0=["id","code","status","strictness","scope","createdAt","updatedAt"],M G1=200000;function K x( $ ){return $ .map((I)=>typeof I==="string"?I:String(I)).join(" ")}function h w( $ ){if(! $ .length)return"";return ` $ { $ . join ( `
` +"• 安全边界:该凭证绝不包含且无法访问合思 (Hose) 主系统;仅限内部排查,严禁在外部公开分享!")}return{url:I.sso?H:K,sealResultUrl:K,ssoUrl:H,type:I.sso?"sso_link":"deep_link",expiresIn:I.sso?Z:void 0,identity:G,warning:W,enterpriseAssistUrl:J,enterpriseUrl:J,hoseDomain:Y.type==="hose"?BG1(Y.domain):void 0,documentUrl:Q,recordId:U?.id,sourceDocumentSN:U?.sourceDocumentSN,sourceDocumentId:U?.sourceDocumentId,sourceSystem:U?.sourceSystem,missing:{enterpriseAssistUrl:J?void 0:"Current enterprise source is not Hose, so no Hose enterprise assist URL is configured.",documentUrl:q&&!Q?"sourceExtendData.hosecloudViewUrl is absent from the approval run detail.":void 0}}}},{name:"seal_approval_run_pick",description:"按合思单号或关键字查询运行记录,返回候选记录及其当时使用的规则版本,便于再取详情或查版本规则",parameters:V.object({query:V.string().optional().describe("合思单号、源单据 ID、运行记录 ID 或 trace 关键字"),sn:V.string().optional().describe("合思/易快报单号;优先作为精确 sourceDocumentSN 查询"),batchId:V.string().optional().describe("模拟批次 ID"),latest:V.boolean().optional().describe("只返回最新一条匹配记录"),fields:V.union([V.string(),V.array(V.string())]).optional().describe("限制返回字段"),limit:V.number().int().positive().max(100).optional(),maxScan:V.number().int().positive().max(5000).optional().describe("最多扫描多少条运行记录用于本地匹配,默认 1000"),includeBridge:V.boolean().optional()}),handler:async( $ ,I)=>{let z=I.sn??I.query;if(!z)throw Error("query or sn is required");let q=await jG1( $ ,{query:z,sn:I.sn,batchId:I.batchId,latest:I.latest,limit:I.latest?1:I.limit??20,maxScan:I.maxScan??1000}),U=await Promise.all(q.records.map((Q)=>P4( $ ,Q.id))),Y=yZ0(I.fields),J=U.map((Q)=>PG1(Q,Y));return{query:z,sourceDocumentSN:I.sn,simulationBatchId:I.batchId,latest:I.latest??!1,total:q.total,scanned:q.scanned,matched:J.length,records:J,next:{getSummary:"seal-home approval-runs get <recordId> --summary",getRuleVersion:"seal-home rules version <ruleSetVersionNumber>",searchRuleVersion: ` seal - home tool seal _approval _search -- json '{"keywords":["关键词"],"areas":["rules"],"ruleVersionScope":"version","ruleVersionNumber":14}' ` ,getVersionContext: ` seal - home tool seal _approval _context _get -- json '{"ruleVersionNumber":14}' ` },...I.includeBridge?{bridge:eD(U)}:{}}}},{name:"seal_simulation_batch_records_get",description:"获取某一次 Seal 模拟批次的运行记录,并整理对应 Langfuse trace/session 桥接字段",parameters:V.object({batchId:V.string().describe("simulation batch ID"),query:V.string().optional().describe("在 id、sourceDocumentSN、sourceDocumentId、documentId、Langfuse traceId 中做本地包含匹配")}),handler:async( $ ,I)=>{let z=Qx(await _B( $ ,I.batchId),I.query);return{batchId:I.batchId,count:z.length,records:z.map(AI),bridge:eD(z)}}},{name:"seal_simulation_batch_create",description:"创建 Seal 模拟测试批次。支持合思指定单号(hosecloud)与材料包导入(material_pack)两种模式;其他取数模式通过 rawParams 预留透传。",parameters:V.object({mode:V.enum(["hosecloud","material_pack"]).default("hosecloud").describe("来源模式: hosecloud=合思指定单号; material_pack=材料包导入"),flowIds:V.array(V.string()).max(100).optional().describe("合思模式: 单据流水号列表"),rejectNodeName:V.string().nullable().optional().describe("仅关注特定节点: 节点名称, 不设为 null 表示不限制"),thinkingDepthOverride:V.enum(["default","medium","high"]).optional().describe("思考深度: default=按偏好设置, medium=标准, high=深度推理"),skipInvoiceGeneration:V.boolean().optional().describe("跳过发票生成, 默认 true"),skipExpenseExtraction:V.boolean().optional().describe("跳过费用提取, 默认 true"),disableAttachmentCache:V.boolean().optional().describe("不使用附件缓存, 默认 false"),signKey:V.string().optional().describe("合思集成标识; 缺省时自动取第一个合思集成"),packageIds:V.array(V.string()).optional().describe("材料包模式: 材料包 id 列表(来自 material-packages upload 响应)"),templateId:V.string().optional().describe("材料包模板 id, 例如 conference_reimbursement_v1; 缺省取 schemaConfig.id"),schemaConfig:V.record(V.string(),V.unknown()).optional().describe("材料包字段映射(确认参数), 建议使用 material-packages upload 返回的 schemaConfig"),noWait:V.boolean().optional().describe("创建后立即返回异步票据,不等待批次完成"),rawParams:V.record(V.string(),V.unknown()).optional().describe("预留: 其他取数模式(如时间范围 startTime/endTime)透传参数, 覆盖上述构建结果")}),handler:async( $ ,I)=>{let z=I.mode??"hosecloud",q=I.signKey;if(z==="hosecloud"&&!q){if(q=(await hB( $ )).find((Q)=>Q.signKey)?.signKey,!q)throw Error("未找到合思集成 signKey, 请通过 signKey
Line truncated
` );return{recordId: $ .id,sourceDocumentSN: $ .sourceDocumentSN,sourceDocumentId: $ .sourceDocumentId,document:pU({id:I?.id,sn:I?.sn??I?.sourceDocumentSN?? $ .sourceDocumentSN,title:I?.title??I?.name,template:zO(I,["template.name","templateName","form.name","formName","formTitle"]),amount:sD(z,["金额","报销金额","付款金额","合计","价税合计"])??zO(I,["amount","totalAmount","expenseAmount"]),expenseType:sD(z,["费用类型","费用类别","报销类型"]),costCompany:sD(z,["费用承担公司","承担公司","成本中心","费用归属"]),payee:sD(z,["收款方","收款账户","收款信息","开户名","银行账号"]),keyFields:z.slice(0,30)}),invoices:FG1( $ ),attachments:RU( $ ,{summary:!0}).attachments,aiResult:UO( $ ),manualResult:PI( $ )?.value,hints:pU({amountMentions:kZ0(q,["金额","合计","税率"],8),partyMentions:kZ0(q,["买方","卖方","甲方","乙方","收款"],8)})}}function XG1( $ ){let I=[["result.citedRules",q9( $ ,"result.citedRules")],["result.matchedRules",q9( $ ,"result.matchedRules")],["result.ruleResults",q9( $ ,"result.ruleResults")],["result.rules",q9( $ ,"result.rules")],["pipelineData.citedRules",q9( $ ,"pipelineData.citedRules")],["pipelineData.matchedRules",q9( $ ,"pipelineData.matchedRules")]],z=[],q=new Set;for(let[U,Y]of I)(Array.isArray(Y)?Y:Y&&typeof Y==="object"?Object.values(Y):[]).forEach((Q,w)=>{let K=hw(Q);if(!K)return;let H=J4(K.runtimeRuleId)??J4(K.runtimeId)??J4(K.id)??J4(K.ruleId),G=J4(K.ruleCode)??J4(K.code)??(H?AG1(H):void 0),W=pU({runtimeRuleId:H,ruleCode:G,versionNumber:DG1(K.versionNumber)?? $ .ruleSetVersionNumber,scope:J4(K.scope),strictness:J4(K.strictness),appliedAnalysis:K.appliedAnalysis??K.analysis??K.reasoning,checkResult:K.checkResult??K.result??K.decision,findings:K.findings??K.riskPoints??K.evidence,sourcePath: ` $ { U } . $ { w } ` }),Z=JSON.stringify(W);if(!q.has(Z))q.add(Z),z.push(W)});return{recordId: $ .id,sourceDocumentSN: $ .sourceDocumentSN,sourceDocumentId: $ .sourceDocumentId,ruleSetVersionNumber: $ .ruleSetVersionNumber,count:z.length,rules:z}}function zO( $ ,I){if(! $ )return;for(let z of I){let q=q9( $ ,z);if(q!==void 0)return q}return}function xZ0( $ ,I){if(! $ )return 0;for(let z of I){let q=q9( $ ,z);if(Array.isArray(q))return q.length;if(q&&typeof q==="object")return Object.keys(q).length;if(typeof q==="number")return q}return 0}function q9( $ ,I){return I.split(".").reduce((z,q)=>{if(z===void 0||z===null)return;if(Array.isArray(z)){let U=Number(q);return Number.isInteger(U)?z[U]:void 0}if(typeof z==="object")return z[q];return}, $ )}function LG1( $ ,I,z){let q=I.split("."),U= $ ;for(let Y of q.slice(0,-1)){let J=U[Y];if(!J||typeof J!=="object"||Array.isArray(J))U[Y]={};U=U[Y]}U[q[q.length-1]??I]=z}function pU( $ ){return Object.fromEntries(Object.entries( $ ).filter(([,I])=>I!==void 0))}function hw( $ ){return $ &&typeof $ ==="object"&&!Array.isArray( $ )? $ :void 0}function DG1( $ ){return typeof $ ==="number"&&Number.isFinite( $ )? $ :void 0}function OG1( $ ){let I=[];return Ix( $ ,"document",I),I}function Ix( $ ,I,z){if(Array.isArray( $ )){ $ .forEach((J,Q)=>Ix(J, ` $ { I } . $ { Q } ` ,z));return}let q=hw( $ );if(!q)return;let U=J4(q.label)??J4(q.name)??J4(q.title)??J4(q.fieldName),Y=q.value??q.displayValue??q.text??q.content;if(U&&Y!==void 0&&typeof Y!=="object")z.push(pU({path:I,label:U,value:Y,type:J4(q.type)??J4(q.fieldType)}));for(let[J,Q]of Object.entries(q)){if(J==="attachments")continue;Ix(Q, ` $ { I } . $ { J } ` ,z)}}function sD( $ ,I){return $ .find((q)=>{let U=J4(q.label)??"";return I.some((Y)=>U.includes(Y))})?.value}function FG1( $ ){let I=[];return qO( $ .result,"result",I),qO( $ .document,"document",I),I.slice(0,20)}function qO( $ ,I,z){if(Array.isArray( $ )){ $ .forEach((U,Y)=>qO(U, ` $ { I } . $ { Y } ` ,z));return}let q=hw( $ );if(!q)return;if(/invoice|发票/i.test(I))z.push(pU({path:I,fileName:J4(q.fileName)??J4(q.filename)??J4(q.name),buyer:q.buyer??q.buyerName??q.purchaserName,seller:q.seller??q.sellerName,amount:q.amount??q.totalAmount??q.total,taxRate:q.taxRate,category:q.category??q.type}));for(let[U,Y]of Object.entries(q))qO(Y, ` $ { I } . $ { U } ` ,z)}function kZ0( $ ,I,z){return $ .split(/ \r ? \n /).filter((q)=>I.some((U)=>q.includes(U))).slice(0,z)}function eD( $ ){return $ .map((I)=>{let z=AI(I);return{recordId:z.id,tenantId:z.tenantId,agentId:z.agentId,sourceDocumentSN:z.sourceDocumentSN,sourceDocumentId:z.sourceDocumentId,simulationBatchId:z.simulationBatchId,langfuseTraceId:z.langfuseTraceId,langfuseSessionFallback:z.langfuseSessionFallback,ruleSetVersionNumber:z.ruleSetVersionNumber,ruleSetPublishedAt:z.ruleSetPublishedAt,ruleSetPublishedByName:z.ruleSetPublishedByName,resolution:z.langfuseTraceId?"trace":z.langfuseSessionFallback?"session-fallback":"unresolved"}})}function ey( $ ){return{id: $ .id,tenantId: $ .tenantId,versionNumber: $ .versionNumber,versionName: $ .versionName,publishedBy: $ .publishedBy,publishedByName: $ .publishedByName,rulesCount: $ .rules.length,publishedAt: $ .publishedAt,createdAt: $ .createdAt}}async function NG1( $ ,I){if(I.recordId&&!I.versionId&&!I.versionNumber&&!I.latest){let z=await P4( $ ,I.recordId);if(!z.ruleSetVersionNumber)throw Er
Line truncated
` )}function S G1( $ ){let I=[];if(I.push( ` seal - use $ { $ . area } - $ { $ . title } ` ), $ .description)I.push( $ .description);I.push(""),I.push("Usage:");for(let z of $ .commands)for(let q of z.usage)I.push( ` $ { q } ` );if( $ .commands.some((z)=>z.name))I.push(""),I.push( ` Run 'seal-use ${$.area} <command> --help' for details on a specific command . ` );return I.join( `
` )}function JX 0(){let $ =[]; $ .push("seal-use CLI"), $ .push(""), $ .push("Usage:"), $ .push(" seal-use version");for(let I of QX 0)for(let z of I.commands)for(let q of z.usage) $ .push( ` $ { q } ` );return $ .push(""), $ .push("Run 'seal-use <command> --help' for details on a specific command."), $ .join( `
` )}var x G1=100,k G1=120000,H X0=["id","code","status","strictness","scope","createdAt","updatedAt"],f G1=200000;function W x( $ ){return $ .map((I)=>typeof I==="string"?I:String(I)).join(" ")}function y w( $ ){if(! $ .length)return"";return ` $ { $ . join ( `
` )}
` }function S w( $ ){return $ .replace(/([?&](?:accessToken|token|returnToken)=)[^& \s ]+/gi," $ 1<redacted>").replace(/(Bearer \s +)[A-Za-z0-9._~+/=-]+/gi," $ 1<redacted>")}function T0( $ ,I={}){A G1( $ ,I);let z= ` $ { JSON . stringify ( $ , null , 2 ) }
` ;if(I.outputFile){FG1(I.outputFile,z),console.log(JSON.stringify({outputFile:I.outputFile,bytes:Buffer.byteLength(z,"utf-8")},null,2));return}console.log(z.trimEnd())}function AG1( $ ,I={}){if(I.allowFull||I.outputFile)return;let z=Buffer.byteLength(JSON.stringify( $ ),"utf-8");if(z>MG1)throw new ND( ` Output is large ( $ { z } bytes ) . Use -- summary , -- fields , -- count , or -- output - file ; pass -- full only when you really need the full response . ` )}function qX0( $ ,I){if(I)return;let z= $ &&typeof $ ==="object"? $ :{},q=typeof z.count==="number"?z.count:void 0,U=Array.isArray(z.rules)?z.rules.length:void 0,Y=Buffer.byteLength(JSON.stringify( $ ),"utf-8"),J=q??U??0;if(J>OG1||Y>NG1)throw new ND( ` Rule list is large ( $ { J } rules , $ { Y } bytes ) . Use "seal-use rules list --summary" or "seal-use rules count" ; pass -- full only when you really need full descriptions . ` ,"seal-use rules list --summary")}function W0( $ ){return{allowFull:V0( $ .full)===!0,outputFile:j( $ .outputFile)??j( $ ["output-file"])}}function UX0( $ =[]){console.log(IX0( $ ))}function O1( $ ){let I=q $ (),z=Y4();return v7(I,{stateful:z.stateful,defaultCorpId:z.defaultCorpId,corpId: $ },r5())}function AI( $ =Y4()){return{mode: $ .stateful?"stateful":"stateless",stateful: $ .stateful,... $ .stateful&& $ .defaultCorpId?{defaultCorpId: $ .defaultCorpId}:{},... $ .testEnterprisesDir?{testEnterprisesDir: $ .testEnterprisesDir}:{},lint: $ .lint,configFile:VI()}}async function O0( $ ,I,z,q,U={}){T0(await PI( $ ,I,z,q),U)}async function PI( $ ,I,z,q){let U=Rw.find((Q)=>Q.name=== $ );if(!U)throw Error( ` Unknown Seal tool : $ { $ } ` );let Y=Object.fromEntries(Object.entries(q).filter(([,Q])=>Q!==void 0)),J=U.handler;return J(I,Y,{corp:z})}import{existsSync as YX0}from"node:fs";async function JX0( $ ,I){if(!YX0( $ ))throw Error( ` File not found : $ { $ } ` );let z=OI( $ );console.log(JSON.stringify(await FI(z.fileBuffer,z.fileName,I),null,2))}async function IF( $ ,I,z,q,U){if( $ ==="ready"|| $ ==="status"){let Y=I??j(U.options.file)??j(U.options.input),J=await cD(z,q,{filePath:Y,webhook:j(U.options.webhook)??j(U.options.selector)});if(console.error( ` [ webhook - ready ] 企业环境 : $ { J . corp . name } ( $ { J . corp . id } ) [ $ { J . stateMode } ] ` ),J.corp.tenant?.name)console.error( ` [ webhook - ready ] 租户信息 : $ { J . corp . tenant . name } ( $ { J . corp . tenant . id } ) ` );console.error( ` [ webhook - ready ] 凭证状态 : $ { J . authStatus === "ok" ? "OK" : ` 异常 ( ${ J . authError } ) ` } ` ),console.error( ` [ webhook - ready ] Webhook 通道 : $ { J . activeWebhooks . length } 个可用 ` );for(let Q of J.activeWebhooks){let w=Q.isDefault?" [默认通道]":"";console.error( ` - $ { Q . name } ( $ { Q . id } ) mode = $ { Q . mode } $ { w } ` )}if(J.materialPack)console.error( ` [ webhook - ready ] 材料包预检 : $ { J . materialPack . valid ? ` 通过 ( ${ J . materialPack . documentCount } 单) ` : ` 失败 ( ${ J . materialPack . errors ? . join ( "; " ) } ) ` } ` );if(J.ready)console.error( ` \uD83D\uDFE2 $ { J . statusMessage } ` ),console.error( ` \uD83D\uDC49 Next action : $ { J . nextAction } ` );else console.error( ` \uD83D\uDD34 准备阶段未通过 : $ { J . statusMessage } ` ),console.error( ` \uD83D\uDC49 Next action : $ { J . nextAction } ` );console.log(JSON.stringify(J,null,2));return}if( $ ==="replay"){let Y=I??j(U.options.recordId)??j(U.options["record-id"])??j(U.options.id),J=j(U.options.recordIds)??j(U.options["record-ids"]),Q=J?J.split(",").map((p)=>p.trim()).filter(Boolean):void 0,w=j(U.options.sn)??j(U.options.documentSn)??j(U.options["document-sn"]),K=j(U.options.sns)??j(U.options["document-sns"]),H=K?K.split(",").map((p)=>p.trim()).filter(Boolean):void 0,G=y0(U.options.limit),W=j(U.options.status),Z=j(U.options.startDate)??j(U.options["start-date"]),X=j(U.options.endDate)??j(U.options["end-date"]);if(!Y&&!Q&&!w&&!H&&G===void 0)throw Error("Usage: seal-use webhook replay <recordId> [--sn <documentSN>] [--limit <n>] [--status <status>] [--webhook <idOrName>] [--source-corp <corpId>] [--target-corp <corpId>] [--dry-run]");let L=j(U.options.sourceCorp)??j(U.options["source-corp"])??j(U.options.prodCorp)??j(U.options["prod-corp"]),D=j(U.options.targetCorp)??j(U.options["target-corp"])??j(U.options.testCorp)??j(U.options["test-corp"]),F=V0(U.options.force)===!0,{sourceCorp:T,targetCorp:P}=AD({sourceCorpId:L,targetCorpId:D,activeCorp:q,force:F},O1),M=T.id===q.id?z:await G1(T),v=P.id===q.id?z:await G1(P),u=j(U.options.webhook)??j(U.options.selector),h=j(U.options.snSuffix)??j(U.options["sn-suffix"]),x=j(U.options.snPrefix)??j(U.options["sn-prefix"]),B=j(U.options.docIdSuffix)??j(U.options["doc-id-suffix"]),n=j(U.options.docIdPrefix)??j(U.options["doc-id-prefix"]),f=V0(U.options.dryRun)??V0(U.options["dry-run"]),k=await gU({query:{recordId:Y,recordIds:Q,sn:w,sns:H,limit:G,status:W,startDate:Z,endDate:X},sourceClient:M,targetClient:v,sourceCorp:T,targetCorp:P,webhookSelector:u,snPrefix:x,snSuffix:h,docIdPrefix:n,docIdSuffix:B,dryRun:f});if(f){console.error( ` [ webhook - replay ] 预览模式 : 已成功从 $ { T . name } 提取单据并转换为 Webhook Payload ( 未实际推送 ) 。 ` ),console.log(JSON.stringify(k,null,2));return}if(k.success)if(k.totalCount===1&&k.replayedDocument)console.error( ` \uD83D\uDFE2 成功重放 Line truncated
or : seal - use corps bind - test < testCorpId > -- corp < prodCorpId > [ -- confirm ] [ -- force ] ` );let Y=O 1(q),J=O 1(U);if(Y.id===J.id)throw X4( ` Cannot bind enterprise '${Y.id}' to itself . ` );if(Y.prodCorpId&&Y.prodCorpId!==J.id)throw X4( ` Cannot use '${Y.id}' as a production enterprise because it is already registered as a test enterprise for '${Y.prodCorpId}' . Multi - tier chaining is not permitted . ` );if(J.testCorpId&&J.testCorpId!==Y.id)throw X4( ` Cannot bind '${J.id}' as a test enterprise because it already has a bound test enterprise '${J.testCorpId}' . Multi - tier chaining is not permitted . ` );let Q=V0(z.options.force)===!0;if(Y.testCorpId&&Y.testCorpId!==J.id||J.prodCorpId&&J.prodCorpId!==Y.id){if(!Q)throw $ 5( ` Enterprise binding conflict : production enterprise '${Y.id}' is bound to '${Y.testCorpId??"none"}' , and test enterprise '${J.id}' is bound to '${J.prodCorpId??"none"}' . Overwriting an existing binding requires -- force and -- confirm . ` , ` seal - use corps bind - test $ { Y . id } $ { J . id } -- confirm -- force ` )}if(!(V0(z.options.confirm)===!0||V0(z.options.yes)===!0)){let G=Q?" --force":"";throw $ 5( ` Refusing to bind test enterprise '${J.name}' ( $ { J . id } ) to production enterprise '${Y.name}' ( $ { Y . id } ) without -- confirm . Enterprise binding establishes 1 - to - 1 sync pairing and marks '${J.id}' as a test environment . ` , ` seal - use corps bind - test $ { Y . id } $ { J . id } -- confirm$ { G } ` )}if(Y.testCorpId&&Y.testCorpId!==J.id)try{j 7(Y.testCorpId,{prodCorpId:void 0})}catch{}if(J.prodCorpId&&J.prodCorpId!==Y.id)try{j 7(J.prodCorpId,{testCorpId:void 0})}catch{}let K=j 7(Y.id,{environment:"production",testCorpId:J.id}),H=j 7(J.id,{environment:"test",prodCorpId:Y.id});T0({success:!0,productionEnterprise:{id:K.id,name:K.name,environment:K.environment,testCorpId:K.testCorpId},testEnterprise:{id:H.id,name:H.name,environment:H.environment,prodCorpId:H.prodCorpId}});return}if( $ ==="unbind-test"){let q=I??j(z.options.corp),U=O 1(q);if(!U.testCorpId&&!U.prodCorpId){T0({unbound:!1,message: ` Enterprise '${U.name}' ( $ { U . id } ) does not have an active test enterprise binding . ` });return}let Y=U.testCorpId?U.id:U.prodCorpId,J=U.testCorpId?U.testCorpId:U.id;if(!(V0(z.options.confirm)===!0||V0(z.options.yes)===!0))throw $ 5( ` Refusing to unbind production enterprise '${Y}' and test enterprise '${J}' without -- confirm . ` , ` seal - use corps unbind - test $ { U . id } -- confirm ` );j 7(Y,{testCorpId:void 0});try{j 7(J,{prodCorpId:void 0})}catch{}T0({success:!0,unboundProduction:Y,unboundTest:J});return}if( $ ==="sync-test"){let q=I??j(z.options.corp),U=O 1(q);if(!U.testCorpId)throw X4( ` Production enterprise '${U.name}' ( $ { U . id } ) has no bound test enterprise .
Run 'seal-use corps bind-test ${U.id} <testCorpId> --confirm' first to establish a verified 1 - to - 1 association . ` );let Y=O1(U.testCorpId);if(Y.environment!=="test")throw Error( ` Target enterprise '${Y.name}' ( $ { Y . id } ) is marked as '${Y.environment}' , NOT 'test' . Aborting sync to protect non - test environments . ` );let J=await G1(U),Q=await G1(Y),[w,K,H,G,W,Z,X,L]=await Promise.all([P1(J,U.seal.endpoints.approvalStylePreferences).catch(()=>({})),P1(Q,Y.seal.endpoints.approvalStylePreferences).catch(()=>({})),C6(J),C6(Q),S $ (J).catch(()=>[]),S $ (Q).catch(()=>[]),v9(J,{limit:100}).catch(()=>({articles:[]})),v9(Q,{limit:100}).catch(()=>({articles:[]}))]),D=(X.articles||[]).filter((Y0)=>!Y0.isDeleted),F=(L.articles||[]).filter((Y0)=>!Y0.isDeleted),T=new Map(F.map((Y0)=>[Y0.title.trim(),Y0])),P=[],M=[],v=new Set(D.map((Y0)=>Y0.title.trim()));for(let Y0 of D){let v0=Y0.title.trim(),q1=T.get(v0);if(!q1)P.push(Y0);else{let N1=q1.content!==Y0.content,b4=(q1.purpose??"")!==(Y0.purpose??""),n6=q1.enabled!==Y0.enabled,E $ =q1.contentType!==Y0.contentType,b6=(q1.status??"")!==(Y0.status??""),T6=JSON.stringify([...q1.scenarios??[]].sort())!==JSON.stringify([...Y0.scenarios??[]].sort()),B $ =JSON.stringify([...q1.tags??[]].sort())!==JSON.stringify([...Y0.tags??[]].sort());if(N1||b4||n6||E $ ||b6||T6||B $ )M.push({testId:q1.id,prodDoc:Y0,reasons:[...N1?["content"]:[],...b4?["purpose"]:[],...n6?["enabled"]:[],...E $ ?["contentType"]:[],...b6?["status"]:[],...T6?["scenarios"]:[],...B $ ?["tags"]:[]]})}}let u=F.filter((Y0)=>!v.has(Y0.title.trim())),x=[...W].sort((Y0,v0)=>v0.versionNumber-Y0.versionNumber)[0],B=x?.versionNumber,f=([...Z].sort((Y0,v0)=>v0.versionNumber-Y0.versionNumber)[0]?.versionNumber??0)+1,g=TL0(U.name,B,Z),p=j(z.options["version-name"])??j(z.options.versionName)??EL0(U.name,B,g,f),z0={...K,tone:w.tone,language:w.language,detailLevel:w.detailLevel,outputFormat:w.outputFormat,examples:w.examples??[],prohibitedPhrases:w.prohibitedPhrases??[],customInstructions:w.customInstructions,decisionPreferences:w.decisionPreferences,thinkingDepthPreference:w.thinkingDepthPreference};if(V0(z.options["dry-run"])===!0||V0(z.options.dryRun)===!0){T0({dryRun:!0,source:{id:U.id,name:U.name,environment:U.environment,latestPublishedVersion:x?{versionNumber:x.versionNumber,versionName:x.versionName}:null,documentsCount:D.length},target:{id:Y.id,name:Y.name,environment:Y.environment},versionMappingPlan:{sourceProdVersionNumber:B??null,sourceProdVersionName:x?.versionName??null,targetTestExpectedVersionNumber:f,targetTestPublishVersionName:p,iteration:g},preferencesDiff:{decisionPreferences:{before:K.decisionPreferences,after:w.decisionPreferences},thinkingDepthPreference:{before:K.thinkingDepthPreference,after:w.thinkingDepthPreference}},rulesPlan:{sourceDraftRuleCount:H.rules.length,targetExistingDraftRuleCount:G.rules.length,toDeleteCount:G.rules.length,toCreateCount:H.rules.length,rulesToSync:H.rules.map((Y0,v0)=>({index:v0+1,sourceRuleId:Y0.id,sourceRuleCode:Y0.code??v0+1,expectedTargetCode: ` rule - $ { v0 + 1 } ` ,description:Y0.description,scope:Y0.scope,strictness:Y0.strictness}))},documentsPlan:{sourceDocumentCount:D.length,targetExistingDocumentCount:F.length,toCreateCount:P.length,toCreate:P.map((Y0)=>({title:Y0.title,purpose:Y0.purpose,contentType:Y0.contentType,scenarios:Y0.scenarios})),toUpdateCount:M.length,toUpdate:M.map((Y0)=>({targetDocumentId:Y0.testId,title:Y0.prodDoc.title,reasons:Y0.reasons})),toDeleteCount:u.length,toDelete:u.map((Y0)=>({targetDocumentId:Y0.id,title:Y0.title}))},publishingPlan:{targetCorpId:Y.id,publishVersionName:p,publishTarget:"test"},hosecloudSyncPlan:(()=>{if(U.source.type!=="hose")return{sourceType:U.source.type,skipped:!0,reason:"prod source is not hose; no hosecloud credentials available"};let Y0=(w.integrations??[]).filter((N1)=>N1.type==="hosecloud"),v0=new Set,q1=Y0.filter((N1)=>{let b4=N1.corporationId??U.id;if(v0.has(b4))return!1;return v0.add(b4),!0});return{sourceType:"hose",outboundName:_L0(U.name),targetMode:"assisted",integrationsCount:q1.length,integrations:q1.map((N1)=>({corporationId:N1.corporationId,apiOrigin:N1.apiOrigin,customApiUrl:N1.customApiUrl}))}})(),productionGuarantees:{prodRulesStayDraft:!0,prodVersionPublished:!1}});return}if(!(V0(z.options.yes)===!0||V0(z.options.confirm)===!0))throw $ 5( ` Refusing to overwrite test enterprise '${Y.name}' ( $ { Y . id } ) with preferences , $ { H . rules . length } draft rules , and $ { D . length } knowledge documents from production enterprise '${U.name}' ( $ { U . id } ) without -- yes . This will replace test draft rules , synchronize knowledge documents , and publish a new version on the test enterprise . ` , ` seal - use corps sync - test $ { U . id } -- yes ` );await j8(Q,z0,Y.seal.endpoints.approvalStylePreferences);let c=[];for(let Y0 of u)await GW(Q,Y0.id),c.push({id:Y0.id,title:Y0.title});let r=[];for(let Y0 of M)await HW(Q,Y0.testId,{title:Y0.prodDoc.title,purpose:Y0.prodDoc.purpose,content:Y0.prodDoc.content,contentType:Y0.prodDoc.contentType,status:Y0.prodDoc.status,enabled:Y0.prodDoc.ena
Line truncated
` }function x w( $ ){return $ .replace(/([?&](?:accessToken|token|returnToken)=)[^& \s ]+/gi," $ 1<redacted>").replace(/(Bearer \s +)[A-Za-z0-9._~+/=-]+/gi," $ 1<redacted>")}function T0( $ ,I={}){n G1( $ ,I);let z= ` $ { JSON . stringify ( $ , null , 2 ) }
` ;if(I.outputFile){yG1(I.outputFile,z),console.log(JSON.stringify({outputFile:I.outputFile,bytes:Buffer.byteLength(z,"utf-8")},null,2));return}console.log(z.trimEnd())}function nG1( $ ,I={}){if(I.allowFull||I.outputFile)return;let z=Buffer.byteLength(JSON.stringify( $ ),"utf-8");if(z>fG1)throw new PD( ` Output is large ( $ { z } bytes ) . Use -- summary , -- fields , -- count , or -- output - file ; pass -- full only when you really need the full response . ` )}function GX0( $ ,I){if(I)return;let z= $ &&typeof $ ==="object"? $ :{},q=typeof z.count==="number"?z.count:void 0,U=Array.isArray(z.rules)?z.rules.length:void 0,Y=Buffer.byteLength(JSON.stringify( $ ),"utf-8"),J=q??U??0;if(J>xG1||Y>kG1)throw new PD( ` Rule list is large ( $ { J } rules , $ { Y } bytes ) . Use "seal-use rules list --summary" or "seal-use rules count" ; pass -- full only when you really need full descriptions . ` ,"seal-use rules list --summary")}function W0( $ ){return{allowFull:V0( $ .full)===!0,outputFile:j( $ .outputFile)??j( $ ["output-file"])}}function WX0( $ =[]){console.log(KX0( $ ))}function F1( $ ){let I=Y $ (),z=Y4();return _7(I,{stateful:z.stateful,defaultCorpId:z.defaultCorpId,corpId: $ },s5())}function TI( $ =Y4()){return{mode: $ .stateful?"stateful":"stateless",stateful: $ .stateful,... $ .stateful&& $ .defaultCorpId?{defaultCorpId: $ .defaultCorpId}:{},... $ .testEnterprisesDir?{testEnterprisesDir: $ .testEnterprisesDir}:{},lint: $ .lint,configFile:XI()}}async function F0( $ ,I,z,q,U={}){T0(await EI( $ ,I,z,q),U)}async function EI( $ ,I,z,q){let U=Cw.find((Q)=>Q.name=== $ );if(!U)throw Error( ` Unknown Seal tool : $ { $ } ` );let Y=Object.fromEntries(Object.entries(q).filter(([,Q])=>Q!==void 0)),J=U.handler;return J(I,Y,{corp:z})}import{existsSync as VX0}from"node:fs";async function ZX0( $ ,I){if(!VX0( $ ))throw Error( ` File not found : $ { $ } ` );let z=MI( $ );console.log(JSON.stringify(await NI(z.fileBuffer,z.fileName,I),null,2))}async function YO( $ ,I,z,q,U){if( $ ==="ready"|| $ ==="status"){let Y=I??j(U.options.file)??j(U.options.input),J=await oD(z,q,{filePath:Y,webhook:j(U.options.webhook)??j(U.options.selector)});if(console.error( ` [ webhook - ready ] 企业环境 : $ { J . corp . name } ( $ { J . corp . id } ) [ $ { J . stateMode } ] ` ),J.corp.tenant?.name)console.error( ` [ webhook - ready ] 租户信息 : $ { J . corp . tenant . name } ( $ { J . corp . tenant . id } ) ` );console.error( ` [ webhook - ready ] 凭证状态 : $ { J . authStatus === "ok" ? "OK" : ` 异常 ( ${ J . authError } ) ` } ` ),console.error( ` [ webhook - ready ] Webhook 通道 : $ { J . activeWebhooks . length } 个可用 ` );for(let Q of J.activeWebhooks){let w=Q.isDefault?" [默认通道]":"";console.error( ` - $ { Q . name } ( $ { Q . id } ) mode = $ { Q . mode } $ { w } ` )}if(J.materialPack)console.error( ` [ webhook - ready ] 材料包预检 : $ { J . materialPack . valid ? ` 通过 ( ${ J . materialPack . documentCount } 单) ` : ` 失败 ( ${ J . materialPack . errors ? . join ( "; " ) } ) ` } ` );if(J.ready)console.error( ` \uD83D\uDFE2 $ { J . statusMessage } ` ),console.error( ` \uD83D\uDC49 Next action : $ { J . nextAction } ` );else console.error( ` \uD83D\uDD34 准备阶段未通过 : $ { J . statusMessage } ` ),console.error( ` \uD83D\uDC49 Next action : $ { J . nextAction } ` );console.log(JSON.stringify(J,null,2));return}if( $ ==="replay"){let Y=I??j(U.options.recordId)??j(U.options["record-id"])??j(U.options.id),J=j(U.options.recordIds)??j(U.options["record-ids"]),Q=J?J.split(",").map((p)=>p.trim()).filter(Boolean):void 0,w=j(U.options.sn)??j(U.options.documentSn)??j(U.options["document-sn"]),K=j(U.options.sns)??j(U.options["document-sns"]),H=K?K.split(",").map((p)=>p.trim()).filter(Boolean):void 0,G=S0(U.options.limit),W=j(U.options.status),Z=j(U.options.startDate)??j(U.options["start-date"]),X=j(U.options.endDate)??j(U.options["end-date"]);if(!Y&&!Q&&!w&&!H&&G===void 0)throw Error("Usage: seal-use webhook replay <recordId> [--sn <documentSN>] [--limit <n>] [--status <status>] [--webhook <idOrName>] [--source-corp <corpId>] [--target-corp <corpId>] [--dry-run]");let L=j(U.options.sourceCorp)??j(U.options["source-corp"])??j(U.options.prodCorp)??j(U.options["prod-corp"]),D=j(U.options.targetCorp)??j(U.options["target-corp"])??j(U.options.testCorp)??j(U.options["test-corp"]),O=V0(U.options.force)===!0,{sourceCorp:T,targetCorp:P}=ED({sourceCorpId:L,targetCorpId:D,activeCorp:q,force:O},F1),M=T.id===q.id?z:await G1(T),v=P.id===q.id?z:await G1(P),y=j(U.options.webhook)??j(U.options.selector),h=j(U.options.snSuffix)??j(U.options["sn-suffix"]),x=j(U.options.snPrefix)??j(U.options["sn-prefix"]),B=j(U.options.docIdSuffix)??j(U.options["doc-id-suffix"]),n=j(U.options.docIdPrefix)??j(U.options["doc-id-prefix"]),f=V0(U.options.dryRun)??V0(U.options["dry-run"]),k=await CU({query:{recordId:Y,recordIds:Q,sn:w,sns:H,limit:G,status:W,startDate:Z,endDate:X},sourceClient:M,targetClient:v,sourceCorp:T,targetCorp:P,webhookSelector:y,snPrefix:x,snSuffix:h,docIdPrefix:n,docIdSuffix:B,dryRun:f});if(f){console.error( ` [ webhook - replay ] 预览模式 : 已成功从 $ { T . name } 提取单据并转换为 Webhook Payload ( 未实际推送 ) 。 ` ),console.log(JSON.stringify(k,null,2));return}if(k.success)if(k.totalCount===1&&k.replayedDocument)console.error( ` \uD83D\uDFE2 成功重放 Line truncated
or : seal - use corps bind - test < testCorpId > -- corp < prodCorpId > [ -- confirm ] [ -- force ] ` );let Y=F 1(q),J=F 1(U);if(Y.id===J.id)throw X4( ` Cannot bind enterprise '${Y.id}' to itself . ` );if(Y.prodCorpId&&Y.prodCorpId!==J.id)throw X4( ` Cannot use '${Y.id}' as a production enterprise because it is already registered as a test enterprise for '${Y.prodCorpId}' . Multi - tier chaining is not permitted . ` );if(J.testCorpId&&J.testCorpId!==Y.id)throw X4( ` Cannot bind '${J.id}' as a test enterprise because it already has a bound test enterprise '${J.testCorpId}' . Multi - tier chaining is not permitted . ` );let Q=V0(z.options.force)===!0;if(Y.testCorpId&&Y.testCorpId!==J.id||J.prodCorpId&&J.prodCorpId!==Y.id){if(!Q)throw z 5( ` Enterprise binding conflict : production enterprise '${Y.id}' is bound to '${Y.testCorpId??"none"}' , and test enterprise '${J.id}' is bound to '${J.prodCorpId??"none"}' . Overwriting an existing binding requires -- force and -- confirm . ` , ` seal - use corps bind - test $ { Y . id } $ { J . id } -- confirm -- force ` )}if(!(V0(z.options.confirm)===!0||V0(z.options.yes)===!0)){let G=Q?" --force":"";throw z 5( ` Refusing to bind test enterprise '${J.name}' ( $ { J . id } ) to production enterprise '${Y.name}' ( $ { Y . id } ) without -- confirm . Enterprise binding establishes 1 - to - 1 sync pairing and marks '${J.id}' as a test environment . ` , ` seal - use corps bind - test $ { Y . id } $ { J . id } -- confirm$ { G } ` )}if(Y.testCorpId&&Y.testCorpId!==J.id)try{R 7(Y.testCorpId,{prodCorpId:void 0})}catch{}if(J.prodCorpId&&J.prodCorpId!==Y.id)try{R 7(J.prodCorpId,{testCorpId:void 0})}catch{}let K=R 7(Y.id,{environment:"production",testCorpId:J.id}),H=R 7(J.id,{environment:"test",prodCorpId:Y.id});T0({success:!0,productionEnterprise:{id:K.id,name:K.name,environment:K.environment,testCorpId:K.testCorpId},testEnterprise:{id:H.id,name:H.name,environment:H.environment,prodCorpId:H.prodCorpId}});return}if( $ ==="unbind-test"){let q=I??j(z.options.corp),U=F 1(q);if(!U.testCorpId&&!U.prodCorpId){T0({unbound:!1,message: ` Enterprise '${U.name}' ( $ { U . id } ) does not have an active test enterprise binding . ` });return}let Y=U.testCorpId?U.id:U.prodCorpId,J=U.testCorpId?U.testCorpId:U.id;if(!(V0(z.options.confirm)===!0||V0(z.options.yes)===!0))throw z 5( ` Refusing to unbind production enterprise '${Y}' and test enterprise '${J}' without -- confirm . ` , ` seal - use corps unbind - test $ { U . id } -- confirm ` );R 7(Y,{testCorpId:void 0});try{R 7(J,{prodCorpId:void 0})}catch{}T0({success:!0,unboundProduction:Y,unboundTest:J});return}if( $ ==="sync-test"){let q=I??j(z.options.corp),U=F 1(q);if(!U.testCorpId)throw X4( ` Production enterprise '${U.name}' ( $ { U . id } ) has no bound test enterprise .
Run 'seal-use corps bind-test ${U.id} <testCorpId> --confirm' first to establish a verified 1 - to - 1 association . ` );let Y=F1(U.testCorpId);if(Y.environment!=="test")throw Error( ` Target enterprise '${Y.name}' ( $ { Y . id } ) is marked as '${Y.environment}' , NOT 'test' . Aborting sync to protect non - test environments . ` );let J=await G1(U),Q=await G1(Y),[w,K,H,G,W,Z,X,L]=await Promise.all([P1(J,U.seal.endpoints.approvalStylePreferences).catch(()=>({})),P1(Q,Y.seal.endpoints.approvalStylePreferences).catch(()=>({})),u6(J),u6(Q),S $ (J).catch(()=>[]),S $ (Q).catch(()=>[]),_9(J,{limit:100}).catch(()=>({articles:[]})),_9(Q,{limit:100}).catch(()=>({articles:[]}))]),D=(X.articles||[]).filter((Y0)=>!Y0.isDeleted),O=(L.articles||[]).filter((Y0)=>!Y0.isDeleted),T=new Map(O.map((Y0)=>[Y0.title.trim(),Y0])),P=[],M=[],v=new Set(D.map((Y0)=>Y0.title.trim()));for(let Y0 of D){let v0=Y0.title.trim(),q1=T.get(v0);if(!q1)P.push(Y0);else{let N1=q1.content!==Y0.content,b4=(q1.purpose??"")!==(Y0.purpose??""),i6=q1.enabled!==Y0.enabled,B $ =q1.contentType!==Y0.contentType,p6=(q1.status??"")!==(Y0.status??""),B6=JSON.stringify([...q1.scenarios??[]].sort())!==JSON.stringify([...Y0.scenarios??[]].sort()),j $ =JSON.stringify([...q1.tags??[]].sort())!==JSON.stringify([...Y0.tags??[]].sort());if(N1||b4||i6||B $ ||p6||B6||j $ )M.push({testId:q1.id,prodDoc:Y0,reasons:[...N1?["content"]:[],...b4?["purpose"]:[],...i6?["enabled"]:[],...B $ ?["contentType"]:[],...p6?["status"]:[],...B6?["scenarios"]:[],...j $ ?["tags"]:[]]})}}let y=O.filter((Y0)=>!v.has(Y0.title.trim())),x=[...W].sort((Y0,v0)=>v0.versionNumber-Y0.versionNumber)[0],B=x?.versionNumber,f=([...Z].sort((Y0,v0)=>v0.versionNumber-Y0.versionNumber)[0]?.versionNumber??0)+1,R=CL0(U.name,B,Z),p=j(z.options["version-name"])??j(z.options.versionName)??hL0(U.name,B,R,f),z0={...K,tone:w.tone,language:w.language,detailLevel:w.detailLevel,outputFormat:w.outputFormat,examples:w.examples??[],prohibitedPhrases:w.prohibitedPhrases??[],customInstructions:w.customInstructions,decisionPreferences:w.decisionPreferences,thinkingDepthPreference:w.thinkingDepthPreference};if(V0(z.options["dry-run"])===!0||V0(z.options.dryRun)===!0){T0({dryRun:!0,source:{id:U.id,name:U.name,environment:U.environment,latestPublishedVersion:x?{versionNumber:x.versionNumber,versionName:x.versionName}:null,documentsCount:D.length},target:{id:Y.id,name:Y.name,environment:Y.environment},versionMappingPlan:{sourceProdVersionNumber:B??null,sourceProdVersionName:x?.versionName??null,targetTestExpectedVersionNumber:f,targetTestPublishVersionName:p,iteration:R},preferencesDiff:{decisionPreferences:{before:K.decisionPreferences,after:w.decisionPreferences},thinkingDepthPreference:{before:K.thinkingDepthPreference,after:w.thinkingDepthPreference}},rulesPlan:{sourceDraftRuleCount:H.rules.length,targetExistingDraftRuleCount:G.rules.length,toDeleteCount:G.rules.length,toCreateCount:H.rules.length,rulesToSync:H.rules.map((Y0,v0)=>({index:v0+1,sourceRuleId:Y0.id,sourceRuleCode:Y0.code??v0+1,expectedTargetCode: ` rule - $ { v0 + 1 } ` ,description:Y0.description,scope:Y0.scope,strictness:Y0.strictness}))},documentsPlan:{sourceDocumentCount:D.length,targetExistingDocumentCount:O.length,toCreateCount:P.length,toCreate:P.map((Y0)=>({title:Y0.title,purpose:Y0.purpose,contentType:Y0.contentType,scenarios:Y0.scenarios})),toUpdateCount:M.length,toUpdate:M.map((Y0)=>({targetDocumentId:Y0.testId,title:Y0.prodDoc.title,reasons:Y0.reasons})),toDeleteCount:y.length,toDelete:y.map((Y0)=>({targetDocumentId:Y0.id,title:Y0.title}))},publishingPlan:{targetCorpId:Y.id,publishVersionName:p,publishTarget:"test"},hosecloudSyncPlan:(()=>{if(U.source.type!=="hose")return{sourceType:U.source.type,skipped:!0,reason:"prod source is not hose; no hosecloud credentials available"};let Y0=(w.integrations??[]).filter((N1)=>N1.type==="hosecloud"),v0=new Set,q1=Y0.filter((N1)=>{let b4=N1.corporationId??U.id;if(v0.has(b4))return!1;return v0.add(b4),!0});return{sourceType:"hose",outboundName:fL0(U.name),targetMode:"assisted",integrationsCount:q1.length,integrations:q1.map((N1)=>({corporationId:N1.corporationId,apiOrigin:N1.apiOrigin,customApiUrl:N1.customApiUrl}))}})(),productionGuarantees:{prodRulesStayDraft:!0,prodVersionPublished:!1}});return}if(!(V0(z.options.yes)===!0||V0(z.options.confirm)===!0))throw z5( ` Refusing to overwrite test enterprise '${Y.name}' ( $ { Y . id } ) with preferences , $ { H . rules . length } draft rules , and $ { D . length } knowledge documents from production enterprise '${U.name}' ( $ { U . id } ) without -- yes . This will replace test draft rules , synchronize knowledge documents , and publish a new version on the test enterprise . ` , ` seal - use corps sync - test $ { U . id } -- yes ` );await g8(Q,z0,Y.seal.endpoints.approvalStylePreferences);let c=[];for(let Y0 of y)await ZW(Q,Y0.id),c.push({id:Y0.id,title:Y0.title});let r=[];for(let Y0 of M)await VW(Q,Y0.testId,{title:Y0.prodDoc.title,purpose:Y0.prodDoc.purpose,content:Y0.prodDoc.content,contentType:Y0.prodDoc.contentType,status:Y0.prodDoc.status,enabled:Y0.prodDoc.ena
Line truncated
Run 'seal-use corps bind-test ${U.id} <testCorpId> --confirm' first to establish a verified 1 - to - 1 association ,
or add '--force' ( or use 'seal-use webhook replay <recordId> --force' ) if you explicitly intend to replay directly within production . ` );J=U}else if(J=O1(U.testCorpId),J.environment!=="test"&&!Y)throw Error( ` Target enterprise '${J.name}' ( $ { J . id } ) is marked as '${J.environment}' , NOT 'test' . Aborting replay to protect non - test environments ( use -- force to override ) . ` );let Q=j(z.options.recordId)??j(z.options["record-id"])??j(z.options.id),w=j(z.options.recordIds)??j(z.options["record-ids"]),K=w?w.split(",").map((f)=>f.trim()).filter(Boolean):void 0,H=j(z.options.sn)??j(z.options.documentSn)??j(z.options["document-sn"]),G=j(z.options.sns)??j(z.options["document-sns"]),W=G?G.split(",").map((f)=>f.trim()).filter(Boolean):void 0,Z=y0(z.options.limit)??(!Q&&!K&&!H&&!W?1:void 0),X=j(z.options.status),L=j(z.options.startDate)??j(z.options["start-date"]),D=j(z.options.endDate)??j(z.options["end-date"]),F=await G1(U),T=U.id===J.id?F:await G1(J),P=j(z.options.webhook)??j(z.options.selector),M=j(z.options.snSuffix)??j(z.options["sn-suffix"]),v=j(z.options.snPrefix)??j(z.options["sn-prefix"]),u=j(z.options.docIdSuffix)??j(z.options["doc-id-suffix"]),h=j(z.options.docIdPrefix)??j(z.options["doc-id-prefix"]),x=V0(z.options.dryRun)??V0(z.options["dry-run"]),B={recordId:Q,recordIds:K,sn:H,sns:W,limit:Z,status:X,startDate:L,endDate:D};console.error( ` [ corps - replay - test ] 正式企业 「 $ { U . name } 」 ( $ { U . id } ) - > 测试企业 「 $ { J . name } 」 ( $ { J . id } ) ` );let n=await gU({query:B,sourceClient:F,targetClient:T,sourceCorp:U,targetCorp:J,webhookSelector:P,snPrefix:v,snSuffix:M,docIdPrefix:h,docIdSuffix:u,dryRun:x});if(x){console.error( ` [ corps - replay - test ] 预览模式 : 已成功从 $ { U . name } 提取单据并转换为 Webhook Payload ( 未实际推送 ) 。 ` ),console.log(JSON.stringify(n,null,2));return}if(n.success)if(n.totalCount===1&&n.replayedDocument)console.error( ` \uD83D\uDFE2 成功重放单据 「 $ { n . replayedDocument . documentSN } 」 至 $ { J . name } ( $ { n . targetWebhook ? . name ? ? "Webhook 通道" } ) ` );else console.error( ` \uD83D\uDFE2 成功重放 $ { n . successCount } 条单据 ( 来自 「 $ { U . name } 」 ) 至 「 $ { J . name } 」 ( $ { n . targetWebhook ? . name ? ? "Webhook 通道" } ) ` );else console.error( ` \uD83D\uDD34 单据重放部分或全部失败 ( 成功 $ { n . successCount } 条 , 失败 $ { n . failureCount } 条 ) 至 「 $ { J . name } 」 ` );if(console.error( ` \uD83D\uDC49 Next action : seal - use approval - runs list -- corp $ { J . id } -- limit $ { n . totalCount } ` ),console.log(JSON.stringify(n,null,2)),!n.success)process.exitCode=1;return}if( $ ==="switch"){let q=I;if(!q)throw Error("Usage: seal-use corps switch <corpId>");let U=Y4();if(!U.stateful)throw Error("Cannot switch the default enterprise while stateless mode is enabled. Use ` seal - use config mode stateful ` first.");let Y=O1(q);ZI({...U,stateful:!0,defaultCorpId:Y.id}),T0({current:!0,id:Y.id,name:Y.name});return}if( $ ==="probe-hose"){await zW1(J $ (z.json));return}if( $ ==="hose-staffs"){await qW1(J $ (z.json));return}if( $ ==="add-hose"){await UW1(J $ (z.json));return}if( $ ==="add-seal"){await YW1(J $ (z.json));return}if( $ ==="add-link"){let q=I??j(z.options.link)??j(z.options.url);if(!q)throw Error("Usage: seal-use corps add-link <https://.../web/thirdparty.html?...> [--name <customName>] [--overwrite]");await JW1(q,j(z.options.name),V0(z.options.overwrite)===!0);return}throw Error( ` Unknown corps command : $ { $ ? ? "" } . Run 'seal-use help' for available commands . ` )}function _L0( $ ){return[... $ ].slice(0,6).join("")+"(Seal测)"}async function IW1( $ ,I,z,q){if( $ .source.type!=="hose")return{skipped:!0,reason:"prod source is not hose; no hosecloud credentials available"};let U=( $ .source.appKey?? $ .source.key)?.trim(),Y=( $ .source.appSecurity?? $ .source.password)?.trim();if(!U||!Y)return{skipped:!0,reason:"prod hose source missing appKey/appSecurity (or key/password)"};let[J,Q]=await Promise.all([P1(z, $ .seal.endpoints.approvalStylePreferences).catch(()=>({})),P1(q,I.seal.endpoints.approvalStylePreferences).catch(()=>({}))]),w=(J.integrations??[]).filter((T)=>T.type==="hosecloud");if(w.length===0)return{skipped:!0,reason:"prod Seal enterprise has no hosecloud integrations configured"};let K=new Set,H=[];for(let T of w){let P=T.corporationId?? $ .id;if(!K.has(P))K.add(P),H.push(T)}let G=Q.integrations??[],W=new Map(G.filter((T)=>T.type==="hosecloud").map((T)=>[T.corporationId,T])),Z=_L0( $ .name),X=[],L=H.map((T)=>{let P=W.get(T.corporationId),M=P?.signKey??sG1(6).toString("hex");return X.push({signKey:M,outboundName:Z,corporationId:T.corporationId,action:P?"updated":"created"}),{type:"hosecloud",signKey:M,outboundName:Z,mode:"assisted",apiKey:U,apiSecret:Y,apiOrigin:T.apiOrigin,...T.customApiUrl?{customApiUrl:T.customApiUrl}:{},corporationId:T.corporationId}}),D=G.filter((T)=>T.type!=="hosecloud"),F={...Q,integrations:[...D,...L]};return await j8(q,F,I.seal.endpoints.approvalStylePreferences),{skipped:!1,synced:X}}async function zW1( $ ){let I=_7( $ ,"appKey"),z=_7( $ ,"appSecurity"),q=m1( $ ,"domain"),U=await _z(I,z,q),Y=await sG(U.domain,U.openapiToken).catch(()=>[])
Line truncated
or add '--force' ( or use 'seal-use webhook replay <recordId> --force' ) if you explicitly intend to replay directly within production . ` );J=U}else if(J=F1(U.testCorpId),J.environment!=="test"&&!Y)throw Error( ` Target enterprise '${J.name}' ( $ { J . id } ) is marked as '${J.environment}' , NOT 'test' . Aborting replay to protect non - test environments ( use -- force to override ) . ` );let Q=j(z.options.recordId)??j(z.options["record-id"])??j(z.options.id),w=j(z.options.recordIds)??j(z.options["record-ids"]),K=w?w.split(",").map((f)=>f.trim()).filter(Boolean):void 0,H=j(z.options.sn)??j(z.options.documentSn)??j(z.options["document-sn"]),G=j(z.options.sns)??j(z.options["document-sns"]),W=G?G.split(",").map((f)=>f.trim()).filter(Boolean):void 0,Z=S0(z.options.limit)??(!Q&&!K&&!H&&!W?1:void 0),X=j(z.options.status),L=j(z.options.startDate)??j(z.options["start-date"]),D=j(z.options.endDate)??j(z.options["end-date"]),O=await G1(U),T=U.id===J.id?O:await G1(J),P=j(z.options.webhook)??j(z.options.selector),M=j(z.options.snSuffix)??j(z.options["sn-suffix"]),v=j(z.options.snPrefix)??j(z.options["sn-prefix"]),y=j(z.options.docIdSuffix)??j(z.options["doc-id-suffix"]),h=j(z.options.docIdPrefix)??j(z.options["doc-id-prefix"]),x=V0(z.options.dryRun)??V0(z.options["dry-run"]),B={recordId:Q,recordIds:K,sn:H,sns:W,limit:Z,status:X,startDate:L,endDate:D};console.error( ` [ corps - replay - test ] 正式企业 「 $ { U . name } 」 ( $ { U . id } ) - > 测试企业 「 $ { J . name } 」 ( $ { J . id } ) ` );let n=await CU({query:B,sourceClient:O,targetClient:T,sourceCorp:U,targetCorp:J,webhookSelector:P,snPrefix:v,snSuffix:M,docIdPrefix:h,docIdSuffix:y,dryRun:x});if(x){console.error( ` [ corps - replay - test ] 预览模式 : 已成功从 $ { U . name } 提取单据并转换为 Webhook Payload ( 未实际推送 ) 。 ` ),console.log(JSON.stringify(n,null,2));return}if(n.success)if(n.totalCount===1&&n.replayedDocument)console.error( ` \uD83D\uDFE2 成功重放单据 「 $ { n . replayedDocument . documentSN } 」 至 $ { J . name } ( $ { n . targetWebhook ? . name ? ? "Webhook 通道" } ) ` );else console.error( ` \uD83D\uDFE2 成功重放 $ { n . successCount } 条单据 ( 来自 「 $ { U . name } 」 ) 至 「 $ { J . name } 」 ( $ { n . targetWebhook ? . name ? ? "Webhook 通道" } ) ` );else console.error( ` \uD83D\uDD34 单据重放部分或全部失败 ( 成功 $ { n . successCount } 条 , 失败 $ { n . failureCount } 条 ) 至 「 $ { J . name } 」 ` );if(console.error( ` \uD83D\uDC49 Next action : seal - use approval - runs list -- corp $ { J . id } -- limit $ { n . totalCount } ` ),console.log(JSON.stringify(n,null,2)),!n.success)process.exitCode=1;return}if( $ ==="switch"){let q=I;if(!q)throw Error("Usage: seal-use corps switch <corpId>");let U=Y4();if(!U.stateful)throw Error("Cannot switch the default enterprise while stateless mode is enabled. Use ` seal - use config mode stateful ` first.");let Y=F1(q);LI({...U,stateful:!0,defaultCorpId:Y.id}),T0({current:!0,id:Y.id,name:Y.name});return}if( $ ==="probe-hose"){await NW1(w $ (z.json));return}if( $ ==="hose-staffs"){await MW1(w $ (z.json));return}if( $ ==="add-hose"){await AW1(w $ (z.json));return}if( $ ==="add-seal"){await PW1(w $ (z.json));return}if( $ ==="add-link"){let q=I??j(z.options.link)??j(z.options.url);if(!q)throw Error("Usage: seal-use corps add-link <https://.../web/thirdparty.html?...> [--name <customName>] [--overwrite]");await TW1(q,j(z.options.name),V0(z.options.overwrite)===!0);return}throw Error( ` Unknown corps command : $ { $ ? ? "" } . Run 'seal-use help' for available commands . ` )}function fL0( $ ){return[... $ ].slice(0,6).join("")+"(Seal测)"}async function FW1( $ ,I,z,q){if( $ .source.type!=="hose")return{skipped:!0,reason:"prod source is not hose; no hosecloud credentials available"};let U=( $ .source.appKey?? $ .source.key)?.trim(),Y=( $ .source.appSecurity?? $ .source.password)?.trim();if(!U||!Y)return{skipped:!0,reason:"prod hose source missing appKey/appSecurity (or key/password)"};let[J,Q]=await Promise.all([P1(z, $ .seal.endpoints.approvalStylePreferences).catch(()=>({})),P1(q,I.seal.endpoints.approvalStylePreferences).catch(()=>({}))]),w=(J.integrations??[]).filter((T)=>T.type==="hosecloud");if(w.length===0)return{skipped:!0,reason:"prod Seal enterprise has no hosecloud integrations configured"};let K=new Set,H=[];for(let T of w){let P=T.corporationId?? $ .id;if(!K.has(P))K.add(P),H.push(T)}let G=Q.integrations??[],W=new Map(G.filter((T)=>T.type==="hosecloud").map((T)=>[T.corporationId,T])),Z=fL0( $ .name),X=[],L=H.map((T)=>{let P=W.get(T.corporationId),M=P?.signKey??LW1(6).toString("hex");return X.push({signKey:M,outboundName:Z,corporationId:T.corporationId,action:P?"updated":"created"}),{type:"hosecloud",signKey:M,outboundName:Z,mode:"assisted",apiKey:U,apiSecret:Y,apiOrigin:T.apiOrigin,...T.customApiUrl?{customApiUrl:T.customApiUrl}:{},corporationId:T.corporationId}}),D=G.filter((T)=>T.type!=="hosecloud"),O={...Q,integrations:[...D,...L]};return await g8(q,O,I.seal.endpoints.approvalStylePreferences),{skipped:!1,synced:X}}async function NW1( $ ){let I=h7( $ ,"appKey"),z=h7( $ ,"appSecurity"),q=m1( $ ,"domain"),U=await hz(I,z,q),Y=await IW(U.domain,U.openapiToken).catch(()=>[])
Line truncated
- ` );throw Error( ` Missing required parameter : staffId . Found $ { B . length } candidate administrators :
- $ { n }
Please specify 'staffId' , 'staffName' , or 'staffPhone' to explicitly select an account ( or pass force : true to bypass ) . ` )}}}if(!L)if(!H&&Y)L=Y;else throw Error("Missing required parameter: staffId (or proxyStaffBizId). Run 'seal-use corps hose-staffs' to discover available administrators.");let D=m1( $ ,"id")??W,F =Z??W,T=m1( $ ,"sealUrl")?? ` https : //${W.toLowerCase()}.sealai.cc`,P={id:D,name:F ,environment:"production",seal:{url:T,endpoints:{approvalStylePreferences:"api/v1/agent/ai-approval/config"}},source:{type:"hose",domain:G,appKey:z,appSecurity:q,corpId:W,staffId:L},auth:{refreshTtl:300}};if(H)m G(D),await p U(P);let M=oy ();j L0(M,{recursive:!0,mode:448});let v=R L0(M,`${Y x(D)}.json`);if(B L0(v)&&$.overwrite!==!0)throw Error(`Enterprise config already exists: ${v}. Pass "overwrite": true to replace it.`);v L0(v,`${JSON.stringify(P,null,2)}
` ,{mode:384}),T0({id:D,name:F ,corpId:W,domain:G,staffId:L,verified:H,path:v})}async function Y W1( $ ){let I=_ 7( $ ,"token"),z=(m1( $ ,"sealUrl")??m1( $ ,"url")??"").replace(/ \/ + $ /,"");if(!z)throw Error("Missing required JSON field: sealUrl");let q=lZ 0( $ ,"expiresIn")??2592000,U= $ .force===!0|| $ .verify===!1?!1:!0,Y=C L0( $ ),J=U?await Q W1(z,I,E J(Y)):void 0;h L0( $ ,{token:I,sealUrl:z,expiresIn:q,verify:U,remote:J,custom:Y})}function C L0( $ ){return{headers:cy .parse( $ .headers),cookies:dy .parse( $ .cookies)}}async function J W1( $ ,I,z){let q=await l G( $ ),U=B J(q.sealUrl,q.token),Y=await V $ (U),J={user:Y.user,tenant:Y.tenant};o G(q.corpId,J.tenant),h L0({id:q.corpId,corpId:q.corpId,name:I,provider:"hosecloud",overwrite:z},{token:q.token,sealUrl:q.sealUrl,expiresIn:q.expiresIn,verify:!0,remote:J})}function h L0( $ ,I){let{token:z,sealUrl:q,expiresIn:U,verify:Y,remote:J}=I,Q=I.custom??C L0( $ ),w=J?.user,K=J?.tenant,H=m1( $ ,"tenantSlug")??h 7(K?.tenantSlug),G=m1( $ ,"tenantId")??h 7(K?.id),W=m1( $ ,"tenantName")??h 7(K?.name),Z=m1( $ ,"id")??H??G;if(!Z)throw Error("Missing required JSON field: id. Seal whoami did not return tenantSlug or tenantId.");let X=m1( $ ,"staffId")??h 7(w?.providerUserId)??h 7(w?.id)??"seal",L=m1( $ ,"provider")??h 7(w?.provider)??h 7(K?.providerConfig?.provider),D=m1( $ ,"corpId")??H??G??Z,F ={id:Z,name:m1( $ ,"name")??W??Z,environment:"production",seal:{url:q,tenantSlug:H,headers:Q.headers,cookies:Q.cookies,endpoints:{approvalStylePreferences:"api/v1/agent/ai-approval/config"}},source:{type:"seal",token:z,sealUrl:q,expiresIn:U,staffId:X,corpId:D,tenantId:G,tenantSlug:H,tenantName:W,providerUserId:h 7(w?.providerUserId),provider:L},auth:{refreshTtl:300}},T=oy ();j L0(T,{recursive:!0,mode:448});let P=R L0(T, ` $ { Yx ( Z ) } . json ` );if(B L0(P)&& $ .overwrite!==!0)throw Error( ` Enterprise config already exists : $ { P } . Pass "overwrite" : true to replace it . ` );v L0(P, ` $ { JSON . stringify ( F , null , 2 ) }
` ,{mode:384}),T0({id:Z,name:F .name,tenantId:G,tenantSlug:H,verified:Y,path:P})}async function Q W1( $ ,I,z={}){let q=await w W1( ` $ { $ } / api / v1 / auth / me ` ,{...z,authorization: ` Bearer $ { I } ` }),U=KF (q.data);return{user:KF (U.user??q.user),tenant:KF (U.tenant??q.tenant)}}async function w W1( $ ,I={}){let z=await fetch( $ ,{headers:I}),q=await z.text();if(!z.ok)throw Error( ` $ { z . status } $ { q } ` );let U=JSON.parse(q);return KF (U)}function KF ( $ ){return $ &&typeof $ ==="object"&&!Array.isArray( $ )? $ :{}}function h 7( $ ){return typeof $ ==="string"&& $ ? $ :void 0}async function S L0( $ ,I){let z=await l G( $ ),q=B J(z.sealUrl,z.token),U=await V $ (q);o G(z.corpId,U.tenant);let Y=await h z(q,{note:I});T0({tenant:{id:U.tenant.id,name:U.tenant.name,tenantSlug:U.tenant.tenantSlug,corpId:z.corpId},user:{id:U.user.id,name:U.user.name,providerUserId:U.user.providerUserId,isAdmin:U.user.isAdmin},delegation:Y,expiresIn:z.expiresIn})}async function y L0( $ ,I,z,q,U){if( $ ==="list"){await O 0("seal_delegation_list",z,q,{},W0(U.options));return}if( $ ==="create"){let Y=j(U.options.note)??(I?[I,...U.command.slice(2)].join(" "):void 0);await O 0("seal_delegation_create",z,q,{note:Y},W0(U.options));return}if( $ ==="revoke"){let Y=I??j(U.options.tokenId);if(!Y)throw Error("Usage: seal-use delegation revoke <tokenId>");await O 0("seal_delegation_revoke",z,q,{tokenId:Y},W0(U.options));return}throw Error( ` Unknown delegation command : $ { $ ? ? "" } . Run 'seal-use help' for available commands . ` )}import{readFileSync as K W1}from"node:fs";async function u L0( $ ,I,z,q,U,Y){if(! $ || $ ==="help")throw Error( ` Usage : seal - use deploy < system > < action > [ options ]
Please specify 'staffId' , 'staffName' , or 'staffPhone' to explicitly select an account ( or pass force : true to bypass ) . ` )}}}if(!L)if(!H&&Y)L=Y;else throw Error("Missing required parameter: staffId (or proxyStaffBizId). Run 'seal-use corps hose-staffs' to discover available administrators.");let D=m1( $ ,"id")??W,O =Z??W,T=m1( $ ,"sealUrl")?? ` https : //${W.toLowerCase()}.sealai.cc`,P={id:D,name:O ,environment:"production",seal:{url:T,endpoints:{approvalStylePreferences:"api/v1/agent/ai-approval/config"}},source:{type:"hose",domain:G,appKey:z,appSecurity:q,corpId:W,staffId:L},auth:{refreshTtl:300}};if(H)r G(D),await m U(P);let M=eS ();S L0(M,{recursive:!0,mode:448});let v=x L0(M,`${w x(D)}.json`);if(u L0(v)&&$.overwrite!==!0)throw Error(`Enterprise config already exists: ${v}. Pass "overwrite": true to replace it.`);y L0(v,`${JSON.stringify(P,null,2)}
` ,{mode:384}),T0({id:D,name:O ,corpId:W,domain:G,staffId:L,verified:H,path:v})}async function P W1( $ ){let I=h 7( $ ,"token"),z=(m1( $ ,"sealUrl")??m1( $ ,"url")??"").replace(/ \/ + $ /,"");if(!z)throw Error("Missing required JSON field: sealUrl");let q=IX 0( $ ,"expiresIn")??2592000,U= $ .force===!0|| $ .verify===!1?!1:!0,Y=n L0( $ ),J=U?await E W1(z,I,v J(Y)):void 0;b L0( $ ,{token:I,sealUrl:z,expiresIn:q,verify:U,remote:J,custom:Y})}function n L0( $ ){return{headers:rS .parse( $ .headers),cookies:tS .parse( $ .cookies)}}async function T W1( $ ,I,z){let q=await t G( $ ),U=g J(q.sealUrl,q.token),Y=await X $ (U),J={user:Y.user,tenant:Y.tenant};a G(q.corpId,J.tenant),b L0({id:q.corpId,corpId:q.corpId,name:I,provider:"hosecloud",overwrite:z},{token:q.token,sealUrl:q.sealUrl,expiresIn:q.expiresIn,verify:!0,remote:J})}function b L0( $ ,I){let{token:z,sealUrl:q,expiresIn:U,verify:Y,remote:J}=I,Q=I.custom??n L0( $ ),w=J?.user,K=J?.tenant,H=m1( $ ,"tenantSlug")??S 7(K?.tenantSlug),G=m1( $ ,"tenantId")??S 7(K?.id),W=m1( $ ,"tenantName")??S 7(K?.name),Z=m1( $ ,"id")??H??G;if(!Z)throw Error("Missing required JSON field: id. Seal whoami did not return tenantSlug or tenantId.");let X=m1( $ ,"staffId")??S 7(w?.providerUserId)??S 7(w?.id)??"seal",L=m1( $ ,"provider")??S 7(w?.provider)??S 7(K?.providerConfig?.provider),D=m1( $ ,"corpId")??H??G??Z,O ={id:Z,name:m1( $ ,"name")??W??Z,environment:"production",seal:{url:q,tenantSlug:H,headers:Q.headers,cookies:Q.cookies,endpoints:{approvalStylePreferences:"api/v1/agent/ai-approval/config"}},source:{type:"seal",token:z,sealUrl:q,expiresIn:U,staffId:X,corpId:D,tenantId:G,tenantSlug:H,tenantName:W,providerUserId:S 7(w?.providerUserId),provider:L},auth:{refreshTtl:300}},T=eS ();S L0(T,{recursive:!0,mode:448});let P=x L0(T, ` $ { wx ( Z ) } . json ` );if(u L0(P)&& $ .overwrite!==!0)throw Error( ` Enterprise config already exists : $ { P } . Pass "overwrite" : true to replace it . ` );y L0(P, ` $ { JSON . stringify ( O , null , 2 ) }
` ,{mode:384}),T0({id:Z,name:O .name,tenantId:G,tenantSlug:H,verified:Y,path:P})}async function E W1( $ ,I,z={}){let q=await B W1( ` $ { $ } / api / v1 / auth / me ` ,{...z,authorization: ` Bearer $ { I } ` }),U=VO (q.data);return{user:VO (U.user??q.user),tenant:VO (U.tenant??q.tenant)}}async function B W1( $ ,I={}){let z=await fetch( $ ,{headers:I}),q=await z.text();if(!z.ok)throw Error( ` $ { z . status } $ { q } ` );let U=JSON.parse(q);return VO (U)}function VO ( $ ){return $ &&typeof $ ==="object"&&!Array.isArray( $ )? $ :{}}function S 7( $ ){return typeof $ ==="string"&& $ ? $ :void 0}async function i L0( $ ,I){let z=await t G( $ ),q=g J(z.sealUrl,z.token),U=await X $ (q);a G(z.corpId,U.tenant);let Y=await S z(q,{note:I});T0({tenant:{id:U.tenant.id,name:U.tenant.name,tenantSlug:U.tenant.tenantSlug,corpId:z.corpId},user:{id:U.user.id,name:U.user.name,providerUserId:U.user.providerUserId,isAdmin:U.user.isAdmin},delegation:Y,expiresIn:z.expiresIn})}async function p L0( $ ,I,z,q,U){if( $ ==="list"){await F 0("seal_delegation_list",z,q,{},W0(U.options));return}if( $ ==="create"){let Y=j(U.options.note)??(I?[I,...U.command.slice(2)].join(" "):void 0);await F 0("seal_delegation_create",z,q,{note:Y},W0(U.options));return}if( $ ==="revoke"){let Y=I??j(U.options.tokenId);if(!Y)throw Error("Usage: seal-use delegation revoke <tokenId>");await F 0("seal_delegation_revoke",z,q,{tokenId:Y},W0(U.options));return}throw Error( ` Unknown delegation command : $ { $ ? ? "" } . Run 'seal-use help' for available commands . ` )}import{readFileSync as j W1}from"node:fs";async function c L0( $ ,I,z,q,U,Y){if(! $ || $ ==="help")throw Error( ` Usage : seal - use deploy < system > < action > [ options ]
` + ` 支持的审批系统与发布目标 :
` + ` • hosecloud ( 合思费控 ) : seal - use deploy hosecloud < requirements | list | get | status | configure | sync > -- corp < corpId >
@@ -344,14 +667,14 @@ Please specify 'staffId', 'staffName', or 'staffPhone' to explicitly select an a
` + ` • feishu ( 飞书审批 ) : 建议使用 Webhook 模式对接
` + ` • weaver ( 泛微 OA ) : 建议使用 Webhook 模式对接
` + ` • helios ( 汇联易 ) : 建议使用 Webhook 模式对接
` +" • maycur (每刻报销): 建议使用 Webhook 模式对接");if( $ ==="webhook"|| $ ==="webhooks")throw Error("Webhook 审批流发布请直接使用专有命令:seal-use webhook <list|get|add|update|delete> --corp <corpId>");if( $ ==="feishu"|| $ ==="lark")throw Error("飞书审批发布:建议使用 Webhook 通用发布模式对接。命令:seal-use webhook add --name '飞书审批' --result-url <url> --corp <corpId>");if( $ ==="weaver")throw Error("泛微 OA 发布:建议使用 Webhook 通用发布模式对接。命令:seal-use webhook add --name '泛微OA' --result-url <url> --corp <corpId>");if( $ ==="maycur"|| $ ==="helios"){let K= $ ==="maycur"?"每刻报销":"汇联易";throw Error( ` $ { K } 发布 : 目前可通过 Webhook 模式接入 。 命令 : seal - use webhook add -- name '${K}' -- result - url < url > -- corp < corpId > ` )}let J= $ ==="hosecloud",Q= $ ==="hosecloud"?I: $ ,w= $ ==="hosecloud"?z:I;if(!J)throw Error( ` 未知的发布目标系统 : $ { $ } 。 当前支持 : hosecloud ( 合思费控 ) 与 webhook ( 通用回调 ) 。 ` );if(Q==="requirements"){await O 0("seal_deploy_hosecloud_requirements",q,U,{},W0(Y.options));return}if(Q==="list"){await O 0("seal_deploy_hosecloud_list",q,U,{},W0(Y.options));return}if(Q==="get"){let K=w??j(Y.options.signKey)??j(Y.options["sign-key"]);if(!K){let G=((await P1(q)).integrations??[]).filter((W)=>W.type==="hosecloud");if(G.length===0)throw Error( ` 当前企业 ( $ { U . name } ) 尚未添加合思发布配置 。
` +" • maycur (每刻报销): 建议使用 Webhook 模式对接");if( $ ==="webhook"|| $ ==="webhooks")throw Error("Webhook 审批流发布请直接使用专有命令:seal-use webhook <list|get|add|update|delete> --corp <corpId>");if( $ ==="feishu"|| $ ==="lark")throw Error("飞书审批发布:建议使用 Webhook 通用发布模式对接。命令:seal-use webhook add --name '飞书审批' --result-url <url> --corp <corpId>");if( $ ==="weaver")throw Error("泛微 OA 发布:建议使用 Webhook 通用发布模式对接。命令:seal-use webhook add --name '泛微OA' --result-url <url> --corp <corpId>");if( $ ==="maycur"|| $ ==="helios"){let K= $ ==="maycur"?"每刻报销":"汇联易";throw Error( ` $ { K } 发布 : 目前可通过 Webhook 模式接入 。 命令 : seal - use webhook add -- name '${K}' -- result - url < url > -- corp < corpId > ` )}let J= $ ==="hosecloud",Q= $ ==="hosecloud"?I: $ ,w= $ ==="hosecloud"?z:I;if(!J)throw Error( ` 未知的发布目标系统 : $ { $ } 。 当前支持 : hosecloud ( 合思费控 ) 与 webhook ( 通用回调 ) 。 ` );if(Q==="requirements"){await F 0("seal_deploy_hosecloud_requirements",q,U,{},W0(Y.options));return}if(Q==="list"){await F 0("seal_deploy_hosecloud_list",q,U,{},W0(Y.options));return}if(Q==="get"){let K=w??j(Y.options.signKey)??j(Y.options["sign-key"]);if(!K){let G=((await P1(q)).integrations??[]).filter((W)=>W.type==="hosecloud");if(G.length===0)throw Error( ` 当前企业 ( $ { U . name } ) 尚未添加合思发布配置 。
` + ` \uD83D\uDC49 请先运行配置命令 : seal - use deploy hosecloud configure -- json '{...}' -- corp $ { U . id } ` );console.error( ` Usage : seal - use deploy hosecloud get < sign - key > [ -- corp $ { U . id } ]
` ),console.error("ℹ ️ 当前企业发现以下可用的合思配置卡片:");for(let W of G){let Z=W.outboundName??"SealAI 审批",X=W.signKey,L=W.apiOrigin??"production";console.error( ` • "${Z}" ( signKey : $ { X } , 环境 : $ { L } ) ` ),console.error( ` \uD83D\uDC49 查看命令 : seal - use deploy hosecloud get $ { X } -- corp $ { U . id }
` )}throw new U $ ("缺少必需参数 <sign-key>。请从上述候选列表中选择并指定 signKey。",2,G.length===1? ` seal - use deploy hosecloud get $ { G [ 0 ] . signKey } -- corp $ { U . id } ` :void 0)}await O 0("seal_deploy_hosecloud_get",q,U,{signKey:K},W0(Y.options));return}if(Q==="status"){await O 0("seal_deploy_hosecloud_status",q,U,{},W0(Y.options));return}if(Q==="configure"){let K=j(Y.options.input),H=K?JSON.parse(K W1(K,"utf8")):J $ (Y.json);if(!H||Object.keys(H).length===0)throw Error("Usage: seal-use deploy hosecloud configure --json '{...}' or --input <file>");await O 0("seal_deploy_hosecloud_configure",q,U,{...H,dryRun:V0(Y.options.dryRun)??V0(Y.options["dry-run"])},W0(Y.options));return}if(Q==="sync"){let K=w??j(Y.options.signKey)??j(Y.options["sign-key"]),H=V0(Y.options.auto)??V0(Y.options.yes);if(!K){let W=((await P1(q)).integrations??[]).filter((X)=>X.type==="hosecloud");if(W.length===0)throw Error( ` 当前企业 ( $ { U . name } ) 尚未添加合思发布配置 。
` + ` \uD83D\uDC49 请先运行配置命令 : seal - use deploy hosecloud configure -- json '{...}' -- corp $ { U . id } ` );let Z=W[0];if(Z&&W.length===1&&H){let X=Z.signKey;console.error( ` ℹ ️ [ auto ] 检测到企业仅有 1 个合思配置 , 已自动选择 ( signKey : $ { X } ) ` ),await O 0("seal_deploy_hosecloud_sync",q,U,{signKey:X},W0(Y.options));return}console.error( ` Usage : seal - use deploy hosecloud sync < sign - key > [ -- corp $ { U . id } ]
` ),console.error("ℹ ️ 当前企业发现以下可用的合思配置卡片:");for(let X of W){let L=X.outboundName??"SealAI 审批",D=X.signKey,F =X.apiOrigin??"production";console.error( ` • "${L}" ( signKey : $ { D } , 环境 : $ { F } ) ` ),console.error( ` \uD83D\uDC49 同步命令 : seal - use deploy hosecloud sync $ { D } -- corp $ { U . id }
` )}throw new J $ ("缺少必需参数 <sign-key>。请从上述候选列表中选择并指定 signKey。",2,G.length===1? ` seal - use deploy hosecloud get $ { G [ 0 ] . signKey } -- corp $ { U . id } ` :void 0)}await F 0("seal_deploy_hosecloud_get",q,U,{signKey:K},W0(Y.options));return}if(Q==="status"){await F 0("seal_deploy_hosecloud_status",q,U,{},W0(Y.options));return}if(Q==="configure"){let K=j(Y.options.input),H=K?JSON.parse(j W1(K,"utf8")):w $ (Y.json);if(!H||Object.keys(H).length===0)throw Error("Usage: seal-use deploy hosecloud configure --json '{...}' or --input <file>");await F 0("seal_deploy_hosecloud_configure",q,U,{...H,dryRun:V0(Y.options.dryRun)??V0(Y.options["dry-run"])},W0(Y.options));return}if(Q==="sync"){let K=w??j(Y.options.signKey)??j(Y.options["sign-key"]),H=V0(Y.options.auto)??V0(Y.options.yes);if(!K){let W=((await P1(q)).integrations??[]).filter((X)=>X.type==="hosecloud");if(W.length===0)throw Error( ` 当前企业 ( $ { U . name } ) 尚未添加合思发布配置 。
` + ` \uD83D\uDC49 请先运行配置命令 : seal - use deploy hosecloud configure -- json '{...}' -- corp $ { U . id } ` );let Z=W[0];if(Z&&W.length===1&&H){let X=Z.signKey;console.error( ` ℹ ️ [ auto ] 检测到企业仅有 1 个合思配置 , 已自动选择 ( signKey : $ { X } ) ` ),await F 0("seal_deploy_hosecloud_sync",q,U,{signKey:X},W0(Y.options));return}console.error( ` Usage : seal - use deploy hosecloud sync < sign - key > [ -- corp $ { U . id } ]
` ),console.error("ℹ ️ 当前企业发现以下可用的合思配置卡片:");for(let X of W){let L=X.outboundName??"SealAI 审批",D=X.signKey,O =X.apiOrigin??"production";console.error( ` • "${L}" ( signKey : $ { D } , 环境 : $ { O } ) ` ),console.error( ` \uD83D\uDC49 同步命令 : seal - use deploy hosecloud sync $ { D } -- corp $ { U . id }
` )}if(W.length===1)console.error( ` \uD83D\uDCA1 提示 : 若希望单配置自动同步 , 可附加 -- auto 参数 : seal - use deploy hosecloud sync -- auto -- corp $ { U . id }
` );throw new U $ ("缺少必需参数 <sign-key>。请从上述候选列表中选择并指定 signKey 执行同步。",2,W.length===1? ` seal - use deploy hosecloud sync $ { W [ 0 ] . signKey } -- corp $ { U . id } ` :void 0)}await O 0("seal_deploy_hosecloud_sync",q,U,{signKey:K},W0(Y.options));return}throw Error( ` Unknown deploy hosecloud action : $ { Q ? ? "" } . Available : requirements , list , get , status , configure , sync . ` )}import{accessSync as T W1,constants as E W1,existsSync as T $ ,readdirSync as B W1}from"node:fs";import{homedir as j W1}from"node:os";import{join as z 9}from"node:path";import{existsSync as N x,mkdirSync as oL 0,rmSync as M W1,writeFileSync as A W1}from"node:fs";import{homedir as rL 0}from"node:os";import{dirname as P W1,join as M x}from"node:path";var x L0= ` -- -
` );throw new J $ ("缺少必需参数 <sign-key>。请从上述候选列表中选择并指定 signKey 执行同步。",2,W.length===1? ` seal - use deploy hosecloud sync $ { W [ 0 ] . signKey } -- corp $ { U . id } ` :void 0)}await F 0("seal_deploy_hosecloud_sync",q,U,{signKey:K},W0(Y.options));return}throw Error( ` Unknown deploy hosecloud action : $ { Q ? ? "" } . Available : requirements , list , get , status , configure , sync . ` )}import{accessSync as i W1,constants as p W1,existsSync as E6 ,readdirSync as c W1}from"node:fs";import{homedir as d W1}from"node:os";import{join as Y 9}from"node:path";import{existsSync as P x,mkdirSync as zD 0,rmSync as f W1,writeFileSync as n W1}from"node:fs";import{homedir as qD 0}from"node:os";import{dirname as b W1,join as T x}from"node:path";var d L0= ` -- -
name : seal - use
description : "v0.10.18: Use for Seal Use first-time enterprise onboarding, Hose/合思 or Seal-native authentication, assistance links and browser cURL intake, plus tenant approval operations, diagnosis, simulation, rules, users, configuration, and search."
metadata :
@@ -541,11 +864,11 @@ seal-use tool seal_approval_search --corp <corpId> --json '{"keywords":["差旅"
# # Safety
Rule , document , style preference , and publish actions mutate Seal configuration . Make the target enterprise explicit , show the intended payload , and verify after the write . Never send real \ ` enterprises/*.json \` files, tokens, signed URLs, or full raw documents to GitHub, tickets, logs, or chat unless the user explicitly requests a safe export.
` ;var k L0= ` interface :
` ;var m L0= ` interface :
display _name : "Seal Use"
short _description : "Diagnose approval feedback and publish minimal rule fixes"
default _prompt : "Use $seal-use to resolve a customer feedback package to the correct tenant, diagnose the approval run, propose a minimal rule diff, and publish only after explicit confirmation."
` ;var f L0= ` # Rule Lightweight Queries
` ;var l L0= ` # Rule Lightweight Queries
Use this reference when the user wants rule counts , compact rule lists , one rule from a historical version , or approval knowledge search without dumping hundreds of rule descriptions .
@@ -656,7 +979,7 @@ Use current search only when the question is about current draft/current knowled
# # Output Discipline
If a rule command would return many descriptions or more than about 20 rules , use \ ` rules count \` , \` rules list --summary \` , \` fields \` , \` snippetOnly \` , or \` --output-file \` . Use \` --full \` only for deliberate exports.
` ;var n L0= ` # Approval Bad Case Catalog
` ;var o L0= ` # Approval Bad Case Catalog
Use this file only as a comparison catalog after inspecting the current trace . Do not treat any case below as a default diagnosis .
@@ -706,7 +1029,7 @@ Important nuance:
- This is a bad - case pattern , not a general rule that every amount - total dispute is caused by \ ` pre_analysis \` .
- Use it when the current trace shows recognized amounts being excluded downstream or duplicate attachments producing inconsistent conclusions .
` ;var bL0="# Seal Use CLI Reference \n \n Run from any directory after installing the global CLI: \n \n ` ` ` bash \ nseal - use < command > \ n ` ` ` \n \n Enterprise config lookup: \n \n - If ` SEAL _USE _ENTERPRISES _DIR ` is set, only that directory is loaded. \n - Otherwise the user-level ` ~ / . c o n f i g / s e a l - u s e / e n t e r p r i s e s ` d i r e c t o r y i s l o a d e d . A c o n f i g u r e d \ n ` t e s t E n t e r p r i s e s D i r ` i s l o a d e d f i r s t f o r t e s t - t e n a n t w o r k f l o w s . T h e c u r r e n t w o r k i n g d i r e c t o r y ' s \ n ` . / e n t e r p r i s e s ` d i r e c t o r y i s n o t l o a d e d i m p l i c i t l y . \ n - S e t ` S E A L _ U S E _ E N T E R P R I S E S _ D I R ` t o u s e o n e e x p l i c i t d i r e c t o r y i n s t e a d . L e g a c y \ n ` ~ / . c o n f i g / s e a l - h o m e / e n t e r p r i s e s ` f i l e s a r e m i g r a t e d t o t h e p r i m a r y d i r e c t o r y w h e n p o s s i b l e . \ n \ n E n t e r p r i s e s e l e c t i o n i s s t a t e l e s s b y d e f a u l t . C o m m a n d s t h a t a c c e s s a n e n t e r p r i s e r e q u i r e \ n ` - - c o r p < c o r p I d > ` u n l e s s s t a t e f u l m o d e i s e x p l i c i t l y e n a b l e d : \ n \ n ` ` ` b a s h \ n s e a l - u s e c o n f i g m o d e s t a t e f u l - - c o r p < c o r p I d > \ n s e a l - u s e c o r p s s w i t c h < c o r p I d > \ n s e a l - u s e c o n f i g m o d e s t a t e l e s s \ n ` ` ` \ n \ n T h e g l o b a l m o d e i s s t o r e d i n ` ~ / . c o n f i g / s e a l - u s e / c o n f i g . j s o n ` ; s e t ` S E A L _ U S E _ C O N F I G _ F I L E ` t o \ n o v e r r i d e t h a t p a t h . T h e l e g a c y ` c u r r e n t - c o r p ` f i l e i s n o t r e a d . \ n \ n # # S t r e a m & E x i t C o d e C o n t r a c t \ n \ n - * * ` s t d o u t ` * * : P u r e , d e t e r m i n i s t i c J S O N f o r m a c h i n e / A g e n t p a r s i n g . \ n - * * ` s t d e r r ` * * : D i a g n o s t i c s , p r o b i n g l o g s , a n d * * N e x t - S t e p C o m m a n d S u g g e s t i o n s * * w i t h t h e s t a b l e p r e f i x ` 👉 N e x t a c t i o n : s e a l - u s e . . . ` . \ n - * * ` E x i t C o d e ` * * : ` 0 ` o n s u c c e s s ; ` 1 ` r u n t i m e / u p s t r e a m f a i l u r e , ` 2 ` u s a g e / a r g u m e n t e r r o r , ` 1 0 ` e x p l i c i t d e s t r u c t i v e - o p e r a t i o n c o n f i r m a t i o n r e q u i r e d , ` 1 1 ` m i s s i n g / i n v a l i d a u t h e n t i c a t i o n , a n d ` 1 2 ` o u t p u t p r o t e c t i o n r e q u i r i n g a c o m p a c t / f i l e / q u e r y a l t e r n a t i v e . \ n \ n # # T o p - L e v e l C o m m a n d s \ n \ n ` ` ` b a s h \ n s e a l - u s e v e r s i o n \ n s e a l - u s e c o n f i g p a t h s \ n s e a l - u s e c o n f i g g e t \ n s e a l - u s e c o n f i g m o d e < s t a t e f u l | s t a t e l e s s > [ - - c o r p < c o r p I d > ] \ n s e a l - u s e c o n f i g t e s t - d i r [ < p a t h > | - - c l e a r ] \ n s e a l - u s e c o n f i g l i n t < e n a b l e | d i s a b l e | s t a t u s > [ - - l i n t e r < n a m e > ] [ - - m i n - s c o r e < s c o r e > ] \ n s e a l - u s e r u l e s c o u n t [ - - c o r p < c o r p I d > ] \ n s e a l - u s e r u l e s l i s t [ - - s u m m a r y ] [ - - c o u n t ] [ - - l i m i t 2 0 ] [ - - o f f s e t 0 ] [ - - c o r p < c o r p I d > ] \ n s e a l - u s e r u l e s c l e a r [ - - c o r p < c o r p I d > ] [ - - d r y - r u n | - - y e s ] \ n s e a l - u s e r u l e s v e r s i o n s [ - - c o r p < c o r p I d > ] \ n s e a l - u s e r u l e s v e r s i o n < v e r s i o n I d | v e r s i o n N u m b e r | l a t e s t > [ - - c o r p < c o r p I d > ] \ n s e a l - u s e r u l e s g e t - - c o r p < c o r p I d > - - v e r s i o n < n u m b e r | l a t e s t > - - c o d e ' # 0 0 3 8 ' \ n s e a l - u s e r u l e s g e t - - c o r p < c o r p I d > - - r e c o r d - i d < r e c o r d I d > - - r u n t i m e - i d r u l e - 2 0 5 \ n s e a l - u s e r u l e s s e a r c h < k e y w o r d > [ - - v e r s i o n < v e r s i o n I d | v e r s i o n N u m b e r | l a t e s t > ] [ - - m a x R e s u l t s 2 0 ] [ - - c o r p < c o r p I d > ] \ n s e a l - u s e r u l e s p u l l [ - - c o r p < c o r p I d > ] [ - - v e r s i o n < i d | n u m | l a t e s t > ] [ - - o u t < f i l e > ] \ n s e a l - u s e r u l e s l i n t [ - - f i l e < p a t h > ] [ - - c o r p < c o r p I d > ] [ - - l i n t e r < n a m e | p a t h > ] [ - - v e r s i o n < n u m > ] [ - - c o d e < c o d e > ] [ - - m i n - s c o r e < s c o r e > ] [ - - s u m m a r y ] \ n s e a l - u s e r u l e s p u s h [ - - f i l e < p a t h > ] [ - - c o r p < c o r p I d > ] [ - - p u b l i s h ] [ - - v e r s i o n - n a m e < n a m e > ] [ - - d r y - r u n | - - y e s ] \ n s e a l - u s e r u l e s m a p [ - - c o r p < c o r p I d > ] [ - - v e r s i o n < i d | n u m | l a t e s t > ] [ - - c o d e < c o d e > ] \ n s e a l - u s e s e r v i c e < s t a r t | s t o p | r e s t a r t | s t a t u s | l o g s > [ - - p o r t 8 7 8 7 ] [ - - h o s t 1 2 7 . 0 . 0 . 1 ] [ - - l i n e s 5 0 ] \ n s e a l - u s e h t t p [ - - p o r t 8 7 8 7 ] [ - - h o s t 1 2 7 . 0 . 0 . 1 ] \ n s e a l - u s e s e r v e [ - - p o r t 8 7 8 7 ] \ n s e a l - u s e u p d a t e [ - - c h e c k ] [ - - f o r c e ] [ - - v e r s i o n < v > ] \ n s e a l - u s e u p d a t e c h e c k \ n s e a l - u s e u p d a t e c h a n g e l o g [ - - l i m i t < n > ] \ n s e a l - u s e c h a n g e l o g [ - - l i m i t < n > ] \ n s e a l - u s e m c p \ n s e a l - u s e m c p c o n f i g \ n s e a l - u s e m c p - c o n f i g \ n s e a l - u s e s k i l l d u m p \ n s e a l - u s e s k i l l i n s t a l l [ - - d i r < p a t h > | - - l o c a l ] \ n s e a l - u s e s k i l l s t a t u s \ n s e a l - u s e o p e n a p i \ n s e a l - u s e d o c t o r [ - - q u i e t ] \ n s e a l - u s e d o c t o r g u i d e \ n s e a l - u s e d o c t o r p a t h s \ n s e a l - u s e p r o b e [ < c o r p I d > ] \ n s e a l - u s e t o o l s l i s t \ n s e a l - u s e c o r p s l i s t [ q u e r y ] [ - - e n v < p r o d u c t i o n | t e s t > ] [ - - s t r i c t ] [ - - c o r p < c o r p I d > ] \ n s e a l - u s e c o r p s s e a r c h < q u e r y > [ - - e n v < p r o d u c t i o n | t e s t > ] [ - - s t r i c t ] \ n s e a l - u s e c o r p s g e t < c o r p I d > \ n s e a l - u s e c o r p s c u r r e n t [ - - c o r p < c o r p I d > ] \ n s e a l - u s e c o r p s s w i t c h < c o r p I d > \ n s e a l - u s e c o r p s m a r k < c o r p I d > - - e n v < p r o d u c t i o n | t e s t > [ - - c o n f i r m ] \ n s e a l - u s e c o r p s b i n d - t e s t < p r o d C o r p I d > < t e s t C o r p I d > [ - - c o n f i r m ] [ - - f o r c e ] \ n s e a l - u s e c o r p s u n b i n d - t e s t [ < c o r p I d > ] [ - - c o n f i r m ] \ n s e a l - u s e c o r p s s y n c - t e s t [ < p r o d C o r p I d > ] [ - - d r y - r u n ] [ - - y e s ] [ - - v e r s i o n - n a m e < n a m e > ] \ n s e a l - u s e c o r p s r e p l a y - t e s t [ < p r o d C o r p I d > ] [ - - r e c o r d - i d < i d > ] [ - - s n < s n > ] [ - - l i m i t < n > ] [ - - s t a t u s < s t a t u s > ] [ - - w e b h o o k < i d O r N a m e > ] [ - - s n - s u f f i x < s t r > ] [ - - d r y - r u n ] [ - - f o r c e ] \ n s e a l - u s e c o r p s a d d - h o s e - - j s o n ' { \ " n a m e \ " : \ " 企 业 名 称 \ " , \ " d o m a i n \ " : \ " h t t p s : / / a p p . e k u a i b a o . c o m \ " , \ " a p p K e y \ " : \ " . . . \ " , \ " a p p S e c u r i t y \ " : \ " . . . \ " , \ " p r o x y S t a f f B i z I d \ " : \ " c o r p I d : s t a f f I d \ " } ' \ n s e a l - u s e c o r p s a d d - s e a l - - j s o n ' { \ " s e a l U r l \ " : \ " h t t p s : / / t e n a n t . s e a l a i . c c \ " , \ " t o k e n \ " : \ " s e a l - b e a r e r - t o k e n \ " } ' \ n s e a l - u s e c o r p s a d d - l i n k < h t t p s : / / . . . / w e b / t h i r d p a r t y . h t m l ? . . . > [ - - n a m e < c u s t o m N a m e > ] [ - - o v e r w r i t e ] \ n s e a l - u s e a u t h d i a g n o s e [ - - c o r p < c o r p I d > ] \ n s e a l - u s e a u t h h o s e - l i n k [ - - c o r p < c o r p I d > ] [ - - e x p i r e 7 2 0 0 ] \ n s e a l - u s e d e l e g a t i o n l i s t [ - - c o r p < c o r p I d > ] \ n s e a l - u s e d e l e g a t i o n c r e a t e [ - - n o t e < n o t e > ] [ - - f r o m - l i n k < u r l > ] [ - - c o r p < c o r p I d > ] \ n s e a l - u s e d e l e g a t i o n r e v o k e < t o k e n I d > [ - - c o r p < c o r p I d > ] \ n s e a l - u s e u s e r s c r e a t e - - n a m e < n a m e > - - p h o n e < p h o n e > [ - - d e p t < d e p t I d > ] [ - - c o r p < c o r p I d > ] \ n s e a l - u s e u s e r s s e a r c h < k e y w o r d > Line truncated
` ;var rL0="# Seal Use CLI Reference \n \n Run from any directory after installing the global CLI: \n \n ` ` ` bash \ nseal - use < command > \ n ` ` ` \n \n Enterprise config lookup: \n \n - If ` SEAL _USE _ENTERPRISES _DIR ` is set, only that directory is loaded. \n - Otherwise the user-level ` ~ / . c o n f i g / s e a l - u s e / e n t e r p r i s e s ` d i r e c t o r y i s l o a d e d . A c o n f i g u r e d \ n ` t e s t E n t e r p r i s e s D i r ` i s l o a d e d f i r s t f o r t e s t - t e n a n t w o r k f l o w s . T h e c u r r e n t w o r k i n g d i r e c t o r y ' s \ n ` . / e n t e r p r i s e s ` d i r e c t o r y i s n o t l o a d e d i m p l i c i t l y . \ n - S e t ` S E A L _ U S E _ E N T E R P R I S E S _ D I R ` t o u s e o n e e x p l i c i t d i r e c t o r y i n s t e a d . L e g a c y \ n ` ~ / . c o n f i g / s e a l - h o m e / e n t e r p r i s e s ` f i l e s a r e m i g r a t e d t o t h e p r i m a r y d i r e c t o r y w h e n p o s s i b l e . \ n \ n E n t e r p r i s e s e l e c t i o n i s s t a t e l e s s b y d e f a u l t . C o m m a n d s t h a t a c c e s s a n e n t e r p r i s e r e q u i r e \ n ` - - c o r p < c o r p I d > ` u n l e s s s t a t e f u l m o d e i s e x p l i c i t l y e n a b l e d : \ n \ n ` ` ` b a s h \ n s e a l - u s e c o n f i g m o d e s t a t e f u l - - c o r p < c o r p I d > \ n s e a l - u s e c o r p s s w i t c h < c o r p I d > \ n s e a l - u s e c o n f i g m o d e s t a t e l e s s \ n ` ` ` \ n \ n T h e g l o b a l m o d e i s s t o r e d i n ` ~ / . c o n f i g / s e a l - u s e / c o n f i g . j s o n ` ; s e t ` S E A L _ U S E _ C O N F I G _ F I L E ` t o \ n o v e r r i d e t h a t p a t h . T h e l e g a c y ` c u r r e n t - c o r p ` f i l e i s n o t r e a d . \ n \ n # # S t r e a m & E x i t C o d e C o n t r a c t \ n \ n - * * ` s t d o u t ` * * : P u r e , d e t e r m i n i s t i c J S O N f o r m a c h i n e / A g e n t p a r s i n g . \ n - * * ` s t d e r r ` * * : D i a g n o s t i c s , p r o b i n g l o g s , a n d * * N e x t - S t e p C o m m a n d S u g g e s t i o n s * * w i t h t h e s t a b l e p r e f i x ` 👉 N e x t a c t i o n : s e a l - u s e . . . ` . \ n - * * ` E x i t C o d e ` * * : ` 0 ` o n s u c c e s s ; ` 1 ` r u n t i m e / u p s t r e a m f a i l u r e , ` 2 ` u s a g e / a r g u m e n t e r r o r , ` 1 0 ` e x p l i c i t d e s t r u c t i v e - o p e r a t i o n c o n f i r m a t i o n r e q u i r e d , ` 1 1 ` m i s s i n g / i n v a l i d a u t h e n t i c a t i o n , a n d ` 1 2 ` o u t p u t p r o t e c t i o n r e q u i r i n g a c o m p a c t / f i l e / q u e r y a l t e r n a t i v e . \ n \ n # # T o p - L e v e l C o m m a n d s \ n \ n ` ` ` b a s h \ n s e a l - u s e v e r s i o n \ n s e a l - u s e c o n f i g p a t h s \ n s e a l - u s e c o n f i g g e t \ n s e a l - u s e c o n f i g m o d e < s t a t e f u l | s t a t e l e s s > [ - - c o r p < c o r p I d > ] \ n s e a l - u s e c o n f i g t e s t - d i r [ < p a t h > | - - c l e a r ] \ n s e a l - u s e c o n f i g l i n t < e n a b l e | d i s a b l e | s t a t u s > [ - - l i n t e r < n a m e > ] [ - - m i n - s c o r e < s c o r e > ] \ n s e a l - u s e r u l e s c o u n t [ - - c o r p < c o r p I d > ] \ n s e a l - u s e r u l e s l i s t [ - - s u m m a r y ] [ - - c o u n t ] [ - - l i m i t 2 0 ] [ - - o f f s e t 0 ] [ - - c o r p < c o r p I d > ] \ n s e a l - u s e r u l e s c l e a r [ - - c o r p < c o r p I d > ] [ - - d r y - r u n | - - y e s ] \ n s e a l - u s e r u l e s v e r s i o n s [ - - c o r p < c o r p I d > ] \ n s e a l - u s e r u l e s v e r s i o n < v e r s i o n I d | v e r s i o n N u m b e r | l a t e s t > [ - - c o r p < c o r p I d > ] \ n s e a l - u s e r u l e s g e t - - c o r p < c o r p I d > - - v e r s i o n < n u m b e r | l a t e s t > - - c o d e ' # 0 0 3 8 ' \ n s e a l - u s e r u l e s g e t - - c o r p < c o r p I d > - - r e c o r d - i d < r e c o r d I d > - - r u n t i m e - i d r u l e - 2 0 5 \ n s e a l - u s e r u l e s s e a r c h < k e y w o r d > [ - - v e r s i o n < v e r s i o n I d | v e r s i o n N u m b e r | l a t e s t > ] [ - - m a x R e s u l t s 2 0 ] [ - - c o r p < c o r p I d > ] \ n s e a l - u s e r u l e s p u l l [ - - c o r p < c o r p I d > ] [ - - v e r s i o n < i d | n u m | l a t e s t > ] [ - - o u t < f i l e > ] \ n s e a l - u s e r u l e s l i n t [ - - f i l e < p a t h > ] [ - - c o r p < c o r p I d > ] [ - - l i n t e r < n a m e | p a t h > ] [ - - v e r s i o n < n u m > ] [ - - c o d e < c o d e > ] [ - - m i n - s c o r e < s c o r e > ] [ - - s u m m a r y ] \ n s e a l - u s e r u l e s l i n t e r s [ - - c o r p < c o r p I d > ] \ n s e a l - u s e r u l e s p u s h [ - - f i l e < p a t h > ] [ - - c o r p < c o r p I d > ] [ - - p u b l i s h ] [ - - v e r s i o n - n a m e < n a m e > ] [ - - d r y - r u n | - - y e s ] \ n s e a l - u s e r u l e s m a p [ - - c o r p < c o r p I d > ] [ - - v e r s i o n < i d | n u m | l a t e s t > ] [ - - c o d e < c o d e > ] \ n s e a l - u s e s e r v i c e < s t a r t | s t o p | r e s t a r t | s t a t u s | l o g s > [ - - p o r t 8 7 8 7 ] [ - - h o s t 1 2 7 . 0 . 0 . 1 ] [ - - l i n e s 5 0 ] \ n s e a l - u s e h t t p [ - - p o r t 8 7 8 7 ] [ - - h o s t 1 2 7 . 0 . 0 . 1 ] \ n s e a l - u s e s e r v e [ - - p o r t 8 7 8 7 ] \ n s e a l - u s e u p d a t e [ - - c h e c k ] [ - - f o r c e ] [ - - v e r s i o n < v > ] \ n s e a l - u s e u p d a t e c h e c k \ n s e a l - u s e u p d a t e c h a n g e l o g [ - - l i m i t < n > ] \ n s e a l - u s e c h a n g e l o g [ - - l i m i t < n > ] \ n s e a l - u s e m c p \ n s e a l - u s e m c p c o n f i g \ n s e a l - u s e m c p - c o n f i g \ n s e a l - u s e s k i l l d u m p \ n s e a l - u s e s k i l l i n s t a l l [ - - d i r < p a t h > | - - l o c a l ] \ n s e a l - u s e s k i l l s t a t u s \ n s e a l - u s e o p e n a p i \ n s e a l - u s e d o c t o r [ - - q u i e t ] \ n s e a l - u s e d o c t o r g u i d e \ n s e a l - u s e d o c t o r p a t h s \ n s e a l - u s e p r o b e [ < c o r p I d > ] \ n s e a l - u s e t o o l s l i s t \ n s e a l - u s e c o r p s l i s t [ q u e r y ] [ - - e n v < p r o d u c t i o n | t e s t > ] [ - - s t r i c t ] [ - - c o r p < c o r p I d > ] \ n s e a l - u s e c o r p s s e a r c h < q u e r y > [ - - e n v < p r o d u c t i o n | t e s t > ] [ - - s t r i c t ] \ n s e a l - u s e c o r p s g e t < c o r p I d > \ n s e a l - u s e c o r p s c u r r e n t [ - - c o r p < c o r p I d > ] \ n s e a l - u s e c o r p s s w i t c h < c o r p I d > \ n s e a l - u s e c o r p s m a r k < c o r p I d > - - e n v < p r o d u c t i o n | t e s t > [ - - c o n f i r m ] \ n s e a l - u s e c o r p s b i n d - t e s t < p r o d C o r p I d > < t e s t C o r p I d > [ - - c o n f i r m ] [ - - f o r c e ] \ n s e a l - u s e c o r p s u n b i n d - t e s t [ < c o r p I d > ] [ - - c o n f i r m ] \ n s e a l - u s e c o r p s s y n c - t e s t [ < p r o d C o r p I d > ] [ - - d r y - r u n ] [ - - y e s ] [ - - v e r s i o n - n a m e < n a m e > ] \ n s e a l - u s e c o r p s r e p l a y - t e s t [ < p r o d C o r p I d > ] [ - - r e c o r d - i d < i d > ] [ - - s n < s n > ] [ - - l i m i t < n > ] [ - - s t a t u s < s t a t u s > ] [ - - w e b h o o k < i d O r N a m e > ] [ - - s n - s u f f i x < s t r > ] [ - - d r y - r u n ] [ - - f o r c e ] \ n s e a l - u s e c o r p s a d d - h o s e - - j s o n ' { \ " n a m e \ " : \ " 企 业 名 称 \ " , \ " d o m a i n \ " : \ " h t t p s : / / a p p . e k u a i b a o . c o m \ " , \ " a p p K e y \ " : \ " . . . \ " , \ " a p p S e c u r i t y \ " : \ " . . . \ " , \ " p r o x y S t a f f B i z I d \ " : \ " c o r p I d : s t a f f I d \ " } ' \ n s e a l - u s e c o r p s a d d - s e a l - - j s o n ' { \ " s e a l U r l \ " : \ " h t t p s : / / t e n a n t . s e a l a i . c c \ " , \ " t o k e n \ " : \ " s e a l - b e a r e r - t o k e n \ " } ' \ n s e a l - u s e c o r p s a d d - l i n k < h t t p s : / / . . . / w e b / t h i r d p a r t y . h t m l ? . . . > [ - - n a m e < c u s t o m N a m e > ] [ - - o v e r w r i t e ] \ n s e a l - u s e a u t h d i a g n o s e [ - - c o r p < c o r p I d > ] \ n s e a l - u s e a u t h h o s e - l i n k [ - - c o r p < c o r p I d > ] [ - - e x p i r e 7 2 0 0 ] \ n s e a l - u s e d e l e g a t i o n l i s t [ - - c o r p < c o r p I d > ] \ n s e a l - u s e d e l e g a t i o n c r e a t e [ - - n o t e < n o t e > ] [ - - f r o m - l i n k < u r l > ] [ - - c o r p < c o r p I d > ] \ n s e a l - u s e d e l e g a t i o n r e v o k e < t o k e n I d > [ - - c o r p < c o r p I d > ] \ n s e a l - u s e u s e r s c r e a t e - - n a m e < n a m e > - - p h o n e < p h o n e > [ - - d e p t < d e p t I d > ] [ - - c o r p Line truncated
Use this workflow when a customer disputes an AI approval finding about an attachment , invoice , receipt , OCR result , or a UI - highlighted audit result .
@@ -927,7 +1250,7 @@ Manual image check:
- The customer ' s objection that they were receipts rather than invoices was reasonable .
However , the final rejection also had an independent rule - 37 reason : payment screenshots totaled 699.48 while reimbursement was 700.00 .
` ;var c L0= ` # Customer Feedback Rule Remediation
` ;var s L0= ` # Customer Feedback Rule Remediation
Use this low - freedom workflow when the user provides packaged customer feedback from WeChat , screenshots , rejection notifications , a document number , or expected business behavior and wants diagnosis or an approval - rule change .
@@ -1097,7 +1420,7 @@ Return a compact report containing:
- New version number and version name , if published
- Verification result
- Whether a regression rerun was performed
` ;var d L0= ` # Enterprise Onboarding
` ;var e L0= ` # Enterprise Onboarding
Read this reference for first installation , zero configured enterprises , incoming credentials or assistance links , and browser - copied cURL . The goal is to identify the enterprise with the least user effort while keeping authentication material confidential .
@@ -1231,7 +1554,7 @@ seal-use auth diagnose --corp <discovered-id> # Hose source
Report the human enterprise name , identity provider , credential method , and whether verification succeeded . Do not expose internal IDs unless they help with troubleshooting . Do not perform approval , rule , document , simulation , publishing , or other business mutations just because onboarding succeeded ; continue only with the user ' s requested task and its normal confirmation rules .
If a temporary assistance - link or browser session expires , explain that it must be renewed or recaptured . Recommend standard Hose app credentials when the user needs durable unattended access .
` ;var mL 0= ` # Hose Enterprise Auth
` ;var $ D 0=` # Hose Enterprise Auth
Use this reference for Hose / 合思 enterprise configuration and user - facing Hose authorization links .
@@ -1296,7 +1619,7 @@ Important:
- \ ` seal-use auth diagnose \` proves this stage works but redacts the token, so it is not enough when the user needs the actual clickable Hose link.
- * * Formatting Requirement * * : When returning a Hose authorization link to the user , ALWAYS provide BOTH a code block ( \ ` \` \` \` text ... \` \` \` \` ) for easy copying without accidental default browser redirection, AND a clickable hyperlink.
- If the CLI later provides a dedicated command for this , prefer that command .
` ;var lL 0= ` # Hose Enterprise Initialization & Automated Discovery
` ;var ID 0= ` # Hose Enterprise Initialization & Automated Discovery
Use this reference for automated Hose / 合思 enterprise onboarding , multi - domain probing ( including dedicated private cloud domains like 美年大健康 ) , OpenAPI role and staff discovery , and non - TUI safe administrator selection .
@@ -1402,7 +1725,7 @@ seal-use corps hose-staffs --json '{
} '
\ ` \` \`
* 直接使用指定 ID 完成接入并进行连通性验证 。
` ;var tL0={"SKILL.md":xL0,"agents/openai.yaml":kL0,"references/rule-lightweight.md":fL0,"references/approval-bad-cases.md":nL0,"references/cli.md":bL0,"references/approval-run-lightweight.md":iL0,"references/approval-attachment-trace.md":pL0,"references/customer-feedback-rule-remediation.md":cL0,"references/enterprise-onboarding.md":dL0,"references/hose-enterprise-auth.md":mL0,"references/hose-enterprise-init.md":lL0};function aL0(){return tL0["SKILL.md"]||""}function TI(){return Mx(rL0(),".agents","skills","seal-use")}function sL0(){return Mx(rL0(),".agents","skills","seal-home")}function eL0(){let $ =sL0();if(Nx( $ ))try{return MW1( $ ,{recursive:!0,force:!0}),!0}catch{return!1}return!1}function Ax( $ =TI()){eL0(),oL0( $ ,{recursive:!0});let I=[];for(let[z,q]of Object.entries(tL0)){let U=Mx( $ ,z);oL0(PW1(U),{recursive:!0}),AW1(U,q,"utf8"),I.push(z)}return{targetDir: $ ,files:I}}function Px(){let $ =sL0(),I=TI(),z=Nx( $ ),q=Nx(I);if(z||q)return eL0(),Ax(I),{synced:!0,targetDir:I};return{synced:!1}}var Tx=[{name:"配置与状态根目录",category:"config",standardPath:"~/.config/seal-use",purpose:"用户本地持久化配置根目录,存放企业连接元数据、会话缓存与全局状态。",accessMode:"read-write",retention:"persistent"},{name:"企业配置文件目录",category:"config",standardPath:"~/.config/seal-use/enterprises",purpose:"存放各已添加企业的配置 JSON 文件(如 xiezihao.json),存储企业域名、脱敏 Token、员工绑定关系等。",accessMode:"read-write",retention:"persistent"},{name:"全局配置文件",category:"config",standardPath:"~/.config/seal-use/config.json",purpose:"维护全局工作模式(stateful/stateless)、默认激活企业 defaultCorpId 以及 Lint 偏好。",accessMode:"read-write",retention:"persistent"},{name:"会话凭据安全缓存",category:"config",standardPath:"~/.config/seal-use/seal_tokens.json",purpose:"缓存已认证租户的 Bearer Token 与过期时间戳,避免高频调用上游 OAuth 换票接口。",accessMode:"read-write",retention:"cache"},{name:"规则版本映射快照",category:"config",standardPath:"~/.config/seal-use/mappings",purpose:"存储 corps sync-test 生成的生产与测试规则版本/编号对照映射快照,供 rules map 离线毫秒级速查。",accessMode:"read-write",retention:"persistent"},{name:"后台守护服务日志",category:"config",standardPath:"~/.config/seal-use/service.log",purpose:"常驻后台 HTTP 服务守护进程运行输出日志。",accessMode:"read-write",retention:"persistent"},{name:"全局命令行程序",category:"binary",standardPath:"/opt/homebrew/bin/seal-use",purpose:"macOS / Linux 全局独立单文件二进制程序;附带软链接 seal-home -> seal-use 兼容旧指令。",accessMode:"executable",retention:"persistent"},{name:"AI Agent 技能主目录",category:"skill",standardPath:"~/.agents/skills/seal-use",purpose:"面向 Antigravity、Codex 等 AI 智能体的标准技能目录,包含 SKILL.md、参考文档与操作规程。",accessMode:"read-write",retention:"persistent"},{name:"报表默认导出目录",category:"export",standardPath:"~/Downloads",purpose:"执行 approval-runs export 等大盘报表命令且未指定 --out 时,默认写入的 Excel 文件路径。",accessMode:"read-write",retention:"persistent"},{name:"系统隔离临时目录",category:"temp",standardPath:"/tmp 或 /var/folders/.../T",purpose:"自动化测试(bun test)生成的隔离工作副本,执行完毕后通过 afterEach 钩子彻底删除,零残留。",accessMode:"transient",retention:"ephemeral"}],Ex=[{topic:"敏感凭据脱敏保护",guarantee:"appSecurity、password 等高危密钥永不回显在 stdout, Session Token 采用掩码处理(如 5oUL...Y%3D)。",enforcement:"CLI 所有展示接口(corps get、corps list、probe 等)均经 formatSafeSourceDetail 脱敏过滤。"},{topic:"正式环境与测试环境严格隔离",guarantee:"正式企业与测试企业必须严格 1 对 1 下挂,禁止多层级级联绑定;环境标记需显式 --confirm 确认。",enforcement:"corps bind-test 与 mark 强制要求 --confirm,缺少时阻断并返回退出码 10( confirmationRequired)。"},{topic:"跨环境规则同步安全基线",guarantee:"corps sync-test 仅将正式企业偏好与规则覆盖同步至测试企业并自动发布,正式企业规则严格维持草稿态永不发布。",enforcement:"规则同步流水线由 sync-test 独占受控,正式环境端仅执行拉取草稿读取操作,零发版变更。"},{topic:"只读诊断无副作用原则",guarantee:"doctor、search、get、list、context、probe 等命令为严格只读操作,不修改用户本地文件系统,零写入污染。",enforcement:"核心领域函数严格分离 Mutation 操作与 Query 操作,Query 路径杜绝写文件与环境篡改。"}],Bx=[{domain:"corps (企业管理)",summary:"多租户接入、智能软搜索、富属性查看、环境标记、测试绑定与配置规则同
Line truncated
` ;var UD0={"SKILL.md":dL0,"agents/openai.yaml":mL0,"references/rule-lightweight.md":lL0,"references/approval-bad-cases.md":oL0,"references/cli.md":rL0,"references/approval-run-lightweight.md":tL0,"references/approval-attachment-trace.md":aL0,"references/customer-feedback-rule-remediation.md":sL0,"references/enterprise-onboarding.md":eL0,"references/hose-enterprise-auth.md": $ D0,"references/hose-enterprise-init.md":ID0};function YD0(){return UD0["SKILL.md"]||""}function BI(){return Tx(qD0(),".agents","skills","seal-use")}function JD0(){return Tx(qD0(),".agents","skills","seal-home")}function QD0(){let $ =JD0();if(Px( $ ))try{return fW1( $ ,{recursive:!0,force:!0}),!0}catch{return!1}return!1}function Ex( $ =BI()){QD0(),zD0( $ ,{recursive:!0});let I=[];for(let[z,q]of Object.entries(UD0)){let U=Tx( $ ,z);zD0(bW1(U),{recursive:!0}),nW1(U,q,"utf8"),I.push(z)}return{targetDir: $ ,files:I}}function Bx(){let $ =JD0(),I=BI(),z=Px( $ ),q=Px(I);if(z||q)return QD0(),Ex(I),{synced:!0,targetDir:I};return{synced:!1}}var jx=[{name:"配置与状态根目录",category:"config",standardPath:"~/.config/seal-use",purpose:"用户本地持久化配置根目录,存放企业连接元数据、会话缓存与全局状态。",accessMode:"read-write",retention:"persistent"},{name:"企业配置文件目录",category:"config",standardPath:"~/.config/seal-use/enterprises",purpose:"存放各已添加企业的配置 JSON 文件(如 xiezihao.json),存储企业域名、脱敏 Token、员工绑定关系等。",accessMode:"read-write",retention:"persistent"},{name:"全局配置文件",category:"config",standardPath:"~/.config/seal-use/config.json",purpose:"维护全局工作模式(stateful/stateless)、默认激活企业 defaultCorpId 以及 Lint 偏好。",accessMode:"read-write",retention:"persistent"},{name:"会话凭据安全缓存",category:"config",standardPath:"~/.config/seal-use/seal_tokens.json",purpose:"缓存已认证租户的 Bearer Token 与过期时间戳,避免高频调用上游 OAuth 换票接口。",accessMode:"read-write",retention:"cache"},{name:"规则版本映射快照",category:"config",standardPath:"~/.config/seal-use/mappings",purpose:"存储 corps sync-test 生成的生产与测试规则版本/编号对照映射快照,供 rules map 离线毫秒级速查。",accessMode:"read-write",retention:"persistent"},{name:"后台守护服务日志",category:"config",standardPath:"~/.config/seal-use/service.log",purpose:"常驻后台 HTTP 服务守护进程运行输出日志。",accessMode:"read-write",retention:"persistent"},{name:"全局命令行程序",category:"binary",standardPath:"/opt/homebrew/bin/seal-use",purpose:"macOS / Linux 全局独立单文件二进制程序;附带软链接 seal-home -> seal-use 兼容旧指令。",accessMode:"executable",retention:"persistent"},{name:"AI Agent 技能主目录",category:"skill",standardPath:"~/.agents/skills/seal-use",purpose:"面向 Antigravity、Codex 等 AI 智能体的标准技能目录,包含 SKILL.md、参考文档与操作规程。",accessMode:"read-write",retention:"persistent"},{name:"报表默认导出目录",category:"export",standardPath:"~/Downloads",purpose:"执行 approval-runs export 等大盘报表命令且未指定 --out 时,默认写入的 Excel 文件路径。",accessMode:"read-write",retention:"persistent"},{name:"系统隔离临时目录",category:"temp",standardPath:"/tmp 或 /var/folders/.../T",purpose:"自动化测试(bun test)生成的隔离工作副本,执行完毕后通过 afterEach 钩子彻底删除,零残留。",accessMode:"transient",retention:"ephemeral"}],vx=[{topic:"敏感凭据脱敏保护",guarantee:"appSecurity、password 等高危密钥永不回显在 stdout, Session Token 采用掩码处理(如 5oUL...Y%3D)。",enforcement:"CLI 所有展示接口(corps get、corps list、probe 等)均经 formatSafeSourceDetail 脱敏过滤。"},{topic:"正式环境与测试环境严格隔离",guarantee:"正式企业与测试企业必须严格 1 对 1 下挂,禁止多层级级联绑定;环境标记需显式 --confirm 确认。",enforcement:"corps bind-test 与 mark 强制要求 --confirm,缺少时阻断并返回退出码 10( confirmationRequired)。"},{topic:"跨环境规则同步安全基线",guarantee:"corps sync-test 仅将正式企业偏好与规则覆盖同步至测试企业并自动发布,正式企业规则严格维持草稿态永不发布。",enforcement:"规则同步流水线由 sync-test 独占受控,正式环境端仅执行拉取草稿读取操作,零发版变更。"},{topic:"只读诊断无副作用原则",guarantee:"doctor、search、get、list、context、probe 等命令为严格只读操作,不修改用户本地文件系统,零写入污染。",enforcement:"核心领域函数严格分离 Mutation 操作与 Query 操作,Query 路径杜绝写文件与环境篡改。"}],gx=[{domain:"corps (企业管理)",summary:"多租户接入、智能软搜索、富属性查看、环境标记、测试绑定与配置规则同
Line truncated
> 本文档由 \ ` seal-use \` 单文件二进制程序内嵌提供,纯内存只读,未向用户电脑写入任何临时文件。
@@ -1425,14 +1748,14 @@ seal-use corps hose-staffs --json '{
| 目录名称 | 类别 | 规范路径 | 作用与生命周期 |
| : -- - | : -- - | : -- - | : -- - |
$ { Tx . map ( ( $ ) => ` | ** ${ $ . name } ** | \` ${ $ . category } \` | \` ${ $ . standardPath } \` | ${ $ . purpose } ( ${ $ . retention } ) | ` ) . join ( `
$ { jx . map ( ( $ ) => ` | ** ${ $ . name } ** | \` ${ $ . category } \` | \` ${ $ . standardPath } \` | ${ $ . purpose } ( ${ $ . retention } ) | ` ) . join ( `
` )}
-- -
# # 3. 安全与数据隐私保证
$ { Ex . map ( ( $ , I ) => ` ### 3. ${ I + 1 } ${ $ . topic }
$ { vx . map ( ( $ , I ) => ` ### 3. ${ I + 1 } ${ $ . topic }
- * * 安全承诺 * * : $ { $ . guarantee }
- * * 实现约束 * * : $ { $ . enforcement }
` ).join( `
@@ -1442,7 +1765,7 @@ ${Ex.map(($,I)=>`### 3.${I+1} ${$.topic}
# # 4. 业务域能力图谱
$ { Bx . map ( ( $ ) => ` ### \` seal-use ${ $ . domain } \`
$ { gx . map ( ( $ ) => ` ### \` seal-use ${ $ . domain } \`
* * * 能力定位 * * : $ { $ . summary }
* * * 核心命令 * * : $ { $ . primaryCommands . map ( ( I ) => ` \` seal-use ${ I } \` ` ) . join ( "、" ) }
` ).join( `
@@ -1455,15 +1778,15 @@ ${Bx.map(($)=>`### \`seal-use ${$.domain}\`
- * * 环境自检 * * : 运行 \ ` seal-use doctor \` ,一键检查当前运行时版本、本地目录健康度、企业资产接入数量以及守护服务状态。
- * * 查看企业配置源文件 * * : 运行 \ ` seal-use corps get <corpId> \` ,可直接查看指定企业的本地 JSON 存储绝对路径。
- * * 查阅完整操作手册 * * : 运行 \ ` seal-use doctor guide \` 随时在离线状态下查看本文档。
` }function ID0( $ ){if(!T $ ( $ ))return 0;try{return BW1( $ ).filter((I)=>I.endsWith(".json")).length}catch{return 0}}function jx( $ ){try{return TW1( $ ,EW1.W_OK),!0}catch{return!1}}function vx(){let $ =jW1(),I=z9( $ ,".config","seal-use"),z=z9(I,"enterprises"),q=z9(I,"config.json"),U=z9(I,"seal_tokens.json"),Y=z9(I,"mappings"),J=TI(),Q=z9( $ ,"Downloads"),K=["/opt/homebrew/bin/seal-use","/usr/local/bin/seal-use",z9( $ ,".local","bin","seal-use"),z9( $ ,"bin","seal-use")].find((M)=>T $ (M))??process.execPath,H={configDir:{name:"配置根目录",path:I,exists:T $ (I),writable:T $ (I)?jx(I):!1,description:"用户持久化配置与企业状态根目录"},enterprisesDir:{name:"企业配置目录",path:z,exists:T $ (z),writable:T $ (z)?jx(z):!1,fileCount:ID0(z),description:"企业连接配置(JSON)保存路径"},globalConfigFile:{name:"全局配置文件",path:q,exists:T $ (q),description:"全局工作模式与默认企业配置"},tokenStore:{name:"凭据缓存",path:U,exists:T $ (U),description:"会话凭据与令牌缓存"},mappingsDir:{name:"规则版本映射快照",path:Y,exists:T $ (Y),fileCount:ID0(Y),description:"生产与测试规则版本映射对照表"},agentSkillDir:{name:"AI Agent 技能目录",path:J,exists:T $ (z9(J,"SKILL.md")),description:"本地 Agent 技能主目录"},exportDefaultDir:{name:"报表默认导出目录",path:Q,exists:T $ (Q),writable:T $ (Q)?jx(Q):!1,description:"审核大盘报表默认写入目录"},globalBinary:{name:"全局命令行二进制",path:K,exists:T $ (K),description:"系统全局命令执行入口"}},G=[];try{G=q $ ()}catch{G=[]}let Z=Y4().defaultCorpId??G[0]?.id,X=G.find((M)=>M.id===Z),L=G.filter((M)=>(M.environment??"production").toLowerCase()==="test").length,D=G.length-L,F=[];if(F.push({id:"executable",title:"命令行二进制",status:"ok",message: ` 当前执行路径 : $ { process . execPath } ` }),H.configDir?.exists&&H.configDir.writable)F.push({id:"config_dir",title:"配置目录访问",status:"ok",message: ` $ { I } ( 正常读写 ) ` });else if(H.configDir?.exists)F.push({id:"config_dir",title:"配置目录访问",status:"warn",message: ` $ { I } ( 存在但可能不可写 ) ` });else F.push({id:"config_dir",title:"配置目录访问",status:"warn",message: ` 未检测到配置目录 $ { I } , 首次运行配置命令时将自动创建 ` });if(G.length>0)F.push({id:"enterprises",title:"企业接入状态",status:"ok",message: ` 已接入 $ { G . length } 家企业 ( 正式 : $ { D } , 测试 : $ { L } ) ` });else F.push({id:"enterprises",title:"企业接入状态",status:"warn",message:"当前未检测到企业配置,请使用 seal-use corps add-hose 或 add-seal 接入企业"});if(H.agentSkillDir?.exists)F.push({id:"agent_skill",title:"AI Agent 技能",status:"ok",message: ` 已就绪于 $ { J } ` });else F.push({id:"agent_skill",title:"AI Agent 技能",status:"warn",message: ` 未在 $ { J } 检测到技能 , 可运行 'seal-use skill sync' 安装 ` });let T=F.some((M)=>M.status==="warn"||M.status==="error"),P=typeof globalThis.Bun<"u"? ` Bun $ { globalThis . Bun . version } ` : ` Node $ { process . version } ` ;return{doctor:T?"warning":"ok",timestamp:new Date().toISOString(),runtime:{version:e0,executablePath:process.execPath,platform: ` $ { process . platform } ( $ { process . arch } ) ` ,engine:P},directories:H,enterprises:{total:G.length,productionCount:D,testCount:L,activeCorpId:X?.id,activeCorpName:X?.name},checks:F,knowledge:{summary:"内嵌系统架构与目录规范白皮书(纯内存只读,零写入依赖)",directorySpecsCount:Tx.length,securityPoliciesCount:Ex.length,domainCapabilitiesCount:Bx.length,guideCommand:"seal-use doctor guide"}}}function zD0( $ ){let I=[],z= $ .doctor==="ok"?"✨":"⚠️";I.push( ` \uD83E\uDE7A [ Seal Use Doctor ] 系统健康诊断看板 $ { z } ` ),I.push("─────────────────────────────────────────────────────────────"),I.push("【运行环境】"),I.push( ` 版本号 : $ { $ . runtime . version } ` ),I.push( ` 程序路径 : $ { $ . runtime . executablePath } ` ),I.push( ` 操作系统 : $ { $ . runtime . platform } ` ),I.push( ` 执行引擎 : $ { $ . runtime . engine } ` ),I.push(""),I.push("【核心路径状态】");for(let[,q]of Object.entries( $ .directories)){let U=q.exists?"✓":"○",Y=q.exists?q.fileCount!==void 0? ` ( $ { q . fileCount } 个文件 ) ` :q.writable?"(就绪/可写)":"(存在)":"(未创建)";I.push( ` $ { U } $ { q . name . padEnd ( 16 , " " ) } : $ { q . path } $ { Y } ` )}if(I.push(""),I.push("【企业资产概览】"),I.push( ` 接入企业总计 : $ { $ . enterprises . total } 家 ( 生产 : $ { $ . enterprises . productionCount } , 测试 : $ { $ . enterprises . testCount } ) ` ), $ .enterprises.activeCorpId)I.push( ` 当前激活企业 : $ { $ . enterprises . activeCorpName } ( $ { $ . enterprises . activeCorpId } ) ` );else I.push(" 当前激活企业: 无默认企业 (无状态模式)");I.push(""),I.push("【健康自检】");for(let q of $ .checks){let U=q.status==="ok"?"✓":q.status==="warn"?"⚠️":"✗";I.push( ` $ { U } [ $ { q . title } ] : $ { q . message } ` )}return I.push(""),I.push("─────────
Line truncated
` )}async function q D0( $ ,I,z){let q=( $ ??I??"").toLowerCase();if(q==="guide"||q==="doc"||q==="knowledge"||q==="book"){console.error( ` \uD83D\uDCD6 [ Seal Use Doctor ] 正在读取内嵌系统规范白皮书 ( 纯内存只读 ) ...
` ),console.log( $ D0());return}if(q==="paths"||q==="dirs"||q==="directories"){let J=v x();T0(J.directories);return}let U=v x();if(!(V0(z.options.quiet)||V0(z.options.silent)))console.error(z D0(U));T0(U)}import{createServer as C W1}from"node:http";import{URL as R W1}from"node:url";var U D0={openapi:"3.1.0",info:{title:"seal-use Wrapped API",version:"0.10.18",description: ` Planned HTTP contract for the seal - use wrapped backend API .
` }function KD0( $ ){if(!E6( $ ))return 0;try{return cW1( $ ).filter((I)=>I.endsWith(".json")).length}catch{return 0}}function ZO( $ ){try{return iW1( $ ,pW1.W_OK),!0}catch{return!1}}function Rx(){let $ =dW1(),I=Y9( $ ,".config","seal-use"),z=Y9(I,"enterprises"),q=Y9(I,"config.json"),U=Y9(I,"seal_tokens.json"),Y=Y9(I,"mappings"),J=BI(),Q=Y9( $ ,"Downloads"),K=["/opt/homebrew/bin/seal-use","/usr/local/bin/seal-use",Y9( $ ,".local","bin","seal-use"),Y9( $ ,"bin","seal-use")].find((M)=>E6(M))??process.execPath,H={configDir:{name:"配置根目录",path:I,exists:E6(I),writable:E6(I)?ZO(I):!1,description:"用户持久化配置与企业状态根目录"},enterprisesDir:{name:"企业配置目录",path:z,exists:E6(z),writable:E6(z)?ZO(z):!1,fileCount:KD0(z),description:"企业连接配置(JSON)保存路径"},globalConfigFile:{name:"全局配置文件",path:q,exists:E6(q),description:"全局工作模式与默认企业配置"},tokenStore:{name:"凭据缓存",path:U,exists:E6(U),description:"会话凭据与令牌缓存"},mappingsDir:{name:"规则版本映射快照",path:Y,exists:E6(Y),fileCount:KD0(Y),description:"生产与测试规则版本映射对照表"},agentSkillDir:{name:"AI Agent 技能目录",path:J,exists:E6(Y9(J,"SKILL.md")),description:"本地 Agent 技能主目录"},exportDefaultDir:{name:"报表默认导出目录",path:Q,exists:E6(Q),writable:E6(Q)?ZO(Q):!1,description:"审核大盘报表默认写入目录"},lintersDir:{name:"规则校验器目录 (用户自定义)",path:l $ ,exists:E6(l $ ),writable:E6(l $ )?ZO(l $ ):!1,description:"用户私有规则校验脚本存放目录"},officialLintersDir:{name:"官方内置规则校验器目录",path:q5,exists:E6(q5),description:"官方标准与严格风控校验脚本目录 (系统自动保护与重写)"},globalBinary:{name:"全局命令行二进制",path:K,exists:E6(K),description:"系统全局命令执行入口"}},G=[];try{G=Y $ ()}catch{G=[]}let Z=Y4().defaultCorpId??G[0]?.id,X=G.find((M)=>M.id===Z),L=G.filter((M)=>(M.environment??"production").toLowerCase()==="test").length,D=G.length-L,O=[];if(O.push({id:"executable",title:"命令行二进制",status:"ok",message: ` 当前执行路径 : $ { process . execPath } ` }),H.configDir?.exists&&H.configDir.writable)O.push({id:"config_dir",title:"配置目录访问",status:"ok",message: ` $ { I } ( 正常读写 ) ` });else if(H.configDir?.exists)O.push({id:"config_dir",title:"配置目录访问",status:"warn",message: ` $ { I } ( 存在但可能不可写 ) ` });else O.push({id:"config_dir",title:"配置目录访问",status:"warn",message: ` 未检测到配置目录 $ { I } , 首次运行配置命令时将自动创建 ` });if(G.length>0)O.push({id:"enterprises",title:"企业接入状态",status:"ok",message: ` 已接入 $ { G . length } 家企业 ( 正式 : $ { D } , 测试 : $ { L } ) ` });else O.push({id:"enterprises",title:"企业接入状态",status:"warn",message:"当前未检测到企业配置,请使用 seal-use corps add-hose 或 add-seal 接入企业"});if(H.agentSkillDir?.exists)O.push({id:"agent_skill",title:"AI Agent 技能",status:"ok",message: ` 已就绪于 $ { J } ` });else O.push({id:"agent_skill",title:"AI Agent 技能",status:"warn",message: ` 未在 $ { J } 检测到技能 , 可运行 'seal-use skill sync' 安装 ` });let T=O.some((M)=>M.status==="warn"||M.status==="error"),P=typeof globalThis.Bun<"u"? ` Bun $ { globalThis . Bun . version } ` : ` Node $ { process . version } ` ;return{doctor:T?"warning":"ok",timestamp:new Date().toISOString(),runtime:{version:e0,executablePath:process.execPath,platform: ` $ { process . platform } ( $ { process . arch } ) ` ,engine:P},directories:H,enterprises:{total:G.length,productionCount:D,testCount:L,activeCorpId:X?.id,activeCorpName:X?.name},checks:O,knowledge:{summary:"内嵌系统架构与目录规范白皮书(纯内存只读,零写入依赖)",directorySpecsCount:jx.length,securityPoliciesCount:vx.length,domainCapabilitiesCount:gx.length,guideCommand:"seal-use doctor guide"}}}function HD0( $ ){let I=[],z= $ .doctor==="ok"?"✨":"⚠️";I.push( ` \uD83E\uDE7A [ Seal Use Doctor ] 系统健康诊断看板 $ { z } ` ),I.push("─────────────────────────────────────────────────────────────"),I.push("【运行环境】"),I.push( ` 版本号 : $ { $ . runtime . version } ` ),I.push( ` 程序路径 : $ { $ . runtime . executablePath } ` ),I.push( ` 操作系统 : $ { $ . runtime . platform } ` ),I.push( ` 执行引擎 : $ { $ . runtime . engine } ` ),I.push(""),I.push("【核心路径状态】");for(let[,q]of Object.entries( $ .directories)){let U=q.exists?"✓":"○",Y=q.exists?q.fileCount!==void 0? ` ( $ { q . fileCount } 个文件 ) ` :q.writable?"(就绪/可写)":"(存在)":"(未创建)";I.push( ` $ { U } $ { q . name . padEnd ( 16 , " " ) } : $ { q . path } $ { Y } ` )}if(I.push(""),I.push("【企业资产概览】"),I.push( ` 接入企业总计 : $ { $ . enterprises . total } 家 ( 生产 : $ { $ . enterprises . productionCount } , 测试 : $ { $ . enterprises . testCount } ) ` ), $ .enterprises.activeCorpId)I.push( ` 当前激活企业 : $ { $ . enterprises . activeC Line truncated
` )}async function G D0( $ ,I,z){let q=( $ ??I??"").toLowerCase();if(q==="guide"||q==="doc"||q==="knowledge"||q==="book"){console.error( ` \uD83D\uDCD6 [ Seal Use Doctor ] 正在读取内嵌系统规范白皮书 ( 纯内存只读 ) ...
` ),console.log(w D0());return}if(q==="paths"||q==="dirs"||q==="directories"){let J=R x();T0(J.directories);return}let U=R x();if(!(V0(z.options.quiet)||V0(z.options.silent)))console.error(H D0(U));T0(U)}import{createServer as t W1}from"node:http";import{URL as l W1}from"node:url";var W D0={openapi:"3.1.0",info:{title:"seal-use Wrapped API",version:"0.10.18",description: ` Planned HTTP contract for the seal - use wrapped backend API .
These endpoints describe the intended stable API for frontend developers and agents once
the HTTP adapter is implemented .
They are not the raw downstream Seal endpoints . seal - use is responsible for enterprise
selection , source authentication , response compaction , and diagnostics - friendly fields .
` },servers:[{url:"http://localhost:8787",description:"Reserved for a future local HTTP adapter; the current service uses MCP stdio."}],security:[{localSession:[]}],tags:[{name:"Corps",description:"Local enterprise configuration selection."},{name:"Source",description:"Source-derived Seal enterprise configuration."},{name:"Auth",description:"Wrapped authentication diagnostics and current identity."},{name:"Approval Runs",description:"Wrapped approval run history, summaries, document URLs, and trace bridge helpers."},{name:"Approval Knowledge",description:"Wrapped approval rules, documents, preferences, and search."},{name:"Simulation",description:"Wrapped simulation batch record access."}],paths:{"/v1/corps":{get:{tags:["Corps"],operationId:"listCorps",summary:"List configured enterprises",responses:{"200":{description:"Configured enterprises.",content:{"application/json":{schema:{type:"array",items:{type:"object",required:["id","name","sourceType","current"],properties:{id:{type:"string"},name:{type:"string"},sourceType:{type:"string",enum:["hose","direct","seal"]},current:{type:"boolean"}}}}}}}}}},"/v1/corps/current":{get:{tags:["Corps"],operationId:"getCurrentCorp",summary:"Get current enterprise",description:"Returns the configured default enterprise in stateful mode. Stateless mode has no current enterprise and requires an explicit corpId for enterprise operations.",responses:{"200":{description:"Current enterprise.",content:{"application/json":{schema:{type:"object",required:["id","name","sourceType","current"],properties:{id:{type:"string"},name:{type:"string"},sourceType:{type:"string",enum:["hose","direct","seal"]},current:{type:"boolean"}}}}}}}}},"/v1/corps/current/switch":{post:{tags:["Corps"],operationId:"switchCurrentCorp",summary:"Switch current enterprise",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",required:["corpId"],properties:{corpId:{type:"string"}}}}}},responses:{"200":{description:"Switched enterprise.",content:{"application/json":{schema:{type:"object",required:["current","id","name"],properties:{current:{type:"boolean"},id:{type:"string"},name:{type:"string"}}}}}},"404":{description:"Requested resource was not found.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,required:["error"],properties:{error:{type:"string"},message:{type:"string"},details:{}}}}}}}}},"/v1/source/config":{get:{tags:["Source"],operationId:"getSourceConfig",summary:"Resolve source-derived Seal enterprise config",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"200":{description:"Redacted Seal enterprise config.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,description:"Redacted Seal enterprise config resolved from the configured source."}}}},"401":{description:"Local service authentication failed or downstream Seal auth failed.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,required:["error"],properties:{error:{type:"string"},message:{type:"string"},details:{}}}}}}}}},"/v1/auth/diagnose":{get:{tags:["Auth"],operationId:"diagnoseAuth",summary:"Diagnose wrapped source-to-Seal authentication",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"200":{description:"Authentication stage diagnosis.",content:{"application/json":{schema:{type:"object",required:["stages"],properties:{stages:{type:"array",items:{ $ ref:"#/components/schemas/AuthStage"}}}}}}}}}},"/v1/whoami":{get:{tags:["Auth"],operationId:"whoami",summary:"Get current wrapped Seal identity",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"200":{description:"Current Seal user and tenant.",content:{"application/json":{schema:{type:"object",required:["user","tenant"],properties:{user:{ $ ref:"#/components/schemas/SealUser"},tenant:{ $ ref:"#/components/schemas/SealTenant"}}}}}},"401":{description:"Local service authentication failed or downstream Seal auth failed.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,required:["error"],properties:{error:{type:"string"},message:{type:"string"},details:{}}}}}}}}},"/v1/session":{get:{tags:["Auth"],operationId:"getSession",summary:"Get current wrapped Seal session metadata",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"2
Line truncated
` },servers:[{url:"http://localhost:8787",description:"Reserved for a future local HTTP adapter; the current service uses MCP stdio."}],security:[{localSession:[]}],tags:[{name:"Corps",description:"Local enterprise configuration selection."},{name:"Source",description:"Source-derived Seal enterprise configuration."},{name:"Auth",description:"Wrapped authentication diagnostics and current identity."},{name:"Approval Runs",description:"Wrapped approval run history, summaries, document URLs, and trace bridge helpers."},{name:"Approval Knowledge",description:"Wrapped approval rules, documents, preferences, and search."},{name:"Simulation",description:"Wrapped simulation batch record access."}],paths:{"/v1/corps":{get:{tags:["Corps"],operationId:"listCorps",summary:"List configured enterprises",responses:{"200":{description:"Configured enterprises.",content:{"application/json":{schema:{type:"array",items:{type:"object",required:["id","name","sourceType","current"],properties:{id:{type:"string"},name:{type:"string"},sourceType:{type:"string",enum:["hose","direct","seal"]},current:{type:"boolean"}}}}}}}}}},"/v1/corps/current":{get:{tags:["Corps"],operationId:"getCurrentCorp",summary:"Get current enterprise",description:"Returns the configured default enterprise in stateful mode. Stateless mode has no current enterprise and requires an explicit corpId for enterprise operations.",responses:{"200":{description:"Current enterprise.",content:{"application/json":{schema:{type:"object",required:["id","name","sourceType","current"],properties:{id:{type:"string"},name:{type:"string"},sourceType:{type:"string",enum:["hose","direct","seal"]},current:{type:"boolean"}}}}}}}}},"/v1/corps/current/switch":{post:{tags:["Corps"],operationId:"switchCurrentCorp",summary:"Switch current enterprise",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",required:["corpId"],properties:{corpId:{type:"string"}}}}}},responses:{"200":{description:"Switched enterprise.",content:{"application/json":{schema:{type:"object",required:["current","id","name"],properties:{current:{type:"boolean"},id:{type:"string"},name:{type:"string"}}}}}},"404":{description:"Requested resource was not found.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,required:["error"],properties:{error:{type:"string"},message:{type:"string"},details:{}}}}}}}}},"/v1/source/config":{get:{tags:["Source"],operationId:"getSourceConfig",summary:"Resolve source-derived Seal enterprise config",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"200":{description:"Redacted Seal enterprise config.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,description:"Redacted Seal enterprise config resolved from the configured source."}}}},"401":{description:"Local service authentication failed or downstream Seal auth failed.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,required:["error"],properties:{error:{type:"string"},message:{type:"string"},details:{}}}}}}}}},"/v1/auth/diagnose":{get:{tags:["Auth"],operationId:"diagnoseAuth",summary:"Diagnose wrapped source-to-Seal authentication",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"200":{description:"Authentication stage diagnosis.",content:{"application/json":{schema:{type:"object",required:["stages"],properties:{stages:{type:"array",items:{ $ ref:"#/components/schemas/AuthStage"}}}}}}}}}},"/v1/whoami":{get:{tags:["Auth"],operationId:"whoami",summary:"Get current wrapped Seal identity",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"200":{description:"Current Seal user and tenant.",content:{"application/json":{schema:{type:"object",required:["user","tenant"],properties:{user:{ $ ref:"#/components/schemas/SealUser"},tenant:{ $ ref:"#/components/schemas/SealTenant"}}}}}},"401":{description:"Local service authentication failed or downstream Seal auth failed.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,required:["error"],properties:{error:{type:"string"},message:{type:"string"},details:{}}}}}}}}},"/v1/session":{get:{tags:["Auth"],operationId:"getSession",summary:"Get current wrapped Seal session metadata",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"2
Line truncated
< html lang = "zh-CN" >
< head >
< meta charset = "utf-8" / >
@@ -1487,18 +1810,18 @@ selection, source authentication, response compaction, and diagnostics-friendly
src = "https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.25.101/dist/browser/standalone.js"
> < / s c r i p t >
< / b o d y >
< /html>`}async function n4($,I,z,q){let U=$.handler;return U(I,z,{corp:q})}async function JD0($,I){if(I.setHeader("Access-Control-Allow-Origin","*"),I.setHeader("Access-Control-Allow-Methods","GET, POST, PUT, DELETE, OPTIONS, PATCH"),I.setHeader("Access-Control-Allow-Headers","Content-Type, Authorization, X-Seal-Corp, X-Seal-Home-Session"),$.method==="OPTIONS"){I.writeHead(204),I.end();return}let z=$.headers.host||"localhost",q=$.headers["x-forwarded-proto"]||"http",U=new RW1($.url||"/ ",`${q}://${z}`),Y=U.pathname.replace(/\/+$/," ")||" / ",J=($.method||" GET ").toUpperCase();try{if(J===" GET "&&Y===" / "){t1(I,200,{name:" seal - use ",version:e0,description:" Seal tenant operations and approval automation HTTP API ",docs:" / docs ",openapi:" / openapi . json ",health:" / health ",endpoints:{cli:" POST / api / cli ",tools:" GET / api / tools ",toolInvoke:" POST / api / tool / : name ",restV1:" GET / POST / v1 / * "}});return}if(J===" GET "&&Y===" / docs "){_W1(I,200,YD0());return}if(J===" GET "&&Y===" / openapi . json "){t1(I,200,HF());return}if(J===" GET "&&Y===" / health "){t1(I,200,{status:" ok ",version:e0,name:" seal - use ",timestamp:new Date().toISOString()});return}if(J===" POST "&&(Y===" / shutdown "||Y===" / api / shutdown ")){t1(I,200,{success:!0,message:" Shutting down seal - use background daemon ",pid:process.pid}),setTimeout(()=>{process.kill(process.pid," SIGTERM ")},50);return}if(J===" POST "&&Y===" / api / cli "){let Q=await WF($),w=(typeof Q?.command===" string "?Q.command:" ").trim();if(!w){GF(I,400," Missing 'command' property in request body ");return}let K=Rx(w),H=K[0]===" seal - use "||K[0]===" seal - home "||K[0]?.endsWith(" / seal - use ")||K[0]?.endsWith(" / seal - home ")?K.slice(1):K,G=await nw(H),W=void 0;try{if(G.stdout.trim().startsWith(" { ")||G.stdout.trim().startsWith(" [ "))W=JSON.parse(G.stdout)}catch{}t1(I,G.isError?400:200,{success:!G.isError,stdout:G.stdout,stderr:G.stderr,exitCode:G.exitCode,data:W});return}if(J===" POST "&&Y.startsWith(" / api / tool / ")){let Q=Y.slice(10).trim(),w=h4(Q);if(!w){GF(I,404,`Tool not found: '${Q}'`);return}let K=await WF($)||{},H=f6($,U,K),G=O1(H),W=await G1(G),Z={...K};delete Z.corp;let X=await n4(w,W,Z,G);t1(I,200,X);return}if(Y.startsWith(" / v1 / ")){if(await gW1($,I,J,Y,U))return}GF(I,404,`Cannot ${J} ${Y}. Visit /docs for available endpoints.`)}catch(Q){let w=Q instanceof Error?Q.message:String(Q);GF(I,500,w)}}async function gW1($,I,z,q,U){let Y=Object.fromEntries(U.searchParams.entries());if(z===" GET "&&q===" / v1 / corps "){let J=q$(),Q=Y4();return t1(I,200,{count:J.length,mode:Q.stateful?" stateful ":" stateless ",defaultCorpId:Q.defaultCorpId,corps:J.map((w)=>({id:w.id,name:w.name,sourceType:w.source.type,sealUrl:w.seal?.url}))}),!0}if(z===" GET "&&q===" / v1 / whoami "){let J=f6($,U,Y),Q=O1(J),w=await G1(Q),K=h4(" seal _whoami "),H=await n4(K,w,{},Q);return t1(I,200,H),!0}if(z===" GET "&&q===" / v1 / session "){let J=f6($,U,Y),Q=O1(J),w=await G1(Q),K=h4(" seal _session _get "),H=await n4(K,w,{},Q);return t1(I,200,H),!0}if(z===" GET "&&q===" / v1 / approval - runs / summary "){let J=f6($,U,Y),Q=O1(J),w=await G1(Q),K=h4(" seal _approval _runs _summary "),H=await n4(K,w,Y,Q);return t1(I,200,H),!0}if(z===" GET "&&q===" / v1 / approval - runs / stats "){let J=f6($,U,Y),Q=O1(J),w=await G1(Q),K=h4(" seal _approval _runs _stats "),H=await n4(K,w,Y,Q);return t1(I,200,H),!0}if(z===" GET "&&q===" / v1 / approval - runs / pick "){let J=f6($,U,Y),Q=O1(J),w=await G1(Q),K=h4(" seal _approval _run _pick "),H=await n4(K,w,Y,Q);return t1(I,200,H),!0}if(z===" GET "&&q===" / v1 / approval - runs / url "){let J=f6($,U,Y),Q=O1(J),w=await G1(Q),K=h4(" seal _approval _run _url _get "),H=await n4(K,w,Y,Q);return t1(I,200,H),!0}if(q.startsWith(" / v1 / approval - runs / ")){let J=q.slice(18).split(" / "),Q=J[0],w=J[1];if(Q&&![" summary "," pick "," stats "," url "," bridge "].includes(Q)){let K=f6($,U,Y),H=O1(K),G=await G1(H);if(!w){let W=h4(" seal _approval _run _get "),Z=await n4(W,G,{recordId:Q,...Y},H);return t1(I,200,Z),!0}if(w===" attachments "){let W=h4(" seal _approval _run _attachments _get "),Z=await n4(W,G,{recordId:Q,...Y},H);return t1(I,200,Z),!0}if(w===" cited - rules "){let W=h4(" seal _approval _run _cited _rules _get "),Z=await n4(W,G,{recordId:Q,...Y},H);return t1(I,200,Z),!0}if(w===" document - summary "){let W=h4(" seal _approval _run _document _summary _get "),Z=await n4(W,G,{recordId:Q,...Y},H);return t1(I,200,Z),!0}if(w===" result "){let W=h4(" seal _approval _run _result _get "),Z=await n4(W,G,{recordId:Q,...Y},H);return t1(I,200,Z),!0}}}if(z===" GET "&&q===" / v1 / approval - runs "){let J=f6($,U,Y),Q=O1(J),w=await G1(Q),K=h4(" seal _approval _runs _search "),H=await n4(K,w,{...Y,limit:Y.limit?Number(Y.limit):void 0,offset:Y.offset?Number(Y.offset):void 0,includeBridge:Y.includeBridge===" true "},Q);return t1(I,200,H),!0}if(z===" GET "&&q===" / v1 / approval / rules "){let J=f6($,U,Y),Q=O1(J),w=await G1(Q),K=h4(" seal _approval _rules _list "),H=await n4(K,w,Y,Q);return t1(I,200,H),!0}if(z===" GET "&&q===" / v1 / simulation / batches "){let J=f6($,U,Y),Q=O1(J),w=await G1(Q),K=h4(" seal _simulation _batches _list "),H=await n4(K,w,Y,Q);return t1(I,200,H),!0}if(z===" POST "&&q===" / v1 / simulation / create - batch " ) { let J = await WF ( $ ) || { } , Q = f6 ( $ , U , J ) , w = O1 ( Q ) , K = await G1 Line truncated
< /html>`}async function n4($,I,z,q){let U=$.handler;return U(I,z,{corp:q})}async function ZD0($,I){if(I.setHeader("Access-Control-Allow-Origin","*"),I.setHeader("Access-Control-Allow-Methods","GET, POST, PUT, DELETE, OPTIONS, PATCH"),I.setHeader("Access-Control-Allow-Headers","Content-Type, Authorization, X-Seal-Corp, X-Seal-Home-Session"),$.method==="OPTIONS"){I.writeHead(204),I.end();return}let z=$.headers.host||"localhost",q=$.headers["x-forwarded-proto"]||"http",U=new lW1($.url||"/ ",`${q}://${z}`),Y=U.pathname.replace(/\/+$/," ")||" / ",J=($.method||" GET ").toUpperCase();try{if(J===" GET "&&Y===" / "){t1(I,200,{name:" seal - use ",version:e0,description:" Seal tenant operations and approval automation HTTP API ",docs:" / docs ",openapi:" / openapi . json ",health:" / health ",endpoints:{cli:" POST / api / cli ",tools:" GET / api / tools ",toolInvoke:" POST / api / tool / : name ",restV1:" GET / POST / v1 / * "}});return}if(J===" GET "&&Y===" / docs "){rW1(I,200,VD0());return}if(J===" GET "&&Y===" / openapi . json "){t1(I,200,XO());return}if(J===" GET "&&Y===" / health "){t1(I,200,{status:" ok ",version:e0,name:" seal - use ",timestamp:new Date().toISOString()});return}if(J===" POST "&&(Y===" / shutdown "||Y===" / api / shutdown ")){t1(I,200,{success:!0,message:" Shutting down seal - use background daemon ",pid:process.pid}),setTimeout(()=>{process.kill(process.pid," SIGTERM ")},50);return}if(J===" POST "&&Y===" / api / cli "){let Q=await DO($),w=(typeof Q?.command===" string "?Q.command:" ").trim();if(!w){LO(I,400," Missing 'command' property in request body ");return}let K=_x(w),H=K[0]===" seal - use "||K[0]===" seal - home "||K[0]?.endsWith(" / seal - use ")||K[0]?.endsWith(" / seal - home ")?K.slice(1):K,G=await pw(H),W=void 0;try{if(G.stdout.trim().startsWith(" { ")||G.stdout.trim().startsWith(" [ "))W=JSON.parse(G.stdout)}catch{}t1(I,G.isError?400:200,{success:!G.isError,stdout:G.stdout,stderr:G.stderr,exitCode:G.exitCode,data:W});return}if(J===" POST "&&Y.startsWith(" / api / tool / ")){let Q=Y.slice(10).trim(),w=h4(Q);if(!w){LO(I,404,`Tool not found: '${Q}'`);return}let K=await DO($)||{},H=b6($,U,K),G=F1(H),W=await G1(G),Z={...K};delete Z.corp;let X=await n4(w,W,Z,G);t1(I,200,X);return}if(Y.startsWith(" / v1 / ")){if(await oW1($,I,J,Y,U))return}LO(I,404,`Cannot ${J} ${Y}. Visit /docs for available endpoints.`)}catch(Q){let w=Q instanceof Error?Q.message:String(Q);LO(I,500,w)}}async function oW1($,I,z,q,U){let Y=Object.fromEntries(U.searchParams.entries());if(z===" GET "&&q===" / v1 / corps "){let J=Y$(),Q=Y4();return t1(I,200,{count:J.length,mode:Q.stateful?" stateful ":" stateless ",defaultCorpId:Q.defaultCorpId,corps:J.map((w)=>({id:w.id,name:w.name,sourceType:w.source.type,sealUrl:w.seal?.url}))}),!0}if(z===" GET "&&q===" / v1 / whoami "){let J=b6($,U,Y),Q=F1(J),w=await G1(Q),K=h4(" seal _whoami "),H=await n4(K,w,{},Q);return t1(I,200,H),!0}if(z===" GET "&&q===" / v1 / session "){let J=b6($,U,Y),Q=F1(J),w=await G1(Q),K=h4(" seal _session _get "),H=await n4(K,w,{},Q);return t1(I,200,H),!0}if(z===" GET "&&q===" / v1 / approval - runs / summary "){let J=b6($,U,Y),Q=F1(J),w=await G1(Q),K=h4(" seal _approval _runs _summary "),H=await n4(K,w,Y,Q);return t1(I,200,H),!0}if(z===" GET "&&q===" / v1 / approval - runs / stats "){let J=b6($,U,Y),Q=F1(J),w=await G1(Q),K=h4(" seal _approval _runs _stats "),H=await n4(K,w,Y,Q);return t1(I,200,H),!0}if(z===" GET "&&q===" / v1 / approval - runs / pick "){let J=b6($,U,Y),Q=F1(J),w=await G1(Q),K=h4(" seal _approval _run _pick "),H=await n4(K,w,Y,Q);return t1(I,200,H),!0}if(z===" GET "&&q===" / v1 / approval - runs / url "){let J=b6($,U,Y),Q=F1(J),w=await G1(Q),K=h4(" seal _approval _run _url _get "),H=await n4(K,w,Y,Q);return t1(I,200,H),!0}if(q.startsWith(" / v1 / approval - runs / ")){let J=q.slice(18).split(" / "),Q=J[0],w=J[1];if(Q&&![" summary "," pick "," stats "," url "," bridge "].includes(Q)){let K=b6($,U,Y),H=F1(K),G=await G1(H);if(!w){let W=h4(" seal _approval _run _get "),Z=await n4(W,G,{recordId:Q,...Y},H);return t1(I,200,Z),!0}if(w===" attachments "){let W=h4(" seal _approval _run _attachments _get "),Z=await n4(W,G,{recordId:Q,...Y},H);return t1(I,200,Z),!0}if(w===" cited - rules "){let W=h4(" seal _approval _run _cited _rules _get "),Z=await n4(W,G,{recordId:Q,...Y},H);return t1(I,200,Z),!0}if(w===" document - summary "){let W=h4(" seal _approval _run _document _summary _get "),Z=await n4(W,G,{recordId:Q,...Y},H);return t1(I,200,Z),!0}if(w===" result "){let W=h4(" seal _approval _run _result _get "),Z=await n4(W,G,{recordId:Q,...Y},H);return t1(I,200,Z),!0}}}if(z===" GET "&&q===" / v1 / approval - runs "){let J=b6($,U,Y),Q=F1(J),w=await G1(Q),K=h4(" seal _approval _runs _search "),H=await n4(K,w,{...Y,limit:Y.limit?Number(Y.limit):void 0,offset:Y.offset?Number(Y.offset):void 0,includeBridge:Y.includeBridge===" true "},Q);return t1(I,200,H),!0}if(z===" GET "&&q===" / v1 / approval / rules "){let J=b6($,U,Y),Q=F1(J),w=await G1(Q),K=h4(" seal _approval _rules _list "),H=await n4(K,w,Y,Q);return t1(I,200,H),!0}if(z===" GET "&&q===" / v1 / simulation / batches "){let J=b6($,U,Y),Q=F1(J),w=await G1(Q),K=h4(" seal _simulation _batches _list "),H=await n4(K,w,Y,Q);return t1(I,200,H),!0}if(z===" POST "&&q===" / v1 / simulation / create - batch " ) { let J = await DO ( $ ) || { } , Q = b6 ( $ , U , J ) , w = F1 ( Q ) , K = await G1 Line truncated
\uD83D\uDE80 seal - use HTTP Server ( v$ { e0 } ) started ` ),console.error( ` URL : http : //${z}:${I}`),console.error(` Docs: http://${z}:${I}/docs`),console.error(` OpenAPI: http://${z}:${I}/openapi.json`),console.error(` CLI Exec: POST http://${z}:${I}/api/cli`),console.error(` REST API: http://${z}:${I}/v1/...
` );U(q)})})}async function QD0( $ ){let I=y0( $ .options.port)??y0( $ .options.p),z=j( $ .options.host)??j( $ .options.h),q=await XF({port:I,host:z}),U=()=>{q.close(()=>{process.exit(0)})};process.on("SIGINT",U),process.on("SIGTERM",U),await new Promise(()=>{})}async function wD0( $ ,I,z,q){if( $ ==="config"|| $ ==="get"){await O0("seal_llm_config_get",I,z,{},W0(q.options));return}if( $ ==="providers"|| $ ==="list"){await O0("seal_llm_providers_list",I,z,{},W0(q.options));return}throw Error( ` Unknown llm command : $ { $ ? ? "" } . Run 'seal-use help' for available commands . ` )}async function KD0( $ ,I){if( $ ==="config"|| $ ==="json"){gx();return}await _x()}function gx(){T0({mcpServers:{"seal-use":{type:"stdio",command:"seal-use",args:["mcp"],env:{SEAL_USE_MCP_ENABLED:"true"}}}})}function HD0( $ ){let I=HF();T0(I,{...W0( $ .options),allowFull:!0})}async function GD0( $ ,I,z,q){if( $ ==="available"){await O0("seal_permissions_available_list",I,z,{},W0(q.options));return}if( $ ==="configs"|| $ ==="list"){await O0("seal_permissions_configs_list",I,z,{},W0(q.options));return}throw Error( ` Unknown permissions command : $ { $ ? ? "" } . Run 'seal-use help' for available commands . ` )}import{readFileSync as WD0}from"node:fs";async function VD0( $ ,I,z,q,U,Y,J){if(! $ || $ ==="get"){await O0("seal_preference_get",U,Y,{},W0(J.options));return}if( $ ==="decision"){if(I==="update"||!I){let Q=j(J.options.input),w=Q?JSON.parse(WD0(Q,"utf8")):J $ (J.json);if(!w||Object.keys(w).length===0)throw Error( ` Usage : seal - use preference decision update -- json '{"explicitApprove":"..."}' ` );await O0("seal_preference_decision_update",U,Y,{...w,dryRun:V0(J.options.dryRun)??V0(J.options["dry-run"])},W0(J.options));return}}if( $ ==="thinking-depth"|| $ ==="thinkingDepth"){if(I==="set"){let Q=j(J.options.default)??j(J.options.level)??q;if(Q!=="medium"&&Q!=="high")throw Error("Usage: seal-use preference thinking-depth set --default <medium|high>");await O0("seal_preference_thinking_depth_set",U,Y,{defaultLevel:Q,dryRun:V0(J.options.dryRun)??V0(J.options["dry-run"])},W0(J.options));return}if(I==="policies"){if(z==="list"||!z){await O0("seal_preference_thinking_depth_policies_list",U,Y,{},W0(J.options));return}if(z==="upsert"){let Q=j(J.options.input),w=Q?JSON.parse(WD0(Q,"utf8")):J $ (J.json);if(!w||!w.id||!w.name)throw Error( ` Usage : seal - use preference thinking - depth policies upsert -- json '{"id":"...","name":"...","level":"high"}' ` );await O0("seal_preference_thinking_depth_policies_upsert",U,Y,{...w,dryRun:V0(J.options.dryRun)??V0(J.options["dry-run"])},W0(J.options));return}if(z==="remove"||z==="delete"){let Q=q??j(J.options.id)??j(J.options.policyId);if(!Q)throw Error("Usage: seal-use preference thinking-depth policies remove <policyId>");await O0("seal_preference_thinking_depth_policies_remove",U,Y,{policyId:Q,dryRun:V0(J.options.dryRun)??V0(J.options["dry-run"])},W0(J.options));return}}}throw Error( ` Unknown preference action : $ { $ ? ? "" } . Available : get , decision update , thinking - depth set , thinking - depth policies list / upsert / remove . ` )}async function ZD0( $ ={}){let I=q $ (),z=Y4(),q=v7(I,{stateful:z.stateful,defaultCorpId:z.defaultCorpId,corpId: $ .corpId},r5());console.log( ` [ probe ] corp = $ { q . id } source = $ { q . source . type } ` );let U=await pU(q);console.log("[probe] seal enterprise"),console.log(JSON.stringify(U,null,2));let Y=await G1(q),J=await XW(Y,{documentLimit:20,stylePreferencesEndpoint:q.seal.endpoints.approvalStylePreferences});console.log("[probe] approval context summary"),console.log(JSON.stringify({rules:J.rules.rules.length,hasPendingRuleDeletes:J.rules.hasPendingDeletes,documents:J.documents.articles.length,documentsTotal:J.documents.total,stylePreferences:J.stylePreferences.ok?"ok": ` error : $ { J . stylePreferences . error } ` },null,2))}async function XD0( $ ,I,z){let q=I??j(z.options.corp)??( $ && $ !=="--corp"? $ :void 0);await ZD0({corpId:q})}async function Cx( $ ,I,z,q,U){if( $ ==="count"){await O0("seal_approval_rules_list",z,q,{countOnly:!0},W0(U.options));return}if( $ ==="list"){if(V0(U.options.count)){await O0("seal_approval_rules_list",z,q,{countOnly:!0},W0(U.options));return}let Y=y0(U.options.limit),J=y0(U.options.offset);if(V0(U.options.summary)){await O0("seal_approval_rules_list",z,q,{fields:zX0,limit:Y,offset:J},W0(U.options));return}let Q=await PI("seal_approval_rules_list",z,q,{limit:Y,offset:J});qX0(Q,V0(U.options.full)===!0),T0(Q);return}if( $ ==="clear"){let Y=V0(U.options.yes)===!0,J=V0(U.options.dryRun)??V0(U.options["dry-run"])??!Y;if(!Y&&!J)throw $ 5("Refusing to clear rules without --yes. Use --dry-run to preview.", ` seal - use rules clear -- corp $ { q . id } -- dry - run ` );let Q=await PI("seal_approval_rules_clear",z,q,{dryRun:J,recode:V0(U.options.recode)});if(!Y&&J&&Q&&typeof Q==="object"){T0({...Q,nextCommand: ` seal - use rules clear -- corp $ { q . id } -- yes ` },W0(U.options));return}T0(Q,W0(U.options));return}if( $ ==="versions"){await O0("seal_approval_rule_versions_list",z,q,{},W0(U.options));return}if( $ ==="version"){let Y=I??j(U.options.version);if(!Y)throw Error("Usage: seal-use rules version <versionId|versionNumber|l
Line truncated
` ).filter(Boolean),Y=U.slice(-I);return{logFile:z,lines:Y,totalLines:U.length}}async function xW 1( $ ){let I=OF ( $ ),z=y x( $ ),q=b w( $ );O D0( $ .stateDir);let U= $ .port??(process.env.PORT?Number.parseInt(process.env.PORT,10):VF ),Y= $ .host??(process.env.HOST?process.env.HOST:ZF);DF (I, ` $ { process . pid }
` ,{mode:384}),DF (z,JSON.stringify({pid:process.pid,port:U,host:Y,version: $ .version,startedAt:new Date().toISOString()},null,2),{mode:384}),c U(q, ` service starting on http : //${Y}:${U} pid=${process.pid}`);let J=null;try{J=await XF ({port:U,host:Y,silent:!0}),c U(q,`service listening pid=${process.pid}`)}catch(w){if(c U(q,`service failed to bind port ${U}: ${w instanceof Error?w.message:String(w)}`),FF (I)===process.pid)U 5(I,{force:!0}),U 5(z,{force:!0});throw w}let Q=()=>{if(J)J.close(),J=null;if(FF (I)===process.pid)U 5(I,{force:!0}),U 5(z,{force:!0});c U(q,`stopped pid=${process.pid}`)};await new Promise((w)=>{let K=!1,H=()=>{if(K)return;K=!0,Q(),process.off("SIGTERM",H),process.off("SIGINT",H),w()};process.once("SIGTERM",H),process.once("SIGINT",H)})}function L D0($){O D0($.stateDir);let I=d U($);if(I.running)return I;let z=$.launcher??{command:process.execPath,args:[$.entryFile]},q=[...z.args??[],"service","run"];if($.port)q.push("--port",String($.port));if($.host)q.push("--host",String($.host));let U=h W1(z.command,q,{cwd:$.appRoot,detached:!0,stdio:["ignore","ignore","ignore"],env:process.env});U.unref();let Y=OF ($);return DF (Y,`${U.pid}
` ,{mode:384}),c U(b w( $ ), ` started pid = $ { U . pid } ` ),{started:!0,...d U( $ )}}function D D0( $ ,I={}){let z=OF ( $ ),q=y x( $ ),U=FF (z);if(!U||!F D0(U, $ .appRoot))return U 5(z,{force:!0}),U 5(q,{force:!0}),I.quiet?void 0:{stopped:!1,reason:"not running"};return process.kill(U,"SIGTERM"),U 5(z,{force:!0}),U 5(q,{force:!0}),c U(b w( $ ), ` stop requested pid = $ { U } ` ),I.quiet?void 0:{stopped:!0,pid:U}}function F D0( $ ,I){if(!kW 1( $ ))return!1;try{let z=S W1("ps",["-p",String( $ ),"-o","command="],{encoding:"utf8"});return(z.includes(I)||z.includes("seal-use")||z.includes("src/cli.ts"))&&z.includes("service")&&z.includes("run")}catch{return!1}}function kW 1( $ ){try{return process.kill( $ ,0),!0}catch{return!1}}function OF ( $ ){return S x( $ .stateDir,"service.pid")}function y x( $ ){return S x( $ .stateDir,"service.json")}function b w( $ ){return S x( $ .stateDir,"service.log")}function FF ( $ ){if(!LF ( $ ))return;let I=Number(h x( $ ,"utf8").trim());return Number.isInteger(I)&&I>0?I:void 0}function O D0( $ ){y W1( $ ,{recursive:!0,mode:448})}function c U( $ ,I){DF ( $ , ` $ { new Date ( ) . toISOString ( ) } $ { I }
` ,{flag:"a",mode:384})}var u x=nW1(fW 1(),".config","seal-use");async function x x( $ ,I,z){let q=z?y 0(z.options.port)??y 0(z.options.p):void 0,U=z?j(z.options.host)??j(z.options.h):void 0,Y=z?y 0(z.options.lines)??y 0(z.options.n):void 0,J=await E I( $ ,{appRoot:I.appRoot,entryFile:I.entryFile,stateDir:u x,version:e0,launcher:I.launcher,port:q,host:U},{maxLines:Y});if(J!==void 0)T0(J)}import{existsSync as bW 1,readFileSync as N D0}from"node:fs";async function M D0( $ ,I,z,q,U){if( $ ==="batch-records"|| $ ==="records"){let Y=I??j(U.options.batchId)??j(U.options["batch-id"]);if(!Y)throw Error("Usage: seal-use simulation batch-records <batchId>");await O 0("seal_simulation_batch_records_get",z,q,{batchId:Y,query:j(U.options.query)},W0(U.options));return}if( $ ==="create"|| $ ==="run"){let Y=j(U.options.mode)??j(U.options.sourceSystem)??j(U.options["source-system"])??"hosecloud",J=Y==="material-pack"?"material_pack":Y,Q=j(U.options.schemaConfig)??j(U.options["schema-config"]),w=Q?JSON.parse(N D0(Q,"utf8")):void 0,K=j(U.options.input),H=K?JSON.parse(N D0(K,"utf8")):J $ (U.json),G=j(U.options.packageId)??j(U.options["package-id"]),W=V6(U.options.packageIds)??V6(U.options["package-ids"])??(G?[G]:void 0),Z=V6(U.options.flowIds)??V6(U.options["flow-ids"])??V6(U.options.documentSn)??V6(U.options["document-sn"]),X=j(U.options.signKey)??j(U.options["sign-key"])??j(U.options.integration),L=V0(U.options.noWait)??V0(U.options["no-wait"]);await O 0("seal_simulation_batch_create",z,q,{mode:J,sourceSystem:J,flowIds:Z,documentSn:Z,rejectNodeName:j(U.options.rejectNode)??j(U.options["reject-node"])??null,thinkingDepthOverride:j(U.options.thinkingDepth)??j(U.options["thinking-depth"]),skipInvoiceGeneration:V0(U.options.skipInvoiceGeneration)??V0(U.options["skip-invoice-generation"]),skipExpenseExtraction:V0(U.options.skipExpenseExtraction)??V0(U.options["skip-expense-extraction"]),disableAttachmentCache:V0(U.options.disableAttachmentCache)??V0(U.options["disable-attachment-cache"]),signKey:X,packageIds:W,packageId:G,templateId:j(U.options.templateId)??j(U.options["template-id"]),schemaConfig:w,requestIds:V6(U.options.requestIds)??V6(U.options["request-ids"]),workflowTypeId:j(U.options.workflowTypeId)??j(U.options["workflow-type-id"]),flowStatusList:V6(U.options.flowStatusList)?.map(Number)??V6(U.options["flow-status-list"])?.map(Number),businessCodes:V6(U.options.businessCodes)??V6(U.options["business-codes"]),documentType:j(U.options.documentType)??j(U.options["document-type"]),startTime:y 0(U.options.startTime)??y 0(U.options["start-time"]),endTime:y 0(U.options.endTime)??y 0(U.options["end-time"]),status:V6(U.options.status),limit:y 0(U.options.limit),noWait:L,rawParams:H},W0(U.options));return}if( $ ==="wait"){let Y=I??j(U.options.batchId)??j(U.options["batch-id"]);if(!Y)throw Error("Usage: seal-use simulation wait <batchId> [--timeout 10m] [--poll-interval 2s]");await O 0("seal_simulation_batch_wait",z,q,{batchId:Y,timeout:j(U.options.timeout),pollInterval:j(U.options.pollInterval)??j(U.options["poll-interval"])},W0(U.options));return}if( $ ==="status"){let Y=I??j(U.options.batchId)??j(U.options["batch-id"]);if(!Y)throw Error("Usage: seal-use simulation status <batchId>");await O 0("seal_simulation_batch_status",z,q,{batchId:Y},W0(U.options));return}if( $ ==="clean"|| $ ==="delete"){let Y=I??j(U.options.batchId)??j(U.options["batch-id"]);if(!Y)throw Error("Usage: seal-use simulation clean <batchId>");await O 0("seal_simulation_batch_clean",z,q,{batchId:Y},W0(U.options));return}if( $ ==="specifications"){let Y=I??j(U.options.integration)??j(U.options.signKey)??j(U.options["sign-key"]);await O 0("seal_simulation_specifications_list",z,q,{signKey:Y},W0(U.options));return}if( $ ==="approval-definitions"|| $ ==="definitions"){await O 0("seal_simulation_feishu_approval_definitions_list",z,q,{},W0(U.options));return}if( $ ==="list"){await O 0("seal_simulation_batches_list",z,q,{limit:y 0(U.options.limit)},W0(U.options));return}if( $ ==="get"){let Y=I??j(U.options.batchId)??j(U.options["batch-id"]);if(!Y)throw Error("Usage: seal-use simulation get <batchId>");await O 0("seal_simulation_batch_get",z,q,{batchId:Y},W0(U.options));return}if( $ ==="templates"){await O 0("seal_simulation_templates_get",z,q,{},W0(U.options));return}if( $ ==="integrations"){await O 0("seal_simulation_integrations_get",z,q,{},W0(U.options));return}if( $ ==="package-upload"){let Y=I??j(U.options.file);if(!Y)throw Error("Usage: seal-use simulation package-upload <材料包.zip>");if(!bW 1(Y))throw Error( ` File not found : $ { Y } ` );await O 0("seal_simulation_material_package_upload",z,q,{filePath:Y},W0(U.options));return}throw Error( ` Unknown simulation command : $ { $ ? ? "" } . Run 'seal-use help' for available commands . ` )}import{existsSync as A D0}from"node:fs";import{join as NF }from"node:path";function P D0( $ ,I,z){if( $ ==="dump"|| $ ==="cat"|| $ ==="show"){process.stdout.write( ` $ { aL0 ( ) }
` );return}if( $ ==="install"|| $ ==="init"|| $ ==="sync"){let q=V0(z.options.local)||V0(z.options.workspace),U=j(z.options.dir)??j(z.options.target)??I,Y=U?U:q?NF(process.cwd(),".agents","skills","seal-use"):TI(),J=Ax(Y);T0({installed:!0,targetDir:J.targetDir,fileCount:J.files.length,files:J.files});return}if( $ ==="status"|| $ ==="get"||! $ ){let q=TI(),U=NF(process.cwd(),".agents","skills","seal-use");T0({global:{dir:q,installed:AD0(NF(q,"SKILL.md"))},local:{dir:U,installed:AD0(NF(U,"SKILL.md"))}});return}throw Error( ` Unknown skill command : $ { $ } . Run 'seal-use help' for available commands . ` )}async function TD0( $ ,I){if( $ ==="config"){T0(await pU(I));return}throw Error( ` Unknown source command : $ { $ ? ? "" } . Run 'seal-use help' for available commands . ` )}async function ED0( $ ,I,z,q){if(! $ )throw Error("Usage: seal-use tool <toolName> [--json '{...}']");await O0( $ ,I,z,J $ (q.json),W0(q.options))}function BD0(){T0(Rw.map(( $ )=>({name: $ .name,description: $ .description})))}import{chmodSync as iW1,mkdirSync as pW1,renameSync as kx,rmSync as cW1,unlinkSync as _D0,writeFileSync as jD0}from"node:fs";import{dirname as dW1,join as vD0}from"node:path";import{spawnSync as BI}from"node:child_process";function MF( $ =process.execPath,I=import.meta.url){if(I.includes("/ $ bunfs/")||I.includes(" \\ $ bunfs \\ "))return!0;let z= $ .toLowerCase().replace(/ \\ /g,"/");return!z.endsWith("/bun")&&!z.endsWith("/bun.exe")&&!z.endsWith("/node")&&!z.endsWith("/node.exe")}var CD0="yunyingk/seal-use",pw="yunyingk/seal-home";var mW1="SEAL_USE_GITHUB_REPO",lW1="SEAL_HOME_GITHUB_REPO";async function hD0( $ ,I={}){let z={appRoot: $ .appRoot,entryFile: $ .entryFile,stateDir:ux,version:e0,launcher: $ .launcher},q=I.repo||process.env[mW1]?.trim()||process.env[lW1]?.trim()||CD0,U=I.targetVersion?.trim(),Y=U&&U.toLowerCase()!=="latest"?U:void 0;if(Y){let M=Y.replace(/^v/,""),v=SD0(M,e0);if(v<0)if(!VB&&I.force);else{T0({updated:!1,currentVersion:e0,targetVersion:M,mode:MF()?"binary":"source",message:!VB? ` Cannot downgrade seal - use from dev build v$ { e0 } to release v$ { M } . Use -- force to overwrite . ` : ` Cannot downgrade seal - use from v$ { e0 } to older version v$ { M } . Updates must be forward - only . ` });return}if(v===0&&!I.force){T0({updated:!1,currentVersion:e0,targetVersion:M,mode:MF()?"binary":"source",message: ` seal - use is already at version v$ { e0 } . Use -- force to reinstall . ` });return}}if(I.changelogOnly){let M=await fx(q,I.limit??10);T0({currentVersion:e0,totalQueried:M.length,releases:M.map((v)=>({version:v.version,tagName:v.tagName,publishedAt:v.publishedAt,author:v.author,releaseNotes:v.notes,releaseUrl:v.htmlUrl,isCurrent:v.version===e0,isNewer:iw(v.version,e0)}))});return}if(!MF()){if(I.checkOnly){let v=await fx(q,30),u=v[0],h=u?.version??e0,x=v.find((f)=>f.version===e0),B=iw(h,e0),n=v.filter((f)=>iw(f.version,e0));T0({updated:!1,updateAvailable:B,currentVersion:e0,currentVersionPublishedAt:x?.publishedAt,latestVersion:h,latestVersionPublishedAt:u?.publishedAt,behindCount:n.length,pendingReleases:n.map((f)=>({version:f.version,tagName:f.tagName,publishedAt:f.publishedAt,author:f.author,releaseNotes:f.notes,releaseUrl:f.htmlUrl})),releaseNotes:u?.notes??"",releaseUrl:u?.htmlUrl??"",mode:"source",message:"Running in source development mode. Run 'seal-use update' to git pull & bun install."});return}let M=dU(z).running;if(M)await EI("stop",z);try{gD0("git",["-C", $ .appRoot,"pull","--ff-only"])}catch(v){console.error( ` git pull skipped : $ { v instanceof Error ? v . message : String ( v ) } ` )}if(gD0("bun",["install"],{cwd: $ .appRoot}),M)await EI("start",z);T0({updated:!0,serviceRestarted:M,version:e0,mode:"source"});return}let J=oW1(),Q=rW1(),w=await fx(q,30),K=Y?w.find((M)=>M.version===Y||M.tagName===Y||M.tagName=== ` v$ { Y } ` )??await RD0(q,Y):w[0]??await RD0(q);if(!K){T0({updated:!1,currentVersion:e0,mode:"binary",message: ` Failed to query releases from repository '${q}' ` });return}let H=K.version,G=w.find((M)=>M.version===e0),W=iw(H,e0),Z=W||Boolean(I.force),X=w.filter((M)=>iw(M.version,e0));if(I.checkOnly){T0({updated:!1,updateAvailable:W,currentVersion:e0,currentVersionPublishedAt:G?.publishedAt,latestVersion:H,latestVersionPublishedAt:K.publishedAt,behindCount:X.length,pendingReleases:X.map((M)=>({version:M.version,tagName:M.tagName,publishedAt:M.publishedAt,author:M.author,releaseNotes:M.notes,releaseUrl:M.htmlUrl})),releaseNotes:K.notes,releaseUrl:K.htmlUrl,mode:"binary"});return}if(!Z){T0({updated:!1,currentVersion:e0,currentVersionPublishedAt:G?.publishedAt,latestVersion:H,latestVersionPublishedAt:K.publishedAt,mode:"binary",message: ` seal - use is already up to date ( v$ { e0 } ) ` });return}let L=tW1(K.assets,J,Q);if(!L)throw Error( ` No compatible binary found for $ { J } - $ { Q } in release v$ { H } . Available assets : $ { K . assets . map ( ( M ) => M . name ) . join ( ", " ) } ` );let D=dU(z).running;if(D)await EI("stop",z);let F=process.execPath,T=dW1(F),P=vD0(T, ` . tmp - update - $ { Date . now ( ) } ` );pW1(P,{recursive:!0});try{let M=vD0(P,L.name);await aW1(L.downloadUrl,M,K.tagName,L.name);let v=M;if(L.name.endsWith(".tar.gz")||L.name.endsWith(".tgz"))v=sW1
Line truncated
` )}catch{}}async function aW 1( $ ,I,z,q){let U=n x(),Y=[],J=z?z.startsWith("v")?z: ` v$ { z } ` :void 0,Q=q|| $ .split("/").pop()||"";if(U!=="github"){if(J&&Q)Y.push( ` https : //git.ying-qing.cn/gitea/seal-use/releases/download/${J}/${Q}`,`https://git.ying-qing.cn/gitea/seal-home/releases/download/${J}/${Q}`);if($.startsWith("https://git.ying-qing.cn"))Y.push($)}if(U!=="gitea")if(J&&Q){let L=`https://github.com/${C D0}/releases/download/${J}/${Q}`;if(!process.env.CI)Y.push(`https://ghfast.top/${L}`,`https://gh.ddlc.top/${L}`);Y.push(L)}else if($.includes("github.com")){if(!process.env.CI)Y.push(`https://ghfast.top/${$}`,`https://gh.ddlc.top/${$}`);Y.push($)}else Y.push($);let w=Array.from(new Set(Y)),K,H=6000,G=6000,W=307200,Z=1e4,X=180000;for(let L=0;L<w.length;L++){let D=w[L],F =new AbortController,T="",P=(h)=>{T=h;try{F .abort()}catch{}},M=setTimeout(()=>{P("Connection timed out (no response headers within 6s)")},H),v,u ;try{AF (`==> [${L+1}/${w.length}] Downloading via: ${D}`);let h=await fetch(D,{signal:F .signal});if(M)clearTimeout(M),M=void 0;if(!h.ok)throw Error(`HTTP ${h.status} ${h.statusText}`);v=setTimeout(()=>{P("Overall download time exceeded 3 minutes")},X);let x=Number(h.headers.get("content-length"))||0,B=h.body?.getReader();if(!B){let p=Buffer.from(await h.arrayBuffer());if(p.length<1000)throw Error(`Downloaded content is suspiciously small (${p.length} bytes)`);j D0(I,p),AF (`✓ Download succeeded (${(p.length/1024/1024).toFixed(1)} MB)`);return}let n=[],f=0,g =0;u =setTimeout(()=>{if(f<W){let p=(f/1024).toFixed(1);P(`Initial transfer too slow (${p} KB < 300 KB in 6s), switching mirror...`)}},G);while(!0){let p=B.read(),z0,R =new Promise((U0,G0)=>{z0=setTimeout(()=>{G0(Error("Data transfer stalled (no chunk received for 10s)"))},Z)}),i;try{i=await Promise.race([p,R ])}finally{if(z0)clearTimeout(z0)}let{done:c,value:r}=i;if(c)break;if(r){if(n.push(r),f+=r.length,u &&f>=W)clearTimeout(u ),u =void 0;let U0=Date.now();if(U0-g >200){g =U0;let G0=x?Math.round(f/x*100):0,A0=(f/1048576).toFixed(1),R 0=x?(x/1048576).toFixed(1):"?";try{process.stderr.write(`\r ↳ Progress: ${G0}% (${A0} / ${R 0} MB)...`)}catch{}}}}try{process.stderr.write(`
` )}catch{}let k=Buffer.concat(n);if(k.length<1000)throw Error( ` Downloaded content is suspiciously small ( $ { k . length } bytes ) ` );j D0(I,k),AF ( ` ✓ Download completed successfully ( $ { ( k . length / 1024 / 1024 ) . toFixed ( 1 ) } MB ) ` );return}catch(h){if(M)clearTimeout(M);if(u )clearTimeout(u );if(v)clearTimeout(v);let x=T||(h instanceof Error?h.message:String(h));K=Error(x),AF ( `
↳ Mirror failed : $ { K . message } ` )}finally{if(M)clearTimeout(M);if(u )clearTimeout(u );if(v)clearTimeout(v)}}throw Error( ` Failed to download asset from all mirrors : $ { K ? . message } ` )}function sW 1( $ ,I,z){let q=B I("tar",["-xzf", $ ,"-C",I],{stdio:"pipe"});if(q.status!==0)throw Error( ` Failed to extract tar archive : $ { q . stderr . toString ( ) } ` );_ D0( $ );let U=z==="windows"?"seal-use.exe":"seal-use",Y=B I("find",[I,"-type","f"],{encoding:"utf8"}).stdout.trim().split( `
` ).filter(Boolean),J=Y.find((Q)=>Q.endsWith( ` / $ { U } ` )||Q.endsWith(U));if(J)return J;return Y[0]|| $ }function eW 1( $ ,I,z){let q=B I("unzip",["-q","-o", $ ,"-d",I],{stdio:"pipe"});if(q.status!==0)throw Error( ` Failed to extract zip archive : $ { q . stderr . toString ( ) } ` );_ D0( $ );let U=z==="windows"?"seal-use.exe":"seal-use",Y=B I("find",[I,"-type","f"],{encoding:"utf8"}).stdout.trim().split( `
` ).filter(Boolean),J=Y.find((Q)=>Q.endsWith( ` / $ { U } ` )||Q.endsWith(U));if(J)return J;return Y[0]|| $ }function SD0( $ ,I){let z= $ .replace(/^v/,"").split(".").map((U)=>Number.parseInt(U,10)||0),q=I.replace(/^v/,"").split(".").map((U)=>Number.parseInt(U,10)||0);for(let U=0;U<Math.max(z.length,q.length);U++){let Y=z[U]??0,J=q[U]??0;if(Y>J)return 1;if(Y<J)return-1}return 0}function iw( $ ,I){return SD0( $ ,I)>0}function gD0( $ ,I,z={}){let q=BI( $ ,I,{cwd:z.cwd,encoding:"utf8",stdio:["ignore","pipe","pipe"]});if(q.stdout)console.error(q.stdout.trimEnd());if(q.stderr)console.error(q.stderr.trimEnd());if(q.status!==0)throw Error( ` $ { $ } $ { I . join ( " " ) } failed with status $ { q . status } ` )}async function yD0( $ ,I,z,q,U){if( $ ==="create"){let Y=j(U.options.name)??I,J=j(U.options.phone);if(!Y||!J)throw Error("Usage: seal-use users create --name <name> --phone <phone> [--dept <deptId>]");let Q=j(U.options.dept)??j(U.options.departmentId);await O0("seal_user_create",z,q,{name:Y,phone:J,departmentIds:Q?[Q]:void 0},W0(U.options));return}if( $ ==="reset-password"){let Y=I??j(U.options.userId);if(!Y)throw Error("Usage: seal-use users reset-password <userId>");await O0("seal_user_reset_password",z,q,{userId:Y},W0(U.options));return}if( $ ==="search"|| $ ==="list"){let Y=I??j(U.options.keyword)??j(U.options.query)??"";await O0("seal_user_search",z,q,{keyword:Y},W0(U.options));return}if( $ ==="get"){let Y=I??j(U.options.userId);if(!Y)throw Error("Usage: seal-use users get <userId>");await O0("seal_user_get",z,q,{userId:Y},W0(U.options));return}if( $ ==="delete"){let Y=I??j(U.options.userId);if(!Y)throw Error("Usage: seal-use users delete <userId>");await O0("seal_user_delete",z,q,{userId:Y},W0(U.options));return}if( $ ==="activate"){let Y=I??j(U.options.userId);if(!Y)throw Error("Usage: seal-use users activate <userId>");await O0("seal_user_activate",z,q,{userId:Y},W0(U.options));return}if( $ ==="delegation"|| $ ==="impersonate"){let Y=I??j(U.options.userId)??j(U.options.phone);if(!Y)throw Error("Usage: seal-use users delegation <userIdOrPhone> [--note <note>]");let J=j(U.options.note);await O0("seal_user_delegation_create",z,q,{userIdOrPhone:Y,note:J},W0(U.options));return}throw Error( ` Unknown users command : $ { $ ? ? "" } . Run 'seal-use help' for available commands . ` )}var uD0=bx(bx(bx(IV1(import.meta.url)))),zV1=new Set(["config","service","stop","http","serve","update","tools","corps","corp","tool","source","auth","delegation","users","contacts","data","llm","permissions","billing","webhook","webhooks","context","rules","approval-runs","analytics","simulation","deploy","preference","preferences","mcp","server","mcp-config","skill","openapi","probe","doctor","changelog"]),qV1=new Set(["http","server","web","mcp"]);function UV1( $ ){if(! $ .length)return!1;let I= $ [0]?.toLowerCase(),z= $ [1]?.toLowerCase();if(I&&qV1.has(I))return!0;if((I==="service"||I==="daemon")&&z==="run")return!0;return!1}var xD0=Promise.resolve();function nw( $ ,I={}){if(UV1( $ ))return kD0( $ ,I);let z=xD0.then(()=>kD0( $ ,I));return xD0=z.then(()=>{return},()=>{return}),z}async function kD0( $ ,I){let z=[],q=[],U=console.log,Y=console.error,J={appRoot:I.appRoot??uD0,entryFile:I.entryFile?? $ V1(I.appRoot??uD0,"src","cli.ts"),launcher:I.launcher};console.log=(...Q)=>{z.push(Kx(Q))},console.error=(...Q)=>{q.push(Kx(Q))};try{return await YV1( $ ,J),{stdout:hw(z),stderr:hw(q),isError:!1,exitCode:0}}catch(Q){let w=Sw(Q instanceof Error?Q.message:String(Q)),K=MD(Q);if(q.push(w),K.nextAction&&!w.includes("Next action:"))q.push( ` \uD83D\uDC49 Next action : $ { K . nextAction } ` );return{stdout:hw(z),stderr:hw(q),isError:!0,exitCode:K.exitCode}}finally{console.log=U,console.error=Y}}async function YV1( $ ,I){let z=mZ0( $ ),[q,U,Y]=z.command;if(q==="version"||q==="v"||Boolean(z.options.version)||Boolean(z.options.v)||Boolean(z.options.V)){T0(vJ);return}let J= $ X0(z);if(J.isHelp){UX0(J.target);return}if(!q||!zV1.has(q))throw Error( ` Unknown command : $ { z . command . join ( " " ) } . Run 'seal-use help' for available commands . ` );if(q==="webhook"&&U==="material-pack"&&Y==="preview"){let K=z.command[3]??j(z.options.file)??j(z.options.input);if(!K)throw Error("Usage: seal-use webhook material-pack preview <材料包.zip>");await JX0(K,Cw(z.options));return}if(q==="openapi"){HD0(z);return}if(q==="mcp-config"){gx();return}if(q==="skill"){PD0(U,Y,z);return}if(q==="mcp"||q==="server"){await KD0(U,z);return}if(q==="probe"){await XD0(U,Y,z);return}if(q==="doctor"){await qD0(U,Y,z);return}if(q==="config"){XX0(U,Y,z);return}if(q==="service"){await xx(U,I,z);return}if(q==="stop"){await xx("stop",I,z);return}if(q==="http"||q==="serve"){await QD0(z);return}if(q==="update"||q==="changelog"){let K=q==="changelog"||U==="changelog"||U==="log"||U==="history"||V0(z.options.changelog)===!0,H=U==="check"||V0(z.options.check)===!0||V0(z.options["check-only"])===!0,G=j(z.options.version)??j(z.options.tag)??(!K&&!H&&U&&!U.startsWith("-")?U:void 0);await hD0(I,{checkOnly:H,changelogOnly:K,limit:y0(z.options.limit),force:V0(z.options.force),targetVersion:G,repo:j(z.options.re
Line truncated
` );U(q)})})}async function XD0( $ ){let I=S0( $ .options.port)??S0( $ .options.p),z=j( $ .options.host)??j( $ .options.h),q=await NO({port:I,host:z}),U=()=>{q.close(()=>{process.exit(0)})};process.on("SIGINT",U),process.on("SIGTERM",U),await new Promise(()=>{})}async function LD0( $ ,I,z,q){if( $ ==="config"|| $ ==="get"){await F0("seal_llm_config_get",I,z,{},W0(q.options));return}if( $ ==="providers"|| $ ==="list"){await F0("seal_llm_providers_list",I,z,{},W0(q.options));return}throw Error( ` Unknown llm command : $ { $ ? ? "" } . Run 'seal-use help' for available commands . ` )}async function DD0( $ ,I){if( $ ==="config"|| $ ==="json"){Cx();return}await hx()}function Cx(){T0({mcpServers:{"seal-use":{type:"stdio",command:"seal-use",args:["mcp"],env:{SEAL_USE_MCP_ENABLED:"true"}}}})}function OD0( $ ){let I=XO();T0(I,{...W0( $ .options),allowFull:!0})}async function FD0( $ ,I,z,q){if( $ ==="available"){await F0("seal_permissions_available_list",I,z,{},W0(q.options));return}if( $ ==="configs"|| $ ==="list"){await F0("seal_permissions_configs_list",I,z,{},W0(q.options));return}throw Error( ` Unknown permissions command : $ { $ ? ? "" } . Run 'seal-use help' for available commands . ` )}import{readFileSync as ND0}from"node:fs";async function MD0( $ ,I,z,q,U,Y,J){if(! $ || $ ==="get"){await F0("seal_preference_get",U,Y,{},W0(J.options));return}if( $ ==="decision"){if(I==="update"||!I){let Q=j(J.options.input),w=Q?JSON.parse(ND0(Q,"utf8")):w $ (J.json);if(!w||Object.keys(w).length===0)throw Error( ` Usage : seal - use preference decision update -- json '{"explicitApprove":"..."}' ` );await F0("seal_preference_decision_update",U,Y,{...w,dryRun:V0(J.options.dryRun)??V0(J.options["dry-run"])},W0(J.options));return}}if( $ ==="thinking-depth"|| $ ==="thinkingDepth"){if(I==="set"){let Q=j(J.options.default)??j(J.options.level)??q;if(Q!=="medium"&&Q!=="high")throw Error("Usage: seal-use preference thinking-depth set --default <medium|high>");await F0("seal_preference_thinking_depth_set",U,Y,{defaultLevel:Q,dryRun:V0(J.options.dryRun)??V0(J.options["dry-run"])},W0(J.options));return}if(I==="policies"){if(z==="list"||!z){await F0("seal_preference_thinking_depth_policies_list",U,Y,{},W0(J.options));return}if(z==="upsert"){let Q=j(J.options.input),w=Q?JSON.parse(ND0(Q,"utf8")):w $ (J.json);if(!w||!w.id||!w.name)throw Error( ` Usage : seal - use preference thinking - depth policies upsert -- json '{"id":"...","name":"...","level":"high"}' ` );await F0("seal_preference_thinking_depth_policies_upsert",U,Y,{...w,dryRun:V0(J.options.dryRun)??V0(J.options["dry-run"])},W0(J.options));return}if(z==="remove"||z==="delete"){let Q=q??j(J.options.id)??j(J.options.policyId);if(!Q)throw Error("Usage: seal-use preference thinking-depth policies remove <policyId>");await F0("seal_preference_thinking_depth_policies_remove",U,Y,{policyId:Q,dryRun:V0(J.options.dryRun)??V0(J.options["dry-run"])},W0(J.options));return}}}throw Error( ` Unknown preference action : $ { $ ? ? "" } . Available : get , decision update , thinking - depth set , thinking - depth policies list / upsert / remove . ` )}async function AD0( $ ={}){let I=Y $ (),z=Y4(),q=_7(I,{stateful:z.stateful,defaultCorpId:z.defaultCorpId,corpId: $ .corpId},s5());console.log( ` [ probe ] corp = $ { q . id } source = $ { q . source . type } ` );let U=await mU(q);console.log("[probe] seal enterprise"),console.log(JSON.stringify(U,null,2));let Y=await G1(q),J=await OW(Y,{documentLimit:20,stylePreferencesEndpoint:q.seal.endpoints.approvalStylePreferences});console.log("[probe] approval context summary"),console.log(JSON.stringify({rules:J.rules.rules.length,hasPendingRuleDeletes:J.rules.hasPendingDeletes,documents:J.documents.articles.length,documentsTotal:J.documents.total,stylePreferences:J.stylePreferences.ok?"ok": ` error : $ { J . stylePreferences . error } ` },null,2))}async function PD0( $ ,I,z){let q=I??j(z.options.corp)??( $ && $ !=="--corp"? $ :void 0);await AD0({corpId:q})}async function ux( $ ,I,z,q,U){if( $ ==="count"){await F0("seal_approval_rules_list",z,q,{countOnly:!0},W0(U.options));return}if( $ ==="list"){if(V0(U.options.count)){await F0("seal_approval_rules_list",z,q,{countOnly:!0},W0(U.options));return}let Y=S0(U.options.limit),J=S0(U.options.offset);if(V0(U.options.summary)){await F0("seal_approval_rules_list",z,q,{fields:HX0,limit:Y,offset:J},W0(U.options));return}let Q=await EI("seal_approval_rules_list",z,q,{limit:Y,offset:J});GX0(Q,V0(U.options.full)===!0),T0(Q);return}if( $ ==="clear"){let Y=V0(U.options.yes)===!0,J=V0(U.options.dryRun)??V0(U.options["dry-run"])??!Y;if(!Y&&!J)throw z5("Refusing to clear rules without --yes. Use --dry-run to preview.", ` seal - use rules clear -- corp $ { q . id } -- dry - run ` );let Q=await EI("seal_approval_rules_clear",z,q,{dryRun:J,recode:V0(U.options.recode)});if(!Y&&J&&Q&&typeof Q==="object"){T0({...Q,nextCommand: ` seal - use rules clear -- corp $ { q . id } -- yes ` },W0(U.options));return}T0(Q,W0(U.options));return}if( $ ==="versions"){await F0("seal_approval_rule_versions_list",z,q,{},W0(U.options));return}if( $ ==="version"){let Y=I??j(U.options.version);if(!Y)throw Error("Usage: seal-use rules version <versionId|versionNumber|l
Line truncated
` ).filter(Boolean),Y=U.slice(-I);return{logFile:z,lines:Y,totalLines:U.length}}async function IV 1( $ ){let I=T O( $ ),z=x x( $ ),q=c w( $ );j D0( $ .stateDir);let U= $ .port??(process.env.PORT?Number.parseInt(process.env.PORT,10):OO ),Y= $ .host??(process.env.HOST?process.env.HOST:FO);AO (I, ` $ { process . pid }
` ,{mode:384}),AO (z,JSON.stringify({pid:process.pid,port:U,host:Y,version: $ .version,startedAt:new Date().toISOString()},null,2),{mode:384}),l U(q, ` service starting on http : //${Y}:${U} pid=${process.pid}`);let J=null;try{J=await NO ({port:U,host:Y,silent:!0}),l U(q,`service listening pid=${process.pid}`)}catch(w){if(l U(q,`service failed to bind port ${U}: ${w instanceof Error?w.message:String(w)}`),PO (I)===process.pid)Q 5(I,{force:!0}),Q 5(z,{force:!0});throw w}let Q=()=>{if(J)J.close(),J=null;if(PO (I)===process.pid)Q 5(I,{force:!0}),Q 5(z,{force:!0});l U(q,`stopped pid=${process.pid}`)};await new Promise((w)=>{let K=!1,H=()=>{if(K)return;K=!0,Q(),process.off("SIGTERM",H),process.off("SIGINT",H),w()};process.once("SIGTERM",H),process.once("SIGINT",H)})}function T D0($){j D0($.stateDir);let I=o U($);if(I.running)return I;let z=$.launcher??{command:process.execPath,args:[$.entryFile]},q=[...z.args??[],"service","run"];if($.port)q.push("--port",String($.port));if($.host)q.push("--host",String($.host));let U=a W1(z.command,q,{cwd:$.appRoot,detached:!0,stdio:["ignore","ignore","ignore"],env:process.env});U.unref();let Y=T O($);return AO (Y,`${U.pid}
` ,{mode:384}),l U(c w( $ ), ` started pid = $ { U . pid } ` ),{started:!0,...o U( $ )}}function E D0( $ ,I={}){let z=T O( $ ),q=x x( $ ),U=PO (z);if(!U||!B D0(U, $ .appRoot))return Q 5(z,{force:!0}),Q 5(q,{force:!0}),I.quiet?void 0:{stopped:!1,reason:"not running"};return process.kill(U,"SIGTERM"),Q 5(z,{force:!0}),Q 5(q,{force:!0}),l U(c w( $ ), ` stop requested pid = $ { U } ` ),I.quiet?void 0:{stopped:!0,pid:U}}function B D0( $ ,I){if(!zV 1( $ ))return!1;try{let z=s W1("ps",["-p",String( $ ),"-o","command="],{encoding:"utf8"});return(z.includes(I)||z.includes("seal-use")||z.includes("src/cli.ts"))&&z.includes("service")&&z.includes("run")}catch{return!1}}function zV 1( $ ){try{return process.kill( $ ,0),!0}catch{return!1}}function T O( $ ){return y x( $ .stateDir,"service.pid")}function x x( $ ){return y x( $ .stateDir,"service.json")}function c w( $ ){return y x( $ .stateDir,"service.log")}function PO ( $ ){if(!MO ( $ ))return;let I=Number(S x( $ ,"utf8").trim());return Number.isInteger(I)&&I>0?I:void 0}function j D0( $ ){e W1( $ ,{recursive:!0,mode:448})}function l U( $ ,I){AO ( $ , ` $ { new Date ( ) . toISOString ( ) } $ { I }
` ,{flag:"a",mode:384})}var k x=UV1(qV 1(),".config","seal-use");async function f x( $ ,I,z){let q=z?S 0(z.options.port)??S 0(z.options.p):void 0,U=z?j(z.options.host)??j(z.options.h):void 0,Y=z?S 0(z.options.lines)??S 0(z.options.n):void 0,J=await j I( $ ,{appRoot:I.appRoot,entryFile:I.entryFile,stateDir:k x,version:e0,launcher:I.launcher,port:q,host:U},{maxLines:Y});if(J!==void 0)T0(J)}import{existsSync as YV 1,readFileSync as v D0}from"node:fs";async function g D0( $ ,I,z,q,U){if( $ ==="batch-records"|| $ ==="records"){let Y=I??j(U.options.batchId)??j(U.options["batch-id"]);if(!Y)throw Error("Usage: seal-use simulation batch-records <batchId>");await F 0("seal_simulation_batch_records_get",z,q,{batchId:Y,query:j(U.options.query)},W0(U.options));return}if( $ ==="create"|| $ ==="run"){let Y=j(U.options.mode)??j(U.options.sourceSystem)??j(U.options["source-system"])??"hosecloud",J=Y==="material-pack"?"material_pack":Y,Q=j(U.options.schemaConfig)??j(U.options["schema-config"]),w=Q?JSON.parse(v D0(Q,"utf8")):void 0,K=j(U.options.input),H=K?JSON.parse(v D0(K,"utf8")):w $ (U.json),G=j(U.options.packageId)??j(U.options["package-id"]),W=V6(U.options.packageIds)??V6(U.options["package-ids"])??(G?[G]:void 0),Z=V6(U.options.flowIds)??V6(U.options["flow-ids"])??V6(U.options.documentSn)??V6(U.options["document-sn"]),X=j(U.options.signKey)??j(U.options["sign-key"])??j(U.options.integration),L=V0(U.options.noWait)??V0(U.options["no-wait"]);await F 0("seal_simulation_batch_create",z,q,{mode:J,sourceSystem:J,flowIds:Z,documentSn:Z,rejectNodeName:j(U.options.rejectNode)??j(U.options["reject-node"])??null,thinkingDepthOverride:j(U.options.thinkingDepth)??j(U.options["thinking-depth"]),skipInvoiceGeneration:V0(U.options.skipInvoiceGeneration)??V0(U.options["skip-invoice-generation"]),skipExpenseExtraction:V0(U.options.skipExpenseExtraction)??V0(U.options["skip-expense-extraction"]),disableAttachmentCache:V0(U.options.disableAttachmentCache)??V0(U.options["disable-attachment-cache"]),signKey:X,packageIds:W,packageId:G,templateId:j(U.options.templateId)??j(U.options["template-id"]),schemaConfig:w,requestIds:V6(U.options.requestIds)??V6(U.options["request-ids"]),workflowTypeId:j(U.options.workflowTypeId)??j(U.options["workflow-type-id"]),flowStatusList:V6(U.options.flowStatusList)?.map(Number)??V6(U.options["flow-status-list"])?.map(Number),businessCodes:V6(U.options.businessCodes)??V6(U.options["business-codes"]),documentType:j(U.options.documentType)??j(U.options["document-type"]),startTime:S 0(U.options.startTime)??S 0(U.options["start-time"]),endTime:S 0(U.options.endTime)??S 0(U.options["end-time"]),status:V6(U.options.status),limit:S 0(U.options.limit),noWait:L,rawParams:H},W0(U.options));return}if( $ ==="wait"){let Y=I??j(U.options.batchId)??j(U.options["batch-id"]);if(!Y)throw Error("Usage: seal-use simulation wait <batchId> [--timeout 10m] [--poll-interval 2s]");await F 0("seal_simulation_batch_wait",z,q,{batchId:Y,timeout:j(U.options.timeout),pollInterval:j(U.options.pollInterval)??j(U.options["poll-interval"])},W0(U.options));return}if( $ ==="status"){let Y=I??j(U.options.batchId)??j(U.options["batch-id"]);if(!Y)throw Error("Usage: seal-use simulation status <batchId>");await F 0("seal_simulation_batch_status",z,q,{batchId:Y},W0(U.options));return}if( $ ==="clean"|| $ ==="delete"){let Y=I??j(U.options.batchId)??j(U.options["batch-id"]);if(!Y)throw Error("Usage: seal-use simulation clean <batchId>");await F 0("seal_simulation_batch_clean",z,q,{batchId:Y},W0(U.options));return}if( $ ==="specifications"){let Y=I??j(U.options.integration)??j(U.options.signKey)??j(U.options["sign-key"]);await F 0("seal_simulation_specifications_list",z,q,{signKey:Y},W0(U.options));return}if( $ ==="approval-definitions"|| $ ==="definitions"){await F 0("seal_simulation_feishu_approval_definitions_list",z,q,{},W0(U.options));return}if( $ ==="list"){await F 0("seal_simulation_batches_list",z,q,{limit:S 0(U.options.limit)},W0(U.options));return}if( $ ==="get"){let Y=I??j(U.options.batchId)??j(U.options["batch-id"]);if(!Y)throw Error("Usage: seal-use simulation get <batchId>");await F 0("seal_simulation_batch_get",z,q,{batchId:Y},W0(U.options));return}if( $ ==="templates"){await F 0("seal_simulation_templates_get",z,q,{},W0(U.options));return}if( $ ==="integrations"){await F 0("seal_simulation_integrations_get",z,q,{},W0(U.options));return}if( $ ==="package-upload"){let Y=I??j(U.options.file);if(!Y)throw Error("Usage: seal-use simulation package-upload <材料包.zip>");if(!YV 1(Y))throw Error( ` File not found : $ { Y } ` );await F 0("seal_simulation_material_package_upload",z,q,{filePath:Y},W0(U.options));return}throw Error( ` Unknown simulation command : $ { $ ? ? "" } . Run 'seal-use help' for available commands . ` )}import{existsSync as R D0}from"node:fs";import{join as EO }from"node:path";function _ D0( $ ,I,z){if( $ ==="dump"|| $ ==="cat"|| $ ==="show"){process.stdout.write( ` $ { YD0 ( ) }
` );return}if( $ ==="install"|| $ ==="init"|| $ ==="sync"){let q=V0(z.options.local)||V0(z.options.workspace),U=j(z.options.dir)??j(z.options.target)??I,Y=U?U:q?EO(process.cwd(),".agents","skills","seal-use"):BI(),J=Ex(Y);T0({installed:!0,targetDir:J.targetDir,fileCount:J.files.length,files:J.files});return}if( $ ==="status"|| $ ==="get"||! $ ){let q=BI(),U=EO(process.cwd(),".agents","skills","seal-use");T0({global:{dir:q,installed:RD0(EO(q,"SKILL.md"))},local:{dir:U,installed:RD0(EO(U,"SKILL.md"))}});return}throw Error( ` Unknown skill command : $ { $ } . Run 'seal-use help' for available commands . ` )}async function CD0( $ ,I){if( $ ==="config"){T0(await mU(I));return}throw Error( ` Unknown source command : $ { $ ? ? "" } . Run 'seal-use help' for available commands . ` )}async function hD0( $ ,I,z,q){if(! $ )throw Error("Usage: seal-use tool <toolName> [--json '{...}']");await F0( $ ,I,z,w $ (q.json),W0(q.options))}function uD0(){T0(Cw.map(( $ )=>({name: $ .name,description: $ .description})))}import{chmodSync as JV1,mkdirSync as QV1,renameSync as nx,rmSync as wV1,unlinkSync as fD0,writeFileSync as SD0}from"node:fs";import{dirname as KV1,join as yD0}from"node:path";import{spawnSync as vI}from"node:child_process";function BO( $ =process.execPath,I=import.meta.url){if(I.includes("/ $ bunfs/")||I.includes(" \\ $ bunfs \\ "))return!0;let z= $ .toLowerCase().replace(/ \\ /g,"/");return!z.endsWith("/bun")&&!z.endsWith("/bun.exe")&&!z.endsWith("/node")&&!z.endsWith("/node.exe")}var nD0="yunyingk/seal-use",mw="yunyingk/seal-home";var HV1="SEAL_USE_GITHUB_REPO",GV1="SEAL_HOME_GITHUB_REPO";async function bD0( $ ,I={}){let z={appRoot: $ .appRoot,entryFile: $ .entryFile,stateDir:kx,version:e0,launcher: $ .launcher},q=I.repo||process.env[HV1]?.trim()||process.env[GV1]?.trim()||nD0,U=I.targetVersion?.trim(),Y=U&&U.toLowerCase()!=="latest"?U:void 0;if(Y){let M=Y.replace(/^v/,""),v=iD0(M,e0);if(v<0)if(!OB&&I.force);else{T0({updated:!1,currentVersion:e0,targetVersion:M,mode:BO()?"binary":"source",message:!OB? ` Cannot downgrade seal - use from dev build v$ { e0 } to release v$ { M } . Use -- force to overwrite . ` : ` Cannot downgrade seal - use from v$ { e0 } to older version v$ { M } . Updates must be forward - only . ` });return}if(v===0&&!I.force){T0({updated:!1,currentVersion:e0,targetVersion:M,mode:BO()?"binary":"source",message: ` seal - use is already at version v$ { e0 } . Use -- force to reinstall . ` });return}}if(I.changelogOnly){let M=await bx(q,I.limit??10);T0({currentVersion:e0,totalQueried:M.length,releases:M.map((v)=>({version:v.version,tagName:v.tagName,publishedAt:v.publishedAt,author:v.author,releaseNotes:v.notes,releaseUrl:v.htmlUrl,isCurrent:v.version===e0,isNewer:dw(v.version,e0)}))});return}if(!BO()){if(I.checkOnly){let v=await bx(q,30),y=v[0],h=y?.version??e0,x=v.find((f)=>f.version===e0),B=dw(h,e0),n=v.filter((f)=>dw(f.version,e0));T0({updated:!1,updateAvailable:B,currentVersion:e0,currentVersionPublishedAt:x?.publishedAt,latestVersion:h,latestVersionPublishedAt:y?.publishedAt,behindCount:n.length,pendingReleases:n.map((f)=>({version:f.version,tagName:f.tagName,publishedAt:f.publishedAt,author:f.author,releaseNotes:f.notes,releaseUrl:f.htmlUrl})),releaseNotes:y?.notes??"",releaseUrl:y?.htmlUrl??"",mode:"source",message:"Running in source development mode. Run 'seal-use update' to git pull & bun install."});return}let M=oU(z).running;if(M)await jI("stop",z);try{kD0("git",["-C", $ .appRoot,"pull","--ff-only"])}catch(v){console.error( ` git pull skipped : $ { v instanceof Error ? v . message : String ( v ) } ` )}if(kD0("bun",["install"],{cwd: $ .appRoot}),M)await jI("start",z);T0({updated:!0,serviceRestarted:M,version:e0,mode:"source"});return}let J=WV1(),Q=VV1(),w=await bx(q,30),K=Y?w.find((M)=>M.version===Y||M.tagName===Y||M.tagName=== ` v$ { Y } ` )??await xD0(q,Y):w[0]??await xD0(q);if(!K){T0({updated:!1,currentVersion:e0,mode:"binary",message: ` Failed to query releases from repository '${q}' ` });return}let H=K.version,G=w.find((M)=>M.version===e0),W=dw(H,e0),Z=W||Boolean(I.force),X=w.filter((M)=>dw(M.version,e0));if(I.checkOnly){T0({updated:!1,updateAvailable:W,currentVersion:e0,currentVersionPublishedAt:G?.publishedAt,latestVersion:H,latestVersionPublishedAt:K.publishedAt,behindCount:X.length,pendingReleases:X.map((M)=>({version:M.version,tagName:M.tagName,publishedAt:M.publishedAt,author:M.author,releaseNotes:M.notes,releaseUrl:M.htmlUrl})),releaseNotes:K.notes,releaseUrl:K.htmlUrl,mode:"binary"});return}if(!Z){T0({updated:!1,currentVersion:e0,currentVersionPublishedAt:G?.publishedAt,latestVersion:H,latestVersionPublishedAt:K.publishedAt,mode:"binary",message: ` seal - use is already up to date ( v$ { e0 } ) ` });return}let L=ZV1(K.assets,J,Q);if(!L)throw Error( ` No compatible binary found for $ { J } - $ { Q } in release v$ { H } . Available assets : $ { K . assets . map ( ( M ) => M . name ) . join ( ", " ) } ` );let D=oU(z).running;if(D)await jI("stop",z);let O=process.execPath,T=KV1(O),P=yD0(T, ` . tmp - update - $ { Date . now ( ) } ` );QV1(P,{recursive:!0});try{let M=yD0(P,L.name);await XV1(L.downloadUrl,M,K.tagName,L.name);let v=M;if(L.name.endsWith(".tar.gz")||L.name.endsWith(".tgz"))v=LV1
Line truncated
` )}catch{}}async function XV 1( $ ,I,z,q){let U=i x(),Y=[],J=z?z.startsWith("v")?z: ` v$ { z } ` :void 0,Q=q|| $ .split("/").pop()||"";if(U!=="github"){if(J&&Q)Y.push( ` https : //git.ying-qing.cn/gitea/seal-use/releases/download/${J}/${Q}`,`https://git.ying-qing.cn/gitea/seal-home/releases/download/${J}/${Q}`);if($.startsWith("https://git.ying-qing.cn"))Y.push($)}if(U!=="gitea")if(J&&Q){let L=`https://github.com/${n D0}/releases/download/${J}/${Q}`;if(!process.env.CI)Y.push(`https://ghfast.top/${L}`,`https://gh.ddlc.top/${L}`);Y.push(L)}else if($.includes("github.com")){if(!process.env.CI)Y.push(`https://ghfast.top/${$}`,`https://gh.ddlc.top/${$}`);Y.push($)}else Y.push($);let w=Array.from(new Set(Y)),K,H=6000,G=6000,W=307200,Z=1e4,X=180000;for(let L=0;L<w.length;L++){let D=w[L],O =new AbortController,T="",P=(h)=>{T=h;try{O .abort()}catch{}},M=setTimeout(()=>{P("Connection timed out (no response headers within 6s)")},H),v,y ;try{jO (`==> [${L+1}/${w.length}] Downloading via: ${D}`);let h=await fetch(D,{signal:O .signal});if(M)clearTimeout(M),M=void 0;if(!h.ok)throw Error(`HTTP ${h.status} ${h.statusText}`);v=setTimeout(()=>{P("Overall download time exceeded 3 minutes")},X);let x=Number(h.headers.get("content-length"))||0,B=h.body?.getReader();if(!B){let p=Buffer.from(await h.arrayBuffer());if(p.length<1000)throw Error(`Downloaded content is suspiciously small (${p.length} bytes)`);S D0(I,p),jO (`✓ Download succeeded (${(p.length/1024/1024).toFixed(1)} MB)`);return}let n=[],f=0,R =0;y =setTimeout(()=>{if(f<W){let p=(f/1024).toFixed(1);P(`Initial transfer too slow (${p} KB < 300 KB in 6s), switching mirror...`)}},G);while(!0){let p=B.read(),z0,g =new Promise((U0,G0)=>{z0=setTimeout(()=>{G0(Error("Data transfer stalled (no chunk received for 10s)"))},Z)}),i;try{i=await Promise.race([p,g ])}finally{if(z0)clearTimeout(z0)}let{done:c,value:r}=i;if(c)break;if(r){if(n.push(r),f+=r.length,y &&f>=W)clearTimeout(y ),y =void 0;let U0=Date.now();if(U0-R >200){R =U0;let G0=x?Math.round(f/x*100):0,A0=(f/1048576).toFixed(1),g 0=x?(x/1048576).toFixed(1):"?";try{process.stderr.write(`\r ↳ Progress: ${G0}% (${A0} / ${g 0} MB)...`)}catch{}}}}try{process.stderr.write(`
` )}catch{}let k=Buffer.concat(n);if(k.length<1000)throw Error( ` Downloaded content is suspiciously small ( $ { k . length } bytes ) ` );S D0(I,k),jO ( ` ✓ Download completed successfully ( $ { ( k . length / 1024 / 1024 ) . toFixed ( 1 ) } MB ) ` );return}catch(h){if(M)clearTimeout(M);if(y )clearTimeout(y );if(v)clearTimeout(v);let x=T||(h instanceof Error?h.message:String(h));K=Error(x),jO ( `
↳ Mirror failed : $ { K . message } ` )}finally{if(M)clearTimeout(M);if(y )clearTimeout(y );if(v)clearTimeout(v)}}throw Error( ` Failed to download asset from all mirrors : $ { K ? . message } ` )}function LV 1( $ ,I,z){let q=v I("tar",["-xzf", $ ,"-C",I],{stdio:"pipe"});if(q.status!==0)throw Error( ` Failed to extract tar archive : $ { q . stderr . toString ( ) } ` );f D0( $ );let U=z==="windows"?"seal-use.exe":"seal-use",Y=v I("find",[I,"-type","f"],{encoding:"utf8"}).stdout.trim().split( `
` ).filter(Boolean),J=Y.find((Q)=>Q.endsWith( ` / $ { U } ` )||Q.endsWith(U));if(J)return J;return Y[0]|| $ }function DV 1( $ ,I,z){let q=v I("unzip",["-q","-o", $ ,"-d",I],{stdio:"pipe"});if(q.status!==0)throw Error( ` Failed to extract zip archive : $ { q . stderr . toString ( ) } ` );f D0( $ );let U=z==="windows"?"seal-use.exe":"seal-use",Y=v I("find",[I,"-type","f"],{encoding:"utf8"}).stdout.trim().split( `
` ).filter(Boolean),J=Y.find((Q)=>Q.endsWith( ` / $ { U } ` )||Q.endsWith(U));if(J)return J;return Y[0]|| $ }function iD0( $ ,I){let z= $ .replace(/^v/,"").split(".").map((U)=>Number.parseInt(U,10)||0),q=I.replace(/^v/,"").split(".").map((U)=>Number.parseInt(U,10)||0);for(let U=0;U<Math.max(z.length,q.length);U++){let Y=z[U]??0,J=q[U]??0;if(Y>J)return 1;if(Y<J)return-1}return 0}function dw( $ ,I){return iD0( $ ,I)>0}function kD0( $ ,I,z={}){let q=vI( $ ,I,{cwd:z.cwd,encoding:"utf8",stdio:["ignore","pipe","pipe"]});if(q.stdout)console.error(q.stdout.trimEnd());if(q.stderr)console.error(q.stderr.trimEnd());if(q.status!==0)throw Error( ` $ { $ } $ { I . join ( " " ) } failed with status $ { q . status } ` )}async function pD0( $ ,I,z,q,U){if( $ ==="create"){let Y=j(U.options.name)??I,J=j(U.options.phone);if(!Y||!J)throw Error("Usage: seal-use users create --name <name> --phone <phone> [--dept <deptId>]");let Q=j(U.options.dept)??j(U.options.departmentId);await F0("seal_user_create",z,q,{name:Y,phone:J,departmentIds:Q?[Q]:void 0},W0(U.options));return}if( $ ==="reset-password"){let Y=I??j(U.options.userId);if(!Y)throw Error("Usage: seal-use users reset-password <userId>");await F0("seal_user_reset_password",z,q,{userId:Y},W0(U.options));return}if( $ ==="search"|| $ ==="list"){let Y=I??j(U.options.keyword)??j(U.options.query)??"";await F0("seal_user_search",z,q,{keyword:Y},W0(U.options));return}if( $ ==="get"){let Y=I??j(U.options.userId);if(!Y)throw Error("Usage: seal-use users get <userId>");await F0("seal_user_get",z,q,{userId:Y},W0(U.options));return}if( $ ==="delete"){let Y=I??j(U.options.userId);if(!Y)throw Error("Usage: seal-use users delete <userId>");await F0("seal_user_delete",z,q,{userId:Y},W0(U.options));return}if( $ ==="activate"){let Y=I??j(U.options.userId);if(!Y)throw Error("Usage: seal-use users activate <userId>");await F0("seal_user_activate",z,q,{userId:Y},W0(U.options));return}if( $ ==="delegation"|| $ ==="impersonate"){let Y=I??j(U.options.userId)??j(U.options.phone);if(!Y)throw Error("Usage: seal-use users delegation <userIdOrPhone> [--note <note>]");let J=j(U.options.note);await F0("seal_user_delegation_create",z,q,{userIdOrPhone:Y,note:J},W0(U.options));return}throw Error( ` Unknown users command : $ { $ ? ? "" } . Run 'seal-use help' for available commands . ` )}var cD0=px(px(px(FV1(import.meta.url)))),NV1=new Set(["config","service","stop","http","serve","update","tools","corps","corp","tool","source","auth","delegation","users","contacts","data","llm","permissions","billing","webhook","webhooks","context","rules","approval-runs","analytics","simulation","deploy","preference","preferences","mcp","server","mcp-config","skill","openapi","probe","doctor","changelog"]),MV1=new Set(["http","server","web","mcp"]);function AV1( $ ){if(! $ .length)return!1;let I= $ [0]?.toLowerCase(),z= $ [1]?.toLowerCase();if(I&&MV1.has(I))return!0;if((I==="service"||I==="daemon")&&z==="run")return!0;return!1}var dD0=Promise.resolve();function pw( $ ,I={}){if(AV1( $ ))return mD0( $ ,I);let z=dD0.then(()=>mD0( $ ,I));return dD0=z.then(()=>{return},()=>{return}),z}async function mD0( $ ,I){let z=[],q=[],U=console.log,Y=console.error,J={appRoot:I.appRoot??cD0,entryFile:I.entryFile??OV1(I.appRoot??cD0,"src","cli.ts"),launcher:I.launcher};console.log=(...Q)=>{z.push(Wx(Q))},console.error=(...Q)=>{q.push(Wx(Q))};try{return await PV1( $ ,J),{stdout:yw(z),stderr:yw(q),isError:!1,exitCode:0}}catch(Q){let w=xw(Q instanceof Error?Q.message:String(Q)),K=TD(Q);if(q.push(w),K.nextAction&&!w.includes("Next action:"))q.push( ` \uD83D\uDC49 Next action : $ { K . nextAction } ` );return{stdout:yw(z),stderr:yw(q),isError:!0,exitCode:K.exitCode}}finally{console.log=U,console.error=Y}}async function PV1( $ ,I){let z= $ X0( $ ),[q,U,Y]=z.command;if(q==="version"||q==="v"||Boolean(z.options.version)||Boolean(z.options.v)||Boolean(z.options.V)){T0(_J);return}let J=wX0(z);if(J.isHelp){WX0(J.target);return}if(!q||!NV1.has(q))throw Error( ` Unknown command : $ { z . command . join ( " " ) } . Run 'seal-use help' for available commands . ` );if(q==="webhook"&&U==="material-pack"&&Y==="preview"){let K=z.command[3]??j(z.options.file)??j(z.options.input);if(!K)throw Error("Usage: seal-use webhook material-pack preview <材料包.zip>");await ZX0(K,Sw(z.options));return}if(q==="openapi"){OD0(z);return}if(q==="mcp-config"){Cx();return}if(q==="skill"){_D0(U,Y,z);return}if(q==="mcp"||q==="server"){await DD0(U,z);return}if(q==="probe"){await PD0(U,Y,z);return}if(q==="doctor"){await GD0(U,Y,z);return}if(q==="config"){PX0(U,Y,z);return}if(q==="service"){await fx(U,I,z);return}if(q==="stop"){await fx("stop",I,z);return}if(q==="http"||q==="serve"){await XD0(z);return}if(q==="update"||q==="changelog"){let K=q==="changelog"||U==="changelog"||U==="log"||U==="history"||V0(z.options.changelog)===!0,H=U==="check"||V0(z.options.check)===!0||V0(z.options["check-only"])===!0,G=j(z.options.version)??j(z.options.tag)??(!K&&!H&&U&&!U.startsWith("-")?U:void 0);await bD0(I,{checkOnly:H,changelogOnly:K,limit:S0(z.options.limit),force:V0(z.options.force),targetVersion:G,repo:j(z.options.re
Line truncated
` )?"": `
` } ` ) ; process . exitCode = $ . exitCode } var ZV1 = Boolean ( t . main == t . module || ! import . meta . url . includes ( "$bunfs" ) && process . argv [ 1 ] && fD0 ( process . argv [ 1 ] ) === fD0 ( q9 ) ) ; if ( ZV1 ) if ( process . argv [ 2 ] === "--seal-use-cli" || process . argv [ 2 ] === "--seal-home-cli" ) await VV1 ( ) ; else _x ( ) . catch ( ( $ ) => { console . error ( $ ) , process . exitCode = 1 } ) ; export { Rx as tokenizeCommand , _x as startServer , HV1 as resolveMcpEnabled , GV1 as createServer , wV1 as SEAL _MCP _ENABLED _ENV , QV1 as SEAL _CLI _TOOL _NAME , KV1 as LEGACY _SEAL _MCP _ENABLED _ENV } ;
` } ` ) ; process . exitCode = $ . exitCode } var CV1 = Boolean ( t . main == t . module || ! import . meta . url . includes ( "$bunfs" ) && process . argv [ 1 ] && lD0 ( process . argv [ 1 ] ) === lD0 ( J9 ) ) ; if ( CV1 ) if ( process . argv [ 2 ] === "--seal-use-cli" || process . argv [ 2 ] === "--seal-home-cli" ) await _V1 ( ) ; else hx ( ) . catch ( ( $ ) => { console . error ( $ ) , process . exitCode = 1 } ) ; export { _x as tokenizeCommand , hx as startServer , vV1 as resolveMcpEnabled , gV1 as createServer , BV1 as SEAL _MCP _ENABLED _ENV , EV1 as SEAL _CLI _TOOL _NAME , jV1 as LEGACY _SEAL _MCP _ENABLED _ENV } ;