Merge pull request #84 from yunyingk/codex/approval-runs-url-sso
🧪 CI / 🧪 Test, Type-Check & Build Validation (push) Has been cancelled
🧪 CI / 🧪 Test, Type-Check & Build Validation (push) Has been cancelled
Add approval run URL command with security-guarded SSO option
This commit is contained in:
8 files changed
+287
-117
No files matched your search
Vendored
+118
-104
@@ -1,97 +1,97 @@
|
||||
import{createRequire as _L0}from"node:module";var AL0=Object.create;var{getPrototypeOf:PL0,defineProperty:IO,getOwnPropertyNames:TL0}=Object;var EL0=Object.prototype.hasOwnProperty;function BL0($){return this[$]}var vL0,RL0,FI=($,I,U)=>{var Y=$!=null&&typeof $==="object";if(Y){var J=I?vL0??=new WeakMap:RL0??=new WeakMap,Q=J.get($);if(Q)return Q}U=$!=null?AL0(PL0($)):{};let K=I||!$||!$.__esModule?IO(U,"default",{value:$,enumerable:!0}):U;for(let q of TL0($))if(!EL0.call(K,q))IO(K,q,{get:BL0.bind($,q),enumerable:!0});if(Y)J.set($,K);return K};var O=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports);var jL0=($)=>$;function CL0($,I){this[$]=jL0.bind(null,I)}var $5=($,I)=>{for(var U in I)IO($,U,{get:I[U],enumerable:!0,configurable:!0,set:CL0.bind(I,U)})};var t=_L0(import.meta.url);var fQ=O((Gb)=>{Object.defineProperty(Gb,"__esModule",{value:!0});Gb.regexpCode=Gb.getEsmExportName=Gb.getProperty=Gb.safeStringify=Gb.stringify=Gb.strConcat=Gb.addCodeArg=Gb.str=Gb._=Gb.nil=Gb._Code=Gb.Name=Gb.IDENTIFIER=Gb._CodeOrName=void 0;class iW{}Gb._CodeOrName=iW;Gb.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class YU extends iW{constructor($){super();if(!Gb.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}}}Gb.Name=YU;class l$ extends iW{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,U)=>`${I}${U}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((I,U)=>{if(U instanceof YU)I[U.str]=(I[U.str]||0)+1;return I},{})}}Gb._Code=l$;Gb.nil=new l$("");function qb($,...I){let U=[$[0]],Y=0;while(Y<I.length)zT(U,I[Y]),U.push($[++Y]);return new l$(U)}Gb._=qb;var ZT=new l$("+");function Hb($,...I){let U=[kQ($[0])],Y=0;while(Y<I.length)U.push(ZT),zT(U,I[Y]),U.push(ZT,kQ($[++Y]));return sN0(U),new l$(U)}Gb.str=Hb;function zT($,I){if(I instanceof l$)$.push(...I._items);else if(I instanceof YU)$.push(I);else $.push(IM0(I))}Gb.addCodeArg=zT;function sN0($){let I=1;while(I<$.length-1){if($[I]===ZT){let U=eN0($[I-1],$[I+1]);if(U!==void 0){$.splice(I-1,3,U);continue}$[I++]="+"}I++}}function eN0($,I){if(I==='""')return $;if($==='""')return I;if(typeof $=="string"){if(I instanceof YU||$[$.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 YU))return`"${$}${I.slice(1)}`;return}function $M0($,I){return I.emptyStr()?$:$.emptyStr()?I:Hb`${$}${I}`}Gb.strConcat=$M0;function IM0($){return typeof $=="number"||typeof $=="boolean"||$===null?$:kQ(Array.isArray($)?$.join(","):$)}function UM0($){return new l$(kQ($))}Gb.stringify=UM0;function kQ($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Gb.safeStringify=kQ;function YM0($){return typeof $=="string"&&Gb.IDENTIFIER.test($)?new l$(`.${$}`):qb`[${$}]`}Gb.getProperty=YM0;function JM0($){if(typeof $=="string"&&Gb.IDENTIFIER.test($))return new l$(`${$}`);throw Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}Gb.getEsmExportName=JM0;function QM0($){return new l$($.toString())}Gb.regexpCode=QM0});var OT=O((Zb)=>{Object.defineProperty(Zb,"__esModule",{value:!0});Zb.ValueScope=Zb.ValueScopeName=Zb.Scope=Zb.varKinds=Zb.UsedValueState=void 0;var c6=fQ();class wb extends Error{constructor($){super(`CodeGen: "code" for ${$} not defined`);this.value=$.value}}var pW;(function($){$[$.Started=0]="Started",$[$.Completed=1]="Completed"})(pW||(Zb.UsedValueState=pW={}));Zb.varKinds={const:new c6.Name("const"),let:new c6.Name("let"),var:new c6.Name("var")};class LT{constructor({prefixes:$,parent:I}={}){this._names={},this._prefixes=$,this._parent=I}toName($){return $ instanceof c6.Name?$:this.name($)}name($){return new c6.Name(this._newName($))}_newName($){let I=this._names[$]||this._nameGroup($);return`${$}${I.index++}`}_nameGroup($){var I,U;if(((U=(I=this._parent)===null||I===void 0?void 0:I._prefixes)===null||U===void 0?void 0:U.has($))||this._prefixes&&!this._prefixes.has($))throw Error(`CodeGen: prefix "${$}" is not allowed in this scope`);return this._names[$]={prefix:$,index:0}}}Zb.Scope=LT;class DT extends c6.Name{constructor($,I){super(I);this.prefix=$}setValue($,{property:I,itemIndex:U}){this.value=$,this.scopePath=c6._`.${new c6.Name(I)}[${U}]`}}Zb.ValueScopeName=DT;var OM0=c6._`\n`;class Vb extends LT{constructor($){super($);this._values={},this._scope=$.scope,this.opts={...$,_n:$.lines?OM0:c6.nil}}get(){return this._scope}name($){return new DT($,this._newName($))}value($,I){var U;if(I.ref===void 0)throw Error("CodeGen: ref must be passed in value");let Y=this.toName($),{prefix:J}=Y,Q=(U=I.key)!==null&&U!==void 0?U:I.ref,K=this._values[J];if(K){let G=K.get(Q);if(Line truncated
|
||||
`:""},this._extScope=$,this._scope=new o$.Scope({parent:$}),this._nodes=[new Mb]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,I){let U=this._extScope.value($,I);return(this._values[U.prefix]||(this._values[U.prefix]=new Set)).add(U),U}getScopeValue($,I){return this._extScope.getValue($,I)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,I,U,Y){let J=this._scope.toName(I);if(U!==void 0&&Y)this._constants[J.str]=U;return this._leafNode(new Xb($,J,U)),J}const($,I,U){return this._def(o$.varKinds.const,$,I,U)}let($,I,U){return this._def(o$.varKinds.let,$,I,U)}var($,I,U){return this._def(o$.varKinds.var,$,I,U)}assign($,I,U){return this._leafNode(new MT($,I,U))}add($,I){return this._leafNode(new Lb($,d6.operators.ADD,I))}code($){if(typeof $=="function")$();else if($!==W1.nil)this._leafNode(new Nb($));return this}object(...$){let I=["{"];for(let[U,Y]of $){if(I.length>1)I.push(",");if(I.push(U),U!==Y||this.opts.es5)I.push(":"),(0,W1.addCodeArg)(I,Y)}return I.push("}"),new W1._Code(I)}if($,I,U){if(this._blockNode(new Q5($)),I&&U)this.code(I).else().code(U).endIf();else if(I)this.code(I).endIf();else if(U)throw Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new Q5($))}else(){return this._elseNode(new bQ)}endIf(){return this._endBlockNode(Q5,bQ)}_for($,I){if(this._blockNode($),I)this.code(I).endFor();return this}for($,I){return this._for(new Ab($),I)}forRange($,I,U,Y,J=this.opts.es5?o$.varKinds.var:o$.varKinds.let){let Q=this._scope.toName($);return this._for(new Pb(J,Q,I,U),()=>Y(Q))}forOf($,I,U,Y=o$.varKinds.const){let J=this._scope.toName($);if(this.opts.es5){let Q=I instanceof W1.Name?I:this.var("_arr",I);return this.forRange("_i",0,W1._`${Q}.length`,(K)=>{this.var(J,W1._`${Q}[${K}]`),U(J)})}return this._for(new FT("of",Y,J,I),()=>U(J))}forIn($,I,U,Y=this.opts.es5?o$.varKinds.var:o$.varKinds.const){if(this.opts.ownProperties)return this.forOf($,W1._`Object.keys(${I})`,U);let J=this._scope.toName($);return this._for(new FT("in",Y,J,I),()=>U(J))}endFor(){return this._endBlockNode(JU)}label($){return this._leafNode(new Db($))}break($){return this._leafNode(new Ob($))}return($){let I=new dW;if(this._blockNode(I),this.code($),I.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(dW)}try($,I,U){if(!I&&!U)throw Error('CodeGen: "try" without "catch" and "finally"');let Y=new Tb;if(this._blockNode(Y),this.code($),I){let J=this.name("e");this._currNode=Y.catch=new mW(J),I(J)}if(U)this._currNode=Y.finally=new lW,this.code(U);return this._endBlockNode(mW,lW)}throw($){return this._leafNode(new Fb($))}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 U=this._nodes.length-I;if(U<0||$!==void 0&&U!==$)throw Error(`CodeGen: wrong number of nodes: ${U} vs ${$} expected`);return this._nodes.length=I,this}func($,I=W1.nil,U,Y){if(this._blockNode(new cW($,I,U)),Y)this.code(Y).endFunc();return this}endFunc(){return this._endBlockNode(cW)}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 U=this._currNode;if(U instanceof $||I&&U 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 Q5))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]=$}}d6.CodeGen=Eb;function u7($,I){for(let U in I)$[U]=($[U]||0)+(I[U]||0);return $}function oW($,I){return I instanceof W1._CodeOrName?u7($,I.names):$}function QU($,I,U){if($ instanceof W1.Name)return Y($);if(!J($))return $;return new W1._Code($._items.reduce((Q,K)=>{if(K instanceof W1.Name)K=Y(K);if(K instanceof W1._Code)Q.push(...K._items);else Q.push(K);return Q},[]));function Y(Q){let K=U[Q.str];if(K===void 0||I[Q.str]!==1)return Q;return delete I[Q.str],K}function J(Q){return Q instanceof W1._Code&&Q._items.some((K)=>K instanceof W1.Name&&I[K.str]===1&&U[K.str]!==void 0)}}function AM0($,I){for(let U in I)$[U]=($[U]||0)-(I[U]||0)}function Bb($){return typeof $=="boolean"||typeof $=="number"||$===null?!$:W1._`!${NT($)}`}d6.not=Bb;var PM0=vb(d6.operators.AND);function TM0(...$){return $.reduce(PM0)}d6.and=TM0;var EM0=vb(d6.operators.OR);function BM0(...$){return $.reduce(EM0)}d6.or=BM0;function vb($){return(I,U)=>I===W1.nil?U:U===W1.nil?I:W1._`${NT(I)} ${$} ${NT(U)}`}function NT($){return $ instanceof W1.Name?$:W1._`(${Line truncated
|
||||
import{createRequire as _L0}from"node:module";var AL0=Object.create;var{getPrototypeOf:PL0,defineProperty:UO,getOwnPropertyNames:TL0}=Object;var EL0=Object.prototype.hasOwnProperty;function BL0($){return this[$]}var vL0,RL0,FI=($,I,U)=>{var Y=$!=null&&typeof $==="object";if(Y){var J=I?vL0??=new WeakMap:RL0??=new WeakMap,Q=J.get($);if(Q)return Q}U=$!=null?AL0(PL0($)):{};let K=I||!$||!$.__esModule?UO(U,"default",{value:$,enumerable:!0}):U;for(let q of TL0($))if(!EL0.call(K,q))UO(K,q,{get:BL0.bind($,q),enumerable:!0});if(Y)J.set($,K);return K};var O=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports);var jL0=($)=>$;function CL0($,I){this[$]=jL0.bind(null,I)}var $5=($,I)=>{for(var U in I)UO($,U,{get:I[U],enumerable:!0,configurable:!0,set:CL0.bind(I,U)})};var t=_L0(import.meta.url);var bQ=O((wi)=>{Object.defineProperty(wi,"__esModule",{value:!0});wi.regexpCode=wi.getEsmExportName=wi.getProperty=wi.safeStringify=wi.stringify=wi.strConcat=wi.addCodeArg=wi.str=wi._=wi.nil=wi._Code=wi.Name=wi.IDENTIFIER=wi._CodeOrName=void 0;class bW{}wi._CodeOrName=bW;wi.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class YU extends bW{constructor($){super();if(!wi.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}}}wi.Name=YU;class l$ extends bW{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,U)=>`${I}${U}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((I,U)=>{if(U instanceof YU)I[U.str]=(I[U.str]||0)+1;return I},{})}}wi._Code=l$;wi.nil=new l$("");function Gi($,...I){let U=[$[0]],Y=0;while(Y<I.length)XT(U,I[Y]),U.push($[++Y]);return new l$(U)}wi._=Gi;var zT=new l$("+");function Wi($,...I){let U=[iQ($[0])],Y=0;while(Y<I.length)U.push(zT),XT(U,I[Y]),U.push(zT,iQ($[++Y]));return sN0(U),new l$(U)}wi.str=Wi;function XT($,I){if(I instanceof l$)$.push(...I._items);else if(I instanceof YU)$.push(I);else $.push(IM0(I))}wi.addCodeArg=XT;function sN0($){let I=1;while(I<$.length-1){if($[I]===zT){let U=eN0($[I-1],$[I+1]);if(U!==void 0){$.splice(I-1,3,U);continue}$[I++]="+"}I++}}function eN0($,I){if(I==='""')return $;if($==='""')return I;if(typeof $=="string"){if(I instanceof YU||$[$.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 YU))return`"${$}${I.slice(1)}`;return}function $M0($,I){return I.emptyStr()?$:$.emptyStr()?I:Wi`${$}${I}`}wi.strConcat=$M0;function IM0($){return typeof $=="number"||typeof $=="boolean"||$===null?$:iQ(Array.isArray($)?$.join(","):$)}function UM0($){return new l$(iQ($))}wi.stringify=UM0;function iQ($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}wi.safeStringify=iQ;function YM0($){return typeof $=="string"&&wi.IDENTIFIER.test($)?new l$(`.${$}`):Gi`[${$}]`}wi.getProperty=YM0;function JM0($){if(typeof $=="string"&&wi.IDENTIFIER.test($))return new l$(`${$}`);throw Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}wi.getEsmExportName=JM0;function QM0($){return new l$($.toString())}wi.regexpCode=QM0});var FT=O((Xi)=>{Object.defineProperty(Xi,"__esModule",{value:!0});Xi.ValueScope=Xi.ValueScopeName=Xi.Scope=Xi.varKinds=Xi.UsedValueState=void 0;var c6=bQ();class Zi extends Error{constructor($){super(`CodeGen: "code" for ${$} not defined`);this.value=$.value}}var pW;(function($){$[$.Started=0]="Started",$[$.Completed=1]="Completed"})(pW||(Xi.UsedValueState=pW={}));Xi.varKinds={const:new c6.Name("const"),let:new c6.Name("let"),var:new c6.Name("var")};class DT{constructor({prefixes:$,parent:I}={}){this._names={},this._prefixes=$,this._parent=I}toName($){return $ instanceof c6.Name?$:this.name($)}name($){return new c6.Name(this._newName($))}_newName($){let I=this._names[$]||this._nameGroup($);return`${$}${I.index++}`}_nameGroup($){var I,U;if(((U=(I=this._parent)===null||I===void 0?void 0:I._prefixes)===null||U===void 0?void 0:U.has($))||this._prefixes&&!this._prefixes.has($))throw Error(`CodeGen: prefix "${$}" is not allowed in this scope`);return this._names[$]={prefix:$,index:0}}}Xi.Scope=DT;class OT extends c6.Name{constructor($,I){super(I);this.prefix=$}setValue($,{property:I,itemIndex:U}){this.value=$,this.scopePath=c6._`.${new c6.Name(I)}[${U}]`}}Xi.ValueScopeName=OT;var OM0=c6._`\n`;class zi extends DT{constructor($){super($);this._values={},this._scope=$.scope,this.opts={...$,_n:$.lines?OM0:c6.nil}}get(){return this._scope}name($){return new OT($,this._newName($))}value($,I){var U;if(I.ref===void 0)throw Error("CodeGen: ref must be passed in value");let Y=this.toName($),{prefix:J}=Y,Q=(U=I.key)!==null&&U!==void 0?U:I.ref,K=this._values[J];if(K){let G=K.get(Q);if(Line truncated
|
||||
`:""},this._extScope=$,this._scope=new o$.Scope({parent:$}),this._nodes=[new Pi]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,I){let U=this._extScope.value($,I);return(this._values[U.prefix]||(this._values[U.prefix]=new Set)).add(U),U}getScopeValue($,I){return this._extScope.getValue($,I)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,I,U,Y){let J=this._scope.toName(I);if(U!==void 0&&Y)this._constants[J.str]=U;return this._leafNode(new Di($,J,U)),J}const($,I,U){return this._def(o$.varKinds.const,$,I,U)}let($,I,U){return this._def(o$.varKinds.let,$,I,U)}var($,I,U){return this._def(o$.varKinds.var,$,I,U)}assign($,I,U){return this._leafNode(new AT($,I,U))}add($,I){return this._leafNode(new Oi($,d6.operators.ADD,I))}code($){if(typeof $=="function")$();else if($!==W1.nil)this._leafNode(new Ai($));return this}object(...$){let I=["{"];for(let[U,Y]of $){if(I.length>1)I.push(",");if(I.push(U),U!==Y||this.opts.es5)I.push(":"),(0,W1.addCodeArg)(I,Y)}return I.push("}"),new W1._Code(I)}if($,I,U){if(this._blockNode(new Q5($)),I&&U)this.code(I).else().code(U).endIf();else if(I)this.code(I).endIf();else if(U)throw Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new Q5($))}else(){return this._elseNode(new nQ)}endIf(){return this._endBlockNode(Q5,nQ)}_for($,I){if(this._blockNode($),I)this.code(I).endFor();return this}for($,I){return this._for(new Ti($),I)}forRange($,I,U,Y,J=this.opts.es5?o$.varKinds.var:o$.varKinds.let){let Q=this._scope.toName($);return this._for(new Ei(J,Q,I,U),()=>Y(Q))}forOf($,I,U,Y=o$.varKinds.const){let J=this._scope.toName($);if(this.opts.es5){let Q=I instanceof W1.Name?I:this.var("_arr",I);return this.forRange("_i",0,W1._`${Q}.length`,(K)=>{this.var(J,W1._`${Q}[${K}]`),U(J)})}return this._for(new NT("of",Y,J,I),()=>U(J))}forIn($,I,U,Y=this.opts.es5?o$.varKinds.var:o$.varKinds.const){if(this.opts.ownProperties)return this.forOf($,W1._`Object.keys(${I})`,U);let J=this._scope.toName($);return this._for(new NT("in",Y,J,I),()=>U(J))}endFor(){return this._endBlockNode(JU)}label($){return this._leafNode(new Fi($))}break($){return this._leafNode(new Ni($))}return($){let I=new dW;if(this._blockNode(I),this.code($),I.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(dW)}try($,I,U){if(!I&&!U)throw Error('CodeGen: "try" without "catch" and "finally"');let Y=new Bi;if(this._blockNode(Y),this.code($),I){let J=this.name("e");this._currNode=Y.catch=new mW(J),I(J)}if(U)this._currNode=Y.finally=new lW,this.code(U);return this._endBlockNode(mW,lW)}throw($){return this._leafNode(new Mi($))}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 U=this._nodes.length-I;if(U<0||$!==void 0&&U!==$)throw Error(`CodeGen: wrong number of nodes: ${U} vs ${$} expected`);return this._nodes.length=I,this}func($,I=W1.nil,U,Y){if(this._blockNode(new cW($,I,U)),Y)this.code(Y).endFunc();return this}endFunc(){return this._endBlockNode(cW)}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 U=this._currNode;if(U instanceof $||I&&U 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 Q5))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]=$}}d6.CodeGen=vi;function u7($,I){for(let U in I)$[U]=($[U]||0)+(I[U]||0);return $}function oW($,I){return I instanceof W1._CodeOrName?u7($,I.names):$}function QU($,I,U){if($ instanceof W1.Name)return Y($);if(!J($))return $;return new W1._Code($._items.reduce((Q,K)=>{if(K instanceof W1.Name)K=Y(K);if(K instanceof W1._Code)Q.push(...K._items);else Q.push(K);return Q},[]));function Y(Q){let K=U[Q.str];if(K===void 0||I[Q.str]!==1)return Q;return delete I[Q.str],K}function J(Q){return Q instanceof W1._Code&&Q._items.some((K)=>K instanceof W1.Name&&I[K.str]===1&&U[K.str]!==void 0)}}function AM0($,I){for(let U in I)$[U]=($[U]||0)-(I[U]||0)}function Ri($){return typeof $=="boolean"||typeof $=="number"||$===null?!$:W1._`!${MT($)}`}d6.not=Ri;var PM0=ji(d6.operators.AND);function TM0(...$){return $.reduce(PM0)}d6.and=TM0;var EM0=ji(d6.operators.OR);function BM0(...$){return $.reduce(EM0)}d6.or=BM0;function ji($){return(I,U)=>I===W1.nil?U:U===W1.nil?I:W1._`${MT(I)} ${$} ${MT(U)}`}function MT($){return $ instanceof W1.Name?$:W1._`(${Line truncated
|
||||
|| (${K} == "string" && ${J} && ${J} == +${J})`).assign(q,t0._`+${J}`);return;case"integer":Y.elseIf(t0._`${K} === "boolean" || ${J} === null
|
||||
|| (${K} === "string" && ${J} && ${J} == +${J} && !(${J} % 1))`).assign(q,t0._`+${J}`);return;case"boolean":Y.elseIf(t0._`${J} === "false" || ${J} === 0 || ${J} === null`).assign(q,!1).elseIf(t0._`${J} === "true" || ${J} === 1`).assign(q,!0);return;case"null":Y.elseIf(t0._`${J} === "" || ${J} === 0 || ${J} === false`),Y.assign(q,null);return;case"array":Y.elseIf(t0._`${K} === "string" || ${K} === "number"
|
||||
|| ${K} === "boolean" || ${J} === null`).assign(q,t0._`[${J}]`)}}}function fA0({gen:$,parentData:I,parentDataProperty:U},Y){$.if(t0._`${I} !== undefined`,()=>$.assign(t0._`${I}[${U}]`,Y))}function RT($,I,U,Y=KU.Correct){let J=Y===KU.Correct?t0.operators.EQ:t0.operators.NEQ,Q;switch($){case"null":return t0._`${I} ${J} null`;case"array":Q=t0._`Array.isArray(${I})`;break;case"object":Q=t0._`${I} && typeof ${I} == "object" && !Array.isArray(${I})`;break;case"integer":Q=K(t0._`!(${I} % 1) && !isNaN(${I})`);break;case"number":Q=K();break;default:return t0._`typeof ${I} ${J} ${$}`}return Y===KU.Correct?Q:(0,t0.not)(Q);function K(q=t0.nil){return(0,t0.and)(t0._`typeof ${I} == "number"`,q,U?t0._`isFinite(${I})`:t0.nil)}}Yi.checkDataType=RT;function jT($,I,U,Y){if($.length===1)return RT($[0],I,U,Y);let J,Q=(0,$i.toHash)($);if(Q.array&&Q.object){let K=t0._`typeof ${I} != "object"`;J=Q.null?K:t0._`!${I} || ${K}`,delete Q.null,delete Q.array,delete Q.object}else J=t0.nil;if(Q.number)delete Q.integer;for(let K in Q)J=(0,t0.and)(J,RT(K,I,U,Y));return J}Yi.checkDataTypes=jT;var bA0={message:({schema:$})=>`must be ${$}`,params:({schema:$,schemaValue:I})=>typeof $=="string"?t0._`{type: ${$}}`:t0._`{type: ${I}}`};function CT($){let I=iA0($);(0,yA0.reportError)(I,bA0)}Yi.reportTypeError=CT;function iA0($){let{gen:I,data:U,schema:Y}=$,J=(0,$i.schemaRefOrVal)($,Y,"type");return{gen:I,keyword:"type",data:U,schema:Y.type,schemaCode:J,schemaValue:J,parentSchema:Y,params:{},it:$}}});var Hi=O((Ki)=>{Object.defineProperty(Ki,"__esModule",{value:!0});Ki.assignDefaults=void 0;var qU=a0(),oA0=z1();function rA0($,I){let{properties:U,items:Y}=$.schema;if(I==="object"&&U)for(let J in U)Qi($,J,U[J].default);else if(I==="array"&&Array.isArray(Y))Y.forEach((J,Q)=>Qi($,Q,J.default))}Ki.assignDefaults=rA0;function Qi($,I,U){let{gen:Y,compositeRule:J,data:Q,opts:K}=$;if(U===void 0)return;let q=qU._`${Q}${(0,qU.getProperty)(I)}`;if(J){(0,oA0.checkStrictMode)($,`default is ignored for: ${q}`);return}let H=qU._`${q} === undefined`;if(K.useDefaults==="empty")H=qU._`${H} || ${q} === null || ${q} === ""`;Y.if(H,qU._`${q} = ${(0,qU.stringify)(U)}`)}});var E$=O((wi)=>{Object.defineProperty(wi,"__esModule",{value:!0});wi.validateUnion=wi.validateArray=wi.usePattern=wi.callValidateCode=wi.schemaProperties=wi.allSchemaProperties=wi.noPropertyInData=wi.propertyInData=wi.isOwnProperty=wi.hasPropFunc=wi.reportMissingProp=wi.checkMissingProp=wi.checkReportMissingProp=void 0;var a1=a0(),_T=z1(),X9=K5(),tA0=z1();function aA0($,I){let{gen:U,data:Y,it:J}=$;U.if(gT(U,Y,I,J.opts.ownProperties),()=>{$.setParams({missingProperty:a1._`${I}`},!0),$.error()})}wi.checkReportMissingProp=aA0;function sA0({gen:$,data:I,it:{opts:U}},Y,J){return(0,a1.or)(...Y.map((Q)=>(0,a1.and)(gT($,I,Q,U.ownProperties),a1._`${J} = ${Q}`)))}wi.checkMissingProp=sA0;function eA0($,I){$.setParams({missingProperty:I},!0),$.error()}wi.reportMissingProp=eA0;function Gi($){return $.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:a1._`Object.prototype.hasOwnProperty`})}wi.hasPropFunc=Gi;function ST($,I,U){return a1._`${Gi($)}.call(${I}, ${U})`}wi.isOwnProperty=ST;function $P0($,I,U,Y){let J=a1._`${I}${(0,a1.getProperty)(U)} !== undefined`;return Y?a1._`${J} && ${ST($,I,U)}`:J}wi.propertyInData=$P0;function gT($,I,U,Y){let J=a1._`${I}${(0,a1.getProperty)(U)} === undefined`;return Y?(0,a1.or)(J,(0,a1.not)(ST($,I,U))):J}wi.noPropertyInData=gT;function Wi($){return $?Object.keys($).filter((I)=>I!=="__proto__"):[]}wi.allSchemaProperties=Wi;function IP0($,I){return Wi(I).filter((U)=>!(0,_T.alwaysValidSchema)($,I[U]))}wi.schemaProperties=IP0;function UP0({schemaCode:$,data:I,it:{gen:U,topSchemaRef:Y,schemaPath:J,errorPath:Q},it:K},q,H,G){let W=G?a1._`${$}, ${I}, ${Y}${J}`:I,w=[[X9.default.instancePath,(0,a1.strConcat)(X9.default.instancePath,Q)],[X9.default.parentData,K.parentData],[X9.default.parentDataProperty,K.parentDataProperty],[X9.default.rootData,X9.default.rootData]];if(K.opts.dynamicRef)w.push([X9.default.dynamicAnchors,X9.default.dynamicAnchors]);let Z=a1._`${W}, ${U.object(...w)}`;return H!==a1.nil?a1._`${q}.call(${H}, ${Z})`:a1._`${q}(${Z})`}wi.callValidateCode=UP0;var YP0=a1._`new RegExp`;function JP0({gen:$,it:{opts:I}},U){let Y=I.unicodeRegExp?"u":"",{regExp:J}=I.code,Q=J(U,Y);return $.scopeValue("pattern",{key:Q.toString(),ref:Q,code:a1._`${J.code==="new RegExp"?YP0:(0,tA0.useFunc)($,J)}(${U}, ${Y})`})}wi.usePattern=JP0;function QP0($){let{gen:I,data:U,keyword:Y,it:J}=$,Q=I.name("valid");if(J.allErrors){let q=I.let("valid",!0);return K(()=>I.assign(q,!1)),q}return I.var(Q,!0),K(()=>I.break()),Q;function K(q){let H=I.const("len",a1._`${U}.length`);I.forRange("i",0,H,(G)=>{$.subschema({keyword:Y,dataProp:G,dataPropType:_T.Type.Num},Q),I.if((0,a1.not)(Q),q)})}}wi.validateArray=QP0;function KP0($){let{gen:I,schema:U,keyword:Y,it:J}=$;if(!Array.isArray(U))throw Error("ajv implementation error");if(U.some((H)=>(0,_T.alwaysValidSchema)(J,H))&&!J.opts.unevaluated)return;le
Line truncated
|
||||
|| ${K} === "boolean" || ${J} === null`).assign(q,t0._`[${J}]`)}}}function fA0({gen:$,parentData:I,parentDataProperty:U},Y){$.if(t0._`${I} !== undefined`,()=>$.assign(t0._`${I}[${U}]`,Y))}function jT($,I,U,Y=KU.Correct){let J=Y===KU.Correct?t0.operators.EQ:t0.operators.NEQ,Q;switch($){case"null":return t0._`${I} ${J} null`;case"array":Q=t0._`Array.isArray(${I})`;break;case"object":Q=t0._`${I} && typeof ${I} == "object" && !Array.isArray(${I})`;break;case"integer":Q=K(t0._`!(${I} % 1) && !isNaN(${I})`);break;case"number":Q=K();break;default:return t0._`typeof ${I} ${J} ${$}`}return Y===KU.Correct?Q:(0,t0.not)(Q);function K(q=t0.nil){return(0,t0.and)(t0._`typeof ${I} == "number"`,q,U?t0._`isFinite(${I})`:t0.nil)}}Qb.checkDataType=jT;function CT($,I,U,Y){if($.length===1)return jT($[0],I,U,Y);let J,Q=(0,Ub.toHash)($);if(Q.array&&Q.object){let K=t0._`typeof ${I} != "object"`;J=Q.null?K:t0._`!${I} || ${K}`,delete Q.null,delete Q.array,delete Q.object}else J=t0.nil;if(Q.number)delete Q.integer;for(let K in Q)J=(0,t0.and)(J,jT(K,I,U,Y));return J}Qb.checkDataTypes=CT;var iA0={message:({schema:$})=>`must be ${$}`,params:({schema:$,schemaValue:I})=>typeof $=="string"?t0._`{type: ${$}}`:t0._`{type: ${I}}`};function _T($){let I=bA0($);(0,yA0.reportError)(I,iA0)}Qb.reportTypeError=_T;function bA0($){let{gen:I,data:U,schema:Y}=$,J=(0,Ub.schemaRefOrVal)($,Y,"type");return{gen:I,keyword:"type",data:U,schema:Y.type,schemaCode:J,schemaValue:J,parentSchema:Y,params:{},it:$}}});var Wb=O((Hb)=>{Object.defineProperty(Hb,"__esModule",{value:!0});Hb.assignDefaults=void 0;var qU=a0(),oA0=z1();function rA0($,I){let{properties:U,items:Y}=$.schema;if(I==="object"&&U)for(let J in U)qb($,J,U[J].default);else if(I==="array"&&Array.isArray(Y))Y.forEach((J,Q)=>qb($,Q,J.default))}Hb.assignDefaults=rA0;function qb($,I,U){let{gen:Y,compositeRule:J,data:Q,opts:K}=$;if(U===void 0)return;let q=qU._`${Q}${(0,qU.getProperty)(I)}`;if(J){(0,oA0.checkStrictMode)($,`default is ignored for: ${q}`);return}let H=qU._`${q} === undefined`;if(K.useDefaults==="empty")H=qU._`${H} || ${q} === null || ${q} === ""`;Y.if(H,qU._`${q} = ${(0,qU.stringify)(U)}`)}});var B$=O((Zb)=>{Object.defineProperty(Zb,"__esModule",{value:!0});Zb.validateUnion=Zb.validateArray=Zb.usePattern=Zb.callValidateCode=Zb.schemaProperties=Zb.allSchemaProperties=Zb.noPropertyInData=Zb.propertyInData=Zb.isOwnProperty=Zb.hasPropFunc=Zb.reportMissingProp=Zb.checkMissingProp=Zb.checkReportMissingProp=void 0;var a1=a0(),ST=z1(),X9=K5(),tA0=z1();function aA0($,I){let{gen:U,data:Y,it:J}=$;U.if(yT(U,Y,I,J.opts.ownProperties),()=>{$.setParams({missingProperty:a1._`${I}`},!0),$.error()})}Zb.checkReportMissingProp=aA0;function sA0({gen:$,data:I,it:{opts:U}},Y,J){return(0,a1.or)(...Y.map((Q)=>(0,a1.and)(yT($,I,Q,U.ownProperties),a1._`${J} = ${Q}`)))}Zb.checkMissingProp=sA0;function eA0($,I){$.setParams({missingProperty:I},!0),$.error()}Zb.reportMissingProp=eA0;function wb($){return $.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:a1._`Object.prototype.hasOwnProperty`})}Zb.hasPropFunc=wb;function gT($,I,U){return a1._`${wb($)}.call(${I}, ${U})`}Zb.isOwnProperty=gT;function $P0($,I,U,Y){let J=a1._`${I}${(0,a1.getProperty)(U)} !== undefined`;return Y?a1._`${J} && ${gT($,I,U)}`:J}Zb.propertyInData=$P0;function yT($,I,U,Y){let J=a1._`${I}${(0,a1.getProperty)(U)} === undefined`;return Y?(0,a1.or)(J,(0,a1.not)(gT($,I,U))):J}Zb.noPropertyInData=yT;function Vb($){return $?Object.keys($).filter((I)=>I!=="__proto__"):[]}Zb.allSchemaProperties=Vb;function IP0($,I){return Vb(I).filter((U)=>!(0,ST.alwaysValidSchema)($,I[U]))}Zb.schemaProperties=IP0;function UP0({schemaCode:$,data:I,it:{gen:U,topSchemaRef:Y,schemaPath:J,errorPath:Q},it:K},q,H,G){let W=G?a1._`${$}, ${I}, ${Y}${J}`:I,w=[[X9.default.instancePath,(0,a1.strConcat)(X9.default.instancePath,Q)],[X9.default.parentData,K.parentData],[X9.default.parentDataProperty,K.parentDataProperty],[X9.default.rootData,X9.default.rootData]];if(K.opts.dynamicRef)w.push([X9.default.dynamicAnchors,X9.default.dynamicAnchors]);let Z=a1._`${W}, ${U.object(...w)}`;return H!==a1.nil?a1._`${q}.call(${H}, ${Z})`:a1._`${q}(${Z})`}Zb.callValidateCode=UP0;var YP0=a1._`new RegExp`;function JP0({gen:$,it:{opts:I}},U){let Y=I.unicodeRegExp?"u":"",{regExp:J}=I.code,Q=J(U,Y);return $.scopeValue("pattern",{key:Q.toString(),ref:Q,code:a1._`${J.code==="new RegExp"?YP0:(0,tA0.useFunc)($,J)}(${U}, ${Y})`})}Zb.usePattern=JP0;function QP0($){let{gen:I,data:U,keyword:Y,it:J}=$,Q=I.name("valid");if(J.allErrors){let q=I.let("valid",!0);return K(()=>I.assign(q,!1)),q}return I.var(Q,!0),K(()=>I.break()),Q;function K(q){let H=I.const("len",a1._`${U}.length`);I.forRange("i",0,H,(G)=>{$.subschema({keyword:Y,dataProp:G,dataPropType:ST.Type.Num},Q),I.if((0,a1.not)(Q),q)})}}Zb.validateArray=QP0;function KP0($){let{gen:I,schema:U,keyword:Y,it:J}=$;if(!Array.isArray(U))throw Error("ajv implementation error");if(U.some((H)=>(0,ST.alwaysValidSchema)(J,H))&&!J.opts.unevaluated)return;le
Line truncated
|
||||
missingProperty: ${Y},
|
||||
depsCount: ${I},
|
||||
deps: ${U}}`};var Ev0={keyword:"dependencies",type:"object",schemaType:"object",error:jp.error,code($){let[I,U]=Bv0($);vp($,I),Rp($,U)}};function Bv0({schema:$}){let I={},U={};for(let Y in $){if(Y==="__proto__")continue;let J=Array.isArray($[Y])?I:U;J[Y]=$[Y]}return[I,U]}function vp($,I=$.schema){let{gen:U,data:Y,it:J}=$;if(Object.keys(I).length===0)return;let Q=U.let("missing");for(let K in I){let q=I[K];if(q.length===0)continue;let H=(0,J2.propertyInData)(U,Y,K,J.opts.ownProperties);if($.setParams({property:K,depsCount:q.length,deps:q.join(", ")}),J.allErrors)U.if(H,()=>{for(let G of q)(0,J2.checkReportMissingProp)($,G)});else U.if(UE._`${H} && (${(0,J2.checkMissingProp)($,q,Q)})`),(0,J2.reportMissingProp)($,Q),U.else()}}jp.validatePropertyDeps=vp;function Rp($,I=$.schema){let{gen:U,data:Y,keyword:J,it:Q}=$,K=U.name("valid");for(let q in I){if((0,Tv0.alwaysValidSchema)(Q,I[q]))continue;U.if((0,J2.propertyInData)(U,Y,q,Q.opts.ownProperties),()=>{let H=$.subschema({keyword:J,schemaProp:q},K);$.mergeValidEvaluated(H,K)},()=>U.var(K,!0)),$.ok(K)}}jp.validateSchemaDeps=Rp;jp.default=Ev0});var hp=O((yp)=>{Object.defineProperty(yp,"__esModule",{value:!0});var gp=a0(),jv0=z1(),Cv0={message:"property name must be valid",params:({params:$})=>gp._`{propertyName: ${$.propertyName}}`},_v0={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Cv0,code($){let{gen:I,schema:U,data:Y,it:J}=$;if((0,jv0.alwaysValidSchema)(J,U))return;let Q=I.name("valid");I.forIn("key",Y,(K)=>{$.setParams({propertyName:K}),$.subschema({keyword:"propertyNames",data:K,dataTypes:["string"],propertyName:K,compositeRule:!0},Q),I.if((0,gp.not)(Q),()=>{if($.error(!0),!J.allErrors)I.break()})}),$.ok(Q)}};yp.default=_v0});var YE=O((up)=>{Object.defineProperty(up,"__esModule",{value:!0});var Lw=E$(),a$=a0(),gv0=K5(),Dw=z1(),yv0={message:"must NOT have additional properties",params:({params:$})=>a$._`{additionalProperty: ${$.additionalProperty}}`},hv0={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:yv0,code($){let{gen:I,schema:U,parentSchema:Y,data:J,errsCount:Q,it:K}=$;if(!Q)throw Error("ajv implementation error");let{allErrors:q,opts:H}=K;if(K.props=!0,H.removeAdditional!=="all"&&(0,Dw.alwaysValidSchema)(K,U))return;let G=(0,Lw.allSchemaProperties)(Y.properties),W=(0,Lw.allSchemaProperties)(Y.patternProperties);w(),$.ok(a$._`${Q} === ${gv0.default.errors}`);function w(){I.forIn("key",J,(D)=>{if(!G.length&&!W.length)X(D);else I.if(Z(D),()=>X(D))})}function Z(D){let F;if(G.length>8){let P=(0,Dw.schemaRefOrVal)(K,Y.properties,"properties");F=(0,Lw.isOwnProperty)(I,P,D)}else if(G.length)F=(0,a$.or)(...G.map((P)=>a$._`${D} === ${P}`));else F=a$.nil;if(W.length)F=(0,a$.or)(F,...W.map((P)=>a$._`${(0,Lw.usePattern)($,P)}.test(${D})`));return(0,a$.not)(F)}function V(D){I.code(a$._`delete ${J}[${D}]`)}function X(D){if(H.removeAdditional==="all"||H.removeAdditional&&U===!1){V(D);return}if(U===!1){if($.setParams({additionalProperty:D}),$.error(),!q)I.break();return}if(typeof U=="object"&&!(0,Dw.alwaysValidSchema)(K,U)){let F=I.name("valid");if(H.removeAdditional==="failing")L(D,F,!1),I.if((0,a$.not)(F),()=>{$.reset(),V(D)});else if(L(D,F),!q)I.if((0,a$.not)(F),()=>I.break())}}function L(D,F,P){let E={keyword:"additionalProperties",dataProp:D,dataPropType:Dw.Type.Str};if(P===!1)Object.assign(E,{compositeRule:!0,createErrors:!1,allErrors:!1});$.subschema(E,F)}}};up.default=hv0});var bp=O((fp)=>{Object.defineProperty(fp,"__esModule",{value:!0});var xv0=mQ(),xp=E$(),JE=z1(),kp=YE(),kv0={keyword:"properties",type:"object",schemaType:"object",code($){let{gen:I,schema:U,parentSchema:Y,data:J,it:Q}=$;if(Q.opts.removeAdditional==="all"&&Y.additionalProperties===void 0)kp.default.code(new xv0.KeywordCxt(Q,kp.default,"additionalProperties"));let K=(0,xp.allSchemaProperties)(U);for(let w of K)Q.definedProperties.add(w);if(Q.opts.unevaluated&&K.length&&Q.props!==!0)Q.props=JE.mergeEvaluated.props(I,(0,JE.toHash)(K),Q.props);let q=K.filter((w)=>!(0,JE.alwaysValidSchema)(Q,U[w]));if(q.length===0)return;let H=I.name("valid");for(let w of q){if(G(w))W(w);else{if(I.if((0,xp.propertyInData)(I,J,w,Q.opts.ownProperties)),W(w),!Q.allErrors)I.else().var(H,!0);I.endIf()}$.it.definedProperties.add(w),$.ok(H)}function G(w){return Q.opts.useDefaults&&!Q.compositeRule&&U[w].default!==void 0}function W(w){$.subschema({keyword:"properties",schemaProp:w,dataProp:w},H)}}};fp.default=kv0});var dp=O((cp)=>{Object.defineProperty(cp,"__esModule",{value:!0});var ip=E$(),Ow=a0(),np=z1(),pp=z1(),bv0={keyword:"patternProperties",type:"object",schemaType:"object",code($){let{gen:I,schema:U,data:Y,parentSchema:J,it:Q}=$,{opts:K}=Q,q=(0,ip.allSchemaProperties)(U),H=q.filter((L)=>(0,np.alwaysValidSchema)(Q,U[L]));if(q.length===0||H.length===q.length&&(!Q.opts.unevaluated||Q.props===!0))return;let G=K.strictSchema&&!K.allowMatchingProperties&&J.properties,W=I.name("valid");if(Q.props!==!0&&!(Q.props instanceo
Line truncated
|
||||
\x00`,n+=o1(f,2),n+=q.magic,n+=o1(D,2),n+=o1(F,2),n+=o1(y.crc32,4),n+=o1(y.compressedSize,4),n+=o1(y.uncompressedSize,4),n+=o1(G.length,2),n+=o1(P.length,2);var S=tV.LOCAL_FILE_HEADER+n+G+P,b=tV.CENTRAL_FILE_HEADER+o1(p,2)+n+o1(Z.length,2)+"\x00\x00\x00\x00"+o1(j,4)+o1(Y,4)+G+P+Z;return{fileRecord:S,dirRecord:b}},Dx0=function($,I,U,Y,J){var Q="",K=mU.transformTo("string",J(Y));return Q=tV.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+o1($,2)+o1($,2)+o1(I,4)+o1(U,4)+o1(K.length,2)+K,Q},Ox0=function($){var I="";return I=tV.DATA_DESCRIPTOR+o1($.crc32,4)+o1($.compressedSize,4)+o1($.uncompressedSize,4),I};function J8($,I,U,Y){lU.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=I,this.zipPlatform=U,this.encodeFileName=Y,this.streamFiles=$,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}mU.inherits(J8,lU);J8.prototype.push=function($){var I=$.meta.percent||0,U=this.entriesCount,Y=this._sources.length;if(this.accumulate)this.contentBuffer.push($);else this.bytesWritten+=$.data.length,lU.prototype.push.call(this,{data:$.data,meta:{currentFile:this.currentFile,percent:U?(I+100*(U-Y-1))/U:100}})};J8.prototype.openedSource=function($){this.currentSourceOffset=this.bytesWritten,this.currentFile=$.file.name;var I=this.streamFiles&&!$.file.dir;if(I){var U=ka($,I,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:U.fileRecord,meta:{percent:0}})}else this.accumulate=!0};J8.prototype.closedSource=function($){this.accumulate=!1;var I=this.streamFiles&&!$.file.dir,U=ka($,I,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(U.dirRecord),I)this.push({data:Ox0($),meta:{percent:100}});else{this.push({data:U.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null};J8.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 U=this.bytesWritten-$,Y=Dx0(this.dirRecords.length,U,$,this.zipComment,this.encodeFileName);this.push({data:Y,meta:{percent:100}})};J8.prototype.prepareNextSource=function(){if(this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused)this.previous.pause();else this.previous.resume()};J8.prototype.registerPrevious=function($){this._sources.push($);var I=this;return $.on("data",function(U){I.processChunk(U)}),$.on("end",function(){if(I.closedSource(I.previous.streamInfo),I._sources.length)I.prepareNextSource();else I.end()}),$.on("error",function(U){I.error(U)}),this};J8.prototype.resume=function(){if(!lU.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};J8.prototype.error=function($){var I=this._sources;if(!lU.prototype.error.call(this,$))return!1;for(var U=0;U<I.length;U++)try{I[U].error($)}catch(Y){}return!0};J8.prototype.lock=function(){lU.prototype.lock.call(this);var $=this._sources;for(var I=0;I<$.length;I++)$[I].lock()};fa.exports=J8});var ia=O((Ax0)=>{var Fx0=xv(),Nx0=ba(),Mx0=function($,I){var U=$||I,Y=Fx0[U];if(!Y)throw Error(U+" is not a valid compression method !");return Y};Ax0.generateWorker=function($,I,U){var Y=new Nx0(I.streamFiles,U,I.platform,I.encodeFileName),J=0;try{$.forEach(function(Q,K){J++;var q=Mx0(K.options.compression,I.compression),H=K.options.compressionOptions||I.compressionOptions||{},G=K.dir,W=K.date;K._compressWorker(q,H).withStreamInfo("file",{name:Q,dir:G,date:W,comment:K.comment||"",unixPermissions:K.unixPermissions,dosPermissions:K.dosPermissions}).pipe(Y)}),Y.entriesCount=J}catch(Q){Y.error(Q)}return Y}});var pa=O((_P1,na)=>{var Tx0=w4(),aV=G$();function qK($,I){aV.call(this,"Nodejs stream input adapter for "+$),this._upstreamEnded=!1,this._bindStream(I)}Tx0.inherits(qK,aV);qK.prototype._bindStream=function($){var I=this;this._stream=$,$.pause(),$.on("data",function(U){I.push({data:U,meta:{percent:0}})}).on("error",function(U){if(I.isPaused)this.generatedError=U;else I.error(U)}).on("end",function(){if(I.isPaused)I._upstreamEnded=!0;else I.end()})};qK.prototype.pause=function(){if(!aV.prototype.pause.call(this))return!1;return this._stream.pause(),!0};qK.prototype.resume=function(){if(!aV.prototype.resume.call(this))return!1;if(this._upstreamEnded)this.end();else this._stream.resume();return!0};na.exports=qK});var ea=O((SP1,sa)=>{var Ex0=uU(),HK=w4(),la=G$(),Bx0=pB(),oa=cB(),ca=SV(),vx0=dr(),Rx0=ia(),da=b2(),jx0=pa(),ra=function($,I,U){var Y=HK.getTypeOf(I),J,Q=HK.extend(U||{},oa);if(Q.date=Q.date||new Date,Q.compression!==null)Q.compression=Q.compression.toUpperCase();if(typeof Q.unixPermissions==="string")Q.unixPermissions=parseInt(Q.unixPermissions,8);if(Q.unixPermissions&&Q.unixPermissions&16384)Q.dir=!0;if(Q.dosPermissions&&Q.dosPermissions&16)Q.dir=!0;if(Q.
Line truncated
|
||||
`)}openNode($,I){let U=this.tos,Y=this._xml;if(U&&this.open)Y.push(">");this._stack.push($),Y.push("<"),Y.push($),MR(Y,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)pe(this._xml,$,I)}addAttributes($){if(!this.open)throw Error("Cannot write attributes to node if it is not open");MR(this._xml,$)}writeText($){let I=this._xml;if(this.open)I.push(">"),this.open=!1;this.leaf=!1,I.push(ne.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,U){if(this.openNode($,I),U!==void 0)this.writeText(U);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("")}}AR.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"};ce.exports=AR});var PR=O((Nb0)=>{var de=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function Fb0($){if(typeof $==="string")return $;if(de)return de.decode($);return $.toString()}Nb0.bufferToString=Fb0});var te=O((le)=>{Object.defineProperty(le,"__esModule",{value:!0});le.CHAR=`
|
||||
deps: ${U}}`};var Ev0={keyword:"dependencies",type:"object",schemaType:"object",error:_p.error,code($){let[I,U]=Bv0($);jp($,I),Cp($,U)}};function Bv0({schema:$}){let I={},U={};for(let Y in $){if(Y==="__proto__")continue;let J=Array.isArray($[Y])?I:U;J[Y]=$[Y]}return[I,U]}function jp($,I=$.schema){let{gen:U,data:Y,it:J}=$;if(Object.keys(I).length===0)return;let Q=U.let("missing");for(let K in I){let q=I[K];if(q.length===0)continue;let H=(0,K2.propertyInData)(U,Y,K,J.opts.ownProperties);if($.setParams({property:K,depsCount:q.length,deps:q.join(", ")}),J.allErrors)U.if(H,()=>{for(let G of q)(0,K2.checkReportMissingProp)($,G)});else U.if(YE._`${H} && (${(0,K2.checkMissingProp)($,q,Q)})`),(0,K2.reportMissingProp)($,Q),U.else()}}_p.validatePropertyDeps=jp;function Cp($,I=$.schema){let{gen:U,data:Y,keyword:J,it:Q}=$,K=U.name("valid");for(let q in I){if((0,Tv0.alwaysValidSchema)(Q,I[q]))continue;U.if((0,K2.propertyInData)(U,Y,q,Q.opts.ownProperties),()=>{let H=$.subschema({keyword:J,schemaProp:q},K);$.mergeValidEvaluated(H,K)},()=>U.var(K,!0)),$.ok(K)}}_p.validateSchemaDeps=Cp;_p.default=Ev0});var kp=O((up)=>{Object.defineProperty(up,"__esModule",{value:!0});var hp=a0(),jv0=z1(),Cv0={message:"property name must be valid",params:({params:$})=>hp._`{propertyName: ${$.propertyName}}`},_v0={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Cv0,code($){let{gen:I,schema:U,data:Y,it:J}=$;if((0,jv0.alwaysValidSchema)(J,U))return;let Q=I.name("valid");I.forIn("key",Y,(K)=>{$.setParams({propertyName:K}),$.subschema({keyword:"propertyNames",data:K,dataTypes:["string"],propertyName:K,compositeRule:!0},Q),I.if((0,hp.not)(Q),()=>{if($.error(!0),!J.allErrors)I.break()})}),$.ok(Q)}};up.default=_v0});var JE=O((xp)=>{Object.defineProperty(xp,"__esModule",{value:!0});var Lw=B$(),a$=a0(),gv0=K5(),Dw=z1(),yv0={message:"must NOT have additional properties",params:({params:$})=>a$._`{additionalProperty: ${$.additionalProperty}}`},hv0={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:yv0,code($){let{gen:I,schema:U,parentSchema:Y,data:J,errsCount:Q,it:K}=$;if(!Q)throw Error("ajv implementation error");let{allErrors:q,opts:H}=K;if(K.props=!0,H.removeAdditional!=="all"&&(0,Dw.alwaysValidSchema)(K,U))return;let G=(0,Lw.allSchemaProperties)(Y.properties),W=(0,Lw.allSchemaProperties)(Y.patternProperties);w(),$.ok(a$._`${Q} === ${gv0.default.errors}`);function w(){I.forIn("key",J,(D)=>{if(!G.length&&!W.length)X(D);else I.if(Z(D),()=>X(D))})}function Z(D){let F;if(G.length>8){let P=(0,Dw.schemaRefOrVal)(K,Y.properties,"properties");F=(0,Lw.isOwnProperty)(I,P,D)}else if(G.length)F=(0,a$.or)(...G.map((P)=>a$._`${D} === ${P}`));else F=a$.nil;if(W.length)F=(0,a$.or)(F,...W.map((P)=>a$._`${(0,Lw.usePattern)($,P)}.test(${D})`));return(0,a$.not)(F)}function V(D){I.code(a$._`delete ${J}[${D}]`)}function X(D){if(H.removeAdditional==="all"||H.removeAdditional&&U===!1){V(D);return}if(U===!1){if($.setParams({additionalProperty:D}),$.error(),!q)I.break();return}if(typeof U=="object"&&!(0,Dw.alwaysValidSchema)(K,U)){let F=I.name("valid");if(H.removeAdditional==="failing")L(D,F,!1),I.if((0,a$.not)(F),()=>{$.reset(),V(D)});else if(L(D,F),!q)I.if((0,a$.not)(F),()=>I.break())}}function L(D,F,P){let T={keyword:"additionalProperties",dataProp:D,dataPropType:Dw.Type.Str};if(P===!1)Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1});$.subschema(T,F)}}};xp.default=hv0});var np=O((bp)=>{Object.defineProperty(bp,"__esModule",{value:!0});var kv0=oQ(),fp=B$(),QE=z1(),ip=JE(),xv0={keyword:"properties",type:"object",schemaType:"object",code($){let{gen:I,schema:U,parentSchema:Y,data:J,it:Q}=$;if(Q.opts.removeAdditional==="all"&&Y.additionalProperties===void 0)ip.default.code(new kv0.KeywordCxt(Q,ip.default,"additionalProperties"));let K=(0,fp.allSchemaProperties)(U);for(let w of K)Q.definedProperties.add(w);if(Q.opts.unevaluated&&K.length&&Q.props!==!0)Q.props=QE.mergeEvaluated.props(I,(0,QE.toHash)(K),Q.props);let q=K.filter((w)=>!(0,QE.alwaysValidSchema)(Q,U[w]));if(q.length===0)return;let H=I.name("valid");for(let w of q){if(G(w))W(w);else{if(I.if((0,fp.propertyInData)(I,J,w,Q.opts.ownProperties)),W(w),!Q.allErrors)I.else().var(H,!0);I.endIf()}$.it.definedProperties.add(w),$.ok(H)}function G(w){return Q.opts.useDefaults&&!Q.compositeRule&&U[w].default!==void 0}function W(w){$.subschema({keyword:"properties",schemaProp:w,dataProp:w},H)}}};bp.default=xv0});var lp=O((mp)=>{Object.defineProperty(mp,"__esModule",{value:!0});var pp=B$(),Ow=a0(),cp=z1(),dp=z1(),iv0={keyword:"patternProperties",type:"object",schemaType:"object",code($){let{gen:I,schema:U,data:Y,parentSchema:J,it:Q}=$,{opts:K}=Q,q=(0,pp.allSchemaProperties)(U),H=q.filter((L)=>(0,cp.alwaysValidSchema)(Q,U[L]));if(q.length===0||H.length===q.length&&(!Q.opts.unevaluated||Q.props===!0))return;let G=K.strictSchema&&!K.allowMatchingProperties&&J.properties,W=I.name("valid");if(Q.props!==!0&&!(Q.props instanceo
Line truncated
|
||||
\x00`,n+=o1(f,2),n+=q.magic,n+=o1(D,2),n+=o1(F,2),n+=o1(y.crc32,4),n+=o1(y.compressedSize,4),n+=o1(y.uncompressedSize,4),n+=o1(G.length,2),n+=o1(P.length,2);var S=aV.LOCAL_FILE_HEADER+n+G+P,i=aV.CENTRAL_FILE_HEADER+o1(p,2)+n+o1(Z.length,2)+"\x00\x00\x00\x00"+o1(j,4)+o1(Y,4)+G+P+Z;return{fileRecord:S,dirRecord:i}},Dk0=function($,I,U,Y,J){var Q="",K=oU.transformTo("string",J(Y));return Q=aV.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+o1($,2)+o1($,2)+o1(I,4)+o1(U,4)+o1(K.length,2)+K,Q},Ok0=function($){var I="";return I=aV.DATA_DESCRIPTOR+o1($.crc32,4)+o1($.compressedSize,4)+o1($.uncompressedSize,4),I};function J8($,I,U,Y){rU.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=I,this.zipPlatform=U,this.encodeFileName=Y,this.streamFiles=$,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}oU.inherits(J8,rU);J8.prototype.push=function($){var I=$.meta.percent||0,U=this.entriesCount,Y=this._sources.length;if(this.accumulate)this.contentBuffer.push($);else this.bytesWritten+=$.data.length,rU.prototype.push.call(this,{data:$.data,meta:{currentFile:this.currentFile,percent:U?(I+100*(U-Y-1))/U:100}})};J8.prototype.openedSource=function($){this.currentSourceOffset=this.bytesWritten,this.currentFile=$.file.name;var I=this.streamFiles&&!$.file.dir;if(I){var U=xa($,I,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:U.fileRecord,meta:{percent:0}})}else this.accumulate=!0};J8.prototype.closedSource=function($){this.accumulate=!1;var I=this.streamFiles&&!$.file.dir,U=xa($,I,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(U.dirRecord),I)this.push({data:Ok0($),meta:{percent:100}});else{this.push({data:U.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null};J8.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 U=this.bytesWritten-$,Y=Dk0(this.dirRecords.length,U,$,this.zipComment,this.encodeFileName);this.push({data:Y,meta:{percent:100}})};J8.prototype.prepareNextSource=function(){if(this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused)this.previous.pause();else this.previous.resume()};J8.prototype.registerPrevious=function($){this._sources.push($);var I=this;return $.on("data",function(U){I.processChunk(U)}),$.on("end",function(){if(I.closedSource(I.previous.streamInfo),I._sources.length)I.prepareNextSource();else I.end()}),$.on("error",function(U){I.error(U)}),this};J8.prototype.resume=function(){if(!rU.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};J8.prototype.error=function($){var I=this._sources;if(!rU.prototype.error.call(this,$))return!1;for(var U=0;U<I.length;U++)try{I[U].error($)}catch(Y){}return!0};J8.prototype.lock=function(){rU.prototype.lock.call(this);var $=this._sources;for(var I=0;I<$.length;I++)$[I].lock()};fa.exports=J8});var ba=O((Ak0)=>{var Fk0=fv(),Nk0=ia(),Mk0=function($,I){var U=$||I,Y=Fk0[U];if(!Y)throw Error(U+" is not a valid compression method !");return Y};Ak0.generateWorker=function($,I,U){var Y=new Nk0(I.streamFiles,U,I.platform,I.encodeFileName),J=0;try{$.forEach(function(Q,K){J++;var q=Mk0(K.options.compression,I.compression),H=K.options.compressionOptions||I.compressionOptions||{},G=K.dir,W=K.date;K._compressWorker(q,H).withStreamInfo("file",{name:Q,dir:G,date:W,comment:K.comment||"",unixPermissions:K.unixPermissions,dosPermissions:K.dosPermissions}).pipe(Y)}),Y.entriesCount=J}catch(Q){Y.error(Q)}return Y}});var pa=O((SP1,na)=>{var Tk0=w4(),sV=W$();function qK($,I){sV.call(this,"Nodejs stream input adapter for "+$),this._upstreamEnded=!1,this._bindStream(I)}Tk0.inherits(qK,sV);qK.prototype._bindStream=function($){var I=this;this._stream=$,$.pause(),$.on("data",function(U){I.push({data:U,meta:{percent:0}})}).on("error",function(U){if(I.isPaused)this.generatedError=U;else I.error(U)}).on("end",function(){if(I.isPaused)I._upstreamEnded=!0;else I.end()})};qK.prototype.pause=function(){if(!sV.prototype.pause.call(this))return!1;return this._stream.pause(),!0};qK.prototype.resume=function(){if(!sV.prototype.resume.call(this))return!1;if(this._upstreamEnded)this.end();else this._stream.resume();return!0};na.exports=qK});var ea=O((gP1,sa)=>{var Ek0=xU(),HK=w4(),la=W$(),Bk0=dB(),oa=mB(),ca=gV(),vk0=dr(),Rk0=ba(),da=i2(),jk0=pa(),ra=function($,I,U){var Y=HK.getTypeOf(I),J,Q=HK.extend(U||{},oa);if(Q.date=Q.date||new Date,Q.compression!==null)Q.compression=Q.compression.toUpperCase();if(typeof Q.unixPermissions==="string")Q.unixPermissions=parseInt(Q.unixPermissions,8);if(Q.unixPermissions&&Q.unixPermissions&16384)Q.dir=!0;if(Q.dosPermissions&&Q.dosPermissions&16)Q.dir=!0;if(Q.
Line truncated
|
||||
`)}openNode($,I){let U=this.tos,Y=this._xml;if(U&&this.open)Y.push(">");this._stack.push($),Y.push("<"),Y.push($),PR(Y,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)pe(this._xml,$,I)}addAttributes($){if(!this.open)throw Error("Cannot write attributes to node if it is not open");PR(this._xml,$)}writeText($){let I=this._xml;if(this.open)I.push(">"),this.open=!1;this.leaf=!1,I.push(ne.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,U){if(this.openNode($,I),U!==void 0)this.writeText(U);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("")}}TR.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"};ce.exports=TR});var ER=O((Ni0)=>{var de=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function Fi0($){if(typeof $==="string")return $;if(de)return de.decode($);return $.toString()}Ni0.bufferToString=Fi0});var te=O((le)=>{Object.defineProperty(le,"__esModule",{value:!0});le.CHAR=`
|
||||
\r --�\uD800\uDC00-\uDBFF\uDFFF`;le.S=` \r
|
||||
`;le.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�\uD800\uDC00-\uDB7F\uDFFF";le.NAME_CHAR="-"+le.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";le.CHAR_RE=new RegExp("^["+le.CHAR+"]$","u");le.S_RE=new RegExp("^["+le.S+"]+$","u");le.NAME_START_CHAR_RE=new RegExp("^["+le.NAME_START_CHAR+"]$","u");le.NAME_CHAR_RE=new RegExp("^["+le.NAME_CHAR+"]$","u");le.NAME_RE=new RegExp("^["+le.NAME_START_CHAR+"]["+le.NAME_CHAR+"]*$","u");le.NMTOKEN_RE=new RegExp("^["+le.NAME_CHAR+"]+$","u");var TR=9,ER=10,BR=13,vR=32;le.S_LIST=[vR,ER,BR,TR];function Ab0($){return $>=vR&&$<=55295||$===ER||$===BR||$===TR||$>=57344&&$<=65533||$>=65536&&$<=1114111}le.isChar=Ab0;function Pb0($){return $===vR||$===ER||$===BR||$===TR}le.isS=Pb0;function me($){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}le.isNameStartChar=me;function Tb0($){return me($)||$>=48&&$<=57||$===45||$===46||$===183||$>=768&&$<=879||$>=8255&&$<=8256}le.isNameChar=Tb0});var K00=O((U00)=>{Object.defineProperty(U00,"__esModule",{value:!0});U00.CHAR="\x01--�\uD800\uDC00-\uDBFF\uDFFF";U00.RESTRICTED_CHAR="\x01-\b\v\f\x0E-\x1F--";U00.S=` \r
|
||||
`;U00.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�\uD800\uDC00-\uDB7F\uDFFF";U00.NAME_CHAR="-"+U00.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";U00.CHAR_RE=new RegExp("^["+U00.CHAR+"]$","u");U00.RESTRICTED_CHAR_RE=new RegExp("^["+U00.RESTRICTED_CHAR+"]$","u");U00.S_RE=new RegExp("^["+U00.S+"]+$","u");U00.NAME_START_CHAR_RE=new RegExp("^["+U00.NAME_START_CHAR+"]$","u");U00.NAME_CHAR_RE=new RegExp("^["+U00.NAME_CHAR+"]$","u");U00.NAME_RE=new RegExp("^["+U00.NAME_START_CHAR+"]["+U00.NAME_CHAR+"]*$","u");U00.NMTOKEN_RE=new RegExp("^["+U00.NAME_CHAR+"]+$","u");var ae=9,se=10,ee=13,$00=32;U00.S_LIST=[$00,se,ee,ae];function ub0($){return $>=1&&$<=55295||$>=57344&&$<=65533||$>=65536&&$<=1114111}U00.isChar=ub0;function xb0($){return $>=1&&$<=8||$===11||$===12||$>=14&&$<=31||$>=127&&$<=132||$>=134&&$<=159}U00.isRestrictedChar=xb0;function kb0($){return $===9||$===10||$===13||$>31&&$<127||$===133||$>159&&$<=55295||$>=57344&&$<=65533||$>=65536&&$<=1114111}U00.isCharAndNotRestricted=kb0;function fb0($){return $===$00||$===se||$===ee||$===ae}U00.isS=fb0;function I00($){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}U00.isNameStartChar=I00;function bb0($){return I00($)||$>=48&&$<=57||$===45||$===46||$===183||$>=768&&$<=879||$>=8255&&$<=8256}U00.isNameChar=bb0});var G00=O((H00)=>{Object.defineProperty(H00,"__esModule",{value:!0});H00.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�\uD800\uDC00-\uDB7F\uDFFF";H00.NC_NAME_CHAR="-"+H00.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";H00.NC_NAME_START_CHAR_RE=new RegExp("^["+H00.NC_NAME_START_CHAR+"]$","u");H00.NC_NAME_CHAR_RE=new RegExp("^["+H00.NC_NAME_CHAR+"]$","u");H00.NC_NAME_RE=new RegExp("^["+H00.NC_NAME_START_CHAR+"]["+H00.NC_NAME_CHAR+"]*$","u");function q00($){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}H00.isNCNameStartChar=q00;function Ii0($){return q00($)||($===45||$===46||$>=48&&$<=57||$===183||$>=768&&$<=879||$>=8255&&$<=8256)}H00.isNCNameChar=Ii0});var _00=O((C00)=>{Object.defineProperty(C00,"__esModule",{value:!0});var JY=te(),qi0=K00(),iR=G00(),r6=JY.isS,Hi0=JY.isChar,MK=JY.isNameStartChar,W00=JY.isNameChar,T00=JY.S_LIST,Gi0=JY.NAME_RE,Wi0=qi0.isChar,wi0=iR.isNCNameStartChar,Vi0=iR.isNCNameChar,Zi0=iR.NC_NAME_RE,BZ="http://www.w3.org/XML/1998/namespace",YY="http://www.w3.org/2000/xmlns/",zi0={__proto__:null,xml:BZ,xmlns:YY},Xi0={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},H4=-1,y8=-2,w00=0,Li0=1,jR=2,Di0=3,$Y=4,Oi0=5,Fi0=6,Ni0=7,CR=8,Mi0=9,Ai0=10,Pi0=11,Ti0=12,g6=13,MZ=14,_R=15,Ei0=16,SR=17,Bi0=18,vi0=19,gR=20,Ri0=21,ji0=22,Ci0=23,V00=24,yR=25,AZ=26,Z00=27,_i0=28,Si0=29,z00=30,gi0=31,yi0=32,W3=33,hi0=34,hR=35,AK=36,uR=37,ui0=38,X00=39,L00=40,xi0=41,D00=42,ki0=43,fi0=44,xR=9,K8=10,kR=13,O00=32,F00=33,E00=34,PK=38,B00=39,PZ=45,TZ=47,bi0=59,k9=60,IY=61,h4=62,Y6=63,v00=91,UY=93,N00=133,M00=8232,EZ=($)=>$===E00||$===B00,R00=[E00,B00],ii0=[...R00,v00,h4],ni0=[...R00,k9,UY],pi0=[IY,Y6,...T00],ci0=[...T00,h4,PK,k9];function bR($,I,U){switch(I){case"xml":if(U!==BZ)$.fail(`xml prefix must be bound to ${BZ}.`);break;case"xmlns":if(U!==YY)$.fail(`xmlns prefix must be bound to ${YY}.`);break;default:}switch(U){case YY:$.fail(I===""?`the default namespace may not be set to ${U}.`:`may not assign a prefix (even "xmlns") to the URI ${YY}.`);break;case BZ:switch(I){case"xml":break;case"":$.fail(`the default namespace may not be set to ${U}.`);break;default:$.fail("may not assign the xml namespace to another prefix.")}break;default:}}function di0($,I){for(let U of Object.keys(I))bR($,U,I[U])}var mi0=($)=>Zi0.test($),li0=($)=>Gi0.test($),w3=0,A00=1,fR=2;C00.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];var P00={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 j00{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=wi0,this.nameCheck=Vi0,this.isName=mi0,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},zi0);let U=this.opt.additionalNamespaces;if(U!
Line truncated
|
||||
`;le.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�\uD800\uDC00-\uDB7F\uDFFF";le.NAME_CHAR="-"+le.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";le.CHAR_RE=new RegExp("^["+le.CHAR+"]$","u");le.S_RE=new RegExp("^["+le.S+"]+$","u");le.NAME_START_CHAR_RE=new RegExp("^["+le.NAME_START_CHAR+"]$","u");le.NAME_CHAR_RE=new RegExp("^["+le.NAME_CHAR+"]$","u");le.NAME_RE=new RegExp("^["+le.NAME_START_CHAR+"]["+le.NAME_CHAR+"]*$","u");le.NMTOKEN_RE=new RegExp("^["+le.NAME_CHAR+"]+$","u");var BR=9,vR=10,RR=13,jR=32;le.S_LIST=[jR,vR,RR,BR];function Ai0($){return $>=jR&&$<=55295||$===vR||$===RR||$===BR||$>=57344&&$<=65533||$>=65536&&$<=1114111}le.isChar=Ai0;function Pi0($){return $===jR||$===vR||$===RR||$===BR}le.isS=Pi0;function me($){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}le.isNameStartChar=me;function Ti0($){return me($)||$>=48&&$<=57||$===45||$===46||$===183||$>=768&&$<=879||$>=8255&&$<=8256}le.isNameChar=Ti0});var K00=O((U00)=>{Object.defineProperty(U00,"__esModule",{value:!0});U00.CHAR="\x01--�\uD800\uDC00-\uDBFF\uDFFF";U00.RESTRICTED_CHAR="\x01-\b\v\f\x0E-\x1F--";U00.S=` \r
|
||||
`;U00.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�\uD800\uDC00-\uDB7F\uDFFF";U00.NAME_CHAR="-"+U00.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";U00.CHAR_RE=new RegExp("^["+U00.CHAR+"]$","u");U00.RESTRICTED_CHAR_RE=new RegExp("^["+U00.RESTRICTED_CHAR+"]$","u");U00.S_RE=new RegExp("^["+U00.S+"]+$","u");U00.NAME_START_CHAR_RE=new RegExp("^["+U00.NAME_START_CHAR+"]$","u");U00.NAME_CHAR_RE=new RegExp("^["+U00.NAME_CHAR+"]$","u");U00.NAME_RE=new RegExp("^["+U00.NAME_START_CHAR+"]["+U00.NAME_CHAR+"]*$","u");U00.NMTOKEN_RE=new RegExp("^["+U00.NAME_CHAR+"]+$","u");var ae=9,se=10,ee=13,$00=32;U00.S_LIST=[$00,se,ee,ae];function ui0($){return $>=1&&$<=55295||$>=57344&&$<=65533||$>=65536&&$<=1114111}U00.isChar=ui0;function ki0($){return $>=1&&$<=8||$===11||$===12||$>=14&&$<=31||$>=127&&$<=132||$>=134&&$<=159}U00.isRestrictedChar=ki0;function xi0($){return $===9||$===10||$===13||$>31&&$<127||$===133||$>159&&$<=55295||$>=57344&&$<=65533||$>=65536&&$<=1114111}U00.isCharAndNotRestricted=xi0;function fi0($){return $===$00||$===se||$===ee||$===ae}U00.isS=fi0;function I00($){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}U00.isNameStartChar=I00;function ii0($){return I00($)||$>=48&&$<=57||$===45||$===46||$===183||$>=768&&$<=879||$>=8255&&$<=8256}U00.isNameChar=ii0});var G00=O((H00)=>{Object.defineProperty(H00,"__esModule",{value:!0});H00.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�\uD800\uDC00-\uDB7F\uDFFF";H00.NC_NAME_CHAR="-"+H00.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀";H00.NC_NAME_START_CHAR_RE=new RegExp("^["+H00.NC_NAME_START_CHAR+"]$","u");H00.NC_NAME_CHAR_RE=new RegExp("^["+H00.NC_NAME_CHAR+"]$","u");H00.NC_NAME_RE=new RegExp("^["+H00.NC_NAME_START_CHAR+"]["+H00.NC_NAME_CHAR+"]*$","u");function q00($){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}H00.isNCNameStartChar=q00;function Ib0($){return q00($)||($===45||$===46||$>=48&&$<=57||$===183||$>=768&&$<=879||$>=8255&&$<=8256)}H00.isNCNameChar=Ib0});var _00=O((C00)=>{Object.defineProperty(C00,"__esModule",{value:!0});var KY=te(),qb0=K00(),pR=G00(),r6=KY.isS,Hb0=KY.isChar,MK=KY.isNameStartChar,W00=KY.isNameChar,T00=KY.S_LIST,Gb0=KY.NAME_RE,Wb0=qb0.isChar,wb0=pR.isNCNameStartChar,Vb0=pR.isNCNameChar,Zb0=pR.NC_NAME_RE,vZ="http://www.w3.org/XML/1998/namespace",QY="http://www.w3.org/2000/xmlns/",zb0={__proto__:null,xml:vZ,xmlns:QY},Xb0={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},H4=-1,y8=-2,w00=0,Lb0=1,_R=2,Db0=3,UY=4,Ob0=5,Fb0=6,Nb0=7,SR=8,Mb0=9,Ab0=10,Pb0=11,Tb0=12,g6=13,AZ=14,gR=15,Eb0=16,yR=17,Bb0=18,vb0=19,hR=20,Rb0=21,jb0=22,Cb0=23,V00=24,uR=25,PZ=26,Z00=27,_b0=28,Sb0=29,z00=30,gb0=31,yb0=32,W3=33,hb0=34,kR=35,AK=36,xR=37,ub0=38,X00=39,L00=40,kb0=41,D00=42,xb0=43,fb0=44,fR=9,K8=10,iR=13,O00=32,F00=33,E00=34,PK=38,B00=39,TZ=45,EZ=47,ib0=59,x9=60,YY=61,h4=62,Y6=63,v00=91,JY=93,N00=133,M00=8232,BZ=($)=>$===E00||$===B00,R00=[E00,B00],bb0=[...R00,v00,h4],nb0=[...R00,x9,JY],pb0=[YY,Y6,...T00],cb0=[...T00,h4,PK,x9];function nR($,I,U){switch(I){case"xml":if(U!==vZ)$.fail(`xml prefix must be bound to ${vZ}.`);break;case"xmlns":if(U!==QY)$.fail(`xmlns prefix must be bound to ${QY}.`);break;default:}switch(U){case QY:$.fail(I===""?`the default namespace may not be set to ${U}.`:`may not assign a prefix (even "xmlns") to the URI ${QY}.`);break;case vZ:switch(I){case"xml":break;case"":$.fail(`the default namespace may not be set to ${U}.`);break;default:$.fail("may not assign the xml namespace to another prefix.")}break;default:}}function db0($,I){for(let U of Object.keys(I))nR($,U,I[U])}var mb0=($)=>Zb0.test($),lb0=($)=>Gb0.test($),w3=0,A00=1,bR=2;C00.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];var P00={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 j00{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=wb0,this.nameCheck=Vb0,this.isName=mb0,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},zb0);let U=this.opt.additionalNamespaces;if(U!
Line truncated
|
||||
`,I=this.i}}captureToChar($){let{i:I}=this,{chunk:U}=this;while(!0){let Y=this.getCode();switch(Y){case y8:this.text+=`${U.slice(I,this.prevI)}
|
||||
`,I=this.i,Y=K8;break;case H4:return this.text+=U.slice(I),!1;default:}if(Y===$)return this.text+=U.slice(I,this.prevI),!0}}captureNameChars(){let{chunk:$,i:I}=this;while(!0){let U=this.getCode();if(U===H4)return this.name+=$.slice(I),H4;if(!W00(U))return this.name+=$.slice(I,this.prevI),U===y8?K8:U}}skipSpaces(){while(!0){let $=this.getCodeNorm();if($===H4||!r6($))return $}}setXMLVersion($){if(this.currentXMLVersion=$,$==="1.0")this.isChar=Hi0,this.getCode=this.getCode10;else this.isChar=Wi0,this.getCode=this.getCode11}sBegin(){if(this.chunk.charCodeAt(0)===65279)this.i++,this.column++;this.state=Li0}sBeginWhitespace(){let $=this.i,I=this.skipSpaces();if(this.prevI!==$)this.xmlDeclPossible=!1;switch(I){case k9:if(this.state=_R,this.text.length!==0)throw Error("no-empty text at start");break;case H4:break;default:this.unget(),this.state=g6,this.xmlDeclPossible=!1}}sDoctype(){var $;let I=this.captureTo(ii0);switch(I){case h4:{($=this.doctypeHandler)===null||$===void 0||$.call(this,this.text),this.text="",this.state=g6,this.doctype=!0;break}case H4:break;default:if(this.text+=String.fromCodePoint(I),I===v00)this.state=$Y;else if(EZ(I))this.state=Di0,this.q=I}}sDoctypeQuote(){let $=this.q;if(this.captureToChar($))this.text+=String.fromCodePoint($),this.q=null,this.state=jR}sDTD(){let $=this.captureTo(ni0);if($===H4)return;if(this.text+=String.fromCodePoint($),$===UY)this.state=jR;else if($===k9)this.state=Fi0;else if(EZ($))this.state=Oi0,this.q=$}sDTDQuoted(){let $=this.q;if(this.captureToChar($))this.text+=String.fromCodePoint($),this.state=$Y,this.q=null}sDTDOpenWaka(){let $=this.getCodeNorm();switch(this.text+=String.fromCodePoint($),$){case F00:this.state=Ni0,this.openWakaBang="";break;case Y6:this.state=Pi0;break;default:this.state=$Y}}sDTDOpenWakaBang(){let $=String.fromCodePoint(this.getCodeNorm()),I=this.openWakaBang+=$;if(this.text+=$,I!=="-")this.state=I==="--"?CR:$Y,this.openWakaBang=""}sDTDComment(){if(this.captureToChar(PZ))this.text+="-",this.state=Mi0}sDTDCommentEnding(){let $=this.getCodeNorm();this.text+=String.fromCodePoint($),this.state=$===PZ?Ai0:CR}sDTDCommentEnded(){let $=this.getCodeNorm();if(this.text+=String.fromCodePoint($),$===h4)this.state=$Y;else this.fail("malformed comment."),this.state=CR}sDTDPI(){if(this.captureToChar(Y6))this.text+="?",this.state=Ti0}sDTDPIEnding(){let $=this.getCodeNorm();if(this.text+=String.fromCodePoint($),$===h4)this.state=$Y}sText(){if(this.tags.length!==0)this.handleTextInRoot();else this.handleTextOutsideRoot()}sEntity(){let{i:$}=this,{chunk:I}=this;$:while(!0)switch(this.getCode()){case y8:this.entity+=`${I.slice($,this.prevI)}
|
||||
`,$=this.i;break;case bi0:{let{entityReturnState:U}=this,Y=this.entity+I.slice($,this.prevI);this.state=U;let J;if(Y==="")this.fail("empty entity name."),J="&;";else J=this.parseEntity(Y),this.entity="";if(U!==g6||this.textHandler!==void 0)this.text+=J;break $}case H4:this.entity+=I.slice($);break $;default:}}sOpenWaka(){let $=this.getCode();if(MK($))this.state=hi0,this.unget(),this.xmlDeclPossible=!1;else switch($){case TZ:this.state=ki0,this.xmlDeclPossible=!1;break;case F00:this.state=Ei0,this.openWakaBang="",this.xmlDeclPossible=!1;break;case Y6:this.state=Ci0;break;default:this.fail("disallowed character in tag name"),this.state=g6,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=gR,this.openWakaBang="";break;case"--":this.state=SR,this.openWakaBang="";break;case"DOCTYPE":if(this.state=jR,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(PZ))this.state=Bi0}sCommentEnding(){var $;let I=this.getCodeNorm();if(I===PZ)this.state=vi0,($=this.commentHandler)===null||$===void 0||$.call(this,this.text),this.text="";else this.text+=`-${String.fromCodePoint(I)}`,this.state=SR}sCommentEnded(){let $=this.getCodeNorm();if($!==h4)this.fail("malformed comment."),this.text+=`--${String.fromCodePoint($)}`,this.state=SR;else this.state=g6}sCData(){if(this.captureToChar(UY))this.state=Ri0}sCDataEnding(){let $=this.getCodeNorm();if($===UY)this.state=ji0;else this.text+=`]${String.fromCodePoint($)}`,this.state=gR}sCDataEnding2(){var $;let I=this.getCodeNorm();switch(I){case h4:{($=this.cdataHandler)===null||$===void 0||$.call(this,this.text),this.text="",this.state=g6;break}case UY:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(I)}`,this.state=gR}}sPIFirstChar(){let $=this.getCodeNorm();if(this.nameStartCheck($))this.piTarget+=String.fromCodePoint($),this.state=V00;else if($===Y6||r6($))this.fail("processing instruction without a target."),this.state=$===Y6?AZ:yR;else this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint($),this.state=V00}sPIRest(){let{chunk:$,i:I}=this;while(!0){let U=this.getCodeNorm();if(U===H4){this.piTarget+=$.slice(I);return}if(!this.nameCheck(U)){this.piTarget+=$.slice(I,this.prevI);let Y=U===Y6;if(Y||r6(U))if(this.piTarget==="xml"){if(!this.xmlDeclPossible)this.fail("an XML declaration must be at the start of the document.");this.state=Y?W3:Z00}else this.state=Y?AZ:yR;else this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(U);break}}}sPIBody(){if(this.text.length===0){let $=this.getCodeNorm();if($===Y6)this.state=AZ;else if(!r6($))this.text=String.fromCodePoint($)}else if(this.captureToChar(Y6))this.state=AZ}sPIEnding(){var $;let I=this.getCodeNorm();if(I===h4){let{piTarget:U}=this;if(U.toLowerCase()==="xml")this.fail("the XML declaration must appear at the start of the document.");($=this.piHandler)===null||$===void 0||$.call(this,{target:U,body:this.text}),this.piTarget=this.text="",this.state=g6}else if(I===Y6)this.text+="?";else this.text+=`?${String.fromCodePoint(I)}`,this.state=yR;this.xmlDeclPossible=!1}sXMLDeclNameStart(){let $=this.skipSpaces();if($===Y6){this.state=W3;return}if($!==H4)this.state=_i0,this.name=String.fromCodePoint($)}sXMLDeclName(){let $=this.captureTo(pi0);if($===Y6){this.state=W3,this.name+=this.text,this.text="",this.fail("XML declaration is incomplete.");return}if(!(r6($)||$===IY))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=$===IY?z00:Si0}sXMLDeclEq(){let $=this.getCodeNorm();if($===Y6){this.state=W3,this.fail("XML declaration is incomplete.");return}if(r6($))return;if($!==IY)this.fail("value required.");this.state=z00}sXMLDeclValueStart(){let $=this.getCodeNorm();if($===Y6){this.state=W3,this.fail("XML declaration is incomplete.");return}if(r6($))return;if(!EZ($))this.fail("value must be quoted."),this.q=O00;else this.q=$;this.state=gi0}sXMLDeclValue(){let $=this.captureTo([this.q,Y6]);if($===Y6){this.state=W3,this.text="",this.fail("XML declaration is incomplete.");return}if($===H4)return;let I=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];let U=I;if(this.xmlDecl.version=U,!/^1\.[0-9]+$/.test(U))this.fail("ver
Line truncated
|
||||
`;$=this.i,I=w3;break;case H4:if(Y!==void 0)this.text+=U.slice($);break $;default:I=w3}this.forbiddenState=I}handleTextOutsideRoot(){let{i:$}=this,{chunk:I,textHandler:U}=this,Y=!1;$:while(!0){let J=this.getCode();switch(J){case k9:{if(this.state=_R,U!==void 0){let{text:Q}=this,K=I.slice($,this.prevI);if(Q.length!==0)U(Q+K),this.text="";else if(K.length!==0)U(K)}break $}case PK:if(this.state=MZ,this.entityReturnState=g6,U!==void 0)this.text+=I.slice($,this.prevI);Y=!0;break $;case y8:if(U!==void 0)this.text+=`${I.slice($,this.prevI)}
|
||||
`;$=this.i;break;case H4:if(U!==void 0)this.text+=I.slice($);break $;default:if(!r6(J))Y=!0}}if(!Y)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 U;let{prefix:Y,local:J}=this.qname($),Q={name:$,prefix:Y,local:J,value:I};if(this.attribList.push(Q),(U=this.attributeHandler)===null||U===void 0||U.call(this,Q),Y==="xmlns"){let K=I.trim();if(this.currentXMLVersion==="1.0"&&K==="")this.fail("invalid attempt to undefine prefix in XML 1.0");this.topNS[J]=K,bR(this,J,K)}else if($==="xmlns"){let K=I.trim();this.topNS[""]=K,bR(this,"",K)}}pushAttribPlain($,I){var U;let Y={name:$,value:I};this.attribList.push(Y),(U=this.attributeHandler)===null||U===void 0||U.call(this,Y)}end(){var $,I;if(!this.sawRoot)this.fail("document must contain a root element.");let{tags:U}=this;while(U.length>0){let J=U.pop();this.fail(`unclosed tag: ${J.name}`)}if(this.state!==w00&&this.state!==g6)this.fail("unexpected end.");let{text:Y}=this;if(Y.length!==0)($=this.textHandler)===null||$===void 0||$.call(this,Y),this.text="";return this._closed=!0,(I=this.endHandler)===null||I===void 0||I.call(this),this._init(),this}resolve($){var I,U;let Y=this.topNS[$];if(Y!==void 0)return Y;let{tags:J}=this;for(let Q=J.length-1;Q>=0;Q--)if(Y=J[Q].ns[$],Y!==void 0)return Y;if(Y=this.ns[$],Y!==void 0)return Y;return(U=(I=this.opt).resolvePrefix)===null||U===void 0?void 0:U.call(I,$)}qname($){let I=$.indexOf(":");if(I===-1)return{prefix:"",local:$};let U=$.slice(I+1),Y=$.slice(0,I);if(Y===""||U===""||U.includes(":"))this.fail(`malformed name: ${$}.`);return{prefix:Y,local:U}}processAttribsNS(){var $;let{attribList:I}=this,U=this.tag;{let{prefix:Q,local:K}=this.qname(U.name);U.prefix=Q,U.local=K;let q=U.uri=($=this.resolve(Q))!==null&&$!==void 0?$:"";if(Q!==""){if(Q==="xmlns")this.fail('tags may not have "xmlns" as prefix.');if(q==="")this.fail(`unbound namespace prefix: ${JSON.stringify(Q)}.`),U.uri=Q}}if(I.length===0)return;let{attributes:Y}=U,J=new Set;for(let Q of I){let{name:K,prefix:q,local:H}=Q,G,W;if(q==="")G=K==="xmlns"?YY:"",W=K;else{if(G=this.resolve(q),G===void 0)this.fail(`unbound namespace prefix: ${JSON.stringify(q)}.`),G=q;W=`{${G}}${H}`}if(J.has(W))this.fail(`duplicate attribute: ${W}.`);J.add(W),Q.uri=G,Y[K]=Q}this.attribList=[]}processAttribsPlain(){let{attribList:$}=this,I=this.tag.attributes;for(let{name:U,value:Y}of $){if(I[U]!==void 0)this.fail(`duplicate attribute: ${U}.`);I[U]=Y}this.attribList=[]}openTag(){var $;this.processAttribs();let{tags:I}=this,U=this.tag;U.isSelfClosing=!1,($=this.openTagHandler)===null||$===void 0||$.call(this,U),I.push(U),this.state=g6,this.name=""}openSelfClosingTag(){var $,I,U;this.processAttribs();let{tags:Y}=this,J=this.tag;if(J.isSelfClosing=!0,($=this.openTagHandler)===null||$===void 0||$.call(this,J),(I=this.closeTagHandler)===null||I===void 0||I.call(this,J),(this.tag=(U=Y[Y.length-1])!==null&&U!==void 0?U:null)===null)this.closedRoot=!0;this.state=g6,this.name=""}closeTag(){let{tags:$,name:I}=this;if(this.state=g6,this.name="",I===""){this.fail("weird empty close tag."),this.text+="</>";return}let U=this.closeTagHandler,Y=$.length;while(Y-- >0){let J=this.tag=$.pop();if(this.topNS=J.ns,U===null||U===void 0||U(J),J.name===I)break;this.fail("unexpected close tag.")}if(Y===0)this.closedRoot=!0;else if(Y<0)this.fail(`unmatched closing tag: ${I}.`),this.text+=`</${I}>`}parseEntity($){if($[0]!=="#"){let U=this.ENTITIES[$];if(U!==void 0)return U;return this.fail(this.isName($)?"undefined entity.":"disallowed character in entity name."),`&${$};`}let I=NaN;if($[1]==="x"&&/^#x[0-9a-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)}}C00.SaxesParser=j00});var TK=O((XT1,S00)=>{var{SaxesParser:ti0}=_00(),{PassThrough:ai0}=D6(),{bufferToString:si0}=PR();S00.exports=async function*($){if($.pipe&&!$[Symbol.asyncIterator])$=$.pipe(new ai0);let I=new ti0,U;I.on("error",(J)=>{U=J});let Y=[];I.on("opentag",(J)=>Y.push({eventType:"opentag",value:J})),I.on("text",(J)=>Y.push({eventType:"text",value:J})),I.on("closetag",(J)=>Y.push({eventType:"closetag",value:J}));for await(let J of $){if(I.write(si0(J)),U)throw U;yield Y,Y=[]}}});var L0=O((LT1,g00)=>{var ei0=TK(),$n0=U6();class QY{prepare(){}render(){}parseOpen($){}parseText($){}parseClose($){}reconcile($,I){}reset(){if(this.model=null,this.map)Object.values(this.map).forEach(($)=>{if($ instanceof QY)$.reset();else if($.xform)$.xform.reset()})}mergeModel($){this.model=Object.assign(this.model||{},$)}async parse($){for await(let I of $)for(let{eventType:U,value:Y}of I)if(U==="opentag")this.parseOpen(Y);else if(U==="text")this.parseText(Y);else if(U==="closetag"){if(!this.parseClose(Y.name))return thLine 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:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"> <a:shade val="95000"/> <a:satMod val="105000"/> </a:schemeClr> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <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="\uFEFF",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}`}}G90.FormatterOptions=H90});var Qz=O((iB1,z90)=>{var Wo0="[object AsyncFunction]",wo0="[object Function]",Vo0="[object GeneratorFunction]",Zo0="[object Null]",zo0="[object Proxy]",Xo0="[object Undefined]",Lo0=typeof global=="object"&&global&&global.Object===Object&&global,Do0=typeof self=="object"&&self&&self.Object===Object&&self,Oo0=Lo0||Do0||Function("return this")(),V90=Object.prototype,Fo0=V90.hasOwnProperty,Z90=V90.toString,w90=Oo0.Symbol,O3=w90?w90.toStringTag:void 0;function No0($){if($==null)return $===void 0?Xo0:Zo0;return O3&&O3 in Object($)?Mo0($):Ao0($)}function Mo0($){var I=Fo0.call($,O3),U=$[O3];try{$[O3]=void 0;var Y=!0}catch(Q){}var J=Z90.call($);if(Y)if(I)$[O3]=U;else delete $[O3];return J}function Ao0($){return Z90.call($)}function Po0($){if(!To0($))return!1;var I=No0($);return I==wo0||I==Vo0||I==Wo0||I==zo0}function To0($){var I=typeof $;return $!=null&&(I=="object"||I=="function")}z90.exports=Po0});var r90=O((Kz,XY)=>{var Eo0=200,WC="__lodash_hash_undefined__",zz=1,B90=2,v90=9007199254740991,qz="[object Arguments]",YC="[object Array]",Bo0="[object AsyncFunction]",R90="[object Boolean]",j90="[object Date]",C90="[object Error]",_90="[object Function]",vo0="[object GeneratorFunction]",Hz="[object Map]",S90="[object Number]",Ro0="[object Null]",zY="[object Object]",X90="[object Promise]",jo0="[object Proxy]",g90="[object RegExp]",Gz="[object Set]",y90="[object String]",Co0="[object Symbol]",_o0="[object Undefined]",JC="[object WeakMap]",h90="[object ArrayBuffer]",Wz="[object DataView]",So0="[object Float32Array]",go0="[object Float64Array]",yo0="[object Int8Array]",ho0="[object Int16Array]",uo0="[object Int32Array]",xo0="[object Uint8Array]",ko0="[object Uint8ClampedArray]",fo0="[object Uint16Array]",bo0="[object Uint32Array]",io0=/[\\^$.*+?()[\]{}|]/g,no0=/^\[object .+?Constructor\]$/,po0=/^(?:0|[1-9]\d*)$/,e1={};e1[So0]=e1[go0]=e1[yo0]=e1[ho0]=e1[uo0]=e1[xo0]=e1[ko0]=e1[fo0]=e1[bo0]=!0;e1[qz]=e1[YC]=e1[h90]=e1[R90]=e1[Wz]=e1[j90]=e1[C90]=e1[_90]=e1[Hz]=e1[S90]=e1[zY]=e1[g90]=e1[Gz]=e1[y90]=e1[JC]=!1;var u90=typeof global=="object"&&global&&global.Object===Object&&global,co0=typeof self=="object"&&self&&self.Object===Object&&self,E5=u90||co0||Function("return this")(),x90=typeof Kz=="object"&&Kz&&!Kz.nodeType&&Kz,L90=x90&&typeof XY=="object"&&XY&&!XY.nodeType&&XY,k90=L90&&L90.exports===x90,$C=k90&&u90.process,D90=function(){try{return $C&&$C.binding&&$C.binding("util")}catch($){}}(),O90=D90&&D90.isTypedArray;function do0($,I){var U=-1,Y=$==null?0:$.length,J=0,Q=[];while(++U<Y){var K=$[U];if(I(K,U,$))Q[J++]=K}return Q}function mo0($,I){var U=-1,Y=I.length,J=$.length;while(++U<Y)$[J+U]=I[U];return $}function lo0($,I){var U=-1,Y=$==null?0:$.length;while(++U<Y)if(I($[U],U,$))return!0;return!1}function oo0($,I){var U=-1,Y=Array($);while(++U<$)Y[U]=I(U);return Y}function ro0($){return function(I){return $(I)}}function to0($,I){return $.has(I)}function ao0($,I){return $==null?void 0:$[I]}function so0($){var I=-1,U=Array($.size);return $.forEach(function(Y,J){U[++I]=[J,Y]}),U}function eo0($,I){return function(U){return $(I(U))}}function $r0($){var I=-1,U=Array($.size);return $.forEach(function(Y){U[++I]=Y}),U}var Ir0=Array.prototype,Ur0=Function.prototype,Xz=Object.prototype,IC=E5["__core-js_shared__"],f90=Ur0.toString,u8=Xz.hasOwnProperty,F90=function(){var $=/[^.]+$/.exec(IC&&IC.keys&&IC.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),b90=Xz.toString,Yr0=RegExp("^"+f90.call(u8).replace(io0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N90=k90?E5.Buffer:void 0,wz=E5.Symbol,M90=E5.Uint8Array,i90=Xz.propertyIsEnumerable,Jr0=Ir0.splice,F3=wz?wz.toStringTag:void 0,A90=Object.getOwnPropertySymbols,Qr0=N90?N90.isBuffer:void 0,Kr0=eo0(Object.keys,Object),QC=LY(E5,"DataView"),_K=LY(E5,"Map"),KC=LY(E5,"Promise"),qC=LY(E5,"Set"),HC=LY(E5,"WeakMap"),SK=LY(Object,"create"),qr0=A3(QC),Hr0=A3(_K),Gr0=A3(KC),Wr0=A3(qC),wr0=A3(HC),P90=wz?wz.prototype:void 0,UC=P90?P90.valueOf:void 0;function N3($){var I=-1,U=$==null?0:$.length;this.clear();while(++I<U){var Y=$[I];this.set(Y[0],Y[1])}}function Vr0(){this.__data__=SK?SK(null):{},this.size=0}function Zr0($){var I=this.has($)&&delete this.__data__[$];return this.size-=I?1:0,I}function zr0($){var I=this.__data
Line truncated
|
||||
]`;this.ESCAPE_REGEXP=new RegExp(I)}set headers($){this._headers=$}shouldQuote($,I){let U=I?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;if(Nt0.default(U))return U;if(Array.isArray(U))return U[$];if(this._headers!==null)return U[this._headers[$]];return!1}format($,I,U){let Y=`${Mt0.default($)?"":$}`.replace(/\0/g,""),{formatterOptions:J}=this;if(J.quote!==""){if(Y.indexOf(J.quote)!==-1)return this.quoteField(Y.replace(this.REPLACE_REGEXP,J.escapedQuote))}if(Y.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(I,U))return this.quoteField(Y);return Y}quoteField($){let{quote:I}=this.formatterOptions;return`${I}${$}${I}`}}DY.FieldFormatter=J70});var XC=O((Q70)=>{Object.defineProperty(Q70,"__esModule",{value:!0});Q70.isSyncTransform=void 0;Q70.isSyncTransform=($)=>$.length===1});var H70=O((OY)=>{var q70=OY&&OY.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(OY,"__esModule",{value:!0});OY.RowFormatter=void 0;var Pt0=q70(Qz()),Tt0=q70(r90()),Et0=zC(),Bt0=XC();class P3{constructor($){if(this.rowCount=0,this.formatterOptions=$,this.fieldFormatter=new Et0.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(P3.isRowHashArray($))return $.map((I)=>I[0]);if(Array.isArray($))return $;return Object.keys($)}static createTransform($){if(Bt0.isSyncTransform($))return(I,U)=>{let Y=null;try{Y=$(I)}catch(J){return U(J)}return U(null,Y)};return(I,U)=>{$(I,U)}}set rowTransform($){if(!Pt0.default($))throw TypeError("The transform should be a function");this._rowTransform=P3.createTransform($)}format($,I){this.callTransformer($,(U,Y)=>{if(U)return I(U);if(!$)return I(null);let J=[];if(Y){let{shouldFormatColumns:Q,headers:K}=this.checkHeaders(Y);if(this.shouldWriteHeaders&&K&&!this.hasWrittenHeaders)J.push(this.formatColumns(K,!0)),this.hasWrittenHeaders=!0;if(Q){let q=this.gatherColumns(Y);J.push(this.formatColumns(q,!1))}}return I(null,J)})}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=P3.gatherHeaders($);if(this.headers=I,this.fieldFormatter.headers=I,!this.shouldWriteHeaders)return{shouldFormatColumns:!0,headers:null};return{shouldFormatColumns:!Tt0.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(P3.isRowHashArray($))return this.headers.map((I,U)=>{let Y=$[U];if(Y)return Y[1];return""});if(P3.isRowArray($)&&!this.shouldWriteHeaders)return $;return this.headers.map((I,U)=>$[U])}callTransformer($,I){if(!this._rowTransform)return I(null,$);return this._rowTransform($,I)}formatColumns($,I){let U=$.map((J,Q)=>this.fieldFormatter.format(J,Q,I)).join(this.formatterOptions.delimiter),{rowCount:Y}=this;if(this.rowCount+=1,Y)return[this.formatterOptions.rowDelimiter,U].join("");return U}}OY.RowFormatter=P3});var G70=O((Oz)=>{Object.defineProperty(Oz,"__esModule",{value:!0});Oz.FieldFormatter=Oz.RowFormatter=void 0;var vt0=H70();Object.defineProperty(Oz,"RowFormatter",{enumerable:!0,get:function(){return vt0.RowFormatter}});var Rt0=zC();Object.defineProperty(Oz,"FieldFormatter",{enumerable:!0,get:function(){return Rt0.FieldFormatter}})});var LC=O((w70)=>{Object.defineProperty(w70,"__esModule",{value:!0});w70.CsvFormatterStream=void 0;var Ct0=t("stream"),_t0=G70();class W70 extends Ct0.Transform{constructor($){super({writableObjectMode:$.objectMode});this.hasWrittenBOM=!1,this.formatterOptions=$,this.rowFormatter=new _t0.RowFormatter($),this.hasWrittenBOM=!$.writeBOM}transform($){return this.rowFormatter.rowTransform=$,this}_transform($,I,U){let Y=!1;try{if(!this.hasWrittenBOM)this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0;this.rowFormatter.format($,(J,Q)=>{if(J)return Y=!0,U(J);if(Q)Q.forEach((K)=>{this.push(Buffer.from(K,"utf8"))});return Y=!0,U()})}catch(J){if(Y)throw J;U(J)}}_flush($){this.rowFormatter.finish((I,U)=>{if(I)return $(I);if(U)U.forEach((Y)=>{this.push(Buffer.from(Y,"utf8"))});return $()})}}w70.CsvFormatterStream=W70});var z70=O((P1)=>{var Z70=P1&&P1.__createBinding||(Object.create?function($,I,U,Y){if(Y===void 0)Y=U;Object.defineProperty($,Y,{enumerable:!0,get:function(){return I[U]}})}:function($,I,U,Y){if(Y===void 0)Y=U;$[Y]=I[U]}),St0=P1&&P1.__setModuleDefault||(Object.create?function($,I){Ob
Line truncated
|
||||
`,I=this.i,Y=K8;break;case H4:return this.text+=U.slice(I),!1;default:}if(Y===$)return this.text+=U.slice(I,this.prevI),!0}}captureNameChars(){let{chunk:$,i:I}=this;while(!0){let U=this.getCode();if(U===H4)return this.name+=$.slice(I),H4;if(!W00(U))return this.name+=$.slice(I,this.prevI),U===y8?K8:U}}skipSpaces(){while(!0){let $=this.getCodeNorm();if($===H4||!r6($))return $}}setXMLVersion($){if(this.currentXMLVersion=$,$==="1.0")this.isChar=Hb0,this.getCode=this.getCode10;else this.isChar=Wb0,this.getCode=this.getCode11}sBegin(){if(this.chunk.charCodeAt(0)===65279)this.i++,this.column++;this.state=Lb0}sBeginWhitespace(){let $=this.i,I=this.skipSpaces();if(this.prevI!==$)this.xmlDeclPossible=!1;switch(I){case x9:if(this.state=gR,this.text.length!==0)throw Error("no-empty text at start");break;case H4:break;default:this.unget(),this.state=g6,this.xmlDeclPossible=!1}}sDoctype(){var $;let I=this.captureTo(bb0);switch(I){case h4:{($=this.doctypeHandler)===null||$===void 0||$.call(this,this.text),this.text="",this.state=g6,this.doctype=!0;break}case H4:break;default:if(this.text+=String.fromCodePoint(I),I===v00)this.state=UY;else if(BZ(I))this.state=Db0,this.q=I}}sDoctypeQuote(){let $=this.q;if(this.captureToChar($))this.text+=String.fromCodePoint($),this.q=null,this.state=_R}sDTD(){let $=this.captureTo(nb0);if($===H4)return;if(this.text+=String.fromCodePoint($),$===JY)this.state=_R;else if($===x9)this.state=Fb0;else if(BZ($))this.state=Ob0,this.q=$}sDTDQuoted(){let $=this.q;if(this.captureToChar($))this.text+=String.fromCodePoint($),this.state=UY,this.q=null}sDTDOpenWaka(){let $=this.getCodeNorm();switch(this.text+=String.fromCodePoint($),$){case F00:this.state=Nb0,this.openWakaBang="";break;case Y6:this.state=Pb0;break;default:this.state=UY}}sDTDOpenWakaBang(){let $=String.fromCodePoint(this.getCodeNorm()),I=this.openWakaBang+=$;if(this.text+=$,I!=="-")this.state=I==="--"?SR:UY,this.openWakaBang=""}sDTDComment(){if(this.captureToChar(TZ))this.text+="-",this.state=Mb0}sDTDCommentEnding(){let $=this.getCodeNorm();this.text+=String.fromCodePoint($),this.state=$===TZ?Ab0:SR}sDTDCommentEnded(){let $=this.getCodeNorm();if(this.text+=String.fromCodePoint($),$===h4)this.state=UY;else this.fail("malformed comment."),this.state=SR}sDTDPI(){if(this.captureToChar(Y6))this.text+="?",this.state=Tb0}sDTDPIEnding(){let $=this.getCodeNorm();if(this.text+=String.fromCodePoint($),$===h4)this.state=UY}sText(){if(this.tags.length!==0)this.handleTextInRoot();else this.handleTextOutsideRoot()}sEntity(){let{i:$}=this,{chunk:I}=this;$:while(!0)switch(this.getCode()){case y8:this.entity+=`${I.slice($,this.prevI)}
|
||||
`,$=this.i;break;case ib0:{let{entityReturnState:U}=this,Y=this.entity+I.slice($,this.prevI);this.state=U;let J;if(Y==="")this.fail("empty entity name."),J="&;";else J=this.parseEntity(Y),this.entity="";if(U!==g6||this.textHandler!==void 0)this.text+=J;break $}case H4:this.entity+=I.slice($);break $;default:}}sOpenWaka(){let $=this.getCode();if(MK($))this.state=hb0,this.unget(),this.xmlDeclPossible=!1;else switch($){case EZ:this.state=xb0,this.xmlDeclPossible=!1;break;case F00:this.state=Eb0,this.openWakaBang="",this.xmlDeclPossible=!1;break;case Y6:this.state=Cb0;break;default:this.fail("disallowed character in tag name"),this.state=g6,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=hR,this.openWakaBang="";break;case"--":this.state=yR,this.openWakaBang="";break;case"DOCTYPE":if(this.state=_R,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(TZ))this.state=Bb0}sCommentEnding(){var $;let I=this.getCodeNorm();if(I===TZ)this.state=vb0,($=this.commentHandler)===null||$===void 0||$.call(this,this.text),this.text="";else this.text+=`-${String.fromCodePoint(I)}`,this.state=yR}sCommentEnded(){let $=this.getCodeNorm();if($!==h4)this.fail("malformed comment."),this.text+=`--${String.fromCodePoint($)}`,this.state=yR;else this.state=g6}sCData(){if(this.captureToChar(JY))this.state=Rb0}sCDataEnding(){let $=this.getCodeNorm();if($===JY)this.state=jb0;else this.text+=`]${String.fromCodePoint($)}`,this.state=hR}sCDataEnding2(){var $;let I=this.getCodeNorm();switch(I){case h4:{($=this.cdataHandler)===null||$===void 0||$.call(this,this.text),this.text="",this.state=g6;break}case JY:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(I)}`,this.state=hR}}sPIFirstChar(){let $=this.getCodeNorm();if(this.nameStartCheck($))this.piTarget+=String.fromCodePoint($),this.state=V00;else if($===Y6||r6($))this.fail("processing instruction without a target."),this.state=$===Y6?PZ:uR;else this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint($),this.state=V00}sPIRest(){let{chunk:$,i:I}=this;while(!0){let U=this.getCodeNorm();if(U===H4){this.piTarget+=$.slice(I);return}if(!this.nameCheck(U)){this.piTarget+=$.slice(I,this.prevI);let Y=U===Y6;if(Y||r6(U))if(this.piTarget==="xml"){if(!this.xmlDeclPossible)this.fail("an XML declaration must be at the start of the document.");this.state=Y?W3:Z00}else this.state=Y?PZ:uR;else this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(U);break}}}sPIBody(){if(this.text.length===0){let $=this.getCodeNorm();if($===Y6)this.state=PZ;else if(!r6($))this.text=String.fromCodePoint($)}else if(this.captureToChar(Y6))this.state=PZ}sPIEnding(){var $;let I=this.getCodeNorm();if(I===h4){let{piTarget:U}=this;if(U.toLowerCase()==="xml")this.fail("the XML declaration must appear at the start of the document.");($=this.piHandler)===null||$===void 0||$.call(this,{target:U,body:this.text}),this.piTarget=this.text="",this.state=g6}else if(I===Y6)this.text+="?";else this.text+=`?${String.fromCodePoint(I)}`,this.state=uR;this.xmlDeclPossible=!1}sXMLDeclNameStart(){let $=this.skipSpaces();if($===Y6){this.state=W3;return}if($!==H4)this.state=_b0,this.name=String.fromCodePoint($)}sXMLDeclName(){let $=this.captureTo(pb0);if($===Y6){this.state=W3,this.name+=this.text,this.text="",this.fail("XML declaration is incomplete.");return}if(!(r6($)||$===YY))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=$===YY?z00:Sb0}sXMLDeclEq(){let $=this.getCodeNorm();if($===Y6){this.state=W3,this.fail("XML declaration is incomplete.");return}if(r6($))return;if($!==YY)this.fail("value required.");this.state=z00}sXMLDeclValueStart(){let $=this.getCodeNorm();if($===Y6){this.state=W3,this.fail("XML declaration is incomplete.");return}if(r6($))return;if(!BZ($))this.fail("value must be quoted."),this.q=O00;else this.q=$;this.state=gb0}sXMLDeclValue(){let $=this.captureTo([this.q,Y6]);if($===Y6){this.state=W3,this.text="",this.fail("XML declaration is incomplete.");return}if($===H4)return;let I=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];let U=I;if(this.xmlDecl.version=U,!/^1\.[0-9]+$/.test(U))this.fail("ver
Line truncated
|
||||
`;$=this.i,I=w3;break;case H4:if(Y!==void 0)this.text+=U.slice($);break $;default:I=w3}this.forbiddenState=I}handleTextOutsideRoot(){let{i:$}=this,{chunk:I,textHandler:U}=this,Y=!1;$:while(!0){let J=this.getCode();switch(J){case x9:{if(this.state=gR,U!==void 0){let{text:Q}=this,K=I.slice($,this.prevI);if(Q.length!==0)U(Q+K),this.text="";else if(K.length!==0)U(K)}break $}case PK:if(this.state=AZ,this.entityReturnState=g6,U!==void 0)this.text+=I.slice($,this.prevI);Y=!0;break $;case y8:if(U!==void 0)this.text+=`${I.slice($,this.prevI)}
|
||||
`;$=this.i;break;case H4:if(U!==void 0)this.text+=I.slice($);break $;default:if(!r6(J))Y=!0}}if(!Y)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 U;let{prefix:Y,local:J}=this.qname($),Q={name:$,prefix:Y,local:J,value:I};if(this.attribList.push(Q),(U=this.attributeHandler)===null||U===void 0||U.call(this,Q),Y==="xmlns"){let K=I.trim();if(this.currentXMLVersion==="1.0"&&K==="")this.fail("invalid attempt to undefine prefix in XML 1.0");this.topNS[J]=K,nR(this,J,K)}else if($==="xmlns"){let K=I.trim();this.topNS[""]=K,nR(this,"",K)}}pushAttribPlain($,I){var U;let Y={name:$,value:I};this.attribList.push(Y),(U=this.attributeHandler)===null||U===void 0||U.call(this,Y)}end(){var $,I;if(!this.sawRoot)this.fail("document must contain a root element.");let{tags:U}=this;while(U.length>0){let J=U.pop();this.fail(`unclosed tag: ${J.name}`)}if(this.state!==w00&&this.state!==g6)this.fail("unexpected end.");let{text:Y}=this;if(Y.length!==0)($=this.textHandler)===null||$===void 0||$.call(this,Y),this.text="";return this._closed=!0,(I=this.endHandler)===null||I===void 0||I.call(this),this._init(),this}resolve($){var I,U;let Y=this.topNS[$];if(Y!==void 0)return Y;let{tags:J}=this;for(let Q=J.length-1;Q>=0;Q--)if(Y=J[Q].ns[$],Y!==void 0)return Y;if(Y=this.ns[$],Y!==void 0)return Y;return(U=(I=this.opt).resolvePrefix)===null||U===void 0?void 0:U.call(I,$)}qname($){let I=$.indexOf(":");if(I===-1)return{prefix:"",local:$};let U=$.slice(I+1),Y=$.slice(0,I);if(Y===""||U===""||U.includes(":"))this.fail(`malformed name: ${$}.`);return{prefix:Y,local:U}}processAttribsNS(){var $;let{attribList:I}=this,U=this.tag;{let{prefix:Q,local:K}=this.qname(U.name);U.prefix=Q,U.local=K;let q=U.uri=($=this.resolve(Q))!==null&&$!==void 0?$:"";if(Q!==""){if(Q==="xmlns")this.fail('tags may not have "xmlns" as prefix.');if(q==="")this.fail(`unbound namespace prefix: ${JSON.stringify(Q)}.`),U.uri=Q}}if(I.length===0)return;let{attributes:Y}=U,J=new Set;for(let Q of I){let{name:K,prefix:q,local:H}=Q,G,W;if(q==="")G=K==="xmlns"?QY:"",W=K;else{if(G=this.resolve(q),G===void 0)this.fail(`unbound namespace prefix: ${JSON.stringify(q)}.`),G=q;W=`{${G}}${H}`}if(J.has(W))this.fail(`duplicate attribute: ${W}.`);J.add(W),Q.uri=G,Y[K]=Q}this.attribList=[]}processAttribsPlain(){let{attribList:$}=this,I=this.tag.attributes;for(let{name:U,value:Y}of $){if(I[U]!==void 0)this.fail(`duplicate attribute: ${U}.`);I[U]=Y}this.attribList=[]}openTag(){var $;this.processAttribs();let{tags:I}=this,U=this.tag;U.isSelfClosing=!1,($=this.openTagHandler)===null||$===void 0||$.call(this,U),I.push(U),this.state=g6,this.name=""}openSelfClosingTag(){var $,I,U;this.processAttribs();let{tags:Y}=this,J=this.tag;if(J.isSelfClosing=!0,($=this.openTagHandler)===null||$===void 0||$.call(this,J),(I=this.closeTagHandler)===null||I===void 0||I.call(this,J),(this.tag=(U=Y[Y.length-1])!==null&&U!==void 0?U:null)===null)this.closedRoot=!0;this.state=g6,this.name=""}closeTag(){let{tags:$,name:I}=this;if(this.state=g6,this.name="",I===""){this.fail("weird empty close tag."),this.text+="</>";return}let U=this.closeTagHandler,Y=$.length;while(Y-- >0){let J=this.tag=$.pop();if(this.topNS=J.ns,U===null||U===void 0||U(J),J.name===I)break;this.fail("unexpected close tag.")}if(Y===0)this.closedRoot=!0;else if(Y<0)this.fail(`unmatched closing tag: ${I}.`),this.text+=`</${I}>`}parseEntity($){if($[0]!=="#"){let U=this.ENTITIES[$];if(U!==void 0)return U;return this.fail(this.isName($)?"undefined entity.":"disallowed character in entity name."),`&${$};`}let I=NaN;if($[1]==="x"&&/^#x[0-9a-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)}}C00.SaxesParser=j00});var TK=O((LT1,S00)=>{var{SaxesParser:tb0}=_00(),{PassThrough:ab0}=D6(),{bufferToString:sb0}=ER();S00.exports=async function*($){if($.pipe&&!$[Symbol.asyncIterator])$=$.pipe(new ab0);let I=new tb0,U;I.on("error",(J)=>{U=J});let Y=[];I.on("opentag",(J)=>Y.push({eventType:"opentag",value:J})),I.on("text",(J)=>Y.push({eventType:"text",value:J})),I.on("closetag",(J)=>Y.push({eventType:"closetag",value:J}));for await(let J of $){if(I.write(sb0(J)),U)throw U;yield Y,Y=[]}}});var L0=O((DT1,g00)=>{var eb0=TK(),$n0=U6();class qY{prepare(){}render(){}parseOpen($){}parseText($){}parseClose($){}reconcile($,I){}reset(){if(this.model=null,this.map)Object.values(this.map).forEach(($)=>{if($ instanceof qY)$.reset();else if($.xform)$.xform.reset()})}mergeModel($){this.model=Object.assign(this.model||{},$)}async parse($){for await(let I of $)for(let{eventType:U,value:Y}of I)if(U==="opentag")this.parseOpen(Y);else if(U==="text")this.parseText(Y);else if(U==="closetag"){if(!this.parseClose(Y.name))return thLine 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:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"> <a:shade val="95000"/> <a:satMod val="105000"/> </a:schemeClr> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <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="\uFEFF",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}`}}G90.FormatterOptions=H90});var Kz=O((nB1,z90)=>{var Wo0="[object AsyncFunction]",wo0="[object Function]",Vo0="[object GeneratorFunction]",Zo0="[object Null]",zo0="[object Proxy]",Xo0="[object Undefined]",Lo0=typeof global=="object"&&global&&global.Object===Object&&global,Do0=typeof self=="object"&&self&&self.Object===Object&&self,Oo0=Lo0||Do0||Function("return this")(),V90=Object.prototype,Fo0=V90.hasOwnProperty,Z90=V90.toString,w90=Oo0.Symbol,O3=w90?w90.toStringTag:void 0;function No0($){if($==null)return $===void 0?Xo0:Zo0;return O3&&O3 in Object($)?Mo0($):Ao0($)}function Mo0($){var I=Fo0.call($,O3),U=$[O3];try{$[O3]=void 0;var Y=!0}catch(Q){}var J=Z90.call($);if(Y)if(I)$[O3]=U;else delete $[O3];return J}function Ao0($){return Z90.call($)}function Po0($){if(!To0($))return!1;var I=No0($);return I==wo0||I==Vo0||I==Wo0||I==zo0}function To0($){var I=typeof $;return $!=null&&(I=="object"||I=="function")}z90.exports=Po0});var r90=O((qz,DY)=>{var Eo0=200,VC="__lodash_hash_undefined__",Xz=1,B90=2,v90=9007199254740991,Hz="[object Arguments]",QC="[object Array]",Bo0="[object AsyncFunction]",R90="[object Boolean]",j90="[object Date]",C90="[object Error]",_90="[object Function]",vo0="[object GeneratorFunction]",Gz="[object Map]",S90="[object Number]",Ro0="[object Null]",LY="[object Object]",X90="[object Promise]",jo0="[object Proxy]",g90="[object RegExp]",Wz="[object Set]",y90="[object String]",Co0="[object Symbol]",_o0="[object Undefined]",KC="[object WeakMap]",h90="[object ArrayBuffer]",wz="[object DataView]",So0="[object Float32Array]",go0="[object Float64Array]",yo0="[object Int8Array]",ho0="[object Int16Array]",uo0="[object Int32Array]",ko0="[object Uint8Array]",xo0="[object Uint8ClampedArray]",fo0="[object Uint16Array]",io0="[object Uint32Array]",bo0=/[\\^$.*+?()[\]{}|]/g,no0=/^\[object .+?Constructor\]$/,po0=/^(?:0|[1-9]\d*)$/,e1={};e1[So0]=e1[go0]=e1[yo0]=e1[ho0]=e1[uo0]=e1[ko0]=e1[xo0]=e1[fo0]=e1[io0]=!0;e1[Hz]=e1[QC]=e1[h90]=e1[R90]=e1[wz]=e1[j90]=e1[C90]=e1[_90]=e1[Gz]=e1[S90]=e1[LY]=e1[g90]=e1[Wz]=e1[y90]=e1[KC]=!1;var u90=typeof global=="object"&&global&&global.Object===Object&&global,co0=typeof self=="object"&&self&&self.Object===Object&&self,E5=u90||co0||Function("return this")(),k90=typeof qz=="object"&&qz&&!qz.nodeType&&qz,L90=k90&&typeof DY=="object"&&DY&&!DY.nodeType&&DY,x90=L90&&L90.exports===k90,UC=x90&&u90.process,D90=function(){try{return UC&&UC.binding&&UC.binding("util")}catch($){}}(),O90=D90&&D90.isTypedArray;function do0($,I){var U=-1,Y=$==null?0:$.length,J=0,Q=[];while(++U<Y){var K=$[U];if(I(K,U,$))Q[J++]=K}return Q}function mo0($,I){var U=-1,Y=I.length,J=$.length;while(++U<Y)$[J+U]=I[U];return $}function lo0($,I){var U=-1,Y=$==null?0:$.length;while(++U<Y)if(I($[U],U,$))return!0;return!1}function oo0($,I){var U=-1,Y=Array($);while(++U<$)Y[U]=I(U);return Y}function ro0($){return function(I){return $(I)}}function to0($,I){return $.has(I)}function ao0($,I){return $==null?void 0:$[I]}function so0($){var I=-1,U=Array($.size);return $.forEach(function(Y,J){U[++I]=[J,Y]}),U}function eo0($,I){return function(U){return $(I(U))}}function $r0($){var I=-1,U=Array($.size);return $.forEach(function(Y){U[++I]=Y}),U}var Ir0=Array.prototype,Ur0=Function.prototype,Lz=Object.prototype,YC=E5["__core-js_shared__"],f90=Ur0.toString,u8=Lz.hasOwnProperty,F90=function(){var $=/[^.]+$/.exec(YC&&YC.keys&&YC.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),i90=Lz.toString,Yr0=RegExp("^"+f90.call(u8).replace(bo0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N90=x90?E5.Buffer:void 0,Vz=E5.Symbol,M90=E5.Uint8Array,b90=Lz.propertyIsEnumerable,Jr0=Ir0.splice,F3=Vz?Vz.toStringTag:void 0,A90=Object.getOwnPropertySymbols,Qr0=N90?N90.isBuffer:void 0,Kr0=eo0(Object.keys,Object),qC=OY(E5,"DataView"),_K=OY(E5,"Map"),HC=OY(E5,"Promise"),GC=OY(E5,"Set"),WC=OY(E5,"WeakMap"),SK=OY(Object,"create"),qr0=A3(qC),Hr0=A3(_K),Gr0=A3(HC),Wr0=A3(GC),wr0=A3(WC),P90=Vz?Vz.prototype:void 0,JC=P90?P90.valueOf:void 0;function N3($){var I=-1,U=$==null?0:$.length;this.clear();while(++I<U){var Y=$[I];this.set(Y[0],Y[1])}}function Vr0(){this.__data__=SK?SK(null):{},this.size=0}function Zr0($){var I=this.has($)&&delete this.__data__[$];return this.size-=I?1:0,I}function zr0($){var I=this.__data
Line truncated
|
||||
]`;this.ESCAPE_REGEXP=new RegExp(I)}set headers($){this._headers=$}shouldQuote($,I){let U=I?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;if(Nt0.default(U))return U;if(Array.isArray(U))return U[$];if(this._headers!==null)return U[this._headers[$]];return!1}format($,I,U){let Y=`${Mt0.default($)?"":$}`.replace(/\0/g,""),{formatterOptions:J}=this;if(J.quote!==""){if(Y.indexOf(J.quote)!==-1)return this.quoteField(Y.replace(this.REPLACE_REGEXP,J.escapedQuote))}if(Y.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(I,U))return this.quoteField(Y);return Y}quoteField($){let{quote:I}=this.formatterOptions;return`${I}${$}${I}`}}FY.FieldFormatter=J70});var DC=O((Q70)=>{Object.defineProperty(Q70,"__esModule",{value:!0});Q70.isSyncTransform=void 0;Q70.isSyncTransform=($)=>$.length===1});var H70=O((NY)=>{var q70=NY&&NY.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(NY,"__esModule",{value:!0});NY.RowFormatter=void 0;var Pt0=q70(Kz()),Tt0=q70(r90()),Et0=LC(),Bt0=DC();class P3{constructor($){if(this.rowCount=0,this.formatterOptions=$,this.fieldFormatter=new Et0.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(P3.isRowHashArray($))return $.map((I)=>I[0]);if(Array.isArray($))return $;return Object.keys($)}static createTransform($){if(Bt0.isSyncTransform($))return(I,U)=>{let Y=null;try{Y=$(I)}catch(J){return U(J)}return U(null,Y)};return(I,U)=>{$(I,U)}}set rowTransform($){if(!Pt0.default($))throw TypeError("The transform should be a function");this._rowTransform=P3.createTransform($)}format($,I){this.callTransformer($,(U,Y)=>{if(U)return I(U);if(!$)return I(null);let J=[];if(Y){let{shouldFormatColumns:Q,headers:K}=this.checkHeaders(Y);if(this.shouldWriteHeaders&&K&&!this.hasWrittenHeaders)J.push(this.formatColumns(K,!0)),this.hasWrittenHeaders=!0;if(Q){let q=this.gatherColumns(Y);J.push(this.formatColumns(q,!1))}}return I(null,J)})}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=P3.gatherHeaders($);if(this.headers=I,this.fieldFormatter.headers=I,!this.shouldWriteHeaders)return{shouldFormatColumns:!0,headers:null};return{shouldFormatColumns:!Tt0.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(P3.isRowHashArray($))return this.headers.map((I,U)=>{let Y=$[U];if(Y)return Y[1];return""});if(P3.isRowArray($)&&!this.shouldWriteHeaders)return $;return this.headers.map((I,U)=>$[U])}callTransformer($,I){if(!this._rowTransform)return I(null,$);return this._rowTransform($,I)}formatColumns($,I){let U=$.map((J,Q)=>this.fieldFormatter.format(J,Q,I)).join(this.formatterOptions.delimiter),{rowCount:Y}=this;if(this.rowCount+=1,Y)return[this.formatterOptions.rowDelimiter,U].join("");return U}}NY.RowFormatter=P3});var G70=O((Fz)=>{Object.defineProperty(Fz,"__esModule",{value:!0});Fz.FieldFormatter=Fz.RowFormatter=void 0;var vt0=H70();Object.defineProperty(Fz,"RowFormatter",{enumerable:!0,get:function(){return vt0.RowFormatter}});var Rt0=LC();Object.defineProperty(Fz,"FieldFormatter",{enumerable:!0,get:function(){return Rt0.FieldFormatter}})});var OC=O((w70)=>{Object.defineProperty(w70,"__esModule",{value:!0});w70.CsvFormatterStream=void 0;var Ct0=t("stream"),_t0=G70();class W70 extends Ct0.Transform{constructor($){super({writableObjectMode:$.objectMode});this.hasWrittenBOM=!1,this.formatterOptions=$,this.rowFormatter=new _t0.RowFormatter($),this.hasWrittenBOM=!$.writeBOM}transform($){return this.rowFormatter.rowTransform=$,this}_transform($,I,U){let Y=!1;try{if(!this.hasWrittenBOM)this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0;this.rowFormatter.format($,(J,Q)=>{if(J)return Y=!0,U(J);if(Q)Q.forEach((K)=>{this.push(Buffer.from(K,"utf8"))});return Y=!0,U()})}catch(J){if(Y)throw J;U(J)}}_flush($){this.rowFormatter.finish((I,U)=>{if(I)return $(I);if(U)U.forEach((Y)=>{this.push(Buffer.from(Y,"utf8"))});return $()})}}w70.CsvFormatterStream=W70});var z70=O((P1)=>{var Z70=P1&&P1.__createBinding||(Object.create?function($,I,U,Y){if(Y===void 0)Y=U;Object.defineProperty($,Y,{enumerable:!0,get:function(){return I[U]}})}:function($,I,U,Y){if(Y===void 0)Y=U;$[Y]=I[U]}),St0=P1&&P1.__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}}X30.Token=z30});var bC=O((F30)=>{Object.defineProperty(F30,"__esModule",{value:!0});F30.Scanner=void 0;var D30=r9(),be0=/((?:\r\n)|\n|\r)/;class O30{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 U=I.exec($);if(U==null)return null;let Y=U[1],J=this.cursor+(U.index||0);return new D30.Token({token:Y,startCursor:J,endCursor:J+Y.length-1})}get nextCharacterToken(){let{cursor:$,lineLength:I}=this;if(I<=$)return null;return new D30.Token({token:this.line[$],startCursor:$,endCursor:$})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){let $=be0.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}}F30.Scanner=O30});var iz=O((A30)=>{Object.defineProperty(A30,"__esModule",{value:!0});A30.ColumnFormatter=void 0;class M30{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}}A30.ColumnFormatter=M30});var iC=O((B30)=>{Object.defineProperty(B30,"__esModule",{value:!0});B30.NonQuotedColumnParser=void 0;var ie0=iz(),T30=r9();class E30{constructor($){this.parserOptions=$,this.columnFormatter=new ie0.ColumnFormatter($)}parse($){if(!$.hasMoreCharacters)return null;let{parserOptions:I}=this,U=[],Y=$.nextCharacterToken;for(;Y;Y=$.nextCharacterToken){if(T30.Token.isTokenDelimiter(Y,I)||T30.Token.isTokenRowDelimiter(Y))break;U.push(Y.token),$.advancePastToken(Y)}return this.columnFormatter.format(U.join(""))}}B30.NonQuotedColumnParser=E30});var nC=O((j30)=>{Object.defineProperty(j30,"__esModule",{value:!0});j30.QuotedColumnParser=void 0;var ne0=iz(),jY=r9();class R30{constructor($){this.parserOptions=$,this.columnFormatter=new ne0.ColumnFormatter($)}parse($){if(!$.hasMoreCharacters)return null;let I=$.cursor,{foundClosingQuote:U,col:Y}=this.gatherDataBetweenQuotes($);if(!U){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($),Y}gatherDataBetweenQuotes($){let{parserOptions:I}=this,U=!1,Y=!1,J=[],Q=$.nextCharacterToken;for(;!Y&&Q!==null;Q=$.nextCharacterToken){let K=jY.Token.isTokenQuote(Q,I);if(!U&&K)U=!0;else if(U)if(jY.Token.isTokenEscapeCharacter(Q,I)){$.advancePastToken(Q);let q=$.nextCharacterToken;if(q!==null&&(jY.Token.isTokenQuote(q,I)||jY.Token.isTokenEscapeCharacter(q,I)))J.push(q.token),Q=q;else if(K)Y=!0;else J.push(Q.token)}else if(K)Y=!0;else J.push(Q.token);$.advancePastToken(Q)}return{col:this.columnFormatter.format(J.join("")),foundClosingQuote:Y}}checkForMalformedColumn($){let{parserOptions:I}=this,{nextNonSpaceToken:U}=$;if(U){let Y=jY.Token.isTokenDelimiter(U,I),J=jY.Token.isTokenRowDelimiter(U);if(!(Y||J)){let Q=$.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw Error(`Parse Error: expected: '${I.escapedDelimiter}' OR new line got: '${U.token}'. at '${Q}`)}$.advanceToToken(U)}else if(!$.hasMoreData)$.advancePastLine()}}j30.QuotedColumnParser=R30});var y30=O((S30)=>{Object.defineProperty(S30,"__esModule",{value:!0});S30.ColumnParser=void 0;var pe0=iC(),ce0=nC(),de0=r9();class _30{constructor($){this.parserOptions=$,this.quotedColumnParser=new ce0.QuotedColumnParser($),this.nonQuotedColumnParser=new pe0.NonQuotedColumnParser($)}parse($){let{nextNonSpaceToken:I}=$;if(I!==null&&de0.Token.isTokenQuote(I,this.parserOptions))return $.advanceToToken(I),this.quotedColumnParser.parse($);return this.nonQuotedColumnParser.parse($)}}S30.ColumnParser=_30});var pC=O((CY)=>{Object.defineProperty(CY,"__esModule",{value:!0});CY.ColumnFormatter=CY.QuotedColumnParser=CY.NonQuotedColumnParser=CY.ColumnParser=void 0;var me0=y30();Object.defineProperty(CY,"ColumnParser",{enumerable:!0,get:function(){return me0.ColumnParser}});var le0=iC();Object.defineProperty(CY,"NonQuotedColumnParser",{enumerable:!0,get:function(){return le0.NonQuotedColumnParser}});var oe0=nC();Object.defineProperty(CY,"QuotedColumnParser",{enumerable:!0,get:function(){re
Line truncated
|
||||
%s`,k,k,V,Y);let y=V.type==="*"?Q_:V.type==="?"?H_:"\\"+V.type;J=!0,Y=Y.slice(0,V.reStart)+y+"\\("+k}if(E(),Q)Y+="\\\\";let A=f01[Y.charAt(0)];for(let k=q.length-1;k>-1;k--){let y=q[k],f=Y.slice(0,y.reStart),j=Y.slice(y.reStart,y.reEnd-8),p=Y.slice(y.reEnd),n=Y.slice(y.reEnd-8,y.reEnd)+p,S=f.split(")").length,b=f.split("(").length-S,i=p;for(let B=0;B<b;B++)i=i.replace(/\)[+*?]?/,"");p=i;let U0=p===""&&I!==K_?"(?:$|\\/)":"";Y=f+j+p+U0+n}if(Y!==""&&J)Y="(?=.)"+Y;if(A)Y=F()+Y;if(I===K_)return[Y,J];if(U.nocase&&!J)J=$.toUpperCase()!==$.toLowerCase();if(!J)return i01($);let R=U.nocase?"i":"";try{return Object.assign(new RegExp("^"+Y+"$",R),{_glob:$,_src:Y})}catch(k){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,U=I.noglobstar?Q_:I.dot?x01:k01,Y=I.nocase?"i":"",J=$.map((Q)=>{return Q=Q.map((K)=>typeof K==="string"?p01(K):K===y6?y6:K._src).reduce((K,q)=>{if(!(K[K.length-1]===y6&&q===y6))K.push(q);return K},[]),Q.forEach((K,q)=>{if(K!==y6||Q[q-1]===y6)return;if(q===0)if(Q.length>1)Q[q+1]="(?:\\/|"+U+"\\/)?"+Q[q+1];else Q[q]=U;else if(q===Q.length-1)Q[q-1]+="(?:\\/|"+U+")?";else Q[q-1]+="(?:\\/|\\/"+U+"\\/)"+Q[q+1],Q[q+1]=y6}),Q.filter((K)=>K!==y6).join("/")}).join("|");if(J="^(?:"+J+")$",this.negate)J="^(?!"+J+").*$";try{this.regexp=new RegExp(J,Y)}catch(Q){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 U=this.options;if(q_.sep!=="/")$=$.split(q_.sep).join("/");$=$.split(BI0),this.debug(this.pattern,"split",$);let Y=this.set;this.debug(this.pattern,"set",Y);let J;for(let Q=$.length-1;Q>=0;Q--)if(J=$[Q],J)break;for(let Q=0;Q<Y.length;Q++){let K=Y[Q],q=$;if(U.matchBase&&K.length===1)q=[J];if(this.matchOne(q,K,I)){if(U.flipNegate)return!0;return!this.negate}}if(U.flipNegate)return!1;return this.negate}static defaults($){return V$.defaults($).Minimatch}}V$.Minimatch=bK});var yI0=O((tv1,gI0)=>{gI0.exports=SI0;var w_=t("fs"),{EventEmitter:d01}=t("events"),{Minimatch:W_}=jI0(),{resolve:m01}=t("path");function l01($,I){return new Promise((U,Y)=>{w_.readdir($,{withFileTypes:!0},(J,Q)=>{if(J)switch(J.code){case"ENOTDIR":if(I)Y(J);else U([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":U([]);break;case"ELOOP":default:Y(J);break}else U(Q)})})}function CI0($,I){return new Promise((U,Y)=>{(I?w_.stat:w_.lstat)($,(Q,K)=>{if(Q)switch(Q.code){case"ENOENT":if(I)U(CI0($,!1));else U(null);break;default:U(null);break}else U(K)})})}async function*_I0($,I,U,Y,J,Q){let K=await l01(I+$,Q);for(let q of K){let H=q.name;if(H===void 0)H=q,Y=!0;let G=$+"/"+H,W=G.slice(1),w=I+"/"+W,Z=null;if(Y||U)Z=await CI0(w,U);if(!Z&&q.name!==void 0)Z=q;if(Z===null)Z={isDirectory:()=>!1};if(Z.isDirectory()){if(!J(W))yield{relative:W,absolute:w,stats:Z},yield*_I0(G,I,U,Y,J,!1)}else yield{relative:W,absolute:w,stats:Z}}}async function*o01($,I,U,Y){yield*_I0("",$,I,U,Y,!0)}function r01($){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 V_ extends d01{constructor($,I,U){super();if(typeof I==="function")U=I,I=null;if(this.options=r01(I||{}),this.matchers=[],this.options.pattern){let Y=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=Y.map((J)=>new W_(J,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let Y=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=Y.map((J)=>new W_(J,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let Y=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=Y.map((J)=>new W_(J,{dot:!0}))}if(this.iterator=o01(m01($||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,U)this._matches=[],this.on("match",(Y)=>this._matches.push(this.options.absolute?Y.absolute:Y.relative)),this.on("error",(Y)=>U(Y)),this.on("end",()=>U(null,this._matches));setTimeout(()=>this._next(),0)}_shouldSkipDirectory($){return this.skipMatchers.some((I)=>I.match($))}_fileMatches($,I){let U=$+(I?"/":"");return(this.matchers.length===0||this.matchers.some((Y)=>Y.match(U)))&&!this.ignoreMatchers.some((Y)=>Y.match(U))&&(!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 U=$.value.relative,Y=$.value.absolute;if(this.options.mark&&I)U+="/",Y+="/";if(this.options.stat)this.emit("match",{relative:U,absolute:Y,stat:$.value.stats});else this.emit("match",{relative:U,ab
Line truncated
|
||||
`,h);h=$0===-1?T.length:$0}else if(d!==-1&&T[h]==="/"&&T[h+1]==="*"){let $0=T.indexOf("*/",h);if($0!==-1)h=$0+2,d=T.indexOf("*/",h);else v+=T[h],h++}else v+=T[h],h++;return v}function F$(T){let v=P6(T.toString()),h=v.match(b4);if(!h)h=v.match(f6);if(!h)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}}X30.Token=z30});var nC=O((F30)=>{Object.defineProperty(F30,"__esModule",{value:!0});F30.Scanner=void 0;var D30=r9(),ie0=/((?:\r\n)|\n|\r)/;class O30{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 U=I.exec($);if(U==null)return null;let Y=U[1],J=this.cursor+(U.index||0);return new D30.Token({token:Y,startCursor:J,endCursor:J+Y.length-1})}get nextCharacterToken(){let{cursor:$,lineLength:I}=this;if(I<=$)return null;return new D30.Token({token:this.line[$],startCursor:$,endCursor:$})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){let $=ie0.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}}F30.Scanner=O30});var nz=O((A30)=>{Object.defineProperty(A30,"__esModule",{value:!0});A30.ColumnFormatter=void 0;class M30{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}}A30.ColumnFormatter=M30});var pC=O((B30)=>{Object.defineProperty(B30,"__esModule",{value:!0});B30.NonQuotedColumnParser=void 0;var be0=nz(),T30=r9();class E30{constructor($){this.parserOptions=$,this.columnFormatter=new be0.ColumnFormatter($)}parse($){if(!$.hasMoreCharacters)return null;let{parserOptions:I}=this,U=[],Y=$.nextCharacterToken;for(;Y;Y=$.nextCharacterToken){if(T30.Token.isTokenDelimiter(Y,I)||T30.Token.isTokenRowDelimiter(Y))break;U.push(Y.token),$.advancePastToken(Y)}return this.columnFormatter.format(U.join(""))}}B30.NonQuotedColumnParser=E30});var cC=O((j30)=>{Object.defineProperty(j30,"__esModule",{value:!0});j30.QuotedColumnParser=void 0;var ne0=nz(),_Y=r9();class R30{constructor($){this.parserOptions=$,this.columnFormatter=new ne0.ColumnFormatter($)}parse($){if(!$.hasMoreCharacters)return null;let I=$.cursor,{foundClosingQuote:U,col:Y}=this.gatherDataBetweenQuotes($);if(!U){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($),Y}gatherDataBetweenQuotes($){let{parserOptions:I}=this,U=!1,Y=!1,J=[],Q=$.nextCharacterToken;for(;!Y&&Q!==null;Q=$.nextCharacterToken){let K=_Y.Token.isTokenQuote(Q,I);if(!U&&K)U=!0;else if(U)if(_Y.Token.isTokenEscapeCharacter(Q,I)){$.advancePastToken(Q);let q=$.nextCharacterToken;if(q!==null&&(_Y.Token.isTokenQuote(q,I)||_Y.Token.isTokenEscapeCharacter(q,I)))J.push(q.token),Q=q;else if(K)Y=!0;else J.push(Q.token)}else if(K)Y=!0;else J.push(Q.token);$.advancePastToken(Q)}return{col:this.columnFormatter.format(J.join("")),foundClosingQuote:Y}}checkForMalformedColumn($){let{parserOptions:I}=this,{nextNonSpaceToken:U}=$;if(U){let Y=_Y.Token.isTokenDelimiter(U,I),J=_Y.Token.isTokenRowDelimiter(U);if(!(Y||J)){let Q=$.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw Error(`Parse Error: expected: '${I.escapedDelimiter}' OR new line got: '${U.token}'. at '${Q}`)}$.advanceToToken(U)}else if(!$.hasMoreData)$.advancePastLine()}}j30.QuotedColumnParser=R30});var y30=O((S30)=>{Object.defineProperty(S30,"__esModule",{value:!0});S30.ColumnParser=void 0;var pe0=pC(),ce0=cC(),de0=r9();class _30{constructor($){this.parserOptions=$,this.quotedColumnParser=new ce0.QuotedColumnParser($),this.nonQuotedColumnParser=new pe0.NonQuotedColumnParser($)}parse($){let{nextNonSpaceToken:I}=$;if(I!==null&&de0.Token.isTokenQuote(I,this.parserOptions))return $.advanceToToken(I),this.quotedColumnParser.parse($);return this.nonQuotedColumnParser.parse($)}}S30.ColumnParser=_30});var dC=O((SY)=>{Object.defineProperty(SY,"__esModule",{value:!0});SY.ColumnFormatter=SY.QuotedColumnParser=SY.NonQuotedColumnParser=SY.ColumnParser=void 0;var me0=y30();Object.defineProperty(SY,"ColumnParser",{enumerable:!0,get:function(){return me0.ColumnParser}});var le0=pC();Object.defineProperty(SY,"NonQuotedColumnParser",{enumerable:!0,get:function(){return le0.NonQuotedColumnParser}});var oe0=cC();Object.defineProperty(SY,"QuotedColumnParser",{enumerable:!0,get:function(){re
Line truncated
|
||||
%s`,x,x,V,Y);let y=V.type==="*"?q_:V.type==="?"?W_:"\\"+V.type;J=!0,Y=Y.slice(0,V.reStart)+y+"\\("+x}if(T(),Q)Y+="\\\\";let A=f01[Y.charAt(0)];for(let x=q.length-1;x>-1;x--){let y=q[x],f=Y.slice(0,y.reStart),j=Y.slice(y.reStart,y.reEnd-8),p=Y.slice(y.reEnd),n=Y.slice(y.reEnd-8,y.reEnd)+p,S=f.split(")").length,i=f.split("(").length-S,b=p;for(let B=0;B<i;B++)b=b.replace(/\)[+*?]?/,"");p=b;let U0=p===""&&I!==H_?"(?:$|\\/)":"";Y=f+j+p+U0+n}if(Y!==""&&J)Y="(?=.)"+Y;if(A)Y=F()+Y;if(I===H_)return[Y,J];if(U.nocase&&!J)J=$.toUpperCase()!==$.toLowerCase();if(!J)return b01($);let R=U.nocase?"i":"";try{return Object.assign(new RegExp("^"+Y+"$",R),{_glob:$,_src:Y})}catch(x){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,U=I.noglobstar?q_:I.dot?k01:x01,Y=I.nocase?"i":"",J=$.map((Q)=>{return Q=Q.map((K)=>typeof K==="string"?p01(K):K===y6?y6:K._src).reduce((K,q)=>{if(!(K[K.length-1]===y6&&q===y6))K.push(q);return K},[]),Q.forEach((K,q)=>{if(K!==y6||Q[q-1]===y6)return;if(q===0)if(Q.length>1)Q[q+1]="(?:\\/|"+U+"\\/)?"+Q[q+1];else Q[q]=U;else if(q===Q.length-1)Q[q-1]+="(?:\\/|"+U+")?";else Q[q-1]+="(?:\\/|\\/"+U+"\\/)"+Q[q+1],Q[q+1]=y6}),Q.filter((K)=>K!==y6).join("/")}).join("|");if(J="^(?:"+J+")$",this.negate)J="^(?!"+J+").*$";try{this.regexp=new RegExp(J,Y)}catch(Q){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 U=this.options;if(G_.sep!=="/")$=$.split(G_.sep).join("/");$=$.split(BI0),this.debug(this.pattern,"split",$);let Y=this.set;this.debug(this.pattern,"set",Y);let J;for(let Q=$.length-1;Q>=0;Q--)if(J=$[Q],J)break;for(let Q=0;Q<Y.length;Q++){let K=Y[Q],q=$;if(U.matchBase&&K.length===1)q=[J];if(this.matchOne(q,K,I)){if(U.flipNegate)return!0;return!this.negate}}if(U.flipNegate)return!1;return this.negate}static defaults($){return Z$.defaults($).Minimatch}}Z$.Minimatch=iK});var yI0=O((av1,gI0)=>{gI0.exports=SI0;var Z_=t("fs"),{EventEmitter:d01}=t("events"),{Minimatch:V_}=jI0(),{resolve:m01}=t("path");function l01($,I){return new Promise((U,Y)=>{Z_.readdir($,{withFileTypes:!0},(J,Q)=>{if(J)switch(J.code){case"ENOTDIR":if(I)Y(J);else U([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":U([]);break;case"ELOOP":default:Y(J);break}else U(Q)})})}function CI0($,I){return new Promise((U,Y)=>{(I?Z_.stat:Z_.lstat)($,(Q,K)=>{if(Q)switch(Q.code){case"ENOENT":if(I)U(CI0($,!1));else U(null);break;default:U(null);break}else U(K)})})}async function*_I0($,I,U,Y,J,Q){let K=await l01(I+$,Q);for(let q of K){let H=q.name;if(H===void 0)H=q,Y=!0;let G=$+"/"+H,W=G.slice(1),w=I+"/"+W,Z=null;if(Y||U)Z=await CI0(w,U);if(!Z&&q.name!==void 0)Z=q;if(Z===null)Z={isDirectory:()=>!1};if(Z.isDirectory()){if(!J(W))yield{relative:W,absolute:w,stats:Z},yield*_I0(G,I,U,Y,J,!1)}else yield{relative:W,absolute:w,stats:Z}}}async function*o01($,I,U,Y){yield*_I0("",$,I,U,Y,!0)}function r01($){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 z_ extends d01{constructor($,I,U){super();if(typeof I==="function")U=I,I=null;if(this.options=r01(I||{}),this.matchers=[],this.options.pattern){let Y=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=Y.map((J)=>new V_(J,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let Y=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=Y.map((J)=>new V_(J,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let Y=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=Y.map((J)=>new V_(J,{dot:!0}))}if(this.iterator=o01(m01($||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,U)this._matches=[],this.on("match",(Y)=>this._matches.push(this.options.absolute?Y.absolute:Y.relative)),this.on("error",(Y)=>U(Y)),this.on("end",()=>U(null,this._matches));setTimeout(()=>this._next(),0)}_shouldSkipDirectory($){return this.skipMatchers.some((I)=>I.match($))}_fileMatches($,I){let U=$+(I?"/":"");return(this.matchers.length===0||this.matchers.some((Y)=>Y.match(U)))&&!this.ignoreMatchers.some((Y)=>Y.match(U))&&(!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 U=$.value.relative,Y=$.value.absolute;if(this.options.mark&&I)U+="/",Y+="/";if(this.options.stat)this.emit("match",{relative:U,absolute:Y,stat:$.value.stats});else this.emit("match",{relative:U,ab
Line truncated
|
||||
`,h);h=$0===-1?E.length:$0}else if(d!==-1&&E[h]==="/"&&E[h+1]==="*"){let $0=E.indexOf("*/",h);if($0!==-1)h=$0+2,d=E.indexOf("*/",h);else v+=E[h],h++}else v+=E[h],h++;return v}function N$(E){let v=P6(E.toString()),h=v.match(i4);if(!h)h=v.match(f6);if(!h)throw Error(`could not parse args in autoInject
|
||||
Source:
|
||||
`+v);let[,d]=h;return d.replace(/\s/g,"").split(O$).map(($0)=>$0.replace(b6,"").trim())}function Y$(T,v){var h={};return Object.keys(T).forEach((d)=>{var $0=T[d],Y0,H0=V($0),G0=!H0&&$0.length===1||H0&&$0.length===0;if(Array.isArray($0))Y0=[...$0],$0=Y0.pop(),h[d]=Y0.concat(Y0.length>0?z0:$0);else if(G0)h[d]=$0;else{if(Y0=F$($0),$0.length===0&&!H0&&Y0.length===0)throw Error("autoInject task functions require explicit parameters.");if(!H0)Y0.pop();h[d]=Y0.concat(z0)}function z0(S0,G1){var F1=Y0.map((V1)=>S0[V1]);F1.push(G1),D($0)(...F1)}}),O1(h,v)}class T7{constructor(){this.head=this.tail=null,this.length=0}removeLink(T){if(T.prev)T.prev.next=T.next;else this.head=T.next;if(T.next)T.next.prev=T.prev;else this.tail=T.prev;return T.prev=T.next=null,this.length-=1,T}empty(){while(this.head)this.shift();return this}insertAfter(T,v){if(v.prev=T,v.next=T.next,T.next)T.next.prev=v;else this.tail=v;T.next=v,this.length+=1}insertBefore(T,v){if(v.prev=T.prev,v.next=T,T.prev)T.prev.next=v;else this.head=v;T.prev=v,this.length+=1}unshift(T){if(this.head)this.insertBefore(this.head,T);else J$(this,T)}push(T){if(this.tail)this.insertAfter(this.tail,T);else J$(this,T)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){var T=this.head;while(T)yield T.data,T=T.next}remove(T){var v=this.head;while(v){var{next:h}=v;if(T(v))this.removeLink(v);v=h}return this}}function J$(T,v){T.length=1,T.head=T.tail=v}function a5(T,v,h){if(v==null)v=1;else if(v===0)throw RangeError("Concurrency must not be zero");var d=D(T),$0=0,Y0=[];let H0={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function G0(u0,C0){H0[u0].push(C0)}function z0(u0,C0){let x0=(...Z1)=>{S0(u0,x0),C0(...Z1)};H0[u0].push(x0)}function S0(u0,C0){if(!u0)return Object.keys(H0).forEach((x0)=>H0[x0]=[]);if(!C0)return H0[u0]=[];H0[u0]=H0[u0].filter((x0)=>x0!==C0)}function G1(u0,...C0){H0[u0].forEach((x0)=>x0(...C0))}var F1=!1;function V1(u0,C0,x0,Z1){if(Z1!=null&&typeof Z1!=="function")throw Error("task callback must be a function");N1.started=!0;var K4,i4;function M$(B7,...bJ){if(B7)return x0?i4(B7):K4();if(bJ.length<=1)return K4(bJ[0]);K4(bJ)}var OI=N1._createTaskItem(u0,x0?M$:Z1||M$);if(C0)N1._tasks.unshift(OI);else N1._tasks.push(OI);if(!F1)F1=!0,G(()=>{F1=!1,N1.process()});if(x0||!Z1)return new Promise((B7,bJ)=>{K4=B7,i4=bJ})}function N$(u0){return function(C0,...x0){$0-=1;for(var Z1=0,K4=u0.length;Z1<K4;Z1++){var i4=u0[Z1],M$=Y0.indexOf(i4);if(M$===0)Y0.shift();else if(M$>0)Y0.splice(M$,1);if(i4.callback(C0,...x0),C0!=null)G1("error",C0,i4.data)}if($0<=N1.concurrency-N1.buffer)G1("unsaturated");if(N1.idle())G1("drain");N1.process()}}function DI(u0){if(u0.length===0&&N1.idle())return G(()=>G1("drain")),!0;return!1}let E7=(u0)=>(C0)=>{if(!C0)return new Promise((x0,Z1)=>{z0(u0,(K4,i4)=>{if(K4)return Z1(K4);x0(i4)})});S0(u0),G0(u0,C0)};var fJ=!1,N1={_tasks:new T7,_createTaskItem(u0,C0){return{data:u0,callback:C0}},*[Symbol.iterator](){yield*N1._tasks[Symbol.iterator]()},concurrency:v,payload:h,buffer:v/4,started:!1,paused:!1,push(u0,C0){if(Array.isArray(u0)){if(DI(u0))return;return u0.map((x0)=>V1(x0,!1,!1,C0))}return V1(u0,!1,!1,C0)},pushAsync(u0,C0){if(Array.isArray(u0)){if(DI(u0))return;return u0.map((x0)=>V1(x0,!1,!0,C0))}return V1(u0,!1,!0,C0)},kill(){S0(),N1._tasks.empty()},unshift(u0,C0){if(Array.isArray(u0)){if(DI(u0))return;return u0.map((x0)=>V1(x0,!0,!1,C0))}return V1(u0,!0,!1,C0)},unshiftAsync(u0,C0){if(Array.isArray(u0)){if(DI(u0))return;return u0.map((x0)=>V1(x0,!0,!0,C0))}return V1(u0,!0,!0,C0)},remove(u0){N1._tasks.remove(u0)},process(){if(fJ)return;fJ=!0;while(!N1.paused&&$0<N1.concurrency&&N1._tasks.length){var u0=[],C0=[],x0=N1._tasks.length;if(N1.payload)x0=Math.min(x0,N1.payload);for(var Z1=0;Z1<x0;Z1++){var K4=N1._tasks.shift();u0.push(K4),Y0.push(K4),C0.push(K4.data)}if($0+=1,N1._tasks.length===0)G1("empty");if($0===N1.concurrency)G1("saturated");var i4=S(N$(u0));d(C0,i4)}fJ=!1},length(){return N1._tasks.length},running(){return $0},workersList(){return Y0},idle(){return N1._tasks.length+$0===0},pause(){N1.paused=!0},resume(){if(N1.paused===!1)return;N1.paused=!1,G(N1.process)}};return Object.defineProperties(N1,{saturated:{writable:!1,value:E7("saturated")},unsaturated:{writable:!1,value:E7("unsaturated")},empty:{writable:!1,value:E7("empty")},drain:{writable:!1,value:E7("drain")},error:{writable:!1,value:E7("error")}}),N1}function v0(T,v){return a5(T,1,v)}function a(T,v,h){return a5(T,v,h)}function N(T,v,h,d){d=k(d);var $0=D(h);return k0(T,(Y0,H0,G0)=>{$0(v,Y0,(z0,S0)=>{v=S0,G0(z0)})},(Y0)=>d(Y0,v))}var M=F(N,4);function C(...T){var v=T.map(D);return function(...h){var d=this,$0=h[h.length-1];if(typeof $0=="function")h.pop();else $0=U1();return M(v,h,(Y0,H0,G0)=>{H0.apply(d,Y0.concat((z0,...S0)=>{G0(z0,S0)}))},(Y0,H0)=>$0(Y0,...H0)),$0[R0]}}function u(...T){return C(...T.reverse())}function s(T,v,h,d){return E(i(v),T,h,d)}var m=F(s,4);function e(
Line truncated
|
||||
GFS4: `),console.error($)};if(!Z4[Q6]){if(Z_=global[Q6]||[],dI0(Z4,Z_),Z4.close=function($){function I(U,Y){return $.call(Z4,U,function(J){if(!J)cI0();if(typeof Y==="function")Y.apply(this,arguments)})}return Object.defineProperty(I,az,{value:$}),I}(Z4.close),Z4.closeSync=function($){function I(U){$.apply(Z4,arguments),cI0()}return Object.defineProperty(I,az,{value:$}),I}(Z4.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){v3(Z4[Q6]),t("assert").equal(Z4[Q6].length,0)})}var Z_;if(!global[Q6])dI0(global,Z4[Q6]);L_.exports=z_(J11(Z4));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Z4.__patched)L_.exports=z_(Z4),Z4.__patched=!0;function z_($){U11($),$.gracefulify=z_,$.createReadStream=R,$.createWriteStream=k;var I=$.readFile;$.readFile=U;function U(j,p,n){if(typeof p==="function")n=p,p=null;return S(j,p,n);function S(b,i,U0,B){return I(b,i,function(x){if(x&&(x.code==="EMFILE"||x.code==="ENFILE"))gY([S,[b,i,U0],x,B||Date.now(),Date.now()]);else if(typeof U0==="function")U0.apply(this,arguments)})}}var Y=$.writeFile;$.writeFile=J;function J(j,p,n,S){if(typeof n==="function")S=n,n=null;return b(j,p,n,S);function b(i,U0,B,x,c){return Y(i,U0,B,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))gY([b,[i,U0,B,x],r,c||Date.now(),Date.now()]);else if(typeof x==="function")x.apply(this,arguments)})}}var Q=$.appendFile;if(Q)$.appendFile=K;function K(j,p,n,S){if(typeof n==="function")S=n,n=null;return b(j,p,n,S);function b(i,U0,B,x,c){return Q(i,U0,B,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))gY([b,[i,U0,B,x],r,c||Date.now(),Date.now()]);else if(typeof x==="function")x.apply(this,arguments)})}}var q=$.copyFile;if(q)$.copyFile=H;function H(j,p,n,S){if(typeof n==="function")S=n,n=0;return b(j,p,n,S);function b(i,U0,B,x,c){return q(i,U0,B,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))gY([b,[i,U0,B,x],r,c||Date.now(),Date.now()]);else if(typeof x==="function")x.apply(this,arguments)})}}var G=$.readdir;$.readdir=w;var W=/^v[0-5]\./;function w(j,p,n){if(typeof p==="function")n=p,p=null;var S=W.test(process.version)?function(U0,B,x,c){return G(U0,b(U0,B,x,c))}:function(U0,B,x,c){return G(U0,B,b(U0,B,x,c))};return S(j,p,n);function b(i,U0,B,x){return function(c,r){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))gY([S,[i,U0,B],c,x||Date.now(),Date.now()]);else{if(r&&r.sort)r.sort();if(typeof B==="function")B.call(this,c,r)}}}}if(process.version.substr(0,4)==="v0.8"){var Z=Y11($);F=Z.ReadStream,E=Z.WriteStream}var V=$.ReadStream;if(V)F.prototype=Object.create(V.prototype),F.prototype.open=P;var X=$.WriteStream;if(X)E.prototype=Object.create(X.prototype),E.prototype.open=A;Object.defineProperty($,"ReadStream",{get:function(){return F},set:function(j){F=j},enumerable:!0,configurable:!0}),Object.defineProperty($,"WriteStream",{get:function(){return E},set:function(j){E=j},enumerable:!0,configurable:!0});var L=F;Object.defineProperty($,"FileReadStream",{get:function(){return L},set:function(j){L=j},enumerable:!0,configurable:!0});var D=E;Object.defineProperty($,"FileWriteStream",{get:function(){return D},set:function(j){D=j},enumerable:!0,configurable:!0});function F(j,p){if(this instanceof F)return V.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function P(){var j=this;f(j.path,j.flags,j.mode,function(p,n){if(p){if(j.autoClose)j.destroy();j.emit("error",p)}else j.fd=n,j.emit("open",n),j.read()})}function E(j,p){if(this instanceof E)return X.apply(this,arguments),this;else return E.apply(Object.create(E.prototype),arguments)}function A(){var j=this;f(j.path,j.flags,j.mode,function(p,n){if(p)j.destroy(),j.emit("error",p);else j.fd=n,j.emit("open",n)})}function R(j,p){return new $.ReadStream(j,p)}function k(j,p){return new $.WriteStream(j,p)}var y=$.open;$.open=f;function f(j,p,n,S){if(typeof n==="function")S=n,n=null;return b(j,p,n,S);function b(i,U0,B,x,c){return y(i,U0,B,function(r,J0){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))gY([b,[i,U0,B,x],r,c||Date.now(),Date.now()]);else if(typeof x==="function")x.apply(this,arguments)})}}return $}function gY($){v3("ENQUEUE",$[0].name,$[1]),Z4[Q6].push($),X_()}var tz;function cI0(){var $=Date.now();for(var I=0;I<Z4[Q6].length;++I)if(Z4[Q6][I].length>2)Z4[Q6][I][3]=$,Z4[Q6][I][4]=$;X_()}function X_(){if(clearTimeout(tz),tz=void 0,Z4[Q6].length===0)return;var $=Z4[Q6].shift(),I=$[0],U=$[1],Y=$[2],J=$[3],Q=$[4];if(J===void 0)v3("RETRY",I.name,U),I.apply(null,U);else if(Date.now()-J>=60000){v3("TIMEOUT",I.name,U);var K=U.pop();if(typeof K==="function")K.call(null,Y)}else{var q=Date.now()-Q,H=Math.max(Q-J,1),G=Math.min(H*1.2,100);if(q>=G)v3("RETRY",I.name,U),I.apply(null,U.concat([J]));else Z4[Q6].push($)}if(tz===void 0)tz=setTimeout(X_,0)}});var lI0=O((IR1,D_)=>{function K11($,I){if(!($ instanceof I))throw TypeError("Cannot call a class as a function")}var mI0=A4().Buffer,iK=t("util");function q11($,I,U){$.copy(I,U)}D_.exports=function(){function $(){K11(this,$),this.head=null,this.tail=null,th
Line truncated
|
||||
`+v);let[,d]=h;return d.replace(/\s/g,"").split(F$).map(($0)=>$0.replace(i6,"").trim())}function Y$(E,v){var h={};return Object.keys(E).forEach((d)=>{var $0=E[d],Y0,H0=V($0),G0=!H0&&$0.length===1||H0&&$0.length===0;if(Array.isArray($0))Y0=[...$0],$0=Y0.pop(),h[d]=Y0.concat(Y0.length>0?z0:$0);else if(G0)h[d]=$0;else{if(Y0=N$($0),$0.length===0&&!H0&&Y0.length===0)throw Error("autoInject task functions require explicit parameters.");if(!H0)Y0.pop();h[d]=Y0.concat(z0)}function z0(S0,G1){var F1=Y0.map((V1)=>S0[V1]);F1.push(G1),D($0)(...F1)}}),O1(h,v)}class T7{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,v){if(v.prev=E,v.next=E.next,E.next)E.next.prev=v;else this.tail=v;E.next=v,this.length+=1}insertBefore(E,v){if(v.prev=E.prev,v.next=E,E.prev)E.prev.next=v;else this.head=v;E.prev=v,this.length+=1}unshift(E){if(this.head)this.insertBefore(this.head,E);else J$(this,E)}push(E){if(this.tail)this.insertAfter(this.tail,E);else J$(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 v=this.head;while(v){var{next:h}=v;if(E(v))this.removeLink(v);v=h}return this}}function J$(E,v){E.length=1,E.head=E.tail=v}function a5(E,v,h){if(v==null)v=1;else if(v===0)throw RangeError("Concurrency must not be zero");var d=D(E),$0=0,Y0=[];let H0={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function G0(u0,C0){H0[u0].push(C0)}function z0(u0,C0){let k0=(...Z1)=>{S0(u0,k0),C0(...Z1)};H0[u0].push(k0)}function S0(u0,C0){if(!u0)return Object.keys(H0).forEach((k0)=>H0[k0]=[]);if(!C0)return H0[u0]=[];H0[u0]=H0[u0].filter((k0)=>k0!==C0)}function G1(u0,...C0){H0[u0].forEach((k0)=>k0(...C0))}var F1=!1;function V1(u0,C0,k0,Z1){if(Z1!=null&&typeof Z1!=="function")throw Error("task callback must be a function");N1.started=!0;var K4,b4;function A$(B7,...nJ){if(B7)return k0?b4(B7):K4();if(nJ.length<=1)return K4(nJ[0]);K4(nJ)}var OI=N1._createTaskItem(u0,k0?A$:Z1||A$);if(C0)N1._tasks.unshift(OI);else N1._tasks.push(OI);if(!F1)F1=!0,G(()=>{F1=!1,N1.process()});if(k0||!Z1)return new Promise((B7,nJ)=>{K4=B7,b4=nJ})}function M$(u0){return function(C0,...k0){$0-=1;for(var Z1=0,K4=u0.length;Z1<K4;Z1++){var b4=u0[Z1],A$=Y0.indexOf(b4);if(A$===0)Y0.shift();else if(A$>0)Y0.splice(A$,1);if(b4.callback(C0,...k0),C0!=null)G1("error",C0,b4.data)}if($0<=N1.concurrency-N1.buffer)G1("unsaturated");if(N1.idle())G1("drain");N1.process()}}function DI(u0){if(u0.length===0&&N1.idle())return G(()=>G1("drain")),!0;return!1}let E7=(u0)=>(C0)=>{if(!C0)return new Promise((k0,Z1)=>{z0(u0,(K4,b4)=>{if(K4)return Z1(K4);k0(b4)})});S0(u0),G0(u0,C0)};var bJ=!1,N1={_tasks:new T7,_createTaskItem(u0,C0){return{data:u0,callback:C0}},*[Symbol.iterator](){yield*N1._tasks[Symbol.iterator]()},concurrency:v,payload:h,buffer:v/4,started:!1,paused:!1,push(u0,C0){if(Array.isArray(u0)){if(DI(u0))return;return u0.map((k0)=>V1(k0,!1,!1,C0))}return V1(u0,!1,!1,C0)},pushAsync(u0,C0){if(Array.isArray(u0)){if(DI(u0))return;return u0.map((k0)=>V1(k0,!1,!0,C0))}return V1(u0,!1,!0,C0)},kill(){S0(),N1._tasks.empty()},unshift(u0,C0){if(Array.isArray(u0)){if(DI(u0))return;return u0.map((k0)=>V1(k0,!0,!1,C0))}return V1(u0,!0,!1,C0)},unshiftAsync(u0,C0){if(Array.isArray(u0)){if(DI(u0))return;return u0.map((k0)=>V1(k0,!0,!0,C0))}return V1(u0,!0,!0,C0)},remove(u0){N1._tasks.remove(u0)},process(){if(bJ)return;bJ=!0;while(!N1.paused&&$0<N1.concurrency&&N1._tasks.length){var u0=[],C0=[],k0=N1._tasks.length;if(N1.payload)k0=Math.min(k0,N1.payload);for(var Z1=0;Z1<k0;Z1++){var K4=N1._tasks.shift();u0.push(K4),Y0.push(K4),C0.push(K4.data)}if($0+=1,N1._tasks.length===0)G1("empty");if($0===N1.concurrency)G1("saturated");var b4=S(M$(u0));d(C0,b4)}bJ=!1},length(){return N1._tasks.length},running(){return $0},workersList(){return Y0},idle(){return N1._tasks.length+$0===0},pause(){N1.paused=!0},resume(){if(N1.paused===!1)return;N1.paused=!1,G(N1.process)}};return Object.defineProperties(N1,{saturated:{writable:!1,value:E7("saturated")},unsaturated:{writable:!1,value:E7("unsaturated")},empty:{writable:!1,value:E7("empty")},drain:{writable:!1,value:E7("drain")},error:{writable:!1,value:E7("error")}}),N1}function v0(E,v){return a5(E,1,v)}function a(E,v,h){return a5(E,v,h)}function N(E,v,h,d){d=x(d);var $0=D(h);return x0(E,(Y0,H0,G0)=>{$0(v,Y0,(z0,S0)=>{v=S0,G0(z0)})},(Y0)=>d(Y0,v))}var M=F(N,4);function C(...E){var v=E.map(D);return function(...h){var d=this,$0=h[h.length-1];if(typeof $0=="function")h.pop();else $0=U1();return M(v,h,(Y0,H0,G0)=>{H0.apply(d,Y0.concat((z0,...S0)=>{G0(z0,S0)}))},(Y0,H0)=>$0(Y0,...H0)),$0[R0]}}function u(...E){return C(...E.reverse())}function s(E,v,h,d){return T(b(v),E,h,d)}var m=F(s,4);function e(
Line truncated
|
||||
GFS4: `),console.error($)};if(!Z4[Q6]){if(X_=global[Q6]||[],dI0(Z4,X_),Z4.close=function($){function I(U,Y){return $.call(Z4,U,function(J){if(!J)cI0();if(typeof Y==="function")Y.apply(this,arguments)})}return Object.defineProperty(I,sz,{value:$}),I}(Z4.close),Z4.closeSync=function($){function I(U){$.apply(Z4,arguments),cI0()}return Object.defineProperty(I,sz,{value:$}),I}(Z4.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){v3(Z4[Q6]),t("assert").equal(Z4[Q6].length,0)})}var X_;if(!global[Q6])dI0(global,Z4[Q6]);O_.exports=L_(J11(Z4));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Z4.__patched)O_.exports=L_(Z4),Z4.__patched=!0;function L_($){U11($),$.gracefulify=L_,$.createReadStream=R,$.createWriteStream=x;var I=$.readFile;$.readFile=U;function U(j,p,n){if(typeof p==="function")n=p,p=null;return S(j,p,n);function S(i,b,U0,B){return I(i,b,function(k){if(k&&(k.code==="EMFILE"||k.code==="ENFILE"))hY([S,[i,b,U0],k,B||Date.now(),Date.now()]);else if(typeof U0==="function")U0.apply(this,arguments)})}}var Y=$.writeFile;$.writeFile=J;function J(j,p,n,S){if(typeof n==="function")S=n,n=null;return i(j,p,n,S);function i(b,U0,B,k,c){return Y(b,U0,B,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))hY([i,[b,U0,B,k],r,c||Date.now(),Date.now()]);else if(typeof k==="function")k.apply(this,arguments)})}}var Q=$.appendFile;if(Q)$.appendFile=K;function K(j,p,n,S){if(typeof n==="function")S=n,n=null;return i(j,p,n,S);function i(b,U0,B,k,c){return Q(b,U0,B,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))hY([i,[b,U0,B,k],r,c||Date.now(),Date.now()]);else if(typeof k==="function")k.apply(this,arguments)})}}var q=$.copyFile;if(q)$.copyFile=H;function H(j,p,n,S){if(typeof n==="function")S=n,n=0;return i(j,p,n,S);function i(b,U0,B,k,c){return q(b,U0,B,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))hY([i,[b,U0,B,k],r,c||Date.now(),Date.now()]);else if(typeof k==="function")k.apply(this,arguments)})}}var G=$.readdir;$.readdir=w;var W=/^v[0-5]\./;function w(j,p,n){if(typeof p==="function")n=p,p=null;var S=W.test(process.version)?function(U0,B,k,c){return G(U0,i(U0,B,k,c))}:function(U0,B,k,c){return G(U0,B,i(U0,B,k,c))};return S(j,p,n);function i(b,U0,B,k){return function(c,r){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))hY([S,[b,U0,B],c,k||Date.now(),Date.now()]);else{if(r&&r.sort)r.sort();if(typeof B==="function")B.call(this,c,r)}}}}if(process.version.substr(0,4)==="v0.8"){var Z=Y11($);F=Z.ReadStream,T=Z.WriteStream}var V=$.ReadStream;if(V)F.prototype=Object.create(V.prototype),F.prototype.open=P;var X=$.WriteStream;if(X)T.prototype=Object.create(X.prototype),T.prototype.open=A;Object.defineProperty($,"ReadStream",{get:function(){return F},set:function(j){F=j},enumerable:!0,configurable:!0}),Object.defineProperty($,"WriteStream",{get:function(){return T},set:function(j){T=j},enumerable:!0,configurable:!0});var L=F;Object.defineProperty($,"FileReadStream",{get:function(){return L},set:function(j){L=j},enumerable:!0,configurable:!0});var D=T;Object.defineProperty($,"FileWriteStream",{get:function(){return D},set:function(j){D=j},enumerable:!0,configurable:!0});function F(j,p){if(this instanceof F)return V.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function P(){var j=this;f(j.path,j.flags,j.mode,function(p,n){if(p){if(j.autoClose)j.destroy();j.emit("error",p)}else j.fd=n,j.emit("open",n),j.read()})}function T(j,p){if(this instanceof T)return X.apply(this,arguments),this;else return T.apply(Object.create(T.prototype),arguments)}function A(){var j=this;f(j.path,j.flags,j.mode,function(p,n){if(p)j.destroy(),j.emit("error",p);else j.fd=n,j.emit("open",n)})}function R(j,p){return new $.ReadStream(j,p)}function x(j,p){return new $.WriteStream(j,p)}var y=$.open;$.open=f;function f(j,p,n,S){if(typeof n==="function")S=n,n=null;return i(j,p,n,S);function i(b,U0,B,k,c){return y(b,U0,B,function(r,J0){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))hY([i,[b,U0,B,k],r,c||Date.now(),Date.now()]);else if(typeof k==="function")k.apply(this,arguments)})}}return $}function hY($){v3("ENQUEUE",$[0].name,$[1]),Z4[Q6].push($),D_()}var az;function cI0(){var $=Date.now();for(var I=0;I<Z4[Q6].length;++I)if(Z4[Q6][I].length>2)Z4[Q6][I][3]=$,Z4[Q6][I][4]=$;D_()}function D_(){if(clearTimeout(az),az=void 0,Z4[Q6].length===0)return;var $=Z4[Q6].shift(),I=$[0],U=$[1],Y=$[2],J=$[3],Q=$[4];if(J===void 0)v3("RETRY",I.name,U),I.apply(null,U);else if(Date.now()-J>=60000){v3("TIMEOUT",I.name,U);var K=U.pop();if(typeof K==="function")K.call(null,Y)}else{var q=Date.now()-Q,H=Math.max(Q-J,1),G=Math.min(H*1.2,100);if(q>=G)v3("RETRY",I.name,U),I.apply(null,U.concat([J]));else Z4[Q6].push($)}if(az===void 0)az=setTimeout(D_,0)}});var lI0=O((UR1,F_)=>{function K11($,I){if(!($ instanceof I))throw TypeError("Cannot call a class as a function")}var mI0=A4().Buffer,bK=t("util");function q11($,I,U){$.copy(I,U)}F_.exports=function(){function $(){K11(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.
|
||||
*/gU0.exports=function($,I){if(typeof $!=="string")throw TypeError("expected path to be a string");if($==="\\"||$==="/")return"/";var U=$.length;if(U<=1)return $;var Y="";if(U>4&&$[3]==="\\"){var J=$[2];if((J==="?"||J===".")&&$.slice(0,2)==="\\\\")$=$.slice(2),Y="//"}var Q=$.split(/[/\\]+/);if(I!==!1&&Q[Q.length-1]==="")Q.pop();return Y+Q.join("/")}});var x_=O((ZR1,bU0)=>{var hU0=9007199254740991,Z41="[object Arguments]",z41="[object Function]",X41="[object GeneratorFunction]",L41=/^(?:0|[1-9]\d*)$/;function uU0($,I,U){switch(U.length){case 0:return $.call(I);case 1:return $.call(I,U[0]);case 2:return $.call(I,U[0],U[1]);case 3:return $.call(I,U[0],U[1],U[2])}return $.apply(I,U)}function D41($,I){var U=-1,Y=Array($);while(++U<$)Y[U]=I(U);return Y}var tK=Object.prototype,aK=tK.hasOwnProperty,xU0=tK.toString,O41=tK.propertyIsEnumerable,yU0=Math.max;function F41($,I){var U=j41($)||R41($)?D41($.length,String):[],Y=U.length,J=!!Y;for(var Q in $)if((I||aK.call($,Q))&&!(J&&(Q=="length"||fU0(Q,Y))))U.push(Q);return U}function N41($,I,U,Y){if($===void 0||y_($,tK[U])&&!aK.call(Y,U))return I;return $}function M41($,I,U){var Y=$[I];if(!(aK.call($,I)&&y_(Y,U))||U===void 0&&!(I in $))$[I]=U}function A41($){if(!u_($))return v41($);var I=B41($),U=[];for(var Y in $)if(!(Y=="constructor"&&(I||!aK.call($,Y))))U.push(Y);return U}function kU0($,I){return I=yU0(I===void 0?$.length-1:I,0),function(){var U=arguments,Y=-1,J=yU0(U.length-I,0),Q=Array(J);while(++Y<J)Q[Y]=U[I+Y];Y=-1;var K=Array(I+1);while(++Y<I)K[Y]=U[Y];return K[I]=Q,uU0($,this,K)}}function P41($,I,U,Y){U||(U={});var J=-1,Q=I.length;while(++J<Q){var K=I[J],q=Y?Y(U[K],$[K],K,U,$):void 0;M41(U,K,q===void 0?$[K]:q)}return U}function T41($){return kU0(function(I,U){var Y=-1,J=U.length,Q=J>1?U[J-1]:void 0,K=J>2?U[2]:void 0;if(Q=$.length>3&&typeof Q=="function"?(J--,Q):void 0,K&&E41(U[0],U[1],K))Q=J<3?void 0:Q,J=1;I=Object(I);while(++Y<J){var q=U[Y];if(q)$(I,q,Y,Q)}return I})}function fU0($,I){return I=I==null?hU0:I,!!I&&(typeof $=="number"||L41.test($))&&($>-1&&$%1==0&&$<I)}function E41($,I,U){if(!u_(U))return!1;var Y=typeof I;if(Y=="number"?h_(U)&&fU0(I,U.length):Y=="string"&&(I in U))return y_(U[I],$);return!1}function B41($){var I=$&&$.constructor,U=typeof I=="function"&&I.prototype||tK;return $===U}function v41($){var I=[];if($!=null)for(var U in Object($))I.push(U);return I}function y_($,I){return $===I||$!==$&&I!==I}function R41($){return C41($)&&aK.call($,"callee")&&(!O41.call($,"callee")||xU0.call($)==Z41)}var j41=Array.isArray;function h_($){return $!=null&&S41($.length)&&!_41($)}function C41($){return g41($)&&h_($)}function _41($){var I=u_($)?xU0.call($):"";return I==z41||I==X41}function S41($){return typeof $=="number"&&$>-1&&$%1==0&&$<=hU0}function u_($){var I=typeof $;return!!$&&(I=="object"||I=="function")}function g41($){return!!$&&typeof $=="object"}var y41=T41(function($,I,U,Y){P41(I,u41(I),$,Y)}),h41=kU0(function($){return $.push(void 0,N41),uU0(y41,void 0,$)});function u41($){return h_($)?F41($,!0):A41($)}bU0.exports=h41});var nU0=O((zR1,k_)=>{function x41($,I){if(!($ instanceof I))throw TypeError("Cannot call a class as a function")}var iU0=A4().Buffer,sK=t("util");function k41($,I,U){$.copy(I,U)}k_.exports=function(){function $(){x41(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(U){var Y={data:U,next:null};if(this.length>0)this.tail.next=Y;else this.head=Y;this.tail=Y,++this.length},$.prototype.unshift=function(U){var Y={data:U,next:this.head};if(this.length===0)this.tail=Y;this.head=Y,++this.length},$.prototype.shift=function(){if(this.length===0)return;var U=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,U},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(U){if(this.length===0)return"";var Y=this.head,J=""+Y.data;while(Y=Y.next)J+=U+Y.data;return J},$.prototype.concat=function(U){if(this.length===0)return iU0.alloc(0);var Y=iU0.allocUnsafe(U>>>0),J=this.head,Q=0;while(J)k41(J.data,Y,Q),Q+=J.data.length,J=J.next;return Y},$}();if(sK&&sK.inspect&&sK.inspect.custom)k_.exports.prototype[sK.inspect.custom]=function(){var $=sK.inspect({length:this.length});return this.constructor.name+" "+$}});var f_=O((XR1,pU0)=>{var WX=M4();function f41($,I){var U=this,Y=this._readableState&&this._readableState.destroyed,J=this._writableState&&this._writableState.destroyed;if(Y||J){if(I)I($);else if($){if(!this._writableState)WX.nextTick(wX,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,WX.nextTick(wX,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(Q){if(!I&&Q){if(!U._writableState)WX.nextTick(wX,U,Q);else if(!U._writableState.errorEmitted)U._writableState.errorEmitted=!0,WX.nextTick(wX,U,Q)}else if(I)I(Q)}),this}function b41(){if(this._readableState)this._readable
Line truncated
|
||||
%s`,R,R,P,Y);var k=P.type==="*"?PS:P.type==="?"?AS:"\\"+P.type;J=!0,Y=Y.slice(0,P.reStart)+k+"\\("+R}if(X(),Q)Y+="\\\\";var y=!1;switch(Y.charAt(0)){case"[":case".":case"(":y=!0}for(var f=q.length-1;f>-1;f--){var j=q[f],p=Y.slice(0,j.reStart),n=Y.slice(j.reStart,j.reEnd-8),S=Y.slice(j.reEnd-8,j.reEnd),b=Y.slice(j.reEnd);S+=b;var i=p.split("(").length-1,U0=b;for(L=0;L<i;L++)U0=U0.replace(/\)[+*?]?/,"");b=U0;var B="";if(b===""&&I!==vX)B="$";var x=p+n+b+B+S;Y=x}if(Y!==""&&J)Y="(?=.)"+Y;if(y)Y=Z+Y;if(I===vX)return[Y,J];if(!J)return Q91($);var c=U.nocase?"i":"";try{var r=new RegExp("^"+Y+"$",c)}catch(J0){return new RegExp("$.")}return r._glob=$,r._src=Y,r}Z$.makeRe=function($,I){return new R4($,I||{}).makeRe()};R4.prototype.makeRe=J91;function J91(){if(this.regexp||this.regexp===!1)return this.regexp;var $=this.set;if(!$.length)return this.regexp=!1,this.regexp;var I=this.options,U=I.noglobstar?PS:I.dot?t51:a51,Y=I.nocase?"i":"",J=$.map(function(Q){return Q.map(function(K){return K===h3?U:typeof K==="string"?K91(K):K._src}).join("\\/")}).join("|");if(J="^(?:"+J+")$",this.negate)J="^(?!"+J+").*$";try{this.regexp=new RegExp(J,Y)}catch(Q){this.regexp=!1}return this.regexp}Z$.match=function($,I,U){U=U||{};var Y=new R4(I,U);if($=$.filter(function(J){return Y.match(J)}),Y.options.nonull&&!$.length)$.push(I);return $};R4.prototype.match=function(I,U){if(typeof U>"u")U=this.partial;if(this.debug("match",I,this.pattern),this.comment)return!1;if(this.empty)return I==="";if(I==="/"&&U)return!0;var Y=this.options;if(Wq.sep!=="/")I=I.split(Wq.sep).join("/");I=I.split(DJ0),this.debug(this.pattern,"split",I);var J=this.set;this.debug(this.pattern,"set",J);var Q,K;for(K=I.length-1;K>=0;K--)if(Q=I[K],Q)break;for(K=0;K<J.length;K++){var q=J[K],H=I;if(Y.matchBase&&q.length===1)H=[Q];var G=this.matchOne(H,q,U);if(G){if(Y.flipNegate)return!0;return!this.negate}}if(Y.flipNegate)return!1;return this.negate};R4.prototype.matchOne=function($,I,U){if(I.indexOf(h3)!==-1)return this._matchGlobstar($,I,U,0,0);return this._matchOne($,I,U,0,0)};R4.prototype._matchGlobstar=function($,I,U,Y,J){var Q,K=-1;for(Q=J;Q<I.length;Q++)if(I[Q]===h3){K=Q;break}var q=-1;for(Q=I.length-1;Q>=0;Q--)if(I[Q]===h3){q=Q;break}var H=I.slice(J,K),G=U?I.slice(K+1):I.slice(K+1,q),W=U?[]:I.slice(q+1);if(H.length){var w=$.slice(Y,Y+H.length);if(!this._matchOne(w,H,U,0,0))return!1;Y+=H.length}var Z=0;if(W.length){if(W.length+Y>$.length)return!1;var V=$.length-W.length;if(this._matchOne($,W,U,V,0))Z=W.length;else{if($[$.length-1]!==""||Y+W.length===$.length)return!1;if(V--,!this._matchOne($,W,U,V,0))return!1;Z=W.length+1}}if(!G.length){var X=!!Z;for(Q=Y;Q<$.length-Z;Q++){var L=String($[Q]);if(X=!0,L==="."||L===".."||!this.options.dot&&L.charAt(0)===".")return!1}return U||X}var D=[[[],0]],F=D[0],P=0,E=[0];for(var A=0;A<G.length;A++){var R=G[A];if(R===h3)E.push(P),F=[[],0],D.push(F);else F[0].push(R),P++}var k=D.length-1,y=$.length-Z;for(var f=0;f<D.length;f++)D[f][1]=y-(E[k--]+D[f][0].length);return!!this._matchGlobStarBodySections($,D,Y,0,U,0,!!Z)};R4.prototype._matchGlobStarBodySections=function($,I,U,Y,J,Q,K){var q=I[Y];if(!q){for(var H=U;H<$.length;H++){K=!0;var G=$[H];if(G==="."||G===".."||!this.options.dot&&G.charAt(0)===".")return!1}return K}var W=q[0],w=q[1];while(U<=w){var Z=this._matchOne($.slice(0,U+W.length),W,J,U,0);if(Z&&Q<this.maxGlobstarRecursion){var V=this._matchGlobStarBodySections($,I,U+W.length,Y+1,J,Q+1,K);if(V!==!1)return V}var G=$[U];if(G==="."||G===".."||!this.options.dot&&G.charAt(0)===".")return!1;U++}return J||null};R4.prototype._matchOne=function($,I,U,Y,J){var Q,K,q,H;for(Q=Y,K=J,q=$.length,H=I.length;Q<q&&K<H;Q++,K++){this.debug("matchOne loop");var G=I[K],W=$[Q];if(this.debug(I,G,W),G===!1||G===h3)return!1;var w;if(typeof G==="string")w=W===G,this.debug("string match",G,W,w);else w=W.match(G),this.debug("pattern match",G,W,w);if(!w)return!1}if(Q===q&&K===H)return!0;else if(Q===q)return U;else if(K===H)return Q===q-1&&$[Q]==="";throw Error("wtf?")};function Q91($){return $.replace(/\\(.)/g,"$1")}function K91($){return $.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var _X=O((yR1,CX)=>{function NJ0($){return $.charAt(0)==="/"}function MJ0($){var I=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,U=I.exec($),Y=U[1]||"",J=Boolean(Y&&Y.charAt(1)!==":");return Boolean(U[2]||J)}CX.exports=process.platform==="win32"?MJ0:NJ0;CX.exports.posix=NJ0;CX.exports.win32=MJ0});var ES=O((L91)=>{L91.setopts=V91;L91.ownProp=AJ0;L91.makeAbs=wq;L91.finish=Z91;L91.mark=z91;L91.isIgnored=TJ0;L91.childrenIgnored=X91;function AJ0($,I){return Object.prototype.hasOwnProperty.call($,I)}var q91=t("fs"),mY=t("path"),H91=jX(),PJ0=_X(),TS=H91.Minimatch;function G91($,I){return $.localeCompare(I,"en")}function W91($,I){if($.ignore=I.ignore||[],!Array.isArray($.ignore))$.ignore=[$.ignore];if($.ignore.length)$.ignore=$.ignore.map(w91)}function w91($){var I=null;if($.slice(-3)==="/**"){var U=$.replace(/(\/\*\*)+$/,"");I=new TS(U,{dot:!0})}return{matcher
Line truncated
|
||||
*/gU0.exports=function($,I){if(typeof $!=="string")throw TypeError("expected path to be a string");if($==="\\"||$==="/")return"/";var U=$.length;if(U<=1)return $;var Y="";if(U>4&&$[3]==="\\"){var J=$[2];if((J==="?"||J===".")&&$.slice(0,2)==="\\\\")$=$.slice(2),Y="//"}var Q=$.split(/[/\\]+/);if(I!==!1&&Q[Q.length-1]==="")Q.pop();return Y+Q.join("/")}});var f_=O((zR1,iU0)=>{var hU0=9007199254740991,Z41="[object Arguments]",z41="[object Function]",X41="[object GeneratorFunction]",L41=/^(?:0|[1-9]\d*)$/;function uU0($,I,U){switch(U.length){case 0:return $.call(I);case 1:return $.call(I,U[0]);case 2:return $.call(I,U[0],U[1]);case 3:return $.call(I,U[0],U[1],U[2])}return $.apply(I,U)}function D41($,I){var U=-1,Y=Array($);while(++U<$)Y[U]=I(U);return Y}var tK=Object.prototype,aK=tK.hasOwnProperty,kU0=tK.toString,O41=tK.propertyIsEnumerable,yU0=Math.max;function F41($,I){var U=j41($)||R41($)?D41($.length,String):[],Y=U.length,J=!!Y;for(var Q in $)if((I||aK.call($,Q))&&!(J&&(Q=="length"||fU0(Q,Y))))U.push(Q);return U}function N41($,I,U,Y){if($===void 0||u_($,tK[U])&&!aK.call(Y,U))return I;return $}function M41($,I,U){var Y=$[I];if(!(aK.call($,I)&&u_(Y,U))||U===void 0&&!(I in $))$[I]=U}function A41($){if(!x_($))return v41($);var I=B41($),U=[];for(var Y in $)if(!(Y=="constructor"&&(I||!aK.call($,Y))))U.push(Y);return U}function xU0($,I){return I=yU0(I===void 0?$.length-1:I,0),function(){var U=arguments,Y=-1,J=yU0(U.length-I,0),Q=Array(J);while(++Y<J)Q[Y]=U[I+Y];Y=-1;var K=Array(I+1);while(++Y<I)K[Y]=U[Y];return K[I]=Q,uU0($,this,K)}}function P41($,I,U,Y){U||(U={});var J=-1,Q=I.length;while(++J<Q){var K=I[J],q=Y?Y(U[K],$[K],K,U,$):void 0;M41(U,K,q===void 0?$[K]:q)}return U}function T41($){return xU0(function(I,U){var Y=-1,J=U.length,Q=J>1?U[J-1]:void 0,K=J>2?U[2]:void 0;if(Q=$.length>3&&typeof Q=="function"?(J--,Q):void 0,K&&E41(U[0],U[1],K))Q=J<3?void 0:Q,J=1;I=Object(I);while(++Y<J){var q=U[Y];if(q)$(I,q,Y,Q)}return I})}function fU0($,I){return I=I==null?hU0:I,!!I&&(typeof $=="number"||L41.test($))&&($>-1&&$%1==0&&$<I)}function E41($,I,U){if(!x_(U))return!1;var Y=typeof I;if(Y=="number"?k_(U)&&fU0(I,U.length):Y=="string"&&(I in U))return u_(U[I],$);return!1}function B41($){var I=$&&$.constructor,U=typeof I=="function"&&I.prototype||tK;return $===U}function v41($){var I=[];if($!=null)for(var U in Object($))I.push(U);return I}function u_($,I){return $===I||$!==$&&I!==I}function R41($){return C41($)&&aK.call($,"callee")&&(!O41.call($,"callee")||kU0.call($)==Z41)}var j41=Array.isArray;function k_($){return $!=null&&S41($.length)&&!_41($)}function C41($){return g41($)&&k_($)}function _41($){var I=x_($)?kU0.call($):"";return I==z41||I==X41}function S41($){return typeof $=="number"&&$>-1&&$%1==0&&$<=hU0}function x_($){var I=typeof $;return!!$&&(I=="object"||I=="function")}function g41($){return!!$&&typeof $=="object"}var y41=T41(function($,I,U,Y){P41(I,u41(I),$,Y)}),h41=xU0(function($){return $.push(void 0,N41),uU0(y41,void 0,$)});function u41($){return k_($)?F41($,!0):A41($)}iU0.exports=h41});var nU0=O((XR1,i_)=>{function k41($,I){if(!($ instanceof I))throw TypeError("Cannot call a class as a function")}var bU0=A4().Buffer,sK=t("util");function x41($,I,U){$.copy(I,U)}i_.exports=function(){function $(){k41(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(U){var Y={data:U,next:null};if(this.length>0)this.tail.next=Y;else this.head=Y;this.tail=Y,++this.length},$.prototype.unshift=function(U){var Y={data:U,next:this.head};if(this.length===0)this.tail=Y;this.head=Y,++this.length},$.prototype.shift=function(){if(this.length===0)return;var U=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,U},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(U){if(this.length===0)return"";var Y=this.head,J=""+Y.data;while(Y=Y.next)J+=U+Y.data;return J},$.prototype.concat=function(U){if(this.length===0)return bU0.alloc(0);var Y=bU0.allocUnsafe(U>>>0),J=this.head,Q=0;while(J)x41(J.data,Y,Q),Q+=J.data.length,J=J.next;return Y},$}();if(sK&&sK.inspect&&sK.inspect.custom)i_.exports.prototype[sK.inspect.custom]=function(){var $=sK.inspect({length:this.length});return this.constructor.name+" "+$}});var b_=O((LR1,pU0)=>{var wX=M4();function f41($,I){var U=this,Y=this._readableState&&this._readableState.destroyed,J=this._writableState&&this._writableState.destroyed;if(Y||J){if(I)I($);else if($){if(!this._writableState)wX.nextTick(VX,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,wX.nextTick(VX,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(Q){if(!I&&Q){if(!U._writableState)wX.nextTick(VX,U,Q);else if(!U._writableState.errorEmitted)U._writableState.errorEmitted=!0,wX.nextTick(VX,U,Q)}else if(I)I(Q)}),this}function i41(){if(this._readableState)this._readable
Line truncated
|
||||
%s`,R,R,P,Y);var x=P.type==="*"?ES:P.type==="?"?TS:"\\"+P.type;J=!0,Y=Y.slice(0,P.reStart)+x+"\\("+R}if(X(),Q)Y+="\\\\";var y=!1;switch(Y.charAt(0)){case"[":case".":case"(":y=!0}for(var f=q.length-1;f>-1;f--){var j=q[f],p=Y.slice(0,j.reStart),n=Y.slice(j.reStart,j.reEnd-8),S=Y.slice(j.reEnd-8,j.reEnd),i=Y.slice(j.reEnd);S+=i;var b=p.split("(").length-1,U0=i;for(L=0;L<b;L++)U0=U0.replace(/\)[+*?]?/,"");i=U0;var B="";if(i===""&&I!==RX)B="$";var k=p+n+i+B+S;Y=k}if(Y!==""&&J)Y="(?=.)"+Y;if(y)Y=Z+Y;if(I===RX)return[Y,J];if(!J)return Q91($);var c=U.nocase?"i":"";try{var r=new RegExp("^"+Y+"$",c)}catch(J0){return new RegExp("$.")}return r._glob=$,r._src=Y,r}z$.makeRe=function($,I){return new R4($,I||{}).makeRe()};R4.prototype.makeRe=J91;function J91(){if(this.regexp||this.regexp===!1)return this.regexp;var $=this.set;if(!$.length)return this.regexp=!1,this.regexp;var I=this.options,U=I.noglobstar?ES:I.dot?t51:a51,Y=I.nocase?"i":"",J=$.map(function(Q){return Q.map(function(K){return K===h3?U:typeof K==="string"?K91(K):K._src}).join("\\/")}).join("|");if(J="^(?:"+J+")$",this.negate)J="^(?!"+J+").*$";try{this.regexp=new RegExp(J,Y)}catch(Q){this.regexp=!1}return this.regexp}z$.match=function($,I,U){U=U||{};var Y=new R4(I,U);if($=$.filter(function(J){return Y.match(J)}),Y.options.nonull&&!$.length)$.push(I);return $};R4.prototype.match=function(I,U){if(typeof U>"u")U=this.partial;if(this.debug("match",I,this.pattern),this.comment)return!1;if(this.empty)return I==="";if(I==="/"&&U)return!0;var Y=this.options;if(Wq.sep!=="/")I=I.split(Wq.sep).join("/");I=I.split(DJ0),this.debug(this.pattern,"split",I);var J=this.set;this.debug(this.pattern,"set",J);var Q,K;for(K=I.length-1;K>=0;K--)if(Q=I[K],Q)break;for(K=0;K<J.length;K++){var q=J[K],H=I;if(Y.matchBase&&q.length===1)H=[Q];var G=this.matchOne(H,q,U);if(G){if(Y.flipNegate)return!0;return!this.negate}}if(Y.flipNegate)return!1;return this.negate};R4.prototype.matchOne=function($,I,U){if(I.indexOf(h3)!==-1)return this._matchGlobstar($,I,U,0,0);return this._matchOne($,I,U,0,0)};R4.prototype._matchGlobstar=function($,I,U,Y,J){var Q,K=-1;for(Q=J;Q<I.length;Q++)if(I[Q]===h3){K=Q;break}var q=-1;for(Q=I.length-1;Q>=0;Q--)if(I[Q]===h3){q=Q;break}var H=I.slice(J,K),G=U?I.slice(K+1):I.slice(K+1,q),W=U?[]:I.slice(q+1);if(H.length){var w=$.slice(Y,Y+H.length);if(!this._matchOne(w,H,U,0,0))return!1;Y+=H.length}var Z=0;if(W.length){if(W.length+Y>$.length)return!1;var V=$.length-W.length;if(this._matchOne($,W,U,V,0))Z=W.length;else{if($[$.length-1]!==""||Y+W.length===$.length)return!1;if(V--,!this._matchOne($,W,U,V,0))return!1;Z=W.length+1}}if(!G.length){var X=!!Z;for(Q=Y;Q<$.length-Z;Q++){var L=String($[Q]);if(X=!0,L==="."||L===".."||!this.options.dot&&L.charAt(0)===".")return!1}return U||X}var D=[[[],0]],F=D[0],P=0,T=[0];for(var A=0;A<G.length;A++){var R=G[A];if(R===h3)T.push(P),F=[[],0],D.push(F);else F[0].push(R),P++}var x=D.length-1,y=$.length-Z;for(var f=0;f<D.length;f++)D[f][1]=y-(T[x--]+D[f][0].length);return!!this._matchGlobStarBodySections($,D,Y,0,U,0,!!Z)};R4.prototype._matchGlobStarBodySections=function($,I,U,Y,J,Q,K){var q=I[Y];if(!q){for(var H=U;H<$.length;H++){K=!0;var G=$[H];if(G==="."||G===".."||!this.options.dot&&G.charAt(0)===".")return!1}return K}var W=q[0],w=q[1];while(U<=w){var Z=this._matchOne($.slice(0,U+W.length),W,J,U,0);if(Z&&Q<this.maxGlobstarRecursion){var V=this._matchGlobStarBodySections($,I,U+W.length,Y+1,J,Q+1,K);if(V!==!1)return V}var G=$[U];if(G==="."||G===".."||!this.options.dot&&G.charAt(0)===".")return!1;U++}return J||null};R4.prototype._matchOne=function($,I,U,Y,J){var Q,K,q,H;for(Q=Y,K=J,q=$.length,H=I.length;Q<q&&K<H;Q++,K++){this.debug("matchOne loop");var G=I[K],W=$[Q];if(this.debug(I,G,W),G===!1||G===h3)return!1;var w;if(typeof G==="string")w=W===G,this.debug("string match",G,W,w);else w=W.match(G),this.debug("pattern match",G,W,w);if(!w)return!1}if(Q===q&&K===H)return!0;else if(Q===q)return U;else if(K===H)return Q===q-1&&$[Q]==="";throw Error("wtf?")};function Q91($){return $.replace(/\\(.)/g,"$1")}function K91($){return $.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var SX=O((hR1,_X)=>{function NJ0($){return $.charAt(0)==="/"}function MJ0($){var I=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,U=I.exec($),Y=U[1]||"",J=Boolean(Y&&Y.charAt(1)!==":");return Boolean(U[2]||J)}_X.exports=process.platform==="win32"?MJ0:NJ0;_X.exports.posix=NJ0;_X.exports.win32=MJ0});var vS=O((L91)=>{L91.setopts=V91;L91.ownProp=AJ0;L91.makeAbs=wq;L91.finish=Z91;L91.mark=z91;L91.isIgnored=TJ0;L91.childrenIgnored=X91;function AJ0($,I){return Object.prototype.hasOwnProperty.call($,I)}var q91=t("fs"),oY=t("path"),H91=CX(),PJ0=SX(),BS=H91.Minimatch;function G91($,I){return $.localeCompare(I,"en")}function W91($,I){if($.ignore=I.ignore||[],!Array.isArray($.ignore))$.ignore=[$.ignore];if($.ignore.length)$.ignore=$.ignore.map(w91)}function w91($){var I=null;if($.slice(-3)==="/**"){var U=$.replace(/(\/\*\*)+$/,"");I=new BS(U,{dot:!0})}return{matcher
Line truncated
|
||||
See: https://github.com/isaacs/node-glob/issues/167`);return new u4($,I).found}function u4($,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 u4))return new u4($,I);if(E91(this,$,I),this.noprocess)return this;var U=this.minimatch.set.length;this.matches=Array(U);for(var Y=0;Y<U;Y++)this._process(this.minimatch.set[Y],Y,!1);this._finish()}u4.prototype._finish=function(){if(BJ0.ok(this instanceof u4),this.realpath){var $=this;this.matches.forEach(function(I,U){var Y=$.matches[U]=Object.create(null);for(var J in I)try{J=$._makeAbs(J);var Q=T91.realpathSync(J,$.realpathCache);Y[Q]=!0}catch(K){if(K.syscall==="stat")Y[$._makeAbs(J)]=!0;else throw K}})}u3.finish(this)};u4.prototype._process=function($,I,U){BJ0.ok(this instanceof u4);var Y=0;while(typeof $[Y]==="string")Y++;var J;switch(Y){case $.length:this._processSimple($.join("/"),I);return;case 0:J=null;break;default:J=$.slice(0,Y).join("/");break}var Q=$.slice(Y),K;if(J===null)K=".";else if(SX(J)||SX($.map(function(G){return typeof G==="string"?G:"[*]"}).join("/"))){if(!J||!SX(J))J="/"+J;K=J}else K=J;var q=this._makeAbs(K);if(B91(this,K))return;var H=Q[0]===EJ0.GLOBSTAR;if(H)this._processGlobStar(J,K,q,Q,I,U);else this._processReaddir(J,K,q,Q,I,U)};u4.prototype._processReaddir=function($,I,U,Y,J,Q){var K=this._readdir(U,Q);if(!K)return;var q=Y[0],H=!!this.minimatch.negate,G=q._glob,W=this.dot||G.charAt(0)===".",w=[];for(var Z=0;Z<K.length;Z++){var V=K[Z];if(V.charAt(0)!=="."||W){var X;if(H&&!$)X=!V.match(q);else X=V.match(q);if(X)w.push(V)}}var L=w.length;if(L===0)return;if(Y.length===1&&!this.mark&&!this.stat){if(!this.matches[J])this.matches[J]=Object.create(null);for(var Z=0;Z<L;Z++){var V=w[Z];if($)if($.slice(-1)!=="/")V=$+"/"+V;else V=$+V;if(V.charAt(0)==="/"&&!this.nomount)V=BS.join(this.root,V);this._emitMatch(J,V)}return}Y.shift();for(var Z=0;Z<L;Z++){var V=w[Z],D;if($)D=[$,V];else D=[V];this._process(D.concat(Y),J,Q)}};u4.prototype._emitMatch=function($,I){if(v91(this,I))return;var U=this._makeAbs(I);if(this.mark)I=this._mark(I);if(this.absolute)I=U;if(this.matches[$][I])return;if(this.nodir){var Y=this.cache[U];if(Y==="DIR"||Array.isArray(Y))return}if(this.matches[$][I]=!0,this.stat)this._stat(I)};u4.prototype._readdirInGlobStar=function($){if(this.follow)return this._readdir($,!1);var I,U,Y;try{U=this.fs.lstatSync($)}catch(Q){if(Q.code==="ENOENT")return null}var J=U&&U.isSymbolicLink();if(this.symlinks[$]=J,!J&&U&&!U.isDirectory())this.cache[$]="FILE";else I=this._readdir($,!1);return I};u4.prototype._readdir=function($,I){var U;if(I&&!vS(this.symlinks,$))return this._readdirInGlobStar($);if(vS(this.cache,$)){var Y=this.cache[$];if(!Y||Y==="FILE")return null;if(Array.isArray(Y))return Y}try{return this._readdirEntries($,this.fs.readdirSync($))}catch(J){return this._readdirError($,J),null}};u4.prototype._readdirEntries=function($,I){if(!this.mark&&!this.stat)for(var U=0;U<I.length;U++){var Y=I[U];if($==="/")Y=$+Y;else Y=$+"/"+Y;this.cache[Y]=!0}return this.cache[$]=I,I};u4.prototype._readdirError=function($,I){switch(I.code){case"ENOTSUP":case"ENOTDIR":var U=this._makeAbs($);if(this.cache[U]="FILE",U===this.cwdAbs){var Y=Error(I.code+" invalid cwd "+this.cwd);throw Y.path=this.cwd,Y.code=I.code,Y}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}};u4.prototype._processGlobStar=function($,I,U,Y,J,Q){var K=this._readdir(U,Q);if(!K)return;var q=Y.slice(1),H=$?[$]:[],G=H.concat(q);this._process(G,J,!1);var W=K.length,w=this.symlinks[U];if(w&&Q)return;for(var Z=0;Z<W;Z++){var V=K[Z];if(V.charAt(0)==="."&&!this.dot)continue;var X=H.concat(K[Z],q);this._process(X,J,!0);var L=H.concat(K[Z],Y);this._process(L,J,!0)}};u4.prototype._processSimple=function($,I){var U=this._stat($);if(!this.matches[I])this.matches[I]=Object.create(null);if(!U)return;if($&&SX($)&&!this.nomount){var Y=/[\/\\]$/.test($);if($.charAt(0)==="/")$=BS.join(this.root,$);else if($=BS.resolve(this.root,$),Y)$+="/"}if(process.platform==="win32")$=$.replace(/\\/g,"/");this._emitMatch(I,$)};u4.prototype._stat=function($){var I=this._makeAbs($),U=$.slice(-1)==="/";if($.length>this.maxLength)return!1;if(!this.stat&&vS(this.cache,I)){var K=this.cache[I];if(Array.isArray(K))K="DIR";if(!U||K==="DIR")return K;if(U&&K==="FILE")return!1}var Y,J=this.statCache[I];if(!J){var Q;try{Q=this.fs.lstatSync(I)}catch(q){if(q&&(q.code==="ENOENT"||q.code==="ENOTDIR"))return this.statCache[I]=!1,!1}if(Q&&Q.isSymbolicLink())try{J=this.fs.statSync(I)}catch(q){J=Q}else J=Q}this.statCache[I]=J;var K=!0;if(J)K=J.isDirectory()?"DIR":"FILE";if(this.cache[I]=this.cache[I]||K,U&&K==="FILE")return!1;return K};u4.prototype._mark=function($){return u3.mark(this,$)};u4.prototype._makeAbs=function($){return u3.makeAbs(this,$)}});var RS=O((bR1,_J0)=>{_J0.exports=CJ0;function CJ0($,I){if($&&I)return CJ0($)(I);if(typeof $!=="function")throw TypeError("need wrapper function");return Object.keys($).forEach(function(Y){U[Y]=$[Y]}),U;f
Line truncated
|
||||
`);if($.linkname)I+=Kg(" linkpath="+$.linkname+`
|
||||
`);var U=$.pax;if(U)for(var Y in U)I+=Kg(" "+Y+"="+U[Y]+`
|
||||
`);return Buffer.from(I)};p71.decodePax=function($){var I={};while($.length){var U=0;while(U<$.length&&$[U]!==32)U++;var Y=parseInt($.slice(0,U).toString(),10);if(!Y)return I;var J=$.slice(U+1,Y-1).toString(),Q=J.indexOf("=");if(Q===-1)return I;I[J.slice(0,Q)]=J.slice(Q+1),$=$.slice(Y)}return I};p71.encode=function($){var I=S71(512),U=$.name,Y="";if($.typeflag===5&&U[U.length-1]!=="/")U+="/";if(Buffer.byteLength(U)!==U.length)return null;while(Buffer.byteLength(U)>100){var J=U.indexOf("/");if(J===-1)return null;Y+=Y?"/"+U.slice(0,J):U.slice(0,J),U=U.slice(J+1)}if(Buffer.byteLength(U)>100||Buffer.byteLength(Y)>155)return null;if($.linkname&&Buffer.byteLength($.linkname)>100)return null;if(I.write(U),I.write(Q7($.mode&k71,6),100),I.write(Q7($.uid,6),108),I.write(Q7($.gid,6),116),I.write(Q7($.size,11),124),I.write(Q7($.mtime.getTime()/1000|0,11),136),I[156]=rQ0+i71($.type),$.linkname)I.write($.linkname,157);if(tQ0.copy(I,Dq),h71.copy(I,qg),$.uname)I.write($.uname,265);if($.gname)I.write($.gname,297);if(I.write(Q7($.devmajor||0,6),329),I.write(Q7($.devminor||0,6),337),Y)I.write(Y,345);return I.write(Q7(sQ0(I),6),148),I};p71.decode=function($,I,U){var Y=$[156]===0?0:$[156]-rQ0,J=tY($,0,100,I),Q=K7($,100,8),K=K7($,108,8),q=K7($,116,8),H=K7($,124,12),G=K7($,136,12),W=b71(Y),w=$[157]===0?null:tY($,157,100,I),Z=tY($,265,32),V=tY($,297,32),X=K7($,329,8),L=K7($,337,8),D=sQ0($);if(D===256)return null;if(D!==K7($,148,8))throw Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(tQ0.compare($,Dq,Dq+6)===0){if($[345])J=tY($,345,155,I)+"/"+J}else if(u71.compare($,Dq,Dq+6)===0&&x71.compare($,qg,qg+2)===0);else if(!U)throw Error("Invalid tar header: unknown format.");if(Y===0&&J&&J[J.length-1]==="/")Y=5;return{name:J,mode:Q,uid:K,gid:q,size:H,mtime:new Date(1000*G),type:W,linkname:w,uname:Z,gname:V,devmajor:X,devminor:L}}});var Q20=O((Mj1,J20)=>{var $20=t("util"),r71=oQ0(),Oq=Hg(),I20=D6().Writable,U20=D6().PassThrough,Y20=function(){},eQ0=function($){return $&=511,$&&512-$},t71=function($,I){var U=new fX($,I);return U.end(),U},a71=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,$},fX=function($,I){this._parent=$,this.offset=I,U20.call(this,{autoDestroy:!1})};$20.inherits(fX,U20);fX.prototype.destroy=function($){this._parent.destroy($)};var h5=function($){if(!(this instanceof h5))return new h5($);I20.call(this,$),$=$||{},this._offset=0,this._buffer=r71(),this._missing=0,this._partial=!1,this._onparse=Y20,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,U=I._buffer,Y=function(){I._continue()},J=function(Z){if(I._locked=!1,Z)return I.destroy(Z);if(!I._stream)Y()},Q=function(){I._stream=null;var Z=eQ0(I._header.size);if(Z)I._parse(Z,K);else I._parse(512,w);if(!I._locked)Y()},K=function(){I._buffer.consume(eQ0(I._header.size)),I._parse(512,w),Y()},q=function(){var Z=I._header.size;I._paxGlobal=Oq.decodePax(U.slice(0,Z)),U.consume(Z),Q()},H=function(){var Z=I._header.size;if(I._pax=Oq.decodePax(U.slice(0,Z)),I._paxGlobal)I._pax=Object.assign({},I._paxGlobal,I._pax);U.consume(Z),Q()},G=function(){var Z=I._header.size;this._gnuLongPath=Oq.decodeLongPath(U.slice(0,Z),$.filenameEncoding),U.consume(Z),Q()},W=function(){var Z=I._header.size;this._gnuLongLinkPath=Oq.decodeLongPath(U.slice(0,Z),$.filenameEncoding),U.consume(Z),Q()},w=function(){var Z=I._offset,V;try{V=I._header=Oq.decode(U.slice(0,512),$.filenameEncoding,$.allowUnknownFormat)}catch(X){I.emit("error",X)}if(U.consume(512),!V){I._parse(512,w),Y();return}if(V.type==="gnu-long-path"){I._parse(V.size,G),Y();return}if(V.type==="gnu-long-link-path"){I._parse(V.size,W),Y();return}if(V.type==="pax-global-header"){I._parse(V.size,q),Y();return}if(V.type==="pax-header"){I._parse(V.size,H),Y();return}if(I._gnuLongPath)V.name=I._gnuLongPath,I._gnuLongPath=null;if(I._gnuLongLinkPath)V.linkname=I._gnuLongLinkPath,I._gnuLongLinkPath=null;if(I._pax)I._header=V=a71(V,I._pax),I._pax=null;if(I._locked=!0,!V.size||V.type==="directory"){I._parse(512,w),I.emit("entry",V,t71(I,Z),J);return}I._stream=new fX(I,Z),I.emit("entry",V,I._stream,J),I._parse(V.size,Q),Y()};this._onheader=w,this._parse(512,w)};$20.inherits(h5,I20);h5.prototype.destroy=function($){if(this._destroyed)return;if(this._destroyed=!0,$)this.emit("error",$);if(this.emit("close"),this._stream)this._stream.emit("close")};h5.prototype._parse=function($,I){if(this._destroyed)return;if(this._offset+=$,this._missing=$,I===this._onheader)this._partial=!1;this._onparse=I};h5.prototype._continue=function(){if(this._destroyed)return;var $=this._cb;if(this._cb=Y20,this._overflow)this._write(this._overflow,void 0,$);else $()};h5.prototype._write=function($,I,U){if(this._destroyed)return;var Y=this._stream,J=this._buffer,Q=this._missing;if($.length)this._partial=!0;if($.length<Q){
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="${L31.xmlEncode($.Target)}" TargetMode="${$.TargetMode}"/>`);else this.stream.write(`<Relationship Id="${I}" Type="${$.Type}" Target="${$.Target}"/>`);return I}_writeClose(){this.stream.write("</Relationships>")}}_20.exports=C20});var x20=O((_j1,u20)=>{var g20=U6(),y20=n9(),O31=W4(),F31=ij(),N31=pj();class h20{constructor($,I,U){this.id=U.id,this.count=0,this._worksheet=$,this._workbook=U.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:y20.Comments,Target:`../comments${this.id}.xml`};this._sheetRelsWriter.addRelationship($);let I={Type:y20.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 U=new F31,Y=new g20;U.render(Y,$),this.commentsStream.write(Y.xml);let J=new N31,Q=new g20;J.render(Q,$,I),this.vmlStream.write(Q.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=O31.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()}}u20.exports=h20});var p20=O((Sj1,n20)=>{var M31=X4(),A31=n9(),wg=W4(),k20=QB(),f20=Z5(),P31=NR(),b20=YV(),Vg=QV(),T31=S20(),E31=x20(),B31=YB(),p4=new P31,Zg=f9(),v31=Xj(),R31=Lj(),j31=Dj(),C31=wj(),_31=Gj(),S31=Vj(),g31=Oj(),y31=Fj(),h31=Nj(),u31=Mj(),x31=Aj(),k31=Pj(),f31=Rj(),b31=Ej(),i31=Tj(),c4={dataValidations:new v31,sheetProperties:new R31,sheetFormatProperties:new j31,columns:new Zg({tag:"cols",length:!1,childXform:new C31}),row:new _31,hyperlinks:new Zg({tag:"hyperlinks",length:!1,childXform:new S31}),sheetViews:new Zg({tag:"sheetViews",length:!1,childXform:new g31}),sheetProtection:new y31,pageMargins:new h31,pageSeteup:new u31,autoFilter:new x31,picture:new k31,conditionalFormattings:new f31,headerFooter:new b31,rowBreaks:new i31};class i20{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 T31($),this._sheetCommentsWriter=new E31(this,this._sheetRelsWriter,$),this._dimensions=new f20,this._rowZero=1,this.committed=!1,this.dataValidations=new B31,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 u4))return new u4($,I);if(E91(this,$,I),this.noprocess)return this;var U=this.minimatch.set.length;this.matches=Array(U);for(var Y=0;Y<U;Y++)this._process(this.minimatch.set[Y],Y,!1);this._finish()}u4.prototype._finish=function(){if(BJ0.ok(this instanceof u4),this.realpath){var $=this;this.matches.forEach(function(I,U){var Y=$.matches[U]=Object.create(null);for(var J in I)try{J=$._makeAbs(J);var Q=T91.realpathSync(J,$.realpathCache);Y[Q]=!0}catch(K){if(K.syscall==="stat")Y[$._makeAbs(J)]=!0;else throw K}})}u3.finish(this)};u4.prototype._process=function($,I,U){BJ0.ok(this instanceof u4);var Y=0;while(typeof $[Y]==="string")Y++;var J;switch(Y){case $.length:this._processSimple($.join("/"),I);return;case 0:J=null;break;default:J=$.slice(0,Y).join("/");break}var Q=$.slice(Y),K;if(J===null)K=".";else if(gX(J)||gX($.map(function(G){return typeof G==="string"?G:"[*]"}).join("/"))){if(!J||!gX(J))J="/"+J;K=J}else K=J;var q=this._makeAbs(K);if(B91(this,K))return;var H=Q[0]===EJ0.GLOBSTAR;if(H)this._processGlobStar(J,K,q,Q,I,U);else this._processReaddir(J,K,q,Q,I,U)};u4.prototype._processReaddir=function($,I,U,Y,J,Q){var K=this._readdir(U,Q);if(!K)return;var q=Y[0],H=!!this.minimatch.negate,G=q._glob,W=this.dot||G.charAt(0)===".",w=[];for(var Z=0;Z<K.length;Z++){var V=K[Z];if(V.charAt(0)!=="."||W){var X;if(H&&!$)X=!V.match(q);else X=V.match(q);if(X)w.push(V)}}var L=w.length;if(L===0)return;if(Y.length===1&&!this.mark&&!this.stat){if(!this.matches[J])this.matches[J]=Object.create(null);for(var Z=0;Z<L;Z++){var V=w[Z];if($)if($.slice(-1)!=="/")V=$+"/"+V;else V=$+V;if(V.charAt(0)==="/"&&!this.nomount)V=RS.join(this.root,V);this._emitMatch(J,V)}return}Y.shift();for(var Z=0;Z<L;Z++){var V=w[Z],D;if($)D=[$,V];else D=[V];this._process(D.concat(Y),J,Q)}};u4.prototype._emitMatch=function($,I){if(v91(this,I))return;var U=this._makeAbs(I);if(this.mark)I=this._mark(I);if(this.absolute)I=U;if(this.matches[$][I])return;if(this.nodir){var Y=this.cache[U];if(Y==="DIR"||Array.isArray(Y))return}if(this.matches[$][I]=!0,this.stat)this._stat(I)};u4.prototype._readdirInGlobStar=function($){if(this.follow)return this._readdir($,!1);var I,U,Y;try{U=this.fs.lstatSync($)}catch(Q){if(Q.code==="ENOENT")return null}var J=U&&U.isSymbolicLink();if(this.symlinks[$]=J,!J&&U&&!U.isDirectory())this.cache[$]="FILE";else I=this._readdir($,!1);return I};u4.prototype._readdir=function($,I){var U;if(I&&!jS(this.symlinks,$))return this._readdirInGlobStar($);if(jS(this.cache,$)){var Y=this.cache[$];if(!Y||Y==="FILE")return null;if(Array.isArray(Y))return Y}try{return this._readdirEntries($,this.fs.readdirSync($))}catch(J){return this._readdirError($,J),null}};u4.prototype._readdirEntries=function($,I){if(!this.mark&&!this.stat)for(var U=0;U<I.length;U++){var Y=I[U];if($==="/")Y=$+Y;else Y=$+"/"+Y;this.cache[Y]=!0}return this.cache[$]=I,I};u4.prototype._readdirError=function($,I){switch(I.code){case"ENOTSUP":case"ENOTDIR":var U=this._makeAbs($);if(this.cache[U]="FILE",U===this.cwdAbs){var Y=Error(I.code+" invalid cwd "+this.cwd);throw Y.path=this.cwd,Y.code=I.code,Y}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}};u4.prototype._processGlobStar=function($,I,U,Y,J,Q){var K=this._readdir(U,Q);if(!K)return;var q=Y.slice(1),H=$?[$]:[],G=H.concat(q);this._process(G,J,!1);var W=K.length,w=this.symlinks[U];if(w&&Q)return;for(var Z=0;Z<W;Z++){var V=K[Z];if(V.charAt(0)==="."&&!this.dot)continue;var X=H.concat(K[Z],q);this._process(X,J,!0);var L=H.concat(K[Z],Y);this._process(L,J,!0)}};u4.prototype._processSimple=function($,I){var U=this._stat($);if(!this.matches[I])this.matches[I]=Object.create(null);if(!U)return;if($&&gX($)&&!this.nomount){var Y=/[\/\\]$/.test($);if($.charAt(0)==="/")$=RS.join(this.root,$);else if($=RS.resolve(this.root,$),Y)$+="/"}if(process.platform==="win32")$=$.replace(/\\/g,"/");this._emitMatch(I,$)};u4.prototype._stat=function($){var I=this._makeAbs($),U=$.slice(-1)==="/";if($.length>this.maxLength)return!1;if(!this.stat&&jS(this.cache,I)){var K=this.cache[I];if(Array.isArray(K))K="DIR";if(!U||K==="DIR")return K;if(U&&K==="FILE")return!1}var Y,J=this.statCache[I];if(!J){var Q;try{Q=this.fs.lstatSync(I)}catch(q){if(q&&(q.code==="ENOENT"||q.code==="ENOTDIR"))return this.statCache[I]=!1,!1}if(Q&&Q.isSymbolicLink())try{J=this.fs.statSync(I)}catch(q){J=Q}else J=Q}this.statCache[I]=J;var K=!0;if(J)K=J.isDirectory()?"DIR":"FILE";if(this.cache[I]=this.cache[I]||K,U&&K==="FILE")return!1;return K};u4.prototype._mark=function($){return u3.mark(this,$)};u4.prototype._makeAbs=function($){return u3.makeAbs(this,$)}});var CS=O((bR1,_J0)=>{_J0.exports=CJ0;function CJ0($,I){if($&&I)return CJ0($)(I);if(typeof $!=="function")throw TypeError("need wrapper function");return Object.keys($).forEach(function(Y){U[Y]=$[Y]}),U;f
Line truncated
|
||||
`);if($.linkname)I+=Hg(" linkpath="+$.linkname+`
|
||||
`);var U=$.pax;if(U)for(var Y in U)I+=Hg(" "+Y+"="+U[Y]+`
|
||||
`);return Buffer.from(I)};p71.decodePax=function($){var I={};while($.length){var U=0;while(U<$.length&&$[U]!==32)U++;var Y=parseInt($.slice(0,U).toString(),10);if(!Y)return I;var J=$.slice(U+1,Y-1).toString(),Q=J.indexOf("=");if(Q===-1)return I;I[J.slice(0,Q)]=J.slice(Q+1),$=$.slice(Y)}return I};p71.encode=function($){var I=S71(512),U=$.name,Y="";if($.typeflag===5&&U[U.length-1]!=="/")U+="/";if(Buffer.byteLength(U)!==U.length)return null;while(Buffer.byteLength(U)>100){var J=U.indexOf("/");if(J===-1)return null;Y+=Y?"/"+U.slice(0,J):U.slice(0,J),U=U.slice(J+1)}if(Buffer.byteLength(U)>100||Buffer.byteLength(Y)>155)return null;if($.linkname&&Buffer.byteLength($.linkname)>100)return null;if(I.write(U),I.write(Q7($.mode&x71,6),100),I.write(Q7($.uid,6),108),I.write(Q7($.gid,6),116),I.write(Q7($.size,11),124),I.write(Q7($.mtime.getTime()/1000|0,11),136),I[156]=rQ0+b71($.type),$.linkname)I.write($.linkname,157);if(tQ0.copy(I,Dq),h71.copy(I,Gg),$.uname)I.write($.uname,265);if($.gname)I.write($.gname,297);if(I.write(Q7($.devmajor||0,6),329),I.write(Q7($.devminor||0,6),337),Y)I.write(Y,345);return I.write(Q7(sQ0(I),6),148),I};p71.decode=function($,I,U){var Y=$[156]===0?0:$[156]-rQ0,J=sY($,0,100,I),Q=K7($,100,8),K=K7($,108,8),q=K7($,116,8),H=K7($,124,12),G=K7($,136,12),W=i71(Y),w=$[157]===0?null:sY($,157,100,I),Z=sY($,265,32),V=sY($,297,32),X=K7($,329,8),L=K7($,337,8),D=sQ0($);if(D===256)return null;if(D!==K7($,148,8))throw Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(tQ0.compare($,Dq,Dq+6)===0){if($[345])J=sY($,345,155,I)+"/"+J}else if(u71.compare($,Dq,Dq+6)===0&&k71.compare($,Gg,Gg+2)===0);else if(!U)throw Error("Invalid tar header: unknown format.");if(Y===0&&J&&J[J.length-1]==="/")Y=5;return{name:J,mode:Q,uid:K,gid:q,size:H,mtime:new Date(1000*G),type:W,linkname:w,uname:Z,gname:V,devmajor:X,devminor:L}}});var Q20=O((Aj1,J20)=>{var $20=t("util"),r71=oQ0(),Oq=Wg(),I20=D6().Writable,U20=D6().PassThrough,Y20=function(){},eQ0=function($){return $&=511,$&&512-$},t71=function($,I){var U=new iX($,I);return U.end(),U},a71=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,$},iX=function($,I){this._parent=$,this.offset=I,U20.call(this,{autoDestroy:!1})};$20.inherits(iX,U20);iX.prototype.destroy=function($){this._parent.destroy($)};var h5=function($){if(!(this instanceof h5))return new h5($);I20.call(this,$),$=$||{},this._offset=0,this._buffer=r71(),this._missing=0,this._partial=!1,this._onparse=Y20,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,U=I._buffer,Y=function(){I._continue()},J=function(Z){if(I._locked=!1,Z)return I.destroy(Z);if(!I._stream)Y()},Q=function(){I._stream=null;var Z=eQ0(I._header.size);if(Z)I._parse(Z,K);else I._parse(512,w);if(!I._locked)Y()},K=function(){I._buffer.consume(eQ0(I._header.size)),I._parse(512,w),Y()},q=function(){var Z=I._header.size;I._paxGlobal=Oq.decodePax(U.slice(0,Z)),U.consume(Z),Q()},H=function(){var Z=I._header.size;if(I._pax=Oq.decodePax(U.slice(0,Z)),I._paxGlobal)I._pax=Object.assign({},I._paxGlobal,I._pax);U.consume(Z),Q()},G=function(){var Z=I._header.size;this._gnuLongPath=Oq.decodeLongPath(U.slice(0,Z),$.filenameEncoding),U.consume(Z),Q()},W=function(){var Z=I._header.size;this._gnuLongLinkPath=Oq.decodeLongPath(U.slice(0,Z),$.filenameEncoding),U.consume(Z),Q()},w=function(){var Z=I._offset,V;try{V=I._header=Oq.decode(U.slice(0,512),$.filenameEncoding,$.allowUnknownFormat)}catch(X){I.emit("error",X)}if(U.consume(512),!V){I._parse(512,w),Y();return}if(V.type==="gnu-long-path"){I._parse(V.size,G),Y();return}if(V.type==="gnu-long-link-path"){I._parse(V.size,W),Y();return}if(V.type==="pax-global-header"){I._parse(V.size,q),Y();return}if(V.type==="pax-header"){I._parse(V.size,H),Y();return}if(I._gnuLongPath)V.name=I._gnuLongPath,I._gnuLongPath=null;if(I._gnuLongLinkPath)V.linkname=I._gnuLongLinkPath,I._gnuLongLinkPath=null;if(I._pax)I._header=V=a71(V,I._pax),I._pax=null;if(I._locked=!0,!V.size||V.type==="directory"){I._parse(512,w),I.emit("entry",V,t71(I,Z),J);return}I._stream=new iX(I,Z),I.emit("entry",V,I._stream,J),I._parse(V.size,Q),Y()};this._onheader=w,this._parse(512,w)};$20.inherits(h5,I20);h5.prototype.destroy=function($){if(this._destroyed)return;if(this._destroyed=!0,$)this.emit("error",$);if(this.emit("close"),this._stream)this._stream.emit("close")};h5.prototype._parse=function($,I){if(this._destroyed)return;if(this._offset+=$,this._missing=$,I===this._onheader)this._partial=!1;this._onparse=I};h5.prototype._continue=function(){if(this._destroyed)return;var $=this._cb;if(this._cb=Y20,this._overflow)this._write(this._overflow,void 0,$);else $()};h5.prototype._write=function($,I,U){if(this._destroyed)return;var Y=this._stream,J=this._buffer,Q=this._missing;if($.length)this._partial=!0;if($.length<Q){
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="${L31.xmlEncode($.Target)}" TargetMode="${$.TargetMode}"/>`);else this.stream.write(`<Relationship Id="${I}" Type="${$.Type}" Target="${$.Target}"/>`);return I}_writeClose(){this.stream.write("</Relationships>")}}_20.exports=C20});var k20=O((Sj1,u20)=>{var g20=U6(),y20=n9(),O31=W4(),F31=pj(),N31=dj();class h20{constructor($,I,U){this.id=U.id,this.count=0,this._worksheet=$,this._workbook=U.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:y20.Comments,Target:`../comments${this.id}.xml`};this._sheetRelsWriter.addRelationship($);let I={Type:y20.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 U=new F31,Y=new g20;U.render(Y,$),this.commentsStream.write(Y.xml);let J=new N31,Q=new g20;J.render(Q,$,I),this.vmlStream.write(Q.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=O31.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()}}u20.exports=h20});var p20=O((gj1,n20)=>{var M31=X4(),A31=n9(),Zg=W4(),x20=qB(),f20=Z5(),P31=AR(),i20=JV(),zg=KV(),T31=S20(),E31=k20(),B31=QB(),p4=new P31,Xg=f9(),v31=Dj(),R31=Oj(),j31=Fj(),C31=Zj(),_31=wj(),S31=zj(),g31=Nj(),y31=Mj(),h31=Aj(),u31=Pj(),k31=Tj(),x31=Ej(),f31=Cj(),i31=vj(),b31=Bj(),c4={dataValidations:new v31,sheetProperties:new R31,sheetFormatProperties:new j31,columns:new Xg({tag:"cols",length:!1,childXform:new C31}),row:new _31,hyperlinks:new Xg({tag:"hyperlinks",length:!1,childXform:new S31}),sheetViews:new Xg({tag:"sheetViews",length:!1,childXform:new g31}),sheetProtection:new y31,pageMargins:new h31,pageSeteup:new u31,autoFilter:new k31,picture:new x31,conditionalFormattings:new f31,headerFooter:new i31,rowBreaks:new b31};class b20{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 T31($),this._sheetCommentsWriter=new E31(this,this._sheetRelsWriter,$),this._dimensions=new f20,this._rowZero=1,this.committed=!1,this.dataValidations=new B31,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
|
||||
`)},_g=Sg.getNativePromise();if(Sg.isNode&&typeof MutationObserver>"u")gg=global.setImmediate,yg=process.nextTick,c3=Sg.isRecentNode?function($){gg.call(global,$)}:function($){yg.call(process,$)};else if(typeof _g==="function"&&typeof _g.resolve==="function")hg=_g.resolve(),c3=function($){hg.then($)};else if(typeof MutationObserver<"u"&&!(typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova)))c3=function(){var $=document.createElement("div"),I={attributes:!0},U=!1,Y=document.createElement("div"),J=new MutationObserver(function(){$.classList.toggle("foo"),U=!1});J.observe(Y,I);var Q=function(){if(U)return;U=!0,Y.classList.toggle("foo")};return function(q){var H=new MutationObserver(function(){H.disconnect(),q()});H.observe($,I),Q()}}();else if(typeof setImmediate<"u")c3=function($){setImmediate($)};else if(typeof setTimeout<"u")c3=function($){setTimeout($,0)};else c3=SI1;var gg,yg,hg;AK0.exports=c3});var EK0=O((cj1,TK0)=>{function gI1($,I,U,Y,J){for(var Q=0;Q<J;++Q)U[Q+Y]=$[Q+I],$[Q+I]=void 0}function G7($){this._capacity=$,this._length=0,this._front=0}G7.prototype._willBeOverCapacity=function($){return this._capacity<$};G7.prototype._pushOne=function($){var I=this.length();this._checkCapacity(I+1);var U=this._front+I&this._capacity-1;this[U]=$,this._length=I+1};G7.prototype.push=function($,I,U){var Y=this.length()+3;if(this._willBeOverCapacity(Y)){this._pushOne($),this._pushOne(I),this._pushOne(U);return}var J=this._front+Y-3;this._checkCapacity(Y);var Q=this._capacity-1;this[J+0&Q]=$,this[J+1&Q]=I,this[J+2&Q]=U,this._length=Y};G7.prototype.shift=function(){var $=this._front,I=this[$];return this[$]=void 0,this._front=$+1&this._capacity-1,this._length--,I};G7.prototype.length=function(){return this._length};G7.prototype._checkCapacity=function($){if(this._capacity<$)this._resizeTo(this._capacity<<1)};G7.prototype._resizeTo=function($){var I=this._capacity;this._capacity=$;var U=this._front,Y=this._length,J=U+Y&I-1;gI1(this,0,this,I,J)};TK0.exports=G7});var SK0=O((dj1,ug)=>{var CK0;try{throw Error()}catch($){CK0=$}var yI1=PK0(),BK0=EK0(),_K0=d1();function d4(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new BK0(16),this._normalQueue=new BK0(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var $=this;this.drainQueues=function(){$._drainQueues()},this._schedule=yI1}d4.prototype.setScheduler=function($){var I=this._schedule;return this._schedule=$,this._customScheduler=!0,I};d4.prototype.hasCustomScheduler=function(){return this._customScheduler};d4.prototype.enableTrampoline=function(){this._trampolineEnabled=!0};d4.prototype.disableTrampolineIfNecessary=function(){if(_K0.hasDevTools)this._trampolineEnabled=!1};d4.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};d4.prototype.fatalError=function($,I){if(I)process.stderr.write("Fatal "+($ instanceof Error?$.stack:$)+`
|
||||
`)},gg=yg.getNativePromise();if(yg.isNode&&typeof MutationObserver>"u")hg=global.setImmediate,ug=process.nextTick,c3=yg.isRecentNode?function($){hg.call(global,$)}:function($){ug.call(process,$)};else if(typeof gg==="function"&&typeof gg.resolve==="function")kg=gg.resolve(),c3=function($){kg.then($)};else if(typeof MutationObserver<"u"&&!(typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova)))c3=function(){var $=document.createElement("div"),I={attributes:!0},U=!1,Y=document.createElement("div"),J=new MutationObserver(function(){$.classList.toggle("foo"),U=!1});J.observe(Y,I);var Q=function(){if(U)return;U=!0,Y.classList.toggle("foo")};return function(q){var H=new MutationObserver(function(){H.disconnect(),q()});H.observe($,I),Q()}}();else if(typeof setImmediate<"u")c3=function($){setImmediate($)};else if(typeof setTimeout<"u")c3=function($){setTimeout($,0)};else c3=SI1;var hg,ug,kg;AK0.exports=c3});var EK0=O((dj1,TK0)=>{function gI1($,I,U,Y,J){for(var Q=0;Q<J;++Q)U[Q+Y]=$[Q+I],$[Q+I]=void 0}function G7($){this._capacity=$,this._length=0,this._front=0}G7.prototype._willBeOverCapacity=function($){return this._capacity<$};G7.prototype._pushOne=function($){var I=this.length();this._checkCapacity(I+1);var U=this._front+I&this._capacity-1;this[U]=$,this._length=I+1};G7.prototype.push=function($,I,U){var Y=this.length()+3;if(this._willBeOverCapacity(Y)){this._pushOne($),this._pushOne(I),this._pushOne(U);return}var J=this._front+Y-3;this._checkCapacity(Y);var Q=this._capacity-1;this[J+0&Q]=$,this[J+1&Q]=I,this[J+2&Q]=U,this._length=Y};G7.prototype.shift=function(){var $=this._front,I=this[$];return this[$]=void 0,this._front=$+1&this._capacity-1,this._length--,I};G7.prototype.length=function(){return this._length};G7.prototype._checkCapacity=function($){if(this._capacity<$)this._resizeTo(this._capacity<<1)};G7.prototype._resizeTo=function($){var I=this._capacity;this._capacity=$;var U=this._front,Y=this._length,J=U+Y&I-1;gI1(this,0,this,I,J)};TK0.exports=G7});var SK0=O((mj1,xg)=>{var CK0;try{throw Error()}catch($){CK0=$}var yI1=PK0(),BK0=EK0(),_K0=d1();function d4(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new BK0(16),this._normalQueue=new BK0(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var $=this;this.drainQueues=function(){$._drainQueues()},this._schedule=yI1}d4.prototype.setScheduler=function($){var I=this._schedule;return this._schedule=$,this._customScheduler=!0,I};d4.prototype.hasCustomScheduler=function(){return this._customScheduler};d4.prototype.enableTrampoline=function(){this._trampolineEnabled=!0};d4.prototype.disableTrampolineIfNecessary=function(){if(_K0.hasDevTools)this._trampolineEnabled=!1};d4.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};d4.prototype.fatalError=function($,I){if(I)process.stderr.write("Fatal "+($ instanceof Error?$.stack:$)+`
|
||||
`),process.exit(2);else this.throwLater($)};d4.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(U){throw Error(`No async scheduler available
|
||||
|
||||
See http://goo.gl/MqrFmX
|
||||
`)}};function vK0($,I,U){this._lateQueue.push($,I,U),this._queueTick()}function RK0($,I,U){this._normalQueue.push($,I,U),this._queueTick()}function jK0($){this._normalQueue._pushOne($),this._queueTick()}if(!_K0.hasDevTools)d4.prototype.invokeLater=vK0,d4.prototype.invoke=RK0,d4.prototype.settlePromises=jK0;else d4.prototype.invokeLater=function($,I,U){if(this._trampolineEnabled)vK0.call(this,$,I,U);else this._schedule(function(){setTimeout(function(){$.call(I,U)},100)})},d4.prototype.invoke=function($,I,U){if(this._trampolineEnabled)RK0.call(this,$,I,U);else this._schedule(function(){$.call(I,U)})},d4.prototype.settlePromises=function($){if(this._trampolineEnabled)jK0.call(this,$);else this._schedule(function(){$._settlePromises()})};d4.prototype._drainQueue=function($){while($.length()>0){var I=$.shift();if(typeof I!=="function"){I._settlePromises();continue}var U=$.shift(),Y=$.shift();I.call(U,Y)}};d4.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)};d4.prototype._queueTick=function(){if(!this._isTickUsed)this._isTickUsed=!0,this._schedule(this.drainQueues)};d4.prototype._reset=function(){this._isTickUsed=!1};ug.exports=d4;ug.exports.firstLineError=CK0});var x5=O((mj1,hK0)=>{var fg=p3(),hI1=fg.freeze,gK0=d1(),yK0=gK0.inherits,IJ=gK0.notEnumerableProp;function UJ($,I){function U(Y){if(!(this instanceof U))return new U(Y);if(IJ(this,"message",typeof Y==="string"?Y:I),IJ(this,"name",$),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else Error.call(this)}return yK0(U,Error),U}var xg,kg,uI1=UJ("Warning","warning"),xI1=UJ("CancellationError","cancellation error"),kI1=UJ("TimeoutError","timeout error"),Tq=UJ("AggregateError","aggregate error");try{xg=TypeError,kg=RangeError}catch($){xg=UJ("TypeError","type error"),kg=UJ("RangeError","range error")}var oX="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" ");for(d3=0;d3<oX.length;++d3)if(typeof Array.prototype[oX[d3]]==="function")Tq.prototype[oX[d3]]=Array.prototype[oX[d3]];var d3;fg.defineProperty(Tq.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0});Tq.prototype.isOperational=!0;var rX=0;Tq.prototype.toString=function(){var $=Array(rX*4+1).join(" "),I=`
|
||||
`)}};function vK0($,I,U){this._lateQueue.push($,I,U),this._queueTick()}function RK0($,I,U){this._normalQueue.push($,I,U),this._queueTick()}function jK0($){this._normalQueue._pushOne($),this._queueTick()}if(!_K0.hasDevTools)d4.prototype.invokeLater=vK0,d4.prototype.invoke=RK0,d4.prototype.settlePromises=jK0;else d4.prototype.invokeLater=function($,I,U){if(this._trampolineEnabled)vK0.call(this,$,I,U);else this._schedule(function(){setTimeout(function(){$.call(I,U)},100)})},d4.prototype.invoke=function($,I,U){if(this._trampolineEnabled)RK0.call(this,$,I,U);else this._schedule(function(){$.call(I,U)})},d4.prototype.settlePromises=function($){if(this._trampolineEnabled)jK0.call(this,$);else this._schedule(function(){$._settlePromises()})};d4.prototype._drainQueue=function($){while($.length()>0){var I=$.shift();if(typeof I!=="function"){I._settlePromises();continue}var U=$.shift(),Y=$.shift();I.call(U,Y)}};d4.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)};d4.prototype._queueTick=function(){if(!this._isTickUsed)this._isTickUsed=!0,this._schedule(this.drainQueues)};d4.prototype._reset=function(){this._isTickUsed=!1};xg.exports=d4;xg.exports.firstLineError=CK0});var k5=O((lj1,hK0)=>{var bg=p3(),hI1=bg.freeze,gK0=d1(),yK0=gK0.inherits,YJ=gK0.notEnumerableProp;function JJ($,I){function U(Y){if(!(this instanceof U))return new U(Y);if(YJ(this,"message",typeof Y==="string"?Y:I),YJ(this,"name",$),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else Error.call(this)}return yK0(U,Error),U}var fg,ig,uI1=JJ("Warning","warning"),kI1=JJ("CancellationError","cancellation error"),xI1=JJ("TimeoutError","timeout error"),Tq=JJ("AggregateError","aggregate error");try{fg=TypeError,ig=RangeError}catch($){fg=JJ("TypeError","type error"),ig=JJ("RangeError","range error")}var rX="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" ");for(d3=0;d3<rX.length;++d3)if(typeof Array.prototype[rX[d3]]==="function")Tq.prototype[rX[d3]]=Array.prototype[rX[d3]];var d3;bg.defineProperty(Tq.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0});Tq.prototype.isOperational=!0;var tX=0;Tq.prototype.toString=function(){var $=Array(tX*4+1).join(" "),I=`
|
||||
`+$+`AggregateError of:
|
||||
`;rX++,$=Array(rX*4+1).join(" ");for(var U=0;U<this.length;++U){var Y=this[U]===this?"[Circular AggregateError]":this[U]+"",J=Y.split(`
|
||||
`;tX++,$=Array(tX*4+1).join(" ");for(var U=0;U<this.length;++U){var Y=this[U]===this?"[Circular AggregateError]":this[U]+"",J=Y.split(`
|
||||
`);for(var Q=0;Q<J.length;++Q)J[Q]=$+J[Q];Y=J.join(`
|
||||
`),I+=Y+`
|
||||
`}return rX--,I};function Pq($){if(!(this instanceof Pq))return new Pq($);if(IJ(this,"name","OperationalError"),IJ(this,"message",$),this.cause=$,this.isOperational=!0,$ instanceof Error)IJ(this,"message",$.message),IJ(this,"stack",$.stack);else if(Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)}yK0(Pq,Error);var m3=Error.__BluebirdErrorTypes__;if(!m3)m3=hI1({CancellationError:xI1,TimeoutError:kI1,OperationalError:Pq,RejectionError:Pq,AggregateError:Tq}),fg.defineProperty(Error,"__BluebirdErrorTypes__",{value:m3,writable:!1,enumerable:!1,configurable:!1});hK0.exports={Error,TypeError:xg,RangeError:kg,CancellationError:m3.CancellationError,OperationalError:m3.OperationalError,TimeoutError:m3.TimeoutError,AggregateError:m3.AggregateError,Warning:uI1}});var xK0=O((lj1,uK0)=>{uK0.exports=function($,I){var U=d1(),Y=U.errorObj,J=U.isObject;function Q(w,Z){if(J(w)){if(w instanceof $)return w;var V=q(w);if(V===Y){if(Z)Z._pushContext();var X=$.reject(V.e);if(Z)Z._popContext();return X}else if(typeof V==="function"){if(G(w)){var X=new $(I);return w._then(X._fulfill,X._reject,void 0,X,null),X}return W(w,V,Z)}}return w}function K(w){return w.then}function q(w){try{return K(w)}catch(Z){return Y.e=Z,Y}}var H={}.hasOwnProperty;function G(w){try{return H.call(w,"_promise0")}catch(Z){return!1}}function W(w,Z,V){var X=new $(I),L=X;if(V)V._pushContext();if(X._captureStackTrace(),V)V._popContext();var D=!0,F=U.tryCatch(Z).call(w,P,E);if(D=!1,X&&F===Y)X._rejectCallback(F.e,!0,!0),X=null;function P(A){if(!X)return;X._resolveCallback(A),X=null}function E(A){if(!X)return;X._rejectCallback(A,D,!0),X=null}return L}return Q}});var fK0=O((oj1,kK0)=>{kK0.exports=function($,I,U,Y,J){var Q=d1(),K=Q.isArray;function q(G){switch(G){case-2:return[];case-3:return{}}}function H(G){var W=this._promise=new $(I);if(G instanceof $)W._propagateFrom(G,3);W._setOnCancel(this),this._values=G,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return Q.inherits(H,J),H.prototype.length=function(){return this._length},H.prototype.promise=function(){return this._promise},H.prototype._init=function G(W,w){var Z=U(this._values,this._promise);if(Z instanceof $){Z=Z._target();var V=Z._bitField;if(this._values=Z,(V&50397184)===0)return this._promise._setAsyncGuaranteed(),Z._then(G,this._reject,void 0,this,w);else if((V&33554432)!==0)Z=Z._value();else if((V&16777216)!==0)return this._reject(Z._reason());else return this._cancel()}if(Z=Q.asArray(Z),Z===null){var X=Y("expecting an array or an iterable object but got "+Q.classString(Z)).reason();this._promise._rejectCallback(X,!1);return}if(Z.length===0){if(w===-5)this._resolveEmptyArray();else this._resolve(q(w));return}this._iterate(Z)},H.prototype._iterate=function(G){var W=this.getActualLength(G.length);this._length=W,this._values=this.shouldCopyValues()?Array(W):this._values;var w=this._promise,Z=!1,V=null;for(var X=0;X<W;++X){var L=U(G[X],w);if(L instanceof $)L=L._target(),V=L._bitField;else V=null;if(Z){if(V!==null)L.suppressUnhandledRejections()}else if(V!==null)if((V&50397184)===0)L._proxy(this,X),this._values[X]=L;else if((V&33554432)!==0)Z=this._promiseFulfilled(L._value(),X);else if((V&16777216)!==0)Z=this._promiseRejected(L._reason(),X);else Z=this._promiseCancelled(X);else Z=this._promiseFulfilled(L,X)}if(!Z)w._setAsyncGuaranteed()},H.prototype._isResolved=function(){return this._values===null},H.prototype._resolve=function(G){this._values=null,this._promise._fulfill(G)},H.prototype._cancel=function(){if(this._isResolved()||!this._promise._isCancellable())return;this._values=null,this._promise._cancel()},H.prototype._reject=function(G){this._values=null,this._promise._rejectCallback(G,!1)},H.prototype._promiseFulfilled=function(G,W){this._values[W]=G;var w=++this._totalResolved;if(w>=this._length)return this._resolve(this._values),!0;return!1},H.prototype._promiseCancelled=function(){return this._cancel(),!0},H.prototype._promiseRejected=function(G){return this._totalResolved++,this._reject(G),!0},H.prototype._resultCancelled=function(){if(this._isResolved())return;var G=this._values;if(this._cancel(),G instanceof $)G.cancel();else for(var W=0;W<G.length;++W)if(G[W]instanceof $)G[W].cancel()},H.prototype.shouldCopyValues=function(){return!0},H.prototype.getActualLength=function(G){return G},H}});var iK0=O((rj1,bK0)=>{bK0.exports=function($){var I=!1,U=[];$.prototype._promiseCreated=function(){},$.prototype._pushContext=function(){},$.prototype._popContext=function(){return null},$._peekContext=$.prototype._peekContext=function(){};function Y(){this._trace=new Y.CapturedTrace(Q())}Y.prototype._pushContext=function(){if(this._trace!==void 0)this._trace._promiseCreated=null,U.push(this._trace)},Y.prototype._popContext=function(){if(this._trace!==void 0){var K=U.pop(),q=K._promiseCreated;return K._promiseCreated=null,q}return null};function J(){if(I)return new Y}function Q(){var K=U.length-1;if(K>=0)return U[K];return}return Y.CapturedTrace=null,Y.create=J,Y.deactivateLong
Line truncated
|
||||
`}return tX--,I};function Pq($){if(!(this instanceof Pq))return new Pq($);if(YJ(this,"name","OperationalError"),YJ(this,"message",$),this.cause=$,this.isOperational=!0,$ instanceof Error)YJ(this,"message",$.message),YJ(this,"stack",$.stack);else if(Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)}yK0(Pq,Error);var m3=Error.__BluebirdErrorTypes__;if(!m3)m3=hI1({CancellationError:kI1,TimeoutError:xI1,OperationalError:Pq,RejectionError:Pq,AggregateError:Tq}),bg.defineProperty(Error,"__BluebirdErrorTypes__",{value:m3,writable:!1,enumerable:!1,configurable:!1});hK0.exports={Error,TypeError:fg,RangeError:ig,CancellationError:m3.CancellationError,OperationalError:m3.OperationalError,TimeoutError:m3.TimeoutError,AggregateError:m3.AggregateError,Warning:uI1}});var kK0=O((oj1,uK0)=>{uK0.exports=function($,I){var U=d1(),Y=U.errorObj,J=U.isObject;function Q(w,Z){if(J(w)){if(w instanceof $)return w;var V=q(w);if(V===Y){if(Z)Z._pushContext();var X=$.reject(V.e);if(Z)Z._popContext();return X}else if(typeof V==="function"){if(G(w)){var X=new $(I);return w._then(X._fulfill,X._reject,void 0,X,null),X}return W(w,V,Z)}}return w}function K(w){return w.then}function q(w){try{return K(w)}catch(Z){return Y.e=Z,Y}}var H={}.hasOwnProperty;function G(w){try{return H.call(w,"_promise0")}catch(Z){return!1}}function W(w,Z,V){var X=new $(I),L=X;if(V)V._pushContext();if(X._captureStackTrace(),V)V._popContext();var D=!0,F=U.tryCatch(Z).call(w,P,T);if(D=!1,X&&F===Y)X._rejectCallback(F.e,!0,!0),X=null;function P(A){if(!X)return;X._resolveCallback(A),X=null}function T(A){if(!X)return;X._rejectCallback(A,D,!0),X=null}return L}return Q}});var fK0=O((rj1,xK0)=>{xK0.exports=function($,I,U,Y,J){var Q=d1(),K=Q.isArray;function q(G){switch(G){case-2:return[];case-3:return{}}}function H(G){var W=this._promise=new $(I);if(G instanceof $)W._propagateFrom(G,3);W._setOnCancel(this),this._values=G,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return Q.inherits(H,J),H.prototype.length=function(){return this._length},H.prototype.promise=function(){return this._promise},H.prototype._init=function G(W,w){var Z=U(this._values,this._promise);if(Z instanceof $){Z=Z._target();var V=Z._bitField;if(this._values=Z,(V&50397184)===0)return this._promise._setAsyncGuaranteed(),Z._then(G,this._reject,void 0,this,w);else if((V&33554432)!==0)Z=Z._value();else if((V&16777216)!==0)return this._reject(Z._reason());else return this._cancel()}if(Z=Q.asArray(Z),Z===null){var X=Y("expecting an array or an iterable object but got "+Q.classString(Z)).reason();this._promise._rejectCallback(X,!1);return}if(Z.length===0){if(w===-5)this._resolveEmptyArray();else this._resolve(q(w));return}this._iterate(Z)},H.prototype._iterate=function(G){var W=this.getActualLength(G.length);this._length=W,this._values=this.shouldCopyValues()?Array(W):this._values;var w=this._promise,Z=!1,V=null;for(var X=0;X<W;++X){var L=U(G[X],w);if(L instanceof $)L=L._target(),V=L._bitField;else V=null;if(Z){if(V!==null)L.suppressUnhandledRejections()}else if(V!==null)if((V&50397184)===0)L._proxy(this,X),this._values[X]=L;else if((V&33554432)!==0)Z=this._promiseFulfilled(L._value(),X);else if((V&16777216)!==0)Z=this._promiseRejected(L._reason(),X);else Z=this._promiseCancelled(X);else Z=this._promiseFulfilled(L,X)}if(!Z)w._setAsyncGuaranteed()},H.prototype._isResolved=function(){return this._values===null},H.prototype._resolve=function(G){this._values=null,this._promise._fulfill(G)},H.prototype._cancel=function(){if(this._isResolved()||!this._promise._isCancellable())return;this._values=null,this._promise._cancel()},H.prototype._reject=function(G){this._values=null,this._promise._rejectCallback(G,!1)},H.prototype._promiseFulfilled=function(G,W){this._values[W]=G;var w=++this._totalResolved;if(w>=this._length)return this._resolve(this._values),!0;return!1},H.prototype._promiseCancelled=function(){return this._cancel(),!0},H.prototype._promiseRejected=function(G){return this._totalResolved++,this._reject(G),!0},H.prototype._resultCancelled=function(){if(this._isResolved())return;var G=this._values;if(this._cancel(),G instanceof $)G.cancel();else for(var W=0;W<G.length;++W)if(G[W]instanceof $)G[W].cancel()},H.prototype.shouldCopyValues=function(){return!0},H.prototype.getActualLength=function(G){return G},H}});var bK0=O((tj1,iK0)=>{iK0.exports=function($){var I=!1,U=[];$.prototype._promiseCreated=function(){},$.prototype._pushContext=function(){},$.prototype._popContext=function(){return null},$._peekContext=$.prototype._peekContext=function(){};function Y(){this._trace=new Y.CapturedTrace(Q())}Y.prototype._pushContext=function(){if(this._trace!==void 0)this._trace._promiseCreated=null,U.push(this._trace)},Y.prototype._popContext=function(){if(this._trace!==void 0){var K=U.pop(),q=K._promiseCreated;return K._promiseCreated=null,q}return null};function J(){if(I)return new Y}function Q(){var K=U.length-1;if(K>=0)return U[K];return}return Y.CapturedTrace=null,Y.create=J,Y.deactivateLong
Line truncated
|
||||
|
||||
See http://goo.gl/MqrFmX
|
||||
`);if(!v0.longStackTraces&&b6()){var a=$.prototype._captureStackTrace,N=$.prototype._attachExtraTrace;v0.longStackTraces=!0,A=function(){if(Y.haveItemsQueued()&&!v0.longStackTraces)throw Error(`cannot enable long stack traces after promises have been created
|
||||
`);if(!v0.longStackTraces&&i6()){var a=$.prototype._captureStackTrace,N=$.prototype._attachExtraTrace;v0.longStackTraces=!0,A=function(){if(Y.haveItemsQueued()&&!v0.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(),Y.enableTrampoline(),v0.longStackTraces=!1},$.prototype._captureStackTrace=J0,$.prototype._attachExtraTrace=w0,I.activateLongStackTraces(),Y.disableTrampolineIfNecessary()}},$.hasLongStackTraces=function(){return v0.longStackTraces&&b6()};var R=function(){try{if(typeof CustomEvent==="function"){var a=new CustomEvent("CustomEvent");return Q.global.dispatchEvent(a),function(N,M){var C=new CustomEvent(N.toLowerCase(),{detail:M,cancelable:!0});return!Q.global.dispatchEvent(C)}}else if(typeof Event==="function"){var a=new Event("CustomEvent");return Q.global.dispatchEvent(a),function(M,C){var u=new Event(M.toLowerCase(),{cancelable:!0});return u.detail=C,!Q.global.dispatchEvent(u)}}else{var a=document.createEvent("CustomEvent");return a.initCustomEvent("testingtheevent",!1,!0,{}),Q.global.dispatchEvent(a),function(M,C){var u=document.createEvent("CustomEvent");return u.initCustomEvent(M.toLowerCase(),!1,!0,C),!Q.global.dispatchEvent(u)}}}catch(N){}return function(){return!1}}(),k=function(){if(Q.isNode)return function(){return process.emit.apply(process,arguments)};else{if(!Q.global)return function(){return!1};return function(a){var N="on"+a.toLowerCase(),M=Q.global[N];if(!M)return!1;return M.apply(Q.global,[].slice.call(arguments,1)),!0}}}();function y(a,N){return{promise:N}}var f={promiseCreated:y,promiseFulfilled:y,promiseRejected:y,promiseResolved:y,promiseCancelled:y,promiseChained:function(a,N,M){return{promise:N,child:M}},warning:function(a,N){return{warning:N}},unhandledRejection:function(a,N,M){return{reason:N,promise:M}},rejectionHandled:y},j=function(a){var N=!1;try{N=k.apply(null,arguments)}catch(C){Y.throwLater(C),N=!0}var M=!1;try{M=R(a,f[a].apply(null,arguments))}catch(C){Y.throwLater(C),M=!0}return M||N};$.config=function(a){if(a=Object(a),"longStackTraces"in a){if(a.longStackTraces)$.longStackTraces();else if(!a.longStackTraces&&$.hasLongStackTraces())A()}if("warnings"in a){var N=a.warnings;if(v0.warnings=!!N,E=v0.warnings,Q.isObject(N)){if("wForgottenReturn"in N)E=!!N.wForgottenReturn}}if("cancellation"in a&&a.cancellation&&!v0.cancellation){if(Y.haveItemsQueued())throw Error("cannot enable cancellation after promises are in use");$.prototype._clearCancellationData=U0,$.prototype._propagateFrom=B,$.prototype._onCancel=b,$.prototype._setOnCancel=i,$.prototype._attachCancellationCallback=S,$.prototype._execute=n,c=B,v0.cancellation=!0}if("monitoring"in a){if(a.monitoring&&!v0.monitoring)v0.monitoring=!0,$.prototype._fireEvent=j;else if(!a.monitoring&&v0.monitoring)v0.monitoring=!1,$.prototype._fireEvent=p}return $};function p(){return!1}$.prototype._fireEvent=p,$.prototype._execute=function(a,N,M){try{a(N,M)}catch(C){return C}},$.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 n(a,N,M){var C=this;try{a(N,M,function(u){if(typeof u!=="function")throw TypeError("onCancel must be a function, got: "+Q.toString(u));C._attachCancellationCallback(u)})}catch(u){return u}}function S(a){if(!this._isCancellable())return this;var N=this._onCancel();if(N!==void 0)if(Q.isArray(N))N.push(a);else this._setOnCancel([N,a]);else this._setOnCancel(a)}function b(){return this._onCancelField}function i(a){this._onCancelField=a}function U0(){this._cancellationParent=void 0,this._onCancelField=void 0}function B(a,N){if((N&1)!==0){this._cancellationParent=a;var M=a._branchesRemainingToCancel;if(M===void 0)M=0;a._branchesRemainingToCancel=M+1}if((N&2)!==0&&a._isBound())this._setBoundTo(a._boundTo)}function x(a,N){if((N&2)!==0&&a._isBound())this._setBoundTo(a._boundTo)}var c=x;function r(){var a=this._boundTo;if(a!==void 0){if(a instanceof $)if(a.isFulfilled())return a.value();else return}return a}function J0(){this._trace=new J$(this._peekContext())}function w0(a,N){if(K(a)){var M=this._trace;if(M!==void 0){if(N)M=M._parent}if(M!==void 0)M.attachExtraTrace(a);else if(!a.__stackCleaned__){var C=U1(a);Q.notEnumerableProp(a,"stack",C.message+`
|
||||
`);$.prototype._captureStackTrace=a,$.prototype._attachExtraTrace=N,I.deactivateLongStackTraces(),Y.enableTrampoline(),v0.longStackTraces=!1},$.prototype._captureStackTrace=J0,$.prototype._attachExtraTrace=w0,I.activateLongStackTraces(),Y.disableTrampolineIfNecessary()}},$.hasLongStackTraces=function(){return v0.longStackTraces&&i6()};var R=function(){try{if(typeof CustomEvent==="function"){var a=new CustomEvent("CustomEvent");return Q.global.dispatchEvent(a),function(N,M){var C=new CustomEvent(N.toLowerCase(),{detail:M,cancelable:!0});return!Q.global.dispatchEvent(C)}}else if(typeof Event==="function"){var a=new Event("CustomEvent");return Q.global.dispatchEvent(a),function(M,C){var u=new Event(M.toLowerCase(),{cancelable:!0});return u.detail=C,!Q.global.dispatchEvent(u)}}else{var a=document.createEvent("CustomEvent");return a.initCustomEvent("testingtheevent",!1,!0,{}),Q.global.dispatchEvent(a),function(M,C){var u=document.createEvent("CustomEvent");return u.initCustomEvent(M.toLowerCase(),!1,!0,C),!Q.global.dispatchEvent(u)}}}catch(N){}return function(){return!1}}(),x=function(){if(Q.isNode)return function(){return process.emit.apply(process,arguments)};else{if(!Q.global)return function(){return!1};return function(a){var N="on"+a.toLowerCase(),M=Q.global[N];if(!M)return!1;return M.apply(Q.global,[].slice.call(arguments,1)),!0}}}();function y(a,N){return{promise:N}}var f={promiseCreated:y,promiseFulfilled:y,promiseRejected:y,promiseResolved:y,promiseCancelled:y,promiseChained:function(a,N,M){return{promise:N,child:M}},warning:function(a,N){return{warning:N}},unhandledRejection:function(a,N,M){return{reason:N,promise:M}},rejectionHandled:y},j=function(a){var N=!1;try{N=x.apply(null,arguments)}catch(C){Y.throwLater(C),N=!0}var M=!1;try{M=R(a,f[a].apply(null,arguments))}catch(C){Y.throwLater(C),M=!0}return M||N};$.config=function(a){if(a=Object(a),"longStackTraces"in a){if(a.longStackTraces)$.longStackTraces();else if(!a.longStackTraces&&$.hasLongStackTraces())A()}if("warnings"in a){var N=a.warnings;if(v0.warnings=!!N,T=v0.warnings,Q.isObject(N)){if("wForgottenReturn"in N)T=!!N.wForgottenReturn}}if("cancellation"in a&&a.cancellation&&!v0.cancellation){if(Y.haveItemsQueued())throw Error("cannot enable cancellation after promises are in use");$.prototype._clearCancellationData=U0,$.prototype._propagateFrom=B,$.prototype._onCancel=i,$.prototype._setOnCancel=b,$.prototype._attachCancellationCallback=S,$.prototype._execute=n,c=B,v0.cancellation=!0}if("monitoring"in a){if(a.monitoring&&!v0.monitoring)v0.monitoring=!0,$.prototype._fireEvent=j;else if(!a.monitoring&&v0.monitoring)v0.monitoring=!1,$.prototype._fireEvent=p}return $};function p(){return!1}$.prototype._fireEvent=p,$.prototype._execute=function(a,N,M){try{a(N,M)}catch(C){return C}},$.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 n(a,N,M){var C=this;try{a(N,M,function(u){if(typeof u!=="function")throw TypeError("onCancel must be a function, got: "+Q.toString(u));C._attachCancellationCallback(u)})}catch(u){return u}}function S(a){if(!this._isCancellable())return this;var N=this._onCancel();if(N!==void 0)if(Q.isArray(N))N.push(a);else this._setOnCancel([N,a]);else this._setOnCancel(a)}function i(){return this._onCancelField}function b(a){this._onCancelField=a}function U0(){this._cancellationParent=void 0,this._onCancelField=void 0}function B(a,N){if((N&1)!==0){this._cancellationParent=a;var M=a._branchesRemainingToCancel;if(M===void 0)M=0;a._branchesRemainingToCancel=M+1}if((N&2)!==0&&a._isBound())this._setBoundTo(a._boundTo)}function k(a,N){if((N&2)!==0&&a._isBound())this._setBoundTo(a._boundTo)}var c=k;function r(){var a=this._boundTo;if(a!==void 0){if(a instanceof $)if(a.isFulfilled())return a.value();else return}return a}function J0(){this._trace=new J$(this._peekContext())}function w0(a,N){if(K(a)){var M=this._trace;if(M!==void 0){if(N)M=M._parent}if(M!==void 0)M.attachExtraTrace(a);else if(!a.__stackCleaned__){var C=U1(a);Q.notEnumerableProp(a,"stack",C.message+`
|
||||
`+C.stack.join(`
|
||||
`)),Q.notEnumerableProp(a,"__stackCleaned__",!0)}}}function A0(a,N,M,C,u){if(a===void 0&&N!==null&&E){if(u!==void 0&&u._returnedNonUndefined())return;if((C._bitField&65535)===0)return;if(M)M=M+" ";var s="",m="";if(N._trace){var e=N._trace.stack.split(`
|
||||
`),K0=Q0(e);for(var W0=K0.length-1;W0>=0;--W0){var _0=K0[W0];if(!W.test(_0)){var i0=_0.match(w);if(i0)s="at "+i0[1]+":"+i0[2]+":"+i0[3]+" ";break}}if(K0.length>0){var f0=K0[0];for(var W0=0;W0<e.length;++W0)if(e[W0]===f0){if(W0>0)m=`
|
||||
`)),Q.notEnumerableProp(a,"__stackCleaned__",!0)}}}function A0(a,N,M,C,u){if(a===void 0&&N!==null&&T){if(u!==void 0&&u._returnedNonUndefined())return;if((C._bitField&65535)===0)return;if(M)M=M+" ";var s="",m="";if(N._trace){var e=N._trace.stack.split(`
|
||||
`),K0=Q0(e);for(var W0=K0.length-1;W0>=0;--W0){var _0=K0[W0];if(!W.test(_0)){var b0=_0.match(w);if(b0)s="at "+b0[1]+":"+b0[2]+":"+b0[3]+" ";break}}if(K0.length>0){var f0=K0[0];for(var W0=0;W0<e.length;++W0)if(e[W0]===f0){if(W0>0)m=`
|
||||
`+e[W0-1];break}}}var H1="a promise was created in a "+M+"handler "+s+"but was not returned from it, see http://goo.gl/rRqMUw"+m;C._warn(H1,!0,N)}}function j0(a,N){var M=a+" is deprecated and will be removed in a future version.";if(N)M+=" Use "+N+" instead.";return q1(M)}function q1(a,N,M){if(!v0.warnings)return;var C=new J(a),u;if(N)M._attachExtraTrace(C);else if(v0.longStackTraces&&(u=$._peekContext()))u.attachExtraTrace(C);else{var s=U1(C);C.stack=s.message+`
|
||||
`+s.stack.join(`
|
||||
`)}if(!j("warning",C))O1(C,"",!0)}function k0(a,N){for(var M=0;M<N.length-1;++M)N[M].push("From previous event:"),N[M]=N[M].join(`
|
||||
`)}if(!j("warning",C))O1(C,"",!0)}function x0(a,N){for(var M=0;M<N.length-1;++M)N[M].push("From previous event:"),N[M]=N[M].join(`
|
||||
`);if(M<N.length)N[M]=N[M].join(`
|
||||
`);return a+`
|
||||
`+N.join(`
|
||||
`)}function I1(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 M=1;M<a.length;++M){var C=a[M],u=N.length-1,s=N[u],m=-1;for(var e=C.length-1;e>=0;--e)if(C[e]===s){m=e;break}for(var e=m;e>=0;--e){var K0=C[e];if(N[u]===K0)N.pop(),u--;else break}N=C}}function Q0(a){var N=[];for(var M=0;M<a.length;++M){var C=a[M],u=C===" (No stack trace)"||Z.test(C),s=u&&P6(C);if(u&&!s){if(X&&C.charAt(0)!==" ")C=" "+C;N.push(C)}}return N}function R0(a){var N=a.stack.replace(/\s+$/g,"").split(`
|
||||
`);for(var M=0;M<N.length;++M){var C=N[M];if(C===" (No stack trace)"||Z.test(C))break}if(M>0&&a.name!="SyntaxError")N=N.slice(M);return N}function U1(a){var N=a.stack,M=a.toString();return N=typeof N==="string"&&N.length>0?R0(a):[" (No stack trace)"],{message:M,stack:a.name=="SyntaxError"?N:Q0(N)}}function O1(a,N,M){if(typeof console<"u"){var C;if(Q.isObject(a)){var u=a.stack;C=N+V(u,a)}else C=N+String(a);if(typeof L==="function")L(C,M);else if(typeof console.log==="function"||typeof console.log==="object")console.log(C)}}function b4(a,N,M,C){var u=!1;try{if(typeof N==="function")if(u=!0,a==="rejectionHandled")N(C);else N(M,C)}catch(s){Y.throwLater(s)}if(a==="unhandledRejection"){if(!j(a,M,C)&&!u)O1(M,"Unhandled rejection ")}else j(a,C)}function f6(a){var N;if(typeof a==="function")N="[function "+(a.name||"anonymous")+"]";else{N=a&&typeof a.toString==="function"?a.toString():Q.toString(a);var M=/\[object [a-zA-Z0-9$_]+\]/;if(M.test(N))try{var C=JSON.stringify(a);N=C}catch(u){}if(N.length===0)N="(empty array)"}return"(<"+O$(N)+">, no stack trace)"}function O$(a){var N=41;if(a.length<N)return a;return a.substr(0,N-3)+"..."}function b6(){return typeof a5==="function"}var P6=function(){return!1},F$=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Y$(a){var N=a.match(F$);if(N)return{fileName:N[1],line:parseInt(N[2],10)}}function T7(a,N){if(!b6())return;var M=a.stack.split(`
|
||||
`);for(var M=0;M<N.length;++M){var C=N[M];if(C===" (No stack trace)"||Z.test(C))break}if(M>0&&a.name!="SyntaxError")N=N.slice(M);return N}function U1(a){var N=a.stack,M=a.toString();return N=typeof N==="string"&&N.length>0?R0(a):[" (No stack trace)"],{message:M,stack:a.name=="SyntaxError"?N:Q0(N)}}function O1(a,N,M){if(typeof console<"u"){var C;if(Q.isObject(a)){var u=a.stack;C=N+V(u,a)}else C=N+String(a);if(typeof L==="function")L(C,M);else if(typeof console.log==="function"||typeof console.log==="object")console.log(C)}}function i4(a,N,M,C){var u=!1;try{if(typeof N==="function")if(u=!0,a==="rejectionHandled")N(C);else N(M,C)}catch(s){Y.throwLater(s)}if(a==="unhandledRejection"){if(!j(a,M,C)&&!u)O1(M,"Unhandled rejection ")}else j(a,C)}function f6(a){var N;if(typeof a==="function")N="[function "+(a.name||"anonymous")+"]";else{N=a&&typeof a.toString==="function"?a.toString():Q.toString(a);var M=/\[object [a-zA-Z0-9$_]+\]/;if(M.test(N))try{var C=JSON.stringify(a);N=C}catch(u){}if(N.length===0)N="(empty array)"}return"(<"+F$(N)+">, no stack trace)"}function F$(a){var N=41;if(a.length<N)return a;return a.substr(0,N-3)+"..."}function i6(){return typeof a5==="function"}var P6=function(){return!1},N$=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Y$(a){var N=a.match(N$);if(N)return{fileName:N[1],line:parseInt(N[2],10)}}function T7(a,N){if(!i6())return;var M=a.stack.split(`
|
||||
`),C=N.stack.split(`
|
||||
`),u=-1,s=-1,m,e;for(var K0=0;K0<M.length;++K0){var W0=Y$(M[K0]);if(W0){m=W0.fileName,u=W0.line;break}}for(var K0=0;K0<C.length;++K0){var W0=Y$(C[K0]);if(W0){e=W0.fileName,s=W0.line;break}}if(u<0||s<0||!m||!e||m!==e||u>=s)return;P6=function(_0){if(G.test(_0))return!0;var i0=Y$(_0);if(i0){if(i0.fileName===m&&(u<=i0.line&&i0.line<=s))return!0}return!1}}function J$(a){this._parent=a,this._promisesCreated=0;var N=this._length=1+(a===void 0?0:a._length);if(a5(this,J$),N>32)this.uncycle()}Q.inherits(J$,Error),I.CapturedTrace=J$,J$.prototype.uncycle=function(){var a=this._length;if(a<2)return;var N=[],M={};for(var C=0,u=this;u!==void 0;++C)N.push(u),u=u._parent;a=this._length=C;for(var C=a-1;C>=0;--C){var s=N[C].stack;if(M[s]===void 0)M[s]=C}for(var C=0;C<a;++C){var m=N[C].stack,e=M[m];if(e!==void 0&&e!==C){if(e>0)N[e-1]._parent=void 0,N[e-1]._length=1;N[C]._parent=void 0,N[C]._length=1;var K0=C>0?N[C-1]:this;if(e<a-1)K0._parent=N[e+1],K0._parent.uncycle(),K0._length=K0._parent._length+1;else K0._parent=void 0,K0._length=1;var W0=K0._length+1;for(var _0=C-2;_0>=0;--_0)N[_0]._length=W0,W0++;return}}},J$.prototype.attachExtraTrace=function(a){if(a.__stackCleaned__)return;this.uncycle();var N=U1(a),M=N.message,C=[N.stack],u=this;while(u!==void 0)C.push(Q0(u.stack.split(`
|
||||
`))),u=u._parent;M0(C),I1(C),Q.notEnumerableProp(a,"stack",k0(M,C)),Q.notEnumerableProp(a,"__stackCleaned__",!0)};var a5=function(){var N=/^\s*at\s*/,M=function(m,e){if(typeof m==="string")return m;if(e.name!==void 0&&e.message!==void 0)return e.toString();return f6(e)};if(typeof Error.stackTraceLimit==="number"&&typeof Error.captureStackTrace==="function"){Error.stackTraceLimit+=6,Z=N,V=M;var C=Error.captureStackTrace;return P6=function(m){return G.test(m)},function(m,e){Error.stackTraceLimit+=6,C(m,e),Error.stackTraceLimit-=6}}var u=Error();if(typeof u.stack==="string"&&u.stack.split(`
|
||||
`),u=-1,s=-1,m,e;for(var K0=0;K0<M.length;++K0){var W0=Y$(M[K0]);if(W0){m=W0.fileName,u=W0.line;break}}for(var K0=0;K0<C.length;++K0){var W0=Y$(C[K0]);if(W0){e=W0.fileName,s=W0.line;break}}if(u<0||s<0||!m||!e||m!==e||u>=s)return;P6=function(_0){if(G.test(_0))return!0;var b0=Y$(_0);if(b0){if(b0.fileName===m&&(u<=b0.line&&b0.line<=s))return!0}return!1}}function J$(a){this._parent=a,this._promisesCreated=0;var N=this._length=1+(a===void 0?0:a._length);if(a5(this,J$),N>32)this.uncycle()}Q.inherits(J$,Error),I.CapturedTrace=J$,J$.prototype.uncycle=function(){var a=this._length;if(a<2)return;var N=[],M={};for(var C=0,u=this;u!==void 0;++C)N.push(u),u=u._parent;a=this._length=C;for(var C=a-1;C>=0;--C){var s=N[C].stack;if(M[s]===void 0)M[s]=C}for(var C=0;C<a;++C){var m=N[C].stack,e=M[m];if(e!==void 0&&e!==C){if(e>0)N[e-1]._parent=void 0,N[e-1]._length=1;N[C]._parent=void 0,N[C]._length=1;var K0=C>0?N[C-1]:this;if(e<a-1)K0._parent=N[e+1],K0._parent.uncycle(),K0._length=K0._parent._length+1;else K0._parent=void 0,K0._length=1;var W0=K0._length+1;for(var _0=C-2;_0>=0;--_0)N[_0]._length=W0,W0++;return}}},J$.prototype.attachExtraTrace=function(a){if(a.__stackCleaned__)return;this.uncycle();var N=U1(a),M=N.message,C=[N.stack],u=this;while(u!==void 0)C.push(Q0(u.stack.split(`
|
||||
`))),u=u._parent;M0(C),I1(C),Q.notEnumerableProp(a,"stack",x0(M,C)),Q.notEnumerableProp(a,"__stackCleaned__",!0)};var a5=function(){var N=/^\s*at\s*/,M=function(m,e){if(typeof m==="string")return m;if(e.name!==void 0&&e.message!==void 0)return e.toString();return f6(e)};if(typeof Error.stackTraceLimit==="number"&&typeof Error.captureStackTrace==="function"){Error.stackTraceLimit+=6,Z=N,V=M;var C=Error.captureStackTrace;return P6=function(m){return G.test(m)},function(m,e){Error.stackTraceLimit+=6,C(m,e),Error.stackTraceLimit-=6}}var u=Error();if(typeof u.stack==="string"&&u.stack.split(`
|
||||
`)[0].indexOf("stackDetection@")>=0)return Z=/@/,V=M,X=!0,function(e){e.stack=Error().stack};var s;try{throw Error()}catch(m){s="stack"in m}if(!("stack"in u)&&s&&typeof Error.stackTraceLimit==="number")return Z=N,V=M,function(e){Error.stackTraceLimit+=6;try{throw Error()}catch(K0){e.stack=K0.stack}Error.stackTraceLimit-=6};return V=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 f6(e)},null}([]);if(typeof console<"u"&&typeof console.warn<"u"){if(L=function(a){console.warn(a)},Q.isNode&&process.stderr.isTTY)L=function(a,N){var M=N?"\x1B[33m":"\x1B[31m";console.warn(M+a+`\x1B[0m
|
||||
`)};else if(!Q.isNode&&typeof Error().stack==="string")L=function(a,N){console.warn("%c"+a,N?"color: darkorange":"color: red")}}var v0={warnings:F,longStackTraces:!1,cancellation:!1,monitoring:!1};if(P)$.longStackTraces();return{longStackTraces:function(){return v0.longStackTraces},warnings:function(){return v0.warnings},cancellation:function(){return v0.cancellation},monitoring:function(){return v0.monitoring},propagateFromFunction:function(){return c},boundValueFunction:function(){return r},checkForgottenReturns:A0,setBounds:T7,warn:q1,deprecated:j0,CapturedTrace:J$,fireDomEvent:R,fireGlobalEvent:k}}});var dK0=O((aj1,cK0)=>{cK0.exports=function($,I){var U=d1(),Y=$.CancellationError,J=U.errorObj;function Q(w,Z,V){this.promise=w,this.type=Z,this.handler=V,this.called=!1,this.cancelPromise=null}Q.prototype.isFinallyHandler=function(){return this.type===0};function K(w){this.finallyHandler=w}K.prototype._resultCancelled=function(){q(this.finallyHandler)};function q(w,Z){if(w.cancelPromise!=null){if(arguments.length>1)w.cancelPromise._reject(Z);else w.cancelPromise._cancel();return w.cancelPromise=null,!0}return!1}function H(){return W.call(this,this.promise._target()._settledValue())}function G(w){if(q(this,w))return;return J.e=w,J}function W(w){var Z=this.promise,V=this.handler;if(!this.called){this.called=!0;var X=this.isFinallyHandler()?V.call(Z._boundValue()):V.call(Z._boundValue(),w);if(X!==void 0){Z._setReturnedNonUndefined();var L=I(X,Z);if(L instanceof $){if(this.cancelPromise!=null){if(L._isCancelled()){var D=new Y("late cancellation observer");return Z._attachExtraTrace(D),J.e=D,J}else if(L.isPending())L._attachCancellationCallback(new K(this))}return L._then(H,G,void 0,this,void 0)}}}if(Z.isRejected())return q(this),J.e=w,J;else return q(this),w}return $.prototype._passThrough=function(w,Z,V,X){if(typeof w!=="function")return this.then();return this._then(V,X,void 0,new Q(this,Z,w),void 0)},$.prototype.lastly=$.prototype.finally=function(w){return this._passThrough(w,0,W,W)},$.prototype.tap=function(w){return this._passThrough(w,1,W)},Q}});var lK0=O((sj1,mK0)=>{mK0.exports=function($){var I=d1(),U=p3().keys,Y=I.tryCatch,J=I.errorObj;function Q(K,q,H){return function(G){var W=H._boundValue();$:for(var w=0;w<K.length;++w){var Z=K[w];if(Z===Error||Z!=null&&Z.prototype instanceof Error){if(G instanceof Z)return Y(q).call(W,G)}else if(typeof Z==="function"){var V=Y(Z).call(W,G);if(V===J)return V;else if(V)return Y(q).call(W,G)}else if(I.isObject(G)){var X=U(Z);for(var L=0;L<X.length;++L){var D=X[L];if(Z[D]!=G[D])continue $}return Y(q).call(W,G)}}return $}}return Q}});var bg=O((ej1,tK0)=>{var oK0=d1(),fI1=oK0.maybeWrapAsError,bI1=x5(),iI1=bI1.OperationalError,rK0=p3();function nI1($){return $ instanceof Error&&rK0.getPrototypeOf($)===Error.prototype}var pI1=/^(?:name|message|stack|cause)$/;function cI1($){var I;if(nI1($)){I=new iI1($),I.name=$.name,I.message=$.message,I.stack=$.stack;var U=rK0.keys($);for(var Y=0;Y<U.length;++Y){var J=U[Y];if(!pI1.test(J))I[J]=$[J]}return I}return oK0.markAsOriginatingFromRejection($),$}function dI1($,I){return function(U,Y){if($===null)return;if(U){var J=cI1(fI1(U));$._attachExtraTrace(J),$._reject(J)}else if(!I)$._fulfill(Y);else{var Q=arguments.length,K=Array(Math.max(Q-1,0));for(var q=1;q<Q;++q)K[q-1]=arguments[q];$._fulfill(K)}$=null}}tK0.exports=dI1});var sK0=O(($C1,aK0)=>{aK0.exports=function($,I,U,Y,J){var Q=d1(),K=Q.tryCatch;$.method=function(q){if(typeof q!=="function")throw new $.TypeError("expecting a function but got "+Q.classString(q));return function(){var H=new $(I);H._captureStackTrace(),H._pushContext();var G=K(q).apply(this,arguments),W=H._popContext();return J.checkForgottenReturns(G,W,"Promise.method",H),H._resolveFromSyncValue(G),H}},$.attempt=$.try=function(q){if(typeof q!=="function")return Y("expecting a function but got "+Q.classString(q));var H=new $(I);H._captureStackTrace(),H._pushContext();var G;if(arguments.length>1){J.deprecated("calling Promise.try with more than 1 argument");var W=arguments[1],w=arguments[2];G=Q.isArray(W)?K(q).apply(w,W):K(q).call(w,W)}else G=K(q)();var Z=H._popContext();return J.checkForgottenReturns(G,Z,"Promise.try",H),H._resolveFromSyncValue(G),H},$.prototype._resolveFromSyncValue=function(q){if(q===Q.errorObj)this._rejectCallback(q.e,!1);else this._resolveCallback(q,!0)}}});var $q0=O((IC1,eK0)=>{eK0.exports=function($,I,U,Y){var J=!1,Q=function(G,W){this._reject(W)},K=function(G,W){W.promiseRejectionQueued=!0,W.bindingPromise._then(Q,Q,null,this,G)},q=function(G,W){if((this._bitField&50397184)===0)this._resolveCallback(W.target)},H=function(G,W){if(!W.promiseRejectionQueued)this._reject(G)};$.prototype.bind=function(G){if(!J)J=!0,$.prototype._propagateFrom=Y.propagateFromFunction(),$.prototype._boundValue=Y.boundValueFunction();var W=U(G),w=new $(I);w._propagateFrom(this,1);var Z=this._target();if(w._setBoundTo(W),W instanceof $){var V={promiseRejectionQueued:!1,promise:w,target:Z,bindingPromise:W};Z._then(I,K,voi
Line truncated
|
||||
`)};else if(!Q.isNode&&typeof Error().stack==="string")L=function(a,N){console.warn("%c"+a,N?"color: darkorange":"color: red")}}var v0={warnings:F,longStackTraces:!1,cancellation:!1,monitoring:!1};if(P)$.longStackTraces();return{longStackTraces:function(){return v0.longStackTraces},warnings:function(){return v0.warnings},cancellation:function(){return v0.cancellation},monitoring:function(){return v0.monitoring},propagateFromFunction:function(){return c},boundValueFunction:function(){return r},checkForgottenReturns:A0,setBounds:T7,warn:q1,deprecated:j0,CapturedTrace:J$,fireDomEvent:R,fireGlobalEvent:x}}});var dK0=O((sj1,cK0)=>{cK0.exports=function($,I){var U=d1(),Y=$.CancellationError,J=U.errorObj;function Q(w,Z,V){this.promise=w,this.type=Z,this.handler=V,this.called=!1,this.cancelPromise=null}Q.prototype.isFinallyHandler=function(){return this.type===0};function K(w){this.finallyHandler=w}K.prototype._resultCancelled=function(){q(this.finallyHandler)};function q(w,Z){if(w.cancelPromise!=null){if(arguments.length>1)w.cancelPromise._reject(Z);else w.cancelPromise._cancel();return w.cancelPromise=null,!0}return!1}function H(){return W.call(this,this.promise._target()._settledValue())}function G(w){if(q(this,w))return;return J.e=w,J}function W(w){var Z=this.promise,V=this.handler;if(!this.called){this.called=!0;var X=this.isFinallyHandler()?V.call(Z._boundValue()):V.call(Z._boundValue(),w);if(X!==void 0){Z._setReturnedNonUndefined();var L=I(X,Z);if(L instanceof $){if(this.cancelPromise!=null){if(L._isCancelled()){var D=new Y("late cancellation observer");return Z._attachExtraTrace(D),J.e=D,J}else if(L.isPending())L._attachCancellationCallback(new K(this))}return L._then(H,G,void 0,this,void 0)}}}if(Z.isRejected())return q(this),J.e=w,J;else return q(this),w}return $.prototype._passThrough=function(w,Z,V,X){if(typeof w!=="function")return this.then();return this._then(V,X,void 0,new Q(this,Z,w),void 0)},$.prototype.lastly=$.prototype.finally=function(w){return this._passThrough(w,0,W,W)},$.prototype.tap=function(w){return this._passThrough(w,1,W)},Q}});var lK0=O((ej1,mK0)=>{mK0.exports=function($){var I=d1(),U=p3().keys,Y=I.tryCatch,J=I.errorObj;function Q(K,q,H){return function(G){var W=H._boundValue();$:for(var w=0;w<K.length;++w){var Z=K[w];if(Z===Error||Z!=null&&Z.prototype instanceof Error){if(G instanceof Z)return Y(q).call(W,G)}else if(typeof Z==="function"){var V=Y(Z).call(W,G);if(V===J)return V;else if(V)return Y(q).call(W,G)}else if(I.isObject(G)){var X=U(Z);for(var L=0;L<X.length;++L){var D=X[L];if(Z[D]!=G[D])continue $}return Y(q).call(W,G)}}return $}}return Q}});var ng=O(($C1,tK0)=>{var oK0=d1(),fI1=oK0.maybeWrapAsError,iI1=k5(),bI1=iI1.OperationalError,rK0=p3();function nI1($){return $ instanceof Error&&rK0.getPrototypeOf($)===Error.prototype}var pI1=/^(?:name|message|stack|cause)$/;function cI1($){var I;if(nI1($)){I=new bI1($),I.name=$.name,I.message=$.message,I.stack=$.stack;var U=rK0.keys($);for(var Y=0;Y<U.length;++Y){var J=U[Y];if(!pI1.test(J))I[J]=$[J]}return I}return oK0.markAsOriginatingFromRejection($),$}function dI1($,I){return function(U,Y){if($===null)return;if(U){var J=cI1(fI1(U));$._attachExtraTrace(J),$._reject(J)}else if(!I)$._fulfill(Y);else{var Q=arguments.length,K=Array(Math.max(Q-1,0));for(var q=1;q<Q;++q)K[q-1]=arguments[q];$._fulfill(K)}$=null}}tK0.exports=dI1});var sK0=O((IC1,aK0)=>{aK0.exports=function($,I,U,Y,J){var Q=d1(),K=Q.tryCatch;$.method=function(q){if(typeof q!=="function")throw new $.TypeError("expecting a function but got "+Q.classString(q));return function(){var H=new $(I);H._captureStackTrace(),H._pushContext();var G=K(q).apply(this,arguments),W=H._popContext();return J.checkForgottenReturns(G,W,"Promise.method",H),H._resolveFromSyncValue(G),H}},$.attempt=$.try=function(q){if(typeof q!=="function")return Y("expecting a function but got "+Q.classString(q));var H=new $(I);H._captureStackTrace(),H._pushContext();var G;if(arguments.length>1){J.deprecated("calling Promise.try with more than 1 argument");var W=arguments[1],w=arguments[2];G=Q.isArray(W)?K(q).apply(w,W):K(q).call(w,W)}else G=K(q)();var Z=H._popContext();return J.checkForgottenReturns(G,Z,"Promise.try",H),H._resolveFromSyncValue(G),H},$.prototype._resolveFromSyncValue=function(q){if(q===Q.errorObj)this._rejectCallback(q.e,!1);else this._resolveCallback(q,!0)}}});var $q0=O((UC1,eK0)=>{eK0.exports=function($,I,U,Y){var J=!1,Q=function(G,W){this._reject(W)},K=function(G,W){W.promiseRejectionQueued=!0,W.bindingPromise._then(Q,Q,null,this,G)},q=function(G,W){if((this._bitField&50397184)===0)this._resolveCallback(W.target)},H=function(G,W){if(!W.promiseRejectionQueued)this._reject(G)};$.prototype.bind=function(G){if(!J)J=!0,$.prototype._propagateFrom=Y.propagateFromFunction(),$.prototype._boundValue=Y.boundValueFunction();var W=U(G),w=new $(I);w._propagateFrom(this,1);var Z=this._target();if(w._setBoundTo(W),W instanceof $){var V={promiseRejectionQueued:!1,promise:w,target:Z,bindingPromise:W};Z._then(I,K,voi
Line truncated
|
||||
|
||||
See http://goo.gl/MqrFmX
|
||||
`);return this._settledValue()},Y=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()},J=I.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0},Q=I.prototype.isRejected=function(){return(this._bitField&16777216)!==0},K=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 K.call(this._target())},$.prototype.isRejected=function(){return Q.call(this._target())},$.prototype.isFulfilled=function(){return J.call(this._target())},$.prototype.isResolved=function(){return q.call(this._target())},$.prototype.value=function(){return U.call(this._target())},$.prototype.reason=function(){var H=this._target();return H._unsetRejectionIsUnhandled(),Y.call(H)},$.prototype._value=function(){return this._settledValue()},$.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},$.PromiseInspection=I}});var Hq0=O((QC1,qq0)=>{qq0.exports=function($,I,U,Y,J,Q){var K=d1(),q=K.canEvaluate,H=K.tryCatch,G=K.errorObj,W;if(q){var w=function(P){return Function("value","holder",`
|
||||
`);return this._settledValue()},J=I.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0},Q=I.prototype.isRejected=function(){return(this._bitField&16777216)!==0},K=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 K.call(this._target())},$.prototype.isRejected=function(){return Q.call(this._target())},$.prototype.isFulfilled=function(){return J.call(this._target())},$.prototype.isResolved=function(){return q.call(this._target())},$.prototype.value=function(){return U.call(this._target())},$.prototype.reason=function(){var H=this._target();return H._unsetRejectionIsUnhandled(),Y.call(H)},$.prototype._value=function(){return this._settledValue()},$.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},$.PromiseInspection=I}});var Hq0=O((KC1,qq0)=>{qq0.exports=function($,I,U,Y,J,Q){var K=d1(),q=K.canEvaluate,H=K.tryCatch,G=K.errorObj,W;if(q){var w=function(P){return Function("value","holder",`
|
||||
'use strict';
|
||||
holder.pIndex = value;
|
||||
holder.checkFulfillment(this);
|
||||
`.replace(/Index/g,P))},Z=function(P){return Function("promise","holder",`
|
||||
'use strict';
|
||||
holder.pIndex = promise;
|
||||
`.replace(/Index/g,P))},V=function(P){var E=Array(P);for(var A=0;A<E.length;++A)E[A]="this.p"+(A+1);var R=E.join(" = ")+" = null;",k=`var promise;
|
||||
`+E.map(function(p){return`
|
||||
`.replace(/Index/g,P))},V=function(P){var T=Array(P);for(var A=0;A<T.length;++A)T[A]="this.p"+(A+1);var R=T.join(" = ")+" = null;",x=`var promise;
|
||||
`+T.map(function(p){return`
|
||||
promise = `+p+`;
|
||||
if (promise instanceof Promise) {
|
||||
promise.cancel();
|
||||
}
|
||||
`}).join(`
|
||||
`),y=E.join(", "),f="Holder$"+P,j=`return function(tryCatch, errorObj, Promise, async) {
|
||||
`),y=T.join(", "),f="Holder$"+P,j=`return function(tryCatch, errorObj, Promise, async) {
|
||||
'use strict';
|
||||
function [TheName](fn) {
|
||||
[TheProperties]
|
||||
@@ -129,7 +129,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof u4))r
|
||||
|
||||
return [TheName];
|
||||
}(tryCatch, errorObj, Promise, async);
|
||||
`;return j=j.replace(/\[TheName\]/g,f).replace(/\[TheTotal\]/g,P).replace(/\[ThePassedArguments\]/g,y).replace(/\[TheProperties\]/g,R).replace(/\[CancellationCode\]/g,k),Function("tryCatch","errorObj","Promise","async",j)(H,G,$,J)},X=[],L=[],D=[];for(var F=0;F<8;++F)X.push(V(F+1)),L.push(w(F+1)),D.push(Z(F+1));W=function(P){this._reject(P)}}$.join=function(){var P=arguments.length-1,E;if(P>0&&typeof arguments[P]==="function"){if(E=arguments[P],P<=8&&q){var i=new $(Y);i._captureStackTrace();var A=X[P-1],R=new A(E),k=L;for(var y=0;y<P;++y){var f=U(arguments[y],i);if(f instanceof $){f=f._target();var j=f._bitField;if((j&50397184)===0)f._then(k[y],W,void 0,i,R),D[y](f,R),R.asyncNeeded=!1;else if((j&33554432)!==0)k[y].call(i,f._value(),R);else if((j&16777216)!==0)i._reject(f._reason());else i._cancel()}else k[y].call(i,f,R)}if(!i._isFateSealed()){if(R.asyncNeeded){var p=Q();if(p!==null)R.fn=K.domainBind(p,R.fn)}i._setAsyncGuaranteed(),i._setOnCancel(R)}return i}}var n=arguments.length,S=Array(n);for(var b=0;b<n;++b)S[b]=arguments[b];if(E)S.pop();var i=new I(S).promise();return E!==void 0?i.spread(E):i}}});var Wq0=O((KC1,Gq0)=>{Gq0.exports=function($,I,U,Y,J,Q){var K=$._getDomain,q=d1(),H=q.tryCatch,G=q.errorObj,W=$._async;function w(V,X,L,D){this.constructor$(V),this._promise._captureStackTrace();var F=K();this._callback=F===null?X:q.domainBind(F,X),this._preservedValues=D===J?Array(this.length()):null,this._limit=L,this._inFlight=0,this._queue=[],W.invoke(this._asyncInit,this,void 0)}q.inherits(w,I),w.prototype._asyncInit=function(){this._init$(void 0,-2)},w.prototype._init=function(){},w.prototype._promiseFulfilled=function(V,X){var L=this._values,D=this.length(),F=this._preservedValues,P=this._limit;if(X<0){if(X=X*-1-1,L[X]=V,P>=1){if(this._inFlight--,this._drainQueue(),this._isResolved())return!0}}else{if(P>=1&&this._inFlight>=P)return L[X]=V,this._queue.push(X),!1;if(F!==null)F[X]=V;var E=this._promise,A=this._callback,R=E._boundValue();E._pushContext();var k=H(A).call(R,V,X,D),y=E._popContext();if(Q.checkForgottenReturns(k,y,F!==null?"Promise.filter":"Promise.map",E),k===G)return this._reject(k.e),!0;var f=Y(k,this._promise);if(f instanceof $){f=f._target();var j=f._bitField;if((j&50397184)===0){if(P>=1)this._inFlight++;return L[X]=f,f._proxy(this,(X+1)*-1),!1}else if((j&33554432)!==0)k=f._value();else if((j&16777216)!==0)return this._reject(f._reason()),!0;else return this._cancel(),!0}L[X]=k}var p=++this._totalResolved;if(p>=D){if(F!==null)this._filter(L,F);else this._resolve(L);return!0}return!1},w.prototype._drainQueue=function(){var V=this._queue,X=this._limit,L=this._values;while(V.length>0&&this._inFlight<X){if(this._isResolved())return;var D=V.pop();this._promiseFulfilled(L[D],D)}},w.prototype._filter=function(V,X){var L=X.length,D=Array(L),F=0;for(var P=0;P<L;++P)if(V[P])D[F++]=X[P];D.length=F,this._resolve(D)},w.prototype.preservedValues=function(){return this._preservedValues};function Z(V,X,L,D){if(typeof X!=="function")return U("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 w(V,X,F,D).promise()}$.prototype.map=function(V,X){return Z(this,V,X,null)},$.map=function(V,X,L,D){return Z(V,X,L,D)}}});var Vq0=O((qC1,wq0)=>{var ig=Object.create;if(ig)tX=ig(null),aX=ig(null),tX[" size"]=aX[" size"]=0;var tX,aX;wq0.exports=function($){var I=d1(),U=I.canEvaluate,Y=I.isIdentifier,J,Q,K=function(V){return Function("ensureMethod",`
|
||||
`;return j=j.replace(/\[TheName\]/g,f).replace(/\[TheTotal\]/g,P).replace(/\[ThePassedArguments\]/g,y).replace(/\[TheProperties\]/g,R).replace(/\[CancellationCode\]/g,x),Function("tryCatch","errorObj","Promise","async",j)(H,G,$,J)},X=[],L=[],D=[];for(var F=0;F<8;++F)X.push(V(F+1)),L.push(w(F+1)),D.push(Z(F+1));W=function(P){this._reject(P)}}$.join=function(){var P=arguments.length-1,T;if(P>0&&typeof arguments[P]==="function"){if(T=arguments[P],P<=8&&q){var b=new $(Y);b._captureStackTrace();var A=X[P-1],R=new A(T),x=L;for(var y=0;y<P;++y){var f=U(arguments[y],b);if(f instanceof $){f=f._target();var j=f._bitField;if((j&50397184)===0)f._then(x[y],W,void 0,b,R),D[y](f,R),R.asyncNeeded=!1;else if((j&33554432)!==0)x[y].call(b,f._value(),R);else if((j&16777216)!==0)b._reject(f._reason());else b._cancel()}else x[y].call(b,f,R)}if(!b._isFateSealed()){if(R.asyncNeeded){var p=Q();if(p!==null)R.fn=K.domainBind(p,R.fn)}b._setAsyncGuaranteed(),b._setOnCancel(R)}return b}}var n=arguments.length,S=Array(n);for(var i=0;i<n;++i)S[i]=arguments[i];if(T)S.pop();var b=new I(S).promise();return T!==void 0?b.spread(T):b}}});var Wq0=O((qC1,Gq0)=>{Gq0.exports=function($,I,U,Y,J,Q){var K=$._getDomain,q=d1(),H=q.tryCatch,G=q.errorObj,W=$._async;function w(V,X,L,D){this.constructor$(V),this._promise._captureStackTrace();var F=K();this._callback=F===null?X:q.domainBind(F,X),this._preservedValues=D===J?Array(this.length()):null,this._limit=L,this._inFlight=0,this._queue=[],W.invoke(this._asyncInit,this,void 0)}q.inherits(w,I),w.prototype._asyncInit=function(){this._init$(void 0,-2)},w.prototype._init=function(){},w.prototype._promiseFulfilled=function(V,X){var L=this._values,D=this.length(),F=this._preservedValues,P=this._limit;if(X<0){if(X=X*-1-1,L[X]=V,P>=1){if(this._inFlight--,this._drainQueue(),this._isResolved())return!0}}else{if(P>=1&&this._inFlight>=P)return L[X]=V,this._queue.push(X),!1;if(F!==null)F[X]=V;var T=this._promise,A=this._callback,R=T._boundValue();T._pushContext();var x=H(A).call(R,V,X,D),y=T._popContext();if(Q.checkForgottenReturns(x,y,F!==null?"Promise.filter":"Promise.map",T),x===G)return this._reject(x.e),!0;var f=Y(x,this._promise);if(f instanceof $){f=f._target();var j=f._bitField;if((j&50397184)===0){if(P>=1)this._inFlight++;return L[X]=f,f._proxy(this,(X+1)*-1),!1}else if((j&33554432)!==0)x=f._value();else if((j&16777216)!==0)return this._reject(f._reason()),!0;else return this._cancel(),!0}L[X]=x}var p=++this._totalResolved;if(p>=D){if(F!==null)this._filter(L,F);else this._resolve(L);return!0}return!1},w.prototype._drainQueue=function(){var V=this._queue,X=this._limit,L=this._values;while(V.length>0&&this._inFlight<X){if(this._isResolved())return;var D=V.pop();this._promiseFulfilled(L[D],D)}},w.prototype._filter=function(V,X){var L=X.length,D=Array(L),F=0;for(var P=0;P<L;++P)if(V[P])D[F++]=X[P];D.length=F,this._resolve(D)},w.prototype.preservedValues=function(){return this._preservedValues};function Z(V,X,L,D){if(typeof X!=="function")return U("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 w(V,X,F,D).promise()}$.prototype.map=function(V,X){return Z(this,V,X,null)},$.map=function(V,X,L,D){return Z(V,X,L,D)}}});var Vq0=O((HC1,wq0)=>{var pg=Object.create;if(pg)aX=pg(null),sX=pg(null),aX[" size"]=sX[" size"]=0;var aX,sX;wq0.exports=function($){var I=d1(),U=I.canEvaluate,Y=I.isIdentifier,J,Q,K=function(V){return Function("ensureMethod",`
|
||||
return function(obj) {
|
||||
'use strict'
|
||||
var len = this.length;
|
||||
@@ -146,7 +146,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof u4))r
|
||||
`.replace(/methodName/g,V))(G)},q=function(V){return Function("obj",`
|
||||
'use strict';
|
||||
return obj.propertyName;
|
||||
`.replace("propertyName",V))},H=function(V,X,L){var D=L[V];if(typeof D!=="function"){if(!Y(V))return null;if(D=X(V),L[V]=D,L[" size"]++,L[" size"]>512){var F=Object.keys(L);for(var P=0;P<256;++P)delete L[F[P]];L[" size"]=F.length-256}}return D};J=function(V){return H(V,K,tX)},Q=function(V){return H(V,q,aX)};function G(V,X){var L;if(V!=null)L=V[X];if(typeof L!=="function"){var D="Object "+I.classString(V)+" has no method '"+I.toString(X)+"'";throw new $.TypeError(D)}return L}function W(V){var X=this.pop(),L=G(V,X);return L.apply(V,this)}$.prototype.call=function(V){var X=arguments.length,L=Array(Math.max(X-1,0));for(var D=1;D<X;++D)L[D-1]=arguments[D];if(U){var F=J(V);if(F!==null)return this._then(F,void 0,void 0,L,void 0)}return L.push(V),this._then(W,void 0,void 0,L,void 0)};function w(V){return V[this]}function Z(V){var X=+this;if(X<0)X=Math.max(0,X+V.length);return V[X]}$.prototype.get=function(V){var X=typeof V==="number",L;if(!X)if(U){var D=Q(V);L=D!==null?D:w}else L=w;else L=Z;return this._then(L,void 0,void 0,V,void 0)}}});var zq0=O((HC1,Zq0)=>{Zq0.exports=function($,I,U,Y,J,Q){var K=d1(),q=x5().TypeError,H=d1().inherits,G=K.errorObj,W=K.tryCatch,w={};function Z(E){setTimeout(function(){throw E},0)}function V(E){var A=U(E);if(A!==E&&typeof E._isDisposable==="function"&&typeof E._getDisposer==="function"&&E._isDisposable())A._setDisposable(E._getDisposer());return A}function X(E,A){var R=0,k=E.length,y=new $(J);function f(){if(R>=k)return y._fulfill();var j=V(E[R++]);if(j instanceof $&&j._isDisposable()){try{j=U(j._getDisposer().tryDispose(A),E.promise)}catch(p){return Z(p)}if(j instanceof $)return j._then(f,Z,null,null,null)}f()}return f(),y}function L(E,A,R){this._data=E,this._promise=A,this._context=R}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 w},L.prototype.tryDispose=function(E){var A=this.resource(),R=this._context;if(R!==void 0)R._pushContext();var k=A!==w?this.doDispose(A,E):null;if(R!==void 0)R._popContext();return this._promise._unsetDisposable(),this._data=null,k},L.isDisposer=function(E){return E!=null&&typeof E.resource==="function"&&typeof E.tryDispose==="function"};function D(E,A,R){this.constructor$(E,A,R)}H(D,L),D.prototype.doDispose=function(E,A){var R=this.data();return R.call(E,E,A)};function F(E){if(L.isDisposer(E))return this.resources[this.index]._setDisposable(E),E.promise();return E}function P(E){this.length=E,this.promise=null,this[E-1]=null}P.prototype._resultCancelled=function(){var E=this.length;for(var A=0;A<E;++A){var R=this[A];if(R instanceof $)R.cancel()}},$.using=function(){var E=arguments.length;if(E<2)return I("you must pass at least 2 arguments to Promise.using");var A=arguments[E-1];if(typeof A!=="function")return I("expecting a function but got "+K.classString(A));var R,k=!0;if(E===2&&Array.isArray(arguments[0]))R=arguments[0],E=R.length,k=!1;else R=arguments,E--;var y=new P(E);for(var f=0;f<E;++f){var j=R[f];if(L.isDisposer(j)){var p=j;j=j.promise(),j._setDisposable(p)}else{var n=U(j);if(n instanceof $)j=n._then(F,null,null,{resources:y,index:f},void 0)}y[f]=j}var S=Array(y.length);for(var f=0;f<S.length;++f)S[f]=$.resolve(y[f]).reflect();var b=$.all(S).then(function(U0){for(var B=0;B<U0.length;++B){var x=U0[B];if(x.isRejected())return G.e=x.error(),G;else if(!x.isFulfilled()){b.cancel();return}U0[B]=x.value()}i._pushContext(),A=W(A);var c=k?A.apply(void 0,U0):A(U0),r=i._popContext();return Q.checkForgottenReturns(c,r,"Promise.using",i),c}),i=b.lastly(function(){var U0=new $.PromiseInspection(b);return X(y,U0)});return y.promise=i,i._setOnCancel(y),i},$.prototype._setDisposable=function(E){this._bitField=this._bitField|131072,this._disposer=E},$.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(E){if(typeof E==="function")return new D(E,this,Y());throw new q}}});var Lq0=O((GC1,Xq0)=>{Xq0.exports=function($,I,U){var Y=d1(),J=$.TimeoutError;function Q(w){this.handle=w}Q.prototype._resultCancelled=function(){clearTimeout(this.handle)};var K=function(w){return q(+this).thenReturn(w)},q=$.delay=function(w,Z){var V,X;if(Z!==void 0){if(V=$.resolve(Z)._then(K,null,null,w,void 0),U.cancellation()&&Z instanceof $)V._setOnCancel(Z)}else{if(V=new $(I),X=setTimeout(function(){V._fulfill()},+w),U.cancellation())V._setOnCancel(new Q(X));V._captureStackTrace()}return V._setAsyncGuaranteed(),V};$.prototype.delay=function(w){return q(w,this)};var H=function(w,Z,V){var X;if(typeof Z!=="string")if(Z instanceof Error)X=Z;else X=new J("operation timed out");else X=new J(Z);if(Y.markAsOriginatingFromRejection(X),w._attachExtraTrace(X),w._reject(X),V!=null)V.cancel()};function G(w){return clearTimeout(this.handle),w}f
Line truncated
|
||||
`.replace("propertyName",V))},H=function(V,X,L){var D=L[V];if(typeof D!=="function"){if(!Y(V))return null;if(D=X(V),L[V]=D,L[" size"]++,L[" size"]>512){var F=Object.keys(L);for(var P=0;P<256;++P)delete L[F[P]];L[" size"]=F.length-256}}return D};J=function(V){return H(V,K,aX)},Q=function(V){return H(V,q,sX)};function G(V,X){var L;if(V!=null)L=V[X];if(typeof L!=="function"){var D="Object "+I.classString(V)+" has no method '"+I.toString(X)+"'";throw new $.TypeError(D)}return L}function W(V){var X=this.pop(),L=G(V,X);return L.apply(V,this)}$.prototype.call=function(V){var X=arguments.length,L=Array(Math.max(X-1,0));for(var D=1;D<X;++D)L[D-1]=arguments[D];if(U){var F=J(V);if(F!==null)return this._then(F,void 0,void 0,L,void 0)}return L.push(V),this._then(W,void 0,void 0,L,void 0)};function w(V){return V[this]}function Z(V){var X=+this;if(X<0)X=Math.max(0,X+V.length);return V[X]}$.prototype.get=function(V){var X=typeof V==="number",L;if(!X)if(U){var D=Q(V);L=D!==null?D:w}else L=w;else L=Z;return this._then(L,void 0,void 0,V,void 0)}}});var zq0=O((GC1,Zq0)=>{Zq0.exports=function($,I,U,Y,J,Q){var K=d1(),q=k5().TypeError,H=d1().inherits,G=K.errorObj,W=K.tryCatch,w={};function Z(T){setTimeout(function(){throw T},0)}function V(T){var A=U(T);if(A!==T&&typeof T._isDisposable==="function"&&typeof T._getDisposer==="function"&&T._isDisposable())A._setDisposable(T._getDisposer());return A}function X(T,A){var R=0,x=T.length,y=new $(J);function f(){if(R>=x)return y._fulfill();var j=V(T[R++]);if(j instanceof $&&j._isDisposable()){try{j=U(j._getDisposer().tryDispose(A),T.promise)}catch(p){return Z(p)}if(j instanceof $)return j._then(f,Z,null,null,null)}f()}return f(),y}function L(T,A,R){this._data=T,this._promise=A,this._context=R}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 w},L.prototype.tryDispose=function(T){var A=this.resource(),R=this._context;if(R!==void 0)R._pushContext();var x=A!==w?this.doDispose(A,T):null;if(R!==void 0)R._popContext();return this._promise._unsetDisposable(),this._data=null,x},L.isDisposer=function(T){return T!=null&&typeof T.resource==="function"&&typeof T.tryDispose==="function"};function D(T,A,R){this.constructor$(T,A,R)}H(D,L),D.prototype.doDispose=function(T,A){var R=this.data();return R.call(T,T,A)};function F(T){if(L.isDisposer(T))return this.resources[this.index]._setDisposable(T),T.promise();return T}function P(T){this.length=T,this.promise=null,this[T-1]=null}P.prototype._resultCancelled=function(){var T=this.length;for(var A=0;A<T;++A){var R=this[A];if(R instanceof $)R.cancel()}},$.using=function(){var T=arguments.length;if(T<2)return I("you must pass at least 2 arguments to Promise.using");var A=arguments[T-1];if(typeof A!=="function")return I("expecting a function but got "+K.classString(A));var R,x=!0;if(T===2&&Array.isArray(arguments[0]))R=arguments[0],T=R.length,x=!1;else R=arguments,T--;var y=new P(T);for(var f=0;f<T;++f){var j=R[f];if(L.isDisposer(j)){var p=j;j=j.promise(),j._setDisposable(p)}else{var n=U(j);if(n instanceof $)j=n._then(F,null,null,{resources:y,index:f},void 0)}y[f]=j}var S=Array(y.length);for(var f=0;f<S.length;++f)S[f]=$.resolve(y[f]).reflect();var i=$.all(S).then(function(U0){for(var B=0;B<U0.length;++B){var k=U0[B];if(k.isRejected())return G.e=k.error(),G;else if(!k.isFulfilled()){i.cancel();return}U0[B]=k.value()}b._pushContext(),A=W(A);var c=x?A.apply(void 0,U0):A(U0),r=b._popContext();return Q.checkForgottenReturns(c,r,"Promise.using",b),c}),b=i.lastly(function(){var U0=new $.PromiseInspection(i);return X(y,U0)});return y.promise=b,b._setOnCancel(y),b},$.prototype._setDisposable=function(T){this._bitField=this._bitField|131072,this._disposer=T},$.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(T){if(typeof T==="function")return new D(T,this,Y());throw new q}}});var Lq0=O((WC1,Xq0)=>{Xq0.exports=function($,I,U){var Y=d1(),J=$.TimeoutError;function Q(w){this.handle=w}Q.prototype._resultCancelled=function(){clearTimeout(this.handle)};var K=function(w){return q(+this).thenReturn(w)},q=$.delay=function(w,Z){var V,X;if(Z!==void 0){if(V=$.resolve(Z)._then(K,null,null,w,void 0),U.cancellation()&&Z instanceof $)V._setOnCancel(Z)}else{if(V=new $(I),X=setTimeout(function(){V._fulfill()},+w),U.cancellation())V._setOnCancel(new Q(X));V._captureStackTrace()}return V._setAsyncGuaranteed(),V};$.prototype.delay=function(w){return q(w,this)};var H=function(w,Z,V){var X;if(typeof Z!=="string")if(Z instanceof Error)X=Z;else X=new J("operation timed out");else X=new J(Z);if(Y.markAsOriginatingFromRejection(X),w._attachExtraTrace(X),w._reject(X),V!=null)V.cancel()};function G(w){return clearTimeout(this.handle),w}f
Line truncated
|
||||
|
||||
See http://goo.gl/MqrFmX
|
||||
|
||||
@@ -156,14 +156,14 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof u4))r
|
||||
`)));return}}F=F._target();var P=F._bitField;if((P&50397184)===0)this._yieldedPromise=F,F._proxy(this,null);else if((P&33554432)!==0)$._async.invoke(this._promiseFulfilled,this,F._value());else if((P&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
|
||||
|
||||
See http://goo.gl/MqrFmX
|
||||
`);var D=Object(L).yieldHandler,F=V,P=Error().stack;return function(){var E=X.apply(this,arguments),A=new F(void 0,void 0,D,P),R=A.promise();return A._generator=E,A._promiseFulfilled(void 0),R}},$.coroutine.addYieldHandler=function(X){if(typeof X!=="function")throw new q("expecting a function but got "+H.classString(X));w.push(X)},$.spawn=function(X){if(Q.deprecated("Promise.spawn()","Promise.coroutine()"),typeof X!=="function")return I(`generatorFunction must be a function
|
||||
`);var D=Object(L).yieldHandler,F=V,P=Error().stack;return function(){var T=X.apply(this,arguments),A=new F(void 0,void 0,D,P),R=A.promise();return A._generator=T,A._promiseFulfilled(void 0),R}},$.coroutine.addYieldHandler=function(X){if(typeof X!=="function")throw new q("expecting a function but got "+H.classString(X));w.push(X)},$.spawn=function(X){if(Q.deprecated("Promise.spawn()","Promise.coroutine()"),typeof X!=="function")return I(`generatorFunction must be a function
|
||||
|
||||
See http://goo.gl/MqrFmX
|
||||
`);var L=new V(X,this),D=L.promise();return L._run($.spawn),D}}});var Nq0=O((wC1,Fq0)=>{Fq0.exports=function($){var I=d1(),U=$._async,Y=I.tryCatch,J=I.errorObj;function Q(H,G){var W=this;if(!I.isArray(H))return K.call(W,H,G);var w=Y(G).apply(W._boundValue(),[null].concat(H));if(w===J)U.throwLater(w.e)}function K(H,G){var W=this,w=W._boundValue(),Z=H===void 0?Y(G).call(w,null):Y(G).call(w,null,H);if(Z===J)U.throwLater(Z.e)}function q(H,G){var W=this;if(!H){var w=Error(H+"");w.cause=H,H=w}var Z=Y(G).call(W._boundValue(),H);if(Z===J)U.throwLater(Z.e)}$.prototype.asCallback=$.prototype.nodeify=function(H,G){if(typeof H=="function"){var W=K;if(G!==void 0&&Object(G).spread)W=Q;this._then(W,q,void 0,this,H)}return this}}});var Aq0=O((VC1,Mq0)=>{Mq0.exports=function($,I){var U={},Y=d1(),J=bg(),Q=Y.withAppended,K=Y.maybeWrapAsError,q=Y.canEvaluate,H=x5().TypeError,G="Async",W={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],Z=new RegExp("^(?:"+w.join("|")+")$"),V=function(b){return Y.isIdentifier(b)&&b.charAt(0)!=="_"&&b!=="constructor"};function X(b){return!Z.test(b)}function L(b){try{return b.__isPromisified__===!0}catch(i){return!1}}function D(b,i,U0){var B=Y.getDataPropertyOrDefault(b,i+U0,W);return B?L(B):!1}function F(b,i,U0){for(var B=0;B<b.length;B+=2){var x=b[B];if(U0.test(x)){var c=x.replace(U0,"");for(var r=0;r<b.length;r+=2)if(b[r]===c)throw new H(`Cannot promisify an API that has normal methods with '%s'-suffix
|
||||
`);var L=new V(X,this),D=L.promise();return L._run($.spawn),D}}});var Nq0=O((VC1,Fq0)=>{Fq0.exports=function($){var I=d1(),U=$._async,Y=I.tryCatch,J=I.errorObj;function Q(H,G){var W=this;if(!I.isArray(H))return K.call(W,H,G);var w=Y(G).apply(W._boundValue(),[null].concat(H));if(w===J)U.throwLater(w.e)}function K(H,G){var W=this,w=W._boundValue(),Z=H===void 0?Y(G).call(w,null):Y(G).call(w,null,H);if(Z===J)U.throwLater(Z.e)}function q(H,G){var W=this;if(!H){var w=Error(H+"");w.cause=H,H=w}var Z=Y(G).call(W._boundValue(),H);if(Z===J)U.throwLater(Z.e)}$.prototype.asCallback=$.prototype.nodeify=function(H,G){if(typeof H=="function"){var W=K;if(G!==void 0&&Object(G).spread)W=Q;this._then(W,q,void 0,this,H)}return this}}});var Aq0=O((ZC1,Mq0)=>{Mq0.exports=function($,I){var U={},Y=d1(),J=ng(),Q=Y.withAppended,K=Y.maybeWrapAsError,q=Y.canEvaluate,H=k5().TypeError,G="Async",W={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],Z=new RegExp("^(?:"+w.join("|")+")$"),V=function(i){return Y.isIdentifier(i)&&i.charAt(0)!=="_"&&i!=="constructor"};function X(i){return!Z.test(i)}function L(i){try{return i.__isPromisified__===!0}catch(b){return!1}}function D(i,b,U0){var B=Y.getDataPropertyOrDefault(i,b+U0,W);return B?L(B):!1}function F(i,b,U0){for(var B=0;B<i.length;B+=2){var k=i[B];if(U0.test(k)){var c=k.replace(U0,"");for(var r=0;r<i.length;r+=2)if(i[r]===c)throw new H(`Cannot promisify an API that has normal methods with '%s'-suffix
|
||||
|
||||
See http://goo.gl/MqrFmX
|
||||
`.replace("%s",i))}}}function P(b,i,U0,B){var x=Y.inheritedDataKeys(b),c=[];for(var r=0;r<x.length;++r){var J0=x[r],w0=b[J0],A0=B===V?!0:V(J0,w0,b);if(typeof w0==="function"&&!L(w0)&&!D(b,J0,i)&&B(J0,w0,b,A0))c.push(J0,w0)}return F(c,i,U0),c}var E=function(b){return b.replace(/([$])/,"\\$")},A,R=function(b){var i=[b],U0=Math.max(0,b-1-3);for(var B=b-1;B>=U0;--B)i.push(B);for(var B=b+1;B<=3;++B)i.push(B);return i},k=function(b){return Y.filledRange(b,"_arg","")},y=function(b){return Y.filledRange(Math.max(b,3),"_arg","")},f=function(b){if(typeof b.length==="number")return Math.max(Math.min(b.length,1024),0);return 0};A=function(b,i,U0,B,x,c){var r=Math.max(0,f(B)-1),J0=R(r),w0=typeof b==="string"||i===U;function A0(I1){var M0=k(I1).join(", "),Q0=I1>0?", ":"",R0;if(w0)R0=`ret = callback.call(this, {{args}}, nodeback); break;
|
||||
`;else R0=i===void 0?`ret = callback({{args}}, nodeback); break;
|
||||
`.replace("%s",b))}}}function P(i,b,U0,B){var k=Y.inheritedDataKeys(i),c=[];for(var r=0;r<k.length;++r){var J0=k[r],w0=i[J0],A0=B===V?!0:V(J0,w0,i);if(typeof w0==="function"&&!L(w0)&&!D(i,J0,b)&&B(J0,w0,i,A0))c.push(J0,w0)}return F(c,b,U0),c}var T=function(i){return i.replace(/([$])/,"\\$")},A,R=function(i){var b=[i],U0=Math.max(0,i-1-3);for(var B=i-1;B>=U0;--B)b.push(B);for(var B=i+1;B<=3;++B)b.push(B);return b},x=function(i){return Y.filledRange(i,"_arg","")},y=function(i){return Y.filledRange(Math.max(i,3),"_arg","")},f=function(i){if(typeof i.length==="number")return Math.max(Math.min(i.length,1024),0);return 0};A=function(i,b,U0,B,k,c){var r=Math.max(0,f(B)-1),J0=R(r),w0=typeof i==="string"||b===U;function A0(I1){var M0=x(I1).join(", "),Q0=I1>0?", ":"",R0;if(w0)R0=`ret = callback.call(this, {{args}}, nodeback); break;
|
||||
`;else R0=b===void 0?`ret = callback({{args}}, nodeback); break;
|
||||
`:`ret = callback.call(receiver, {{args}}, nodeback); break;
|
||||
`;return R0.replace("{{args}}",M0).replace(", ",Q0)}function j0(){var I1="";for(var M0=0;M0<J0.length;++M0)I1+="case "+J0[M0]+":"+A0(J0[M0]);return I1+=`
|
||||
default:
|
||||
@@ -177,7 +177,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof u4))r
|
||||
break;
|
||||
`.replace("[CodeForCall]",w0?`ret = callback.apply(this, args);
|
||||
`:`ret = callback.apply(receiver, args);
|
||||
`),I1}var q1=typeof b==="string"?"this != null ? this['"+b+"'] : fn":"fn",k0=`'use strict';
|
||||
`),I1}var q1=typeof i==="string"?"this != null ? this['"+i+"'] : fn":"fn",x0=`'use strict';
|
||||
var ret = function (Parameters) {
|
||||
'use strict';
|
||||
var len = arguments.length;
|
||||
@@ -197,25 +197,25 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof u4))r
|
||||
};
|
||||
notEnumerableProp(ret, '__isPromisified__', true);
|
||||
return ret;
|
||||
`.replace("[CodeForSwitchCase]",j0()).replace("[GetFunctionCode]",q1);return k0=k0.replace("Parameters",y(r)),Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",k0)($,B,i,Q,K,J,Y.tryCatch,Y.errorObj,Y.notEnumerableProp,I)};function j(b,i,U0,B,x,c){var r=function(){return this}(),J0=b;if(typeof J0==="string")b=B;function w0(){var A0=i;if(i===U)A0=this;var j0=new $(I);j0._captureStackTrace();var q1=typeof J0==="string"&&this!==r?this[J0]:b,k0=J(j0,c);try{q1.apply(A0,Q(arguments,k0))}catch(I1){j0._rejectCallback(K(I1),!0,!0)}if(!j0._isFateSealed())j0._setAsyncGuaranteed();return j0}return Y.notEnumerableProp(w0,"__isPromisified__",!0),w0}var p=q?A:j;function n(b,i,U0,B,x){var c=new RegExp(E(i)+"$"),r=P(b,i,c,U0);for(var J0=0,w0=r.length;J0<w0;J0+=2){var A0=r[J0],j0=r[J0+1],q1=A0+i;if(B===p)b[q1]=p(A0,U,A0,j0,i,x);else{var k0=B(j0,function(){return p(A0,U,A0,j0,i,x)});Y.notEnumerableProp(k0,"__isPromisified__",!0),b[q1]=k0}}return Y.toFastProperties(b),b}function S(b,i,U0){return p(b,i,void 0,b,null,U0)}$.promisify=function(b,i){if(typeof b!=="function")throw new H("expecting a function but got "+Y.classString(b));if(L(b))return b;i=Object(i);var U0=i.context===void 0?U:i.context,B=!!i.multiArgs,x=S(b,U0,B);return Y.copyDescriptors(b,x,X),x},$.promisifyAll=function(b,i){if(typeof b!=="function"&&typeof b!=="object")throw new H(`the target of promisifyAll must be an object or a function
|
||||
`.replace("[CodeForSwitchCase]",j0()).replace("[GetFunctionCode]",q1);return x0=x0.replace("Parameters",y(r)),Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",x0)($,B,b,Q,K,J,Y.tryCatch,Y.errorObj,Y.notEnumerableProp,I)};function j(i,b,U0,B,k,c){var r=function(){return this}(),J0=i;if(typeof J0==="string")i=B;function w0(){var A0=b;if(b===U)A0=this;var j0=new $(I);j0._captureStackTrace();var q1=typeof J0==="string"&&this!==r?this[J0]:i,x0=J(j0,c);try{q1.apply(A0,Q(arguments,x0))}catch(I1){j0._rejectCallback(K(I1),!0,!0)}if(!j0._isFateSealed())j0._setAsyncGuaranteed();return j0}return Y.notEnumerableProp(w0,"__isPromisified__",!0),w0}var p=q?A:j;function n(i,b,U0,B,k){var c=new RegExp(T(b)+"$"),r=P(i,b,c,U0);for(var J0=0,w0=r.length;J0<w0;J0+=2){var A0=r[J0],j0=r[J0+1],q1=A0+b;if(B===p)i[q1]=p(A0,U,A0,j0,b,k);else{var x0=B(j0,function(){return p(A0,U,A0,j0,b,k)});Y.notEnumerableProp(x0,"__isPromisified__",!0),i[q1]=x0}}return Y.toFastProperties(i),i}function S(i,b,U0){return p(i,b,void 0,i,null,U0)}$.promisify=function(i,b){if(typeof i!=="function")throw new H("expecting a function but got "+Y.classString(i));if(L(i))return i;b=Object(b);var U0=b.context===void 0?U:b.context,B=!!b.multiArgs,k=S(i,U0,B);return Y.copyDescriptors(i,k,X),k},$.promisifyAll=function(i,b){if(typeof i!=="function"&&typeof i!=="object")throw new H(`the target of promisifyAll must be an object or a function
|
||||
|
||||
See http://goo.gl/MqrFmX
|
||||
`);i=Object(i);var U0=!!i.multiArgs,B=i.suffix;if(typeof B!=="string")B=G;var x=i.filter;if(typeof x!=="function")x=V;var c=i.promisifier;if(typeof c!=="function")c=p;if(!Y.isIdentifier(B))throw RangeError(`suffix must be a valid identifier
|
||||
`);b=Object(b);var U0=!!b.multiArgs,B=b.suffix;if(typeof B!=="string")B=G;var k=b.filter;if(typeof k!=="function")k=V;var c=b.promisifier;if(typeof c!=="function")c=p;if(!Y.isIdentifier(B))throw RangeError(`suffix must be a valid identifier
|
||||
|
||||
See http://goo.gl/MqrFmX
|
||||
`);var r=Y.inheritedDataKeys(b);for(var J0=0;J0<r.length;++J0){var w0=b[r[J0]];if(r[J0]!=="constructor"&&Y.isClass(w0))n(w0.prototype,B,x,c,U0),n(w0,B,x,c,U0)}return n(b,B,x,c,U0)}}});var Tq0=O((ZC1,Pq0)=>{Pq0.exports=function($,I,U,Y){var J=d1(),Q=J.isObject,K=p3(),q;if(typeof Map==="function")q=Map;var H=function(){var Z=0,V=0;function X(L,D){this[Z]=L,this[Z+V]=D,Z++}return function(D){V=D.size,Z=0;var F=Array(D.size*2);return D.forEach(X,F),F}}(),G=function(Z){var V=new q,X=Z.length/2|0;for(var L=0;L<X;++L){var D=Z[X+L],F=Z[L];V.set(D,F)}return V};function W(Z){var V=!1,X;if(q!==void 0&&Z instanceof q)X=H(Z),V=!0;else{var L=K.keys(Z),D=L.length;X=Array(D*2);for(var F=0;F<D;++F){var P=L[F];X[F]=Z[P],X[F+D]=P}}this.constructor$(X),this._isMap=V,this._init$(void 0,-3)}J.inherits(W,I),W.prototype._init=function(){},W.prototype._promiseFulfilled=function(Z,V){this._values[V]=Z;var X=++this._totalResolved;if(X>=this._length){var L;if(this._isMap)L=G(this._values);else{L={};var D=this.length();for(var F=0,P=this.length();F<P;++F)L[this._values[F+D]]=this._values[F]}return this._resolve(L),!0}return!1},W.prototype.shouldCopyValues=function(){return!1},W.prototype.getActualLength=function(Z){return Z>>1};function w(Z){var V,X=U(Z);if(!Q(X))return Y(`cannot await properties of a non-object
|
||||
`);var r=Y.inheritedDataKeys(i);for(var J0=0;J0<r.length;++J0){var w0=i[r[J0]];if(r[J0]!=="constructor"&&Y.isClass(w0))n(w0.prototype,B,k,c,U0),n(w0,B,k,c,U0)}return n(i,B,k,c,U0)}}});var Tq0=O((zC1,Pq0)=>{Pq0.exports=function($,I,U,Y){var J=d1(),Q=J.isObject,K=p3(),q;if(typeof Map==="function")q=Map;var H=function(){var Z=0,V=0;function X(L,D){this[Z]=L,this[Z+V]=D,Z++}return function(D){V=D.size,Z=0;var F=Array(D.size*2);return D.forEach(X,F),F}}(),G=function(Z){var V=new q,X=Z.length/2|0;for(var L=0;L<X;++L){var D=Z[X+L],F=Z[L];V.set(D,F)}return V};function W(Z){var V=!1,X;if(q!==void 0&&Z instanceof q)X=H(Z),V=!0;else{var L=K.keys(Z),D=L.length;X=Array(D*2);for(var F=0;F<D;++F){var P=L[F];X[F]=Z[P],X[F+D]=P}}this.constructor$(X),this._isMap=V,this._init$(void 0,-3)}J.inherits(W,I),W.prototype._init=function(){},W.prototype._promiseFulfilled=function(Z,V){this._values[V]=Z;var X=++this._totalResolved;if(X>=this._length){var L;if(this._isMap)L=G(this._values);else{L={};var D=this.length();for(var F=0,P=this.length();F<P;++F)L[this._values[F+D]]=this._values[F]}return this._resolve(L),!0}return!1},W.prototype.shouldCopyValues=function(){return!1},W.prototype.getActualLength=function(Z){return Z>>1};function w(Z){var V,X=U(Z);if(!Q(X))return Y(`cannot await properties of a non-object
|
||||
|
||||
See http://goo.gl/MqrFmX
|
||||
`);else if(X instanceof $)V=X._then($.props,void 0,void 0,void 0,void 0);else V=new W(X).promise();if(X instanceof $)V._propagateFrom(X,2);return V}$.prototype.props=function(){return w(this)},$.props=function(Z){return w(Z)}}});var Bq0=O((zC1,Eq0)=>{Eq0.exports=function($,I,U,Y){var J=d1(),Q=function(q){return q.then(function(H){return K(H,q)})};function K(q,H){var G=U(q);if(G instanceof $)return Q(G);else if(q=J.asArray(q),q===null)return Y("expecting an array or an iterable object but got "+J.classString(q));var W=new $(I);if(H!==void 0)W._propagateFrom(H,3);var{_fulfill:w,_reject:Z}=W;for(var V=0,X=q.length;V<X;++V){var L=q[V];if(L===void 0&&!(V in q))continue;$.cast(L)._then(w,Z,void 0,W,null)}return W}$.race=function(q){return K(q,void 0)},$.prototype.race=function(){return K(this,void 0)}}});var Rq0=O((XC1,vq0)=>{vq0.exports=function($,I,U,Y,J,Q){var K=$._getDomain,q=d1(),H=q.tryCatch;function G(X,L,D,F){this.constructor$(X);var P=K();if(this._fn=P===null?L:q.domainBind(P,L),D!==void 0)D=$.resolve(D),D._attachCancellationCallback(this);if(this._initialValue=D,this._currentCancellable=null,F===J)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(G,I),G.prototype._gotAccum=function(X){if(this._eachValues!==void 0&&this._eachValues!==null&&X!==J)this._eachValues.push(X)},G.prototype._eachComplete=function(X){if(this._eachValues!==null)this._eachValues.push(X);return this._eachValues},G.prototype._init=function(){},G.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==void 0?this._eachValues:this._initialValue)},G.prototype.shouldCopyValues=function(){return!1},G.prototype._resolve=function(X){this._promise._resolveCallback(X),this._values=null},G.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()},G.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 P={accum:null,value:X[D],index:D,length:F,array:this};L=L._then(Z,void 0,void 0,P,void 0)}if(this._eachValues!==void 0)L=L._then(this._eachComplete,void 0,void 0,this,void 0);L._then(W,W,void 0,L,this)},$.prototype.reduce=function(X,L){return w(this,X,L,null)},$.reduce=function(X,L,D,F){return w(X,L,D,F)};function W(X,L){if(this.isFulfilled())L._resolve(X);else L._reject(X)}function w(X,L,D,F){if(typeof L!=="function")return U("expecting a function but got "+q.classString(L));var P=new G(X,L,D,F);return P.promise()}function Z(X){this.accum=X,this.array._gotAccum(X);var L=Y(this.value,this.array._promise);if(L instanceof $)return this.array._currentCancellable=L,L._then(V,void 0,void 0,this,void 0);else return V.call(this,L)}function V(X){var L=this.array,D=L._promise,F=H(L._fn);D._pushContext();var P;if(L._eachValues!==void 0)P=F.call(D._boundValue(),X,this.index,this.length);else P=F.call(D._boundValue(),this.accum,X,this.index,this.length);if(P instanceof $)L._currentCancellable=P;var E=D._popContext();return Q.checkForgottenReturns(P,E,L._eachValues!==void 0?"Promise.each":"Promise.reduce",D),P}}});var Cq0=O((LC1,jq0)=>{jq0.exports=function($,I,U){var Y=$.PromiseInspection,J=d1();function Q(K){this.constructor$(K)}J.inherits(Q,I),Q.prototype._promiseResolved=function(K,q){this._values[K]=q;var H=++this._totalResolved;if(H>=this._length)return this._resolve(this._values),!0;return!1},Q.prototype._promiseFulfilled=function(K,q){var H=new Y;return H._bitField=33554432,H._settledValueField=K,this._promiseResolved(q,H)},Q.prototype._promiseRejected=function(K,q){var H=new Y;return H._bitField=16777216,H._settledValueField=K,this._promiseResolved(q,H)},$.settle=function(K){return U.deprecated(".settle()",".reflect()"),new Q(K).promise()},$.prototype.settle=function(){return $.settle(this)}}});var Sq0=O((DC1,_q0)=>{_q0.exports=function($,I,U){var Y=d1(),J=x5().RangeError,Q=x5().AggregateError,K=Y.isArray,q={};function H(W){this.constructor$(W),this._howMany=0,this._unwrap=!1,this._initialized=!1}Y.inherits(H,I),H.prototype._init=function(){if(!this._initialized)return;if(this._howMany===0){this._resolve([]);return}this._init$(void 0,-5);var W=K(this._values);if(!this._isResolved()&&W&&this._howMany>this._canPossiblyFulfill())this._reject(this._getRangeError(this.length()))},H.prototype.init=function(){this._initialized=!0,this._init()},H.prototype.setUnwrap=function(){this._unwrap=!0},H.prototype.howMany=function(){return this._howMany},H.prototype.setHowMany=function(W){this._howMany=W},H.prototype._promiseFulfilled=function(W){if(this._addFulfilled(W),this._fulfilled()===this.howMany()){if(this._values.length=this.howMany(),this.howMany()=
Line truncated
|
||||
`);else if(X instanceof $)V=X._then($.props,void 0,void 0,void 0,void 0);else V=new W(X).promise();if(X instanceof $)V._propagateFrom(X,2);return V}$.prototype.props=function(){return w(this)},$.props=function(Z){return w(Z)}}});var Bq0=O((XC1,Eq0)=>{Eq0.exports=function($,I,U,Y){var J=d1(),Q=function(q){return q.then(function(H){return K(H,q)})};function K(q,H){var G=U(q);if(G instanceof $)return Q(G);else if(q=J.asArray(q),q===null)return Y("expecting an array or an iterable object but got "+J.classString(q));var W=new $(I);if(H!==void 0)W._propagateFrom(H,3);var{_fulfill:w,_reject:Z}=W;for(var V=0,X=q.length;V<X;++V){var L=q[V];if(L===void 0&&!(V in q))continue;$.cast(L)._then(w,Z,void 0,W,null)}return W}$.race=function(q){return K(q,void 0)},$.prototype.race=function(){return K(this,void 0)}}});var Rq0=O((LC1,vq0)=>{vq0.exports=function($,I,U,Y,J,Q){var K=$._getDomain,q=d1(),H=q.tryCatch;function G(X,L,D,F){this.constructor$(X);var P=K();if(this._fn=P===null?L:q.domainBind(P,L),D!==void 0)D=$.resolve(D),D._attachCancellationCallback(this);if(this._initialValue=D,this._currentCancellable=null,F===J)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(G,I),G.prototype._gotAccum=function(X){if(this._eachValues!==void 0&&this._eachValues!==null&&X!==J)this._eachValues.push(X)},G.prototype._eachComplete=function(X){if(this._eachValues!==null)this._eachValues.push(X);return this._eachValues},G.prototype._init=function(){},G.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==void 0?this._eachValues:this._initialValue)},G.prototype.shouldCopyValues=function(){return!1},G.prototype._resolve=function(X){this._promise._resolveCallback(X),this._values=null},G.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()},G.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 P={accum:null,value:X[D],index:D,length:F,array:this};L=L._then(Z,void 0,void 0,P,void 0)}if(this._eachValues!==void 0)L=L._then(this._eachComplete,void 0,void 0,this,void 0);L._then(W,W,void 0,L,this)},$.prototype.reduce=function(X,L){return w(this,X,L,null)},$.reduce=function(X,L,D,F){return w(X,L,D,F)};function W(X,L){if(this.isFulfilled())L._resolve(X);else L._reject(X)}function w(X,L,D,F){if(typeof L!=="function")return U("expecting a function but got "+q.classString(L));var P=new G(X,L,D,F);return P.promise()}function Z(X){this.accum=X,this.array._gotAccum(X);var L=Y(this.value,this.array._promise);if(L instanceof $)return this.array._currentCancellable=L,L._then(V,void 0,void 0,this,void 0);else return V.call(this,L)}function V(X){var L=this.array,D=L._promise,F=H(L._fn);D._pushContext();var P;if(L._eachValues!==void 0)P=F.call(D._boundValue(),X,this.index,this.length);else P=F.call(D._boundValue(),this.accum,X,this.index,this.length);if(P instanceof $)L._currentCancellable=P;var T=D._popContext();return Q.checkForgottenReturns(P,T,L._eachValues!==void 0?"Promise.each":"Promise.reduce",D),P}}});var Cq0=O((DC1,jq0)=>{jq0.exports=function($,I,U){var Y=$.PromiseInspection,J=d1();function Q(K){this.constructor$(K)}J.inherits(Q,I),Q.prototype._promiseResolved=function(K,q){this._values[K]=q;var H=++this._totalResolved;if(H>=this._length)return this._resolve(this._values),!0;return!1},Q.prototype._promiseFulfilled=function(K,q){var H=new Y;return H._bitField=33554432,H._settledValueField=K,this._promiseResolved(q,H)},Q.prototype._promiseRejected=function(K,q){var H=new Y;return H._bitField=16777216,H._settledValueField=K,this._promiseResolved(q,H)},$.settle=function(K){return U.deprecated(".settle()",".reflect()"),new Q(K).promise()},$.prototype.settle=function(){return $.settle(this)}}});var Sq0=O((OC1,_q0)=>{_q0.exports=function($,I,U){var Y=d1(),J=k5().RangeError,Q=k5().AggregateError,K=Y.isArray,q={};function H(W){this.constructor$(W),this._howMany=0,this._unwrap=!1,this._initialized=!1}Y.inherits(H,I),H.prototype._init=function(){if(!this._initialized)return;if(this._howMany===0){this._resolve([]);return}this._init$(void 0,-5);var W=K(this._values);if(!this._isResolved()&&W&&this._howMany>this._canPossiblyFulfill())this._reject(this._getRangeError(this.length()))},H.prototype.init=function(){this._initialized=!0,this._init()},H.prototype.setUnwrap=function(){this._unwrap=!0},H.prototype.howMany=function(){return this._howMany},H.prototype.setHowMany=function(W){this._howMany=W},H.prototype._promiseFulfilled=function(W){if(this._addFulfilled(W),this._fulfilled()===this.howMany()){if(this._values.length=this.howMany(),this.howMany()=
Line truncated
|
||||
|
||||
See http://goo.gl/MqrFmX
|
||||
`);var Z=new H(W),V=Z.promise();return Z.setHowMany(w),Z.init(),V}$.some=function(W,w){return G(W,w)},$.prototype.some=function(W){return G(this,W)},$._SomePromiseArray=H}});var yq0=O((OC1,gq0)=>{gq0.exports=function($,I){var U=$.map;$.prototype.filter=function(Y,J){return U(this,Y,J,I)},$.filter=function(Y,J,Q){return U(Y,J,Q,I)}}});var uq0=O((FC1,hq0)=>{hq0.exports=function($,I){var{reduce:U,all:Y}=$;function J(){return Y(this)}function Q(K,q){return U(K,q,I,I)}$.prototype.each=function(K){return U(this,K,I,0)._then(J,void 0,void 0,this,void 0)},$.prototype.mapSeries=function(K){return U(this,K,I,I)},$.each=function(K,q){return U(K,q,I,0)._then(J,void 0,void 0,K,void 0)},$.mapSeries=Q}});var kq0=O((NC1,xq0)=>{xq0.exports=function($){var I=$._SomePromiseArray;function U(Y){var J=new I(Y),Q=J.promise();return J.setHowMany(1),J.setUnwrap(),J.init(),Q}$.any=function(Y){return U(Y)},$.prototype.any=function(){return U(this)}}});var fq0=O((MC1,ng)=>{ng.exports=function(){var $=function(){return new w(`circular promise resolution chain
|
||||
`);var Z=new H(W),V=Z.promise();return Z.setHowMany(w),Z.init(),V}$.some=function(W,w){return G(W,w)},$.prototype.some=function(W){return G(this,W)},$._SomePromiseArray=H}});var yq0=O((FC1,gq0)=>{gq0.exports=function($,I){var U=$.map;$.prototype.filter=function(Y,J){return U(this,Y,J,I)},$.filter=function(Y,J,Q){return U(Y,J,Q,I)}}});var uq0=O((NC1,hq0)=>{hq0.exports=function($,I){var{reduce:U,all:Y}=$;function J(){return Y(this)}function Q(K,q){return U(K,q,I,I)}$.prototype.each=function(K){return U(this,K,I,0)._then(J,void 0,void 0,this,void 0)},$.prototype.mapSeries=function(K){return U(this,K,I,I)},$.each=function(K,q){return U(K,q,I,0)._then(J,void 0,void 0,K,void 0)},$.mapSeries=Q}});var xq0=O((MC1,kq0)=>{kq0.exports=function($){var I=$._SomePromiseArray;function U(Y){var J=new I(Y),Q=J.promise();return J.setHowMany(1),J.setUnwrap(),J.init(),Q}$.any=function(Y){return U(Y)},$.prototype.any=function(){return U(this)}}});var fq0=O((AC1,cg)=>{cg.exports=function(){var $=function(){return new w(`circular promise resolution chain
|
||||
|
||||
See http://goo.gl/MqrFmX
|
||||
`)},I=function(){return new S.PromiseInspection(this._target())},U=function(B){return S.reject(new w(B))};function Y(){}var J={},Q=d1(),K;if(Q.isNode)K=function(){var B=process.domain;if(B===void 0)B=null;return B};else K=function(){return null};Q.notEnumerableProp(S,"_getDomain",K);var q=p3(),H=SK0(),G=new H;q.defineProperty(S,"_async",{value:G});var W=x5(),w=S.TypeError=W.TypeError;S.RangeError=W.RangeError;var Z=S.CancellationError=W.CancellationError;S.TimeoutError=W.TimeoutError,S.OperationalError=W.OperationalError,S.RejectionError=W.OperationalError,S.AggregateError=W.AggregateError;var V=function(){},X={},L={},D=xK0()(S,V),F=fK0()(S,V,D,U,Y),P=iK0()(S),E=P.create,A=pK0()(S,P),R=A.CapturedTrace,k=dK0()(S,D),y=lK0()(L),f=bg(),j=Q.errorObj,p=Q.tryCatch;function n(B,x){if(typeof x!=="function")throw new w("expecting a function but got "+Q.classString(x));if(B.constructor!==S)throw new w(`the promise constructor cannot be invoked directly
|
||||
`)},I=function(){return new S.PromiseInspection(this._target())},U=function(B){return S.reject(new w(B))};function Y(){}var J={},Q=d1(),K;if(Q.isNode)K=function(){var B=process.domain;if(B===void 0)B=null;return B};else K=function(){return null};Q.notEnumerableProp(S,"_getDomain",K);var q=p3(),H=SK0(),G=new H;q.defineProperty(S,"_async",{value:G});var W=k5(),w=S.TypeError=W.TypeError;S.RangeError=W.RangeError;var Z=S.CancellationError=W.CancellationError;S.TimeoutError=W.TimeoutError,S.OperationalError=W.OperationalError,S.RejectionError=W.OperationalError,S.AggregateError=W.AggregateError;var V=function(){},X={},L={},D=kK0()(S,V),F=fK0()(S,V,D,U,Y),P=bK0()(S),T=P.create,A=pK0()(S,P),R=A.CapturedTrace,x=dK0()(S,D),y=lK0()(L),f=ng(),j=Q.errorObj,p=Q.tryCatch;function n(B,k){if(typeof k!=="function")throw new w("expecting a function but got "+Q.classString(k));if(B.constructor!==S)throw new w(`the promise constructor cannot be invoked directly
|
||||
|
||||
See http://goo.gl/MqrFmX
|
||||
`)}function S(B){if(this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,B!==V)n(this,B),this._resolveFromExecutor(B);this._promiseCreated(),this._fireEvent("promiseCreated",this)}S.prototype.toString=function(){return"[object Promise]"},S.prototype.caught=S.prototype.catch=function(B){var x=arguments.length;if(x>1){var c=Array(x-1),r=0,J0;for(J0=0;J0<x-1;++J0){var w0=arguments[J0];if(Q.isObject(w0))c[r++]=w0;else return U("expecting an object but got A catch statement predicate "+Q.classString(w0))}return c.length=r,B=arguments[J0],this.then(void 0,y(c,B,this))}return this.then(void 0,B)},S.prototype.reflect=function(){return this._then(I,I,void 0,this,void 0)},S.prototype.then=function(B,x){if(A.warnings()&&arguments.length>0&&typeof B!=="function"&&typeof x!=="function"){var c=".then() only accepts functions but was passed: "+Q.classString(B);if(arguments.length>1)c+=", "+Q.classString(x);this._warn(c)}return this._then(B,x,void 0,void 0,void 0)},S.prototype.done=function(B,x){var c=this._then(B,x,void 0,void 0,void 0);c._setIsFinal()},S.prototype.spread=function(B){if(typeof B!=="function")return U("expecting a function but got "+Q.classString(B));return this.all()._then(B,void 0,void 0,X,void 0)},S.prototype.toJSON=function(){var B={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};if(this.isFulfilled())B.fulfillmentValue=this.value(),B.isFulfilled=!0;else if(this.isRejected())B.rejectionReason=this.reason(),B.isRejected=!0;return B},S.prototype.all=function(){if(arguments.length>0)this._warn(".all() was passed arguments but it does not take any");return new F(this).promise()},S.prototype.error=function(B){return this.caught(Q.originatesFromRejection,B)},S.getNewLibraryCopy=ng.exports,S.is=function(B){return B instanceof S},S.fromNode=S.fromCallback=function(B){var x=new S(V);x._captureStackTrace();var c=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=p(B)(f(x,c));if(r===j)x._rejectCallback(r.e,!0);if(!x._isFateSealed())x._setAsyncGuaranteed();return x},S.all=function(B){return new F(B).promise()},S.cast=function(B){var x=D(B);if(!(x instanceof S))x=new S(V),x._captureStackTrace(),x._setFulfilled(),x._rejectionHandler0=B;return x},S.resolve=S.fulfilled=S.cast,S.reject=S.rejected=function(B){var x=new S(V);return x._captureStackTrace(),x._rejectCallback(B,!0),x},S.setScheduler=function(B){if(typeof B!=="function")throw new w("expecting a function but got "+Q.classString(B));return G.setScheduler(B)},S.prototype._then=function(B,x,c,r,J0){var w0=J0!==void 0,A0=w0?J0:new S(V),j0=this._target(),q1=j0._bitField;if(!w0){if(A0._propagateFrom(this,3),A0._captureStackTrace(),r===void 0&&(this._bitField&2097152)!==0)if((q1&50397184)!==0)r=this._boundValue();else r=j0===this?void 0:this._boundTo;this._fireEvent("promiseChained",this,A0)}var k0=K();if((q1&50397184)!==0){var I1,M0,Q0=j0._settlePromiseCtx;if((q1&33554432)!==0)M0=j0._rejectionHandler0,I1=B;else if((q1&16777216)!==0)M0=j0._fulfillmentHandler0,I1=x,j0._unsetRejectionIsUnhandled();else Q0=j0._settlePromiseLateCancellationObserver,M0=new Z("late cancellation observer"),j0._attachExtraTrace(M0),I1=x;G.invoke(Q0,j0,{handler:k0===null?I1:typeof I1==="function"&&Q.domainBind(k0,I1),promise:A0,receiver:r,value:M0})}else j0._addCallbacks(B,x,A0,r,k0);return A0},S.prototype._length=function(){return this._bitField&65535},S.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0},S.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864},S.prototype._setLength=function(B){this._bitField=this._bitField&-65536|B&65535},S.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432,this._fireEvent("promiseFulfilled",this)},S.prototype._setRejected=function(){this._bitField=this._bitField|16777216,this._fireEvent("promiseRejected",this)},S.prototype._setFollowing=function(){this._bitField=this._bitField|67108864,this._fireEvent("promiseResolved",this)},S.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304},S.prototype._isFinal=function(){return(this._bitField&4194304)>0},S.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},S.prototype._setCancelled=function(){this._bitField=this._bitField|65536,this._fireEvent("promiseCancelled",this)},S.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608},S.prototype._setAsyncGuaranteed=function(){if(G.hasCustomScheduler())return;this._bitField=this._bitField|134217728},S.prototype._receiverAt=function(B){var x=B===0?this._receiver0:this[B*4-4+3];if(x===J)return;else if(x===void 0&&this._isBound())return this._boundValue();return x},S.prototype._promiseAt=function(B){return this[B*4-4+2]},S.prototype._fulfillmentHandlerAt=function(B){return this[B*4-4+0]},S.prototype._rejectionHandlerAt=function(B){return this[B*4-4+1]},S.prototype._boundValue=function(){},S.prototype._migrateCallback0=function(B){var{_bit
Line truncated
|
||||
`)}function S(B){if(this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,B!==V)n(this,B),this._resolveFromExecutor(B);this._promiseCreated(),this._fireEvent("promiseCreated",this)}S.prototype.toString=function(){return"[object Promise]"},S.prototype.caught=S.prototype.catch=function(B){var k=arguments.length;if(k>1){var c=Array(k-1),r=0,J0;for(J0=0;J0<k-1;++J0){var w0=arguments[J0];if(Q.isObject(w0))c[r++]=w0;else return U("expecting an object but got A catch statement predicate "+Q.classString(w0))}return c.length=r,B=arguments[J0],this.then(void 0,y(c,B,this))}return this.then(void 0,B)},S.prototype.reflect=function(){return this._then(I,I,void 0,this,void 0)},S.prototype.then=function(B,k){if(A.warnings()&&arguments.length>0&&typeof B!=="function"&&typeof k!=="function"){var c=".then() only accepts functions but was passed: "+Q.classString(B);if(arguments.length>1)c+=", "+Q.classString(k);this._warn(c)}return this._then(B,k,void 0,void 0,void 0)},S.prototype.done=function(B,k){var c=this._then(B,k,void 0,void 0,void 0);c._setIsFinal()},S.prototype.spread=function(B){if(typeof B!=="function")return U("expecting a function but got "+Q.classString(B));return this.all()._then(B,void 0,void 0,X,void 0)},S.prototype.toJSON=function(){var B={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};if(this.isFulfilled())B.fulfillmentValue=this.value(),B.isFulfilled=!0;else if(this.isRejected())B.rejectionReason=this.reason(),B.isRejected=!0;return B},S.prototype.all=function(){if(arguments.length>0)this._warn(".all() was passed arguments but it does not take any");return new F(this).promise()},S.prototype.error=function(B){return this.caught(Q.originatesFromRejection,B)},S.getNewLibraryCopy=cg.exports,S.is=function(B){return B instanceof S},S.fromNode=S.fromCallback=function(B){var k=new S(V);k._captureStackTrace();var c=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=p(B)(f(k,c));if(r===j)k._rejectCallback(r.e,!0);if(!k._isFateSealed())k._setAsyncGuaranteed();return k},S.all=function(B){return new F(B).promise()},S.cast=function(B){var k=D(B);if(!(k instanceof S))k=new S(V),k._captureStackTrace(),k._setFulfilled(),k._rejectionHandler0=B;return k},S.resolve=S.fulfilled=S.cast,S.reject=S.rejected=function(B){var k=new S(V);return k._captureStackTrace(),k._rejectCallback(B,!0),k},S.setScheduler=function(B){if(typeof B!=="function")throw new w("expecting a function but got "+Q.classString(B));return G.setScheduler(B)},S.prototype._then=function(B,k,c,r,J0){var w0=J0!==void 0,A0=w0?J0:new S(V),j0=this._target(),q1=j0._bitField;if(!w0){if(A0._propagateFrom(this,3),A0._captureStackTrace(),r===void 0&&(this._bitField&2097152)!==0)if((q1&50397184)!==0)r=this._boundValue();else r=j0===this?void 0:this._boundTo;this._fireEvent("promiseChained",this,A0)}var x0=K();if((q1&50397184)!==0){var I1,M0,Q0=j0._settlePromiseCtx;if((q1&33554432)!==0)M0=j0._rejectionHandler0,I1=B;else if((q1&16777216)!==0)M0=j0._fulfillmentHandler0,I1=k,j0._unsetRejectionIsUnhandled();else Q0=j0._settlePromiseLateCancellationObserver,M0=new Z("late cancellation observer"),j0._attachExtraTrace(M0),I1=k;G.invoke(Q0,j0,{handler:x0===null?I1:typeof I1==="function"&&Q.domainBind(x0,I1),promise:A0,receiver:r,value:M0})}else j0._addCallbacks(B,k,A0,r,x0);return A0},S.prototype._length=function(){return this._bitField&65535},S.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0},S.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864},S.prototype._setLength=function(B){this._bitField=this._bitField&-65536|B&65535},S.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432,this._fireEvent("promiseFulfilled",this)},S.prototype._setRejected=function(){this._bitField=this._bitField|16777216,this._fireEvent("promiseRejected",this)},S.prototype._setFollowing=function(){this._bitField=this._bitField|67108864,this._fireEvent("promiseResolved",this)},S.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304},S.prototype._isFinal=function(){return(this._bitField&4194304)>0},S.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},S.prototype._setCancelled=function(){this._bitField=this._bitField|65536,this._fireEvent("promiseCancelled",this)},S.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608},S.prototype._setAsyncGuaranteed=function(){if(G.hasCustomScheduler())return;this._bitField=this._bitField|134217728},S.prototype._receiverAt=function(B){var k=B===0?this._receiver0:this[B*4-4+3];if(k===J)return;else if(k===void 0&&this._isBound())return this._boundValue();return k},S.prototype._promiseAt=function(B){return this[B*4-4+2]},S.prototype._fulfillmentHandlerAt=function(B){return this[B*4-4+0]},S.prototype._rejectionHandlerAt=function(B){return this[B*4-4+1]},S.prototype._boundValue=function(){},S.prototype._migrateCallback0=function(B){var{_bit
Line truncated
|
||||
path = %s
|
||||
syscall = %s
|
||||
fstream_type = %s
|
||||
@@ -225,26 +225,26 @@ fstream_class = %s
|
||||
fstream_stack =
|
||||
%s
|
||||
`,I||"UNKNOWN",Y.stack,Y.path,Y.syscall,Y.fstream_type,Y.fstream_path,Y.fstream_unc_path,Y.fstream_class,Y.fstream_stack.join(`
|
||||
`));else U.emit("warn",Y)};V7.prototype.info=function($,I){this.emit("info",$,I)};V7.prototype.error=function($,I,U){var Y=OG0($,I,this);if(U)throw Y;else this.emit("error",Y)};function OG0($,I,U){if(!($ instanceof Error))$=Error($);if($.code=$.code||I,$.path=$.path||U.path,$.fstream_type=$.fstream_type||U.type,$.fstream_path=$.fstream_path||U.path,U._path!==U.path)$.fstream_unc_path=$.fstream_unc_path||U._path;if(U.linkpath)$.fstream_linkpath=$.fstream_linkpath||U.linkpath;return $.fstream_class=$.fstream_class||U.constructor.name,$.fstream_stack=$.fstream_stack||Error().stack.split(/\n/).slice(3).map(function(Y){return Y.replace(/^ {4}at /,"")}),$}});var lq=O((aC1,NG0)=>{NG0.exports=TJ1;function TJ1($){var I=["Directory","File","SymbolicLink","Link","BlockDevice","CharacterDevice","FIFO","Socket"],U;if($.type&&I.indexOf($.type)!==-1)return $[$.type]=!0,$.type;for(var Y=0,J=I.length;Y<J;Y++){U=I[Y];var Q=$[U]||$["is"+U];if(typeof Q==="function")Q=Q.call($);if(Q)return $[U]=!0,$.type=U,U}return null}});var Ry=O((sC1,MG0)=>{MG0.exports=oq;var EJ1=s6(),BJ1=c0(),vy=s3();BJ1(oq,vy);function oq($){var I=this;if(!(I instanceof oq))throw Error("LinkReader must be called as constructor.");if(!($.type==="Link"&&$.Link||$.type==="SymbolicLink"&&$.SymbolicLink))throw Error("Non-link type "+$.type);vy.call(I,$)}oq.prototype._stat=function($){var I=this;EJ1.readlink(I._path,function(U,Y){if(U)return I.error(U);I.linkpath=I.props.linkpath=Y,I.emit("linkpath",Y),vy.prototype._stat.call(I,$)})};oq.prototype._read=function(){var $=this;if($._paused)return;if(!$._ended)$.emit("end"),$.emit("close"),$._ended=!0}});var Cy=O((eC1,TG0)=>{TG0.exports=d8;var PG0=s6(),vJ1=c0(),rq=t("path"),jy=s3(),AG0=t("assert").ok;vJ1(d8,jy);function d8($){var I=this;if(!(I instanceof d8))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;jy.call(this,$)}d8.prototype._getEntries=function(){var $=this;if($._gotEntries)return;$._gotEntries=!0,PG0.readdir($._path,function(I,U){if(I)return $.error(I);if($.entries=U,$.emit("entries",U),$._paused)$.once("resume",Y);else Y();function Y(){if($._length=$.entries.length,typeof $.sort==="function")$.entries=$.entries.sort($.sort.bind($));$._read()}})};d8.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=rq.resolve($._path,$.entries[$._index]);AG0(I!==$._path),AG0($.entries[$._index]),$._currentEntry=I,PG0[$.props.follow?"stat":"lstat"](I,function(U,Y){if(U)return $.error(U);var J=$._proxy||$;Y.path=I,Y.basename=rq.basename(I),Y.dirname=rq.dirname(I);var Q=$.getChildProps.call(J,Y);Q.path=I,Q.basename=rq.basename(I),Q.dirname=rq.dirname(I);var K=jy(Q,Y);$._currentEntry=K,K.on("pause",function(G){if(!$._paused&&!K._disowned)$.pause(G)}),K.on("resume",function(G){if($._paused&&!K._disowned)$.resume(G)}),K.on("stat",function(G){if($.emit("_entryStat",K,G),K._aborted)return;if(K._paused)K.once("resume",function(){$.emit("entryStat",K,G)});else $.emit("entryStat",K,G)}),K.on("ready",function G(){if($._paused)return K.pause($),$.once("resume",G);if(K.type==="Socket")$.emit("socket",K);else $.emitEntry(K)});var q=!1;K.on("close",H),K.on("disown",H);function H(){if(q)return;if(q=!0,$.emit("childEnd",K),$.emit("entryEnd",K),$._currentEntry=null,!$._paused)$._read()}K.on("error",function(G){if(K._swallowErrors)$.warn(G),K.emit("end"),K.emit("close");else $.emit("error",G)}),["child","childEnd","warn"].forEach(function(G){K.on(G,$.emit.bind($,G))})})};d8.prototype.disown=function($){if($.emit("beforeDisown"),$._disowned=!0,$.parent=$.root=null,$===this._currentEntry)this._currentEntry=null;$.emit("disown")};d8.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}};d8.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",$)};d8.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()};d8.prototype.emitEntry=function($){this.emit("entry",$),this.emit("child",$)}});var _y=O(($_1,RG0)=>{RG0.exports=e3;var RJ1=s6(),jJ1=c0(),EG0=s3(),BG0={EOF:!0},vG0={CLOSE:!0};jJ1(e3,EG0);function e3($){var I=this;if(!(I instanceof e3))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,EG0.call(I,$)}e3.prototype._getStream=function(){var $=this,I=$._stream=RJ1.createReadStream($._path,$.pro
Line truncated
|
||||
`));else U.emit("warn",Y)};V7.prototype.info=function($,I){this.emit("info",$,I)};V7.prototype.error=function($,I,U){var Y=OG0($,I,this);if(U)throw Y;else this.emit("error",Y)};function OG0($,I,U){if(!($ instanceof Error))$=Error($);if($.code=$.code||I,$.path=$.path||U.path,$.fstream_type=$.fstream_type||U.type,$.fstream_path=$.fstream_path||U.path,U._path!==U.path)$.fstream_unc_path=$.fstream_unc_path||U._path;if(U.linkpath)$.fstream_linkpath=$.fstream_linkpath||U.linkpath;return $.fstream_class=$.fstream_class||U.constructor.name,$.fstream_stack=$.fstream_stack||Error().stack.split(/\n/).slice(3).map(function(Y){return Y.replace(/^ {4}at /,"")}),$}});var lq=O((sC1,NG0)=>{NG0.exports=TJ1;function TJ1($){var I=["Directory","File","SymbolicLink","Link","BlockDevice","CharacterDevice","FIFO","Socket"],U;if($.type&&I.indexOf($.type)!==-1)return $[$.type]=!0,$.type;for(var Y=0,J=I.length;Y<J;Y++){U=I[Y];var Q=$[U]||$["is"+U];if(typeof Q==="function")Q=Q.call($);if(Q)return $[U]=!0,$.type=U,U}return null}});var Cy=O((eC1,MG0)=>{MG0.exports=oq;var EJ1=s6(),BJ1=d0(),jy=s3();BJ1(oq,jy);function oq($){var I=this;if(!(I instanceof oq))throw Error("LinkReader must be called as constructor.");if(!($.type==="Link"&&$.Link||$.type==="SymbolicLink"&&$.SymbolicLink))throw Error("Non-link type "+$.type);jy.call(I,$)}oq.prototype._stat=function($){var I=this;EJ1.readlink(I._path,function(U,Y){if(U)return I.error(U);I.linkpath=I.props.linkpath=Y,I.emit("linkpath",Y),jy.prototype._stat.call(I,$)})};oq.prototype._read=function(){var $=this;if($._paused)return;if(!$._ended)$.emit("end"),$.emit("close"),$._ended=!0}});var Sy=O(($_1,TG0)=>{TG0.exports=d8;var PG0=s6(),vJ1=d0(),rq=t("path"),_y=s3(),AG0=t("assert").ok;vJ1(d8,_y);function d8($){var I=this;if(!(I instanceof d8))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;_y.call(this,$)}d8.prototype._getEntries=function(){var $=this;if($._gotEntries)return;$._gotEntries=!0,PG0.readdir($._path,function(I,U){if(I)return $.error(I);if($.entries=U,$.emit("entries",U),$._paused)$.once("resume",Y);else Y();function Y(){if($._length=$.entries.length,typeof $.sort==="function")$.entries=$.entries.sort($.sort.bind($));$._read()}})};d8.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=rq.resolve($._path,$.entries[$._index]);AG0(I!==$._path),AG0($.entries[$._index]),$._currentEntry=I,PG0[$.props.follow?"stat":"lstat"](I,function(U,Y){if(U)return $.error(U);var J=$._proxy||$;Y.path=I,Y.basename=rq.basename(I),Y.dirname=rq.dirname(I);var Q=$.getChildProps.call(J,Y);Q.path=I,Q.basename=rq.basename(I),Q.dirname=rq.dirname(I);var K=_y(Q,Y);$._currentEntry=K,K.on("pause",function(G){if(!$._paused&&!K._disowned)$.pause(G)}),K.on("resume",function(G){if($._paused&&!K._disowned)$.resume(G)}),K.on("stat",function(G){if($.emit("_entryStat",K,G),K._aborted)return;if(K._paused)K.once("resume",function(){$.emit("entryStat",K,G)});else $.emit("entryStat",K,G)}),K.on("ready",function G(){if($._paused)return K.pause($),$.once("resume",G);if(K.type==="Socket")$.emit("socket",K);else $.emitEntry(K)});var q=!1;K.on("close",H),K.on("disown",H);function H(){if(q)return;if(q=!0,$.emit("childEnd",K),$.emit("entryEnd",K),$._currentEntry=null,!$._paused)$._read()}K.on("error",function(G){if(K._swallowErrors)$.warn(G),K.emit("end"),K.emit("close");else $.emit("error",G)}),["child","childEnd","warn"].forEach(function(G){K.on(G,$.emit.bind($,G))})})};d8.prototype.disown=function($){if($.emit("beforeDisown"),$._disowned=!0,$.parent=$.root=null,$===this._currentEntry)this._currentEntry=null;$.emit("disown")};d8.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}};d8.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",$)};d8.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()};d8.prototype.emitEntry=function($){this.emit("entry",$),this.emit("child",$)}});var gy=O((I_1,RG0)=>{RG0.exports=e3;var RJ1=s6(),jJ1=d0(),EG0=s3(),BG0={EOF:!0},vG0={CLOSE:!0};jJ1(e3,EG0);function e3($){var I=this;if(!(I instanceof e3))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,EG0.call(I,$)}e3.prototype._getStream=function(){var $=this,I=$._stream=RJ1.createReadStream($._path,$.pro
Line truncated
|
||||
expect: `+$.props.size+`
|
||||
actual: `+$._bytesEmitted)}),I.on("close",function(){if($._paused||$._buffer.length)$._buffer.push(vG0),$._read();else $.emit("close")}),I.on("error",function(U){$.emit("error",U)}),$._read()};e3.prototype._read=function(){var $=this;if($._paused)return;if(!$._stream)return $._getStream();if($._buffer.length){var I=$._buffer;for(var U=0,Y=I.length;U<Y;U++){var J=I[U];if(J===BG0)$.emit("end");else if(J===vG0)$.emit("close");else $.emit("data",J);if($._paused){$._buffer=I.slice(U);return}}$._buffer.length=0}};e3.prototype.pause=function($){var I=this;if(I._paused)return;if($=$||I,I._paused=!0,I._stream)I._stream.pause();I.emit("pause",$)};e3.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 _G0=O((I_1,CG0)=>{CG0.exports=PL;var CJ1=c0(),jG0=s3();CJ1(PL,jG0);function PL($){var I=this;if(!(I instanceof PL))throw Error("SocketReader must be called as constructor.");if(!($.type==="Socket"&&$.Socket))throw Error("Non-socket type "+$.type);jG0.call(I,$)}PL.prototype._read=function(){var $=this;if($._paused)return;if(!$._ended)$.emit("end"),$.emit("close"),$._ended=!0}});var gy=O((U_1,SG0)=>{SG0.exports=$I;var Sy=s3(),_J1=lq(),SJ1=c0(),gJ1=s6();SJ1($I,Sy);function $I($){var I=this;if(!(I instanceof $I))throw Error("ProxyReader must be called as constructor.");I.props=$,I._buffer=[],I.ready=!1,Sy.call(I,$)}$I.prototype._stat=function(){var $=this,I=$.props,U=I.follow?"stat":"lstat";gJ1[U](I.path,function(Y,J){var Q;if(Y||!J)Q="File";else Q=_J1(J);I[Q]=!0,I.type=$.type=Q,$._old=J,$._addProxy(Sy(I,J))})};$I.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(Y){$.on(Y,I.emit.bind(I,Y))}),I.emit("proxy",$),$.on("ready",function(){I.ready=!0,I.emit("ready")});var U=I._buffer;I._buffer.length=0,U.forEach(function(Y){$[Y[0]].apply($,Y[1])})};$I.prototype.pause=function(){return this._proxyTarget?this._proxyTarget.pause():!1};$I.prototype.resume=function(){return this._proxyTarget?this._proxyTarget.resume():!1}});var s3=O((Y_1,hG0)=>{hG0.exports=V8;var yJ1=s6(),hJ1=t("stream").Stream,uJ1=c0(),yy=t("path"),hy=lq(),TL=V8.hardLinks={},gG0=AL();uJ1(V8,gG0);var yG0=Ry();function V8($,I){var U=this;if(!(U instanceof V8))return new V8($,I);if(typeof $==="string")$={path:$};var Y,J;if($.type&&typeof $.type==="function")Y=$.type,J=Y;else Y=hy($),J=V8;if(I&&!Y)Y=hy(I),$[Y]=!0,$.type=Y;switch(Y){case"Directory":J=Cy();break;case"Link":case"File":J=_y();break;case"SymbolicLink":J=yG0;break;case"Socket":J=_G0();break;case null:J=gy();break}if(!(U instanceof J))return new J($);if(gG0.call(U),!$.path)U.error("Must provide a path",null,!0);if(U.readable=!0,U.writable=!1,U.type=Y,U.props=$,U.depth=$.depth=$.depth||0,U.parent=$.parent||null,U.root=$.root||$.parent&&$.parent.root||U,U._path=U.path=yy.resolve($.path),process.platform==="win32"){if(U.path=U._path=U.path.replace(/\?/g,"_"),U._path.length>=260)U._swallowErrors=!0,U._path="\\\\?\\"+U.path.replace(/\//g,"\\")}if(U.basename=$.basename=yy.basename(U.path),U.dirname=$.dirname=yy.dirname(U.path),$.parent=$.root=null,U.size=$.size,U.filter=typeof $.filter==="function"?$.filter:null,$.sort==="alpha")$.sort=xJ1;U._stat(I)}function xJ1($,I){return $===I?0:$.toLowerCase()>I.toLowerCase()?1:$.toLowerCase()<I.toLowerCase()?-1:$>I?1:-1}V8.prototype._stat=function($){var I=this,U=I.props,Y=U.follow?"stat":"lstat";if($)process.nextTick(J.bind(null,null,$));else yJ1[Y](I._path,J);function J(Q,K){if(Q)return I.error(Q);if(Object.keys(K).forEach(function(V){U[V]=K[V]}),I.size!==void 0&&U.size!==I.size)return I.error("incorrect size");I.size=U.size;var q=hy(U),H=U.hardlinks!==!1;if(H&&q!=="Directory"&&U.nlink&&U.nlink>1){var G=U.dev+":"+U.ino;if(TL[G]===I._path||!TL[G])TL[G]=I._path;else q=I.type=I.props.type="Link",I.Link=I.props.Link=!0,I.linkpath=I.props.linkpath=TL[G],I._stat=I._read=yG0.prototype._read}if(I.type&&I.type!==q)I.error("Unexpected type: "+q);if(I.filter){var W=I._proxy||I;if(!I.filter.call(W,W,U)){if(!I._disowned)I.abort(),I.emit("end"),I.emit("close");return}}var w=["_stat","stat","ready"],Z=0;(function V(){if(I._aborted){I.emit("end"),I.emit("close");return}if(I._paused&&I.type!=="Directory"){I.once("resume",V);return}var X=w[Z++];if(!X)return I._read();I.emit(X,U),V()})()}};V8.prototype.pipe=function($){var I=this;if(typeof $.add==="function")I.on("entry",function(U){var Y=$.add(U);if(Y===!1)I.pause()});return hJ1.prototype.pipe.apply(this,arguments)};V8.prototype.pause=function($){if(this._paused=!0,$=$||this,this.emit("pause",$),this._stream)this._stream.pause($)};V8.prototype.resume=function($){if(this._paused=!1,$=$||this,this.emit("resume",$),this._stream)this._stream.resume($);this._read()};V8.prototype._read=function(){this.error("Cannot read unknown type: "+this.type)}});var fy=O((J_1,pG0)=>{p
Line truncated
|
||||
actual: `+$._bytesEmitted)}),I.on("close",function(){if($._paused||$._buffer.length)$._buffer.push(vG0),$._read();else $.emit("close")}),I.on("error",function(U){$.emit("error",U)}),$._read()};e3.prototype._read=function(){var $=this;if($._paused)return;if(!$._stream)return $._getStream();if($._buffer.length){var I=$._buffer;for(var U=0,Y=I.length;U<Y;U++){var J=I[U];if(J===BG0)$.emit("end");else if(J===vG0)$.emit("close");else $.emit("data",J);if($._paused){$._buffer=I.slice(U);return}}$._buffer.length=0}};e3.prototype.pause=function($){var I=this;if(I._paused)return;if($=$||I,I._paused=!0,I._stream)I._stream.pause();I.emit("pause",$)};e3.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 _G0=O((U_1,CG0)=>{CG0.exports=TL;var CJ1=d0(),jG0=s3();CJ1(TL,jG0);function TL($){var I=this;if(!(I instanceof TL))throw Error("SocketReader must be called as constructor.");if(!($.type==="Socket"&&$.Socket))throw Error("Non-socket type "+$.type);jG0.call(I,$)}TL.prototype._read=function(){var $=this;if($._paused)return;if(!$._ended)$.emit("end"),$.emit("close"),$._ended=!0}});var hy=O((Y_1,SG0)=>{SG0.exports=$I;var yy=s3(),_J1=lq(),SJ1=d0(),gJ1=s6();SJ1($I,yy);function $I($){var I=this;if(!(I instanceof $I))throw Error("ProxyReader must be called as constructor.");I.props=$,I._buffer=[],I.ready=!1,yy.call(I,$)}$I.prototype._stat=function(){var $=this,I=$.props,U=I.follow?"stat":"lstat";gJ1[U](I.path,function(Y,J){var Q;if(Y||!J)Q="File";else Q=_J1(J);I[Q]=!0,I.type=$.type=Q,$._old=J,$._addProxy(yy(I,J))})};$I.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(Y){$.on(Y,I.emit.bind(I,Y))}),I.emit("proxy",$),$.on("ready",function(){I.ready=!0,I.emit("ready")});var U=I._buffer;I._buffer.length=0,U.forEach(function(Y){$[Y[0]].apply($,Y[1])})};$I.prototype.pause=function(){return this._proxyTarget?this._proxyTarget.pause():!1};$I.prototype.resume=function(){return this._proxyTarget?this._proxyTarget.resume():!1}});var s3=O((J_1,hG0)=>{hG0.exports=V8;var yJ1=s6(),hJ1=t("stream").Stream,uJ1=d0(),uy=t("path"),ky=lq(),EL=V8.hardLinks={},gG0=PL();uJ1(V8,gG0);var yG0=Cy();function V8($,I){var U=this;if(!(U instanceof V8))return new V8($,I);if(typeof $==="string")$={path:$};var Y,J;if($.type&&typeof $.type==="function")Y=$.type,J=Y;else Y=ky($),J=V8;if(I&&!Y)Y=ky(I),$[Y]=!0,$.type=Y;switch(Y){case"Directory":J=Sy();break;case"Link":case"File":J=gy();break;case"SymbolicLink":J=yG0;break;case"Socket":J=_G0();break;case null:J=hy();break}if(!(U instanceof J))return new J($);if(gG0.call(U),!$.path)U.error("Must provide a path",null,!0);if(U.readable=!0,U.writable=!1,U.type=Y,U.props=$,U.depth=$.depth=$.depth||0,U.parent=$.parent||null,U.root=$.root||$.parent&&$.parent.root||U,U._path=U.path=uy.resolve($.path),process.platform==="win32"){if(U.path=U._path=U.path.replace(/\?/g,"_"),U._path.length>=260)U._swallowErrors=!0,U._path="\\\\?\\"+U.path.replace(/\//g,"\\")}if(U.basename=$.basename=uy.basename(U.path),U.dirname=$.dirname=uy.dirname(U.path),$.parent=$.root=null,U.size=$.size,U.filter=typeof $.filter==="function"?$.filter:null,$.sort==="alpha")$.sort=kJ1;U._stat(I)}function kJ1($,I){return $===I?0:$.toLowerCase()>I.toLowerCase()?1:$.toLowerCase()<I.toLowerCase()?-1:$>I?1:-1}V8.prototype._stat=function($){var I=this,U=I.props,Y=U.follow?"stat":"lstat";if($)process.nextTick(J.bind(null,null,$));else yJ1[Y](I._path,J);function J(Q,K){if(Q)return I.error(Q);if(Object.keys(K).forEach(function(V){U[V]=K[V]}),I.size!==void 0&&U.size!==I.size)return I.error("incorrect size");I.size=U.size;var q=ky(U),H=U.hardlinks!==!1;if(H&&q!=="Directory"&&U.nlink&&U.nlink>1){var G=U.dev+":"+U.ino;if(EL[G]===I._path||!EL[G])EL[G]=I._path;else q=I.type=I.props.type="Link",I.Link=I.props.Link=!0,I.linkpath=I.props.linkpath=EL[G],I._stat=I._read=yG0.prototype._read}if(I.type&&I.type!==q)I.error("Unexpected type: "+q);if(I.filter){var W=I._proxy||I;if(!I.filter.call(W,W,U)){if(!I._disowned)I.abort(),I.emit("end"),I.emit("close");return}}var w=["_stat","stat","ready"],Z=0;(function V(){if(I._aborted){I.emit("end"),I.emit("close");return}if(I._paused&&I.type!=="Directory"){I.once("resume",V);return}var X=w[Z++];if(!X)return I._read();I.emit(X,U),V()})()}};V8.prototype.pipe=function($){var I=this;if(typeof $.add==="function")I.on("entry",function(U){var Y=$.add(U);if(Y===!1)I.pause()});return hJ1.prototype.pipe.apply(this,arguments)};V8.prototype.pause=function($){if(this._paused=!0,$=$||this,this.emit("pause",$),this._stream)this._stream.pause($)};V8.prototype.resume=function($){if(this._paused=!1,$=$||this,this.emit("resume",$),this._stream)this._stream.resume($);this._read()};V8.prototype._read=function(){this.error("Cannot read unknown type: "+this.type)}});var by=O((Q_1,pG0)=>{p
Line truncated
|
||||
expect: `+$.size+`
|
||||
actual: `+$._bytesWritten);hL.prototype._finish.call($)}});var ty=O((A_1,SW0)=>{SW0.exports=D7;var ry=zJ(),WQ1=lq(),wQ1=c0(),VQ1=gL(),ZQ1=t("fs");wQ1(D7,ry);function D7($){var I=this;if(!(I instanceof D7))throw Error("ProxyWriter must be called as constructor.");I.props=$,I._needDrain=!1,ry.call(I,$)}D7.prototype._stat=function(){var $=this,I=$.props,U=I.follow?"stat":"lstat";ZQ1[U](I.path,function(Y,J){var Q;if(Y||!J)Q="File";else Q=WQ1(J);I[Q]=!0,I.type=$.type=Q,$._old=J,$._addProxy(ry(I,J))})};D7.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(Y){$.on(Y,I.emit.bind(I,Y))}),I.emit("proxy",$);var U=I._buffer;if(U.forEach(function(Y){$[Y[0]].apply($,Y[1])}),I._buffer.length=0,I._needsDrain)I.emit("drain")};D7.prototype.add=function($){if(VQ1($),!this._proxy)return this._buffer.push(["add",[$]]),this._needDrain=!0,!1;return this._proxy.add($)};D7.prototype.write=function($){if(!this._proxy)return this._buffer.push(["write",[$]]),this._needDrain=!0,!1;return this._proxy.write($)};D7.prototype.end=function($){if(!this._proxy)return this._buffer.push(["end",[$]]),!1;return this._proxy.end($)}});var zJ=O((P_1,iW0)=>{iW0.exports=b$;var f$=s6(),zQ1=c0(),XQ1=fy(),LQ1=cy(),eq=t("path"),yW0=process.platform==="win32"?0:process.umask(),hW0=lq(),uW0=AL();zQ1(b$,uW0);b$.dirmode=parseInt("0777",8)&~yW0;b$.filemode=parseInt("0666",8)&~yW0;var DQ1=my(),OQ1=ly(),FQ1=oy(),NQ1=ty();function b$($,I){var U=this;if(typeof $==="string")$={path:$};var Y=hW0($),J=b$;switch(Y){case"Directory":J=DQ1;break;case"File":J=FQ1;break;case"Link":case"SymbolicLink":J=OQ1;break;case null:default:J=NQ1;break}if(!(U instanceof J))return new J($);if(uW0.call(U),!$.path)U.error("Must provide a path",null,!0);if(U.type=$.type,U.props=$,U.depth=$.depth||0,U.clobber=$.clobber===!1?$.clobber:!0,U.parent=$.parent||null,U.root=$.root||$.parent&&$.parent.root||U,U._path=U.path=eq.resolve($.path),process.platform==="win32"){if(U.path=U._path=U.path.replace(/\?/g,"_"),U._path.length>=260)U._swallowErrors=!0,U._path="\\\\?\\"+U.path.replace(/\//g,"\\")}if(U.basename=eq.basename($.path),U.dirname=eq.dirname($.path),U.linkpath=$.linkpath||null,$.parent=$.root=null,U.size=$.size,typeof $.mode==="string")$.mode=parseInt($.mode,8);U.readable=!1,U.writable=!0,U._buffer=[],U.ready=!1,U.filter=typeof $.filter==="function"?$.filter:null,U._stat(I)}b$.prototype._create=function(){var $=this;f$[$.props.follow?"stat":"lstat"]($._path,function(I){if(I)return $.warn("Cannot create "+$._path+`
|
||||
Unsupported type: `+$.type,"ENOTSUP");$._finish()})};b$.prototype._stat=function($){var I=this,U=I.props,Y=U.follow?"stat":"lstat",J=I._proxy||I;if($)Q(null,$);else f$[Y](I._path,Q);function Q(K,q){if(I.filter&&!I.filter.call(J,J,q)){I._aborted=!0,I.emit("end"),I.emit("close");return}if(K||!q)return ay(I);I._old=q;var H=hW0(q);if(H!==I.type||I.type==="File"&&q.nlink>1)return XQ1(I._path,function(G){if(G)return I.error(G);I._old=null,ay(I)});ay(I)}};function ay($){LQ1(eq.dirname($._path),b$.dirmode,function(I,U){if(I)return $.error(I);return $._madeDir=U,$._create()})}function xW0($,I,U,Y,J){var Q=I.mode,K=I.follow||$.type!=="SymbolicLink"?"chmod":"lchmod";if(!f$[K])return J();if(typeof Q!=="number")return J();var q=U.mode&parseInt("0777",8);if(Q=Q&parseInt("0777",8),Q===q)return J();f$[K](Y,Q,J)}function kW0($,I,U,Y,J){if(process.platform==="win32")return J();if(!process.getuid||process.getuid()!==0)return J();if(typeof I.uid!=="number"&&typeof I.gid!=="number")return J();if(U.uid===I.uid&&U.gid===I.gid)return J();var Q=$.props.follow||$.type!=="SymbolicLink"?"chown":"lchown";if(!f$[Q])return J();if(typeof I.uid!=="number")I.uid=U.uid;if(typeof I.gid!=="number")I.gid=U.gid;f$[Q](Y,I.uid,I.gid,J)}function fW0($,I,U,Y,J){if(!f$.utimes||process.platform==="win32")return J();var Q=I.follow||$.type!=="SymbolicLink"?"utimes":"lutimes";if(Q==="lutimes"&&!f$[Q])Q="utimes";if(!f$[Q])return J();var{atime:K,mtime:q}=U,H=I.atime,G=I.mtime;if(H===void 0)H=K;if(G===void 0)G=q;if(!gW0(H))H=new Date(H);if(!gW0(G))H=new Date(G);if(H.getTime()===K.getTime()&&G.getTime()===q.getTime())return J();f$[Q](Y,H,G,J)}b$.prototype._finish=function(){var $=this;if($._finishing)return;$._finishing=!0;var I=0,U=null,Y=!1;if($._old)$._old.atime=new Date(0),$._old.mtime=new Date(0),Q($._old);else{var J=$.props.follow?"stat":"lstat";f$[J]($._path,function(q,H){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);Q($._old=H)})}return;function Q(q){I+=3,xW0($,$.props,q,$._path,K("chmod")),kW0($,$.props,q,$._path,K("chown")),fW0($,$.props,q,$._path,K("utimes"))}function K(q){return function(H){if(U)return;if(H)return H.fstream_finish_call=q,$.error(U=H);if(--I>0)return;if(Y)return;if(Y=!0,!$._madeDir)return G();else bW0($,$._path,G);function G(W){if(W)return W.fstream_finish_call="setupMadeDir",$.error(W);$.emit("end"),$.emit("close")}}}};function bW0($,I,U){var Y=$._madeDir,J=eq.dirname(I);MQ1($,J,function(Q){if(Q)return U(Q);if(J===Y)return U();bW0($,J,U)})}function MQ1($,I,U){var Y={};Object.keys($.props).forEach(function(q){if(Y[q]=$.props[q],q==="mode"&&$.type!=="Directory")Y[q]=Y[q]|parseInt("0111",8)});var J=3,Q=null;f$.stat(I,function(q,H){if(q)return U(Q=q);xW0($,Y,H,I,K),kW0($,Y,H,I,K),fW0($,Y,H,I,K)});function K(q){if(Q)return;if(q)return U(Q=q);if(--J===0)return U()}}b$.prototype.pipe=function(){this.error("Can't pipe from writable stream")};b$.prototype.add=function(){this.error("Can't add to non-Directory type")};b$.prototype.write=function(){return!0};function AQ1($){return Object.prototype.toString.call($)}function gW0($){return typeof $==="object"&&AQ1($)==="[object Date]"}});var Uh=O((PQ1)=>{PQ1.Abstract=AL();PQ1.Reader=s3();PQ1.Writer=zJ();PQ1.File={Reader:_y(),Writer:oy()};PQ1.Dir={Reader:Cy(),Writer:my()};PQ1.Link={Reader:Ry(),Writer:ly()};PQ1.Proxy={Reader:gy(),Writer:ty()};PQ1.Reader.Dir=PQ1.DirReader=PQ1.Dir.Reader;PQ1.Reader.File=PQ1.FileReader=PQ1.File.Reader;PQ1.Reader.Link=PQ1.LinkReader=PQ1.Link.Reader;PQ1.Reader.Proxy=PQ1.ProxyReader=PQ1.Proxy.Reader;PQ1.Writer.Dir=PQ1.DirWriter=PQ1.Dir.Writer;PQ1.Writer.File=PQ1.FileWriter=PQ1.File.Writer;PQ1.Writer.Link=PQ1.LinkWriter=PQ1.Link.Writer;PQ1.Writer.Proxy=PQ1.ProxyWriter=PQ1.Proxy.Writer;PQ1.collect=gL()});var pW0=O((g_1,nW0)=>{nW0.exports=_Q1;var BQ1=ZL(),vQ1=Uh().Writer,Yh=t("path"),RQ1=t("stream"),jQ1=Ey(),CQ1=W7();function _Q1($){$.path=Yh.resolve(Yh.normalize($.path));var I=new BQ1($),U=new RQ1.Writable({objectMode:!0});U._write=function(J,Q,K){if(J.type=="Directory")return K();var q=Yh.join($.path,J.path);if(q.indexOf($.path)!=0)return K();let H=$.getWriter?$.getWriter({path:q}):vQ1({path:q});J.pipe(H).on("error",K).on("close",K)};var Y=jQ1(I,U);return I.once("crx-header",function(J){Y.crxHeader=J}),I.pipe(U).on("finish",function(){Y.emit("close")}),Y.promise=function(){return new CQ1(function(J,Q){Y.on("close",J),Y.on("error",Q)})},Y}});var cW0=O((y_1,uL)=>{var x4=function($){var I=1e7,U=7,Y=9007199254740992,J=Z(Y),Q="0123456789abcdefghijklmnopqrstuvwxyz",K=typeof BigInt==="function";function q(N,M,C,u){if(typeof N>"u")return q[0];if(typeof M<"u")return+M===10&&!C?v0(N):b6(N,M,C,u);return v0(N)}function H(N,M){this.value=N,this.sign=M,this.isSmall=!1}H.prototype=Object.create(q.prototype);function G(N){this.value=N,this.sign=N<0,this.isSmall=!0}G.prototype=Object.create(q.prototype);function W(N){th
Line truncated
|
||||
actual: `+$._bytesWritten);uL.prototype._finish.call($)}});var sy=O((P_1,SW0)=>{SW0.exports=D7;var ay=LJ(),WQ1=lq(),wQ1=d0(),VQ1=yL(),ZQ1=t("fs");wQ1(D7,ay);function D7($){var I=this;if(!(I instanceof D7))throw Error("ProxyWriter must be called as constructor.");I.props=$,I._needDrain=!1,ay.call(I,$)}D7.prototype._stat=function(){var $=this,I=$.props,U=I.follow?"stat":"lstat";ZQ1[U](I.path,function(Y,J){var Q;if(Y||!J)Q="File";else Q=WQ1(J);I[Q]=!0,I.type=$.type=Q,$._old=J,$._addProxy(ay(I,J))})};D7.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(Y){$.on(Y,I.emit.bind(I,Y))}),I.emit("proxy",$);var U=I._buffer;if(U.forEach(function(Y){$[Y[0]].apply($,Y[1])}),I._buffer.length=0,I._needsDrain)I.emit("drain")};D7.prototype.add=function($){if(VQ1($),!this._proxy)return this._buffer.push(["add",[$]]),this._needDrain=!0,!1;return this._proxy.add($)};D7.prototype.write=function($){if(!this._proxy)return this._buffer.push(["write",[$]]),this._needDrain=!0,!1;return this._proxy.write($)};D7.prototype.end=function($){if(!this._proxy)return this._buffer.push(["end",[$]]),!1;return this._proxy.end($)}});var LJ=O((T_1,bW0)=>{bW0.exports=i$;var f$=s6(),zQ1=d0(),XQ1=by(),LQ1=my(),eq=t("path"),yW0=process.platform==="win32"?0:process.umask(),hW0=lq(),uW0=PL();zQ1(i$,uW0);i$.dirmode=parseInt("0777",8)&~yW0;i$.filemode=parseInt("0666",8)&~yW0;var DQ1=oy(),OQ1=ry(),FQ1=ty(),NQ1=sy();function i$($,I){var U=this;if(typeof $==="string")$={path:$};var Y=hW0($),J=i$;switch(Y){case"Directory":J=DQ1;break;case"File":J=FQ1;break;case"Link":case"SymbolicLink":J=OQ1;break;case null:default:J=NQ1;break}if(!(U instanceof J))return new J($);if(uW0.call(U),!$.path)U.error("Must provide a path",null,!0);if(U.type=$.type,U.props=$,U.depth=$.depth||0,U.clobber=$.clobber===!1?$.clobber:!0,U.parent=$.parent||null,U.root=$.root||$.parent&&$.parent.root||U,U._path=U.path=eq.resolve($.path),process.platform==="win32"){if(U.path=U._path=U.path.replace(/\?/g,"_"),U._path.length>=260)U._swallowErrors=!0,U._path="\\\\?\\"+U.path.replace(/\//g,"\\")}if(U.basename=eq.basename($.path),U.dirname=eq.dirname($.path),U.linkpath=$.linkpath||null,$.parent=$.root=null,U.size=$.size,typeof $.mode==="string")$.mode=parseInt($.mode,8);U.readable=!1,U.writable=!0,U._buffer=[],U.ready=!1,U.filter=typeof $.filter==="function"?$.filter:null,U._stat(I)}i$.prototype._create=function(){var $=this;f$[$.props.follow?"stat":"lstat"]($._path,function(I){if(I)return $.warn("Cannot create "+$._path+`
|
||||
Unsupported type: `+$.type,"ENOTSUP");$._finish()})};i$.prototype._stat=function($){var I=this,U=I.props,Y=U.follow?"stat":"lstat",J=I._proxy||I;if($)Q(null,$);else f$[Y](I._path,Q);function Q(K,q){if(I.filter&&!I.filter.call(J,J,q)){I._aborted=!0,I.emit("end"),I.emit("close");return}if(K||!q)return ey(I);I._old=q;var H=hW0(q);if(H!==I.type||I.type==="File"&&q.nlink>1)return XQ1(I._path,function(G){if(G)return I.error(G);I._old=null,ey(I)});ey(I)}};function ey($){LQ1(eq.dirname($._path),i$.dirmode,function(I,U){if(I)return $.error(I);return $._madeDir=U,$._create()})}function kW0($,I,U,Y,J){var Q=I.mode,K=I.follow||$.type!=="SymbolicLink"?"chmod":"lchmod";if(!f$[K])return J();if(typeof Q!=="number")return J();var q=U.mode&parseInt("0777",8);if(Q=Q&parseInt("0777",8),Q===q)return J();f$[K](Y,Q,J)}function xW0($,I,U,Y,J){if(process.platform==="win32")return J();if(!process.getuid||process.getuid()!==0)return J();if(typeof I.uid!=="number"&&typeof I.gid!=="number")return J();if(U.uid===I.uid&&U.gid===I.gid)return J();var Q=$.props.follow||$.type!=="SymbolicLink"?"chown":"lchown";if(!f$[Q])return J();if(typeof I.uid!=="number")I.uid=U.uid;if(typeof I.gid!=="number")I.gid=U.gid;f$[Q](Y,I.uid,I.gid,J)}function fW0($,I,U,Y,J){if(!f$.utimes||process.platform==="win32")return J();var Q=I.follow||$.type!=="SymbolicLink"?"utimes":"lutimes";if(Q==="lutimes"&&!f$[Q])Q="utimes";if(!f$[Q])return J();var{atime:K,mtime:q}=U,H=I.atime,G=I.mtime;if(H===void 0)H=K;if(G===void 0)G=q;if(!gW0(H))H=new Date(H);if(!gW0(G))H=new Date(G);if(H.getTime()===K.getTime()&&G.getTime()===q.getTime())return J();f$[Q](Y,H,G,J)}i$.prototype._finish=function(){var $=this;if($._finishing)return;$._finishing=!0;var I=0,U=null,Y=!1;if($._old)$._old.atime=new Date(0),$._old.mtime=new Date(0),Q($._old);else{var J=$.props.follow?"stat":"lstat";f$[J]($._path,function(q,H){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);Q($._old=H)})}return;function Q(q){I+=3,kW0($,$.props,q,$._path,K("chmod")),xW0($,$.props,q,$._path,K("chown")),fW0($,$.props,q,$._path,K("utimes"))}function K(q){return function(H){if(U)return;if(H)return H.fstream_finish_call=q,$.error(U=H);if(--I>0)return;if(Y)return;if(Y=!0,!$._madeDir)return G();else iW0($,$._path,G);function G(W){if(W)return W.fstream_finish_call="setupMadeDir",$.error(W);$.emit("end"),$.emit("close")}}}};function iW0($,I,U){var Y=$._madeDir,J=eq.dirname(I);MQ1($,J,function(Q){if(Q)return U(Q);if(J===Y)return U();iW0($,J,U)})}function MQ1($,I,U){var Y={};Object.keys($.props).forEach(function(q){if(Y[q]=$.props[q],q==="mode"&&$.type!=="Directory")Y[q]=Y[q]|parseInt("0111",8)});var J=3,Q=null;f$.stat(I,function(q,H){if(q)return U(Q=q);kW0($,Y,H,I,K),xW0($,Y,H,I,K),fW0($,Y,H,I,K)});function K(q){if(Q)return;if(q)return U(Q=q);if(--J===0)return U()}}i$.prototype.pipe=function(){this.error("Can't pipe from writable stream")};i$.prototype.add=function(){this.error("Can't add to non-Directory type")};i$.prototype.write=function(){return!0};function AQ1($){return Object.prototype.toString.call($)}function gW0($){return typeof $==="object"&&AQ1($)==="[object Date]"}});var Jh=O((PQ1)=>{PQ1.Abstract=PL();PQ1.Reader=s3();PQ1.Writer=LJ();PQ1.File={Reader:gy(),Writer:ty()};PQ1.Dir={Reader:Sy(),Writer:oy()};PQ1.Link={Reader:Cy(),Writer:ry()};PQ1.Proxy={Reader:hy(),Writer:sy()};PQ1.Reader.Dir=PQ1.DirReader=PQ1.Dir.Reader;PQ1.Reader.File=PQ1.FileReader=PQ1.File.Reader;PQ1.Reader.Link=PQ1.LinkReader=PQ1.Link.Reader;PQ1.Reader.Proxy=PQ1.ProxyReader=PQ1.Proxy.Reader;PQ1.Writer.Dir=PQ1.DirWriter=PQ1.Dir.Writer;PQ1.Writer.File=PQ1.FileWriter=PQ1.File.Writer;PQ1.Writer.Link=PQ1.LinkWriter=PQ1.Link.Writer;PQ1.Writer.Proxy=PQ1.ProxyWriter=PQ1.Proxy.Writer;PQ1.collect=yL()});var pW0=O((y_1,nW0)=>{nW0.exports=_Q1;var BQ1=zL(),vQ1=Jh().Writer,Qh=t("path"),RQ1=t("stream"),jQ1=vy(),CQ1=W7();function _Q1($){$.path=Qh.resolve(Qh.normalize($.path));var I=new BQ1($),U=new RQ1.Writable({objectMode:!0});U._write=function(J,Q,K){if(J.type=="Directory")return K();var q=Qh.join($.path,J.path);if(q.indexOf($.path)!=0)return K();let H=$.getWriter?$.getWriter({path:q}):vQ1({path:q});J.pipe(H).on("error",K).on("close",K)};var Y=jQ1(I,U);return I.once("crx-header",function(J){Y.crxHeader=J}),I.pipe(U).on("finish",function(){Y.emit("close")}),Y.promise=function(){return new CQ1(function(J,Q){Y.on("close",J),Y.on("error",Q)})},Y}});var cW0=O((h_1,kL)=>{var k4=function($){var I=1e7,U=7,Y=9007199254740992,J=Z(Y),Q="0123456789abcdefghijklmnopqrstuvwxyz",K=typeof BigInt==="function";function q(N,M,C,u){if(typeof N>"u")return q[0];if(typeof M<"u")return+M===10&&!C?v0(N):i6(N,M,C,u);return v0(N)}function H(N,M){this.value=N,this.sign=M,this.isSmall=!1}H.prototype=Object.create(q.prototype);function G(N){this.value=N,this.sign=N<0,this.isSmall=!0}G.prototype=Object.create(q.prototype);function W(N){th
Line truncated
|
||||
* Tmp
|
||||
*
|
||||
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
|
||||
*
|
||||
* MIT Licensed
|
||||
*/var i1=t("fs"),nL=t("os"),k4=t("path"),Yw0=t("crypto"),m8={fs:i1.constants,os:nL.constants},qw0=/XXXXXX/,Hw0=(m8.O_CREAT||m8.fs.O_CREAT)|(m8.O_EXCL||m8.fs.O_EXCL)|(m8.O_RDWR||m8.fs.O_RDWR),I21=nL.platform()==="win32",U21=m8.EBADF||m8.os.errno.EBADF,Y21=m8.ENOENT||m8.os.errno.ENOENT,LJ=[],Gw0=i1.rmdirSync.bind(i1),Ww0=!1;function J21($,I){return i1.rm($,{recursive:!0},I)}function ww0($){return i1.rmSync($,{recursive:!0})}function Hh($,I){let U=DJ($,I),Y=U[0],J=U[1];z21(Y,function(Q,K){if(Q)return J(Q);let q=K.tries;(function H(){try{let G=Zw0(K);i1.stat(G,function(W){if(!W){if(q-- >0)return H();return J(Error("Could not get a unique tmp filename, max tries reached "+G))}J(null,G)})}catch(G){J(G)}})()})}function Gh($){let I=DJ($),U=I[0],Y=X21(U),J=Y.tries;do{let Q=Zw0(Y);try{i1.statSync(Q)}catch(K){return Q}}while(J-- >0);throw Error("Could not get a unique tmp filename, max tries reached")}function Q21($,I){let U=DJ($,I),Y=U[0],J=U[1];Hh(Y,function(K,q){if(K)return J(K);i1.open(q,Hw0,Y.mode||384,function(G,W){if(G)return J(G);if(Y.discardDescriptor)return i1.close(W,function(Z){return J(Z,q,void 0,Kh(q,-1,Y,!1))});else{let w=Y.discardDescriptor||Y.detachDescriptor;J(null,q,W,Kh(q,w?-1:W,Y,!1))}})})}function K21($){let I=DJ($),U=I[0],Y=U.discardDescriptor||U.detachDescriptor,J=Gh(U),Q=i1.openSync(J,Hw0,U.mode||384);if(U.discardDescriptor)i1.closeSync(Q),Q=void 0;return{name:J,fd:Q,removeCallback:Kh(J,Y?-1:Q,U,!0)}}function q21($,I){let U=DJ($,I),Y=U[0],J=U[1];Hh(Y,function(K,q){if(K)return J(K);i1.mkdir(q,Y.mode||448,function(G){if(G)return J(G);J(null,q,Vw0(q,Y,!1))})})}function H21($){let I=DJ($),U=I[0],Y=Gh(U);return i1.mkdirSync(Y,U.mode||448),{name:Y,removeCallback:Vw0(Y,U,!0)}}function G21($,I){let U=function(Y){if(Y&&!qh(Y))return I(Y);I()};if(0<=$[0])i1.close($[0],function(){i1.unlink($[1],U)});else i1.unlink($[1],U)}function W21($){let I=null;try{if(0<=$[0])i1.closeSync($[0])}catch(U){if(!L21(U)&&!qh(U))throw U}finally{try{i1.unlinkSync($[1])}catch(U){if(!qh(U))I=U}}if(I!==null)throw I}function Kh($,I,U,Y){let J=iL(W21,[I,$],Y),Q=iL(G21,[I,$],Y,J);if(!U.keep)LJ.unshift(J);return Y?J:Q}function Vw0($,I,U){let Y=I.unsafeCleanup?J21:i1.rmdir.bind(i1),J=I.unsafeCleanup?ww0:Gw0,Q=iL(J,$,U),K=iL(Y,$,U,Q);if(!I.keep)LJ.unshift(Q);return U?Q:K}function iL($,I,U,Y){let J=!1;return function Q(K){if(!J){let q=Y||Q,H=LJ.indexOf(q);if(H>=0)LJ.splice(H,1);if(J=!0,U||$===Gw0||$===ww0)return $(I);else return $(I,K||function(){})}}}function w21(){if(!Ww0)return;while(LJ.length)try{LJ[0]()}catch($){}}function Jw0($){let I=[],U=null;try{U=Yw0.randomBytes($)}catch(Y){U=Yw0.pseudoRandomBytes($)}for(let Y=0;Y<$;Y++)I.push("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[U[Y]%62]);return I.join("")}function $$($){return typeof $>"u"}function DJ($,I){if(typeof $==="function")return[{},$];if($$($))return[{},I];let U={};for(let Y of Object.getOwnPropertyNames($))U[Y]=$[Y];return[U,I]}function V21($,I,U){let Y=k4.isAbsolute($)?$:k4.join(I,$);i1.stat(Y,function(J){if(J)i1.realpath(k4.dirname(Y),function(Q,K){if(Q)return U(Q);U(null,k4.join(K,k4.basename(Y)))});else i1.realpath(Y,U)})}function Z21($,I){let U=k4.isAbsolute($)?$:k4.join(I,$);try{return i1.statSync(U),i1.realpathSync(U)}catch(Y){let J=i1.realpathSync(k4.dirname(U));return k4.join(J,k4.basename(U))}}function Zw0($){let I=$.tmpdir;if(!$$($.name))return k4.join(I,$.dir,$.name);if(!$$($.template))return k4.join(I,$.dir,$.template).replace(qw0,Jw0(6));let U=[$.prefix?$.prefix:"tmp","-",process.pid,"-",Jw0(12),$.postfix?"-"+$.postfix:""].join("");return k4.join(I,$.dir,U)}function Qh($,I){if(typeof I!=="string")throw Error(`${$} option must be a string, got "${typeof I}".`);if(I.includes(".."))throw Error("Relative value not allowed");return I}function zw0($){if(!$$($.name)){let I=$.name;if(k4.isAbsolute(I))throw Error(`name option must not contain an absolute path, found "${I}".`);let U=k4.basename(I);if(U===".."||U==="."||U!==I)throw Error(`name option must not contain a path, found "${I}".`)}if(!$$($.template)){if(typeof $.template!=="string")throw Error(`template option must be a string, got "${typeof $.template}".`);if(!$.template.match(qw0))throw Error(`Invalid template, found "${$.template}".`)}if(!$$($.tries)&&isNaN($.tries)||$.tries<0)throw Error(`Invalid tries, found "${$.tries}".`);$.tries=$$($.name)?$.tries||3:1,$.keep=!!$.keep,$.detachDescriptor=!!$.detachDescriptor,$.discardDescriptor=!!$.discardDescriptor,$.unsafeCleanup=!!$.unsafeCleanup,$.prefix=$$($.prefix)?"":Qh("prefix",$.prefix),$.postfix=$$($.postfix)?"":Qh("postfix",$.postfix),$.template=$$($.template)?void 0:Qh("template",$.template)}function Qw0($,I,U,Y){if($$(I))return Y(null);V21(I,U,function(J,Q){if(J)return Y(J);let K=k4.relative(U,Q);if(K.startsWith("..")||k4.isAbsolute(K))return Y(Error(`${$} option must be relative to "${U}", found "${K}".`));Y(null,K)})}function Kw0($,I,U){if($$(I))return;let Y=Z21(I,U),J=k4.relative(U,Y);if(J.startsWith("..")||k4.isAbsolute(J))throw ELine truncated
|
||||
*/var b1=t("fs"),pL=t("os"),x4=t("path"),Yw0=t("crypto"),m8={fs:b1.constants,os:pL.constants},qw0=/XXXXXX/,Hw0=(m8.O_CREAT||m8.fs.O_CREAT)|(m8.O_EXCL||m8.fs.O_EXCL)|(m8.O_RDWR||m8.fs.O_RDWR),I21=pL.platform()==="win32",U21=m8.EBADF||m8.os.errno.EBADF,Y21=m8.ENOENT||m8.os.errno.ENOENT,OJ=[],Gw0=b1.rmdirSync.bind(b1),Ww0=!1;function J21($,I){return b1.rm($,{recursive:!0},I)}function ww0($){return b1.rmSync($,{recursive:!0})}function Wh($,I){let U=FJ($,I),Y=U[0],J=U[1];z21(Y,function(Q,K){if(Q)return J(Q);let q=K.tries;(function H(){try{let G=Zw0(K);b1.stat(G,function(W){if(!W){if(q-- >0)return H();return J(Error("Could not get a unique tmp filename, max tries reached "+G))}J(null,G)})}catch(G){J(G)}})()})}function wh($){let I=FJ($),U=I[0],Y=X21(U),J=Y.tries;do{let Q=Zw0(Y);try{b1.statSync(Q)}catch(K){return Q}}while(J-- >0);throw Error("Could not get a unique tmp filename, max tries reached")}function Q21($,I){let U=FJ($,I),Y=U[0],J=U[1];Wh(Y,function(K,q){if(K)return J(K);b1.open(q,Hw0,Y.mode||384,function(G,W){if(G)return J(G);if(Y.discardDescriptor)return b1.close(W,function(Z){return J(Z,q,void 0,Hh(q,-1,Y,!1))});else{let w=Y.discardDescriptor||Y.detachDescriptor;J(null,q,W,Hh(q,w?-1:W,Y,!1))}})})}function K21($){let I=FJ($),U=I[0],Y=U.discardDescriptor||U.detachDescriptor,J=wh(U),Q=b1.openSync(J,Hw0,U.mode||384);if(U.discardDescriptor)b1.closeSync(Q),Q=void 0;return{name:J,fd:Q,removeCallback:Hh(J,Y?-1:Q,U,!0)}}function q21($,I){let U=FJ($,I),Y=U[0],J=U[1];Wh(Y,function(K,q){if(K)return J(K);b1.mkdir(q,Y.mode||448,function(G){if(G)return J(G);J(null,q,Vw0(q,Y,!1))})})}function H21($){let I=FJ($),U=I[0],Y=wh(U);return b1.mkdirSync(Y,U.mode||448),{name:Y,removeCallback:Vw0(Y,U,!0)}}function G21($,I){let U=function(Y){if(Y&&!Gh(Y))return I(Y);I()};if(0<=$[0])b1.close($[0],function(){b1.unlink($[1],U)});else b1.unlink($[1],U)}function W21($){let I=null;try{if(0<=$[0])b1.closeSync($[0])}catch(U){if(!L21(U)&&!Gh(U))throw U}finally{try{b1.unlinkSync($[1])}catch(U){if(!Gh(U))I=U}}if(I!==null)throw I}function Hh($,I,U,Y){let J=nL(W21,[I,$],Y),Q=nL(G21,[I,$],Y,J);if(!U.keep)OJ.unshift(J);return Y?J:Q}function Vw0($,I,U){let Y=I.unsafeCleanup?J21:b1.rmdir.bind(b1),J=I.unsafeCleanup?ww0:Gw0,Q=nL(J,$,U),K=nL(Y,$,U,Q);if(!I.keep)OJ.unshift(Q);return U?Q:K}function nL($,I,U,Y){let J=!1;return function Q(K){if(!J){let q=Y||Q,H=OJ.indexOf(q);if(H>=0)OJ.splice(H,1);if(J=!0,U||$===Gw0||$===ww0)return $(I);else return $(I,K||function(){})}}}function w21(){if(!Ww0)return;while(OJ.length)try{OJ[0]()}catch($){}}function Jw0($){let I=[],U=null;try{U=Yw0.randomBytes($)}catch(Y){U=Yw0.pseudoRandomBytes($)}for(let Y=0;Y<$;Y++)I.push("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[U[Y]%62]);return I.join("")}function $$($){return typeof $>"u"}function FJ($,I){if(typeof $==="function")return[{},$];if($$($))return[{},I];let U={};for(let Y of Object.getOwnPropertyNames($))U[Y]=$[Y];return[U,I]}function V21($,I,U){let Y=x4.isAbsolute($)?$:x4.join(I,$);b1.stat(Y,function(J){if(J)b1.realpath(x4.dirname(Y),function(Q,K){if(Q)return U(Q);U(null,x4.join(K,x4.basename(Y)))});else b1.realpath(Y,U)})}function Z21($,I){let U=x4.isAbsolute($)?$:x4.join(I,$);try{return b1.statSync(U),b1.realpathSync(U)}catch(Y){let J=b1.realpathSync(x4.dirname(U));return x4.join(J,x4.basename(U))}}function Zw0($){let I=$.tmpdir;if(!$$($.name))return x4.join(I,$.dir,$.name);if(!$$($.template))return x4.join(I,$.dir,$.template).replace(qw0,Jw0(6));let U=[$.prefix?$.prefix:"tmp","-",process.pid,"-",Jw0(12),$.postfix?"-"+$.postfix:""].join("");return x4.join(I,$.dir,U)}function qh($,I){if(typeof I!=="string")throw Error(`${$} option must be a string, got "${typeof I}".`);if(I.includes(".."))throw Error("Relative value not allowed");return I}function zw0($){if(!$$($.name)){let I=$.name;if(x4.isAbsolute(I))throw Error(`name option must not contain an absolute path, found "${I}".`);let U=x4.basename(I);if(U===".."||U==="."||U!==I)throw Error(`name option must not contain a path, found "${I}".`)}if(!$$($.template)){if(typeof $.template!=="string")throw Error(`template option must be a string, got "${typeof $.template}".`);if(!$.template.match(qw0))throw Error(`Invalid template, found "${$.template}".`)}if(!$$($.tries)&&isNaN($.tries)||$.tries<0)throw Error(`Invalid tries, found "${$.tries}".`);$.tries=$$($.name)?$.tries||3:1,$.keep=!!$.keep,$.detachDescriptor=!!$.detachDescriptor,$.discardDescriptor=!!$.discardDescriptor,$.unsafeCleanup=!!$.unsafeCleanup,$.prefix=$$($.prefix)?"":qh("prefix",$.prefix),$.postfix=$$($.postfix)?"":qh("postfix",$.postfix),$.template=$$($.template)?void 0:qh("template",$.template)}function Qw0($,I,U,Y){if($$(I))return Y(null);V21(I,U,function(J,Q){if(J)return Y(J);let K=x4.relative(U,Q);if(K.startsWith("..")||x4.isAbsolute(K))return Y(Error(`${$} option must be relative to "${U}", found "${K}".`));Y(null,K)})}function Kw0($,I,U){if($$(I))return;let Y=Z21(I,U),J=x4.relative(U,Y);if(J.startsWith("..")||x4.isAbsolute(J))throw ELine 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",csiLine 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:`\x00\x01Ẳ\x03\x04ẴẪ\x07\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:`\x00\x01\x02\x03\x04\x05\x06\x07\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:`\x00\x01\x02\x03\x04\x05\x06\x07\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 tV0=O((rq1)=>{var Gu=d5().Buffer;rq1._dbcs=l5;var w6=-1,rV0=-2,c$=-10,x6=-1000,jJ=Array(256),VH=-1;for(wH=0;wH<256;wH++)jJ[wH]=w6;var wH;function l5($,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 U=$.table();this.decodeTables=[],this.decodeTables[0]=jJ.slice(0),this.decodeTableSeq=[];for(var Y=0;Y<U.length;Y++)this._addDecodeChunk(U[Y]);if(typeof $.gb18030==="function"){this.gb18030=$.gb18030();var J=this.decodeTables.length;this.decodeTables.push(jJ.slice(0));var Q=this.decodeTables.length;this.decodeTables.push(jJ.slice(0));var K=this.decodeTables[0];for(var Y=129;Y<=254;Y++){var q=this.decodeTables[x6-K[Y]];for(var H=48;H<=57;H++){if(q[H]===w6)q[H]=x6-J;else if(q[H]>x6)throw Error("gb18030 decode tables conflict at byte 2");var G=this.decodeTables[x6-q[H]];for(var W=129;W<=254;W++){if(G[W]===w6)G[W]=x6-Q;else if(G[W]===x6-Q)continue;else if(G[W]>x6)throw Error("gb18030 decode tables conflict at byte 3");var w=this.decodeTables[x6-G[W]];for(var Z=48;Z<=57;Z++)if(w[Z]===w6)w[Z]=rV0}}}}this.defaultCharUnicode=I.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var V={};if($.encodeSkipVals)for(var Y=0;Y<$.encodeSkipVals.length;Y++){var X=$.encodeSkipVals[Y];if(typeof X==="number")V[X]=!0;else for(var H=X.from;H<=X.to;H++)V[H]=!0}if(this._fillEncodeTable(0,0,V),$.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}l5.prototype.encoder=zD;l5.prototype.decoder=Wu;l5.prototype._getDecodeTrieNode=function($){var I=[];for(;$>0;$>>>=8)I.push($&255);if(I.length==0)I.push(0);var U=this.decodeTables[0];for(var Y=I.length-1;Y>0;Y--){var J=U[I[Y]];if(J==w6)U[I[Y]]=x6-this.decodeTables.length,this.decodeTables.push(U=jJ.slice(0));else if(J<=x6)U=this.decodeTables[x6-J];else throw Error("Overwrite byte in "+this.encodingName+", addr: "+$.toString(16))}return U};l5.prototype._addDecodeChunk=function($){var I=parseInt($[0],16),U=this._getDecodeTrieNode(I);I=I&255;for(var Y=1;Y<$.length;Y++){var J=$[Y];if(typeof J==="string")for(var Q=0;Q<J.length;){var K=J.charCodeAt(Q++);if(K>=55296&&K<56320){var q=J.charCodeAt(Q++);if(q>=56320&&q<57344)U[I++]=65536+(K-55296)*1024+(q-56320);else throw Error("Incorrect surrogate pair in "+this.encodingName+" at chunk "+$[0])}else if(K>4080&&K<=4095){var H=4095-K+2,G=[];for(var W=0;W<H;W++)G.push(J.charCodeAt(Q++));U[I++]=c$-this.decodeTableSeq.length,this.decodeTableSeq.push(G)}else U[I++]=K}else if(typeof J==="number"){var w=U[I-1]+1;for(var Q=0;Q<J;Q++)U[I++]=w++}else throw Error("Incorrect type '"+typeof J+"' given in "+this.encodingName+" at chunk "+$[0])}if(I>255)throw Error("Incorrect chunk in "+this.encoLine truncated
|
||||
`)}var PI=($)=>(I,U,Y,J)=>{let Q=Y?{...Y,async:!1}:{async:!1},K=I._zod.run({value:U,issues:[]},Q);if(K instanceof Promise)throw new Z8;if(K.issues.length){let q=new(J?.Err??$)(K.issues.map((H)=>E6(H,Q,z4())));throw sH(q,J?.callee),q}return K.value},tJ=PI(n6),TI=($)=>async(I,U,Y,J)=>{let Q=Y?{...Y,async:!0}:{async:!0},K=I._zod.run({value:U,issues:[]},Q);if(K instanceof Promise)K=await K;if(K.issues.length){let q=new(J?.Err??$)(K.issues.map((H)=>E6(H,Q,z4())));throw sH(q,J?.callee),q}return K.value},aJ=TI(n6),EI=($)=>(I,U,Y)=>{let J=Y?{...Y,async:!1}:{async:!1},Q=I._zod.run({value:U,issues:[]},J);if(Q instanceof Promise)throw new Z8;return Q.issues.length?{success:!1,error:new($??lJ)(Q.issues.map((K)=>E6(K,J,z4())))}:{success:!0,data:Q.value}},BI=EI(n6),vI=($)=>async(I,U,Y)=>{let J=Y?{...Y,async:!0}:{async:!0},Q=I._zod.run({value:U,issues:[]},J);if(Q instanceof Promise)Q=await Q;return Q.issues.length?{success:!1,error:new $(Q.issues.map((K)=>E6(K,J,z4())))}:{success:!0,data:Q.value}},sJ=vI(n6),eH=($)=>(I,U,Y)=>{let J=Y?{...Y,direction:"backward"}:{direction:"backward"};return PI($)(I,U,J)},ix=eH(n6),$G=($)=>(I,U,Y)=>{return PI($)(I,U,Y)},nx=$G(n6),IG=($)=>async(I,U,Y)=>{let J=Y?{...Y,direction:"backward"}:{direction:"backward"};return TI($)(I,U,J)},px=IG(n6),UG=($)=>async(I,U,Y)=>{return TI($)(I,U,Y)},cx=UG(n6),YG=($)=>(I,U,Y)=>{let J=Y?{...Y,direction:"backward"}:{direction:"backward"};return EI($)(I,U,J)},dx=YG(n6),JG=($)=>(I,U,Y)=>{return EI($)(I,U,Y)},mx=JG(n6),QG=($)=>async(I,U,Y)=>{let J=Y?{...Y,direction:"backward"}:{direction:"backward"};return vI($)(I,U,J)},lx=QG(n6),KG=($)=>async(I,U,Y)=>{return vI($)(I,U,Y)},ox=KG(n6);var Q$={};$5(Q$,{xid:()=>FO,uuid7:()=>qD0,uuid6:()=>KD0,uuid4:()=>QD0,uuid:()=>C7,uppercase:()=>cO,unicodeEmail:()=>rx,undefined:()=>nO,ulid:()=>OO,time:()=>hO,string:()=>xO,sha512_hex:()=>RD0,sha512_base64url:()=>CD0,sha512_base64:()=>jD0,sha384_hex:()=>ED0,sha384_base64url:()=>vD0,sha384_base64:()=>BD0,sha256_hex:()=>AD0,sha256_base64url:()=>TD0,sha256_base64:()=>PD0,sha1_hex:()=>FD0,sha1_base64url:()=>MD0,sha1_base64:()=>ND0,rfc5322Email:()=>GD0,number:()=>eJ,null:()=>iO,nanoid:()=>MO,md5_hex:()=>LD0,md5_base64url:()=>OD0,md5_base64:()=>DD0,mac:()=>RO,lowercase:()=>pO,ksuid:()=>NO,ipv6:()=>vO,ipv4:()=>BO,integer:()=>fO,idnEmail:()=>WD0,httpProtocol:()=>SO,html5Email:()=>HD0,hostname:()=>ZD0,hex:()=>XD0,guid:()=>PO,extendedDuration:()=>JD0,emoji:()=>EO,email:()=>TO,e164:()=>gO,duration:()=>AO,domain:()=>zD0,datetime:()=>uO,date:()=>yO,cuid2:()=>DO,cuid:()=>LO,cidrv6:()=>CO,cidrv4:()=>jO,browserEmail:()=>wD0,boolean:()=>bO,bigint:()=>kO,base64url:()=>qG,base64:()=>_O});var LO=/^[cC][0-9a-z]{6,}$/,DO=/^[0-9a-z]+$/,OO=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,FO=/^[0-9a-vA-V]{20}$/,NO=/^[A-Za-z0-9]{27}$/,MO=/^[a-zA-Z0-9_-]{21}$/,AO=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,JD0=/^[-+]?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)?)??$/,PO=/^([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})$/,C7=($)=>{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-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},QD0=C7(4),KD0=C7(6),qD0=C7(7),TO=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,HD0=/^[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])?)*$/,GD0=/^(([^<>()\[\]\\.,;:\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,}))$/,rx=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,WD0=rx,wD0=/^[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])?)*$/,VD0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function EO(){return new RegExp(VD0,"u")}var BO=/^(?:(?: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])$/,vO=/^(([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}|:))$/,RO=($)=>{let I=A$($??":");return new RegExp(`^(?:[0-9A-F]{2}${I}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${I}){5}[0-9a-f]{2}$`)},jO=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0Line 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=O((rq1)=>{var wu=d5().Buffer;rq1._dbcs=l5;var w6=-1,rV0=-2,c$=-10,k6=-1000,_J=Array(256),VH=-1;for(wH=0;wH<256;wH++)_J[wH]=w6;var wH;function l5($,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 U=$.table();this.decodeTables=[],this.decodeTables[0]=_J.slice(0),this.decodeTableSeq=[];for(var Y=0;Y<U.length;Y++)this._addDecodeChunk(U[Y]);if(typeof $.gb18030==="function"){this.gb18030=$.gb18030();var J=this.decodeTables.length;this.decodeTables.push(_J.slice(0));var Q=this.decodeTables.length;this.decodeTables.push(_J.slice(0));var K=this.decodeTables[0];for(var Y=129;Y<=254;Y++){var q=this.decodeTables[k6-K[Y]];for(var H=48;H<=57;H++){if(q[H]===w6)q[H]=k6-J;else if(q[H]>k6)throw Error("gb18030 decode tables conflict at byte 2");var G=this.decodeTables[k6-q[H]];for(var W=129;W<=254;W++){if(G[W]===w6)G[W]=k6-Q;else if(G[W]===k6-Q)continue;else if(G[W]>k6)throw Error("gb18030 decode tables conflict at byte 3");var w=this.decodeTables[k6-G[W]];for(var Z=48;Z<=57;Z++)if(w[Z]===w6)w[Z]=rV0}}}}this.defaultCharUnicode=I.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var V={};if($.encodeSkipVals)for(var Y=0;Y<$.encodeSkipVals.length;Y++){var X=$.encodeSkipVals[Y];if(typeof X==="number")V[X]=!0;else for(var H=X.from;H<=X.to;H++)V[H]=!0}if(this._fillEncodeTable(0,0,V),$.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}l5.prototype.encoder=XD;l5.prototype.decoder=Vu;l5.prototype._getDecodeTrieNode=function($){var I=[];for(;$>0;$>>>=8)I.push($&255);if(I.length==0)I.push(0);var U=this.decodeTables[0];for(var Y=I.length-1;Y>0;Y--){var J=U[I[Y]];if(J==w6)U[I[Y]]=k6-this.decodeTables.length,this.decodeTables.push(U=_J.slice(0));else if(J<=k6)U=this.decodeTables[k6-J];else throw Error("Overwrite byte in "+this.encodingName+", addr: "+$.toString(16))}return U};l5.prototype._addDecodeChunk=function($){var I=parseInt($[0],16),U=this._getDecodeTrieNode(I);I=I&255;for(var Y=1;Y<$.length;Y++){var J=$[Y];if(typeof J==="string")for(var Q=0;Q<J.length;){var K=J.charCodeAt(Q++);if(K>=55296&&K<56320){var q=J.charCodeAt(Q++);if(q>=56320&&q<57344)U[I++]=65536+(K-55296)*1024+(q-56320);else throw Error("Incorrect surrogate pair in "+this.encodingName+" at chunk "+$[0])}else if(K>4080&&K<=4095){var H=4095-K+2,G=[];for(var W=0;W<H;W++)G.push(J.charCodeAt(Q++));U[I++]=c$-this.decodeTableSeq.length,this.decodeTableSeq.push(G)}else U[I++]=K}else if(typeof J==="number"){var w=U[I-1]+1;for(var Q=0;Q<J;Q++)U[I++]=w++}else throw Error("Incorrect type '"+typeof J+"' given in "+this.encodingName+" at chunk "+$[0])}if(I>255)throw Error("Incorrect chunk in "+this.encoLine truncated
|
||||
`)}var PI=($)=>(I,U,Y,J)=>{let Q=Y?{...Y,async:!1}:{async:!1},K=I._zod.run({value:U,issues:[]},Q);if(K instanceof Promise)throw new Z8;if(K.issues.length){let q=new(J?.Err??$)(K.issues.map((H)=>E6(H,Q,z4())));throw sH(q,J?.callee),q}return K.value},sJ=PI(n6),TI=($)=>async(I,U,Y,J)=>{let Q=Y?{...Y,async:!0}:{async:!0},K=I._zod.run({value:U,issues:[]},Q);if(K instanceof Promise)K=await K;if(K.issues.length){let q=new(J?.Err??$)(K.issues.map((H)=>E6(H,Q,z4())));throw sH(q,J?.callee),q}return K.value},eJ=TI(n6),EI=($)=>(I,U,Y)=>{let J=Y?{...Y,async:!1}:{async:!1},Q=I._zod.run({value:U,issues:[]},J);if(Q instanceof Promise)throw new Z8;return Q.issues.length?{success:!1,error:new($??rJ)(Q.issues.map((K)=>E6(K,J,z4())))}:{success:!0,data:Q.value}},BI=EI(n6),vI=($)=>async(I,U,Y)=>{let J=Y?{...Y,async:!0}:{async:!0},Q=I._zod.run({value:U,issues:[]},J);if(Q instanceof Promise)Q=await Q;return Q.issues.length?{success:!1,error:new $(Q.issues.map((K)=>E6(K,J,z4())))}:{success:!0,data:Q.value}},$Q=vI(n6),eH=($)=>(I,U,Y)=>{let J=Y?{...Y,direction:"backward"}:{direction:"backward"};return PI($)(I,U,J)},pk=eH(n6),$G=($)=>(I,U,Y)=>{return PI($)(I,U,Y)},ck=$G(n6),IG=($)=>async(I,U,Y)=>{let J=Y?{...Y,direction:"backward"}:{direction:"backward"};return TI($)(I,U,J)},dk=IG(n6),UG=($)=>async(I,U,Y)=>{return TI($)(I,U,Y)},mk=UG(n6),YG=($)=>(I,U,Y)=>{let J=Y?{...Y,direction:"backward"}:{direction:"backward"};return EI($)(I,U,J)},lk=YG(n6),JG=($)=>(I,U,Y)=>{return EI($)(I,U,Y)},ok=JG(n6),QG=($)=>async(I,U,Y)=>{let J=Y?{...Y,direction:"backward"}:{direction:"backward"};return vI($)(I,U,J)},rk=QG(n6),KG=($)=>async(I,U,Y)=>{return vI($)(I,U,Y)},tk=KG(n6);var Q$={};$5(Q$,{xid:()=>NO,uuid7:()=>qD0,uuid6:()=>KD0,uuid4:()=>QD0,uuid:()=>C7,uppercase:()=>dO,unicodeEmail:()=>ak,undefined:()=>pO,ulid:()=>FO,time:()=>uO,string:()=>xO,sha512_hex:()=>RD0,sha512_base64url:()=>CD0,sha512_base64:()=>jD0,sha384_hex:()=>ED0,sha384_base64url:()=>vD0,sha384_base64:()=>BD0,sha256_hex:()=>AD0,sha256_base64url:()=>TD0,sha256_base64:()=>PD0,sha1_hex:()=>FD0,sha1_base64url:()=>MD0,sha1_base64:()=>ND0,rfc5322Email:()=>GD0,number:()=>IQ,null:()=>nO,nanoid:()=>AO,md5_hex:()=>LD0,md5_base64url:()=>OD0,md5_base64:()=>DD0,mac:()=>jO,lowercase:()=>cO,ksuid:()=>MO,ipv6:()=>RO,ipv4:()=>vO,integer:()=>iO,idnEmail:()=>WD0,httpProtocol:()=>gO,html5Email:()=>HD0,hostname:()=>ZD0,hex:()=>XD0,guid:()=>TO,extendedDuration:()=>JD0,emoji:()=>BO,email:()=>EO,e164:()=>yO,duration:()=>PO,domain:()=>zD0,datetime:()=>kO,date:()=>hO,cuid2:()=>OO,cuid:()=>DO,cidrv6:()=>_O,cidrv4:()=>CO,browserEmail:()=>wD0,boolean:()=>bO,bigint:()=>fO,base64url:()=>qG,base64:()=>SO});var DO=/^[cC][0-9a-z]{6,}$/,OO=/^[0-9a-z]+$/,FO=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,NO=/^[0-9a-vA-V]{20}$/,MO=/^[A-Za-z0-9]{27}$/,AO=/^[a-zA-Z0-9_-]{21}$/,PO=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,JD0=/^[-+]?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)?)??$/,TO=/^([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})$/,C7=($)=>{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-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},QD0=C7(4),KD0=C7(6),qD0=C7(7),EO=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,HD0=/^[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])?)*$/,GD0=/^(([^<>()\[\]\\.,;:\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,}))$/,ak=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,WD0=ak,wD0=/^[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])?)*$/,VD0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function BO(){return new RegExp(VD0,"u")}var vO=/^(?:(?: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])$/,RO=/^(([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}|:))$/,jO=($)=>{let I=P$($??":");return new RegExp(`^(?:[0-9A-F]{2}${I}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${I}){5}[0-9a-f]{2}$`)},CO=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0Line truncated
|
||||
`).filter((Q)=>Q),Y=Math.min(...U.map((Q)=>Q.length-Q.trimStart().length)),J=U.map((Q)=>Q.slice(Y)).map((Q)=>" ".repeat(this.indent*2)+Q);for(let Q of J)this.content.push(Q)}compile(){let $=Function,I=this?.args,Y=[...(this?.content??[""]).map((J)=>` ${J}`)];return new $(...I,Y.join(`
|
||||
`))}}var GF={major:4,minor:4,patch:3};var n0=o("$ZodType",($,I)=>{var U;$??($={}),$._zod.def=I,$._zod.bag=$._zod.bag||{},$._zod.version=GF;let Y=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))Y.unshift($);for(let J of Y)for(let Q of J._zod.onattach)Q($);if(Y.length===0)(U=$._zod).deferred??(U.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let J=(K,q,H)=>{let G=U9(K),W;for(let w of q){if(w._zod.def.when){if(ZO(K))continue;if(!w._zod.def.when(K))continue}else if(G)continue;let Z=K.issues.length,V=w._zod.check(K);if(V instanceof Promise&&H?.async===!1)throw new Z8;if(W||V instanceof Promise)W=(W??Promise.resolve()).then(async()=>{if(await V,K.issues.length===Z)return;if(!G)G=U9(K,Z)});else{if(K.issues.length===Z)continue;if(!G)G=U9(K,Z)}}if(W)return W.then(()=>{return K});return K},Q=(K,q,H)=>{if(U9(K))return K.aborted=!0,K;let G=J(q,Y,H);if(G instanceof Promise){if(H.async===!1)throw new Z8;return G.then((W)=>$._zod.parse(W,H))}return $._zod.parse(G,H)};$._zod.run=(K,q)=>{if(q.skipChecks)return $._zod.parse(K,q);if(q.direction==="backward"){let G=$._zod.parse({value:K.value,issues:[]},{...q,skipChecks:!0});if(G instanceof Promise)return G.then((W)=>{return Q(W,K,q)});return Q(G,K,q)}let H=$._zod.parse(K,q);if(H instanceof Promise){if(q.async===!1)throw new Z8;return H.then((G)=>J(G,Y,q))}return J(H,Y,q)}}e0($,"~standard",()=>({validate:(J)=>{try{let Q=BI($,J);return Q.success?{value:Q.data}:{issues:Q.error?.issues}}catch(Q){return sJ($,J).then((K)=>K.success?{value:K.data}:{issues:K.error?.issues})}},vendor:"zod",version:1}))}),_7=o("$ZodString",($,I)=>{n0.init($,I),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??xO($._zod.bag),$._zod.parse=(U,Y)=>{if(I.coerce)try{U.value=String(U.value)}catch(J){}if(typeof U.value==="string")return U;return U.issues.push({expected:"string",code:"invalid_type",input:U.value,inst:$}),U}}),x1=o("$ZodStringFormat",($,I)=>{RI.init($,I),_7.init($,I)}),wF=o("$ZodGUID",($,I)=>{I.pattern??(I.pattern=PO),x1.init($,I)}),VF=o("$ZodUUID",($,I)=>{if(I.version){let Y={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[I.version];if(Y===void 0)throw Error(`Invalid UUID version: "${I.version}"`);I.pattern??(I.pattern=C7(Y))}else I.pattern??(I.pattern=C7());x1.init($,I)}),ZF=o("$ZodEmail",($,I)=>{I.pattern??(I.pattern=TO),x1.init($,I)}),zF=o("$ZodURL",($,I)=>{x1.init($,I),$._zod.check=(U)=>{try{let Y=U.value.trim();if(!I.normalize&&I.protocol?.source===SO.source){if(!/^https?:\/\//i.test(Y)){U.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:U.value,inst:$,continue:!I.abort});return}}let J=new URL(Y);if(I.hostname){if(I.hostname.lastIndex=0,!I.hostname.test(J.hostname))U.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:I.hostname.source,input:U.value,inst:$,continue:!I.abort})}if(I.protocol){if(I.protocol.lastIndex=0,!I.protocol.test(J.protocol.endsWith(":")?J.protocol.slice(0,-1):J.protocol))U.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:I.protocol.source,input:U.value,inst:$,continue:!I.abort})}if(I.normalize)U.value=J.href;else U.value=Y;return}catch(Y){U.issues.push({code:"invalid_format",format:"url",input:U.value,inst:$,continue:!I.abort})}}}),XF=o("$ZodEmoji",($,I)=>{I.pattern??(I.pattern=EO()),x1.init($,I)}),LF=o("$ZodNanoID",($,I)=>{I.pattern??(I.pattern=MO),x1.init($,I)}),DF=o("$ZodCUID",($,I)=>{I.pattern??(I.pattern=LO),x1.init($,I)}),OF=o("$ZodCUID2",($,I)=>{I.pattern??(I.pattern=DO),x1.init($,I)}),FF=o("$ZodULID",($,I)=>{I.pattern??(I.pattern=OO),x1.init($,I)}),NF=o("$ZodXID",($,I)=>{I.pattern??(I.pattern=FO),x1.init($,I)}),MF=o("$ZodKSUID",($,I)=>{I.pattern??(I.pattern=NO),x1.init($,I)}),AF=o("$ZodISODateTime",($,I)=>{I.pattern??(I.pattern=uO(I)),x1.init($,I)}),PF=o("$ZodISODate",($,I)=>{I.pattern??(I.pattern=yO),x1.init($,I)}),TF=o("$ZodISOTime",($,I)=>{I.pattern??(I.pattern=hO(I)),x1.init($,I)}),EF=o("$ZodISODuration",($,I)=>{I.pattern??(I.pattern=AO),x1.init($,I)}),BF=o("$ZodIPv4",($,I)=>{I.pattern??(I.pattern=BO),x1.init($,I),$._zod.bag.format="ipv4"}),vF=o("$ZodIPv6",($,I)=>{I.pattern??(I.pattern=vO),x1.init($,I),$._zod.bag.format="ipv6",$._zod.check=(U)=>{try{new URL(`http://[${U.value}]`)}catch{U.issues.push({code:"invalid_format",format:"ipv6",input:U.value,inst:$,continue:!I.abort})}}}),RF=o("$ZodMAC",($,I)=>{I.pattern??(I.pattern=RO(I.delimiter)),x1.init($,I),$._zod.bag.format="mac"}),jF=o("$ZodCIDRv4",($,I)=>{I.pattern??(I.pattern=jO),x1.init($,I)}),CF=o("$ZodCIDRv6",($,I)=>{I.pattern??(I.pattern=CO),x1.init($,I),$._zod.check=(U)=>{let Y=U.value.split("/");try{if(Y.length!==2)throw Error();let[J,Q]=Y;if(!Q)throw Error();let K=Number(Q);if(`${K}`!==Q)throw Error();if(K<0||K>128)throw Error();new URL(`http://[${J}]`)}catch{U.issues.push({code:"invalid_format",format:"cidrv6",input:U.value,inst:$,continue:!I.abort})}}});function _F($){if($==="")return!0;if(/\s/.test($))return!1;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}
Line truncated
|
||||
`))}}var WF={major:4,minor:4,patch:3};var p0=o("$ZodType",($,I)=>{var U;$??($={}),$._zod.def=I,$._zod.bag=$._zod.bag||{},$._zod.version=WF;let Y=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))Y.unshift($);for(let J of Y)for(let Q of J._zod.onattach)Q($);if(Y.length===0)(U=$._zod).deferred??(U.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let J=(K,q,H)=>{let G=U9(K),W;for(let w of q){if(w._zod.def.when){if(zO(K))continue;if(!w._zod.def.when(K))continue}else if(G)continue;let Z=K.issues.length,V=w._zod.check(K);if(V instanceof Promise&&H?.async===!1)throw new Z8;if(W||V instanceof Promise)W=(W??Promise.resolve()).then(async()=>{if(await V,K.issues.length===Z)return;if(!G)G=U9(K,Z)});else{if(K.issues.length===Z)continue;if(!G)G=U9(K,Z)}}if(W)return W.then(()=>{return K});return K},Q=(K,q,H)=>{if(U9(K))return K.aborted=!0,K;let G=J(q,Y,H);if(G instanceof Promise){if(H.async===!1)throw new Z8;return G.then((W)=>$._zod.parse(W,H))}return $._zod.parse(G,H)};$._zod.run=(K,q)=>{if(q.skipChecks)return $._zod.parse(K,q);if(q.direction==="backward"){let G=$._zod.parse({value:K.value,issues:[]},{...q,skipChecks:!0});if(G instanceof Promise)return G.then((W)=>{return Q(W,K,q)});return Q(G,K,q)}let H=$._zod.parse(K,q);if(H instanceof Promise){if(q.async===!1)throw new Z8;return H.then((G)=>J(G,Y,q))}return J(H,Y,q)}}e0($,"~standard",()=>({validate:(J)=>{try{let Q=BI($,J);return Q.success?{value:Q.data}:{issues:Q.error?.issues}}catch(Q){return $Q($,J).then((K)=>K.success?{value:K.data}:{issues:K.error?.issues})}},vendor:"zod",version:1}))}),_7=o("$ZodString",($,I)=>{p0.init($,I),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??xO($._zod.bag),$._zod.parse=(U,Y)=>{if(I.coerce)try{U.value=String(U.value)}catch(J){}if(typeof U.value==="string")return U;return U.issues.push({expected:"string",code:"invalid_type",input:U.value,inst:$}),U}}),k1=o("$ZodStringFormat",($,I)=>{RI.init($,I),_7.init($,I)}),VF=o("$ZodGUID",($,I)=>{I.pattern??(I.pattern=TO),k1.init($,I)}),ZF=o("$ZodUUID",($,I)=>{if(I.version){let Y={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[I.version];if(Y===void 0)throw Error(`Invalid UUID version: "${I.version}"`);I.pattern??(I.pattern=C7(Y))}else I.pattern??(I.pattern=C7());k1.init($,I)}),zF=o("$ZodEmail",($,I)=>{I.pattern??(I.pattern=EO),k1.init($,I)}),XF=o("$ZodURL",($,I)=>{k1.init($,I),$._zod.check=(U)=>{try{let Y=U.value.trim();if(!I.normalize&&I.protocol?.source===gO.source){if(!/^https?:\/\//i.test(Y)){U.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:U.value,inst:$,continue:!I.abort});return}}let J=new URL(Y);if(I.hostname){if(I.hostname.lastIndex=0,!I.hostname.test(J.hostname))U.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:I.hostname.source,input:U.value,inst:$,continue:!I.abort})}if(I.protocol){if(I.protocol.lastIndex=0,!I.protocol.test(J.protocol.endsWith(":")?J.protocol.slice(0,-1):J.protocol))U.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:I.protocol.source,input:U.value,inst:$,continue:!I.abort})}if(I.normalize)U.value=J.href;else U.value=Y;return}catch(Y){U.issues.push({code:"invalid_format",format:"url",input:U.value,inst:$,continue:!I.abort})}}}),LF=o("$ZodEmoji",($,I)=>{I.pattern??(I.pattern=BO()),k1.init($,I)}),DF=o("$ZodNanoID",($,I)=>{I.pattern??(I.pattern=AO),k1.init($,I)}),OF=o("$ZodCUID",($,I)=>{I.pattern??(I.pattern=DO),k1.init($,I)}),FF=o("$ZodCUID2",($,I)=>{I.pattern??(I.pattern=OO),k1.init($,I)}),NF=o("$ZodULID",($,I)=>{I.pattern??(I.pattern=FO),k1.init($,I)}),MF=o("$ZodXID",($,I)=>{I.pattern??(I.pattern=NO),k1.init($,I)}),AF=o("$ZodKSUID",($,I)=>{I.pattern??(I.pattern=MO),k1.init($,I)}),PF=o("$ZodISODateTime",($,I)=>{I.pattern??(I.pattern=kO(I)),k1.init($,I)}),TF=o("$ZodISODate",($,I)=>{I.pattern??(I.pattern=hO),k1.init($,I)}),EF=o("$ZodISOTime",($,I)=>{I.pattern??(I.pattern=uO(I)),k1.init($,I)}),BF=o("$ZodISODuration",($,I)=>{I.pattern??(I.pattern=PO),k1.init($,I)}),vF=o("$ZodIPv4",($,I)=>{I.pattern??(I.pattern=vO),k1.init($,I),$._zod.bag.format="ipv4"}),RF=o("$ZodIPv6",($,I)=>{I.pattern??(I.pattern=RO),k1.init($,I),$._zod.bag.format="ipv6",$._zod.check=(U)=>{try{new URL(`http://[${U.value}]`)}catch{U.issues.push({code:"invalid_format",format:"ipv6",input:U.value,inst:$,continue:!I.abort})}}}),jF=o("$ZodMAC",($,I)=>{I.pattern??(I.pattern=jO(I.delimiter)),k1.init($,I),$._zod.bag.format="mac"}),CF=o("$ZodCIDRv4",($,I)=>{I.pattern??(I.pattern=CO),k1.init($,I)}),_F=o("$ZodCIDRv6",($,I)=>{I.pattern??(I.pattern=_O),k1.init($,I),$._zod.check=(U)=>{let Y=U.value.split("/");try{if(Y.length!==2)throw Error();let[J,Q]=Y;if(!Q)throw Error();let K=Number(Q);if(`${K}`!==Q)throw Error();if(K<0||K>128)throw Error();new URL(`http://[${J}]`)}catch{U.issues.push({code:"invalid_format",format:"cidrv6",input:U.value,inst:$,continue:!I.abort})}}});function SF($){if($==="")return!0;if(/\s/.test($))return!1;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}
Line truncated
|
||||
if (${A}.issues.length) {
|
||||
if (${R} in input) {
|
||||
payload.issues = payload.issues.concat(${A}.issues.map(iss => ({
|
||||
@@ -303,34 +303,38 @@ Unsupported type: `+$.type,"ENOTSUP");$._finish()})};b$.prototype._stat=function
|
||||
newResult[${R}] = ${A}.value;
|
||||
}
|
||||
|
||||
`)}V.write("payload.value = newResult;"),V.write("return payload;");let P=V.compile();return(E,A)=>P(Z,E,A)},Q,K=j7,q=!v7.jitless,G=q&&qO.value,W=I.catchall,w;$._zod.parse=(Z,V)=>{w??(w=Y.value);let X=Z.value;if(!K(X))return Z.issues.push({expected:"object",code:"invalid_type",input:X,inst:$}),Z;if(q&&G&&V?.async===!1&&V.jitless!==!0){if(!Q)Q=J(I.shape);if(Z=Q(Z,V),!W)return Z;return Ok([],X,Z,V,w,$)}return U(Z,V)}});function Uk($,I,U,Y){for(let Q of $)if(Q.issues.length===0)return I.value=Q.value,I;let J=$.filter((Q)=>!U9(Q));if(J.length===1)return I.value=J[0].value,J[0];return I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:$.map((Q)=>Q.issues.map((K)=>E6(K,Y,z4())))}),I}var YQ=o("$ZodUnion",($,I)=>{n0.init($,I),e0($._zod,"optin",()=>I.options.some((Y)=>Y._zod.optin==="optional")?"optional":void 0),e0($._zod,"optout",()=>I.options.some((Y)=>Y._zod.optout==="optional")?"optional":void 0),e0($._zod,"values",()=>{if(I.options.every((Y)=>Y._zod.values))return new Set(I.options.flatMap((Y)=>Array.from(Y._zod.values)));return}),e0($._zod,"pattern",()=>{if(I.options.every((Y)=>Y._zod.pattern)){let Y=I.options.map((J)=>J._zod.pattern);return new RegExp(`^(${Y.map((J)=>pJ(J.source)).join("|")})$`)}return});let U=I.options.length===1?I.options[0]._zod.run:null;$._zod.parse=(Y,J)=>{if(U)return U(Y,J);let Q=!1,K=[];for(let q of I.options){let H=q._zod.run({value:Y.value,issues:[]},J);if(H instanceof Promise)K.push(H),Q=!0;else{if(H.issues.length===0)return H;K.push(H)}}if(!Q)return Uk(K,Y,$,J);return Promise.all(K).then((q)=>{return Uk(q,Y,$,J)})}});function Yk($,I,U,Y){let J=$.filter((Q)=>Q.issues.length===0);if(J.length===1)return I.value=J[0].value,I;if(J.length===0)I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:$.map((Q)=>Q.issues.map((K)=>E6(K,Y,z4())))});else I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:[],inclusive:!1});return I}var rF=o("$ZodXor",($,I)=>{YQ.init($,I),I.inclusive=!1;let U=I.options.length===1?I.options[0]._zod.run:null;$._zod.parse=(Y,J)=>{if(U)return U(Y,J);let Q=!1,K=[];for(let q of I.options){let H=q._zod.run({value:Y.value,issues:[]},J);if(H instanceof Promise)K.push(H),Q=!0;else K.push(H)}if(!Q)return Yk(K,Y,$,J);return Promise.all(K).then((q)=>{return Yk(q,Y,$,J)})}}),tF=o("$ZodDiscriminatedUnion",($,I)=>{I.inclusive=!1,YQ.init($,I);let U=$._zod.parse;e0($._zod,"propValues",()=>{let J={};for(let Q of I.options){let K=Q._zod.propValues;if(!K||Object.keys(K).length===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(Q)}"`);for(let[q,H]of Object.entries(K)){if(!J[q])J[q]=new Set;for(let G of H)J[q].add(G)}}return J});let Y=MI(()=>{let J=I.options,Q=new Map;for(let K of J){let q=K._zod.propValues?.[I.discriminator];if(!q||q.size===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(K)}"`);for(let H of q){if(Q.has(H))throw Error(`Duplicate discriminator value "${String(H)}"`);Q.set(H,K)}}return Q});$._zod.parse=(J,Q)=>{let K=J.value;if(!j7(K))return J.issues.push({code:"invalid_type",expected:"object",input:K,inst:$}),J;let q=Y.value.get(K?.[I.discriminator]);if(q)return q._zod.run(J,Q);if(I.unionFallback||Q.direction==="backward")return U(J,Q);return J.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:I.discriminator,options:Array.from(Y.value.keys()),input:K,path:[I.discriminator],inst:$}),J}}),aF=o("$ZodIntersection",($,I)=>{n0.init($,I),$._zod.parse=(U,Y)=>{let J=U.value,Q=I.left._zod.run({value:J,issues:[]},Y),K=I.right._zod.run({value:J,issues:[]},Y);if(Q instanceof Promise||K instanceof Promise)return Promise.all([Q,K]).then(([H,G])=>{return Jk(U,H,G)});return Jk(U,Q,K)}});function WF($,I){if($===I)return{valid:!0,data:$};if($ instanceof Date&&I instanceof Date&&+$===+I)return{valid:!0,data:$};if(I9($)&&I9(I)){let U=Object.keys(I),Y=Object.keys($).filter((Q)=>U.indexOf(Q)!==-1),J={...$,...I};for(let Q of Y){let K=WF($[Q],I[Q]);if(!K.valid)return{valid:!1,mergeErrorPath:[Q,...K.mergeErrorPath]};J[Q]=K.data}return{valid:!0,data:J}}if(Array.isArray($)&&Array.isArray(I)){if($.length!==I.length)return{valid:!1,mergeErrorPath:[]};let U=[];for(let Y=0;Y<$.length;Y++){let J=$[Y],Q=I[Y],K=WF(J,Q);if(!K.valid)return{valid:!1,mergeErrorPath:[Y,...K.mergeErrorPath]};U.push(K.data)}return{valid:!0,data:U}}return{valid:!1,mergeErrorPath:[]}}function Jk($,I,U){let Y=new Map,J;for(let q of I.issues)if(q.code==="unrecognized_keys"){J??(J=q);for(let H of q.keys){if(!Y.has(H))Y.set(H,{});Y.get(H).l=!0}}else $.issues.push(q);for(let q of U.issues)if(q.code==="unrecognized_keys")for(let H of q.keys){if(!Y.has(H))Y.set(H,{});Y.get(H).r=!0}else $.issues.push(q);let Q=[...Y].filter(([,q])=>q.l&&q.r).map(([q])=>q);if(Q.length&&J)$.issues.push({...J,keys:Q});if(U9($))return $;let K=WF(I.value,U.value);if(!K.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(K.mergeErrorPath)}`);return $.value=K.data,$}var DG=o("$ZodTuple",($,I)=>{n0.
Line truncated
|
||||
`)}V.write("payload.value = newResult;"),V.write("return payload;");let P=V.compile();return(T,A)=>P(Z,T,A)},Q,K=j7,q=!v7.jitless,G=q&&HO.value,W=I.catchall,w;$._zod.parse=(Z,V)=>{w??(w=Y.value);let X=Z.value;if(!K(X))return Z.issues.push({expected:"object",code:"invalid_type",input:X,inst:$}),Z;if(q&&G&&V?.async===!1&&V.jitless!==!0){if(!Q)Q=J(I.shape);if(Z=Q(Z,V),!W)return Z;return Nx([],X,Z,V,w,$)}return U(Z,V)}});function Jx($,I,U,Y){for(let Q of $)if(Q.issues.length===0)return I.value=Q.value,I;let J=$.filter((Q)=>!U9(Q));if(J.length===1)return I.value=J[0].value,J[0];return I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:$.map((Q)=>Q.issues.map((K)=>E6(K,Y,z4())))}),I}var QQ=o("$ZodUnion",($,I)=>{p0.init($,I),e0($._zod,"optin",()=>I.options.some((Y)=>Y._zod.optin==="optional")?"optional":void 0),e0($._zod,"optout",()=>I.options.some((Y)=>Y._zod.optout==="optional")?"optional":void 0),e0($._zod,"values",()=>{if(I.options.every((Y)=>Y._zod.values))return new Set(I.options.flatMap((Y)=>Array.from(Y._zod.values)));return}),e0($._zod,"pattern",()=>{if(I.options.every((Y)=>Y._zod.pattern)){let Y=I.options.map((J)=>J._zod.pattern);return new RegExp(`^(${Y.map((J)=>dJ(J.source)).join("|")})$`)}return});let U=I.options.length===1?I.options[0]._zod.run:null;$._zod.parse=(Y,J)=>{if(U)return U(Y,J);let Q=!1,K=[];for(let q of I.options){let H=q._zod.run({value:Y.value,issues:[]},J);if(H instanceof Promise)K.push(H),Q=!0;else{if(H.issues.length===0)return H;K.push(H)}}if(!Q)return Jx(K,Y,$,J);return Promise.all(K).then((q)=>{return Jx(q,Y,$,J)})}});function Qx($,I,U,Y){let J=$.filter((Q)=>Q.issues.length===0);if(J.length===1)return I.value=J[0].value,I;if(J.length===0)I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:$.map((Q)=>Q.issues.map((K)=>E6(K,Y,z4())))});else I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:[],inclusive:!1});return I}var tF=o("$ZodXor",($,I)=>{QQ.init($,I),I.inclusive=!1;let U=I.options.length===1?I.options[0]._zod.run:null;$._zod.parse=(Y,J)=>{if(U)return U(Y,J);let Q=!1,K=[];for(let q of I.options){let H=q._zod.run({value:Y.value,issues:[]},J);if(H instanceof Promise)K.push(H),Q=!0;else K.push(H)}if(!Q)return Qx(K,Y,$,J);return Promise.all(K).then((q)=>{return Qx(q,Y,$,J)})}}),aF=o("$ZodDiscriminatedUnion",($,I)=>{I.inclusive=!1,QQ.init($,I);let U=$._zod.parse;e0($._zod,"propValues",()=>{let J={};for(let Q of I.options){let K=Q._zod.propValues;if(!K||Object.keys(K).length===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(Q)}"`);for(let[q,H]of Object.entries(K)){if(!J[q])J[q]=new Set;for(let G of H)J[q].add(G)}}return J});let Y=MI(()=>{let J=I.options,Q=new Map;for(let K of J){let q=K._zod.propValues?.[I.discriminator];if(!q||q.size===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(K)}"`);for(let H of q){if(Q.has(H))throw Error(`Duplicate discriminator value "${String(H)}"`);Q.set(H,K)}}return Q});$._zod.parse=(J,Q)=>{let K=J.value;if(!j7(K))return J.issues.push({code:"invalid_type",expected:"object",input:K,inst:$}),J;let q=Y.value.get(K?.[I.discriminator]);if(q)return q._zod.run(J,Q);if(I.unionFallback||Q.direction==="backward")return U(J,Q);return J.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:I.discriminator,options:Array.from(Y.value.keys()),input:K,path:[I.discriminator],inst:$}),J}}),sF=o("$ZodIntersection",($,I)=>{p0.init($,I),$._zod.parse=(U,Y)=>{let J=U.value,Q=I.left._zod.run({value:J,issues:[]},Y),K=I.right._zod.run({value:J,issues:[]},Y);if(Q instanceof Promise||K instanceof Promise)return Promise.all([Q,K]).then(([H,G])=>{return Kx(U,H,G)});return Kx(U,Q,K)}});function wF($,I){if($===I)return{valid:!0,data:$};if($ instanceof Date&&I instanceof Date&&+$===+I)return{valid:!0,data:$};if(I9($)&&I9(I)){let U=Object.keys(I),Y=Object.keys($).filter((Q)=>U.indexOf(Q)!==-1),J={...$,...I};for(let Q of Y){let K=wF($[Q],I[Q]);if(!K.valid)return{valid:!1,mergeErrorPath:[Q,...K.mergeErrorPath]};J[Q]=K.data}return{valid:!0,data:J}}if(Array.isArray($)&&Array.isArray(I)){if($.length!==I.length)return{valid:!1,mergeErrorPath:[]};let U=[];for(let Y=0;Y<$.length;Y++){let J=$[Y],Q=I[Y],K=wF(J,Q);if(!K.valid)return{valid:!1,mergeErrorPath:[Y,...K.mergeErrorPath]};U.push(K.data)}return{valid:!0,data:U}}return{valid:!1,mergeErrorPath:[]}}function Kx($,I,U){let Y=new Map,J;for(let q of I.issues)if(q.code==="unrecognized_keys"){J??(J=q);for(let H of q.keys){if(!Y.has(H))Y.set(H,{});Y.get(H).l=!0}}else $.issues.push(q);for(let q of U.issues)if(q.code==="unrecognized_keys")for(let H of q.keys){if(!Y.has(H))Y.set(H,{});Y.get(H).r=!0}else $.issues.push(q);let Q=[...Y].filter(([,q])=>q.l&&q.r).map(([q])=>q);if(Q.length&&J)$.issues.push({...J,keys:Q});if(U9($))return $;let K=wF(I.value,U.value);if(!K.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(K.mergeErrorPath)}`);return $.value=K.data,$}var DG=o("$ZodTuple",($,I)=>{p0.
Line truncated
|
||||
|
||||
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let K of $.seen.entries()){let q=K[1];if(I===K[0]){Q(K);continue}if($.external){let G=$.external.registry.get(K[0])?.id;if(I!==K[0]&&G){Q(K);continue}}if($.metadataRegistry.get(K[0])?.id){Q(K);continue}if(q.cycle){Q(K);continue}if(q.count>1){if($.reused==="ref"){Q(K);continue}}}}function q9($,I){let U=$.seen.get(I);if(!U)throw Error("Unprocessed schema. This is a bug in Zod.");let Y=(q)=>{let H=$.seen.get(q);if(H.ref===null)return;let G=H.def??H.schema,W={...G},w=H.ref;if(H.ref=null,w){Y(w);let V=$.seen.get(w),X=V.schema;if(X.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))G.allOf=G.allOf??[],G.allOf.push(X);else Object.assign(G,X);if(Object.assign(G,W),q._zod.parent===w)for(let D in G){if(D==="$ref"||D==="allOf")continue;if(!(D in W))delete G[D]}if(X.$ref&&V.def)for(let D in G){if(D==="$ref"||D==="allOf")continue;if(D in V.def&&JSON.stringify(G[D])===JSON.stringify(V.def[D]))delete G[D]}}let Z=q._zod.parent;if(Z&&Z!==w){Y(Z);let V=$.seen.get(Z);if(V?.schema.$ref){if(G.$ref=V.schema.$ref,V.def)for(let X in G){if(X==="$ref"||X==="allOf")continue;if(X in V.def&&JSON.stringify(G[X])===JSON.stringify(V.def[X]))delete G[X]}}}$.override({zodSchema:q,jsonSchema:G,path:H.path??[]})};for(let q of[...$.seen.entries()].reverse())Y(q[0]);let J={};if($.target==="draft-2020-12")J.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")J.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")J.$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");J.$id=$.external.uri(q)}Object.assign(J,U.def??U.schema);let Q=$.metadataRegistry.get(I)?.id;if(Q!==void 0&&J.id===Q)delete J.id;let K=$.external?.defs??{};for(let q of $.seen.entries()){let H=q[1];if(H.def&&H.defId){if(H.def.id===H.defId)delete H.def.id;K[H.defId]=H.def}}if($.external);else if(Object.keys(K).length>0)if($.target==="draft-2020-12")J.$defs=K;else J.definitions=K;try{let q=JSON.parse(JSON.stringify(J));return Object.defineProperty(q,"~standard",{value:{...I["~standard"],jsonSchema:{input:pI(I,"input",$.processors),output:pI(I,"output",$.processors)}},enumerable:!1,writable:!1}),q}catch(q){throw Error("Error converting schema to JSON.")}}function v6($,I){let U=I??{seen:new Set};if(U.seen.has($))return!1;U.seen.add($);let Y=$._zod.def;if(Y.type==="transform")return!0;if(Y.type==="array")return v6(Y.element,U);if(Y.type==="set")return v6(Y.valueType,U);if(Y.type==="lazy")return v6(Y.getter(),U);if(Y.type==="promise"||Y.type==="optional"||Y.type==="nonoptional"||Y.type==="nullable"||Y.type==="readonly"||Y.type==="default"||Y.type==="prefault")return v6(Y.innerType,U);if(Y.type==="intersection")return v6(Y.left,U)||v6(Y.right,U);if(Y.type==="record"||Y.type==="map")return v6(Y.keyType,U)||v6(Y.valueType,U);if(Y.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return v6(Y.in,U)||v6(Y.out,U)}if(Y.type==="object"){for(let J in Y.shape)if(v6(Y.shape[J],U))return!0;return!1}if(Y.type==="union"){for(let J of Y.options)if(v6(J,U))return!0;return!1}if(Y.type==="tuple"){for(let J of Y.items)if(v6(J,U))return!0;if(Y.rest&&v6(Y.rest,U))return!0;return!1}return!1}var YA=($,I={})=>(U)=>{let Y=Q9({...U,processors:I});return S1($,Y),K9(Y,$),q9(Y,$)},pI=($,I,U={})=>(Y)=>{let{libraryOptions:J,target:Q}=Y??{},K=Q9({...J??{},target:Q,io:I,processors:U});return S1($,K),K9(K,$),q9(K,$)};var sO0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},JA=($,I,U,Y)=>{let J=U;J.type="string";let{minimum:Q,maximum:K,format:q,patterns:H,contentEncoding:G}=$._zod.bag;if(typeof Q==="number")J.minLength=Q;if(typeof K==="number")J.maxLength=K;if(q){if(J.format=sO0[q]??q,J.format==="")delete J.format;if(q==="time")delete J.format}if(G)J.contentEncoding=G;if(H&&H.size>0){let W=[...H];if(W.length===1)J.pattern=W[0].source;else if(W.length>1)J.allOf=[...W.map((w)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:w.source}))]}},QA=($,I,U,Y)=>{let J=U,{minimum:Q,maximum:K,format:q,multipleOf:H,exclusiveMaximum:G,exclusiveMinimum:W}=$._zod.bag;if(typeof q==="string"&&q.includes("int"))J.type="integer";else J.type="number";let w=typeof W==="number"&&W>=(Q??Number.NEGATIVE_INFINITY),Z=typeof G==="number"&&G<=(K??Number.POSITIVE_INFINITY),V=I.target==="draft-04"||I.target==="openapi-3.0";if(w)if(V)J.minimum=W,J.exclusiveMinimum=!0;else J.exclusiveMinimum=W;else if(typeof Q==="number")J.minimum=Q;if(Z)if(V)J.maximum=G,J.exclusiveMaximum=!0;else J.exclusiveMaximum=G;else if(typeof K==="number")J.maximum=K;if(typeof H==="number")J.multipleOf=H},KA=($,I,U,Y)=>{U.type="boolean"},qA=($,I,U,Y)=>{if(I.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},HA=($,I,U,Y)=>{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),Nj0(I)}clear(){this._buffer=void 0}}function Nj0($){return tf.parse(JSON.parse($))}function lc($){return JSON.stringify($)+`
|
||||
`}class ME{constructor($=oc.stdin,I=oc.stdout){this._stdin=$,this._stdout=I,this._readBuffer=new NE,this._started=!1,this._ondata=(U)=>{this._readBuffer.append(U),this.processReadBuffer()},this._onerror=(U)=>{this.onerror?.(U)}}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 U=lc($);if(this._stdout.write(U))I();else this._stdout.once("drain",I)})}}import{dirname as au,join as TW1}from"node:path";import{fileURLToPath as EW1}from"node:url";class G5 extends Error{name="KyError";get isKyError(){return!0}}class H$ extends G5{name="HTTPError";response;request;options;data;constructor($,I,U){let Y=$.status||$.status===0?$.status:"",J=$.statusText??"",Q=`${Y} ${J}`.trim(),K=Q?`status code ${Q}`:"an unknown error";super(`Request failed with ${K}: ${I.method} ${I.url}`);this.response=$,this.request=I,this.options=U}}class q2 extends G5{name="NetworkError";request;constructor($,I){super(`Request failed due to a network error: ${$.method} ${$.url}`,I);this.request=$}}class H2 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 LU extends G5{name="ForceRetryError";customDelay;code;customRequest;constructor($){let I=$?.cause?$.cause instanceof Error?$.cause:new H2($.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 AE extends Error{name="SchemaValidationError";issues;constructor($){super("Response schema validation failed");this.issues=$}}class e$ extends G5{name="TimeoutError";request;constructor($){super(`Request timed out: ${$.method} ${$.url}`);this.request=$}}var PE=(()=>{let $=!1,I=!1,U=typeof globalThis.ReadableStream==="function",Y=typeof globalThis.Request==="function";if(U&&Y)try{I=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return $=!0,"half"}}).headers.has("Content-Type")}catch(J){if(J instanceof Error&&J.message==="unsupported BodyInit type")return!1;throw J}return $&&!I})(),rc=typeof globalThis.AbortController==="function",Pw=typeof globalThis.AbortSignal==="function"&&typeof globalThis.AbortSignal.any==="function",tc=typeof globalThis.ReadableStream==="function",ac=typeof globalThis.FormData==="function",Tw=["get","post","put","patch","head","delete"],Mj0=()=>{return};Mj0();var sc={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},DU=2147483647,ec=40,Ew=Symbol("stop");class Bw{options;constructor($){this.options=$}}var $d=($)=>new Bw($),Id={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},Ud={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 vw=new TextEncoder,Aj0=($)=>{if(!$)return 0;if($ instanceof FormData){let I=0;for(let[U,Y]of $)I+=ec,I+=vw.encode(`Content-Disposition: form-data; name="${U}"`).byteLength,I+=typeof Y==="string"?vw.encode(Y).byteLength:Y.size;return I}if($ instanceof Blob)return $.size;if($ instanceof ArrayBuffer||ArrayBuffer.isView($))return $.byteLength;if(typeof $==="string")return vw.encode($).byteLength;if($ instanceof URLSearchParams)return vw.encode($.toString()).byteLength;return 0},Yd=($,I,U)=>{let Y,J=0;return $.pipeThrough(new TransformStream({transform(Q,K){if(K.enqueue(Q),Y){J+=Y.byteLength;let q=I===0?0:J/I;if(q>=1)q=1-Number.EPSILON;U?.({percent:q,totalBytes:Math.max(I,J),transferredBytes:J},Y)}Y=Q},flush(){if(Y)J+=Y.byteLength,U?.({percent:1,totalBytes:Math.max(I,J),transferredBytes:J},Y)}}))},Jd=($,I)=>{if(!$.body)return $;let U={status:$.status,statusText:$.statusText,headers:$.headers};if($.status===204)return new Response(null,U);let Y=Math.max(0,Number($.headers.get("content-length"))||0);return new Response(Yd($.body,Y,I),U)},Qd=($,I,U)=>{if(!$.body)return $;let Y=Aj0(U??$.body);return new Request($,{duplex:"half",body:Yd($.body,Y,I)})};var N8=($)=>$!==null&&typeof $==="object";var Pj0=Symbol("replaceOption"),TE=($)=>N8($)&&$[Pj0]===!0?{isReplace:!0,value:$.value}:{isReplace:!1,value:$};var W2=(...$)=>{for(let I of $)if(
Line truncated
|
||||
`,{mode:384}),I}function LK1($){let I=ew0();for(let U of I){if(!D$(U))continue;for(let Y of rL(U).filter((J)=>J.endsWith(".json")).filter((J)=>!J.startsWith("example."))){let J=l8(U,Y);try{let Q=aL(J,"utf-8"),K=JSON.parse(Q);if(K&&typeof K==="object"&&K.id===$)return J}catch{}}}return}function F7($,I){let U=LK1($);if(!U)throw Error(`Enterprise config not found: ${$}`);let J={...JSON.parse(aL(U,"utf-8")),...I};for(let K of Object.keys(I))if(I[K]===void 0)delete J[K];let Q=Dh.parse(J);return lw0(U,`${JSON.stringify(Q,null,2)}
|
||||
`,"utf-8"),Q}function NJ($,I,U=[]){let Y=I.corpId?.trim()||void 0,J=I.stateful?I.defaultCorpId?.trim()||void 0:void 0,Q=Y??J;if(Q){let q=$.find((H)=>H.id===Q);if(q)return q;throw Error(`No enterprise config found for ${Q}`)}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 K=$[0];if(K)return K;throw Error("No enterprise config found. Add a non-example JSON file under one of: "+(U.length?U.join(", "):"the configured enterprise directories"))}import{readFileSync as hH1}from"node:fs";import{randomBytes as uH1}from"node:crypto";var UV0=300000,$V0=new Map;function DK1($,I){return $.map((U)=>U.trim()).filter(Boolean).map((U)=>I?U:U.toLowerCase())}function OK1($,I){return I?$:$.toLowerCase()}function FK1($,I,U,Y){let J=OK1($,Y),Q=I.filter((K)=>J.includes(K));if(U==="all"&&Q.length!==I.length)return[];return Q}function NK1($){if(typeof $==="string")return $.split(/\r?\n/);return JSON.stringify($,null,2).split(/\r?\n/)}function MK1($,I){if(I.fields&&!I.fields.has($.field))return[];let U=NK1($.value),Y=[];return U.forEach((J,Q)=>{let K=FK1(J,I.keywords,I.matchMode,I.caseSensitive);if(K.length===0)return;let q=Math.max(0,Q-I.contextLines),H=Math.min(U.length,Q+I.contextLines+1),G={area:$.area,entityType:$.entityType,entityId:$.entityId,title:$.title,field:$.field,lineNumber:Q+1,matchedKeywords:K,matchedText:eL(J,I.maxChars),context:{before:I.snippetOnly?[]:U.slice(q,Q).map((W)=>eL(W,I.maxChars)),line:eL(J,I.maxChars),after:I.snippetOnly?[]:U.slice(Q+1,H).map((W)=>eL(W,I.maxChars))},metadata:$.metadata};if(I.snippetOnly)G.context={before:[],line:G.context.line,after:[]};Y.push(G)}),Y}function eL($,I){if(!I||$.length<=I)return $;return`${$.slice(0,Math.max(0,I))}...`}function AK1($){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 IV0($){return $.rules.flatMap((I,U)=>{let Y=`${$.id}:${I.description.slice(0,32)}`,J={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:U};return[{area:"rules",entityType:"rule",entityId:Y,title:`${$.versionName} / ${I.scope}`,field:"history.description",value:I.description,metadata:J},{area:"rules",entityType:"rule",entityId:Y,title:`${$.versionName} / ${I.scope}`,field:"history.scope",value:I.scope,metadata:J}]})}function PK1($){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 TK1($){let I=[];if($.decisionPreferences)for(let[U,Y]of Object.entries($.decisionPreferences))I.push({area:"preferences",entityType:"preference",field:`decisionPreferences.${U}`,value:Y,metadata:{integrationSystem:$.integrationSystem}});return $.integrations.forEach((U,Y)=>{I.push({area:"preferences",entityType:"integration",title:U.outboundName,field:`integrations[${Y}]`,value:U,metadata:{type:U.type,outboundName:U.outboundName,mode:U.mode,corporationId:U.corporationId}})}),I}async function EK1($,I,U){let Y=U.ruleVersionScope??"current",J=[I.id,`ruleVersionScope=${Y}`,`ruleVersionId=${U.ruleVersionId??""}`,`ruleVersionNumber=${U.ruleVersionNumber??""}`,`latestRuleVersion=${U.latestRuleVersion??!1}`,`documentLimit=${U.documentLimit??100}`].join("|"),Q=$V0.get(J);if(!U.refresh&&Q&&Date.now()<Q.expiresAt)return Q;let[K,q,H]=await Promise.all([BK1($,{scope:Y,versionId:U.ruleVersionId,versionNumber:U.ruleVersionNumber,latest:U.latestRuleVersion}),N9($,{limit:U.documentLimit??100}),M1($,I.seal.endpoints.approvalStylePreferences)]),G=Date.now(),W={entries:[...K,...q.articles.flatMap(PK1),...TK1(H)],fetchedAt:G,expiresAt:G+UV0};return $V0.set(J,W),W}async function BK1($,I){if(I.scope==="current")return(await _6($)).rules.flatMap(AK1);if(I.scope==="version"){let Y=await vK1($,I);return IV0(Y)}return(await R$($)).flatMap(IV0)}async function vK1($,I){if(I.versionId)return P2($,I.versionId);let U=await R$($),Y=I.versionNumber?U.find((J)=>J.versionNumber===I.versionNumber):U[0];if(!Y)throw Error(I.versionNumber?`Rule version not found: ${I.versionNumber}`:"No rule versions found");return Y}async function YV0($,I,U){let Y=U.matchMode??"any",J=U.caseSensitive??!1,Q=U.contextLines??3,K=new Set(U.areas??["rules","documents","preferences"]),q=U
Line truncated
|
||||
`,"utf8"),U}function GV0($){return $.map((I,U)=>{let Y;if(typeof I.code==="number")Y=`#${String(I.code).padStart(4,"0")}`;else if(typeof I.code==="string")Y=I.code.startsWith("#")?I.code:`#${I.code}`;else Y=`#${String(U+1).padStart(4,"0")}`;return{id:I.id,code:Y,name:I.name,description:I.description,scope:I.scope,strictness:I.strictness}})}class i$ extends Error{errors;warnings;constructor($,I=[]){super([`材料包校验失败:${$.length} 个错误`,...$.map((U)=>`- ${U}`)].join(`
|
||||
`));this.errors=$;this.warnings=I;this.name="MaterialPackValidationError"}}import{createHmac as pK1,randomBytes as cK1}from"node:crypto";function dK1($,I,U,Y){return pK1("sha256",Y).update(`${$}.${I}.${JSON.stringify(U)}`).digest("hex")}function HH($,I){let U=Math.floor(Date.now()/1000),Y=cK1(16).toString("hex");return{Authorization:`Bearer ${I}`,"x-webhook-signature":dK1(U,Y,$,I),"x-webhook-timestamp":String(U),"x-webhook-nonce":Y}}var Xu=FI(jV0(),1),OZ0=FI(DZ0(),1);var OD={maxEntries:1000,maxTotalSize:524288000,maxCompressionRatio:150};async function FZ0($){return new Promise((I,U)=>{Xu.default.fromBuffer(Buffer.from($),{lazyEntries:!0,autoClose:!0,decodeStrings:!1},(Y,J)=>{if(Y||!J)return U(Y??Error("无法打开 ZIP"));let Q=[];J.readEntry(),J.on("entry",(K)=>{let q=NZ0(K);if(!q.endsWith("/")&&!NH1(q))Q.push({fileName:q,uncompressedSize:K.uncompressedSize,compressedSize:K.compressedSize,raw:K});J.readEntry()}),J.on("end",()=>I(Q)),J.on("error",U)})})}function NZ0($){let I=Buffer.isBuffer($.fileName)?$.fileName:Buffer.from(String($.fileName),"binary"),U=I.toString("utf8");if(!U.includes("�"))return U;let Y=OZ0.default.decode(I,"gbk");if(!Y.includes("�"))return Y;return U}function NH1($){let I=$.split("/").pop()??"";return $.split("/").includes("__MACOSX")||I===".DS_Store"||I.startsWith("._")||I.startsWith(".~")||I.startsWith("~$")}function MZ0($,I){let U=[],Y=AU(I);if($.length>OD.maxEntries)U.push(`文件数超过 ${OD.maxEntries}`);if($.reduce((K,q)=>K+q.uncompressedSize,0)>OD.maxTotalSize)U.push("解压后总大小超过 500MB");for(let K of $){if(K.fileName.startsWith("/")||K.fileName.split("/").includes(".."))U.push(`存在不安全路径: ${K.fileName}`);if(K.compressedSize>0&&K.uncompressedSize/K.compressedSize>OD.maxCompressionRatio)U.push(`压缩比超过 150: ${K.fileName}`);if(K.fileName==="信息表.xlsx")continue;MH1(K,Y,U)}if(!$.find((K)=>K.fileName==="信息表.xlsx"))U.push("ZIP 根目录缺少精确名为「信息表.xlsx」的文件");if($.some((K)=>K.fileName.toLowerCase().endsWith(".zip")))U.push("不允许嵌套 ZIP");if(U.length)throw new i$(U)}function MH1($,I,U){let Y=AH1($.fileName);if(!Y||!I.allowedExtensions.includes(Y))U.push(`附件后缀不在白名单中: ${$.fileName}(允许: ${I.allowedExtensions.join(", ")})`);if($.uncompressedSize<I.minFileSizeBytes)U.push(`附件文件过小: ${$.fileName}(${$.uncompressedSize} B,小于最小值 ${I.minFileSizeBytes} B)`);if(I.maxFileSizeBytes!==void 0&&I.maxFileSizeBytes!==null&&$.uncompressedSize>I.maxFileSizeBytes)U.push(`附件文件过大: ${$.fileName}(${$.uncompressedSize} B,大于最大值 ${I.maxFileSizeBytes} B)`)}function AH1($){let I=$.split("/").pop()??$,U=I.lastIndexOf(".");return U>0?I.slice(U).toLowerCase():""}function Lu($,I){return new Promise((U,Y)=>{Xu.default.fromBuffer(Buffer.from($),{lazyEntries:!0,autoClose:!0,decodeStrings:!1},(J,Q)=>{if(J||!Q)return Y(J??Error("无法打开 ZIP"));Q.readEntry(),Q.on("entry",(K)=>{if(NZ0(K)!==I.fileName)return Q.readEntry();Q.openReadStream(K,(q,H)=>{if(q||!H)return Y(q??Error(`无法读取 ${I.fileName}`));let G=[];H.on("data",(W)=>G.push(W)),H.on("end",()=>U(Buffer.concat(G))),H.on("error",Y)})}),Q.on("error",Y)})})}var PZ0=FI(Vh(),1);function PH1($){return $.startsWith("[附件]")}function TZ0($){return $.startsWith("[附件]")?$.slice(4):$}function TH1($){return TZ0($).toLowerCase().replace(/\s+/g,"_")||"attachment"}function EH1($){if($==null||$==="")return[];return String($).split(/[\n,;,;]/).map((I)=>I.trim()).filter(Boolean)}function Du($,I){let U=[];for(let[Y,J]of I.entries()){if(!PH1(Y))continue;let Q=$.getCell(J).value,K=EH1(Q);if(!K.length)continue;U.push({key:TH1(Y),label:TZ0(Y),paths:K})}return U}function Ou($){let I=new Map;return $.map((U)=>{let Y=(I.get(U.key)??0)+1;return I.set(U.key,Y),Y===1?U:{...U,key:`${U.key}-${Y}`}})}function FD($,I,U,Y){return{key:$,label:I,type:U,value:Y}}function EZ0($,I,U){return FD($,I,"TEXT",U==null?"":String(U))}function BZ0($,I,U){return FD($,I,"AMOUNT",typeof U==="number"?{amount:U,currency:"CNY"}:null)}function vZ0($){if($ instanceof Date)return $.toISOString();if(typeof $==="string"&&$.trim())return $.trim();return null}function BH1($){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 LH($){let I=new Map;return $.getRow(1).eachCell((U,Y)=>I.set(String(U.value??"").trim(),Y)),I}function HI($,I,U){let Y=I.get(U);return Y?$.getCell(Y).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"]
Line truncated
|
||||
`);let F=new FormData,P=await Lu(Y.fileBuffer,D),E=L.split("/").pop()??L;F.append("files",new File([new Uint8Array(P)],E));let A=await fetch(`${J}/api/v1/integrations/webhook/${encodeURIComponent(Q)}/attachments`,{method:"POST",headers:HH({},U.secret),body:F});if(!A.ok)throw Error(`附件上传失败 ${A.status}: ${await A.text()}`);let R=await A.json();W.set(L,R.attachments?.map((k)=>k.data)??(R.data===void 0?[]:[R.data])),process.stderr.write(`✓ 附件上传成功: ${L}
|
||||
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let K of $.seen.entries()){let q=K[1];if(I===K[0]){Q(K);continue}if($.external){let G=$.external.registry.get(K[0])?.id;if(I!==K[0]&&G){Q(K);continue}}if($.metadataRegistry.get(K[0])?.id){Q(K);continue}if(q.cycle){Q(K);continue}if(q.count>1){if($.reused==="ref"){Q(K);continue}}}}function q9($,I){let U=$.seen.get(I);if(!U)throw Error("Unprocessed schema. This is a bug in Zod.");let Y=(q)=>{let H=$.seen.get(q);if(H.ref===null)return;let G=H.def??H.schema,W={...G},w=H.ref;if(H.ref=null,w){Y(w);let V=$.seen.get(w),X=V.schema;if(X.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))G.allOf=G.allOf??[],G.allOf.push(X);else Object.assign(G,X);if(Object.assign(G,W),q._zod.parent===w)for(let D in G){if(D==="$ref"||D==="allOf")continue;if(!(D in W))delete G[D]}if(X.$ref&&V.def)for(let D in G){if(D==="$ref"||D==="allOf")continue;if(D in V.def&&JSON.stringify(G[D])===JSON.stringify(V.def[D]))delete G[D]}}let Z=q._zod.parent;if(Z&&Z!==w){Y(Z);let V=$.seen.get(Z);if(V?.schema.$ref){if(G.$ref=V.schema.$ref,V.def)for(let X in G){if(X==="$ref"||X==="allOf")continue;if(X in V.def&&JSON.stringify(G[X])===JSON.stringify(V.def[X]))delete G[X]}}}$.override({zodSchema:q,jsonSchema:G,path:H.path??[]})};for(let q of[...$.seen.entries()].reverse())Y(q[0]);let J={};if($.target==="draft-2020-12")J.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")J.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")J.$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");J.$id=$.external.uri(q)}Object.assign(J,U.def??U.schema);let Q=$.metadataRegistry.get(I)?.id;if(Q!==void 0&&J.id===Q)delete J.id;let K=$.external?.defs??{};for(let q of $.seen.entries()){let H=q[1];if(H.def&&H.defId){if(H.def.id===H.defId)delete H.def.id;K[H.defId]=H.def}}if($.external);else if(Object.keys(K).length>0)if($.target==="draft-2020-12")J.$defs=K;else J.definitions=K;try{let q=JSON.parse(JSON.stringify(J));return Object.defineProperty(q,"~standard",{value:{...I["~standard"],jsonSchema:{input:pI(I,"input",$.processors),output:pI(I,"output",$.processors)}},enumerable:!1,writable:!1}),q}catch(q){throw Error("Error converting schema to JSON.")}}function v6($,I){let U=I??{seen:new Set};if(U.seen.has($))return!1;U.seen.add($);let Y=$._zod.def;if(Y.type==="transform")return!0;if(Y.type==="array")return v6(Y.element,U);if(Y.type==="set")return v6(Y.valueType,U);if(Y.type==="lazy")return v6(Y.getter(),U);if(Y.type==="promise"||Y.type==="optional"||Y.type==="nonoptional"||Y.type==="nullable"||Y.type==="readonly"||Y.type==="default"||Y.type==="prefault")return v6(Y.innerType,U);if(Y.type==="intersection")return v6(Y.left,U)||v6(Y.right,U);if(Y.type==="record"||Y.type==="map")return v6(Y.keyType,U)||v6(Y.valueType,U);if(Y.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return v6(Y.in,U)||v6(Y.out,U)}if(Y.type==="object"){for(let J in Y.shape)if(v6(Y.shape[J],U))return!0;return!1}if(Y.type==="union"){for(let J of Y.options)if(v6(J,U))return!0;return!1}if(Y.type==="tuple"){for(let J of Y.items)if(v6(J,U))return!0;if(Y.rest&&v6(Y.rest,U))return!0;return!1}return!1}var JA=($,I={})=>(U)=>{let Y=Q9({...U,processors:I});return S1($,Y),K9(Y,$),q9(Y,$)},pI=($,I,U={})=>(Y)=>{let{libraryOptions:J,target:Q}=Y??{},K=Q9({...J??{},target:Q,io:I,processors:U});return S1($,K),K9(K,$),q9(K,$)};var sO0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},QA=($,I,U,Y)=>{let J=U;J.type="string";let{minimum:Q,maximum:K,format:q,patterns:H,contentEncoding:G}=$._zod.bag;if(typeof Q==="number")J.minLength=Q;if(typeof K==="number")J.maxLength=K;if(q){if(J.format=sO0[q]??q,J.format==="")delete J.format;if(q==="time")delete J.format}if(G)J.contentEncoding=G;if(H&&H.size>0){let W=[...H];if(W.length===1)J.pattern=W[0].source;else if(W.length>1)J.allOf=[...W.map((w)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:w.source}))]}},KA=($,I,U,Y)=>{let J=U,{minimum:Q,maximum:K,format:q,multipleOf:H,exclusiveMaximum:G,exclusiveMinimum:W}=$._zod.bag;if(typeof q==="string"&&q.includes("int"))J.type="integer";else J.type="number";let w=typeof W==="number"&&W>=(Q??Number.NEGATIVE_INFINITY),Z=typeof G==="number"&&G<=(K??Number.POSITIVE_INFINITY),V=I.target==="draft-04"||I.target==="openapi-3.0";if(w)if(V)J.minimum=W,J.exclusiveMinimum=!0;else J.exclusiveMinimum=W;else if(typeof Q==="number")J.minimum=Q;if(Z)if(V)J.maximum=G,J.exclusiveMaximum=!0;else J.exclusiveMaximum=G;else if(typeof K==="number")J.maximum=K;if(typeof H==="number")J.multipleOf=H},qA=($,I,U,Y)=>{U.type="boolean"},HA=($,I,U,Y)=>{if(I.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},GA=($,I,U,Y)=>{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),Nj0(I)}clear(){this._buffer=void 0}}function Nj0($){return sf.parse(JSON.parse($))}function rc($){return JSON.stringify($)+`
|
||||
`}class AE{constructor($=tc.stdin,I=tc.stdout){this._stdin=$,this._stdout=I,this._readBuffer=new ME,this._started=!1,this._ondata=(U)=>{this._readBuffer.append(U),this.processReadBuffer()},this._onerror=(U)=>{this.onerror?.(U)}}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 U=rc($);if(this._stdout.write(U))I();else this._stdout.once("drain",I)})}}import{dirname as eu,join as EW1}from"node:path";import{fileURLToPath as BW1}from"node:url";class G5 extends Error{name="KyError";get isKyError(){return!0}}class H$ extends G5{name="HTTPError";response;request;options;data;constructor($,I,U){let Y=$.status||$.status===0?$.status:"",J=$.statusText??"",Q=`${Y} ${J}`.trim(),K=Q?`status code ${Q}`:"an unknown error";super(`Request failed with ${K}: ${I.method} ${I.url}`);this.response=$,this.request=I,this.options=U}}class G2 extends G5{name="NetworkError";request;constructor($,I){super(`Request failed due to a network error: ${$.method} ${$.url}`,I);this.request=$}}class W2 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 LU extends G5{name="ForceRetryError";customDelay;code;customRequest;constructor($){let I=$?.cause?$.cause instanceof Error?$.cause:new W2($.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 PE extends Error{name="SchemaValidationError";issues;constructor($){super("Response schema validation failed");this.issues=$}}class e$ extends G5{name="TimeoutError";request;constructor($){super(`Request timed out: ${$.method} ${$.url}`);this.request=$}}var TE=(()=>{let $=!1,I=!1,U=typeof globalThis.ReadableStream==="function",Y=typeof globalThis.Request==="function";if(U&&Y)try{I=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return $=!0,"half"}}).headers.has("Content-Type")}catch(J){if(J instanceof Error&&J.message==="unsupported BodyInit type")return!1;throw J}return $&&!I})(),ac=typeof globalThis.AbortController==="function",Pw=typeof globalThis.AbortSignal==="function"&&typeof globalThis.AbortSignal.any==="function",sc=typeof globalThis.ReadableStream==="function",ec=typeof globalThis.FormData==="function",Tw=["get","post","put","patch","head","delete"],Mj0=()=>{return};Mj0();var $d={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},DU=2147483647,Id=40,Ew=Symbol("stop");class Bw{options;constructor($){this.options=$}}var Ud=($)=>new Bw($),Yd={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},Jd={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 vw=new TextEncoder,Aj0=($)=>{if(!$)return 0;if($ instanceof FormData){let I=0;for(let[U,Y]of $)I+=Id,I+=vw.encode(`Content-Disposition: form-data; name="${U}"`).byteLength,I+=typeof Y==="string"?vw.encode(Y).byteLength:Y.size;return I}if($ instanceof Blob)return $.size;if($ instanceof ArrayBuffer||ArrayBuffer.isView($))return $.byteLength;if(typeof $==="string")return vw.encode($).byteLength;if($ instanceof URLSearchParams)return vw.encode($.toString()).byteLength;return 0},Qd=($,I,U)=>{let Y,J=0;return $.pipeThrough(new TransformStream({transform(Q,K){if(K.enqueue(Q),Y){J+=Y.byteLength;let q=I===0?0:J/I;if(q>=1)q=1-Number.EPSILON;U?.({percent:q,totalBytes:Math.max(I,J),transferredBytes:J},Y)}Y=Q},flush(){if(Y)J+=Y.byteLength,U?.({percent:1,totalBytes:Math.max(I,J),transferredBytes:J},Y)}}))},Kd=($,I)=>{if(!$.body)return $;let U={status:$.status,statusText:$.statusText,headers:$.headers};if($.status===204)return new Response(null,U);let Y=Math.max(0,Number($.headers.get("content-length"))||0);return new Response(Qd($.body,Y,I),U)},qd=($,I,U)=>{if(!$.body)return $;let Y=Aj0(U??$.body);return new Request($,{duplex:"half",body:Qd($.body,Y,I)})};var N8=($)=>$!==null&&typeof $==="object";var Pj0=Symbol("replaceOption"),EE=($)=>N8($)&&$[Pj0]===!0?{isReplace:!0,value:$.value}:{isReplace:!1,value:$};var V2=(...$)=>{for(let I of $)if(
Line truncated
|
||||
`,{mode:384}),I}function LK1($){let I=ew0();for(let U of I){if(!O$(U))continue;for(let Y of tL(U).filter((J)=>J.endsWith(".json")).filter((J)=>!J.startsWith("example."))){let J=l8(U,Y);try{let Q=sL(J,"utf-8"),K=JSON.parse(Q);if(K&&typeof K==="object"&&K.id===$)return J}catch{}}}return}function F7($,I){let U=LK1($);if(!U)throw Error(`Enterprise config not found: ${$}`);let J={...JSON.parse(sL(U,"utf-8")),...I};for(let K of Object.keys(I))if(I[K]===void 0)delete J[K];let Q=Fh.parse(J);return lw0(U,`${JSON.stringify(Q,null,2)}
|
||||
`,"utf-8"),Q}function AJ($,I,U=[]){let Y=I.corpId?.trim()||void 0,J=I.stateful?I.defaultCorpId?.trim()||void 0:void 0,Q=Y??J;if(Q){let q=$.find((H)=>H.id===Q);if(q)return q;throw Error(`No enterprise config found for ${Q}`)}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 K=$[0];if(K)return K;throw Error("No enterprise config found. Add a non-example JSON file under one of: "+(U.length?U.join(", "):"the configured enterprise directories"))}import{readFileSync as hH1}from"node:fs";import{randomBytes as uH1}from"node:crypto";var UV0=300000,$V0=new Map;function DK1($,I){return $.map((U)=>U.trim()).filter(Boolean).map((U)=>I?U:U.toLowerCase())}function OK1($,I){return I?$:$.toLowerCase()}function FK1($,I,U,Y){let J=OK1($,Y),Q=I.filter((K)=>J.includes(K));if(U==="all"&&Q.length!==I.length)return[];return Q}function NK1($){if(typeof $==="string")return $.split(/\r?\n/);return JSON.stringify($,null,2).split(/\r?\n/)}function MK1($,I){if(I.fields&&!I.fields.has($.field))return[];let U=NK1($.value),Y=[];return U.forEach((J,Q)=>{let K=FK1(J,I.keywords,I.matchMode,I.caseSensitive);if(K.length===0)return;let q=Math.max(0,Q-I.contextLines),H=Math.min(U.length,Q+I.contextLines+1),G={area:$.area,entityType:$.entityType,entityId:$.entityId,title:$.title,field:$.field,lineNumber:Q+1,matchedKeywords:K,matchedText:$D(J,I.maxChars),context:{before:I.snippetOnly?[]:U.slice(q,Q).map((W)=>$D(W,I.maxChars)),line:$D(J,I.maxChars),after:I.snippetOnly?[]:U.slice(Q+1,H).map((W)=>$D(W,I.maxChars))},metadata:$.metadata};if(I.snippetOnly)G.context={before:[],line:G.context.line,after:[]};Y.push(G)}),Y}function $D($,I){if(!I||$.length<=I)return $;return`${$.slice(0,Math.max(0,I))}...`}function AK1($){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 IV0($){return $.rules.flatMap((I,U)=>{let Y=`${$.id}:${I.description.slice(0,32)}`,J={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:U};return[{area:"rules",entityType:"rule",entityId:Y,title:`${$.versionName} / ${I.scope}`,field:"history.description",value:I.description,metadata:J},{area:"rules",entityType:"rule",entityId:Y,title:`${$.versionName} / ${I.scope}`,field:"history.scope",value:I.scope,metadata:J}]})}function PK1($){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 TK1($){let I=[];if($.decisionPreferences)for(let[U,Y]of Object.entries($.decisionPreferences))I.push({area:"preferences",entityType:"preference",field:`decisionPreferences.${U}`,value:Y,metadata:{integrationSystem:$.integrationSystem}});return $.integrations.forEach((U,Y)=>{I.push({area:"preferences",entityType:"integration",title:U.outboundName,field:`integrations[${Y}]`,value:U,metadata:{type:U.type,outboundName:U.outboundName,mode:U.mode,corporationId:U.corporationId}})}),I}async function EK1($,I,U){let Y=U.ruleVersionScope??"current",J=[I.id,`ruleVersionScope=${Y}`,`ruleVersionId=${U.ruleVersionId??""}`,`ruleVersionNumber=${U.ruleVersionNumber??""}`,`latestRuleVersion=${U.latestRuleVersion??!1}`,`documentLimit=${U.documentLimit??100}`].join("|"),Q=$V0.get(J);if(!U.refresh&&Q&&Date.now()<Q.expiresAt)return Q;let[K,q,H]=await Promise.all([BK1($,{scope:Y,versionId:U.ruleVersionId,versionNumber:U.ruleVersionNumber,latest:U.latestRuleVersion}),N9($,{limit:U.documentLimit??100}),M1($,I.seal.endpoints.approvalStylePreferences)]),G=Date.now(),W={entries:[...K,...q.articles.flatMap(PK1),...TK1(H)],fetchedAt:G,expiresAt:G+UV0};return $V0.set(J,W),W}async function BK1($,I){if(I.scope==="current")return(await _6($)).rules.flatMap(AK1);if(I.scope==="version"){let Y=await vK1($,I);return IV0(Y)}return(await R$($)).flatMap(IV0)}async function vK1($,I){if(I.versionId)return P2($,I.versionId);let U=await R$($),Y=I.versionNumber?U.find((J)=>J.versionNumber===I.versionNumber):U[0];if(!Y)throw Error(I.versionNumber?`Rule version not found: ${I.versionNumber}`:"No rule versions found");return Y}async function YV0($,I,U){let Y=U.matchMode??"any",J=U.caseSensitive??!1,Q=U.contextLines??3,K=new Set(U.areas??["rules","documents","preferences"]),q=U
Line truncated
|
||||
`,"utf8"),U}function GV0($){return $.map((I,U)=>{let Y;if(typeof I.code==="number")Y=`#${String(I.code).padStart(4,"0")}`;else if(typeof I.code==="string")Y=I.code.startsWith("#")?I.code:`#${I.code}`;else Y=`#${String(U+1).padStart(4,"0")}`;return{id:I.id,code:Y,name:I.name,description:I.description,scope:I.scope,strictness:I.strictness}})}class b$ extends Error{errors;warnings;constructor($,I=[]){super([`材料包校验失败:${$.length} 个错误`,...$.map((U)=>`- ${U}`)].join(`
|
||||
`));this.errors=$;this.warnings=I;this.name="MaterialPackValidationError"}}import{createHmac as pK1,randomBytes as cK1}from"node:crypto";function dK1($,I,U,Y){return pK1("sha256",Y).update(`${$}.${I}.${JSON.stringify(U)}`).digest("hex")}function HH($,I){let U=Math.floor(Date.now()/1000),Y=cK1(16).toString("hex");return{Authorization:`Bearer ${I}`,"x-webhook-signature":dK1(U,Y,$,I),"x-webhook-timestamp":String(U),"x-webhook-nonce":Y}}var Du=FI(jV0(),1),OZ0=FI(DZ0(),1);var FD={maxEntries:1000,maxTotalSize:524288000,maxCompressionRatio:150};async function FZ0($){return new Promise((I,U)=>{Du.default.fromBuffer(Buffer.from($),{lazyEntries:!0,autoClose:!0,decodeStrings:!1},(Y,J)=>{if(Y||!J)return U(Y??Error("无法打开 ZIP"));let Q=[];J.readEntry(),J.on("entry",(K)=>{let q=NZ0(K);if(!q.endsWith("/")&&!NH1(q))Q.push({fileName:q,uncompressedSize:K.uncompressedSize,compressedSize:K.compressedSize,raw:K});J.readEntry()}),J.on("end",()=>I(Q)),J.on("error",U)})})}function NZ0($){let I=Buffer.isBuffer($.fileName)?$.fileName:Buffer.from(String($.fileName),"binary"),U=I.toString("utf8");if(!U.includes("�"))return U;let Y=OZ0.default.decode(I,"gbk");if(!Y.includes("�"))return Y;return U}function NH1($){let I=$.split("/").pop()??"";return $.split("/").includes("__MACOSX")||I===".DS_Store"||I.startsWith("._")||I.startsWith(".~")||I.startsWith("~$")}function MZ0($,I){let U=[],Y=TU(I);if($.length>FD.maxEntries)U.push(`文件数超过 ${FD.maxEntries}`);if($.reduce((K,q)=>K+q.uncompressedSize,0)>FD.maxTotalSize)U.push("解压后总大小超过 500MB");for(let K of $){if(K.fileName.startsWith("/")||K.fileName.split("/").includes(".."))U.push(`存在不安全路径: ${K.fileName}`);if(K.compressedSize>0&&K.uncompressedSize/K.compressedSize>FD.maxCompressionRatio)U.push(`压缩比超过 150: ${K.fileName}`);if(K.fileName==="信息表.xlsx")continue;MH1(K,Y,U)}if(!$.find((K)=>K.fileName==="信息表.xlsx"))U.push("ZIP 根目录缺少精确名为「信息表.xlsx」的文件");if($.some((K)=>K.fileName.toLowerCase().endsWith(".zip")))U.push("不允许嵌套 ZIP");if(U.length)throw new b$(U)}function MH1($,I,U){let Y=AH1($.fileName);if(!Y||!I.allowedExtensions.includes(Y))U.push(`附件后缀不在白名单中: ${$.fileName}(允许: ${I.allowedExtensions.join(", ")})`);if($.uncompressedSize<I.minFileSizeBytes)U.push(`附件文件过小: ${$.fileName}(${$.uncompressedSize} B,小于最小值 ${I.minFileSizeBytes} B)`);if(I.maxFileSizeBytes!==void 0&&I.maxFileSizeBytes!==null&&$.uncompressedSize>I.maxFileSizeBytes)U.push(`附件文件过大: ${$.fileName}(${$.uncompressedSize} B,大于最大值 ${I.maxFileSizeBytes} B)`)}function AH1($){let I=$.split("/").pop()??$,U=I.lastIndexOf(".");return U>0?I.slice(U).toLowerCase():""}function Ou($,I){return new Promise((U,Y)=>{Du.default.fromBuffer(Buffer.from($),{lazyEntries:!0,autoClose:!0,decodeStrings:!1},(J,Q)=>{if(J||!Q)return Y(J??Error("无法打开 ZIP"));Q.readEntry(),Q.on("entry",(K)=>{if(NZ0(K)!==I.fileName)return Q.readEntry();Q.openReadStream(K,(q,H)=>{if(q||!H)return Y(q??Error(`无法读取 ${I.fileName}`));let G=[];H.on("data",(W)=>G.push(W)),H.on("end",()=>U(Buffer.concat(G))),H.on("error",Y)})}),Q.on("error",Y)})})}var PZ0=FI(zh(),1);function PH1($){return $.startsWith("[附件]")}function TZ0($){return $.startsWith("[附件]")?$.slice(4):$}function TH1($){return TZ0($).toLowerCase().replace(/\s+/g,"_")||"attachment"}function EH1($){if($==null||$==="")return[];return String($).split(/[\n,;,;]/).map((I)=>I.trim()).filter(Boolean)}function Fu($,I){let U=[];for(let[Y,J]of I.entries()){if(!PH1(Y))continue;let Q=$.getCell(J).value,K=EH1(Q);if(!K.length)continue;U.push({key:TH1(Y),label:TZ0(Y),paths:K})}return U}function Nu($){let I=new Map;return $.map((U)=>{let Y=(I.get(U.key)??0)+1;return I.set(U.key,Y),Y===1?U:{...U,key:`${U.key}-${Y}`}})}function ND($,I,U,Y){return{key:$,label:I,type:U,value:Y}}function EZ0($,I,U){return ND($,I,"TEXT",U==null?"":String(U))}function BZ0($,I,U){return ND($,I,"AMOUNT",typeof U==="number"?{amount:U,currency:"CNY"}:null)}function vZ0($){if($ instanceof Date)return $.toISOString();if(typeof $==="string"&&$.trim())return $.trim();return null}function BH1($){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 LH($){let I=new Map;return $.getRow(1).eachCell((U,Y)=>I.set(String(U.value??"").trim(),Y)),I}function HI($,I,U){let Y=I.get(U);return Y?$.getCell(Y).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"]
Line truncated
|
||||
`);let F=new FormData,P=await Ou(Y.fileBuffer,D),T=L.split("/").pop()??L;F.append("files",new File([new Uint8Array(P)],T));let A=await fetch(`${J}/api/v1/integrations/webhook/${encodeURIComponent(Q)}/attachments`,{method:"POST",headers:HH({},U.secret),body:F});if(!A.ok)throw Error(`附件上传失败 ${A.status}: ${await A.text()}`);let R=await A.json();W.set(L,R.attachments?.map((x)=>x.data)??(R.data===void 0?[]:[R.data])),process.stderr.write(`✓ 附件上传成功: ${L}
|
||||
`)}process.stderr.write(`\uD83D\uDCE4 推送单据: ${H.document.documentId}
|
||||
`);let Z=Fu(H.document,G,W),V=await fetch(`${J}/api/v1/integrations/webhook/${encodeURIComponent(Q)}/document`,{method:"POST",headers:{"Content-Type":"application/json",...HH({webhookId:Q,...Z},U.secret)},body:JSON.stringify(Z)});if(!V.ok)throw Error(`Webhook 单据推送失败 ${V.status}: ${await V.text()}`);K.push({documentId:Z.documentId,document:Z,pushResult:await V.json()}),process.stderr.write(`✓ 单据推送成功: ${Z.documentId}
|
||||
`)}return{warnings:[],results:K}}function WI($){return{fileBuffer:CH1($),fileName:$.split(/[\\\/]/).pop()??"material-pack.zip"}}import{existsSync as yH1}from"node:fs";async function MD($,I,U={}){let J=O4().stateful?"stateful":"stateless",Q="ok",K,q,H;try{let A=await v$($);H={id:A.user.id,name:A.user.name,isAdmin:A.user.isAdmin},q={id:A.tenant.id,name:A.tenant.name,tenantSlug:A.tenant.tenantSlug,corporationName:A.tenant.hoseCorpConfig?.corporationName}}catch(A){Q="error",K=A instanceof Error?A.message:String(A)}let G=[];if(Q==="ok")try{G=await w5($,I.seal.endpoints.approvalStylePreferences)}catch(A){Q="error",K=`读取 Webhook 配置失败: ${A instanceof Error?A.message:String(A)}`}let W=G.length===1,w=G.map((A)=>({id:A.id,name:A.name,mode:A.mode,incomingDocumentWebhookUrl:A.incomingDocumentWebhook.url,outgoingResultWebhookUrl:A.outgoingResultWebhook,autoApprovalRate:A.autoApprovalRate,...W?{isDefault:!0}:{}})),Z=W?{id:G[0].id,name:G[0].name,mode:G[0].mode}:null,V=U.webhook?M9(G,U.webhook):W?G[0]:void 0,X;if(U.filePath)if(!yH1(U.filePath))X={valid:!1,filePath:U.filePath,fileName:U.filePath.split(/[\\/]/).pop()??U.filePath,documentCount:0,errors:[`文件不存在: ${U.filePath}`]};else try{let A=WI(U.filePath),R=await GI(A.fileBuffer,A.fileName,V?.materialPackFilePolicy);X={valid:!0,filePath:U.filePath,fileName:A.fileName,documentCount:R.documents.length,warnings:R.warnings}}catch(A){X={valid:!1,filePath:U.filePath,fileName:U.filePath.split(/[\\/]/).pop()??U.filePath,documentCount:0,errors:[A instanceof Error?A.message:String(A)]}}let L=X?X.valid:!0,D=Q==="ok"&&w.length>0&&L,F=J==="stateful"?"":` --corp ${I.id}`,P="",E="";if(Q!=="ok")E=`凭证鉴权异常: ${K}`,P=`seal-use auth diagnose${F}`;else if(w.length===0)E="当前企业尚未配置任何 Webhook 集成通道",P=`seal-use webhook add --name "默认入站通道" --result-url "https://your-domain.com/callback"${F}`;else if(X&&!X.valid)E=`材料包预检失败: ${X.errors?.join("; ")}`,P=`seal-use webhook material-pack preview ${X.filePath}${F}`;else{E=W?"所有通道正常,已自动锁定唯一 Webhook 通道,等待载入":`所有通道正常,检测到 ${w.length} 个 Webhook 通道,等待载入`;let A=X?.filePath??"<材料包.zip>",R=W?"":` --webhook ${Z?Z.id:"<webhookIdOrName>"}`;P=`seal-use webhook material-pack push ${A}${R}${F}`}return{ready:D,corp:{id:I.id,name:I.name,sourceType:I.source.type,tenant:q,user:H},stateMode:J,authStatus:Q,authError:K,activeWebhooks:w,defaultWebhook:Z,materialPack:X,statusMessage:E,nextAction:P}}var OH=[{name:"seal_whoami",description:"查询当前 Seal 用户身份及租户信息",parameters:z.object({}),handler:async($)=>v$($)},{name:"seal_session_get",description:"查询当前 Seal Bearer session、用户和过期时间",parameters:z.object({}),handler:async($)=>Pm($)},{name:"seal_delegation_list",description:"查询当前 Seal 租户下的授权链接 (Delegation) 列表",parameters:z.object({}),handler:async($)=>mm($)},{name:"seal_delegation_create",description:"创建新的 Seal 授权链接 (Delegation)",parameters:z.object({note:z.string().optional().describe("授权链接的备注或说明信息")}),handler:async($,I)=>PU($,I)},{name:"seal_delegation_revoke",description:"撤销/废除指定的 Seal 授权链接 (Delegation)",parameters:z.object({tokenId:z.string().describe("授权链接 ID (delegation record ID)")}),handler:async($,I)=>lm($,I.tokenId)},{name:"seal_user_create",description:"创建本地 Seal 用户,生成并返回初始随机密码",parameters:z.object({name:z.string().describe("用户姓名"),phone:z.string().describe("手机号码 (例如 13300001111 或 +8613300001111)"),permissions:z.array(z.string()).optional().describe("权限列表,默认为 []"),departmentIds:z.array(z.string()).optional().describe("关联部门 ID 数组")}),handler:async($,I)=>om($,I)},{name:"seal_user_reset_password",description:"重置指定 Seal 用户的默认/随机密码,并返回生成的新密码",parameters:z.object({userId:z.string().describe("用户 ID (_id)")}),handler:async($,I)=>$B($,I.userId)},{name:"seal_user_get",description:"获取指定 Seal 用户的详细信息",parameters:z.object({userId:z.string().describe("用户 ID (_id)")}),handler:async($,I)=>cw($,I.userId)},{name:"seal_user_search",description:"按姓名、手机号或邮箱搜索 Seal 成员用户列表",parameters:z.object({keyword:z.string().optional().describe("搜索关键词(姓名、手机号、邮箱等),不传或传空字符串可列出租户成员")}),handler:async($,I)=>dw($,I.keyword??"")},{name:"seal_user_delete",description:"删除指定 Seal 本地用户",parameters:z.object({userId:z.string().describe("用户 ID (_id)")}),handler:async($,I)=>Ql($,I.userId)},{name:"seal_user_activate",description:"启用/激活已离职的 Seal 用户账号",parameters:z.object({userId:z.string().describe("用户 ID (_id)")}),handler:async($,I)=>IB($,I.userId)},{name:"seal_user_delegation_create",description:"为指定 S
Line truncated
|
||||
`);return{recordId:$.id,sourceDocumentSN:$.sourceDocumentSN,sourceDocumentId:$.sourceDocumentId,document:CJ({id:I?.id,sn:I?.sn??I?.sourceDocumentSN??$.sourceDocumentSN,title:I?.title??I?.name,template:vD(I,["template.name","templateName","form.name","formName","formTitle"]),amount:PD(U,["金额","报销金额","付款金额","合计","价税合计"])??vD(I,["amount","totalAmount","expenseAmount"]),expenseType:PD(U,["费用类型","费用类别","报销类型"]),costCompany:PD(U,["费用承担公司","承担公司","成本中心","费用归属"]),payee:PD(U,["收款方","收款账户","收款信息","开户名","银行账号"]),keyFields:U.slice(0,30)}),invoices:aH1($),attachments:OJ($,{summary:!0}).attachments,aiResult:jD($),manualResult:VI($)?.value,hints:CJ({amountMentions:yZ0(Y,["金额","合计","税率"],8),partyMentions:yZ0(Y,["买方","卖方","甲方","乙方","收款"],8)})}}function lH1($){let I=[["result.citedRules",o5($,"result.citedRules")],["result.matchedRules",o5($,"result.matchedRules")],["result.ruleResults",o5($,"result.ruleResults")],["result.rules",o5($,"result.rules")],["pipelineData.citedRules",o5($,"pipelineData.citedRules")],["pipelineData.matchedRules",o5($,"pipelineData.matchedRules")]],U=[],Y=new Set;for(let[J,Q]of I)(Array.isArray(Q)?Q:Q&&typeof Q==="object"?Object.values(Q):[]).forEach((q,H)=>{let G=FH(q);if(!G)return;let W=Q4(G.runtimeRuleId)??Q4(G.runtimeId)??Q4(G.id)??Q4(G.ruleId),w=Q4(G.ruleCode)??Q4(G.code)??(W?$G1(W):void 0),Z=CJ({runtimeRuleId:W,ruleCode:w,versionNumber:rH1(G.versionNumber)??$.ruleSetVersionNumber,scope:Q4(G.scope),strictness:Q4(G.strictness),appliedAnalysis:G.appliedAnalysis??G.analysis??G.reasoning,checkResult:G.checkResult??G.result??G.decision,findings:G.findings??G.riskPoints??G.evidence,sourcePath:`${J}.${H}`}),V=JSON.stringify(Z);if(!Y.has(V))Y.add(V),U.push(Z)});return{recordId:$.id,sourceDocumentSN:$.sourceDocumentSN,sourceDocumentId:$.sourceDocumentId,ruleSetVersionNumber:$.ruleSetVersionNumber,count:U.length,rules:U}}function vD($,I){if(!$)return;for(let U of I){let Y=o5($,U);if(Y!==void 0)return Y}return}function gZ0($,I){if(!$)return 0;for(let U of I){let Y=o5($,U);if(Array.isArray(Y))return Y.length;if(Y&&typeof Y==="object")return Object.keys(Y).length;if(typeof Y==="number")return Y}return 0}function o5($,I){return I.split(".").reduce((U,Y)=>{if(U===void 0||U===null)return;if(Array.isArray(U)){let J=Number(Y);return Number.isInteger(J)?U[J]:void 0}if(typeof U==="object")return U[Y];return},$)}function oH1($,I,U){let Y=I.split("."),J=$;for(let Q of Y.slice(0,-1)){let K=J[Q];if(!K||typeof K!=="object"||Array.isArray(K))J[Q]={};J=J[Q]}J[Y[Y.length-1]??I]=U}function CJ($){return Object.fromEntries(Object.entries($).filter(([,I])=>I!==void 0))}function FH($){return $&&typeof $==="object"&&!Array.isArray($)?$:void 0}function rH1($){return typeof $==="number"&&Number.isFinite($)?$:void 0}function tH1($){let I=[];return Au($,"document",I),I}function Au($,I,U){if(Array.isArray($)){$.forEach((K,q)=>Au(K,`${I}.${q}`,U));return}let Y=FH($);if(!Y)return;let J=Q4(Y.label)??Q4(Y.name)??Q4(Y.title)??Q4(Y.fieldName),Q=Y.value??Y.displayValue??Y.text??Y.content;if(J&&Q!==void 0&&typeof Q!=="object")U.push(CJ({path:I,label:J,value:Q,type:Q4(Y.type)??Q4(Y.fieldType)}));for(let[K,q]of Object.entries(Y)){if(K==="attachments")continue;Au(q,`${I}.${K}`,U)}}function PD($,I){return $.find((Y)=>{let J=Q4(Y.label)??"";return I.some((Q)=>J.includes(Q))})?.value}function aH1($){let I=[];return RD($.result,"result",I),RD($.document,"document",I),I.slice(0,20)}function RD($,I,U){if(Array.isArray($)){$.forEach((J,Q)=>RD(J,`${I}.${Q}`,U));return}let Y=FH($);if(!Y)return;if(/invoice|发票/i.test(I))U.push(CJ({path:I,fileName:Q4(Y.fileName)??Q4(Y.filename)??Q4(Y.name),buyer:Y.buyer??Y.buyerName??Y.purchaserName,seller:Y.seller??Y.sellerName,amount:Y.amount??Y.totalAmount??Y.total,taxRate:Y.taxRate,category:Y.category??Y.type}));for(let[J,Q]of Object.entries(Y))RD(Q,`${I}.${J}`,U)}function yZ0($,I,U){return $.split(/\r?\n/).filter((Y)=>I.some((J)=>Y.includes(J))).slice(0,U)}function TD($){return $.map((I)=>{let U=wI(I);return{recordId:U.id,tenantId:U.tenantId,agentId:U.agentId,sourceDocumentSN:U.sourceDocumentSN,sourceDocumentId:U.sourceDocumentId,simulationBatchId:U.simulationBatchId,langfuseTraceId:U.langfuseTraceId,langfuseSessionFallback:U.langfuseSessionFallback,ruleSetVersionNumber:U.ruleSetVersionNumber,ruleSetPublishedAt:U.ruleSetPublishedAt,ruleSetPublishedByName:U.ruleSetPublishedByName,resolution:U.langfuseTraceId?"trace":U.langfuseSessionFallback?"session-fallback":"unresolved"}})}function Nu($){return{id:$.id,tenantId:$.tenantId,versionNumber:$.versionNumber,versionName:$.versionName,publishedBy:$.publishedBy,publishedByName:$.publishedByName,rulesCount:$.rules.length,publishedAt:$.publishedAt,createdAt:$.createdAt}}async function sH1($,I){if(I.recordId&&!I.versionId&&!I.versionNumber&&!I.latest){let U=await T4($,I.recordId);if(!U.ruleSetVersionNumber)throw Er
Line truncated
|
||||
`)}function ZG1($){let I=[];if(I.push(`seal-use ${$.area} - ${$.title}`),$.description)I.push($.description);I.push(""),I.push("Usage:");for(let U of $.commands)for(let Y of U.usage)I.push(` ${Y}`);if($.commands.some((U)=>U.name))I.push(""),I.push(`Run 'seal-use ${$.area} <command> --help' for details on a specific command.`);return I.join(`
|
||||
`);let Z=Mu(H.document,G,W),V=await fetch(`${J}/api/v1/integrations/webhook/${encodeURIComponent(Q)}/document`,{method:"POST",headers:{"Content-Type":"application/json",...HH({webhookId:Q,...Z},U.secret)},body:JSON.stringify(Z)});if(!V.ok)throw Error(`Webhook 单据推送失败 ${V.status}: ${await V.text()}`);K.push({documentId:Z.documentId,document:Z,pushResult:await V.json()}),process.stderr.write(`✓ 单据推送成功: ${Z.documentId}
|
||||
`)}return{warnings:[],results:K}}function WI($){return{fileBuffer:CH1($),fileName:$.split(/[\\\/]/).pop()??"material-pack.zip"}}import{existsSync as yH1}from"node:fs";async function AD($,I,U={}){let J=O4().stateful?"stateful":"stateless",Q="ok",K,q,H;try{let A=await G$($);H={id:A.user.id,name:A.user.name,isAdmin:A.user.isAdmin},q={id:A.tenant.id,name:A.tenant.name,tenantSlug:A.tenant.tenantSlug,corporationName:A.tenant.hoseCorpConfig?.corporationName}}catch(A){Q="error",K=A instanceof Error?A.message:String(A)}let G=[];if(Q==="ok")try{G=await w5($,I.seal.endpoints.approvalStylePreferences)}catch(A){Q="error",K=`读取 Webhook 配置失败: ${A instanceof Error?A.message:String(A)}`}let W=G.length===1,w=G.map((A)=>({id:A.id,name:A.name,mode:A.mode,incomingDocumentWebhookUrl:A.incomingDocumentWebhook.url,outgoingResultWebhookUrl:A.outgoingResultWebhook,autoApprovalRate:A.autoApprovalRate,...W?{isDefault:!0}:{}})),Z=W?{id:G[0].id,name:G[0].name,mode:G[0].mode}:null,V=U.webhook?M9(G,U.webhook):W?G[0]:void 0,X;if(U.filePath)if(!yH1(U.filePath))X={valid:!1,filePath:U.filePath,fileName:U.filePath.split(/[\\/]/).pop()??U.filePath,documentCount:0,errors:[`文件不存在: ${U.filePath}`]};else try{let A=WI(U.filePath),R=await GI(A.fileBuffer,A.fileName,V?.materialPackFilePolicy);X={valid:!0,filePath:U.filePath,fileName:A.fileName,documentCount:R.documents.length,warnings:R.warnings}}catch(A){X={valid:!1,filePath:U.filePath,fileName:U.filePath.split(/[\\/]/).pop()??U.filePath,documentCount:0,errors:[A instanceof Error?A.message:String(A)]}}let L=X?X.valid:!0,D=Q==="ok"&&w.length>0&&L,F=J==="stateful"?"":` --corp ${I.id}`,P="",T="";if(Q!=="ok")T=`凭证鉴权异常: ${K}`,P=`seal-use auth diagnose${F}`;else if(w.length===0)T="当前企业尚未配置任何 Webhook 集成通道",P=`seal-use webhook add --name "默认入站通道" --result-url "https://your-domain.com/callback"${F}`;else if(X&&!X.valid)T=`材料包预检失败: ${X.errors?.join("; ")}`,P=`seal-use webhook material-pack preview ${X.filePath}${F}`;else{T=W?"所有通道正常,已自动锁定唯一 Webhook 通道,等待载入":`所有通道正常,检测到 ${w.length} 个 Webhook 通道,等待载入`;let A=X?.filePath??"<材料包.zip>",R=W?"":` --webhook ${Z?Z.id:"<webhookIdOrName>"}`;P=`seal-use webhook material-pack push ${A}${R}${F}`}return{ready:D,corp:{id:I.id,name:I.name,sourceType:I.source.type,tenant:q,user:H},stateMode:J,authStatus:Q,authError:K,activeWebhooks:w,defaultWebhook:Z,materialPack:X,statusMessage:T,nextAction:P}}var OH=[{name:"seal_whoami",description:"查询当前 Seal 用户身份及租户信息",parameters:z.object({}),handler:async($)=>G$($)},{name:"seal_session_get",description:"查询当前 Seal Bearer session、用户和过期时间",parameters:z.object({}),handler:async($)=>Pm($)},{name:"seal_delegation_list",description:"查询当前 Seal 租户下的授权链接 (Delegation) 列表",parameters:z.object({}),handler:async($)=>mm($)},{name:"seal_delegation_create",description:"创建新的 Seal 授权链接 (Delegation)",parameters:z.object({note:z.string().optional().describe("授权链接的备注或说明信息")}),handler:async($,I)=>EU($,I)},{name:"seal_delegation_revoke",description:"撤销/废除指定的 Seal 授权链接 (Delegation)",parameters:z.object({tokenId:z.string().describe("授权链接 ID (delegation record ID)")}),handler:async($,I)=>lm($,I.tokenId)},{name:"seal_user_create",description:"创建本地 Seal 用户,生成并返回初始随机密码",parameters:z.object({name:z.string().describe("用户姓名"),phone:z.string().describe("手机号码 (例如 13300001111 或 +8613300001111)"),permissions:z.array(z.string()).optional().describe("权限列表,默认为 []"),departmentIds:z.array(z.string()).optional().describe("关联部门 ID 数组")}),handler:async($,I)=>om($,I)},{name:"seal_user_reset_password",description:"重置指定 Seal 用户的默认/随机密码,并返回生成的新密码",parameters:z.object({userId:z.string().describe("用户 ID (_id)")}),handler:async($,I)=>UB($,I.userId)},{name:"seal_user_get",description:"获取指定 Seal 用户的详细信息",parameters:z.object({userId:z.string().describe("用户 ID (_id)")}),handler:async($,I)=>dw($,I.userId)},{name:"seal_user_search",description:"按姓名、手机号或邮箱搜索 Seal 成员用户列表",parameters:z.object({keyword:z.string().optional().describe("搜索关键词(姓名、手机号、邮箱等),不传或传空字符串可列出租户成员")}),handler:async($,I)=>mw($,I.keyword??"")},{name:"seal_user_delete",description:"删除指定 Seal 本地用户",parameters:z.object({userId:z.string().describe("用户 ID (_id)")}),handler:async($,I)=>Ql($,I.userId)},{name:"seal_user_activate",description:"启用/激活已离职的 Seal 用户账号",parameters:z.object({userId:z.string().describe("用户 ID (_id)")}),handler:async($,I)=>YB($,I.userId)},{name:"seal_user_delegation_create",description:"为指定 S
Line truncated
|
||||
`+`• 身份主体:${F}${P}
|
||||
`+`• 权限范围:持有该链接者在 Seal AI 中拥有该用户的完整操作权限(含系统设置与规则编辑)
|
||||
`+`• 时效性:换票凭证有效时间 ${V} 秒(${Math.round(V/60)} 分钟),在浏览器打开后将保留 30 天会话
|
||||
`+"• 安全边界:该凭证绝不包含且无法访问合思 (Hose) 主系统;仅限内部排查,严禁在外部公开分享!")}return{url:I.sso?W:G,sealResultUrl:G,ssoUrl:W,type:I.sso?"sso_link":"deep_link",expiresIn:I.sso?V:void 0,identity:w,warning:Z,enterpriseAssistUrl:K,enterpriseUrl:K,hoseDomain:Q.type==="hose"?JG1(Q.domain):void 0,documentUrl:q,recordId:J?.id,sourceDocumentSN:J?.sourceDocumentSN,sourceDocumentId:J?.sourceDocumentId,sourceSystem:J?.sourceSystem,missing:{enterpriseAssistUrl:K?void 0:"Current enterprise source is not Hose, so no Hose enterprise assist URL is configured.",documentUrl:Y&&!q?"sourceExtendData.hosecloudViewUrl is absent from the approval run detail.":void 0}}}},{name:"seal_approval_run_pick",description:"按合思单号或关键字查询运行记录,返回候选记录及其当时使用的规则版本,便于再取详情或查版本规则",parameters:z.object({query:z.string().optional().describe("合思单号、源单据 ID、运行记录 ID 或 trace 关键字"),sn:z.string().optional().describe("合思/易快报单号;优先作为精确 sourceDocumentSN 查询"),batchId:z.string().optional().describe("模拟批次 ID"),latest:z.boolean().optional().describe("只返回最新一条匹配记录"),fields:z.union([z.string(),z.array(z.string())]).optional().describe("限制返回字段"),limit:z.number().int().positive().max(100).optional(),maxScan:z.number().int().positive().max(5000).optional().describe("最多扫描多少条运行记录用于本地匹配,默认 1000"),includeBridge:z.boolean().optional()}),handler:async($,I)=>{let U=I.sn??I.query;if(!U)throw Error("query or sn is required");let Y=await QG1($,{query:U,sn:I.sn,batchId:I.batchId,latest:I.latest,limit:I.latest?1:I.limit??20,maxScan:I.maxScan??1000}),J=await Promise.all(Y.records.map((q)=>T4($,q.id))),Q=SZ0(I.fields),K=J.map((q)=>IG1(q,Q));return{query:U,sourceDocumentSN:I.sn,simulationBatchId:I.batchId,latest:I.latest??!1,total:Y.total,scanned:Y.scanned,matched:K.length,records:K,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(J)}:{}}}},{name:"seal_simulation_batch_records_get",description:"获取某一次 Seal 模拟批次的运行记录,并整理对应 Langfuse trace/session 桥接字段",parameters:z.object({batchId:z.string().describe("simulation batch ID"),query:z.string().optional().describe("在 id、sourceDocumentSN、sourceDocumentId、documentId、Langfuse traceId 中做本地包含匹配")}),handler:async($,I)=>{let U=Cu(await eE($,I.batchId),I.query);return{batchId:I.batchId,count:U.length,records:U.map(wI),bridge:ED(U)}}},{name:"seal_simulation_batch_create",description:"创建 Seal 模拟测试批次。支持合思指定单号(hosecloud)与材料包导入(material_pack)两种模式;其他取数模式通过 rawParams 预留透传。",parameters:z.object({mode:z.enum(["hosecloud","material_pack"]).default("hosecloud").describe("来源模式: hosecloud=合思指定单号; material_pack=材料包导入"),flowIds:z.array(z.string()).max(100).optional().describe("合思模式: 单据流水号列表"),rejectNodeName:z.string().nullable().optional().describe("仅关注特定节点: 节点名称, 不设为 null 表示不限制"),thinkingDepthOverride:z.enum(["default","medium","high"]).optional().describe("思考深度: default=按偏好设置, medium=标准, high=深度推理"),skipInvoiceGeneration:z.boolean().optional().describe("跳过发票生成, 默认 true"),skipExpenseExtraction:z.boolean().optional().describe("跳过费用提取, 默认 true"),disableAttachmentCache:z.boolean().optional().describe("不使用附件缓存, 默认 false"),signKey:z.string().optional().describe("合思集成标识; 缺省时自动取第一个合思集成"),packageIds:z.array(z.string()).optional().describe("材料包模式: 材料包 id 列表(来自 material-packages upload 响应)"),templateId:z.string().optional().describe("材料包模板 id, 例如 conference_reimbursement_v1; 缺省取 schemaConfig.id"),schemaConfig:z.record(z.string(),z.unknown()).optional().describe("材料包字段映射(确认参数), 建议使用 material-packages upload 返回的 schemaConfig"),noWait:z.boolean().optional().describe("创建后立即返回异步票据,不等待批次完成"),rawParams:z.record(z.string(),z.unknown()).optional().describe("预留: 其他取数模式(如时间范围 startTime/endTime)透传参数, 覆盖上述构建结果")}),handler:async($,I)=>{let U=I.mode??"hosecloud",Y=I.signKey;if(U==="hosecloud"&&!Y){if(Y=(await IB($)).find((q)=>q.signKey)?.signKey,!Y)throw Error("未找到合思集成 signKey, 请通过 signKey
Line truncated
|
||||
`);return{recordId:$.id,sourceDocumentSN:$.sourceDocumentSN,sourceDocumentId:$.sourceDocumentId,document:SJ({id:I?.id,sn:I?.sn??I?.sourceDocumentSN??$.sourceDocumentSN,title:I?.title??I?.name,template:RD(I,["template.name","templateName","form.name","formName","formTitle"]),amount:TD(U,["金额","报销金额","付款金额","合计","价税合计"])??RD(I,["amount","totalAmount","expenseAmount"]),expenseType:TD(U,["费用类型","费用类别","报销类型"]),costCompany:TD(U,["费用承担公司","承担公司","成本中心","费用归属"]),payee:TD(U,["收款方","收款账户","收款信息","开户名","银行账号"]),keyFields:U.slice(0,30)}),invoices:aH1($),attachments:NJ($,{summary:!0}).attachments,aiResult:CD($),manualResult:VI($)?.value,hints:SJ({amountMentions:yZ0(Y,["金额","合计","税率"],8),partyMentions:yZ0(Y,["买方","卖方","甲方","乙方","收款"],8)})}}function lH1($){let I=[["result.citedRules",o5($,"result.citedRules")],["result.matchedRules",o5($,"result.matchedRules")],["result.ruleResults",o5($,"result.ruleResults")],["result.rules",o5($,"result.rules")],["pipelineData.citedRules",o5($,"pipelineData.citedRules")],["pipelineData.matchedRules",o5($,"pipelineData.matchedRules")]],U=[],Y=new Set;for(let[J,Q]of I)(Array.isArray(Q)?Q:Q&&typeof Q==="object"?Object.values(Q):[]).forEach((q,H)=>{let G=FH(q);if(!G)return;let W=Q4(G.runtimeRuleId)??Q4(G.runtimeId)??Q4(G.id)??Q4(G.ruleId),w=Q4(G.ruleCode)??Q4(G.code)??(W?$G1(W):void 0),Z=SJ({runtimeRuleId:W,ruleCode:w,versionNumber:rH1(G.versionNumber)??$.ruleSetVersionNumber,scope:Q4(G.scope),strictness:Q4(G.strictness),appliedAnalysis:G.appliedAnalysis??G.analysis??G.reasoning,checkResult:G.checkResult??G.result??G.decision,findings:G.findings??G.riskPoints??G.evidence,sourcePath:`${J}.${H}`}),V=JSON.stringify(Z);if(!Y.has(V))Y.add(V),U.push(Z)});return{recordId:$.id,sourceDocumentSN:$.sourceDocumentSN,sourceDocumentId:$.sourceDocumentId,ruleSetVersionNumber:$.ruleSetVersionNumber,count:U.length,rules:U}}function RD($,I){if(!$)return;for(let U of I){let Y=o5($,U);if(Y!==void 0)return Y}return}function gZ0($,I){if(!$)return 0;for(let U of I){let Y=o5($,U);if(Array.isArray(Y))return Y.length;if(Y&&typeof Y==="object")return Object.keys(Y).length;if(typeof Y==="number")return Y}return 0}function o5($,I){return I.split(".").reduce((U,Y)=>{if(U===void 0||U===null)return;if(Array.isArray(U)){let J=Number(Y);return Number.isInteger(J)?U[J]:void 0}if(typeof U==="object")return U[Y];return},$)}function oH1($,I,U){let Y=I.split("."),J=$;for(let Q of Y.slice(0,-1)){let K=J[Q];if(!K||typeof K!=="object"||Array.isArray(K))J[Q]={};J=J[Q]}J[Y[Y.length-1]??I]=U}function SJ($){return Object.fromEntries(Object.entries($).filter(([,I])=>I!==void 0))}function FH($){return $&&typeof $==="object"&&!Array.isArray($)?$:void 0}function rH1($){return typeof $==="number"&&Number.isFinite($)?$:void 0}function tH1($){let I=[];return Tu($,"document",I),I}function Tu($,I,U){if(Array.isArray($)){$.forEach((K,q)=>Tu(K,`${I}.${q}`,U));return}let Y=FH($);if(!Y)return;let J=Q4(Y.label)??Q4(Y.name)??Q4(Y.title)??Q4(Y.fieldName),Q=Y.value??Y.displayValue??Y.text??Y.content;if(J&&Q!==void 0&&typeof Q!=="object")U.push(SJ({path:I,label:J,value:Q,type:Q4(Y.type)??Q4(Y.fieldType)}));for(let[K,q]of Object.entries(Y)){if(K==="attachments")continue;Tu(q,`${I}.${K}`,U)}}function TD($,I){return $.find((Y)=>{let J=Q4(Y.label)??"";return I.some((Q)=>J.includes(Q))})?.value}function aH1($){let I=[];return jD($.result,"result",I),jD($.document,"document",I),I.slice(0,20)}function jD($,I,U){if(Array.isArray($)){$.forEach((J,Q)=>jD(J,`${I}.${Q}`,U));return}let Y=FH($);if(!Y)return;if(/invoice|发票/i.test(I))U.push(SJ({path:I,fileName:Q4(Y.fileName)??Q4(Y.filename)??Q4(Y.name),buyer:Y.buyer??Y.buyerName??Y.purchaserName,seller:Y.seller??Y.sellerName,amount:Y.amount??Y.totalAmount??Y.total,taxRate:Y.taxRate,category:Y.category??Y.type}));for(let[J,Q]of Object.entries(Y))jD(Q,`${I}.${J}`,U)}function yZ0($,I,U){return $.split(/\r?\n/).filter((Y)=>I.some((J)=>Y.includes(J))).slice(0,U)}function ED($){return $.map((I)=>{let U=wI(I);return{recordId:U.id,tenantId:U.tenantId,agentId:U.agentId,sourceDocumentSN:U.sourceDocumentSN,sourceDocumentId:U.sourceDocumentId,simulationBatchId:U.simulationBatchId,langfuseTraceId:U.langfuseTraceId,langfuseSessionFallback:U.langfuseSessionFallback,ruleSetVersionNumber:U.ruleSetVersionNumber,ruleSetPublishedAt:U.ruleSetPublishedAt,ruleSetPublishedByName:U.ruleSetPublishedByName,resolution:U.langfuseTraceId?"trace":U.langfuseSessionFallback?"session-fallback":"unresolved"}})}function Au($){return{id:$.id,tenantId:$.tenantId,versionNumber:$.versionNumber,versionName:$.versionName,publishedBy:$.publishedBy,publishedByName:$.publishedByName,rulesCount:$.rules.length,publishedAt:$.publishedAt,createdAt:$.createdAt}}async function sH1($,I){if(I.recordId&&!I.versionId&&!I.versionNumber&&!I.latest){let U=await T4($,I.recordId);if(!U.ruleSetVersionNumber)throw Er
Line truncated
|
||||
`)}function zG1($){let I=[];if(I.push(`seal-use ${$.area} - ${$.title}`),$.description)I.push($.description);I.push(""),I.push("Usage:");for(let U of $.commands)for(let Y of U.usage)I.push(` ${Y}`);if($.commands.some((U)=>U.name))I.push(""),I.push(`Run 'seal-use ${$.area} <command> --help' for details on a specific command.`);return I.join(`
|
||||
`)}function Uz0(){let $=[];$.push("seal-use CLI"),$.push(""),$.push("Usage:"),$.push(" seal-use version");for(let I of Yz0)for(let U of I.commands)for(let Y of U.usage)$.push(` ${Y}`);return $.push(""),$.push("Run 'seal-use <command> --help' for details on a specific command."),$.join(`
|
||||
`)}var XG1=100,LG1=120000,Kz0=["id","code","status","strictness","scope","createdAt","updatedAt"],DG1=200000;function gu($){return $.map((I)=>typeof I==="string"?I:String(I)).join(" ")}function AH($){if(!$.length)return"";return`${$.join(`
|
||||
`)}var LG1=100,DG1=120000,Kz0=["id","code","status","strictness","scope","createdAt","updatedAt"],OG1=200000;function hu($){return $.map((I)=>typeof I==="string"?I:String(I)).join(" ")}function AH($){if(!$.length)return"";return`${$.join(`
|
||||
`)}
|
||||
`}function PH($){return $.replace(/([?&](?:accessToken|token|returnToken)=)[^&\s]+/gi,"$1<redacted>").replace(/(Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,"$1<redacted>")}function B0($,I={}){OG1($,I);let U=`${JSON.stringify($,null,2)}
|
||||
`;if(I.outputFile){zG1(I.outputFile,U),console.log(JSON.stringify({outputFile:I.outputFile,bytes:Buffer.byteLength(U,"utf-8")},null,2));return}console.log(U.trimEnd())}function OG1($,I={}){if(I.allowFull||I.outputFile)return;let U=Buffer.byteLength(JSON.stringify($),"utf-8");if(U>DG1)throw new CD(`Output is large (${U} bytes). Use --summary, --fields, --count, or --output-file; pass --full only when you really need the full response.`)}function qz0($,I){if(I)return;let U=$&&typeof $==="object"?$:{},Y=typeof U.count==="number"?U.count:void 0,J=Array.isArray(U.rules)?U.rules.length:void 0,Q=Buffer.byteLength(JSON.stringify($),"utf-8"),K=Y??J??0;if(K>XG1||Q>LG1)throw new CD(`Rule list is large (${K} rules, ${Q} 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 V0($){return{allowFull:O0($.full)===!0,outputFile:g($.outputFile)??g($["output-file"])}}function Hz0($=[]){console.log(Qz0($))}function y1($){let I=o8(),U=O4();return NJ(I,{stateful:U.stateful,defaultCorpId:U.defaultCorpId,corpId:$},YI())}function ZI($=O4()){return{mode:$.stateful?"stateful":"stateless",stateful:$.stateful,...$.stateful&&$.defaultCorpId?{defaultCorpId:$.defaultCorpId}:{},...$.testEnterprisesDir?{testEnterprisesDir:$.testEnterprisesDir}:{},lint:$.lint,configFile:JI()}}async function F0($,I,U,Y,J={}){B0(await zI($,I,U,Y),J)}async function zI($,I,U,Y){let J=OH.find((q)=>q.name===$);if(!J)throw Error(`Unknown Seal tool: ${$}`);let Q=Object.fromEntries(Object.entries(Y).filter(([,q])=>q!==void 0)),K=J.handler;return K(I,Q,{corp:U})}import{existsSync as Zz0}from"node:fs";var FG1=new Set(["TEXT","NUMBER","DATE","AMOUNT","PERSON","ATTACHMENT","DATE_RANGE","DEPARTMENT","LIST","CITY","OBJECT"]);function Gz0($,I){let U=$&&typeof $==="object"?$:{},Y=typeof U.type==="string"?U.type.toUpperCase().trim():"",J=typeof U.key==="string"&&U.key.trim()?U.key.trim():typeof U.label==="string"&&U.label.trim()?U.label.trim():`field_${I}`,Q=typeof U.label==="string"&&U.label.trim()?U.label.trim():J,K=U.value!==void 0?U.value:null;if(Y==="LIST"&&Array.isArray(K))K=K.map((H)=>{if(Array.isArray(H))return H.map((G,W)=>Gz0(G,W));return H});let q=Y;if(!FG1.has(q))if(Array.isArray(K))q="LIST";else if(K&&typeof K==="object")q="OBJECT";else if(typeof K==="number")q="NUMBER";else q="TEXT";return{key:J,label:Q,type:q,value:K}}function Wz0($,I={}){let U=$.document,Y=$.sourceDocumentSN??(typeof U?.sn==="string"?U.sn:void 0)??(typeof U?.sourceDocumentSN==="string"?U.sourceDocumentSN:void 0)??$.id,J=$.sourceDocumentId??(typeof U?.id==="string"?U.id:void 0)??(typeof U?.sourceDocumentId==="string"?U.sourceDocumentId:void 0)??$.documentId??$.id,Q=I.snPrefix??"",K=I.snSuffix??"",q=I.docIdPrefix??Q,H=I.docIdSuffix??K,G=`${Q}${Y}${K}`,W=`${q}${J}${H}`,w=typeof U?.sourceStartTime==="number"?U.sourceStartTime:typeof $.createdAt==="number"?Math.floor($.createdAt/1000):null,V=(Array.isArray(U?.fields)?U.fields:[]).map((X,L)=>Gz0(X,L));return{type:"document",documentId:W,documentSN:G,startTime:w,fields:V}}function NG1($){let I=new URL($),U=I.pathname.match(/\/webhook\/([^/]+)/);if(!U)throw Error(`Webhook URL 必须包含 /webhook/{webhookId}/document,收到: ${$}`);let Y=U[1],J=`${I.protocol}//${I.host}`,Q=`${J}/api/v1/integrations/webhook/${encodeURIComponent(Y)}/document`;return{baseUrl:J,webhookId:Y,documentEndpoint:Q}}async function wz0($,I,U,Y=fetch){let{webhookId:J,documentEndpoint:Q}=NG1($),K={"Content-Type":"application/json",...HH({webhookId:J,...U},I)},q=await Y(Q,{method:"POST",headers:K,body:JSON.stringify(U)});if(!q.ok){let H=await q.text();throw Error(`Webhook 单据推送失败 (${q.status}): ${H}`)}return q.json()}function Vz0($,I,U){if(I){let Y=I.trim().toLowerCase(),J=$.find((Q)=>Q.id.toLowerCase()===Y||Q.name.toLowerCase()===Y||Q.incomingDocumentWebhook.id.toLowerCase()===Y);if(!J){let Q=$.map((K)=>`"${K.name}" (${K.id})`).join(", ");throw Error(`未找到匹配 "${I}" 的 Webhook 集成通道。可用通道: [${Q}]`)}return J}if($.length===1)return $[0];if($.length>1){let Y=$.map((J)=>`"${J.name}" (${J.id})`).join(", ");throw Error(`当前租户存在多个 Webhook 通道 [${Y}],请通过 --webhook <idOrName> 指定目标通道。`)}throw new d$("当前租户未配置任何 Webhook 集成通道。",1,`seal-use webhook add --name <name> --result-url <url>${U?` --corp ${U}`:""}`)}async function zz0($,I){if(!Zz0($))throw Error(`File not found: ${$}`);let U=WI($);console.log(JSON.stringify(await GI(U.fileBuffer,U.fileName,I),null,2))}async function SD($,I,U,Y,J){if($==="ready"||$==="status"){let Q=I??g(J.options.file)??g(J.options.input),K=await MD(U,Y,{filePath:Q,webhook:g(J.options.webhook)??g(J.options.selector)});if(console.error(`[webhook-ready] 企业环境: ${K.corp.name} (${K.corp.id}) [${K.stateMode}]`),K.corp.tenant?.name)console.error(`[webhook-ready] 租户信息: ${K.corp.tenant.name} (${K.corp.tenant.id})`);console.error(`[webhook-read
Line truncated
|
||||
`);let A=await wz0(V.incomingDocumentWebhook.url,V.secret,P),R={success:!0,sourceCorp:{id:H.id,name:H.name},targetCorp:{id:Y.id,name:Y.name},targetWebhook:{id:V.id,name:V.name,mode:V.mode,incomingDocumentWebhookUrl:V.incomingDocumentWebhook.url},originalRecord:{id:W.id,sourceSystem:W.sourceSystem,sourceDocumentSN:W.sourceDocumentSN,sourceDocumentId:W.sourceDocumentId},replayedDocument:{documentSN:P.documentSN,documentId:P.documentId,fieldCount:P.fields.length},pushResult:A};console.error(`\uD83D\uDFE2 成功重放单据「${P.documentSN}」至 ${Y.name} (${V.name})`),console.error(`\uD83D\uDC49 Next action: seal-use approval-runs list --corp ${Y.id} --limit 1`),console.log(JSON.stringify(R,null,2));return}if($==="material-pack"||$==="material-pack-push"){let Q=$==="material-pack-push"?"push":I,K=$==="material-pack-push"?g(J.options.file)??g(J.options.input):J.command[3]??g(J.options.file)??g(J.options.input);if(!K)throw Error("Usage: seal-use webhook material-pack <preview|push> <材料包.zip>");if(!Zz0(K))throw Error(`File not found: ${K}`);let q=WI(K);if(Q==="preview"){console.log(JSON.stringify(await GI(q.fileBuffer,q.fileName),null,2));return}if(Q!=="push")throw Error("Usage: seal-use webhook material-pack <preview|push> <材料包.zip>");let H=g(J.options.webhook)??g(J.options.selector),G=await w5(U,Y.seal.endpoints.approvalStylePreferences),W;if(H)W=M9(G,H);else if(G.length===1)W=G[0],console.error(`\uD83D\uDC49 自动锁定唯一可用 Webhook 通道: ${W.name} (${W.id})`);else if(G.length>1){let Z=G.map((V)=>`"${V.name}" (${V.id})`).join(", ");throw Error(`当前租户存在多个 Webhook 通道 [${Z}],请通过 --webhook <idOrName> 指定目标通道。`)}else throw new d$("当前租户未配置任何 Webhook 集成通道。",1,`seal-use webhook add --name <name> --result-url <url> --corp ${Y.id}`);let w=await ND(q.fileBuffer,q.fileName,{webhookUrl:W.incomingDocumentWebhook.url,secret:W.secret,materialPackFilePolicy:W.materialPackFilePolicy});console.log(JSON.stringify(w,null,2));return}if($==="list"){await F0("seal_webhook_list",U,Y,{query:g(J.options.query)??g(J.options.keyword),includeSecret:Su(J.options)},V0(J.options));return}if($==="get"||$==="find"){let Q=I??g(J.options.selector)??g(J.options.id);if(!Q)throw Error("Usage: seal-use webhook get <idOrName> [--show-secret]");await F0("seal_webhook_get",U,Y,{selector:Q,includeSecret:Su(J.options)},V0(J.options));return}if($==="add"||$==="create"){let Q=g(J.options.name)??I,K=g(J.options.resultUrl)??g(J.options["result-url"])??g(J.options.outgoingResultWebhook)??g(J.options["outgoing-result-webhook"]);if(!Q||!K)throw Error("Usage: seal-use webhook add --name <name> --result-url <url> [--mode assisted|semi_automatic|fully_automatic]");let q=_u(J.options),H=MH(J.options),G=O0(J.options.dryRun)??O0(J.options["dry-run"]);await F0("seal_webhook_add",U,Y,{name:Q,mode:Cu(g(J.options.mode)),outgoingResultWebhook:K,autoApprovalRate:q,secret:g(J.options.secret),materialPackFilePolicy:H,dryRun:G},V0(J.options));return}if($==="update"){let Q=I??g(J.options.selector)??g(J.options.id);if(!Q)throw Error("Usage: seal-use webhook update <idOrName> [options]");let K=g(J.options.secret),q=O0(J.options.rotateSecret)??O0(J.options["rotate-secret"]);if(K!==void 0&&q)throw S4("Use either --secret or --rotate-secret, not both");let H=g(J.options.name),G=Cu(g(J.options.mode)),W=g(J.options.resultUrl)??g(J.options["result-url"])??g(J.options.outgoingResultWebhook)??g(J.options["outgoing-result-webhook"]),w=_u(J.options),Z=MH(J.options),V=O0(J.options.dryRun)??O0(J.options["dry-run"]);if(H===void 0&&G===void 0&&W===void 0&&w===void 0&&K===void 0&&!q&&Z===void 0&&!V)throw S4("Webhook update requires at least one field option");await F0("seal_webhook_update",U,Y,{selector:Q,name:H,mode:G,outgoingResultWebhook:W,autoApprovalRate:w,secret:K,rotateSecret:q,materialPackFilePolicy:Z,dryRun:V},V0(J.options));return}if($==="delete"){let Q=I??g(J.options.selector)??g(J.options.id),K=O0(J.options.dryRun)??O0(J.options["dry-run"]);if(!Q)throw Error("Usage: seal-use webhook delete <idOrName> [--yes|--dry-run]");if(O0(J.options.yes)!==!0&&!K)throw s8("Refusing to delete Webhook integration without --yes",`seal-use webhook delete ${Q} --corp ${Y.id} --yes`);await F0("seal_webhook_delete",U,Y,{selector:Q,confirm:!0,dryRun:K},V0(J.options));return}throw Error(`Unknown webhook command: ${$??""}. Run 'seal-use help' for available commands.`)}async function Xz0($,I,U,Y,J){if($==="replay"){await SD("replay",I,U,Y,J);return}if($==="summary"){let Q=await zI("seal_approval_runs_summary",U,Y,{date:g(J.options.date),timezone:g(J.options.timezone),limit:m0(J.options.limit),startDate:g(J.options.startDate),endDate:g(J.options.endDate),status:g(J.options.status),taskMode:g(J.options.taskMode),manualApprovalStatus:g(J.options.manualApprovalStatus),sourceDocumentSN:g(J.options.sourceDocumentSN),sourceDocumentId:g(J.options.sourceDocumentId),humanResult:g(J.options.humanResult),query:g(J.options.query
Line truncated
|
||||
`}function PH($){return $.replace(/([?&](?:accessToken|token|returnToken)=)[^&\s]+/gi,"$1<redacted>").replace(/(Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,"$1<redacted>")}function B0($,I={}){FG1($,I);let U=`${JSON.stringify($,null,2)}
|
||||
`;if(I.outputFile){XG1(I.outputFile,U),console.log(JSON.stringify({outputFile:I.outputFile,bytes:Buffer.byteLength(U,"utf-8")},null,2));return}console.log(U.trimEnd())}function FG1($,I={}){if(I.allowFull||I.outputFile)return;let U=Buffer.byteLength(JSON.stringify($),"utf-8");if(U>OG1)throw new _D(`Output is large (${U} bytes). Use --summary, --fields, --count, or --output-file; pass --full only when you really need the full response.`)}function qz0($,I){if(I)return;let U=$&&typeof $==="object"?$:{},Y=typeof U.count==="number"?U.count:void 0,J=Array.isArray(U.rules)?U.rules.length:void 0,Q=Buffer.byteLength(JSON.stringify($),"utf-8"),K=Y??J??0;if(K>LG1||Q>DG1)throw new _D(`Rule list is large (${K} rules, ${Q} 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 V0($){return{allowFull:O0($.full)===!0,outputFile:g($.outputFile)??g($["output-file"])}}function Hz0($=[]){console.log(Qz0($))}function y1($){let I=o8(),U=O4();return AJ(I,{stateful:U.stateful,defaultCorpId:U.defaultCorpId,corpId:$},YI())}function ZI($=O4()){return{mode:$.stateful?"stateful":"stateless",stateful:$.stateful,...$.stateful&&$.defaultCorpId?{defaultCorpId:$.defaultCorpId}:{},...$.testEnterprisesDir?{testEnterprisesDir:$.testEnterprisesDir}:{},lint:$.lint,configFile:JI()}}async function F0($,I,U,Y,J={}){B0(await zI($,I,U,Y),J)}async function zI($,I,U,Y){let J=OH.find((q)=>q.name===$);if(!J)throw Error(`Unknown Seal tool: ${$}`);let Q=Object.fromEntries(Object.entries(Y).filter(([,q])=>q!==void 0)),K=J.handler;return K(I,Q,{corp:U})}import{existsSync as Zz0}from"node:fs";var NG1=new Set(["TEXT","NUMBER","DATE","AMOUNT","PERSON","ATTACHMENT","DATE_RANGE","DEPARTMENT","LIST","CITY","OBJECT"]);function Gz0($,I){let U=$&&typeof $==="object"?$:{},Y=typeof U.type==="string"?U.type.toUpperCase().trim():"",J=typeof U.key==="string"&&U.key.trim()?U.key.trim():typeof U.label==="string"&&U.label.trim()?U.label.trim():`field_${I}`,Q=typeof U.label==="string"&&U.label.trim()?U.label.trim():J,K=U.value!==void 0?U.value:null;if(Y==="LIST"&&Array.isArray(K))K=K.map((H)=>{if(Array.isArray(H))return H.map((G,W)=>Gz0(G,W));return H});let q=Y;if(!NG1.has(q))if(Array.isArray(K))q="LIST";else if(K&&typeof K==="object")q="OBJECT";else if(typeof K==="number")q="NUMBER";else q="TEXT";return{key:J,label:Q,type:q,value:K}}function Wz0($,I={}){let U=$.document,Y=$.sourceDocumentSN??(typeof U?.sn==="string"?U.sn:void 0)??(typeof U?.sourceDocumentSN==="string"?U.sourceDocumentSN:void 0)??$.id,J=$.sourceDocumentId??(typeof U?.id==="string"?U.id:void 0)??(typeof U?.sourceDocumentId==="string"?U.sourceDocumentId:void 0)??$.documentId??$.id,Q=I.snPrefix??"",K=I.snSuffix??"",q=I.docIdPrefix??Q,H=I.docIdSuffix??K,G=`${Q}${Y}${K}`,W=`${q}${J}${H}`,w=typeof U?.sourceStartTime==="number"?U.sourceStartTime:typeof $.createdAt==="number"?Math.floor($.createdAt/1000):null,V=(Array.isArray(U?.fields)?U.fields:[]).map((X,L)=>Gz0(X,L));return{type:"document",documentId:W,documentSN:G,startTime:w,fields:V}}function MG1($){let I=new URL($),U=I.pathname.match(/\/webhook\/([^/]+)/);if(!U)throw Error(`Webhook URL 必须包含 /webhook/{webhookId}/document,收到: ${$}`);let Y=U[1],J=`${I.protocol}//${I.host}`,Q=`${J}/api/v1/integrations/webhook/${encodeURIComponent(Y)}/document`;return{baseUrl:J,webhookId:Y,documentEndpoint:Q}}async function wz0($,I,U,Y=fetch){let{webhookId:J,documentEndpoint:Q}=MG1($),K={"Content-Type":"application/json",...HH({webhookId:J,...U},I)},q=await Y(Q,{method:"POST",headers:K,body:JSON.stringify(U)});if(!q.ok){let H=await q.text();throw Error(`Webhook 单据推送失败 (${q.status}): ${H}`)}return q.json()}function Vz0($,I,U){if(I){let Y=I.trim().toLowerCase(),J=$.find((Q)=>Q.id.toLowerCase()===Y||Q.name.toLowerCase()===Y||Q.incomingDocumentWebhook.id.toLowerCase()===Y);if(!J){let Q=$.map((K)=>`"${K.name}" (${K.id})`).join(", ");throw Error(`未找到匹配 "${I}" 的 Webhook 集成通道。可用通道: [${Q}]`)}return J}if($.length===1)return $[0];if($.length>1){let Y=$.map((J)=>`"${J.name}" (${J.id})`).join(", ");throw Error(`当前租户存在多个 Webhook 通道 [${Y}],请通过 --webhook <idOrName> 指定目标通道。`)}throw new d$("当前租户未配置任何 Webhook 集成通道。",1,`seal-use webhook add --name <name> --result-url <url>${U?` --corp ${U}`:""}`)}async function zz0($,I){if(!Zz0($))throw Error(`File not found: ${$}`);let U=WI($);console.log(JSON.stringify(await GI(U.fileBuffer,U.fileName,I),null,2))}async function gD($,I,U,Y,J){if($==="ready"||$==="status"){let Q=I??g(J.options.file)??g(J.options.input),K=await AD(U,Y,{filePath:Q,webhook:g(J.options.webhook)??g(J.options.selector)});if(console.error(`[webhook-ready] 企业环境: ${K.corp.name} (${K.corp.id}) [${K.stateMode}]`),K.corp.tenant?.name)console.error(`[webhook-ready] 租户信息: ${K.corp.tenant.name} (${K.corp.tenant.id})`);console.error(`[webhook-read
Line truncated
|
||||
`);let A=await wz0(V.incomingDocumentWebhook.url,V.secret,P),R={success:!0,sourceCorp:{id:H.id,name:H.name},targetCorp:{id:Y.id,name:Y.name},targetWebhook:{id:V.id,name:V.name,mode:V.mode,incomingDocumentWebhookUrl:V.incomingDocumentWebhook.url},originalRecord:{id:W.id,sourceSystem:W.sourceSystem,sourceDocumentSN:W.sourceDocumentSN,sourceDocumentId:W.sourceDocumentId},replayedDocument:{documentSN:P.documentSN,documentId:P.documentId,fieldCount:P.fields.length},pushResult:A};console.error(`\uD83D\uDFE2 成功重放单据「${P.documentSN}」至 ${Y.name} (${V.name})`),console.error(`\uD83D\uDC49 Next action: seal-use approval-runs list --corp ${Y.id} --limit 1`),console.log(JSON.stringify(R,null,2));return}if($==="material-pack"||$==="material-pack-push"){let Q=$==="material-pack-push"?"push":I,K=$==="material-pack-push"?g(J.options.file)??g(J.options.input):J.command[3]??g(J.options.file)??g(J.options.input);if(!K)throw Error("Usage: seal-use webhook material-pack <preview|push> <材料包.zip>");if(!Zz0(K))throw Error(`File not found: ${K}`);let q=WI(K);if(Q==="preview"){console.log(JSON.stringify(await GI(q.fileBuffer,q.fileName),null,2));return}if(Q!=="push")throw Error("Usage: seal-use webhook material-pack <preview|push> <材料包.zip>");let H=g(J.options.webhook)??g(J.options.selector),G=await w5(U,Y.seal.endpoints.approvalStylePreferences),W;if(H)W=M9(G,H);else if(G.length===1)W=G[0],console.error(`\uD83D\uDC49 自动锁定唯一可用 Webhook 通道: ${W.name} (${W.id})`);else if(G.length>1){let Z=G.map((V)=>`"${V.name}" (${V.id})`).join(", ");throw Error(`当前租户存在多个 Webhook 通道 [${Z}],请通过 --webhook <idOrName> 指定目标通道。`)}else throw new d$("当前租户未配置任何 Webhook 集成通道。",1,`seal-use webhook add --name <name> --result-url <url> --corp ${Y.id}`);let w=await MD(q.fileBuffer,q.fileName,{webhookUrl:W.incomingDocumentWebhook.url,secret:W.secret,materialPackFilePolicy:W.materialPackFilePolicy});console.log(JSON.stringify(w,null,2));return}if($==="list"){await F0("seal_webhook_list",U,Y,{query:g(J.options.query)??g(J.options.keyword),includeSecret:yu(J.options)},V0(J.options));return}if($==="get"||$==="find"){let Q=I??g(J.options.selector)??g(J.options.id);if(!Q)throw Error("Usage: seal-use webhook get <idOrName> [--show-secret]");await F0("seal_webhook_get",U,Y,{selector:Q,includeSecret:yu(J.options)},V0(J.options));return}if($==="add"||$==="create"){let Q=g(J.options.name)??I,K=g(J.options.resultUrl)??g(J.options["result-url"])??g(J.options.outgoingResultWebhook)??g(J.options["outgoing-result-webhook"]);if(!Q||!K)throw Error("Usage: seal-use webhook add --name <name> --result-url <url> [--mode assisted|semi_automatic|fully_automatic]");let q=gu(J.options),H=MH(J.options),G=O0(J.options.dryRun)??O0(J.options["dry-run"]);await F0("seal_webhook_add",U,Y,{name:Q,mode:Su(g(J.options.mode)),outgoingResultWebhook:K,autoApprovalRate:q,secret:g(J.options.secret),materialPackFilePolicy:H,dryRun:G},V0(J.options));return}if($==="update"){let Q=I??g(J.options.selector)??g(J.options.id);if(!Q)throw Error("Usage: seal-use webhook update <idOrName> [options]");let K=g(J.options.secret),q=O0(J.options.rotateSecret)??O0(J.options["rotate-secret"]);if(K!==void 0&&q)throw S4("Use either --secret or --rotate-secret, not both");let H=g(J.options.name),G=Su(g(J.options.mode)),W=g(J.options.resultUrl)??g(J.options["result-url"])??g(J.options.outgoingResultWebhook)??g(J.options["outgoing-result-webhook"]),w=gu(J.options),Z=MH(J.options),V=O0(J.options.dryRun)??O0(J.options["dry-run"]);if(H===void 0&&G===void 0&&W===void 0&&w===void 0&&K===void 0&&!q&&Z===void 0&&!V)throw S4("Webhook update requires at least one field option");await F0("seal_webhook_update",U,Y,{selector:Q,name:H,mode:G,outgoingResultWebhook:W,autoApprovalRate:w,secret:K,rotateSecret:q,materialPackFilePolicy:Z,dryRun:V},V0(J.options));return}if($==="delete"){let Q=I??g(J.options.selector)??g(J.options.id),K=O0(J.options.dryRun)??O0(J.options["dry-run"]);if(!Q)throw Error("Usage: seal-use webhook delete <idOrName> [--yes|--dry-run]");if(O0(J.options.yes)!==!0&&!K)throw s8("Refusing to delete Webhook integration without --yes",`seal-use webhook delete ${Q} --corp ${Y.id} --yes`);await F0("seal_webhook_delete",U,Y,{selector:Q,confirm:!0,dryRun:K},V0(J.options));return}throw Error(`Unknown webhook command: ${$??""}. Run 'seal-use help' for available commands.`)}async function Xz0($,I,U,Y,J){if($==="replay"){await gD("replay",I,U,Y,J);return}if($==="summary"){let Q=await zI("seal_approval_runs_summary",U,Y,{date:g(J.options.date),timezone:g(J.options.timezone),limit:n0(J.options.limit),startDate:g(J.options.startDate),endDate:g(J.options.endDate),status:g(J.options.status),taskMode:g(J.options.taskMode),manualApprovalStatus:g(J.options.manualApprovalStatus),sourceDocumentSN:g(J.options.sourceDocumentSN),sourceDocumentId:g(J.options.sourceDocumentId),humanResult:g(J.options.humanResult),query:g(J.options.query
Line truncated
|
||||
or: seal-use corps bind-test <testCorpId> --corp <prodCorpId> [--confirm] [--force]`);let Q=y1(Y),K=y1(J);if(Q.id===K.id)throw S4(`Cannot bind enterprise '${Q.id}' to itself.`);if(Q.prodCorpId&&Q.prodCorpId!==K.id)throw S4(`Cannot use '${Q.id}' as a production enterprise because it is already registered as a test enterprise for '${Q.prodCorpId}'. Multi-tier chaining is not permitted.`);if(K.testCorpId&&K.testCorpId!==Q.id)throw S4(`Cannot bind '${K.id}' as a test enterprise because it already has a bound test enterprise '${K.testCorpId}'. Multi-tier chaining is not permitted.`);let q=O0(U.options.force)===!0;if(Q.testCorpId&&Q.testCorpId!==K.id||K.prodCorpId&&K.prodCorpId!==Q.id){if(!q)throw s8(`Enterprise binding conflict: production enterprise '${Q.id}' is bound to '${Q.testCorpId??"none"}', and test enterprise '${K.id}' is bound to '${K.prodCorpId??"none"}'. Overwriting an existing binding requires --force and --confirm.`,`seal-use corps bind-test ${Q.id} ${K.id} --confirm --force`)}if(!(O0(U.options.confirm)===!0||O0(U.options.yes)===!0)){let w=q?" --force":"";throw s8(`Refusing to bind test enterprise '${K.name}' (${K.id}) to production enterprise '${Q.name}' (${Q.id}) without --confirm. Enterprise binding establishes 1-to-1 sync pairing and marks '${K.id}' as a test environment.`,`seal-use corps bind-test ${Q.id} ${K.id} --confirm${w}`)}if(Q.testCorpId&&Q.testCorpId!==K.id)try{F7(Q.testCorpId,{prodCorpId:void 0})}catch{}if(K.prodCorpId&&K.prodCorpId!==Q.id)try{F7(K.prodCorpId,{testCorpId:void 0})}catch{}let G=F7(Q.id,{environment:"production",testCorpId:K.id}),W=F7(K.id,{environment:"test",prodCorpId:Q.id});B0({success:!0,productionEnterprise:{id:G.id,name:G.name,environment:G.environment,testCorpId:G.testCorpId},testEnterprise:{id:W.id,name:W.name,environment:W.environment,prodCorpId:W.prodCorpId}});return}if($==="unbind-test"){let Y=I??g(U.options.corp),J=y1(Y);if(!J.testCorpId&&!J.prodCorpId){B0({unbound:!1,message:`Enterprise '${J.name}' (${J.id}) does not have an active test enterprise binding.`});return}let Q=J.testCorpId?J.id:J.prodCorpId,K=J.testCorpId?J.testCorpId:J.id;if(!(O0(U.options.confirm)===!0||O0(U.options.yes)===!0))throw s8(`Refusing to unbind production enterprise '${Q}' and test enterprise '${K}' without --confirm.`,`seal-use corps unbind-test ${J.id} --confirm`);F7(Q,{testCorpId:void 0});try{F7(K,{prodCorpId:void 0})}catch{}B0({success:!0,unboundProduction:Q,unboundTest:K});return}if($==="sync-test"){let Y=I??g(U.options.corp),J=y1(Y);if(!J.testCorpId)throw S4(`Production enterprise '${J.name}' (${J.id}) has no bound test enterprise.
|
||||
Run 'seal-use corps bind-test ${J.id} <testCorpId> --confirm' first to establish a verified 1-to-1 association.`);let Q=y1(J.testCorpId);if(Q.environment!=="test")throw Error(`Target enterprise '${Q.name}' (${Q.id}) is marked as '${Q.environment}', NOT 'test'. Aborting sync to protect non-test environments.`);let K=await u1(J),q=await u1(Q),[H,G,W,w,Z,V,X,L]=await Promise.all([M1(K,J.seal.endpoints.approvalStylePreferences).catch(()=>({})),M1(q,Q.seal.endpoints.approvalStylePreferences).catch(()=>({})),_6(K),_6(q),R$(K).catch(()=>[]),R$(q).catch(()=>[]),N9(K,{limit:100}).catch(()=>({articles:[]})),N9(q,{limit:100}).catch(()=>({articles:[]}))]),D=(X.articles||[]).filter((Q0)=>!Q0.isDeleted),F=(L.articles||[]).filter((Q0)=>!Q0.isDeleted),P=new Map(F.map((Q0)=>[Q0.title.trim(),Q0])),E=[],A=[],R=new Set(D.map((Q0)=>Q0.title.trim()));for(let Q0 of D){let R0=Q0.title.trim(),U1=P.get(R0);if(!U1)E.push(Q0);else{let O1=U1.content!==Q0.content,b4=(U1.purpose??"")!==(Q0.purpose??""),f6=U1.enabled!==Q0.enabled,O$=U1.contentType!==Q0.contentType,b6=(U1.status??"")!==(Q0.status??""),P6=JSON.stringify([...U1.scenarios??[]].sort())!==JSON.stringify([...Q0.scenarios??[]].sort()),F$=JSON.stringify([...U1.tags??[]].sort())!==JSON.stringify([...Q0.tags??[]].sort());if(O1||b4||f6||O$||b6||P6||F$)A.push({testId:U1.id,prodDoc:Q0,reasons:[...O1?["content"]:[],...b4?["purpose"]:[],...f6?["enabled"]:[],...O$?["contentType"]:[],...b6?["status"]:[],...P6?["scenarios"]:[],...F$?["tags"]:[]]})}}let k=F.filter((Q0)=>!R.has(Q0.title.trim())),f=[...Z].sort((Q0,R0)=>R0.versionNumber-Q0.versionNumber)[0],j=f?.versionNumber,n=([...V].sort((Q0,R0)=>R0.versionNumber-Q0.versionNumber)[0]?.versionNumber??0)+1,S=Sz0(J.name,j,V),i=g(U.options["version-name"])??g(U.options.versionName)??gz0(J.name,j,S,n),U0={...G,tone:H.tone,language:H.language,detailLevel:H.detailLevel,outputFormat:H.outputFormat,examples:H.examples??[],prohibitedPhrases:H.prohibitedPhrases??[],customInstructions:H.customInstructions,decisionPreferences:H.decisionPreferences,thinkingDepthPreference:H.thinkingDepthPreference};if(O0(U.options["dry-run"])===!0||O0(U.options.dryRun)===!0){B0({dryRun:!0,source:{id:J.id,name:J.name,environment:J.environment,latestPublishedVersion:f?{versionNumber:f.versionNumber,versionName:f.versionName}:null,documentsCount:D.length},target:{id:Q.id,name:Q.name,environment:Q.environment},versionMappingPlan:{sourceProdVersionNumber:j??null,sourceProdVersionName:f?.versionName??null,targetTestExpectedVersionNumber:n,targetTestPublishVersionName:i,iteration:S},preferencesDiff:{decisionPreferences:{before:G.decisionPreferences,after:H.decisionPreferences},thinkingDepthPreference:{before:G.thinkingDepthPreference,after:H.thinkingDepthPreference}},rulesPlan:{sourceDraftRuleCount:W.rules.length,targetExistingDraftRuleCount:w.rules.length,toDeleteCount:w.rules.length,toCreateCount:W.rules.length,rulesToSync:W.rules.map((Q0,R0)=>({index:R0+1,sourceRuleId:Q0.id,sourceRuleCode:Q0.code??R0+1,expectedTargetCode:`rule-${R0+1}`,description:Q0.description,scope:Q0.scope,strictness:Q0.strictness}))},documentsPlan:{sourceDocumentCount:D.length,targetExistingDocumentCount:F.length,toCreateCount:E.length,toCreate:E.map((Q0)=>({title:Q0.title,purpose:Q0.purpose,contentType:Q0.contentType,scenarios:Q0.scenarios})),toUpdateCount:A.length,toUpdate:A.map((Q0)=>({targetDocumentId:Q0.testId,title:Q0.prodDoc.title,reasons:Q0.reasons})),toDeleteCount:k.length,toDelete:k.map((Q0)=>({targetDocumentId:Q0.id,title:Q0.title}))},publishingPlan:{targetCorpId:Q.id,publishVersionName:i,publishTarget:"test"},hosecloudSyncPlan:(()=>{if(J.source.type!=="hose")return{sourceType:J.source.type,skipped:!0,reason:"prod source is not hose; no hosecloud credentials available"};let Q0=(H.integrations??[]).filter((O1)=>O1.type==="hosecloud"),R0=new Set,U1=Q0.filter((O1)=>{let b4=O1.corporationId??J.id;if(R0.has(b4))return!1;return R0.add(b4),!0});return{sourceType:"hose",outboundName:fz0(J.name),targetMode:"assisted",integrationsCount:U1.length,integrations:U1.map((O1)=>({corporationId:O1.corporationId,apiOrigin:O1.apiOrigin,customApiUrl:O1.customApiUrl}))}})(),productionGuarantees:{prodRulesStayDraft:!0,prodVersionPublished:!1}});return}if(!(O0(U.options.yes)===!0||O0(U.options.confirm)===!0))throw s8(`Refusing to overwrite test enterprise '${Q.name}' (${Q.id}) with preferences, ${W.rules.length} draft rules, and ${D.length} knowledge documents from production enterprise '${J.name}' (${J.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 ${J.id} --yes`);await M8(q,U0,Q.seal.endpoints.approvalStylePreferences);let c=[];for(let Q0 of k)await tw(q,Q0.id),c.push({id:Q0.id,title:Q0.title});let r=[];for(let Q0 of A)await rw(q,Q0.testId,{title:Q0.prodDoc.title,purpose:Q0.prodDoc.purpose,content:Q0.prodDoc.content,contentType:Q0.prodDoc.contentType,status:Q0.prodDoc.status,enabled:Q0.prodDoc.ena
Line truncated
|
||||
Run 'seal-use corps bind-test ${J.id} <testCorpId> --confirm' first to establish a verified 1-to-1 association.`);let Q=y1(J.testCorpId);if(Q.environment!=="test")throw Error(`Target enterprise '${Q.name}' (${Q.id}) is marked as '${Q.environment}', NOT 'test'. Aborting sync to protect non-test environments.`);let K=await u1(J),q=await u1(Q),[H,G,W,w,Z,V,X,L]=await Promise.all([M1(K,J.seal.endpoints.approvalStylePreferences).catch(()=>({})),M1(q,Q.seal.endpoints.approvalStylePreferences).catch(()=>({})),_6(K),_6(q),R$(K).catch(()=>[]),R$(q).catch(()=>[]),N9(K,{limit:100}).catch(()=>({articles:[]})),N9(q,{limit:100}).catch(()=>({articles:[]}))]),D=(X.articles||[]).filter((Q0)=>!Q0.isDeleted),F=(L.articles||[]).filter((Q0)=>!Q0.isDeleted),P=new Map(F.map((Q0)=>[Q0.title.trim(),Q0])),T=[],A=[],R=new Set(D.map((Q0)=>Q0.title.trim()));for(let Q0 of D){let R0=Q0.title.trim(),U1=P.get(R0);if(!U1)T.push(Q0);else{let O1=U1.content!==Q0.content,i4=(U1.purpose??"")!==(Q0.purpose??""),f6=U1.enabled!==Q0.enabled,F$=U1.contentType!==Q0.contentType,i6=(U1.status??"")!==(Q0.status??""),P6=JSON.stringify([...U1.scenarios??[]].sort())!==JSON.stringify([...Q0.scenarios??[]].sort()),N$=JSON.stringify([...U1.tags??[]].sort())!==JSON.stringify([...Q0.tags??[]].sort());if(O1||i4||f6||F$||i6||P6||N$)A.push({testId:U1.id,prodDoc:Q0,reasons:[...O1?["content"]:[],...i4?["purpose"]:[],...f6?["enabled"]:[],...F$?["contentType"]:[],...i6?["status"]:[],...P6?["scenarios"]:[],...N$?["tags"]:[]]})}}let x=F.filter((Q0)=>!R.has(Q0.title.trim())),f=[...Z].sort((Q0,R0)=>R0.versionNumber-Q0.versionNumber)[0],j=f?.versionNumber,n=([...V].sort((Q0,R0)=>R0.versionNumber-Q0.versionNumber)[0]?.versionNumber??0)+1,S=Sz0(J.name,j,V),b=g(U.options["version-name"])??g(U.options.versionName)??gz0(J.name,j,S,n),U0={...G,tone:H.tone,language:H.language,detailLevel:H.detailLevel,outputFormat:H.outputFormat,examples:H.examples??[],prohibitedPhrases:H.prohibitedPhrases??[],customInstructions:H.customInstructions,decisionPreferences:H.decisionPreferences,thinkingDepthPreference:H.thinkingDepthPreference};if(O0(U.options["dry-run"])===!0||O0(U.options.dryRun)===!0){B0({dryRun:!0,source:{id:J.id,name:J.name,environment:J.environment,latestPublishedVersion:f?{versionNumber:f.versionNumber,versionName:f.versionName}:null,documentsCount:D.length},target:{id:Q.id,name:Q.name,environment:Q.environment},versionMappingPlan:{sourceProdVersionNumber:j??null,sourceProdVersionName:f?.versionName??null,targetTestExpectedVersionNumber:n,targetTestPublishVersionName:b,iteration:S},preferencesDiff:{decisionPreferences:{before:G.decisionPreferences,after:H.decisionPreferences},thinkingDepthPreference:{before:G.thinkingDepthPreference,after:H.thinkingDepthPreference}},rulesPlan:{sourceDraftRuleCount:W.rules.length,targetExistingDraftRuleCount:w.rules.length,toDeleteCount:w.rules.length,toCreateCount:W.rules.length,rulesToSync:W.rules.map((Q0,R0)=>({index:R0+1,sourceRuleId:Q0.id,sourceRuleCode:Q0.code??R0+1,expectedTargetCode:`rule-${R0+1}`,description:Q0.description,scope:Q0.scope,strictness:Q0.strictness}))},documentsPlan:{sourceDocumentCount:D.length,targetExistingDocumentCount:F.length,toCreateCount:T.length,toCreate:T.map((Q0)=>({title:Q0.title,purpose:Q0.purpose,contentType:Q0.contentType,scenarios:Q0.scenarios})),toUpdateCount:A.length,toUpdate:A.map((Q0)=>({targetDocumentId:Q0.testId,title:Q0.prodDoc.title,reasons:Q0.reasons})),toDeleteCount:x.length,toDelete:x.map((Q0)=>({targetDocumentId:Q0.id,title:Q0.title}))},publishingPlan:{targetCorpId:Q.id,publishVersionName:b,publishTarget:"test"},hosecloudSyncPlan:(()=>{if(J.source.type!=="hose")return{sourceType:J.source.type,skipped:!0,reason:"prod source is not hose; no hosecloud credentials available"};let Q0=(H.integrations??[]).filter((O1)=>O1.type==="hosecloud"),R0=new Set,U1=Q0.filter((O1)=>{let i4=O1.corporationId??J.id;if(R0.has(i4))return!1;return R0.add(i4),!0});return{sourceType:"hose",outboundName:fz0(J.name),targetMode:"assisted",integrationsCount:U1.length,integrations:U1.map((O1)=>({corporationId:O1.corporationId,apiOrigin:O1.apiOrigin,customApiUrl:O1.customApiUrl}))}})(),productionGuarantees:{prodRulesStayDraft:!0,prodVersionPublished:!1}});return}if(!(O0(U.options.yes)===!0||O0(U.options.confirm)===!0))throw s8(`Refusing to overwrite test enterprise '${Q.name}' (${Q.id}) with preferences, ${W.rules.length} draft rules, and ${D.length} knowledge documents from production enterprise '${J.name}' (${J.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 ${J.id} --yes`);await M8(q,U0,Q.seal.endpoints.approvalStylePreferences);let c=[];for(let Q0 of x)await aw(q,Q0.id),c.push({id:Q0.id,title:Q0.title});let r=[];for(let Q0 of A)await tw(q,Q0.testId,{title:Q0.prodDoc.title,purpose:Q0.prodDoc.purpose,content:Q0.prodDoc.content,contentType:Q0.prodDoc.contentType,status:Q0.prodDoc.status,enabled:Q0.prodDoc.ena
Line truncated
|
||||
- `);throw Error(`Missing required parameter: staffId. Found ${j.length} candidate administrators:
|
||||
- ${p}
|
||||
Please specify 'staffId', 'staffName', or 'staffPhone' to explicitly select an account (or pass force:true to bypass).`)}}}if(!L)if(!W&&Q)L=Q;else throw Error("Missing required parameter: staffId (or proxyStaffBizId). Run 'seal-use corps hose-staffs' to discover available administrators.");let D=m1($,"id")??Z,F=V??Z,P=m1($,"sealUrl")??`https://${Z.toLowerCase()}.sealai.cc`,E={id:D,name:F,environment:"production",seal:{url:P,endpoints:{approvalStylePreferences:"api/v1/agent/ai-approval/config"}},source:{type:"hose",domain:w,appKey:U,appSecurity:Y,corpId:Z,staffId:L},auth:{refreshTtl:300}};if(W)Sw(D),await _J(E);let A=Fh();hz0(A,{recursive:!0,mode:448});let R=xz0(A,`${ju(D)}.json`);if(yz0(R)&&$.overwrite!==!0)throw Error(`Enterprise config already exists: ${R}. Pass "overwrite": true to replace it.`);uz0(R,`${JSON.stringify(E,null,2)}
|
||||
`,{mode:384}),B0({id:D,name:F,corpId:Z,domain:w,staffId:L,verified:W,path:R})}async function gG1($){let I=A7($,"token"),U=(m1($,"sealUrl")??m1($,"url")??"").replace(/\/+$/,"");if(!U)throw Error("Missing required JSON field: sealUrl");let Y=aZ0($,"expiresIn")??2592000,J=$.force===!0||$.verify===!1?!1:!0,Q=bz0($),K=J?await hG1(U,I,X2(Q)):void 0;iz0($,{token:I,sealUrl:U,expiresIn:Y,verify:J,remote:K,custom:Q})}function bz0($){return{headers:Xh.parse($.headers),cookies:Lh.parse($.cookies)}}async function yG1($,I,U){let Y=await gw($),J=L2(Y.sealUrl,Y.token),Q=await v$(J),K={user:Q.user,tenant:Q.tenant};yw(Y.corpId,K.tenant),iz0({id:Y.corpId,corpId:Y.corpId,name:I,provider:"hosecloud",overwrite:U},{token:Y.token,sealUrl:Y.sealUrl,expiresIn:Y.expiresIn,verify:!0,remote:K})}function iz0($,I){let{token:U,sealUrl:Y,expiresIn:J,verify:Q,remote:K}=I,q=I.custom??bz0($),H=K?.user,G=K?.tenant,W=m1($,"tenantSlug")??P7(G?.tenantSlug),w=m1($,"tenantId")??P7(G?.id),Z=m1($,"tenantName")??P7(G?.name),V=m1($,"id")??W??w;if(!V)throw Error("Missing required JSON field: id. Seal whoami did not return tenantSlug or tenantId.");let X=m1($,"staffId")??P7(H?.providerUserId)??P7(H?.id)??"seal",L=m1($,"provider")??P7(H?.provider)??P7(G?.providerConfig?.provider),D=m1($,"corpId")??W??w??V,F={id:V,name:m1($,"name")??Z??V,environment:"production",seal:{url:Y,tenantSlug:W,headers:q.headers,cookies:q.cookies,endpoints:{approvalStylePreferences:"api/v1/agent/ai-approval/config"}},source:{type:"seal",token:U,sealUrl:Y,expiresIn:J,staffId:X,corpId:D,tenantId:w,tenantSlug:W,tenantName:Z,providerUserId:P7(H?.providerUserId),provider:L},auth:{refreshTtl:300}},P=Fh();hz0(P,{recursive:!0,mode:448});let E=xz0(P,`${ju(V)}.json`);if(yz0(E)&&$.overwrite!==!0)throw Error(`Enterprise config already exists: ${E}. Pass "overwrite": true to replace it.`);uz0(E,`${JSON.stringify(F,null,2)}
|
||||
`,{mode:384}),B0({id:V,name:F.name,tenantId:w,tenantSlug:W,verified:Q,path:E})}async function hG1($,I,U={}){let Y=await uG1(`${$}/api/v1/auth/me`,{...U,authorization:`Bearer ${I}`}),J=hD(Y.data);return{user:hD(J.user??Y.user),tenant:hD(J.tenant??Y.tenant)}}async function uG1($,I={}){let U=await fetch($,{headers:I}),Y=await U.text();if(!U.ok)throw Error(`${U.status} ${Y}`);let J=JSON.parse(Y);return hD(J)}function hD($){return $&&typeof $==="object"&&!Array.isArray($)?$:{}}function P7($){return typeof $==="string"&&$?$:void 0}async function nz0($,I){let U=await gw($),Y=L2(U.sealUrl,U.token),J=await v$(Y);yw(U.corpId,J.tenant);let Q=await PU(Y,{note:I});B0({tenant:{id:J.tenant.id,name:J.tenant.name,tenantSlug:J.tenant.tenantSlug,corpId:U.corpId},user:{id:J.user.id,name:J.user.name,providerUserId:J.user.providerUserId,isAdmin:J.user.isAdmin},delegation:Q,expiresIn:U.expiresIn})}async function pz0($,I,U,Y,J){if($==="list"){await F0("seal_delegation_list",U,Y,{},V0(J.options));return}if($==="create"){let Q=g(J.options.note)??(I?[I,...J.command.slice(2)].join(" "):void 0);await F0("seal_delegation_create",U,Y,{note:Q},V0(J.options));return}if($==="revoke"){let Q=I??g(J.options.tokenId);if(!Q)throw Error("Usage: seal-use delegation revoke <tokenId>");await F0("seal_delegation_revoke",U,Y,{tokenId:Q},V0(J.options));return}throw Error(`Unknown delegation command: ${$??""}. Run 'seal-use help' for available commands.`)}import{readFileSync as xG1}from"node:fs";async function cz0($,I,U,Y,J,Q){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(!W&&Q)L=Q;else throw Error("Missing required parameter: staffId (or proxyStaffBizId). Run 'seal-use corps hose-staffs' to discover available administrators.");let D=m1($,"id")??Z,F=V??Z,P=m1($,"sealUrl")??`https://${Z.toLowerCase()}.sealai.cc`,T={id:D,name:F,environment:"production",seal:{url:P,endpoints:{approvalStylePreferences:"api/v1/agent/ai-approval/config"}},source:{type:"hose",domain:w,appKey:U,appSecurity:Y,corpId:Z,staffId:L},auth:{refreshTtl:300}};if(W)Sw(D),await gJ(T);let A=Mh();hz0(A,{recursive:!0,mode:448});let R=kz0(A,`${_u(D)}.json`);if(yz0(R)&&$.overwrite!==!0)throw Error(`Enterprise config already exists: ${R}. Pass "overwrite": true to replace it.`);uz0(R,`${JSON.stringify(T,null,2)}
|
||||
`,{mode:384}),B0({id:D,name:F,corpId:Z,domain:w,staffId:L,verified:W,path:R})}async function yG1($){let I=A7($,"token"),U=(m1($,"sealUrl")??m1($,"url")??"").replace(/\/+$/,"");if(!U)throw Error("Missing required JSON field: sealUrl");let Y=aZ0($,"expiresIn")??2592000,J=$.force===!0||$.verify===!1?!1:!0,Q=iz0($),K=J?await uG1(U,I,X2(Q)):void 0;bz0($,{token:I,sealUrl:U,expiresIn:Y,verify:J,remote:K,custom:Q})}function iz0($){return{headers:Dh.parse($.headers),cookies:Oh.parse($.cookies)}}async function hG1($,I,U){let Y=await gw($),J=L2(Y.sealUrl,Y.token),Q=await G$(J),K={user:Q.user,tenant:Q.tenant};yw(Y.corpId,K.tenant),bz0({id:Y.corpId,corpId:Y.corpId,name:I,provider:"hosecloud",overwrite:U},{token:Y.token,sealUrl:Y.sealUrl,expiresIn:Y.expiresIn,verify:!0,remote:K})}function bz0($,I){let{token:U,sealUrl:Y,expiresIn:J,verify:Q,remote:K}=I,q=I.custom??iz0($),H=K?.user,G=K?.tenant,W=m1($,"tenantSlug")??P7(G?.tenantSlug),w=m1($,"tenantId")??P7(G?.id),Z=m1($,"tenantName")??P7(G?.name),V=m1($,"id")??W??w;if(!V)throw Error("Missing required JSON field: id. Seal whoami did not return tenantSlug or tenantId.");let X=m1($,"staffId")??P7(H?.providerUserId)??P7(H?.id)??"seal",L=m1($,"provider")??P7(H?.provider)??P7(G?.providerConfig?.provider),D=m1($,"corpId")??W??w??V,F={id:V,name:m1($,"name")??Z??V,environment:"production",seal:{url:Y,tenantSlug:W,headers:q.headers,cookies:q.cookies,endpoints:{approvalStylePreferences:"api/v1/agent/ai-approval/config"}},source:{type:"seal",token:U,sealUrl:Y,expiresIn:J,staffId:X,corpId:D,tenantId:w,tenantSlug:W,tenantName:Z,providerUserId:P7(H?.providerUserId),provider:L},auth:{refreshTtl:300}},P=Mh();hz0(P,{recursive:!0,mode:448});let T=kz0(P,`${_u(V)}.json`);if(yz0(T)&&$.overwrite!==!0)throw Error(`Enterprise config already exists: ${T}. Pass "overwrite": true to replace it.`);uz0(T,`${JSON.stringify(F,null,2)}
|
||||
`,{mode:384}),B0({id:V,name:F.name,tenantId:w,tenantSlug:W,verified:Q,path:T})}async function uG1($,I,U={}){let Y=await kG1(`${$}/api/v1/auth/me`,{...U,authorization:`Bearer ${I}`}),J=uD(Y.data);return{user:uD(J.user??Y.user),tenant:uD(J.tenant??Y.tenant)}}async function kG1($,I={}){let U=await fetch($,{headers:I}),Y=await U.text();if(!U.ok)throw Error(`${U.status} ${Y}`);let J=JSON.parse(Y);return uD(J)}function uD($){return $&&typeof $==="object"&&!Array.isArray($)?$:{}}function P7($){return typeof $==="string"&&$?$:void 0}async function nz0($,I){let U=await gw($),Y=L2(U.sealUrl,U.token),J=await G$(Y);yw(U.corpId,J.tenant);let Q=await EU(Y,{note:I});B0({tenant:{id:J.tenant.id,name:J.tenant.name,tenantSlug:J.tenant.tenantSlug,corpId:U.corpId},user:{id:J.user.id,name:J.user.name,providerUserId:J.user.providerUserId,isAdmin:J.user.isAdmin},delegation:Q,expiresIn:U.expiresIn})}async function pz0($,I,U,Y,J){if($==="list"){await F0("seal_delegation_list",U,Y,{},V0(J.options));return}if($==="create"){let Q=g(J.options.note)??(I?[I,...J.command.slice(2)].join(" "):void 0);await F0("seal_delegation_create",U,Y,{note:Q},V0(J.options));return}if($==="revoke"){let Q=I??g(J.options.tokenId);if(!Q)throw Error("Usage: seal-use delegation revoke <tokenId>");await F0("seal_delegation_revoke",U,Y,{tokenId:Q},V0(J.options));return}throw Error(`Unknown delegation command: ${$??""}. Run 'seal-use help' for available commands.`)}import{readFileSync as xG1}from"node:fs";async function cz0($,I,U,Y,J,Q){if(!$||$==="help")throw Error(`Usage: seal-use deploy <system> <action> [options]
|
||||
|
||||
`+`支持的审批系统与发布目标:
|
||||
`+` • hosecloud (合思费控): seal-use deploy hosecloud <requirements|list|get|status|configure|sync> --corp <corpId>
|
||||
@@ -345,13 +349,13 @@ Please specify 'staffId', 'staffName', or 'staffPhone' to explicitly select an a
|
||||
`+`\uD83D\uDC49 请先运行配置命令:seal-use deploy hosecloud configure --json '{...}' --corp ${J.id}`);let V=Z[0];if(V&&Z.length===1&&W){let X=V.signKey;console.error(`ℹ️ [auto] 检测到企业仅有 1 个合思配置,已自动选择 (signKey: ${X})`),await F0("seal_deploy_hosecloud_sync",Y,J,{signKey:X},V0(Q.options));return}console.error(`Usage: seal-use deploy hosecloud sync <sign-key> [--corp ${J.id}]
|
||||
`),console.error("ℹ️ 当前企业发现以下可用的合思配置卡片:");for(let X of Z){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 ${J.id}
|
||||
`)}if(Z.length===1)console.error(`\uD83D\uDCA1 提示:若希望单配置自动同步,可附加 --auto 参数:seal-use deploy hosecloud sync --auto --corp ${J.id}
|
||||
`);throw new d$("缺少必需参数 <sign-key>。请从上述候选列表中选择并指定 signKey 执行同步。",2,Z.length===1?`seal-use deploy hosecloud sync ${Z[0].signKey} --corp ${J.id}`:void 0)}await F0("seal_deploy_hosecloud_sync",Y,J,{signKey:G},V0(Q.options));return}throw Error(`Unknown deploy hosecloud action: ${q??""}. Available: requirements, list, get, status, configure, sync.`)}import{createServer as nG1}from"node:http";import{URL as fG1}from"node:url";var dz0={openapi:"3.1.0",info:{title:"seal-use Wrapped API",version:"0.10.17",description:`Planned HTTP contract for the seal-use wrapped backend API.
|
||||
`);throw new d$("缺少必需参数 <sign-key>。请从上述候选列表中选择并指定 signKey 执行同步。",2,Z.length===1?`seal-use deploy hosecloud sync ${Z[0].signKey} --corp ${J.id}`:void 0)}await F0("seal_deploy_hosecloud_sync",Y,J,{signKey:G},V0(Q.options));return}throw Error(`Unknown deploy hosecloud action: ${q??""}. Available: requirements, list, get, status, configure, sync.`)}import{createServer as pG1}from"node:http";import{URL as iG1}from"node:url";var dz0={openapi:"3.1.0",info:{title:"seal-use Wrapped API",version:"0.10.17",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" />
|
||||
@@ -375,13 +379,13 @@ selection, source authentication, response compaction, and diagnostics-friendly
|
||||
src="https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.25.101/dist/browser/standalone.js"
|
||||
></script>
|
||||
</body>
|
||||
</html>`}async function f4($,I,U,Y){let J=$.handler;return J(I,U,{corp:Y})}async function lz0($,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 U=$.headers.host||"localhost",Y=$.headers["x-forwarded-proto"]||"http",J=new fG1($.url||"/",`${Y}://${U}`),Q=J.pathname.replace(/\/+$/,"")||"/",K=($.method||"GET").toUpperCase();try{if(K==="GET"&&Q==="/"){t1(I,200,{name:"seal-use",version:Y1,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(K==="GET"&&Q==="/docs"){iG1(I,200,mz0());return}if(K==="GET"&&Q==="/openapi.json"){t1(I,200,uD());return}if(K==="GET"&&Q==="/health"){t1(I,200,{status:"ok",version:Y1,name:"seal-use",timestamp:new Date().toISOString()});return}if(K==="POST"&&(Q==="/shutdown"||Q==="/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(K==="POST"&&Q==="/api/cli"){let q=await kD($),H=(typeof q?.command==="string"?q.command:"").trim();if(!H){xD(I,400,"Missing 'command' property in request body");return}let G=hu(H),W=G[0]==="seal-use"||G[0]==="seal-home"||G[0]?.endsWith("/seal-use")||G[0]?.endsWith("/seal-home")?G.slice(1):G,w=await EH(W),Z=void 0;try{if(w.stdout.trim().startsWith("{")||w.stdout.trim().startsWith("["))Z=JSON.parse(w.stdout)}catch{}t1(I,w.isError?400:200,{success:!w.isError,stdout:w.stdout,stderr:w.stderr,exitCode:w.exitCode,data:Z});return}if(K==="POST"&&Q.startsWith("/api/tool/")){let q=Q.slice(10).trim(),H=_4(q);if(!H){xD(I,404,`Tool not found: '${q}'`);return}let G=await kD($)||{},W=k6($,J,G),w=y1(W),Z=await u1(w),V={...G};delete V.corp;let X=await f4(H,Z,V,w);t1(I,200,X);return}if(Q.startsWith("/v1/")){if(await bG1($,I,K,Q,J))return}xD(I,404,`Cannot ${K} ${Q}. Visit /docs for available endpoints.`)}catch(q){let H=q instanceof Error?q.message:String(q);xD(I,500,H)}}async function bG1($,I,U,Y,J){let Q=Object.fromEntries(J.searchParams.entries());if(U==="GET"&&Y==="/v1/corps"){let K=o8(),q=O4();return t1(I,200,{count:K.length,mode:q.stateful?"stateful":"stateless",defaultCorpId:q.defaultCorpId,corps:K.map((H)=>({id:H.id,name:H.name,sourceType:H.source.type,sealUrl:H.seal?.url}))}),!0}if(U==="GET"&&Y==="/v1/whoami"){let K=k6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_whoami"),W=await f4(G,H,{},q);return t1(I,200,W),!0}if(U==="GET"&&Y==="/v1/session"){let K=k6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_session_get"),W=await f4(G,H,{},q);return t1(I,200,W),!0}if(U==="GET"&&Y==="/v1/approval-runs/summary"){let K=k6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_approval_runs_summary"),W=await f4(G,H,Q,q);return t1(I,200,W),!0}if(U==="GET"&&Y==="/v1/approval-runs/stats"){let K=k6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_approval_runs_stats"),W=await f4(G,H,Q,q);return t1(I,200,W),!0}if(U==="GET"&&Y==="/v1/approval-runs/pick"){let K=k6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_approval_run_pick"),W=await f4(G,H,Q,q);return t1(I,200,W),!0}if(U==="GET"&&Y==="/v1/approval-runs/url"){let K=k6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_approval_run_url_get"),W=await f4(G,H,Q,q);return t1(I,200,W),!0}if(Y.startsWith("/v1/approval-runs/")){let K=Y.slice(18).split("/"),q=K[0],H=K[1];if(q&&!["summary","pick","stats","url","bridge"].includes(q)){let G=k6($,J,Q),W=y1(G),w=await u1(W);if(!H){let Z=_4("seal_approval_run_get"),V=await f4(Z,w,{recordId:q,...Q},W);return t1(I,200,V),!0}if(H==="attachments"){let Z=_4("seal_approval_run_attachments_get"),V=await f4(Z,w,{recordId:q,...Q},W);return t1(I,200,V),!0}if(H==="cited-rules"){let Z=_4("seal_approval_run_cited_rules_get"),V=await f4(Z,w,{recordId:q,...Q},W);return t1(I,200,V),!0}if(H==="document-summary"){let Z=_4("seal_approval_run_document_summary_get"),V=await f4(Z,w,{recordId:q,...Q},W);return t1(I,200,V),!0}if(H==="result"){let Z=_4("seal_approval_run_result_get"),V=await f4(Z,w,{recordId:q,...Q},W);return t1(I,200,V),!0}}}if(U==="GET"&&Y==="/v1/approval-runs"){let K=k6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_approval_runs_search"),W=await f4(G,H,{...Q,limit:Q.limit?Number(Q.limit):void 0,offset:Q.offset?Number(Q.offset):void 0,includeBridge:Q.includeBridge==="true"},q);return t1(I,200,W),!0}if(U==="GET"&&Y==="/v1/approval/rules"){let K=k6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_approval_rules_list"),W=await f4(G,H,Q,q);return t1(I,200,W),!0}if(U==="GET"&&Y==="/v1/simulation/batches"){let K=k6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_simulation_batches_list"),W=await f4(G,H,Q,q);return t1(I,200,W),!0}if(U==="POST"&&Y==="/v1/simulation/create-batch"){let K=await kD($)||{},q=k6($,J,K),H=y1(q),G=await u1Line truncated
|
||||
</html>`}async function f4($,I,U,Y){let J=$.handler;return J(I,U,{corp:Y})}async function lz0($,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 U=$.headers.host||"localhost",Y=$.headers["x-forwarded-proto"]||"http",J=new iG1($.url||"/",`${Y}://${U}`),Q=J.pathname.replace(/\/+$/,"")||"/",K=($.method||"GET").toUpperCase();try{if(K==="GET"&&Q==="/"){t1(I,200,{name:"seal-use",version:Y1,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(K==="GET"&&Q==="/docs"){nG1(I,200,mz0());return}if(K==="GET"&&Q==="/openapi.json"){t1(I,200,kD());return}if(K==="GET"&&Q==="/health"){t1(I,200,{status:"ok",version:Y1,name:"seal-use",timestamp:new Date().toISOString()});return}if(K==="POST"&&(Q==="/shutdown"||Q==="/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(K==="POST"&&Q==="/api/cli"){let q=await fD($),H=(typeof q?.command==="string"?q.command:"").trim();if(!H){xD(I,400,"Missing 'command' property in request body");return}let G=ku(H),W=G[0]==="seal-use"||G[0]==="seal-home"||G[0]?.endsWith("/seal-use")||G[0]?.endsWith("/seal-home")?G.slice(1):G,w=await EH(W),Z=void 0;try{if(w.stdout.trim().startsWith("{")||w.stdout.trim().startsWith("["))Z=JSON.parse(w.stdout)}catch{}t1(I,w.isError?400:200,{success:!w.isError,stdout:w.stdout,stderr:w.stderr,exitCode:w.exitCode,data:Z});return}if(K==="POST"&&Q.startsWith("/api/tool/")){let q=Q.slice(10).trim(),H=_4(q);if(!H){xD(I,404,`Tool not found: '${q}'`);return}let G=await fD($)||{},W=x6($,J,G),w=y1(W),Z=await u1(w),V={...G};delete V.corp;let X=await f4(H,Z,V,w);t1(I,200,X);return}if(Q.startsWith("/v1/")){if(await bG1($,I,K,Q,J))return}xD(I,404,`Cannot ${K} ${Q}. Visit /docs for available endpoints.`)}catch(q){let H=q instanceof Error?q.message:String(q);xD(I,500,H)}}async function bG1($,I,U,Y,J){let Q=Object.fromEntries(J.searchParams.entries());if(U==="GET"&&Y==="/v1/corps"){let K=o8(),q=O4();return t1(I,200,{count:K.length,mode:q.stateful?"stateful":"stateless",defaultCorpId:q.defaultCorpId,corps:K.map((H)=>({id:H.id,name:H.name,sourceType:H.source.type,sealUrl:H.seal?.url}))}),!0}if(U==="GET"&&Y==="/v1/whoami"){let K=x6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_whoami"),W=await f4(G,H,{},q);return t1(I,200,W),!0}if(U==="GET"&&Y==="/v1/session"){let K=x6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_session_get"),W=await f4(G,H,{},q);return t1(I,200,W),!0}if(U==="GET"&&Y==="/v1/approval-runs/summary"){let K=x6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_approval_runs_summary"),W=await f4(G,H,Q,q);return t1(I,200,W),!0}if(U==="GET"&&Y==="/v1/approval-runs/stats"){let K=x6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_approval_runs_stats"),W=await f4(G,H,Q,q);return t1(I,200,W),!0}if(U==="GET"&&Y==="/v1/approval-runs/pick"){let K=x6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_approval_run_pick"),W=await f4(G,H,Q,q);return t1(I,200,W),!0}if(U==="GET"&&Y==="/v1/approval-runs/url"){let K=x6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_approval_run_url_get"),W=await f4(G,H,Q,q);return t1(I,200,W),!0}if(Y.startsWith("/v1/approval-runs/")){let K=Y.slice(18).split("/"),q=K[0],H=K[1];if(q&&!["summary","pick","stats","url","bridge"].includes(q)){let G=x6($,J,Q),W=y1(G),w=await u1(W);if(!H){let Z=_4("seal_approval_run_get"),V=await f4(Z,w,{recordId:q,...Q},W);return t1(I,200,V),!0}if(H==="attachments"){let Z=_4("seal_approval_run_attachments_get"),V=await f4(Z,w,{recordId:q,...Q},W);return t1(I,200,V),!0}if(H==="cited-rules"){let Z=_4("seal_approval_run_cited_rules_get"),V=await f4(Z,w,{recordId:q,...Q},W);return t1(I,200,V),!0}if(H==="document-summary"){let Z=_4("seal_approval_run_document_summary_get"),V=await f4(Z,w,{recordId:q,...Q},W);return t1(I,200,V),!0}if(H==="result"){let Z=_4("seal_approval_run_result_get"),V=await f4(Z,w,{recordId:q,...Q},W);return t1(I,200,V),!0}}}if(U==="GET"&&Y==="/v1/approval-runs"){let K=x6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_approval_runs_search"),W=await f4(G,H,{...Q,limit:Q.limit?Number(Q.limit):void 0,offset:Q.offset?Number(Q.offset):void 0,includeBridge:Q.includeBridge==="true"},q);return t1(I,200,W),!0}if(U==="GET"&&Y==="/v1/approval/rules"){let K=x6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_approval_rules_list"),W=await f4(G,H,Q,q);return t1(I,200,W),!0}if(U==="GET"&&Y==="/v1/simulation/batches"){let K=x6($,J,Q),q=y1(K),H=await u1(q),G=_4("seal_simulation_batches_list"),W=await f4(G,H,Q,q);return t1(I,200,W),!0}if(U==="POST"&&Y==="/v1/simulation/create-batch"){let K=await fD($)||{},q=x6($,J,K),H=y1(q),G=await u1Line truncated
|
||||
\uD83D\uDE80 seal-use HTTP Server (v${Y1}) started`),console.error(` URL: http://${U}:${I}`),console.error(` Docs: http://${U}:${I}/docs`),console.error(` OpenAPI: http://${U}:${I}/openapi.json`),console.error(` CLI Exec: POST http://${U}:${I}/api/cli`),console.error(` REST API: http://${U}:${I}/v1/...
|
||||
`);J(Y)})})}async function oz0($){let I=m0($.options.port)??m0($.options.p),U=g($.options.host)??g($.options.h),Y=await iD({port:I,host:U}),J=()=>{Y.close(()=>{process.exit(0)})};process.on("SIGINT",J),process.on("SIGTERM",J),await new Promise(()=>{})}async function rz0($,I,U,Y){if($==="config"||$==="get"){await F0("seal_llm_config_get",I,U,{},V0(Y.options));return}if($==="providers"||$==="list"){await F0("seal_llm_providers_list",I,U,{},V0(Y.options));return}throw Error(`Unknown llm command: ${$??""}. Run 'seal-use help' for available commands.`)}async function tz0($,I){if($==="config"||$==="json"){uu();return}await xu()}function uu(){B0({mcpServers:{"seal-use":{type:"stdio",command:"seal-use",args:["mcp"],env:{SEAL_USE_MCP_ENABLED:"true"}}}})}function az0($){let I=uD();B0(I,{...V0($.options),allowFull:!0})}async function sz0($,I,U,Y){if($==="available"){await F0("seal_permissions_available_list",I,U,{},V0(Y.options));return}if($==="configs"||$==="list"){await F0("seal_permissions_configs_list",I,U,{},V0(Y.options));return}throw Error(`Unknown permissions command: ${$??""}. Run 'seal-use help' for available commands.`)}import{readFileSync as ez0}from"node:fs";async function $X0($,I,U,Y,J,Q,K){if(!$||$==="get"){await F0("seal_preference_get",J,Q,{},V0(K.options));return}if($==="decision"){if(I==="update"||!I){let q=g(K.options.input),H=q?JSON.parse(ez0(q,"utf8")):U$(K.json);if(!H||Object.keys(H).length===0)throw Error(`Usage: seal-use preference decision update --json '{"explicitApprove":"..."}'`);await F0("seal_preference_decision_update",J,Q,{...H,dryRun:O0(K.options.dryRun)??O0(K.options["dry-run"])},V0(K.options));return}}if($==="thinking-depth"||$==="thinkingDepth"){if(I==="set"){let q=g(K.options.default)??g(K.options.level)??Y;if(q!=="medium"&&q!=="high")throw Error("Usage: seal-use preference thinking-depth set --default <medium|high>");await F0("seal_preference_thinking_depth_set",J,Q,{defaultLevel:q,dryRun:O0(K.options.dryRun)??O0(K.options["dry-run"])},V0(K.options));return}if(I==="policies"){if(U==="list"||!U){await F0("seal_preference_thinking_depth_policies_list",J,Q,{},V0(K.options));return}if(U==="upsert"){let q=g(K.options.input),H=q?JSON.parse(ez0(q,"utf8")):U$(K.json);if(!H||!H.id||!H.name)throw Error(`Usage: seal-use preference thinking-depth policies upsert --json '{"id":"...","name":"...","level":"high"}'`);await F0("seal_preference_thinking_depth_policies_upsert",J,Q,{...H,dryRun:O0(K.options.dryRun)??O0(K.options["dry-run"])},V0(K.options));return}if(U==="remove"||U==="delete"){let q=Y??g(K.options.id)??g(K.options.policyId);if(!q)throw Error("Usage: seal-use preference thinking-depth policies remove <policyId>");await F0("seal_preference_thinking_depth_policies_remove",J,Q,{policyId:q,dryRun:O0(K.options.dryRun)??O0(K.options["dry-run"])},V0(K.options));return}}}throw Error(`Unknown preference action: ${$??""}. Available: get, decision update, thinking-depth set, thinking-depth policies list/upsert/remove.`)}async function IX0($={}){let I=o8(),U=O4(),Y=NJ(I,{stateful:U.stateful,defaultCorpId:U.defaultCorpId,corpId:$.corpId},YI());console.log(`[probe] corp=${Y.id} source=${Y.source.type}`);let J=await _J(Y);console.log("[probe] seal enterprise"),console.log(JSON.stringify(J,null,2));let Q=await u1(Y),K=await ew(Q,{documentLimit:20,stylePreferencesEndpoint:Y.seal.endpoints.approvalStylePreferences});console.log("[probe] approval context summary"),console.log(JSON.stringify({rules:K.rules.rules.length,hasPendingRuleDeletes:K.rules.hasPendingDeletes,documents:K.documents.articles.length,documentsTotal:K.documents.total,stylePreferences:K.stylePreferences.ok?"ok":`error: ${K.stylePreferences.error}`},null,2))}async function UX0($,I,U){let Y=I??g(U.options.corp)??($&&$!=="--corp"?$:void 0);await IX0({corpId:Y})}async function ku($,I,U,Y,J){if($==="count"){await F0("seal_approval_rules_list",U,Y,{countOnly:!0},V0(J.options));return}if($==="list"){if(O0(J.options.count)){await F0("seal_approval_rules_list",U,Y,{countOnly:!0},V0(J.options));return}let Q=m0(J.options.limit),K=m0(J.options.offset);if(O0(J.options.summary)){await F0("seal_approval_rules_list",U,Y,{fields:Kz0,limit:Q,offset:K},V0(J.options));return}let q=await zI("seal_approval_rules_list",U,Y,{limit:Q,offset:K});qz0(q,O0(J.options.full)===!0),B0(q);return}if($==="clear"){let Q=O0(J.options.yes)===!0,K=O0(J.options.dryRun)??O0(J.options["dry-run"])??!Q;if(!Q&&!K)throw s8("Refusing to clear rules without --yes. Use --dry-run to preview.",`seal-use rules clear --corp ${Y.id} --dry-run`);let q=await zI("seal_approval_rules_clear",U,Y,{dryRun:K,recode:O0(J.options.recode)});if(!Q&&K&&q&&typeof q==="object"){B0({...q,nextCommand:`seal-use rules clear --corp ${Y.id} --yes`},V0(J.options));return}B0(q,V0(J.options));return}if($==="versions"){await F0("seal_approval_rule_versions_list",U,Y,{},V0(J.options));return}if($==="version"){let Q=I??g(J.options.version);if(!Q)throw Error("Usage: seal-use rules version <versionId|versionNumber|l
Line truncated
|
||||
`).filter(Boolean),Q=J.slice(-I);return{logFile:U,lines:Q,totalLines:J.length}}async function lG1($){let I=dD($),U=iu($),Y=BH($);KX0($.stateDir);let J=$.port??(process.env.PORT?Number.parseInt(process.env.PORT,10):fD),Q=$.host??(process.env.HOST?process.env.HOST:bD);pD(I,`${process.pid}
|
||||
`,{mode:384}),pD(U,JSON.stringify({pid:process.pid,port:J,host:Q,version:$.version,startedAt:new Date().toISOString()},null,2),{mode:384}),SJ(Y,`service starting on http://${Q}:${J} pid=${process.pid}`);let K=null;try{K=await iD({port:J,host:Q,silent:!0}),SJ(Y,`service listening pid=${process.pid}`)}catch(H){if(SJ(Y,`service failed to bind port ${J}: ${H instanceof Error?H.message:String(H)}`),cD(I)===process.pid)e8(I,{force:!0}),e8(U,{force:!0});throw H}let q=()=>{if(K)K.close(),K=null;if(cD(I)===process.pid)e8(I,{force:!0}),e8(U,{force:!0});SJ(Y,`stopped pid=${process.pid}`)};await new Promise((H)=>{let G=!1,W=()=>{if(G)return;G=!0,q(),process.off("SIGTERM",W),process.off("SIGINT",W),H()};process.once("SIGTERM",W),process.once("SIGINT",W)})}function YX0($){KX0($.stateDir);let I=gJ($);if(I.running)return I;let U=$.launcher??{command:process.execPath,args:[$.entryFile]},Y=[...U.args??[],"service","run"];if($.port)Y.push("--port",String($.port));if($.host)Y.push("--host",String($.host));let J=pG1(U.command,Y,{cwd:$.appRoot,detached:!0,stdio:["ignore","ignore","ignore"],env:process.env});J.unref();let Q=dD($);return pD(Q,`${J.pid}
|
||||
`,{mode:384}),SJ(BH($),`started pid=${J.pid}`),{started:!0,...gJ($)}}function JX0($,I={}){let U=dD($),Y=iu($),J=cD(U);if(!J||!QX0(J,$.appRoot))return e8(U,{force:!0}),e8(Y,{force:!0}),I.quiet?void 0:{stopped:!1,reason:"not running"};return process.kill(J,"SIGTERM"),e8(U,{force:!0}),e8(Y,{force:!0}),SJ(BH($),`stop requested pid=${J}`),I.quiet?void 0:{stopped:!0,pid:J}}function QX0($,I){if(!oG1($))return!1;try{let U=cG1("ps",["-p",String($),"-o","command="],{encoding:"utf8"});return(U.includes(I)||U.includes("seal-use")||U.includes("src/cli.ts"))&&U.includes("service")&&U.includes("run")}catch{return!1}}function oG1($){try{return process.kill($,0),!0}catch{return!1}}function dD($){return bu($.stateDir,"service.pid")}function iu($){return bu($.stateDir,"service.json")}function BH($){return bu($.stateDir,"service.log")}function cD($){if(!nD($))return;let I=Number(fu($,"utf8").trim());return Number.isInteger(I)&&I>0?I:void 0}function KX0($){dG1($,{recursive:!0,mode:448})}function SJ($,I){pD($,`${new Date().toISOString()} ${I}
|
||||
`,{flag:"a",mode:384})}var nu=tG1(rG1(),".config","seal-use");async function pu($,I,U){let Y=U?m0(U.options.port)??m0(U.options.p):void 0,J=U?g(U.options.host)??g(U.options.h):void 0,Q=U?m0(U.options.lines)??m0(U.options.n):void 0,K=await XI($,{appRoot:I.appRoot,entryFile:I.entryFile,stateDir:nu,version:Y1,launcher:I.launcher,port:Y,host:J},{maxLines:Q});if(K!==void 0)B0(K)}import{existsSync as aG1,readFileSync as qX0}from"node:fs";async function HX0($,I,U,Y,J){if($==="batch-records"||$==="records"){let Q=I??g(J.options.batchId)??g(J.options["batch-id"]);if(!Q)throw Error("Usage: seal-use simulation batch-records <batchId>");await F0("seal_simulation_batch_records_get",U,Y,{batchId:Q,query:g(J.options.query)},V0(J.options));return}if($==="create"||$==="run"){let Q=g(J.options.mode)??g(J.options.sourceSystem)??g(J.options["source-system"])??"hosecloud",K=Q==="material-pack"?"material_pack":Q,q=g(J.options.schemaConfig)??g(J.options["schema-config"]),H=q?JSON.parse(qX0(q,"utf8")):void 0,G=g(J.options.input),W=G?JSON.parse(qX0(G,"utf8")):U$(J.json),w=g(J.options.packageId)??g(J.options["package-id"]),Z=V6(J.options.packageIds)??V6(J.options["package-ids"])??(w?[w]:void 0),V=V6(J.options.flowIds)??V6(J.options["flow-ids"])??V6(J.options.documentSn)??V6(J.options["document-sn"]),X=g(J.options.signKey)??g(J.options["sign-key"])??g(J.options.integration),L=O0(J.options.noWait)??O0(J.options["no-wait"]);await F0("seal_simulation_batch_create",U,Y,{mode:K,sourceSystem:K,flowIds:V,documentSn:V,rejectNodeName:g(J.options.rejectNode)??g(J.options["reject-node"])??null,thinkingDepthOverride:g(J.options.thinkingDepth)??g(J.options["thinking-depth"]),skipInvoiceGeneration:O0(J.options.skipInvoiceGeneration)??O0(J.options["skip-invoice-generation"]),skipExpenseExtraction:O0(J.options.skipExpenseExtraction)??O0(J.options["skip-expense-extraction"]),disableAttachmentCache:O0(J.options.disableAttachmentCache)??O0(J.options["disable-attachment-cache"]),signKey:X,packageIds:Z,packageId:w,templateId:g(J.options.templateId)??g(J.options["template-id"]),schemaConfig:H,requestIds:V6(J.options.requestIds)??V6(J.options["request-ids"]),workflowTypeId:g(J.options.workflowTypeId)??g(J.options["workflow-type-id"]),flowStatusList:V6(J.options.flowStatusList)?.map(Number)??V6(J.options["flow-status-list"])?.map(Number),businessCodes:V6(J.options.businessCodes)??V6(J.options["business-codes"]),documentType:g(J.options.documentType)??g(J.options["document-type"]),startTime:m0(J.options.startTime)??m0(J.options["start-time"]),endTime:m0(J.options.endTime)??m0(J.options["end-time"]),status:V6(J.options.status),limit:m0(J.options.limit),noWait:L,rawParams:W},V0(J.options));return}if($==="wait"){let Q=I??g(J.options.batchId)??g(J.options["batch-id"]);if(!Q)throw Error("Usage: seal-use simulation wait <batchId> [--timeout 10m] [--poll-interval 2s]");await F0("seal_simulation_batch_wait",U,Y,{batchId:Q,timeout:g(J.options.timeout),pollInterval:g(J.options.pollInterval)??g(J.options["poll-interval"])},V0(J.options));return}if($==="status"){let Q=I??g(J.options.batchId)??g(J.options["batch-id"]);if(!Q)throw Error("Usage: seal-use simulation status <batchId>");await F0("seal_simulation_batch_status",U,Y,{batchId:Q},V0(J.options));return}if($==="clean"||$==="delete"){let Q=I??g(J.options.batchId)??g(J.options["batch-id"]);if(!Q)throw Error("Usage: seal-use simulation clean <batchId>");await F0("seal_simulation_batch_clean",U,Y,{batchId:Q},V0(J.options));return}if($==="specifications"){let Q=I??g(J.options.integration)??g(J.options.signKey)??g(J.options["sign-key"]);await F0("seal_simulation_specifications_list",U,Y,{signKey:Q},V0(J.options));return}if($==="approval-definitions"||$==="definitions"){await F0("seal_simulation_feishu_approval_definitions_list",U,Y,{},V0(J.options));return}if($==="list"){await F0("seal_simulation_batches_list",U,Y,{limit:m0(J.options.limit)},V0(J.options));return}if($==="get"){let Q=I??g(J.options.batchId)??g(J.options["batch-id"]);if(!Q)throw Error("Usage: seal-use simulation get <batchId>");await F0("seal_simulation_batch_get",U,Y,{batchId:Q},V0(J.options));return}if($==="templates"){await F0("seal_simulation_templates_get",U,Y,{},V0(J.options));return}if($==="integrations"){await F0("seal_simulation_integrations_get",U,Y,{},V0(J.options));return}if($==="package-upload"){let Q=I??g(J.options.file);if(!Q)throw Error("Usage: seal-use simulation package-upload <材料包.zip>");if(!aG1(Q))throw Error(`File not found: ${Q}`);await F0("seal_simulation_material_package_upload",U,Y,{filePath:Q},V0(J.options));return}throw Error(`Unknown simulation command: ${$??""}. Run 'seal-use help' for available commands.`)}import{existsSync as BX0}from"node:fs";import{join as mD}from"node:path";import{existsSync as cu,mkdirSync as NX0,rmSync as GW1,writeFileSync as WW1}from"node:fs";import{homedir as MX0}from"node:os";import{dirname as wW1,join as du}from"node:path";var GX0=`---
|
||||
`);J(Y)})})}async function oz0($){let I=n0($.options.port)??n0($.options.p),U=g($.options.host)??g($.options.h),Y=await nD({port:I,host:U}),J=()=>{Y.close(()=>{process.exit(0)})};process.on("SIGINT",J),process.on("SIGTERM",J),await new Promise(()=>{})}async function rz0($,I,U,Y){if($==="config"||$==="get"){await F0("seal_llm_config_get",I,U,{},V0(Y.options));return}if($==="providers"||$==="list"){await F0("seal_llm_providers_list",I,U,{},V0(Y.options));return}throw Error(`Unknown llm command: ${$??""}. Run 'seal-use help' for available commands.`)}async function tz0($,I){if($==="config"||$==="json"){xu();return}await fu()}function xu(){B0({mcpServers:{"seal-use":{type:"stdio",command:"seal-use",args:["mcp"],env:{SEAL_USE_MCP_ENABLED:"true"}}}})}function az0($){let I=kD();B0(I,{...V0($.options),allowFull:!0})}async function sz0($,I,U,Y){if($==="available"){await F0("seal_permissions_available_list",I,U,{},V0(Y.options));return}if($==="configs"||$==="list"){await F0("seal_permissions_configs_list",I,U,{},V0(Y.options));return}throw Error(`Unknown permissions command: ${$??""}. Run 'seal-use help' for available commands.`)}import{readFileSync as ez0}from"node:fs";async function $X0($,I,U,Y,J,Q,K){if(!$||$==="get"){await F0("seal_preference_get",J,Q,{},V0(K.options));return}if($==="decision"){if(I==="update"||!I){let q=g(K.options.input),H=q?JSON.parse(ez0(q,"utf8")):U$(K.json);if(!H||Object.keys(H).length===0)throw Error(`Usage: seal-use preference decision update --json '{"explicitApprove":"..."}'`);await F0("seal_preference_decision_update",J,Q,{...H,dryRun:O0(K.options.dryRun)??O0(K.options["dry-run"])},V0(K.options));return}}if($==="thinking-depth"||$==="thinkingDepth"){if(I==="set"){let q=g(K.options.default)??g(K.options.level)??Y;if(q!=="medium"&&q!=="high")throw Error("Usage: seal-use preference thinking-depth set --default <medium|high>");await F0("seal_preference_thinking_depth_set",J,Q,{defaultLevel:q,dryRun:O0(K.options.dryRun)??O0(K.options["dry-run"])},V0(K.options));return}if(I==="policies"){if(U==="list"||!U){await F0("seal_preference_thinking_depth_policies_list",J,Q,{},V0(K.options));return}if(U==="upsert"){let q=g(K.options.input),H=q?JSON.parse(ez0(q,"utf8")):U$(K.json);if(!H||!H.id||!H.name)throw Error(`Usage: seal-use preference thinking-depth policies upsert --json '{"id":"...","name":"...","level":"high"}'`);await F0("seal_preference_thinking_depth_policies_upsert",J,Q,{...H,dryRun:O0(K.options.dryRun)??O0(K.options["dry-run"])},V0(K.options));return}if(U==="remove"||U==="delete"){let q=Y??g(K.options.id)??g(K.options.policyId);if(!q)throw Error("Usage: seal-use preference thinking-depth policies remove <policyId>");await F0("seal_preference_thinking_depth_policies_remove",J,Q,{policyId:q,dryRun:O0(K.options.dryRun)??O0(K.options["dry-run"])},V0(K.options));return}}}throw Error(`Unknown preference action: ${$??""}. Available: get, decision update, thinking-depth set, thinking-depth policies list/upsert/remove.`)}async function IX0($={}){let I=o8(),U=O4(),Y=AJ(I,{stateful:U.stateful,defaultCorpId:U.defaultCorpId,corpId:$.corpId},YI());console.log(`[probe] corp=${Y.id} source=${Y.source.type}`);let J=await gJ(Y);console.log("[probe] seal enterprise"),console.log(JSON.stringify(J,null,2));let Q=await u1(Y),K=await $V(Q,{documentLimit:20,stylePreferencesEndpoint:Y.seal.endpoints.approvalStylePreferences});console.log("[probe] approval context summary"),console.log(JSON.stringify({rules:K.rules.rules.length,hasPendingRuleDeletes:K.rules.hasPendingDeletes,documents:K.documents.articles.length,documentsTotal:K.documents.total,stylePreferences:K.stylePreferences.ok?"ok":`error: ${K.stylePreferences.error}`},null,2))}async function UX0($,I,U){let Y=I??g(U.options.corp)??($&&$!=="--corp"?$:void 0);await IX0({corpId:Y})}async function iu($,I,U,Y,J){if($==="count"){await F0("seal_approval_rules_list",U,Y,{countOnly:!0},V0(J.options));return}if($==="list"){if(O0(J.options.count)){await F0("seal_approval_rules_list",U,Y,{countOnly:!0},V0(J.options));return}let Q=n0(J.options.limit),K=n0(J.options.offset);if(O0(J.options.summary)){await F0("seal_approval_rules_list",U,Y,{fields:Kz0,limit:Q,offset:K},V0(J.options));return}let q=await zI("seal_approval_rules_list",U,Y,{limit:Q,offset:K});qz0(q,O0(J.options.full)===!0),B0(q);return}if($==="clear"){let Q=O0(J.options.yes)===!0,K=O0(J.options.dryRun)??O0(J.options["dry-run"])??!Q;if(!Q&&!K)throw s8("Refusing to clear rules without --yes. Use --dry-run to preview.",`seal-use rules clear --corp ${Y.id} --dry-run`);let q=await zI("seal_approval_rules_clear",U,Y,{dryRun:K,recode:O0(J.options.recode)});if(!Q&&K&&q&&typeof q==="object"){B0({...q,nextCommand:`seal-use rules clear --corp ${Y.id} --yes`},V0(J.options));return}B0(q,V0(J.options));return}if($==="versions"){await F0("seal_approval_rule_versions_list",U,Y,{},V0(J.options));return}if($==="version"){let Q=I??g(J.options.version);if(!Q)throw Error("Usage: seal-use rules version <versionId|versionNumber|l
Line truncated
|
||||
`).filter(Boolean),Q=J.slice(-I);return{logFile:U,lines:Q,totalLines:J.length}}async function oG1($){let I=mD($),U=pu($),Y=BH($);KX0($.stateDir);let J=$.port??(process.env.PORT?Number.parseInt(process.env.PORT,10):iD),Q=$.host??(process.env.HOST?process.env.HOST:bD);cD(I,`${process.pid}
|
||||
`,{mode:384}),cD(U,JSON.stringify({pid:process.pid,port:J,host:Q,version:$.version,startedAt:new Date().toISOString()},null,2),{mode:384}),yJ(Y,`service starting on http://${Q}:${J} pid=${process.pid}`);let K=null;try{K=await nD({port:J,host:Q,silent:!0}),yJ(Y,`service listening pid=${process.pid}`)}catch(H){if(yJ(Y,`service failed to bind port ${J}: ${H instanceof Error?H.message:String(H)}`),dD(I)===process.pid)e8(I,{force:!0}),e8(U,{force:!0});throw H}let q=()=>{if(K)K.close(),K=null;if(dD(I)===process.pid)e8(I,{force:!0}),e8(U,{force:!0});yJ(Y,`stopped pid=${process.pid}`)};await new Promise((H)=>{let G=!1,W=()=>{if(G)return;G=!0,q(),process.off("SIGTERM",W),process.off("SIGINT",W),H()};process.once("SIGTERM",W),process.once("SIGINT",W)})}function YX0($){KX0($.stateDir);let I=hJ($);if(I.running)return I;let U=$.launcher??{command:process.execPath,args:[$.entryFile]},Y=[...U.args??[],"service","run"];if($.port)Y.push("--port",String($.port));if($.host)Y.push("--host",String($.host));let J=cG1(U.command,Y,{cwd:$.appRoot,detached:!0,stdio:["ignore","ignore","ignore"],env:process.env});J.unref();let Q=mD($);return cD(Q,`${J.pid}
|
||||
`,{mode:384}),yJ(BH($),`started pid=${J.pid}`),{started:!0,...hJ($)}}function JX0($,I={}){let U=mD($),Y=pu($),J=dD(U);if(!J||!QX0(J,$.appRoot))return e8(U,{force:!0}),e8(Y,{force:!0}),I.quiet?void 0:{stopped:!1,reason:"not running"};return process.kill(J,"SIGTERM"),e8(U,{force:!0}),e8(Y,{force:!0}),yJ(BH($),`stop requested pid=${J}`),I.quiet?void 0:{stopped:!0,pid:J}}function QX0($,I){if(!rG1($))return!1;try{let U=dG1("ps",["-p",String($),"-o","command="],{encoding:"utf8"});return(U.includes(I)||U.includes("seal-use")||U.includes("src/cli.ts"))&&U.includes("service")&&U.includes("run")}catch{return!1}}function rG1($){try{return process.kill($,0),!0}catch{return!1}}function mD($){return nu($.stateDir,"service.pid")}function pu($){return nu($.stateDir,"service.json")}function BH($){return nu($.stateDir,"service.log")}function dD($){if(!pD($))return;let I=Number(bu($,"utf8").trim());return Number.isInteger(I)&&I>0?I:void 0}function KX0($){mG1($,{recursive:!0,mode:448})}function yJ($,I){cD($,`${new Date().toISOString()} ${I}
|
||||
`,{flag:"a",mode:384})}var cu=aG1(tG1(),".config","seal-use");async function du($,I,U){let Y=U?n0(U.options.port)??n0(U.options.p):void 0,J=U?g(U.options.host)??g(U.options.h):void 0,Q=U?n0(U.options.lines)??n0(U.options.n):void 0,K=await XI($,{appRoot:I.appRoot,entryFile:I.entryFile,stateDir:cu,version:Y1,launcher:I.launcher,port:Y,host:J},{maxLines:Q});if(K!==void 0)B0(K)}import{existsSync as sG1,readFileSync as qX0}from"node:fs";async function HX0($,I,U,Y,J){if($==="batch-records"||$==="records"){let Q=I??g(J.options.batchId)??g(J.options["batch-id"]);if(!Q)throw Error("Usage: seal-use simulation batch-records <batchId>");await F0("seal_simulation_batch_records_get",U,Y,{batchId:Q,query:g(J.options.query)},V0(J.options));return}if($==="create"||$==="run"){let Q=g(J.options.mode)??g(J.options.sourceSystem)??g(J.options["source-system"])??"hosecloud",K=Q==="material-pack"?"material_pack":Q,q=g(J.options.schemaConfig)??g(J.options["schema-config"]),H=q?JSON.parse(qX0(q,"utf8")):void 0,G=g(J.options.input),W=G?JSON.parse(qX0(G,"utf8")):U$(J.json),w=g(J.options.packageId)??g(J.options["package-id"]),Z=V6(J.options.packageIds)??V6(J.options["package-ids"])??(w?[w]:void 0),V=V6(J.options.flowIds)??V6(J.options["flow-ids"])??V6(J.options.documentSn)??V6(J.options["document-sn"]),X=g(J.options.signKey)??g(J.options["sign-key"])??g(J.options.integration),L=O0(J.options.noWait)??O0(J.options["no-wait"]);await F0("seal_simulation_batch_create",U,Y,{mode:K,sourceSystem:K,flowIds:V,documentSn:V,rejectNodeName:g(J.options.rejectNode)??g(J.options["reject-node"])??null,thinkingDepthOverride:g(J.options.thinkingDepth)??g(J.options["thinking-depth"]),skipInvoiceGeneration:O0(J.options.skipInvoiceGeneration)??O0(J.options["skip-invoice-generation"]),skipExpenseExtraction:O0(J.options.skipExpenseExtraction)??O0(J.options["skip-expense-extraction"]),disableAttachmentCache:O0(J.options.disableAttachmentCache)??O0(J.options["disable-attachment-cache"]),signKey:X,packageIds:Z,packageId:w,templateId:g(J.options.templateId)??g(J.options["template-id"]),schemaConfig:H,requestIds:V6(J.options.requestIds)??V6(J.options["request-ids"]),workflowTypeId:g(J.options.workflowTypeId)??g(J.options["workflow-type-id"]),flowStatusList:V6(J.options.flowStatusList)?.map(Number)??V6(J.options["flow-status-list"])?.map(Number),businessCodes:V6(J.options.businessCodes)??V6(J.options["business-codes"]),documentType:g(J.options.documentType)??g(J.options["document-type"]),startTime:n0(J.options.startTime)??n0(J.options["start-time"]),endTime:n0(J.options.endTime)??n0(J.options["end-time"]),status:V6(J.options.status),limit:n0(J.options.limit),noWait:L,rawParams:W},V0(J.options));return}if($==="wait"){let Q=I??g(J.options.batchId)??g(J.options["batch-id"]);if(!Q)throw Error("Usage: seal-use simulation wait <batchId> [--timeout 10m] [--poll-interval 2s]");await F0("seal_simulation_batch_wait",U,Y,{batchId:Q,timeout:g(J.options.timeout),pollInterval:g(J.options.pollInterval)??g(J.options["poll-interval"])},V0(J.options));return}if($==="status"){let Q=I??g(J.options.batchId)??g(J.options["batch-id"]);if(!Q)throw Error("Usage: seal-use simulation status <batchId>");await F0("seal_simulation_batch_status",U,Y,{batchId:Q},V0(J.options));return}if($==="clean"||$==="delete"){let Q=I??g(J.options.batchId)??g(J.options["batch-id"]);if(!Q)throw Error("Usage: seal-use simulation clean <batchId>");await F0("seal_simulation_batch_clean",U,Y,{batchId:Q},V0(J.options));return}if($==="specifications"){let Q=I??g(J.options.integration)??g(J.options.signKey)??g(J.options["sign-key"]);await F0("seal_simulation_specifications_list",U,Y,{signKey:Q},V0(J.options));return}if($==="approval-definitions"||$==="definitions"){await F0("seal_simulation_feishu_approval_definitions_list",U,Y,{},V0(J.options));return}if($==="list"){await F0("seal_simulation_batches_list",U,Y,{limit:n0(J.options.limit)},V0(J.options));return}if($==="get"){let Q=I??g(J.options.batchId)??g(J.options["batch-id"]);if(!Q)throw Error("Usage: seal-use simulation get <batchId>");await F0("seal_simulation_batch_get",U,Y,{batchId:Q},V0(J.options));return}if($==="templates"){await F0("seal_simulation_templates_get",U,Y,{},V0(J.options));return}if($==="integrations"){await F0("seal_simulation_integrations_get",U,Y,{},V0(J.options));return}if($==="package-upload"){let Q=I??g(J.options.file);if(!Q)throw Error("Usage: seal-use simulation package-upload <材料包.zip>");if(!sG1(Q))throw Error(`File not found: ${Q}`);await F0("seal_simulation_material_package_upload",U,Y,{filePath:Q},V0(J.options));return}throw Error(`Unknown simulation command: ${$??""}. Run 'seal-use help' for available commands.`)}import{existsSync as BX0}from"node:fs";import{join as lD}from"node:path";import{existsSync as mu,mkdirSync as NX0,rmSync as WW1,writeFileSync as wW1}from"node:fs";import{homedir as MX0}from"node:os";import{dirname as VW1,join as lu}from"node:path";var GX0=`---
|
||||
name: seal-use
|
||||
description: "v0.10.17: 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:
|
||||
@@ -441,6 +445,16 @@ seal-use corps list
|
||||
- When returning ANY authorization, login, or delegation links (e.g. 合思授权链接, Seal授权链接/委托链接), ALWAYS provide BOTH a code block (\` \`\`\`text ... \`\`\` \`) for easy copying without accidental default browser redirection, AND a clickable hyperlink.
|
||||
- For delegation links, always prefer \`seal-use delegation create\` over \`users delegation\` for link generation to ensure persistent token tracking.
|
||||
- Never treat “Seal 协助/Seal 授权/委托” as a 合思授权入口. They are different links and must use different commands.
|
||||
- For approval run links (\`seal-use approval-runs url <recordId> [--corp <corpId>]\`):
|
||||
- Always default to returning the clean deep link (\`type: 'deep_link'\`), which contains no credentials and requires no sensitive access. Users in their authorized browsers open it directly with zero token leakage risk.
|
||||
- ONLY provide an SSO link (\`--sso\`) when the user explicitly requests an unauthenticated/cross-browser/no-login/免密 link and acknowledges risks.
|
||||
- When returning an \`--sso\` link, the Agent MUST:
|
||||
1. Declare the 4 mandatory security disclosures:
|
||||
- 身份主体(Identity attribution: name and admin status)
|
||||
- 权限范围(Full Seal AI operation permissions under this user)
|
||||
- 时效性(2-hour provisional ticket TTL, 30-day session after opening)
|
||||
- 安全与防扩散边界(No Hose main system access, strictly internal, never share to public/external groups)
|
||||
2. Provide BOTH a code block (\` \`\`\`text ... \`\`\` \`) and a clickable hyperlink.
|
||||
- In the default stateless mode, every enterprise command requires \`--corp <corpId>\`. In stateful mode, omitting \`--corp\` uses the configured default enterprise and is unsafe for an explicitly named enterprise.
|
||||
- For an explicitly named enterprise, first resolve it with \`seal-use corps list\`, then pass its exact \`corpId\` to every command. After creation, verify the returned URL host matches that enterprise's Seal tenant; if the host is the current/default tenant or cannot be verified, do not present the link as the target enterprise's link.
|
||||
- 生产规则变更建议优先遵循“生产改草稿 -> 同步测试企业 -> 真实单据模拟验证 -> 生产发布投产”安全闭环;Agent 应主动提示并建议在测试环境中验证,但最终操作权与决策权在用户手中,绝不代替用户做决定。若用户明确要求直接在生产环境发布,尊重用户意图并严格执行。
|
||||
@@ -718,7 +732,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 ZX0="# Seal Use CLI Reference\n\nRun from any directory after installing the global CLI:\n\n```bash\nseal-use <command>\n```\n\nEnterprise config lookup:\n\n- If `SEAL_USE_ENTERPRISES_DIR` is set, only that directory is loaded.\n- Otherwise the user-level `~/.config/seal-use/enterprises` directory is loaded. A configured\n `testEnterprisesDir` is loaded first for test-tenant workflows. The current working directory's\n `./enterprises` directory is not loaded implicitly.\n- Set `SEAL_USE_ENTERPRISES_DIR` to use one explicit directory instead. Legacy\n `~/.config/seal-home/enterprises` files are migrated to the primary directory when possible.\n\nEnterprise selection is stateless by default. Commands that access an enterprise require\n`--corp <corpId>` unless stateful mode is explicitly enabled:\n\n```bash\nseal-use config mode stateful --corp <corpId>\nseal-use corps switch <corpId>\nseal-use config mode stateless\n```\n\nThe global mode is stored in `~/.config/seal-use/config.json`; set `SEAL_USE_CONFIG_FILE` to\noverride that path. The legacy `current-corp` file is not read.\n\n## Stream & Exit Code Contract\n\n- **`stdout`**: Pure, deterministic JSON for machine/Agent parsing.\n- **`stderr`**: Diagnostics, probing logs, and **Next-Step Command Suggestions** with the stable prefix `👉 Next action: seal-use ...`.\n- **`Exit Code`**: `0` on success; `1` runtime/upstream failure, `2` usage/argument error, `10` explicit destructive-operation confirmation required, `11` missing/invalid authentication, and `12` output protection requiring a compact/file/query alternative.\n\n## Top-Level Commands\n\n```bash\nseal-use version\nseal-use config paths\nseal-use config get\nseal-use config mode <stateful|stateless> [--corp <corpId>]\nseal-use config test-dir [<path>|--clear]\nseal-use config lint <enable|disable|status> [--linter <name>] [--min-score <score>]\nseal-use rules count [--corp <corpId>]\nseal-use rules list [--summary] [--count] [--limit 20] [--offset 0] [--corp <corpId>]\nseal-use rules clear [--corp <corpId>] [--dry-run|--yes]\nseal-use rules versions [--corp <corpId>]\nseal-use rules version <versionId|versionNumber|latest> [--corp <corpId>]\nseal-use rules get --corp <corpId> --version <number|latest> --code '#0038'\nseal-use rules get --corp <corpId> --record-id <recordId> --runtime-id rule-205\nseal-use rules search <keyword> [--version <versionId|versionNumber|latest>] [--maxResults 20] [--corp <corpId>]\nseal-use rules pull [--corp <corpId>] [--version <id|num|latest>] [--out <file>]\nseal-use rules lint [--file <path>] [--corp <corpId>] [--linter <name|path>] [--version <num>] [--code <code>] [--min-score <score>] [--summary]\nseal-use rules push [--file <path>] [--corp <corpId>] [--publish] [--version-name <name>] [--dry-run|--yes]\nseal-use rules map [--corp <corpId>] [--version <id|num|latest>] [--code <code>]\nseal-use service <start|stop|restart|status|logs> [--port 8787] [--host 127.0.0.1] [--lines 50]\nseal-use http [--port 8787] [--host 127.0.0.1]\nseal-use serve [--port 8787]\nseal-use update [--check] [--force] [--version <v>]\nseal-use update check\nseal-use update changelog [--limit <n>]\nseal-use changelog [--limit <n>]\nseal-use mcp\nseal-use mcp config\nseal-use mcp-config\nseal-use skill dump\nseal-use skill install [--dir <path>|--local]\nseal-use skill status\nseal-use openapi\nseal-use probe [<corpId>]\nseal-use tools list\nseal-use corps list [--corp <corpId>]\nseal-use corps current [--corp <corpId>]\nseal-use corps switch <corpId>\nseal-use corps mark <corpId> --env <production|test> [--confirm]\nseal-use corps bind-test <prodCorpId> <testCorpId> [--confirm] [--force]\nseal-use corps unbind-test [<corpId>] [--confirm]\nseal-use corps sync-test [<prodCorpId>] [--dry-run] [--yes] [--version-name <name>]\nseal-use corps add-hose --json '{\"name\":\"企业名称\",\"domain\":\"https://app.ekuaibao.com\",\"appKey\":\"...\",\"appSecurity\":\"...\",\"proxyStaffBizId\":\"corpId:staffId\"}'\nseal-use corps add-seal --json '{\"sealUrl\":\"https://tenant.sealai.cc\",\"token\":\"seal-bearer-token\"}'\nseal-use corps add-link <https://.../web/thirdparty.html?...> [--name <customName>] [--overwrite]\nseal-use auth diagnose [--corp <corpId>]\nseal-use auth hose-link [--corp <corpId>] [--expire 7200]\nseal-use delegation list [--corp <corpId>]\nseal-use delegation create [--note <note>] [--from-link <url>] [--corp <corpId>]\nseal-use delegation revoke <tokenId> [--corp <corpId>]\nseal-use users create --name <name> --phone <phone> [--dept <deptId>] [--corp <corpId>]\nseal-use users search <keyword> [--corp <corpId>]\nseal-use users delegation <userIdOrPhone|name> [--note <note>] [--corp <corpId>]\nseal-use users activate <userId> [--corp <corpId>]\nseal-use users reset-password <userId> [--corp <corpId>]\nseal-use users get <userId> [--corp <corpId>]\nseal-use users delete <userId> [--corp <corpId>]\nseal-use contacts departments [<departmentId>] [--corp <corpId>]\nseal-use contLine truncated
|
||||
`;var ZX0="# Seal Use CLI Reference\n\nRun from any directory after installing the global CLI:\n\n```bash\nseal-use <command>\n```\n\nEnterprise config lookup:\n\n- If `SEAL_USE_ENTERPRISES_DIR` is set, only that directory is loaded.\n- Otherwise the user-level `~/.config/seal-use/enterprises` directory is loaded. A configured\n `testEnterprisesDir` is loaded first for test-tenant workflows. The current working directory's\n `./enterprises` directory is not loaded implicitly.\n- Set `SEAL_USE_ENTERPRISES_DIR` to use one explicit directory instead. Legacy\n `~/.config/seal-home/enterprises` files are migrated to the primary directory when possible.\n\nEnterprise selection is stateless by default. Commands that access an enterprise require\n`--corp <corpId>` unless stateful mode is explicitly enabled:\n\n```bash\nseal-use config mode stateful --corp <corpId>\nseal-use corps switch <corpId>\nseal-use config mode stateless\n```\n\nThe global mode is stored in `~/.config/seal-use/config.json`; set `SEAL_USE_CONFIG_FILE` to\noverride that path. The legacy `current-corp` file is not read.\n\n## Stream & Exit Code Contract\n\n- **`stdout`**: Pure, deterministic JSON for machine/Agent parsing.\n- **`stderr`**: Diagnostics, probing logs, and **Next-Step Command Suggestions** with the stable prefix `👉 Next action: seal-use ...`.\n- **`Exit Code`**: `0` on success; `1` runtime/upstream failure, `2` usage/argument error, `10` explicit destructive-operation confirmation required, `11` missing/invalid authentication, and `12` output protection requiring a compact/file/query alternative.\n\n## Top-Level Commands\n\n```bash\nseal-use version\nseal-use config paths\nseal-use config get\nseal-use config mode <stateful|stateless> [--corp <corpId>]\nseal-use config test-dir [<path>|--clear]\nseal-use config lint <enable|disable|status> [--linter <name>] [--min-score <score>]\nseal-use rules count [--corp <corpId>]\nseal-use rules list [--summary] [--count] [--limit 20] [--offset 0] [--corp <corpId>]\nseal-use rules clear [--corp <corpId>] [--dry-run|--yes]\nseal-use rules versions [--corp <corpId>]\nseal-use rules version <versionId|versionNumber|latest> [--corp <corpId>]\nseal-use rules get --corp <corpId> --version <number|latest> --code '#0038'\nseal-use rules get --corp <corpId> --record-id <recordId> --runtime-id rule-205\nseal-use rules search <keyword> [--version <versionId|versionNumber|latest>] [--maxResults 20] [--corp <corpId>]\nseal-use rules pull [--corp <corpId>] [--version <id|num|latest>] [--out <file>]\nseal-use rules lint [--file <path>] [--corp <corpId>] [--linter <name|path>] [--version <num>] [--code <code>] [--min-score <score>] [--summary]\nseal-use rules push [--file <path>] [--corp <corpId>] [--publish] [--version-name <name>] [--dry-run|--yes]\nseal-use rules map [--corp <corpId>] [--version <id|num|latest>] [--code <code>]\nseal-use service <start|stop|restart|status|logs> [--port 8787] [--host 127.0.0.1] [--lines 50]\nseal-use http [--port 8787] [--host 127.0.0.1]\nseal-use serve [--port 8787]\nseal-use update [--check] [--force] [--version <v>]\nseal-use update check\nseal-use update changelog [--limit <n>]\nseal-use changelog [--limit <n>]\nseal-use mcp\nseal-use mcp config\nseal-use mcp-config\nseal-use skill dump\nseal-use skill install [--dir <path>|--local]\nseal-use skill status\nseal-use openapi\nseal-use probe [<corpId>]\nseal-use tools list\nseal-use corps list [--corp <corpId>]\nseal-use corps current [--corp <corpId>]\nseal-use corps switch <corpId>\nseal-use corps mark <corpId> --env <production|test> [--confirm]\nseal-use corps bind-test <prodCorpId> <testCorpId> [--confirm] [--force]\nseal-use corps unbind-test [<corpId>] [--confirm]\nseal-use corps sync-test [<prodCorpId>] [--dry-run] [--yes] [--version-name <name>]\nseal-use corps add-hose --json '{\"name\":\"企业名称\",\"domain\":\"https://app.ekuaibao.com\",\"appKey\":\"...\",\"appSecurity\":\"...\",\"proxyStaffBizId\":\"corpId:staffId\"}'\nseal-use corps add-seal --json '{\"sealUrl\":\"https://tenant.sealai.cc\",\"token\":\"seal-bearer-token\"}'\nseal-use corps add-link <https://.../web/thirdparty.html?...> [--name <customName>] [--overwrite]\nseal-use auth diagnose [--corp <corpId>]\nseal-use auth hose-link [--corp <corpId>] [--expire 7200]\nseal-use delegation list [--corp <corpId>]\nseal-use delegation create [--note <note>] [--from-link <url>] [--corp <corpId>]\nseal-use delegation revoke <tokenId> [--corp <corpId>]\nseal-use users create --name <name> --phone <phone> [--dept <deptId>] [--corp <corpId>]\nseal-use users search <keyword> [--corp <corpId>]\nseal-use users delegation <userIdOrPhone|name> [--note <note>] [--corp <corpId>]\nseal-use users activate <userId> [--corp <corpId>]\nseal-use users reset-password <userId> [--corp <corpId>]\nseal-use users get <userId> [--corp <corpId>]\nseal-use users delete <userId> [--corp <corpId>]\nseal-use contacts departments [<departmentId>] [--corp <corpId>]\nseal-use contLine 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.
|
||||
|
||||
@@ -1276,12 +1290,12 @@ seal-use corps hose-staffs --json '{
|
||||
}'
|
||||
\`\`\`
|
||||
* 直接使用指定 ID 完成接入并进行连通性验证。
|
||||
`;var AX0={"SKILL.md":GX0,"agents/openai.yaml":WX0,"references/rule-lightweight.md":wX0,"references/approval-bad-cases.md":VX0,"references/cli.md":ZX0,"references/approval-run-lightweight.md":zX0,"references/approval-attachment-trace.md":XX0,"references/customer-feedback-rule-remediation.md":LX0,"references/enterprise-onboarding.md":DX0,"references/hose-enterprise-auth.md":OX0,"references/hose-enterprise-init.md":FX0};function PX0(){return AX0["SKILL.md"]||""}function vH(){return du(MX0(),".agents","skills","seal-use")}function TX0(){return du(MX0(),".agents","skills","seal-home")}function EX0(){let $=TX0();if(cu($))try{return GW1($,{recursive:!0,force:!0}),!0}catch{return!1}return!1}function mu($=vH()){EX0(),NX0($,{recursive:!0});let I=[];for(let[U,Y]of Object.entries(AX0)){let J=du($,U);NX0(wW1(J),{recursive:!0}),WW1(J,Y,"utf8"),I.push(U)}return{targetDir:$,files:I}}function lu(){let $=TX0(),I=vH(),U=cu($),Y=cu(I);if(U||Y)return EX0(),mu(I),{synced:!0,targetDir:I};return{synced:!1}}function vX0($,I,U){if($==="dump"||$==="cat"||$==="show"){process.stdout.write(`${PX0()}
|
||||
`);return}if($==="install"||$==="init"||$==="sync"){let Y=O0(U.options.local)||O0(U.options.workspace),J=g(U.options.dir)??g(U.options.target)??I,Q=J?J:Y?mD(process.cwd(),".agents","skills","seal-use"):vH(),K=mu(Q);B0({installed:!0,targetDir:K.targetDir,fileCount:K.files.length,files:K.files});return}if($==="status"||$==="get"||!$){let Y=vH(),J=mD(process.cwd(),".agents","skills","seal-use");B0({global:{dir:Y,installed:BX0(mD(Y,"SKILL.md"))},local:{dir:J,installed:BX0(mD(J,"SKILL.md"))}});return}throw Error(`Unknown skill command: ${$}. Run 'seal-use help' for available commands.`)}async function RX0($,I){if($==="config"){B0(await _J(I));return}throw Error(`Unknown source command: ${$??""}. Run 'seal-use help' for available commands.`)}async function jX0($,I,U,Y){if(!$)throw Error("Usage: seal-use tool <toolName> [--json '{...}']");await F0($,I,U,U$(Y.json),V0(Y.options))}function CX0(){B0(OH.map(($)=>({name:$.name,description:$.description})))}import{chmodSync as VW1,mkdirSync as ZW1,renameSync as ou,rmSync as zW1,unlinkSync as hX0,writeFileSync as _X0}from"node:fs";import{dirname as XW1,join as SX0}from"node:path";import{spawnSync as LI}from"node:child_process";function lD($=process.execPath,I=import.meta.url){if(I.includes("/$bunfs/")||I.includes("\\$bunfs\\"))return!0;let U=$.toLowerCase().replace(/\\/g,"/");return!U.endsWith("/bun")&&!U.endsWith("/bun.exe")&&!U.endsWith("/node")&&!U.endsWith("/node.exe")}var uX0="yunyingk/seal-use",jH="yunyingk/seal-home";var LW1="SEAL_USE_GITHUB_REPO",DW1="SEAL_HOME_GITHUB_REPO";async function xX0($,I={}){let U={appRoot:$.appRoot,entryFile:$.entryFile,stateDir:nu,version:Y1,launcher:$.launcher},Y=I.repo||process.env[LW1]?.trim()||process.env[DW1]?.trim()||uX0,J=I.targetVersion?.trim(),Q=J&&J.toLowerCase()!=="latest"?J:void 0;if(Q){let A=Q.replace(/^v/,""),R=kX0(A,Y1);if(R<0)if(!kE&&I.force);else{B0({updated:!1,currentVersion:Y1,targetVersion:A,mode:lD()?"binary":"source",message:!kE?`Cannot downgrade seal-use from dev build v${Y1} to release v${A}. Use --force to overwrite.`:`Cannot downgrade seal-use from v${Y1} to older version v${A}. Updates must be forward-only.`});return}if(R===0&&!I.force){B0({updated:!1,currentVersion:Y1,targetVersion:A,mode:lD()?"binary":"source",message:`seal-use is already at version v${Y1}. Use --force to reinstall.`});return}}if(I.changelogOnly){let A=await ru(Y,I.limit??10);B0({currentVersion:Y1,totalQueried:A.length,releases:A.map((R)=>({version:R.version,tagName:R.tagName,publishedAt:R.publishedAt,author:R.author,releaseNotes:R.notes,releaseUrl:R.htmlUrl,isCurrent:R.version===Y1,isNewer:RH(R.version,Y1)}))});return}if(!lD()){if(I.checkOnly){let R=await ru(Y,30),k=R[0],y=k?.version??Y1,f=R.find((n)=>n.version===Y1),j=RH(y,Y1),p=R.filter((n)=>RH(n.version,Y1));B0({updated:!1,updateAvailable:j,currentVersion:Y1,currentVersionPublishedAt:f?.publishedAt,latestVersion:y,latestVersionPublishedAt:k?.publishedAt,behindCount:p.length,pendingReleases:p.map((n)=>({version:n.version,tagName:n.tagName,publishedAt:n.publishedAt,author:n.author,releaseNotes:n.notes,releaseUrl:n.htmlUrl})),releaseNotes:k?.notes??"",releaseUrl:k?.htmlUrl??"",mode:"source",message:"Running in source development mode. Run 'seal-use update' to git pull & bun install."});return}let A=gJ(U).running;if(A)await XI("stop",U);try{yX0("git",["-C",$.appRoot,"pull","--ff-only"])}catch(R){console.error(`git pull skipped: ${R instanceof Error?R.message:String(R)}`)}if(yX0("bun",["install"],{cwd:$.appRoot}),A)await XI("start",U);B0({updated:!0,serviceRestarted:A,version:Y1,mode:"source"});return}let K=OW1(),q=FW1(),H=await ru(Y,30),G=Q?H.find((A)=>A.version===Q||A.tagName===Q||A.tagName===`v${Q}`)??await gX0(Y,Q):H[0]??await gX0(Y);if(!G){B0({updated:!1,currentVersion:Y1,mode:"binary",message:`Failed to query releases from repository '${Y}'`});return}let W=G.version,w=H.find((A)=>A.version===Y1),Z=RH(W,Y1),V=Z||Boolean(I.force),X=H.filter((A)=>RH(A.version,Y1));if(I.checkOnly){B0({updated:!1,updateAvailable:Z,currentVersion:Y1,currentVersionPublishedAt:w?.publishedAt,latestVersion:W,latestVersionPublishedAt:G.publishedAt,behindCount:X.length,pendingReleases:X.map((A)=>({version:A.version,tagName:A.tagName,publishedAt:A.publishedAt,author:A.author,releaseNotes:A.notes,releaseUrl:A.htmlUrl})),releaseNotes:G.notes,releaseUrl:G.htmlUrl,mode:"binary"});return}if(!V){B0({updated:!1,currentVersion:Y1,currentVersionPublishedAt:w?.publishedAt,latestVersion:W,latestVersionPublishedAt:G.publishedAt,mode:"binary",message:`seal-use is already up to date (v${Y1})`});return}let L=NW1(G.assets,K,q);if(!L)throw Error(`No compatible binary found for ${K}-${q} in release v${W}. Available assets: ${G.assets.map((A)=>A.name).join(", ")}`);let D=gJ(U).running;if(D)await XI("stop",U);let F=process.execPath,P=XW1(F),E=SX0(P,`.tmp-update-${Date.now()}`);ZW1(E,{recursive:!0});try{let A=SX0(E,L.name);await MW1(L.downloadUrl,A,G.tagName,L.name);let R=A;if(L.name.endsWith(".tar.gz")||L.name.endsWith(".tgz"))R=AW1
Line truncated
|
||||
`)}catch{}}async function MW1($,I,U,Y){let J=tu(),Q=[],K=U?U.startsWith("v")?U:`v${U}`:void 0,q=Y||$.split("/").pop()||"";if(J!=="github"){if(K&&q)Q.push(`https://git.ying-qing.cn/gitea/seal-use/releases/download/${K}/${q}`,`https://git.ying-qing.cn/gitea/seal-home/releases/download/${K}/${q}`);if($.startsWith("https://git.ying-qing.cn"))Q.push($)}if(J!=="gitea")if(K&&q){let L=`https://github.com/${uX0}/releases/download/${K}/${q}`;if(!process.env.CI)Q.push(`https://ghfast.top/${L}`,`https://gh.ddlc.top/${L}`);Q.push(L)}else if($.includes("github.com")){if(!process.env.CI)Q.push(`https://ghfast.top/${$}`,`https://gh.ddlc.top/${$}`);Q.push($)}else Q.push($);let H=Array.from(new Set(Q)),G,W=6000,w=6000,Z=307200,V=1e4,X=180000;for(let L=0;L<H.length;L++){let D=H[L],F=new AbortController,P="",E=(y)=>{P=y;try{F.abort()}catch{}},A=setTimeout(()=>{E("Connection timed out (no response headers within 6s)")},W),R,k;try{oD(`==> [${L+1}/${H.length}] Downloading via: ${D}`);let y=await fetch(D,{signal:F.signal});if(A)clearTimeout(A),A=void 0;if(!y.ok)throw Error(`HTTP ${y.status} ${y.statusText}`);R=setTimeout(()=>{E("Overall download time exceeded 3 minutes")},X);let f=Number(y.headers.get("content-length"))||0,j=y.body?.getReader();if(!j){let i=Buffer.from(await y.arrayBuffer());if(i.length<1000)throw Error(`Downloaded content is suspiciously small (${i.length} bytes)`);_X0(I,i),oD(`✓ Download succeeded (${(i.length/1024/1024).toFixed(1)} MB)`);return}let p=[],n=0,S=0;k=setTimeout(()=>{if(n<Z){let i=(n/1024).toFixed(1);E(`Initial transfer too slow (${i} KB < 300 KB in 6s), switching mirror...`)}},w);while(!0){let i=j.read(),U0,B=new Promise((J0,w0)=>{U0=setTimeout(()=>{w0(Error("Data transfer stalled (no chunk received for 10s)"))},V)}),x;try{x=await Promise.race([i,B])}finally{if(U0)clearTimeout(U0)}let{done:c,value:r}=x;if(c)break;if(r){if(p.push(r),n+=r.length,k&&n>=Z)clearTimeout(k),k=void 0;let J0=Date.now();if(J0-S>200){S=J0;let w0=f?Math.round(n/f*100):0,A0=(n/1048576).toFixed(1),j0=f?(f/1048576).toFixed(1):"?";try{process.stderr.write(`\r ↳ Progress: ${w0}% (${A0} / ${j0} MB)...`)}catch{}}}}try{process.stderr.write(`
|
||||
`)}catch{}let b=Buffer.concat(p);if(b.length<1000)throw Error(`Downloaded content is suspiciously small (${b.length} bytes)`);_X0(I,b),oD(`✓ Download completed successfully (${(b.length/1024/1024).toFixed(1)} MB)`);return}catch(y){if(A)clearTimeout(A);if(k)clearTimeout(k);if(R)clearTimeout(R);let f=P||(y instanceof Error?y.message:String(y));G=Error(f),oD(`
|
||||
↳ Mirror failed: ${G.message}`)}finally{if(A)clearTimeout(A);if(k)clearTimeout(k);if(R)clearTimeout(R)}}throw Error(`Failed to download asset from all mirrors: ${G?.message}`)}function AW1($,I,U){let Y=LI("tar",["-xzf",$,"-C",I],{stdio:"pipe"});if(Y.status!==0)throw Error(`Failed to extract tar archive: ${Y.stderr.toString()}`);hX0($);let J=U==="windows"?"seal-use.exe":"seal-use",Q=LI("find",[I,"-type","f"],{encoding:"utf8"}).stdout.trim().split(`
|
||||
`).filter(Boolean),K=Q.find((q)=>q.endsWith(`/${J}`)||q.endsWith(J));if(K)return K;return Q[0]||$}function PW1($,I,U){let Y=LI("unzip",["-q","-o",$,"-d",I],{stdio:"pipe"});if(Y.status!==0)throw Error(`Failed to extract zip archive: ${Y.stderr.toString()}`);hX0($);let J=U==="windows"?"seal-use.exe":"seal-use",Q=LI("find",[I,"-type","f"],{encoding:"utf8"}).stdout.trim().split(`
|
||||
`).filter(Boolean),K=Q.find((q)=>q.endsWith(`/${J}`)||q.endsWith(J));if(K)return K;return Q[0]||$}function kX0($,I){let U=$.replace(/^v/,"").split(".").map((J)=>Number.parseInt(J,10)||0),Y=I.replace(/^v/,"").split(".").map((J)=>Number.parseInt(J,10)||0);for(let J=0;J<Math.max(U.length,Y.length);J++){let Q=U[J]??0,K=Y[J]??0;if(Q>K)return 1;if(Q<K)return-1}return 0}function RH($,I){return kX0($,I)>0}function yX0($,I,U={}){let Y=LI($,I,{cwd:U.cwd,encoding:"utf8",stdio:["ignore","pipe","pipe"]});if(Y.stdout)console.error(Y.stdout.trimEnd());if(Y.stderr)console.error(Y.stderr.trimEnd());if(Y.status!==0)throw Error(`${$} ${I.join(" ")} failed with status ${Y.status}`)}async function fX0($,I,U,Y,J){if($==="create"){let Q=g(J.options.name)??I,K=g(J.options.phone);if(!Q||!K)throw Error("Usage: seal-use users create --name <name> --phone <phone> [--dept <deptId>]");let q=g(J.options.dept)??g(J.options.departmentId);await F0("seal_user_create",U,Y,{name:Q,phone:K,departmentIds:q?[q]:void 0},V0(J.options));return}if($==="reset-password"){let Q=I??g(J.options.userId);if(!Q)throw Error("Usage: seal-use users reset-password <userId>");await F0("seal_user_reset_password",U,Y,{userId:Q},V0(J.options));return}if($==="search"||$==="list"){let Q=I??g(J.options.keyword)??g(J.options.query)??"";await F0("seal_user_search",U,Y,{keyword:Q},V0(J.options));return}if($==="get"){let Q=I??g(J.options.userId);if(!Q)throw Error("Usage: seal-use users get <userId>");await F0("seal_user_get",U,Y,{userId:Q},V0(J.options));return}if($==="delete"){let Q=I??g(J.options.userId);if(!Q)throw Error("Usage: seal-use users delete <userId>");await F0("seal_user_delete",U,Y,{userId:Q},V0(J.options));return}if($==="activate"){let Q=I??g(J.options.userId);if(!Q)throw Error("Usage: seal-use users activate <userId>");await F0("seal_user_activate",U,Y,{userId:Q},V0(J.options));return}if($==="delegation"||$==="impersonate"){let Q=I??g(J.options.userId)??g(J.options.phone);if(!Q)throw Error("Usage: seal-use users delegation <userIdOrPhone> [--note <note>]");let K=g(J.options.note);await F0("seal_user_delegation_create",U,Y,{userIdOrPhone:Q,note:K},V0(J.options));return}throw Error(`Unknown users command: ${$??""}. Run 'seal-use help' for available commands.`)}var bX0=au(au(au(EW1(import.meta.url)))),BW1=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","changelog"]),vW1=new Set(["http","server","web","mcp"]);function RW1($){if(!$.length)return!1;let I=$[0]?.toLowerCase(),U=$[1]?.toLowerCase();if(I&&vW1.has(I))return!0;if((I==="service"||I==="daemon")&&U==="run")return!0;return!1}var iX0=Promise.resolve();function EH($,I={}){if(RW1($))return nX0($,I);let U=iX0.then(()=>nX0($,I));return iX0=U.then(()=>{return},()=>{return}),U}async function nX0($,I){let U=[],Y=[],J=console.log,Q=console.error,K={appRoot:I.appRoot??bX0,entryFile:I.entryFile??TW1(I.appRoot??bX0,"src","cli.ts"),launcher:I.launcher};console.log=(...q)=>{U.push(gu(q))},console.error=(...q)=>{Y.push(gu(q))};try{return await jW1($,K),{stdout:AH(U),stderr:AH(Y),isError:!1,exitCode:0}}catch(q){let H=PH(q instanceof Error?q.message:String(q)),G=_D(q);if(Y.push(H),G.nextAction&&!H.includes("Next action:"))Y.push(`\uD83D\uDC49 Next action: ${G.nextAction}`);return{stdout:AH(U),stderr:AH(Y),isError:!0,exitCode:G.exitCode}}finally{console.log=J,console.error=Q}}async function jW1($,I){let U=tZ0($),[Y,J,Q]=U.command;if(Y==="version"||Y==="v"||Boolean(U.options.version)||Boolean(U.options.v)||Boolean(U.options.V)){B0(O2);return}let K=Jz0(U);if(K.isHelp){Hz0(K.target);return}if(!Y||!BW1.has(Y))throw Error(`Unknown command: ${U.command.join(" ")}. Run 'seal-use help' for available commands.`);if(Y==="webhook"&&J==="material-pack"&&Q==="preview"){let G=U.command[3]??g(U.options.file)??g(U.options.input);if(!G)throw Error("Usage: seal-use webhook material-pack preview <材料包.zip>");await zz0(G,MH(U.options));return}if(Y==="openapi"){az0(U);return}if(Y==="mcp-config"){uu();return}if(Y==="skill"){vX0(J,Q,U);return}if(Y==="mcp"||Y==="server"){await tz0(J,U);return}if(Y==="probe"){await UX0(J,Q,U);return}if(Y==="config"){Pz0(J,Q,U);return}if(Y==="service"){await pu(J,I,U);return}if(Y==="stop"){await pu("stop",I,U);return}if(Y==="http"||Y==="serve"){await oz0(U);return}if(Y==="update"||Y==="changelog"){let G=Y==="changelog"||J==="changelog"||J==="log"||J==="history"||O0(U.options.changelog)===!0,W=J==="check"||O0(U.options.check)===!0||O0(U.options["check-only"])===!0,w=g(U.options.version)??g(U.options.tag)??(!G&&!W&&J&&!J.startsWith("-")?J:void 0);await xX0(I,{checkOnly:W,changelogOnly:G,limit:m0(U.options.limit),force:O0(U.options.force),targetVersion:w,repo:g(U.options.repo)});return}if(Y==="tools"&&J==="list"){CX0();ret
Line truncated
|
||||
`;var AX0={"SKILL.md":GX0,"agents/openai.yaml":WX0,"references/rule-lightweight.md":wX0,"references/approval-bad-cases.md":VX0,"references/cli.md":ZX0,"references/approval-run-lightweight.md":zX0,"references/approval-attachment-trace.md":XX0,"references/customer-feedback-rule-remediation.md":LX0,"references/enterprise-onboarding.md":DX0,"references/hose-enterprise-auth.md":OX0,"references/hose-enterprise-init.md":FX0};function PX0(){return AX0["SKILL.md"]||""}function vH(){return lu(MX0(),".agents","skills","seal-use")}function TX0(){return lu(MX0(),".agents","skills","seal-home")}function EX0(){let $=TX0();if(mu($))try{return WW1($,{recursive:!0,force:!0}),!0}catch{return!1}return!1}function ou($=vH()){EX0(),NX0($,{recursive:!0});let I=[];for(let[U,Y]of Object.entries(AX0)){let J=lu($,U);NX0(VW1(J),{recursive:!0}),wW1(J,Y,"utf8"),I.push(U)}return{targetDir:$,files:I}}function ru(){let $=TX0(),I=vH(),U=mu($),Y=mu(I);if(U||Y)return EX0(),ou(I),{synced:!0,targetDir:I};return{synced:!1}}function vX0($,I,U){if($==="dump"||$==="cat"||$==="show"){process.stdout.write(`${PX0()}
|
||||
`);return}if($==="install"||$==="init"||$==="sync"){let Y=O0(U.options.local)||O0(U.options.workspace),J=g(U.options.dir)??g(U.options.target)??I,Q=J?J:Y?lD(process.cwd(),".agents","skills","seal-use"):vH(),K=ou(Q);B0({installed:!0,targetDir:K.targetDir,fileCount:K.files.length,files:K.files});return}if($==="status"||$==="get"||!$){let Y=vH(),J=lD(process.cwd(),".agents","skills","seal-use");B0({global:{dir:Y,installed:BX0(lD(Y,"SKILL.md"))},local:{dir:J,installed:BX0(lD(J,"SKILL.md"))}});return}throw Error(`Unknown skill command: ${$}. Run 'seal-use help' for available commands.`)}async function RX0($,I){if($==="config"){B0(await gJ(I));return}throw Error(`Unknown source command: ${$??""}. Run 'seal-use help' for available commands.`)}async function jX0($,I,U,Y){if(!$)throw Error("Usage: seal-use tool <toolName> [--json '{...}']");await F0($,I,U,U$(Y.json),V0(Y.options))}function CX0(){B0(OH.map(($)=>({name:$.name,description:$.description})))}import{chmodSync as ZW1,mkdirSync as zW1,renameSync as tu,rmSync as XW1,unlinkSync as hX0,writeFileSync as _X0}from"node:fs";import{dirname as LW1,join as SX0}from"node:path";import{spawnSync as LI}from"node:child_process";function oD($=process.execPath,I=import.meta.url){if(I.includes("/$bunfs/")||I.includes("\\$bunfs\\"))return!0;let U=$.toLowerCase().replace(/\\/g,"/");return!U.endsWith("/bun")&&!U.endsWith("/bun.exe")&&!U.endsWith("/node")&&!U.endsWith("/node.exe")}var uX0="yunyingk/seal-use",jH="yunyingk/seal-home";var DW1="SEAL_USE_GITHUB_REPO",OW1="SEAL_HOME_GITHUB_REPO";async function kX0($,I={}){let U={appRoot:$.appRoot,entryFile:$.entryFile,stateDir:cu,version:Y1,launcher:$.launcher},Y=I.repo||process.env[DW1]?.trim()||process.env[OW1]?.trim()||uX0,J=I.targetVersion?.trim(),Q=J&&J.toLowerCase()!=="latest"?J:void 0;if(Q){let A=Q.replace(/^v/,""),R=xX0(A,Y1);if(R<0)if(!iE&&I.force);else{B0({updated:!1,currentVersion:Y1,targetVersion:A,mode:oD()?"binary":"source",message:!iE?`Cannot downgrade seal-use from dev build v${Y1} to release v${A}. Use --force to overwrite.`:`Cannot downgrade seal-use from v${Y1} to older version v${A}. Updates must be forward-only.`});return}if(R===0&&!I.force){B0({updated:!1,currentVersion:Y1,targetVersion:A,mode:oD()?"binary":"source",message:`seal-use is already at version v${Y1}. Use --force to reinstall.`});return}}if(I.changelogOnly){let A=await au(Y,I.limit??10);B0({currentVersion:Y1,totalQueried:A.length,releases:A.map((R)=>({version:R.version,tagName:R.tagName,publishedAt:R.publishedAt,author:R.author,releaseNotes:R.notes,releaseUrl:R.htmlUrl,isCurrent:R.version===Y1,isNewer:RH(R.version,Y1)}))});return}if(!oD()){if(I.checkOnly){let R=await au(Y,30),x=R[0],y=x?.version??Y1,f=R.find((n)=>n.version===Y1),j=RH(y,Y1),p=R.filter((n)=>RH(n.version,Y1));B0({updated:!1,updateAvailable:j,currentVersion:Y1,currentVersionPublishedAt:f?.publishedAt,latestVersion:y,latestVersionPublishedAt:x?.publishedAt,behindCount:p.length,pendingReleases:p.map((n)=>({version:n.version,tagName:n.tagName,publishedAt:n.publishedAt,author:n.author,releaseNotes:n.notes,releaseUrl:n.htmlUrl})),releaseNotes:x?.notes??"",releaseUrl:x?.htmlUrl??"",mode:"source",message:"Running in source development mode. Run 'seal-use update' to git pull & bun install."});return}let A=hJ(U).running;if(A)await XI("stop",U);try{yX0("git",["-C",$.appRoot,"pull","--ff-only"])}catch(R){console.error(`git pull skipped: ${R instanceof Error?R.message:String(R)}`)}if(yX0("bun",["install"],{cwd:$.appRoot}),A)await XI("start",U);B0({updated:!0,serviceRestarted:A,version:Y1,mode:"source"});return}let K=FW1(),q=NW1(),H=await au(Y,30),G=Q?H.find((A)=>A.version===Q||A.tagName===Q||A.tagName===`v${Q}`)??await gX0(Y,Q):H[0]??await gX0(Y);if(!G){B0({updated:!1,currentVersion:Y1,mode:"binary",message:`Failed to query releases from repository '${Y}'`});return}let W=G.version,w=H.find((A)=>A.version===Y1),Z=RH(W,Y1),V=Z||Boolean(I.force),X=H.filter((A)=>RH(A.version,Y1));if(I.checkOnly){B0({updated:!1,updateAvailable:Z,currentVersion:Y1,currentVersionPublishedAt:w?.publishedAt,latestVersion:W,latestVersionPublishedAt:G.publishedAt,behindCount:X.length,pendingReleases:X.map((A)=>({version:A.version,tagName:A.tagName,publishedAt:A.publishedAt,author:A.author,releaseNotes:A.notes,releaseUrl:A.htmlUrl})),releaseNotes:G.notes,releaseUrl:G.htmlUrl,mode:"binary"});return}if(!V){B0({updated:!1,currentVersion:Y1,currentVersionPublishedAt:w?.publishedAt,latestVersion:W,latestVersionPublishedAt:G.publishedAt,mode:"binary",message:`seal-use is already up to date (v${Y1})`});return}let L=MW1(G.assets,K,q);if(!L)throw Error(`No compatible binary found for ${K}-${q} in release v${W}. Available assets: ${G.assets.map((A)=>A.name).join(", ")}`);let D=hJ(U).running;if(D)await XI("stop",U);let F=process.execPath,P=LW1(F),T=SX0(P,`.tmp-update-${Date.now()}`);zW1(T,{recursive:!0});try{let A=SX0(T,L.name);await AW1(L.downloadUrl,A,G.tagName,L.name);let R=A;if(L.name.endsWith(".tar.gz")||L.name.endsWith(".tgz"))R=PW1
Line truncated
|
||||
`)}catch{}}async function AW1($,I,U,Y){let J=su(),Q=[],K=U?U.startsWith("v")?U:`v${U}`:void 0,q=Y||$.split("/").pop()||"";if(J!=="github"){if(K&&q)Q.push(`https://git.ying-qing.cn/gitea/seal-use/releases/download/${K}/${q}`,`https://git.ying-qing.cn/gitea/seal-home/releases/download/${K}/${q}`);if($.startsWith("https://git.ying-qing.cn"))Q.push($)}if(J!=="gitea")if(K&&q){let L=`https://github.com/${uX0}/releases/download/${K}/${q}`;if(!process.env.CI)Q.push(`https://ghfast.top/${L}`,`https://gh.ddlc.top/${L}`);Q.push(L)}else if($.includes("github.com")){if(!process.env.CI)Q.push(`https://ghfast.top/${$}`,`https://gh.ddlc.top/${$}`);Q.push($)}else Q.push($);let H=Array.from(new Set(Q)),G,W=6000,w=6000,Z=307200,V=1e4,X=180000;for(let L=0;L<H.length;L++){let D=H[L],F=new AbortController,P="",T=(y)=>{P=y;try{F.abort()}catch{}},A=setTimeout(()=>{T("Connection timed out (no response headers within 6s)")},W),R,x;try{rD(`==> [${L+1}/${H.length}] Downloading via: ${D}`);let y=await fetch(D,{signal:F.signal});if(A)clearTimeout(A),A=void 0;if(!y.ok)throw Error(`HTTP ${y.status} ${y.statusText}`);R=setTimeout(()=>{T("Overall download time exceeded 3 minutes")},X);let f=Number(y.headers.get("content-length"))||0,j=y.body?.getReader();if(!j){let b=Buffer.from(await y.arrayBuffer());if(b.length<1000)throw Error(`Downloaded content is suspiciously small (${b.length} bytes)`);_X0(I,b),rD(`✓ Download succeeded (${(b.length/1024/1024).toFixed(1)} MB)`);return}let p=[],n=0,S=0;x=setTimeout(()=>{if(n<Z){let b=(n/1024).toFixed(1);T(`Initial transfer too slow (${b} KB < 300 KB in 6s), switching mirror...`)}},w);while(!0){let b=j.read(),U0,B=new Promise((J0,w0)=>{U0=setTimeout(()=>{w0(Error("Data transfer stalled (no chunk received for 10s)"))},V)}),k;try{k=await Promise.race([b,B])}finally{if(U0)clearTimeout(U0)}let{done:c,value:r}=k;if(c)break;if(r){if(p.push(r),n+=r.length,x&&n>=Z)clearTimeout(x),x=void 0;let J0=Date.now();if(J0-S>200){S=J0;let w0=f?Math.round(n/f*100):0,A0=(n/1048576).toFixed(1),j0=f?(f/1048576).toFixed(1):"?";try{process.stderr.write(`\r ↳ Progress: ${w0}% (${A0} / ${j0} MB)...`)}catch{}}}}try{process.stderr.write(`
|
||||
`)}catch{}let i=Buffer.concat(p);if(i.length<1000)throw Error(`Downloaded content is suspiciously small (${i.length} bytes)`);_X0(I,i),rD(`✓ Download completed successfully (${(i.length/1024/1024).toFixed(1)} MB)`);return}catch(y){if(A)clearTimeout(A);if(x)clearTimeout(x);if(R)clearTimeout(R);let f=P||(y instanceof Error?y.message:String(y));G=Error(f),rD(`
|
||||
↳ Mirror failed: ${G.message}`)}finally{if(A)clearTimeout(A);if(x)clearTimeout(x);if(R)clearTimeout(R)}}throw Error(`Failed to download asset from all mirrors: ${G?.message}`)}function PW1($,I,U){let Y=LI("tar",["-xzf",$,"-C",I],{stdio:"pipe"});if(Y.status!==0)throw Error(`Failed to extract tar archive: ${Y.stderr.toString()}`);hX0($);let J=U==="windows"?"seal-use.exe":"seal-use",Q=LI("find",[I,"-type","f"],{encoding:"utf8"}).stdout.trim().split(`
|
||||
`).filter(Boolean),K=Q.find((q)=>q.endsWith(`/${J}`)||q.endsWith(J));if(K)return K;return Q[0]||$}function TW1($,I,U){let Y=LI("unzip",["-q","-o",$,"-d",I],{stdio:"pipe"});if(Y.status!==0)throw Error(`Failed to extract zip archive: ${Y.stderr.toString()}`);hX0($);let J=U==="windows"?"seal-use.exe":"seal-use",Q=LI("find",[I,"-type","f"],{encoding:"utf8"}).stdout.trim().split(`
|
||||
`).filter(Boolean),K=Q.find((q)=>q.endsWith(`/${J}`)||q.endsWith(J));if(K)return K;return Q[0]||$}function xX0($,I){let U=$.replace(/^v/,"").split(".").map((J)=>Number.parseInt(J,10)||0),Y=I.replace(/^v/,"").split(".").map((J)=>Number.parseInt(J,10)||0);for(let J=0;J<Math.max(U.length,Y.length);J++){let Q=U[J]??0,K=Y[J]??0;if(Q>K)return 1;if(Q<K)return-1}return 0}function RH($,I){return xX0($,I)>0}function yX0($,I,U={}){let Y=LI($,I,{cwd:U.cwd,encoding:"utf8",stdio:["ignore","pipe","pipe"]});if(Y.stdout)console.error(Y.stdout.trimEnd());if(Y.stderr)console.error(Y.stderr.trimEnd());if(Y.status!==0)throw Error(`${$} ${I.join(" ")} failed with status ${Y.status}`)}async function fX0($,I,U,Y,J){if($==="create"){let Q=g(J.options.name)??I,K=g(J.options.phone);if(!Q||!K)throw Error("Usage: seal-use users create --name <name> --phone <phone> [--dept <deptId>]");let q=g(J.options.dept)??g(J.options.departmentId);await F0("seal_user_create",U,Y,{name:Q,phone:K,departmentIds:q?[q]:void 0},V0(J.options));return}if($==="reset-password"){let Q=I??g(J.options.userId);if(!Q)throw Error("Usage: seal-use users reset-password <userId>");await F0("seal_user_reset_password",U,Y,{userId:Q},V0(J.options));return}if($==="search"||$==="list"){let Q=I??g(J.options.keyword)??g(J.options.query)??"";await F0("seal_user_search",U,Y,{keyword:Q},V0(J.options));return}if($==="get"){let Q=I??g(J.options.userId);if(!Q)throw Error("Usage: seal-use users get <userId>");await F0("seal_user_get",U,Y,{userId:Q},V0(J.options));return}if($==="delete"){let Q=I??g(J.options.userId);if(!Q)throw Error("Usage: seal-use users delete <userId>");await F0("seal_user_delete",U,Y,{userId:Q},V0(J.options));return}if($==="activate"){let Q=I??g(J.options.userId);if(!Q)throw Error("Usage: seal-use users activate <userId>");await F0("seal_user_activate",U,Y,{userId:Q},V0(J.options));return}if($==="delegation"||$==="impersonate"){let Q=I??g(J.options.userId)??g(J.options.phone);if(!Q)throw Error("Usage: seal-use users delegation <userIdOrPhone> [--note <note>]");let K=g(J.options.note);await F0("seal_user_delegation_create",U,Y,{userIdOrPhone:Q,note:K},V0(J.options));return}throw Error(`Unknown users command: ${$??""}. Run 'seal-use help' for available commands.`)}var iX0=eu(eu(eu(BW1(import.meta.url)))),vW1=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","changelog"]),RW1=new Set(["http","server","web","mcp"]);function jW1($){if(!$.length)return!1;let I=$[0]?.toLowerCase(),U=$[1]?.toLowerCase();if(I&&RW1.has(I))return!0;if((I==="service"||I==="daemon")&&U==="run")return!0;return!1}var bX0=Promise.resolve();function EH($,I={}){if(jW1($))return nX0($,I);let U=bX0.then(()=>nX0($,I));return bX0=U.then(()=>{return},()=>{return}),U}async function nX0($,I){let U=[],Y=[],J=console.log,Q=console.error,K={appRoot:I.appRoot??iX0,entryFile:I.entryFile??EW1(I.appRoot??iX0,"src","cli.ts"),launcher:I.launcher};console.log=(...q)=>{U.push(hu(q))},console.error=(...q)=>{Y.push(hu(q))};try{return await CW1($,K),{stdout:AH(U),stderr:AH(Y),isError:!1,exitCode:0}}catch(q){let H=PH(q instanceof Error?q.message:String(q)),G=SD(q);if(Y.push(H),G.nextAction&&!H.includes("Next action:"))Y.push(`\uD83D\uDC49 Next action: ${G.nextAction}`);return{stdout:AH(U),stderr:AH(Y),isError:!0,exitCode:G.exitCode}}finally{console.log=J,console.error=Q}}async function CW1($,I){let U=tZ0($),[Y,J,Q]=U.command;if(Y==="version"||Y==="v"||Boolean(U.options.version)||Boolean(U.options.v)||Boolean(U.options.V)){B0(O2);return}let K=Jz0(U);if(K.isHelp){Hz0(K.target);return}if(!Y||!vW1.has(Y))throw Error(`Unknown command: ${U.command.join(" ")}. Run 'seal-use help' for available commands.`);if(Y==="webhook"&&J==="material-pack"&&Q==="preview"){let G=U.command[3]??g(U.options.file)??g(U.options.input);if(!G)throw Error("Usage: seal-use webhook material-pack preview <材料包.zip>");await zz0(G,MH(U.options));return}if(Y==="openapi"){az0(U);return}if(Y==="mcp-config"){xu();return}if(Y==="skill"){vX0(J,Q,U);return}if(Y==="mcp"||Y==="server"){await tz0(J,U);return}if(Y==="probe"){await UX0(J,Q,U);return}if(Y==="config"){Pz0(J,Q,U);return}if(Y==="service"){await du(J,I,U);return}if(Y==="stop"){await du("stop",I,U);return}if(Y==="http"||Y==="serve"){await oz0(U);return}if(Y==="update"||Y==="changelog"){let G=Y==="changelog"||J==="changelog"||J==="log"||J==="history"||O0(U.options.changelog)===!0,W=J==="check"||O0(U.options.check)===!0||O0(U.options["check-only"])===!0,w=g(U.options.version)??g(U.options.tag)??(!G&&!W&&J&&!J.startsWith("-")?J:void 0);await kX0(I,{checkOnly:W,changelogOnly:G,limit:n0(U.options.limit),force:O0(U.options.force),targetVersion:w,repo:g(U.options.repo)});return}if(Y==="tools"&&J==="list"){CX0();ret
Line truncated
|
||||
`)?"":`
|
||||
`}`);process.exitCode=$.exitCode}var kW1=Boolean(t.main==t.module||!import.meta.url.includes("$bunfs")&&process.argv[1]&&pX0(process.argv[1])===pX0(t5));if(kW1)if(process.argv[2]==="--seal-use-cli"||process.argv[2]==="--seal-home-cli")await xW1();else xu().catch(($)=>{console.error($),process.exitCode=1});export{hu as tokenizeCommand,xu as startServer,yW1 as resolveMcpEnabled,hW1 as createServer,SW1 as SEAL_MCP_ENABLED_ENV,_W1 as SEAL_CLI_TOOL_NAME,gW1 as LEGACY_SEAL_MCP_ENABLED_ENV};
|
||||
`}`);process.exitCode=$.exitCode}var fW1=Boolean(t.main==t.module||!import.meta.url.includes("$bunfs")&&process.argv[1]&&pX0(process.argv[1])===pX0(t5));if(fW1)if(process.argv[2]==="--seal-use-cli"||process.argv[2]==="--seal-home-cli")await xW1();else fu().catch(($)=>{console.error($),process.exitCode=1});export{ku as tokenizeCommand,fu as startServer,hW1 as resolveMcpEnabled,uW1 as createServer,gW1 as SEAL_MCP_ENABLED_ENV,SW1 as SEAL_CLI_TOOL_NAME,yW1 as LEGACY_SEAL_MCP_ENABLED_ENV};
|
||||
@@ -58,6 +58,16 @@ seal-use corps list
|
||||
- When returning ANY authorization, login, or delegation links (e.g. 合思授权链接, Seal授权链接/委托链接), ALWAYS provide BOTH a code block (` ```text ... ``` `) for easy copying without accidental default browser redirection, AND a clickable hyperlink.
|
||||
- For delegation links, always prefer `seal-use delegation create` over `users delegation` for link generation to ensure persistent token tracking.
|
||||
- Never treat “Seal 协助/Seal 授权/委托” as a 合思授权入口. They are different links and must use different commands.
|
||||
- For approval run links (`seal-use approval-runs url <recordId> [--corp <corpId>]`):
|
||||
- Always default to returning the clean deep link (`type: 'deep_link'`), which contains no credentials and requires no sensitive access. Users in their authorized browsers open it directly with zero token leakage risk.
|
||||
- ONLY provide an SSO link (`--sso`) when the user explicitly requests an unauthenticated/cross-browser/no-login/免密 link and acknowledges risks.
|
||||
- When returning an `--sso` link, the Agent MUST:
|
||||
1. Declare the 4 mandatory security disclosures:
|
||||
- 身份主体(Identity attribution: name and admin status)
|
||||
- 权限范围(Full Seal AI operation permissions under this user)
|
||||
- 时效性(2-hour provisional ticket TTL, 30-day session after opening)
|
||||
- 安全与防扩散边界(No Hose main system access, strictly internal, never share to public/external groups)
|
||||
2. Provide BOTH a code block (` ```text ... ``` `) and a clickable hyperlink.
|
||||
- In the default stateless mode, every enterprise command requires `--corp <corpId>`. In stateful mode, omitting `--corp` uses the configured default enterprise and is unsafe for an explicitly named enterprise.
|
||||
- For an explicitly named enterprise, first resolve it with `seal-use corps list`, then pass its exact `corpId` to every command. After creation, verify the returned URL host matches that enterprise's Seal tenant; if the host is the current/default tenant or cannot be verified, do not present the link as the target enterprise's link.
|
||||
- 生产规则变更建议优先遵循“生产改草稿 -> 同步测试企业 -> 真实单据模拟验证 -> 生产发布投产”安全闭环;Agent 应主动提示并建议在测试环境中验证,但最终操作权与决策权在用户手中,绝不代替用户做决定。若用户明确要求直接在生产环境发布,尊重用户意图并严格执行。
|
||||
|
||||
@@ -140,9 +140,10 @@ seal-use approval-runs get <recordId> --corp <corpId> [--fields metadata|documen
|
||||
seal-use approval-runs attachments <recordId> --corp <corpId>
|
||||
seal-use approval-runs attachments download <recordId> [--all] [--name <name>] [--out-dir <dir>] --corp <corpId>
|
||||
seal-use approval-runs result <recordId> --corp <corpId> [--summary]
|
||||
seal-use approval-runs url --corp <corpId>
|
||||
seal-use approval-runs url <recordId> --corp <corpId>
|
||||
seal-use approval-runs url --sourceDocumentSN <sourceDocumentSN> --corp <corpId>
|
||||
seal-use approval-runs url <recordId> --sso [--expire 7200] --corp <corpId>
|
||||
seal-use approval-runs url --sn <documentSN> [--sso] --corp <corpId>
|
||||
seal-use approval-runs url --corp <corpId>
|
||||
seal-use approval-runs bridge --corp <corpId> [--sourceDocumentSN <sourceDocumentSN>]
|
||||
seal-use simulation batch-records <batchId> --corp <corpId>
|
||||
seal-use simulation create --mode hosecloud --flow-ids "B26017701,B26022501" [--reject-node 财务] [--thinking-depth default|medium|high] [--skip-invoice-generation|--skip-invoice-generation false] [--no-wait] --corp <corpId>
|
||||
|
||||
@@ -278,14 +278,20 @@ export async function handleApprovalRunsCommand(
|
||||
}
|
||||
|
||||
if (action === "url") {
|
||||
const sso = booleanOption(args.options.sso) ?? false;
|
||||
const expiresIn = numberOption(args.options.expire) ?? numberOption(args.options.expiresIn) ?? 7200;
|
||||
const sn = stringOption(args.options.sn) ?? stringOption(args.options.sourceDocumentSN);
|
||||
|
||||
await runTool(
|
||||
"seal_approval_run_url_get",
|
||||
client,
|
||||
corp,
|
||||
{
|
||||
recordId: maybeName,
|
||||
sourceDocumentSN: stringOption(args.options.sourceDocumentSN),
|
||||
sourceDocumentId: stringOption(args.options.sourceDocumentId)
|
||||
recordId: maybeName ?? stringOption(args.options.id) ?? stringOption(args.options.recordId),
|
||||
sourceDocumentSN: sn,
|
||||
sourceDocumentId: stringOption(args.options.sourceDocumentId),
|
||||
sso,
|
||||
expiresIn
|
||||
},
|
||||
outputOptions(args.options)
|
||||
);
|
||||
|
||||
+4
-3
@@ -309,11 +309,12 @@ export const HELP_REGISTRY: AreaHelp[] = [
|
||||
},
|
||||
{
|
||||
name: "url",
|
||||
summary: "Get web console URL for approval run",
|
||||
summary: "Get web console URL for approval run (default deep link, or --sso for auto-login link)",
|
||||
usage: [
|
||||
"seal-use approval-runs url [--corp <corpId>]",
|
||||
"seal-use approval-runs url <recordId> [--corp <corpId>]",
|
||||
"seal-use approval-runs url --sourceDocumentSN B26022501 [--corp <corpId>]"
|
||||
"seal-use approval-runs url <recordId> --sso [--expire 7200] [--corp <corpId>]",
|
||||
"seal-use approval-runs url --sn <documentSN> [--sso] [--corp <corpId>]",
|
||||
"seal-use approval-runs url [--corp <corpId>]"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -401,12 +401,25 @@ export async function getHoseProvisionalAuthLink(
|
||||
corpId: string;
|
||||
staffId: string;
|
||||
url: string;
|
||||
token?: string;
|
||||
expiresIn: number;
|
||||
}> {
|
||||
if (corp.source.type !== "hose") {
|
||||
throw new Error(`Unsupported Seal source: ${corp.source.type}`);
|
||||
}
|
||||
|
||||
const cache = getHoseAuthCache(corp.id);
|
||||
if (isFresh(cache.closeapi) && cache.closeapi.url && cache.closeapi.token) {
|
||||
const remainingSeconds = Math.max(60, Math.floor((cache.closeapi.expiresAt - Date.now()) / 1000));
|
||||
return {
|
||||
corpId: corp.source.corpId,
|
||||
staffId: corp.source.staffId,
|
||||
url: cache.closeapi.url,
|
||||
token: cache.closeapi.token,
|
||||
expiresIn: Math.min(expiresIn, remainingSeconds)
|
||||
};
|
||||
}
|
||||
|
||||
const openapiToken = await ensureHoseOpenapiToken(corp);
|
||||
const provisional = await fetchHoseCloseApiToken(corp.source, openapiToken, expiresIn);
|
||||
if (!provisional.url) {
|
||||
@@ -417,6 +430,7 @@ export async function getHoseProvisionalAuthLink(
|
||||
corpId: corp.source.corpId,
|
||||
staffId: corp.source.staffId,
|
||||
url: provisional.url,
|
||||
token: provisional.token,
|
||||
expiresIn
|
||||
};
|
||||
}
|
||||
|
||||
@@ -660,6 +660,9 @@ describe("sealTools", () => {
|
||||
};
|
||||
|
||||
expect(result).toMatchObject({
|
||||
url: "https://hose-corp-a.sealai.cc/approval-result/run-1",
|
||||
sealResultUrl: "https://hose-corp-a.sealai.cc/approval-result/run-1",
|
||||
type: "deep_link",
|
||||
enterpriseAssistUrl: "https://app.ekuaibao.com/web/home.html?accessToken=close-token",
|
||||
enterpriseUrl: "https://app.ekuaibao.com/web/home.html?accessToken=close-token",
|
||||
hoseDomain: "https://app.ekuaibao.com",
|
||||
@@ -705,11 +708,54 @@ describe("sealTools", () => {
|
||||
fakeApprovalRunsClient(requests),
|
||||
{ sourceDocumentSN: "B26001965" },
|
||||
fakeHoseContext()
|
||||
) as { documentUrl?: string };
|
||||
) as { documentUrl?: string; url?: string; type?: string };
|
||||
|
||||
expect(requests[0]).toContain("search=B26001965");
|
||||
expect(requests[1]).toBe("api/v1/approvals/run-1");
|
||||
expect(result.documentUrl).toBe("https://app.ekuaibao.com/web/thirdparty.html");
|
||||
expect(result.type).toBe("deep_link");
|
||||
expect(result.url).toBe("https://hose-corp-a.sealai.cc/approval-result/run-1");
|
||||
});
|
||||
|
||||
test("approval run url returns SSO link with identity, expiration, and warning when sso=true", async () => {
|
||||
const tool = sealTools.find((item) => item.name === "seal_approval_run_url_get");
|
||||
expect(tool).toBeDefined();
|
||||
primeHoseEnterpriseUrl("corp-a", "https://app.ekuaibao.com/web/home.html?accessToken=close-token");
|
||||
|
||||
const handler = tool!.handler as ToolHandler;
|
||||
const result = (await handler(
|
||||
fakeApprovalRunsClient(),
|
||||
{ recordId: "run-1", sso: true, expiresIn: 3600 },
|
||||
fakeHoseContext()
|
||||
)) as {
|
||||
url?: string;
|
||||
ssoUrl?: string;
|
||||
type?: string;
|
||||
expiresIn?: number;
|
||||
warning?: string;
|
||||
identity?: { staffId?: string };
|
||||
};
|
||||
|
||||
expect(result.type).toBe("sso_link");
|
||||
expect(result.expiresIn).toBe(3600);
|
||||
expect(result.url).toContain("/api/auth/oauth2/session/oem-hosecloud?token=close-token");
|
||||
expect(result.url).toContain("path=%2Fapproval-result%2Frun-1");
|
||||
expect(result.warning).toContain("安全警示");
|
||||
expect(result.identity?.staffId).toBe("staff-a");
|
||||
});
|
||||
|
||||
test("approval run url throws clear error when sso=true is used on non-hose enterprise", async () => {
|
||||
const tool = sealTools.find((item) => item.name === "seal_approval_run_url_get");
|
||||
expect(tool).toBeDefined();
|
||||
|
||||
const handler = tool!.handler as ToolHandler;
|
||||
await expect(
|
||||
handler(
|
||||
fakeApprovalRunsClient(),
|
||||
{ recordId: "run-1", sso: true },
|
||||
fakeContext()
|
||||
)
|
||||
).rejects.toThrow("SSO direct links currently support Hose-integrated enterprises");
|
||||
});
|
||||
|
||||
test("approval run summary filters by local date and returns compact aggregates", async () => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { KyInstance } from "ky";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { randomBytes } from "node:crypto";
|
||||
import * as api from "./api.js";
|
||||
import { defaultSealUrl, getHoseEnterpriseUrl, probeHoseDomain } from "../../core/auth/hose.js";
|
||||
import { defaultSealUrl, getHoseEnterpriseUrl, getHoseProvisionalAuthLink, probeHoseDomain } from "../../core/auth/hose.js";
|
||||
import { CorpConfig } from "../../core/config/types.js";
|
||||
import { loadGlobalConfig } from "../../core/config/loader.js";
|
||||
import { createSealClientForToken } from "../../core/http/factory.js";
|
||||
@@ -1450,15 +1450,23 @@ export const sealTools = [
|
||||
},
|
||||
{
|
||||
name: "seal_approval_run_url_get",
|
||||
description: "获取合思企业协助链接,按需附带单据链接;支持只取企业协助链接,或按 Seal recordId/合思 sourceDocumentSN 查询单据链接",
|
||||
description: "获取审批单的 Web 控制台直达链接或合思企业协助链接,支持纯深度链接与带安全警告的免密 SSO 链接",
|
||||
parameters: z.object({
|
||||
recordId: z.string().optional().describe("Seal approval run record ID"),
|
||||
sourceDocumentSN: z.string().optional().describe("合思/易快报单号"),
|
||||
sourceDocumentId: z.string().optional().describe("合思/易快报源单据 ID")
|
||||
sourceDocumentId: z.string().optional().describe("合思/易快报源单据 ID"),
|
||||
sso: z.boolean().optional().describe("是否生成带临时认证凭证的免密直达链接 (SSO link)"),
|
||||
expiresIn: z.number().optional().describe("SSO 免密凭证有效秒数,默认 7200 (2小时)")
|
||||
}),
|
||||
handler: async (
|
||||
client: KyInstance,
|
||||
params: { recordId?: string; sourceDocumentSN?: string; sourceDocumentId?: string },
|
||||
params: {
|
||||
recordId?: string;
|
||||
sourceDocumentSN?: string;
|
||||
sourceDocumentId?: string;
|
||||
sso?: boolean;
|
||||
expiresIn?: number;
|
||||
},
|
||||
context: ToolContext
|
||||
) => {
|
||||
const hasDocumentLookup = Boolean(params.recordId || params.sourceDocumentSN || params.sourceDocumentId);
|
||||
@@ -1467,7 +1475,68 @@ export const sealTools = [
|
||||
const enterpriseAssistUrl = source.type === "hose" ? await getHoseEnterpriseUrl(context.corp) : undefined;
|
||||
const documentUrl = stringFromUnknown(record?.sourceExtendData?.hosecloudViewUrl);
|
||||
|
||||
const sealBaseUrl = resolveSealBaseUrl(context.corp);
|
||||
const sealResultUrl = record?.id ? `${sealBaseUrl}/approval-result/${record.id}` : undefined;
|
||||
|
||||
let ssoUrl: string | undefined;
|
||||
let identity: { name?: string; staffId?: string; isAdmin?: boolean; providerUserId?: string } | undefined;
|
||||
let warning: string | undefined;
|
||||
const expiresIn = params.expiresIn ?? 7200;
|
||||
|
||||
if (params.sso) {
|
||||
if (!record?.id) {
|
||||
throw new Error("recordId or sourceDocumentSN is required to generate an SSO approval result URL");
|
||||
}
|
||||
if (source.type !== "hose") {
|
||||
throw new Error(
|
||||
`SSO direct links currently support Hose-integrated enterprises (corp '${context.corp.id}' uses '${source.type}'). For Seal-native enterprises, use 'seal-use delegation create' for authorized access.`
|
||||
);
|
||||
}
|
||||
|
||||
const linkInfo = await getHoseProvisionalAuthLink(context.corp, expiresIn);
|
||||
const provisionalToken = new URL(linkInfo.url).searchParams.get("accessToken");
|
||||
if (!provisionalToken) {
|
||||
throw new Error("Failed to obtain Hose provisional authentication token");
|
||||
}
|
||||
|
||||
const targetPath = `/approval-result/${record.id}`;
|
||||
ssoUrl = `${sealBaseUrl}/api/auth/oauth2/session/oem-hosecloud?token=${encodeURIComponent(provisionalToken)}&path=${encodeURIComponent(targetPath)}`;
|
||||
|
||||
try {
|
||||
const me = await api.getMe(client);
|
||||
identity = {
|
||||
name: me.user.name,
|
||||
staffId: source.staffId,
|
||||
isAdmin: me.user.isAdmin,
|
||||
providerUserId: me.user.providerUserId
|
||||
};
|
||||
} catch {
|
||||
identity = {
|
||||
staffId: source.staffId
|
||||
};
|
||||
}
|
||||
|
||||
const userName = identity.name ?? "企业成员";
|
||||
const roleLabel = identity.isAdmin ? " (管理员)" : "";
|
||||
warning = `⚠️ 安全警示:该链接使用 [${userName}${roleLabel}] 身份签发,在 Seal AI 拥有全站操作权限。链接具备 ${Math.round(expiresIn / 3600 * 10) / 10} 小时时效,仅供受信任人员排查使用,请勿在外部公开分享。`;
|
||||
|
||||
console.error(
|
||||
`⚠️ 安全警示 (SSO 强化免密链接):\n` +
|
||||
`• 身份主体:${userName}${roleLabel}\n` +
|
||||
`• 权限范围:持有该链接者在 Seal AI 中拥有该用户的完整操作权限(含系统设置与规则编辑)\n` +
|
||||
`• 时效性:换票凭证有效时间 ${expiresIn} 秒(${Math.round(expiresIn / 60)} 分钟),在浏览器打开后将保留 30 天会话\n` +
|
||||
`• 安全边界:该凭证绝不包含且无法访问合思 (Hose) 主系统;仅限内部排查,严禁在外部公开分享!`
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
url: params.sso ? ssoUrl : sealResultUrl,
|
||||
sealResultUrl,
|
||||
ssoUrl,
|
||||
type: params.sso ? "sso_link" : "deep_link",
|
||||
expiresIn: params.sso ? expiresIn : undefined,
|
||||
identity,
|
||||
warning,
|
||||
enterpriseAssistUrl,
|
||||
enterpriseUrl: enterpriseAssistUrl,
|
||||
hoseDomain: source.type === "hose" ? normalizeUrl(source.domain) : undefined,
|
||||
@@ -3218,6 +3287,15 @@ async function resolveApprovalRunForUrl(
|
||||
return api.getApprovalRun(client, record.id);
|
||||
}
|
||||
|
||||
function resolveSealBaseUrl(corp: CorpConfig): string {
|
||||
if (corp.seal?.url) return corp.seal.url.replace(/\/+$/, "");
|
||||
if (corp.source.type === "hose") return defaultSealUrl(corp, corp.source).replace(/\/+$/, "");
|
||||
if ("sealUrl" in corp.source && typeof corp.source.sealUrl === "string" && corp.source.sealUrl) {
|
||||
return corp.source.sealUrl.replace(/\/+$/, "");
|
||||
}
|
||||
return `https://${corp.id.toLowerCase()}.sealai.cc`;
|
||||
}
|
||||
|
||||
function normalizeUrl(value: string): string {
|
||||
return value.replace(/\/+$/, "");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user