@serverless-devs/s3 0.1.3-beta.4 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/daemon/lib.js +1 -1
- package/lib/index.js +3 -3
- package/package.json +1 -1
- package/releases/s3-linux +0 -0
- package/releases/s3-macos +0 -0
- package/releases/s3-win.exe +0 -0
package/lib/index.js
CHANGED
|
@@ -336,7 +336,7 @@ ${" ".repeat(u)}`))}this._progressContent=`${t.join(`
|
|
|
336
336
|
${fFt("ERROR:")}`),Ft.write(`
|
|
337
337
|
${t}
|
|
338
338
|
`),r&&Ft.write(`${Dt.gray(r)}
|
|
339
|
-
`)}},fk=ibe});var pk=I((Eju,D4n)=>{D4n.exports={name:"@serverless-devs/s3",version:"0.1.3
|
|
339
|
+
`)}},fk=ibe});var pk=I((Eju,D4n)=>{D4n.exports={name:"@serverless-devs/s3",version:"0.1.3",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"Apache 2.0",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{start:"npm run watch",test:"jest --testTimeout 10000","test:watch":"jest --testTimeout 10000 --watchAll",format:"prettier --write src/ __tests__/**/*.test.ts",watch:"npm run build -- --watch",prebuild:"rm -rf node_modules && npm install --production false",build:"node ./scripts/build.js",pkg:"pkg . --out-path releases",prepublishOnly:"npm run build",beta:"npm publish --tag=beta",pub:"npm publish"},pkg:{scripts:["./lib/daemon/**/*.js"]},main:"./lib/index.js",bin:{s:"bin/s"},engines:{node:">=14.14.0"},devDependencies:{"@serverless-devs/core":"^0.1.66","@serverless-devs/credential":"^0.0.3","@serverless-devs/engine":"^0.0.22","@serverless-devs/load-application":"^0.0.9","@serverless-devs/load-component":"^0.0.6","@serverless-devs/logger":"^0.0.3","@serverless-devs/parse-spec":"^0.0.19","@serverless-devs/registry":"^0.0.4","@serverless-devs/utils":"^0.0.14","@types/fs-extra":"^11.0.4","@types/inquirer":"^9.0.7","@types/jest":"^29.5.8","@types/js-yaml":"^4.0.9","@types/lodash":"^4.14.201","@types/node":"^20.9.1","@types/semver":"^7.5.5",axios:"^1.6.2",boxen:"^7.1.1",chalk:"^5.3.0",commander:"^11.1.0",dotenv:"^16.3.1","dotenv-expand":"^10.0.0",esbuild:"^0.19.5","fs-extra":"^11.1.1","global-agent":"^3.0.0",inquirer:"^9.2.12","inquirer-autocomplete-prompt":"^3.0.1",jest:"^29.7.0","js-yaml":"^4.1.0","latest-version":"^7.0.0",leven:"^4.0.0",lodash:"^4.17.21",pkg:"^5.8.1",prettier:"^3.1.0",prettyjson:"^1.2.5",rimraf:"^5.0.5",semver:"^7.5.4","semver-diff":"^4.0.0","table-layout":"^3.0.2","ts-jest":"^29.1.1","ts-node":"^10.9.1",typescript:"^5.2.2",ajv:"^8.12.0"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"}}});var R0,JQ,hk,DFt,jE,mFt,y4n,gFt,E4n,vFt,Ed,Rg=wt(()=>{R0=ot(Hr());ru();Rr();JQ=ot(require("path")),hk=ot(hi());En();DFt=ot(Hr()),jE=ot(ir());Pg();dFt();mFt=pk(),y4n=async(e,t={})=>{Ft.unsilent();let{silent:r}=(0,DFt.parseArgv)(process.argv.slice(2)),n=JQ.default.join((0,R0.getRootHome)(),"logs",process.env.serverless_devs_traceid,"error.json");hk.default.ensureFileSync(n),hk.default.writeJSONSync(n,[],{spaces:2});let u=1;if((0,jE.isArray)(e))for(let i of e){gFt(i,t);let o=(0,jE.get)(i,"exitCode");o&&(u=o)}else{gFt(e,t);let i=(0,jE.get)(e,"exitCode");i&&(u=i)}Ft.write(" "),Ft.write(yFt([{key:"Env:",value:`${mFt.name}: ${mFt.version}, ${process.platform}-${process.arch} node-${process.version}`},{key:"Logs:",value:Dt.underline(JQ.default.join((0,R0.getRootHome)(),"logs",process.env.serverless_devs_traceid))},{key:"Get Help:",value:"DingTalk: 33947367"},{key:"Feedback:",value:Dt.cyan.underline("https://github.com/Serverless-Devs/Serverless-Devs/issues")}])),r&&Ft.silent(),process.exitCode=u},gFt=(e,t={})=>{zc("report.js",{argv:process.argv.slice(2),userAgent:(0,R0.getUserAgent)(),...t,type:(0,jE.get)(e,"trackerType"),message:e.message}),E4n(e),Ft.write(" ");let r=e;if(r.CODE===R0.DevsError.CODE){let i=r.prefix?[`${Dt.red("\u2716")} ${r.prefix}`,"===================="]:[];i.push(Dt.red("Error Message:"),Dt.red((0,R0.isDebugMode)()?r.stack:r.message)),r.tips&&i.push(`
|
|
340
340
|
\u{1F37C} Tips`,"====================",Dt.yellow(`${r.tips}`)),Ft.write(i.join(`
|
|
341
341
|
`)),vFt(r.stack);return}let n=e,u=[Dt.red("Error Message:"),Dt.red((0,R0.isDebugMode)()?n.stack:n.message)];Ft.write(u.join(`
|
|
342
342
|
`)),vFt(n.stack)},E4n=e=>{let t=u=>{let i=(0,jE.get)(u,"data");if(i)return i;let o=u;return o.CODE===R0.DevsError.CODE?{prefix:o.prefix,message:o.message,exitCode:o.exitCode,tips:o.tips}:{message:o.message}},r=JQ.default.join((0,R0.getRootHome)(),"logs",process.env.serverless_devs_traceid,"error.json"),n=hk.default.readJSONSync(r);n.push(t(e)),hk.default.writeJSONSync(r,n,{spaces:2})},vFt=e=>{(0,R0.isDebugMode)()||Ft.debug(e)},Ed=y4n});function C4n(){let{version:e}=obe.default.minVersion(b4n.engines.node);obe.default.gte(process.versions.node,e)||(new fk(`Node.js version must be greater than or equal to ${e}`,`Your current Node.js version is ${process.versions.node}, please upgrade your Node.js version at ${Dt.underline("https://nodejs.org/en")}.`),process.exit(1))}var obe,b4n,sbe,EFt=wt(()=>{Rg();Rr();obe=ot(Tg()),b4n=pk();sbe=C4n});var bFt=I(XQ=>{"use strict";Object.defineProperty(XQ,"__esModule",{value:!0});XQ.boolean=void 0;var x4n=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1"].includes(e.trim().toLowerCase());case"[object Number]":return e.valueOf()===1;case"[object Boolean]":return e.valueOf();default:return!1}};XQ.boolean=x4n});var CFt=I(QQ=>{"use strict";Object.defineProperty(QQ,"__esModule",{value:!0});QQ.isBooleanable=void 0;var A4n=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(e.trim().toLowerCase());case"[object Number]":return[0,1].includes(e.valueOf());case"[object Boolean]":return!0;default:return!1}};QQ.isBooleanable=A4n});var ZQ=I(gx=>{"use strict";Object.defineProperty(gx,"__esModule",{value:!0});gx.isBooleanable=gx.boolean=void 0;var F4n=bFt();Object.defineProperty(gx,"boolean",{enumerable:!0,get:function(){return F4n.boolean}});var _4n=CFt();Object.defineProperty(gx,"isBooleanable",{enumerable:!0,get:function(){return _4n.isBooleanable}})});var eZ=I((kju,xFt)=>{xFt.exports=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"});var abe=I((Rju,FFt)=>{"use strict";var AFt=Object.prototype.toString;FFt.exports=function(t){var r=AFt.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&AFt.call(t.callee)==="[object Function]"),n}});var RFt=I((Iju,kFt)=>{"use strict";var PFt;Object.keys||(dk=Object.prototype.hasOwnProperty,cbe=Object.prototype.toString,_Ft=abe(),lbe=Object.prototype.propertyIsEnumerable,BFt=!lbe.call({toString:null},"toString"),wFt=lbe.call(function(){},"prototype"),mk=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],tZ=function(e){var t=e.constructor;return t&&t.prototype===e},SFt={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},OFt=function(){if(typeof window>"u")return!1;for(var e in window)try{if(!SFt["$"+e]&&dk.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{tZ(window[e])}catch{return!0}}catch{return!0}return!1}(),TFt=function(e){if(typeof window>"u"||!OFt)return tZ(e);try{return tZ(e)}catch{return!1}},PFt=function(t){var r=t!==null&&typeof t=="object",n=cbe.call(t)==="[object Function]",u=_Ft(t),i=r&&cbe.call(t)==="[object String]",o=[];if(!r&&!n&&!u)throw new TypeError("Object.keys called on a non-object");var s=wFt&&n;if(i&&t.length>0&&!dk.call(t,0))for(var a=0;a<t.length;++a)o.push(String(a));if(u&&t.length>0)for(var c=0;c<t.length;++c)o.push(String(c));else for(var l in t)!(s&&l==="prototype")&&dk.call(t,l)&&o.push(String(l));if(BFt)for(var f=TFt(t),p=0;p<mk.length;++p)!(f&&mk[p]==="constructor")&&dk.call(t,mk[p])&&o.push(mk[p]);return o});var dk,cbe,_Ft,lbe,BFt,wFt,mk,tZ,SFt,OFt,TFt;kFt.exports=PFt});var NFt=I((jju,LFt)=>{"use strict";var B4n=Array.prototype.slice,w4n=abe(),IFt=Object.keys,rZ=IFt?function(t){return IFt(t)}:RFt(),jFt=Object.keys;rZ.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return w4n(n)?jFt(B4n.call(n)):jFt(n)})}else Object.keys=rZ;return Object.keys||rZ};LFt.exports=rZ});var MFt=I((Lju,qFt)=>{"use strict";qFt.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var u=42;t[r]=u;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==u||o.enumerable!==!0)return!1}return!0}});var zFt=I((Nju,$Ft)=>{"use strict";var UFt=typeof Symbol<"u"&&Symbol,S4n=MFt();$Ft.exports=function(){return typeof UFt!="function"||typeof Symbol!="function"||typeof UFt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:S4n()}});var VFt=I((qju,GFt)=>{"use strict";var WFt={foo:{}},O4n=Object;GFt.exports=function(){return{__proto__:WFt}.foo===WFt.foo&&!({__proto__:null}instanceof O4n)}});var YFt=I((Mju,KFt)=>{"use strict";var T4n="Function.prototype.bind called on incompatible ",P4n=Object.prototype.toString,k4n=Math.max,R4n="[object Function]",HFt=function(t,r){for(var n=[],u=0;u<t.length;u+=1)n[u]=t[u];for(var i=0;i<r.length;i+=1)n[i+t.length]=r[i];return n},I4n=function(t,r){for(var n=[],u=r||0,i=0;u<t.length;u+=1,i+=1)n[i]=t[u];return n},j4n=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};KFt.exports=function(t){var r=this;if(typeof r!="function"||P4n.apply(r)!==R4n)throw new TypeError(T4n+r);for(var n=I4n(arguments,1),u,i=function(){if(this instanceof u){var l=r.apply(this,HFt(n,arguments));return Object(l)===l?l:this}return r.apply(t,HFt(n,arguments))},o=k4n(0,r.length-n.length),s=[],a=0;a<o;a++)s[a]="$"+a;if(u=Function("binder","return function ("+j4n(s,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var c=function(){};c.prototype=r.prototype,u.prototype=new c,c.prototype=null}return u}});var nZ=I((Uju,JFt)=>{"use strict";var L4n=YFt();JFt.exports=Function.prototype.bind||L4n});var QFt=I(($ju,XFt)=>{"use strict";var N4n=Function.prototype.call,q4n=Object.prototype.hasOwnProperty,M4n=nZ();XFt.exports=M4n.call(N4n,q4n)});var bx=I((zju,n_t)=>{"use strict";var nu,Ex=SyntaxError,r_t=Function,yx=TypeError,fbe=function(e){try{return r_t('"use strict"; return ('+e+").constructor;")()}catch{}},LE=Object.getOwnPropertyDescriptor;if(LE)try{LE({},"")}catch{LE=null}var pbe=function(){throw new yx},U4n=LE?function(){try{return arguments.callee,pbe}catch{try{return LE(arguments,"callee").get}catch{return pbe}}}():pbe,vx=zFt()(),$4n=VFt()(),aa=Object.getPrototypeOf||($4n?function(e){return e.__proto__}:null),Dx={},z4n=typeof Uint8Array>"u"||!aa?nu:aa(Uint8Array),NE={"%AggregateError%":typeof AggregateError>"u"?nu:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?nu:ArrayBuffer,"%ArrayIteratorPrototype%":vx&&aa?aa([][Symbol.iterator]()):nu,"%AsyncFromSyncIteratorPrototype%":nu,"%AsyncFunction%":Dx,"%AsyncGenerator%":Dx,"%AsyncGeneratorFunction%":Dx,"%AsyncIteratorPrototype%":Dx,"%Atomics%":typeof Atomics>"u"?nu:Atomics,"%BigInt%":typeof BigInt>"u"?nu:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?nu:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?nu:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?nu:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?nu:Float32Array,"%Float64Array%":typeof Float64Array>"u"?nu:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?nu:FinalizationRegistry,"%Function%":r_t,"%GeneratorFunction%":Dx,"%Int8Array%":typeof Int8Array>"u"?nu:Int8Array,"%Int16Array%":typeof Int16Array>"u"?nu:Int16Array,"%Int32Array%":typeof Int32Array>"u"?nu:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":vx&&aa?aa(aa([][Symbol.iterator]())):nu,"%JSON%":typeof JSON=="object"?JSON:nu,"%Map%":typeof Map>"u"?nu:Map,"%MapIteratorPrototype%":typeof Map>"u"||!vx||!aa?nu:aa(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?nu:Promise,"%Proxy%":typeof Proxy>"u"?nu:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?nu:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?nu:Set,"%SetIteratorPrototype%":typeof Set>"u"||!vx||!aa?nu:aa(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?nu:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":vx&&aa?aa(""[Symbol.iterator]()):nu,"%Symbol%":vx?Symbol:nu,"%SyntaxError%":Ex,"%ThrowTypeError%":U4n,"%TypedArray%":z4n,"%TypeError%":yx,"%Uint8Array%":typeof Uint8Array>"u"?nu:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?nu:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?nu:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?nu:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?nu:WeakMap,"%WeakRef%":typeof WeakRef>"u"?nu:WeakRef,"%WeakSet%":typeof WeakSet>"u"?nu:WeakSet};if(aa)try{null.error}catch(e){ZFt=aa(aa(e)),NE["%Error.prototype%"]=ZFt}var ZFt,W4n=function e(t){var r;if(t==="%AsyncFunction%")r=fbe("async function () {}");else if(t==="%GeneratorFunction%")r=fbe("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=fbe("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var u=e("%AsyncGenerator%");u&&aa&&(r=aa(u.prototype))}return NE[t]=r,r},e_t={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},gk=nZ(),uZ=QFt(),G4n=gk.call(Function.call,Array.prototype.concat),V4n=gk.call(Function.apply,Array.prototype.splice),t_t=gk.call(Function.call,String.prototype.replace),iZ=gk.call(Function.call,String.prototype.slice),H4n=gk.call(Function.call,RegExp.prototype.exec),K4n=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y4n=/\\(\\)?/g,J4n=function(t){var r=iZ(t,0,1),n=iZ(t,-1);if(r==="%"&&n!=="%")throw new Ex("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ex("invalid intrinsic syntax, expected opening `%`");var u=[];return t_t(t,K4n,function(i,o,s,a){u[u.length]=s?t_t(a,Y4n,"$1"):o||i}),u},X4n=function(t,r){var n=t,u;if(uZ(e_t,n)&&(u=e_t[n],n="%"+u[0]+"%"),uZ(NE,n)){var i=NE[n];if(i===Dx&&(i=W4n(n)),typeof i>"u"&&!r)throw new yx("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:u,name:n,value:i}}throw new Ex("intrinsic "+t+" does not exist!")};n_t.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new yx("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new yx('"allowMissing" argument must be a boolean');if(H4n(/^%?[^%]*%?$/,t)===null)throw new Ex("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=J4n(t),u=n.length>0?n[0]:"",i=X4n("%"+u+"%",r),o=i.name,s=i.value,a=!1,c=i.alias;c&&(u=c[0],V4n(n,G4n([0,1],c)));for(var l=1,f=!0;l<n.length;l+=1){var p=n[l],h=iZ(p,0,1),d=iZ(p,-1);if((h==='"'||h==="'"||h==="`"||d==='"'||d==="'"||d==="`")&&h!==d)throw new Ex("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(a=!0),u+="."+p,o="%"+u+"%",uZ(NE,o))s=NE[o];else if(s!=null){if(!(p in s)){if(!r)throw new yx("base intrinsic for "+t+" exists, but the property is not available.");return}if(LE&&l+1>=n.length){var m=LE(s,p);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[p]}else f=uZ(s,p),s=s[p];f&&!a&&(NE[o]=s)}}return s}});var oZ=I((Wju,u_t)=>{"use strict";var Q4n=bx(),hbe=Q4n("%Object.defineProperty%",!0),dbe=function(){if(hbe)try{return hbe({},"a",{value:1}),!0}catch{return!1}return!1};dbe.hasArrayLengthDefineBug=function(){if(!dbe())return null;try{return hbe([],"length",{value:1}).length!==1}catch{return!0}};u_t.exports=dbe});var mbe=I((Gju,i_t)=>{"use strict";var Z4n=bx(),sZ=Z4n("%Object.getOwnPropertyDescriptor%",!0);if(sZ)try{sZ([],"length")}catch{sZ=null}i_t.exports=sZ});var vbe=I((Vju,s_t)=>{"use strict";var ebn=oZ()(),gbe=bx(),vk=ebn&&gbe("%Object.defineProperty%",!0);if(vk)try{vk({},"a",{value:1})}catch{vk=!1}var tbn=gbe("%SyntaxError%"),Cx=gbe("%TypeError%"),o_t=mbe();s_t.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new Cx("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Cx("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Cx("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Cx("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Cx("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Cx("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,a=!!o_t&&o_t(t,r);if(vk)vk(t,r,{configurable:o===null&&a?a.configurable:!o,enumerable:u===null&&a?a.enumerable:!u,value:n,writable:i===null&&a?a.writable:!i});else if(s||!u&&!i&&!o)t[r]=n;else throw new tbn("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Dbe=I((Hju,f_t)=>{"use strict";var rbn=NFt(),nbn=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",ubn=Object.prototype.toString,ibn=Array.prototype.concat,a_t=vbe(),obn=function(e){return typeof e=="function"&&ubn.call(e)==="[object Function]"},c_t=oZ()(),sbn=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!obn(n)||!n())return}c_t?a_t(e,t,r,!0):a_t(e,t,r)},l_t=function(e,t){var r=arguments.length>2?arguments[2]:{},n=rbn(t);nbn&&(n=ibn.call(n,Object.getOwnPropertySymbols(t)));for(var u=0;u<n.length;u+=1)sbn(e,n[u],t[n[u]],r[n[u]])};l_t.supportsDescriptors=!!c_t;f_t.exports=l_t});var ybe=I((Kju,p_t)=>{"use strict";p_t.exports=global});var Ebe=I((Yju,h_t)=>{"use strict";var abn=ybe();h_t.exports=function(){return typeof global!="object"||!global||global.Math!==Math||global.Array!==Array?abn:global}});var m_t=I((Jju,d_t)=>{"use strict";var cbn=Dbe(),lbn=Ebe();d_t.exports=function(){var t=lbn();if(cbn.supportsDescriptors){var r=Object.getOwnPropertyDescriptor(t,"globalThis");(!r||r.configurable&&(r.enumerable||!r.writable||globalThis!==t))&&Object.defineProperty(t,"globalThis",{configurable:!0,enumerable:!1,value:t,writable:!0})}else(typeof globalThis!="object"||globalThis!==t)&&(t.globalThis=t);return t}});var bbe=I((Xju,D_t)=>{"use strict";var fbn=Dbe(),pbn=ybe(),g_t=Ebe(),hbn=m_t(),dbn=g_t(),v_t=function(){return dbn};fbn(v_t,{getPolyfill:g_t,implementation:pbn,shim:hbn});D_t.exports=v_t});var b_t=I((Cbe,E_t)=>{Cbe=E_t.exports=mbn;Cbe.getSerialize=y_t;function mbn(e,t,r,n){return JSON.stringify(e,y_t(t,n),r)}function y_t(e,t){var r=[],n=[];return t==null&&(t=function(u,i){return r[0]===i?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(i)).join(".")+"]"}),function(u,i){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?n.splice(o,1/0,u):n.push(u),~r.indexOf(i)&&(i=t.call(this,u,i))}else r.push(i);return e==null?i:e.call(this,u,i)}}});var C_t=I(aZ=>{(function(){"use strict";var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(o){return n(i(o),arguments)}function r(o,s){return t.apply(null,[o].concat(s||[]))}function n(o,s){var a=1,c=o.length,l,f="",p,h,d,m,v,y,g,D;for(p=0;p<c;p++)if(typeof o[p]=="string")f+=o[p];else if(typeof o[p]=="object"){if(d=o[p],d.keys)for(l=s[a],h=0;h<d.keys.length;h++){if(l==null)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',d.keys[h],d.keys[h-1]));l=l[d.keys[h]]}else d.param_no?l=s[d.param_no]:l=s[a++];if(e.not_type.test(d.type)&&e.not_primitive.test(d.type)&&l instanceof Function&&(l=l()),e.numeric_arg.test(d.type)&&typeof l!="number"&&isNaN(l))throw new TypeError(t("[sprintf] expecting number but found %T",l));switch(e.number.test(d.type)&&(g=l>=0),d.type){case"b":l=parseInt(l,10).toString(2);break;case"c":l=String.fromCharCode(parseInt(l,10));break;case"d":case"i":l=parseInt(l,10);break;case"j":l=JSON.stringify(l,null,d.width?parseInt(d.width):0);break;case"e":l=d.precision?parseFloat(l).toExponential(d.precision):parseFloat(l).toExponential();break;case"f":l=d.precision?parseFloat(l).toFixed(d.precision):parseFloat(l);break;case"g":l=d.precision?String(Number(l.toPrecision(d.precision))):parseFloat(l);break;case"o":l=(parseInt(l,10)>>>0).toString(8);break;case"s":l=String(l),l=d.precision?l.substring(0,d.precision):l;break;case"t":l=String(!!l),l=d.precision?l.substring(0,d.precision):l;break;case"T":l=Object.prototype.toString.call(l).slice(8,-1).toLowerCase(),l=d.precision?l.substring(0,d.precision):l;break;case"u":l=parseInt(l,10)>>>0;break;case"v":l=l.valueOf(),l=d.precision?l.substring(0,d.precision):l;break;case"x":l=(parseInt(l,10)>>>0).toString(16);break;case"X":l=(parseInt(l,10)>>>0).toString(16).toUpperCase();break}e.json.test(d.type)?f+=l:(e.number.test(d.type)&&(!g||d.sign)?(D=g?"+":"-",l=l.toString().replace(e.sign,"")):D="",v=d.pad_char?d.pad_char==="0"?"0":d.pad_char.charAt(1):" ",y=d.width-(D+l).length,m=d.width&&y>0?v.repeat(y):"",f+=d.align?D+l+m:v==="0"?D+m+l:m+D+l)}return f}var u=Object.create(null);function i(o){if(u[o])return u[o];for(var s=o,a,c=[],l=0;s;){if((a=e.text.exec(s))!==null)c.push(a[0]);else if((a=e.modulo.exec(s))!==null)c.push("%");else if((a=e.placeholder.exec(s))!==null){if(a[2]){l|=1;var f=[],p=a[2],h=[];if((h=e.key.exec(p))!==null)for(f.push(h[1]);(p=p.substring(h[0].length))!=="";)if((h=e.key_access.exec(p))!==null)f.push(h[1]);else if((h=e.index_access.exec(p))!==null)f.push(h[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");a[2]=f}else l|=2;if(l===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");c.push({placeholder:a[0],param_no:a[1],keys:a[2],sign:a[3],pad_char:a[4],align:a[5],width:a[6],precision:a[7],type:a[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");s=s.substring(a[0].length)}return u[o]=c}typeof aZ<"u"&&(aZ.sprintf=t,aZ.vsprintf=r),typeof window<"u"&&(window.sprintf=t,window.vsprintf=r,typeof define=="function"&&define.amd&&define(function(){return{sprintf:t,vsprintf:r}}))})()});var xbe=I(cZ=>{"use strict";Object.defineProperty(cZ,"__esModule",{value:!0});cZ.logLevels=void 0;var gbn={debug:20,error:50,fatal:60,info:30,trace:10,warn:40};cZ.logLevels=gbn});var F_t=I(fZ=>{"use strict";Object.defineProperty(fZ,"__esModule",{value:!0});fZ.default=void 0;var vbn=Bbe(eZ()),Dbn=Bbe(bbe()),ybn=Bbe(b_t()),Abe=C_t(),x_t=xbe();function Bbe(e){return e&&e.__esModule?e:{default:e}}function Fbe(){return Fbe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fbe.apply(this,arguments)}function A_t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Tf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?A_t(Object(r),!0).forEach(function(n){Ebn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A_t(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ebn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var bbn=(0,Dbn.default)(),Dk;vbn.default&&(Dk=require("domain"));var Cbn=()=>{if(!Dk)return{};let e=[],t=process.domain;if(!t||!t.parentDomain)return{};for(;t&&t.parentDomain;)t=t.parentDomain,t.roarr&&t.roarr.context&&e.push(t.roarr.context);let r={};for(let n of e)r=Tf(Tf({},r),n);return r},lZ=()=>{if(!Dk)return{};let e=process.domain;if(e&&e.roarr&&e.roarr.context)return e.roarr.context;if(!e||!e.parentDomain)return{};for(;e&&e.parentDomain;)if(e=e.parentDomain,e.roarr&&e.roarr.context)return e.roarr.context;return{}},_be=(e,t)=>{let r=(n,u,i,o,s,a,c,l,f,p)=>{let h=Date.now(),d=bbn.ROARR.sequence++,m,v;if(typeof n=="string"){m=Tf(Tf({},lZ()),t||{});let y=Fbe({},{a:n,b:u,c:i,d:o,e:s,f:a,g:c,h:l,i:f,k:p});v=Object.keys(y).map(E=>y[E]).reduce((E,b)=>E+=typeof b>"u"?0:1,0)===1?(0,Abe.sprintf)("%s",n):(0,Abe.sprintf)(n,u,i,o,s,a,c,l,f,p)}else{if(typeof u!="string")throw new TypeError("Message must be a string.");m=JSON.parse((0,ybn.default)(Tf(Tf(Tf({},lZ()),t||{}),n))),v=(0,Abe.sprintf)(u,i,o,s,a,c,l,f,p)}e({context:m,message:v,sequence:d,time:h,version:"1.0.0"})};r.child=n=>typeof n=="function"?_be(u=>{if(typeof n!="function")throw new TypeError("Unexpected state.");e(n(u))},t):_be(e,Tf(Tf(Tf({},lZ()),t),n)),r.getContext=()=>Tf(Tf({},lZ()),t||{}),r.adopt=async(n,u)=>{if(!Dk)return n();let i=Dk.create();return i.run(()=>(i.roarr={context:Tf(Tf({},Cbn()),u)},n()))};for(let n of Object.keys(x_t.logLevels))r[n]=(u,i,o,s,a,c,l,f,p,h)=>r.child({logLevel:x_t.logLevels[n]})(u,i,o,s,a,c,l,f,p,h);return r},xbn=_be;fZ.default=xbn});var w_t=I(pZ=>{"use strict";Object.defineProperty(pZ,"__esModule",{value:!0});pZ.default=void 0;var __t=xbe(),B_t=(e,t)=>{let r=(n,u,i,o,s,a,c,l,f,p)=>{};r.adopt=async n=>n(),r.child=n=>B_t(e,t),r.getContext=()=>({});for(let n of Object.keys(__t.logLevels))r[n]=(u,i,o,s,a,c,l,f,p,h)=>r.child({logLevel:__t.logLevels[n]})(u,i,o,s,a,c,l,f,p,h);return r},Abn=B_t;pZ.default=Abn});var O_t=I((rLu,S_t)=>{S_t.exports=function(t,r){for(var n=t.split("."),u=r.split("."),i=0;i<3;i++){var o=Number(n[i]),s=Number(u[i]);if(o>s)return 1;if(s>o)return-1;if(!isNaN(o)&&isNaN(s))return 1;if(isNaN(o)&&!isNaN(s))return-1}return 0}});var T_t=I((nLu,Fbn)=>{Fbn.exports={author:{email:"gajus@gajus.com",name:"Gajus Kuizinas",url:"http://gajus.com"},ava:{babel:{compileAsTests:["test/helpers/**/*"]},files:["test/roarr/**/*"],require:["@babel/register"]},dependencies:{boolean:"^3.0.1","detect-node":"^2.0.4",globalthis:"^1.0.1","json-stringify-safe":"^5.0.1","semver-compare":"^1.0.0","sprintf-js":"^1.1.2"},description:"JSON logger for Node.js and browser.",devDependencies:{"@ava/babel":"^1.0.1","@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/node":"^7.10.5","@babel/plugin-transform-flow-strip-types":"^7.10.4","@babel/preset-env":"^7.11.5","@babel/register":"^7.11.5",ava:"^3.12.1","babel-plugin-istanbul":"^6.0.0","babel-plugin-transform-export-default-name":"^2.0.4",coveralls:"^3.1.0","domain-parent":"^1.0.0",eslint:"^7.9.0","eslint-config-canonical":"^24.1.1","flow-bin":"^0.133.0","flow-copy-source":"^2.0.9",gitdown:"^3.1.3",husky:"^4.3.0",nyc:"^15.1.0","semantic-release":"^17.1.1"},engines:{node:">=8.0"},husky:{hooks:{"pre-commit":"npm run lint && npm run test && npm run build","pre-push":"gitdown ./.README/README.md --output-file ./README.md --check"}},keywords:["log","logger","json"],main:"./dist/log.js",name:"roarr",nyc:{include:["src/**/*.js"],instrument:!1,reporter:["text-lcov"],require:["@babel/register"],sourceMap:!1},license:"BSD-3-Clause",repository:{type:"git",url:"git@github.com:gajus/roarr.git"},scripts:{build:"rm -fr ./dist && NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps && flow-copy-source src dist","create-readme":"gitdown ./.README/README.md --output-file ./README.md",dev:"NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps --watch",lint:"eslint ./src ./test && flow",test:"NODE_ENV=test ava --serial --verbose"},version:"2.15.4"}});var P_t=I(hZ=>{"use strict";Object.defineProperty(hZ,"__esModule",{value:!0});hZ.default=void 0;var _bn=e=>({write:t=>{e.write(t+`
|
|
@@ -1221,9 +1221,9 @@ ${(0,Pt.emoji)("\u{1F50E}")} serverless registry [https://registry.serverless-de
|
|
|
1221
1221
|
depsCount: ${t},
|
|
1222
1222
|
deps: ${r}}`};var Dhu={keyword:"dependencies",type:"object",schemaType:"object",error:V2.error,code(e){let[t,r]=yhu(e);gur(e,t),vur(e,r)}};function yhu({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let u=Array.isArray(e[n])?t:r;u[n]=e[n]}return[t,r]}function gur(e,t=e.schema){let{gen:r,data:n,it:u}=e;if(Object.keys(t).length===0)return;let i=r.let("missing");for(let o in t){let s=t[o];if(s.length===0)continue;let a=(0,wN.propertyInData)(r,n,o,u.opts.ownProperties);e.setParams({property:o,depsCount:s.length,deps:s.join(", ")}),u.allErrors?r.if(a,()=>{for(let c of s)(0,wN.checkReportMissingProp)(e,c)}):(r.if((0,oIe._)`${a} && (${(0,wN.checkMissingProp)(e,s,i)})`),(0,wN.reportMissingProp)(e,i),r.else())}}V2.validatePropertyDeps=gur;function vur(e,t=e.schema){let{gen:r,data:n,keyword:u,it:i}=e,o=r.name("valid");for(let s in t)(0,vhu.alwaysValidSchema)(i,t[s])||(r.if((0,wN.propertyInData)(r,n,s,i.opts.ownProperties),()=>{let a=e.subschema({keyword:u,schemaProp:s},o);e.mergeValidEvaluated(a,o)},()=>r.var(o,!0)),e.ok(o))}V2.validateSchemaDeps=vur;V2.default=Dhu});var Eur=I(sIe=>{"use strict";Object.defineProperty(sIe,"__esModule",{value:!0});var yur=zn(),Ehu=bu(),bhu={message:"property name must be valid",params:({params:e})=>(0,yur._)`{propertyName: ${e.propertyName}}`},Chu={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:bhu,code(e){let{gen:t,schema:r,data:n,it:u}=e;if((0,Ehu.alwaysValidSchema)(u,r))return;let i=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},i),t.if((0,yur.not)(i),()=>{e.error(!0),u.allErrors||t.break()})}),e.ok(i)}};sIe.default=Chu});var cIe=I(aIe=>{"use strict";Object.defineProperty(aIe,"__esModule",{value:!0});var Uoe=hh(),n1=zn(),xhu=b6(),$oe=bu(),Ahu={message:"must NOT have additional properties",params:({params:e})=>(0,n1._)`{additionalProperty: ${e.additionalProperty}}`},Fhu={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Ahu,code(e){let{gen:t,schema:r,parentSchema:n,data:u,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:s,opts:a}=o;if(o.props=!0,a.removeAdditional!=="all"&&(0,$oe.alwaysValidSchema)(o,r))return;let c=(0,Uoe.allSchemaProperties)(n.properties),l=(0,Uoe.allSchemaProperties)(n.patternProperties);f(),e.ok((0,n1._)`${i} === ${xhu.default.errors}`);function f(){t.forIn("key",u,v=>{!c.length&&!l.length?d(v):t.if(p(v),()=>d(v))})}function p(v){let y;if(c.length>8){let g=(0,$oe.schemaRefOrVal)(o,n.properties,"properties");y=(0,Uoe.isOwnProperty)(t,g,v)}else c.length?y=(0,n1.or)(...c.map(g=>(0,n1._)`${v} === ${g}`)):y=n1.nil;return l.length&&(y=(0,n1.or)(y,...l.map(g=>(0,n1._)`${(0,Uoe.usePattern)(e,g)}.test(${v})`))),(0,n1.not)(y)}function h(v){t.code((0,n1._)`delete ${u}[${v}]`)}function d(v){if(a.removeAdditional==="all"||a.removeAdditional&&r===!1){h(v);return}if(r===!1){e.setParams({additionalProperty:v}),e.error(),s||t.break();return}if(typeof r=="object"&&!(0,$oe.alwaysValidSchema)(o,r)){let y=t.name("valid");a.removeAdditional==="failing"?(m(v,y,!1),t.if((0,n1.not)(y),()=>{e.reset(),h(v)})):(m(v,y),s||t.if((0,n1.not)(y),()=>t.break()))}}function m(v,y,g){let D={keyword:"additionalProperties",dataProp:v,dataPropType:$oe.Type.Str};g===!1&&Object.assign(D,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(D,y)}}};aIe.default=Fhu});var xur=I(fIe=>{"use strict";Object.defineProperty(fIe,"__esModule",{value:!0});var _hu=gN(),bur=hh(),lIe=bu(),Cur=cIe(),Bhu={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:u,it:i}=e;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Cur.default.code(new _hu.KeywordCxt(i,Cur.default,"additionalProperties"));let o=(0,bur.allSchemaProperties)(r);for(let f of o)i.definedProperties.add(f);i.opts.unevaluated&&o.length&&i.props!==!0&&(i.props=lIe.mergeEvaluated.props(t,(0,lIe.toHash)(o),i.props));let s=o.filter(f=>!(0,lIe.alwaysValidSchema)(i,r[f]));if(s.length===0)return;let a=t.name("valid");for(let f of s)c(f)?l(f):(t.if((0,bur.propertyInData)(t,u,f,i.opts.ownProperties)),l(f),i.allErrors||t.else().var(a,!0),t.endIf()),e.it.definedProperties.add(f),e.ok(a);function c(f){return i.opts.useDefaults&&!i.compositeRule&&r[f].default!==void 0}function l(f){e.subschema({keyword:"properties",schemaProp:f,dataProp:f},a)}}};fIe.default=Bhu});var Bur=I(pIe=>{"use strict";Object.defineProperty(pIe,"__esModule",{value:!0});var Aur=hh(),zoe=zn(),Fur=bu(),_ur=bu(),whu={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:u,it:i}=e,{opts:o}=i,s=(0,Aur.allSchemaProperties)(r),a=s.filter(m=>(0,Fur.alwaysValidSchema)(i,r[m]));if(s.length===0||a.length===s.length&&(!i.opts.unevaluated||i.props===!0))return;let c=o.strictSchema&&!o.allowMatchingProperties&&u.properties,l=t.name("valid");i.props!==!0&&!(i.props instanceof zoe.Name)&&(i.props=(0,_ur.evaluatedPropsToName)(t,i.props));let{props:f}=i;p();function p(){for(let m of s)c&&h(m),i.allErrors?d(m):(t.var(l,!0),d(m),t.if(l))}function h(m){for(let v in c)new RegExp(m).test(v)&&(0,Fur.checkStrictMode)(i,`property ${v} matches pattern ${m} (use allowMatchingProperties)`)}function d(m){t.forIn("key",n,v=>{t.if((0,zoe._)`${(0,Aur.usePattern)(e,m)}.test(${v})`,()=>{let y=a.includes(m);y||e.subschema({keyword:"patternProperties",schemaProp:m,dataProp:v,dataPropType:_ur.Type.Str},l),i.opts.unevaluated&&f!==!0?t.assign((0,zoe._)`${f}[${v}]`,!0):!y&&!i.allErrors&&t.if((0,zoe.not)(l),()=>t.break())})})}}};pIe.default=whu});var wur=I(hIe=>{"use strict";Object.defineProperty(hIe,"__esModule",{value:!0});var Shu=bu(),Ohu={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,Shu.alwaysValidSchema)(n,r)){e.fail();return}let u=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},u),e.failResult(u,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};hIe.default=Ohu});var Sur=I(dIe=>{"use strict";Object.defineProperty(dIe,"__esModule",{value:!0});var Thu=hh(),Phu={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Thu.validateUnion,error:{message:"must match a schema in anyOf"}};dIe.default=Phu});var Our=I(mIe=>{"use strict";Object.defineProperty(mIe,"__esModule",{value:!0});var Woe=zn(),khu=bu(),Rhu={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Woe._)`{passingSchemas: ${e.passing}}`},Ihu={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Rhu,code(e){let{gen:t,schema:r,parentSchema:n,it:u}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(u.opts.discriminator&&n.discriminator)return;let i=r,o=t.let("valid",!1),s=t.let("passing",null),a=t.name("_valid");e.setParams({passing:s}),t.block(c),e.result(o,()=>e.reset(),()=>e.error(!0));function c(){i.forEach((l,f)=>{let p;(0,khu.alwaysValidSchema)(u,l)?t.var(a,!0):p=e.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},a),f>0&&t.if((0,Woe._)`${a} && ${o}`).assign(o,!1).assign(s,(0,Woe._)`[${s}, ${f}]`).else(),t.if(a,()=>{t.assign(o,!0),t.assign(s,f),p&&e.mergeEvaluated(p,Woe.Name)})})}}};mIe.default=Ihu});var Tur=I(gIe=>{"use strict";Object.defineProperty(gIe,"__esModule",{value:!0});var jhu=bu(),Lhu={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let u=t.name("valid");r.forEach((i,o)=>{if((0,jhu.alwaysValidSchema)(n,i))return;let s=e.subschema({keyword:"allOf",schemaProp:o},u);e.ok(u),e.mergeEvaluated(s)})}};gIe.default=Lhu});var Rur=I(vIe=>{"use strict";Object.defineProperty(vIe,"__esModule",{value:!0});var Goe=zn(),kur=bu(),Nhu={message:({params:e})=>(0,Goe.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Goe._)`{failingKeyword: ${e.ifClause}}`},qhu={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Nhu,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,kur.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let u=Pur(n,"then"),i=Pur(n,"else");if(!u&&!i)return;let o=t.let("valid",!0),s=t.name("_valid");if(a(),e.reset(),u&&i){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(s,c("then",l),c("else",l))}else u?t.if(s,c("then")):t.if((0,Goe.not)(s),c("else"));e.pass(o,()=>e.error(!0));function a(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(l)}function c(l,f){return()=>{let p=e.subschema({keyword:l},s);t.assign(o,s),e.mergeValidEvaluated(p,o),f?t.assign(f,(0,Goe._)`${l}`):e.setParams({ifClause:l})}}}};function Pur(e,t){let r=e.schema[t];return r!==void 0&&!(0,kur.alwaysValidSchema)(e,r)}vIe.default=qhu});var Iur=I(DIe=>{"use strict";Object.defineProperty(DIe,"__esModule",{value:!0});var Mhu=bu(),Uhu={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,Mhu.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};DIe.default=Uhu});var jur=I(yIe=>{"use strict";Object.defineProperty(yIe,"__esModule",{value:!0});var $hu=tIe(),zhu=pur(),Whu=rIe(),Ghu=dur(),Vhu=mur(),Hhu=Dur(),Khu=Eur(),Yhu=cIe(),Jhu=xur(),Xhu=Bur(),Qhu=wur(),Zhu=Sur(),edu=Our(),tdu=Tur(),rdu=Rur(),ndu=Iur();function udu(e=!1){let t=[Qhu.default,Zhu.default,edu.default,tdu.default,rdu.default,ndu.default,Khu.default,Yhu.default,Hhu.default,Jhu.default,Xhu.default];return e?t.push(zhu.default,Ghu.default):t.push($hu.default,Whu.default),t.push(Vhu.default),t}yIe.default=udu});var Lur=I(EIe=>{"use strict";Object.defineProperty(EIe,"__esModule",{value:!0});var Vo=zn(),idu={message:({schemaCode:e})=>(0,Vo.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Vo._)`{format: ${e}}`},odu={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:idu,code(e,t){let{gen:r,data:n,$data:u,schema:i,schemaCode:o,it:s}=e,{opts:a,errSchemaPath:c,schemaEnv:l,self:f}=s;if(!a.validateFormats)return;u?p():h();function p(){let d=r.scopeValue("formats",{ref:f.formats,code:a.code.formats}),m=r.const("fDef",(0,Vo._)`${d}[${o}]`),v=r.let("fType"),y=r.let("format");r.if((0,Vo._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(v,(0,Vo._)`${m}.type || "string"`).assign(y,(0,Vo._)`${m}.validate`),()=>r.assign(v,(0,Vo._)`"string"`).assign(y,m)),e.fail$data((0,Vo.or)(g(),D()));function g(){return a.strictSchema===!1?Vo.nil:(0,Vo._)`${o} && !${y}`}function D(){let E=l.$async?(0,Vo._)`(${m}.async ? await ${y}(${n}) : ${y}(${n}))`:(0,Vo._)`${y}(${n})`,b=(0,Vo._)`(typeof ${y} == "function" ? ${E} : ${y}.test(${n}))`;return(0,Vo._)`${y} && ${y} !== true && ${v} === ${t} && !${b}`}}function h(){let d=f.formats[i];if(!d){g();return}if(d===!0)return;let[m,v,y]=D(d);m===t&&e.pass(E());function g(){if(a.strictSchema===!1){f.logger.warn(b());return}throw new Error(b());function b(){return`unknown format "${i}" ignored in schema at path "${c}"`}}function D(b){let C=b instanceof RegExp?(0,Vo.regexpCode)(b):a.code.formats?(0,Vo._)`${a.code.formats}${(0,Vo.getProperty)(i)}`:void 0,x=r.scopeValue("formats",{key:i,ref:b,code:C});return typeof b=="object"&&!(b instanceof RegExp)?[b.type||"string",b.validate,(0,Vo._)`${x}.validate`]:["string",b,x]}function E(){if(typeof d=="object"&&!(d instanceof RegExp)&&d.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Vo._)`await ${y}(${n})`}return typeof v=="function"?(0,Vo._)`${y}(${n})`:(0,Vo._)`${y}.test(${n})`}}}};EIe.default=odu});var Nur=I(bIe=>{"use strict";Object.defineProperty(bIe,"__esModule",{value:!0});var sdu=Lur(),adu=[sdu.default];bIe.default=adu});var qur=I(P_=>{"use strict";Object.defineProperty(P_,"__esModule",{value:!0});P_.contentVocabulary=P_.metadataVocabulary=void 0;P_.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];P_.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Uur=I(CIe=>{"use strict";Object.defineProperty(CIe,"__esModule",{value:!0});var cdu=Knr(),ldu=aur(),fdu=jur(),pdu=Nur(),Mur=qur(),hdu=[cdu.default,ldu.default,(0,fdu.default)(),pdu.default,Mur.metadataVocabulary,Mur.contentVocabulary];CIe.default=hdu});var $ur=I(SN=>{"use strict";Object.defineProperty(SN,"__esModule",{value:!0});SN.DiscrError=void 0;var ddu;(function(e){e.Tag="tag",e.Mapping="mapping"})(ddu=SN.DiscrError||(SN.DiscrError={}))});var Wur=I(AIe=>{"use strict";Object.defineProperty(AIe,"__esModule",{value:!0});var k_=zn(),xIe=$ur(),zur=Ooe(),mdu=bu(),gdu={message:({params:{discrError:e,tagName:t}})=>e===xIe.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,k_._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},vdu={keyword:"discriminator",type:"object",schemaType:"object",error:gdu,code(e){let{gen:t,data:r,schema:n,parentSchema:u,it:i}=e,{oneOf:o}=u;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=n.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");let a=t.let("valid",!1),c=t.const("tag",(0,k_._)`${r}${(0,k_.getProperty)(s)}`);t.if((0,k_._)`typeof ${c} == "string"`,()=>l(),()=>e.error(!1,{discrError:xIe.DiscrError.Tag,tag:c,tagName:s})),e.ok(a);function l(){let h=p();t.if(!1);for(let d in h)t.elseIf((0,k_._)`${c} === ${d}`),t.assign(a,f(h[d]));t.else(),e.error(!1,{discrError:xIe.DiscrError.Mapping,tag:c,tagName:s}),t.endIf()}function f(h){let d=t.name("valid"),m=e.subschema({keyword:"oneOf",schemaProp:h},d);return e.mergeEvaluated(m,k_.Name),d}function p(){var h;let d={},m=y(u),v=!0;for(let E=0;E<o.length;E++){let b=o[E];b!=null&&b.$ref&&!(0,mdu.schemaHasRulesButRef)(b,i.self.RULES)&&(b=zur.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,b==null?void 0:b.$ref),b instanceof zur.SchemaEnv&&(b=b.schema));let C=(h=b==null?void 0:b.properties)===null||h===void 0?void 0:h[s];if(typeof C!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);v=v&&(m||y(b)),g(C,E)}if(!v)throw new Error(`discriminator: "${s}" must be required`);return d;function y({required:E}){return Array.isArray(E)&&E.includes(s)}function g(E,b){if(E.const)D(E.const,b);else if(E.enum)for(let C of E.enum)D(C,b);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function D(E,b){if(typeof E!="string"||E in d)throw new Error(`discriminator: "${s}" values must be unique strings`);d[E]=b}}}};AIe.default=vdu});var Gur=I((wii,Ddu)=>{Ddu.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Kur=I((fo,Hur)=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.MissingRefError=fo.ValidationError=fo.CodeGen=fo.Name=fo.nil=fo.stringify=fo.str=fo._=fo.KeywordCxt=void 0;var ydu=$nr(),Edu=Uur(),bdu=Wur(),Vur=Gur(),Cdu=["/properties"],Voe="http://json-schema.org/draft-07/schema",Hoe=class extends ydu.default{_addVocabularies(){super._addVocabularies(),Edu.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(bdu.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Vur,Cdu):Vur;this.addMetaSchema(t,Voe,!1),this.refs["http://json-schema.org/schema"]=Voe}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Voe)?Voe:void 0)}};Hur.exports=fo=Hoe;Object.defineProperty(fo,"__esModule",{value:!0});fo.default=Hoe;var xdu=gN();Object.defineProperty(fo,"KeywordCxt",{enumerable:!0,get:function(){return xdu.KeywordCxt}});var R_=zn();Object.defineProperty(fo,"_",{enumerable:!0,get:function(){return R_._}});Object.defineProperty(fo,"str",{enumerable:!0,get:function(){return R_.str}});Object.defineProperty(fo,"stringify",{enumerable:!0,get:function(){return R_.stringify}});Object.defineProperty(fo,"nil",{enumerable:!0,get:function(){return R_.nil}});Object.defineProperty(fo,"Name",{enumerable:!0,get:function(){return R_.Name}});Object.defineProperty(fo,"CodeGen",{enumerable:!0,get:function(){return R_.CodeGen}});var Adu=Boe();Object.defineProperty(fo,"ValidationError",{enumerable:!0,get:function(){return Adu.default}});var Fdu=woe();Object.defineProperty(fo,"MissingRefError",{enumerable:!0,get:function(){return Fdu.default}})});var Yur,sD,Jur,_du,Xur,Bdu,Qur=wt(()=>{Rr();En();Yur=ot(w0());ru();sD=ot(ir()),Jur=ot(Kur()),_du=`Verify Yaml format and values.
|
|
1223
1223
|
|
|
1224
|
-
${(0,Pt.emoji)("\u{1F4D6}")} Document: ${Dt.underline("https://serverless.help/t/s/verify")}`,Xur=e=>{e.command("verify").usage("[commands] [options]").description(_du).summary(`${(0,Pt.emoji)("\u{1F52D}")} Verify Yaml content`).addHelpCommand(!1).helpOption("-h, --help","Display help for command").action(async t=>{let{template:r,env:n}=e.optsWithGlobals(),u=new Jur.default({allErrors:!0});await Tx(n);let i=await new Yur.default(r,{logger:Ft}).start(),o=await Bdu(i,u);if(!(0,sD.isEmpty)(o))throw new Error(u.errorsText(o,{dataVar:"",separator:`
|
|
1224
|
+
${(0,Pt.emoji)("\u{1F4D6}")} Document: ${Dt.underline("https://serverless.help/t/s/verify")}`,Xur=e=>{e.command("verify").usage("[commands] [options]").description(_du).summary(`${(0,Pt.emoji)("\u{1F52D}")} Verify Yaml content`).addHelpCommand(!1).helpOption("-h, --help","Display help for command").action(async t=>{let{template:r,env:n}=e.optsWithGlobals(),u=new Jur.default({allErrors:!0});await Tx(n);let i=await new Yur.default(r,{logger:Ft}).start();if((0,sD.get)(i,"yaml.use3x")){let o=await Bdu(i,u);if(!(0,sD.isEmpty)(o))throw new Error(u.errorsText(o,{dataVar:"",separator:`
|
|
1225
1225
|
|
|
1226
|
-
`}));if((0,sD.get)(i,"yaml.use3x"))return Ft.debug(`Template: ${(0,sD.get)(i,"yaml.path")}`),Ft.write(Dt.green(`Verify [${(0,sD.get)(i,"yaml.path","").split("/").pop()}] success!`));Ft.tips(`Not support template: ${(0,sD.get)(i,"yaml.path")}, you can update template to 3.x version`)})},Bdu=async(e,t)=>{let r=[];for(let n of e.steps){let u=await FBt(n.component);if((0,sD.isEmpty)(u))continue;let i=t.compile(JSON.parse(u));if(!i(n.props)){let o=i.errors;for(let s of o)s.instancePath=n.projectName+"/props"+s.instancePath,s.keyword==="enum"&&(s.message=s.message+": "+s.params.allowedValues.join(", "));r=r.concat(o)}}return r}});var gh=I(x6=>{"use strict";Object.defineProperty(x6,"__esModule",{value:!0});x6.__assign=function(){return x6.__assign=Object.assign||function(t){for(var r,n=1,u=arguments.length;n<u;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},x6.__assign.apply(this,arguments)};function wdu(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,n=Object.getOwnPropertySymbols(e);u<n.length;u++)t.indexOf(n[u])<0&&Object.prototype.propertyIsEnumerable.call(e,n[u])&&(r[n[u]]=e[n[u]]);return r}function Sdu(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Odu(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),u,i=[],o;try{for(;(t===void 0||t-- >0)&&!(u=n.next()).done;)i.push(u.value)}catch(s){o={error:s}}finally{try{u&&!u.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}function Tdu(e,t,r){if(r||arguments.length===2)for(var n=0,u=t.length,i;n<u;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}x6.__read=Odu;x6.__rest=wdu;x6.__spreadArray=Tdu;x6.__values=Sdu});var A7=I(aD=>{"use strict";Object.defineProperty(aD,"__esModule",{value:!0});aD.ActionTypes=void 0;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(aD.ActionTypes||(aD.ActionTypes={}));aD.SpecialTargets=void 0;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(aD.SpecialTargets||(aD.SpecialTargets={}))});var I_=I(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});var Aa=A7(),Pdu=Aa.ActionTypes.Start,kdu=Aa.ActionTypes.Stop,Rdu=Aa.ActionTypes.Raise,Idu=Aa.ActionTypes.Send,jdu=Aa.ActionTypes.Cancel,Ldu=Aa.ActionTypes.NullEvent,Ndu=Aa.ActionTypes.Assign,qdu=Aa.ActionTypes.After,Mdu=Aa.ActionTypes.DoneState,Udu=Aa.ActionTypes.Log,$du=Aa.ActionTypes.Init,zdu=Aa.ActionTypes.Invoke,Wdu=Aa.ActionTypes.ErrorExecution,Gdu=Aa.ActionTypes.ErrorPlatform,Vdu=Aa.ActionTypes.ErrorCustom,Hdu=Aa.ActionTypes.Update,Kdu=Aa.ActionTypes.Choose,Ydu=Aa.ActionTypes.Pure;As.after=qdu;As.assign=Ndu;As.cancel=jdu;As.choose=Kdu;As.doneState=Mdu;As.error=Vdu;As.errorExecution=Wdu;As.errorPlatform=Gdu;As.init=$du;As.invoke=zdu;As.log=Udu;As.nullEvent=Ldu;As.pure=Ydu;As.raise=Rdu;As.send=Idu;As.start=Pdu;As.stop=kdu;As.update=Hdu});var Koe=I(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});var Jdu=".",Xdu={},Qdu="xstate.guard",Zdu="";j_.DEFAULT_GUARD_TYPE=Qdu;j_.EMPTY_ACTIVITY_MAP=Xdu;j_.STATE_DELIMITER=Jdu;j_.TARGETLESS_KEY=Zdu});var A6=I(FIe=>{"use strict";Object.defineProperty(FIe,"__esModule",{value:!0});var e1u=process.env.NODE_ENV==="production";FIe.IS_PRODUCTION=e1u});var i1=I(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});var Mf=gh(),t1u=A7(),Zur=I_(),ON=Koe(),wIe=A6(),Yoe;function r1u(e){return Object.keys(e)}function eir(e,t,r){r===void 0&&(r=ON.STATE_DELIMITER);var n=_Ie(e,r),u=_Ie(t,r);return u1(u)?u1(n)?u===n:!1:u1(n)?n in u:Object.keys(n).every(function(i){return i in u?eir(n[i],u[i]):!1})}function n1u(e){try{return u1(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function u1u(e){try{return u1(e)||typeof e=="number"?"".concat(e):H2(e)?e.name:e.type}catch{throw new Error("Actions must be strings or objects with a string action.type property.")}}function tir(e,t){try{return Joe(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function rir(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function _Ie(e,t){if(rir(e))return e.value;if(Joe(e))return BIe(e);if(typeof e!="string")return e;var r=tir(e,t);return BIe(r)}function BIe(e){if(e.length===1)return e[0];for(var t={},r=t,n=0;n<e.length-1;n++)n===e.length-2?r[e[n]]=e[n+1]:(r[e[n]]={},r=r[e[n]]);return t}function nir(e,t){for(var r={},n=Object.keys(e),u=0;u<n.length;u++){var i=n[u];r[i]=t(e[i],i,e,u)}return r}function i1u(e,t,r){var n,u,i={};try{for(var o=Mf.__values(Object.keys(e)),s=o.next();!s.done;s=o.next()){var a=s.value,c=e[a];r(c)&&(i[a]=t(c,a,e))}}catch(l){n={error:l}}finally{try{s&&!s.done&&(u=o.return)&&u.call(o)}finally{if(n)throw n.error}}return i}var o1u=function(e){return function(t){var r,n,u=t;try{for(var i=Mf.__values(e),o=i.next();!o.done;o=i.next()){var s=o.value;u=u[s]}}catch(a){r={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return u}};function s1u(e,t){return function(r){var n,u,i=r;try{for(var o=Mf.__values(e),s=o.next();!s.done;s=o.next()){var a=s.value;i=i[t][a]}}catch(c){n={error:c}}finally{try{s&&!s.done&&(u=o.return)&&u.call(o)}finally{if(n)throw n.error}}return i}}function uir(e){if(!e)return[[]];if(u1(e))return[[e]];var t=iir(Object.keys(e).map(function(r){var n=e[r];return typeof n!="string"&&(!n||!Object.keys(n).length)?[[r]]:uir(e[r]).map(function(u){return[r].concat(u)})}));return t}function a1u(e){var t,r,n={};if(e&&e.length===1&&e[0].length===1)return e[0][0];try{for(var u=Mf.__values(e),i=u.next();!i.done;i=u.next())for(var o=i.value,s=n,a=0;a<o.length;a++){var c=o[a];if(a===o.length-2){s[c]=o[a+1];break}s[c]=s[c]||{},s=s[c]}}catch(l){t={error:l}}finally{try{i&&!i.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return n}function iir(e){var t;return(t=[]).concat.apply(t,Mf.__spreadArray([],Mf.__read(e),!1))}function SIe(e){return Joe(e)?e:[e]}function oir(e){return e===void 0?[]:SIe(e)}function c1u(e,t,r){var n,u;if(H2(e))return e(t,r.data);var i={};try{for(var o=Mf.__values(Object.keys(e)),s=o.next();!s.done;s=o.next()){var a=s.value,c=e[a];H2(c)?i[a]=c(t,r.data):i[a]=c}}catch(l){n={error:l}}finally{try{s&&!s.done&&(u=o.return)&&u.call(o)}finally{if(n)throw n.error}}return i}function l1u(e){return/^(done|error)\./.test(e)}function f1u(e){return!!(e instanceof Promise||e!==null&&(H2(e)||typeof e=="object")&&H2(e.then))}function p1u(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function h1u(e,t){var r,n,u=Mf.__read([[],[]],2),i=u[0],o=u[1];try{for(var s=Mf.__values(e),a=s.next();!a.done;a=s.next()){var c=a.value;t(c)?i.push(c):o.push(c)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return[i,o]}function OIe(e,t){return nir(e.states,function(r,n){if(r){var u=(u1(t)?void 0:t[n])||(r?r.current:void 0);if(u)return{current:u,states:OIe(r,u)}}})}function d1u(e,t){return{current:t,states:OIe(e,t)}}function m1u(e,t,r,n){wIe.IS_PRODUCTION||nn.warn(!!e,"Attempting to update undefined context");var u=e&&r.reduce(function(i,o){var s,a,c=o.assignment,l={state:n,action:o,_event:t},f={};if(H2(c))f=c(i,t.data,l);else try{for(var p=Mf.__values(Object.keys(c)),h=p.next();!h.done;h=p.next()){var d=h.value,m=c[d];f[d]=H2(m)?m(i,t.data,l):m}}catch(v){s={error:v}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(s)throw s.error}}return Object.assign({},i,f)},e);return u}nn.warn=function(){};wIe.IS_PRODUCTION||(nn.warn=function(e,t){var r=e instanceof Error?e:void 0;if(!(!r&&e)&&console!==void 0){var n=["Warning: ".concat(t)];r&&n.push(r),console.warn.apply(console,n)}});function Joe(e){return Array.isArray(e)}function H2(e){return typeof e=="function"}function u1(e){return typeof e=="string"}function g1u(e,t){if(e)return u1(e)?{type:ON.DEFAULT_GUARD_TYPE,name:e,predicate:t?t[e]:void 0}:H2(e)?{type:ON.DEFAULT_GUARD_TYPE,name:e.name,predicate:e}:e}function v1u(e){try{return"subscribe"in e&&H2(e.subscribe)}catch{return!1}}var sir=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),D1u=(Yoe={},Yoe[sir]=function(){return this},Yoe[Symbol.observable]=function(){return this},Yoe);function air(e){return!!e&&"__xstatenode"in e}function y1u(e){return!!e&&typeof e.send=="function"}var E1u=function(){var e=0;return function(){return e++,e.toString(16)}}();function cir(e,t){return u1(e)||typeof e=="number"?Mf.__assign({type:e},t):e}function b1u(e,t){if(!u1(e)&&"$$type"in e&&e.$$type==="scxml")return e;var r=cir(e);return Mf.__assign({name:r.type,data:r,$$type:"scxml",type:"external"},t)}function C1u(e,t){var r=SIe(t).map(function(n){return typeof n>"u"||typeof n=="string"||air(n)?{target:n,event:e}:Mf.__assign(Mf.__assign({},n),{event:e})});return r}function x1u(e){if(!(e===void 0||e===ON.TARGETLESS_KEY))return oir(e)}function A1u(e,t,r){if(!wIe.IS_PRODUCTION){var n=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(r,"', error was '").concat(e,"'.").concat(n));else{var u=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(r,"'. ")+"Original error: '".concat(e,"'. ").concat(n," Current error is '").concat(t,"'.").concat(u))}}}function F1u(e,t,r,n,u){var i=e.options.guards,o={state:u,cond:t,_event:n};if(t.type===ON.DEFAULT_GUARD_TYPE)return((i==null?void 0:i[t.name])||t.predicate)(r,n.data,o);var s=i==null?void 0:i[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(r,n.data,o)}function _1u(e){return typeof e=="string"?{type:e}:e}function B1u(e,t,r){var n=function(){},u=typeof e=="object",i=u?e:null;return{next:((u?e.next:e)||n).bind(i),error:((u?e.error:t)||n).bind(i),complete:((u?e.complete:r)||n).bind(i)}}function w1u(e,t){return"".concat(e,":invocation[").concat(t,"]")}function S1u(e){return(e.type===Zur.raise||e.type===Zur.send&&e.to===t1u.SpecialTargets.Internal)&&typeof e.delay!="number"}nn.createInvokeId=w1u;nn.evaluateGuard=F1u;nn.flatten=iir;nn.getActionType=u1u;nn.getEventType=n1u;nn.interopSymbols=D1u;nn.isActor=y1u;nn.isArray=Joe;nn.isBehavior=p1u;nn.isBuiltInEvent=l1u;nn.isFunction=H2;nn.isMachine=air;nn.isObservable=v1u;nn.isPromiseLike=f1u;nn.isRaisableAction=S1u;nn.isStateLike=rir;nn.isString=u1;nn.keys=r1u;nn.mapContext=c1u;nn.mapFilterValues=i1u;nn.mapValues=nir;nn.matchesState=eir;nn.nestedPath=s1u;nn.normalizeTarget=x1u;nn.partition=h1u;nn.path=o1u;nn.pathToStateValue=BIe;nn.pathsToStateValue=a1u;nn.reportUnhandledExceptionOnInvocation=A1u;nn.symbolObservable=sir;nn.toArray=oir;nn.toArrayStrict=SIe;nn.toEventObject=cir;nn.toGuard=g1u;nn.toInvokeSource=_1u;nn.toObserver=B1u;nn.toSCXMLEvent=b1u;nn.toStatePath=tir;nn.toStatePaths=uir;nn.toStateValue=_Ie;nn.toTransitionConfigArray=C1u;nn.uniqueId=E1u;nn.updateContext=m1u;nn.updateHistoryStates=OIe;nn.updateHistoryValue=d1u});var L_=I(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});var Cu=gh(),vh=A7(),Fa=I_(),uu=i1(),lir=A6(),O1u=uu.toSCXMLEvent({type:Fa.init});function TIe(e,t){return t&&t[e]||void 0}function Xoe(e,t){var r;if(uu.isString(e)||typeof e=="number"){var n=TIe(e,t);uu.isFunction(n)?r={type:e,exec:n}:n?r=n:r={type:e,exec:void 0}}else if(uu.isFunction(e))r={type:e.name||e.toString(),exec:e};else{var n=TIe(e.type,t);if(uu.isFunction(n))r=Cu.__assign(Cu.__assign({},e),{exec:n});else if(n){var u=n.type||e.type;r=Cu.__assign(Cu.__assign(Cu.__assign({},n),e),{type:u})}else r=e}return r}var PIe=function(e,t){if(!e)return[];var r=uu.isArray(e)?e:[e];return r.map(function(n){return Xoe(n,t)})};function RIe(e){var t=Xoe(e);return Cu.__assign(Cu.__assign({id:uu.isString(e)?e:t.id},t),{type:t.type})}function T1u(e,t){return{type:Fa.raise,event:typeof e=="function"?e:uu.toEventObject(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function fir(e,t,r,n){var u={_event:r},i=uu.toSCXMLEvent(uu.isFunction(e.event)?e.event(t,r.data,u):e.event),o;if(uu.isString(e.delay)){var s=n&&n[e.delay];o=uu.isFunction(s)?s(t,r.data,u):s}else o=uu.isFunction(e.delay)?e.delay(t,r.data,u):e.delay;return Cu.__assign(Cu.__assign({},e),{type:Fa.raise,_event:i,delay:o})}function TN(e,t){return{to:t?t.to:void 0,type:Fa.send,event:uu.isFunction(e)?e:uu.toEventObject(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:uu.isFunction(e)?e.name:uu.getEventType(e)}}function pir(e,t,r,n){var u={_event:r},i=uu.toSCXMLEvent(uu.isFunction(e.event)?e.event(t,r.data,u):e.event),o;if(uu.isString(e.delay)){var s=n&&n[e.delay];o=uu.isFunction(s)?s(t,r.data,u):s}else o=uu.isFunction(e.delay)?e.delay(t,r.data,u):e.delay;var a=uu.isFunction(e.to)?e.to(t,r.data,u):e.to;return Cu.__assign(Cu.__assign({},e),{to:a,_event:i,event:i.data,delay:o})}function IIe(e,t){return TN(e,Cu.__assign(Cu.__assign({},t),{to:vh.SpecialTargets.Parent}))}function P1u(e,t,r){return TN(t,Cu.__assign(Cu.__assign({},r),{to:e}))}function k1u(){return IIe(Fa.update)}function R1u(e,t){return TN(e,Cu.__assign(Cu.__assign({},t),{to:function(r,n,u){var i=u._event;return i.origin}}))}var I1u=function(e,t){return{context:e,event:t}};function j1u(e,t){return e===void 0&&(e=I1u),{type:Fa.log,label:t,expr:e}}var hir=function(e,t,r){return Cu.__assign(Cu.__assign({},e),{value:uu.isString(e.expr)?e.expr:e.expr(t,r.data,{_event:r})})},L1u=function(e){return{type:Fa.cancel,sendId:e}};function N1u(e){var t=RIe(e);return{type:vh.ActionTypes.Start,activity:t,exec:void 0}}function q1u(e){var t=uu.isFunction(e)?e:RIe(e);return{type:vh.ActionTypes.Stop,activity:t,exec:void 0}}function dir(e,t,r){var n=uu.isFunction(e.activity)?e.activity(t,r.data):e.activity,u=typeof n=="string"?{id:n}:n,i={type:vh.ActionTypes.Stop,activity:u};return i}var M1u=function(e){return{type:Fa.assign,assignment:e}};function U1u(e){return typeof e=="object"&&"type"in e}function $1u(e,t){var r=t?"#".concat(t):"";return"".concat(vh.ActionTypes.After,"(").concat(e,")").concat(r)}function z1u(e,t){var r="".concat(vh.ActionTypes.DoneState,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function W1u(e,t){var r="".concat(vh.ActionTypes.DoneInvoke,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function G1u(e,t){var r="".concat(vh.ActionTypes.ErrorPlatform,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function V1u(e){return{type:vh.ActionTypes.Pure,get:e}}function H1u(e,t){if(!lir.IS_PRODUCTION&&(!e||typeof e=="function")){var r=e;e=function(){for(var n=[],u=0;u<arguments.length;u++)n[u]=arguments[u];var i=typeof r=="function"?r.apply(void 0,Cu.__spreadArray([],Cu.__read(n),!1)):r;if(!i)throw new Error("Attempted to forward event to undefined actor. This risks an infinite loop in the sender.");return i}}return TN(function(n,u){return u},Cu.__assign(Cu.__assign({},t),{to:e}))}function K1u(e,t){return IIe(function(r,n,u){return{type:Fa.error,data:uu.isFunction(e)?e(r,n,u):e}},Cu.__assign(Cu.__assign({},t),{to:vh.SpecialTargets.Parent}))}function Y1u(e){return{type:vh.ActionTypes.Choose,conds:e}}var J1u=function(e){var t,r,n=[];try{for(var u=Cu.__values(e),i=u.next();!i.done;i=u.next())for(var o=i.value,s=0;s<o.actions.length;){if(o.actions[s].type===Fa.assign){n.push(o.actions[s]),o.actions.splice(s,1);continue}s++}}catch(a){t={error:a}}finally{try{i&&!i.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return n};function kIe(e,t,r,n,u,i,o){o===void 0&&(o=!1);var s=o?[]:J1u(u),a=s.length?uu.updateContext(r,n,s,t):r,c=o?[r]:void 0,l=[];function f(d,m){var v;switch(m.type){case Fa.raise:{var y=fir(m,a,n,e.options.delays);return i&&typeof y.delay=="number"&&i(y,a,n),y}case Fa.send:var g=pir(m,a,n,e.options.delays);if(!lir.IS_PRODUCTION){var D=m.delay;uu.warn(!uu.isString(D)||typeof g.delay=="number","No delay reference for delay expression '".concat(D,"' was found on machine '").concat(e.id,"'"))}return i&&g.to!==vh.SpecialTargets.Internal&&(d==="entry"?l.push(g):i(g,a,n)),g;case Fa.log:{var E=hir(m,a,n);return i==null||i(E,a,n),E}case Fa.choose:{var b=m,C=(v=b.conds.find(function($){var W=uu.toGuard($.cond,e.options.guards);return!W||uu.evaluateGuard(e,W,a,n,i?void 0:t)}))===null||v===void 0?void 0:v.actions;if(!C)return[];var x=Cu.__read(kIe(e,t,a,n,[{type:d,actions:PIe(uu.toArray(C),e.options.actions)}],i,o),2),F=x[0],A=x[1];return a=A,c==null||c.push(a),F}case Fa.pure:{var C=m.get(a,n.data);if(!C)return[];var S=Cu.__read(kIe(e,t,a,n,[{type:d,actions:PIe(uu.toArray(C),e.options.actions)}],i,o),2),B=S[0],O=S[1];return a=O,c==null||c.push(a),B}case Fa.stop:{var E=dir(m,a,n);return i==null||i(E,r,n),E}case Fa.assign:{a=uu.updateContext(a,n,[m],i?void 0:t),c==null||c.push(a);break}default:var T=Xoe(m,e.options.actions),P=T.exec;if(i)i(T,a,n);else if(P&&c){var N=c.length-1,L=Cu.__assign(Cu.__assign({},T),{exec:function($){for(var W=[],j=1;j<arguments.length;j++)W[j-1]=arguments[j];P.apply(void 0,Cu.__spreadArray([c[N]],Cu.__read(W),!1))}});T=L}return T}}function p(d){var m,v,y=[];try{for(var g=Cu.__values(d.actions),D=g.next();!D.done;D=g.next()){var E=D.value,b=f(d.type,E);b&&(y=y.concat(b))}}catch(C){m={error:C}}finally{try{D&&!D.done&&(v=g.return)&&v.call(g)}finally{if(m)throw m.error}}return l.forEach(function(C){i(C,a,n)}),l.length=0,y}var h=uu.flatten(u.map(p));return[h,a]}xu.actionTypes=Fa;xu.after=$1u;xu.assign=M1u;xu.cancel=L1u;xu.choose=Y1u;xu.done=z1u;xu.doneInvoke=W1u;xu.error=G1u;xu.escalate=K1u;xu.forwardTo=H1u;xu.getActionFunction=TIe;xu.initEvent=O1u;xu.isActionObject=U1u;xu.log=j1u;xu.pure=V1u;xu.raise=T1u;xu.resolveActions=kIe;xu.resolveLog=hir;xu.resolveRaise=fir;xu.resolveSend=pir;xu.resolveStop=dir;xu.respond=R1u;xu.send=TN;xu.sendParent=IIe;xu.sendTo=P1u;xu.sendUpdate=k1u;xu.start=N1u;xu.stop=q1u;xu.toActionObject=Xoe;xu.toActionObjects=PIe;xu.toActivityDefinition=RIe});var jIe=I(Zoe=>{"use strict";Object.defineProperty(Zoe,"__esModule",{value:!0});var Qoe=[],X1u=function(e,t){Qoe.push(e);var r=t(e);return Qoe.pop(),r},Q1u=function(e){return e(Qoe[Qoe.length-1])};Zoe.consume=Q1u;Zoe.provide=X1u});var kN=I(cD=>{"use strict";Object.defineProperty(cD,"__esModule",{value:!0});var Z1u=gh(),PN=i1(),e2u=jIe();function LIe(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[PN.symbolObservable]=function(){return this},t}function t2u(e,t,r,n){var u,i=PN.toInvokeSource(e.src),o=(u=t==null?void 0:t.options.services)===null||u===void 0?void 0:u[i.type],s=e.data?PN.mapContext(e.data,r,n):void 0,a=o?mir(o,e.id,s):LIe(e.id);return a.meta=e,a}function mir(e,t,r){var n=LIe(t);if(n.deferred=!0,PN.isMachine(e)){var u=n.state=e2u.provide(void 0,function(){return(r?e.withContext(r):e).initialState});n.getSnapshot=function(){return u}}return n}function gir(e){try{return typeof e.send=="function"}catch{return!1}}function r2u(e){return gir(e)&&"id"in e}function n2u(e){var t;return Z1u.__assign((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[PN.symbolObservable]=function(){return this},t),e)}cD.createDeferredActor=mir;cD.createInvocableActor=t2u;cD.createNullActor=LIe;cD.isActor=gir;cD.isSpawnedActor=r2u;cD.toActorRef=n2u});var MIe=I(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});var F6=gh(),NIe=i1(),qIe=function(e){return e.type==="atomic"||e.type==="final"};function vir(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function RN(e){return vir(e).filter(function(t){return t.type!=="history"})}function Dir(e){var t=[e];return qIe(e)?t:t.concat(NIe.flatten(RN(e).map(Dir)))}function yir(e,t){var r,n,u,i,o,s,a,c,l=new Set(e),f=ese(l),p=new Set(t);try{for(var h=F6.__values(p),d=h.next();!d.done;d=h.next())for(var m=d.value,v=m.parent;v&&!p.has(v);)p.add(v),v=v.parent}catch(A){r={error:A}}finally{try{d&&!d.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}var y=ese(p);try{for(var g=F6.__values(p),D=g.next();!D.done;D=g.next()){var m=D.value;if(m.type==="compound"&&(!y.get(m)||!y.get(m).length))f.get(m)?f.get(m).forEach(function(S){return p.add(S)}):m.initialStateNodes.forEach(function(S){return p.add(S)});else if(m.type==="parallel")try{for(var E=(o=void 0,F6.__values(RN(m))),b=E.next();!b.done;b=E.next()){var C=b.value;p.has(C)||(p.add(C),f.get(C)?f.get(C).forEach(function(S){return p.add(S)}):C.initialStateNodes.forEach(function(S){return p.add(S)}))}}catch(S){o={error:S}}finally{try{b&&!b.done&&(s=E.return)&&s.call(E)}finally{if(o)throw o.error}}}}catch(A){u={error:A}}finally{try{D&&!D.done&&(i=g.return)&&i.call(g)}finally{if(u)throw u.error}}try{for(var x=F6.__values(p),F=x.next();!F.done;F=x.next())for(var m=F.value,v=m.parent;v&&!p.has(v);)p.add(v),v=v.parent}catch(A){a={error:A}}finally{try{F&&!F.done&&(c=x.return)&&c.call(x)}finally{if(a)throw a.error}}return p}function Eir(e,t){var r=t.get(e);if(!r)return{};if(e.type==="compound"){var n=r[0];if(n){if(qIe(n))return n.key}else return{}}var u={};return r.forEach(function(i){u[i.key]=Eir(i,t)}),u}function ese(e){var t,r,n=new Map;try{for(var u=F6.__values(e),i=u.next();!i.done;i=u.next()){var o=i.value;n.has(o)||n.set(o,[]),o.parent&&(n.has(o.parent)||n.set(o.parent,[]),n.get(o.parent).push(o))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return n}function u2u(e,t){var r=yir([e],t);return Eir(e,ese(r))}function bir(e,t){return Array.isArray(e)?e.some(function(r){return r===t}):e instanceof Set?e.has(t):!1}function i2u(e){return F6.__spreadArray([],F6.__read(new Set(NIe.flatten(F6.__spreadArray([],F6.__read(e.map(function(t){return t.ownEvents})),!1)))),!1)}function Cir(e,t){return t.type==="compound"?RN(t).some(function(r){return r.type==="final"&&bir(e,r)}):t.type==="parallel"?RN(t).every(function(r){return Cir(e,r)}):!1}function o2u(e){return e===void 0&&(e=[]),e.reduce(function(t,r){return r.meta!==void 0&&(t[r.id]=r.meta),t},{})}function s2u(e){return new Set(NIe.flatten(e.map(function(t){return t.tags})))}Uf.getAdjList=ese;Uf.getAllChildren=vir;Uf.getAllStateNodes=Dir;Uf.getChildren=RN;Uf.getConfiguration=yir;Uf.getMeta=o2u;Uf.getTagsFromConfiguration=s2u;Uf.getValue=u2u;Uf.has=bir;Uf.isInFinalState=Cir;Uf.isLeafNode=qIe;Uf.nextEvents=i2u});var jN=I(_7=>{"use strict";Object.defineProperty(_7,"__esModule",{value:!0});var F7=gh(),xir=Koe(),IN=i1(),Air=MIe(),Fir=L_(),a2u=A6();function _ir(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(IN.isString(e)||IN.isString(t))return e===t;var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(function(u){return _ir(e[u],t[u])})}function Bir(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}var c2u=Bir;function l2u(e,t){var r=e.exec,n=F7.__assign(F7.__assign({},e),{exec:r!==void 0?function(){return r(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return n}var f2u=function(){function e(t){var r=this,n;this.actions=[],this.activities=xir.EMPTY_ACTIVITY_MAP,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||xir.EMPTY_ACTIVITY_MAP,this.meta=Air.getMeta(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(n=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&n!==void 0?n:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return Air.nextEvents(r.configuration)}})}return e.from=function(t,r){if(t instanceof e)return t.context!==r?new e({value:t.value,context:r,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t;var n=Fir.initEvent;return new e({value:t,context:r,_event:n,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,r){if(t instanceof e){if(!t.actions.length)return t;var n=Fir.initEvent;return new e({value:t.value,context:r,_event:n,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,r)},e.prototype.toStrings=function(t,r){var n=this;if(t===void 0&&(t=this.value),r===void 0&&(r="."),IN.isString(t))return[t];var u=Object.keys(t);return u.concat.apply(u,F7.__spreadArray([],F7.__read(u.map(function(i){return n.toStrings(t[i],r).map(function(o){return i+r+o})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var r=t.tags;t.machine;var n=F7.__rest(t,["configuration","transitions","tags","machine"]);return F7.__assign(F7.__assign({},n),{tags:Array.from(r)})},e.prototype.matches=function(t){return IN.matchesState(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var r;a2u.IS_PRODUCTION&&IN.warn(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=(r=this.machine)===null||r===void 0?void 0:r.getTransitionData(this,t);return!!(n!=null&&n.transitions.length)&&n.transitions.some(function(u){return u.target!==void 0||u.actions.length})},e}();_7.State=f2u;_7.bindActionToState=l2u;_7.isState=c2u;_7.isStateConfig=Bir;_7.stateValuesEqual=_ir});var Sir=I(UIe=>{"use strict";Object.defineProperty(UIe,"__esModule",{value:!0});var wir=gh(),p2u={deferEvents:!1},h2u=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=wir.__assign(wir.__assign({},p2u),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(r){throw this.clear(),r}finally{this.processingEvent=!1}},e}();UIe.Scheduler=h2u});var Oir=I(zIe=>{"use strict";Object.defineProperty(zIe,"__esModule",{value:!0});var $Ie=new Map,d2u=0,m2u={bookId:function(){return"x:".concat(d2u++)},register:function(e,t){return $Ie.set(e,t),e},get:function(e){return $Ie.get(e)},free:function(e){$Ie.delete(e)}};zIe.registry=m2u});var Tir=I(tse=>{"use strict";Object.defineProperty(tse,"__esModule",{value:!0});var g2u=A6();function WIe(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;g2u.IS_PRODUCTION||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function v2u(){var e=WIe();if(e&&"__xstate__"in e)return e.__xstate__}function D2u(e){if(WIe()){var t=v2u();t&&t.register(e)}}tse.getGlobal=WIe;tse.registerService=D2u});var GIe=I(LN=>{"use strict";Object.defineProperty(LN,"__esModule",{value:!0});var Pir=L_(),y2u=kN(),E2u=i1();function b2u(e,t){return{transition:e,initialState:t}}function C2u(e){var t={error:void 0,data:void 0,status:"pending"};return{transition:function(r,n,u){var i=u.parent,o=u.id,s=u.observers;switch(n.type){case"fulfill":return i==null||i.send(Pir.doneInvoke(o,n.data)),{error:void 0,data:n.data,status:"fulfilled"};case"reject":return i==null||i.send(Pir.error(o,n.error)),s.forEach(function(a){a.error(n.error)}),{error:n.error,data:void 0,status:"rejected"};default:return r}},initialState:t,start:function(r){var n=r.self;return e().then(function(u){n.send({type:"fulfill",data:u})},function(u){n.send({type:"reject",error:u})}),t}}}function x2u(e,t){t===void 0&&(t={});var r=e.initialState,n=new Set,u=[],i=!1,o=function(){if(!i){for(i=!0;u.length>0;){var c=u.shift();r=e.transition(r,c,a),n.forEach(function(l){return l.next(r)})}i=!1}},s=y2u.toActorRef({id:t.id,send:function(c){u.push(c),o()},getSnapshot:function(){return r},subscribe:function(c,l,f){var p=E2u.toObserver(c,l,f);return n.add(p),p.next(r),{unsubscribe:function(){n.delete(p)}}}}),a={parent:t.parent,self:s,id:t.id||"anonymous",observers:n};return r=e.start?e.start(a):r,s}LN.fromPromise=C2u;LN.fromReducer=b2u;LN.spawnBehavior=x2u});var Lir=I(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});var au=gh(),VIe=A7(),rse=jN(),K2=I_(),tp=L_(),_6=A6(),Wr=i1(),kir=Sir(),HIe=kN(),NN=Oir(),Rir=Tir(),N_=jIe(),A2u=GIe(),KIe={sync:!1,autoForward:!1};Ii.InterpreterStatus=void 0;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ii.InterpreterStatus||(Ii.InterpreterStatus={}));var Iir=function(){function e(t,r){r===void 0&&(r=e.defaultOptions);var n=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Ii.InterpreterStatus.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(l,f){if(Wr.isArray(l))return n.batch(l),n.state;var p=Wr.toSCXMLEvent(Wr.toEventObject(l,f));if(n.status===Ii.InterpreterStatus.Stopped)return _6.IS_PRODUCTION||Wr.warn(!1,'Event "'.concat(p.name,'" was sent to stopped service "').concat(n.machine.id,`". This service has already reached its final state, and will not transition.
|
|
1226
|
+
`}));return Ft.debug(`Template: ${(0,sD.get)(i,"yaml.path")}`),Ft.write(Dt.green(`Verify [${(0,sD.get)(i,"yaml.path","").split("/").pop()}] success!`))}Ft.tips(`Not support template: ${(0,sD.get)(i,"yaml.path")}, you can update template to 3.x version`)})},Bdu=async(e,t)=>{let r=[];for(let n of e.steps){let u=await FBt(n.component);if((0,sD.isEmpty)(u))continue;let i=t.compile(JSON.parse(u));if(!i(n.props)){let o=i.errors;for(let s of o)s.instancePath=n.projectName+"/props"+s.instancePath,s.keyword==="enum"&&(s.message=s.message+": "+s.params.allowedValues.join(", "));r=r.concat(o)}}return r}});var gh=I(x6=>{"use strict";Object.defineProperty(x6,"__esModule",{value:!0});x6.__assign=function(){return x6.__assign=Object.assign||function(t){for(var r,n=1,u=arguments.length;n<u;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},x6.__assign.apply(this,arguments)};function wdu(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,n=Object.getOwnPropertySymbols(e);u<n.length;u++)t.indexOf(n[u])<0&&Object.prototype.propertyIsEnumerable.call(e,n[u])&&(r[n[u]]=e[n[u]]);return r}function Sdu(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Odu(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),u,i=[],o;try{for(;(t===void 0||t-- >0)&&!(u=n.next()).done;)i.push(u.value)}catch(s){o={error:s}}finally{try{u&&!u.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}function Tdu(e,t,r){if(r||arguments.length===2)for(var n=0,u=t.length,i;n<u;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}x6.__read=Odu;x6.__rest=wdu;x6.__spreadArray=Tdu;x6.__values=Sdu});var A7=I(aD=>{"use strict";Object.defineProperty(aD,"__esModule",{value:!0});aD.ActionTypes=void 0;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(aD.ActionTypes||(aD.ActionTypes={}));aD.SpecialTargets=void 0;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(aD.SpecialTargets||(aD.SpecialTargets={}))});var I_=I(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});var Aa=A7(),Pdu=Aa.ActionTypes.Start,kdu=Aa.ActionTypes.Stop,Rdu=Aa.ActionTypes.Raise,Idu=Aa.ActionTypes.Send,jdu=Aa.ActionTypes.Cancel,Ldu=Aa.ActionTypes.NullEvent,Ndu=Aa.ActionTypes.Assign,qdu=Aa.ActionTypes.After,Mdu=Aa.ActionTypes.DoneState,Udu=Aa.ActionTypes.Log,$du=Aa.ActionTypes.Init,zdu=Aa.ActionTypes.Invoke,Wdu=Aa.ActionTypes.ErrorExecution,Gdu=Aa.ActionTypes.ErrorPlatform,Vdu=Aa.ActionTypes.ErrorCustom,Hdu=Aa.ActionTypes.Update,Kdu=Aa.ActionTypes.Choose,Ydu=Aa.ActionTypes.Pure;As.after=qdu;As.assign=Ndu;As.cancel=jdu;As.choose=Kdu;As.doneState=Mdu;As.error=Vdu;As.errorExecution=Wdu;As.errorPlatform=Gdu;As.init=$du;As.invoke=zdu;As.log=Udu;As.nullEvent=Ldu;As.pure=Ydu;As.raise=Rdu;As.send=Idu;As.start=Pdu;As.stop=kdu;As.update=Hdu});var Koe=I(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});var Jdu=".",Xdu={},Qdu="xstate.guard",Zdu="";j_.DEFAULT_GUARD_TYPE=Qdu;j_.EMPTY_ACTIVITY_MAP=Xdu;j_.STATE_DELIMITER=Jdu;j_.TARGETLESS_KEY=Zdu});var A6=I(FIe=>{"use strict";Object.defineProperty(FIe,"__esModule",{value:!0});var e1u=process.env.NODE_ENV==="production";FIe.IS_PRODUCTION=e1u});var i1=I(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});var Mf=gh(),t1u=A7(),Zur=I_(),ON=Koe(),wIe=A6(),Yoe;function r1u(e){return Object.keys(e)}function eir(e,t,r){r===void 0&&(r=ON.STATE_DELIMITER);var n=_Ie(e,r),u=_Ie(t,r);return u1(u)?u1(n)?u===n:!1:u1(n)?n in u:Object.keys(n).every(function(i){return i in u?eir(n[i],u[i]):!1})}function n1u(e){try{return u1(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function u1u(e){try{return u1(e)||typeof e=="number"?"".concat(e):H2(e)?e.name:e.type}catch{throw new Error("Actions must be strings or objects with a string action.type property.")}}function tir(e,t){try{return Joe(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function rir(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function _Ie(e,t){if(rir(e))return e.value;if(Joe(e))return BIe(e);if(typeof e!="string")return e;var r=tir(e,t);return BIe(r)}function BIe(e){if(e.length===1)return e[0];for(var t={},r=t,n=0;n<e.length-1;n++)n===e.length-2?r[e[n]]=e[n+1]:(r[e[n]]={},r=r[e[n]]);return t}function nir(e,t){for(var r={},n=Object.keys(e),u=0;u<n.length;u++){var i=n[u];r[i]=t(e[i],i,e,u)}return r}function i1u(e,t,r){var n,u,i={};try{for(var o=Mf.__values(Object.keys(e)),s=o.next();!s.done;s=o.next()){var a=s.value,c=e[a];r(c)&&(i[a]=t(c,a,e))}}catch(l){n={error:l}}finally{try{s&&!s.done&&(u=o.return)&&u.call(o)}finally{if(n)throw n.error}}return i}var o1u=function(e){return function(t){var r,n,u=t;try{for(var i=Mf.__values(e),o=i.next();!o.done;o=i.next()){var s=o.value;u=u[s]}}catch(a){r={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return u}};function s1u(e,t){return function(r){var n,u,i=r;try{for(var o=Mf.__values(e),s=o.next();!s.done;s=o.next()){var a=s.value;i=i[t][a]}}catch(c){n={error:c}}finally{try{s&&!s.done&&(u=o.return)&&u.call(o)}finally{if(n)throw n.error}}return i}}function uir(e){if(!e)return[[]];if(u1(e))return[[e]];var t=iir(Object.keys(e).map(function(r){var n=e[r];return typeof n!="string"&&(!n||!Object.keys(n).length)?[[r]]:uir(e[r]).map(function(u){return[r].concat(u)})}));return t}function a1u(e){var t,r,n={};if(e&&e.length===1&&e[0].length===1)return e[0][0];try{for(var u=Mf.__values(e),i=u.next();!i.done;i=u.next())for(var o=i.value,s=n,a=0;a<o.length;a++){var c=o[a];if(a===o.length-2){s[c]=o[a+1];break}s[c]=s[c]||{},s=s[c]}}catch(l){t={error:l}}finally{try{i&&!i.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return n}function iir(e){var t;return(t=[]).concat.apply(t,Mf.__spreadArray([],Mf.__read(e),!1))}function SIe(e){return Joe(e)?e:[e]}function oir(e){return e===void 0?[]:SIe(e)}function c1u(e,t,r){var n,u;if(H2(e))return e(t,r.data);var i={};try{for(var o=Mf.__values(Object.keys(e)),s=o.next();!s.done;s=o.next()){var a=s.value,c=e[a];H2(c)?i[a]=c(t,r.data):i[a]=c}}catch(l){n={error:l}}finally{try{s&&!s.done&&(u=o.return)&&u.call(o)}finally{if(n)throw n.error}}return i}function l1u(e){return/^(done|error)\./.test(e)}function f1u(e){return!!(e instanceof Promise||e!==null&&(H2(e)||typeof e=="object")&&H2(e.then))}function p1u(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function h1u(e,t){var r,n,u=Mf.__read([[],[]],2),i=u[0],o=u[1];try{for(var s=Mf.__values(e),a=s.next();!a.done;a=s.next()){var c=a.value;t(c)?i.push(c):o.push(c)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return[i,o]}function OIe(e,t){return nir(e.states,function(r,n){if(r){var u=(u1(t)?void 0:t[n])||(r?r.current:void 0);if(u)return{current:u,states:OIe(r,u)}}})}function d1u(e,t){return{current:t,states:OIe(e,t)}}function m1u(e,t,r,n){wIe.IS_PRODUCTION||nn.warn(!!e,"Attempting to update undefined context");var u=e&&r.reduce(function(i,o){var s,a,c=o.assignment,l={state:n,action:o,_event:t},f={};if(H2(c))f=c(i,t.data,l);else try{for(var p=Mf.__values(Object.keys(c)),h=p.next();!h.done;h=p.next()){var d=h.value,m=c[d];f[d]=H2(m)?m(i,t.data,l):m}}catch(v){s={error:v}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(s)throw s.error}}return Object.assign({},i,f)},e);return u}nn.warn=function(){};wIe.IS_PRODUCTION||(nn.warn=function(e,t){var r=e instanceof Error?e:void 0;if(!(!r&&e)&&console!==void 0){var n=["Warning: ".concat(t)];r&&n.push(r),console.warn.apply(console,n)}});function Joe(e){return Array.isArray(e)}function H2(e){return typeof e=="function"}function u1(e){return typeof e=="string"}function g1u(e,t){if(e)return u1(e)?{type:ON.DEFAULT_GUARD_TYPE,name:e,predicate:t?t[e]:void 0}:H2(e)?{type:ON.DEFAULT_GUARD_TYPE,name:e.name,predicate:e}:e}function v1u(e){try{return"subscribe"in e&&H2(e.subscribe)}catch{return!1}}var sir=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),D1u=(Yoe={},Yoe[sir]=function(){return this},Yoe[Symbol.observable]=function(){return this},Yoe);function air(e){return!!e&&"__xstatenode"in e}function y1u(e){return!!e&&typeof e.send=="function"}var E1u=function(){var e=0;return function(){return e++,e.toString(16)}}();function cir(e,t){return u1(e)||typeof e=="number"?Mf.__assign({type:e},t):e}function b1u(e,t){if(!u1(e)&&"$$type"in e&&e.$$type==="scxml")return e;var r=cir(e);return Mf.__assign({name:r.type,data:r,$$type:"scxml",type:"external"},t)}function C1u(e,t){var r=SIe(t).map(function(n){return typeof n>"u"||typeof n=="string"||air(n)?{target:n,event:e}:Mf.__assign(Mf.__assign({},n),{event:e})});return r}function x1u(e){if(!(e===void 0||e===ON.TARGETLESS_KEY))return oir(e)}function A1u(e,t,r){if(!wIe.IS_PRODUCTION){var n=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(r,"', error was '").concat(e,"'.").concat(n));else{var u=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(r,"'. ")+"Original error: '".concat(e,"'. ").concat(n," Current error is '").concat(t,"'.").concat(u))}}}function F1u(e,t,r,n,u){var i=e.options.guards,o={state:u,cond:t,_event:n};if(t.type===ON.DEFAULT_GUARD_TYPE)return((i==null?void 0:i[t.name])||t.predicate)(r,n.data,o);var s=i==null?void 0:i[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(r,n.data,o)}function _1u(e){return typeof e=="string"?{type:e}:e}function B1u(e,t,r){var n=function(){},u=typeof e=="object",i=u?e:null;return{next:((u?e.next:e)||n).bind(i),error:((u?e.error:t)||n).bind(i),complete:((u?e.complete:r)||n).bind(i)}}function w1u(e,t){return"".concat(e,":invocation[").concat(t,"]")}function S1u(e){return(e.type===Zur.raise||e.type===Zur.send&&e.to===t1u.SpecialTargets.Internal)&&typeof e.delay!="number"}nn.createInvokeId=w1u;nn.evaluateGuard=F1u;nn.flatten=iir;nn.getActionType=u1u;nn.getEventType=n1u;nn.interopSymbols=D1u;nn.isActor=y1u;nn.isArray=Joe;nn.isBehavior=p1u;nn.isBuiltInEvent=l1u;nn.isFunction=H2;nn.isMachine=air;nn.isObservable=v1u;nn.isPromiseLike=f1u;nn.isRaisableAction=S1u;nn.isStateLike=rir;nn.isString=u1;nn.keys=r1u;nn.mapContext=c1u;nn.mapFilterValues=i1u;nn.mapValues=nir;nn.matchesState=eir;nn.nestedPath=s1u;nn.normalizeTarget=x1u;nn.partition=h1u;nn.path=o1u;nn.pathToStateValue=BIe;nn.pathsToStateValue=a1u;nn.reportUnhandledExceptionOnInvocation=A1u;nn.symbolObservable=sir;nn.toArray=oir;nn.toArrayStrict=SIe;nn.toEventObject=cir;nn.toGuard=g1u;nn.toInvokeSource=_1u;nn.toObserver=B1u;nn.toSCXMLEvent=b1u;nn.toStatePath=tir;nn.toStatePaths=uir;nn.toStateValue=_Ie;nn.toTransitionConfigArray=C1u;nn.uniqueId=E1u;nn.updateContext=m1u;nn.updateHistoryStates=OIe;nn.updateHistoryValue=d1u});var L_=I(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});var Cu=gh(),vh=A7(),Fa=I_(),uu=i1(),lir=A6(),O1u=uu.toSCXMLEvent({type:Fa.init});function TIe(e,t){return t&&t[e]||void 0}function Xoe(e,t){var r;if(uu.isString(e)||typeof e=="number"){var n=TIe(e,t);uu.isFunction(n)?r={type:e,exec:n}:n?r=n:r={type:e,exec:void 0}}else if(uu.isFunction(e))r={type:e.name||e.toString(),exec:e};else{var n=TIe(e.type,t);if(uu.isFunction(n))r=Cu.__assign(Cu.__assign({},e),{exec:n});else if(n){var u=n.type||e.type;r=Cu.__assign(Cu.__assign(Cu.__assign({},n),e),{type:u})}else r=e}return r}var PIe=function(e,t){if(!e)return[];var r=uu.isArray(e)?e:[e];return r.map(function(n){return Xoe(n,t)})};function RIe(e){var t=Xoe(e);return Cu.__assign(Cu.__assign({id:uu.isString(e)?e:t.id},t),{type:t.type})}function T1u(e,t){return{type:Fa.raise,event:typeof e=="function"?e:uu.toEventObject(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function fir(e,t,r,n){var u={_event:r},i=uu.toSCXMLEvent(uu.isFunction(e.event)?e.event(t,r.data,u):e.event),o;if(uu.isString(e.delay)){var s=n&&n[e.delay];o=uu.isFunction(s)?s(t,r.data,u):s}else o=uu.isFunction(e.delay)?e.delay(t,r.data,u):e.delay;return Cu.__assign(Cu.__assign({},e),{type:Fa.raise,_event:i,delay:o})}function TN(e,t){return{to:t?t.to:void 0,type:Fa.send,event:uu.isFunction(e)?e:uu.toEventObject(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:uu.isFunction(e)?e.name:uu.getEventType(e)}}function pir(e,t,r,n){var u={_event:r},i=uu.toSCXMLEvent(uu.isFunction(e.event)?e.event(t,r.data,u):e.event),o;if(uu.isString(e.delay)){var s=n&&n[e.delay];o=uu.isFunction(s)?s(t,r.data,u):s}else o=uu.isFunction(e.delay)?e.delay(t,r.data,u):e.delay;var a=uu.isFunction(e.to)?e.to(t,r.data,u):e.to;return Cu.__assign(Cu.__assign({},e),{to:a,_event:i,event:i.data,delay:o})}function IIe(e,t){return TN(e,Cu.__assign(Cu.__assign({},t),{to:vh.SpecialTargets.Parent}))}function P1u(e,t,r){return TN(t,Cu.__assign(Cu.__assign({},r),{to:e}))}function k1u(){return IIe(Fa.update)}function R1u(e,t){return TN(e,Cu.__assign(Cu.__assign({},t),{to:function(r,n,u){var i=u._event;return i.origin}}))}var I1u=function(e,t){return{context:e,event:t}};function j1u(e,t){return e===void 0&&(e=I1u),{type:Fa.log,label:t,expr:e}}var hir=function(e,t,r){return Cu.__assign(Cu.__assign({},e),{value:uu.isString(e.expr)?e.expr:e.expr(t,r.data,{_event:r})})},L1u=function(e){return{type:Fa.cancel,sendId:e}};function N1u(e){var t=RIe(e);return{type:vh.ActionTypes.Start,activity:t,exec:void 0}}function q1u(e){var t=uu.isFunction(e)?e:RIe(e);return{type:vh.ActionTypes.Stop,activity:t,exec:void 0}}function dir(e,t,r){var n=uu.isFunction(e.activity)?e.activity(t,r.data):e.activity,u=typeof n=="string"?{id:n}:n,i={type:vh.ActionTypes.Stop,activity:u};return i}var M1u=function(e){return{type:Fa.assign,assignment:e}};function U1u(e){return typeof e=="object"&&"type"in e}function $1u(e,t){var r=t?"#".concat(t):"";return"".concat(vh.ActionTypes.After,"(").concat(e,")").concat(r)}function z1u(e,t){var r="".concat(vh.ActionTypes.DoneState,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function W1u(e,t){var r="".concat(vh.ActionTypes.DoneInvoke,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function G1u(e,t){var r="".concat(vh.ActionTypes.ErrorPlatform,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function V1u(e){return{type:vh.ActionTypes.Pure,get:e}}function H1u(e,t){if(!lir.IS_PRODUCTION&&(!e||typeof e=="function")){var r=e;e=function(){for(var n=[],u=0;u<arguments.length;u++)n[u]=arguments[u];var i=typeof r=="function"?r.apply(void 0,Cu.__spreadArray([],Cu.__read(n),!1)):r;if(!i)throw new Error("Attempted to forward event to undefined actor. This risks an infinite loop in the sender.");return i}}return TN(function(n,u){return u},Cu.__assign(Cu.__assign({},t),{to:e}))}function K1u(e,t){return IIe(function(r,n,u){return{type:Fa.error,data:uu.isFunction(e)?e(r,n,u):e}},Cu.__assign(Cu.__assign({},t),{to:vh.SpecialTargets.Parent}))}function Y1u(e){return{type:vh.ActionTypes.Choose,conds:e}}var J1u=function(e){var t,r,n=[];try{for(var u=Cu.__values(e),i=u.next();!i.done;i=u.next())for(var o=i.value,s=0;s<o.actions.length;){if(o.actions[s].type===Fa.assign){n.push(o.actions[s]),o.actions.splice(s,1);continue}s++}}catch(a){t={error:a}}finally{try{i&&!i.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return n};function kIe(e,t,r,n,u,i,o){o===void 0&&(o=!1);var s=o?[]:J1u(u),a=s.length?uu.updateContext(r,n,s,t):r,c=o?[r]:void 0,l=[];function f(d,m){var v;switch(m.type){case Fa.raise:{var y=fir(m,a,n,e.options.delays);return i&&typeof y.delay=="number"&&i(y,a,n),y}case Fa.send:var g=pir(m,a,n,e.options.delays);if(!lir.IS_PRODUCTION){var D=m.delay;uu.warn(!uu.isString(D)||typeof g.delay=="number","No delay reference for delay expression '".concat(D,"' was found on machine '").concat(e.id,"'"))}return i&&g.to!==vh.SpecialTargets.Internal&&(d==="entry"?l.push(g):i(g,a,n)),g;case Fa.log:{var E=hir(m,a,n);return i==null||i(E,a,n),E}case Fa.choose:{var b=m,C=(v=b.conds.find(function($){var W=uu.toGuard($.cond,e.options.guards);return!W||uu.evaluateGuard(e,W,a,n,i?void 0:t)}))===null||v===void 0?void 0:v.actions;if(!C)return[];var x=Cu.__read(kIe(e,t,a,n,[{type:d,actions:PIe(uu.toArray(C),e.options.actions)}],i,o),2),F=x[0],A=x[1];return a=A,c==null||c.push(a),F}case Fa.pure:{var C=m.get(a,n.data);if(!C)return[];var S=Cu.__read(kIe(e,t,a,n,[{type:d,actions:PIe(uu.toArray(C),e.options.actions)}],i,o),2),B=S[0],O=S[1];return a=O,c==null||c.push(a),B}case Fa.stop:{var E=dir(m,a,n);return i==null||i(E,r,n),E}case Fa.assign:{a=uu.updateContext(a,n,[m],i?void 0:t),c==null||c.push(a);break}default:var T=Xoe(m,e.options.actions),P=T.exec;if(i)i(T,a,n);else if(P&&c){var N=c.length-1,L=Cu.__assign(Cu.__assign({},T),{exec:function($){for(var W=[],j=1;j<arguments.length;j++)W[j-1]=arguments[j];P.apply(void 0,Cu.__spreadArray([c[N]],Cu.__read(W),!1))}});T=L}return T}}function p(d){var m,v,y=[];try{for(var g=Cu.__values(d.actions),D=g.next();!D.done;D=g.next()){var E=D.value,b=f(d.type,E);b&&(y=y.concat(b))}}catch(C){m={error:C}}finally{try{D&&!D.done&&(v=g.return)&&v.call(g)}finally{if(m)throw m.error}}return l.forEach(function(C){i(C,a,n)}),l.length=0,y}var h=uu.flatten(u.map(p));return[h,a]}xu.actionTypes=Fa;xu.after=$1u;xu.assign=M1u;xu.cancel=L1u;xu.choose=Y1u;xu.done=z1u;xu.doneInvoke=W1u;xu.error=G1u;xu.escalate=K1u;xu.forwardTo=H1u;xu.getActionFunction=TIe;xu.initEvent=O1u;xu.isActionObject=U1u;xu.log=j1u;xu.pure=V1u;xu.raise=T1u;xu.resolveActions=kIe;xu.resolveLog=hir;xu.resolveRaise=fir;xu.resolveSend=pir;xu.resolveStop=dir;xu.respond=R1u;xu.send=TN;xu.sendParent=IIe;xu.sendTo=P1u;xu.sendUpdate=k1u;xu.start=N1u;xu.stop=q1u;xu.toActionObject=Xoe;xu.toActionObjects=PIe;xu.toActivityDefinition=RIe});var jIe=I(Zoe=>{"use strict";Object.defineProperty(Zoe,"__esModule",{value:!0});var Qoe=[],X1u=function(e,t){Qoe.push(e);var r=t(e);return Qoe.pop(),r},Q1u=function(e){return e(Qoe[Qoe.length-1])};Zoe.consume=Q1u;Zoe.provide=X1u});var kN=I(cD=>{"use strict";Object.defineProperty(cD,"__esModule",{value:!0});var Z1u=gh(),PN=i1(),e2u=jIe();function LIe(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[PN.symbolObservable]=function(){return this},t}function t2u(e,t,r,n){var u,i=PN.toInvokeSource(e.src),o=(u=t==null?void 0:t.options.services)===null||u===void 0?void 0:u[i.type],s=e.data?PN.mapContext(e.data,r,n):void 0,a=o?mir(o,e.id,s):LIe(e.id);return a.meta=e,a}function mir(e,t,r){var n=LIe(t);if(n.deferred=!0,PN.isMachine(e)){var u=n.state=e2u.provide(void 0,function(){return(r?e.withContext(r):e).initialState});n.getSnapshot=function(){return u}}return n}function gir(e){try{return typeof e.send=="function"}catch{return!1}}function r2u(e){return gir(e)&&"id"in e}function n2u(e){var t;return Z1u.__assign((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[PN.symbolObservable]=function(){return this},t),e)}cD.createDeferredActor=mir;cD.createInvocableActor=t2u;cD.createNullActor=LIe;cD.isActor=gir;cD.isSpawnedActor=r2u;cD.toActorRef=n2u});var MIe=I(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});var F6=gh(),NIe=i1(),qIe=function(e){return e.type==="atomic"||e.type==="final"};function vir(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function RN(e){return vir(e).filter(function(t){return t.type!=="history"})}function Dir(e){var t=[e];return qIe(e)?t:t.concat(NIe.flatten(RN(e).map(Dir)))}function yir(e,t){var r,n,u,i,o,s,a,c,l=new Set(e),f=ese(l),p=new Set(t);try{for(var h=F6.__values(p),d=h.next();!d.done;d=h.next())for(var m=d.value,v=m.parent;v&&!p.has(v);)p.add(v),v=v.parent}catch(A){r={error:A}}finally{try{d&&!d.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}var y=ese(p);try{for(var g=F6.__values(p),D=g.next();!D.done;D=g.next()){var m=D.value;if(m.type==="compound"&&(!y.get(m)||!y.get(m).length))f.get(m)?f.get(m).forEach(function(S){return p.add(S)}):m.initialStateNodes.forEach(function(S){return p.add(S)});else if(m.type==="parallel")try{for(var E=(o=void 0,F6.__values(RN(m))),b=E.next();!b.done;b=E.next()){var C=b.value;p.has(C)||(p.add(C),f.get(C)?f.get(C).forEach(function(S){return p.add(S)}):C.initialStateNodes.forEach(function(S){return p.add(S)}))}}catch(S){o={error:S}}finally{try{b&&!b.done&&(s=E.return)&&s.call(E)}finally{if(o)throw o.error}}}}catch(A){u={error:A}}finally{try{D&&!D.done&&(i=g.return)&&i.call(g)}finally{if(u)throw u.error}}try{for(var x=F6.__values(p),F=x.next();!F.done;F=x.next())for(var m=F.value,v=m.parent;v&&!p.has(v);)p.add(v),v=v.parent}catch(A){a={error:A}}finally{try{F&&!F.done&&(c=x.return)&&c.call(x)}finally{if(a)throw a.error}}return p}function Eir(e,t){var r=t.get(e);if(!r)return{};if(e.type==="compound"){var n=r[0];if(n){if(qIe(n))return n.key}else return{}}var u={};return r.forEach(function(i){u[i.key]=Eir(i,t)}),u}function ese(e){var t,r,n=new Map;try{for(var u=F6.__values(e),i=u.next();!i.done;i=u.next()){var o=i.value;n.has(o)||n.set(o,[]),o.parent&&(n.has(o.parent)||n.set(o.parent,[]),n.get(o.parent).push(o))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return n}function u2u(e,t){var r=yir([e],t);return Eir(e,ese(r))}function bir(e,t){return Array.isArray(e)?e.some(function(r){return r===t}):e instanceof Set?e.has(t):!1}function i2u(e){return F6.__spreadArray([],F6.__read(new Set(NIe.flatten(F6.__spreadArray([],F6.__read(e.map(function(t){return t.ownEvents})),!1)))),!1)}function Cir(e,t){return t.type==="compound"?RN(t).some(function(r){return r.type==="final"&&bir(e,r)}):t.type==="parallel"?RN(t).every(function(r){return Cir(e,r)}):!1}function o2u(e){return e===void 0&&(e=[]),e.reduce(function(t,r){return r.meta!==void 0&&(t[r.id]=r.meta),t},{})}function s2u(e){return new Set(NIe.flatten(e.map(function(t){return t.tags})))}Uf.getAdjList=ese;Uf.getAllChildren=vir;Uf.getAllStateNodes=Dir;Uf.getChildren=RN;Uf.getConfiguration=yir;Uf.getMeta=o2u;Uf.getTagsFromConfiguration=s2u;Uf.getValue=u2u;Uf.has=bir;Uf.isInFinalState=Cir;Uf.isLeafNode=qIe;Uf.nextEvents=i2u});var jN=I(_7=>{"use strict";Object.defineProperty(_7,"__esModule",{value:!0});var F7=gh(),xir=Koe(),IN=i1(),Air=MIe(),Fir=L_(),a2u=A6();function _ir(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(IN.isString(e)||IN.isString(t))return e===t;var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(function(u){return _ir(e[u],t[u])})}function Bir(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}var c2u=Bir;function l2u(e,t){var r=e.exec,n=F7.__assign(F7.__assign({},e),{exec:r!==void 0?function(){return r(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return n}var f2u=function(){function e(t){var r=this,n;this.actions=[],this.activities=xir.EMPTY_ACTIVITY_MAP,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||xir.EMPTY_ACTIVITY_MAP,this.meta=Air.getMeta(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(n=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&n!==void 0?n:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return Air.nextEvents(r.configuration)}})}return e.from=function(t,r){if(t instanceof e)return t.context!==r?new e({value:t.value,context:r,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t;var n=Fir.initEvent;return new e({value:t,context:r,_event:n,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,r){if(t instanceof e){if(!t.actions.length)return t;var n=Fir.initEvent;return new e({value:t.value,context:r,_event:n,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,r)},e.prototype.toStrings=function(t,r){var n=this;if(t===void 0&&(t=this.value),r===void 0&&(r="."),IN.isString(t))return[t];var u=Object.keys(t);return u.concat.apply(u,F7.__spreadArray([],F7.__read(u.map(function(i){return n.toStrings(t[i],r).map(function(o){return i+r+o})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var r=t.tags;t.machine;var n=F7.__rest(t,["configuration","transitions","tags","machine"]);return F7.__assign(F7.__assign({},n),{tags:Array.from(r)})},e.prototype.matches=function(t){return IN.matchesState(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var r;a2u.IS_PRODUCTION&&IN.warn(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=(r=this.machine)===null||r===void 0?void 0:r.getTransitionData(this,t);return!!(n!=null&&n.transitions.length)&&n.transitions.some(function(u){return u.target!==void 0||u.actions.length})},e}();_7.State=f2u;_7.bindActionToState=l2u;_7.isState=c2u;_7.isStateConfig=Bir;_7.stateValuesEqual=_ir});var Sir=I(UIe=>{"use strict";Object.defineProperty(UIe,"__esModule",{value:!0});var wir=gh(),p2u={deferEvents:!1},h2u=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=wir.__assign(wir.__assign({},p2u),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(r){throw this.clear(),r}finally{this.processingEvent=!1}},e}();UIe.Scheduler=h2u});var Oir=I(zIe=>{"use strict";Object.defineProperty(zIe,"__esModule",{value:!0});var $Ie=new Map,d2u=0,m2u={bookId:function(){return"x:".concat(d2u++)},register:function(e,t){return $Ie.set(e,t),e},get:function(e){return $Ie.get(e)},free:function(e){$Ie.delete(e)}};zIe.registry=m2u});var Tir=I(tse=>{"use strict";Object.defineProperty(tse,"__esModule",{value:!0});var g2u=A6();function WIe(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;g2u.IS_PRODUCTION||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function v2u(){var e=WIe();if(e&&"__xstate__"in e)return e.__xstate__}function D2u(e){if(WIe()){var t=v2u();t&&t.register(e)}}tse.getGlobal=WIe;tse.registerService=D2u});var GIe=I(LN=>{"use strict";Object.defineProperty(LN,"__esModule",{value:!0});var Pir=L_(),y2u=kN(),E2u=i1();function b2u(e,t){return{transition:e,initialState:t}}function C2u(e){var t={error:void 0,data:void 0,status:"pending"};return{transition:function(r,n,u){var i=u.parent,o=u.id,s=u.observers;switch(n.type){case"fulfill":return i==null||i.send(Pir.doneInvoke(o,n.data)),{error:void 0,data:n.data,status:"fulfilled"};case"reject":return i==null||i.send(Pir.error(o,n.error)),s.forEach(function(a){a.error(n.error)}),{error:n.error,data:void 0,status:"rejected"};default:return r}},initialState:t,start:function(r){var n=r.self;return e().then(function(u){n.send({type:"fulfill",data:u})},function(u){n.send({type:"reject",error:u})}),t}}}function x2u(e,t){t===void 0&&(t={});var r=e.initialState,n=new Set,u=[],i=!1,o=function(){if(!i){for(i=!0;u.length>0;){var c=u.shift();r=e.transition(r,c,a),n.forEach(function(l){return l.next(r)})}i=!1}},s=y2u.toActorRef({id:t.id,send:function(c){u.push(c),o()},getSnapshot:function(){return r},subscribe:function(c,l,f){var p=E2u.toObserver(c,l,f);return n.add(p),p.next(r),{unsubscribe:function(){n.delete(p)}}}}),a={parent:t.parent,self:s,id:t.id||"anonymous",observers:n};return r=e.start?e.start(a):r,s}LN.fromPromise=C2u;LN.fromReducer=b2u;LN.spawnBehavior=x2u});var Lir=I(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});var au=gh(),VIe=A7(),rse=jN(),K2=I_(),tp=L_(),_6=A6(),Wr=i1(),kir=Sir(),HIe=kN(),NN=Oir(),Rir=Tir(),N_=jIe(),A2u=GIe(),KIe={sync:!1,autoForward:!1};Ii.InterpreterStatus=void 0;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ii.InterpreterStatus||(Ii.InterpreterStatus={}));var Iir=function(){function e(t,r){r===void 0&&(r=e.defaultOptions);var n=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Ii.InterpreterStatus.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(l,f){if(Wr.isArray(l))return n.batch(l),n.state;var p=Wr.toSCXMLEvent(Wr.toEventObject(l,f));if(n.status===Ii.InterpreterStatus.Stopped)return _6.IS_PRODUCTION||Wr.warn(!1,'Event "'.concat(p.name,'" was sent to stopped service "').concat(n.machine.id,`". This service has already reached its final state, and will not transition.
|
|
1227
1227
|
Event: `).concat(JSON.stringify(p.data))),n.state;if(n.status!==Ii.InterpreterStatus.Running&&!n.options.deferEvents)throw new Error('Event "'.concat(p.name,'" was sent to uninitialized service "').concat(n.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
|
|
1228
1228
|
Event: `).concat(JSON.stringify(p.data)));return n.scheduler.schedule(function(){n.forward(p);var h=n._nextState(p);n.update(h,p)}),n._state},this.sendTo=function(l,f,p){var h=n.parent&&(f===VIe.SpecialTargets.Parent||n.parent.id===f),d=h?n.parent:Wr.isString(f)?f===VIe.SpecialTargets.Internal?n:n.children.get(f)||NN.registry.get(f):Wr.isActor(f)?f:void 0;if(!d){if(!h)throw new Error("Unable to send event to child '".concat(f,"' from service '").concat(n.id,"'."));_6.IS_PRODUCTION||Wr.warn(!1,"Service '".concat(n.id,"' has no parent: unable to send event ").concat(l.type));return}if("machine"in d){if(n.status!==Ii.InterpreterStatus.Stopped||n.parent!==d||n.state.done){var m=au.__assign(au.__assign({},l),{name:l.name===K2.error?"".concat(tp.error(n.id)):l.name,origin:n.sessionId});!p&&n.machine.config.predictableActionArguments?n._outgoingQueue.push([d,m]):d.send(m)}}else!p&&n.machine.config.predictableActionArguments?n._outgoingQueue.push([d,l.data]):d.send(l.data)},this._exec=function(l,f,p,h){h===void 0&&(h=n.machine.options.actions);var d=l.exec||tp.getActionFunction(l.type,h),m=Wr.isFunction(d)?d:d?d.exec:l.exec;if(m)try{return m(f,p.data,n.machine.config.predictableActionArguments?{action:l,_event:p}:{action:l,state:n.state,_event:p})}catch(P){throw n.parent&&n.parent.send({type:"xstate.error",data:P}),P}switch(l.type){case K2.raise:{var v=l;n.defer(v);break}case K2.send:var y=l;if(typeof y.delay=="number"){n.defer(y);return}else y.to?n.sendTo(y._event,y.to,p===tp.initEvent):n.send(y._event);break;case K2.cancel:n.cancel(l.sendId);break;case K2.start:{if(n.status!==Ii.InterpreterStatus.Running)return;var g=l.activity;if(!n.machine.config.predictableActionArguments&&!n.state.activities[g.id||g.type])break;if(g.type===VIe.ActionTypes.Invoke){var D=Wr.toInvokeSource(g.src),E=n.machine.options.services?n.machine.options.services[D.type]:void 0,b=g.id,C=g.data;_6.IS_PRODUCTION||Wr.warn(!("forward"in g),"`forward` property is deprecated (found in invocation of '".concat(g.src,"' in in machine '").concat(n.machine.id,"'). ")+"Please use `autoForward` instead.");var x="autoForward"in g?g.autoForward:!!g.forward;if(!E){_6.IS_PRODUCTION||Wr.warn(!1,"No service found for invocation '".concat(g.src,"' in machine '").concat(n.machine.id,"'."));return}var F=C?Wr.mapContext(C,f,p):void 0;if(typeof E=="string")return;var A=Wr.isFunction(E)?E(f,p.data,{data:F,src:D,meta:g.meta}):E;if(!A)return;var S=void 0;Wr.isMachine(A)&&(A=F?A.withContext(F):A,S={autoForward:x}),n.spawn(A,b,S)}else n.spawnActivity(g);break}case K2.stop:{n.stopChild(l.activity.id);break}case K2.log:var B=l,O=B.label,T=B.value;O?n.logger(O,T):n.logger(T);break;default:_6.IS_PRODUCTION||Wr.warn(!1,"No implementation found for action type '".concat(l.type,"'"));break}};var u=au.__assign(au.__assign({},e.defaultOptions),r),i=u.clock,o=u.logger,s=u.parent,a=u.id,c=a!==void 0?a:t.id;this.id=c,this.logger=o,this.clock=i,this.parent=s,this.options=u,this.scheduler=new kir.Scheduler({deferEvents:this.options.deferEvents}),this.sessionId=NN.registry.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:N_.provide(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return _6.IS_PRODUCTION||Wr.warn(this.status!==Ii.InterpreterStatus.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,r){var n,u;try{for(var i=au.__values(t.actions),o=i.next();!o.done;o=i.next()){var s=o.value;this.exec(s,t,r)}}catch(a){n={error:a}}finally{try{o&&!o.done&&(u=i.return)&&u.call(i)}finally{if(n)throw n.error}}},e.prototype.update=function(t,r){var n,u,i,o,s,a,c,l,f=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||r===tp.initEvent)&&this.options.execute)this.execute(this.state);else for(var p=void 0;p=this._outgoingQueue.shift();)p[0].send(p[1]);if(this.children.forEach(function(A){f.state.children[A.id]=A}),this.devTools&&this.devTools.send(r.data,t),t.event)try{for(var h=au.__values(this.eventListeners),d=h.next();!d.done;d=h.next()){var m=d.value;m(t.event)}}catch(A){n={error:A}}finally{try{d&&!d.done&&(u=h.return)&&u.call(h)}finally{if(n)throw n.error}}try{for(var v=au.__values(this.listeners),y=v.next();!y.done;y=v.next()){var m=y.value;m(t,t.event)}}catch(A){i={error:A}}finally{try{y&&!y.done&&(o=v.return)&&o.call(v)}finally{if(i)throw i.error}}try{for(var g=au.__values(this.contextListeners),D=g.next();!D.done;D=g.next()){var E=D.value;E(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(A){s={error:A}}finally{try{D&&!D.done&&(a=g.return)&&a.call(g)}finally{if(s)throw s.error}}if(this.state.done){var b=t.configuration.find(function(A){return A.type==="final"&&A.parent===f.machine}),C=b&&b.doneData?Wr.mapContext(b.doneData,t.context,r):void 0;this._doneEvent=tp.doneInvoke(this.id,C);try{for(var x=au.__values(this.doneListeners),F=x.next();!F.done;F=x.next()){var m=F.value;m(this._doneEvent)}}catch(A){c={error:A}}finally{try{F&&!F.done&&(l=x.return)&&l.call(x)}finally{if(c)throw c.error}}this._stop(),this._stopChildren(),NN.registry.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===Ii.InterpreterStatus.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,r,n){var u=this,i=Wr.toObserver(t,r,n);this.listeners.add(i.next),this.status!==Ii.InterpreterStatus.NotStarted&&i.next(this.state);var o=function(){u.doneListeners.delete(o),u.stopListeners.delete(o),i.complete()};return this.status===Ii.InterpreterStatus.Stopped?i.complete():(this.onDone(o),this.onStop(o)),{unsubscribe:function(){u.listeners.delete(i.next),u.doneListeners.delete(o),u.stopListeners.delete(o)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===Ii.InterpreterStatus.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var r=this;if(this.status===Ii.InterpreterStatus.Running)return this;this.machine._init(),NN.registry.register(this.sessionId,this),this.initialized=!0,this.status=Ii.InterpreterStatus.Running;var n=t===void 0?this.initialState:N_.provide(this,function(){return rse.isStateConfig(t)?r.machine.resolveState(t):r.machine.resolveState(rse.State.from(t,r.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){r.update(n,tp.initEvent)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){Wr.isFunction(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,r,n,u,i,o,s,a,c,l;try{for(var f=au.__values(this.listeners),p=f.next();!p.done;p=f.next()){var h=p.value;this.listeners.delete(h)}}catch(x){t={error:x}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}try{for(var d=au.__values(this.stopListeners),m=d.next();!m.done;m=d.next()){var h=m.value;h(),this.stopListeners.delete(h)}}catch(x){n={error:x}}finally{try{m&&!m.done&&(u=d.return)&&u.call(d)}finally{if(n)throw n.error}}try{for(var v=au.__values(this.contextListeners),y=v.next();!y.done;y=v.next()){var h=y.value;this.contextListeners.delete(h)}}catch(x){i={error:x}}finally{try{y&&!y.done&&(o=v.return)&&o.call(v)}finally{if(i)throw i.error}}try{for(var g=au.__values(this.doneListeners),D=g.next();!D.done;D=g.next()){var h=D.value;this.doneListeners.delete(h)}}catch(x){s={error:x}}finally{try{D&&!D.done&&(a=g.return)&&a.call(g)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Ii.InterpreterStatus.Stopped,this._initialState=void 0;try{for(var E=au.__values(Object.keys(this.delayedEventsMap)),b=E.next();!b.done;b=E.next()){var C=b.value;this.clock.clearTimeout(this.delayedEventsMap[C])}}catch(x){c={error:x}}finally{try{b&&!b.done&&(l=E.return)&&l.call(E)}finally{if(c)throw c.error}}this.scheduler.clear(),this.scheduler=new kir.Scheduler({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,r=this.scheduler;return this._stop(),r.schedule(function(){var n;if(!(!((n=t._state)===null||n===void 0)&&n.done)){var u=Wr.toSCXMLEvent({type:"xstate.stop"}),i=N_.provide(t,function(){var o=Wr.flatten(au.__spreadArray([],au.__read(t.state.configuration),!1).sort(function(f,p){return p.order-f.order}).map(function(f){return tp.toActionObjects(f.onExit,t.machine.options.actions)})),s=au.__read(tp.resolveActions(t.machine,t.state,t.state.context,u,[{type:"exit",actions:o}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),a=s[0],c=s[1],l=new rse.State({value:t.state.value,context:c,_event:u,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:a.filter(function(f){return!Wr.isRaisableAction(f)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return l.changed=!0,l});t.update(i,u),t._stopChildren(),NN.registry.free(t.sessionId)}}),this},e.prototype.batch=function(t){var r=this;if(this.status===Ii.InterpreterStatus.NotStarted&&this.options.deferEvents)_6.IS_PRODUCTION||Wr.warn(!1,"".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,`" and are deferred. Make sure .start() is called for this service.
|
|
1229
1229
|
Event: `).concat(JSON.stringify(event)));else if(this.status!==Ii.InterpreterStatus.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(t.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var u,i,o=r.state,s=!1,a=[],c=function(h){var d=Wr.toSCXMLEvent(h);r.forward(d),o=N_.provide(r,function(){return r.machine.transition(o,d,void 0,n||void 0)}),a.push.apply(a,au.__spreadArray([],au.__read(r.machine.config.predictableActionArguments?o.actions:o.actions.map(function(m){return rse.bindActionToState(m,o)})),!1)),s=s||!!o.changed};try{for(var l=au.__values(t),f=l.next();!f.done;f=l.next()){var p=f.value;c(p)}}catch(h){u={error:h}}finally{try{f&&!f.done&&(i=l.return)&&i.call(l)}finally{if(u)throw u.error}}o.changed=s,o.actions=a,r.update(o,Wr.toSCXMLEvent(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,r){var n=this;r===void 0&&(r=!!this.machine.config.predictableActionArguments&&this._exec);var u=Wr.toSCXMLEvent(t);if(u.name.indexOf(K2.errorPlatform)===0&&!this.state.nextEvents.some(function(o){return o.indexOf(K2.errorPlatform)===0}))throw u.data.data;var i=N_.provide(this,function(){return n.machine.transition(n.state,u,void 0,r||void 0)});return i},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var r,n;try{for(var u=au.__values(this.forwardTo),i=u.next();!i.done;i=u.next()){var o=i.value,s=this.children.get(o);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(o,"'."));s.send(t)}}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}},e.prototype.defer=function(t){var r=this,n=this.clock.setTimeout(function(){"to"in t&&t.to?r.sendTo(t._event,t.to,!0):r.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=n)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,r,n){n===void 0&&(n=this.machine.options.actions),this._exec(t,r.context,r._event,n)},e.prototype.removeChild=function(t){var r;this.children.delete(t),this.forwardTo.delete(t),(r=this.state)===null||r===void 0||delete r.children[t]},e.prototype.stopChild=function(t){var r=this.children.get(t);r&&(this.removeChild(t),Wr.isFunction(r.stop)&&r.stop())},e.prototype.spawn=function(t,r,n){if(this.status!==Ii.InterpreterStatus.Running)return HIe.createDeferredActor(t,r);if(Wr.isPromiseLike(t))return this.spawnPromise(Promise.resolve(t),r);if(Wr.isFunction(t))return this.spawnCallback(t,r);if(HIe.isSpawnedActor(t))return this.spawnActor(t,r);if(Wr.isObservable(t))return this.spawnObservable(t,r);if(Wr.isMachine(t))return this.spawnMachine(t,au.__assign(au.__assign({},n),{id:r}));if(Wr.isBehavior(t))return this.spawnBehavior(t,r);throw new Error('Unable to spawn entity "'.concat(r,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,r){var n=this;r===void 0&&(r={});var u=new e(t,au.__assign(au.__assign({},this.options),{parent:this,id:r.id||t.id})),i=au.__assign(au.__assign({},KIe),r);i.sync&&u.onTransition(function(s){n.send(K2.update,{state:s,id:u.id})});var o=u;return this.children.set(u.id,o),i.autoForward&&this.forwardTo.add(u.id),u.onDone(function(s){n.removeChild(u.id),n.send(Wr.toSCXMLEvent(s,{origin:u.id}))}).start(),o},e.prototype.spawnBehavior=function(t,r){var n=A2u.spawnBehavior(t,{id:r,parent:this});return this.children.set(r,n),n},e.prototype.spawnPromise=function(t,r){var n,u=this,i=!1,o;t.then(function(a){i||(o=a,u.removeChild(r),u.send(Wr.toSCXMLEvent(tp.doneInvoke(r,a),{origin:r})))},function(a){if(!i){u.removeChild(r);var c=tp.error(r,a);try{u.send(Wr.toSCXMLEvent(c,{origin:r}))}catch(l){Wr.reportUnhandledExceptionOnInvocation(a,l,r),u.devTools&&u.devTools.send(c,u.state),u.machine.strict&&u.stop()}}});var s=(n={id:r,send:function(){},subscribe:function(a,c,l){var f=Wr.toObserver(a,c,l),p=!1;return t.then(function(h){p||(f.next(h),!p&&f.complete())},function(h){p||f.error(h)}),{unsubscribe:function(){return p=!0}}},stop:function(){i=!0},toJSON:function(){return{id:r}},getSnapshot:function(){return o}},n[Wr.symbolObservable]=function(){return this},n);return this.children.set(r,s),s},e.prototype.spawnCallback=function(t,r){var n,u=this,i=!1,o=new Set,s=new Set,a,c=function(p){a=p,s.forEach(function(h){return h(p)}),!i&&u.send(Wr.toSCXMLEvent(p,{origin:r}))},l;try{l=t(c,function(p){o.add(p)})}catch(p){this.send(tp.error(r,p))}if(Wr.isPromiseLike(l))return this.spawnPromise(l,r);var f=(n={id:r,send:function(p){return o.forEach(function(h){return h(p)})},subscribe:function(p){var h=Wr.toObserver(p);return s.add(h.next),{unsubscribe:function(){s.delete(h.next)}}},stop:function(){i=!0,Wr.isFunction(l)&&l()},toJSON:function(){return{id:r}},getSnapshot:function(){return a}},n[Wr.symbolObservable]=function(){return this},n);return this.children.set(r,f),f},e.prototype.spawnObservable=function(t,r){var n,u=this,i,o=t.subscribe(function(a){i=a,u.send(Wr.toSCXMLEvent(a,{origin:r}))},function(a){u.removeChild(r),u.send(Wr.toSCXMLEvent(tp.error(r,a),{origin:r}))},function(){u.removeChild(r),u.send(Wr.toSCXMLEvent(tp.doneInvoke(r),{origin:r}))}),s=(n={id:r,send:function(){},subscribe:function(a,c,l){return t.subscribe(a,c,l)},stop:function(){return o.unsubscribe()},getSnapshot:function(){return i},toJSON:function(){return{id:r}}},n[Wr.symbolObservable]=function(){return this},n);return this.children.set(r,s),s},e.prototype.spawnActor=function(t,r){return this.children.set(r,t),t},e.prototype.spawnActivity=function(t){var r=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!r){_6.IS_PRODUCTION||Wr.warn(!1,"No implementation found for activity '".concat(t.type,"'"));return}var n=r(this.state.context,t);this.spawnEffect(t.id,n)},e.prototype.spawnEffect=function(t,r){var n;this.children.set(t,(n={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:r||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},n[Wr.symbolObservable]=function(){return this},n))},e.prototype.attachDev=function(){var t=Rir.getGlobal();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var r=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(au.__assign(au.__assign({name:this.id,autoPause:!0,stateSanitizer:function(n){return{value:n.value,context:n.context,actions:n.actions}}},r),{features:au.__assign({jump:!1,skip:!1},r?r.features:void 0)}),this.machine),this.devTools.init(this.state)}Rir.registerService(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Wr.symbolObservable]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Ii.InterpreterStatus.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,r){return setTimeout(t,r)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=jir,e}(),F2u=function(e){return Wr.isString(e)?au.__assign(au.__assign({},KIe),{name:e}):au.__assign(au.__assign(au.__assign({},KIe),{name:Wr.uniqueId()}),e)};function _2u(e,t){var r=F2u(t);return N_.consume(function(n){if(!_6.IS_PRODUCTION){var u=Wr.isMachine(e)||Wr.isFunction(e);Wr.warn(!!n||u,'Attempted to spawn an Actor (ID: "'.concat(Wr.isMachine(e)?e.id:"undefined",'") outside of a service. This will have no effect.'))}return n?n.spawn(e,r.name,r):HIe.createDeferredActor(e,r.name)})}function jir(e,t){var r=new Iir(e,t);return r}Ii.Interpreter=Iir;Ii.interpret=jir;Ii.spawn=_2u});var Mir=I(nse=>{"use strict";Object.defineProperty(nse,"__esModule",{value:!0});var qN=gh();A7();var Nir=I_();i1();A6();function qir(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function B2u(e){return qN.__assign(qN.__assign({type:Nir.invoke},e),{toJSON:function(){e.onDone,e.onError;var t=qN.__rest(e,["onDone","onError"]);return qN.__assign(qN.__assign({},t),{type:Nir.invoke,src:qir(e.src)})}})}nse.toInvokeDefinition=B2u;nse.toInvokeSource=qir});var XIe=I(JIe=>{"use strict";Object.defineProperty(JIe,"__esModule",{value:!0});var er=gh(),Jt=i1(),B6=jN(),q_=I_(),wo=L_(),M_=A6(),w2u=Koe(),zs=MIe(),S2u=kN(),use=Mir(),z_="",YIe="#",MN="*",U_={},$_=function(e){return e[0]===YIe},O2u=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},T2u=function(e,t,r){var n=r.slice(0,-1).some(function(i){return!("cond"in i)&&!("in"in i)&&(Jt.isString(i.target)||Jt.isMachine(i.target))}),u=t===z_?"the transient event":"event '".concat(t,"'");Jt.warn(!n,"One or more transitions for ".concat(u," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},P2u=function(){function e(t,r,n,u){n===void 0&&(n="context"in t?t.context:void 0);var i=this,o;this.config=t,this._context=n,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(O2u(),r),this.parent=u==null?void 0:u.parent,this.key=this.config.key||(u==null?void 0:u.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:w2u.STATE_DELIMITER),this.id=this.config.id||er.__spreadArray([this.machine.key],er.__read(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(o=this.config.schema)!==null&&o!==void 0?o:{},this.description=this.config.description,M_.IS_PRODUCTION||Jt.warn(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Jt.mapValues(this.config.states,function(c,l){var f,p=new e(c,{},void 0,{parent:i,key:l});return Object.assign(i.idMap,er.__assign((f={},f[p.id]=p,f),p.idMap)),p}):U_;var s=0;function a(c){var l,f;c.order=s++;try{for(var p=er.__values(zs.getAllChildren(c)),h=p.next();!h.done;h=p.next()){var d=h.value;a(d)}}catch(m){l={error:m}}finally{try{h&&!h.done&&(f=p.return)&&f.call(p)}finally{if(l)throw l.error}}}a(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(c){var l=c.event;return l===z_}):z_ in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Jt.toArray(this.config.entry||this.config.onEntry).map(function(c){return wo.toActionObject(c)}),this.onExit=Jt.toArray(this.config.exit||this.config.onExit).map(function(c){return wo.toActionObject(c)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Jt.toArray(this.config.invoke).map(function(c,l){var f,p;if(Jt.isMachine(c)){var h=Jt.createInvokeId(i.id,l);return i.machine.options.services=er.__assign((f={},f[h]=c,f),i.machine.options.services),use.toInvokeDefinition({src:h,id:h})}else if(Jt.isString(c.src)){var h=c.id||Jt.createInvokeId(i.id,l);return use.toInvokeDefinition(er.__assign(er.__assign({},c),{id:h,src:c.src}))}else if(Jt.isMachine(c.src)||Jt.isFunction(c.src)){var h=c.id||Jt.createInvokeId(i.id,l);return i.machine.options.services=er.__assign((p={},p[h]=c.src,p),i.machine.options.services),use.toInvokeDefinition(er.__assign(er.__assign({id:h},c),{src:h}))}else{var d=c.src;return use.toInvokeDefinition(er.__assign(er.__assign({id:Jt.createInvokeId(i.id,l)},c),{src:d}))}}),this.activities=Jt.toArray(this.config.activities).concat(this.invoke).map(function(c){return wo.toActivityDefinition(c)}),this.transition=this.transition.bind(this),this.tags=Jt.toArray(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||zs.getAllStateNodes(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,r){var n=this.options,u=n.actions,i=n.activities,o=n.guards,s=n.services,a=n.delays;return new e(this.config,{actions:er.__assign(er.__assign({},u),t.actions),activities:er.__assign(er.__assign({},i),t.activities),guards:er.__assign(er.__assign({},o),t.guards),services:er.__assign(er.__assign({},s),t.services),delays:er.__assign(er.__assign({},a),t.delays)},r!=null?r:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return Jt.isFunction(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Jt.mapValues(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(r,n){return r[n.eventType]=r[n.eventType]||[],r[n.eventType].push(n),r},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var r=t===z_,n=this.transitions.filter(function(u){var i=u.eventType===t;return r?i:i||u.eventType===MN});return this.__cache.candidates[t]=n,n},e.prototype.getDelayedTransitions=function(){var t=this,r=this.config.after;if(!r)return[];var n=function(i,o){var s=Jt.isFunction(i)?"".concat(t.id,":delay[").concat(o,"]"):i,a=wo.after(s,t.id);return t.onEntry.push(wo.send(a,{delay:i})),t.onExit.push(wo.cancel(a)),a},u=Jt.isArray(r)?r.map(function(i,o){var s=n(i.delay,o);return er.__assign(er.__assign({},i),{event:s})}):Jt.flatten(Object.keys(r).map(function(i,o){var s=r[i],a=Jt.isString(s)?{target:s}:s,c=isNaN(+i)?i:+i,l=n(c,o);return Jt.toArray(a).map(function(f){return er.__assign(er.__assign({},f),{event:l,delay:c})})}));return u.map(function(i){var o=i.delay;return er.__assign(er.__assign({},t.formatTransition(i)),{delay:o})})},e.prototype.getStateNodes=function(t){var r,n=this;if(!t)return[];var u=t instanceof B6.State?t.value:Jt.toStateValue(t,this.delimiter);if(Jt.isString(u)){var i=this.getStateNode(u).initial;return i!==void 0?this.getStateNodes((r={},r[u]=i,r)):[this,this.states[u]]}var o=Object.keys(u),s=[this];return s.push.apply(s,er.__spreadArray([],er.__read(Jt.flatten(o.map(function(a){return n.getStateNode(a).getStateNodes(u[a])}))),!1)),s},e.prototype.handles=function(t){var r=Jt.getEventType(t);return this.events.includes(r)},e.prototype.resolveState=function(t){var r=t instanceof B6.State?t:B6.State.create(t),n=Array.from(zs.getConfiguration([],this.getStateNodes(r.value)));return new B6.State(er.__assign(er.__assign({},r),{value:this.resolve(r.value),configuration:n,done:zs.isInFinalState(n,this),tags:zs.getTagsFromConfiguration(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,r,n){var u=this.getStateNode(t),i=u.next(r,n);return!i||!i.transitions.length?this.next(r,n):i},e.prototype.transitionCompoundNode=function(t,r,n){var u=Object.keys(t),i=this.getStateNode(u[0]),o=i._transition(t[u[0]],r,n);return!o||!o.transitions.length?this.next(r,n):o},e.prototype.transitionParallelNode=function(t,r,n){var u,i,o={};try{for(var s=er.__values(Object.keys(t)),a=s.next();!a.done;a=s.next()){var c=a.value,l=t[c];if(l){var f=this.getStateNode(c),p=f._transition(l,r,n);p&&(o[c]=p)}}}catch(y){u={error:y}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(u)throw u.error}}var h=Object.keys(o).map(function(y){return o[y]}),d=Jt.flatten(h.map(function(y){return y.transitions})),m=h.some(function(y){return y.transitions.length>0});if(!m)return this.next(r,n);var v=Jt.flatten(Object.keys(o).map(function(y){return o[y].configuration}));return{transitions:d,exitSet:Jt.flatten(h.map(function(y){return y.exitSet})),configuration:v,source:r,actions:Jt.flatten(Object.keys(o).map(function(y){return o[y].actions}))}},e.prototype._transition=function(t,r,n){return Jt.isString(t)?this.transitionLeafNode(t,r,n):Object.keys(t).length===1?this.transitionCompoundNode(t,r,n):this.transitionParallelNode(t,r,n)},e.prototype.getTransitionData=function(t,r){return this._transition(t.value,t,Jt.toSCXMLEvent(r))},e.prototype.next=function(t,r){var n,u,i=this,o=r.name,s=[],a=[],c;try{for(var l=er.__values(this.getCandidates(o)),f=l.next();!f.done;f=l.next()){var p=f.value,h=p.cond,d=p.in,m=t.context,v=d?Jt.isString(d)&&$_(d)?t.matches(Jt.toStateValue(this.getStateNodeById(d).path,this.delimiter)):Jt.matchesState(Jt.toStateValue(d,this.delimiter),Jt.path(this.path.slice(0,-2))(t.value)):!0,y=!1;try{y=!h||Jt.evaluateGuard(this.machine,h,m,r,t)}catch(E){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(o,"' in state node '").concat(this.id,`':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serverless-devs/s3",
|
|
3
|
-
"version": "0.1.3
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",
|
|
5
5
|
"homepage": "https://www.serverless-devs.com",
|
|
6
6
|
"keywords": [
|
package/releases/s3-linux
DELETED
|
Binary file
|
package/releases/s3-macos
DELETED
|
Binary file
|
package/releases/s3-win.exe
DELETED
|
Binary file
|