@microsoft/agents-copilotstudio-client 0.5.12-g2d752e9b13 → 0.5.19-gc1e2ea1096
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/dist/src/browser.mjs +7 -7
- package/dist/src/browser.mjs.map +4 -4
- package/dist/src/connectionSettings.js +2 -2
- package/dist/src/connectionSettings.js.map +1 -1
- package/dist/src/copilotStudioClient.d.ts +5 -0
- package/dist/src/copilotStudioClient.js +5 -0
- package/dist/src/copilotStudioClient.js.map +1 -1
- package/dist/src/powerPlatformEnvironment.d.ts +11 -0
- package/dist/src/powerPlatformEnvironment.js +92 -1
- package/dist/src/powerPlatformEnvironment.js.map +1 -1
- package/package.json +3 -3
- package/src/connectionSettings.ts +2 -2
- package/src/copilotStudioClient.ts +7 -1
- package/src/powerPlatformEnvironment.ts +92 -1
package/dist/src/browser.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var n0=Object.create;var Go=Object.defineProperty;var s0=Object.getOwnPropertyDescriptor;var o0=Object.getOwnPropertyNames;var a0=Object.getPrototypeOf,u0=Object.prototype.hasOwnProperty;var u=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),c0=(r,e)=>{for(var t in e)Go(r,t,{get:e[t],enumerable:!0})},l0=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of o0(e))!u0.call(r,n)&&n!==t&&Go(r,n,{get:()=>e[n],enumerable:!(i=s0(e,n))||i.enumerable});return r};var Xo=(r,e,t)=>(t=r!=null?n0(a0(r)):{},l0(e||!r||!r.__esModule?Go(t,"default",{value:r,enumerable:!0}):t,r));var Fr=u(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.getParsedType=D.ZodParsedType=D.objectUtil=D.util=void 0;var Oa;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{let s={};for(let o of n)s[o]=o;return s},r.getValidEnumValues=n=>{let s=r.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),o={};for(let a of s)o[a]=n[a];return r.objectValues(o)},r.objectValues=n=>r.objectKeys(n).map(function(s){return n[s]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let s=[];for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&s.push(o);return s},r.find=(n,s)=>{for(let o of n)if(s(o))return o},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function i(n,s=" | "){return n.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}r.joinValues=i,r.jsonStringifyReplacer=(n,s)=>typeof s=="bigint"?s.toString():s})(Oa||(D.util=Oa={}));var Vf;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Vf||(D.objectUtil=Vf={}));D.ZodParsedType=Oa.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var Ax=r=>{switch(typeof r){case"undefined":return D.ZodParsedType.undefined;case"string":return D.ZodParsedType.string;case"number":return Number.isNaN(r)?D.ZodParsedType.nan:D.ZodParsedType.number;case"boolean":return D.ZodParsedType.boolean;case"function":return D.ZodParsedType.function;case"bigint":return D.ZodParsedType.bigint;case"symbol":return D.ZodParsedType.symbol;case"object":return Array.isArray(r)?D.ZodParsedType.array:r===null?D.ZodParsedType.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?D.ZodParsedType.promise:typeof Map!="undefined"&&r instanceof Map?D.ZodParsedType.map:typeof Set!="undefined"&&r instanceof Set?D.ZodParsedType.set:typeof Date!="undefined"&&r instanceof Date?D.ZodParsedType.date:D.ZodParsedType.object;default:return D.ZodParsedType.unknown}};D.getParsedType=Ax});var Bi=u(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.ZodError=Ve.quotelessJson=Ve.ZodIssueCode=void 0;var Df=Fr();Ve.ZodIssueCode=Df.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var jx=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");Ve.quotelessJson=jx;var Mr=class r extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(s){return s.message},i={_errors:[]},n=s=>{for(let o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(n);else if(o.code==="invalid_return_type")n(o.returnTypeError);else if(o.code==="invalid_arguments")n(o.argumentsError);else if(o.path.length===0)i._errors.push(t(o));else{let a=i,c=0;for(;c<o.path.length;){let l=o.path[c];c===o.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(t(o))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return n(this),i}static assert(e){if(!(e instanceof r))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Df.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},i=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:t}}get formErrors(){return this.flatten()}};Ve.ZodError=Mr;Mr.create=r=>new Mr(r)});var qa=u(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});var ee=Bi(),Qe=Fr(),Ex=(r,e)=>{let t;switch(r.code){case ee.ZodIssueCode.invalid_type:r.received===Qe.ZodParsedType.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case ee.ZodIssueCode.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,Qe.util.jsonStringifyReplacer)}`;break;case ee.ZodIssueCode.unrecognized_keys:t=`Unrecognized key(s) in object: ${Qe.util.joinValues(r.keys,", ")}`;break;case ee.ZodIssueCode.invalid_union:t="Invalid input";break;case ee.ZodIssueCode.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${Qe.util.joinValues(r.options)}`;break;case ee.ZodIssueCode.invalid_enum_value:t=`Invalid enum value. Expected ${Qe.util.joinValues(r.options)}, received '${r.received}'`;break;case ee.ZodIssueCode.invalid_arguments:t="Invalid function arguments";break;case ee.ZodIssueCode.invalid_return_type:t="Invalid function return type";break;case ee.ZodIssueCode.invalid_date:t="Invalid date";break;case ee.ZodIssueCode.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:Qe.util.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case ee.ZodIssueCode.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case ee.ZodIssueCode.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case ee.ZodIssueCode.custom:t="Invalid input";break;case ee.ZodIssueCode.invalid_intersection_types:t="Intersection results could not be merged";break;case ee.ZodIssueCode.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case ee.ZodIssueCode.not_finite:t="Number must be finite";break;default:t=e.defaultError,Qe.util.assertNever(r)}return{message:t}};xa.default=Ex});var $i=u(De=>{"use strict";var kx=De&&De.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(De,"__esModule",{value:!0});De.defaultErrorMap=void 0;De.setErrorMap=Rx;De.getErrorMap=Px;var zf=kx(qa());De.defaultErrorMap=zf.default;var Wf=zf.default;function Rx(r){Wf=r}function Px(){return Wf}});var Ca=u(Z=>{"use strict";var Nx=Z&&Z.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Z,"__esModule",{value:!0});Z.isAsync=Z.isValid=Z.isDirty=Z.isAborted=Z.OK=Z.DIRTY=Z.INVALID=Z.ParseStatus=Z.EMPTY_PATH=Z.makeIssue=void 0;Z.addIssueToContext=Ux;var Fx=$i(),Bf=Nx(qa()),Mx=r=>{let{data:e,path:t,errorMaps:i,issueData:n}=r,s=[...t,...n.path||[]],o={...n,path:s};if(n.message!==void 0)return{...n,path:s,message:n.message};let a="",c=i.filter(l=>!!l).slice().reverse();for(let l of c)a=l(o,{data:e,defaultError:a}).message;return{...n,path:s,message:a}};Z.makeIssue=Mx;Z.EMPTY_PATH=[];function Ux(r,e){let t=(0,Fx.getErrorMap)(),i=(0,Z.makeIssue)({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Bf.default?void 0:Bf.default].filter(n=>!!n)});r.common.issues.push(i)}var Ta=class r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let i=[];for(let n of t){if(n.status==="aborted")return Z.INVALID;n.status==="dirty"&&e.dirty(),i.push(n.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,t){let i=[];for(let n of t){let s=await n.key,o=await n.value;i.push({key:s,value:o})}return r.mergeObjectSync(e,i)}static mergeObjectSync(e,t){let i={};for(let n of t){let{key:s,value:o}=n;if(s.status==="aborted"||o.status==="aborted")return Z.INVALID;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value!="undefined"||n.alwaysSet)&&(i[s.value]=o.value)}return{status:e.value,value:i}}};Z.ParseStatus=Ta;Z.INVALID=Object.freeze({status:"aborted"});var Zx=r=>({status:"dirty",value:r});Z.DIRTY=Zx;var Lx=r=>({status:"valid",value:r});Z.OK=Lx;var Vx=r=>r.status==="aborted";Z.isAborted=Vx;var Dx=r=>r.status==="dirty";Z.isDirty=Dx;var zx=r=>r.status==="valid";Z.isValid=zx;var Wx=r=>typeof Promise!="undefined"&&r instanceof Promise;Z.isAsync=Wx});var Hf=u($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0})});var Yf=u(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.errorUtil=void 0;var Jf;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(Jf||(Hi.errorUtil=Jf={}))});var ah=u(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0});h.discriminatedUnion=h.date=h.boolean=h.bigint=h.array=h.any=h.coerce=h.ZodFirstPartyTypeKind=h.late=h.ZodSchema=h.Schema=h.ZodReadonly=h.ZodPipeline=h.ZodBranded=h.BRAND=h.ZodNaN=h.ZodCatch=h.ZodDefault=h.ZodNullable=h.ZodOptional=h.ZodTransformer=h.ZodEffects=h.ZodPromise=h.ZodNativeEnum=h.ZodEnum=h.ZodLiteral=h.ZodLazy=h.ZodFunction=h.ZodSet=h.ZodMap=h.ZodRecord=h.ZodTuple=h.ZodIntersection=h.ZodDiscriminatedUnion=h.ZodUnion=h.ZodObject=h.ZodArray=h.ZodVoid=h.ZodNever=h.ZodUnknown=h.ZodAny=h.ZodNull=h.ZodUndefined=h.ZodSymbol=h.ZodDate=h.ZodBoolean=h.ZodBigInt=h.ZodNumber=h.ZodString=h.ZodType=void 0;h.NEVER=h.void=h.unknown=h.union=h.undefined=h.tuple=h.transformer=h.symbol=h.string=h.strictObject=h.set=h.record=h.promise=h.preprocess=h.pipeline=h.ostring=h.optional=h.onumber=h.oboolean=h.object=h.number=h.nullable=h.null=h.never=h.nativeEnum=h.nan=h.map=h.literal=h.lazy=h.intersection=h.instanceof=h.function=h.enum=h.effect=void 0;h.datetimeRegex=eh;h.custom=rh;var w=Bi(),Ji=$i(),T=Yf(),d=Ca(),x=Fr(),be=class{constructor(e,t,i,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=i,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Kf=(r,e)=>{if((0,d.isValid)(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new w.ZodError(r.common.issues);return this._error=t,this._error}}};function E(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:i,description:n}=r;if(e&&(t||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(o,a)=>{var l,f;let{message:c}=r;return o.code==="invalid_enum_value"?{message:c!=null?c:a.defaultError}:typeof a.data=="undefined"?{message:(l=c!=null?c:i)!=null?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(f=c!=null?c:t)!=null?f:a.defaultError}},description:n}}var k=class{get description(){return this._def.description}_getType(e){return(0,x.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,x.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new d.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,x.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if((0,d.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let i=this.safeParse(e,t);if(i.success)return i.data;throw i.error}safeParse(e,t){var s;let i={common:{issues:[],async:(s=t==null?void 0:t.async)!=null?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,x.getParsedType)(e)},n=this._parseSync({data:e,path:i.path,parent:i});return Kf(i,n)}"~validate"(e){var i,n;let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,x.getParsedType)(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:t});return(0,d.isValid)(s)?{value:s.value}:{issues:t.common.issues}}catch(s){(n=(i=s==null?void 0:s.message)==null?void 0:i.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(s=>(0,d.isValid)(s)?{value:s.value}:{issues:t.common.issues})}async parseAsync(e,t){let i=await this.safeParseAsync(e,t);if(i.success)return i.data;throw i.error}async safeParseAsync(e,t){let i={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,x.getParsedType)(e)},n=this._parse({data:e,path:i.path,parent:i}),s=await((0,d.isAsync)(n)?n:Promise.resolve(n));return Kf(i,s)}refine(e,t){let i=n=>typeof t=="string"||typeof t=="undefined"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,s)=>{let o=e(n),a=()=>s.addIssue({code:w.ZodIssueCode.custom,...i(n)});return typeof Promise!="undefined"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,t){return this._refinement((i,n)=>e(i)?!0:(n.addIssue(typeof t=="function"?t(i,n):t),!1))}_refinement(e){return new he({schema:this,typeName:A.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return ve.create(this,this._def)}nullable(){return Ce.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Pe.create(this)}promise(){return Be.create(this,this._def)}or(e){return ot.create([this,e],this._def)}and(e){return at.create(this,e,this._def)}transform(e){return new he({...E(this._def),schema:this,typeName:A.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new ht({...E(this._def),innerType:this,defaultValue:t,typeName:A.ZodDefault})}brand(){return new Ur({typeName:A.ZodBranded,type:this,...E(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new pt({...E(this._def),innerType:this,catchValue:t,typeName:A.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Zr.create(this,e)}readonly(){return dt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};h.ZodType=k;h.Schema=k;h.ZodSchema=k;var Bx=/^c[^\s-]{8,}$/i,$x=/^[0-9a-z]+$/,Hx=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Jx=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Yx=/^[a-z0-9_-]{21}$/i,Kx=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Gx=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Xx=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Qx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ia,eq=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tq=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,rq=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,iq=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,nq=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,sq=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Xf="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",oq=new RegExp(`^${Xf}$`);function Qf(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);let t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function aq(r){return new RegExp(`^${Qf(r)}$`)}function eh(r){let e=`${Xf}T${Qf(r)}`,t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function uq(r,e){return!!((e==="v4"||!e)&&eq.test(r)||(e==="v6"||!e)&&rq.test(r))}function cq(r,e){if(!Kx.test(r))return!1;try{let[t]=r.split("."),i=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(i));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function lq(r,e){return!!((e==="v4"||!e)&&tq.test(r)||(e==="v6"||!e)&&iq.test(r))}var ze=class r extends k{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==x.ZodParsedType.string){let s=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(s,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.string,received:s.parsedType}),d.INVALID}let i=new d.ParseStatus,n;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="max")e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="length"){let o=e.data.length>s.value,a=e.data.length<s.value;(o||a)&&(n=this._getOrReturnCtx(e,n),o?(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")Xx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"email",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")Ia||(Ia=new RegExp(Qx,"u")),Ia.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"emoji",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")Jx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"uuid",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="nanoid")Yx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"nanoid",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")Bx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"cuid",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")$x.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"cuid2",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")Hx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"ulid",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"url",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"regex",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),i.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?eh(s).test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="date"?oq.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:"date",message:s.message}),i.dirty()):s.kind==="time"?aq(s).test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:"time",message:s.message}),i.dirty()):s.kind==="duration"?Gx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"duration",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="ip"?uq(e.data,s.version)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"ip",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="jwt"?cq(e.data,s.alg)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"jwt",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="cidr"?lq(e.data,s.version)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"cidr",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="base64"?nq.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"base64",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="base64url"?sq.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"base64url",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):x.util.assertNever(s);return{status:i.value,value:e.data}}_regex(e,t,i){return this.refinement(n=>e.test(n),{validation:t,code:w.ZodIssueCode.invalid_string,...T.errorUtil.errToObj(i)})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...T.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...T.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...T.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...T.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...T.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...T.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...T.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...T.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...T.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...T.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...T.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...T.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...T.errorUtil.errToObj(e)})}datetime(e){var t,i;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!=null?t:!1,local:(i=e==null?void 0:e.local)!=null?i:!1,...T.errorUtil.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,...T.errorUtil.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...T.errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...T.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...T.errorUtil.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...T.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...T.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...T.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...T.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...T.errorUtil.errToObj(t)})}nonempty(e){return this.min(1,T.errorUtil.errToObj(e))}trim(){return new r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};h.ZodString=ze;ze.create=r=>{var e;return new ze({checks:[],typeName:A.ZodString,coerce:(e=r==null?void 0:r.coerce)!=null?e:!1,...E(r)})};function fq(r,e){let t=(r.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,n=t>i?t:i,s=Number.parseInt(r.toFixed(n).replace(".","")),o=Number.parseInt(e.toFixed(n).replace(".",""));return s%o/10**n}var et=class r extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==x.ZodParsedType.number){let s=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(s,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.number,received:s.parsedType}),d.INVALID}let i,n=new d.ParseStatus;for(let s of this._def.checks)s.kind==="int"?x.util.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:s.message}),n.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="multipleOf"?fq(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.not_finite,message:s.message}),n.dirty()):x.util.assertNever(s);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,T.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,T.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,T.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,T.errorUtil.toString(t))}setLimit(e,t,i,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:T.errorUtil.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:T.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:T.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:T.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:T.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:T.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:T.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:T.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:T.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:T.errorUtil.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.util.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(t===null||i.value>t)&&(t=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(t)&&Number.isFinite(e)}};h.ZodNumber=et;et.create=r=>new et({checks:[],typeName:A.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...E(r)});var tt=class r extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==x.ZodParsedType.bigint)return this._getInvalidInput(e);let i,n=new d.ParseStatus;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):x.util.assertNever(s);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.bigint,received:t.parsedType}),d.INVALID}gte(e,t){return this.setLimit("min",e,!0,T.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,T.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,T.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,T.errorUtil.toString(t))}setLimit(e,t,i,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:T.errorUtil.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:T.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:T.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:T.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:T.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:T.errorUtil.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};h.ZodBigInt=tt;tt.create=r=>{var e;return new tt({checks:[],typeName:A.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!=null?e:!1,...E(r)})};var rt=class extends k{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==x.ZodParsedType.boolean){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.boolean,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodBoolean=rt;rt.create=r=>new rt({typeName:A.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...E(r)});var it=class r extends k{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==x.ZodParsedType.date){let s=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(s,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.date,received:s.parsedType}),d.INVALID}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(s,{code:w.ZodIssueCode.invalid_date}),d.INVALID}let i=new d.ParseStatus,n;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),i.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):x.util.assertNever(s);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:T.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:T.errorUtil.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};h.ZodDate=it;it.create=r=>new it({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:A.ZodDate,...E(r)});var kt=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.symbol){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.symbol,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodSymbol=kt;kt.create=r=>new kt({typeName:A.ZodSymbol,...E(r)});var nt=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.undefined){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.undefined,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodUndefined=nt;nt.create=r=>new nt({typeName:A.ZodUndefined,...E(r)});var st=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.null){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.null,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodNull=st;st.create=r=>new st({typeName:A.ZodNull,...E(r)});var We=class extends k{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,d.OK)(e.data)}};h.ZodAny=We;We.create=r=>new We({typeName:A.ZodAny,...E(r)});var Re=class extends k{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,d.OK)(e.data)}};h.ZodUnknown=Re;Re.create=r=>new Re({typeName:A.ZodUnknown,...E(r)});var Se=class extends k{_parse(e){let t=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.never,received:t.parsedType}),d.INVALID}};h.ZodNever=Se;Se.create=r=>new Se({typeName:A.ZodNever,...E(r)});var Rt=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.undefined){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.void,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodVoid=Rt;Rt.create=r=>new Rt({typeName:A.ZodVoid,...E(r)});var Pe=class r extends k{_parse(e){let{ctx:t,status:i}=this._processInputParams(e),n=this._def;if(t.parsedType!==x.ZodParsedType.array)return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.array,received:t.parsedType}),d.INVALID;if(n.exactLength!==null){let o=t.data.length>n.exactLength.value,a=t.data.length<n.exactLength.value;(o||a)&&((0,d.addIssueToContext)(t,{code:o?w.ZodIssueCode.too_big:w.ZodIssueCode.too_small,minimum:a?n.exactLength.value:void 0,maximum:o?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&((0,d.addIssueToContext)(t,{code:w.ZodIssueCode.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&((0,d.addIssueToContext)(t,{code:w.ZodIssueCode.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),t.common.async)return Promise.all([...t.data].map((o,a)=>n.type._parseAsync(new be(t,o,t.path,a)))).then(o=>d.ParseStatus.mergeArray(i,o));let s=[...t.data].map((o,a)=>n.type._parseSync(new be(t,o,t.path,a)));return d.ParseStatus.mergeArray(i,s)}get element(){return this._def.type}min(e,t){return new r({...this._def,minLength:{value:e,message:T.errorUtil.toString(t)}})}max(e,t){return new r({...this._def,maxLength:{value:e,message:T.errorUtil.toString(t)}})}length(e,t){return new r({...this._def,exactLength:{value:e,message:T.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}};h.ZodArray=Pe;Pe.create=(r,e)=>new Pe({type:r,minLength:null,maxLength:null,exactLength:null,typeName:A.ZodArray,...E(e)});function Et(r){if(r instanceof ue){let e={};for(let t in r.shape){let i=r.shape[t];e[t]=ve.create(Et(i))}return new ue({...r._def,shape:()=>e})}else return r instanceof Pe?new Pe({...r._def,type:Et(r.element)}):r instanceof ve?ve.create(Et(r.unwrap())):r instanceof Ce?Ce.create(Et(r.unwrap())):r instanceof Te?Te.create(r.items.map(e=>Et(e))):r}var ue=class r extends k{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=x.util.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==x.ZodParsedType.object){let l=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(l,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.object,received:l.parsedType}),d.INVALID}let{status:i,ctx:n}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Se&&this._def.unknownKeys==="strip"))for(let l in n.data)o.includes(l)||a.push(l);let c=[];for(let l of o){let f=s[l],p=n.data[l];c.push({key:{status:"valid",value:l},value:f._parse(new be(n,p,n.path,l)),alwaysSet:l in n.data})}if(this._def.catchall instanceof Se){let l=this._def.unknownKeys;if(l==="passthrough")for(let f of a)c.push({key:{status:"valid",value:f},value:{status:"valid",value:n.data[f]}});else if(l==="strict")a.length>0&&((0,d.addIssueToContext)(n,{code:w.ZodIssueCode.unrecognized_keys,keys:a}),i.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let f of a){let p=n.data[f];c.push({key:{status:"valid",value:f},value:l._parse(new be(n,p,n.path,f)),alwaysSet:f in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let l=[];for(let f of c){let p=await f.key,y=await f.value;l.push({key:p,value:y,alwaysSet:f.alwaysSet})}return l}).then(l=>d.ParseStatus.mergeObjectSync(i,l)):d.ParseStatus.mergeObjectSync(i,c)}get shape(){return this._def.shape()}strict(e){return T.errorUtil.errToObj,new r({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,i)=>{var s,o,a,c;let n=(a=(o=(s=this._def).errorMap)==null?void 0:o.call(s,t,i).message)!=null?a:i.defaultError;return t.code==="unrecognized_keys"?{message:(c=T.errorUtil.errToObj(e).message)!=null?c:n}:{message:n}}}:{}})}strip(){return new r({...this._def,unknownKeys:"strip"})}passthrough(){return new r({...this._def,unknownKeys:"passthrough"})}extend(e){return new r({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new r({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:A.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new r({...this._def,catchall:e})}pick(e){let t={};for(let i of x.util.objectKeys(e))e[i]&&this.shape[i]&&(t[i]=this.shape[i]);return new r({...this._def,shape:()=>t})}omit(e){let t={};for(let i of x.util.objectKeys(this.shape))e[i]||(t[i]=this.shape[i]);return new r({...this._def,shape:()=>t})}deepPartial(){return Et(this)}partial(e){let t={};for(let i of x.util.objectKeys(this.shape)){let n=this.shape[i];e&&!e[i]?t[i]=n:t[i]=n.optional()}return new r({...this._def,shape:()=>t})}required(e){let t={};for(let i of x.util.objectKeys(this.shape))if(e&&!e[i])t[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof ve;)s=s._def.innerType;t[i]=s}return new r({...this._def,shape:()=>t})}keyof(){return th(x.util.objectKeys(this.shape))}};h.ZodObject=ue;ue.create=(r,e)=>new ue({shape:()=>r,unknownKeys:"strip",catchall:Se.create(),typeName:A.ZodObject,...E(e)});ue.strictCreate=(r,e)=>new ue({shape:()=>r,unknownKeys:"strict",catchall:Se.create(),typeName:A.ZodObject,...E(e)});ue.lazycreate=(r,e)=>new ue({shape:r,unknownKeys:"strip",catchall:Se.create(),typeName:A.ZodObject,...E(e)});var ot=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),i=this._def.options;function n(s){for(let a of s)if(a.result.status==="valid")return a.result;for(let a of s)if(a.result.status==="dirty")return t.common.issues.push(...a.ctx.common.issues),a.result;let o=s.map(a=>new w.ZodError(a.ctx.common.issues));return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_union,unionErrors:o}),d.INVALID}if(t.common.async)return Promise.all(i.map(async s=>{let o={...t,common:{...t.common,issues:[]},parent:null};return{result:await s._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(n);{let s,o=[];for(let c of i){let l={...t,common:{...t.common,issues:[]},parent:null},f=c._parseSync({data:t.data,path:t.path,parent:l});if(f.status==="valid")return f;f.status==="dirty"&&!s&&(s={result:f,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(c=>new w.ZodError(c));return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_union,unionErrors:a}),d.INVALID}}get options(){return this._def.options}};h.ZodUnion=ot;ot.create=(r,e)=>new ot({options:r,typeName:A.ZodUnion,...E(e)});var ke=r=>r instanceof ut?ke(r.schema):r instanceof he?ke(r.innerType()):r instanceof ct?[r.value]:r instanceof lt?r.options:r instanceof ft?x.util.objectValues(r.enum):r instanceof ht?ke(r._def.innerType):r instanceof nt?[void 0]:r instanceof st?[null]:r instanceof ve?[void 0,...ke(r.unwrap())]:r instanceof Ce?[null,...ke(r.unwrap())]:r instanceof Ur||r instanceof dt?ke(r.unwrap()):r instanceof pt?ke(r._def.innerType):[],Yi=class r extends k{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.ZodParsedType.object)return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.object,received:t.parsedType}),d.INVALID;let i=this.discriminator,n=t.data[i],s=this.optionsMap.get(n);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):((0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),d.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,i){let n=new Map;for(let s of t){let o=ke(s.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of o){if(n.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);n.set(a,s)}}return new r({typeName:A.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...E(i)})}};h.ZodDiscriminatedUnion=Yi;function Aa(r,e){let t=(0,x.getParsedType)(r),i=(0,x.getParsedType)(e);if(r===e)return{valid:!0,data:r};if(t===x.ZodParsedType.object&&i===x.ZodParsedType.object){let n=x.util.objectKeys(e),s=x.util.objectKeys(r).filter(a=>n.indexOf(a)!==-1),o={...r,...e};for(let a of s){let c=Aa(r[a],e[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(t===x.ZodParsedType.array&&i===x.ZodParsedType.array){if(r.length!==e.length)return{valid:!1};let n=[];for(let s=0;s<r.length;s++){let o=r[s],a=e[s],c=Aa(o,a);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return t===x.ZodParsedType.date&&i===x.ZodParsedType.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}var at=class extends k{_parse(e){let{status:t,ctx:i}=this._processInputParams(e),n=(s,o)=>{if((0,d.isAborted)(s)||(0,d.isAborted)(o))return d.INVALID;let a=Aa(s.value,o.value);return a.valid?(((0,d.isDirty)(s)||(0,d.isDirty)(o))&&t.dirty(),{status:t.value,value:a.data}):((0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_intersection_types}),d.INVALID)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([s,o])=>n(s,o)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};h.ZodIntersection=at;at.create=(r,e,t)=>new at({left:r,right:e,typeName:A.ZodIntersection,...E(t)});var Te=class r extends k{_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==x.ZodParsedType.array)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.array,received:i.parsedType}),d.INVALID;if(i.data.length<this._def.items.length)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),d.INVALID;!this._def.rest&&i.data.length>this._def.items.length&&((0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let s=[...i.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new be(i,o,i.path,a)):null}).filter(o=>!!o);return i.common.async?Promise.all(s).then(o=>d.ParseStatus.mergeArray(t,o)):d.ParseStatus.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new r({...this._def,rest:e})}};h.ZodTuple=Te;Te.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Te({items:r,typeName:A.ZodTuple,rest:null,...E(e)})};var Ki=class r extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==x.ZodParsedType.object)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.object,received:i.parsedType}),d.INVALID;let n=[],s=this._def.keyType,o=this._def.valueType;for(let a in i.data)n.push({key:s._parse(new be(i,a,i.path,a)),value:o._parse(new be(i,i.data[a],i.path,a)),alwaysSet:a in i.data});return i.common.async?d.ParseStatus.mergeObjectAsync(t,n):d.ParseStatus.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,i){return t instanceof k?new r({keyType:e,valueType:t,typeName:A.ZodRecord,...E(i)}):new r({keyType:ze.create(),valueType:e,typeName:A.ZodRecord,...E(t)})}};h.ZodRecord=Ki;var Pt=class extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==x.ZodParsedType.map)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.map,received:i.parsedType}),d.INVALID;let n=this._def.keyType,s=this._def.valueType,o=[...i.data.entries()].map(([a,c],l)=>({key:n._parse(new be(i,a,i.path,[l,"key"])),value:s._parse(new be(i,c,i.path,[l,"value"]))}));if(i.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of o){let l=await c.key,f=await c.value;if(l.status==="aborted"||f.status==="aborted")return d.INVALID;(l.status==="dirty"||f.status==="dirty")&&t.dirty(),a.set(l.value,f.value)}return{status:t.value,value:a}})}else{let a=new Map;for(let c of o){let l=c.key,f=c.value;if(l.status==="aborted"||f.status==="aborted")return d.INVALID;(l.status==="dirty"||f.status==="dirty")&&t.dirty(),a.set(l.value,f.value)}return{status:t.value,value:a}}}};h.ZodMap=Pt;Pt.create=(r,e,t)=>new Pt({valueType:e,keyType:r,typeName:A.ZodMap,...E(t)});var Nt=class r extends k{_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==x.ZodParsedType.set)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.set,received:i.parsedType}),d.INVALID;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&((0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&((0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let s=this._def.valueType;function o(c){let l=new Set;for(let f of c){if(f.status==="aborted")return d.INVALID;f.status==="dirty"&&t.dirty(),l.add(f.value)}return{status:t.value,value:l}}let a=[...i.data.values()].map((c,l)=>s._parse(new be(i,c,i.path,l)));return i.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(e,t){return new r({...this._def,minSize:{value:e,message:T.errorUtil.toString(t)}})}max(e,t){return new r({...this._def,maxSize:{value:e,message:T.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};h.ZodSet=Nt;Nt.create=(r,e)=>new Nt({valueType:r,minSize:null,maxSize:null,typeName:A.ZodSet,...E(e)});var Gi=class r extends k{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.ZodParsedType.function)return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.function,received:t.parsedType}),d.INVALID;function i(a,c){return(0,d.makeIssue)({data:a,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,Ji.getErrorMap)(),Ji.defaultErrorMap].filter(l=>!!l),issueData:{code:w.ZodIssueCode.invalid_arguments,argumentsError:c}})}function n(a,c){return(0,d.makeIssue)({data:a,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,Ji.getErrorMap)(),Ji.defaultErrorMap].filter(l=>!!l),issueData:{code:w.ZodIssueCode.invalid_return_type,returnTypeError:c}})}let s={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof Be){let a=this;return(0,d.OK)(async function(...c){let l=new w.ZodError([]),f=await a._def.args.parseAsync(c,s).catch(g=>{throw l.addIssue(i(c,g)),l}),p=await Reflect.apply(o,this,f);return await a._def.returns._def.type.parseAsync(p,s).catch(g=>{throw l.addIssue(n(p,g)),l})})}else{let a=this;return(0,d.OK)(function(...c){let l=a._def.args.safeParse(c,s);if(!l.success)throw new w.ZodError([i(c,l.error)]);let f=Reflect.apply(o,this,l.data),p=a._def.returns.safeParse(f,s);if(!p.success)throw new w.ZodError([n(f,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new r({...this._def,args:Te.create(e).rest(Re.create())})}returns(e){return new r({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,i){return new r({args:e||Te.create([]).rest(Re.create()),returns:t||Re.create(),typeName:A.ZodFunction,...E(i)})}};h.ZodFunction=Gi;var ut=class extends k{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};h.ZodLazy=ut;ut.create=(r,e)=>new ut({getter:r,typeName:A.ZodLazy,...E(e)});var ct=class extends k{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(t,{received:t.data,code:w.ZodIssueCode.invalid_literal,expected:this._def.value}),d.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}};h.ZodLiteral=ct;ct.create=(r,e)=>new ct({value:r,typeName:A.ZodLiteral,...E(e)});function th(r,e){return new lt({values:r,typeName:A.ZodEnum,...E(e)})}var lt=class r extends k{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),i=this._def.values;return(0,d.addIssueToContext)(t,{expected:x.util.joinValues(i),received:t.parsedType,code:w.ZodIssueCode.invalid_type}),d.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),i=this._def.values;return(0,d.addIssueToContext)(t,{received:t.data,code:w.ZodIssueCode.invalid_enum_value,options:i}),d.INVALID}return(0,d.OK)(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return r.create(e,{...this._def,...t})}exclude(e,t=this._def){return r.create(this.options.filter(i=>!e.includes(i)),{...this._def,...t})}};h.ZodEnum=lt;lt.create=th;var ft=class extends k{_parse(e){let t=x.util.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==x.ZodParsedType.string&&i.parsedType!==x.ZodParsedType.number){let n=x.util.objectValues(t);return(0,d.addIssueToContext)(i,{expected:x.util.joinValues(n),received:i.parsedType,code:w.ZodIssueCode.invalid_type}),d.INVALID}if(this._cache||(this._cache=new Set(x.util.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let n=x.util.objectValues(t);return(0,d.addIssueToContext)(i,{received:i.data,code:w.ZodIssueCode.invalid_enum_value,options:n}),d.INVALID}return(0,d.OK)(e.data)}get enum(){return this._def.values}};h.ZodNativeEnum=ft;ft.create=(r,e)=>new ft({values:r,typeName:A.ZodNativeEnum,...E(e)});var Be=class extends k{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.ZodParsedType.promise&&t.common.async===!1)return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.promise,received:t.parsedType}),d.INVALID;let i=t.parsedType===x.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,d.OK)(i.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};h.ZodPromise=Be;Be.create=(r,e)=>new Be({type:r,typeName:A.ZodPromise,...E(e)});var he=class extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===A.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:i}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:o=>{(0,d.addIssueToContext)(i,o),o.fatal?t.abort():t.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),n.type==="preprocess"){let o=n.transform(i.data,s);if(i.common.async)return Promise.resolve(o).then(async a=>{if(t.value==="aborted")return d.INVALID;let c=await this._def.schema._parseAsync({data:a,path:i.path,parent:i});return c.status==="aborted"?d.INVALID:c.status==="dirty"||t.value==="dirty"?(0,d.DIRTY)(c.value):c});{if(t.value==="aborted")return d.INVALID;let a=this._def.schema._parseSync({data:o,path:i.path,parent:i});return a.status==="aborted"?d.INVALID:a.status==="dirty"||t.value==="dirty"?(0,d.DIRTY)(a.value):a}}if(n.type==="refinement"){let o=a=>{let c=n.refinement(a,s);if(i.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?d.INVALID:(a.status==="dirty"&&t.dirty(),o(a.value),{status:t.value,value:a.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>a.status==="aborted"?d.INVALID:(a.status==="dirty"&&t.dirty(),o(a.value).then(()=>({status:t.value,value:a.value}))))}if(n.type==="transform")if(i.common.async===!1){let o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!(0,d.isValid)(o))return d.INVALID;let a=n.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>(0,d.isValid)(o)?Promise.resolve(n.transform(o.value,s)).then(a=>({status:t.value,value:a})):d.INVALID);x.util.assertNever(n)}};h.ZodEffects=he;h.ZodTransformer=he;he.create=(r,e,t)=>new he({schema:r,typeName:A.ZodEffects,effect:e,...E(t)});he.createWithPreprocess=(r,e,t)=>new he({schema:e,effect:{type:"preprocess",transform:r},typeName:A.ZodEffects,...E(t)});var ve=class extends k{_parse(e){return this._getType(e)===x.ZodParsedType.undefined?(0,d.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};h.ZodOptional=ve;ve.create=(r,e)=>new ve({innerType:r,typeName:A.ZodOptional,...E(e)});var Ce=class extends k{_parse(e){return this._getType(e)===x.ZodParsedType.null?(0,d.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};h.ZodNullable=Ce;Ce.create=(r,e)=>new Ce({innerType:r,typeName:A.ZodNullable,...E(e)});var ht=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),i=t.data;return t.parsedType===x.ZodParsedType.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};h.ZodDefault=ht;ht.create=(r,e)=>new ht({innerType:r,typeName:A.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...E(e)});var pt=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),i={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return(0,d.isAsync)(n)?n.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new w.ZodError(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new w.ZodError(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};h.ZodCatch=pt;pt.create=(r,e)=>new pt({innerType:r,typeName:A.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...E(e)});var Ft=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.nan){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.nan,received:i.parsedType}),d.INVALID}return{status:"valid",value:e.data}}};h.ZodNaN=Ft;Ft.create=r=>new Ft({typeName:A.ZodNaN,...E(r)});h.BRAND=Symbol("zod_brand");var Ur=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),i=t.data;return this._def.type._parse({data:i,path:t.path,parent:t})}unwrap(){return this._def.type}};h.ZodBranded=Ur;var Zr=class r extends k{_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?d.INVALID:s.status==="dirty"?(t.dirty(),(0,d.DIRTY)(s.value)):this._def.out._parseAsync({data:s.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?d.INVALID:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(e,t){return new r({in:e,out:t,typeName:A.ZodPipeline})}};h.ZodPipeline=Zr;var dt=class extends k{_parse(e){let t=this._def.innerType._parse(e),i=n=>((0,d.isValid)(n)&&(n.value=Object.freeze(n.value)),n);return(0,d.isAsync)(t)?t.then(n=>i(n)):i(t)}unwrap(){return this._def.innerType}};h.ZodReadonly=dt;dt.create=(r,e)=>new dt({innerType:r,typeName:A.ZodReadonly,...E(e)});function Gf(r,e){let t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}function rh(r,e={},t){return r?We.create().superRefine((i,n)=>{var o,a;let s=r(i);if(s instanceof Promise)return s.then(c=>{var l,f;if(!c){let p=Gf(e,i),y=(f=(l=p.fatal)!=null?l:t)!=null?f:!0;n.addIssue({code:"custom",...p,fatal:y})}});if(!s){let c=Gf(e,i),l=(a=(o=c.fatal)!=null?o:t)!=null?a:!0;n.addIssue({code:"custom",...c,fatal:l})}}):We.create()}h.late={object:ue.lazycreate};var A;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(A||(h.ZodFirstPartyTypeKind=A={}));var hq=(r,e={message:`Input not instance of ${r.name}`})=>rh(t=>t instanceof r,e);h.instanceof=hq;var ih=ze.create;h.string=ih;var nh=et.create;h.number=nh;var pq=Ft.create;h.nan=pq;var dq=tt.create;h.bigint=dq;var sh=rt.create;h.boolean=sh;var vq=it.create;h.date=vq;var bq=kt.create;h.symbol=bq;var mq=nt.create;h.undefined=mq;var yq=st.create;h.null=yq;var _q=We.create;h.any=_q;var gq=Re.create;h.unknown=gq;var wq=Se.create;h.never=wq;var Sq=Rt.create;h.void=Sq;var Oq=Pe.create;h.array=Oq;var xq=ue.create;h.object=xq;var qq=ue.strictCreate;h.strictObject=qq;var Tq=ot.create;h.union=Tq;var Cq=Yi.create;h.discriminatedUnion=Cq;var Iq=at.create;h.intersection=Iq;var Aq=Te.create;h.tuple=Aq;var jq=Ki.create;h.record=jq;var Eq=Pt.create;h.map=Eq;var kq=Nt.create;h.set=kq;var Rq=Gi.create;h.function=Rq;var Pq=ut.create;h.lazy=Pq;var Nq=ct.create;h.literal=Nq;var Fq=lt.create;h.enum=Fq;var Mq=ft.create;h.nativeEnum=Mq;var Uq=Be.create;h.promise=Uq;var oh=he.create;h.effect=oh;h.transformer=oh;var Zq=ve.create;h.optional=Zq;var Lq=Ce.create;h.nullable=Lq;var Vq=he.createWithPreprocess;h.preprocess=Vq;var Dq=Zr.create;h.pipeline=Dq;var zq=()=>ih().optional();h.ostring=zq;var Wq=()=>nh().optional();h.onumber=Wq;var Bq=()=>sh().optional();h.oboolean=Bq;h.coerce={string:r=>ze.create({...r,coerce:!0}),number:r=>et.create({...r,coerce:!0}),boolean:r=>rt.create({...r,coerce:!0}),bigint:r=>tt.create({...r,coerce:!0}),date:r=>it.create({...r,coerce:!0})};h.NEVER=d.INVALID});var ja=u(me=>{"use strict";var $q=me&&me.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),Mt=me&&me.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&$q(e,r,t)};Object.defineProperty(me,"__esModule",{value:!0});Mt($i(),me);Mt(Ca(),me);Mt(Hf(),me);Mt(Fr(),me);Mt(ah(),me);Mt(Bi(),me)});var Ea=u(ce=>{"use strict";var uh=ce&&ce.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),Hq=ce&&ce.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Jq=ce&&ce.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&uh(e,r,t);return Hq(e,r),e},Yq=ce&&ce.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&uh(e,r,t)};Object.defineProperty(ce,"__esModule",{value:!0});ce.z=void 0;var ch=Jq(ja());ce.z=ch;Yq(ja(),ce);ce.default=ch});var z=u(Ie=>{"use strict";var Kq=Ie&&Ie.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),Gq=Ie&&Ie.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Kq(e,r,t)},Xq=Ie&&Ie.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ie,"__esModule",{value:!0});var Qq=Xq(Ea());Gq(Ea(),Ie);Ie.default=Qq.default});var ka=u(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.actionTypesZodSchema=Ut.ActionTypes=void 0;var eT=z(),lh;(function(r){r.OpenUrl="openUrl",r.ImBack="imBack",r.PostBack="postBack",r.PlayAudio="playAudio",r.PlayVideo="playVideo",r.ShowImage="showImage",r.DownloadFile="downloadFile",r.Signin="signin",r.Call="call",r.MessageBack="messageBack",r.OpenApp="openApp"})(lh||(Ut.ActionTypes=lh={}));Ut.actionTypesZodSchema=eT.z.enum(["openUrl","imBack","postBack","playAudio","showImage","downloadFile","signin","call","messageBack","openApp"])});var Ra=u(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.semanticActionStateTypesZodSchema=Zt.SemanticActionStateTypes=void 0;var tT=z(),fh;(function(r){r.Start="start",r.Continue="continue",r.Done="done"})(fh||(Zt.SemanticActionStateTypes=fh={}));Zt.semanticActionStateTypesZodSchema=tT.z.enum(["start","continue","done"])});var Pa=u(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.attachmentLayoutTypesZodSchema=Lt.AttachmentLayoutTypes=void 0;var rT=z(),hh;(function(r){r.List="list",r.Carousel="carousel"})(hh||(Lt.AttachmentLayoutTypes=hh={}));Lt.attachmentLayoutTypesZodSchema=rT.z.enum(["list","carousel"])});var Na=u(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.Channels=void 0;var ph;(function(r){r.Alexa="alexa",r.Console="console",r.Directline="directline",r.DirectlineSpeech="directlinespeech",r.Email="email",r.Emulator="emulator",r.Facebook="facebook",r.Groupme="groupme",r.Line="line",r.Msteams="msteams",r.Omni="omnichannel",r.Outlook="outlook",r.Skype="skype",r.Slack="slack",r.Sms="sms",r.Telegram="telegram",r.Telephony="telephony",r.Test="test",r.Webchat="webchat"})(ph||(Xi.Channels=ph={}))});var Fa=u(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.endOfConversationCodesZodSchema=Vt.EndOfConversationCodes=void 0;var iT=z(),dh;(function(r){r.Unknown="unknown",r.CompletedSuccessfully="completedSuccessfully",r.UserCancelled="userCancelled",r.AgentTimedOut="agentTimedOut",r.AgentIssuedInvalidMessage="agentIssuedInvalidMessage",r.ChannelFailed="channelFailed"})(dh||(Vt.EndOfConversationCodes=dh={}));Vt.endOfConversationCodesZodSchema=iT.z.enum(["unknown","completedSuccessfully","userCancelled","agentTimedOut","agentIssuedInvalidMessage","channelFailed"])});var Qi=u(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.roleTypeZodSchema=Dt.RoleTypes=void 0;var nT=z(),vh;(function(r){r.User="user",r.Agent="bot",r.Skill="skill"})(vh||(Dt.RoleTypes=vh={}));Dt.roleTypeZodSchema=nT.z.enum(["user","bot","skill"])});var bh=u(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.addAIToActivity=void 0;var sT=(r,e,t)=>{var i;let n={type:"https://schema.org/Message","@type":"Message","@context":"https://schema.org","@id":"",additionalType:["AIGeneratedContent"],citation:e,usageInfo:t};(i=r.entities)!==null&&i!==void 0||(r.entities=[]),r.entities.push(n)};en.addAIToActivity=sT});var mh=u(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.adaptiveCardInvokeActionZodSchema=void 0;var vt=z();tn.adaptiveCardInvokeActionZodSchema=vt.z.object({type:vt.z.string().min(1),id:vt.z.string().optional(),verb:vt.z.string().min(1),data:vt.z.record(vt.z.string().min(1),vt.z.any())})});var yh=u(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.default="ffffffff-ffff-ffff-ffff-ffffffffffff"});var _h=u(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.default="00000000-0000-0000-0000-000000000000"});var gh=u(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i});var Lr=u(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});var oT=gh();function aT(r){return typeof r=="string"&&oT.default.test(r)}La.default=aT});var Vr=u(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});var uT=Lr();function cT(r){if(!(0,uT.default)(r))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(r.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(r.slice(9,13),16))>>>8,e&255,(e=parseInt(r.slice(14,18),16))>>>8,e&255,(e=parseInt(r.slice(19,23),16))>>>8,e&255,(e=parseInt(r.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}Va.default=cT});var Ne=u(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.unsafeStringify=void 0;var lT=Lr(),G=[];for(let r=0;r<256;++r)G.push((r+256).toString(16).slice(1));function wh(r,e=0){return(G[r[e+0]]+G[r[e+1]]+G[r[e+2]]+G[r[e+3]]+"-"+G[r[e+4]]+G[r[e+5]]+"-"+G[r[e+6]]+G[r[e+7]]+"-"+G[r[e+8]]+G[r[e+9]]+"-"+G[r[e+10]]+G[r[e+11]]+G[r[e+12]]+G[r[e+13]]+G[r[e+14]]+G[r[e+15]]).toLowerCase()}Dr.unsafeStringify=wh;function fT(r,e=0){let t=wh(r,e);if(!(0,lT.default)(t))throw TypeError("Stringified UUID is invalid");return t}Dr.default=fT});var rn=u(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});var Da,hT=new Uint8Array(16);function pT(){if(!Da){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Da=crypto.getRandomValues.bind(crypto)}return Da(hT)}za.default=pT});var Wa=u(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.updateV1State=void 0;var Sh=rn(),dT=Ne(),zr={};function vT(r,e,t){var s,o,a,c;let i,n=(s=r==null?void 0:r._v6)!=null?s:!1;if(r){let l=Object.keys(r);l.length===1&&l[0]==="_v6"&&(r=void 0)}if(r)i=Oh((c=(a=r.random)!=null?a:(o=r.rng)==null?void 0:o.call(r))!=null?c:(0,Sh.default)(),r.msecs,r.nsecs,r.clockseq,r.node,e,t);else{let l=Date.now(),f=(0,Sh.default)();xh(zr,l,f),i=Oh(f,zr.msecs,zr.nsecs,n?void 0:zr.clockseq,n?void 0:zr.node,e,t)}return e!=null?e:(0,dT.unsafeStringify)(i)}function xh(r,e,t){var i,n;return(i=r.msecs)!=null||(r.msecs=-1/0),(n=r.nsecs)!=null||(r.nsecs=0),e===r.msecs?(r.nsecs++,r.nsecs>=1e4&&(r.node=void 0,r.nsecs=0)):e>r.msecs?r.nsecs=0:e<r.msecs&&(r.node=void 0),r.node||(r.node=t.slice(10,16),r.node[0]|=1,r.clockseq=(t[8]<<8|t[9])&16383),r.msecs=e,r}Wr.updateV1State=xh;function Oh(r,e,t,i,n,s,o=0){if(r.length<16)throw new Error("Random bytes length must be >= 16");if(!s)s=new Uint8Array(16),o=0;else if(o<0||o+16>s.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);e!=null||(e=Date.now()),t!=null||(t=0),i!=null||(i=(r[8]<<8|r[9])&16383),n!=null||(n=r.slice(10,16)),e+=122192928e5;let a=((e&268435455)*1e4+t)%4294967296;s[o++]=a>>>24&255,s[o++]=a>>>16&255,s[o++]=a>>>8&255,s[o++]=a&255;let c=e/4294967296*1e4&268435455;s[o++]=c>>>8&255,s[o++]=c&255,s[o++]=c>>>24&15|16,s[o++]=c>>>16&255,s[o++]=i>>>8|128,s[o++]=i&255;for(let l=0;l<6;++l)s[o++]=n[l];return s}Wr.default=vT});var $a=u(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});var bT=Vr(),mT=Ne();function yT(r){let e=typeof r=="string"?(0,bT.default)(r):r,t=_T(e);return typeof r=="string"?(0,mT.unsafeStringify)(t):t}Ba.default=yT;function _T(r){return Uint8Array.of((r[6]&15)<<4|r[7]>>4&15,(r[7]&15)<<4|(r[4]&240)>>4,(r[4]&15)<<4|(r[5]&240)>>4,(r[5]&15)<<4|(r[0]&240)>>4,(r[0]&15)<<4|(r[1]&240)>>4,(r[1]&15)<<4|(r[2]&240)>>4,96|r[2]&15,r[3],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])}});var Th=u(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});function gT(r){let e=OT(r),t=ST(e,r.length*8);return wT(t)}function wT(r){let e=new Uint8Array(r.length*4);for(let t=0;t<r.length*4;t++)e[t]=r[t>>2]>>>t%4*8&255;return e}function qh(r){return(r+64>>>9<<4)+14+1}function ST(r,e){let t=new Uint32Array(qh(e)).fill(0);t.set(r),t[e>>5]|=128<<e%32,t[t.length-1]=e,r=t;let i=1732584193,n=-271733879,s=-1732584194,o=271733878;for(let a=0;a<r.length;a+=16){let c=i,l=n,f=s,p=o;i=te(i,n,s,o,r[a],7,-680876936),o=te(o,i,n,s,r[a+1],12,-389564586),s=te(s,o,i,n,r[a+2],17,606105819),n=te(n,s,o,i,r[a+3],22,-1044525330),i=te(i,n,s,o,r[a+4],7,-176418897),o=te(o,i,n,s,r[a+5],12,1200080426),s=te(s,o,i,n,r[a+6],17,-1473231341),n=te(n,s,o,i,r[a+7],22,-45705983),i=te(i,n,s,o,r[a+8],7,1770035416),o=te(o,i,n,s,r[a+9],12,-1958414417),s=te(s,o,i,n,r[a+10],17,-42063),n=te(n,s,o,i,r[a+11],22,-1990404162),i=te(i,n,s,o,r[a+12],7,1804603682),o=te(o,i,n,s,r[a+13],12,-40341101),s=te(s,o,i,n,r[a+14],17,-1502002290),n=te(n,s,o,i,r[a+15],22,1236535329),i=re(i,n,s,o,r[a+1],5,-165796510),o=re(o,i,n,s,r[a+6],9,-1069501632),s=re(s,o,i,n,r[a+11],14,643717713),n=re(n,s,o,i,r[a],20,-373897302),i=re(i,n,s,o,r[a+5],5,-701558691),o=re(o,i,n,s,r[a+10],9,38016083),s=re(s,o,i,n,r[a+15],14,-660478335),n=re(n,s,o,i,r[a+4],20,-405537848),i=re(i,n,s,o,r[a+9],5,568446438),o=re(o,i,n,s,r[a+14],9,-1019803690),s=re(s,o,i,n,r[a+3],14,-187363961),n=re(n,s,o,i,r[a+8],20,1163531501),i=re(i,n,s,o,r[a+13],5,-1444681467),o=re(o,i,n,s,r[a+2],9,-51403784),s=re(s,o,i,n,r[a+7],14,1735328473),n=re(n,s,o,i,r[a+12],20,-1926607734),i=ie(i,n,s,o,r[a+5],4,-378558),o=ie(o,i,n,s,r[a+8],11,-2022574463),s=ie(s,o,i,n,r[a+11],16,1839030562),n=ie(n,s,o,i,r[a+14],23,-35309556),i=ie(i,n,s,o,r[a+1],4,-1530992060),o=ie(o,i,n,s,r[a+4],11,1272893353),s=ie(s,o,i,n,r[a+7],16,-155497632),n=ie(n,s,o,i,r[a+10],23,-1094730640),i=ie(i,n,s,o,r[a+13],4,681279174),o=ie(o,i,n,s,r[a],11,-358537222),s=ie(s,o,i,n,r[a+3],16,-722521979),n=ie(n,s,o,i,r[a+6],23,76029189),i=ie(i,n,s,o,r[a+9],4,-640364487),o=ie(o,i,n,s,r[a+12],11,-421815835),s=ie(s,o,i,n,r[a+15],16,530742520),n=ie(n,s,o,i,r[a+2],23,-995338651),i=ne(i,n,s,o,r[a],6,-198630844),o=ne(o,i,n,s,r[a+7],10,1126891415),s=ne(s,o,i,n,r[a+14],15,-1416354905),n=ne(n,s,o,i,r[a+5],21,-57434055),i=ne(i,n,s,o,r[a+12],6,1700485571),o=ne(o,i,n,s,r[a+3],10,-1894986606),s=ne(s,o,i,n,r[a+10],15,-1051523),n=ne(n,s,o,i,r[a+1],21,-2054922799),i=ne(i,n,s,o,r[a+8],6,1873313359),o=ne(o,i,n,s,r[a+15],10,-30611744),s=ne(s,o,i,n,r[a+6],15,-1560198380),n=ne(n,s,o,i,r[a+13],21,1309151649),i=ne(i,n,s,o,r[a+4],6,-145523070),o=ne(o,i,n,s,r[a+11],10,-1120210379),s=ne(s,o,i,n,r[a+2],15,718787259),n=ne(n,s,o,i,r[a+9],21,-343485551),i=$e(i,c),n=$e(n,l),s=$e(s,f),o=$e(o,p)}return Uint32Array.of(i,n,s,o)}function OT(r){if(r.length===0)return new Uint32Array;let e=new Uint32Array(qh(r.length*8)).fill(0);for(let t=0;t<r.length;t++)e[t>>2]|=(r[t]&255)<<t%4*8;return e}function $e(r,e){let t=(r&65535)+(e&65535);return(r>>16)+(e>>16)+(t>>16)<<16|t&65535}function xT(r,e){return r<<e|r>>>32-e}function nn(r,e,t,i,n,s){return $e(xT($e($e(e,r),$e(i,s)),n),t)}function te(r,e,t,i,n,s,o){return nn(e&t|~e&i,r,e,n,s,o)}function re(r,e,t,i,n,s,o){return nn(e&i|t&~i,r,e,n,s,o)}function ie(r,e,t,i,n,s,o){return nn(e^t^i,r,e,n,s,o)}function ne(r,e,t,i,n,s,o){return nn(t^(e|~i),r,e,n,s,o)}Ha.default=gT});var Br=u(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.URL=Fe.DNS=Fe.stringToBytes=void 0;var Ch=Vr(),qT=Ne();function Ih(r){r=unescape(encodeURIComponent(r));let e=new Uint8Array(r.length);for(let t=0;t<r.length;++t)e[t]=r.charCodeAt(t);return e}Fe.stringToBytes=Ih;Fe.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Fe.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function TT(r,e,t,i,n,s){let o=typeof t=="string"?Ih(t):t,a=typeof i=="string"?(0,Ch.default)(i):i;if(typeof i=="string"&&(i=(0,Ch.default)(i)),(i==null?void 0:i.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+o.length);if(c.set(a),c.set(o,a.length),c=e(c),c[6]=c[6]&15|r,c[8]=c[8]&63|128,n){s=s||0;for(let l=0;l<16;++l)n[s+l]=c[l];return n}return(0,qT.unsafeStringify)(c)}Fe.default=TT});var jh=u(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.URL=bt.DNS=void 0;var CT=Th(),Ja=Br(),Ah=Br();Object.defineProperty(bt,"DNS",{enumerable:!0,get:function(){return Ah.DNS}});Object.defineProperty(bt,"URL",{enumerable:!0,get:function(){return Ah.URL}});function Ya(r,e,t,i){return(0,Ja.default)(48,CT.default,r,e,t,i)}Ya.DNS=Ja.DNS;Ya.URL=Ja.URL;bt.default=Ya});var Eh=u(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});var IT=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);Ka.default={randomUUID:IT}});var Rh=u(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});var kh=Eh(),AT=rn(),jT=Ne();function ET(r,e,t){var n,s,o;if(kh.default.randomUUID&&!e&&!r)return kh.default.randomUUID();r=r||{};let i=(o=(s=r.random)!=null?s:(n=r.rng)==null?void 0:n.call(r))!=null?o:(0,AT.default)();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){if(t=t||0,t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let a=0;a<16;++a)e[t+a]=i[a];return e}return(0,jT.unsafeStringify)(i)}Ga.default=ET});var Ph=u(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});function kT(r,e,t,i){switch(r){case 0:return e&t^~e&i;case 1:return e^t^i;case 2:return e&t^e&i^t&i;case 3:return e^t^i}}function Xa(r,e){return r<<e|r>>>32-e}function RT(r){let e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520],i=new Uint8Array(r.length+1);i.set(r),i[r.length]=128,r=i;let n=r.length/4+2,s=Math.ceil(n/16),o=new Array(s);for(let a=0;a<s;++a){let c=new Uint32Array(16);for(let l=0;l<16;++l)c[l]=r[a*64+l*4]<<24|r[a*64+l*4+1]<<16|r[a*64+l*4+2]<<8|r[a*64+l*4+3];o[a]=c}o[s-1][14]=(r.length-1)*8/Math.pow(2,32),o[s-1][14]=Math.floor(o[s-1][14]),o[s-1][15]=(r.length-1)*8&4294967295;for(let a=0;a<s;++a){let c=new Uint32Array(80);for(let m=0;m<16;++m)c[m]=o[a][m];for(let m=16;m<80;++m)c[m]=Xa(c[m-3]^c[m-8]^c[m-14]^c[m-16],1);let l=t[0],f=t[1],p=t[2],y=t[3],g=t[4];for(let m=0;m<80;++m){let O=Math.floor(m/20),S=Xa(l,5)+kT(O,f,p,y)+g+e[O]+c[m]>>>0;g=y,y=p,p=Xa(f,30)>>>0,f=l,l=S}t[0]=t[0]+l>>>0,t[1]=t[1]+f>>>0,t[2]=t[2]+p>>>0,t[3]=t[3]+y>>>0,t[4]=t[4]+g>>>0}return Uint8Array.of(t[0]>>24,t[0]>>16,t[0]>>8,t[0],t[1]>>24,t[1]>>16,t[1]>>8,t[1],t[2]>>24,t[2]>>16,t[2]>>8,t[2],t[3]>>24,t[3]>>16,t[3]>>8,t[3],t[4]>>24,t[4]>>16,t[4]>>8,t[4])}Qa.default=RT});var Fh=u(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.URL=mt.DNS=void 0;var PT=Ph(),eu=Br(),Nh=Br();Object.defineProperty(mt,"DNS",{enumerable:!0,get:function(){return Nh.DNS}});Object.defineProperty(mt,"URL",{enumerable:!0,get:function(){return Nh.URL}});function tu(r,e,t,i){return(0,eu.default)(80,PT.default,r,e,t,i)}tu.DNS=eu.DNS;tu.URL=eu.URL;mt.default=tu});var Mh=u(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});var NT=Ne(),FT=Wa(),MT=$a();function UT(r,e,t){r!=null||(r={}),t!=null||(t=0);let i=(0,FT.default)({...r,_v6:!0},new Uint8Array(16));if(i=(0,MT.default)(i),e){for(let n=0;n<16;n++)e[t+n]=i[n];return e}return(0,NT.unsafeStringify)(i)}ru.default=UT});var Uh=u(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});var ZT=Vr(),LT=Ne();function VT(r){let e=typeof r=="string"?(0,ZT.default)(r):r,t=DT(e);return typeof r=="string"?(0,LT.unsafeStringify)(t):t}iu.default=VT;function DT(r){return Uint8Array.of((r[3]&15)<<4|r[4]>>4&15,(r[4]&15)<<4|(r[5]&240)>>4,(r[5]&15)<<4|r[6]&15,r[7],(r[1]&15)<<4|(r[2]&240)>>4,(r[2]&15)<<4|(r[3]&240)>>4,16|(r[0]&240)>>4,(r[0]&15)<<4|(r[1]&240)>>4,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])}});var Dh=u($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.updateV7State=void 0;var Zh=rn(),zT=Ne(),nu={};function WT(r,e,t){var n,s,o;let i;if(r)i=Lh((o=(s=r.random)!=null?s:(n=r.rng)==null?void 0:n.call(r))!=null?o:(0,Zh.default)(),r.msecs,r.seq,e,t);else{let a=Date.now(),c=(0,Zh.default)();Vh(nu,a,c),i=Lh(c,nu.msecs,nu.seq,e,t)}return e!=null?e:(0,zT.unsafeStringify)(i)}function Vh(r,e,t){var i,n;return(i=r.msecs)!=null||(r.msecs=-1/0),(n=r.seq)!=null||(r.seq=0),e>r.msecs?(r.seq=t[6]<<23|t[7]<<16|t[8]<<8|t[9],r.msecs=e):(r.seq=r.seq+1|0,r.seq===0&&r.msecs++),r}$r.updateV7State=Vh;function Lh(r,e,t,i,n=0){if(r.length<16)throw new Error("Random bytes length must be >= 16");if(!i)i=new Uint8Array(16),n=0;else if(n<0||n+16>i.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);return e!=null||(e=Date.now()),t!=null||(t=r[6]*127<<24|r[7]<<16|r[8]<<8|r[9]),i[n++]=e/1099511627776&255,i[n++]=e/4294967296&255,i[n++]=e/16777216&255,i[n++]=e/65536&255,i[n++]=e/256&255,i[n++]=e&255,i[n++]=112|t>>>28&15,i[n++]=t>>>20&255,i[n++]=128|t>>>14&63,i[n++]=t>>>6&255,i[n++]=t<<2&255|r[10]&3,i[n++]=r[11],i[n++]=r[12],i[n++]=r[13],i[n++]=r[14],i[n++]=r[15],i}$r.default=WT});var zh=u(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});var BT=Lr();function $T(r){if(!(0,BT.default)(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}su.default=$T});var Wh=u(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.version=M.validate=M.v7=M.v6ToV1=M.v6=M.v5=M.v4=M.v3=M.v1ToV6=M.v1=M.stringify=M.parse=M.NIL=M.MAX=void 0;var HT=yh();Object.defineProperty(M,"MAX",{enumerable:!0,get:function(){return HT.default}});var JT=_h();Object.defineProperty(M,"NIL",{enumerable:!0,get:function(){return JT.default}});var YT=Vr();Object.defineProperty(M,"parse",{enumerable:!0,get:function(){return YT.default}});var KT=Ne();Object.defineProperty(M,"stringify",{enumerable:!0,get:function(){return KT.default}});var GT=Wa();Object.defineProperty(M,"v1",{enumerable:!0,get:function(){return GT.default}});var XT=$a();Object.defineProperty(M,"v1ToV6",{enumerable:!0,get:function(){return XT.default}});var QT=jh();Object.defineProperty(M,"v3",{enumerable:!0,get:function(){return QT.default}});var eC=Rh();Object.defineProperty(M,"v4",{enumerable:!0,get:function(){return eC.default}});var tC=Fh();Object.defineProperty(M,"v5",{enumerable:!0,get:function(){return tC.default}});var rC=Mh();Object.defineProperty(M,"v6",{enumerable:!0,get:function(){return rC.default}});var iC=Uh();Object.defineProperty(M,"v6ToV1",{enumerable:!0,get:function(){return iC.default}});var nC=Dh();Object.defineProperty(M,"v7",{enumerable:!0,get:function(){return nC.default}});var sC=Lr();Object.defineProperty(M,"validate",{enumerable:!0,get:function(){return sC.default}});var oC=zh();Object.defineProperty(M,"version",{enumerable:!0,get:function(){return oC.default}})});var ou=u(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.entityZodSchema=void 0;var Bh=z();sn.entityZodSchema=Bh.z.object({type:Bh.z.string().min(1)}).passthrough()});var $h=u(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.semanticActionZodSchema=void 0;var Hr=z(),aC=ou(),uC=Ra();on.semanticActionZodSchema=Hr.z.object({id:Hr.z.string().min(1),state:Hr.z.union([uC.semanticActionStateTypesZodSchema,Hr.z.string().min(1)]),entities:Hr.z.record(aC.entityZodSchema)})});var Hh=u(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.cardActionZodSchema=void 0;var Ae=z(),cC=ka();an.cardActionZodSchema=Ae.z.object({type:Ae.z.union([cC.actionTypesZodSchema,Ae.z.string().min(1)]),title:Ae.z.string().min(1),image:Ae.z.string().min(1).optional(),text:Ae.z.string().min(1).optional(),displayText:Ae.z.string().min(1).optional(),value:Ae.z.any().optional(),channelData:Ae.z.unknown().optional(),imageAltText:Ae.z.string().min(1).optional()})});var Jh=u(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.suggestedActionsZodSchema=void 0;var un=z(),lC=Hh();cn.suggestedActionsZodSchema=un.z.object({to:un.z.array(un.z.string().min(1)),actions:un.z.array(lC.cardActionZodSchema)})});var au=u(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.activityEventNamesZodSchema=zt.ActivityEventNames=void 0;var fC=z(),Yh;(function(r){r.ContinueConversation="ContinueConversation",r.CreateConversation="CreateConversation"})(Yh||(zt.ActivityEventNames=Yh={}));zt.activityEventNamesZodSchema=fC.z.enum(["ContinueConversation","CreateConversation"])});var uu=u(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.activityImportanceZodSchema=Wt.ActivityImportance=void 0;var hC=z(),Kh;(function(r){r.Low="low",r.Normal="normal",r.High="high"})(Kh||(Wt.ActivityImportance=Kh={}));Wt.activityImportanceZodSchema=hC.z.enum(["low","normal","high"])});var cu=u(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.activityTypesZodSchema=Bt.ActivityTypes=void 0;var pC=z(),Gh;(function(r){r.Message="message",r.ContactRelationUpdate="contactRelationUpdate",r.ConversationUpdate="conversationUpdate",r.Typing="typing",r.EndOfConversation="endOfConversation",r.Event="event",r.Invoke="invoke",r.InvokeResponse="invokeResponse",r.DeleteUserData="deleteUserData",r.MessageUpdate="messageUpdate",r.MessageDelete="messageDelete",r.InstallationUpdate="installationUpdate",r.MessageReaction="messageReaction",r.Suggestion="suggestion",r.Trace="trace",r.Handoff="handoff",r.Command="command",r.CommandResult="commandResult",r.Delay="delay"})(Gh||(Bt.ActivityTypes=Gh={}));Bt.activityTypesZodSchema=pC.z.enum(["message","contactRelationUpdate","conversationUpdate","typing","endOfConversation","event","invoke","invokeResponse","deleteUserData","messageUpdate","messageDelete","installationUpdate","messageReaction","suggestion","trace","handoff","command","commandResult","delay"])});var Xh=u(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.attachmentZodSchema=void 0;var $t=z();ln.attachmentZodSchema=$t.z.object({contentType:$t.z.string().min(1),contentUrl:$t.z.string().min(1).optional(),content:$t.z.unknown().optional(),name:$t.z.string().min(1).optional(),thumbnailUrl:$t.z.string().min(1).optional()})});var lu=u(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.channelAccountZodSchema=void 0;var yt=z(),dC=Qi();fn.channelAccountZodSchema=yt.z.object({id:yt.z.string().min(1).optional(),name:yt.z.string().optional(),aadObjectId:yt.z.string().min(1).optional(),role:yt.z.union([dC.roleTypeZodSchema,yt.z.string().min(1)]).optional(),properties:yt.z.unknown().optional()})});var fu=u(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.conversationAccountZodSchema=void 0;var je=z(),vC=Qi();hn.conversationAccountZodSchema=je.z.object({isGroup:je.z.boolean().optional(),conversationType:je.z.string().min(1).optional(),tenantId:je.z.string().min(1).optional(),id:je.z.string().min(1),name:je.z.string().min(1).optional(),aadObjectId:je.z.string().min(1).optional(),role:je.z.union([vC.roleTypeZodSchema,je.z.string().min(1)]).optional(),properties:je.z.unknown().optional()})});var ep=u(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.conversationReferenceZodSchema=void 0;var Jr=z(),Qh=lu(),bC=fu();pn.conversationReferenceZodSchema=Jr.z.object({activityId:Jr.z.string().min(1).optional(),user:Qh.channelAccountZodSchema.optional(),locale:Jr.z.string().min(1).optional(),agent:Qh.channelAccountZodSchema.optional().nullable(),conversation:bC.conversationAccountZodSchema,channelId:Jr.z.string().min(1),serviceUrl:Jr.z.string().min(1).optional()})});var hu=u(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.deliveryModesZodSchema=Ht.DeliveryModes=void 0;var mC=z(),tp;(function(r){r.Normal="normal",r.Notification="notification",r.ExpectReplies="expectReplies",r.Ephemeral="ephemeral"})(tp||(Ht.DeliveryModes=tp={}));Ht.deliveryModesZodSchema=mC.z.enum(["normal","notification","expectReplies","ephemeral"])});var pu=u(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.inputHintsZodSchema=Jt.InputHints=void 0;var yC=z(),rp;(function(r){r.AcceptingInput="acceptingInput",r.IgnoringInput="ignoringInput",r.ExpectingInput="expectingInput"})(rp||(Jt.InputHints=rp={}));Jt.inputHintsZodSchema=yC.z.enum(["acceptingInput","ignoringInput","expectingInput"])});var du=u(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.messageReactionTypesZodSchema=Yt.MessageReactionTypes=void 0;var _C=z(),ip;(function(r){r.Like="like",r.PlusOne="plusOne"})(ip||(Yt.MessageReactionTypes=ip={}));Yt.messageReactionTypesZodSchema=_C.z.enum(["like","plusOne"])});var np=u(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.messageReactionZodSchema=void 0;var vu=z(),gC=du();dn.messageReactionZodSchema=vu.z.object({type:vu.z.union([gC.messageReactionTypesZodSchema,vu.z.string().min(1)])})});var bu=u(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.textFormatTypesZodSchema=Kt.TextFormatTypes=void 0;var wC=z(),sp;(function(r){r.Markdown="markdown",r.Plain="plain",r.Xml="xml"})(sp||(Kt.TextFormatTypes=sp={}));Kt.textFormatTypesZodSchema=wC.z.enum(["markdown","plain","xml"])});var op=u(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.textHighlightZodSchema=void 0;var mu=z();vn.textHighlightZodSchema=mu.z.object({text:mu.z.string().min(1),occurrence:mu.z.number()})});var lp=u(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.Activity=_t.activityZodSchema=void 0;var SC=Wh(),I=z(),OC=$h(),xC=Jh(),cp=au(),qC=uu(),mn=cu(),TC=Xh(),CC=Pa(),bn=lu(),ap=Na(),IC=fu(),AC=ep(),jC=Fa(),EC=hu(),kC=ou(),RC=pu(),up=np(),PC=bu(),NC=op();_t.activityZodSchema=I.z.object({type:I.z.union([mn.activityTypesZodSchema,I.z.string().min(1)]),text:I.z.string().optional(),id:I.z.string().min(1).optional(),channelId:I.z.string().min(1).optional(),from:bn.channelAccountZodSchema.optional(),timestamp:I.z.union([I.z.date(),I.z.string().min(1).datetime().optional(),I.z.string().min(1).transform(r=>new Date(r)).optional()]),localTimestamp:I.z.string().min(1).transform(r=>new Date(r)).optional(),localTimezone:I.z.string().min(1).optional(),callerId:I.z.string().min(1).optional(),serviceUrl:I.z.string().min(1).optional(),conversation:IC.conversationAccountZodSchema.optional(),recipient:bn.channelAccountZodSchema.optional(),textFormat:I.z.union([PC.textFormatTypesZodSchema,I.z.string().min(1)]).optional(),attachmentLayout:I.z.union([CC.attachmentLayoutTypesZodSchema,I.z.string().min(1)]).optional(),membersAdded:I.z.array(bn.channelAccountZodSchema).optional(),membersRemoved:I.z.array(bn.channelAccountZodSchema).optional(),reactionsAdded:I.z.array(up.messageReactionZodSchema).optional(),reactionsRemoved:I.z.array(up.messageReactionZodSchema).optional(),topicName:I.z.string().min(1).optional(),historyDisclosed:I.z.boolean().optional(),locale:I.z.string().min(1).optional(),speak:I.z.string().min(1).optional(),inputHint:I.z.union([RC.inputHintsZodSchema,I.z.string().min(1)]).optional(),summary:I.z.string().min(1).optional(),suggestedActions:xC.suggestedActionsZodSchema.optional(),attachments:I.z.array(TC.attachmentZodSchema).optional(),entities:I.z.array(kC.entityZodSchema.passthrough()).optional(),channelData:I.z.any().optional(),action:I.z.string().min(1).optional(),replyToId:I.z.string().min(1).optional(),label:I.z.string().min(1).optional(),valueType:I.z.string().min(1).optional(),value:I.z.unknown().optional(),name:I.z.union([cp.activityEventNamesZodSchema,I.z.string().min(1)]).optional(),relatesTo:AC.conversationReferenceZodSchema.optional(),code:I.z.union([jC.endOfConversationCodesZodSchema,I.z.string().min(1)]).optional(),expiration:I.z.string().min(1).datetime().optional(),importance:I.z.union([qC.activityImportanceZodSchema,I.z.string().min(1)]).optional(),deliveryMode:I.z.union([EC.deliveryModesZodSchema,I.z.string().min(1)]).optional(),listenFor:I.z.array(I.z.string().min(1)).optional(),textHighlights:I.z.array(NC.textHighlightZodSchema).optional(),semanticAction:OC.semanticActionZodSchema.optional()});var yu=class r{constructor(e){if(e===void 0)throw new Error("Invalid ActivityType: undefined");if(e===null)throw new Error("Invalid ActivityType: null");if(typeof e=="string"&&e.length===0)throw new Error("Invalid ActivityType: empty string");this.type=e}static fromJson(e){return this.fromObject(JSON.parse(e))}static fromObject(e){let t=_t.activityZodSchema.passthrough().parse(e),i=new r(t.type);return Object.assign(i,t),i}static getContinuationActivity(e){let t={type:mn.ActivityTypes.Event,name:cp.ActivityEventNames.ContinueConversation,id:(0,SC.v4)(),channelId:e.channelId,locale:e.locale,serviceUrl:e.serviceUrl,conversation:e.conversation,recipient:e.agent,from:e.user,relatesTo:e};return r.fromObject(t)}getAppropriateReplyToId(){if(this.type!==mn.ActivityTypes.ConversationUpdate||this.channelId!==ap.Channels.Directline&&this.channelId!==ap.Channels.Webchat)return this.id}getConversationReference(){if(this.recipient===null||this.recipient===void 0)throw new Error("Activity Recipient undefined");if(this.conversation===null||this.conversation===void 0)throw new Error("Activity Conversation undefined");if(this.channelId===null||this.channelId===void 0)throw new Error("Activity ChannelId undefined");if(this.serviceUrl===null||this.serviceUrl===void 0)throw new Error("Activity ServiceUrl undefined");return{activityId:this.getAppropriateReplyToId(),user:this.from,agent:this.recipient,conversation:this.conversation,channelId:this.channelId,locale:this.locale,serviceUrl:this.serviceUrl}}applyConversationReference(e,t=!1){var i,n,s;return this.channelId=e.channelId,(i=this.locale)!==null&&i!==void 0||(this.locale=e.locale),this.serviceUrl=e.serviceUrl,this.conversation=e.conversation,t?(this.from=e.user,this.recipient=(n=e.agent)!==null&&n!==void 0?n:void 0,e.activityId&&(this.id=e.activityId)):(this.from=(s=e.agent)!==null&&s!==void 0?s:void 0,this.recipient=e.user,e.activityId&&(this.replyToId=e.activityId)),this}clone(){let e=JSON.parse(JSON.stringify(this));for(let t in e)typeof e[t]=="string"&&!isNaN(Date.parse(e[t]))&&(e[t]=new Date(e[t]));return Object.setPrototypeOf(e,r.prototype),e}getMentions(e){let t=[];if(e.entities!==void 0)for(let i=0;i<e.entities.length;i++)e.entities[i].type.toLowerCase()==="mention"&&t.push(e.entities[i]);return t}normalizeMentions(e=!1){var t,i;if(this.type===mn.ActivityTypes.Message&&(e&&(this.removeRecipientMention(),this.entities!==void 0&&(!((t=this.recipient)===null||t===void 0)&&t.id)&&(this.entities=this.entities.filter(n=>{var s;return n.type.toLowerCase()==="mention"?n.mentioned.id!==((s=this.recipient)===null||s===void 0?void 0:s.id):!0}))),this.text&&(this.text=r.removeAt(this.text)),this.entities!==void 0)){let n=this.getMentions(this);for(let s of n)s.text&&(s.text=(i=r.removeAt(s.text))===null||i===void 0?void 0:i.trim())}}static removeAt(e){if(!e)return e;let t;do{t=!1;let i=e.toLowerCase().indexOf("<at");if(i>=0){let n=e.indexOf(">",i);if(n>0){let s=e.toLowerCase().indexOf("</at>",n);if(s>0){let o=e.substring(s+5);o.length>0&&!/\s/.test(o[0])&&(o=` ${o}`),e=e.substring(0,s)+o;let a=e.substring(n+1,s),c=e.substring(0,i);c.length>0&&!/\s$/.test(c)&&(c+=" "),e=c+a+o,t=!0}}}}while(t);return e}removeMentionText(e){let i=this.getMentions(this).filter(n=>n.mentioned.id===e);return i.length>0&&this.text&&(this.text=this.text.replace(i[0].text,"").trim()),this.text||""}removeRecipientMention(){return this.recipient!=null&&this.recipient.id?this.removeMentionText(this.recipient.id):""}getReplyConversationReference(e){let t=this.getConversationReference();return t.activityId=e,t}toJsonString(){return JSON.stringify(this)}};_t.Activity=yu});var fp=u(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.CallerIdConstants=void 0;yn.CallerIdConstants={PublicAzureChannel:"urn:botframework:azure",USGovChannel:"urn:botframework:azureusgov",AgentPrefix:"urn:botframework:aadappid:"}});var hp=u(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.activityTreatments=Gt.ActivityTreatments=void 0;var FC=z(),_u;(function(r){r.Targeted="targeted"})(_u||(Gt.ActivityTreatments=_u={}));Gt.activityTreatments=FC.z.nativeEnum(_u)});var vp=u(R=>{"use strict";var MC=R&&R.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),pp=R&&R.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&MC(e,r,t)};Object.defineProperty(R,"__esModule",{value:!0});R.ActivityTreatments=R.TextFormatTypes=R.MessageReactionTypes=R.InputHints=R.DeliveryModes=R.CallerIdConstants=R.ActivityTypes=R.ActivityImportance=R.ActivityEventNames=R.activityZodSchema=R.Activity=R.RoleTypes=R.EndOfConversationCodes=R.Channels=R.AttachmentLayoutTypes=R.SemanticActionStateTypes=R.ActionTypes=void 0;var UC=ka();Object.defineProperty(R,"ActionTypes",{enumerable:!0,get:function(){return UC.ActionTypes}});var ZC=Ra();Object.defineProperty(R,"SemanticActionStateTypes",{enumerable:!0,get:function(){return ZC.SemanticActionStateTypes}});var LC=Pa();Object.defineProperty(R,"AttachmentLayoutTypes",{enumerable:!0,get:function(){return LC.AttachmentLayoutTypes}});var VC=Na();Object.defineProperty(R,"Channels",{enumerable:!0,get:function(){return VC.Channels}});var DC=Fa();Object.defineProperty(R,"EndOfConversationCodes",{enumerable:!0,get:function(){return DC.EndOfConversationCodes}});var zC=Qi();Object.defineProperty(R,"RoleTypes",{enumerable:!0,get:function(){return zC.RoleTypes}});pp(bh(),R);pp(mh(),R);var dp=lp();Object.defineProperty(R,"Activity",{enumerable:!0,get:function(){return dp.Activity}});Object.defineProperty(R,"activityZodSchema",{enumerable:!0,get:function(){return dp.activityZodSchema}});var WC=au();Object.defineProperty(R,"ActivityEventNames",{enumerable:!0,get:function(){return WC.ActivityEventNames}});var BC=uu();Object.defineProperty(R,"ActivityImportance",{enumerable:!0,get:function(){return BC.ActivityImportance}});var $C=cu();Object.defineProperty(R,"ActivityTypes",{enumerable:!0,get:function(){return $C.ActivityTypes}});var HC=fp();Object.defineProperty(R,"CallerIdConstants",{enumerable:!0,get:function(){return HC.CallerIdConstants}});var JC=hu();Object.defineProperty(R,"DeliveryModes",{enumerable:!0,get:function(){return JC.DeliveryModes}});var YC=pu();Object.defineProperty(R,"InputHints",{enumerable:!0,get:function(){return YC.InputHints}});var KC=du();Object.defineProperty(R,"MessageReactionTypes",{enumerable:!0,get:function(){return KC.MessageReactionTypes}});var GC=bu();Object.defineProperty(R,"TextFormatTypes",{enumerable:!0,get:function(){return GC.TextFormatTypes}});var XC=hp();Object.defineProperty(R,"ActivityTreatments",{enumerable:!0,get:function(){return XC.ActivityTreatments}})});var mp=u((cG,bp)=>{var Xt=1e3,Qt=Xt*60,er=Qt*60,gt=er*24,QC=gt*7,eI=gt*365.25;bp.exports=function(r,e){e=e||{};var t=typeof r;if(t==="string"&&r.length>0)return tI(r);if(t==="number"&&isFinite(r))return e.long?iI(r):rI(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function tI(r){if(r=String(r),!(r.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(e){var t=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return t*eI;case"weeks":case"week":case"w":return t*QC;case"days":case"day":case"d":return t*gt;case"hours":case"hour":case"hrs":case"hr":case"h":return t*er;case"minutes":case"minute":case"mins":case"min":case"m":return t*Qt;case"seconds":case"second":case"secs":case"sec":case"s":return t*Xt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function rI(r){var e=Math.abs(r);return e>=gt?Math.round(r/gt)+"d":e>=er?Math.round(r/er)+"h":e>=Qt?Math.round(r/Qt)+"m":e>=Xt?Math.round(r/Xt)+"s":r+"ms"}function iI(r){var e=Math.abs(r);return e>=gt?gn(r,e,gt,"day"):e>=er?gn(r,e,er,"hour"):e>=Qt?gn(r,e,Qt,"minute"):e>=Xt?gn(r,e,Xt,"second"):r+" ms"}function gn(r,e,t,i){var n=e>=t*1.5;return Math.round(r/t)+" "+i+(n?"s":"")}});var _p=u((lG,yp)=>{function nI(r){t.debug=t,t.default=t,t.coerce=c,t.disable=o,t.enable=n,t.enabled=a,t.humanize=mp(),t.destroy=l,Object.keys(r).forEach(f=>{t[f]=r[f]}),t.names=[],t.skips=[],t.formatters={};function e(f){let p=0;for(let y=0;y<f.length;y++)p=(p<<5)-p+f.charCodeAt(y),p|=0;return t.colors[Math.abs(p)%t.colors.length]}t.selectColor=e;function t(f){let p,y=null,g,m;function O(...S){if(!O.enabled)return;let q=O,F=Number(new Date),U=F-(p||F);q.diff=U,q.prev=p,q.curr=F,p=F,S[0]=t.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let V=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(de,Ee)=>{if(de==="%%")return"%";V++;let Ge=t.formatters[Ee];if(typeof Ge=="function"){let Oi=S[V];de=Ge.call(q,Oi),S.splice(V,1),V--}return de}),t.formatArgs.call(q,S),(q.log||t.log).apply(q,S)}return O.namespace=f,O.useColors=t.useColors(),O.color=t.selectColor(f),O.extend=i,O.destroy=t.destroy,Object.defineProperty(O,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(g!==t.namespaces&&(g=t.namespaces,m=t.enabled(f)),m),set:S=>{y=S}}),typeof t.init=="function"&&t.init(O),O}function i(f,p){let y=t(this.namespace+(typeof p=="undefined"?":":p)+f);return y.log=this.log,y}function n(f){t.save(f),t.namespaces=f,t.names=[],t.skips=[];let p=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let y of p)y[0]==="-"?t.skips.push(y.slice(1)):t.names.push(y)}function s(f,p){let y=0,g=0,m=-1,O=0;for(;y<f.length;)if(g<p.length&&(p[g]===f[y]||p[g]==="*"))p[g]==="*"?(m=g,O=y,g++):(y++,g++);else if(m!==-1)g=m+1,O++,y=O;else return!1;for(;g<p.length&&p[g]==="*";)g++;return g===p.length}function o(){let f=[...t.names,...t.skips.map(p=>"-"+p)].join(",");return t.enable(""),f}function a(f){for(let p of t.skips)if(s(f,p))return!1;for(let p of t.names)if(s(f,p))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}yp.exports=nI});var gp=u((le,wn)=>{le.formatArgs=oI;le.save=aI;le.load=uI;le.useColors=sI;le.storage=cI();le.destroy=(()=>{let r=!1;return()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();le.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function sI(){if(typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let r;return typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&(r=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(r[1],10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function oI(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+wn.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;r.splice(1,0,e,"color: inherit");let t=0,i=0;r[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(t++,n==="%c"&&(i=t))}),r.splice(i,0,e)}le.log=console.debug||console.log||(()=>{});function aI(r){try{r?le.storage.setItem("debug",r):le.storage.removeItem("debug")}catch{}}function uI(){let r;try{r=le.storage.getItem("debug")||le.storage.getItem("DEBUG")}catch{}return!r&&typeof process!="undefined"&&"env"in process&&(r=process.env.DEBUG),r}function cI(){try{return localStorage}catch{}}wn.exports=_p()(le);var{formatters:lI}=wn.exports;lI.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var se=u(Tp=>{"use strict";var vI=typeof window!="undefined"&&window,bI=typeof self!="undefined"&&typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&self,mI=typeof global!="undefined"&&global,qp=vI||mI||bI;Tp.root=qp;(function(){if(!qp)throw new Error("RxJS could not find any global context (window, self, global)")})()});var Kr=u(Cp=>{"use strict";function yI(r){return typeof r=="function"}Cp.isFunction=yI});var Oe=u(Ip=>{"use strict";Ip.isArray=Array.isArray||function(r){return r&&typeof r.length=="number"}});var xu=u(Ap=>{"use strict";function _I(r){return r!=null&&typeof r=="object"}Ap.isObject=_I});var Y=u(jp=>{"use strict";jp.errorObject={e:{}}});var Q=u(Rp=>{"use strict";var Ep=Y(),kp;function gI(){try{return kp.apply(this,arguments)}catch(r){return Ep.errorObject.e=r,Ep.errorObject}}function wI(r){return kp=r,gI}Rp.tryCatch=wI});var qu=u(On=>{"use strict";var SI=On&&On.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},OI=function(r){SI(e,r);function e(t){r.call(this),this.errors=t;var i=Error.call(this,t?t.length+` errors occurred during unsubscription:
|
|
1
|
+
var s0=Object.create;var Xo=Object.defineProperty;var o0=Object.getOwnPropertyDescriptor;var a0=Object.getOwnPropertyNames;var u0=Object.getPrototypeOf,c0=Object.prototype.hasOwnProperty;var u=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),l0=(r,e)=>{for(var t in e)Xo(r,t,{get:e[t],enumerable:!0})},f0=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a0(e))!c0.call(r,n)&&n!==t&&Xo(r,n,{get:()=>e[n],enumerable:!(i=o0(e,n))||i.enumerable});return r};var Qo=(r,e,t)=>(t=r!=null?s0(u0(r)):{},f0(e||!r||!r.__esModule?Xo(t,"default",{value:r,enumerable:!0}):t,r));var Fr=u(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.getParsedType=V.ZodParsedType=V.objectUtil=V.util=void 0;var xa;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{let s={};for(let o of n)s[o]=o;return s},r.getValidEnumValues=n=>{let s=r.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),o={};for(let a of s)o[a]=n[a];return r.objectValues(o)},r.objectValues=n=>r.objectKeys(n).map(function(s){return n[s]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let s=[];for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&s.push(o);return s},r.find=(n,s)=>{for(let o of n)if(s(o))return o},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function i(n,s=" | "){return n.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}r.joinValues=i,r.jsonStringifyReplacer=(n,s)=>typeof s=="bigint"?s.toString():s})(xa||(V.util=xa={}));var Vf;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Vf||(V.objectUtil=Vf={}));V.ZodParsedType=xa.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var Ax=r=>{switch(typeof r){case"undefined":return V.ZodParsedType.undefined;case"string":return V.ZodParsedType.string;case"number":return Number.isNaN(r)?V.ZodParsedType.nan:V.ZodParsedType.number;case"boolean":return V.ZodParsedType.boolean;case"function":return V.ZodParsedType.function;case"bigint":return V.ZodParsedType.bigint;case"symbol":return V.ZodParsedType.symbol;case"object":return Array.isArray(r)?V.ZodParsedType.array:r===null?V.ZodParsedType.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?V.ZodParsedType.promise:typeof Map!="undefined"&&r instanceof Map?V.ZodParsedType.map:typeof Set!="undefined"&&r instanceof Set?V.ZodParsedType.set:typeof Date!="undefined"&&r instanceof Date?V.ZodParsedType.date:V.ZodParsedType.object;default:return V.ZodParsedType.unknown}};V.getParsedType=Ax});var $i=u(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.ZodError=Le.quotelessJson=Le.ZodIssueCode=void 0;var zf=Fr();Le.ZodIssueCode=zf.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var Ex=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");Le.quotelessJson=Ex;var Mr=class r extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(s){return s.message},i={_errors:[]},n=s=>{for(let o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(n);else if(o.code==="invalid_return_type")n(o.returnTypeError);else if(o.code==="invalid_arguments")n(o.argumentsError);else if(o.path.length===0)i._errors.push(t(o));else{let a=i,c=0;for(;c<o.path.length;){let l=o.path[c];c===o.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(t(o))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return n(this),i}static assert(e){if(!(e instanceof r))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,zf.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},i=[];for(let n of this.issues)if(n.path.length>0){let s=n.path[0];t[s]=t[s]||[],t[s].push(e(n))}else i.push(e(n));return{formErrors:i,fieldErrors:t}}get formErrors(){return this.flatten()}};Le.ZodError=Mr;Mr.create=r=>new Mr(r)});var Ta=u(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});var ee=$i(),Qe=Fr(),jx=(r,e)=>{let t;switch(r.code){case ee.ZodIssueCode.invalid_type:r.received===Qe.ZodParsedType.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case ee.ZodIssueCode.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,Qe.util.jsonStringifyReplacer)}`;break;case ee.ZodIssueCode.unrecognized_keys:t=`Unrecognized key(s) in object: ${Qe.util.joinValues(r.keys,", ")}`;break;case ee.ZodIssueCode.invalid_union:t="Invalid input";break;case ee.ZodIssueCode.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${Qe.util.joinValues(r.options)}`;break;case ee.ZodIssueCode.invalid_enum_value:t=`Invalid enum value. Expected ${Qe.util.joinValues(r.options)}, received '${r.received}'`;break;case ee.ZodIssueCode.invalid_arguments:t="Invalid function arguments";break;case ee.ZodIssueCode.invalid_return_type:t="Invalid function return type";break;case ee.ZodIssueCode.invalid_date:t="Invalid date";break;case ee.ZodIssueCode.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:Qe.util.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case ee.ZodIssueCode.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case ee.ZodIssueCode.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case ee.ZodIssueCode.custom:t="Invalid input";break;case ee.ZodIssueCode.invalid_intersection_types:t="Intersection results could not be merged";break;case ee.ZodIssueCode.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case ee.ZodIssueCode.not_finite:t="Number must be finite";break;default:t=e.defaultError,Qe.util.assertNever(r)}return{message:t}};qa.default=jx});var Hi=u(De=>{"use strict";var kx=De&&De.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(De,"__esModule",{value:!0});De.defaultErrorMap=void 0;De.setErrorMap=Rx;De.getErrorMap=Px;var Wf=kx(Ta());De.defaultErrorMap=Wf.default;var Bf=Wf.default;function Rx(r){Bf=r}function Px(){return Bf}});var Ia=u(Z=>{"use strict";var Nx=Z&&Z.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Z,"__esModule",{value:!0});Z.isAsync=Z.isValid=Z.isDirty=Z.isAborted=Z.OK=Z.DIRTY=Z.INVALID=Z.ParseStatus=Z.EMPTY_PATH=Z.makeIssue=void 0;Z.addIssueToContext=Ux;var Fx=Hi(),$f=Nx(Ta()),Mx=r=>{let{data:e,path:t,errorMaps:i,issueData:n}=r,s=[...t,...n.path||[]],o={...n,path:s};if(n.message!==void 0)return{...n,path:s,message:n.message};let a="",c=i.filter(l=>!!l).slice().reverse();for(let l of c)a=l(o,{data:e,defaultError:a}).message;return{...n,path:s,message:a}};Z.makeIssue=Mx;Z.EMPTY_PATH=[];function Ux(r,e){let t=(0,Fx.getErrorMap)(),i=(0,Z.makeIssue)({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===$f.default?void 0:$f.default].filter(n=>!!n)});r.common.issues.push(i)}var Ca=class r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let i=[];for(let n of t){if(n.status==="aborted")return Z.INVALID;n.status==="dirty"&&e.dirty(),i.push(n.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,t){let i=[];for(let n of t){let s=await n.key,o=await n.value;i.push({key:s,value:o})}return r.mergeObjectSync(e,i)}static mergeObjectSync(e,t){let i={};for(let n of t){let{key:s,value:o}=n;if(s.status==="aborted"||o.status==="aborted")return Z.INVALID;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value!="undefined"||n.alwaysSet)&&(i[s.value]=o.value)}return{status:e.value,value:i}}};Z.ParseStatus=Ca;Z.INVALID=Object.freeze({status:"aborted"});var Zx=r=>({status:"dirty",value:r});Z.DIRTY=Zx;var Lx=r=>({status:"valid",value:r});Z.OK=Lx;var Dx=r=>r.status==="aborted";Z.isAborted=Dx;var Vx=r=>r.status==="dirty";Z.isDirty=Vx;var zx=r=>r.status==="valid";Z.isValid=zx;var Wx=r=>typeof Promise!="undefined"&&r instanceof Promise;Z.isAsync=Wx});var Jf=u(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0})});var Kf=u(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.errorUtil=void 0;var Yf;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(Yf||(Ji.errorUtil=Yf={}))});var uh=u(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0});h.discriminatedUnion=h.date=h.boolean=h.bigint=h.array=h.any=h.coerce=h.ZodFirstPartyTypeKind=h.late=h.ZodSchema=h.Schema=h.ZodReadonly=h.ZodPipeline=h.ZodBranded=h.BRAND=h.ZodNaN=h.ZodCatch=h.ZodDefault=h.ZodNullable=h.ZodOptional=h.ZodTransformer=h.ZodEffects=h.ZodPromise=h.ZodNativeEnum=h.ZodEnum=h.ZodLiteral=h.ZodLazy=h.ZodFunction=h.ZodSet=h.ZodMap=h.ZodRecord=h.ZodTuple=h.ZodIntersection=h.ZodDiscriminatedUnion=h.ZodUnion=h.ZodObject=h.ZodArray=h.ZodVoid=h.ZodNever=h.ZodUnknown=h.ZodAny=h.ZodNull=h.ZodUndefined=h.ZodSymbol=h.ZodDate=h.ZodBoolean=h.ZodBigInt=h.ZodNumber=h.ZodString=h.ZodType=void 0;h.NEVER=h.void=h.unknown=h.union=h.undefined=h.tuple=h.transformer=h.symbol=h.string=h.strictObject=h.set=h.record=h.promise=h.preprocess=h.pipeline=h.ostring=h.optional=h.onumber=h.oboolean=h.object=h.number=h.nullable=h.null=h.never=h.nativeEnum=h.nan=h.map=h.literal=h.lazy=h.intersection=h.instanceof=h.function=h.enum=h.effect=void 0;h.datetimeRegex=th;h.custom=ih;var w=$i(),Yi=Hi(),T=Kf(),d=Ia(),x=Fr(),be=class{constructor(e,t,i,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=i,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Gf=(r,e)=>{if((0,d.isValid)(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new w.ZodError(r.common.issues);return this._error=t,this._error}}};function j(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:i,description:n}=r;if(e&&(t||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(o,a)=>{var l,f;let{message:c}=r;return o.code==="invalid_enum_value"?{message:c!=null?c:a.defaultError}:typeof a.data=="undefined"?{message:(l=c!=null?c:i)!=null?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(f=c!=null?c:t)!=null?f:a.defaultError}},description:n}}var k=class{get description(){return this._def.description}_getType(e){return(0,x.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,x.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new d.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,x.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if((0,d.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let i=this.safeParse(e,t);if(i.success)return i.data;throw i.error}safeParse(e,t){var s;let i={common:{issues:[],async:(s=t==null?void 0:t.async)!=null?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,x.getParsedType)(e)},n=this._parseSync({data:e,path:i.path,parent:i});return Gf(i,n)}"~validate"(e){var i,n;let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,x.getParsedType)(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:t});return(0,d.isValid)(s)?{value:s.value}:{issues:t.common.issues}}catch(s){(n=(i=s==null?void 0:s.message)==null?void 0:i.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(s=>(0,d.isValid)(s)?{value:s.value}:{issues:t.common.issues})}async parseAsync(e,t){let i=await this.safeParseAsync(e,t);if(i.success)return i.data;throw i.error}async safeParseAsync(e,t){let i={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,x.getParsedType)(e)},n=this._parse({data:e,path:i.path,parent:i}),s=await((0,d.isAsync)(n)?n:Promise.resolve(n));return Gf(i,s)}refine(e,t){let i=n=>typeof t=="string"||typeof t=="undefined"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,s)=>{let o=e(n),a=()=>s.addIssue({code:w.ZodIssueCode.custom,...i(n)});return typeof Promise!="undefined"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,t){return this._refinement((i,n)=>e(i)?!0:(n.addIssue(typeof t=="function"?t(i,n):t),!1))}_refinement(e){return new he({schema:this,typeName:A.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return ve.create(this,this._def)}nullable(){return Ce.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Re.create(this)}promise(){return We.create(this,this._def)}or(e){return ot.create([this,e],this._def)}and(e){return at.create(this,e,this._def)}transform(e){return new he({...j(this._def),schema:this,typeName:A.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new ht({...j(this._def),innerType:this,defaultValue:t,typeName:A.ZodDefault})}brand(){return new Ur({typeName:A.ZodBranded,type:this,...j(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new pt({...j(this._def),innerType:this,catchValue:t,typeName:A.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Zr.create(this,e)}readonly(){return dt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};h.ZodType=k;h.Schema=k;h.ZodSchema=k;var Bx=/^c[^\s-]{8,}$/i,$x=/^[0-9a-z]+$/,Hx=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Jx=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Yx=/^[a-z0-9_-]{21}$/i,Kx=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Gx=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Xx=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Qx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Aa,eq=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tq=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,rq=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,iq=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,nq=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,sq=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Qf="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",oq=new RegExp(`^${Qf}$`);function eh(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);let t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function aq(r){return new RegExp(`^${eh(r)}$`)}function th(r){let e=`${Qf}T${eh(r)}`,t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function uq(r,e){return!!((e==="v4"||!e)&&eq.test(r)||(e==="v6"||!e)&&rq.test(r))}function cq(r,e){if(!Kx.test(r))return!1;try{let[t]=r.split(".");if(!t)return!1;let i=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(i));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function lq(r,e){return!!((e==="v4"||!e)&&tq.test(r)||(e==="v6"||!e)&&iq.test(r))}var Ve=class r extends k{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==x.ZodParsedType.string){let s=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(s,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.string,received:s.parsedType}),d.INVALID}let i=new d.ParseStatus,n;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="max")e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="length"){let o=e.data.length>s.value,a=e.data.length<s.value;(o||a)&&(n=this._getOrReturnCtx(e,n),o?(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")Xx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"email",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")Aa||(Aa=new RegExp(Qx,"u")),Aa.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"emoji",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")Jx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"uuid",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="nanoid")Yx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"nanoid",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")Bx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"cuid",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")$x.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"cuid2",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")Hx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"ulid",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"url",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"regex",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),i.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?th(s).test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="date"?oq.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:"date",message:s.message}),i.dirty()):s.kind==="time"?aq(s).test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:"time",message:s.message}),i.dirty()):s.kind==="duration"?Gx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"duration",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="ip"?uq(e.data,s.version)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"ip",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="jwt"?cq(e.data,s.alg)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"jwt",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="cidr"?lq(e.data,s.version)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"cidr",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="base64"?nq.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"base64",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="base64url"?sq.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"base64url",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):x.util.assertNever(s);return{status:i.value,value:e.data}}_regex(e,t,i){return this.refinement(n=>e.test(n),{validation:t,code:w.ZodIssueCode.invalid_string,...T.errorUtil.errToObj(i)})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...T.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...T.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...T.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...T.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...T.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...T.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...T.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...T.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...T.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...T.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...T.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...T.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...T.errorUtil.errToObj(e)})}datetime(e){var t,i;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!=null?t:!1,local:(i=e==null?void 0:e.local)!=null?i:!1,...T.errorUtil.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,...T.errorUtil.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...T.errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...T.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...T.errorUtil.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...T.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...T.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...T.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...T.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...T.errorUtil.errToObj(t)})}nonempty(e){return this.min(1,T.errorUtil.errToObj(e))}trim(){return new r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};h.ZodString=Ve;Ve.create=r=>{var e;return new Ve({checks:[],typeName:A.ZodString,coerce:(e=r==null?void 0:r.coerce)!=null?e:!1,...j(r)})};function fq(r,e){let t=(r.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,n=t>i?t:i,s=Number.parseInt(r.toFixed(n).replace(".","")),o=Number.parseInt(e.toFixed(n).replace(".",""));return s%o/10**n}var et=class r extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==x.ZodParsedType.number){let s=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(s,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.number,received:s.parsedType}),d.INVALID}let i,n=new d.ParseStatus;for(let s of this._def.checks)s.kind==="int"?x.util.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:s.message}),n.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="multipleOf"?fq(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.not_finite,message:s.message}),n.dirty()):x.util.assertNever(s);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,T.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,T.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,T.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,T.errorUtil.toString(t))}setLimit(e,t,i,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:T.errorUtil.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:T.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:T.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:T.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:T.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:T.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:T.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:T.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:T.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:T.errorUtil.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.util.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(t===null||i.value>t)&&(t=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(t)&&Number.isFinite(e)}};h.ZodNumber=et;et.create=r=>new et({checks:[],typeName:A.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...j(r)});var tt=class r extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==x.ZodParsedType.bigint)return this._getInvalidInput(e);let i,n=new d.ParseStatus;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):x.util.assertNever(s);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.bigint,received:t.parsedType}),d.INVALID}gte(e,t){return this.setLimit("min",e,!0,T.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,T.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,T.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,T.errorUtil.toString(t))}setLimit(e,t,i,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:T.errorUtil.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:T.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:T.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:T.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:T.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:T.errorUtil.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};h.ZodBigInt=tt;tt.create=r=>{var e;return new tt({checks:[],typeName:A.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!=null?e:!1,...j(r)})};var rt=class extends k{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==x.ZodParsedType.boolean){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.boolean,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodBoolean=rt;rt.create=r=>new rt({typeName:A.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...j(r)});var it=class r extends k{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==x.ZodParsedType.date){let s=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(s,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.date,received:s.parsedType}),d.INVALID}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(s,{code:w.ZodIssueCode.invalid_date}),d.INVALID}let i=new d.ParseStatus,n;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),i.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):x.util.assertNever(s);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:T.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:T.errorUtil.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};h.ZodDate=it;it.create=r=>new it({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:A.ZodDate,...j(r)});var jt=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.symbol){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.symbol,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodSymbol=jt;jt.create=r=>new jt({typeName:A.ZodSymbol,...j(r)});var nt=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.undefined){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.undefined,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodUndefined=nt;nt.create=r=>new nt({typeName:A.ZodUndefined,...j(r)});var st=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.null){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.null,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodNull=st;st.create=r=>new st({typeName:A.ZodNull,...j(r)});var ze=class extends k{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,d.OK)(e.data)}};h.ZodAny=ze;ze.create=r=>new ze({typeName:A.ZodAny,...j(r)});var ke=class extends k{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,d.OK)(e.data)}};h.ZodUnknown=ke;ke.create=r=>new ke({typeName:A.ZodUnknown,...j(r)});var Se=class extends k{_parse(e){let t=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.never,received:t.parsedType}),d.INVALID}};h.ZodNever=Se;Se.create=r=>new Se({typeName:A.ZodNever,...j(r)});var kt=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.undefined){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.void,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodVoid=kt;kt.create=r=>new kt({typeName:A.ZodVoid,...j(r)});var Re=class r extends k{_parse(e){let{ctx:t,status:i}=this._processInputParams(e),n=this._def;if(t.parsedType!==x.ZodParsedType.array)return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.array,received:t.parsedType}),d.INVALID;if(n.exactLength!==null){let o=t.data.length>n.exactLength.value,a=t.data.length<n.exactLength.value;(o||a)&&((0,d.addIssueToContext)(t,{code:o?w.ZodIssueCode.too_big:w.ZodIssueCode.too_small,minimum:a?n.exactLength.value:void 0,maximum:o?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&((0,d.addIssueToContext)(t,{code:w.ZodIssueCode.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&((0,d.addIssueToContext)(t,{code:w.ZodIssueCode.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),t.common.async)return Promise.all([...t.data].map((o,a)=>n.type._parseAsync(new be(t,o,t.path,a)))).then(o=>d.ParseStatus.mergeArray(i,o));let s=[...t.data].map((o,a)=>n.type._parseSync(new be(t,o,t.path,a)));return d.ParseStatus.mergeArray(i,s)}get element(){return this._def.type}min(e,t){return new r({...this._def,minLength:{value:e,message:T.errorUtil.toString(t)}})}max(e,t){return new r({...this._def,maxLength:{value:e,message:T.errorUtil.toString(t)}})}length(e,t){return new r({...this._def,exactLength:{value:e,message:T.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}};h.ZodArray=Re;Re.create=(r,e)=>new Re({type:r,minLength:null,maxLength:null,exactLength:null,typeName:A.ZodArray,...j(e)});function Et(r){if(r instanceof ue){let e={};for(let t in r.shape){let i=r.shape[t];e[t]=ve.create(Et(i))}return new ue({...r._def,shape:()=>e})}else return r instanceof Re?new Re({...r._def,type:Et(r.element)}):r instanceof ve?ve.create(Et(r.unwrap())):r instanceof Ce?Ce.create(Et(r.unwrap())):r instanceof Te?Te.create(r.items.map(e=>Et(e))):r}var ue=class r extends k{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=x.util.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==x.ZodParsedType.object){let l=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(l,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.object,received:l.parsedType}),d.INVALID}let{status:i,ctx:n}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Se&&this._def.unknownKeys==="strip"))for(let l in n.data)o.includes(l)||a.push(l);let c=[];for(let l of o){let f=s[l],p=n.data[l];c.push({key:{status:"valid",value:l},value:f._parse(new be(n,p,n.path,l)),alwaysSet:l in n.data})}if(this._def.catchall instanceof Se){let l=this._def.unknownKeys;if(l==="passthrough")for(let f of a)c.push({key:{status:"valid",value:f},value:{status:"valid",value:n.data[f]}});else if(l==="strict")a.length>0&&((0,d.addIssueToContext)(n,{code:w.ZodIssueCode.unrecognized_keys,keys:a}),i.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let f of a){let p=n.data[f];c.push({key:{status:"valid",value:f},value:l._parse(new be(n,p,n.path,f)),alwaysSet:f in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let l=[];for(let f of c){let p=await f.key,y=await f.value;l.push({key:p,value:y,alwaysSet:f.alwaysSet})}return l}).then(l=>d.ParseStatus.mergeObjectSync(i,l)):d.ParseStatus.mergeObjectSync(i,c)}get shape(){return this._def.shape()}strict(e){return T.errorUtil.errToObj,new r({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,i)=>{var s,o,a,c;let n=(a=(o=(s=this._def).errorMap)==null?void 0:o.call(s,t,i).message)!=null?a:i.defaultError;return t.code==="unrecognized_keys"?{message:(c=T.errorUtil.errToObj(e).message)!=null?c:n}:{message:n}}}:{}})}strip(){return new r({...this._def,unknownKeys:"strip"})}passthrough(){return new r({...this._def,unknownKeys:"passthrough"})}extend(e){return new r({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new r({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:A.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new r({...this._def,catchall:e})}pick(e){let t={};for(let i of x.util.objectKeys(e))e[i]&&this.shape[i]&&(t[i]=this.shape[i]);return new r({...this._def,shape:()=>t})}omit(e){let t={};for(let i of x.util.objectKeys(this.shape))e[i]||(t[i]=this.shape[i]);return new r({...this._def,shape:()=>t})}deepPartial(){return Et(this)}partial(e){let t={};for(let i of x.util.objectKeys(this.shape)){let n=this.shape[i];e&&!e[i]?t[i]=n:t[i]=n.optional()}return new r({...this._def,shape:()=>t})}required(e){let t={};for(let i of x.util.objectKeys(this.shape))if(e&&!e[i])t[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof ve;)s=s._def.innerType;t[i]=s}return new r({...this._def,shape:()=>t})}keyof(){return rh(x.util.objectKeys(this.shape))}};h.ZodObject=ue;ue.create=(r,e)=>new ue({shape:()=>r,unknownKeys:"strip",catchall:Se.create(),typeName:A.ZodObject,...j(e)});ue.strictCreate=(r,e)=>new ue({shape:()=>r,unknownKeys:"strict",catchall:Se.create(),typeName:A.ZodObject,...j(e)});ue.lazycreate=(r,e)=>new ue({shape:r,unknownKeys:"strip",catchall:Se.create(),typeName:A.ZodObject,...j(e)});var ot=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),i=this._def.options;function n(s){for(let a of s)if(a.result.status==="valid")return a.result;for(let a of s)if(a.result.status==="dirty")return t.common.issues.push(...a.ctx.common.issues),a.result;let o=s.map(a=>new w.ZodError(a.ctx.common.issues));return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_union,unionErrors:o}),d.INVALID}if(t.common.async)return Promise.all(i.map(async s=>{let o={...t,common:{...t.common,issues:[]},parent:null};return{result:await s._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(n);{let s,o=[];for(let c of i){let l={...t,common:{...t.common,issues:[]},parent:null},f=c._parseSync({data:t.data,path:t.path,parent:l});if(f.status==="valid")return f;f.status==="dirty"&&!s&&(s={result:f,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(c=>new w.ZodError(c));return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_union,unionErrors:a}),d.INVALID}}get options(){return this._def.options}};h.ZodUnion=ot;ot.create=(r,e)=>new ot({options:r,typeName:A.ZodUnion,...j(e)});var je=r=>r instanceof ut?je(r.schema):r instanceof he?je(r.innerType()):r instanceof ct?[r.value]:r instanceof lt?r.options:r instanceof ft?x.util.objectValues(r.enum):r instanceof ht?je(r._def.innerType):r instanceof nt?[void 0]:r instanceof st?[null]:r instanceof ve?[void 0,...je(r.unwrap())]:r instanceof Ce?[null,...je(r.unwrap())]:r instanceof Ur||r instanceof dt?je(r.unwrap()):r instanceof pt?je(r._def.innerType):[],Ki=class r extends k{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.ZodParsedType.object)return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.object,received:t.parsedType}),d.INVALID;let i=this.discriminator,n=t.data[i],s=this.optionsMap.get(n);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):((0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),d.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,i){let n=new Map;for(let s of t){let o=je(s.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of o){if(n.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);n.set(a,s)}}return new r({typeName:A.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...j(i)})}};h.ZodDiscriminatedUnion=Ki;function Ea(r,e){let t=(0,x.getParsedType)(r),i=(0,x.getParsedType)(e);if(r===e)return{valid:!0,data:r};if(t===x.ZodParsedType.object&&i===x.ZodParsedType.object){let n=x.util.objectKeys(e),s=x.util.objectKeys(r).filter(a=>n.indexOf(a)!==-1),o={...r,...e};for(let a of s){let c=Ea(r[a],e[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(t===x.ZodParsedType.array&&i===x.ZodParsedType.array){if(r.length!==e.length)return{valid:!1};let n=[];for(let s=0;s<r.length;s++){let o=r[s],a=e[s],c=Ea(o,a);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return t===x.ZodParsedType.date&&i===x.ZodParsedType.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}var at=class extends k{_parse(e){let{status:t,ctx:i}=this._processInputParams(e),n=(s,o)=>{if((0,d.isAborted)(s)||(0,d.isAborted)(o))return d.INVALID;let a=Ea(s.value,o.value);return a.valid?(((0,d.isDirty)(s)||(0,d.isDirty)(o))&&t.dirty(),{status:t.value,value:a.data}):((0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_intersection_types}),d.INVALID)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([s,o])=>n(s,o)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};h.ZodIntersection=at;at.create=(r,e,t)=>new at({left:r,right:e,typeName:A.ZodIntersection,...j(t)});var Te=class r extends k{_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==x.ZodParsedType.array)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.array,received:i.parsedType}),d.INVALID;if(i.data.length<this._def.items.length)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),d.INVALID;!this._def.rest&&i.data.length>this._def.items.length&&((0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let s=[...i.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new be(i,o,i.path,a)):null}).filter(o=>!!o);return i.common.async?Promise.all(s).then(o=>d.ParseStatus.mergeArray(t,o)):d.ParseStatus.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new r({...this._def,rest:e})}};h.ZodTuple=Te;Te.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Te({items:r,typeName:A.ZodTuple,rest:null,...j(e)})};var Gi=class r extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==x.ZodParsedType.object)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.object,received:i.parsedType}),d.INVALID;let n=[],s=this._def.keyType,o=this._def.valueType;for(let a in i.data)n.push({key:s._parse(new be(i,a,i.path,a)),value:o._parse(new be(i,i.data[a],i.path,a)),alwaysSet:a in i.data});return i.common.async?d.ParseStatus.mergeObjectAsync(t,n):d.ParseStatus.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,i){return t instanceof k?new r({keyType:e,valueType:t,typeName:A.ZodRecord,...j(i)}):new r({keyType:Ve.create(),valueType:e,typeName:A.ZodRecord,...j(t)})}};h.ZodRecord=Gi;var Rt=class extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==x.ZodParsedType.map)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.map,received:i.parsedType}),d.INVALID;let n=this._def.keyType,s=this._def.valueType,o=[...i.data.entries()].map(([a,c],l)=>({key:n._parse(new be(i,a,i.path,[l,"key"])),value:s._parse(new be(i,c,i.path,[l,"value"]))}));if(i.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of o){let l=await c.key,f=await c.value;if(l.status==="aborted"||f.status==="aborted")return d.INVALID;(l.status==="dirty"||f.status==="dirty")&&t.dirty(),a.set(l.value,f.value)}return{status:t.value,value:a}})}else{let a=new Map;for(let c of o){let l=c.key,f=c.value;if(l.status==="aborted"||f.status==="aborted")return d.INVALID;(l.status==="dirty"||f.status==="dirty")&&t.dirty(),a.set(l.value,f.value)}return{status:t.value,value:a}}}};h.ZodMap=Rt;Rt.create=(r,e,t)=>new Rt({valueType:e,keyType:r,typeName:A.ZodMap,...j(t)});var Pt=class r extends k{_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==x.ZodParsedType.set)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.set,received:i.parsedType}),d.INVALID;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&((0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&((0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let s=this._def.valueType;function o(c){let l=new Set;for(let f of c){if(f.status==="aborted")return d.INVALID;f.status==="dirty"&&t.dirty(),l.add(f.value)}return{status:t.value,value:l}}let a=[...i.data.values()].map((c,l)=>s._parse(new be(i,c,i.path,l)));return i.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(e,t){return new r({...this._def,minSize:{value:e,message:T.errorUtil.toString(t)}})}max(e,t){return new r({...this._def,maxSize:{value:e,message:T.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};h.ZodSet=Pt;Pt.create=(r,e)=>new Pt({valueType:r,minSize:null,maxSize:null,typeName:A.ZodSet,...j(e)});var Xi=class r extends k{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.ZodParsedType.function)return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.function,received:t.parsedType}),d.INVALID;function i(a,c){return(0,d.makeIssue)({data:a,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,Yi.getErrorMap)(),Yi.defaultErrorMap].filter(l=>!!l),issueData:{code:w.ZodIssueCode.invalid_arguments,argumentsError:c}})}function n(a,c){return(0,d.makeIssue)({data:a,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,Yi.getErrorMap)(),Yi.defaultErrorMap].filter(l=>!!l),issueData:{code:w.ZodIssueCode.invalid_return_type,returnTypeError:c}})}let s={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof We){let a=this;return(0,d.OK)(async function(...c){let l=new w.ZodError([]),f=await a._def.args.parseAsync(c,s).catch(g=>{throw l.addIssue(i(c,g)),l}),p=await Reflect.apply(o,this,f);return await a._def.returns._def.type.parseAsync(p,s).catch(g=>{throw l.addIssue(n(p,g)),l})})}else{let a=this;return(0,d.OK)(function(...c){let l=a._def.args.safeParse(c,s);if(!l.success)throw new w.ZodError([i(c,l.error)]);let f=Reflect.apply(o,this,l.data),p=a._def.returns.safeParse(f,s);if(!p.success)throw new w.ZodError([n(f,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new r({...this._def,args:Te.create(e).rest(ke.create())})}returns(e){return new r({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,i){return new r({args:e||Te.create([]).rest(ke.create()),returns:t||ke.create(),typeName:A.ZodFunction,...j(i)})}};h.ZodFunction=Xi;var ut=class extends k{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};h.ZodLazy=ut;ut.create=(r,e)=>new ut({getter:r,typeName:A.ZodLazy,...j(e)});var ct=class extends k{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(t,{received:t.data,code:w.ZodIssueCode.invalid_literal,expected:this._def.value}),d.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}};h.ZodLiteral=ct;ct.create=(r,e)=>new ct({value:r,typeName:A.ZodLiteral,...j(e)});function rh(r,e){return new lt({values:r,typeName:A.ZodEnum,...j(e)})}var lt=class r extends k{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),i=this._def.values;return(0,d.addIssueToContext)(t,{expected:x.util.joinValues(i),received:t.parsedType,code:w.ZodIssueCode.invalid_type}),d.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),i=this._def.values;return(0,d.addIssueToContext)(t,{received:t.data,code:w.ZodIssueCode.invalid_enum_value,options:i}),d.INVALID}return(0,d.OK)(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return r.create(e,{...this._def,...t})}exclude(e,t=this._def){return r.create(this.options.filter(i=>!e.includes(i)),{...this._def,...t})}};h.ZodEnum=lt;lt.create=rh;var ft=class extends k{_parse(e){let t=x.util.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==x.ZodParsedType.string&&i.parsedType!==x.ZodParsedType.number){let n=x.util.objectValues(t);return(0,d.addIssueToContext)(i,{expected:x.util.joinValues(n),received:i.parsedType,code:w.ZodIssueCode.invalid_type}),d.INVALID}if(this._cache||(this._cache=new Set(x.util.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let n=x.util.objectValues(t);return(0,d.addIssueToContext)(i,{received:i.data,code:w.ZodIssueCode.invalid_enum_value,options:n}),d.INVALID}return(0,d.OK)(e.data)}get enum(){return this._def.values}};h.ZodNativeEnum=ft;ft.create=(r,e)=>new ft({values:r,typeName:A.ZodNativeEnum,...j(e)});var We=class extends k{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.ZodParsedType.promise&&t.common.async===!1)return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.promise,received:t.parsedType}),d.INVALID;let i=t.parsedType===x.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,d.OK)(i.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};h.ZodPromise=We;We.create=(r,e)=>new We({type:r,typeName:A.ZodPromise,...j(e)});var he=class extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===A.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:i}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:o=>{(0,d.addIssueToContext)(i,o),o.fatal?t.abort():t.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),n.type==="preprocess"){let o=n.transform(i.data,s);if(i.common.async)return Promise.resolve(o).then(async a=>{if(t.value==="aborted")return d.INVALID;let c=await this._def.schema._parseAsync({data:a,path:i.path,parent:i});return c.status==="aborted"?d.INVALID:c.status==="dirty"||t.value==="dirty"?(0,d.DIRTY)(c.value):c});{if(t.value==="aborted")return d.INVALID;let a=this._def.schema._parseSync({data:o,path:i.path,parent:i});return a.status==="aborted"?d.INVALID:a.status==="dirty"||t.value==="dirty"?(0,d.DIRTY)(a.value):a}}if(n.type==="refinement"){let o=a=>{let c=n.refinement(a,s);if(i.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?d.INVALID:(a.status==="dirty"&&t.dirty(),o(a.value),{status:t.value,value:a.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>a.status==="aborted"?d.INVALID:(a.status==="dirty"&&t.dirty(),o(a.value).then(()=>({status:t.value,value:a.value}))))}if(n.type==="transform")if(i.common.async===!1){let o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!(0,d.isValid)(o))return d.INVALID;let a=n.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>(0,d.isValid)(o)?Promise.resolve(n.transform(o.value,s)).then(a=>({status:t.value,value:a})):d.INVALID);x.util.assertNever(n)}};h.ZodEffects=he;h.ZodTransformer=he;he.create=(r,e,t)=>new he({schema:r,typeName:A.ZodEffects,effect:e,...j(t)});he.createWithPreprocess=(r,e,t)=>new he({schema:e,effect:{type:"preprocess",transform:r},typeName:A.ZodEffects,...j(t)});var ve=class extends k{_parse(e){return this._getType(e)===x.ZodParsedType.undefined?(0,d.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};h.ZodOptional=ve;ve.create=(r,e)=>new ve({innerType:r,typeName:A.ZodOptional,...j(e)});var Ce=class extends k{_parse(e){return this._getType(e)===x.ZodParsedType.null?(0,d.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};h.ZodNullable=Ce;Ce.create=(r,e)=>new Ce({innerType:r,typeName:A.ZodNullable,...j(e)});var ht=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),i=t.data;return t.parsedType===x.ZodParsedType.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};h.ZodDefault=ht;ht.create=(r,e)=>new ht({innerType:r,typeName:A.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...j(e)});var pt=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),i={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return(0,d.isAsync)(n)?n.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new w.ZodError(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new w.ZodError(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};h.ZodCatch=pt;pt.create=(r,e)=>new pt({innerType:r,typeName:A.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...j(e)});var Nt=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.nan){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.nan,received:i.parsedType}),d.INVALID}return{status:"valid",value:e.data}}};h.ZodNaN=Nt;Nt.create=r=>new Nt({typeName:A.ZodNaN,...j(r)});h.BRAND=Symbol("zod_brand");var Ur=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),i=t.data;return this._def.type._parse({data:i,path:t.path,parent:t})}unwrap(){return this._def.type}};h.ZodBranded=Ur;var Zr=class r extends k{_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?d.INVALID:s.status==="dirty"?(t.dirty(),(0,d.DIRTY)(s.value)):this._def.out._parseAsync({data:s.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?d.INVALID:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(e,t){return new r({in:e,out:t,typeName:A.ZodPipeline})}};h.ZodPipeline=Zr;var dt=class extends k{_parse(e){let t=this._def.innerType._parse(e),i=n=>((0,d.isValid)(n)&&(n.value=Object.freeze(n.value)),n);return(0,d.isAsync)(t)?t.then(n=>i(n)):i(t)}unwrap(){return this._def.innerType}};h.ZodReadonly=dt;dt.create=(r,e)=>new dt({innerType:r,typeName:A.ZodReadonly,...j(e)});function Xf(r,e){let t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}function ih(r,e={},t){return r?ze.create().superRefine((i,n)=>{var o,a;let s=r(i);if(s instanceof Promise)return s.then(c=>{var l,f;if(!c){let p=Xf(e,i),y=(f=(l=p.fatal)!=null?l:t)!=null?f:!0;n.addIssue({code:"custom",...p,fatal:y})}});if(!s){let c=Xf(e,i),l=(a=(o=c.fatal)!=null?o:t)!=null?a:!0;n.addIssue({code:"custom",...c,fatal:l})}}):ze.create()}h.late={object:ue.lazycreate};var A;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(A||(h.ZodFirstPartyTypeKind=A={}));var hq=(r,e={message:`Input not instance of ${r.name}`})=>ih(t=>t instanceof r,e);h.instanceof=hq;var nh=Ve.create;h.string=nh;var sh=et.create;h.number=sh;var pq=Nt.create;h.nan=pq;var dq=tt.create;h.bigint=dq;var oh=rt.create;h.boolean=oh;var vq=it.create;h.date=vq;var bq=jt.create;h.symbol=bq;var mq=nt.create;h.undefined=mq;var yq=st.create;h.null=yq;var _q=ze.create;h.any=_q;var gq=ke.create;h.unknown=gq;var wq=Se.create;h.never=wq;var Sq=kt.create;h.void=Sq;var Oq=Re.create;h.array=Oq;var xq=ue.create;h.object=xq;var qq=ue.strictCreate;h.strictObject=qq;var Tq=ot.create;h.union=Tq;var Cq=Ki.create;h.discriminatedUnion=Cq;var Iq=at.create;h.intersection=Iq;var Aq=Te.create;h.tuple=Aq;var Eq=Gi.create;h.record=Eq;var jq=Rt.create;h.map=jq;var kq=Pt.create;h.set=kq;var Rq=Xi.create;h.function=Rq;var Pq=ut.create;h.lazy=Pq;var Nq=ct.create;h.literal=Nq;var Fq=lt.create;h.enum=Fq;var Mq=ft.create;h.nativeEnum=Mq;var Uq=We.create;h.promise=Uq;var ah=he.create;h.effect=ah;h.transformer=ah;var Zq=ve.create;h.optional=Zq;var Lq=Ce.create;h.nullable=Lq;var Dq=he.createWithPreprocess;h.preprocess=Dq;var Vq=Zr.create;h.pipeline=Vq;var zq=()=>nh().optional();h.ostring=zq;var Wq=()=>sh().optional();h.onumber=Wq;var Bq=()=>oh().optional();h.oboolean=Bq;h.coerce={string:r=>Ve.create({...r,coerce:!0}),number:r=>et.create({...r,coerce:!0}),boolean:r=>rt.create({...r,coerce:!0}),bigint:r=>tt.create({...r,coerce:!0}),date:r=>it.create({...r,coerce:!0})};h.NEVER=d.INVALID});var ja=u(me=>{"use strict";var $q=me&&me.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),Ft=me&&me.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&$q(e,r,t)};Object.defineProperty(me,"__esModule",{value:!0});Ft(Hi(),me);Ft(Ia(),me);Ft(Jf(),me);Ft(Fr(),me);Ft(uh(),me);Ft($i(),me)});var z=u(ce=>{"use strict";var ch=ce&&ce.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),Hq=ce&&ce.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Jq=ce&&ce.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&ch(e,r,t);return Hq(e,r),e},Yq=ce&&ce.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&ch(e,r,t)};Object.defineProperty(ce,"__esModule",{value:!0});ce.z=void 0;var lh=Jq(ja());ce.z=lh;Yq(ja(),ce);ce.default=lh});var ka=u(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.actionTypesZodSchema=Mt.ActionTypes=void 0;var Kq=z(),fh;(function(r){r.OpenUrl="openUrl",r.ImBack="imBack",r.PostBack="postBack",r.PlayAudio="playAudio",r.PlayVideo="playVideo",r.ShowImage="showImage",r.DownloadFile="downloadFile",r.Signin="signin",r.Call="call",r.MessageBack="messageBack",r.OpenApp="openApp"})(fh||(Mt.ActionTypes=fh={}));Mt.actionTypesZodSchema=Kq.z.enum(["openUrl","imBack","postBack","playAudio","showImage","downloadFile","signin","call","messageBack","openApp"])});var Ra=u(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.semanticActionStateTypesZodSchema=Ut.SemanticActionStateTypes=void 0;var Gq=z(),hh;(function(r){r.Start="start",r.Continue="continue",r.Done="done"})(hh||(Ut.SemanticActionStateTypes=hh={}));Ut.semanticActionStateTypesZodSchema=Gq.z.enum(["start","continue","done"])});var Pa=u(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.attachmentLayoutTypesZodSchema=Zt.AttachmentLayoutTypes=void 0;var Xq=z(),ph;(function(r){r.List="list",r.Carousel="carousel"})(ph||(Zt.AttachmentLayoutTypes=ph={}));Zt.attachmentLayoutTypesZodSchema=Xq.z.enum(["list","carousel"])});var Na=u(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.Channels=void 0;var dh;(function(r){r.Alexa="alexa",r.Console="console",r.Directline="directline",r.DirectlineSpeech="directlinespeech",r.Email="email",r.Emulator="emulator",r.Facebook="facebook",r.Groupme="groupme",r.Line="line",r.Msteams="msteams",r.Omni="omnichannel",r.Outlook="outlook",r.Skype="skype",r.Slack="slack",r.Sms="sms",r.Telegram="telegram",r.Telephony="telephony",r.Test="test",r.Webchat="webchat"})(dh||(Qi.Channels=dh={}))});var Fa=u(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.endOfConversationCodesZodSchema=Lt.EndOfConversationCodes=void 0;var Qq=z(),vh;(function(r){r.Unknown="unknown",r.CompletedSuccessfully="completedSuccessfully",r.UserCancelled="userCancelled",r.AgentTimedOut="agentTimedOut",r.AgentIssuedInvalidMessage="agentIssuedInvalidMessage",r.ChannelFailed="channelFailed"})(vh||(Lt.EndOfConversationCodes=vh={}));Lt.endOfConversationCodesZodSchema=Qq.z.enum(["unknown","completedSuccessfully","userCancelled","agentTimedOut","agentIssuedInvalidMessage","channelFailed"])});var en=u(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.roleTypeZodSchema=Dt.RoleTypes=void 0;var eT=z(),bh;(function(r){r.User="user",r.Agent="bot",r.Skill="skill"})(bh||(Dt.RoleTypes=bh={}));Dt.roleTypeZodSchema=eT.z.enum(["user","bot","skill"])});var mh=u(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.addAIToActivity=void 0;var tT=(r,e,t)=>{var i;let n={type:"https://schema.org/Message","@type":"Message","@context":"https://schema.org","@id":"",additionalType:["AIGeneratedContent"],citation:e,usageInfo:t};(i=r.entities)!==null&&i!==void 0||(r.entities=[]),r.entities.push(n)};tn.addAIToActivity=tT});var yh=u(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.adaptiveCardInvokeActionZodSchema=void 0;var vt=z();rn.adaptiveCardInvokeActionZodSchema=vt.z.object({type:vt.z.string().min(1),id:vt.z.string().optional(),verb:vt.z.string().min(1),data:vt.z.record(vt.z.string().min(1),vt.z.any())})});var _h=u(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.default="ffffffff-ffff-ffff-ffff-ffffffffffff"});var gh=u(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.default="00000000-0000-0000-0000-000000000000"});var wh=u(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i});var Lr=u(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});var rT=wh();function iT(r){return typeof r=="string"&&rT.default.test(r)}La.default=iT});var Dr=u(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});var nT=Lr();function sT(r){if(!(0,nT.default)(r))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(r.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(r.slice(9,13),16))>>>8,e&255,(e=parseInt(r.slice(14,18),16))>>>8,e&255,(e=parseInt(r.slice(19,23),16))>>>8,e&255,(e=parseInt(r.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}Da.default=sT});var Pe=u(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.unsafeStringify=void 0;var oT=Lr(),G=[];for(let r=0;r<256;++r)G.push((r+256).toString(16).slice(1));function Sh(r,e=0){return(G[r[e+0]]+G[r[e+1]]+G[r[e+2]]+G[r[e+3]]+"-"+G[r[e+4]]+G[r[e+5]]+"-"+G[r[e+6]]+G[r[e+7]]+"-"+G[r[e+8]]+G[r[e+9]]+"-"+G[r[e+10]]+G[r[e+11]]+G[r[e+12]]+G[r[e+13]]+G[r[e+14]]+G[r[e+15]]).toLowerCase()}Vr.unsafeStringify=Sh;function aT(r,e=0){let t=Sh(r,e);if(!(0,oT.default)(t))throw TypeError("Stringified UUID is invalid");return t}Vr.default=aT});var nn=u(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});var Va,uT=new Uint8Array(16);function cT(){if(!Va){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Va=crypto.getRandomValues.bind(crypto)}return Va(uT)}za.default=cT});var Wa=u(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.updateV1State=void 0;var Oh=nn(),lT=Pe(),zr={};function fT(r,e,t){var s,o,a,c;let i,n=(s=r==null?void 0:r._v6)!=null?s:!1;if(r){let l=Object.keys(r);l.length===1&&l[0]==="_v6"&&(r=void 0)}if(r)i=xh((c=(a=r.random)!=null?a:(o=r.rng)==null?void 0:o.call(r))!=null?c:(0,Oh.default)(),r.msecs,r.nsecs,r.clockseq,r.node,e,t);else{let l=Date.now(),f=(0,Oh.default)();qh(zr,l,f),i=xh(f,zr.msecs,zr.nsecs,n?void 0:zr.clockseq,n?void 0:zr.node,e,t)}return e!=null?e:(0,lT.unsafeStringify)(i)}function qh(r,e,t){var i,n;return(i=r.msecs)!=null||(r.msecs=-1/0),(n=r.nsecs)!=null||(r.nsecs=0),e===r.msecs?(r.nsecs++,r.nsecs>=1e4&&(r.node=void 0,r.nsecs=0)):e>r.msecs?r.nsecs=0:e<r.msecs&&(r.node=void 0),r.node||(r.node=t.slice(10,16),r.node[0]|=1,r.clockseq=(t[8]<<8|t[9])&16383),r.msecs=e,r}Wr.updateV1State=qh;function xh(r,e,t,i,n,s,o=0){if(r.length<16)throw new Error("Random bytes length must be >= 16");if(!s)s=new Uint8Array(16),o=0;else if(o<0||o+16>s.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);e!=null||(e=Date.now()),t!=null||(t=0),i!=null||(i=(r[8]<<8|r[9])&16383),n!=null||(n=r.slice(10,16)),e+=122192928e5;let a=((e&268435455)*1e4+t)%4294967296;s[o++]=a>>>24&255,s[o++]=a>>>16&255,s[o++]=a>>>8&255,s[o++]=a&255;let c=e/4294967296*1e4&268435455;s[o++]=c>>>8&255,s[o++]=c&255,s[o++]=c>>>24&15|16,s[o++]=c>>>16&255,s[o++]=i>>>8|128,s[o++]=i&255;for(let l=0;l<6;++l)s[o++]=n[l];return s}Wr.default=fT});var $a=u(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});var hT=Dr(),pT=Pe();function dT(r){let e=typeof r=="string"?(0,hT.default)(r):r,t=vT(e);return typeof r=="string"?(0,pT.unsafeStringify)(t):t}Ba.default=dT;function vT(r){return Uint8Array.of((r[6]&15)<<4|r[7]>>4&15,(r[7]&15)<<4|(r[4]&240)>>4,(r[4]&15)<<4|(r[5]&240)>>4,(r[5]&15)<<4|(r[0]&240)>>4,(r[0]&15)<<4|(r[1]&240)>>4,(r[1]&15)<<4|(r[2]&240)>>4,96|r[2]&15,r[3],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])}});var Ch=u(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});function bT(r){let e=_T(r),t=yT(e,r.length*8);return mT(t)}function mT(r){let e=new Uint8Array(r.length*4);for(let t=0;t<r.length*4;t++)e[t]=r[t>>2]>>>t%4*8&255;return e}function Th(r){return(r+64>>>9<<4)+14+1}function yT(r,e){let t=new Uint32Array(Th(e)).fill(0);t.set(r),t[e>>5]|=128<<e%32,t[t.length-1]=e,r=t;let i=1732584193,n=-271733879,s=-1732584194,o=271733878;for(let a=0;a<r.length;a+=16){let c=i,l=n,f=s,p=o;i=te(i,n,s,o,r[a],7,-680876936),o=te(o,i,n,s,r[a+1],12,-389564586),s=te(s,o,i,n,r[a+2],17,606105819),n=te(n,s,o,i,r[a+3],22,-1044525330),i=te(i,n,s,o,r[a+4],7,-176418897),o=te(o,i,n,s,r[a+5],12,1200080426),s=te(s,o,i,n,r[a+6],17,-1473231341),n=te(n,s,o,i,r[a+7],22,-45705983),i=te(i,n,s,o,r[a+8],7,1770035416),o=te(o,i,n,s,r[a+9],12,-1958414417),s=te(s,o,i,n,r[a+10],17,-42063),n=te(n,s,o,i,r[a+11],22,-1990404162),i=te(i,n,s,o,r[a+12],7,1804603682),o=te(o,i,n,s,r[a+13],12,-40341101),s=te(s,o,i,n,r[a+14],17,-1502002290),n=te(n,s,o,i,r[a+15],22,1236535329),i=re(i,n,s,o,r[a+1],5,-165796510),o=re(o,i,n,s,r[a+6],9,-1069501632),s=re(s,o,i,n,r[a+11],14,643717713),n=re(n,s,o,i,r[a],20,-373897302),i=re(i,n,s,o,r[a+5],5,-701558691),o=re(o,i,n,s,r[a+10],9,38016083),s=re(s,o,i,n,r[a+15],14,-660478335),n=re(n,s,o,i,r[a+4],20,-405537848),i=re(i,n,s,o,r[a+9],5,568446438),o=re(o,i,n,s,r[a+14],9,-1019803690),s=re(s,o,i,n,r[a+3],14,-187363961),n=re(n,s,o,i,r[a+8],20,1163531501),i=re(i,n,s,o,r[a+13],5,-1444681467),o=re(o,i,n,s,r[a+2],9,-51403784),s=re(s,o,i,n,r[a+7],14,1735328473),n=re(n,s,o,i,r[a+12],20,-1926607734),i=ie(i,n,s,o,r[a+5],4,-378558),o=ie(o,i,n,s,r[a+8],11,-2022574463),s=ie(s,o,i,n,r[a+11],16,1839030562),n=ie(n,s,o,i,r[a+14],23,-35309556),i=ie(i,n,s,o,r[a+1],4,-1530992060),o=ie(o,i,n,s,r[a+4],11,1272893353),s=ie(s,o,i,n,r[a+7],16,-155497632),n=ie(n,s,o,i,r[a+10],23,-1094730640),i=ie(i,n,s,o,r[a+13],4,681279174),o=ie(o,i,n,s,r[a],11,-358537222),s=ie(s,o,i,n,r[a+3],16,-722521979),n=ie(n,s,o,i,r[a+6],23,76029189),i=ie(i,n,s,o,r[a+9],4,-640364487),o=ie(o,i,n,s,r[a+12],11,-421815835),s=ie(s,o,i,n,r[a+15],16,530742520),n=ie(n,s,o,i,r[a+2],23,-995338651),i=ne(i,n,s,o,r[a],6,-198630844),o=ne(o,i,n,s,r[a+7],10,1126891415),s=ne(s,o,i,n,r[a+14],15,-1416354905),n=ne(n,s,o,i,r[a+5],21,-57434055),i=ne(i,n,s,o,r[a+12],6,1700485571),o=ne(o,i,n,s,r[a+3],10,-1894986606),s=ne(s,o,i,n,r[a+10],15,-1051523),n=ne(n,s,o,i,r[a+1],21,-2054922799),i=ne(i,n,s,o,r[a+8],6,1873313359),o=ne(o,i,n,s,r[a+15],10,-30611744),s=ne(s,o,i,n,r[a+6],15,-1560198380),n=ne(n,s,o,i,r[a+13],21,1309151649),i=ne(i,n,s,o,r[a+4],6,-145523070),o=ne(o,i,n,s,r[a+11],10,-1120210379),s=ne(s,o,i,n,r[a+2],15,718787259),n=ne(n,s,o,i,r[a+9],21,-343485551),i=Be(i,c),n=Be(n,l),s=Be(s,f),o=Be(o,p)}return Uint32Array.of(i,n,s,o)}function _T(r){if(r.length===0)return new Uint32Array;let e=new Uint32Array(Th(r.length*8)).fill(0);for(let t=0;t<r.length;t++)e[t>>2]|=(r[t]&255)<<t%4*8;return e}function Be(r,e){let t=(r&65535)+(e&65535);return(r>>16)+(e>>16)+(t>>16)<<16|t&65535}function gT(r,e){return r<<e|r>>>32-e}function sn(r,e,t,i,n,s){return Be(gT(Be(Be(e,r),Be(i,s)),n),t)}function te(r,e,t,i,n,s,o){return sn(e&t|~e&i,r,e,n,s,o)}function re(r,e,t,i,n,s,o){return sn(e&i|t&~i,r,e,n,s,o)}function ie(r,e,t,i,n,s,o){return sn(e^t^i,r,e,n,s,o)}function ne(r,e,t,i,n,s,o){return sn(t^(e|~i),r,e,n,s,o)}Ha.default=bT});var Br=u(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.URL=Ne.DNS=Ne.stringToBytes=void 0;var Ih=Dr(),wT=Pe();function Ah(r){r=unescape(encodeURIComponent(r));let e=new Uint8Array(r.length);for(let t=0;t<r.length;++t)e[t]=r.charCodeAt(t);return e}Ne.stringToBytes=Ah;Ne.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Ne.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function ST(r,e,t,i,n,s){let o=typeof t=="string"?Ah(t):t,a=typeof i=="string"?(0,Ih.default)(i):i;if(typeof i=="string"&&(i=(0,Ih.default)(i)),(i==null?void 0:i.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+o.length);if(c.set(a),c.set(o,a.length),c=e(c),c[6]=c[6]&15|r,c[8]=c[8]&63|128,n){s=s||0;for(let l=0;l<16;++l)n[s+l]=c[l];return n}return(0,wT.unsafeStringify)(c)}Ne.default=ST});var jh=u(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.URL=bt.DNS=void 0;var OT=Ch(),Ja=Br(),Eh=Br();Object.defineProperty(bt,"DNS",{enumerable:!0,get:function(){return Eh.DNS}});Object.defineProperty(bt,"URL",{enumerable:!0,get:function(){return Eh.URL}});function Ya(r,e,t,i){return(0,Ja.default)(48,OT.default,r,e,t,i)}Ya.DNS=Ja.DNS;Ya.URL=Ja.URL;bt.default=Ya});var kh=u(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});var xT=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);Ka.default={randomUUID:xT}});var Ph=u(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});var Rh=kh(),qT=nn(),TT=Pe();function CT(r,e,t){var n,s,o;if(Rh.default.randomUUID&&!e&&!r)return Rh.default.randomUUID();r=r||{};let i=(o=(s=r.random)!=null?s:(n=r.rng)==null?void 0:n.call(r))!=null?o:(0,qT.default)();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){if(t=t||0,t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let a=0;a<16;++a)e[t+a]=i[a];return e}return(0,TT.unsafeStringify)(i)}Ga.default=CT});var Nh=u(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});function IT(r,e,t,i){switch(r){case 0:return e&t^~e&i;case 1:return e^t^i;case 2:return e&t^e&i^t&i;case 3:return e^t^i}}function Xa(r,e){return r<<e|r>>>32-e}function AT(r){let e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520],i=new Uint8Array(r.length+1);i.set(r),i[r.length]=128,r=i;let n=r.length/4+2,s=Math.ceil(n/16),o=new Array(s);for(let a=0;a<s;++a){let c=new Uint32Array(16);for(let l=0;l<16;++l)c[l]=r[a*64+l*4]<<24|r[a*64+l*4+1]<<16|r[a*64+l*4+2]<<8|r[a*64+l*4+3];o[a]=c}o[s-1][14]=(r.length-1)*8/Math.pow(2,32),o[s-1][14]=Math.floor(o[s-1][14]),o[s-1][15]=(r.length-1)*8&4294967295;for(let a=0;a<s;++a){let c=new Uint32Array(80);for(let m=0;m<16;++m)c[m]=o[a][m];for(let m=16;m<80;++m)c[m]=Xa(c[m-3]^c[m-8]^c[m-14]^c[m-16],1);let l=t[0],f=t[1],p=t[2],y=t[3],g=t[4];for(let m=0;m<80;++m){let O=Math.floor(m/20),S=Xa(l,5)+IT(O,f,p,y)+g+e[O]+c[m]>>>0;g=y,y=p,p=Xa(f,30)>>>0,f=l,l=S}t[0]=t[0]+l>>>0,t[1]=t[1]+f>>>0,t[2]=t[2]+p>>>0,t[3]=t[3]+y>>>0,t[4]=t[4]+g>>>0}return Uint8Array.of(t[0]>>24,t[0]>>16,t[0]>>8,t[0],t[1]>>24,t[1]>>16,t[1]>>8,t[1],t[2]>>24,t[2]>>16,t[2]>>8,t[2],t[3]>>24,t[3]>>16,t[3]>>8,t[3],t[4]>>24,t[4]>>16,t[4]>>8,t[4])}Qa.default=AT});var Mh=u(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.URL=mt.DNS=void 0;var ET=Nh(),eu=Br(),Fh=Br();Object.defineProperty(mt,"DNS",{enumerable:!0,get:function(){return Fh.DNS}});Object.defineProperty(mt,"URL",{enumerable:!0,get:function(){return Fh.URL}});function tu(r,e,t,i){return(0,eu.default)(80,ET.default,r,e,t,i)}tu.DNS=eu.DNS;tu.URL=eu.URL;mt.default=tu});var Uh=u(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});var jT=Pe(),kT=Wa(),RT=$a();function PT(r,e,t){r!=null||(r={}),t!=null||(t=0);let i=(0,kT.default)({...r,_v6:!0},new Uint8Array(16));if(i=(0,RT.default)(i),e){for(let n=0;n<16;n++)e[t+n]=i[n];return e}return(0,jT.unsafeStringify)(i)}ru.default=PT});var Zh=u(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});var NT=Dr(),FT=Pe();function MT(r){let e=typeof r=="string"?(0,NT.default)(r):r,t=UT(e);return typeof r=="string"?(0,FT.unsafeStringify)(t):t}iu.default=MT;function UT(r){return Uint8Array.of((r[3]&15)<<4|r[4]>>4&15,(r[4]&15)<<4|(r[5]&240)>>4,(r[5]&15)<<4|r[6]&15,r[7],(r[1]&15)<<4|(r[2]&240)>>4,(r[2]&15)<<4|(r[3]&240)>>4,16|(r[0]&240)>>4,(r[0]&15)<<4|(r[1]&240)>>4,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])}});var zh=u($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.updateV7State=void 0;var Lh=nn(),ZT=Pe(),nu={};function LT(r,e,t){var n,s,o;let i;if(r)i=Dh((o=(s=r.random)!=null?s:(n=r.rng)==null?void 0:n.call(r))!=null?o:(0,Lh.default)(),r.msecs,r.seq,e,t);else{let a=Date.now(),c=(0,Lh.default)();Vh(nu,a,c),i=Dh(c,nu.msecs,nu.seq,e,t)}return e!=null?e:(0,ZT.unsafeStringify)(i)}function Vh(r,e,t){var i,n;return(i=r.msecs)!=null||(r.msecs=-1/0),(n=r.seq)!=null||(r.seq=0),e>r.msecs?(r.seq=t[6]<<23|t[7]<<16|t[8]<<8|t[9],r.msecs=e):(r.seq=r.seq+1|0,r.seq===0&&r.msecs++),r}$r.updateV7State=Vh;function Dh(r,e,t,i,n=0){if(r.length<16)throw new Error("Random bytes length must be >= 16");if(!i)i=new Uint8Array(16),n=0;else if(n<0||n+16>i.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);return e!=null||(e=Date.now()),t!=null||(t=r[6]*127<<24|r[7]<<16|r[8]<<8|r[9]),i[n++]=e/1099511627776&255,i[n++]=e/4294967296&255,i[n++]=e/16777216&255,i[n++]=e/65536&255,i[n++]=e/256&255,i[n++]=e&255,i[n++]=112|t>>>28&15,i[n++]=t>>>20&255,i[n++]=128|t>>>14&63,i[n++]=t>>>6&255,i[n++]=t<<2&255|r[10]&3,i[n++]=r[11],i[n++]=r[12],i[n++]=r[13],i[n++]=r[14],i[n++]=r[15],i}$r.default=LT});var Wh=u(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});var DT=Lr();function VT(r){if(!(0,DT.default)(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}su.default=VT});var Bh=u(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.version=M.validate=M.v7=M.v6ToV1=M.v6=M.v5=M.v4=M.v3=M.v1ToV6=M.v1=M.stringify=M.parse=M.NIL=M.MAX=void 0;var zT=_h();Object.defineProperty(M,"MAX",{enumerable:!0,get:function(){return zT.default}});var WT=gh();Object.defineProperty(M,"NIL",{enumerable:!0,get:function(){return WT.default}});var BT=Dr();Object.defineProperty(M,"parse",{enumerable:!0,get:function(){return BT.default}});var $T=Pe();Object.defineProperty(M,"stringify",{enumerable:!0,get:function(){return $T.default}});var HT=Wa();Object.defineProperty(M,"v1",{enumerable:!0,get:function(){return HT.default}});var JT=$a();Object.defineProperty(M,"v1ToV6",{enumerable:!0,get:function(){return JT.default}});var YT=jh();Object.defineProperty(M,"v3",{enumerable:!0,get:function(){return YT.default}});var KT=Ph();Object.defineProperty(M,"v4",{enumerable:!0,get:function(){return KT.default}});var GT=Mh();Object.defineProperty(M,"v5",{enumerable:!0,get:function(){return GT.default}});var XT=Uh();Object.defineProperty(M,"v6",{enumerable:!0,get:function(){return XT.default}});var QT=Zh();Object.defineProperty(M,"v6ToV1",{enumerable:!0,get:function(){return QT.default}});var eC=zh();Object.defineProperty(M,"v7",{enumerable:!0,get:function(){return eC.default}});var tC=Lr();Object.defineProperty(M,"validate",{enumerable:!0,get:function(){return tC.default}});var rC=Wh();Object.defineProperty(M,"version",{enumerable:!0,get:function(){return rC.default}})});var ou=u(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.entityZodSchema=void 0;var $h=z();on.entityZodSchema=$h.z.object({type:$h.z.string().min(1)}).passthrough()});var Hh=u(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.semanticActionZodSchema=void 0;var Hr=z(),iC=ou(),nC=Ra();an.semanticActionZodSchema=Hr.z.object({id:Hr.z.string().min(1),state:Hr.z.union([nC.semanticActionStateTypesZodSchema,Hr.z.string().min(1)]),entities:Hr.z.record(iC.entityZodSchema)})});var Jh=u(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.cardActionZodSchema=void 0;var Ie=z(),sC=ka();un.cardActionZodSchema=Ie.z.object({type:Ie.z.union([sC.actionTypesZodSchema,Ie.z.string().min(1)]),title:Ie.z.string().min(1),image:Ie.z.string().min(1).optional(),text:Ie.z.string().min(1).optional(),displayText:Ie.z.string().min(1).optional(),value:Ie.z.any().optional(),channelData:Ie.z.unknown().optional(),imageAltText:Ie.z.string().min(1).optional()})});var Yh=u(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.suggestedActionsZodSchema=void 0;var cn=z(),oC=Jh();ln.suggestedActionsZodSchema=cn.z.object({to:cn.z.array(cn.z.string().min(1)),actions:cn.z.array(oC.cardActionZodSchema)})});var au=u(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.activityEventNamesZodSchema=Vt.ActivityEventNames=void 0;var aC=z(),Kh;(function(r){r.ContinueConversation="ContinueConversation",r.CreateConversation="CreateConversation"})(Kh||(Vt.ActivityEventNames=Kh={}));Vt.activityEventNamesZodSchema=aC.z.enum(["ContinueConversation","CreateConversation"])});var uu=u(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.activityImportanceZodSchema=zt.ActivityImportance=void 0;var uC=z(),Gh;(function(r){r.Low="low",r.Normal="normal",r.High="high"})(Gh||(zt.ActivityImportance=Gh={}));zt.activityImportanceZodSchema=uC.z.enum(["low","normal","high"])});var cu=u(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.activityTypesZodSchema=Wt.ActivityTypes=void 0;var cC=z(),Xh;(function(r){r.Message="message",r.ContactRelationUpdate="contactRelationUpdate",r.ConversationUpdate="conversationUpdate",r.Typing="typing",r.EndOfConversation="endOfConversation",r.Event="event",r.Invoke="invoke",r.InvokeResponse="invokeResponse",r.DeleteUserData="deleteUserData",r.MessageUpdate="messageUpdate",r.MessageDelete="messageDelete",r.InstallationUpdate="installationUpdate",r.MessageReaction="messageReaction",r.Suggestion="suggestion",r.Trace="trace",r.Handoff="handoff",r.Command="command",r.CommandResult="commandResult",r.Delay="delay"})(Xh||(Wt.ActivityTypes=Xh={}));Wt.activityTypesZodSchema=cC.z.enum(["message","contactRelationUpdate","conversationUpdate","typing","endOfConversation","event","invoke","invokeResponse","deleteUserData","messageUpdate","messageDelete","installationUpdate","messageReaction","suggestion","trace","handoff","command","commandResult","delay"])});var Qh=u(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.attachmentZodSchema=void 0;var Bt=z();fn.attachmentZodSchema=Bt.z.object({contentType:Bt.z.string().min(1),contentUrl:Bt.z.string().min(1).optional(),content:Bt.z.unknown().optional(),name:Bt.z.string().min(1).optional(),thumbnailUrl:Bt.z.string().min(1).optional()})});var lu=u(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.channelAccountZodSchema=void 0;var yt=z(),lC=en();hn.channelAccountZodSchema=yt.z.object({id:yt.z.string().min(1).optional(),name:yt.z.string().optional(),aadObjectId:yt.z.string().min(1).optional(),role:yt.z.union([lC.roleTypeZodSchema,yt.z.string().min(1)]).optional(),properties:yt.z.unknown().optional()})});var fu=u(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.conversationAccountZodSchema=void 0;var Ae=z(),fC=en();pn.conversationAccountZodSchema=Ae.z.object({isGroup:Ae.z.boolean().optional(),conversationType:Ae.z.string().min(1).optional(),tenantId:Ae.z.string().min(1).optional(),id:Ae.z.string().min(1),name:Ae.z.string().min(1).optional(),aadObjectId:Ae.z.string().min(1).optional(),role:Ae.z.union([fC.roleTypeZodSchema,Ae.z.string().min(1)]).optional(),properties:Ae.z.unknown().optional()})});var tp=u(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.conversationReferenceZodSchema=void 0;var Jr=z(),ep=lu(),hC=fu();dn.conversationReferenceZodSchema=Jr.z.object({activityId:Jr.z.string().min(1).optional(),user:ep.channelAccountZodSchema.optional(),locale:Jr.z.string().min(1).optional(),agent:ep.channelAccountZodSchema.optional().nullable(),conversation:hC.conversationAccountZodSchema,channelId:Jr.z.string().min(1),serviceUrl:Jr.z.string().min(1).optional()})});var hu=u($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.deliveryModesZodSchema=$t.DeliveryModes=void 0;var pC=z(),rp;(function(r){r.Normal="normal",r.Notification="notification",r.ExpectReplies="expectReplies",r.Ephemeral="ephemeral"})(rp||($t.DeliveryModes=rp={}));$t.deliveryModesZodSchema=pC.z.enum(["normal","notification","expectReplies","ephemeral"])});var pu=u(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.inputHintsZodSchema=Ht.InputHints=void 0;var dC=z(),ip;(function(r){r.AcceptingInput="acceptingInput",r.IgnoringInput="ignoringInput",r.ExpectingInput="expectingInput"})(ip||(Ht.InputHints=ip={}));Ht.inputHintsZodSchema=dC.z.enum(["acceptingInput","ignoringInput","expectingInput"])});var du=u(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.messageReactionTypesZodSchema=Jt.MessageReactionTypes=void 0;var vC=z(),np;(function(r){r.Like="like",r.PlusOne="plusOne"})(np||(Jt.MessageReactionTypes=np={}));Jt.messageReactionTypesZodSchema=vC.z.enum(["like","plusOne"])});var sp=u(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.messageReactionZodSchema=void 0;var vu=z(),bC=du();vn.messageReactionZodSchema=vu.z.object({type:vu.z.union([bC.messageReactionTypesZodSchema,vu.z.string().min(1)])})});var bu=u(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.textFormatTypesZodSchema=Yt.TextFormatTypes=void 0;var mC=z(),op;(function(r){r.Markdown="markdown",r.Plain="plain",r.Xml="xml"})(op||(Yt.TextFormatTypes=op={}));Yt.textFormatTypesZodSchema=mC.z.enum(["markdown","plain","xml"])});var ap=u(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.textHighlightZodSchema=void 0;var mu=z();bn.textHighlightZodSchema=mu.z.object({text:mu.z.string().min(1),occurrence:mu.z.number()})});var fp=u(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.Activity=_t.activityZodSchema=void 0;var yC=Bh(),I=z(),_C=Hh(),gC=Yh(),lp=au(),wC=uu(),yn=cu(),SC=Qh(),OC=Pa(),mn=lu(),up=Na(),xC=fu(),qC=tp(),TC=Fa(),CC=hu(),IC=ou(),AC=pu(),cp=sp(),EC=bu(),jC=ap();_t.activityZodSchema=I.z.object({type:I.z.union([yn.activityTypesZodSchema,I.z.string().min(1)]),text:I.z.string().optional(),id:I.z.string().min(1).optional(),channelId:I.z.string().min(1).optional(),from:mn.channelAccountZodSchema.optional(),timestamp:I.z.union([I.z.date(),I.z.string().min(1).datetime().optional(),I.z.string().min(1).transform(r=>new Date(r)).optional()]),localTimestamp:I.z.string().min(1).transform(r=>new Date(r)).optional().or(I.z.date()).optional(),localTimezone:I.z.string().min(1).optional(),callerId:I.z.string().min(1).optional(),serviceUrl:I.z.string().min(1).optional(),conversation:xC.conversationAccountZodSchema.optional(),recipient:mn.channelAccountZodSchema.optional(),textFormat:I.z.union([EC.textFormatTypesZodSchema,I.z.string().min(1)]).optional(),attachmentLayout:I.z.union([OC.attachmentLayoutTypesZodSchema,I.z.string().min(1)]).optional(),membersAdded:I.z.array(mn.channelAccountZodSchema).optional(),membersRemoved:I.z.array(mn.channelAccountZodSchema).optional(),reactionsAdded:I.z.array(cp.messageReactionZodSchema).optional(),reactionsRemoved:I.z.array(cp.messageReactionZodSchema).optional(),topicName:I.z.string().min(1).optional(),historyDisclosed:I.z.boolean().optional(),locale:I.z.string().min(1).optional(),speak:I.z.string().min(1).optional(),inputHint:I.z.union([AC.inputHintsZodSchema,I.z.string().min(1)]).optional(),summary:I.z.string().min(1).optional(),suggestedActions:gC.suggestedActionsZodSchema.optional(),attachments:I.z.array(SC.attachmentZodSchema).optional(),entities:I.z.array(IC.entityZodSchema.passthrough()).optional(),channelData:I.z.any().optional(),action:I.z.string().min(1).optional(),replyToId:I.z.string().min(1).optional(),label:I.z.string().min(1).optional(),valueType:I.z.string().min(1).optional(),value:I.z.unknown().optional(),name:I.z.union([lp.activityEventNamesZodSchema,I.z.string().min(1)]).optional(),relatesTo:qC.conversationReferenceZodSchema.optional(),code:I.z.union([TC.endOfConversationCodesZodSchema,I.z.string().min(1)]).optional(),expiration:I.z.string().min(1).datetime().optional(),importance:I.z.union([wC.activityImportanceZodSchema,I.z.string().min(1)]).optional(),deliveryMode:I.z.union([CC.deliveryModesZodSchema,I.z.string().min(1)]).optional(),listenFor:I.z.array(I.z.string().min(1)).optional(),textHighlights:I.z.array(jC.textHighlightZodSchema).optional(),semanticAction:_C.semanticActionZodSchema.optional()});var yu=class r{constructor(e){if(e===void 0)throw new Error("Invalid ActivityType: undefined");if(e===null)throw new Error("Invalid ActivityType: null");if(typeof e=="string"&&e.length===0)throw new Error("Invalid ActivityType: empty string");this.type=e}static fromJson(e){return this.fromObject(JSON.parse(e))}static fromObject(e){let t=_t.activityZodSchema.passthrough().parse(e),i=new r(t.type);return Object.assign(i,t),i}static getContinuationActivity(e){let t={type:yn.ActivityTypes.Event,name:lp.ActivityEventNames.ContinueConversation,id:(0,yC.v4)(),channelId:e.channelId,locale:e.locale,serviceUrl:e.serviceUrl,conversation:e.conversation,recipient:e.agent,from:e.user,relatesTo:e};return r.fromObject(t)}getAppropriateReplyToId(){if(this.type!==yn.ActivityTypes.ConversationUpdate||this.channelId!==up.Channels.Directline&&this.channelId!==up.Channels.Webchat)return this.id}getConversationReference(){if(this.recipient===null||this.recipient===void 0)throw new Error("Activity Recipient undefined");if(this.conversation===null||this.conversation===void 0)throw new Error("Activity Conversation undefined");if(this.channelId===null||this.channelId===void 0)throw new Error("Activity ChannelId undefined");if(this.serviceUrl===null||this.serviceUrl===void 0)throw new Error("Activity ServiceUrl undefined");return{activityId:this.getAppropriateReplyToId(),user:this.from,agent:this.recipient,conversation:this.conversation,channelId:this.channelId,locale:this.locale,serviceUrl:this.serviceUrl}}applyConversationReference(e,t=!1){var i,n,s;return this.channelId=e.channelId,(i=this.locale)!==null&&i!==void 0||(this.locale=e.locale),this.serviceUrl=e.serviceUrl,this.conversation=e.conversation,t?(this.from=e.user,this.recipient=(n=e.agent)!==null&&n!==void 0?n:void 0,e.activityId&&(this.id=e.activityId)):(this.from=(s=e.agent)!==null&&s!==void 0?s:void 0,this.recipient=e.user,e.activityId&&(this.replyToId=e.activityId)),this}clone(){let e=JSON.parse(JSON.stringify(this));for(let t in e)typeof e[t]=="string"&&!isNaN(Date.parse(e[t]))&&(e[t]=new Date(e[t]));return Object.setPrototypeOf(e,r.prototype),e}getMentions(e){let t=[];if(e.entities!==void 0)for(let i=0;i<e.entities.length;i++)e.entities[i].type.toLowerCase()==="mention"&&t.push(e.entities[i]);return t}normalizeMentions(e=!1){var t,i;if(this.type===yn.ActivityTypes.Message&&(e&&(this.removeRecipientMention(),this.entities!==void 0&&(!((t=this.recipient)===null||t===void 0)&&t.id)&&(this.entities=this.entities.filter(n=>{var s;return n.type.toLowerCase()==="mention"?n.mentioned.id!==((s=this.recipient)===null||s===void 0?void 0:s.id):!0}))),this.text&&(this.text=r.removeAt(this.text)),this.entities!==void 0)){let n=this.getMentions(this);for(let s of n)s.text&&(s.text=(i=r.removeAt(s.text))===null||i===void 0?void 0:i.trim())}}static removeAt(e){if(!e)return e;let t;do{t=!1;let i=e.toLowerCase().indexOf("<at");if(i>=0){let n=e.indexOf(">",i);if(n>0){let s=e.toLowerCase().indexOf("</at>",n);if(s>0){let o=e.substring(s+5);o.length>0&&!/\s/.test(o[0])&&(o=` ${o}`),e=e.substring(0,s)+o;let a=e.substring(n+1,s),c=e.substring(0,i);c.length>0&&!/\s$/.test(c)&&(c+=" "),e=c+a+o,t=!0}}}}while(t);return e}removeMentionText(e){let i=this.getMentions(this).filter(n=>n.mentioned.id===e);return i.length>0&&this.text&&(this.text=this.text.replace(i[0].text,"").trim()),this.text||""}removeRecipientMention(){return this.recipient!=null&&this.recipient.id?this.removeMentionText(this.recipient.id):""}getReplyConversationReference(e){let t=this.getConversationReference();return t.activityId=e,t}toJsonString(){return JSON.stringify(this)}};_t.Activity=yu});var hp=u(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.CallerIdConstants=void 0;_n.CallerIdConstants={PublicAzureChannel:"urn:botframework:azure",USGovChannel:"urn:botframework:azureusgov",AgentPrefix:"urn:botframework:aadappid:"}});var pp=u(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.activityTreatments=Kt.ActivityTreatments=void 0;var kC=z(),_u;(function(r){r.Targeted="targeted"})(_u||(Kt.ActivityTreatments=_u={}));Kt.activityTreatments=kC.z.nativeEnum(_u)});var bp=u(R=>{"use strict";var RC=R&&R.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),dp=R&&R.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&RC(e,r,t)};Object.defineProperty(R,"__esModule",{value:!0});R.ActivityTreatments=R.TextFormatTypes=R.MessageReactionTypes=R.InputHints=R.DeliveryModes=R.CallerIdConstants=R.ActivityTypes=R.ActivityImportance=R.ActivityEventNames=R.activityZodSchema=R.Activity=R.RoleTypes=R.EndOfConversationCodes=R.Channels=R.AttachmentLayoutTypes=R.SemanticActionStateTypes=R.ActionTypes=void 0;var PC=ka();Object.defineProperty(R,"ActionTypes",{enumerable:!0,get:function(){return PC.ActionTypes}});var NC=Ra();Object.defineProperty(R,"SemanticActionStateTypes",{enumerable:!0,get:function(){return NC.SemanticActionStateTypes}});var FC=Pa();Object.defineProperty(R,"AttachmentLayoutTypes",{enumerable:!0,get:function(){return FC.AttachmentLayoutTypes}});var MC=Na();Object.defineProperty(R,"Channels",{enumerable:!0,get:function(){return MC.Channels}});var UC=Fa();Object.defineProperty(R,"EndOfConversationCodes",{enumerable:!0,get:function(){return UC.EndOfConversationCodes}});var ZC=en();Object.defineProperty(R,"RoleTypes",{enumerable:!0,get:function(){return ZC.RoleTypes}});dp(mh(),R);dp(yh(),R);var vp=fp();Object.defineProperty(R,"Activity",{enumerable:!0,get:function(){return vp.Activity}});Object.defineProperty(R,"activityZodSchema",{enumerable:!0,get:function(){return vp.activityZodSchema}});var LC=au();Object.defineProperty(R,"ActivityEventNames",{enumerable:!0,get:function(){return LC.ActivityEventNames}});var DC=uu();Object.defineProperty(R,"ActivityImportance",{enumerable:!0,get:function(){return DC.ActivityImportance}});var VC=cu();Object.defineProperty(R,"ActivityTypes",{enumerable:!0,get:function(){return VC.ActivityTypes}});var zC=hp();Object.defineProperty(R,"CallerIdConstants",{enumerable:!0,get:function(){return zC.CallerIdConstants}});var WC=hu();Object.defineProperty(R,"DeliveryModes",{enumerable:!0,get:function(){return WC.DeliveryModes}});var BC=pu();Object.defineProperty(R,"InputHints",{enumerable:!0,get:function(){return BC.InputHints}});var $C=du();Object.defineProperty(R,"MessageReactionTypes",{enumerable:!0,get:function(){return $C.MessageReactionTypes}});var HC=bu();Object.defineProperty(R,"TextFormatTypes",{enumerable:!0,get:function(){return HC.TextFormatTypes}});var JC=pp();Object.defineProperty(R,"ActivityTreatments",{enumerable:!0,get:function(){return JC.ActivityTreatments}})});var yp=u((nG,mp)=>{var Gt=1e3,Xt=Gt*60,Qt=Xt*60,gt=Qt*24,YC=gt*7,KC=gt*365.25;mp.exports=function(r,e){e=e||{};var t=typeof r;if(t==="string"&&r.length>0)return GC(r);if(t==="number"&&isFinite(r))return e.long?QC(r):XC(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function GC(r){if(r=String(r),!(r.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(e){var t=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return t*KC;case"weeks":case"week":case"w":return t*YC;case"days":case"day":case"d":return t*gt;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Qt;case"minutes":case"minute":case"mins":case"min":case"m":return t*Xt;case"seconds":case"second":case"secs":case"sec":case"s":return t*Gt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function XC(r){var e=Math.abs(r);return e>=gt?Math.round(r/gt)+"d":e>=Qt?Math.round(r/Qt)+"h":e>=Xt?Math.round(r/Xt)+"m":e>=Gt?Math.round(r/Gt)+"s":r+"ms"}function QC(r){var e=Math.abs(r);return e>=gt?wn(r,e,gt,"day"):e>=Qt?wn(r,e,Qt,"hour"):e>=Xt?wn(r,e,Xt,"minute"):e>=Gt?wn(r,e,Gt,"second"):r+" ms"}function wn(r,e,t,i){var n=e>=t*1.5;return Math.round(r/t)+" "+i+(n?"s":"")}});var gp=u((sG,_p)=>{function eI(r){t.debug=t,t.default=t,t.coerce=c,t.disable=o,t.enable=n,t.enabled=a,t.humanize=yp(),t.destroy=l,Object.keys(r).forEach(f=>{t[f]=r[f]}),t.names=[],t.skips=[],t.formatters={};function e(f){let p=0;for(let y=0;y<f.length;y++)p=(p<<5)-p+f.charCodeAt(y),p|=0;return t.colors[Math.abs(p)%t.colors.length]}t.selectColor=e;function t(f){let p,y=null,g,m;function O(...S){if(!O.enabled)return;let q=O,F=Number(new Date),U=F-(p||F);q.diff=U,q.prev=p,q.curr=F,p=F,S[0]=t.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let D=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(de,Ee)=>{if(de==="%%")return"%";D++;let Ge=t.formatters[Ee];if(typeof Ge=="function"){let Oi=S[D];de=Ge.call(q,Oi),S.splice(D,1),D--}return de}),t.formatArgs.call(q,S),(q.log||t.log).apply(q,S)}return O.namespace=f,O.useColors=t.useColors(),O.color=t.selectColor(f),O.extend=i,O.destroy=t.destroy,Object.defineProperty(O,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(g!==t.namespaces&&(g=t.namespaces,m=t.enabled(f)),m),set:S=>{y=S}}),typeof t.init=="function"&&t.init(O),O}function i(f,p){let y=t(this.namespace+(typeof p=="undefined"?":":p)+f);return y.log=this.log,y}function n(f){t.save(f),t.namespaces=f,t.names=[],t.skips=[];let p=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let y of p)y[0]==="-"?t.skips.push(y.slice(1)):t.names.push(y)}function s(f,p){let y=0,g=0,m=-1,O=0;for(;y<f.length;)if(g<p.length&&(p[g]===f[y]||p[g]==="*"))p[g]==="*"?(m=g,O=y,g++):(y++,g++);else if(m!==-1)g=m+1,O++,y=O;else return!1;for(;g<p.length&&p[g]==="*";)g++;return g===p.length}function o(){let f=[...t.names,...t.skips.map(p=>"-"+p)].join(",");return t.enable(""),f}function a(f){for(let p of t.skips)if(s(f,p))return!1;for(let p of t.names)if(s(f,p))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}_p.exports=eI});var wp=u((le,Sn)=>{le.formatArgs=rI;le.save=iI;le.load=nI;le.useColors=tI;le.storage=sI();le.destroy=(()=>{let r=!1;return()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();le.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function tI(){if(typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let r;return typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&(r=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(r[1],10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function rI(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+Sn.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;r.splice(1,0,e,"color: inherit");let t=0,i=0;r[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(t++,n==="%c"&&(i=t))}),r.splice(i,0,e)}le.log=console.debug||console.log||(()=>{});function iI(r){try{r?le.storage.setItem("debug",r):le.storage.removeItem("debug")}catch{}}function nI(){let r;try{r=le.storage.getItem("debug")||le.storage.getItem("DEBUG")}catch{}return!r&&typeof process!="undefined"&&"env"in process&&(r=process.env.DEBUG),r}function sI(){try{return localStorage}catch{}}Sn.exports=gp()(le);var{formatters:oI}=Sn.exports;oI.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var se=u(Cp=>{"use strict";var fI=typeof window!="undefined"&&window,hI=typeof self!="undefined"&&typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&self,pI=typeof global!="undefined"&&global,Tp=fI||pI||hI;Cp.root=Tp;(function(){if(!Tp)throw new Error("RxJS could not find any global context (window, self, global)")})()});var Kr=u(Ip=>{"use strict";function dI(r){return typeof r=="function"}Ip.isFunction=dI});var Oe=u(Ap=>{"use strict";Ap.isArray=Array.isArray||function(r){return r&&typeof r.length=="number"}});var xu=u(Ep=>{"use strict";function vI(r){return r!=null&&typeof r=="object"}Ep.isObject=vI});var Y=u(jp=>{"use strict";jp.errorObject={e:{}}});var Q=u(Pp=>{"use strict";var kp=Y(),Rp;function bI(){try{return Rp.apply(this,arguments)}catch(r){return kp.errorObject.e=r,kp.errorObject}}function mI(r){return Rp=r,bI}Pp.tryCatch=mI});var qu=u(xn=>{"use strict";var yI=xn&&xn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},_I=function(r){yI(e,r);function e(t){r.call(this),this.errors=t;var i=Error.call(this,t?t.length+` errors occurred during unsubscription:
|
|
2
2
|
`+t.map(function(n,s){return s+1+") "+n.toString()}).join(`
|
|
3
|
-
`):"");this.name=i.name="UnsubscriptionError",this.stack=i.stack,this.message=i.message}return e}(Error);On.UnsubscriptionError=OI});var J=u(Fp=>{"use strict";var xI=Oe(),qI=xu(),TI=Kr(),Pp=Q(),tr=Y(),xn=qu(),CI=function(){function r(e){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}return r.prototype.unsubscribe=function(){var e=!1,t;if(!this.closed){var i=this,n=i._parent,s=i._parents,o=i._unsubscribe,a=i._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var c=-1,l=s?s.length:0;n;)n.remove(this),n=++c<l&&s[c]||null;if(TI.isFunction(o)){var f=Pp.tryCatch(o).call(this);f===tr.errorObject&&(e=!0,t=t||(tr.errorObject.e instanceof xn.UnsubscriptionError?Np(tr.errorObject.e.errors):[tr.errorObject.e]))}if(xI.isArray(a))for(c=-1,l=a.length;++c<l;){var p=a[c];if(qI.isObject(p)){var f=Pp.tryCatch(p.unsubscribe).call(p);if(f===tr.errorObject){e=!0,t=t||[];var y=tr.errorObject.e;y instanceof xn.UnsubscriptionError?t=t.concat(Np(y.errors)):t.push(y)}}}if(e)throw new xn.UnsubscriptionError(t)}},r.prototype.add=function(e){if(!e||e===r.EMPTY)return r.EMPTY;if(e===this)return this;var t=e;switch(typeof e){case"function":t=new r(e);case"object":if(t.closed||typeof t.unsubscribe!="function")return t;if(this.closed)return t.unsubscribe(),t;if(typeof t._addParent!="function"){var i=t;t=new r,t._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var n=this._subscriptions||(this._subscriptions=[]);return n.push(t),t._addParent(this),t},r.prototype.remove=function(e){var t=this._subscriptions;if(t){var i=t.indexOf(e);i!==-1&&t.splice(i,1)}},r.prototype._addParent=function(e){var t=this,i=t._parent,n=t._parents;!i||i===e?this._parent=e:n?n.indexOf(e)===-1&&n.push(e):this._parents=[e]},r.EMPTY=function(e){return e.closed=!0,e}(new r),r}();Fp.Subscription=CI;function Np(r){return r.reduce(function(e,t){return e.concat(t instanceof xn.UnsubscriptionError?t.errors:t)},[])}});var Tu=u(Mp=>{"use strict";Mp.empty={closed:!0,next:function(r){},error:function(r){throw r},complete:function(){}}});var Gr=u(qn=>{"use strict";var II=se(),Cu=II.root.Symbol;qn.rxSubscriber=typeof Cu=="function"&&typeof Cu.for=="function"?Cu.for("rxSubscriber"):"@@rxSubscriber";qn.$$rxSubscriber=qn.rxSubscriber});var C=u(Tn=>{"use strict";var Lp=Tn&&Tn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Up=Kr(),AI=J(),Iu=Tu(),Au=Gr(),ju=function(r){Lp(e,r);function e(t,i,n){switch(r.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Iu.empty;break;case 1:if(!t){this.destination=Iu.empty;break}if(typeof t=="object"){if(jI(t)){var s=t[Au.rxSubscriber]();this.syncErrorThrowable=s.syncErrorThrowable,this.destination=s,s.add(this)}else this.syncErrorThrowable=!0,this.destination=new Zp(this,t);break}default:this.syncErrorThrowable=!0,this.destination=new Zp(this,t,i,n);break}}return e.prototype[Au.rxSubscriber]=function(){return this},e.create=function(t,i,n){var s=new e(t,i,n);return s.syncErrorThrowable=!1,s},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this,i=t._parent,n=t._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=i,this._parents=n,this},e}(AI.Subscription);Tn.Subscriber=ju;var Zp=function(r){Lp(e,r);function e(t,i,n,s){r.call(this),this._parentSubscriber=t;var o,a=this;Up.isFunction(i)?o=i:i&&(o=i.next,n=i.error,s=i.complete,i!==Iu.empty&&(a=Object.create(i),Up.isFunction(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this))),this._context=a,this._next=o,this._error=n,this._complete=s}return e.prototype.next=function(t){if(!this.isStopped&&this._next){var i=this._parentSubscriber;i.syncErrorThrowable?this.__tryOrSetError(i,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var i=this._parentSubscriber;if(this._error)i.syncErrorThrowable?(this.__tryOrSetError(i,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(i.syncErrorThrowable)i.syncErrorValue=t,i.syncErrorThrown=!0,this.unsubscribe();else throw this.unsubscribe(),t}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var i=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};i.syncErrorThrowable?(this.__tryOrSetError(i,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,i){try{t.call(this._context,i)}catch(n){throw this.unsubscribe(),n}},e.prototype.__tryOrSetError=function(t,i,n){try{i.call(this._context,n)}catch(s){return t.syncErrorValue=s,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(ju);function jI(r){return r instanceof ju||"syncErrorThrowable"in r&&r[Au.rxSubscriber]}});var zp=u(Dp=>{"use strict";var Eu=C(),Vp=Gr(),EI=Tu();function kI(r,e,t){if(r){if(r instanceof Eu.Subscriber)return r;if(r[Vp.rxSubscriber])return r[Vp.rxSubscriber]()}return!r&&!e&&!t?new Eu.Subscriber(EI.empty):new Eu.Subscriber(r,e,t)}Dp.toSubscriber=kI});var Qr=u(Xr=>{"use strict";var RI=se();function Wp(r){var e,t=r.Symbol;return typeof t=="function"?t.observable?e=t.observable:(e=t("observable"),t.observable=e):e="@@observable",e}Xr.getSymbolObservable=Wp;Xr.observable=Wp(RI.root);Xr.$$observable=Xr.observable});var Cn=u(Bp=>{"use strict";function PI(){}Bp.noop=PI});var In=u(ku=>{"use strict";var NI=Cn();function FI(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return $p(r)}ku.pipe=FI;function $p(r){return r?r.length===1?r[0]:function(t){return r.reduce(function(i,n){return n(i)},t)}:NI.noop}ku.pipeFromArray=$p});var v=u(Hp=>{"use strict";var ye=se(),MI=zp(),UI=Qr(),ZI=In(),LI=function(){function r(e){this._isScalar=!1,e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,i){var n=this.operator,s=MI.toSubscriber(e,t,i);if(n?n.call(s,this.source):s.add(this.source||!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.syncErrorThrown=!0,e.syncErrorValue=t,e.error(t)}},r.prototype.forEach=function(e,t){var i=this;if(t||(ye.root.Rx&&ye.root.Rx.config&&ye.root.Rx.config.Promise?t=ye.root.Rx.config.Promise:ye.root.Promise&&(t=ye.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(n,s){var o;o=i.subscribe(function(a){if(o)try{e(a)}catch(c){s(c),o.unsubscribe()}else e(a)},s,n)})},r.prototype._subscribe=function(e){return this.source.subscribe(e)},r.prototype[UI.observable]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return e.length===0?this:ZI.pipeFromArray(e)(this)},r.prototype.toPromise=function(e){var t=this;if(e||(ye.root.Rx&&ye.root.Rx.config&&ye.root.Rx.config.Promise?e=ye.root.Rx.config.Promise:ye.root.Promise&&(e=ye.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(i,n){var s;t.subscribe(function(o){return s=o},function(o){return n(o)},function(){return i(s)})})},r.create=function(e){return new r(e)},r}();Hp.Observable=LI});var ei=u(An=>{"use strict";var VI=An&&An.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},DI=function(r){VI(e,r);function e(){var t=r.call(this,"object unsubscribed");this.name=t.name="ObjectUnsubscribedError",this.stack=t.stack,this.message=t.message}return e}(Error);An.ObjectUnsubscribedError=DI});var Ru=u(jn=>{"use strict";var zI=jn&&jn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},WI=J(),BI=function(r){zI(e,r);function e(t,i){r.call(this),this.subject=t,this.subscriber=i,this.closed=!1}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,i=t.observers;if(this.subject=null,!(!i||i.length===0||t.isStopped||t.closed)){var n=i.indexOf(this.subscriber);n!==-1&&i.splice(n,1)}}},e}(WI.Subscription);jn.SubjectSubscription=BI});var K=u(rr=>{"use strict";var Fu=rr&&rr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Jp=v(),$I=C(),Pu=J(),ti=ei(),HI=Ru(),JI=Gr(),Yp=function(r){Fu(e,r);function e(t){r.call(this,t),this.destination=t}return e}($I.Subscriber);rr.SubjectSubscriber=Yp;var Kp=function(r){Fu(e,r);function e(){r.call(this),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}return e.prototype[JI.rxSubscriber]=function(){return new Yp(this)},e.prototype.lift=function(t){var i=new Nu(this,this);return i.operator=t,i},e.prototype.next=function(t){if(this.closed)throw new ti.ObjectUnsubscribedError;if(!this.isStopped)for(var i=this.observers,n=i.length,s=i.slice(),o=0;o<n;o++)s[o].next(t)},e.prototype.error=function(t){if(this.closed)throw new ti.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var i=this.observers,n=i.length,s=i.slice(),o=0;o<n;o++)s[o].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new ti.ObjectUnsubscribedError;this.isStopped=!0;for(var t=this.observers,i=t.length,n=t.slice(),s=0;s<i;s++)n[s].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(t){if(this.closed)throw new ti.ObjectUnsubscribedError;return r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){if(this.closed)throw new ti.ObjectUnsubscribedError;return this.hasError?(t.error(this.thrownError),Pu.Subscription.EMPTY):this.isStopped?(t.complete(),Pu.Subscription.EMPTY):(this.observers.push(t),new HI.SubjectSubscription(this,t))},e.prototype.asObservable=function(){var t=new Jp.Observable;return t.source=this,t},e.create=function(t,i){return new Nu(t,i)},e}(Jp.Observable);rr.Subject=Kp;var Nu=function(r){Fu(e,r);function e(t,i){r.call(this),this.destination=t,this.source=i}return e.prototype.next=function(t){var i=this.destination;i&&i.next&&i.next(t)},e.prototype.error=function(t){var i=this.destination;i&&i.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){var i=this.source;return i?this.source.subscribe(t):Pu.Subscription.EMPTY},e}(Kp);rr.AnonymousSubject=Nu});var ri=u(En=>{"use strict";var YI=En&&En.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},KI=K(),Gp=J(),GI=function(r){YI(e,r);function e(){r.apply(this,arguments),this.value=null,this.hasNext=!1,this.hasCompleted=!1}return e.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),Gp.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),Gp.Subscription.EMPTY):r.prototype._subscribe.call(this,t)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(t){this.hasCompleted||r.prototype.error.call(this,t)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&r.prototype.next.call(this,this.value),r.prototype.complete.call(this)},e}(KI.Subject);En.AsyncSubject=GI});var ed=u(Rn=>{"use strict";var XI=Rn&&Rn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},QI=v(),kn=Q(),He=Y(),Xp=ri(),eA=function(r){XI(e,r);function e(t,i,n,s,o){r.call(this),this.callbackFunc=t,this.selector=i,this.args=n,this.context=s,this.scheduler=o}return e.create=function(t,i,n){return i===void 0&&(i=void 0),function(){for(var s=[],o=0;o<arguments.length;o++)s[o-0]=arguments[o];return new e(t,i,s,this,n)}},e.prototype._subscribe=function(t){var i=this.callbackFunc,n=this.args,s=this.scheduler,o=this.subject;if(s)return s.schedule(e.dispatch,0,{source:this,subscriber:t,context:this.context});if(!o){o=this.subject=new Xp.AsyncSubject;var a=function l(){for(var f=[],p=0;p<arguments.length;p++)f[p-0]=arguments[p];var y=l.source,g=y.selector,m=y.subject;if(g){var O=kn.tryCatch(g).apply(this,f);O===He.errorObject?m.error(He.errorObject.e):(m.next(O),m.complete())}else m.next(f.length<=1?f[0]:f),m.complete()};a.source=this;var c=kn.tryCatch(i).apply(this.context,n.concat(a));c===He.errorObject&&o.error(He.errorObject.e)}return o.subscribe(t)},e.dispatch=function(t){var i=this,n=t.source,s=t.subscriber,o=t.context,a=n.callbackFunc,c=n.args,l=n.scheduler,f=n.subject;if(!f){f=n.subject=new Xp.AsyncSubject;var p=function g(){for(var m=[],O=0;O<arguments.length;O++)m[O-0]=arguments[O];var S=g.source,q=S.selector,F=S.subject;if(q){var U=kn.tryCatch(q).apply(this,m);U===He.errorObject?i.add(l.schedule(tA,0,{err:He.errorObject.e,subject:F})):i.add(l.schedule(Qp,0,{value:U,subject:F}))}else{var V=m.length<=1?m[0]:m;i.add(l.schedule(Qp,0,{value:V,subject:F}))}};p.source=n;var y=kn.tryCatch(a).apply(o,c.concat(p));y===He.errorObject&&f.error(He.errorObject.e)}i.add(f.subscribe(s))},e}(QI.Observable);Rn.BoundCallbackObservable=eA;function Qp(r){var e=r.value,t=r.subject;t.next(e),t.complete()}function tA(r){var e=r.err,t=r.subject;t.error(e)}});var rd=u(td=>{"use strict";var rA=ed();td.bindCallback=rA.BoundCallbackObservable.create});var id=u(()=>{"use strict";var iA=v(),nA=rd();iA.Observable.bindCallback=nA.bindCallback});var od=u(Nn=>{"use strict";var sA=Nn&&Nn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},oA=v(),Pn=Q(),Je=Y(),sd=ri(),aA=function(r){sA(e,r);function e(t,i,n,s,o){r.call(this),this.callbackFunc=t,this.selector=i,this.args=n,this.context=s,this.scheduler=o}return e.create=function(t,i,n){return i===void 0&&(i=void 0),function(){for(var s=[],o=0;o<arguments.length;o++)s[o-0]=arguments[o];return new e(t,i,s,this,n)}},e.prototype._subscribe=function(t){var i=this.callbackFunc,n=this.args,s=this.scheduler,o=this.subject;if(s)return s.schedule(uA,0,{source:this,subscriber:t,context:this.context});if(!o){o=this.subject=new sd.AsyncSubject;var a=function l(){for(var f=[],p=0;p<arguments.length;p++)f[p-0]=arguments[p];var y=l.source,g=y.selector,m=y.subject,O=f.shift();if(O)m.error(O);else if(g){var S=Pn.tryCatch(g).apply(this,f);S===Je.errorObject?m.error(Je.errorObject.e):(m.next(S),m.complete())}else m.next(f.length<=1?f[0]:f),m.complete()};a.source=this;var c=Pn.tryCatch(i).apply(this.context,n.concat(a));c===Je.errorObject&&o.error(Je.errorObject.e)}return o.subscribe(t)},e}(oA.Observable);Nn.BoundNodeCallbackObservable=aA;function uA(r){var e=this,t=r.source,i=r.subscriber,n=r.context,s=t,o=s.callbackFunc,a=s.args,c=s.scheduler,l=t.subject;if(!l){l=t.subject=new sd.AsyncSubject;var f=function y(){for(var g=[],m=0;m<arguments.length;m++)g[m-0]=arguments[m];var O=y.source,S=O.selector,q=O.subject,F=g.shift();if(F)e.add(c.schedule(Mu,0,{err:F,subject:q}));else if(S){var U=Pn.tryCatch(S).apply(this,g);U===Je.errorObject?e.add(c.schedule(Mu,0,{err:Je.errorObject.e,subject:q})):e.add(c.schedule(nd,0,{value:U,subject:q}))}else{var V=g.length<=1?g[0]:g;e.add(c.schedule(nd,0,{value:V,subject:q}))}};f.source=t;var p=Pn.tryCatch(o).apply(n,a.concat(f));p===Je.errorObject&&e.add(c.schedule(Mu,0,{err:Je.errorObject.e,subject:l}))}e.add(l.subscribe(i))}function nd(r){var e=r.value,t=r.subject;t.next(e),t.complete()}function Mu(r){var e=r.err,t=r.subject;t.error(e)}});var ud=u(ad=>{"use strict";var cA=od();ad.bindNodeCallback=cA.BoundNodeCallbackObservable.create});var cd=u(()=>{"use strict";var lA=v(),fA=ud();lA.Observable.bindNodeCallback=fA.bindNodeCallback});var _e=u(ld=>{"use strict";function hA(r){return r&&typeof r.schedule=="function"}ld.isScheduler=hA});var Mn=u(Fn=>{"use strict";var pA=Fn&&Fn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},dA=v(),vA=function(r){pA(e,r);function e(t,i){r.call(this),this.value=t,this.scheduler=i,this._isScalar=!0,i&&(this._isScalar=!1)}return e.create=function(t,i){return new e(t,i)},e.dispatch=function(t){var i=t.done,n=t.value,s=t.subscriber;if(i){s.complete();return}s.next(n),!s.closed&&(t.done=!0,this.schedule(t))},e.prototype._subscribe=function(t){var i=this.value,n=this.scheduler;if(n)return n.schedule(e.dispatch,0,{done:!1,value:i,subscriber:t});t.next(i),t.closed||t.complete()},e}(dA.Observable);Fn.ScalarObservable=vA});var Me=u(Un=>{"use strict";var bA=Un&&Un.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},mA=v(),yA=function(r){bA(e,r);function e(t){r.call(this),this.scheduler=t}return e.create=function(t){return new e(t)},e.dispatch=function(t){var i=t.subscriber;i.complete()},e.prototype._subscribe=function(t){var i=this.scheduler;if(i)return i.schedule(e.dispatch,0,{subscriber:t});t.complete()},e}(mA.Observable);Un.EmptyObservable=yA});var Ue=u(Zn=>{"use strict";var _A=Zn&&Zn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},gA=v(),wA=Mn(),SA=Me(),OA=_e(),xA=function(r){_A(e,r);function e(t,i){r.call(this),this.array=t,this.scheduler=i,!i&&t.length===1&&(this._isScalar=!0,this.value=t[0])}return e.create=function(t,i){return new e(t,i)},e.of=function(){for(var t=[],i=0;i<arguments.length;i++)t[i-0]=arguments[i];var n=t[t.length-1];OA.isScheduler(n)?t.pop():n=null;var s=t.length;return s>1?new e(t,n):s===1?new wA.ScalarObservable(t[0],n):new SA.EmptyObservable(n)},e.dispatch=function(t){var i=t.array,n=t.index,s=t.count,o=t.subscriber;if(n>=s){o.complete();return}o.next(i[n]),!o.closed&&(t.index=n+1,this.schedule(t))},e.prototype._subscribe=function(t){var i=0,n=this.array,s=n.length,o=this.scheduler;if(o)return o.schedule(e.dispatch,0,{array:n,index:i,count:s,subscriber:t});for(var a=0;a<s&&!t.closed;a++)t.next(n[a]);t.complete()},e}(gA.Observable);Zn.ArrayObservable=xA});var P=u(Ln=>{"use strict";var qA=Ln&&Ln.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},TA=C(),CA=function(r){qA(e,r);function e(){r.apply(this,arguments)}return e.prototype.notifyNext=function(t,i,n,s,o){this.destination.next(i)},e.prototype.notifyError=function(t,i){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(TA.Subscriber);Ln.OuterSubscriber=CA});var Uu=u(fd=>{"use strict";fd.isArrayLike=function(r){return r&&typeof r.length=="number"}});var Zu=u(hd=>{"use strict";function IA(r){return r&&typeof r.subscribe!="function"&&typeof r.then=="function"}hd.isPromise=IA});var ir=u(ii=>{"use strict";var AA=se();function pd(r){var e=r.Symbol;if(typeof e=="function")return e.iterator||(e.iterator=e("iterator polyfill")),e.iterator;var t=r.Set;if(t&&typeof new t()["@@iterator"]=="function")return"@@iterator";var i=r.Map;if(i)for(var n=Object.getOwnPropertyNames(i.prototype),s=0;s<n.length;++s){var o=n[s];if(o!=="entries"&&o!=="size"&&i.prototype[o]===i.prototype.entries)return o}return"@@iterator"}ii.symbolIteratorPonyfill=pd;ii.iterator=pd(AA.root);ii.$$iterator=ii.iterator});var dd=u(Vn=>{"use strict";var jA=Vn&&Vn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},EA=C(),kA=function(r){jA(e,r);function e(t,i,n){r.call(this),this.parent=t,this.outerValue=i,this.outerIndex=n,this.index=0}return e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(EA.Subscriber);Vn.InnerSubscriber=kA});var N=u(yd=>{"use strict";var RA=se(),PA=Uu(),NA=Zu(),FA=xu(),MA=v(),vd=ir(),bd=dd(),md=Qr();function UA(r,e,t,i){var n=new bd.InnerSubscriber(r,t,i);if(n.closed)return null;if(e instanceof MA.Observable)return e._isScalar?(n.next(e.value),n.complete(),null):(n.syncErrorThrowable=!0,e.subscribe(n));if(PA.isArrayLike(e)){for(var s=0,o=e.length;s<o&&!n.closed;s++)n.next(e[s]);n.closed||n.complete()}else{if(NA.isPromise(e))return e.then(function(y){n.closed||(n.next(y),n.complete())},function(y){return n.error(y)}).then(null,function(y){RA.root.setTimeout(function(){throw y})}),n;if(e&&typeof e[vd.iterator]=="function"){var a=e[vd.iterator]();do{var c=a.next();if(c.done){n.complete();break}if(n.next(c.value),n.closed)break}while(!0)}else if(e&&typeof e[md.observable]=="function"){var l=e[md.observable]();if(typeof l.subscribe!="function")n.error(new TypeError("Provided object does not correctly implement Symbol.observable"));else return l.subscribe(new bd.InnerSubscriber(r,t,i))}else{var f=FA.isObject(e)?"an invalid object":"'"+e+"'",p="You provided "+f+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";n.error(new TypeError(p))}}return null}yd.subscribeToResult=UA});var ni=u(nr=>{"use strict";var ZA=nr&&nr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},LA=Ue(),VA=Oe(),DA=P(),zA=N(),_d={};function WA(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=null;return typeof r[r.length-1]=="function"&&(t=r.pop()),r.length===1&&VA.isArray(r[0])&&(r=r[0].slice()),function(i){return i.lift.call(new LA.ArrayObservable([i].concat(r)),new gd(t))}}nr.combineLatest=WA;var gd=function(){function r(e){this.project=e}return r.prototype.call=function(e,t){return t.subscribe(new wd(e,this.project))},r}();nr.CombineLatestOperator=gd;var wd=function(r){ZA(e,r);function e(t,i){r.call(this,t),this.project=i,this.active=0,this.values=[],this.observables=[]}return e.prototype._next=function(t){this.values.push(_d),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,i=t.length;if(i===0)this.destination.complete();else{this.active=i,this.toRespond=i;for(var n=0;n<i;n++){var s=t[n];this.add(zA.subscribeToResult(this,s,s,n))}}},e.prototype.notifyComplete=function(t){(this.active-=1)===0&&this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){var a=this.values,c=a[n],l=this.toRespond?c===_d?--this.toRespond:this.toRespond:0;a[n]=i,l===0&&(this.project?this._tryProject(a):this.destination.next(a.slice()))},e.prototype._tryProject=function(t){var i;try{i=this.project.apply(this,t)}catch(n){this.destination.error(n);return}this.destination.next(i)},e}(DA.OuterSubscriber);nr.CombineLatestSubscriber=wd});var Od=u(Sd=>{"use strict";var BA=_e(),$A=Oe(),HA=Ue(),JA=ni();function YA(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=null,i=null;return BA.isScheduler(r[r.length-1])&&(i=r.pop()),typeof r[r.length-1]=="function"&&(t=r.pop()),r.length===1&&$A.isArray(r[0])&&(r=r[0]),new HA.ArrayObservable(r,i).lift(new JA.CombineLatestOperator(t))}Sd.combineLatest=YA});var xd=u(()=>{"use strict";var KA=v(),GA=Od();KA.Observable.combineLatest=GA.combineLatest});var Lu=u(qd=>{"use strict";var XA=Ue();qd.of=XA.ArrayObservable.of});var Vu=u(Dn=>{"use strict";var QA=Dn&&Dn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Td=se(),ej=v(),tj=function(r){QA(e,r);function e(t,i){r.call(this),this.promise=t,this.scheduler=i}return e.create=function(t,i){return new e(t,i)},e.prototype._subscribe=function(t){var i=this,n=this.promise,s=this.scheduler;if(s==null)this._isScalar?t.closed||(t.next(this.value),t.complete()):n.then(function(o){i.value=o,i._isScalar=!0,t.closed||(t.next(o),t.complete())},function(o){t.closed||t.error(o)}).then(null,function(o){Td.root.setTimeout(function(){throw o})});else if(this._isScalar){if(!t.closed)return s.schedule(Cd,0,{value:this.value,subscriber:t})}else n.then(function(o){i.value=o,i._isScalar=!0,t.closed||t.add(s.schedule(Cd,0,{value:o,subscriber:t}))},function(o){t.closed||t.add(s.schedule(rj,0,{err:o,subscriber:t}))}).then(null,function(o){Td.root.setTimeout(function(){throw o})})},e}(ej.Observable);Dn.PromiseObservable=tj;function Cd(r){var e=r.value,t=r.subscriber;t.closed||(t.next(e),t.complete())}function rj(r){var e=r.err,t=r.subscriber;t.closed||t.error(e)}});var Ad=u(Wn=>{"use strict";var ij=Wn&&Wn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},nj=se(),sj=v(),zn=ir(),oj=function(r){ij(e,r);function e(t,i){if(r.call(this),this.scheduler=i,t==null)throw new Error("iterator cannot be null.");this.iterator=cj(t)}return e.create=function(t,i){return new e(t,i)},e.dispatch=function(t){var i=t.index,n=t.hasError,s=t.iterator,o=t.subscriber;if(n){o.error(t.error);return}var a=s.next();if(a.done){o.complete();return}if(o.next(a.value),t.index=i+1,o.closed){typeof s.return=="function"&&s.return();return}this.schedule(t)},e.prototype._subscribe=function(t){var i=0,n=this,s=n.iterator,o=n.scheduler;if(o)return o.schedule(e.dispatch,0,{index:i,iterator:s,subscriber:t});do{var a=s.next();if(a.done){t.complete();break}else t.next(a.value);if(t.closed){typeof s.return=="function"&&s.return();break}}while(!0)},e}(sj.Observable);Wn.IteratorObservable=oj;var aj=function(){function r(e,t,i){t===void 0&&(t=0),i===void 0&&(i=e.length),this.str=e,this.idx=t,this.len=i}return r.prototype[zn.iterator]=function(){return this},r.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.str.charAt(this.idx++)}:{done:!0,value:void 0}},r}(),uj=function(){function r(e,t,i){t===void 0&&(t=0),i===void 0&&(i=lj(e)),this.arr=e,this.idx=t,this.len=i}return r.prototype[zn.iterator]=function(){return this},r.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.arr[this.idx++]}:{done:!0,value:void 0}},r}();function cj(r){var e=r[zn.iterator];if(!e&&typeof r=="string")return new aj(r);if(!e&&r.length!==void 0)return new uj(r);if(!e)throw new TypeError("object is not iterable");return r[zn.iterator]()}var Id=Math.pow(2,53)-1;function lj(r){var e=+r.length;return isNaN(e)?0:e===0||!fj(e)?e:(e=hj(e)*Math.floor(Math.abs(e)),e<=0?0:e>Id?Id:e)}function fj(r){return typeof r=="number"&&nj.root.isFinite(r)}function hj(r){var e=+r;return e===0||isNaN(e)?e:e<0?-1:1}});var jd=u(Bn=>{"use strict";var pj=Bn&&Bn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},dj=v(),vj=Mn(),bj=Me(),mj=function(r){pj(e,r);function e(t,i){r.call(this),this.arrayLike=t,this.scheduler=i,!i&&t.length===1&&(this._isScalar=!0,this.value=t[0])}return e.create=function(t,i){var n=t.length;return n===0?new bj.EmptyObservable:n===1?new vj.ScalarObservable(t[0],i):new e(t,i)},e.dispatch=function(t){var i=t.arrayLike,n=t.index,s=t.length,o=t.subscriber;if(!o.closed){if(n>=s){o.complete();return}o.next(i[n]),t.index=n+1,this.schedule(t)}},e.prototype._subscribe=function(t){var i=0,n=this,s=n.arrayLike,o=n.scheduler,a=s.length;if(o)return o.schedule(e.dispatch,0,{arrayLike:s,index:i,length:a,subscriber:t});for(var c=0;c<a&&!t.closed;c++)t.next(s[c]);t.complete()},e}(dj.Observable);Bn.ArrayLikeObservable=mj});var sr=u(Ed=>{"use strict";var Du=v(),yj=function(){function r(e,t,i){this.kind=e,this.value=t,this.error=i,this.hasValue=e==="N"}return r.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},r.prototype.do=function(e,t,i){var n=this.kind;switch(n){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return i&&i()}},r.prototype.accept=function(e,t,i){return e&&typeof e.next=="function"?this.observe(e):this.do(e,t,i)},r.prototype.toObservable=function(){var e=this.kind;switch(e){case"N":return Du.Observable.of(this.value);case"E":return Du.Observable.throw(this.error);case"C":return Du.Observable.empty()}throw new Error("unexpected notification kind value")},r.createNext=function(e){return typeof e!="undefined"?new r("N",e):r.undefinedValueNotification},r.createError=function(e){return new r("E",void 0,e)},r.createComplete=function(){return r.completeNotification},r.completeNotification=new r("C"),r.undefinedValueNotification=new r("N",void 0),r}();Ed.Notification=yj});var si=u(St=>{"use strict";var _j=St&&St.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},gj=C(),zu=sr();function wj(r,e){return e===void 0&&(e=0),function(i){return i.lift(new kd(r,e))}}St.observeOn=wj;var kd=function(){function r(e,t){t===void 0&&(t=0),this.scheduler=e,this.delay=t}return r.prototype.call=function(e,t){return t.subscribe(new Rd(e,this.scheduler,this.delay))},r}();St.ObserveOnOperator=kd;var Rd=function(r){_j(e,r);function e(t,i,n){n===void 0&&(n=0),r.call(this,t),this.scheduler=i,this.delay=n}return e.dispatch=function(t){var i=t.notification,n=t.destination;i.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new Pd(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(zu.Notification.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(zu.Notification.createError(t))},e.prototype._complete=function(){this.scheduleMessage(zu.Notification.createComplete())},e}(gj.Subscriber);St.ObserveOnSubscriber=Rd;var Pd=function(){function r(e,t){this.notification=e,this.destination=t}return r}();St.ObserveOnMessage=Pd});var Bu=u($n=>{"use strict";var Sj=$n&&$n.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Oj=Oe(),xj=Uu(),qj=Zu(),Tj=Vu(),Cj=Ad(),Ij=Ue(),Aj=jd(),jj=ir(),Nd=v(),Ej=si(),Wu=Qr(),kj=function(r){Sj(e,r);function e(t,i){r.call(this,null),this.ish=t,this.scheduler=i}return e.create=function(t,i){if(t!=null){if(typeof t[Wu.observable]=="function")return t instanceof Nd.Observable&&!i?t:new e(t,i);if(Oj.isArray(t))return new Ij.ArrayObservable(t,i);if(qj.isPromise(t))return new Tj.PromiseObservable(t,i);if(typeof t[jj.iterator]=="function"||typeof t=="string")return new Cj.IteratorObservable(t,i);if(xj.isArrayLike(t))return new Aj.ArrayLikeObservable(t,i)}throw new TypeError((t!==null&&typeof t||t)+" is not observable")},e.prototype._subscribe=function(t){var i=this.ish,n=this.scheduler;return n==null?i[Wu.observable]().subscribe(t):i[Wu.observable]().subscribe(new Ej.ObserveOnSubscriber(t,n,0))},e}(Nd.Observable);$n.FromObservable=kj});var $u=u(Fd=>{"use strict";var Rj=Bu();Fd.from=Rj.FromObservable.create});var ar=u(or=>{"use strict";var Pj=or&&or.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Nj=N(),Fj=P();function Mj(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),function(n){return typeof e=="number"&&(t=e,e=null),n.lift(new Md(r,e,t))}}or.mergeMap=Mj;var Md=function(){function r(e,t,i){i===void 0&&(i=Number.POSITIVE_INFINITY),this.project=e,this.resultSelector=t,this.concurrent=i}return r.prototype.call=function(e,t){return t.subscribe(new Ud(e,this.project,this.resultSelector,this.concurrent))},r}();or.MergeMapOperator=Md;var Ud=function(r){Pj(e,r);function e(t,i,n,s){s===void 0&&(s=Number.POSITIVE_INFINITY),r.call(this,t),this.project=i,this.resultSelector=n,this.concurrent=s,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var i,n=this.index++;try{i=this.project(t,n)}catch(s){this.destination.error(s);return}this.active++,this._innerSub(i,t,n)},e.prototype._innerSub=function(t,i,n){this.add(Nj.subscribeToResult(this,t,i,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){this.resultSelector?this._notifyResultSelector(t,i,n,s):this.destination.next(i)},e.prototype._notifyResultSelector=function(t,i,n,s){var o;try{o=this.resultSelector(t,i,n,s)}catch(a){this.destination.error(a);return}this.destination.next(o)},e.prototype.notifyComplete=function(t){var i=this.buffer;this.remove(t),this.active--,i.length>0?this._next(i.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()},e}(Fj.OuterSubscriber);or.MergeMapSubscriber=Ud});var Hu=u(Zd=>{"use strict";function Uj(r){return r}Zd.identity=Uj});var oi=u(Ld=>{"use strict";var Zj=ar(),Lj=Hu();function Vj(r){return r===void 0&&(r=Number.POSITIVE_INFINITY),Zj.mergeMap(Lj.identity,null,r)}Ld.mergeAll=Vj});var Hn=u(Vd=>{"use strict";var Dj=oi();function zj(){return Dj.mergeAll(1)}Vd.concatAll=zj});var ur=u(Dd=>{"use strict";var Wj=_e(),Bj=Lu(),$j=$u(),Hj=Hn();function Jj(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return r.length===1||r.length===2&&Wj.isScheduler(r[1])?$j.from(r[0]):Hj.concatAll()(Bj.of.apply(void 0,r))}Dd.concat=Jj});var zd=u(()=>{"use strict";var Yj=v(),Kj=ur();Yj.Observable.concat=Kj.concat});var Bd=u(Jn=>{"use strict";var Wd=Jn&&Jn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Gj=v(),Xj=N(),Qj=P(),eE=function(r){Wd(e,r);function e(t){r.call(this),this.observableFactory=t}return e.create=function(t){return new e(t)},e.prototype._subscribe=function(t){return new tE(t,this.observableFactory)},e}(Gj.Observable);Jn.DeferObservable=eE;var tE=function(r){Wd(e,r);function e(t,i){r.call(this,t),this.factory=i,this.tryDefer()}return e.prototype.tryDefer=function(){try{this._callFactory()}catch(t){this._error(t)}},e.prototype._callFactory=function(){var t=this.factory();t&&this.add(Xj.subscribeToResult(this,t))},e}(Qj.OuterSubscriber)});var Hd=u($d=>{"use strict";var rE=Bd();$d.defer=rE.DeferObservable.create});var Jd=u(()=>{"use strict";var iE=v(),nE=Hd();iE.Observable.defer=nE.defer});var Kd=u(Yd=>{"use strict";var sE=Me();Yd.empty=sE.EmptyObservable.create});var Gd=u(()=>{"use strict";var oE=v(),aE=Kd();oE.Observable.empty=aE.empty});var ev=u(Yn=>{"use strict";var Qd=Yn&&Yn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},uE=v(),Xd=Me(),cE=Oe(),lE=N(),fE=P(),hE=function(r){Qd(e,r);function e(t,i){r.call(this),this.sources=t,this.resultSelector=i}return e.create=function(){for(var t=[],i=0;i<arguments.length;i++)t[i-0]=arguments[i];if(t===null||arguments.length===0)return new Xd.EmptyObservable;var n=null;return typeof t[t.length-1]=="function"&&(n=t.pop()),t.length===1&&cE.isArray(t[0])&&(t=t[0]),t.length===0?new Xd.EmptyObservable:new e(t,n)},e.prototype._subscribe=function(t){return new pE(t,this.sources,this.resultSelector)},e}(uE.Observable);Yn.ForkJoinObservable=hE;var pE=function(r){Qd(e,r);function e(t,i,n){r.call(this,t),this.sources=i,this.resultSelector=n,this.completed=0,this.haveValues=0;var s=i.length;this.total=s,this.values=new Array(s);for(var o=0;o<s;o++){var a=i[o],c=lE.subscribeToResult(this,a,null,o);c&&(c.outerIndex=o,this.add(c))}}return e.prototype.notifyNext=function(t,i,n,s,o){this.values[n]=i,o._hasValue||(o._hasValue=!0,this.haveValues++)},e.prototype.notifyComplete=function(t){var i=this.destination,n=this,s=n.haveValues,o=n.resultSelector,a=n.values,c=a.length;if(!t._hasValue){i.complete();return}if(this.completed++,this.completed===c){if(s===c){var l=o?o.apply(this,a):a;i.next(l)}i.complete()}},e}(fE.OuterSubscriber)});var rv=u(tv=>{"use strict";var dE=ev();tv.forkJoin=dE.ForkJoinObservable.create});var iv=u(()=>{"use strict";var vE=v(),bE=rv();vE.Observable.forkJoin=bE.forkJoin});var nv=u(()=>{"use strict";var mE=v(),yE=$u();mE.Observable.from=yE.from});var av=u(Kn=>{"use strict";var _E=Kn&&Kn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},gE=v(),wE=Q(),SE=Kr(),sv=Y(),OE=J(),ov=Object.prototype.toString;function xE(r){return!!r&&typeof r.addListener=="function"&&typeof r.removeListener=="function"}function qE(r){return!!r&&typeof r.on=="function"&&typeof r.off=="function"}function TE(r){return!!r&&ov.call(r)==="[object NodeList]"}function CE(r){return!!r&&ov.call(r)==="[object HTMLCollection]"}function IE(r){return!!r&&typeof r.addEventListener=="function"&&typeof r.removeEventListener=="function"}var AE=function(r){_E(e,r);function e(t,i,n,s){r.call(this),this.sourceObj=t,this.eventName=i,this.selector=n,this.options=s}return e.create=function(t,i,n,s){return SE.isFunction(n)&&(s=n,n=void 0),new e(t,i,s,n)},e.setupSubscription=function(t,i,n,s,o){var a;if(TE(t)||CE(t))for(var c=0,l=t.length;c<l;c++)e.setupSubscription(t[c],i,n,s,o);else if(IE(t)){var f=t;t.addEventListener(i,n,o),a=function(){return f.removeEventListener(i,n,o)}}else if(qE(t)){var p=t;t.on(i,n),a=function(){return p.off(i,n)}}else if(xE(t)){var y=t;t.addListener(i,n),a=function(){return y.removeListener(i,n)}}else throw new TypeError("Invalid event target");s.add(new OE.Subscription(a))},e.prototype._subscribe=function(t){var i=this.sourceObj,n=this.eventName,s=this.options,o=this.selector,a=o?function(){for(var c=[],l=0;l<arguments.length;l++)c[l-0]=arguments[l];var f=wE.tryCatch(o).apply(void 0,c);f===sv.errorObject?t.error(sv.errorObject.e):t.next(f)}:function(c){return t.next(c)};e.setupSubscription(i,n,a,t,s)},e}(gE.Observable);Kn.FromEventObservable=AE});var cv=u(uv=>{"use strict";var jE=av();uv.fromEvent=jE.FromEventObservable.create});var lv=u(()=>{"use strict";var EE=v(),kE=cv();EE.Observable.fromEvent=kE.fromEvent});var fv=u(Gn=>{"use strict";var RE=Gn&&Gn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},PE=Kr(),NE=v(),FE=J(),ME=function(r){RE(e,r);function e(t,i,n){r.call(this),this.addHandler=t,this.removeHandler=i,this.selector=n}return e.create=function(t,i,n){return new e(t,i,n)},e.prototype._subscribe=function(t){var i=this,n=this.removeHandler,s=this.selector?function(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];i._callSelector(t,a)}:function(a){t.next(a)},o=this._callAddHandler(s,t);PE.isFunction(n)&&t.add(new FE.Subscription(function(){n(s,o)}))},e.prototype._callSelector=function(t,i){try{var n=this.selector.apply(this,i);t.next(n)}catch(s){t.error(s)}},e.prototype._callAddHandler=function(t,i){try{return this.addHandler(t)||null}catch(n){i.error(n)}},e}(NE.Observable);Gn.FromEventPatternObservable=ME});var pv=u(hv=>{"use strict";var UE=fv();hv.fromEventPattern=UE.FromEventPatternObservable.create});var dv=u(()=>{"use strict";var ZE=v(),LE=pv();ZE.Observable.fromEventPattern=LE.fromEventPattern});var bv=u(vv=>{"use strict";var VE=Vu();vv.fromPromise=VE.PromiseObservable.create});var mv=u(()=>{"use strict";var DE=v(),zE=bv();DE.Observable.fromPromise=zE.fromPromise});var _v=u(Xn=>{"use strict";var WE=Xn&&Xn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},BE=v(),$E=_e(),yv=function(r){return r},HE=function(r){WE(e,r);function e(t,i,n,s,o){r.call(this),this.initialState=t,this.condition=i,this.iterate=n,this.resultSelector=s,this.scheduler=o}return e.create=function(t,i,n,s,o){return arguments.length==1?new e(t.initialState,t.condition,t.iterate,t.resultSelector||yv,t.scheduler):s===void 0||$E.isScheduler(s)?new e(t,i,n,yv,s):new e(t,i,n,s,o)},e.prototype._subscribe=function(t){var i=this.initialState;if(this.scheduler)return this.scheduler.schedule(e.dispatch,0,{subscriber:t,iterate:this.iterate,condition:this.condition,resultSelector:this.resultSelector,state:i});var n=this,s=n.condition,o=n.resultSelector,a=n.iterate;do{if(s){var c=void 0;try{c=s(i)}catch(f){t.error(f);return}if(!c){t.complete();break}}var l=void 0;try{l=o(i)}catch(f){t.error(f);return}if(t.next(l),t.closed)break;try{i=a(i)}catch(f){t.error(f);return}}while(!0)},e.dispatch=function(t){var i=t.subscriber,n=t.condition;if(!i.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(a){i.error(a);return}else t.needIterate=!0;if(n){var s=void 0;try{s=n(t.state)}catch(a){i.error(a);return}if(!s){i.complete();return}if(i.closed)return}var o;try{o=t.resultSelector(t.state)}catch(a){i.error(a);return}if(!i.closed&&(i.next(o),!i.closed))return this.schedule(t)}},e}(BE.Observable);Xn.GenerateObservable=HE});var wv=u(gv=>{"use strict";var JE=_v();gv.generate=JE.GenerateObservable.create});var Sv=u(()=>{"use strict";var YE=v(),KE=wv();YE.Observable.generate=KE.generate});var xv=u(Qn=>{"use strict";var Ov=Qn&&Qn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},GE=v(),XE=N(),QE=P(),ek=function(r){Ov(e,r);function e(t,i,n){r.call(this),this.condition=t,this.thenSource=i,this.elseSource=n}return e.create=function(t,i,n){return new e(t,i,n)},e.prototype._subscribe=function(t){var i=this,n=i.condition,s=i.thenSource,o=i.elseSource;return new tk(t,n,s,o)},e}(GE.Observable);Qn.IfObservable=ek;var tk=function(r){Ov(e,r);function e(t,i,n,s){r.call(this,t),this.condition=i,this.thenSource=n,this.elseSource=s,this.tryIf()}return e.prototype.tryIf=function(){var t=this,i=t.condition,n=t.thenSource,s=t.elseSource,o;try{o=i();var a=o?n:s;a?this.add(XE.subscribeToResult(this,a)):this._complete()}catch(c){this._error(c)}},e}(QE.OuterSubscriber)});var Tv=u(qv=>{"use strict";var rk=xv();qv._if=rk.IfObservable.create});var Cv=u(()=>{"use strict";var ik=v(),nk=Tv();ik.Observable.if=nk._if});var cr=u(Iv=>{"use strict";var sk=Oe();function ok(r){return!sk.isArray(r)&&r-parseFloat(r)+1>=0}Iv.isNumeric=ok});var Av=u(es=>{"use strict";var ak=es&&es.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},uk=J(),ck=function(r){ak(e,r);function e(t,i){r.call(this)}return e.prototype.schedule=function(t,i){return i===void 0&&(i=0),this},e}(uk.Subscription);es.Action=ck});var lr=u(ts=>{"use strict";var lk=ts&&ts.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},jv=se(),fk=Av(),hk=function(r){lk(e,r);function e(t,i){r.call(this,t,i),this.scheduler=t,this.pending=!1,this.work=i}return e.prototype.schedule=function(t,i){if(i===void 0&&(i=0),this.closed)return this;this.state=t,this.pending=!0;var n=this.id,s=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(s,n,i)),this.delay=i,this.id=this.id||this.requestAsyncId(s,this.id,i),this},e.prototype.requestAsyncId=function(t,i,n){return n===void 0&&(n=0),jv.root.setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,i,n){return n===void 0&&(n=0),n!==null&&this.delay===n&&this.pending===!1?i:jv.root.clearInterval(i)&&void 0||void 0},e.prototype.execute=function(t,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,i);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,i){var n=!1,s=void 0;try{this.work(t)}catch(o){n=!0,s=!!o&&o||new Error(o)}if(n)return this.unsubscribe(),s},e.prototype._unsubscribe=function(){var t=this.id,i=this.scheduler,n=i.actions,s=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,s!==-1&&n.splice(s,1),t!=null&&(this.id=this.recycleAsyncId(i,t,null)),this.delay=null},e}(fk.Action);ts.AsyncAction=hk});var kv=u(Ev=>{"use strict";var pk=function(){function r(e,t){t===void 0&&(t=r.now),this.SchedulerAction=e,this.now=t}return r.prototype.schedule=function(e,t,i){return t===void 0&&(t=0),new this.SchedulerAction(this,e).schedule(i,t)},r.now=Date.now?Date.now:function(){return+new Date},r}();Ev.Scheduler=pk});var fr=u(rs=>{"use strict";var dk=rs&&rs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},vk=kv(),bk=function(r){dk(e,r);function e(){r.apply(this,arguments),this.actions=[],this.active=!1,this.scheduled=void 0}return e.prototype.flush=function(t){var i=this.actions;if(this.active){i.push(t);return}var n;this.active=!0;do if(n=t.execute(t.state,t.delay))break;while(t=i.shift());if(this.active=!1,n){for(;t=i.shift();)t.unsubscribe();throw n}},e}(vk.Scheduler);rs.AsyncScheduler=bk});var W=u(Rv=>{"use strict";var mk=lr(),yk=fr();Rv.async=new yk.AsyncScheduler(mk.AsyncAction)});var Pv=u(is=>{"use strict";var _k=is&&is.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},gk=cr(),wk=v(),Ju=W(),Sk=function(r){_k(e,r);function e(t,i){t===void 0&&(t=0),i===void 0&&(i=Ju.async),r.call(this),this.period=t,this.scheduler=i,(!gk.isNumeric(t)||t<0)&&(this.period=0),(!i||typeof i.schedule!="function")&&(this.scheduler=Ju.async)}return e.create=function(t,i){return t===void 0&&(t=0),i===void 0&&(i=Ju.async),new e(t,i)},e.dispatch=function(t){var i=t.index,n=t.subscriber,s=t.period;n.next(i),!n.closed&&(t.index+=1,this.schedule(t,s))},e.prototype._subscribe=function(t){var i=0,n=this.period,s=this.scheduler;t.add(s.schedule(e.dispatch,n,{index:i,subscriber:t,period:n}))},e}(wk.Observable);is.IntervalObservable=Sk});var Fv=u(Nv=>{"use strict";var Ok=Pv();Nv.interval=Ok.IntervalObservable.create});var Mv=u(()=>{"use strict";var xk=v(),qk=Fv();xk.Observable.interval=qk.interval});var ai=u(Uv=>{"use strict";var Tk=v(),Ck=Ue(),Ik=_e(),Ak=oi();function jk(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=Number.POSITIVE_INFINITY,i=null,n=r[r.length-1];return Ik.isScheduler(n)?(i=r.pop(),r.length>1&&typeof r[r.length-1]=="number"&&(t=r.pop())):typeof n=="number"&&(t=r.pop()),i===null&&r.length===1&&r[0]instanceof Tk.Observable?r[0]:Ak.mergeAll(t)(new Ck.ArrayObservable(r,i))}Uv.merge=jk});var Zv=u(()=>{"use strict";var Ek=v(),kk=ai();Ek.Observable.merge=kk.merge});var ns=u(hr=>{"use strict";var Rk=hr&&hr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Pk=Oe(),Nk=Ue(),Fk=P(),Mk=N();function Uk(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];if(r.length===1)if(Pk.isArray(r[0]))r=r[0];else return r[0];return new Nk.ArrayObservable(r).lift(new Lv)}hr.race=Uk;var Lv=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new Vv(e))},r}();hr.RaceOperator=Lv;var Vv=function(r){Rk(e,r);function e(t){r.call(this,t),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}return e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,i=t.length;if(i===0)this.destination.complete();else{for(var n=0;n<i&&!this.hasFirst;n++){var s=t[n],o=Mk.subscribeToResult(this,s,s,n);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},e.prototype.notifyNext=function(t,i,n,s,o){if(!this.hasFirst){this.hasFirst=!0;for(var a=0;a<this.subscriptions.length;a++)if(a!==n){var c=this.subscriptions[a];c.unsubscribe(),this.remove(c)}this.subscriptions=null}this.destination.next(i)},e}(Fk.OuterSubscriber);hr.RaceSubscriber=Vv});var Dv=u(()=>{"use strict";var Zk=v(),Lk=ns();Zk.Observable.race=Lk.race});var zv=u(ss=>{"use strict";var Vk=ss&&ss.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Dk=v(),zk=Cn(),Wk=function(r){Vk(e,r);function e(){r.call(this)}return e.create=function(){return new e},e.prototype._subscribe=function(t){zk.noop()},e}(Dk.Observable);ss.NeverObservable=Wk});var Bv=u(Wv=>{"use strict";var Bk=zv();Wv.never=Bk.NeverObservable.create});var $v=u(()=>{"use strict";var $k=v(),Hk=Bv();$k.Observable.never=Hk.never});var Hv=u(()=>{"use strict";var Jk=v(),Yk=Lu();Jk.Observable.of=Yk.of});var os=u(ui=>{"use strict";var Kk=ui&&ui.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Gk=Bu(),Jv=Oe(),Xk=P(),Qk=N();function eR(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return r.length===1&&Jv.isArray(r[0])&&(r=r[0]),function(t){return t.lift(new Yv(r))}}ui.onErrorResumeNext=eR;function tR(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=null;return r.length===1&&Jv.isArray(r[0])&&(r=r[0]),t=r.shift(),new Gk.FromObservable(t,null).lift(new Yv(r))}ui.onErrorResumeNextStatic=tR;var Yv=function(){function r(e){this.nextSources=e}return r.prototype.call=function(e,t){return t.subscribe(new rR(e,this.nextSources))},r}(),rR=function(r){Kk(e,r);function e(t,i){r.call(this,t),this.destination=t,this.nextSources=i}return e.prototype.notifyError=function(t,i){this.subscribeToNextSource()},e.prototype.notifyComplete=function(t){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource()},e.prototype._complete=function(){this.subscribeToNextSource()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();t?this.add(Qk.subscribeToResult(this,t)):this.destination.complete()},e}(Xk.OuterSubscriber)});var Gv=u(Kv=>{"use strict";var iR=os();Kv.onErrorResumeNext=iR.onErrorResumeNextStatic});var Xv=u(()=>{"use strict";var nR=v(),sR=Gv();nR.Observable.onErrorResumeNext=sR.onErrorResumeNext});var Qv=u(as=>{"use strict";var oR=as&&as.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},aR=v();function uR(r){var e=r.obj,t=r.keys,i=r.length,n=r.index,s=r.subscriber;if(n===i){s.complete();return}var o=t[n];s.next([o,e[o]]),r.index=n+1,this.schedule(r)}var cR=function(r){oR(e,r);function e(t,i){r.call(this),this.obj=t,this.scheduler=i,this.keys=Object.keys(t)}return e.create=function(t,i){return new e(t,i)},e.prototype._subscribe=function(t){var i=this,n=i.keys,s=i.scheduler,o=n.length;if(s)return s.schedule(uR,0,{obj:this.obj,keys:n,length:o,index:0,subscriber:t});for(var a=0;a<o;a++){var c=n[a];t.next([c,this.obj[c]])}t.complete()},e}(aR.Observable);as.PairsObservable=cR});var tb=u(eb=>{"use strict";var lR=Qv();eb.pairs=lR.PairsObservable.create});var rb=u(()=>{"use strict";var fR=v(),hR=tb();fR.Observable.pairs=hR.pairs});var ib=u(us=>{"use strict";var pR=us&&us.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},dR=v(),vR=function(r){pR(e,r);function e(t,i,n){r.call(this),this.start=t,this._count=i,this.scheduler=n}return e.create=function(t,i,n){return t===void 0&&(t=0),i===void 0&&(i=0),new e(t,i,n)},e.dispatch=function(t){var i=t.start,n=t.index,s=t.count,o=t.subscriber;if(n>=s){o.complete();return}o.next(i),!o.closed&&(t.index=n+1,t.start=i+1,this.schedule(t))},e.prototype._subscribe=function(t){var i=0,n=this.start,s=this._count,o=this.scheduler;if(o)return o.schedule(e.dispatch,0,{index:i,count:s,start:n,subscriber:t});do{if(i++>=s){t.complete();break}if(t.next(n++),t.closed)break}while(!0)},e}(dR.Observable);us.RangeObservable=vR});var sb=u(nb=>{"use strict";var bR=ib();nb.range=bR.RangeObservable.create});var ob=u(()=>{"use strict";var mR=v(),yR=sb();mR.Observable.range=yR.range});var ub=u(cs=>{"use strict";var ab=cs&&cs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},_R=v(),gR=N(),wR=P(),SR=function(r){ab(e,r);function e(t,i){r.call(this),this.resourceFactory=t,this.observableFactory=i}return e.create=function(t,i){return new e(t,i)},e.prototype._subscribe=function(t){var i=this,n=i.resourceFactory,s=i.observableFactory,o;try{return o=n(),new OR(t,o,s)}catch(a){t.error(a)}},e}(_R.Observable);cs.UsingObservable=SR;var OR=function(r){ab(e,r);function e(t,i,n){r.call(this,t),this.resource=i,this.observableFactory=n,t.add(i),this.tryUse()}return e.prototype.tryUse=function(){try{var t=this.observableFactory.call(this,this.resource);t&&this.add(gR.subscribeToResult(this,t))}catch(i){this._error(i)}},e}(wR.OuterSubscriber)});var lb=u(cb=>{"use strict";var xR=ub();cb.using=xR.UsingObservable.create});var fb=u(()=>{"use strict";var qR=v(),TR=lb();qR.Observable.using=TR.using});var hb=u(ls=>{"use strict";var CR=ls&&ls.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},IR=v(),AR=function(r){CR(e,r);function e(t,i){r.call(this),this.error=t,this.scheduler=i}return e.create=function(t,i){return new e(t,i)},e.dispatch=function(t){var i=t.error,n=t.subscriber;n.error(i)},e.prototype._subscribe=function(t){var i=this.error,n=this.scheduler;if(t.syncErrorThrowable=!0,n)return n.schedule(e.dispatch,0,{error:i,subscriber:t});t.error(i)},e}(IR.Observable);ls.ErrorObservable=AR});var db=u(pb=>{"use strict";var jR=hb();pb._throw=jR.ErrorObservable.create});var vb=u(()=>{"use strict";var ER=v(),kR=db();ER.Observable.throw=kR._throw});var ci=u(bb=>{"use strict";function RR(r){return r instanceof Date&&!isNaN(+r)}bb.isDate=RR});var yb=u(fs=>{"use strict";var PR=fs&&fs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},NR=cr(),FR=v(),MR=W(),mb=_e(),UR=ci(),ZR=function(r){PR(e,r);function e(t,i,n){t===void 0&&(t=0),r.call(this),this.period=-1,this.dueTime=0,NR.isNumeric(i)?this.period=Number(i)<1&&1||Number(i):mb.isScheduler(i)&&(n=i),mb.isScheduler(n)||(n=MR.async),this.scheduler=n,this.dueTime=UR.isDate(t)?+t-this.scheduler.now():t}return e.create=function(t,i,n){return t===void 0&&(t=0),new e(t,i,n)},e.dispatch=function(t){var i=t.index,n=t.period,s=t.subscriber,o=this;if(s.next(i),!s.closed){if(n===-1)return s.complete();t.index=i+1,o.schedule(t,n)}},e.prototype._subscribe=function(t){var i=0,n=this,s=n.period,o=n.dueTime,a=n.scheduler;return a.schedule(e.dispatch,o,{index:i,period:s,subscriber:t})},e}(FR.Observable);fs.TimerObservable=ZR});var Yu=u(_b=>{"use strict";var LR=yb();_b.timer=LR.TimerObservable.create});var gb=u(()=>{"use strict";var VR=v(),DR=Yu();VR.Observable.timer=DR.timer});var li=u(Ot=>{"use strict";var wb=Ot&&Ot.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},zR=Ue(),WR=Oe(),BR=C(),$R=P(),HR=N(),hs=ir();function JR(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(i){return i.lift.call(Sb.apply(void 0,[i].concat(r)))}}Ot.zip=JR;function Sb(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=r[r.length-1];return typeof t=="function"&&r.pop(),new zR.ArrayObservable(r).lift(new Ob(t))}Ot.zipStatic=Sb;var Ob=function(){function r(e){this.project=e}return r.prototype.call=function(e,t){return t.subscribe(new xb(e,this.project))},r}();Ot.ZipOperator=Ob;var xb=function(r){wb(e,r);function e(t,i,n){n===void 0&&(n=Object.create(null)),r.call(this,t),this.iterators=[],this.active=0,this.project=typeof i=="function"?i:null,this.values=n}return e.prototype._next=function(t){var i=this.iterators;WR.isArray(t)?i.push(new KR(t)):typeof t[hs.iterator]=="function"?i.push(new YR(t[hs.iterator]())):i.push(new GR(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,i=t.length;if(i===0){this.destination.complete();return}this.active=i;for(var n=0;n<i;n++){var s=t[n];s.stillUnsubscribed?this.add(s.subscribe(s,n)):this.active--}},e.prototype.notifyInactive=function(){this.active--,this.active===0&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,i=t.length,n=this.destination,s=0;s<i;s++){var o=t[s];if(typeof o.hasValue=="function"&&!o.hasValue())return}for(var a=!1,c=[],s=0;s<i;s++){var o=t[s],l=o.next();if(o.hasCompleted()&&(a=!0),l.done){n.complete();return}c.push(l.value)}this.project?this._tryProject(c):n.next(c),a&&n.complete()},e.prototype._tryProject=function(t){var i;try{i=this.project.apply(this,t)}catch(n){this.destination.error(n);return}this.destination.next(i)},e}(BR.Subscriber);Ot.ZipSubscriber=xb;var YR=function(){function r(e){this.iterator=e,this.nextResult=e.next()}return r.prototype.hasValue=function(){return!0},r.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},r.prototype.hasCompleted=function(){var e=this.nextResult;return e&&e.done},r}(),KR=function(){function r(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return r.prototype[hs.iterator]=function(){return this},r.prototype.next=function(e){var t=this.index++,i=this.array;return t<this.length?{value:i[t],done:!1}:{value:null,done:!0}},r.prototype.hasValue=function(){return this.array.length>this.index},r.prototype.hasCompleted=function(){return this.array.length===this.index},r}(),GR=function(r){wb(e,r);function e(t,i,n){r.call(this,t),this.parent=i,this.observable=n,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}return e.prototype[hs.iterator]=function(){return this},e.prototype.next=function(){var t=this.buffer;return t.length===0&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return this.buffer.length===0&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){this.buffer.push(i),this.parent.checkIterators()},e.prototype.subscribe=function(t,i){return HR.subscribeToResult(this,this.observable,this,i)},e}($R.OuterSubscriber)});var Tb=u(qb=>{"use strict";var XR=li();qb.zip=XR.zipStatic});var Cb=u(()=>{"use strict";var QR=v(),eP=Tb();QR.Observable.zip=eP.zip});var pr=u(fi=>{"use strict";var tP=fi&&fi.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},rP=C();function iP(r,e){return function(i){if(typeof r!="function")throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new Ib(r,e))}}fi.map=iP;var Ib=function(){function r(e,t){this.project=e,this.thisArg=t}return r.prototype.call=function(e,t){return t.subscribe(new nP(e,this.project,this.thisArg))},r}();fi.MapOperator=Ib;var nP=function(r){tP(e,r);function e(t,i,n){r.call(this,t),this.project=i,this.count=0,this.thisArg=n||this}return e.prototype._next=function(t){var i;try{i=this.project.call(this.thisArg,t,this.count++)}catch(n){this.destination.error(n);return}this.destination.next(i)},e}(rP.Subscriber)});var Ku=u(fe=>{"use strict";var ds=fe&&fe.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},pe=se(),hi=Q(),dr=Y(),sP=v(),oP=C(),aP=pr();function uP(){if(pe.root.XMLHttpRequest)return new pe.root.XMLHttpRequest;if(pe.root.XDomainRequest)return new pe.root.XDomainRequest;throw new Error("CORS is not supported by your browser")}function cP(){if(pe.root.XMLHttpRequest)return new pe.root.XMLHttpRequest;var r=void 0;try{for(var e=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],t=0;t<3;t++)try{if(r=e[t],new pe.root.ActiveXObject(r))break}catch{}return new pe.root.ActiveXObject(r)}catch{throw new Error("XMLHttpRequest is not supported by your browser")}}function Ab(r,e){return e===void 0&&(e=null),new xt({method:"GET",url:r,headers:e})}fe.ajaxGet=Ab;function jb(r,e,t){return new xt({method:"POST",url:r,body:e,headers:t})}fe.ajaxPost=jb;function Eb(r,e){return new xt({method:"DELETE",url:r,headers:e})}fe.ajaxDelete=Eb;function kb(r,e,t){return new xt({method:"PUT",url:r,body:e,headers:t})}fe.ajaxPut=kb;function Rb(r,e,t){return new xt({method:"PATCH",url:r,body:e,headers:t})}fe.ajaxPatch=Rb;var lP=aP.map(function(r,e){return r.response});function Pb(r,e){return lP(new xt({method:"GET",url:r,responseType:"json",headers:e}))}fe.ajaxGetJSON=Pb;var xt=function(r){ds(e,r);function e(t){r.call(this);var i={async:!0,createXHR:function(){return this.crossDomain?uP.call(this):cP()},crossDomain:!1,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if(typeof t=="string")i.url=t;else for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);this.request=i}return e.prototype._subscribe=function(t){return new Nb(t,this.request)},e.create=function(){var t=function(i){return new e(i)};return t.get=Ab,t.post=jb,t.delete=Eb,t.put=kb,t.patch=Rb,t.getJSON=Pb,t}(),e}(sP.Observable);fe.AjaxObservable=xt;var Nb=function(r){ds(e,r);function e(t,i){r.call(this,t),this.request=i,this.done=!1;var n=i.headers=i.headers||{};!i.crossDomain&&!n["X-Requested-With"]&&(n["X-Requested-With"]="XMLHttpRequest"),!("Content-Type"in n)&&!(pe.root.FormData&&i.body instanceof pe.root.FormData)&&typeof i.body!="undefined"&&(n["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),i.body=this.serializeBody(i.body,i.headers["Content-Type"]),this.send()}return e.prototype.next=function(t){this.done=!0;var i=this,n=i.xhr,s=i.request,o=i.destination,a=new Fb(t,n,s);o.next(a)},e.prototype.send=function(){var t=this,i=t.request,n=t.request,s=n.user,o=n.method,a=n.url,c=n.async,l=n.password,f=n.headers,p=n.body,y=i.createXHR,g=hi.tryCatch(y).call(i);if(g===dr.errorObject)this.error(dr.errorObject.e);else{this.xhr=g,this.setupEvents(g,i);var m=void 0;if(s?m=hi.tryCatch(g.open).call(g,o,a,c,s,l):m=hi.tryCatch(g.open).call(g,o,a,c),m===dr.errorObject)return this.error(dr.errorObject.e),null;if(c&&(g.timeout=i.timeout,g.responseType=i.responseType),"withCredentials"in g&&(g.withCredentials=!!i.withCredentials),this.setHeaders(g,f),m=p?hi.tryCatch(g.send).call(g,p):hi.tryCatch(g.send).call(g),m===dr.errorObject)return this.error(dr.errorObject.e),null}return g},e.prototype.serializeBody=function(t,i){if(!t||typeof t=="string")return t;if(pe.root.FormData&&t instanceof pe.root.FormData)return t;if(i){var n=i.indexOf(";");n!==-1&&(i=i.substring(0,n))}switch(i){case"application/x-www-form-urlencoded":return Object.keys(t).map(function(s){return encodeURIComponent(s)+"="+encodeURIComponent(t[s])}).join("&");case"application/json":return JSON.stringify(t);default:return t}},e.prototype.setHeaders=function(t,i){for(var n in i)i.hasOwnProperty(n)&&t.setRequestHeader(n,i[n])},e.prototype.setupEvents=function(t,i){var n=i.progressSubscriber;function s(l){var f=s,p=f.subscriber,y=f.progressSubscriber,g=f.request;y&&y.error(l),p.error(new Ub(this,g))}if(t.ontimeout=s,s.request=i,s.subscriber=this,s.progressSubscriber=n,t.upload&&"withCredentials"in t){if(n){var o;o=function(l){var f=o.progressSubscriber;f.next(l)},pe.root.XDomainRequest?t.onprogress=o:t.upload.onprogress=o,o.progressSubscriber=n}var a;a=function(l){var f=a,p=f.progressSubscriber,y=f.subscriber,g=f.request;p&&p.error(l),y.error(new ps("ajax error",this,g))},t.onerror=a,a.request=i,a.subscriber=this,a.progressSubscriber=n}function c(l){var f=c,p=f.subscriber,y=f.progressSubscriber,g=f.request;if(this.readyState===4){var m=this.status===1223?204:this.status,O=this.responseType==="text"?this.response||this.responseText:this.response;m===0&&(m=O?200:0),200<=m&&m<300?(y&&y.complete(),p.next(l),p.complete()):(y&&y.error(l),p.error(new ps("ajax error "+m,this,g)))}}t.onreadystatechange=c,c.subscriber=this,c.progressSubscriber=n,c.request=i},e.prototype.unsubscribe=function(){var t=this,i=t.done,n=t.xhr;!i&&n&&n.readyState!==4&&typeof n.abort=="function"&&n.abort(),r.prototype.unsubscribe.call(this)},e}(oP.Subscriber);fe.AjaxSubscriber=Nb;var Fb=function(){function r(e,t,i){this.originalEvent=e,this.xhr=t,this.request=i,this.status=t.status,this.responseType=t.responseType||i.responseType,this.response=Mb(this.responseType,t)}return r}();fe.AjaxResponse=Fb;var ps=function(r){ds(e,r);function e(t,i,n){r.call(this,t),this.message=t,this.xhr=i,this.request=n,this.status=i.status,this.responseType=i.responseType||n.responseType,this.response=Mb(this.responseType,i)}return e}(Error);fe.AjaxError=ps;function Mb(r,e){switch(r){case"json":return"response"in e?e.responseType?e.response:JSON.parse(e.response||e.responseText||"null"):JSON.parse(e.responseText||"null");case"xml":return e.responseXML;case"text":default:return"response"in e?e.response:e.responseText}}var Ub=function(r){ds(e,r);function e(t,i){r.call(this,"ajax timeout",t,i)}return e}(ps);fe.AjaxTimeoutError=Ub});var Lb=u(Zb=>{"use strict";var fP=Ku();Zb.ajax=fP.AjaxObservable.create});var Vb=u(()=>{"use strict";var hP=v(),pP=Lb();hP.Observable.ajax=pP.ajax});var Db=u(vs=>{"use strict";var dP=vs&&vs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},vP=lr(),bP=function(r){dP(e,r);function e(t,i){r.call(this,t,i),this.scheduler=t,this.work=i}return e.prototype.schedule=function(t,i){return i===void 0&&(i=0),i>0?r.prototype.schedule.call(this,t,i):(this.delay=i,this.state=t,this.scheduler.flush(this),this)},e.prototype.execute=function(t,i){return i>0||this.closed?r.prototype.execute.call(this,t,i):this._execute(t,i)},e.prototype.requestAsyncId=function(t,i,n){return n===void 0&&(n=0),n!==null&&n>0||n===null&&this.delay>0?r.prototype.requestAsyncId.call(this,t,i,n):t.flush(this)},e}(vP.AsyncAction);vs.QueueAction=bP});var zb=u(bs=>{"use strict";var mP=bs&&bs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},yP=fr(),_P=function(r){mP(e,r);function e(){r.apply(this,arguments)}return e}(yP.AsyncScheduler);bs.QueueScheduler=_P});var Gu=u(Wb=>{"use strict";var gP=Db(),wP=zb();Wb.queue=new wP.QueueScheduler(gP.QueueAction)});var pi=u(ms=>{"use strict";var SP=ms&&ms.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},OP=K(),xP=Gu(),Bb=J(),qP=si(),TP=ei(),CP=Ru(),IP=function(r){SP(e,r);function e(t,i,n){t===void 0&&(t=Number.POSITIVE_INFINITY),i===void 0&&(i=Number.POSITIVE_INFINITY),r.call(this),this.scheduler=n,this._events=[],this._bufferSize=t<1?1:t,this._windowTime=i<1?1:i}return e.prototype.next=function(t){var i=this._getNow();this._events.push(new AP(i,t)),this._trimBufferThenGetEvents(),r.prototype.next.call(this,t)},e.prototype._subscribe=function(t){var i=this._trimBufferThenGetEvents(),n=this.scheduler,s;if(this.closed)throw new TP.ObjectUnsubscribedError;this.hasError||this.isStopped?s=Bb.Subscription.EMPTY:(this.observers.push(t),s=new CP.SubjectSubscription(this,t)),n&&t.add(t=new qP.ObserveOnSubscriber(t,n));for(var o=i.length,a=0;a<o&&!t.closed;a++)t.next(i[a].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),s},e.prototype._getNow=function(){return(this.scheduler||xP.queue).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),i=this._bufferSize,n=this._windowTime,s=this._events,o=s.length,a=0;a<o&&!(t-s[a].time<n);)a++;return o>i&&(a=Math.max(a,o-i)),a>0&&s.splice(0,a),s},e}(OP.Subject);ms.ReplaySubject=IP;var AP=function(){function r(e,t){this.time=e,this.value=t}return r}()});var Jb=u(ys=>{"use strict";var jP=se();function $b(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var i=e.length,n=0;n<i;n++){var s=e[n];for(var o in s)s.hasOwnProperty(o)&&(r[o]=s[o])}return r}ys.assignImpl=$b;function Hb(r){return r.Object.assign||$b}ys.getAssign=Hb;ys.assign=Hb(jP.root)});var Gb=u(ws=>{"use strict";var EP=ws&&ws.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Xu=K(),kP=C(),Yb=v(),Kb=J(),RP=se(),_s=pi(),gs=Q(),Ye=Y(),PP=Jb(),NP=function(r){EP(e,r);function e(t,i){if(t instanceof Yb.Observable)r.call(this,i,t);else{if(r.call(this),this.WebSocketCtor=RP.root.WebSocket,this._output=new Xu.Subject,typeof t=="string"?this.url=t:PP.assign(this,t),!this.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new _s.ReplaySubject}}return e.prototype.resultSelector=function(t){return JSON.parse(t.data)},e.create=function(t){return new e(t)},e.prototype.lift=function(t){var i=new e(this,this.destination);return i.operator=t,i},e.prototype._resetState=function(){this.socket=null,this.source||(this.destination=new _s.ReplaySubject),this._output=new Xu.Subject},e.prototype.multiplex=function(t,i,n){var s=this;return new Yb.Observable(function(o){var a=gs.tryCatch(t)();a===Ye.errorObject?o.error(Ye.errorObject.e):s.next(a);var c=s.subscribe(function(l){var f=gs.tryCatch(n)(l);f===Ye.errorObject?o.error(Ye.errorObject.e):f&&o.next(l)},function(l){return o.error(l)},function(){return o.complete()});return function(){var l=gs.tryCatch(i)();l===Ye.errorObject?o.error(Ye.errorObject.e):s.next(l),c.unsubscribe()}})},e.prototype._connectSocket=function(){var t=this,i=this.WebSocketCtor,n=this._output,s=null;try{s=this.protocol?new i(this.url,this.protocol):new i(this.url),this.socket=s,this.binaryType&&(this.socket.binaryType=this.binaryType)}catch(a){n.error(a);return}var o=new Kb.Subscription(function(){t.socket=null,s&&s.readyState===1&&s.close()});s.onopen=function(a){var c=t.openObserver;c&&c.next(a);var l=t.destination;t.destination=kP.Subscriber.create(function(f){return s.readyState===1&&s.send(f)},function(f){var p=t.closingObserver;p&&p.next(void 0),f&&f.code?s.close(f.code,f.reason):n.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }")),t._resetState()},function(){var f=t.closingObserver;f&&f.next(void 0),s.close(),t._resetState()}),l&&l instanceof _s.ReplaySubject&&o.add(l.subscribe(t.destination))},s.onerror=function(a){t._resetState(),n.error(a)},s.onclose=function(a){t._resetState();var c=t.closeObserver;c&&c.next(a),a.wasClean?n.complete():n.error(a)},s.onmessage=function(a){var c=gs.tryCatch(t.resultSelector)(a);c===Ye.errorObject?n.error(Ye.errorObject.e):n.next(c)}},e.prototype._subscribe=function(t){var i=this,n=this.source;if(n)return n.subscribe(t);this.socket||this._connectSocket();var s=new Kb.Subscription;return s.add(this._output.subscribe(t)),s.add(function(){var o=i.socket;i._output.observers.length===0&&(o&&o.readyState===1&&o.close(),i._resetState())}),s},e.prototype.unsubscribe=function(){var t=this,i=t.source,n=t.socket;n&&n.readyState===1&&(n.close(),this._resetState()),r.prototype.unsubscribe.call(this),i||(this.destination=new _s.ReplaySubject)},e}(Xu.AnonymousSubject);ws.WebSocketSubject=NP});var Qb=u(Xb=>{"use strict";var FP=Gb();Xb.webSocket=FP.WebSocketSubject.create});var em=u(()=>{"use strict";var MP=v(),UP=Qb();MP.Observable.webSocket=UP.webSocket});var Qu=u(Ss=>{"use strict";var ZP=Ss&&Ss.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},LP=P(),VP=N();function DP(r){return function(t){return t.lift(new zP(r))}}Ss.buffer=DP;var zP=function(){function r(e){this.closingNotifier=e}return r.prototype.call=function(e,t){return t.subscribe(new WP(e,this.closingNotifier))},r}(),WP=function(r){ZP(e,r);function e(t,i){r.call(this,t),this.buffer=[],this.add(VP.subscribeToResult(this,i))}return e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,i,n,s,o){var a=this.buffer;this.buffer=[],this.destination.next(a)},e}(LP.OuterSubscriber)});var rm=u(tm=>{"use strict";var BP=Qu();function $P(r){return BP.buffer(r)(this)}tm.buffer=$P});var im=u(()=>{"use strict";var HP=v(),JP=rm();HP.Observable.prototype.buffer=JP.buffer});var ec=u(Os=>{"use strict";var nm=Os&&Os.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},sm=C();function YP(r,e){return e===void 0&&(e=null),function(i){return i.lift(new KP(r,e))}}Os.bufferCount=YP;var KP=function(){function r(e,t){this.bufferSize=e,this.startBufferEvery=t,!t||e===t?this.subscriberClass=GP:this.subscriberClass=XP}return r.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},r}(),GP=function(r){nm(e,r);function e(t,i){r.call(this,t),this.bufferSize=i,this.buffer=[]}return e.prototype._next=function(t){var i=this.buffer;i.push(t),i.length==this.bufferSize&&(this.destination.next(i),this.buffer=[])},e.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),r.prototype._complete.call(this)},e}(sm.Subscriber),XP=function(r){nm(e,r);function e(t,i,n){r.call(this,t),this.bufferSize=i,this.startBufferEvery=n,this.buffers=[],this.count=0}return e.prototype._next=function(t){var i=this,n=i.bufferSize,s=i.startBufferEvery,o=i.buffers,a=i.count;this.count++,a%s===0&&o.push([]);for(var c=o.length;c--;){var l=o[c];l.push(t),l.length===n&&(o.splice(c,1),this.destination.next(l))}},e.prototype._complete=function(){for(var t=this,i=t.buffers,n=t.destination;i.length>0;){var s=i.shift();s.length>0&&n.next(s)}r.prototype._complete.call(this)},e}(sm.Subscriber)});var am=u(om=>{"use strict";var QP=ec();function eN(r,e){return e===void 0&&(e=null),QP.bufferCount(r,e)(this)}om.bufferCount=eN});var um=u(()=>{"use strict";var tN=v(),rN=am();tN.Observable.prototype.bufferCount=rN.bufferCount});var tc=u(xs=>{"use strict";var iN=xs&&xs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},nN=W(),sN=C(),oN=_e();function aN(r){var e=arguments.length,t=nN.async;oN.isScheduler(arguments[arguments.length-1])&&(t=arguments[arguments.length-1],e--);var i=null;e>=2&&(i=arguments[1]);var n=Number.POSITIVE_INFINITY;return e>=3&&(n=arguments[2]),function(o){return o.lift(new uN(r,i,n,t))}}xs.bufferTime=aN;var uN=function(){function r(e,t,i,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=i,this.scheduler=n}return r.prototype.call=function(e,t){return t.subscribe(new lN(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},r}(),cN=function(){function r(){this.buffer=[]}return r}(),lN=function(r){iN(e,r);function e(t,i,n,s,o){r.call(this,t),this.bufferTimeSpan=i,this.bufferCreationInterval=n,this.maxBufferSize=s,this.scheduler=o,this.contexts=[];var a=this.openContext();if(this.timespanOnly=n==null||n<0,this.timespanOnly){var c={subscriber:this,context:a,bufferTimeSpan:i};this.add(a.closeAction=o.schedule(cm,i,c))}else{var l={subscriber:this,context:a},f={bufferTimeSpan:i,bufferCreationInterval:n,subscriber:this,scheduler:o};this.add(a.closeAction=o.schedule(lm,i,l)),this.add(o.schedule(fN,n,f))}}return e.prototype._next=function(t){for(var i=this.contexts,n=i.length,s,o=0;o<n;o++){var a=i[o],c=a.buffer;c.push(t),c.length==this.maxBufferSize&&(s=a)}s&&this.onBufferFull(s)},e.prototype._error=function(t){this.contexts.length=0,r.prototype._error.call(this,t)},e.prototype._complete=function(){for(var t=this,i=t.contexts,n=t.destination;i.length>0;){var s=i.shift();n.next(s.buffer)}r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var i=t.closeAction;if(i.unsubscribe(),this.remove(i),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,s={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(cm,n,s))}},e.prototype.openContext=function(){var t=new cN;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var i=this.contexts,n=i?i.indexOf(t):-1;n>=0&&i.splice(i.indexOf(t),1)},e}(sN.Subscriber);function cm(r){var e=r.subscriber,t=r.context;t&&e.closeContext(t),e.closed||(r.context=e.openContext(),r.context.closeAction=this.schedule(r,r.bufferTimeSpan))}function fN(r){var e=r.bufferCreationInterval,t=r.bufferTimeSpan,i=r.subscriber,n=r.scheduler,s=i.openContext(),o=this;i.closed||(i.add(s.closeAction=n.schedule(lm,t,{subscriber:i,context:s})),o.schedule(r,e))}function lm(r){var e=r.subscriber,t=r.context;e.closeContext(t)}});var hm=u(fm=>{"use strict";var hN=W(),pN=_e(),dN=tc();function vN(r){var e=arguments.length,t=hN.async;pN.isScheduler(arguments[arguments.length-1])&&(t=arguments[arguments.length-1],e--);var i=null;e>=2&&(i=arguments[1]);var n=Number.POSITIVE_INFINITY;return e>=3&&(n=arguments[2]),dN.bufferTime(r,i,n,t)(this)}fm.bufferTime=vN});var pm=u(()=>{"use strict";var bN=v(),mN=hm();bN.Observable.prototype.bufferTime=mN.bufferTime});var rc=u(qs=>{"use strict";var yN=qs&&qs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},_N=J(),dm=N(),gN=P();function wN(r,e){return function(i){return i.lift(new SN(r,e))}}qs.bufferToggle=wN;var SN=function(){function r(e,t){this.openings=e,this.closingSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new ON(e,this.openings,this.closingSelector))},r}(),ON=function(r){yN(e,r);function e(t,i,n){r.call(this,t),this.openings=i,this.closingSelector=n,this.contexts=[],this.add(dm.subscribeToResult(this,i))}return e.prototype._next=function(t){for(var i=this.contexts,n=i.length,s=0;s<n;s++)i[s].buffer.push(t)},e.prototype._error=function(t){for(var i=this.contexts;i.length>0;){var n=i.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,r.prototype._error.call(this,t)},e.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var i=t.shift();this.destination.next(i.buffer),i.subscription.unsubscribe(),i.buffer=null,i.subscription=null}this.contexts=null,r.prototype._complete.call(this)},e.prototype.notifyNext=function(t,i,n,s,o){t?this.closeBuffer(t):this.openBuffer(i)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var i=this.closingSelector,n=i.call(this,t);n&&this.trySubscribe(n)}catch(s){this._error(s)}},e.prototype.closeBuffer=function(t){var i=this.contexts;if(i&&t){var n=t.buffer,s=t.subscription;this.destination.next(n),i.splice(i.indexOf(t),1),this.remove(s),s.unsubscribe()}},e.prototype.trySubscribe=function(t){var i=this.contexts,n=[],s=new _N.Subscription,o={buffer:n,subscription:s};i.push(o);var a=dm.subscribeToResult(this,t,o);!a||a.closed?this.closeBuffer(o):(a.context=o,this.add(a),s.add(a))},e}(gN.OuterSubscriber)});var bm=u(vm=>{"use strict";var xN=rc();function qN(r,e){return xN.bufferToggle(r,e)(this)}vm.bufferToggle=qN});var mm=u(()=>{"use strict";var TN=v(),CN=bm();TN.Observable.prototype.bufferToggle=CN.bufferToggle});var ic=u(Ts=>{"use strict";var IN=Ts&&Ts.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},AN=J(),jN=Q(),ym=Y(),EN=P(),kN=N();function RN(r){return function(e){return e.lift(new PN(r))}}Ts.bufferWhen=RN;var PN=function(){function r(e){this.closingSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new NN(e,this.closingSelector))},r}(),NN=function(r){IN(e,r);function e(t,i){r.call(this,t),this.closingSelector=i,this.subscribing=!1,this.openBuffer()}return e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,i,n,s,o){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var i=this.buffer;this.buffer&&this.destination.next(i),this.buffer=[];var n=jN.tryCatch(this.closingSelector)();n===ym.errorObject?this.error(ym.errorObject.e):(t=new AN.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(kN.subscribeToResult(this,n)),this.subscribing=!1)},e}(EN.OuterSubscriber)});var gm=u(_m=>{"use strict";var FN=ic();function MN(r){return FN.bufferWhen(r)(this)}_m.bufferWhen=MN});var wm=u(()=>{"use strict";var UN=v(),ZN=gm();UN.Observable.prototype.bufferWhen=ZN.bufferWhen});var nc=u(Cs=>{"use strict";var LN=Cs&&Cs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},VN=P(),DN=N();function zN(r){return function(t){var i=new WN(r),n=t.lift(i);return i.caught=n}}Cs.catchError=zN;var WN=function(){function r(e){this.selector=e}return r.prototype.call=function(e,t){return t.subscribe(new BN(e,this.selector,this.caught))},r}(),BN=function(r){LN(e,r);function e(t,i,n){r.call(this,t),this.selector=i,this.caught=n}return e.prototype.error=function(t){if(!this.isStopped){var i=void 0;try{i=this.selector(t,this.caught)}catch(n){r.prototype.error.call(this,n);return}this._unsubscribeAndRecycle(),this.add(DN.subscribeToResult(this,i))}},e}(VN.OuterSubscriber)});var Om=u(Sm=>{"use strict";var $N=nc();function HN(r){return $N.catchError(r)(this)}Sm._catch=HN});var Tm=u(()=>{"use strict";var xm=v(),qm=Om();xm.Observable.prototype.catch=qm._catch;xm.Observable.prototype._catch=qm._catch});var sc=u(Cm=>{"use strict";var JN=ni();function YN(r){return function(e){return e.lift(new JN.CombineLatestOperator(r))}}Cm.combineAll=YN});var Am=u(Im=>{"use strict";var KN=sc();function GN(r){return KN.combineAll(r)(this)}Im.combineAll=GN});var jm=u(()=>{"use strict";var XN=v(),QN=Am();XN.Observable.prototype.combineAll=QN.combineAll});var km=u(Em=>{"use strict";var eF=ni();function tF(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return eF.combineLatest.apply(void 0,r)(this)}Em.combineLatest=tF});var Rm=u(()=>{"use strict";var rF=v(),iF=km();rF.Observable.prototype.combineLatest=iF.combineLatest});var ac=u(oc=>{"use strict";var nF=ur(),sF=ur();oc.concatStatic=sF.concat;function oF(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(t){return t.lift.call(nF.concat.apply(void 0,[t].concat(r)))}}oc.concat=oF});var Pm=u(uc=>{"use strict";var aF=ac(),uF=ur();uc.concatStatic=uF.concat;function cF(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return aF.concat.apply(void 0,r)(this)}uc.concat=cF});var Nm=u(()=>{"use strict";var lF=v(),fF=Pm();lF.Observable.prototype.concat=fF.concat});var Mm=u(Fm=>{"use strict";var hF=Hn();function pF(){return hF.concatAll()(this)}Fm.concatAll=pF});var Um=u(()=>{"use strict";var dF=v(),vF=Mm();dF.Observable.prototype.concatAll=vF.concatAll});var Is=u(Zm=>{"use strict";var bF=ar();function mF(r,e){return bF.mergeMap(r,e,1)}Zm.concatMap=mF});var Vm=u(Lm=>{"use strict";var yF=Is();function _F(r,e){return yF.concatMap(r,e)(this)}Lm.concatMap=_F});var Dm=u(()=>{"use strict";var gF=v(),wF=Vm();gF.Observable.prototype.concatMap=wF.concatMap});var cc=u(zm=>{"use strict";var SF=Is();function OF(r,e){return SF.concatMap(function(){return r},e)}zm.concatMapTo=OF});var Bm=u(Wm=>{"use strict";var xF=cc();function qF(r,e){return xF.concatMapTo(r,e)(this)}Wm.concatMapTo=qF});var $m=u(()=>{"use strict";var TF=v(),CF=Bm();TF.Observable.prototype.concatMapTo=CF.concatMapTo});var lc=u(As=>{"use strict";var IF=As&&As.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},AF=C();function jF(r){return function(e){return e.lift(new EF(r,e))}}As.count=jF;var EF=function(){function r(e,t){this.predicate=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new kF(e,this.predicate,this.source))},r}(),kF=function(r){IF(e,r);function e(t,i,n){r.call(this,t),this.predicate=i,this.source=n,this.count=0,this.index=0}return e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var i;try{i=this.predicate(t,this.index++,this.source)}catch(n){this.destination.error(n);return}i&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(AF.Subscriber)});var Jm=u(Hm=>{"use strict";var RF=lc();function PF(r){return RF.count(r)(this)}Hm.count=PF});var Ym=u(()=>{"use strict";var NF=v(),FF=Jm();NF.Observable.prototype.count=FF.count});var fc=u(js=>{"use strict";var MF=js&&js.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},UF=C();function ZF(){return function(e){return e.lift(new LF)}}js.dematerialize=ZF;var LF=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new VF(e))},r}(),VF=function(r){MF(e,r);function e(t){r.call(this,t)}return e.prototype._next=function(t){t.observe(this.destination)},e}(UF.Subscriber)});var Gm=u(Km=>{"use strict";var DF=fc();function zF(){return DF.dematerialize()(this)}Km.dematerialize=zF});var Xm=u(()=>{"use strict";var WF=v(),BF=Gm();WF.Observable.prototype.dematerialize=BF.dematerialize});var hc=u(Es=>{"use strict";var $F=Es&&Es.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},HF=P(),JF=N();function YF(r){return function(e){return e.lift(new KF(r))}}Es.debounce=YF;var KF=function(){function r(e){this.durationSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new GF(e,this.durationSelector))},r}(),GF=function(r){$F(e,r);function e(t,i){r.call(this,t),this.durationSelector=i,this.hasValue=!1,this.durationSubscription=null}return e.prototype._next=function(t){try{var i=this.durationSelector.call(this,t);i&&this._tryNext(t,i)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,i){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),n=JF.subscribeToResult(this,i),n.closed||this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(t,i,n,s,o){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var t=this.value,i=this.durationSubscription;i&&(this.durationSubscription=null,i.unsubscribe(),this.remove(i)),this.value=null,this.hasValue=!1,r.prototype._next.call(this,t)}},e}(HF.OuterSubscriber)});var ey=u(Qm=>{"use strict";var XF=hc();function QF(r){return XF.debounce(r)(this)}Qm.debounce=QF});var ty=u(()=>{"use strict";var eM=v(),tM=ey();eM.Observable.prototype.debounce=tM.debounce});var pc=u(ks=>{"use strict";var rM=ks&&ks.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},iM=C(),nM=W();function sM(r,e){return e===void 0&&(e=nM.async),function(t){return t.lift(new oM(r,e))}}ks.debounceTime=sM;var oM=function(){function r(e,t){this.dueTime=e,this.scheduler=t}return r.prototype.call=function(e,t){return t.subscribe(new aM(e,this.dueTime,this.scheduler))},r}(),aM=function(r){rM(e,r);function e(t,i,n){r.call(this,t),this.dueTime=i,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}return e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(uM,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){this.clearDebounce(),this.hasValue&&(this.destination.next(this.lastValue),this.lastValue=null,this.hasValue=!1)},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;t!==null&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(iM.Subscriber);function uM(r){r.debouncedNext()}});var iy=u(ry=>{"use strict";var cM=W(),lM=pc();function fM(r,e){return e===void 0&&(e=cM.async),lM.debounceTime(r,e)(this)}ry.debounceTime=fM});var ny=u(()=>{"use strict";var hM=v(),pM=iy();hM.Observable.prototype.debounceTime=pM.debounceTime});var Ps=u(Rs=>{"use strict";var dM=Rs&&Rs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},vM=C();function bM(r){return r===void 0&&(r=null),function(e){return e.lift(new mM(r))}}Rs.defaultIfEmpty=bM;var mM=function(){function r(e){this.defaultValue=e}return r.prototype.call=function(e,t){return t.subscribe(new yM(e,this.defaultValue))},r}(),yM=function(r){dM(e,r);function e(t,i){r.call(this,t),this.defaultValue=i,this.isEmpty=!0}return e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(vM.Subscriber)});var oy=u(sy=>{"use strict";var _M=Ps();function gM(r){return r===void 0&&(r=null),_M.defaultIfEmpty(r)(this)}sy.defaultIfEmpty=gM});var ay=u(()=>{"use strict";var wM=v(),SM=oy();wM.Observable.prototype.defaultIfEmpty=SM.defaultIfEmpty});var dc=u(Ns=>{"use strict";var OM=Ns&&Ns.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},xM=W(),qM=ci(),TM=C(),uy=sr();function CM(r,e){e===void 0&&(e=xM.async);var t=qM.isDate(r),i=t?+r-e.now():Math.abs(r);return function(n){return n.lift(new IM(i,e))}}Ns.delay=CM;var IM=function(){function r(e,t){this.delay=e,this.scheduler=t}return r.prototype.call=function(e,t){return t.subscribe(new AM(e,this.delay,this.scheduler))},r}(),AM=function(r){OM(e,r);function e(t,i,n){r.call(this,t),this.delay=i,this.scheduler=n,this.queue=[],this.active=!1,this.errored=!1}return e.dispatch=function(t){for(var i=t.source,n=i.queue,s=t.scheduler,o=t.destination;n.length>0&&n[0].time-s.now()<=0;)n.shift().notification.observe(o);if(n.length>0){var a=Math.max(0,n[0].time-s.now());this.schedule(t,a)}else this.unsubscribe(),i.active=!1},e.prototype._schedule=function(t){this.active=!0,this.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(this.errored!==!0){var i=this.scheduler,n=new jM(i.now()+this.delay,t);this.queue.push(n),this.active===!1&&this._schedule(i)}},e.prototype._next=function(t){this.scheduleNotification(uy.Notification.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t)},e.prototype._complete=function(){this.scheduleNotification(uy.Notification.createComplete())},e}(TM.Subscriber),jM=function(){function r(e,t){this.time=e,this.notification=t}return r}()});var ly=u(cy=>{"use strict";var EM=W(),kM=dc();function RM(r,e){return e===void 0&&(e=EM.async),kM.delay(r,e)(this)}cy.delay=RM});var fy=u(()=>{"use strict";var PM=v(),NM=ly();PM.Observable.prototype.delay=NM.delay});var bc=u(Fs=>{"use strict";var vc=Fs&&Fs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},FM=C(),MM=v(),UM=P(),ZM=N();function LM(r,e){return e?function(t){return new DM(t,e).lift(new hy(r))}:function(t){return t.lift(new hy(r))}}Fs.delayWhen=LM;var hy=function(){function r(e){this.delayDurationSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new VM(e,this.delayDurationSelector))},r}(),VM=function(r){vc(e,r);function e(t,i){r.call(this,t),this.delayDurationSelector=i,this.completed=!1,this.delayNotifierSubscriptions=[],this.values=[]}return e.prototype.notifyNext=function(t,i,n,s,o){this.destination.next(t),this.removeSubscription(o),this.tryComplete()},e.prototype.notifyError=function(t,i){this._error(t)},e.prototype.notifyComplete=function(t){var i=this.removeSubscription(t);i&&this.destination.next(i),this.tryComplete()},e.prototype._next=function(t){try{var i=this.delayDurationSelector(t);i&&this.tryDelay(i,t)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete()},e.prototype.removeSubscription=function(t){t.unsubscribe();var i=this.delayNotifierSubscriptions.indexOf(t),n=null;return i!==-1&&(n=this.values[i],this.delayNotifierSubscriptions.splice(i,1),this.values.splice(i,1)),n},e.prototype.tryDelay=function(t,i){var n=ZM.subscribeToResult(this,t,i);n&&!n.closed&&(this.add(n),this.delayNotifierSubscriptions.push(n)),this.values.push(i)},e.prototype.tryComplete=function(){this.completed&&this.delayNotifierSubscriptions.length===0&&this.destination.complete()},e}(UM.OuterSubscriber),DM=function(r){vc(e,r);function e(t,i){r.call(this),this.source=t,this.subscriptionDelay=i}return e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new zM(t,this.source))},e}(MM.Observable),zM=function(r){vc(e,r);function e(t,i){r.call(this),this.parent=t,this.source=i,this.sourceSubscribed=!1}return e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(FM.Subscriber)});var dy=u(py=>{"use strict";var WM=bc();function BM(r,e){return WM.delayWhen(r,e)(this)}py.delayWhen=BM});var vy=u(()=>{"use strict";var $M=v(),HM=dy();$M.Observable.prototype.delayWhen=HM.delayWhen});var my=u(mc=>{"use strict";var JM=se();function by(){return function(){function r(){this._values=[]}return r.prototype.add=function(e){this.has(e)||this._values.push(e)},r.prototype.has=function(e){return this._values.indexOf(e)!==-1},Object.defineProperty(r.prototype,"size",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),r.prototype.clear=function(){this._values.length=0},r}()}mc.minimalSetImpl=by;mc.Set=JM.root.Set||by()});var yc=u(di=>{"use strict";var YM=di&&di.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},KM=P(),GM=N(),XM=my();function QM(r,e){return function(t){return t.lift(new eU(r,e))}}di.distinct=QM;var eU=function(){function r(e,t){this.keySelector=e,this.flushes=t}return r.prototype.call=function(e,t){return t.subscribe(new yy(e,this.keySelector,this.flushes))},r}(),yy=function(r){YM(e,r);function e(t,i,n){r.call(this,t),this.keySelector=i,this.values=new XM.Set,n&&this.add(GM.subscribeToResult(this,n))}return e.prototype.notifyNext=function(t,i,n,s,o){this.values.clear()},e.prototype.notifyError=function(t,i){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var i,n=this.destination;try{i=this.keySelector(t)}catch(s){n.error(s);return}this._finalizeNext(i,t)},e.prototype._finalizeNext=function(t,i){var n=this.values;n.has(t)||(n.add(t),this.destination.next(i))},e}(KM.OuterSubscriber);di.DistinctSubscriber=yy});var gy=u(_y=>{"use strict";var tU=yc();function rU(r,e){return tU.distinct(r,e)(this)}_y.distinct=rU});var wy=u(()=>{"use strict";var iU=v(),nU=gy();iU.Observable.prototype.distinct=nU.distinct});var Zs=u(Us=>{"use strict";var sU=Us&&Us.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},oU=C(),Sy=Q(),Ms=Y();function aU(r,e){return function(t){return t.lift(new uU(r,e))}}Us.distinctUntilChanged=aU;var uU=function(){function r(e,t){this.compare=e,this.keySelector=t}return r.prototype.call=function(e,t){return t.subscribe(new cU(e,this.compare,this.keySelector))},r}(),cU=function(r){sU(e,r);function e(t,i,n){r.call(this,t),this.keySelector=n,this.hasKey=!1,typeof i=="function"&&(this.compare=i)}return e.prototype.compare=function(t,i){return t===i},e.prototype._next=function(t){var i=this.keySelector,n=t;if(i&&(n=Sy.tryCatch(this.keySelector)(t),n===Ms.errorObject))return this.destination.error(Ms.errorObject.e);var s=!1;if(this.hasKey){if(s=Sy.tryCatch(this.compare)(this.key,n),s===Ms.errorObject)return this.destination.error(Ms.errorObject.e)}else this.hasKey=!0;s||(this.key=n,this.destination.next(t))},e}(oU.Subscriber)});var xy=u(Oy=>{"use strict";var lU=Zs();function fU(r,e){return lU.distinctUntilChanged(r,e)(this)}Oy.distinctUntilChanged=fU});var qy=u(()=>{"use strict";var hU=v(),pU=xy();hU.Observable.prototype.distinctUntilChanged=pU.distinctUntilChanged});var _c=u(Ty=>{"use strict";var dU=Zs();function vU(r,e){return dU.distinctUntilChanged(function(t,i){return e?e(t[r],i[r]):t[r]===i[r]})}Ty.distinctUntilKeyChanged=vU});var Iy=u(Cy=>{"use strict";var bU=_c();function mU(r,e){return bU.distinctUntilKeyChanged(r,e)(this)}Cy.distinctUntilKeyChanged=mU});var Ay=u(()=>{"use strict";var yU=v(),_U=Iy();yU.Observable.prototype.distinctUntilKeyChanged=_U.distinctUntilKeyChanged});var gc=u(Ls=>{"use strict";var gU=Ls&&Ls.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},jy=C();function wU(r,e,t){return function(n){return n.lift(new SU(r,e,t))}}Ls.tap=wU;var SU=function(){function r(e,t,i){this.nextOrObserver=e,this.error=t,this.complete=i}return r.prototype.call=function(e,t){return t.subscribe(new OU(e,this.nextOrObserver,this.error,this.complete))},r}(),OU=function(r){gU(e,r);function e(t,i,n,s){r.call(this,t);var o=new jy.Subscriber(i,n,s);o.syncErrorThrowable=!0,this.add(o),this.safeSubscriber=o}return e.prototype._next=function(t){var i=this.safeSubscriber;i.next(t),i.syncErrorThrown?this.destination.error(i.syncErrorValue):this.destination.next(t)},e.prototype._error=function(t){var i=this.safeSubscriber;i.error(t),i.syncErrorThrown?this.destination.error(i.syncErrorValue):this.destination.error(t)},e.prototype._complete=function(){var t=this.safeSubscriber;t.complete(),t.syncErrorThrown?this.destination.error(t.syncErrorValue):this.destination.complete()},e}(jy.Subscriber)});var ky=u(Ey=>{"use strict";var xU=gc();function qU(r,e,t){return xU.tap(r,e,t)(this)}Ey._do=qU});var Ny=u(()=>{"use strict";var Ry=v(),Py=ky();Ry.Observable.prototype.do=Py._do;Ry.Observable.prototype._do=Py._do});var wc=u(Vs=>{"use strict";var TU=Vs&&Vs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},CU=P(),IU=N();function AU(){return function(r){return r.lift(new jU)}}Vs.exhaust=AU;var jU=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new EU(e))},r}(),EU=function(r){TU(e,r);function e(t){r.call(this,t),this.hasCompleted=!1,this.hasSubscription=!1}return e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(IU.subscribeToResult(this,t)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(CU.OuterSubscriber)});var My=u(Fy=>{"use strict";var kU=wc();function RU(){return kU.exhaust()(this)}Fy.exhaust=RU});var Uy=u(()=>{"use strict";var PU=v(),NU=My();PU.Observable.prototype.exhaust=NU.exhaust});var Sc=u(Ds=>{"use strict";var FU=Ds&&Ds.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},MU=P(),UU=N();function ZU(r,e){return function(t){return t.lift(new LU(r,e))}}Ds.exhaustMap=ZU;var LU=function(){function r(e,t){this.project=e,this.resultSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new VU(e,this.project,this.resultSelector))},r}(),VU=function(r){FU(e,r);function e(t,i,n){r.call(this,t),this.project=i,this.resultSelector=n,this.hasSubscription=!1,this.hasCompleted=!1,this.index=0}return e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var i=this.index++,n=this.destination;try{var s=this.project(t,i);this.hasSubscription=!0,this.add(UU.subscribeToResult(this,s,t,i))}catch(o){n.error(o)}},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){var a=this,c=a.resultSelector,l=a.destination;c?this.trySelectResult(t,i,n,s):l.next(i)},e.prototype.trySelectResult=function(t,i,n,s){var o=this,a=o.resultSelector,c=o.destination;try{var l=a(t,i,n,s);c.next(l)}catch(f){c.error(f)}},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(MU.OuterSubscriber)});var Ly=u(Zy=>{"use strict";var DU=Sc();function zU(r,e){return DU.exhaustMap(r,e)(this)}Zy.exhaustMap=zU});var Vy=u(()=>{"use strict";var WU=v(),BU=Ly();WU.Observable.prototype.exhaustMap=BU.exhaustMap});var Oc=u(vr=>{"use strict";var $U=vr&&vr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},HU=Q(),Dy=Y(),JU=P(),YU=N();function KU(r,e,t){return e===void 0&&(e=Number.POSITIVE_INFINITY),t===void 0&&(t=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(i){return i.lift(new zy(r,e,t))}}vr.expand=KU;var zy=function(){function r(e,t,i){this.project=e,this.concurrent=t,this.scheduler=i}return r.prototype.call=function(e,t){return t.subscribe(new Wy(e,this.project,this.concurrent,this.scheduler))},r}();vr.ExpandOperator=zy;var Wy=function(r){$U(e,r);function e(t,i,n,s){r.call(this,t),this.project=i,this.concurrent=n,this.scheduler=s,this.index=0,this.active=0,this.hasCompleted=!1,n<Number.POSITIVE_INFINITY&&(this.buffer=[])}return e.dispatch=function(t){var i=t.subscriber,n=t.result,s=t.value,o=t.index;i.subscribeToProjection(n,s,o)},e.prototype._next=function(t){var i=this.destination;if(i.closed){this._complete();return}var n=this.index++;if(this.active<this.concurrent){i.next(t);var s=HU.tryCatch(this.project)(t,n);if(s===Dy.errorObject)i.error(Dy.errorObject.e);else if(!this.scheduler)this.subscribeToProjection(s,t,n);else{var o={subscriber:this,result:s,value:t,index:n};this.add(this.scheduler.schedule(e.dispatch,0,o))}}else this.buffer.push(t)},e.prototype.subscribeToProjection=function(t,i,n){this.active++,this.add(YU.subscribeToResult(this,t,i,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&this.active===0&&this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){this._next(i)},e.prototype.notifyComplete=function(t){var i=this.buffer;this.remove(t),this.active--,i&&i.length>0&&this._next(i.shift()),this.hasCompleted&&this.active===0&&this.destination.complete()},e}(JU.OuterSubscriber);vr.ExpandSubscriber=Wy});var $y=u(By=>{"use strict";var GU=Oc();function XU(r,e,t){return e===void 0&&(e=Number.POSITIVE_INFINITY),t===void 0&&(t=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,GU.expand(r,e,t)(this)}By.expand=XU});var Hy=u(()=>{"use strict";var QU=v(),eZ=$y();QU.Observable.prototype.expand=eZ.expand});var br=u(zs=>{"use strict";var tZ=zs&&zs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},rZ=function(r){tZ(e,r);function e(){var t=r.call(this,"argument out of range");this.name=t.name="ArgumentOutOfRangeError",this.stack=t.stack,this.message=t.message}return e}(Error);zs.ArgumentOutOfRangeError=rZ});var xc=u(Ws=>{"use strict";var iZ=Ws&&Ws.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},nZ=C(),Jy=br();function sZ(r,e){return function(t){return t.lift(new oZ(r,e))}}Ws.elementAt=sZ;var oZ=function(){function r(e,t){if(this.index=e,this.defaultValue=t,e<0)throw new Jy.ArgumentOutOfRangeError}return r.prototype.call=function(e,t){return t.subscribe(new aZ(e,this.index,this.defaultValue))},r}(),aZ=function(r){iZ(e,r);function e(t,i,n){r.call(this,t),this.index=i,this.defaultValue=n}return e.prototype._next=function(t){this.index--===0&&(this.destination.next(t),this.destination.complete())},e.prototype._complete=function(){var t=this.destination;this.index>=0&&(typeof this.defaultValue!="undefined"?t.next(this.defaultValue):t.error(new Jy.ArgumentOutOfRangeError)),t.complete()},e}(nZ.Subscriber)});var Ky=u(Yy=>{"use strict";var uZ=xc();function cZ(r,e){return uZ.elementAt(r,e)(this)}Yy.elementAt=cZ});var Gy=u(()=>{"use strict";var lZ=v(),fZ=Ky();lZ.Observable.prototype.elementAt=fZ.elementAt});var $s=u(Bs=>{"use strict";var hZ=Bs&&Bs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},pZ=C();function dZ(r,e){return function(i){return i.lift(new vZ(r,e))}}Bs.filter=dZ;var vZ=function(){function r(e,t){this.predicate=e,this.thisArg=t}return r.prototype.call=function(e,t){return t.subscribe(new bZ(e,this.predicate,this.thisArg))},r}(),bZ=function(r){hZ(e,r);function e(t,i,n){r.call(this,t),this.predicate=i,this.thisArg=n,this.count=0}return e.prototype._next=function(t){var i;try{i=this.predicate.call(this.thisArg,t,this.count++)}catch(n){this.destination.error(n);return}i&&this.destination.next(t)},e}(pZ.Subscriber)});var Qy=u(Xy=>{"use strict";var mZ=$s();function yZ(r,e){return mZ.filter(r,e)(this)}Xy.filter=yZ});var e_=u(()=>{"use strict";var _Z=v(),gZ=Qy();_Z.Observable.prototype.filter=gZ.filter});var qc=u(Hs=>{"use strict";var wZ=Hs&&Hs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},SZ=C(),OZ=J();function xZ(r){return function(e){return e.lift(new qZ(r))}}Hs.finalize=xZ;var qZ=function(){function r(e){this.callback=e}return r.prototype.call=function(e,t){return t.subscribe(new TZ(e,this.callback))},r}(),TZ=function(r){wZ(e,r);function e(t,i){r.call(this,t),this.add(new OZ.Subscription(i))}return e}(SZ.Subscriber)});var r_=u(t_=>{"use strict";var CZ=qc();function IZ(r){return CZ.finalize(r)(this)}t_._finally=IZ});var s_=u(()=>{"use strict";var i_=v(),n_=r_();i_.Observable.prototype.finally=n_._finally;i_.Observable.prototype._finally=n_._finally});var Js=u(mr=>{"use strict";var AZ=mr&&mr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},jZ=C();function EZ(r,e){if(typeof r!="function")throw new TypeError("predicate is not a function");return function(t){return t.lift(new o_(r,t,!1,e))}}mr.find=EZ;var o_=function(){function r(e,t,i,n){this.predicate=e,this.source=t,this.yieldIndex=i,this.thisArg=n}return r.prototype.call=function(e,t){return t.subscribe(new a_(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},r}();mr.FindValueOperator=o_;var a_=function(r){AZ(e,r);function e(t,i,n,s,o){r.call(this,t),this.predicate=i,this.source=n,this.yieldIndex=s,this.thisArg=o,this.index=0}return e.prototype.notifyComplete=function(t){var i=this.destination;i.next(t),i.complete()},e.prototype._next=function(t){var i=this,n=i.predicate,s=i.thisArg,o=this.index++;try{var a=n.call(s||this,t,o,this.source);a&&this.notifyComplete(this.yieldIndex?o:t)}catch(c){this.destination.error(c)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(jZ.Subscriber);mr.FindValueSubscriber=a_});var c_=u(u_=>{"use strict";var kZ=Js();function RZ(r,e){return kZ.find(r,e)(this)}u_.find=RZ});var l_=u(()=>{"use strict";var PZ=v(),NZ=c_();PZ.Observable.prototype.find=NZ.find});var Tc=u(f_=>{"use strict";var FZ=Js();function MZ(r,e){return function(t){return t.lift(new FZ.FindValueOperator(r,t,!0,e))}}f_.findIndex=MZ});var p_=u(h_=>{"use strict";var UZ=Tc();function ZZ(r,e){return UZ.findIndex(r,e)(this)}h_.findIndex=ZZ});var d_=u(()=>{"use strict";var LZ=v(),VZ=p_();LZ.Observable.prototype.findIndex=VZ.findIndex});var vi=u(Ys=>{"use strict";var DZ=Ys&&Ys.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},zZ=function(r){DZ(e,r);function e(){var t=r.call(this,"no elements in sequence");this.name=t.name="EmptyError",this.stack=t.stack,this.message=t.message}return e}(Error);Ys.EmptyError=zZ});var Cc=u(Ks=>{"use strict";var WZ=Ks&&Ks.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},BZ=C(),$Z=vi();function HZ(r,e,t){return function(i){return i.lift(new JZ(r,e,t,i))}}Ks.first=HZ;var JZ=function(){function r(e,t,i,n){this.predicate=e,this.resultSelector=t,this.defaultValue=i,this.source=n}return r.prototype.call=function(e,t){return t.subscribe(new YZ(e,this.predicate,this.resultSelector,this.defaultValue,this.source))},r}(),YZ=function(r){WZ(e,r);function e(t,i,n,s,o){r.call(this,t),this.predicate=i,this.resultSelector=n,this.defaultValue=s,this.source=o,this.index=0,this.hasCompleted=!1,this._emitted=!1}return e.prototype._next=function(t){var i=this.index++;this.predicate?this._tryPredicate(t,i):this._emit(t,i)},e.prototype._tryPredicate=function(t,i){var n;try{n=this.predicate(t,i,this.source)}catch(s){this.destination.error(s);return}n&&this._emit(t,i)},e.prototype._emit=function(t,i){if(this.resultSelector){this._tryResultSelector(t,i);return}this._emitFinal(t)},e.prototype._tryResultSelector=function(t,i){var n;try{n=this.resultSelector(t,i)}catch(s){this.destination.error(s);return}this._emitFinal(n)},e.prototype._emitFinal=function(t){var i=this.destination;this._emitted||(this._emitted=!0,i.next(t),i.complete(),this.hasCompleted=!0)},e.prototype._complete=function(){var t=this.destination;!this.hasCompleted&&typeof this.defaultValue!="undefined"?(t.next(this.defaultValue),t.complete()):this.hasCompleted||t.error(new $Z.EmptyError)},e}(BZ.Subscriber)});var b_=u(v_=>{"use strict";var KZ=Cc();function GZ(r,e,t){return KZ.first(r,e,t)(this)}v_.first=GZ});var m_=u(()=>{"use strict";var XZ=v(),QZ=b_();XZ.Observable.prototype.first=QZ.first});var __=u(y_=>{"use strict";var eL=function(){function r(){this.size=0,this._values=[],this._keys=[]}return r.prototype.get=function(e){var t=this._keys.indexOf(e);return t===-1?void 0:this._values[t]},r.prototype.set=function(e,t){var i=this._keys.indexOf(e);return i===-1?(this._keys.push(e),this._values.push(t),this.size++):this._values[i]=t,this},r.prototype.delete=function(e){var t=this._keys.indexOf(e);return t===-1?!1:(this._values.splice(t,1),this._keys.splice(t,1),this.size--,!0)},r.prototype.clear=function(){this._keys.length=0,this._values.length=0,this.size=0},r.prototype.forEach=function(e,t){for(var i=0;i<this.size;i++)e.call(t,this._values[i],this._keys[i])},r}();y_.MapPolyfill=eL});var w_=u(g_=>{"use strict";var tL=se(),rL=__();g_.Map=tL.root.Map||function(){return rL.MapPolyfill}()});var O_=u(S_=>{"use strict";var iL=function(){function r(){this.values={}}return r.prototype.delete=function(e){return this.values[e]=null,!0},r.prototype.set=function(e,t){return this.values[e]=t,this},r.prototype.get=function(e){return this.values[e]},r.prototype.forEach=function(e,t){var i=this.values;for(var n in i)i.hasOwnProperty(n)&&i[n]!==null&&e.call(t,i[n],n)},r.prototype.clear=function(){this.values={}},r}();S_.FastMap=iL});var Ac=u(bi=>{"use strict";var Gs=bi&&bi.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},x_=C(),q_=J(),nL=v(),sL=K(),oL=w_(),aL=O_();function uL(r,e,t,i){return function(n){return n.lift(new cL(r,e,t,i))}}bi.groupBy=uL;var cL=function(){function r(e,t,i,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=i,this.subjectSelector=n}return r.prototype.call=function(e,t){return t.subscribe(new lL(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},r}(),lL=function(r){Gs(e,r);function e(t,i,n,s,o){r.call(this,t),this.keySelector=i,this.elementSelector=n,this.durationSelector=s,this.subjectSelector=o,this.groups=null,this.attemptedToUnsubscribe=!1,this.count=0}return e.prototype._next=function(t){var i;try{i=this.keySelector(t)}catch(n){this.error(n);return}this._group(t,i)},e.prototype._group=function(t,i){var n=this.groups;n||(n=this.groups=typeof i=="string"?new aL.FastMap:new oL.Map);var s=n.get(i),o;if(this.elementSelector)try{o=this.elementSelector(t)}catch(l){this.error(l)}else o=t;if(!s){s=this.subjectSelector?this.subjectSelector():new sL.Subject,n.set(i,s);var a=new Ic(i,s,this);if(this.destination.next(a),this.durationSelector){var c=void 0;try{c=this.durationSelector(new Ic(i,s))}catch(l){this.error(l);return}this.add(c.subscribe(new fL(i,s,this)))}}s.closed||s.next(o)},e.prototype._error=function(t){var i=this.groups;i&&(i.forEach(function(n,s){n.error(t)}),i.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach(function(i,n){i.complete()}),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,this.count===0&&r.prototype.unsubscribe.call(this))},e}(x_.Subscriber),fL=function(r){Gs(e,r);function e(t,i,n){r.call(this,i),this.key=t,this.group=i,this.parent=n}return e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this,i=t.parent,n=t.key;this.key=this.parent=null,i&&i.removeGroup(n)},e}(x_.Subscriber),Ic=function(r){Gs(e,r);function e(t,i,n){r.call(this),this.key=t,this.groupSubject=i,this.refCountSubscription=n}return e.prototype._subscribe=function(t){var i=new q_.Subscription,n=this,s=n.refCountSubscription,o=n.groupSubject;return s&&!s.closed&&i.add(new hL(s)),i.add(o.subscribe(t)),i},e}(nL.Observable);bi.GroupedObservable=Ic;var hL=function(r){Gs(e,r);function e(t){r.call(this),this.parent=t,t.count++}return e.prototype.unsubscribe=function(){var t=this.parent;!t.closed&&!this.closed&&(r.prototype.unsubscribe.call(this),t.count-=1,t.count===0&&t.attemptedToUnsubscribe&&t.unsubscribe())},e}(q_.Subscription)});var C_=u(jc=>{"use strict";var T_=Ac();jc.GroupedObservable=T_.GroupedObservable;function pL(r,e,t,i){return T_.groupBy(r,e,t,i)(this)}jc.groupBy=pL});var I_=u(()=>{"use strict";var dL=v(),vL=C_();dL.Observable.prototype.groupBy=vL.groupBy});var Ec=u(Xs=>{"use strict";var bL=Xs&&Xs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},mL=C(),yL=Cn();function _L(){return function(e){return e.lift(new gL)}}Xs.ignoreElements=_L;var gL=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new wL(e))},r}(),wL=function(r){bL(e,r);function e(){r.apply(this,arguments)}return e.prototype._next=function(t){yL.noop()},e}(mL.Subscriber)});var j_=u(A_=>{"use strict";var SL=Ec();function OL(){return SL.ignoreElements()(this)}A_.ignoreElements=OL});var E_=u(()=>{"use strict";var xL=v(),qL=j_();xL.Observable.prototype.ignoreElements=qL.ignoreElements});var kc=u(Qs=>{"use strict";var TL=Qs&&Qs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},CL=C();function IL(){return function(r){return r.lift(new AL)}}Qs.isEmpty=IL;var AL=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new jL(e))},r}(),jL=function(r){TL(e,r);function e(t){r.call(this,t)}return e.prototype.notifyComplete=function(t){var i=this.destination;i.next(t),i.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(CL.Subscriber)});var R_=u(k_=>{"use strict";var EL=kc();function kL(){return EL.isEmpty()(this)}k_.isEmpty=kL});var P_=u(()=>{"use strict";var RL=v(),PL=R_();RL.Observable.prototype.isEmpty=PL.isEmpty});var to=u(eo=>{"use strict";var NL=eo&&eo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},FL=Q(),N_=Y(),ML=P(),UL=N();function ZL(r){return function(t){return t.lift(new LL(r))}}eo.audit=ZL;var LL=function(){function r(e){this.durationSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new VL(e,this.durationSelector))},r}(),VL=function(r){NL(e,r);function e(t,i){r.call(this,t),this.durationSelector=i,this.hasValue=!1}return e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var i=FL.tryCatch(this.durationSelector)(t);if(i===N_.errorObject)this.destination.error(N_.errorObject.e);else{var n=UL.subscribeToResult(this,i);n.closed?this.clearThrottle():this.add(this.throttled=n)}}},e.prototype.clearThrottle=function(){var t=this,i=t.value,n=t.hasValue,s=t.throttled;s&&(this.remove(s),this.throttled=null,s.unsubscribe()),n&&(this.value=null,this.hasValue=!1,this.destination.next(i))},e.prototype.notifyNext=function(t,i,n,s){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(ML.OuterSubscriber)});var M_=u(F_=>{"use strict";var DL=to();function zL(r){return DL.audit(r)(this)}F_.audit=zL});var U_=u(()=>{"use strict";var WL=v(),BL=M_();WL.Observable.prototype.audit=BL.audit});var Rc=u(Z_=>{"use strict";var $L=W(),HL=to(),JL=Yu();function YL(r,e){return e===void 0&&(e=$L.async),HL.audit(function(){return JL.timer(r,e)})}Z_.auditTime=YL});var V_=u(L_=>{"use strict";var KL=W(),GL=Rc();function XL(r,e){return e===void 0&&(e=KL.async),GL.auditTime(r,e)(this)}L_.auditTime=XL});var D_=u(()=>{"use strict";var QL=v(),eV=V_();QL.Observable.prototype.auditTime=eV.auditTime});var Pc=u(ro=>{"use strict";var tV=ro&&ro.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},rV=C(),iV=vi();function nV(r,e,t){return function(i){return i.lift(new sV(r,e,t,i))}}ro.last=nV;var sV=function(){function r(e,t,i,n){this.predicate=e,this.resultSelector=t,this.defaultValue=i,this.source=n}return r.prototype.call=function(e,t){return t.subscribe(new oV(e,this.predicate,this.resultSelector,this.defaultValue,this.source))},r}(),oV=function(r){tV(e,r);function e(t,i,n,s,o){r.call(this,t),this.predicate=i,this.resultSelector=n,this.defaultValue=s,this.source=o,this.hasValue=!1,this.index=0,typeof s!="undefined"&&(this.lastValue=s,this.hasValue=!0)}return e.prototype._next=function(t){var i=this.index++;if(this.predicate)this._tryPredicate(t,i);else{if(this.resultSelector){this._tryResultSelector(t,i);return}this.lastValue=t,this.hasValue=!0}},e.prototype._tryPredicate=function(t,i){var n;try{n=this.predicate(t,i,this.source)}catch(s){this.destination.error(s);return}if(n){if(this.resultSelector){this._tryResultSelector(t,i);return}this.lastValue=t,this.hasValue=!0}},e.prototype._tryResultSelector=function(t,i){var n;try{n=this.resultSelector(t,i)}catch(s){this.destination.error(s);return}this.lastValue=n,this.hasValue=!0},e.prototype._complete=function(){var t=this.destination;this.hasValue?(t.next(this.lastValue),t.complete()):t.error(new iV.EmptyError)},e}(rV.Subscriber)});var W_=u(z_=>{"use strict";var aV=Pc();function uV(r,e,t){return aV.last(r,e,t)(this)}z_.last=uV});var B_=u(()=>{"use strict";var cV=v(),lV=W_();cV.Observable.prototype.last=lV.last});var H_=u($_=>{"use strict";function fV(r){return r(this)}$_.letProto=fV});var K_=u(()=>{"use strict";var J_=v(),Y_=H_();J_.Observable.prototype.let=Y_.letProto;J_.Observable.prototype.letBind=Y_.letProto});var Nc=u(io=>{"use strict";var hV=io&&io.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},pV=C();function dV(r,e){return function(t){return t.lift(new vV(r,e,t))}}io.every=dV;var vV=function(){function r(e,t,i){this.predicate=e,this.thisArg=t,this.source=i}return r.prototype.call=function(e,t){return t.subscribe(new bV(e,this.predicate,this.thisArg,this.source))},r}(),bV=function(r){hV(e,r);function e(t,i,n,s){r.call(this,t),this.predicate=i,this.thisArg=n,this.source=s,this.index=0,this.thisArg=n||this}return e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var i=!1;try{i=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(n){this.destination.error(n);return}i||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(pV.Subscriber)});var X_=u(G_=>{"use strict";var mV=Nc();function yV(r,e){return mV.every(r,e)(this)}G_.every=yV});var Q_=u(()=>{"use strict";var _V=v(),gV=X_();_V.Observable.prototype.every=gV.every});var tg=u(eg=>{"use strict";var wV=pr();function SV(r,e){return wV.map(r,e)(this)}eg.map=SV});var rg=u(()=>{"use strict";var OV=v(),xV=tg();OV.Observable.prototype.map=xV.map});var Fc=u(no=>{"use strict";var qV=no&&no.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},TV=C();function CV(r){return function(e){return e.lift(new IV(r))}}no.mapTo=CV;var IV=function(){function r(e){this.value=e}return r.prototype.call=function(e,t){return t.subscribe(new AV(e,this.value))},r}(),AV=function(r){qV(e,r);function e(t,i){r.call(this,t),this.value=i}return e.prototype._next=function(t){this.destination.next(this.value)},e}(TV.Subscriber)});var ng=u(ig=>{"use strict";var jV=Fc();function EV(r){return jV.mapTo(r)(this)}ig.mapTo=EV});var sg=u(()=>{"use strict";var kV=v(),RV=ng();kV.Observable.prototype.mapTo=RV.mapTo});var Uc=u(so=>{"use strict";var PV=so&&so.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},NV=C(),Mc=sr();function FV(){return function(e){return e.lift(new MV)}}so.materialize=FV;var MV=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new UV(e))},r}(),UV=function(r){PV(e,r);function e(t){r.call(this,t)}return e.prototype._next=function(t){this.destination.next(Mc.Notification.createNext(t))},e.prototype._error=function(t){var i=this.destination;i.next(Mc.Notification.createError(t)),i.complete()},e.prototype._complete=function(){var t=this.destination;t.next(Mc.Notification.createComplete()),t.complete()},e}(NV.Subscriber)});var ag=u(og=>{"use strict";var ZV=Uc();function LV(){return ZV.materialize()(this)}og.materialize=LV});var ug=u(()=>{"use strict";var VV=v(),DV=ag();VV.Observable.prototype.materialize=DV.materialize});var ao=u(oo=>{"use strict";var zV=oo&&oo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},WV=C();function BV(r,e){var t=!1;return arguments.length>=2&&(t=!0),function(n){return n.lift(new $V(r,e,t))}}oo.scan=BV;var $V=function(){function r(e,t,i){i===void 0&&(i=!1),this.accumulator=e,this.seed=t,this.hasSeed=i}return r.prototype.call=function(e,t){return t.subscribe(new HV(e,this.accumulator,this.seed,this.hasSeed))},r}(),HV=function(r){zV(e,r);function e(t,i,n,s){r.call(this,t),this.accumulator=i,this._seed=n,this.hasSeed=s,this.index=0}return Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(!this.hasSeed)this.seed=t,this.destination.next(t);else return this._tryNext(t)},e.prototype._tryNext=function(t){var i=this.index++,n;try{n=this.accumulator(this.seed,t,i)}catch(s){this.destination.error(s)}this.seed=n,this.destination.next(n)},e}(WV.Subscriber)});var co=u(uo=>{"use strict";var JV=uo&&uo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},YV=C(),KV=br(),GV=Me();function XV(r){return function(t){return r===0?new GV.EmptyObservable:t.lift(new QV(r))}}uo.takeLast=XV;var QV=function(){function r(e){if(this.total=e,this.total<0)throw new KV.ArgumentOutOfRangeError}return r.prototype.call=function(e,t){return t.subscribe(new eD(e,this.total))},r}(),eD=function(r){JV(e,r);function e(t,i){r.call(this,t),this.total=i,this.ring=new Array,this.count=0}return e.prototype._next=function(t){var i=this.ring,n=this.total,s=this.count++;if(i.length<n)i.push(t);else{var o=s%n;i[o]=t}},e.prototype._complete=function(){var t=this.destination,i=this.count;if(i>0)for(var n=this.count>=this.total?this.total:this.count,s=this.ring,o=0;o<n;o++){var a=i++%n;t.next(s[a])}t.complete()},e}(YV.Subscriber)});var yr=u(hg=>{"use strict";var cg=ao(),lg=co(),tD=Ps(),fg=In();function rD(r,e){return arguments.length>=2?function(i){return fg.pipe(cg.scan(r,e),lg.takeLast(1),tD.defaultIfEmpty(e))(i)}:function(i){return fg.pipe(cg.scan(function(n,s,o){return r(n,s,o+1)}),lg.takeLast(1))(i)}}hg.reduce=rD});var Zc=u(pg=>{"use strict";var iD=yr();function nD(r){var e=typeof r=="function"?function(t,i){return r(t,i)>0?t:i}:function(t,i){return t>i?t:i};return iD.reduce(e)}pg.max=nD});var vg=u(dg=>{"use strict";var sD=Zc();function oD(r){return sD.max(r)(this)}dg.max=oD});var bg=u(()=>{"use strict";var aD=v(),uD=vg();aD.Observable.prototype.max=uD.max});var Vc=u(Lc=>{"use strict";var cD=ai(),lD=ai();Lc.mergeStatic=lD.merge;function fD(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(t){return t.lift.call(cD.merge.apply(void 0,[t].concat(r)))}}Lc.merge=fD});var mg=u(Dc=>{"use strict";var hD=Vc(),pD=ai();Dc.mergeStatic=pD.merge;function dD(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return hD.merge.apply(void 0,r)(this)}Dc.merge=dD});var yg=u(()=>{"use strict";var vD=v(),bD=mg();vD.Observable.prototype.merge=bD.merge});var gg=u(_g=>{"use strict";var mD=oi();function yD(r){return r===void 0&&(r=Number.POSITIVE_INFINITY),mD.mergeAll(r)(this)}_g.mergeAll=yD});var wg=u(()=>{"use strict";var _D=v(),gD=gg();_D.Observable.prototype.mergeAll=gD.mergeAll});var Og=u(Sg=>{"use strict";var wD=ar();function SD(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),wD.mergeMap(r,e,t)(this)}Sg.mergeMap=SD});var Tg=u(()=>{"use strict";var xg=v(),qg=Og();xg.Observable.prototype.mergeMap=qg.mergeMap;xg.Observable.prototype.flatMap=qg.mergeMap});var zc=u(_r=>{"use strict";var OD=_r&&_r.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},xD=P(),qD=N();function TD(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),typeof e=="number"&&(t=e,e=null),function(i){return i.lift(new Cg(r,e,t))}}_r.mergeMapTo=TD;var Cg=function(){function r(e,t,i){i===void 0&&(i=Number.POSITIVE_INFINITY),this.ish=e,this.resultSelector=t,this.concurrent=i}return r.prototype.call=function(e,t){return t.subscribe(new Ig(e,this.ish,this.resultSelector,this.concurrent))},r}();_r.MergeMapToOperator=Cg;var Ig=function(r){OD(e,r);function e(t,i,n,s){s===void 0&&(s=Number.POSITIVE_INFINITY),r.call(this,t),this.ish=i,this.resultSelector=n,this.concurrent=s,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return e.prototype._next=function(t){if(this.active<this.concurrent){var i=this.resultSelector,n=this.index++,s=this.ish,o=this.destination;this.active++,this._innerSub(s,o,i,t,n)}else this.buffer.push(t)},e.prototype._innerSub=function(t,i,n,s,o){this.add(qD.subscribeToResult(this,t,s,o))},e.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){var a=this,c=a.resultSelector,l=a.destination;c?this.trySelectResult(t,i,n,s):l.next(i)},e.prototype.trySelectResult=function(t,i,n,s){var o=this,a=o.resultSelector,c=o.destination,l;try{l=a(t,i,n,s)}catch(f){c.error(f);return}c.next(l)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){var i=this.buffer;this.remove(t),this.active--,i.length>0?this._next(i.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()},e}(xD.OuterSubscriber);_r.MergeMapToSubscriber=Ig});var jg=u(Ag=>{"use strict";var CD=zc();function ID(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),CD.mergeMapTo(r,e,t)(this)}Ag.mergeMapTo=ID});var Rg=u(()=>{"use strict";var Eg=v(),kg=jg();Eg.Observable.prototype.flatMapTo=kg.mergeMapTo;Eg.Observable.prototype.mergeMapTo=kg.mergeMapTo});var Wc=u(gr=>{"use strict";var AD=gr&&gr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},jD=Q(),Pg=Y(),ED=N(),kD=P();function RD(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),function(i){return i.lift(new Ng(r,e,t))}}gr.mergeScan=RD;var Ng=function(){function r(e,t,i){this.accumulator=e,this.seed=t,this.concurrent=i}return r.prototype.call=function(e,t){return t.subscribe(new Fg(e,this.accumulator,this.seed,this.concurrent))},r}();gr.MergeScanOperator=Ng;var Fg=function(r){AD(e,r);function e(t,i,n,s){r.call(this,t),this.accumulator=i,this.acc=n,this.concurrent=s,this.hasValue=!1,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return e.prototype._next=function(t){if(this.active<this.concurrent){var i=this.index++,n=jD.tryCatch(this.accumulator)(this.acc,t),s=this.destination;n===Pg.errorObject?s.error(Pg.errorObject.e):(this.active++,this._innerSub(n,t,i))}else this.buffer.push(t)},e.prototype._innerSub=function(t,i,n){this.add(ED.subscribeToResult(this,t,i,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&(this.hasValue===!1&&this.destination.next(this.acc),this.destination.complete())},e.prototype.notifyNext=function(t,i,n,s,o){var a=this.destination;this.acc=i,this.hasValue=!0,a.next(i)},e.prototype.notifyComplete=function(t){var i=this.buffer;this.remove(t),this.active--,i.length>0?this._next(i.shift()):this.active===0&&this.hasCompleted&&(this.hasValue===!1&&this.destination.next(this.acc),this.destination.complete())},e}(kD.OuterSubscriber);gr.MergeScanSubscriber=Fg});var Ug=u(Mg=>{"use strict";var PD=Wc();function ND(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),PD.mergeScan(r,e,t)(this)}Mg.mergeScan=ND});var Zg=u(()=>{"use strict";var FD=v(),MD=Ug();FD.Observable.prototype.mergeScan=MD.mergeScan});var Bc=u(Lg=>{"use strict";var UD=yr();function ZD(r){var e=typeof r=="function"?function(t,i){return r(t,i)<0?t:i}:function(t,i){return t<i?t:i};return UD.reduce(e)}Lg.min=ZD});var Dg=u(Vg=>{"use strict";var LD=Bc();function VD(r){return LD.min(r)(this)}Vg.min=VD});var zg=u(()=>{"use strict";var DD=v(),zD=Dg();DD.Observable.prototype.min=zD.min});var fo=u(lo=>{"use strict";var WD=lo&&lo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},BD=C();function $D(){return function(e){return e.lift(new HD(e))}}lo.refCount=$D;var HD=function(){function r(e){this.connectable=e}return r.prototype.call=function(e,t){var i=this.connectable;i._refCount++;var n=new JD(e,i),s=t.subscribe(n);return n.closed||(n.connection=i.connect()),s},r}(),JD=function(r){WD(e,r);function e(t,i){r.call(this,t),this.connectable=i}return e.prototype._unsubscribe=function(){var t=this.connectable;if(!t){this.connection=null;return}this.connectable=null;var i=t._refCount;if(i<=0){this.connection=null;return}if(t._refCount=i-1,i>1){this.connection=null;return}var n=this.connection,s=t._connection;this.connection=null,s&&(!n||s===n)&&s.unsubscribe()},e}(BD.Subscriber)});var Hc=u(yi=>{"use strict";var $c=yi&&yi.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},YD=K(),KD=v(),GD=C(),Wg=J(),XD=fo(),Bg=function(r){$c(e,r);function e(t,i){r.call(this),this.source=t,this.subjectFactory=i,this._refCount=0,this._isComplete=!1}return e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,t=this._connection=new Wg.Subscription,t.add(this.source.subscribe(new QD(this.getSubject(),this))),t.closed?(this._connection=null,t=Wg.Subscription.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return XD.refCount()(this)},e}(KD.Observable);yi.ConnectableObservable=Bg;var mi=Bg.prototype;yi.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:mi._subscribe},_isComplete:{value:mi._isComplete,writable:!0},getSubject:{value:mi.getSubject},connect:{value:mi.connect},refCount:{value:mi.refCount}};var QD=function(r){$c(e,r);function e(t,i){r.call(this,t),this.connectable=i}return e.prototype._error=function(t){this._unsubscribe(),r.prototype._error.call(this,t)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var i=t._connection;t._refCount=0,t._subject=null,t._connection=null,i&&i.unsubscribe()}},e}(YD.SubjectSubscriber),hne=function(){function r(e){this.connectable=e}return r.prototype.call=function(e,t){var i=this.connectable;i._refCount++;var n=new ez(e,i),s=t.subscribe(n);return n.closed||(n.connection=i.connect()),s},r}(),ez=function(r){$c(e,r);function e(t,i){r.call(this,t),this.connectable=i}return e.prototype._unsubscribe=function(){var t=this.connectable;if(!t){this.connection=null;return}this.connectable=null;var i=t._refCount;if(i<=0){this.connection=null;return}if(t._refCount=i-1,i>1){this.connection=null;return}var n=this.connection,s=t._connection;this.connection=null,s&&(!n||s===n)&&s.unsubscribe()},e}(GD.Subscriber)});var Ke=u(Jc=>{"use strict";var tz=Hc();function rz(r,e){return function(i){var n;if(typeof r=="function"?n=r:n=function(){return r},typeof e=="function")return i.lift(new $g(n,e));var s=Object.create(i,tz.connectableObservableDescriptor);return s.source=i,s.subjectFactory=n,s}}Jc.multicast=rz;var $g=function(){function r(e,t){this.subjectFactory=e,this.selector=t}return r.prototype.call=function(e,t){var i=this.selector,n=this.subjectFactory(),s=i(n).subscribe(e);return s.add(t.subscribe(n)),s},r}();Jc.MulticastOperator=$g});var Jg=u(Hg=>{"use strict";var iz=Ke();function nz(r,e){return iz.multicast(r,e)(this)}Hg.multicast=nz});var Yg=u(()=>{"use strict";var sz=v(),oz=Jg();sz.Observable.prototype.multicast=oz.multicast});var Gg=u(Kg=>{"use strict";var az=si();function uz(r,e){return e===void 0&&(e=0),az.observeOn(r,e)(this)}Kg.observeOn=uz});var Xg=u(()=>{"use strict";var cz=v(),lz=Gg();cz.Observable.prototype.observeOn=lz.observeOn});var ew=u(Qg=>{"use strict";var fz=os();function hz(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return fz.onErrorResumeNext.apply(void 0,r)(this)}Qg.onErrorResumeNext=hz});var tw=u(()=>{"use strict";var pz=v(),dz=ew();pz.Observable.prototype.onErrorResumeNext=dz.onErrorResumeNext});var Yc=u(ho=>{"use strict";var vz=ho&&ho.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},bz=C();function mz(){return function(r){return r.lift(new yz)}}ho.pairwise=mz;var yz=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new _z(e))},r}(),_z=function(r){vz(e,r);function e(t){r.call(this,t),this.hasPrev=!1}return e.prototype._next=function(t){this.hasPrev?this.destination.next([this.prev,t]):this.hasPrev=!0,this.prev=t},e}(bz.Subscriber)});var iw=u(rw=>{"use strict";var gz=Yc();function wz(){return gz.pairwise()(this)}rw.pairwise=wz});var nw=u(()=>{"use strict";var Sz=v(),Oz=iw();Sz.Observable.prototype.pairwise=Oz.pairwise});var ow=u(sw=>{"use strict";function xz(r,e){function t(){return!t.pred.apply(t.thisArg,arguments)}return t.pred=r,t.thisArg=e,t}sw.not=xz});var Kc=u(uw=>{"use strict";var qz=ow(),aw=$s();function Tz(r,e){return function(t){return[aw.filter(r,e)(t),aw.filter(qz.not(r,e))(t)]}}uw.partition=Tz});var lw=u(cw=>{"use strict";var Cz=Kc();function Iz(r,e){return Cz.partition(r,e)(this)}cw.partition=Iz});var fw=u(()=>{"use strict";var Az=v(),jz=lw();Az.Observable.prototype.partition=jz.partition});var Gc=u(hw=>{"use strict";var Ez=pr();function kz(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=r.length;if(t===0)throw new Error("list of properties cannot be empty.");return function(i){return Ez.map(Rz(r,t))(i)}}hw.pluck=kz;function Rz(r,e){var t=function(i){for(var n=i,s=0;s<e;s++){var o=n[r[s]];if(typeof o!="undefined")n=o;else return}return n};return t}});var dw=u(pw=>{"use strict";var Pz=Gc();function Nz(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return Pz.pluck.apply(void 0,r)(this)}pw.pluck=Nz});var vw=u(()=>{"use strict";var Fz=v(),Mz=dw();Fz.Observable.prototype.pluck=Mz.pluck});var Xc=u(yw=>{"use strict";var bw=K(),mw=Ke();function Uz(r){return r?mw.multicast(function(){return new bw.Subject},r):mw.multicast(new bw.Subject)}yw.publish=Uz});var gw=u(_w=>{"use strict";var Zz=Xc();function Lz(r){return Zz.publish(r)(this)}_w.publish=Lz});var ww=u(()=>{"use strict";var Vz=v(),Dz=gw();Vz.Observable.prototype.publish=Dz.publish});var Qc=u(po=>{"use strict";var zz=po&&po.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Wz=K(),Bz=ei(),$z=function(r){zz(e,r);function e(t){r.call(this),this._value=t}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(t){var i=r.prototype._subscribe.call(this,t);return i&&!i.closed&&t.next(this._value),i},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Bz.ObjectUnsubscribedError;return this._value},e.prototype.next=function(t){r.prototype.next.call(this,this._value=t)},e}(Wz.Subject);po.BehaviorSubject=$z});var el=u(Sw=>{"use strict";var Hz=Qc(),Jz=Ke();function Yz(r){return function(e){return Jz.multicast(new Hz.BehaviorSubject(r))(e)}}Sw.publishBehavior=Yz});var xw=u(Ow=>{"use strict";var Kz=el();function Gz(r){return Kz.publishBehavior(r)(this)}Ow.publishBehavior=Gz});var qw=u(()=>{"use strict";var Xz=v(),Qz=xw();Xz.Observable.prototype.publishBehavior=Qz.publishBehavior});var tl=u(Tw=>{"use strict";var e4=pi(),t4=Ke();function r4(r,e,t,i){t&&typeof t!="function"&&(i=t);var n=typeof t=="function"?t:void 0,s=new e4.ReplaySubject(r,e,i);return function(o){return t4.multicast(function(){return s},n)(o)}}Tw.publishReplay=r4});var Iw=u(Cw=>{"use strict";var i4=tl();function n4(r,e,t,i){return i4.publishReplay(r,e,t,i)(this)}Cw.publishReplay=n4});var Aw=u(()=>{"use strict";var s4=v(),o4=Iw();s4.Observable.prototype.publishReplay=o4.publishReplay});var rl=u(jw=>{"use strict";var a4=ri(),u4=Ke();function c4(){return function(r){return u4.multicast(new a4.AsyncSubject)(r)}}jw.publishLast=c4});var kw=u(Ew=>{"use strict";var l4=rl();function f4(){return l4.publishLast()(this)}Ew.publishLast=f4});var Rw=u(()=>{"use strict";var h4=v(),p4=kw();h4.Observable.prototype.publishLast=p4.publishLast});var il=u(Pw=>{"use strict";var d4=Oe(),v4=ns();function b4(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(i){return r.length===1&&d4.isArray(r[0])&&(r=r[0]),i.lift.call(v4.race.apply(void 0,[i].concat(r)))}}Pw.race=b4});var Nw=u(nl=>{"use strict";var m4=il(),y4=ns();nl.raceStatic=y4.race;function _4(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return m4.race.apply(void 0,r)(this)}nl.race=_4});var Fw=u(()=>{"use strict";var g4=v(),w4=Nw();g4.Observable.prototype.race=w4.race});var Zw=u(Uw=>{"use strict";var Mw=yr();function S4(r,e){return arguments.length>=2?Mw.reduce(r,e)(this):Mw.reduce(r)(this)}Uw.reduce=S4});var Lw=u(()=>{"use strict";var O4=v(),x4=Zw();O4.Observable.prototype.reduce=x4.reduce});var sl=u(vo=>{"use strict";var q4=vo&&vo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},T4=C(),C4=Me();function I4(r){return r===void 0&&(r=-1),function(e){return r===0?new C4.EmptyObservable:r<0?e.lift(new Vw(-1,e)):e.lift(new Vw(r-1,e))}}vo.repeat=I4;var Vw=function(){function r(e,t){this.count=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new A4(e,this.count,this.source))},r}(),A4=function(r){q4(e,r);function e(t,i,n){r.call(this,t),this.count=i,this.source=n}return e.prototype.complete=function(){if(!this.isStopped){var t=this,i=t.source,n=t.count;if(n===0)return r.prototype.complete.call(this);n>-1&&(this.count=n-1),i.subscribe(this._unsubscribeAndRecycle())}},e}(T4.Subscriber)});var zw=u(Dw=>{"use strict";var j4=sl();function E4(r){return r===void 0&&(r=-1),j4.repeat(r)(this)}Dw.repeat=E4});var Ww=u(()=>{"use strict";var k4=v(),R4=zw();k4.Observable.prototype.repeat=R4.repeat});var ol=u(bo=>{"use strict";var P4=bo&&bo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},N4=K(),F4=Q(),M4=Y(),U4=P(),Z4=N();function L4(r){return function(e){return e.lift(new V4(r))}}bo.repeatWhen=L4;var V4=function(){function r(e){this.notifier=e}return r.prototype.call=function(e,t){return t.subscribe(new D4(e,this.notifier,t))},r}(),D4=function(r){P4(e,r);function e(t,i,n){r.call(this,t),this.notifier=i,this.source=n,this.sourceIsBeingSubscribedTo=!0}return e.prototype.notifyNext=function(t,i,n,s,o){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(t){if(this.sourceIsBeingSubscribedTo===!1)return r.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return r.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this,i=t.notifications,n=t.retriesSubscription;i&&(i.unsubscribe(),this.notifications=null),n&&(n.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var t=this,i=t.notifications,n=t.retries,s=t.retriesSubscription;return this.notifications=null,this.retries=null,this.retriesSubscription=null,r.prototype._unsubscribeAndRecycle.call(this),this.notifications=i,this.retries=n,this.retriesSubscription=s,this},e.prototype.subscribeToRetries=function(){this.notifications=new N4.Subject;var t=F4.tryCatch(this.notifier)(this.notifications);if(t===M4.errorObject)return r.prototype.complete.call(this);this.retries=t,this.retriesSubscription=Z4.subscribeToResult(this,t)},e}(U4.OuterSubscriber)});var $w=u(Bw=>{"use strict";var z4=ol();function W4(r){return z4.repeatWhen(r)(this)}Bw.repeatWhen=W4});var Hw=u(()=>{"use strict";var B4=v(),$4=$w();B4.Observable.prototype.repeatWhen=$4.repeatWhen});var al=u(mo=>{"use strict";var H4=mo&&mo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},J4=C();function Y4(r){return r===void 0&&(r=-1),function(e){return e.lift(new K4(r,e))}}mo.retry=Y4;var K4=function(){function r(e,t){this.count=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new G4(e,this.count,this.source))},r}(),G4=function(r){H4(e,r);function e(t,i,n){r.call(this,t),this.count=i,this.source=n}return e.prototype.error=function(t){if(!this.isStopped){var i=this,n=i.source,s=i.count;if(s===0)return r.prototype.error.call(this,t);s>-1&&(this.count=s-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(J4.Subscriber)});var Yw=u(Jw=>{"use strict";var X4=al();function Q4(r){return r===void 0&&(r=-1),X4.retry(r)(this)}Jw.retry=Q4});var Kw=u(()=>{"use strict";var e3=v(),t3=Yw();e3.Observable.prototype.retry=t3.retry});var ul=u(yo=>{"use strict";var r3=yo&&yo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},i3=K(),n3=Q(),Gw=Y(),s3=P(),o3=N();function a3(r){return function(e){return e.lift(new u3(r,e))}}yo.retryWhen=a3;var u3=function(){function r(e,t){this.notifier=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new c3(e,this.notifier,this.source))},r}(),c3=function(r){r3(e,r);function e(t,i,n){r.call(this,t),this.notifier=i,this.source=n}return e.prototype.error=function(t){if(!this.isStopped){var i=this.errors,n=this.retries,s=this.retriesSubscription;if(n)this.errors=null,this.retriesSubscription=null;else{if(i=new i3.Subject,n=n3.tryCatch(this.notifier)(i),n===Gw.errorObject)return r.prototype.error.call(this,Gw.errorObject.e);s=o3.subscribeToResult(this,n)}this._unsubscribeAndRecycle(),this.errors=i,this.retries=n,this.retriesSubscription=s,i.next(t)}},e.prototype._unsubscribe=function(){var t=this,i=t.errors,n=t.retriesSubscription;i&&(i.unsubscribe(),this.errors=null),n&&(n.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,i,n,s,o){var a=this,c=a.errors,l=a.retries,f=a.retriesSubscription;this.errors=null,this.retries=null,this.retriesSubscription=null,this._unsubscribeAndRecycle(),this.errors=c,this.retries=l,this.retriesSubscription=f,this.source.subscribe(this)},e}(s3.OuterSubscriber)});var Qw=u(Xw=>{"use strict";var l3=ul();function f3(r){return l3.retryWhen(r)(this)}Xw.retryWhen=f3});var eS=u(()=>{"use strict";var h3=v(),p3=Qw();h3.Observable.prototype.retryWhen=p3.retryWhen});var cl=u(_o=>{"use strict";var d3=_o&&_o.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},v3=P(),b3=N();function m3(r){return function(e){return e.lift(new y3(r))}}_o.sample=m3;var y3=function(){function r(e){this.notifier=e}return r.prototype.call=function(e,t){var i=new _3(e),n=t.subscribe(i);return n.add(b3.subscribeToResult(i,this.notifier)),n},r}(),_3=function(r){d3(e,r);function e(){r.apply(this,arguments),this.hasValue=!1}return e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,i,n,s,o){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(v3.OuterSubscriber)});var rS=u(tS=>{"use strict";var g3=cl();function w3(r){return g3.sample(r)(this)}tS.sample=w3});var iS=u(()=>{"use strict";var S3=v(),O3=rS();S3.Observable.prototype.sample=O3.sample});var ll=u(go=>{"use strict";var x3=go&&go.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},q3=C(),T3=W();function C3(r,e){return e===void 0&&(e=T3.async),function(t){return t.lift(new I3(r,e))}}go.sampleTime=C3;var I3=function(){function r(e,t){this.period=e,this.scheduler=t}return r.prototype.call=function(e,t){return t.subscribe(new A3(e,this.period,this.scheduler))},r}(),A3=function(r){x3(e,r);function e(t,i,n){r.call(this,t),this.period=i,this.scheduler=n,this.hasValue=!1,this.add(n.schedule(j3,i,{subscriber:this,period:i}))}return e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(q3.Subscriber);function j3(r){var e=r.subscriber,t=r.period;e.notifyNext(),this.schedule(r,t)}});var sS=u(nS=>{"use strict";var E3=W(),k3=ll();function R3(r,e){return e===void 0&&(e=E3.async),k3.sampleTime(r,e)(this)}nS.sampleTime=R3});var oS=u(()=>{"use strict";var P3=v(),N3=sS();P3.Observable.prototype.sampleTime=N3.sampleTime});var cS=u(uS=>{"use strict";var aS=ao();function F3(r,e){return arguments.length>=2?aS.scan(r,e)(this):aS.scan(r)(this)}uS.scan=F3});var lS=u(()=>{"use strict";var M3=v(),U3=cS();M3.Observable.prototype.scan=U3.scan});var fl=u(wr=>{"use strict";var hS=wr&&wr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},pS=C(),Z3=Q(),fS=Y();function L3(r,e){return function(t){return t.lift(new dS(r,e))}}wr.sequenceEqual=L3;var dS=function(){function r(e,t){this.compareTo=e,this.comparor=t}return r.prototype.call=function(e,t){return t.subscribe(new vS(e,this.compareTo,this.comparor))},r}();wr.SequenceEqualOperator=dS;var vS=function(r){hS(e,r);function e(t,i,n){r.call(this,t),this.compareTo=i,this.comparor=n,this._a=[],this._b=[],this._oneComplete=!1,this.add(i.subscribe(new V3(t,this)))}return e.prototype._next=function(t){this._oneComplete&&this._b.length===0?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(this._a.length===0&&this._b.length===0):this._oneComplete=!0},e.prototype.checkValues=function(){for(var t=this,i=t._a,n=t._b,s=t.comparor;i.length>0&&n.length>0;){var o=i.shift(),a=n.shift(),c=!1;s?(c=Z3.tryCatch(s)(o,a),c===fS.errorObject&&this.destination.error(fS.errorObject.e)):c=o===a,c||this.emit(!1)}},e.prototype.emit=function(t){var i=this.destination;i.next(t),i.complete()},e.prototype.nextB=function(t){this._oneComplete&&this._a.length===0?this.emit(!1):(this._b.push(t),this.checkValues())},e}(pS.Subscriber);wr.SequenceEqualSubscriber=vS;var V3=function(r){hS(e,r);function e(t,i){r.call(this,t),this.parent=i}return e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t)},e.prototype._complete=function(){this.parent._complete()},e}(pS.Subscriber)});var mS=u(bS=>{"use strict";var D3=fl();function z3(r,e){return D3.sequenceEqual(r,e)(this)}bS.sequenceEqual=z3});var yS=u(()=>{"use strict";var W3=v(),B3=mS();W3.Observable.prototype.sequenceEqual=B3.sequenceEqual});var hl=u(_S=>{"use strict";var $3=Ke(),H3=fo(),J3=K();function Y3(){return new J3.Subject}function K3(){return function(r){return H3.refCount()($3.multicast(Y3)(r))}}_S.share=K3});var wS=u(gS=>{"use strict";var G3=hl();function X3(){return G3.share()(this)}gS.share=X3});var SS=u(()=>{"use strict";var Q3=v(),e2=wS();Q3.Observable.prototype.share=e2.share});var pl=u(OS=>{"use strict";var t2=pi();function r2(r,e,t){return function(i){return i.lift(i2(r,e,t))}}OS.shareReplay=r2;function i2(r,e,t){var i,n=0,s,o=!1,a=!1;return function(l){n++,(!i||o)&&(o=!1,i=new t2.ReplaySubject(r,e,t),s=l.subscribe({next:function(p){i.next(p)},error:function(p){o=!0,i.error(p)},complete:function(){a=!0,i.complete()}}));var f=i.subscribe(this);return function(){n--,f.unsubscribe(),s&&n===0&&a&&s.unsubscribe()}}}});var qS=u(xS=>{"use strict";var n2=pl();function s2(r,e,t){return n2.shareReplay(r,e,t)(this)}xS.shareReplay=s2});var TS=u(()=>{"use strict";var o2=v(),a2=qS();o2.Observable.prototype.shareReplay=a2.shareReplay});var dl=u(wo=>{"use strict";var u2=wo&&wo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},c2=C(),l2=vi();function f2(r){return function(e){return e.lift(new h2(r,e))}}wo.single=f2;var h2=function(){function r(e,t){this.predicate=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new p2(e,this.predicate,this.source))},r}(),p2=function(r){u2(e,r);function e(t,i,n){r.call(this,t),this.predicate=i,this.source=n,this.seenValue=!1,this.index=0}return e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var i=this.index++;this.predicate?this.tryNext(t,i):this.applySingleValue(t)},e.prototype.tryNext=function(t,i){try{this.predicate(t,i,this.source)&&this.applySingleValue(t)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new l2.EmptyError)},e}(c2.Subscriber)});var IS=u(CS=>{"use strict";var d2=dl();function v2(r){return d2.single(r)(this)}CS.single=v2});var AS=u(()=>{"use strict";var b2=v(),m2=IS();b2.Observable.prototype.single=m2.single});var vl=u(So=>{"use strict";var y2=So&&So.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},_2=C();function g2(r){return function(e){return e.lift(new w2(r))}}So.skip=g2;var w2=function(){function r(e){this.total=e}return r.prototype.call=function(e,t){return t.subscribe(new S2(e,this.total))},r}(),S2=function(r){y2(e,r);function e(t,i){r.call(this,t),this.total=i,this.count=0}return e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(_2.Subscriber)});var ES=u(jS=>{"use strict";var O2=vl();function x2(r){return O2.skip(r)(this)}jS.skip=x2});var kS=u(()=>{"use strict";var q2=v(),T2=ES();q2.Observable.prototype.skip=T2.skip});var bl=u(Oo=>{"use strict";var C2=Oo&&Oo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},RS=C(),I2=br();function A2(r){return function(e){return e.lift(new j2(r))}}Oo.skipLast=A2;var j2=function(){function r(e){if(this._skipCount=e,this._skipCount<0)throw new I2.ArgumentOutOfRangeError}return r.prototype.call=function(e,t){return this._skipCount===0?t.subscribe(new RS.Subscriber(e)):t.subscribe(new E2(e,this._skipCount))},r}(),E2=function(r){C2(e,r);function e(t,i){r.call(this,t),this._skipCount=i,this._count=0,this._ring=new Array(i)}return e.prototype._next=function(t){var i=this._skipCount,n=this._count++;if(n<i)this._ring[n]=t;else{var s=n%i,o=this._ring,a=o[s];o[s]=t,this.destination.next(a)}},e}(RS.Subscriber)});var NS=u(PS=>{"use strict";var k2=bl();function R2(r){return k2.skipLast(r)(this)}PS.skipLast=R2});var FS=u(()=>{"use strict";var P2=v(),N2=NS();P2.Observable.prototype.skipLast=N2.skipLast});var ml=u(xo=>{"use strict";var F2=xo&&xo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},M2=P(),U2=N();function Z2(r){return function(e){return e.lift(new L2(r))}}xo.skipUntil=Z2;var L2=function(){function r(e){this.notifier=e}return r.prototype.call=function(e,t){return t.subscribe(new V2(e,this.notifier))},r}(),V2=function(r){F2(e,r);function e(t,i){r.call(this,t),this.hasValue=!1,this.isInnerStopped=!1,this.add(U2.subscribeToResult(this,i))}return e.prototype._next=function(t){this.hasValue&&r.prototype._next.call(this,t)},e.prototype._complete=function(){this.isInnerStopped?r.prototype._complete.call(this):this.unsubscribe()},e.prototype.notifyNext=function(t,i,n,s,o){this.hasValue=!0},e.prototype.notifyComplete=function(){this.isInnerStopped=!0,this.isStopped&&r.prototype._complete.call(this)},e}(M2.OuterSubscriber)});var US=u(MS=>{"use strict";var D2=ml();function z2(r){return D2.skipUntil(r)(this)}MS.skipUntil=z2});var ZS=u(()=>{"use strict";var W2=v(),B2=US();W2.Observable.prototype.skipUntil=B2.skipUntil});var yl=u(qo=>{"use strict";var $2=qo&&qo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},H2=C();function J2(r){return function(e){return e.lift(new Y2(r))}}qo.skipWhile=J2;var Y2=function(){function r(e){this.predicate=e}return r.prototype.call=function(e,t){return t.subscribe(new K2(e,this.predicate))},r}(),K2=function(r){$2(e,r);function e(t,i){r.call(this,t),this.predicate=i,this.skipping=!0,this.index=0}return e.prototype._next=function(t){var i=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||i.next(t)},e.prototype.tryCallPredicate=function(t){try{var i=this.predicate(t,this.index++);this.skipping=!!i}catch(n){this.destination.error(n)}},e}(H2.Subscriber)});var VS=u(LS=>{"use strict";var G2=yl();function X2(r){return G2.skipWhile(r)(this)}LS.skipWhile=X2});var DS=u(()=>{"use strict";var Q2=v(),eW=VS();Q2.Observable.prototype.skipWhile=eW.skipWhile});var gl=u(zS=>{"use strict";var tW=Ue(),rW=Mn(),iW=Me(),_l=ur(),nW=_e();function sW(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(t){var i=r[r.length-1];nW.isScheduler(i)?r.pop():i=null;var n=r.length;return n===1?_l.concat(new rW.ScalarObservable(r[0],i),t):n>1?_l.concat(new tW.ArrayObservable(r,i),t):_l.concat(new iW.EmptyObservable(i),t)}}zS.startWith=sW});var BS=u(WS=>{"use strict";var oW=gl();function aW(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return oW.startWith.apply(void 0,r)(this)}WS.startWith=aW});var $S=u(()=>{"use strict";var uW=v(),cW=BS();uW.Observable.prototype.startWith=cW.startWith});var JS=u(wl=>{"use strict";var lW=se(),HS=function(){function r(e){if(this.root=e,e.setImmediate&&typeof e.setImmediate=="function")this.setImmediate=e.setImmediate.bind(e),this.clearImmediate=e.clearImmediate.bind(e);else{this.nextHandle=1,this.tasksByHandle={},this.currentlyRunningATask=!1,this.canUseProcessNextTick()?this.setImmediate=this.createProcessNextTickSetImmediate():this.canUsePostMessage()?this.setImmediate=this.createPostMessageSetImmediate():this.canUseMessageChannel()?this.setImmediate=this.createMessageChannelSetImmediate():this.canUseReadyStateChange()?this.setImmediate=this.createReadyStateChangeSetImmediate():this.setImmediate=this.createSetTimeoutSetImmediate();var t=function i(n){delete i.instance.tasksByHandle[n]};t.instance=this,this.clearImmediate=t}}return r.prototype.identify=function(e){return this.root.Object.prototype.toString.call(e)},r.prototype.canUseProcessNextTick=function(){return this.identify(this.root.process)==="[object process]"},r.prototype.canUseMessageChannel=function(){return!!this.root.MessageChannel},r.prototype.canUseReadyStateChange=function(){var e=this.root.document;return!!(e&&"onreadystatechange"in e.createElement("script"))},r.prototype.canUsePostMessage=function(){var e=this.root;if(e.postMessage&&!e.importScripts){var t=!0,i=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=i,t}return!1},r.prototype.partiallyApplied=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var n=function s(){var o=s,a=o.handler,c=o.args;typeof a=="function"?a.apply(void 0,c):new Function(""+a)()};return n.handler=e,n.args=t,n},r.prototype.addFromSetImmediateArguments=function(e){return this.tasksByHandle[this.nextHandle]=this.partiallyApplied.apply(void 0,e),this.nextHandle++},r.prototype.createProcessNextTickSetImmediate=function(){var e=function t(){var i=t.instance,n=i.addFromSetImmediateArguments(arguments);return i.root.process.nextTick(i.partiallyApplied(i.runIfPresent,n)),n};return e.instance=this,e},r.prototype.createPostMessageSetImmediate=function(){var e=this.root,t="setImmediate$"+e.Math.random()+"$",i=function s(o){var a=s.instance;o.source===e&&typeof o.data=="string"&&o.data.indexOf(t)===0&&a.runIfPresent(+o.data.slice(t.length))};i.instance=this,e.addEventListener("message",i,!1);var n=function s(){var o=s,a=o.messagePrefix,c=o.instance,l=c.addFromSetImmediateArguments(arguments);return c.root.postMessage(a+l,"*"),l};return n.instance=this,n.messagePrefix=t,n},r.prototype.runIfPresent=function(e){if(this.currentlyRunningATask)this.root.setTimeout(this.partiallyApplied(this.runIfPresent,e),0);else{var t=this.tasksByHandle[e];if(t){this.currentlyRunningATask=!0;try{t()}finally{this.clearImmediate(e),this.currentlyRunningATask=!1}}}},r.prototype.createMessageChannelSetImmediate=function(){var e=this,t=new this.root.MessageChannel;t.port1.onmessage=function(n){var s=n.data;e.runIfPresent(s)};var i=function n(){var s=n,o=s.channel,a=s.instance,c=a.addFromSetImmediateArguments(arguments);return o.port2.postMessage(c),c};return i.channel=t,i.instance=this,i},r.prototype.createReadyStateChangeSetImmediate=function(){var e=function t(){var i=t.instance,n=i.root,s=n.document,o=s.documentElement,a=i.addFromSetImmediateArguments(arguments),c=s.createElement("script");return c.onreadystatechange=function(){i.runIfPresent(a),c.onreadystatechange=null,o.removeChild(c),c=null},o.appendChild(c),a};return e.instance=this,e},r.prototype.createSetTimeoutSetImmediate=function(){var e=function t(){var i=t.instance,n=i.addFromSetImmediateArguments(arguments);return i.root.setTimeout(i.partiallyApplied(i.runIfPresent,n),0),n};return e.instance=this,e},r}();wl.ImmediateDefinition=HS;wl.Immediate=new HS(lW.root)});var KS=u(To=>{"use strict";var fW=To&&To.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},YS=JS(),hW=lr(),pW=function(r){fW(e,r);function e(t,i){r.call(this,t,i),this.scheduler=t,this.work=i}return e.prototype.requestAsyncId=function(t,i,n){return n===void 0&&(n=0),n!==null&&n>0?r.prototype.requestAsyncId.call(this,t,i,n):(t.actions.push(this),t.scheduled||(t.scheduled=YS.Immediate.setImmediate(t.flush.bind(t,null))))},e.prototype.recycleAsyncId=function(t,i,n){if(n===void 0&&(n=0),n!==null&&n>0||n===null&&this.delay>0)return r.prototype.recycleAsyncId.call(this,t,i,n);t.actions.length===0&&(YS.Immediate.clearImmediate(i),t.scheduled=void 0)},e}(hW.AsyncAction);To.AsapAction=pW});var GS=u(Co=>{"use strict";var dW=Co&&Co.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},vW=fr(),bW=function(r){dW(e,r);function e(){r.apply(this,arguments)}return e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var i=this.actions,n,s=-1,o=i.length;t=t||i.shift();do if(n=t.execute(t.state,t.delay))break;while(++s<o&&(t=i.shift()));if(this.active=!1,n){for(;++s<o&&(t=i.shift());)t.unsubscribe();throw n}},e}(vW.AsyncScheduler);Co.AsapScheduler=bW});var Sl=u(XS=>{"use strict";var mW=KS(),yW=GS();XS.asap=new yW.AsapScheduler(mW.AsapAction)});var QS=u(Io=>{"use strict";var _W=Io&&Io.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},gW=v(),Ol=Sl(),wW=cr(),SW=function(r){_W(e,r);function e(t,i,n){i===void 0&&(i=0),n===void 0&&(n=Ol.asap),r.call(this),this.source=t,this.delayTime=i,this.scheduler=n,(!wW.isNumeric(i)||i<0)&&(this.delayTime=0),(!n||typeof n.schedule!="function")&&(this.scheduler=Ol.asap)}return e.create=function(t,i,n){return i===void 0&&(i=0),n===void 0&&(n=Ol.asap),new e(t,i,n)},e.dispatch=function(t){var i=t.source,n=t.subscriber;return this.add(i.subscribe(n))},e.prototype._subscribe=function(t){var i=this.delayTime,n=this.source,s=this.scheduler;return s.schedule(e.dispatch,i,{source:n,subscriber:t})},e}(gW.Observable);Io.SubscribeOnObservable=SW});var t1=u(e1=>{"use strict";var OW=QS();function xW(r,e){return e===void 0&&(e=0),function(i){return i.lift(new qW(r,e))}}e1.subscribeOn=xW;var qW=function(){function r(e,t){this.scheduler=e,this.delay=t}return r.prototype.call=function(e,t){return new OW.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},r}()});var i1=u(r1=>{"use strict";var TW=t1();function CW(r,e){return e===void 0&&(e=0),TW.subscribeOn(r,e)(this)}r1.subscribeOn=CW});var n1=u(()=>{"use strict";var IW=v(),AW=i1();IW.Observable.prototype.subscribeOn=AW.subscribeOn});var jo=u(Ao=>{"use strict";var jW=Ao&&Ao.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},EW=P(),kW=N();function RW(r,e){return function(i){return i.lift(new PW(r,e))}}Ao.switchMap=RW;var PW=function(){function r(e,t){this.project=e,this.resultSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new NW(e,this.project,this.resultSelector))},r}(),NW=function(r){jW(e,r);function e(t,i,n){r.call(this,t),this.project=i,this.resultSelector=n,this.index=0}return e.prototype._next=function(t){var i,n=this.index++;try{i=this.project(t,n)}catch(s){this.destination.error(s);return}this._innerSub(i,t,n)},e.prototype._innerSub=function(t,i,n){var s=this.innerSubscription;s&&s.unsubscribe(),this.add(this.innerSubscription=kW.subscribeToResult(this,t,i,n))},e.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(t){this.remove(t),this.innerSubscription=null,this.isStopped&&r.prototype._complete.call(this)},e.prototype.notifyNext=function(t,i,n,s,o){this.resultSelector?this._tryNotifyNext(t,i,n,s):this.destination.next(i)},e.prototype._tryNotifyNext=function(t,i,n,s){var o;try{o=this.resultSelector(t,i,n,s)}catch(a){this.destination.error(a);return}this.destination.next(o)},e}(EW.OuterSubscriber)});var xl=u(s1=>{"use strict";var FW=jo(),MW=Hu();function UW(){return FW.switchMap(MW.identity)}s1.switchAll=UW});var a1=u(o1=>{"use strict";var ZW=xl();function LW(){return ZW.switchAll()(this)}o1._switch=LW});var l1=u(()=>{"use strict";var u1=v(),c1=a1();u1.Observable.prototype.switch=c1._switch;u1.Observable.prototype._switch=c1._switch});var h1=u(f1=>{"use strict";var VW=jo();function DW(r,e){return VW.switchMap(r,e)(this)}f1.switchMap=DW});var p1=u(()=>{"use strict";var zW=v(),WW=h1();zW.Observable.prototype.switchMap=WW.switchMap});var ql=u(Eo=>{"use strict";var BW=Eo&&Eo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},$W=P(),HW=N();function JW(r,e){return function(t){return t.lift(new YW(r,e))}}Eo.switchMapTo=JW;var YW=function(){function r(e,t){this.observable=e,this.resultSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new KW(e,this.observable,this.resultSelector))},r}(),KW=function(r){BW(e,r);function e(t,i,n){r.call(this,t),this.inner=i,this.resultSelector=n,this.index=0}return e.prototype._next=function(t){var i=this.innerSubscription;i&&i.unsubscribe(),this.add(this.innerSubscription=HW.subscribeToResult(this,this.inner,t,this.index++))},e.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(t){this.remove(t),this.innerSubscription=null,this.isStopped&&r.prototype._complete.call(this)},e.prototype.notifyNext=function(t,i,n,s,o){var a=this,c=a.resultSelector,l=a.destination;c?this.tryResultSelector(t,i,n,s):l.next(i)},e.prototype.tryResultSelector=function(t,i,n,s){var o=this,a=o.resultSelector,c=o.destination,l;try{l=a(t,i,n,s)}catch(f){c.error(f);return}c.next(l)},e}($W.OuterSubscriber)});var v1=u(d1=>{"use strict";var GW=ql();function XW(r,e){return GW.switchMapTo(r,e)(this)}d1.switchMapTo=XW});var b1=u(()=>{"use strict";var QW=v(),e9=v1();QW.Observable.prototype.switchMapTo=e9.switchMapTo});var Tl=u(ko=>{"use strict";var t9=ko&&ko.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},r9=C(),i9=br(),n9=Me();function s9(r){return function(e){return r===0?new n9.EmptyObservable:e.lift(new o9(r))}}ko.take=s9;var o9=function(){function r(e){if(this.total=e,this.total<0)throw new i9.ArgumentOutOfRangeError}return r.prototype.call=function(e,t){return t.subscribe(new a9(e,this.total))},r}(),a9=function(r){t9(e,r);function e(t,i){r.call(this,t),this.total=i,this.count=0}return e.prototype._next=function(t){var i=this.total,n=++this.count;n<=i&&(this.destination.next(t),n===i&&(this.destination.complete(),this.unsubscribe()))},e}(r9.Subscriber)});var y1=u(m1=>{"use strict";var u9=Tl();function c9(r){return u9.take(r)(this)}m1.take=c9});var _1=u(()=>{"use strict";var l9=v(),f9=y1();l9.Observable.prototype.take=f9.take});var w1=u(g1=>{"use strict";var h9=co();function p9(r){return h9.takeLast(r)(this)}g1.takeLast=p9});var S1=u(()=>{"use strict";var d9=v(),v9=w1();d9.Observable.prototype.takeLast=v9.takeLast});var Cl=u(Ro=>{"use strict";var b9=Ro&&Ro.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},m9=P(),y9=N();function _9(r){return function(e){return e.lift(new g9(r))}}Ro.takeUntil=_9;var g9=function(){function r(e){this.notifier=e}return r.prototype.call=function(e,t){return t.subscribe(new w9(e,this.notifier))},r}(),w9=function(r){b9(e,r);function e(t,i){r.call(this,t),this.notifier=i,this.add(y9.subscribeToResult(this,i))}return e.prototype.notifyNext=function(t,i,n,s,o){this.complete()},e.prototype.notifyComplete=function(){},e}(m9.OuterSubscriber)});var x1=u(O1=>{"use strict";var S9=Cl();function O9(r){return S9.takeUntil(r)(this)}O1.takeUntil=O9});var q1=u(()=>{"use strict";var x9=v(),q9=x1();x9.Observable.prototype.takeUntil=q9.takeUntil});var Il=u(Po=>{"use strict";var T9=Po&&Po.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},C9=C();function I9(r){return function(e){return e.lift(new A9(r))}}Po.takeWhile=I9;var A9=function(){function r(e){this.predicate=e}return r.prototype.call=function(e,t){return t.subscribe(new j9(e,this.predicate))},r}(),j9=function(r){T9(e,r);function e(t,i){r.call(this,t),this.predicate=i,this.index=0}return e.prototype._next=function(t){var i=this.destination,n;try{n=this.predicate(t,this.index++)}catch(s){i.error(s);return}this.nextOrComplete(t,n)},e.prototype.nextOrComplete=function(t,i){var n=this.destination;i?n.next(t):n.complete()},e}(C9.Subscriber)});var C1=u(T1=>{"use strict";var E9=Il();function k9(r){return E9.takeWhile(r)(this)}T1.takeWhile=k9});var I1=u(()=>{"use strict";var R9=v(),P9=C1();R9.Observable.prototype.takeWhile=P9.takeWhile});var _i=u(Sr=>{"use strict";var N9=Sr&&Sr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},F9=P(),M9=N();Sr.defaultThrottleConfig={leading:!0,trailing:!1};function U9(r,e){return e===void 0&&(e=Sr.defaultThrottleConfig),function(t){return t.lift(new Z9(r,e.leading,e.trailing))}}Sr.throttle=U9;var Z9=function(){function r(e,t,i){this.durationSelector=e,this.leading=t,this.trailing=i}return r.prototype.call=function(e,t){return t.subscribe(new L9(e,this.durationSelector,this.leading,this.trailing))},r}(),L9=function(r){N9(e,r);function e(t,i,n,s){r.call(this,t),this.destination=t,this.durationSelector=i,this._leading=n,this._trailing=s,this._hasTrailingValue=!1}return e.prototype._next=function(t){if(this.throttled)this._trailing&&(this._hasTrailingValue=!0,this._trailingValue=t);else{var i=this.tryDurationSelector(t);i&&this.add(this.throttled=M9.subscribeToResult(this,i)),this._leading&&(this.destination.next(t),this._trailing&&(this._hasTrailingValue=!0,this._trailingValue=t))}},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(i){return this.destination.error(i),null}},e.prototype._unsubscribe=function(){var t=this,i=t.throttled,n=t._trailingValue,s=t._hasTrailingValue,o=t._trailing;this._trailingValue=null,this._hasTrailingValue=!1,i&&(this.remove(i),this.throttled=null,i.unsubscribe())},e.prototype._sendTrailing=function(){var t=this,i=t.destination,n=t.throttled,s=t._trailing,o=t._trailingValue,a=t._hasTrailingValue;n&&s&&a&&(i.next(o),this._trailingValue=null,this._hasTrailingValue=!1)},e.prototype.notifyNext=function(t,i,n,s,o){this._sendTrailing(),this._unsubscribe()},e.prototype.notifyComplete=function(){this._sendTrailing(),this._unsubscribe()},e}(F9.OuterSubscriber)});var E1=u(j1=>{"use strict";var A1=_i();function V9(r,e){return e===void 0&&(e=A1.defaultThrottleConfig),A1.throttle(r,e)(this)}j1.throttle=V9});var k1=u(()=>{"use strict";var D9=v(),z9=E1();D9.Observable.prototype.throttle=z9.throttle});var Al=u(No=>{"use strict";var W9=No&&No.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},B9=C(),$9=W(),H9=_i();function J9(r,e,t){return e===void 0&&(e=$9.async),t===void 0&&(t=H9.defaultThrottleConfig),function(i){return i.lift(new Y9(r,e,t.leading,t.trailing))}}No.throttleTime=J9;var Y9=function(){function r(e,t,i,n){this.duration=e,this.scheduler=t,this.leading=i,this.trailing=n}return r.prototype.call=function(e,t){return t.subscribe(new K9(e,this.duration,this.scheduler,this.leading,this.trailing))},r}(),K9=function(r){W9(e,r);function e(t,i,n,s,o){r.call(this,t),this.duration=i,this.scheduler=n,this.leading=s,this.trailing=o,this._hasTrailingValue=!1,this._trailingValue=null}return e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(G9,this.duration,{subscriber:this})),this.leading&&this.destination.next(t))},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(B9.Subscriber);function G9(r){var e=r.subscriber;e.clearThrottle()}});var P1=u(R1=>{"use strict";var X9=W(),Q9=_i(),e6=Al();function t6(r,e,t){return e===void 0&&(e=X9.async),t===void 0&&(t=Q9.defaultThrottleConfig),e6.throttleTime(r,e,t)(this)}R1.throttleTime=t6});var N1=u(()=>{"use strict";var r6=v(),i6=P1();r6.Observable.prototype.throttleTime=i6.throttleTime});var jl=u(gi=>{"use strict";var n6=gi&&gi.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},s6=C(),o6=W();function a6(r){return r===void 0&&(r=o6.async),function(e){return e.lift(new u6(r))}}gi.timeInterval=a6;var F1=function(){function r(e,t){this.value=e,this.interval=t}return r}();gi.TimeInterval=F1;var u6=function(){function r(e){this.scheduler=e}return r.prototype.call=function(e,t){return t.subscribe(new c6(e,this.scheduler))},r}(),c6=function(r){n6(e,r);function e(t,i){r.call(this,t),this.scheduler=i,this.lastTime=0,this.lastTime=i.now()}return e.prototype._next=function(t){var i=this.scheduler.now(),n=i-this.lastTime;this.lastTime=i,this.destination.next(new F1(t,n))},e}(s6.Subscriber)});var kl=u(El=>{"use strict";var l6=W(),M1=jl();El.TimeInterval=M1.TimeInterval;function f6(r){return r===void 0&&(r=l6.async),M1.timeInterval(r)(this)}El.timeInterval=f6});var U1=u(()=>{"use strict";var h6=v(),p6=kl();h6.Observable.prototype.timeInterval=p6.timeInterval});var Rl=u(Fo=>{"use strict";var d6=Fo&&Fo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},v6=function(r){d6(e,r);function e(){var t=r.call(this,"Timeout has occurred");this.name=t.name="TimeoutError",this.stack=t.stack,this.message=t.message}return e}(Error);Fo.TimeoutError=v6});var Pl=u(Mo=>{"use strict";var b6=Mo&&Mo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},m6=W(),y6=ci(),_6=C(),g6=Rl();function w6(r,e){e===void 0&&(e=m6.async);var t=y6.isDate(r),i=t?+r-e.now():Math.abs(r);return function(n){return n.lift(new S6(i,t,e,new g6.TimeoutError))}}Mo.timeout=w6;var S6=function(){function r(e,t,i,n){this.waitFor=e,this.absoluteTimeout=t,this.scheduler=i,this.errorInstance=n}return r.prototype.call=function(e,t){return t.subscribe(new O6(e,this.absoluteTimeout,this.waitFor,this.scheduler,this.errorInstance))},r}(),O6=function(r){b6(e,r);function e(t,i,n,s,o){r.call(this,t),this.absoluteTimeout=i,this.waitFor=n,this.scheduler=s,this.errorInstance=o,this.action=null,this.scheduleTimeout()}return e.dispatchTimeout=function(t){t.error(t.errorInstance)},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),r.prototype._next.call(this,t)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.errorInstance=null},e}(_6.Subscriber)});var L1=u(Z1=>{"use strict";var x6=W(),q6=Pl();function T6(r,e){return e===void 0&&(e=x6.async),q6.timeout(r,e)(this)}Z1.timeout=T6});var V1=u(()=>{"use strict";var C6=v(),I6=L1();C6.Observable.prototype.timeout=I6.timeout});var Nl=u(Uo=>{"use strict";var A6=Uo&&Uo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},j6=W(),E6=ci(),k6=P(),R6=N();function P6(r,e,t){return t===void 0&&(t=j6.async),function(i){var n=E6.isDate(r),s=n?+r-t.now():Math.abs(r);return i.lift(new N6(s,n,e,t))}}Uo.timeoutWith=P6;var N6=function(){function r(e,t,i,n){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=i,this.scheduler=n}return r.prototype.call=function(e,t){return t.subscribe(new F6(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},r}(),F6=function(r){A6(e,r);function e(t,i,n,s,o){r.call(this,t),this.absoluteTimeout=i,this.waitFor=n,this.withObservable=s,this.scheduler=o,this.action=null,this.scheduleTimeout()}return e.dispatchTimeout=function(t){var i=t.withObservable;t._unsubscribeAndRecycle(),t.add(R6.subscribeToResult(t,i))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),r.prototype._next.call(this,t)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null},e}(k6.OuterSubscriber)});var z1=u(D1=>{"use strict";var M6=W(),U6=Nl();function Z6(r,e,t){return t===void 0&&(t=M6.async),U6.timeoutWith(r,e,t)(this)}D1.timeoutWith=Z6});var W1=u(()=>{"use strict";var L6=v(),V6=z1();L6.Observable.prototype.timeoutWith=V6.timeoutWith});var Zo=u(Fl=>{"use strict";var D6=W(),z6=pr();function W6(r){return r===void 0&&(r=D6.async),z6.map(function(e){return new B1(e,r.now())})}Fl.timestamp=W6;var B1=function(){function r(e,t){this.value=e,this.timestamp=t}return r}();Fl.Timestamp=B1});var H1=u($1=>{"use strict";var B6=W(),$6=Zo();function H6(r){return r===void 0&&(r=B6.async),$6.timestamp(r)(this)}$1.timestamp=H6});var J1=u(()=>{"use strict";var J6=v(),Y6=H1();J6.Observable.prototype.timestamp=Y6.timestamp});var Ml=u(Y1=>{"use strict";var K6=yr();function G6(r,e,t){return t===0?[e]:(r.push(e),r)}function X6(){return K6.reduce(G6,[])}Y1.toArray=X6});var G1=u(K1=>{"use strict";var Q6=Ml();function eB(){return Q6.toArray()(this)}K1.toArray=eB});var X1=u(()=>{"use strict";var tB=v(),rB=G1();tB.Observable.prototype.toArray=rB.toArray});var Q1=u(()=>{});var Ul=u(Lo=>{"use strict";var iB=Lo&&Lo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},eO=K(),nB=P(),sB=N();function oB(r){return function(t){return t.lift(new aB(r))}}Lo.window=oB;var aB=function(){function r(e){this.windowBoundaries=e}return r.prototype.call=function(e,t){var i=new uB(e),n=t.subscribe(i);return n.closed||i.add(sB.subscribeToResult(i,this.windowBoundaries)),n},r}(),uB=function(r){iB(e,r);function e(t){r.call(this,t),this.window=new eO.Subject,t.next(this.window)}return e.prototype.notifyNext=function(t,i,n,s,o){this.openWindow()},e.prototype.notifyError=function(t,i){this._error(t)},e.prototype.notifyComplete=function(t){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var i=this.destination,n=this.window=new eO.Subject;i.next(n)},e}(nB.OuterSubscriber)});var rO=u(tO=>{"use strict";var cB=Ul();function lB(r){return cB.window(r)(this)}tO.window=lB});var iO=u(()=>{"use strict";var fB=v(),hB=rO();fB.Observable.prototype.window=hB.window});var Zl=u(Vo=>{"use strict";var pB=Vo&&Vo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},dB=C(),nO=K();function vB(r,e){return e===void 0&&(e=0),function(i){return i.lift(new bB(r,e))}}Vo.windowCount=vB;var bB=function(){function r(e,t){this.windowSize=e,this.startWindowEvery=t}return r.prototype.call=function(e,t){return t.subscribe(new mB(e,this.windowSize,this.startWindowEvery))},r}(),mB=function(r){pB(e,r);function e(t,i,n){r.call(this,t),this.destination=t,this.windowSize=i,this.startWindowEvery=n,this.windows=[new nO.Subject],this.count=0,t.next(this.windows[0])}return e.prototype._next=function(t){for(var i=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,s=this.windowSize,o=this.windows,a=o.length,c=0;c<a&&!this.closed;c++)o[c].next(t);var l=this.count-s+1;if(l>=0&&l%i===0&&!this.closed&&o.shift().complete(),++this.count%i===0&&!this.closed){var f=new nO.Subject;o.push(f),n.next(f)}},e.prototype._error=function(t){var i=this.windows;if(i)for(;i.length>0&&!this.closed;)i.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(dB.Subscriber)});var oO=u(sO=>{"use strict";var yB=Zl();function _B(r,e){return e===void 0&&(e=0),yB.windowCount(r,e)(this)}sO.windowCount=_B});var aO=u(()=>{"use strict";var gB=v(),wB=oO();gB.Observable.prototype.windowCount=wB.windowCount});var Vl=u(Do=>{"use strict";var cO=Do&&Do.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},SB=K(),OB=W(),xB=C(),uO=cr(),Ll=_e();function qB(r){var e=OB.async,t=null,i=Number.POSITIVE_INFINITY;return Ll.isScheduler(arguments[3])&&(e=arguments[3]),Ll.isScheduler(arguments[2])?e=arguments[2]:uO.isNumeric(arguments[2])&&(i=arguments[2]),Ll.isScheduler(arguments[1])?e=arguments[1]:uO.isNumeric(arguments[1])&&(t=arguments[1]),function(s){return s.lift(new TB(r,t,i,e))}}Do.windowTime=qB;var TB=function(){function r(e,t,i,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=i,this.scheduler=n}return r.prototype.call=function(e,t){return t.subscribe(new IB(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},r}(),CB=function(r){cO(e,r);function e(){r.apply(this,arguments),this._numberOfNextedValues=0}return e.prototype.next=function(t){this._numberOfNextedValues++,r.prototype.next.call(this,t)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(SB.Subject),IB=function(r){cO(e,r);function e(t,i,n,s,o){r.call(this,t),this.destination=t,this.windowTimeSpan=i,this.windowCreationInterval=n,this.maxWindowSize=s,this.scheduler=o,this.windows=[];var a=this.openWindow();if(n!==null&&n>=0){var c={subscriber:this,window:a,context:null},l={windowTimeSpan:i,windowCreationInterval:n,subscriber:this,scheduler:o};this.add(o.schedule(lO,i,c)),this.add(o.schedule(jB,n,l))}else{var f={subscriber:this,window:a,windowTimeSpan:i};this.add(o.schedule(AB,i,f))}}return e.prototype._next=function(t){for(var i=this.windows,n=i.length,s=0;s<n;s++){var o=i[s];o.closed||(o.next(t),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},e.prototype._error=function(t){for(var i=this.windows;i.length>0;)i.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var i=t.shift();i.closed||i.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new CB;this.windows.push(t);var i=this.destination;return i.next(t),t},e.prototype.closeWindow=function(t){t.complete();var i=this.windows;i.splice(i.indexOf(t),1)},e}(xB.Subscriber);function AB(r){var e=r.subscriber,t=r.windowTimeSpan,i=r.window;i&&e.closeWindow(i),r.window=e.openWindow(),this.schedule(r,t)}function jB(r){var e=r.windowTimeSpan,t=r.subscriber,i=r.scheduler,n=r.windowCreationInterval,s=t.openWindow(),o=this,a={action:o,subscription:null},c={subscriber:t,window:s,context:a};a.subscription=i.schedule(lO,e,c),o.add(a.subscription),o.schedule(r,n)}function lO(r){var e=r.subscriber,t=r.window,i=r.context;i&&i.action&&i.subscription&&i.action.remove(i.subscription),e.closeWindow(t)}});var pO=u(hO=>{"use strict";var EB=W(),fO=cr(),Dl=_e(),kB=Vl();function RB(r){var e=EB.async,t=null,i=Number.POSITIVE_INFINITY;return Dl.isScheduler(arguments[3])&&(e=arguments[3]),Dl.isScheduler(arguments[2])?e=arguments[2]:fO.isNumeric(arguments[2])&&(i=arguments[2]),Dl.isScheduler(arguments[1])?e=arguments[1]:fO.isNumeric(arguments[1])&&(t=arguments[1]),kB.windowTime(r,t,i,e)(this)}hO.windowTime=RB});var dO=u(()=>{"use strict";var PB=v(),NB=pO();PB.Observable.prototype.windowTime=NB.windowTime});var zl=u(zo=>{"use strict";var FB=zo&&zo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},MB=K(),UB=J(),ZB=Q(),vO=Y(),LB=P(),bO=N();function VB(r,e){return function(t){return t.lift(new DB(r,e))}}zo.windowToggle=VB;var DB=function(){function r(e,t){this.openings=e,this.closingSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new zB(e,this.openings,this.closingSelector))},r}(),zB=function(r){FB(e,r);function e(t,i,n){r.call(this,t),this.openings=i,this.closingSelector=n,this.contexts=[],this.add(this.openSubscription=bO.subscribeToResult(this,i,i))}return e.prototype._next=function(t){var i=this.contexts;if(i)for(var n=i.length,s=0;s<n;s++)i[s].window.next(t)},e.prototype._error=function(t){var i=this.contexts;if(this.contexts=null,i)for(var n=i.length,s=-1;++s<n;){var o=i[s];o.window.error(t),o.subscription.unsubscribe()}r.prototype._error.call(this,t)},e.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var i=t.length,n=-1;++n<i;){var s=t[n];s.window.complete(),s.subscription.unsubscribe()}r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var i=t.length,n=-1;++n<i;){var s=t[n];s.window.unsubscribe(),s.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,i,n,s,o){if(t===this.openings){var a=this.closingSelector,c=ZB.tryCatch(a)(i);if(c===vO.errorObject)return this.error(vO.errorObject.e);var l=new MB.Subject,f=new UB.Subscription,p={window:l,subscription:f};this.contexts.push(p);var y=bO.subscribeToResult(this,c,p);y.closed?this.closeWindow(this.contexts.length-1):(y.context=p,f.add(y)),this.destination.next(l)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(t!==-1){var i=this.contexts,n=i[t],s=n.window,o=n.subscription;i.splice(t,1),s.complete(),o.unsubscribe()}},e}(LB.OuterSubscriber)});var yO=u(mO=>{"use strict";var WB=zl();function BB(r,e){return WB.windowToggle(r,e)(this)}mO.windowToggle=BB});var _O=u(()=>{"use strict";var $B=v(),HB=yO();$B.Observable.prototype.windowToggle=HB.windowToggle});var Wl=u(Wo=>{"use strict";var JB=Wo&&Wo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},YB=K(),KB=Q(),gO=Y(),GB=P(),XB=N();function QB(r){return function(t){return t.lift(new e5(r))}}Wo.windowWhen=QB;var e5=function(){function r(e){this.closingSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new t5(e,this.closingSelector))},r}(),t5=function(r){JB(e,r);function e(t,i){r.call(this,t),this.destination=t,this.closingSelector=i,this.openWindow()}return e.prototype.notifyNext=function(t,i,n,s,o){this.openWindow(o)},e.prototype.notifyError=function(t,i){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){t===void 0&&(t=null),t&&(this.remove(t),t.unsubscribe());var i=this.window;i&&i.complete();var n=this.window=new YB.Subject;this.destination.next(n);var s=KB.tryCatch(this.closingSelector)();if(s===gO.errorObject){var o=gO.errorObject.e;this.destination.error(o),this.window.error(o)}else this.add(this.closingNotification=XB.subscribeToResult(this,s))},e}(GB.OuterSubscriber)});var SO=u(wO=>{"use strict";var r5=Wl();function i5(r){return r5.windowWhen(r)(this)}wO.windowWhen=i5});var OO=u(()=>{"use strict";var n5=v(),s5=SO();n5.Observable.prototype.windowWhen=s5.windowWhen});var Bl=u(Bo=>{"use strict";var o5=Bo&&Bo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},a5=P(),u5=N();function c5(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(t){var i;typeof r[r.length-1]=="function"&&(i=r.pop());var n=r;return t.lift(new l5(n,i))}}Bo.withLatestFrom=c5;var l5=function(){function r(e,t){this.observables=e,this.project=t}return r.prototype.call=function(e,t){return t.subscribe(new f5(e,this.observables,this.project))},r}(),f5=function(r){o5(e,r);function e(t,i,n){r.call(this,t),this.observables=i,this.project=n,this.toRespond=[];var s=i.length;this.values=new Array(s);for(var o=0;o<s;o++)this.toRespond.push(o);for(var o=0;o<s;o++){var a=i[o];this.add(u5.subscribeToResult(this,a,a,o))}}return e.prototype.notifyNext=function(t,i,n,s,o){this.values[n]=i;var a=this.toRespond;if(a.length>0){var c=a.indexOf(n);c!==-1&&a.splice(c,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(this.toRespond.length===0){var i=[t].concat(this.values);this.project?this._tryProject(i):this.destination.next(i)}},e.prototype._tryProject=function(t){var i;try{i=this.project.apply(this,t)}catch(n){this.destination.error(n);return}this.destination.next(i)},e}(a5.OuterSubscriber)});var qO=u(xO=>{"use strict";var h5=Bl();function p5(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return h5.withLatestFrom.apply(void 0,r)(this)}xO.withLatestFrom=p5});var TO=u(()=>{"use strict";var d5=v(),v5=qO();d5.Observable.prototype.withLatestFrom=v5.withLatestFrom});var IO=u(CO=>{"use strict";var b5=li();function m5(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return b5.zip.apply(void 0,r)(this)}CO.zipProto=m5});var AO=u(()=>{"use strict";var y5=v(),_5=IO();y5.Observable.prototype.zip=_5.zipProto});var $l=u(jO=>{"use strict";var g5=li();function w5(r){return function(e){return e.lift(new g5.ZipOperator(r))}}jO.zipAll=w5});var kO=u(EO=>{"use strict";var S5=$l();function O5(r){return S5.zipAll(r)(this)}EO.zipAll=O5});var RO=u(()=>{"use strict";var x5=v(),q5=kO();x5.Observable.prototype.zipAll=q5.zipAll});var Hl=u(PO=>{"use strict";var T5=function(){function r(e,t){t===void 0&&(t=Number.POSITIVE_INFINITY),this.subscribedFrame=e,this.unsubscribedFrame=t}return r}();PO.SubscriptionLog=T5});var Jl=u(FO=>{"use strict";var NO=Hl(),C5=function(){function r(){this.subscriptions=[]}return r.prototype.logSubscribedFrame=function(){return this.subscriptions.push(new NO.SubscriptionLog(this.scheduler.now())),this.subscriptions.length-1},r.prototype.logUnsubscribedFrame=function(e){var t=this.subscriptions,i=t[e];t[e]=new NO.SubscriptionLog(i.subscribedFrame,this.scheduler.now())},r}();FO.SubscriptionLoggable=C5});var Yl=u(MO=>{"use strict";function I5(r,e){for(var t=0,i=e.length;t<i;t++)for(var n=e[t],s=Object.getOwnPropertyNames(n.prototype),o=0,a=s.length;o<a;o++){var c=s[o];r.prototype[c]=n.prototype[c]}}MO.applyMixins=I5});var ZO=u($o=>{"use strict";var A5=$o&&$o.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},j5=v(),E5=J(),k5=Jl(),R5=Yl(),UO=function(r){A5(e,r);function e(t,i){r.call(this,function(n){var s=this,o=s.logSubscribedFrame();return n.add(new E5.Subscription(function(){s.logUnsubscribedFrame(o)})),s.scheduleMessages(n),n}),this.messages=t,this.subscriptions=[],this.scheduler=i}return e.prototype.scheduleMessages=function(t){for(var i=this.messages.length,n=0;n<i;n++){var s=this.messages[n];t.add(this.scheduler.schedule(function(o){var a=o.message,c=o.subscriber;a.notification.observe(c)},s.frame,{message:s,subscriber:t}))}},e}(j5.Observable);$o.ColdObservable=UO;R5.applyMixins(UO,[k5.SubscriptionLoggable])});var VO=u(Ho=>{"use strict";var P5=Ho&&Ho.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},N5=K(),F5=J(),M5=Jl(),U5=Yl(),LO=function(r){P5(e,r);function e(t,i){r.call(this),this.messages=t,this.subscriptions=[],this.scheduler=i}return e.prototype._subscribe=function(t){var i=this,n=i.logSubscribedFrame();return t.add(new F5.Subscription(function(){i.logUnsubscribedFrame(n)})),r.prototype._subscribe.call(this,t)},e.prototype.setup=function(){for(var t=this,i=t.messages.length,n=0;n<i;n++)(function(){var s=t.messages[n];t.scheduler.schedule(function(){s.notification.observe(t)},s.frame)})()},e}(N5.Subject);Ho.HotObservable=LO;U5.applyMixins(LO,[M5.SubscriptionLoggable])});var Kl=u(wi=>{"use strict";var DO=wi&&wi.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Z5=lr(),L5=fr(),V5=function(r){DO(e,r);function e(t,i){var n=this;t===void 0&&(t=zO),i===void 0&&(i=Number.POSITIVE_INFINITY),r.call(this,t,function(){return n.frame}),this.maxFrames=i,this.frame=0,this.index=-1}return e.prototype.flush=function(){for(var t=this,i=t.actions,n=t.maxFrames,s,o;(o=i.shift())&&(this.frame=o.delay)<=n&&!(s=o.execute(o.state,o.delay)););if(s){for(;o=i.shift();)o.unsubscribe();throw s}},e.frameTimeFactor=10,e}(L5.AsyncScheduler);wi.VirtualTimeScheduler=V5;var zO=function(r){DO(e,r);function e(t,i,n){n===void 0&&(n=t.index+=1),r.call(this,t,i),this.scheduler=t,this.work=i,this.index=n,this.active=!0,this.index=t.index=n}return e.prototype.schedule=function(t,i){if(i===void 0&&(i=0),!this.id)return r.prototype.schedule.call(this,t,i);this.active=!1;var n=new e(this.scheduler,this.work);return this.add(n),n.schedule(t,i)},e.prototype.requestAsyncId=function(t,i,n){n===void 0&&(n=0),this.delay=t.frame+n;var s=t.actions;return s.push(this),s.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,i,n){n===void 0&&(n=0)},e.prototype._execute=function(t,i){if(this.active===!0)return r.prototype._execute.call(this,t,i)},e.sortActions=function(t,i){return t.delay===i.delay?t.index===i.index?0:t.index>i.index?1:-1:t.delay>i.delay?1:-1},e}(Z5.AsyncAction);wi.VirtualAction=zO});var $O=u(Jo=>{"use strict";var D5=Jo&&Jo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},z5=v(),Ze=sr(),WO=ZO(),W5=VO(),Gl=Hl(),BO=Kl(),B5=750,$5=function(r){D5(e,r);function e(t){r.call(this,BO.VirtualAction,B5),this.assertDeepEqual=t,this.hotObservables=[],this.coldObservables=[],this.flushTests=[]}return e.prototype.createTime=function(t){var i=t.indexOf("|");if(i===-1)throw new Error('marble diagram for time should have a completion marker "|"');return i*e.frameTimeFactor},e.prototype.createColdObservable=function(t,i,n){if(t.indexOf("^")!==-1)throw new Error('cold observable cannot have subscription offset "^"');if(t.indexOf("!")!==-1)throw new Error('cold observable cannot have unsubscription marker "!"');var s=e.parseMarbles(t,i,n),o=new WO.ColdObservable(s,this);return this.coldObservables.push(o),o},e.prototype.createHotObservable=function(t,i,n){if(t.indexOf("!")!==-1)throw new Error('hot observable cannot have unsubscription marker "!"');var s=e.parseMarbles(t,i,n),o=new W5.HotObservable(s,this);return this.hotObservables.push(o),o},e.prototype.materializeInnerObservable=function(t,i){var n=this,s=[];return t.subscribe(function(o){s.push({frame:n.frame-i,notification:Ze.Notification.createNext(o)})},function(o){s.push({frame:n.frame-i,notification:Ze.Notification.createError(o)})},function(){s.push({frame:n.frame-i,notification:Ze.Notification.createComplete()})}),s},e.prototype.expectObservable=function(t,i){var n=this;i===void 0&&(i=null);var s=[],o={actual:s,ready:!1},a=e.parseMarblesAsSubscriptions(i).unsubscribedFrame,c;return this.schedule(function(){c=t.subscribe(function(l){var f=l;l instanceof z5.Observable&&(f=n.materializeInnerObservable(f,n.frame)),s.push({frame:n.frame,notification:Ze.Notification.createNext(f)})},function(l){s.push({frame:n.frame,notification:Ze.Notification.createError(l)})},function(){s.push({frame:n.frame,notification:Ze.Notification.createComplete()})})},0),a!==Number.POSITIVE_INFINITY&&this.schedule(function(){return c.unsubscribe()},a),this.flushTests.push(o),{toBe:function(l,f,p){o.ready=!0,o.expected=e.parseMarbles(l,f,p,!0)}}},e.prototype.expectSubscriptions=function(t){var i={actual:t,ready:!1};return this.flushTests.push(i),{toBe:function(n){var s=typeof n=="string"?[n]:n;i.ready=!0,i.expected=s.map(function(o){return e.parseMarblesAsSubscriptions(o)})}}},e.prototype.flush=function(){for(var t=this.hotObservables;t.length>0;)t.shift().setup();r.prototype.flush.call(this);for(var i=this.flushTests.filter(function(s){return s.ready});i.length>0;){var n=i.shift();this.assertDeepEqual(n.actual,n.expected)}},e.parseMarblesAsSubscriptions=function(t){if(typeof t!="string")return new Gl.SubscriptionLog(Number.POSITIVE_INFINITY);for(var i=t.length,n=-1,s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,a=0;a<i;a++){var c=a*this.frameTimeFactor,l=t[a];switch(l){case"-":case" ":break;case"(":n=c;break;case")":n=-1;break;case"^":if(s!==Number.POSITIVE_INFINITY)throw new Error("found a second subscription point '^' in a subscription marble diagram. There can only be one.");s=n>-1?n:c;break;case"!":if(o!==Number.POSITIVE_INFINITY)throw new Error("found a second subscription point '^' in a subscription marble diagram. There can only be one.");o=n>-1?n:c;break;default:throw new Error("there can only be '^' and '!' markers in a subscription marble diagram. Found instead '"+l+"'.")}}return o<0?new Gl.SubscriptionLog(s):new Gl.SubscriptionLog(s,o)},e.parseMarbles=function(t,i,n,s){if(s===void 0&&(s=!1),t.indexOf("!")!==-1)throw new Error('conventional marble diagrams cannot have the unsubscription marker "!"');for(var o=t.length,a=[],c=t.indexOf("^"),l=c===-1?0:c*-this.frameTimeFactor,f=typeof i!="object"?function(S){return S}:function(S){return s&&i[S]instanceof WO.ColdObservable?i[S].messages:i[S]},p=-1,y=0;y<o;y++){var g=y*this.frameTimeFactor+l,m=void 0,O=t[y];switch(O){case"-":case" ":break;case"(":p=g;break;case")":p=-1;break;case"|":m=Ze.Notification.createComplete();break;case"^":break;case"#":m=Ze.Notification.createError(n||"error");break;default:m=Ze.Notification.createNext(f(O));break}m&&a.push({frame:p>-1?p:g,notification:m})}return a},e}(BO.VirtualTimeScheduler);Jo.TestScheduler=$5});var JO=u(Xl=>{"use strict";var H5=se(),HO=function(){function r(e){e.requestAnimationFrame?(this.cancelAnimationFrame=e.cancelAnimationFrame.bind(e),this.requestAnimationFrame=e.requestAnimationFrame.bind(e)):e.mozRequestAnimationFrame?(this.cancelAnimationFrame=e.mozCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.mozRequestAnimationFrame.bind(e)):e.webkitRequestAnimationFrame?(this.cancelAnimationFrame=e.webkitCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.webkitRequestAnimationFrame.bind(e)):e.msRequestAnimationFrame?(this.cancelAnimationFrame=e.msCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.msRequestAnimationFrame.bind(e)):e.oRequestAnimationFrame?(this.cancelAnimationFrame=e.oCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.oRequestAnimationFrame.bind(e)):(this.cancelAnimationFrame=e.clearTimeout.bind(e),this.requestAnimationFrame=function(t){return e.setTimeout(t,1e3/60)})}return r}();Xl.RequestAnimationFrameDefinition=HO;Xl.AnimationFrame=new HO(H5.root)});var KO=u(Yo=>{"use strict";var J5=Yo&&Yo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Y5=lr(),YO=JO(),K5=function(r){J5(e,r);function e(t,i){r.call(this,t,i),this.scheduler=t,this.work=i}return e.prototype.requestAsyncId=function(t,i,n){return n===void 0&&(n=0),n!==null&&n>0?r.prototype.requestAsyncId.call(this,t,i,n):(t.actions.push(this),t.scheduled||(t.scheduled=YO.AnimationFrame.requestAnimationFrame(t.flush.bind(t,null))))},e.prototype.recycleAsyncId=function(t,i,n){if(n===void 0&&(n=0),n!==null&&n>0||n===null&&this.delay>0)return r.prototype.recycleAsyncId.call(this,t,i,n);t.actions.length===0&&(YO.AnimationFrame.cancelAnimationFrame(i),t.scheduled=void 0)},e}(Y5.AsyncAction);Yo.AnimationFrameAction=K5});var GO=u(Ko=>{"use strict";var G5=Ko&&Ko.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},X5=fr(),Q5=function(r){G5(e,r);function e(){r.apply(this,arguments)}return e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var i=this.actions,n,s=-1,o=i.length;t=t||i.shift();do if(n=t.execute(t.state,t.delay))break;while(++s<o&&(t=i.shift()));if(this.active=!1,n){for(;++s<o&&(t=i.shift());)t.unsubscribe();throw n}},e}(X5.AsyncScheduler);Ko.AnimationFrameScheduler=Q5});var QO=u(XO=>{"use strict";var e8=KO(),t8=GO();XO.animationFrame=new t8.AnimationFrameScheduler(e8.AnimationFrameAction)});var e0=u(_=>{"use strict";var r8=to();_.audit=r8.audit;var i8=Rc();_.auditTime=i8.auditTime;var n8=Qu();_.buffer=n8.buffer;var s8=ec();_.bufferCount=s8.bufferCount;var o8=tc();_.bufferTime=o8.bufferTime;var a8=rc();_.bufferToggle=a8.bufferToggle;var u8=ic();_.bufferWhen=u8.bufferWhen;var c8=nc();_.catchError=c8.catchError;var l8=sc();_.combineAll=l8.combineAll;var f8=ni();_.combineLatest=f8.combineLatest;var h8=ac();_.concat=h8.concat;var p8=Hn();_.concatAll=p8.concatAll;var d8=Is();_.concatMap=d8.concatMap;var v8=cc();_.concatMapTo=v8.concatMapTo;var b8=lc();_.count=b8.count;var m8=hc();_.debounce=m8.debounce;var y8=pc();_.debounceTime=y8.debounceTime;var _8=Ps();_.defaultIfEmpty=_8.defaultIfEmpty;var g8=dc();_.delay=g8.delay;var w8=bc();_.delayWhen=w8.delayWhen;var S8=fc();_.dematerialize=S8.dematerialize;var O8=yc();_.distinct=O8.distinct;var x8=Zs();_.distinctUntilChanged=x8.distinctUntilChanged;var q8=_c();_.distinctUntilKeyChanged=q8.distinctUntilKeyChanged;var T8=xc();_.elementAt=T8.elementAt;var C8=Nc();_.every=C8.every;var I8=wc();_.exhaust=I8.exhaust;var A8=Sc();_.exhaustMap=A8.exhaustMap;var j8=Oc();_.expand=j8.expand;var E8=$s();_.filter=E8.filter;var k8=qc();_.finalize=k8.finalize;var R8=Js();_.find=R8.find;var P8=Tc();_.findIndex=P8.findIndex;var N8=Cc();_.first=N8.first;var F8=Ac();_.groupBy=F8.groupBy;var M8=Ec();_.ignoreElements=M8.ignoreElements;var U8=kc();_.isEmpty=U8.isEmpty;var Z8=Pc();_.last=Z8.last;var L8=pr();_.map=L8.map;var V8=Fc();_.mapTo=V8.mapTo;var D8=Uc();_.materialize=D8.materialize;var z8=Zc();_.max=z8.max;var W8=Vc();_.merge=W8.merge;var B8=oi();_.mergeAll=B8.mergeAll;var $8=ar();_.mergeMap=$8.mergeMap;var H8=ar();_.flatMap=H8.mergeMap;var J8=zc();_.mergeMapTo=J8.mergeMapTo;var Y8=Wc();_.mergeScan=Y8.mergeScan;var K8=Bc();_.min=K8.min;var G8=Ke();_.multicast=G8.multicast;var X8=si();_.observeOn=X8.observeOn;var Q8=os();_.onErrorResumeNext=Q8.onErrorResumeNext;var e$=Yc();_.pairwise=e$.pairwise;var t$=Kc();_.partition=t$.partition;var r$=Gc();_.pluck=r$.pluck;var i$=Xc();_.publish=i$.publish;var n$=el();_.publishBehavior=n$.publishBehavior;var s$=rl();_.publishLast=s$.publishLast;var o$=tl();_.publishReplay=o$.publishReplay;var a$=il();_.race=a$.race;var u$=yr();_.reduce=u$.reduce;var c$=sl();_.repeat=c$.repeat;var l$=ol();_.repeatWhen=l$.repeatWhen;var f$=al();_.retry=f$.retry;var h$=ul();_.retryWhen=h$.retryWhen;var p$=fo();_.refCount=p$.refCount;var d$=cl();_.sample=d$.sample;var v$=ll();_.sampleTime=v$.sampleTime;var b$=ao();_.scan=b$.scan;var m$=fl();_.sequenceEqual=m$.sequenceEqual;var y$=hl();_.share=y$.share;var _$=pl();_.shareReplay=_$.shareReplay;var g$=dl();_.single=g$.single;var w$=vl();_.skip=w$.skip;var S$=bl();_.skipLast=S$.skipLast;var O$=ml();_.skipUntil=O$.skipUntil;var x$=yl();_.skipWhile=x$.skipWhile;var q$=gl();_.startWith=q$.startWith;var T$=xl();_.switchAll=T$.switchAll;var C$=jo();_.switchMap=C$.switchMap;var I$=ql();_.switchMapTo=I$.switchMapTo;var A$=Tl();_.take=A$.take;var j$=co();_.takeLast=j$.takeLast;var E$=Cl();_.takeUntil=E$.takeUntil;var k$=Il();_.takeWhile=k$.takeWhile;var R$=gc();_.tap=R$.tap;var P$=_i();_.throttle=P$.throttle;var N$=Al();_.throttleTime=N$.throttleTime;var F$=jl();_.timeInterval=F$.timeInterval;var M$=Pl();_.timeout=M$.timeout;var U$=Nl();_.timeoutWith=U$.timeoutWith;var Z$=Zo();_.timestamp=Z$.timestamp;var L$=Ml();_.toArray=L$.toArray;var V$=Ul();_.window=V$.window;var D$=Zl();_.windowCount=D$.windowCount;var z$=Vl();_.windowTime=z$.windowTime;var W$=zl();_.windowToggle=W$.windowToggle;var B$=Wl();_.windowWhen=B$.windowWhen;var $$=Bl();_.withLatestFrom=$$.withLatestFrom;var H$=li();_.zip=H$.zip;var J$=$l();_.zipAll=J$.zipAll});var r0=u(L=>{"use strict";var t0=K();L.Subject=t0.Subject;L.AnonymousSubject=t0.AnonymousSubject;var Y$=v();L.Observable=Y$.Observable;id();cd();xd();zd();Jd();Gd();iv();nv();lv();dv();mv();Sv();Cv();Mv();Zv();Dv();$v();Hv();Xv();rb();ob();fb();vb();gb();Cb();Vb();em();im();um();pm();mm();wm();Tm();jm();Rm();Nm();Um();Dm();$m();Ym();Xm();ty();ny();ay();fy();vy();wy();qy();Ay();Ny();Uy();Vy();Hy();Gy();e_();s_();l_();d_();m_();I_();E_();P_();U_();D_();B_();K_();Q_();rg();sg();ug();bg();yg();wg();Tg();Rg();Zg();zg();Yg();Xg();tw();nw();fw();vw();ww();qw();Aw();Rw();Fw();Lw();Ww();Hw();Kw();eS();iS();oS();lS();yS();SS();TS();AS();kS();FS();ZS();DS();$S();n1();l1();p1();b1();_1();S1();q1();I1();k1();N1();U1();V1();W1();J1();X1();Q1();iO();aO();dO();_O();OO();TO();AO();RO();var K$=J();L.Subscription=K$.Subscription;var G$=C();L.Subscriber=G$.Subscriber;var X$=ri();L.AsyncSubject=X$.AsyncSubject;var Q$=pi();L.ReplaySubject=Q$.ReplaySubject;var eH=Qc();L.BehaviorSubject=eH.BehaviorSubject;var tH=Hc();L.ConnectableObservable=tH.ConnectableObservable;var rH=sr();L.Notification=rH.Notification;var iH=vi();L.EmptyError=iH.EmptyError;var nH=br();L.ArgumentOutOfRangeError=nH.ArgumentOutOfRangeError;var sH=ei();L.ObjectUnsubscribedError=sH.ObjectUnsubscribedError;var oH=Rl();L.TimeoutError=oH.TimeoutError;var aH=qu();L.UnsubscriptionError=aH.UnsubscriptionError;var uH=kl();L.TimeInterval=uH.TimeInterval;var cH=Zo();L.Timestamp=cH.Timestamp;var lH=$O();L.TestScheduler=lH.TestScheduler;var fH=Kl();L.VirtualTimeScheduler=fH.VirtualTimeScheduler;var Ql=Ku();L.AjaxResponse=Ql.AjaxResponse;L.AjaxError=Ql.AjaxError;L.AjaxTimeoutError=Ql.AjaxTimeoutError;var hH=In();L.pipe=hH.pipe;var pH=Sl(),dH=W(),vH=Gu(),bH=QO(),mH=Gr(),yH=ir(),_H=Qr(),gH=e0();L.operators=gH;var wH={asap:pH.asap,queue:vH.queue,animationFrame:bH.animationFrame,async:dH.async};L.Scheduler=wH;var SH={rxSubscriber:mH.rxSubscriber,observable:_H.observable,iterator:yH.iterator};L.Symbol=SH});var Or=(t=>(t[t.Published=0]="Published",t[t.Prebuilt=1]="Prebuilt",t))(Or||{});var xr=(q=>(q[q.Unknown=-1]="Unknown",q[q.Exp=0]="Exp",q[q.Dev=1]="Dev",q[q.Test=2]="Test",q[q.Preprod=3]="Preprod",q[q.FirstRelease=4]="FirstRelease",q[q.Prod=5]="Prod",q[q.Gov=6]="Gov",q[q.High=7]="High",q[q.DoD=8]="DoD",q[q.Mooncake=9]="Mooncake",q[q.Ex=10]="Ex",q[q.Rx=11]="Rx",q[q.Prv=12]="Prv",q[q.Local=13]="Local",q[q.GovFR=14]="GovFR",q[q.Other=100]="Other",q))(xr||{});var ef=class{constructor(){this.appClientId="";this.tenantId="";this.environmentId="";this.useExperimentalEndpoint=!1}},IH=()=>{var t,i,n,s;let r=process.env.cloud,e=process.env.copilotAgentType;return{appClientId:(t=process.env.appClientId)!=null?t:"",tenantId:(i=process.env.tenantId)!=null?i:"",environmentId:(n=process.env.environmentId)!=null?n:"",cloud:r?xr[r]:void 0,customPowerPlatformCloud:process.env.customPowerPlatformCloud,agentIdentifier:process.env.agentIdentifier,copilotAgentType:e?Or[e]:void 0,directConnectUrl:process.env.directConnectUrl,useExperimentalEndpoint:((s=process.env.useExperimentalEndpoint)==null?void 0:s.toLocaleLowerCase())==="true"}};function qr(r,e){return function(){return r.apply(e,arguments)}}var{toString:f0}=Object.prototype,{getPrototypeOf:ea}=Object,{iterator:qi,toStringTag:rf}=Symbol,Ti=(r=>e=>{let t=f0.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),ge=r=>(r=r.toLowerCase(),e=>Ti(e)===r),Ci=r=>e=>typeof e===r,{isArray:qt}=Array,Tr=Ci("undefined");function h0(r){return r!==null&&!Tr(r)&&r.constructor!==null&&!Tr(r.constructor)&&ae(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}var nf=ge("ArrayBuffer");function p0(r){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&nf(r.buffer),e}var d0=Ci("string"),ae=Ci("function"),sf=Ci("number"),Ii=r=>r!==null&&typeof r=="object",v0=r=>r===!0||r===!1,xi=r=>{if(Ti(r)!=="object")return!1;let e=ea(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(rf in r)&&!(qi in r)},b0=ge("Date"),m0=ge("File"),y0=ge("Blob"),_0=ge("FileList"),g0=r=>Ii(r)&&ae(r.pipe),w0=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||ae(r.append)&&((e=Ti(r))==="formdata"||e==="object"&&ae(r.toString)&&r.toString()==="[object FormData]"))},S0=ge("URLSearchParams"),[O0,x0,q0,T0]=["ReadableStream","Request","Response","Headers"].map(ge),C0=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Cr(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r=="undefined")return;let i,n;if(typeof r!="object"&&(r=[r]),qt(r))for(i=0,n=r.length;i<n;i++)e.call(null,r[i],i,r);else{let s=t?Object.getOwnPropertyNames(r):Object.keys(r),o=s.length,a;for(i=0;i<o;i++)a=s[i],e.call(null,r[a],a,r)}}function of(r,e){e=e.toLowerCase();let t=Object.keys(r),i=t.length,n;for(;i-- >0;)if(n=t[i],e===n.toLowerCase())return n;return null}var Xe=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,af=r=>!Tr(r)&&r!==Xe;function Qo(){let{caseless:r}=af(this)&&this||{},e={},t=(i,n)=>{let s=r&&of(e,n)||n;xi(e[s])&&xi(i)?e[s]=Qo(e[s],i):xi(i)?e[s]=Qo({},i):qt(i)?e[s]=i.slice():e[s]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&Cr(arguments[i],t);return e}var I0=(r,e,t,{allOwnKeys:i}={})=>(Cr(e,(n,s)=>{t&&ae(n)?r[s]=qr(n,t):r[s]=n},{allOwnKeys:i}),r),A0=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),j0=(r,e,t,i)=>{r.prototype=Object.create(e.prototype,i),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},E0=(r,e,t,i)=>{let n,s,o,a={};if(e=e||{},r==null)return e;do{for(n=Object.getOwnPropertyNames(r),s=n.length;s-- >0;)o=n[s],(!i||i(o,r,e))&&!a[o]&&(e[o]=r[o],a[o]=!0);r=t!==!1&&ea(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},k0=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;let i=r.indexOf(e,t);return i!==-1&&i===t},R0=r=>{if(!r)return null;if(qt(r))return r;let e=r.length;if(!sf(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},P0=(r=>e=>r&&e instanceof r)(typeof Uint8Array!="undefined"&&ea(Uint8Array)),N0=(r,e)=>{let i=(r&&r[qi]).call(r),n;for(;(n=i.next())&&!n.done;){let s=n.value;e.call(r,s[0],s[1])}},F0=(r,e)=>{let t,i=[];for(;(t=r.exec(e))!==null;)i.push(t);return i},M0=ge("HTMLFormElement"),U0=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,i,n){return i.toUpperCase()+n}),tf=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),Z0=ge("RegExp"),uf=(r,e)=>{let t=Object.getOwnPropertyDescriptors(r),i={};Cr(t,(n,s)=>{let o;(o=e(n,s,r))!==!1&&(i[s]=o||n)}),Object.defineProperties(r,i)},L0=r=>{uf(r,(e,t)=>{if(ae(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let i=r[t];if(ae(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},V0=(r,e)=>{let t={},i=n=>{n.forEach(s=>{t[s]=!0})};return qt(r)?i(r):i(String(r).split(e)),t},D0=()=>{},z0=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e;function W0(r){return!!(r&&ae(r.append)&&r[rf]==="FormData"&&r[qi])}var B0=r=>{let e=new Array(10),t=(i,n)=>{if(Ii(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[n]=i;let s=qt(i)?[]:{};return Cr(i,(o,a)=>{let c=t(o,n+1);!Tr(c)&&(s[a]=c)}),e[n]=void 0,s}}return i};return t(r,0)},$0=ge("AsyncFunction"),H0=r=>r&&(Ii(r)||ae(r))&&ae(r.then)&&ae(r.catch),cf=((r,e)=>r?setImmediate:e?((t,i)=>(Xe.addEventListener("message",({source:n,data:s})=>{n===Xe&&s===t&&i.length&&i.shift()()},!1),n=>{i.push(n),Xe.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",ae(Xe.postMessage)),J0=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Xe):typeof process!="undefined"&&process.nextTick||cf,Y0=r=>r!=null&&ae(r[qi]),b={isArray:qt,isArrayBuffer:nf,isBuffer:h0,isFormData:w0,isArrayBufferView:p0,isString:d0,isNumber:sf,isBoolean:v0,isObject:Ii,isPlainObject:xi,isReadableStream:O0,isRequest:x0,isResponse:q0,isHeaders:T0,isUndefined:Tr,isDate:b0,isFile:m0,isBlob:y0,isRegExp:Z0,isFunction:ae,isStream:g0,isURLSearchParams:S0,isTypedArray:P0,isFileList:_0,forEach:Cr,merge:Qo,extend:I0,trim:C0,stripBOM:A0,inherits:j0,toFlatObject:E0,kindOf:Ti,kindOfTest:ge,endsWith:k0,toArray:R0,forEachEntry:N0,matchAll:F0,isHTMLForm:M0,hasOwnProperty:tf,hasOwnProp:tf,reduceDescriptors:uf,freezeMethods:L0,toObjectSet:V0,toCamelCase:U0,noop:D0,toFiniteNumber:z0,findKey:of,global:Xe,isContextDefined:af,isSpecCompliantForm:W0,toJSONObject:B0,isAsyncFn:$0,isThenable:H0,setImmediate:cf,asap:J0,isIterable:Y0};function Tt(r,e,t,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),i&&(this.request=i),n&&(this.response=n,this.status=n.status?n.status:null)}b.inherits(Tt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:b.toJSONObject(this.config),code:this.code,status:this.status}}});var lf=Tt.prototype,ff={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{ff[r]={value:r}});Object.defineProperties(Tt,ff);Object.defineProperty(lf,"isAxiosError",{value:!0});Tt.from=(r,e,t,i,n,s)=>{let o=Object.create(lf);return b.toFlatObject(r,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),Tt.call(o,r.message,e,t,i,n),o.cause=r,o.name=r.name,s&&Object.assign(o,s),o};var j=Tt;var Ai=null;function ta(r){return b.isPlainObject(r)||b.isArray(r)}function pf(r){return b.endsWith(r,"[]")?r.slice(0,-2):r}function hf(r,e,t){return r?r.concat(e).map(function(n,s){return n=pf(n),!t&&s?"["+n+"]":n}).join(t?".":""):e}function K0(r){return b.isArray(r)&&!r.some(ta)}var G0=b.toFlatObject(b,{},null,function(e){return/^is[A-Z]/.test(e)});function X0(r,e,t){if(!b.isObject(r))throw new TypeError("target must be an object");e=e||new(Ai||FormData),t=b.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(O,S){return!b.isUndefined(S[O])});let i=t.metaTokens,n=t.visitor||f,s=t.dots,o=t.indexes,c=(t.Blob||typeof Blob!="undefined"&&Blob)&&b.isSpecCompliantForm(e);if(!b.isFunction(n))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(b.isDate(m))return m.toISOString();if(!c&&b.isBlob(m))throw new j("Blob is not supported. Use a Buffer instead.");return b.isArrayBuffer(m)||b.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function f(m,O,S){let q=m;if(m&&!S&&typeof m=="object"){if(b.endsWith(O,"{}"))O=i?O:O.slice(0,-2),m=JSON.stringify(m);else if(b.isArray(m)&&K0(m)||(b.isFileList(m)||b.endsWith(O,"[]"))&&(q=b.toArray(m)))return O=pf(O),q.forEach(function(U,V){!(b.isUndefined(U)||U===null)&&e.append(o===!0?hf([O],V,s):o===null?O:O+"[]",l(U))}),!1}return ta(m)?!0:(e.append(hf(S,O,s),l(m)),!1)}let p=[],y=Object.assign(G0,{defaultVisitor:f,convertValue:l,isVisitable:ta});function g(m,O){if(!b.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+O.join("."));p.push(m),b.forEach(m,function(q,F){(!(b.isUndefined(q)||q===null)&&n.call(e,q,b.isString(F)?F.trim():F,O,y))===!0&&g(q,O?O.concat(F):[F])}),p.pop()}}if(!b.isObject(r))throw new TypeError("data must be an object");return g(r),e}var Le=X0;function df(r){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function vf(r,e){this._pairs=[],r&&Le(r,this,e)}var bf=vf.prototype;bf.append=function(e,t){this._pairs.push([e,t])};bf.toString=function(e){let t=e?function(i){return e.call(this,i,df)}:df;return this._pairs.map(function(n){return t(n[0])+"="+t(n[1])},"").join("&")};var ji=vf;function Q0(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ir(r,e,t){if(!e)return r;let i=t&&t.encode||Q0;b.isFunction(t)&&(t={serialize:t});let n=t&&t.serialize,s;if(n?s=n(e,t):s=b.isURLSearchParams(e)?e.toString():new ji(e,t).toString(i),s){let o=r.indexOf("#");o!==-1&&(r=r.slice(0,o)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}var ra=class{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){b.forEach(this.handlers,function(i){i!==null&&e(i)})}},ia=ra;var Ei={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var mf=typeof URLSearchParams!="undefined"?URLSearchParams:ji;var yf=typeof FormData!="undefined"?FormData:null;var _f=typeof Blob!="undefined"?Blob:null;var gf={isBrowser:!0,classes:{URLSearchParams:mf,FormData:yf,Blob:_f},protocols:["http","https","file","blob","url","data"]};var oa={};c0(oa,{hasBrowserEnv:()=>sa,hasStandardBrowserEnv:()=>ex,hasStandardBrowserWebWorkerEnv:()=>tx,navigator:()=>na,origin:()=>rx});var sa=typeof window!="undefined"&&typeof document!="undefined",na=typeof navigator=="object"&&navigator||void 0,ex=sa&&(!na||["ReactNative","NativeScript","NS"].indexOf(na.product)<0),tx=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",rx=sa&&window.location.href||"http://localhost";var B={...oa,...gf};function aa(r,e){return Le(r,new B.classes.URLSearchParams,Object.assign({visitor:function(t,i,n,s){return B.isNode&&b.isBuffer(t)?(this.append(i,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function ix(r){return b.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function nx(r){let e={},t=Object.keys(r),i,n=t.length,s;for(i=0;i<n;i++)s=t[i],e[s]=r[s];return e}function sx(r){function e(t,i,n,s){let o=t[s++];if(o==="__proto__")return!0;let a=Number.isFinite(+o),c=s>=t.length;return o=!o&&b.isArray(n)?n.length:o,c?(b.hasOwnProp(n,o)?n[o]=[n[o],i]:n[o]=i,!a):((!n[o]||!b.isObject(n[o]))&&(n[o]=[]),e(t,i,n[o],s)&&b.isArray(n[o])&&(n[o]=nx(n[o])),!a)}if(b.isFormData(r)&&b.isFunction(r.entries)){let t={};return b.forEachEntry(r,(i,n)=>{e(ix(i),n,t,0)}),t}return null}var ki=sx;function ox(r,e,t){if(b.isString(r))try{return(e||JSON.parse)(r),b.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(t||JSON.stringify)(r)}var ua={transitional:Ei,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let i=t.getContentType()||"",n=i.indexOf("application/json")>-1,s=b.isObject(e);if(s&&b.isHTMLForm(e)&&(e=new FormData(e)),b.isFormData(e))return n?JSON.stringify(ki(e)):e;if(b.isArrayBuffer(e)||b.isBuffer(e)||b.isStream(e)||b.isFile(e)||b.isBlob(e)||b.isReadableStream(e))return e;if(b.isArrayBufferView(e))return e.buffer;if(b.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return aa(e,this.formSerializer).toString();if((a=b.isFileList(e))||i.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return Le(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return s||n?(t.setContentType("application/json",!1),ox(e)):e}],transformResponse:[function(e){let t=this.transitional||ua.transitional,i=t&&t.forcedJSONParsing,n=this.responseType==="json";if(b.isResponse(e)||b.isReadableStream(e))return e;if(e&&b.isString(e)&&(i&&!this.responseType||n)){let o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?j.from(a,j.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:B.classes.FormData,Blob:B.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};b.forEach(["delete","get","head","post","put","patch"],r=>{ua.headers[r]={}});var Ct=ua;var ax=b.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),wf=r=>{let e={},t,i,n;return r&&r.split(`
|
|
4
|
-
`).forEach(function(o){n=o.indexOf(":"),t=o.substring(0,n).trim().toLowerCase(),i=o.substring(n+1).trim(),!(!t||e[t]&&
|
|
5
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let i=new this(e);return t.forEach(n=>i.set(n)),i}static accessor(e){let i=(this[Sf]=this[Sf]={accessors:{}}).accessors,n=this.prototype;function s(o){let a=Ar(o);i[a]||(fx(n,o),i[a]=!0)}return b.isArray(e)?e.forEach(s):s(e),this}};It.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);b.reduceDescriptors(It.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(i){this[t]=i}}});b.freezeMethods(It);var H=It;function jr(r,e){let t=this||Ct,i=e||t,n=H.from(i.headers),s=i.data;return b.forEach(r,function(a){s=a.call(t,s,n.normalize(),e?e.status:void 0)}),n.normalize(),s}function Er(r){return!!(r&&r.__CANCEL__)}function Of(r,e,t){j.call(this,r==null?"canceled":r,j.ERR_CANCELED,e,t),this.name="CanceledError"}b.inherits(Of,j,{__CANCEL__:!0});var xe=Of;function kr(r,e,t){let i=t.config.validateStatus;!t.status||!i||i(t.status)?r(t):e(new j("Request failed with status code "+t.status,[j.ERR_BAD_REQUEST,j.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function la(r){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function hx(r,e){r=r||10;let t=new Array(r),i=new Array(r),n=0,s=0,o;return e=e!==void 0?e:1e3,function(c){let l=Date.now(),f=i[s];o||(o=l),t[n]=c,i[n]=l;let p=s,y=0;for(;p!==n;)y+=t[p++],p=p%r;if(n=(n+1)%r,n===s&&(s=(s+1)%r),l-o<e)return;let g=f&&l-f;return g?Math.round(y*1e3/g):void 0}}var xf=hx;function px(r,e){let t=0,i=1e3/e,n,s,o=(l,f=Date.now())=>{t=f,n=null,s&&(clearTimeout(s),s=null),r.apply(null,l)};return[(...l)=>{let f=Date.now(),p=f-t;p>=i?o(l,f):(n=l,s||(s=setTimeout(()=>{s=null,o(n)},i-p)))},()=>n&&o(n)]}var qf=px;var At=(r,e,t=3)=>{let i=0,n=xf(50,250);return qf(s=>{let o=s.loaded,a=s.lengthComputable?s.total:void 0,c=o-i,l=n(c),f=o<=a;i=o;let p={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&f?(a-o)/l:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};r(p)},t)},fa=(r,e)=>{let t=r!=null;return[i=>e[0]({lengthComputable:t,total:r,loaded:i}),e[1]]},ha=r=>(...e)=>b.asap(()=>r(...e));var Tf=B.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,B.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(B.origin),B.navigator&&/(msie|trident)/i.test(B.navigator.userAgent)):()=>!0;var Cf=B.hasStandardBrowserEnv?{write(r,e,t,i,n,s){let o=[r+"="+encodeURIComponent(e)];b.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),b.isString(i)&&o.push("path="+i),b.isString(n)&&o.push("domain="+n),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(r){let e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function pa(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function da(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function Rr(r,e,t){let i=!pa(e);return r&&(i||t==!1)?da(r,e):e}var If=r=>r instanceof H?{...r}:r;function we(r,e){e=e||{};let t={};function i(l,f,p,y){return b.isPlainObject(l)&&b.isPlainObject(f)?b.merge.call({caseless:y},l,f):b.isPlainObject(f)?b.merge({},f):b.isArray(f)?f.slice():f}function n(l,f,p,y){if(b.isUndefined(f)){if(!b.isUndefined(l))return i(void 0,l,p,y)}else return i(l,f,p,y)}function s(l,f){if(!b.isUndefined(f))return i(void 0,f)}function o(l,f){if(b.isUndefined(f)){if(!b.isUndefined(l))return i(void 0,l)}else return i(void 0,f)}function a(l,f,p){if(p in e)return i(l,f);if(p in r)return i(void 0,l)}let c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,f,p)=>n(If(l),If(f),p,!0)};return b.forEach(Object.keys(Object.assign({},r,e)),function(f){let p=c[f]||n,y=p(r[f],e[f],f);b.isUndefined(y)&&p!==a||(t[f]=y)}),t}var Pi=r=>{let e=we({},r),{data:t,withXSRFToken:i,xsrfHeaderName:n,xsrfCookieName:s,headers:o,auth:a}=e;e.headers=o=H.from(o),e.url=Ir(Rr(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(b.isFormData(t)){if(B.hasStandardBrowserEnv||B.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){let[l,...f]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...f].join("; "))}}if(B.hasStandardBrowserEnv&&(i&&b.isFunction(i)&&(i=i(e)),i||i!==!1&&Tf(e.url))){let l=n&&s&&Cf.read(s);l&&o.set(n,l)}return e};var dx=typeof XMLHttpRequest!="undefined",Af=dx&&function(r){return new Promise(function(t,i){let n=Pi(r),s=n.data,o=H.from(n.headers).normalize(),{responseType:a,onUploadProgress:c,onDownloadProgress:l}=n,f,p,y,g,m;function O(){g&&g(),m&&m(),n.cancelToken&&n.cancelToken.unsubscribe(f),n.signal&&n.signal.removeEventListener("abort",f)}let S=new XMLHttpRequest;S.open(n.method.toUpperCase(),n.url,!0),S.timeout=n.timeout;function q(){if(!S)return;let U=H.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),oe={data:!a||a==="text"||a==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:U,config:r,request:S};kr(function(Ee){t(Ee),O()},function(Ee){i(Ee),O()},oe),S=null}"onloadend"in S?S.onloadend=q:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(q)},S.onabort=function(){S&&(i(new j("Request aborted",j.ECONNABORTED,r,S)),S=null)},S.onerror=function(){i(new j("Network Error",j.ERR_NETWORK,r,S)),S=null},S.ontimeout=function(){let V=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",oe=n.transitional||Ei;n.timeoutErrorMessage&&(V=n.timeoutErrorMessage),i(new j(V,oe.clarifyTimeoutError?j.ETIMEDOUT:j.ECONNABORTED,r,S)),S=null},s===void 0&&o.setContentType(null),"setRequestHeader"in S&&b.forEach(o.toJSON(),function(V,oe){S.setRequestHeader(oe,V)}),b.isUndefined(n.withCredentials)||(S.withCredentials=!!n.withCredentials),a&&a!=="json"&&(S.responseType=n.responseType),l&&([y,m]=At(l,!0),S.addEventListener("progress",y)),c&&S.upload&&([p,g]=At(c),S.upload.addEventListener("progress",p),S.upload.addEventListener("loadend",g)),(n.cancelToken||n.signal)&&(f=U=>{S&&(i(!U||U.type?new xe(null,r,S):U),S.abort(),S=null)},n.cancelToken&&n.cancelToken.subscribe(f),n.signal&&(n.signal.aborted?f():n.signal.addEventListener("abort",f)));let F=la(n.url);if(F&&B.protocols.indexOf(F)===-1){i(new j("Unsupported protocol "+F+":",j.ERR_BAD_REQUEST,r));return}S.send(s||null)})};var vx=(r,e)=>{let{length:t}=r=r?r.filter(Boolean):[];if(e||t){let i=new AbortController,n,s=function(l){if(!n){n=!0,a();let f=l instanceof Error?l:this.reason;i.abort(f instanceof j?f:new xe(f instanceof Error?f.message:f))}},o=e&&setTimeout(()=>{o=null,s(new j(`timeout ${e} of ms exceeded`,j.ETIMEDOUT))},e),a=()=>{r&&(o&&clearTimeout(o),o=null,r.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),r=null)};r.forEach(l=>l.addEventListener("abort",s));let{signal:c}=i;return c.unsubscribe=()=>b.asap(a),c}},jf=vx;var bx=function*(r,e){let t=r.byteLength;if(!e||t<e){yield r;return}let i=0,n;for(;i<t;)n=i+e,yield r.slice(i,n),i=n},mx=async function*(r,e){for await(let t of yx(r))yield*bx(t,e)},yx=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}let e=r.getReader();try{for(;;){let{done:t,value:i}=await e.read();if(t)break;yield i}}finally{await e.cancel()}},va=(r,e,t,i)=>{let n=mx(r,e),s=0,o,a=c=>{o||(o=!0,i&&i(c))};return new ReadableStream({async pull(c){try{let{done:l,value:f}=await n.next();if(l){a(),c.close();return}let p=f.byteLength;if(t){let y=s+=p;t(y)}c.enqueue(new Uint8Array(f))}catch(l){throw a(l),l}},cancel(c){return a(c),n.return()}},{highWaterMark:2})};var Fi=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",kf=Fi&&typeof ReadableStream=="function",_x=Fi&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),Rf=(r,...e)=>{try{return!!r(...e)}catch{return!1}},gx=kf&&Rf(()=>{let r=!1,e=new Request(B.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),Ef=64*1024,ba=kf&&Rf(()=>b.isReadableStream(new Response("").body)),Ni={stream:ba&&(r=>r.body)};Fi&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ni[e]&&(Ni[e]=b.isFunction(r[e])?t=>t[e]():(t,i)=>{throw new j(`Response type '${e}' is not supported`,j.ERR_NOT_SUPPORT,i)})})})(new Response);var wx=async r=>{if(r==null)return 0;if(b.isBlob(r))return r.size;if(b.isSpecCompliantForm(r))return(await new Request(B.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(b.isArrayBufferView(r)||b.isArrayBuffer(r))return r.byteLength;if(b.isURLSearchParams(r)&&(r=r+""),b.isString(r))return(await _x(r)).byteLength},Sx=async(r,e)=>{let t=b.toFiniteNumber(r.getContentLength());return t==null?wx(e):t},Pf=Fi&&(async r=>{let{url:e,method:t,data:i,signal:n,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:f,withCredentials:p="same-origin",fetchOptions:y}=Pi(r);l=l?(l+"").toLowerCase():"text";let g=jf([n,s&&s.toAbortSignal()],o),m,O=g&&g.unsubscribe&&(()=>{g.unsubscribe()}),S;try{if(c&&gx&&t!=="get"&&t!=="head"&&(S=await Sx(f,i))!==0){let oe=new Request(e,{method:"POST",body:i,duplex:"half"}),de;if(b.isFormData(i)&&(de=oe.headers.get("content-type"))&&f.setContentType(de),oe.body){let[Ee,Ge]=fa(S,At(ha(c)));i=va(oe.body,Ef,Ee,Ge)}}b.isString(p)||(p=p?"include":"omit");let q="credentials"in Request.prototype;m=new Request(e,{...y,signal:g,method:t.toUpperCase(),headers:f.normalize().toJSON(),body:i,duplex:"half",credentials:q?p:void 0});let F=await fetch(m),U=ba&&(l==="stream"||l==="response");if(ba&&(a||U&&O)){let oe={};["status","statusText","headers"].forEach(Oi=>{oe[Oi]=F[Oi]});let de=b.toFiniteNumber(F.headers.get("content-length")),[Ee,Ge]=a&&fa(de,At(ha(a),!0))||[];F=new Response(va(F.body,Ef,Ee,()=>{Ge&&Ge(),O&&O()}),oe)}l=l||"text";let V=await Ni[b.findKey(Ni,l)||"text"](F,r);return!U&&O&&O(),await new Promise((oe,de)=>{kr(oe,de,{data:V,headers:H.from(F.headers),status:F.status,statusText:F.statusText,config:r,request:m})})}catch(q){throw O&&O(),q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new j("Network Error",j.ERR_NETWORK,r,m),{cause:q.cause||q}):j.from(q,q&&q.code,r,m)}});var ma={http:Ai,xhr:Af,fetch:Pf};b.forEach(ma,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});var Nf=r=>`- ${r}`,Ox=r=>b.isFunction(r)||r===null||r===!1,Mi={getAdapter:r=>{r=b.isArray(r)?r:[r];let{length:e}=r,t,i,n={};for(let s=0;s<e;s++){t=r[s];let o;if(i=t,!Ox(t)&&(i=ma[(o=String(t)).toLowerCase()],i===void 0))throw new j(`Unknown adapter '${o}'`);if(i)break;n[o||"#"+s]=i}if(!i){let s=Object.entries(n).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build")),o=e?s.length>1?`since :
|
|
3
|
+
`):"");this.name=i.name="UnsubscriptionError",this.stack=i.stack,this.message=i.message}return e}(Error);xn.UnsubscriptionError=_I});var J=u(Mp=>{"use strict";var gI=Oe(),wI=xu(),SI=Kr(),Np=Q(),er=Y(),qn=qu(),OI=function(){function r(e){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}return r.prototype.unsubscribe=function(){var e=!1,t;if(!this.closed){var i=this,n=i._parent,s=i._parents,o=i._unsubscribe,a=i._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var c=-1,l=s?s.length:0;n;)n.remove(this),n=++c<l&&s[c]||null;if(SI.isFunction(o)){var f=Np.tryCatch(o).call(this);f===er.errorObject&&(e=!0,t=t||(er.errorObject.e instanceof qn.UnsubscriptionError?Fp(er.errorObject.e.errors):[er.errorObject.e]))}if(gI.isArray(a))for(c=-1,l=a.length;++c<l;){var p=a[c];if(wI.isObject(p)){var f=Np.tryCatch(p.unsubscribe).call(p);if(f===er.errorObject){e=!0,t=t||[];var y=er.errorObject.e;y instanceof qn.UnsubscriptionError?t=t.concat(Fp(y.errors)):t.push(y)}}}if(e)throw new qn.UnsubscriptionError(t)}},r.prototype.add=function(e){if(!e||e===r.EMPTY)return r.EMPTY;if(e===this)return this;var t=e;switch(typeof e){case"function":t=new r(e);case"object":if(t.closed||typeof t.unsubscribe!="function")return t;if(this.closed)return t.unsubscribe(),t;if(typeof t._addParent!="function"){var i=t;t=new r,t._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var n=this._subscriptions||(this._subscriptions=[]);return n.push(t),t._addParent(this),t},r.prototype.remove=function(e){var t=this._subscriptions;if(t){var i=t.indexOf(e);i!==-1&&t.splice(i,1)}},r.prototype._addParent=function(e){var t=this,i=t._parent,n=t._parents;!i||i===e?this._parent=e:n?n.indexOf(e)===-1&&n.push(e):this._parents=[e]},r.EMPTY=function(e){return e.closed=!0,e}(new r),r}();Mp.Subscription=OI;function Fp(r){return r.reduce(function(e,t){return e.concat(t instanceof qn.UnsubscriptionError?t.errors:t)},[])}});var Tu=u(Up=>{"use strict";Up.empty={closed:!0,next:function(r){},error:function(r){throw r},complete:function(){}}});var Gr=u(Tn=>{"use strict";var xI=se(),Cu=xI.root.Symbol;Tn.rxSubscriber=typeof Cu=="function"&&typeof Cu.for=="function"?Cu.for("rxSubscriber"):"@@rxSubscriber";Tn.$$rxSubscriber=Tn.rxSubscriber});var C=u(Cn=>{"use strict";var Dp=Cn&&Cn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Zp=Kr(),qI=J(),Iu=Tu(),Au=Gr(),Eu=function(r){Dp(e,r);function e(t,i,n){switch(r.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Iu.empty;break;case 1:if(!t){this.destination=Iu.empty;break}if(typeof t=="object"){if(TI(t)){var s=t[Au.rxSubscriber]();this.syncErrorThrowable=s.syncErrorThrowable,this.destination=s,s.add(this)}else this.syncErrorThrowable=!0,this.destination=new Lp(this,t);break}default:this.syncErrorThrowable=!0,this.destination=new Lp(this,t,i,n);break}}return e.prototype[Au.rxSubscriber]=function(){return this},e.create=function(t,i,n){var s=new e(t,i,n);return s.syncErrorThrowable=!1,s},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this,i=t._parent,n=t._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=i,this._parents=n,this},e}(qI.Subscription);Cn.Subscriber=Eu;var Lp=function(r){Dp(e,r);function e(t,i,n,s){r.call(this),this._parentSubscriber=t;var o,a=this;Zp.isFunction(i)?o=i:i&&(o=i.next,n=i.error,s=i.complete,i!==Iu.empty&&(a=Object.create(i),Zp.isFunction(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this))),this._context=a,this._next=o,this._error=n,this._complete=s}return e.prototype.next=function(t){if(!this.isStopped&&this._next){var i=this._parentSubscriber;i.syncErrorThrowable?this.__tryOrSetError(i,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var i=this._parentSubscriber;if(this._error)i.syncErrorThrowable?(this.__tryOrSetError(i,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(i.syncErrorThrowable)i.syncErrorValue=t,i.syncErrorThrown=!0,this.unsubscribe();else throw this.unsubscribe(),t}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var i=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};i.syncErrorThrowable?(this.__tryOrSetError(i,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,i){try{t.call(this._context,i)}catch(n){throw this.unsubscribe(),n}},e.prototype.__tryOrSetError=function(t,i,n){try{i.call(this._context,n)}catch(s){return t.syncErrorValue=s,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(Eu);function TI(r){return r instanceof Eu||"syncErrorThrowable"in r&&r[Au.rxSubscriber]}});var Wp=u(zp=>{"use strict";var ju=C(),Vp=Gr(),CI=Tu();function II(r,e,t){if(r){if(r instanceof ju.Subscriber)return r;if(r[Vp.rxSubscriber])return r[Vp.rxSubscriber]()}return!r&&!e&&!t?new ju.Subscriber(CI.empty):new ju.Subscriber(r,e,t)}zp.toSubscriber=II});var Qr=u(Xr=>{"use strict";var AI=se();function Bp(r){var e,t=r.Symbol;return typeof t=="function"?t.observable?e=t.observable:(e=t("observable"),t.observable=e):e="@@observable",e}Xr.getSymbolObservable=Bp;Xr.observable=Bp(AI.root);Xr.$$observable=Xr.observable});var In=u($p=>{"use strict";function EI(){}$p.noop=EI});var An=u(ku=>{"use strict";var jI=In();function kI(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return Hp(r)}ku.pipe=kI;function Hp(r){return r?r.length===1?r[0]:function(t){return r.reduce(function(i,n){return n(i)},t)}:jI.noop}ku.pipeFromArray=Hp});var v=u(Jp=>{"use strict";var ye=se(),RI=Wp(),PI=Qr(),NI=An(),FI=function(){function r(e){this._isScalar=!1,e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,i){var n=this.operator,s=RI.toSubscriber(e,t,i);if(n?n.call(s,this.source):s.add(this.source||!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.syncErrorThrown=!0,e.syncErrorValue=t,e.error(t)}},r.prototype.forEach=function(e,t){var i=this;if(t||(ye.root.Rx&&ye.root.Rx.config&&ye.root.Rx.config.Promise?t=ye.root.Rx.config.Promise:ye.root.Promise&&(t=ye.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(n,s){var o;o=i.subscribe(function(a){if(o)try{e(a)}catch(c){s(c),o.unsubscribe()}else e(a)},s,n)})},r.prototype._subscribe=function(e){return this.source.subscribe(e)},r.prototype[PI.observable]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return e.length===0?this:NI.pipeFromArray(e)(this)},r.prototype.toPromise=function(e){var t=this;if(e||(ye.root.Rx&&ye.root.Rx.config&&ye.root.Rx.config.Promise?e=ye.root.Rx.config.Promise:ye.root.Promise&&(e=ye.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(i,n){var s;t.subscribe(function(o){return s=o},function(o){return n(o)},function(){return i(s)})})},r.create=function(e){return new r(e)},r}();Jp.Observable=FI});var ei=u(En=>{"use strict";var MI=En&&En.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},UI=function(r){MI(e,r);function e(){var t=r.call(this,"object unsubscribed");this.name=t.name="ObjectUnsubscribedError",this.stack=t.stack,this.message=t.message}return e}(Error);En.ObjectUnsubscribedError=UI});var Ru=u(jn=>{"use strict";var ZI=jn&&jn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},LI=J(),DI=function(r){ZI(e,r);function e(t,i){r.call(this),this.subject=t,this.subscriber=i,this.closed=!1}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,i=t.observers;if(this.subject=null,!(!i||i.length===0||t.isStopped||t.closed)){var n=i.indexOf(this.subscriber);n!==-1&&i.splice(n,1)}}},e}(LI.Subscription);jn.SubjectSubscription=DI});var K=u(tr=>{"use strict";var Fu=tr&&tr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Yp=v(),VI=C(),Pu=J(),ti=ei(),zI=Ru(),WI=Gr(),Kp=function(r){Fu(e,r);function e(t){r.call(this,t),this.destination=t}return e}(VI.Subscriber);tr.SubjectSubscriber=Kp;var Gp=function(r){Fu(e,r);function e(){r.call(this),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}return e.prototype[WI.rxSubscriber]=function(){return new Kp(this)},e.prototype.lift=function(t){var i=new Nu(this,this);return i.operator=t,i},e.prototype.next=function(t){if(this.closed)throw new ti.ObjectUnsubscribedError;if(!this.isStopped)for(var i=this.observers,n=i.length,s=i.slice(),o=0;o<n;o++)s[o].next(t)},e.prototype.error=function(t){if(this.closed)throw new ti.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var i=this.observers,n=i.length,s=i.slice(),o=0;o<n;o++)s[o].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new ti.ObjectUnsubscribedError;this.isStopped=!0;for(var t=this.observers,i=t.length,n=t.slice(),s=0;s<i;s++)n[s].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(t){if(this.closed)throw new ti.ObjectUnsubscribedError;return r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){if(this.closed)throw new ti.ObjectUnsubscribedError;return this.hasError?(t.error(this.thrownError),Pu.Subscription.EMPTY):this.isStopped?(t.complete(),Pu.Subscription.EMPTY):(this.observers.push(t),new zI.SubjectSubscription(this,t))},e.prototype.asObservable=function(){var t=new Yp.Observable;return t.source=this,t},e.create=function(t,i){return new Nu(t,i)},e}(Yp.Observable);tr.Subject=Gp;var Nu=function(r){Fu(e,r);function e(t,i){r.call(this),this.destination=t,this.source=i}return e.prototype.next=function(t){var i=this.destination;i&&i.next&&i.next(t)},e.prototype.error=function(t){var i=this.destination;i&&i.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){var i=this.source;return i?this.source.subscribe(t):Pu.Subscription.EMPTY},e}(Gp);tr.AnonymousSubject=Nu});var ri=u(kn=>{"use strict";var BI=kn&&kn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},$I=K(),Xp=J(),HI=function(r){BI(e,r);function e(){r.apply(this,arguments),this.value=null,this.hasNext=!1,this.hasCompleted=!1}return e.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),Xp.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),Xp.Subscription.EMPTY):r.prototype._subscribe.call(this,t)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(t){this.hasCompleted||r.prototype.error.call(this,t)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&r.prototype.next.call(this,this.value),r.prototype.complete.call(this)},e}($I.Subject);kn.AsyncSubject=HI});var td=u(Pn=>{"use strict";var JI=Pn&&Pn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},YI=v(),Rn=Q(),He=Y(),Qp=ri(),KI=function(r){JI(e,r);function e(t,i,n,s,o){r.call(this),this.callbackFunc=t,this.selector=i,this.args=n,this.context=s,this.scheduler=o}return e.create=function(t,i,n){return i===void 0&&(i=void 0),function(){for(var s=[],o=0;o<arguments.length;o++)s[o-0]=arguments[o];return new e(t,i,s,this,n)}},e.prototype._subscribe=function(t){var i=this.callbackFunc,n=this.args,s=this.scheduler,o=this.subject;if(s)return s.schedule(e.dispatch,0,{source:this,subscriber:t,context:this.context});if(!o){o=this.subject=new Qp.AsyncSubject;var a=function l(){for(var f=[],p=0;p<arguments.length;p++)f[p-0]=arguments[p];var y=l.source,g=y.selector,m=y.subject;if(g){var O=Rn.tryCatch(g).apply(this,f);O===He.errorObject?m.error(He.errorObject.e):(m.next(O),m.complete())}else m.next(f.length<=1?f[0]:f),m.complete()};a.source=this;var c=Rn.tryCatch(i).apply(this.context,n.concat(a));c===He.errorObject&&o.error(He.errorObject.e)}return o.subscribe(t)},e.dispatch=function(t){var i=this,n=t.source,s=t.subscriber,o=t.context,a=n.callbackFunc,c=n.args,l=n.scheduler,f=n.subject;if(!f){f=n.subject=new Qp.AsyncSubject;var p=function g(){for(var m=[],O=0;O<arguments.length;O++)m[O-0]=arguments[O];var S=g.source,q=S.selector,F=S.subject;if(q){var U=Rn.tryCatch(q).apply(this,m);U===He.errorObject?i.add(l.schedule(GI,0,{err:He.errorObject.e,subject:F})):i.add(l.schedule(ed,0,{value:U,subject:F}))}else{var D=m.length<=1?m[0]:m;i.add(l.schedule(ed,0,{value:D,subject:F}))}};p.source=n;var y=Rn.tryCatch(a).apply(o,c.concat(p));y===He.errorObject&&f.error(He.errorObject.e)}i.add(f.subscribe(s))},e}(YI.Observable);Pn.BoundCallbackObservable=KI;function ed(r){var e=r.value,t=r.subject;t.next(e),t.complete()}function GI(r){var e=r.err,t=r.subject;t.error(e)}});var id=u(rd=>{"use strict";var XI=td();rd.bindCallback=XI.BoundCallbackObservable.create});var nd=u(()=>{"use strict";var QI=v(),eA=id();QI.Observable.bindCallback=eA.bindCallback});var ad=u(Fn=>{"use strict";var tA=Fn&&Fn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},rA=v(),Nn=Q(),Je=Y(),od=ri(),iA=function(r){tA(e,r);function e(t,i,n,s,o){r.call(this),this.callbackFunc=t,this.selector=i,this.args=n,this.context=s,this.scheduler=o}return e.create=function(t,i,n){return i===void 0&&(i=void 0),function(){for(var s=[],o=0;o<arguments.length;o++)s[o-0]=arguments[o];return new e(t,i,s,this,n)}},e.prototype._subscribe=function(t){var i=this.callbackFunc,n=this.args,s=this.scheduler,o=this.subject;if(s)return s.schedule(nA,0,{source:this,subscriber:t,context:this.context});if(!o){o=this.subject=new od.AsyncSubject;var a=function l(){for(var f=[],p=0;p<arguments.length;p++)f[p-0]=arguments[p];var y=l.source,g=y.selector,m=y.subject,O=f.shift();if(O)m.error(O);else if(g){var S=Nn.tryCatch(g).apply(this,f);S===Je.errorObject?m.error(Je.errorObject.e):(m.next(S),m.complete())}else m.next(f.length<=1?f[0]:f),m.complete()};a.source=this;var c=Nn.tryCatch(i).apply(this.context,n.concat(a));c===Je.errorObject&&o.error(Je.errorObject.e)}return o.subscribe(t)},e}(rA.Observable);Fn.BoundNodeCallbackObservable=iA;function nA(r){var e=this,t=r.source,i=r.subscriber,n=r.context,s=t,o=s.callbackFunc,a=s.args,c=s.scheduler,l=t.subject;if(!l){l=t.subject=new od.AsyncSubject;var f=function y(){for(var g=[],m=0;m<arguments.length;m++)g[m-0]=arguments[m];var O=y.source,S=O.selector,q=O.subject,F=g.shift();if(F)e.add(c.schedule(Mu,0,{err:F,subject:q}));else if(S){var U=Nn.tryCatch(S).apply(this,g);U===Je.errorObject?e.add(c.schedule(Mu,0,{err:Je.errorObject.e,subject:q})):e.add(c.schedule(sd,0,{value:U,subject:q}))}else{var D=g.length<=1?g[0]:g;e.add(c.schedule(sd,0,{value:D,subject:q}))}};f.source=t;var p=Nn.tryCatch(o).apply(n,a.concat(f));p===Je.errorObject&&e.add(c.schedule(Mu,0,{err:Je.errorObject.e,subject:l}))}e.add(l.subscribe(i))}function sd(r){var e=r.value,t=r.subject;t.next(e),t.complete()}function Mu(r){var e=r.err,t=r.subject;t.error(e)}});var cd=u(ud=>{"use strict";var sA=ad();ud.bindNodeCallback=sA.BoundNodeCallbackObservable.create});var ld=u(()=>{"use strict";var oA=v(),aA=cd();oA.Observable.bindNodeCallback=aA.bindNodeCallback});var _e=u(fd=>{"use strict";function uA(r){return r&&typeof r.schedule=="function"}fd.isScheduler=uA});var Un=u(Mn=>{"use strict";var cA=Mn&&Mn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},lA=v(),fA=function(r){cA(e,r);function e(t,i){r.call(this),this.value=t,this.scheduler=i,this._isScalar=!0,i&&(this._isScalar=!1)}return e.create=function(t,i){return new e(t,i)},e.dispatch=function(t){var i=t.done,n=t.value,s=t.subscriber;if(i){s.complete();return}s.next(n),!s.closed&&(t.done=!0,this.schedule(t))},e.prototype._subscribe=function(t){var i=this.value,n=this.scheduler;if(n)return n.schedule(e.dispatch,0,{done:!1,value:i,subscriber:t});t.next(i),t.closed||t.complete()},e}(lA.Observable);Mn.ScalarObservable=fA});var Fe=u(Zn=>{"use strict";var hA=Zn&&Zn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},pA=v(),dA=function(r){hA(e,r);function e(t){r.call(this),this.scheduler=t}return e.create=function(t){return new e(t)},e.dispatch=function(t){var i=t.subscriber;i.complete()},e.prototype._subscribe=function(t){var i=this.scheduler;if(i)return i.schedule(e.dispatch,0,{subscriber:t});t.complete()},e}(pA.Observable);Zn.EmptyObservable=dA});var Me=u(Ln=>{"use strict";var vA=Ln&&Ln.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},bA=v(),mA=Un(),yA=Fe(),_A=_e(),gA=function(r){vA(e,r);function e(t,i){r.call(this),this.array=t,this.scheduler=i,!i&&t.length===1&&(this._isScalar=!0,this.value=t[0])}return e.create=function(t,i){return new e(t,i)},e.of=function(){for(var t=[],i=0;i<arguments.length;i++)t[i-0]=arguments[i];var n=t[t.length-1];_A.isScheduler(n)?t.pop():n=null;var s=t.length;return s>1?new e(t,n):s===1?new mA.ScalarObservable(t[0],n):new yA.EmptyObservable(n)},e.dispatch=function(t){var i=t.array,n=t.index,s=t.count,o=t.subscriber;if(n>=s){o.complete();return}o.next(i[n]),!o.closed&&(t.index=n+1,this.schedule(t))},e.prototype._subscribe=function(t){var i=0,n=this.array,s=n.length,o=this.scheduler;if(o)return o.schedule(e.dispatch,0,{array:n,index:i,count:s,subscriber:t});for(var a=0;a<s&&!t.closed;a++)t.next(n[a]);t.complete()},e}(bA.Observable);Ln.ArrayObservable=gA});var P=u(Dn=>{"use strict";var wA=Dn&&Dn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},SA=C(),OA=function(r){wA(e,r);function e(){r.apply(this,arguments)}return e.prototype.notifyNext=function(t,i,n,s,o){this.destination.next(i)},e.prototype.notifyError=function(t,i){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(SA.Subscriber);Dn.OuterSubscriber=OA});var Uu=u(hd=>{"use strict";hd.isArrayLike=function(r){return r&&typeof r.length=="number"}});var Zu=u(pd=>{"use strict";function xA(r){return r&&typeof r.subscribe!="function"&&typeof r.then=="function"}pd.isPromise=xA});var rr=u(ii=>{"use strict";var qA=se();function dd(r){var e=r.Symbol;if(typeof e=="function")return e.iterator||(e.iterator=e("iterator polyfill")),e.iterator;var t=r.Set;if(t&&typeof new t()["@@iterator"]=="function")return"@@iterator";var i=r.Map;if(i)for(var n=Object.getOwnPropertyNames(i.prototype),s=0;s<n.length;++s){var o=n[s];if(o!=="entries"&&o!=="size"&&i.prototype[o]===i.prototype.entries)return o}return"@@iterator"}ii.symbolIteratorPonyfill=dd;ii.iterator=dd(qA.root);ii.$$iterator=ii.iterator});var vd=u(Vn=>{"use strict";var TA=Vn&&Vn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},CA=C(),IA=function(r){TA(e,r);function e(t,i,n){r.call(this),this.parent=t,this.outerValue=i,this.outerIndex=n,this.index=0}return e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(CA.Subscriber);Vn.InnerSubscriber=IA});var N=u(_d=>{"use strict";var AA=se(),EA=Uu(),jA=Zu(),kA=xu(),RA=v(),bd=rr(),md=vd(),yd=Qr();function PA(r,e,t,i){var n=new md.InnerSubscriber(r,t,i);if(n.closed)return null;if(e instanceof RA.Observable)return e._isScalar?(n.next(e.value),n.complete(),null):(n.syncErrorThrowable=!0,e.subscribe(n));if(EA.isArrayLike(e)){for(var s=0,o=e.length;s<o&&!n.closed;s++)n.next(e[s]);n.closed||n.complete()}else{if(jA.isPromise(e))return e.then(function(y){n.closed||(n.next(y),n.complete())},function(y){return n.error(y)}).then(null,function(y){AA.root.setTimeout(function(){throw y})}),n;if(e&&typeof e[bd.iterator]=="function"){var a=e[bd.iterator]();do{var c=a.next();if(c.done){n.complete();break}if(n.next(c.value),n.closed)break}while(!0)}else if(e&&typeof e[yd.observable]=="function"){var l=e[yd.observable]();if(typeof l.subscribe!="function")n.error(new TypeError("Provided object does not correctly implement Symbol.observable"));else return l.subscribe(new md.InnerSubscriber(r,t,i))}else{var f=kA.isObject(e)?"an invalid object":"'"+e+"'",p="You provided "+f+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";n.error(new TypeError(p))}}return null}_d.subscribeToResult=PA});var ni=u(ir=>{"use strict";var NA=ir&&ir.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},FA=Me(),MA=Oe(),UA=P(),ZA=N(),gd={};function LA(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=null;return typeof r[r.length-1]=="function"&&(t=r.pop()),r.length===1&&MA.isArray(r[0])&&(r=r[0].slice()),function(i){return i.lift.call(new FA.ArrayObservable([i].concat(r)),new wd(t))}}ir.combineLatest=LA;var wd=function(){function r(e){this.project=e}return r.prototype.call=function(e,t){return t.subscribe(new Sd(e,this.project))},r}();ir.CombineLatestOperator=wd;var Sd=function(r){NA(e,r);function e(t,i){r.call(this,t),this.project=i,this.active=0,this.values=[],this.observables=[]}return e.prototype._next=function(t){this.values.push(gd),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,i=t.length;if(i===0)this.destination.complete();else{this.active=i,this.toRespond=i;for(var n=0;n<i;n++){var s=t[n];this.add(ZA.subscribeToResult(this,s,s,n))}}},e.prototype.notifyComplete=function(t){(this.active-=1)===0&&this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){var a=this.values,c=a[n],l=this.toRespond?c===gd?--this.toRespond:this.toRespond:0;a[n]=i,l===0&&(this.project?this._tryProject(a):this.destination.next(a.slice()))},e.prototype._tryProject=function(t){var i;try{i=this.project.apply(this,t)}catch(n){this.destination.error(n);return}this.destination.next(i)},e}(UA.OuterSubscriber);ir.CombineLatestSubscriber=Sd});var xd=u(Od=>{"use strict";var DA=_e(),VA=Oe(),zA=Me(),WA=ni();function BA(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=null,i=null;return DA.isScheduler(r[r.length-1])&&(i=r.pop()),typeof r[r.length-1]=="function"&&(t=r.pop()),r.length===1&&VA.isArray(r[0])&&(r=r[0]),new zA.ArrayObservable(r,i).lift(new WA.CombineLatestOperator(t))}Od.combineLatest=BA});var qd=u(()=>{"use strict";var $A=v(),HA=xd();$A.Observable.combineLatest=HA.combineLatest});var Lu=u(Td=>{"use strict";var JA=Me();Td.of=JA.ArrayObservable.of});var Du=u(zn=>{"use strict";var YA=zn&&zn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Cd=se(),KA=v(),GA=function(r){YA(e,r);function e(t,i){r.call(this),this.promise=t,this.scheduler=i}return e.create=function(t,i){return new e(t,i)},e.prototype._subscribe=function(t){var i=this,n=this.promise,s=this.scheduler;if(s==null)this._isScalar?t.closed||(t.next(this.value),t.complete()):n.then(function(o){i.value=o,i._isScalar=!0,t.closed||(t.next(o),t.complete())},function(o){t.closed||t.error(o)}).then(null,function(o){Cd.root.setTimeout(function(){throw o})});else if(this._isScalar){if(!t.closed)return s.schedule(Id,0,{value:this.value,subscriber:t})}else n.then(function(o){i.value=o,i._isScalar=!0,t.closed||t.add(s.schedule(Id,0,{value:o,subscriber:t}))},function(o){t.closed||t.add(s.schedule(XA,0,{err:o,subscriber:t}))}).then(null,function(o){Cd.root.setTimeout(function(){throw o})})},e}(KA.Observable);zn.PromiseObservable=GA;function Id(r){var e=r.value,t=r.subscriber;t.closed||(t.next(e),t.complete())}function XA(r){var e=r.err,t=r.subscriber;t.closed||t.error(e)}});var Ed=u(Bn=>{"use strict";var QA=Bn&&Bn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},eE=se(),tE=v(),Wn=rr(),rE=function(r){QA(e,r);function e(t,i){if(r.call(this),this.scheduler=i,t==null)throw new Error("iterator cannot be null.");this.iterator=sE(t)}return e.create=function(t,i){return new e(t,i)},e.dispatch=function(t){var i=t.index,n=t.hasError,s=t.iterator,o=t.subscriber;if(n){o.error(t.error);return}var a=s.next();if(a.done){o.complete();return}if(o.next(a.value),t.index=i+1,o.closed){typeof s.return=="function"&&s.return();return}this.schedule(t)},e.prototype._subscribe=function(t){var i=0,n=this,s=n.iterator,o=n.scheduler;if(o)return o.schedule(e.dispatch,0,{index:i,iterator:s,subscriber:t});do{var a=s.next();if(a.done){t.complete();break}else t.next(a.value);if(t.closed){typeof s.return=="function"&&s.return();break}}while(!0)},e}(tE.Observable);Bn.IteratorObservable=rE;var iE=function(){function r(e,t,i){t===void 0&&(t=0),i===void 0&&(i=e.length),this.str=e,this.idx=t,this.len=i}return r.prototype[Wn.iterator]=function(){return this},r.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.str.charAt(this.idx++)}:{done:!0,value:void 0}},r}(),nE=function(){function r(e,t,i){t===void 0&&(t=0),i===void 0&&(i=oE(e)),this.arr=e,this.idx=t,this.len=i}return r.prototype[Wn.iterator]=function(){return this},r.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.arr[this.idx++]}:{done:!0,value:void 0}},r}();function sE(r){var e=r[Wn.iterator];if(!e&&typeof r=="string")return new iE(r);if(!e&&r.length!==void 0)return new nE(r);if(!e)throw new TypeError("object is not iterable");return r[Wn.iterator]()}var Ad=Math.pow(2,53)-1;function oE(r){var e=+r.length;return isNaN(e)?0:e===0||!aE(e)?e:(e=uE(e)*Math.floor(Math.abs(e)),e<=0?0:e>Ad?Ad:e)}function aE(r){return typeof r=="number"&&eE.root.isFinite(r)}function uE(r){var e=+r;return e===0||isNaN(e)?e:e<0?-1:1}});var jd=u($n=>{"use strict";var cE=$n&&$n.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},lE=v(),fE=Un(),hE=Fe(),pE=function(r){cE(e,r);function e(t,i){r.call(this),this.arrayLike=t,this.scheduler=i,!i&&t.length===1&&(this._isScalar=!0,this.value=t[0])}return e.create=function(t,i){var n=t.length;return n===0?new hE.EmptyObservable:n===1?new fE.ScalarObservable(t[0],i):new e(t,i)},e.dispatch=function(t){var i=t.arrayLike,n=t.index,s=t.length,o=t.subscriber;if(!o.closed){if(n>=s){o.complete();return}o.next(i[n]),t.index=n+1,this.schedule(t)}},e.prototype._subscribe=function(t){var i=0,n=this,s=n.arrayLike,o=n.scheduler,a=s.length;if(o)return o.schedule(e.dispatch,0,{arrayLike:s,index:i,length:a,subscriber:t});for(var c=0;c<a&&!t.closed;c++)t.next(s[c]);t.complete()},e}(lE.Observable);$n.ArrayLikeObservable=pE});var nr=u(kd=>{"use strict";var Vu=v(),dE=function(){function r(e,t,i){this.kind=e,this.value=t,this.error=i,this.hasValue=e==="N"}return r.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},r.prototype.do=function(e,t,i){var n=this.kind;switch(n){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return i&&i()}},r.prototype.accept=function(e,t,i){return e&&typeof e.next=="function"?this.observe(e):this.do(e,t,i)},r.prototype.toObservable=function(){var e=this.kind;switch(e){case"N":return Vu.Observable.of(this.value);case"E":return Vu.Observable.throw(this.error);case"C":return Vu.Observable.empty()}throw new Error("unexpected notification kind value")},r.createNext=function(e){return typeof e!="undefined"?new r("N",e):r.undefinedValueNotification},r.createError=function(e){return new r("E",void 0,e)},r.createComplete=function(){return r.completeNotification},r.completeNotification=new r("C"),r.undefinedValueNotification=new r("N",void 0),r}();kd.Notification=dE});var si=u(wt=>{"use strict";var vE=wt&&wt.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},bE=C(),zu=nr();function mE(r,e){return e===void 0&&(e=0),function(i){return i.lift(new Rd(r,e))}}wt.observeOn=mE;var Rd=function(){function r(e,t){t===void 0&&(t=0),this.scheduler=e,this.delay=t}return r.prototype.call=function(e,t){return t.subscribe(new Pd(e,this.scheduler,this.delay))},r}();wt.ObserveOnOperator=Rd;var Pd=function(r){vE(e,r);function e(t,i,n){n===void 0&&(n=0),r.call(this,t),this.scheduler=i,this.delay=n}return e.dispatch=function(t){var i=t.notification,n=t.destination;i.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new Nd(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(zu.Notification.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(zu.Notification.createError(t))},e.prototype._complete=function(){this.scheduleMessage(zu.Notification.createComplete())},e}(bE.Subscriber);wt.ObserveOnSubscriber=Pd;var Nd=function(){function r(e,t){this.notification=e,this.destination=t}return r}();wt.ObserveOnMessage=Nd});var Bu=u(Hn=>{"use strict";var yE=Hn&&Hn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},_E=Oe(),gE=Uu(),wE=Zu(),SE=Du(),OE=Ed(),xE=Me(),qE=jd(),TE=rr(),Fd=v(),CE=si(),Wu=Qr(),IE=function(r){yE(e,r);function e(t,i){r.call(this,null),this.ish=t,this.scheduler=i}return e.create=function(t,i){if(t!=null){if(typeof t[Wu.observable]=="function")return t instanceof Fd.Observable&&!i?t:new e(t,i);if(_E.isArray(t))return new xE.ArrayObservable(t,i);if(wE.isPromise(t))return new SE.PromiseObservable(t,i);if(typeof t[TE.iterator]=="function"||typeof t=="string")return new OE.IteratorObservable(t,i);if(gE.isArrayLike(t))return new qE.ArrayLikeObservable(t,i)}throw new TypeError((t!==null&&typeof t||t)+" is not observable")},e.prototype._subscribe=function(t){var i=this.ish,n=this.scheduler;return n==null?i[Wu.observable]().subscribe(t):i[Wu.observable]().subscribe(new CE.ObserveOnSubscriber(t,n,0))},e}(Fd.Observable);Hn.FromObservable=IE});var $u=u(Md=>{"use strict";var AE=Bu();Md.from=AE.FromObservable.create});var or=u(sr=>{"use strict";var EE=sr&&sr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},jE=N(),kE=P();function RE(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),function(n){return typeof e=="number"&&(t=e,e=null),n.lift(new Ud(r,e,t))}}sr.mergeMap=RE;var Ud=function(){function r(e,t,i){i===void 0&&(i=Number.POSITIVE_INFINITY),this.project=e,this.resultSelector=t,this.concurrent=i}return r.prototype.call=function(e,t){return t.subscribe(new Zd(e,this.project,this.resultSelector,this.concurrent))},r}();sr.MergeMapOperator=Ud;var Zd=function(r){EE(e,r);function e(t,i,n,s){s===void 0&&(s=Number.POSITIVE_INFINITY),r.call(this,t),this.project=i,this.resultSelector=n,this.concurrent=s,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var i,n=this.index++;try{i=this.project(t,n)}catch(s){this.destination.error(s);return}this.active++,this._innerSub(i,t,n)},e.prototype._innerSub=function(t,i,n){this.add(jE.subscribeToResult(this,t,i,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){this.resultSelector?this._notifyResultSelector(t,i,n,s):this.destination.next(i)},e.prototype._notifyResultSelector=function(t,i,n,s){var o;try{o=this.resultSelector(t,i,n,s)}catch(a){this.destination.error(a);return}this.destination.next(o)},e.prototype.notifyComplete=function(t){var i=this.buffer;this.remove(t),this.active--,i.length>0?this._next(i.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()},e}(kE.OuterSubscriber);sr.MergeMapSubscriber=Zd});var Hu=u(Ld=>{"use strict";function PE(r){return r}Ld.identity=PE});var oi=u(Dd=>{"use strict";var NE=or(),FE=Hu();function ME(r){return r===void 0&&(r=Number.POSITIVE_INFINITY),NE.mergeMap(FE.identity,null,r)}Dd.mergeAll=ME});var Jn=u(Vd=>{"use strict";var UE=oi();function ZE(){return UE.mergeAll(1)}Vd.concatAll=ZE});var ar=u(zd=>{"use strict";var LE=_e(),DE=Lu(),VE=$u(),zE=Jn();function WE(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return r.length===1||r.length===2&&LE.isScheduler(r[1])?VE.from(r[0]):zE.concatAll()(DE.of.apply(void 0,r))}zd.concat=WE});var Wd=u(()=>{"use strict";var BE=v(),$E=ar();BE.Observable.concat=$E.concat});var $d=u(Yn=>{"use strict";var Bd=Yn&&Yn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},HE=v(),JE=N(),YE=P(),KE=function(r){Bd(e,r);function e(t){r.call(this),this.observableFactory=t}return e.create=function(t){return new e(t)},e.prototype._subscribe=function(t){return new GE(t,this.observableFactory)},e}(HE.Observable);Yn.DeferObservable=KE;var GE=function(r){Bd(e,r);function e(t,i){r.call(this,t),this.factory=i,this.tryDefer()}return e.prototype.tryDefer=function(){try{this._callFactory()}catch(t){this._error(t)}},e.prototype._callFactory=function(){var t=this.factory();t&&this.add(JE.subscribeToResult(this,t))},e}(YE.OuterSubscriber)});var Jd=u(Hd=>{"use strict";var XE=$d();Hd.defer=XE.DeferObservable.create});var Yd=u(()=>{"use strict";var QE=v(),ej=Jd();QE.Observable.defer=ej.defer});var Gd=u(Kd=>{"use strict";var tj=Fe();Kd.empty=tj.EmptyObservable.create});var Xd=u(()=>{"use strict";var rj=v(),ij=Gd();rj.Observable.empty=ij.empty});var tv=u(Kn=>{"use strict";var ev=Kn&&Kn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},nj=v(),Qd=Fe(),sj=Oe(),oj=N(),aj=P(),uj=function(r){ev(e,r);function e(t,i){r.call(this),this.sources=t,this.resultSelector=i}return e.create=function(){for(var t=[],i=0;i<arguments.length;i++)t[i-0]=arguments[i];if(t===null||arguments.length===0)return new Qd.EmptyObservable;var n=null;return typeof t[t.length-1]=="function"&&(n=t.pop()),t.length===1&&sj.isArray(t[0])&&(t=t[0]),t.length===0?new Qd.EmptyObservable:new e(t,n)},e.prototype._subscribe=function(t){return new cj(t,this.sources,this.resultSelector)},e}(nj.Observable);Kn.ForkJoinObservable=uj;var cj=function(r){ev(e,r);function e(t,i,n){r.call(this,t),this.sources=i,this.resultSelector=n,this.completed=0,this.haveValues=0;var s=i.length;this.total=s,this.values=new Array(s);for(var o=0;o<s;o++){var a=i[o],c=oj.subscribeToResult(this,a,null,o);c&&(c.outerIndex=o,this.add(c))}}return e.prototype.notifyNext=function(t,i,n,s,o){this.values[n]=i,o._hasValue||(o._hasValue=!0,this.haveValues++)},e.prototype.notifyComplete=function(t){var i=this.destination,n=this,s=n.haveValues,o=n.resultSelector,a=n.values,c=a.length;if(!t._hasValue){i.complete();return}if(this.completed++,this.completed===c){if(s===c){var l=o?o.apply(this,a):a;i.next(l)}i.complete()}},e}(aj.OuterSubscriber)});var iv=u(rv=>{"use strict";var lj=tv();rv.forkJoin=lj.ForkJoinObservable.create});var nv=u(()=>{"use strict";var fj=v(),hj=iv();fj.Observable.forkJoin=hj.forkJoin});var sv=u(()=>{"use strict";var pj=v(),dj=$u();pj.Observable.from=dj.from});var uv=u(Gn=>{"use strict";var vj=Gn&&Gn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},bj=v(),mj=Q(),yj=Kr(),ov=Y(),_j=J(),av=Object.prototype.toString;function gj(r){return!!r&&typeof r.addListener=="function"&&typeof r.removeListener=="function"}function wj(r){return!!r&&typeof r.on=="function"&&typeof r.off=="function"}function Sj(r){return!!r&&av.call(r)==="[object NodeList]"}function Oj(r){return!!r&&av.call(r)==="[object HTMLCollection]"}function xj(r){return!!r&&typeof r.addEventListener=="function"&&typeof r.removeEventListener=="function"}var qj=function(r){vj(e,r);function e(t,i,n,s){r.call(this),this.sourceObj=t,this.eventName=i,this.selector=n,this.options=s}return e.create=function(t,i,n,s){return yj.isFunction(n)&&(s=n,n=void 0),new e(t,i,s,n)},e.setupSubscription=function(t,i,n,s,o){var a;if(Sj(t)||Oj(t))for(var c=0,l=t.length;c<l;c++)e.setupSubscription(t[c],i,n,s,o);else if(xj(t)){var f=t;t.addEventListener(i,n,o),a=function(){return f.removeEventListener(i,n,o)}}else if(wj(t)){var p=t;t.on(i,n),a=function(){return p.off(i,n)}}else if(gj(t)){var y=t;t.addListener(i,n),a=function(){return y.removeListener(i,n)}}else throw new TypeError("Invalid event target");s.add(new _j.Subscription(a))},e.prototype._subscribe=function(t){var i=this.sourceObj,n=this.eventName,s=this.options,o=this.selector,a=o?function(){for(var c=[],l=0;l<arguments.length;l++)c[l-0]=arguments[l];var f=mj.tryCatch(o).apply(void 0,c);f===ov.errorObject?t.error(ov.errorObject.e):t.next(f)}:function(c){return t.next(c)};e.setupSubscription(i,n,a,t,s)},e}(bj.Observable);Gn.FromEventObservable=qj});var lv=u(cv=>{"use strict";var Tj=uv();cv.fromEvent=Tj.FromEventObservable.create});var fv=u(()=>{"use strict";var Cj=v(),Ij=lv();Cj.Observable.fromEvent=Ij.fromEvent});var hv=u(Xn=>{"use strict";var Aj=Xn&&Xn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Ej=Kr(),jj=v(),kj=J(),Rj=function(r){Aj(e,r);function e(t,i,n){r.call(this),this.addHandler=t,this.removeHandler=i,this.selector=n}return e.create=function(t,i,n){return new e(t,i,n)},e.prototype._subscribe=function(t){var i=this,n=this.removeHandler,s=this.selector?function(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];i._callSelector(t,a)}:function(a){t.next(a)},o=this._callAddHandler(s,t);Ej.isFunction(n)&&t.add(new kj.Subscription(function(){n(s,o)}))},e.prototype._callSelector=function(t,i){try{var n=this.selector.apply(this,i);t.next(n)}catch(s){t.error(s)}},e.prototype._callAddHandler=function(t,i){try{return this.addHandler(t)||null}catch(n){i.error(n)}},e}(jj.Observable);Xn.FromEventPatternObservable=Rj});var dv=u(pv=>{"use strict";var Pj=hv();pv.fromEventPattern=Pj.FromEventPatternObservable.create});var vv=u(()=>{"use strict";var Nj=v(),Fj=dv();Nj.Observable.fromEventPattern=Fj.fromEventPattern});var mv=u(bv=>{"use strict";var Mj=Du();bv.fromPromise=Mj.PromiseObservable.create});var yv=u(()=>{"use strict";var Uj=v(),Zj=mv();Uj.Observable.fromPromise=Zj.fromPromise});var gv=u(Qn=>{"use strict";var Lj=Qn&&Qn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Dj=v(),Vj=_e(),_v=function(r){return r},zj=function(r){Lj(e,r);function e(t,i,n,s,o){r.call(this),this.initialState=t,this.condition=i,this.iterate=n,this.resultSelector=s,this.scheduler=o}return e.create=function(t,i,n,s,o){return arguments.length==1?new e(t.initialState,t.condition,t.iterate,t.resultSelector||_v,t.scheduler):s===void 0||Vj.isScheduler(s)?new e(t,i,n,_v,s):new e(t,i,n,s,o)},e.prototype._subscribe=function(t){var i=this.initialState;if(this.scheduler)return this.scheduler.schedule(e.dispatch,0,{subscriber:t,iterate:this.iterate,condition:this.condition,resultSelector:this.resultSelector,state:i});var n=this,s=n.condition,o=n.resultSelector,a=n.iterate;do{if(s){var c=void 0;try{c=s(i)}catch(f){t.error(f);return}if(!c){t.complete();break}}var l=void 0;try{l=o(i)}catch(f){t.error(f);return}if(t.next(l),t.closed)break;try{i=a(i)}catch(f){t.error(f);return}}while(!0)},e.dispatch=function(t){var i=t.subscriber,n=t.condition;if(!i.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(a){i.error(a);return}else t.needIterate=!0;if(n){var s=void 0;try{s=n(t.state)}catch(a){i.error(a);return}if(!s){i.complete();return}if(i.closed)return}var o;try{o=t.resultSelector(t.state)}catch(a){i.error(a);return}if(!i.closed&&(i.next(o),!i.closed))return this.schedule(t)}},e}(Dj.Observable);Qn.GenerateObservable=zj});var Sv=u(wv=>{"use strict";var Wj=gv();wv.generate=Wj.GenerateObservable.create});var Ov=u(()=>{"use strict";var Bj=v(),$j=Sv();Bj.Observable.generate=$j.generate});var qv=u(es=>{"use strict";var xv=es&&es.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Hj=v(),Jj=N(),Yj=P(),Kj=function(r){xv(e,r);function e(t,i,n){r.call(this),this.condition=t,this.thenSource=i,this.elseSource=n}return e.create=function(t,i,n){return new e(t,i,n)},e.prototype._subscribe=function(t){var i=this,n=i.condition,s=i.thenSource,o=i.elseSource;return new Gj(t,n,s,o)},e}(Hj.Observable);es.IfObservable=Kj;var Gj=function(r){xv(e,r);function e(t,i,n,s){r.call(this,t),this.condition=i,this.thenSource=n,this.elseSource=s,this.tryIf()}return e.prototype.tryIf=function(){var t=this,i=t.condition,n=t.thenSource,s=t.elseSource,o;try{o=i();var a=o?n:s;a?this.add(Jj.subscribeToResult(this,a)):this._complete()}catch(c){this._error(c)}},e}(Yj.OuterSubscriber)});var Cv=u(Tv=>{"use strict";var Xj=qv();Tv._if=Xj.IfObservable.create});var Iv=u(()=>{"use strict";var Qj=v(),ek=Cv();Qj.Observable.if=ek._if});var ur=u(Av=>{"use strict";var tk=Oe();function rk(r){return!tk.isArray(r)&&r-parseFloat(r)+1>=0}Av.isNumeric=rk});var Ev=u(ts=>{"use strict";var ik=ts&&ts.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},nk=J(),sk=function(r){ik(e,r);function e(t,i){r.call(this)}return e.prototype.schedule=function(t,i){return i===void 0&&(i=0),this},e}(nk.Subscription);ts.Action=sk});var cr=u(rs=>{"use strict";var ok=rs&&rs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},jv=se(),ak=Ev(),uk=function(r){ok(e,r);function e(t,i){r.call(this,t,i),this.scheduler=t,this.pending=!1,this.work=i}return e.prototype.schedule=function(t,i){if(i===void 0&&(i=0),this.closed)return this;this.state=t,this.pending=!0;var n=this.id,s=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(s,n,i)),this.delay=i,this.id=this.id||this.requestAsyncId(s,this.id,i),this},e.prototype.requestAsyncId=function(t,i,n){return n===void 0&&(n=0),jv.root.setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,i,n){return n===void 0&&(n=0),n!==null&&this.delay===n&&this.pending===!1?i:jv.root.clearInterval(i)&&void 0||void 0},e.prototype.execute=function(t,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,i);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,i){var n=!1,s=void 0;try{this.work(t)}catch(o){n=!0,s=!!o&&o||new Error(o)}if(n)return this.unsubscribe(),s},e.prototype._unsubscribe=function(){var t=this.id,i=this.scheduler,n=i.actions,s=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,s!==-1&&n.splice(s,1),t!=null&&(this.id=this.recycleAsyncId(i,t,null)),this.delay=null},e}(ak.Action);rs.AsyncAction=uk});var Rv=u(kv=>{"use strict";var ck=function(){function r(e,t){t===void 0&&(t=r.now),this.SchedulerAction=e,this.now=t}return r.prototype.schedule=function(e,t,i){return t===void 0&&(t=0),new this.SchedulerAction(this,e).schedule(i,t)},r.now=Date.now?Date.now:function(){return+new Date},r}();kv.Scheduler=ck});var lr=u(is=>{"use strict";var lk=is&&is.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},fk=Rv(),hk=function(r){lk(e,r);function e(){r.apply(this,arguments),this.actions=[],this.active=!1,this.scheduled=void 0}return e.prototype.flush=function(t){var i=this.actions;if(this.active){i.push(t);return}var n;this.active=!0;do if(n=t.execute(t.state,t.delay))break;while(t=i.shift());if(this.active=!1,n){for(;t=i.shift();)t.unsubscribe();throw n}},e}(fk.Scheduler);is.AsyncScheduler=hk});var W=u(Pv=>{"use strict";var pk=cr(),dk=lr();Pv.async=new dk.AsyncScheduler(pk.AsyncAction)});var Nv=u(ns=>{"use strict";var vk=ns&&ns.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},bk=ur(),mk=v(),Ju=W(),yk=function(r){vk(e,r);function e(t,i){t===void 0&&(t=0),i===void 0&&(i=Ju.async),r.call(this),this.period=t,this.scheduler=i,(!bk.isNumeric(t)||t<0)&&(this.period=0),(!i||typeof i.schedule!="function")&&(this.scheduler=Ju.async)}return e.create=function(t,i){return t===void 0&&(t=0),i===void 0&&(i=Ju.async),new e(t,i)},e.dispatch=function(t){var i=t.index,n=t.subscriber,s=t.period;n.next(i),!n.closed&&(t.index+=1,this.schedule(t,s))},e.prototype._subscribe=function(t){var i=0,n=this.period,s=this.scheduler;t.add(s.schedule(e.dispatch,n,{index:i,subscriber:t,period:n}))},e}(mk.Observable);ns.IntervalObservable=yk});var Mv=u(Fv=>{"use strict";var _k=Nv();Fv.interval=_k.IntervalObservable.create});var Uv=u(()=>{"use strict";var gk=v(),wk=Mv();gk.Observable.interval=wk.interval});var ai=u(Zv=>{"use strict";var Sk=v(),Ok=Me(),xk=_e(),qk=oi();function Tk(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=Number.POSITIVE_INFINITY,i=null,n=r[r.length-1];return xk.isScheduler(n)?(i=r.pop(),r.length>1&&typeof r[r.length-1]=="number"&&(t=r.pop())):typeof n=="number"&&(t=r.pop()),i===null&&r.length===1&&r[0]instanceof Sk.Observable?r[0]:qk.mergeAll(t)(new Ok.ArrayObservable(r,i))}Zv.merge=Tk});var Lv=u(()=>{"use strict";var Ck=v(),Ik=ai();Ck.Observable.merge=Ik.merge});var ss=u(fr=>{"use strict";var Ak=fr&&fr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Ek=Oe(),jk=Me(),kk=P(),Rk=N();function Pk(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];if(r.length===1)if(Ek.isArray(r[0]))r=r[0];else return r[0];return new jk.ArrayObservable(r).lift(new Dv)}fr.race=Pk;var Dv=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new Vv(e))},r}();fr.RaceOperator=Dv;var Vv=function(r){Ak(e,r);function e(t){r.call(this,t),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}return e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,i=t.length;if(i===0)this.destination.complete();else{for(var n=0;n<i&&!this.hasFirst;n++){var s=t[n],o=Rk.subscribeToResult(this,s,s,n);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},e.prototype.notifyNext=function(t,i,n,s,o){if(!this.hasFirst){this.hasFirst=!0;for(var a=0;a<this.subscriptions.length;a++)if(a!==n){var c=this.subscriptions[a];c.unsubscribe(),this.remove(c)}this.subscriptions=null}this.destination.next(i)},e}(kk.OuterSubscriber);fr.RaceSubscriber=Vv});var zv=u(()=>{"use strict";var Nk=v(),Fk=ss();Nk.Observable.race=Fk.race});var Wv=u(os=>{"use strict";var Mk=os&&os.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Uk=v(),Zk=In(),Lk=function(r){Mk(e,r);function e(){r.call(this)}return e.create=function(){return new e},e.prototype._subscribe=function(t){Zk.noop()},e}(Uk.Observable);os.NeverObservable=Lk});var $v=u(Bv=>{"use strict";var Dk=Wv();Bv.never=Dk.NeverObservable.create});var Hv=u(()=>{"use strict";var Vk=v(),zk=$v();Vk.Observable.never=zk.never});var Jv=u(()=>{"use strict";var Wk=v(),Bk=Lu();Wk.Observable.of=Bk.of});var as=u(ui=>{"use strict";var $k=ui&&ui.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Hk=Bu(),Yv=Oe(),Jk=P(),Yk=N();function Kk(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return r.length===1&&Yv.isArray(r[0])&&(r=r[0]),function(t){return t.lift(new Kv(r))}}ui.onErrorResumeNext=Kk;function Gk(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=null;return r.length===1&&Yv.isArray(r[0])&&(r=r[0]),t=r.shift(),new Hk.FromObservable(t,null).lift(new Kv(r))}ui.onErrorResumeNextStatic=Gk;var Kv=function(){function r(e){this.nextSources=e}return r.prototype.call=function(e,t){return t.subscribe(new Xk(e,this.nextSources))},r}(),Xk=function(r){$k(e,r);function e(t,i){r.call(this,t),this.destination=t,this.nextSources=i}return e.prototype.notifyError=function(t,i){this.subscribeToNextSource()},e.prototype.notifyComplete=function(t){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource()},e.prototype._complete=function(){this.subscribeToNextSource()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();t?this.add(Yk.subscribeToResult(this,t)):this.destination.complete()},e}(Jk.OuterSubscriber)});var Xv=u(Gv=>{"use strict";var Qk=as();Gv.onErrorResumeNext=Qk.onErrorResumeNextStatic});var Qv=u(()=>{"use strict";var eR=v(),tR=Xv();eR.Observable.onErrorResumeNext=tR.onErrorResumeNext});var eb=u(us=>{"use strict";var rR=us&&us.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},iR=v();function nR(r){var e=r.obj,t=r.keys,i=r.length,n=r.index,s=r.subscriber;if(n===i){s.complete();return}var o=t[n];s.next([o,e[o]]),r.index=n+1,this.schedule(r)}var sR=function(r){rR(e,r);function e(t,i){r.call(this),this.obj=t,this.scheduler=i,this.keys=Object.keys(t)}return e.create=function(t,i){return new e(t,i)},e.prototype._subscribe=function(t){var i=this,n=i.keys,s=i.scheduler,o=n.length;if(s)return s.schedule(nR,0,{obj:this.obj,keys:n,length:o,index:0,subscriber:t});for(var a=0;a<o;a++){var c=n[a];t.next([c,this.obj[c]])}t.complete()},e}(iR.Observable);us.PairsObservable=sR});var rb=u(tb=>{"use strict";var oR=eb();tb.pairs=oR.PairsObservable.create});var ib=u(()=>{"use strict";var aR=v(),uR=rb();aR.Observable.pairs=uR.pairs});var nb=u(cs=>{"use strict";var cR=cs&&cs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},lR=v(),fR=function(r){cR(e,r);function e(t,i,n){r.call(this),this.start=t,this._count=i,this.scheduler=n}return e.create=function(t,i,n){return t===void 0&&(t=0),i===void 0&&(i=0),new e(t,i,n)},e.dispatch=function(t){var i=t.start,n=t.index,s=t.count,o=t.subscriber;if(n>=s){o.complete();return}o.next(i),!o.closed&&(t.index=n+1,t.start=i+1,this.schedule(t))},e.prototype._subscribe=function(t){var i=0,n=this.start,s=this._count,o=this.scheduler;if(o)return o.schedule(e.dispatch,0,{index:i,count:s,start:n,subscriber:t});do{if(i++>=s){t.complete();break}if(t.next(n++),t.closed)break}while(!0)},e}(lR.Observable);cs.RangeObservable=fR});var ob=u(sb=>{"use strict";var hR=nb();sb.range=hR.RangeObservable.create});var ab=u(()=>{"use strict";var pR=v(),dR=ob();pR.Observable.range=dR.range});var cb=u(ls=>{"use strict";var ub=ls&&ls.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},vR=v(),bR=N(),mR=P(),yR=function(r){ub(e,r);function e(t,i){r.call(this),this.resourceFactory=t,this.observableFactory=i}return e.create=function(t,i){return new e(t,i)},e.prototype._subscribe=function(t){var i=this,n=i.resourceFactory,s=i.observableFactory,o;try{return o=n(),new _R(t,o,s)}catch(a){t.error(a)}},e}(vR.Observable);ls.UsingObservable=yR;var _R=function(r){ub(e,r);function e(t,i,n){r.call(this,t),this.resource=i,this.observableFactory=n,t.add(i),this.tryUse()}return e.prototype.tryUse=function(){try{var t=this.observableFactory.call(this,this.resource);t&&this.add(bR.subscribeToResult(this,t))}catch(i){this._error(i)}},e}(mR.OuterSubscriber)});var fb=u(lb=>{"use strict";var gR=cb();lb.using=gR.UsingObservable.create});var hb=u(()=>{"use strict";var wR=v(),SR=fb();wR.Observable.using=SR.using});var pb=u(fs=>{"use strict";var OR=fs&&fs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},xR=v(),qR=function(r){OR(e,r);function e(t,i){r.call(this),this.error=t,this.scheduler=i}return e.create=function(t,i){return new e(t,i)},e.dispatch=function(t){var i=t.error,n=t.subscriber;n.error(i)},e.prototype._subscribe=function(t){var i=this.error,n=this.scheduler;if(t.syncErrorThrowable=!0,n)return n.schedule(e.dispatch,0,{error:i,subscriber:t});t.error(i)},e}(xR.Observable);fs.ErrorObservable=qR});var vb=u(db=>{"use strict";var TR=pb();db._throw=TR.ErrorObservable.create});var bb=u(()=>{"use strict";var CR=v(),IR=vb();CR.Observable.throw=IR._throw});var ci=u(mb=>{"use strict";function AR(r){return r instanceof Date&&!isNaN(+r)}mb.isDate=AR});var _b=u(hs=>{"use strict";var ER=hs&&hs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},jR=ur(),kR=v(),RR=W(),yb=_e(),PR=ci(),NR=function(r){ER(e,r);function e(t,i,n){t===void 0&&(t=0),r.call(this),this.period=-1,this.dueTime=0,jR.isNumeric(i)?this.period=Number(i)<1&&1||Number(i):yb.isScheduler(i)&&(n=i),yb.isScheduler(n)||(n=RR.async),this.scheduler=n,this.dueTime=PR.isDate(t)?+t-this.scheduler.now():t}return e.create=function(t,i,n){return t===void 0&&(t=0),new e(t,i,n)},e.dispatch=function(t){var i=t.index,n=t.period,s=t.subscriber,o=this;if(s.next(i),!s.closed){if(n===-1)return s.complete();t.index=i+1,o.schedule(t,n)}},e.prototype._subscribe=function(t){var i=0,n=this,s=n.period,o=n.dueTime,a=n.scheduler;return a.schedule(e.dispatch,o,{index:i,period:s,subscriber:t})},e}(kR.Observable);hs.TimerObservable=NR});var Yu=u(gb=>{"use strict";var FR=_b();gb.timer=FR.TimerObservable.create});var wb=u(()=>{"use strict";var MR=v(),UR=Yu();MR.Observable.timer=UR.timer});var li=u(St=>{"use strict";var Sb=St&&St.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},ZR=Me(),LR=Oe(),DR=C(),VR=P(),zR=N(),ps=rr();function WR(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(i){return i.lift.call(Ob.apply(void 0,[i].concat(r)))}}St.zip=WR;function Ob(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=r[r.length-1];return typeof t=="function"&&r.pop(),new ZR.ArrayObservable(r).lift(new xb(t))}St.zipStatic=Ob;var xb=function(){function r(e){this.project=e}return r.prototype.call=function(e,t){return t.subscribe(new qb(e,this.project))},r}();St.ZipOperator=xb;var qb=function(r){Sb(e,r);function e(t,i,n){n===void 0&&(n=Object.create(null)),r.call(this,t),this.iterators=[],this.active=0,this.project=typeof i=="function"?i:null,this.values=n}return e.prototype._next=function(t){var i=this.iterators;LR.isArray(t)?i.push(new $R(t)):typeof t[ps.iterator]=="function"?i.push(new BR(t[ps.iterator]())):i.push(new HR(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,i=t.length;if(i===0){this.destination.complete();return}this.active=i;for(var n=0;n<i;n++){var s=t[n];s.stillUnsubscribed?this.add(s.subscribe(s,n)):this.active--}},e.prototype.notifyInactive=function(){this.active--,this.active===0&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,i=t.length,n=this.destination,s=0;s<i;s++){var o=t[s];if(typeof o.hasValue=="function"&&!o.hasValue())return}for(var a=!1,c=[],s=0;s<i;s++){var o=t[s],l=o.next();if(o.hasCompleted()&&(a=!0),l.done){n.complete();return}c.push(l.value)}this.project?this._tryProject(c):n.next(c),a&&n.complete()},e.prototype._tryProject=function(t){var i;try{i=this.project.apply(this,t)}catch(n){this.destination.error(n);return}this.destination.next(i)},e}(DR.Subscriber);St.ZipSubscriber=qb;var BR=function(){function r(e){this.iterator=e,this.nextResult=e.next()}return r.prototype.hasValue=function(){return!0},r.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},r.prototype.hasCompleted=function(){var e=this.nextResult;return e&&e.done},r}(),$R=function(){function r(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return r.prototype[ps.iterator]=function(){return this},r.prototype.next=function(e){var t=this.index++,i=this.array;return t<this.length?{value:i[t],done:!1}:{value:null,done:!0}},r.prototype.hasValue=function(){return this.array.length>this.index},r.prototype.hasCompleted=function(){return this.array.length===this.index},r}(),HR=function(r){Sb(e,r);function e(t,i,n){r.call(this,t),this.parent=i,this.observable=n,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}return e.prototype[ps.iterator]=function(){return this},e.prototype.next=function(){var t=this.buffer;return t.length===0&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return this.buffer.length===0&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){this.buffer.push(i),this.parent.checkIterators()},e.prototype.subscribe=function(t,i){return zR.subscribeToResult(this,this.observable,this,i)},e}(VR.OuterSubscriber)});var Cb=u(Tb=>{"use strict";var JR=li();Tb.zip=JR.zipStatic});var Ib=u(()=>{"use strict";var YR=v(),KR=Cb();YR.Observable.zip=KR.zip});var hr=u(fi=>{"use strict";var GR=fi&&fi.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},XR=C();function QR(r,e){return function(i){if(typeof r!="function")throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new Ab(r,e))}}fi.map=QR;var Ab=function(){function r(e,t){this.project=e,this.thisArg=t}return r.prototype.call=function(e,t){return t.subscribe(new eP(e,this.project,this.thisArg))},r}();fi.MapOperator=Ab;var eP=function(r){GR(e,r);function e(t,i,n){r.call(this,t),this.project=i,this.count=0,this.thisArg=n||this}return e.prototype._next=function(t){var i;try{i=this.project.call(this.thisArg,t,this.count++)}catch(n){this.destination.error(n);return}this.destination.next(i)},e}(XR.Subscriber)});var Ku=u(fe=>{"use strict";var vs=fe&&fe.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},pe=se(),hi=Q(),pr=Y(),tP=v(),rP=C(),iP=hr();function nP(){if(pe.root.XMLHttpRequest)return new pe.root.XMLHttpRequest;if(pe.root.XDomainRequest)return new pe.root.XDomainRequest;throw new Error("CORS is not supported by your browser")}function sP(){if(pe.root.XMLHttpRequest)return new pe.root.XMLHttpRequest;var r=void 0;try{for(var e=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],t=0;t<3;t++)try{if(r=e[t],new pe.root.ActiveXObject(r))break}catch{}return new pe.root.ActiveXObject(r)}catch{throw new Error("XMLHttpRequest is not supported by your browser")}}function Eb(r,e){return e===void 0&&(e=null),new Ot({method:"GET",url:r,headers:e})}fe.ajaxGet=Eb;function jb(r,e,t){return new Ot({method:"POST",url:r,body:e,headers:t})}fe.ajaxPost=jb;function kb(r,e){return new Ot({method:"DELETE",url:r,headers:e})}fe.ajaxDelete=kb;function Rb(r,e,t){return new Ot({method:"PUT",url:r,body:e,headers:t})}fe.ajaxPut=Rb;function Pb(r,e,t){return new Ot({method:"PATCH",url:r,body:e,headers:t})}fe.ajaxPatch=Pb;var oP=iP.map(function(r,e){return r.response});function Nb(r,e){return oP(new Ot({method:"GET",url:r,responseType:"json",headers:e}))}fe.ajaxGetJSON=Nb;var Ot=function(r){vs(e,r);function e(t){r.call(this);var i={async:!0,createXHR:function(){return this.crossDomain?nP.call(this):sP()},crossDomain:!1,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if(typeof t=="string")i.url=t;else for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);this.request=i}return e.prototype._subscribe=function(t){return new Fb(t,this.request)},e.create=function(){var t=function(i){return new e(i)};return t.get=Eb,t.post=jb,t.delete=kb,t.put=Rb,t.patch=Pb,t.getJSON=Nb,t}(),e}(tP.Observable);fe.AjaxObservable=Ot;var Fb=function(r){vs(e,r);function e(t,i){r.call(this,t),this.request=i,this.done=!1;var n=i.headers=i.headers||{};!i.crossDomain&&!n["X-Requested-With"]&&(n["X-Requested-With"]="XMLHttpRequest"),!("Content-Type"in n)&&!(pe.root.FormData&&i.body instanceof pe.root.FormData)&&typeof i.body!="undefined"&&(n["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),i.body=this.serializeBody(i.body,i.headers["Content-Type"]),this.send()}return e.prototype.next=function(t){this.done=!0;var i=this,n=i.xhr,s=i.request,o=i.destination,a=new Mb(t,n,s);o.next(a)},e.prototype.send=function(){var t=this,i=t.request,n=t.request,s=n.user,o=n.method,a=n.url,c=n.async,l=n.password,f=n.headers,p=n.body,y=i.createXHR,g=hi.tryCatch(y).call(i);if(g===pr.errorObject)this.error(pr.errorObject.e);else{this.xhr=g,this.setupEvents(g,i);var m=void 0;if(s?m=hi.tryCatch(g.open).call(g,o,a,c,s,l):m=hi.tryCatch(g.open).call(g,o,a,c),m===pr.errorObject)return this.error(pr.errorObject.e),null;if(c&&(g.timeout=i.timeout,g.responseType=i.responseType),"withCredentials"in g&&(g.withCredentials=!!i.withCredentials),this.setHeaders(g,f),m=p?hi.tryCatch(g.send).call(g,p):hi.tryCatch(g.send).call(g),m===pr.errorObject)return this.error(pr.errorObject.e),null}return g},e.prototype.serializeBody=function(t,i){if(!t||typeof t=="string")return t;if(pe.root.FormData&&t instanceof pe.root.FormData)return t;if(i){var n=i.indexOf(";");n!==-1&&(i=i.substring(0,n))}switch(i){case"application/x-www-form-urlencoded":return Object.keys(t).map(function(s){return encodeURIComponent(s)+"="+encodeURIComponent(t[s])}).join("&");case"application/json":return JSON.stringify(t);default:return t}},e.prototype.setHeaders=function(t,i){for(var n in i)i.hasOwnProperty(n)&&t.setRequestHeader(n,i[n])},e.prototype.setupEvents=function(t,i){var n=i.progressSubscriber;function s(l){var f=s,p=f.subscriber,y=f.progressSubscriber,g=f.request;y&&y.error(l),p.error(new Zb(this,g))}if(t.ontimeout=s,s.request=i,s.subscriber=this,s.progressSubscriber=n,t.upload&&"withCredentials"in t){if(n){var o;o=function(l){var f=o.progressSubscriber;f.next(l)},pe.root.XDomainRequest?t.onprogress=o:t.upload.onprogress=o,o.progressSubscriber=n}var a;a=function(l){var f=a,p=f.progressSubscriber,y=f.subscriber,g=f.request;p&&p.error(l),y.error(new ds("ajax error",this,g))},t.onerror=a,a.request=i,a.subscriber=this,a.progressSubscriber=n}function c(l){var f=c,p=f.subscriber,y=f.progressSubscriber,g=f.request;if(this.readyState===4){var m=this.status===1223?204:this.status,O=this.responseType==="text"?this.response||this.responseText:this.response;m===0&&(m=O?200:0),200<=m&&m<300?(y&&y.complete(),p.next(l),p.complete()):(y&&y.error(l),p.error(new ds("ajax error "+m,this,g)))}}t.onreadystatechange=c,c.subscriber=this,c.progressSubscriber=n,c.request=i},e.prototype.unsubscribe=function(){var t=this,i=t.done,n=t.xhr;!i&&n&&n.readyState!==4&&typeof n.abort=="function"&&n.abort(),r.prototype.unsubscribe.call(this)},e}(rP.Subscriber);fe.AjaxSubscriber=Fb;var Mb=function(){function r(e,t,i){this.originalEvent=e,this.xhr=t,this.request=i,this.status=t.status,this.responseType=t.responseType||i.responseType,this.response=Ub(this.responseType,t)}return r}();fe.AjaxResponse=Mb;var ds=function(r){vs(e,r);function e(t,i,n){r.call(this,t),this.message=t,this.xhr=i,this.request=n,this.status=i.status,this.responseType=i.responseType||n.responseType,this.response=Ub(this.responseType,i)}return e}(Error);fe.AjaxError=ds;function Ub(r,e){switch(r){case"json":return"response"in e?e.responseType?e.response:JSON.parse(e.response||e.responseText||"null"):JSON.parse(e.responseText||"null");case"xml":return e.responseXML;case"text":default:return"response"in e?e.response:e.responseText}}var Zb=function(r){vs(e,r);function e(t,i){r.call(this,"ajax timeout",t,i)}return e}(ds);fe.AjaxTimeoutError=Zb});var Db=u(Lb=>{"use strict";var aP=Ku();Lb.ajax=aP.AjaxObservable.create});var Vb=u(()=>{"use strict";var uP=v(),cP=Db();uP.Observable.ajax=cP.ajax});var zb=u(bs=>{"use strict";var lP=bs&&bs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},fP=cr(),hP=function(r){lP(e,r);function e(t,i){r.call(this,t,i),this.scheduler=t,this.work=i}return e.prototype.schedule=function(t,i){return i===void 0&&(i=0),i>0?r.prototype.schedule.call(this,t,i):(this.delay=i,this.state=t,this.scheduler.flush(this),this)},e.prototype.execute=function(t,i){return i>0||this.closed?r.prototype.execute.call(this,t,i):this._execute(t,i)},e.prototype.requestAsyncId=function(t,i,n){return n===void 0&&(n=0),n!==null&&n>0||n===null&&this.delay>0?r.prototype.requestAsyncId.call(this,t,i,n):t.flush(this)},e}(fP.AsyncAction);bs.QueueAction=hP});var Wb=u(ms=>{"use strict";var pP=ms&&ms.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},dP=lr(),vP=function(r){pP(e,r);function e(){r.apply(this,arguments)}return e}(dP.AsyncScheduler);ms.QueueScheduler=vP});var Gu=u(Bb=>{"use strict";var bP=zb(),mP=Wb();Bb.queue=new mP.QueueScheduler(bP.QueueAction)});var pi=u(ys=>{"use strict";var yP=ys&&ys.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},_P=K(),gP=Gu(),$b=J(),wP=si(),SP=ei(),OP=Ru(),xP=function(r){yP(e,r);function e(t,i,n){t===void 0&&(t=Number.POSITIVE_INFINITY),i===void 0&&(i=Number.POSITIVE_INFINITY),r.call(this),this.scheduler=n,this._events=[],this._bufferSize=t<1?1:t,this._windowTime=i<1?1:i}return e.prototype.next=function(t){var i=this._getNow();this._events.push(new qP(i,t)),this._trimBufferThenGetEvents(),r.prototype.next.call(this,t)},e.prototype._subscribe=function(t){var i=this._trimBufferThenGetEvents(),n=this.scheduler,s;if(this.closed)throw new SP.ObjectUnsubscribedError;this.hasError||this.isStopped?s=$b.Subscription.EMPTY:(this.observers.push(t),s=new OP.SubjectSubscription(this,t)),n&&t.add(t=new wP.ObserveOnSubscriber(t,n));for(var o=i.length,a=0;a<o&&!t.closed;a++)t.next(i[a].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),s},e.prototype._getNow=function(){return(this.scheduler||gP.queue).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),i=this._bufferSize,n=this._windowTime,s=this._events,o=s.length,a=0;a<o&&!(t-s[a].time<n);)a++;return o>i&&(a=Math.max(a,o-i)),a>0&&s.splice(0,a),s},e}(_P.Subject);ys.ReplaySubject=xP;var qP=function(){function r(e,t){this.time=e,this.value=t}return r}()});var Yb=u(_s=>{"use strict";var TP=se();function Hb(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var i=e.length,n=0;n<i;n++){var s=e[n];for(var o in s)s.hasOwnProperty(o)&&(r[o]=s[o])}return r}_s.assignImpl=Hb;function Jb(r){return r.Object.assign||Hb}_s.getAssign=Jb;_s.assign=Jb(TP.root)});var Xb=u(Ss=>{"use strict";var CP=Ss&&Ss.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Xu=K(),IP=C(),Kb=v(),Gb=J(),AP=se(),gs=pi(),ws=Q(),Ye=Y(),EP=Yb(),jP=function(r){CP(e,r);function e(t,i){if(t instanceof Kb.Observable)r.call(this,i,t);else{if(r.call(this),this.WebSocketCtor=AP.root.WebSocket,this._output=new Xu.Subject,typeof t=="string"?this.url=t:EP.assign(this,t),!this.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new gs.ReplaySubject}}return e.prototype.resultSelector=function(t){return JSON.parse(t.data)},e.create=function(t){return new e(t)},e.prototype.lift=function(t){var i=new e(this,this.destination);return i.operator=t,i},e.prototype._resetState=function(){this.socket=null,this.source||(this.destination=new gs.ReplaySubject),this._output=new Xu.Subject},e.prototype.multiplex=function(t,i,n){var s=this;return new Kb.Observable(function(o){var a=ws.tryCatch(t)();a===Ye.errorObject?o.error(Ye.errorObject.e):s.next(a);var c=s.subscribe(function(l){var f=ws.tryCatch(n)(l);f===Ye.errorObject?o.error(Ye.errorObject.e):f&&o.next(l)},function(l){return o.error(l)},function(){return o.complete()});return function(){var l=ws.tryCatch(i)();l===Ye.errorObject?o.error(Ye.errorObject.e):s.next(l),c.unsubscribe()}})},e.prototype._connectSocket=function(){var t=this,i=this.WebSocketCtor,n=this._output,s=null;try{s=this.protocol?new i(this.url,this.protocol):new i(this.url),this.socket=s,this.binaryType&&(this.socket.binaryType=this.binaryType)}catch(a){n.error(a);return}var o=new Gb.Subscription(function(){t.socket=null,s&&s.readyState===1&&s.close()});s.onopen=function(a){var c=t.openObserver;c&&c.next(a);var l=t.destination;t.destination=IP.Subscriber.create(function(f){return s.readyState===1&&s.send(f)},function(f){var p=t.closingObserver;p&&p.next(void 0),f&&f.code?s.close(f.code,f.reason):n.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }")),t._resetState()},function(){var f=t.closingObserver;f&&f.next(void 0),s.close(),t._resetState()}),l&&l instanceof gs.ReplaySubject&&o.add(l.subscribe(t.destination))},s.onerror=function(a){t._resetState(),n.error(a)},s.onclose=function(a){t._resetState();var c=t.closeObserver;c&&c.next(a),a.wasClean?n.complete():n.error(a)},s.onmessage=function(a){var c=ws.tryCatch(t.resultSelector)(a);c===Ye.errorObject?n.error(Ye.errorObject.e):n.next(c)}},e.prototype._subscribe=function(t){var i=this,n=this.source;if(n)return n.subscribe(t);this.socket||this._connectSocket();var s=new Gb.Subscription;return s.add(this._output.subscribe(t)),s.add(function(){var o=i.socket;i._output.observers.length===0&&(o&&o.readyState===1&&o.close(),i._resetState())}),s},e.prototype.unsubscribe=function(){var t=this,i=t.source,n=t.socket;n&&n.readyState===1&&(n.close(),this._resetState()),r.prototype.unsubscribe.call(this),i||(this.destination=new gs.ReplaySubject)},e}(Xu.AnonymousSubject);Ss.WebSocketSubject=jP});var em=u(Qb=>{"use strict";var kP=Xb();Qb.webSocket=kP.WebSocketSubject.create});var tm=u(()=>{"use strict";var RP=v(),PP=em();RP.Observable.webSocket=PP.webSocket});var Qu=u(Os=>{"use strict";var NP=Os&&Os.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},FP=P(),MP=N();function UP(r){return function(t){return t.lift(new ZP(r))}}Os.buffer=UP;var ZP=function(){function r(e){this.closingNotifier=e}return r.prototype.call=function(e,t){return t.subscribe(new LP(e,this.closingNotifier))},r}(),LP=function(r){NP(e,r);function e(t,i){r.call(this,t),this.buffer=[],this.add(MP.subscribeToResult(this,i))}return e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,i,n,s,o){var a=this.buffer;this.buffer=[],this.destination.next(a)},e}(FP.OuterSubscriber)});var im=u(rm=>{"use strict";var DP=Qu();function VP(r){return DP.buffer(r)(this)}rm.buffer=VP});var nm=u(()=>{"use strict";var zP=v(),WP=im();zP.Observable.prototype.buffer=WP.buffer});var ec=u(xs=>{"use strict";var sm=xs&&xs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},om=C();function BP(r,e){return e===void 0&&(e=null),function(i){return i.lift(new $P(r,e))}}xs.bufferCount=BP;var $P=function(){function r(e,t){this.bufferSize=e,this.startBufferEvery=t,!t||e===t?this.subscriberClass=HP:this.subscriberClass=JP}return r.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},r}(),HP=function(r){sm(e,r);function e(t,i){r.call(this,t),this.bufferSize=i,this.buffer=[]}return e.prototype._next=function(t){var i=this.buffer;i.push(t),i.length==this.bufferSize&&(this.destination.next(i),this.buffer=[])},e.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),r.prototype._complete.call(this)},e}(om.Subscriber),JP=function(r){sm(e,r);function e(t,i,n){r.call(this,t),this.bufferSize=i,this.startBufferEvery=n,this.buffers=[],this.count=0}return e.prototype._next=function(t){var i=this,n=i.bufferSize,s=i.startBufferEvery,o=i.buffers,a=i.count;this.count++,a%s===0&&o.push([]);for(var c=o.length;c--;){var l=o[c];l.push(t),l.length===n&&(o.splice(c,1),this.destination.next(l))}},e.prototype._complete=function(){for(var t=this,i=t.buffers,n=t.destination;i.length>0;){var s=i.shift();s.length>0&&n.next(s)}r.prototype._complete.call(this)},e}(om.Subscriber)});var um=u(am=>{"use strict";var YP=ec();function KP(r,e){return e===void 0&&(e=null),YP.bufferCount(r,e)(this)}am.bufferCount=KP});var cm=u(()=>{"use strict";var GP=v(),XP=um();GP.Observable.prototype.bufferCount=XP.bufferCount});var tc=u(qs=>{"use strict";var QP=qs&&qs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},eN=W(),tN=C(),rN=_e();function iN(r){var e=arguments.length,t=eN.async;rN.isScheduler(arguments[arguments.length-1])&&(t=arguments[arguments.length-1],e--);var i=null;e>=2&&(i=arguments[1]);var n=Number.POSITIVE_INFINITY;return e>=3&&(n=arguments[2]),function(o){return o.lift(new nN(r,i,n,t))}}qs.bufferTime=iN;var nN=function(){function r(e,t,i,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=i,this.scheduler=n}return r.prototype.call=function(e,t){return t.subscribe(new oN(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},r}(),sN=function(){function r(){this.buffer=[]}return r}(),oN=function(r){QP(e,r);function e(t,i,n,s,o){r.call(this,t),this.bufferTimeSpan=i,this.bufferCreationInterval=n,this.maxBufferSize=s,this.scheduler=o,this.contexts=[];var a=this.openContext();if(this.timespanOnly=n==null||n<0,this.timespanOnly){var c={subscriber:this,context:a,bufferTimeSpan:i};this.add(a.closeAction=o.schedule(lm,i,c))}else{var l={subscriber:this,context:a},f={bufferTimeSpan:i,bufferCreationInterval:n,subscriber:this,scheduler:o};this.add(a.closeAction=o.schedule(fm,i,l)),this.add(o.schedule(aN,n,f))}}return e.prototype._next=function(t){for(var i=this.contexts,n=i.length,s,o=0;o<n;o++){var a=i[o],c=a.buffer;c.push(t),c.length==this.maxBufferSize&&(s=a)}s&&this.onBufferFull(s)},e.prototype._error=function(t){this.contexts.length=0,r.prototype._error.call(this,t)},e.prototype._complete=function(){for(var t=this,i=t.contexts,n=t.destination;i.length>0;){var s=i.shift();n.next(s.buffer)}r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var i=t.closeAction;if(i.unsubscribe(),this.remove(i),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,s={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(lm,n,s))}},e.prototype.openContext=function(){var t=new sN;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var i=this.contexts,n=i?i.indexOf(t):-1;n>=0&&i.splice(i.indexOf(t),1)},e}(tN.Subscriber);function lm(r){var e=r.subscriber,t=r.context;t&&e.closeContext(t),e.closed||(r.context=e.openContext(),r.context.closeAction=this.schedule(r,r.bufferTimeSpan))}function aN(r){var e=r.bufferCreationInterval,t=r.bufferTimeSpan,i=r.subscriber,n=r.scheduler,s=i.openContext(),o=this;i.closed||(i.add(s.closeAction=n.schedule(fm,t,{subscriber:i,context:s})),o.schedule(r,e))}function fm(r){var e=r.subscriber,t=r.context;e.closeContext(t)}});var pm=u(hm=>{"use strict";var uN=W(),cN=_e(),lN=tc();function fN(r){var e=arguments.length,t=uN.async;cN.isScheduler(arguments[arguments.length-1])&&(t=arguments[arguments.length-1],e--);var i=null;e>=2&&(i=arguments[1]);var n=Number.POSITIVE_INFINITY;return e>=3&&(n=arguments[2]),lN.bufferTime(r,i,n,t)(this)}hm.bufferTime=fN});var dm=u(()=>{"use strict";var hN=v(),pN=pm();hN.Observable.prototype.bufferTime=pN.bufferTime});var rc=u(Ts=>{"use strict";var dN=Ts&&Ts.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},vN=J(),vm=N(),bN=P();function mN(r,e){return function(i){return i.lift(new yN(r,e))}}Ts.bufferToggle=mN;var yN=function(){function r(e,t){this.openings=e,this.closingSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new _N(e,this.openings,this.closingSelector))},r}(),_N=function(r){dN(e,r);function e(t,i,n){r.call(this,t),this.openings=i,this.closingSelector=n,this.contexts=[],this.add(vm.subscribeToResult(this,i))}return e.prototype._next=function(t){for(var i=this.contexts,n=i.length,s=0;s<n;s++)i[s].buffer.push(t)},e.prototype._error=function(t){for(var i=this.contexts;i.length>0;){var n=i.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,r.prototype._error.call(this,t)},e.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var i=t.shift();this.destination.next(i.buffer),i.subscription.unsubscribe(),i.buffer=null,i.subscription=null}this.contexts=null,r.prototype._complete.call(this)},e.prototype.notifyNext=function(t,i,n,s,o){t?this.closeBuffer(t):this.openBuffer(i)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var i=this.closingSelector,n=i.call(this,t);n&&this.trySubscribe(n)}catch(s){this._error(s)}},e.prototype.closeBuffer=function(t){var i=this.contexts;if(i&&t){var n=t.buffer,s=t.subscription;this.destination.next(n),i.splice(i.indexOf(t),1),this.remove(s),s.unsubscribe()}},e.prototype.trySubscribe=function(t){var i=this.contexts,n=[],s=new vN.Subscription,o={buffer:n,subscription:s};i.push(o);var a=vm.subscribeToResult(this,t,o);!a||a.closed?this.closeBuffer(o):(a.context=o,this.add(a),s.add(a))},e}(bN.OuterSubscriber)});var mm=u(bm=>{"use strict";var gN=rc();function wN(r,e){return gN.bufferToggle(r,e)(this)}bm.bufferToggle=wN});var ym=u(()=>{"use strict";var SN=v(),ON=mm();SN.Observable.prototype.bufferToggle=ON.bufferToggle});var ic=u(Cs=>{"use strict";var xN=Cs&&Cs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},qN=J(),TN=Q(),_m=Y(),CN=P(),IN=N();function AN(r){return function(e){return e.lift(new EN(r))}}Cs.bufferWhen=AN;var EN=function(){function r(e){this.closingSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new jN(e,this.closingSelector))},r}(),jN=function(r){xN(e,r);function e(t,i){r.call(this,t),this.closingSelector=i,this.subscribing=!1,this.openBuffer()}return e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,i,n,s,o){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var i=this.buffer;this.buffer&&this.destination.next(i),this.buffer=[];var n=TN.tryCatch(this.closingSelector)();n===_m.errorObject?this.error(_m.errorObject.e):(t=new qN.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(IN.subscribeToResult(this,n)),this.subscribing=!1)},e}(CN.OuterSubscriber)});var wm=u(gm=>{"use strict";var kN=ic();function RN(r){return kN.bufferWhen(r)(this)}gm.bufferWhen=RN});var Sm=u(()=>{"use strict";var PN=v(),NN=wm();PN.Observable.prototype.bufferWhen=NN.bufferWhen});var nc=u(Is=>{"use strict";var FN=Is&&Is.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},MN=P(),UN=N();function ZN(r){return function(t){var i=new LN(r),n=t.lift(i);return i.caught=n}}Is.catchError=ZN;var LN=function(){function r(e){this.selector=e}return r.prototype.call=function(e,t){return t.subscribe(new DN(e,this.selector,this.caught))},r}(),DN=function(r){FN(e,r);function e(t,i,n){r.call(this,t),this.selector=i,this.caught=n}return e.prototype.error=function(t){if(!this.isStopped){var i=void 0;try{i=this.selector(t,this.caught)}catch(n){r.prototype.error.call(this,n);return}this._unsubscribeAndRecycle(),this.add(UN.subscribeToResult(this,i))}},e}(MN.OuterSubscriber)});var xm=u(Om=>{"use strict";var VN=nc();function zN(r){return VN.catchError(r)(this)}Om._catch=zN});var Cm=u(()=>{"use strict";var qm=v(),Tm=xm();qm.Observable.prototype.catch=Tm._catch;qm.Observable.prototype._catch=Tm._catch});var sc=u(Im=>{"use strict";var WN=ni();function BN(r){return function(e){return e.lift(new WN.CombineLatestOperator(r))}}Im.combineAll=BN});var Em=u(Am=>{"use strict";var $N=sc();function HN(r){return $N.combineAll(r)(this)}Am.combineAll=HN});var jm=u(()=>{"use strict";var JN=v(),YN=Em();JN.Observable.prototype.combineAll=YN.combineAll});var Rm=u(km=>{"use strict";var KN=ni();function GN(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return KN.combineLatest.apply(void 0,r)(this)}km.combineLatest=GN});var Pm=u(()=>{"use strict";var XN=v(),QN=Rm();XN.Observable.prototype.combineLatest=QN.combineLatest});var ac=u(oc=>{"use strict";var eF=ar(),tF=ar();oc.concatStatic=tF.concat;function rF(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(t){return t.lift.call(eF.concat.apply(void 0,[t].concat(r)))}}oc.concat=rF});var Nm=u(uc=>{"use strict";var iF=ac(),nF=ar();uc.concatStatic=nF.concat;function sF(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return iF.concat.apply(void 0,r)(this)}uc.concat=sF});var Fm=u(()=>{"use strict";var oF=v(),aF=Nm();oF.Observable.prototype.concat=aF.concat});var Um=u(Mm=>{"use strict";var uF=Jn();function cF(){return uF.concatAll()(this)}Mm.concatAll=cF});var Zm=u(()=>{"use strict";var lF=v(),fF=Um();lF.Observable.prototype.concatAll=fF.concatAll});var As=u(Lm=>{"use strict";var hF=or();function pF(r,e){return hF.mergeMap(r,e,1)}Lm.concatMap=pF});var Vm=u(Dm=>{"use strict";var dF=As();function vF(r,e){return dF.concatMap(r,e)(this)}Dm.concatMap=vF});var zm=u(()=>{"use strict";var bF=v(),mF=Vm();bF.Observable.prototype.concatMap=mF.concatMap});var cc=u(Wm=>{"use strict";var yF=As();function _F(r,e){return yF.concatMap(function(){return r},e)}Wm.concatMapTo=_F});var $m=u(Bm=>{"use strict";var gF=cc();function wF(r,e){return gF.concatMapTo(r,e)(this)}Bm.concatMapTo=wF});var Hm=u(()=>{"use strict";var SF=v(),OF=$m();SF.Observable.prototype.concatMapTo=OF.concatMapTo});var lc=u(Es=>{"use strict";var xF=Es&&Es.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},qF=C();function TF(r){return function(e){return e.lift(new CF(r,e))}}Es.count=TF;var CF=function(){function r(e,t){this.predicate=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new IF(e,this.predicate,this.source))},r}(),IF=function(r){xF(e,r);function e(t,i,n){r.call(this,t),this.predicate=i,this.source=n,this.count=0,this.index=0}return e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var i;try{i=this.predicate(t,this.index++,this.source)}catch(n){this.destination.error(n);return}i&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(qF.Subscriber)});var Ym=u(Jm=>{"use strict";var AF=lc();function EF(r){return AF.count(r)(this)}Jm.count=EF});var Km=u(()=>{"use strict";var jF=v(),kF=Ym();jF.Observable.prototype.count=kF.count});var fc=u(js=>{"use strict";var RF=js&&js.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},PF=C();function NF(){return function(e){return e.lift(new FF)}}js.dematerialize=NF;var FF=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new MF(e))},r}(),MF=function(r){RF(e,r);function e(t){r.call(this,t)}return e.prototype._next=function(t){t.observe(this.destination)},e}(PF.Subscriber)});var Xm=u(Gm=>{"use strict";var UF=fc();function ZF(){return UF.dematerialize()(this)}Gm.dematerialize=ZF});var Qm=u(()=>{"use strict";var LF=v(),DF=Xm();LF.Observable.prototype.dematerialize=DF.dematerialize});var hc=u(ks=>{"use strict";var VF=ks&&ks.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},zF=P(),WF=N();function BF(r){return function(e){return e.lift(new $F(r))}}ks.debounce=BF;var $F=function(){function r(e){this.durationSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new HF(e,this.durationSelector))},r}(),HF=function(r){VF(e,r);function e(t,i){r.call(this,t),this.durationSelector=i,this.hasValue=!1,this.durationSubscription=null}return e.prototype._next=function(t){try{var i=this.durationSelector.call(this,t);i&&this._tryNext(t,i)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,i){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),n=WF.subscribeToResult(this,i),n.closed||this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(t,i,n,s,o){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var t=this.value,i=this.durationSubscription;i&&(this.durationSubscription=null,i.unsubscribe(),this.remove(i)),this.value=null,this.hasValue=!1,r.prototype._next.call(this,t)}},e}(zF.OuterSubscriber)});var ty=u(ey=>{"use strict";var JF=hc();function YF(r){return JF.debounce(r)(this)}ey.debounce=YF});var ry=u(()=>{"use strict";var KF=v(),GF=ty();KF.Observable.prototype.debounce=GF.debounce});var pc=u(Rs=>{"use strict";var XF=Rs&&Rs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},QF=C(),eM=W();function tM(r,e){return e===void 0&&(e=eM.async),function(t){return t.lift(new rM(r,e))}}Rs.debounceTime=tM;var rM=function(){function r(e,t){this.dueTime=e,this.scheduler=t}return r.prototype.call=function(e,t){return t.subscribe(new iM(e,this.dueTime,this.scheduler))},r}(),iM=function(r){XF(e,r);function e(t,i,n){r.call(this,t),this.dueTime=i,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}return e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(nM,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){this.clearDebounce(),this.hasValue&&(this.destination.next(this.lastValue),this.lastValue=null,this.hasValue=!1)},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;t!==null&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(QF.Subscriber);function nM(r){r.debouncedNext()}});var ny=u(iy=>{"use strict";var sM=W(),oM=pc();function aM(r,e){return e===void 0&&(e=sM.async),oM.debounceTime(r,e)(this)}iy.debounceTime=aM});var sy=u(()=>{"use strict";var uM=v(),cM=ny();uM.Observable.prototype.debounceTime=cM.debounceTime});var Ns=u(Ps=>{"use strict";var lM=Ps&&Ps.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},fM=C();function hM(r){return r===void 0&&(r=null),function(e){return e.lift(new pM(r))}}Ps.defaultIfEmpty=hM;var pM=function(){function r(e){this.defaultValue=e}return r.prototype.call=function(e,t){return t.subscribe(new dM(e,this.defaultValue))},r}(),dM=function(r){lM(e,r);function e(t,i){r.call(this,t),this.defaultValue=i,this.isEmpty=!0}return e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(fM.Subscriber)});var ay=u(oy=>{"use strict";var vM=Ns();function bM(r){return r===void 0&&(r=null),vM.defaultIfEmpty(r)(this)}oy.defaultIfEmpty=bM});var uy=u(()=>{"use strict";var mM=v(),yM=ay();mM.Observable.prototype.defaultIfEmpty=yM.defaultIfEmpty});var dc=u(Fs=>{"use strict";var _M=Fs&&Fs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},gM=W(),wM=ci(),SM=C(),cy=nr();function OM(r,e){e===void 0&&(e=gM.async);var t=wM.isDate(r),i=t?+r-e.now():Math.abs(r);return function(n){return n.lift(new xM(i,e))}}Fs.delay=OM;var xM=function(){function r(e,t){this.delay=e,this.scheduler=t}return r.prototype.call=function(e,t){return t.subscribe(new qM(e,this.delay,this.scheduler))},r}(),qM=function(r){_M(e,r);function e(t,i,n){r.call(this,t),this.delay=i,this.scheduler=n,this.queue=[],this.active=!1,this.errored=!1}return e.dispatch=function(t){for(var i=t.source,n=i.queue,s=t.scheduler,o=t.destination;n.length>0&&n[0].time-s.now()<=0;)n.shift().notification.observe(o);if(n.length>0){var a=Math.max(0,n[0].time-s.now());this.schedule(t,a)}else this.unsubscribe(),i.active=!1},e.prototype._schedule=function(t){this.active=!0,this.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(this.errored!==!0){var i=this.scheduler,n=new TM(i.now()+this.delay,t);this.queue.push(n),this.active===!1&&this._schedule(i)}},e.prototype._next=function(t){this.scheduleNotification(cy.Notification.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t)},e.prototype._complete=function(){this.scheduleNotification(cy.Notification.createComplete())},e}(SM.Subscriber),TM=function(){function r(e,t){this.time=e,this.notification=t}return r}()});var fy=u(ly=>{"use strict";var CM=W(),IM=dc();function AM(r,e){return e===void 0&&(e=CM.async),IM.delay(r,e)(this)}ly.delay=AM});var hy=u(()=>{"use strict";var EM=v(),jM=fy();EM.Observable.prototype.delay=jM.delay});var bc=u(Ms=>{"use strict";var vc=Ms&&Ms.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},kM=C(),RM=v(),PM=P(),NM=N();function FM(r,e){return e?function(t){return new UM(t,e).lift(new py(r))}:function(t){return t.lift(new py(r))}}Ms.delayWhen=FM;var py=function(){function r(e){this.delayDurationSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new MM(e,this.delayDurationSelector))},r}(),MM=function(r){vc(e,r);function e(t,i){r.call(this,t),this.delayDurationSelector=i,this.completed=!1,this.delayNotifierSubscriptions=[],this.values=[]}return e.prototype.notifyNext=function(t,i,n,s,o){this.destination.next(t),this.removeSubscription(o),this.tryComplete()},e.prototype.notifyError=function(t,i){this._error(t)},e.prototype.notifyComplete=function(t){var i=this.removeSubscription(t);i&&this.destination.next(i),this.tryComplete()},e.prototype._next=function(t){try{var i=this.delayDurationSelector(t);i&&this.tryDelay(i,t)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete()},e.prototype.removeSubscription=function(t){t.unsubscribe();var i=this.delayNotifierSubscriptions.indexOf(t),n=null;return i!==-1&&(n=this.values[i],this.delayNotifierSubscriptions.splice(i,1),this.values.splice(i,1)),n},e.prototype.tryDelay=function(t,i){var n=NM.subscribeToResult(this,t,i);n&&!n.closed&&(this.add(n),this.delayNotifierSubscriptions.push(n)),this.values.push(i)},e.prototype.tryComplete=function(){this.completed&&this.delayNotifierSubscriptions.length===0&&this.destination.complete()},e}(PM.OuterSubscriber),UM=function(r){vc(e,r);function e(t,i){r.call(this),this.source=t,this.subscriptionDelay=i}return e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new ZM(t,this.source))},e}(RM.Observable),ZM=function(r){vc(e,r);function e(t,i){r.call(this),this.parent=t,this.source=i,this.sourceSubscribed=!1}return e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(kM.Subscriber)});var vy=u(dy=>{"use strict";var LM=bc();function DM(r,e){return LM.delayWhen(r,e)(this)}dy.delayWhen=DM});var by=u(()=>{"use strict";var VM=v(),zM=vy();VM.Observable.prototype.delayWhen=zM.delayWhen});var yy=u(mc=>{"use strict";var WM=se();function my(){return function(){function r(){this._values=[]}return r.prototype.add=function(e){this.has(e)||this._values.push(e)},r.prototype.has=function(e){return this._values.indexOf(e)!==-1},Object.defineProperty(r.prototype,"size",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),r.prototype.clear=function(){this._values.length=0},r}()}mc.minimalSetImpl=my;mc.Set=WM.root.Set||my()});var yc=u(di=>{"use strict";var BM=di&&di.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},$M=P(),HM=N(),JM=yy();function YM(r,e){return function(t){return t.lift(new KM(r,e))}}di.distinct=YM;var KM=function(){function r(e,t){this.keySelector=e,this.flushes=t}return r.prototype.call=function(e,t){return t.subscribe(new _y(e,this.keySelector,this.flushes))},r}(),_y=function(r){BM(e,r);function e(t,i,n){r.call(this,t),this.keySelector=i,this.values=new JM.Set,n&&this.add(HM.subscribeToResult(this,n))}return e.prototype.notifyNext=function(t,i,n,s,o){this.values.clear()},e.prototype.notifyError=function(t,i){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var i,n=this.destination;try{i=this.keySelector(t)}catch(s){n.error(s);return}this._finalizeNext(i,t)},e.prototype._finalizeNext=function(t,i){var n=this.values;n.has(t)||(n.add(t),this.destination.next(i))},e}($M.OuterSubscriber);di.DistinctSubscriber=_y});var wy=u(gy=>{"use strict";var GM=yc();function XM(r,e){return GM.distinct(r,e)(this)}gy.distinct=XM});var Sy=u(()=>{"use strict";var QM=v(),eU=wy();QM.Observable.prototype.distinct=eU.distinct});var Ls=u(Zs=>{"use strict";var tU=Zs&&Zs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},rU=C(),Oy=Q(),Us=Y();function iU(r,e){return function(t){return t.lift(new nU(r,e))}}Zs.distinctUntilChanged=iU;var nU=function(){function r(e,t){this.compare=e,this.keySelector=t}return r.prototype.call=function(e,t){return t.subscribe(new sU(e,this.compare,this.keySelector))},r}(),sU=function(r){tU(e,r);function e(t,i,n){r.call(this,t),this.keySelector=n,this.hasKey=!1,typeof i=="function"&&(this.compare=i)}return e.prototype.compare=function(t,i){return t===i},e.prototype._next=function(t){var i=this.keySelector,n=t;if(i&&(n=Oy.tryCatch(this.keySelector)(t),n===Us.errorObject))return this.destination.error(Us.errorObject.e);var s=!1;if(this.hasKey){if(s=Oy.tryCatch(this.compare)(this.key,n),s===Us.errorObject)return this.destination.error(Us.errorObject.e)}else this.hasKey=!0;s||(this.key=n,this.destination.next(t))},e}(rU.Subscriber)});var qy=u(xy=>{"use strict";var oU=Ls();function aU(r,e){return oU.distinctUntilChanged(r,e)(this)}xy.distinctUntilChanged=aU});var Ty=u(()=>{"use strict";var uU=v(),cU=qy();uU.Observable.prototype.distinctUntilChanged=cU.distinctUntilChanged});var _c=u(Cy=>{"use strict";var lU=Ls();function fU(r,e){return lU.distinctUntilChanged(function(t,i){return e?e(t[r],i[r]):t[r]===i[r]})}Cy.distinctUntilKeyChanged=fU});var Ay=u(Iy=>{"use strict";var hU=_c();function pU(r,e){return hU.distinctUntilKeyChanged(r,e)(this)}Iy.distinctUntilKeyChanged=pU});var Ey=u(()=>{"use strict";var dU=v(),vU=Ay();dU.Observable.prototype.distinctUntilKeyChanged=vU.distinctUntilKeyChanged});var gc=u(Ds=>{"use strict";var bU=Ds&&Ds.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},jy=C();function mU(r,e,t){return function(n){return n.lift(new yU(r,e,t))}}Ds.tap=mU;var yU=function(){function r(e,t,i){this.nextOrObserver=e,this.error=t,this.complete=i}return r.prototype.call=function(e,t){return t.subscribe(new _U(e,this.nextOrObserver,this.error,this.complete))},r}(),_U=function(r){bU(e,r);function e(t,i,n,s){r.call(this,t);var o=new jy.Subscriber(i,n,s);o.syncErrorThrowable=!0,this.add(o),this.safeSubscriber=o}return e.prototype._next=function(t){var i=this.safeSubscriber;i.next(t),i.syncErrorThrown?this.destination.error(i.syncErrorValue):this.destination.next(t)},e.prototype._error=function(t){var i=this.safeSubscriber;i.error(t),i.syncErrorThrown?this.destination.error(i.syncErrorValue):this.destination.error(t)},e.prototype._complete=function(){var t=this.safeSubscriber;t.complete(),t.syncErrorThrown?this.destination.error(t.syncErrorValue):this.destination.complete()},e}(jy.Subscriber)});var Ry=u(ky=>{"use strict";var gU=gc();function wU(r,e,t){return gU.tap(r,e,t)(this)}ky._do=wU});var Fy=u(()=>{"use strict";var Py=v(),Ny=Ry();Py.Observable.prototype.do=Ny._do;Py.Observable.prototype._do=Ny._do});var wc=u(Vs=>{"use strict";var SU=Vs&&Vs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},OU=P(),xU=N();function qU(){return function(r){return r.lift(new TU)}}Vs.exhaust=qU;var TU=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new CU(e))},r}(),CU=function(r){SU(e,r);function e(t){r.call(this,t),this.hasCompleted=!1,this.hasSubscription=!1}return e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(xU.subscribeToResult(this,t)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(OU.OuterSubscriber)});var Uy=u(My=>{"use strict";var IU=wc();function AU(){return IU.exhaust()(this)}My.exhaust=AU});var Zy=u(()=>{"use strict";var EU=v(),jU=Uy();EU.Observable.prototype.exhaust=jU.exhaust});var Sc=u(zs=>{"use strict";var kU=zs&&zs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},RU=P(),PU=N();function NU(r,e){return function(t){return t.lift(new FU(r,e))}}zs.exhaustMap=NU;var FU=function(){function r(e,t){this.project=e,this.resultSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new MU(e,this.project,this.resultSelector))},r}(),MU=function(r){kU(e,r);function e(t,i,n){r.call(this,t),this.project=i,this.resultSelector=n,this.hasSubscription=!1,this.hasCompleted=!1,this.index=0}return e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var i=this.index++,n=this.destination;try{var s=this.project(t,i);this.hasSubscription=!0,this.add(PU.subscribeToResult(this,s,t,i))}catch(o){n.error(o)}},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){var a=this,c=a.resultSelector,l=a.destination;c?this.trySelectResult(t,i,n,s):l.next(i)},e.prototype.trySelectResult=function(t,i,n,s){var o=this,a=o.resultSelector,c=o.destination;try{var l=a(t,i,n,s);c.next(l)}catch(f){c.error(f)}},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(RU.OuterSubscriber)});var Dy=u(Ly=>{"use strict";var UU=Sc();function ZU(r,e){return UU.exhaustMap(r,e)(this)}Ly.exhaustMap=ZU});var Vy=u(()=>{"use strict";var LU=v(),DU=Dy();LU.Observable.prototype.exhaustMap=DU.exhaustMap});var Oc=u(dr=>{"use strict";var VU=dr&&dr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},zU=Q(),zy=Y(),WU=P(),BU=N();function $U(r,e,t){return e===void 0&&(e=Number.POSITIVE_INFINITY),t===void 0&&(t=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(i){return i.lift(new Wy(r,e,t))}}dr.expand=$U;var Wy=function(){function r(e,t,i){this.project=e,this.concurrent=t,this.scheduler=i}return r.prototype.call=function(e,t){return t.subscribe(new By(e,this.project,this.concurrent,this.scheduler))},r}();dr.ExpandOperator=Wy;var By=function(r){VU(e,r);function e(t,i,n,s){r.call(this,t),this.project=i,this.concurrent=n,this.scheduler=s,this.index=0,this.active=0,this.hasCompleted=!1,n<Number.POSITIVE_INFINITY&&(this.buffer=[])}return e.dispatch=function(t){var i=t.subscriber,n=t.result,s=t.value,o=t.index;i.subscribeToProjection(n,s,o)},e.prototype._next=function(t){var i=this.destination;if(i.closed){this._complete();return}var n=this.index++;if(this.active<this.concurrent){i.next(t);var s=zU.tryCatch(this.project)(t,n);if(s===zy.errorObject)i.error(zy.errorObject.e);else if(!this.scheduler)this.subscribeToProjection(s,t,n);else{var o={subscriber:this,result:s,value:t,index:n};this.add(this.scheduler.schedule(e.dispatch,0,o))}}else this.buffer.push(t)},e.prototype.subscribeToProjection=function(t,i,n){this.active++,this.add(BU.subscribeToResult(this,t,i,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&this.active===0&&this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){this._next(i)},e.prototype.notifyComplete=function(t){var i=this.buffer;this.remove(t),this.active--,i&&i.length>0&&this._next(i.shift()),this.hasCompleted&&this.active===0&&this.destination.complete()},e}(WU.OuterSubscriber);dr.ExpandSubscriber=By});var Hy=u($y=>{"use strict";var HU=Oc();function JU(r,e,t){return e===void 0&&(e=Number.POSITIVE_INFINITY),t===void 0&&(t=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,HU.expand(r,e,t)(this)}$y.expand=JU});var Jy=u(()=>{"use strict";var YU=v(),KU=Hy();YU.Observable.prototype.expand=KU.expand});var vr=u(Ws=>{"use strict";var GU=Ws&&Ws.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},XU=function(r){GU(e,r);function e(){var t=r.call(this,"argument out of range");this.name=t.name="ArgumentOutOfRangeError",this.stack=t.stack,this.message=t.message}return e}(Error);Ws.ArgumentOutOfRangeError=XU});var xc=u(Bs=>{"use strict";var QU=Bs&&Bs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},eZ=C(),Yy=vr();function tZ(r,e){return function(t){return t.lift(new rZ(r,e))}}Bs.elementAt=tZ;var rZ=function(){function r(e,t){if(this.index=e,this.defaultValue=t,e<0)throw new Yy.ArgumentOutOfRangeError}return r.prototype.call=function(e,t){return t.subscribe(new iZ(e,this.index,this.defaultValue))},r}(),iZ=function(r){QU(e,r);function e(t,i,n){r.call(this,t),this.index=i,this.defaultValue=n}return e.prototype._next=function(t){this.index--===0&&(this.destination.next(t),this.destination.complete())},e.prototype._complete=function(){var t=this.destination;this.index>=0&&(typeof this.defaultValue!="undefined"?t.next(this.defaultValue):t.error(new Yy.ArgumentOutOfRangeError)),t.complete()},e}(eZ.Subscriber)});var Gy=u(Ky=>{"use strict";var nZ=xc();function sZ(r,e){return nZ.elementAt(r,e)(this)}Ky.elementAt=sZ});var Xy=u(()=>{"use strict";var oZ=v(),aZ=Gy();oZ.Observable.prototype.elementAt=aZ.elementAt});var Hs=u($s=>{"use strict";var uZ=$s&&$s.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},cZ=C();function lZ(r,e){return function(i){return i.lift(new fZ(r,e))}}$s.filter=lZ;var fZ=function(){function r(e,t){this.predicate=e,this.thisArg=t}return r.prototype.call=function(e,t){return t.subscribe(new hZ(e,this.predicate,this.thisArg))},r}(),hZ=function(r){uZ(e,r);function e(t,i,n){r.call(this,t),this.predicate=i,this.thisArg=n,this.count=0}return e.prototype._next=function(t){var i;try{i=this.predicate.call(this.thisArg,t,this.count++)}catch(n){this.destination.error(n);return}i&&this.destination.next(t)},e}(cZ.Subscriber)});var e_=u(Qy=>{"use strict";var pZ=Hs();function dZ(r,e){return pZ.filter(r,e)(this)}Qy.filter=dZ});var t_=u(()=>{"use strict";var vZ=v(),bZ=e_();vZ.Observable.prototype.filter=bZ.filter});var qc=u(Js=>{"use strict";var mZ=Js&&Js.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},yZ=C(),_Z=J();function gZ(r){return function(e){return e.lift(new wZ(r))}}Js.finalize=gZ;var wZ=function(){function r(e){this.callback=e}return r.prototype.call=function(e,t){return t.subscribe(new SZ(e,this.callback))},r}(),SZ=function(r){mZ(e,r);function e(t,i){r.call(this,t),this.add(new _Z.Subscription(i))}return e}(yZ.Subscriber)});var i_=u(r_=>{"use strict";var OZ=qc();function xZ(r){return OZ.finalize(r)(this)}r_._finally=xZ});var o_=u(()=>{"use strict";var n_=v(),s_=i_();n_.Observable.prototype.finally=s_._finally;n_.Observable.prototype._finally=s_._finally});var Ys=u(br=>{"use strict";var qZ=br&&br.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},TZ=C();function CZ(r,e){if(typeof r!="function")throw new TypeError("predicate is not a function");return function(t){return t.lift(new a_(r,t,!1,e))}}br.find=CZ;var a_=function(){function r(e,t,i,n){this.predicate=e,this.source=t,this.yieldIndex=i,this.thisArg=n}return r.prototype.call=function(e,t){return t.subscribe(new u_(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},r}();br.FindValueOperator=a_;var u_=function(r){qZ(e,r);function e(t,i,n,s,o){r.call(this,t),this.predicate=i,this.source=n,this.yieldIndex=s,this.thisArg=o,this.index=0}return e.prototype.notifyComplete=function(t){var i=this.destination;i.next(t),i.complete()},e.prototype._next=function(t){var i=this,n=i.predicate,s=i.thisArg,o=this.index++;try{var a=n.call(s||this,t,o,this.source);a&&this.notifyComplete(this.yieldIndex?o:t)}catch(c){this.destination.error(c)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(TZ.Subscriber);br.FindValueSubscriber=u_});var l_=u(c_=>{"use strict";var IZ=Ys();function AZ(r,e){return IZ.find(r,e)(this)}c_.find=AZ});var f_=u(()=>{"use strict";var EZ=v(),jZ=l_();EZ.Observable.prototype.find=jZ.find});var Tc=u(h_=>{"use strict";var kZ=Ys();function RZ(r,e){return function(t){return t.lift(new kZ.FindValueOperator(r,t,!0,e))}}h_.findIndex=RZ});var d_=u(p_=>{"use strict";var PZ=Tc();function NZ(r,e){return PZ.findIndex(r,e)(this)}p_.findIndex=NZ});var v_=u(()=>{"use strict";var FZ=v(),MZ=d_();FZ.Observable.prototype.findIndex=MZ.findIndex});var vi=u(Ks=>{"use strict";var UZ=Ks&&Ks.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},ZZ=function(r){UZ(e,r);function e(){var t=r.call(this,"no elements in sequence");this.name=t.name="EmptyError",this.stack=t.stack,this.message=t.message}return e}(Error);Ks.EmptyError=ZZ});var Cc=u(Gs=>{"use strict";var LZ=Gs&&Gs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},DZ=C(),VZ=vi();function zZ(r,e,t){return function(i){return i.lift(new WZ(r,e,t,i))}}Gs.first=zZ;var WZ=function(){function r(e,t,i,n){this.predicate=e,this.resultSelector=t,this.defaultValue=i,this.source=n}return r.prototype.call=function(e,t){return t.subscribe(new BZ(e,this.predicate,this.resultSelector,this.defaultValue,this.source))},r}(),BZ=function(r){LZ(e,r);function e(t,i,n,s,o){r.call(this,t),this.predicate=i,this.resultSelector=n,this.defaultValue=s,this.source=o,this.index=0,this.hasCompleted=!1,this._emitted=!1}return e.prototype._next=function(t){var i=this.index++;this.predicate?this._tryPredicate(t,i):this._emit(t,i)},e.prototype._tryPredicate=function(t,i){var n;try{n=this.predicate(t,i,this.source)}catch(s){this.destination.error(s);return}n&&this._emit(t,i)},e.prototype._emit=function(t,i){if(this.resultSelector){this._tryResultSelector(t,i);return}this._emitFinal(t)},e.prototype._tryResultSelector=function(t,i){var n;try{n=this.resultSelector(t,i)}catch(s){this.destination.error(s);return}this._emitFinal(n)},e.prototype._emitFinal=function(t){var i=this.destination;this._emitted||(this._emitted=!0,i.next(t),i.complete(),this.hasCompleted=!0)},e.prototype._complete=function(){var t=this.destination;!this.hasCompleted&&typeof this.defaultValue!="undefined"?(t.next(this.defaultValue),t.complete()):this.hasCompleted||t.error(new VZ.EmptyError)},e}(DZ.Subscriber)});var m_=u(b_=>{"use strict";var $Z=Cc();function HZ(r,e,t){return $Z.first(r,e,t)(this)}b_.first=HZ});var y_=u(()=>{"use strict";var JZ=v(),YZ=m_();JZ.Observable.prototype.first=YZ.first});var g_=u(__=>{"use strict";var KZ=function(){function r(){this.size=0,this._values=[],this._keys=[]}return r.prototype.get=function(e){var t=this._keys.indexOf(e);return t===-1?void 0:this._values[t]},r.prototype.set=function(e,t){var i=this._keys.indexOf(e);return i===-1?(this._keys.push(e),this._values.push(t),this.size++):this._values[i]=t,this},r.prototype.delete=function(e){var t=this._keys.indexOf(e);return t===-1?!1:(this._values.splice(t,1),this._keys.splice(t,1),this.size--,!0)},r.prototype.clear=function(){this._keys.length=0,this._values.length=0,this.size=0},r.prototype.forEach=function(e,t){for(var i=0;i<this.size;i++)e.call(t,this._values[i],this._keys[i])},r}();__.MapPolyfill=KZ});var S_=u(w_=>{"use strict";var GZ=se(),XZ=g_();w_.Map=GZ.root.Map||function(){return XZ.MapPolyfill}()});var x_=u(O_=>{"use strict";var QZ=function(){function r(){this.values={}}return r.prototype.delete=function(e){return this.values[e]=null,!0},r.prototype.set=function(e,t){return this.values[e]=t,this},r.prototype.get=function(e){return this.values[e]},r.prototype.forEach=function(e,t){var i=this.values;for(var n in i)i.hasOwnProperty(n)&&i[n]!==null&&e.call(t,i[n],n)},r.prototype.clear=function(){this.values={}},r}();O_.FastMap=QZ});var Ac=u(bi=>{"use strict";var Xs=bi&&bi.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},q_=C(),T_=J(),eL=v(),tL=K(),rL=S_(),iL=x_();function nL(r,e,t,i){return function(n){return n.lift(new sL(r,e,t,i))}}bi.groupBy=nL;var sL=function(){function r(e,t,i,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=i,this.subjectSelector=n}return r.prototype.call=function(e,t){return t.subscribe(new oL(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},r}(),oL=function(r){Xs(e,r);function e(t,i,n,s,o){r.call(this,t),this.keySelector=i,this.elementSelector=n,this.durationSelector=s,this.subjectSelector=o,this.groups=null,this.attemptedToUnsubscribe=!1,this.count=0}return e.prototype._next=function(t){var i;try{i=this.keySelector(t)}catch(n){this.error(n);return}this._group(t,i)},e.prototype._group=function(t,i){var n=this.groups;n||(n=this.groups=typeof i=="string"?new iL.FastMap:new rL.Map);var s=n.get(i),o;if(this.elementSelector)try{o=this.elementSelector(t)}catch(l){this.error(l)}else o=t;if(!s){s=this.subjectSelector?this.subjectSelector():new tL.Subject,n.set(i,s);var a=new Ic(i,s,this);if(this.destination.next(a),this.durationSelector){var c=void 0;try{c=this.durationSelector(new Ic(i,s))}catch(l){this.error(l);return}this.add(c.subscribe(new aL(i,s,this)))}}s.closed||s.next(o)},e.prototype._error=function(t){var i=this.groups;i&&(i.forEach(function(n,s){n.error(t)}),i.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach(function(i,n){i.complete()}),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,this.count===0&&r.prototype.unsubscribe.call(this))},e}(q_.Subscriber),aL=function(r){Xs(e,r);function e(t,i,n){r.call(this,i),this.key=t,this.group=i,this.parent=n}return e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this,i=t.parent,n=t.key;this.key=this.parent=null,i&&i.removeGroup(n)},e}(q_.Subscriber),Ic=function(r){Xs(e,r);function e(t,i,n){r.call(this),this.key=t,this.groupSubject=i,this.refCountSubscription=n}return e.prototype._subscribe=function(t){var i=new T_.Subscription,n=this,s=n.refCountSubscription,o=n.groupSubject;return s&&!s.closed&&i.add(new uL(s)),i.add(o.subscribe(t)),i},e}(eL.Observable);bi.GroupedObservable=Ic;var uL=function(r){Xs(e,r);function e(t){r.call(this),this.parent=t,t.count++}return e.prototype.unsubscribe=function(){var t=this.parent;!t.closed&&!this.closed&&(r.prototype.unsubscribe.call(this),t.count-=1,t.count===0&&t.attemptedToUnsubscribe&&t.unsubscribe())},e}(T_.Subscription)});var I_=u(Ec=>{"use strict";var C_=Ac();Ec.GroupedObservable=C_.GroupedObservable;function cL(r,e,t,i){return C_.groupBy(r,e,t,i)(this)}Ec.groupBy=cL});var A_=u(()=>{"use strict";var lL=v(),fL=I_();lL.Observable.prototype.groupBy=fL.groupBy});var jc=u(Qs=>{"use strict";var hL=Qs&&Qs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},pL=C(),dL=In();function vL(){return function(e){return e.lift(new bL)}}Qs.ignoreElements=vL;var bL=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new mL(e))},r}(),mL=function(r){hL(e,r);function e(){r.apply(this,arguments)}return e.prototype._next=function(t){dL.noop()},e}(pL.Subscriber)});var j_=u(E_=>{"use strict";var yL=jc();function _L(){return yL.ignoreElements()(this)}E_.ignoreElements=_L});var k_=u(()=>{"use strict";var gL=v(),wL=j_();gL.Observable.prototype.ignoreElements=wL.ignoreElements});var kc=u(eo=>{"use strict";var SL=eo&&eo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},OL=C();function xL(){return function(r){return r.lift(new qL)}}eo.isEmpty=xL;var qL=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new TL(e))},r}(),TL=function(r){SL(e,r);function e(t){r.call(this,t)}return e.prototype.notifyComplete=function(t){var i=this.destination;i.next(t),i.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(OL.Subscriber)});var P_=u(R_=>{"use strict";var CL=kc();function IL(){return CL.isEmpty()(this)}R_.isEmpty=IL});var N_=u(()=>{"use strict";var AL=v(),EL=P_();AL.Observable.prototype.isEmpty=EL.isEmpty});var ro=u(to=>{"use strict";var jL=to&&to.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},kL=Q(),F_=Y(),RL=P(),PL=N();function NL(r){return function(t){return t.lift(new FL(r))}}to.audit=NL;var FL=function(){function r(e){this.durationSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new ML(e,this.durationSelector))},r}(),ML=function(r){jL(e,r);function e(t,i){r.call(this,t),this.durationSelector=i,this.hasValue=!1}return e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var i=kL.tryCatch(this.durationSelector)(t);if(i===F_.errorObject)this.destination.error(F_.errorObject.e);else{var n=PL.subscribeToResult(this,i);n.closed?this.clearThrottle():this.add(this.throttled=n)}}},e.prototype.clearThrottle=function(){var t=this,i=t.value,n=t.hasValue,s=t.throttled;s&&(this.remove(s),this.throttled=null,s.unsubscribe()),n&&(this.value=null,this.hasValue=!1,this.destination.next(i))},e.prototype.notifyNext=function(t,i,n,s){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(RL.OuterSubscriber)});var U_=u(M_=>{"use strict";var UL=ro();function ZL(r){return UL.audit(r)(this)}M_.audit=ZL});var Z_=u(()=>{"use strict";var LL=v(),DL=U_();LL.Observable.prototype.audit=DL.audit});var Rc=u(L_=>{"use strict";var VL=W(),zL=ro(),WL=Yu();function BL(r,e){return e===void 0&&(e=VL.async),zL.audit(function(){return WL.timer(r,e)})}L_.auditTime=BL});var V_=u(D_=>{"use strict";var $L=W(),HL=Rc();function JL(r,e){return e===void 0&&(e=$L.async),HL.auditTime(r,e)(this)}D_.auditTime=JL});var z_=u(()=>{"use strict";var YL=v(),KL=V_();YL.Observable.prototype.auditTime=KL.auditTime});var Pc=u(io=>{"use strict";var GL=io&&io.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},XL=C(),QL=vi();function eD(r,e,t){return function(i){return i.lift(new tD(r,e,t,i))}}io.last=eD;var tD=function(){function r(e,t,i,n){this.predicate=e,this.resultSelector=t,this.defaultValue=i,this.source=n}return r.prototype.call=function(e,t){return t.subscribe(new rD(e,this.predicate,this.resultSelector,this.defaultValue,this.source))},r}(),rD=function(r){GL(e,r);function e(t,i,n,s,o){r.call(this,t),this.predicate=i,this.resultSelector=n,this.defaultValue=s,this.source=o,this.hasValue=!1,this.index=0,typeof s!="undefined"&&(this.lastValue=s,this.hasValue=!0)}return e.prototype._next=function(t){var i=this.index++;if(this.predicate)this._tryPredicate(t,i);else{if(this.resultSelector){this._tryResultSelector(t,i);return}this.lastValue=t,this.hasValue=!0}},e.prototype._tryPredicate=function(t,i){var n;try{n=this.predicate(t,i,this.source)}catch(s){this.destination.error(s);return}if(n){if(this.resultSelector){this._tryResultSelector(t,i);return}this.lastValue=t,this.hasValue=!0}},e.prototype._tryResultSelector=function(t,i){var n;try{n=this.resultSelector(t,i)}catch(s){this.destination.error(s);return}this.lastValue=n,this.hasValue=!0},e.prototype._complete=function(){var t=this.destination;this.hasValue?(t.next(this.lastValue),t.complete()):t.error(new QL.EmptyError)},e}(XL.Subscriber)});var B_=u(W_=>{"use strict";var iD=Pc();function nD(r,e,t){return iD.last(r,e,t)(this)}W_.last=nD});var $_=u(()=>{"use strict";var sD=v(),oD=B_();sD.Observable.prototype.last=oD.last});var J_=u(H_=>{"use strict";function aD(r){return r(this)}H_.letProto=aD});var G_=u(()=>{"use strict";var Y_=v(),K_=J_();Y_.Observable.prototype.let=K_.letProto;Y_.Observable.prototype.letBind=K_.letProto});var Nc=u(no=>{"use strict";var uD=no&&no.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},cD=C();function lD(r,e){return function(t){return t.lift(new fD(r,e,t))}}no.every=lD;var fD=function(){function r(e,t,i){this.predicate=e,this.thisArg=t,this.source=i}return r.prototype.call=function(e,t){return t.subscribe(new hD(e,this.predicate,this.thisArg,this.source))},r}(),hD=function(r){uD(e,r);function e(t,i,n,s){r.call(this,t),this.predicate=i,this.thisArg=n,this.source=s,this.index=0,this.thisArg=n||this}return e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var i=!1;try{i=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(n){this.destination.error(n);return}i||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(cD.Subscriber)});var Q_=u(X_=>{"use strict";var pD=Nc();function dD(r,e){return pD.every(r,e)(this)}X_.every=dD});var eg=u(()=>{"use strict";var vD=v(),bD=Q_();vD.Observable.prototype.every=bD.every});var rg=u(tg=>{"use strict";var mD=hr();function yD(r,e){return mD.map(r,e)(this)}tg.map=yD});var ig=u(()=>{"use strict";var _D=v(),gD=rg();_D.Observable.prototype.map=gD.map});var Fc=u(so=>{"use strict";var wD=so&&so.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},SD=C();function OD(r){return function(e){return e.lift(new xD(r))}}so.mapTo=OD;var xD=function(){function r(e){this.value=e}return r.prototype.call=function(e,t){return t.subscribe(new qD(e,this.value))},r}(),qD=function(r){wD(e,r);function e(t,i){r.call(this,t),this.value=i}return e.prototype._next=function(t){this.destination.next(this.value)},e}(SD.Subscriber)});var sg=u(ng=>{"use strict";var TD=Fc();function CD(r){return TD.mapTo(r)(this)}ng.mapTo=CD});var og=u(()=>{"use strict";var ID=v(),AD=sg();ID.Observable.prototype.mapTo=AD.mapTo});var Uc=u(oo=>{"use strict";var ED=oo&&oo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},jD=C(),Mc=nr();function kD(){return function(e){return e.lift(new RD)}}oo.materialize=kD;var RD=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new PD(e))},r}(),PD=function(r){ED(e,r);function e(t){r.call(this,t)}return e.prototype._next=function(t){this.destination.next(Mc.Notification.createNext(t))},e.prototype._error=function(t){var i=this.destination;i.next(Mc.Notification.createError(t)),i.complete()},e.prototype._complete=function(){var t=this.destination;t.next(Mc.Notification.createComplete()),t.complete()},e}(jD.Subscriber)});var ug=u(ag=>{"use strict";var ND=Uc();function FD(){return ND.materialize()(this)}ag.materialize=FD});var cg=u(()=>{"use strict";var MD=v(),UD=ug();MD.Observable.prototype.materialize=UD.materialize});var uo=u(ao=>{"use strict";var ZD=ao&&ao.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},LD=C();function DD(r,e){var t=!1;return arguments.length>=2&&(t=!0),function(n){return n.lift(new VD(r,e,t))}}ao.scan=DD;var VD=function(){function r(e,t,i){i===void 0&&(i=!1),this.accumulator=e,this.seed=t,this.hasSeed=i}return r.prototype.call=function(e,t){return t.subscribe(new zD(e,this.accumulator,this.seed,this.hasSeed))},r}(),zD=function(r){ZD(e,r);function e(t,i,n,s){r.call(this,t),this.accumulator=i,this._seed=n,this.hasSeed=s,this.index=0}return Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(!this.hasSeed)this.seed=t,this.destination.next(t);else return this._tryNext(t)},e.prototype._tryNext=function(t){var i=this.index++,n;try{n=this.accumulator(this.seed,t,i)}catch(s){this.destination.error(s)}this.seed=n,this.destination.next(n)},e}(LD.Subscriber)});var lo=u(co=>{"use strict";var WD=co&&co.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},BD=C(),$D=vr(),HD=Fe();function JD(r){return function(t){return r===0?new HD.EmptyObservable:t.lift(new YD(r))}}co.takeLast=JD;var YD=function(){function r(e){if(this.total=e,this.total<0)throw new $D.ArgumentOutOfRangeError}return r.prototype.call=function(e,t){return t.subscribe(new KD(e,this.total))},r}(),KD=function(r){WD(e,r);function e(t,i){r.call(this,t),this.total=i,this.ring=new Array,this.count=0}return e.prototype._next=function(t){var i=this.ring,n=this.total,s=this.count++;if(i.length<n)i.push(t);else{var o=s%n;i[o]=t}},e.prototype._complete=function(){var t=this.destination,i=this.count;if(i>0)for(var n=this.count>=this.total?this.total:this.count,s=this.ring,o=0;o<n;o++){var a=i++%n;t.next(s[a])}t.complete()},e}(BD.Subscriber)});var mr=u(pg=>{"use strict";var lg=uo(),fg=lo(),GD=Ns(),hg=An();function XD(r,e){return arguments.length>=2?function(i){return hg.pipe(lg.scan(r,e),fg.takeLast(1),GD.defaultIfEmpty(e))(i)}:function(i){return hg.pipe(lg.scan(function(n,s,o){return r(n,s,o+1)}),fg.takeLast(1))(i)}}pg.reduce=XD});var Zc=u(dg=>{"use strict";var QD=mr();function eV(r){var e=typeof r=="function"?function(t,i){return r(t,i)>0?t:i}:function(t,i){return t>i?t:i};return QD.reduce(e)}dg.max=eV});var bg=u(vg=>{"use strict";var tV=Zc();function rV(r){return tV.max(r)(this)}vg.max=rV});var mg=u(()=>{"use strict";var iV=v(),nV=bg();iV.Observable.prototype.max=nV.max});var Dc=u(Lc=>{"use strict";var sV=ai(),oV=ai();Lc.mergeStatic=oV.merge;function aV(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(t){return t.lift.call(sV.merge.apply(void 0,[t].concat(r)))}}Lc.merge=aV});var yg=u(Vc=>{"use strict";var uV=Dc(),cV=ai();Vc.mergeStatic=cV.merge;function lV(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return uV.merge.apply(void 0,r)(this)}Vc.merge=lV});var _g=u(()=>{"use strict";var fV=v(),hV=yg();fV.Observable.prototype.merge=hV.merge});var wg=u(gg=>{"use strict";var pV=oi();function dV(r){return r===void 0&&(r=Number.POSITIVE_INFINITY),pV.mergeAll(r)(this)}gg.mergeAll=dV});var Sg=u(()=>{"use strict";var vV=v(),bV=wg();vV.Observable.prototype.mergeAll=bV.mergeAll});var xg=u(Og=>{"use strict";var mV=or();function yV(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),mV.mergeMap(r,e,t)(this)}Og.mergeMap=yV});var Cg=u(()=>{"use strict";var qg=v(),Tg=xg();qg.Observable.prototype.mergeMap=Tg.mergeMap;qg.Observable.prototype.flatMap=Tg.mergeMap});var zc=u(yr=>{"use strict";var _V=yr&&yr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},gV=P(),wV=N();function SV(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),typeof e=="number"&&(t=e,e=null),function(i){return i.lift(new Ig(r,e,t))}}yr.mergeMapTo=SV;var Ig=function(){function r(e,t,i){i===void 0&&(i=Number.POSITIVE_INFINITY),this.ish=e,this.resultSelector=t,this.concurrent=i}return r.prototype.call=function(e,t){return t.subscribe(new Ag(e,this.ish,this.resultSelector,this.concurrent))},r}();yr.MergeMapToOperator=Ig;var Ag=function(r){_V(e,r);function e(t,i,n,s){s===void 0&&(s=Number.POSITIVE_INFINITY),r.call(this,t),this.ish=i,this.resultSelector=n,this.concurrent=s,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return e.prototype._next=function(t){if(this.active<this.concurrent){var i=this.resultSelector,n=this.index++,s=this.ish,o=this.destination;this.active++,this._innerSub(s,o,i,t,n)}else this.buffer.push(t)},e.prototype._innerSub=function(t,i,n,s,o){this.add(wV.subscribeToResult(this,t,s,o))},e.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){var a=this,c=a.resultSelector,l=a.destination;c?this.trySelectResult(t,i,n,s):l.next(i)},e.prototype.trySelectResult=function(t,i,n,s){var o=this,a=o.resultSelector,c=o.destination,l;try{l=a(t,i,n,s)}catch(f){c.error(f);return}c.next(l)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){var i=this.buffer;this.remove(t),this.active--,i.length>0?this._next(i.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()},e}(gV.OuterSubscriber);yr.MergeMapToSubscriber=Ag});var jg=u(Eg=>{"use strict";var OV=zc();function xV(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),OV.mergeMapTo(r,e,t)(this)}Eg.mergeMapTo=xV});var Pg=u(()=>{"use strict";var kg=v(),Rg=jg();kg.Observable.prototype.flatMapTo=Rg.mergeMapTo;kg.Observable.prototype.mergeMapTo=Rg.mergeMapTo});var Wc=u(_r=>{"use strict";var qV=_r&&_r.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},TV=Q(),Ng=Y(),CV=N(),IV=P();function AV(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),function(i){return i.lift(new Fg(r,e,t))}}_r.mergeScan=AV;var Fg=function(){function r(e,t,i){this.accumulator=e,this.seed=t,this.concurrent=i}return r.prototype.call=function(e,t){return t.subscribe(new Mg(e,this.accumulator,this.seed,this.concurrent))},r}();_r.MergeScanOperator=Fg;var Mg=function(r){qV(e,r);function e(t,i,n,s){r.call(this,t),this.accumulator=i,this.acc=n,this.concurrent=s,this.hasValue=!1,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return e.prototype._next=function(t){if(this.active<this.concurrent){var i=this.index++,n=TV.tryCatch(this.accumulator)(this.acc,t),s=this.destination;n===Ng.errorObject?s.error(Ng.errorObject.e):(this.active++,this._innerSub(n,t,i))}else this.buffer.push(t)},e.prototype._innerSub=function(t,i,n){this.add(CV.subscribeToResult(this,t,i,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&(this.hasValue===!1&&this.destination.next(this.acc),this.destination.complete())},e.prototype.notifyNext=function(t,i,n,s,o){var a=this.destination;this.acc=i,this.hasValue=!0,a.next(i)},e.prototype.notifyComplete=function(t){var i=this.buffer;this.remove(t),this.active--,i.length>0?this._next(i.shift()):this.active===0&&this.hasCompleted&&(this.hasValue===!1&&this.destination.next(this.acc),this.destination.complete())},e}(IV.OuterSubscriber);_r.MergeScanSubscriber=Mg});var Zg=u(Ug=>{"use strict";var EV=Wc();function jV(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),EV.mergeScan(r,e,t)(this)}Ug.mergeScan=jV});var Lg=u(()=>{"use strict";var kV=v(),RV=Zg();kV.Observable.prototype.mergeScan=RV.mergeScan});var Bc=u(Dg=>{"use strict";var PV=mr();function NV(r){var e=typeof r=="function"?function(t,i){return r(t,i)<0?t:i}:function(t,i){return t<i?t:i};return PV.reduce(e)}Dg.min=NV});var zg=u(Vg=>{"use strict";var FV=Bc();function MV(r){return FV.min(r)(this)}Vg.min=MV});var Wg=u(()=>{"use strict";var UV=v(),ZV=zg();UV.Observable.prototype.min=ZV.min});var ho=u(fo=>{"use strict";var LV=fo&&fo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},DV=C();function VV(){return function(e){return e.lift(new zV(e))}}fo.refCount=VV;var zV=function(){function r(e){this.connectable=e}return r.prototype.call=function(e,t){var i=this.connectable;i._refCount++;var n=new WV(e,i),s=t.subscribe(n);return n.closed||(n.connection=i.connect()),s},r}(),WV=function(r){LV(e,r);function e(t,i){r.call(this,t),this.connectable=i}return e.prototype._unsubscribe=function(){var t=this.connectable;if(!t){this.connection=null;return}this.connectable=null;var i=t._refCount;if(i<=0){this.connection=null;return}if(t._refCount=i-1,i>1){this.connection=null;return}var n=this.connection,s=t._connection;this.connection=null,s&&(!n||s===n)&&s.unsubscribe()},e}(DV.Subscriber)});var Hc=u(yi=>{"use strict";var $c=yi&&yi.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},BV=K(),$V=v(),HV=C(),Bg=J(),JV=ho(),$g=function(r){$c(e,r);function e(t,i){r.call(this),this.source=t,this.subjectFactory=i,this._refCount=0,this._isComplete=!1}return e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,t=this._connection=new Bg.Subscription,t.add(this.source.subscribe(new YV(this.getSubject(),this))),t.closed?(this._connection=null,t=Bg.Subscription.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return JV.refCount()(this)},e}($V.Observable);yi.ConnectableObservable=$g;var mi=$g.prototype;yi.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:mi._subscribe},_isComplete:{value:mi._isComplete,writable:!0},getSubject:{value:mi.getSubject},connect:{value:mi.connect},refCount:{value:mi.refCount}};var YV=function(r){$c(e,r);function e(t,i){r.call(this,t),this.connectable=i}return e.prototype._error=function(t){this._unsubscribe(),r.prototype._error.call(this,t)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var i=t._connection;t._refCount=0,t._subject=null,t._connection=null,i&&i.unsubscribe()}},e}(BV.SubjectSubscriber),ane=function(){function r(e){this.connectable=e}return r.prototype.call=function(e,t){var i=this.connectable;i._refCount++;var n=new KV(e,i),s=t.subscribe(n);return n.closed||(n.connection=i.connect()),s},r}(),KV=function(r){$c(e,r);function e(t,i){r.call(this,t),this.connectable=i}return e.prototype._unsubscribe=function(){var t=this.connectable;if(!t){this.connection=null;return}this.connectable=null;var i=t._refCount;if(i<=0){this.connection=null;return}if(t._refCount=i-1,i>1){this.connection=null;return}var n=this.connection,s=t._connection;this.connection=null,s&&(!n||s===n)&&s.unsubscribe()},e}(HV.Subscriber)});var Ke=u(Jc=>{"use strict";var GV=Hc();function XV(r,e){return function(i){var n;if(typeof r=="function"?n=r:n=function(){return r},typeof e=="function")return i.lift(new Hg(n,e));var s=Object.create(i,GV.connectableObservableDescriptor);return s.source=i,s.subjectFactory=n,s}}Jc.multicast=XV;var Hg=function(){function r(e,t){this.subjectFactory=e,this.selector=t}return r.prototype.call=function(e,t){var i=this.selector,n=this.subjectFactory(),s=i(n).subscribe(e);return s.add(t.subscribe(n)),s},r}();Jc.MulticastOperator=Hg});var Yg=u(Jg=>{"use strict";var QV=Ke();function ez(r,e){return QV.multicast(r,e)(this)}Jg.multicast=ez});var Kg=u(()=>{"use strict";var tz=v(),rz=Yg();tz.Observable.prototype.multicast=rz.multicast});var Xg=u(Gg=>{"use strict";var iz=si();function nz(r,e){return e===void 0&&(e=0),iz.observeOn(r,e)(this)}Gg.observeOn=nz});var Qg=u(()=>{"use strict";var sz=v(),oz=Xg();sz.Observable.prototype.observeOn=oz.observeOn});var tw=u(ew=>{"use strict";var az=as();function uz(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return az.onErrorResumeNext.apply(void 0,r)(this)}ew.onErrorResumeNext=uz});var rw=u(()=>{"use strict";var cz=v(),lz=tw();cz.Observable.prototype.onErrorResumeNext=lz.onErrorResumeNext});var Yc=u(po=>{"use strict";var fz=po&&po.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},hz=C();function pz(){return function(r){return r.lift(new dz)}}po.pairwise=pz;var dz=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new vz(e))},r}(),vz=function(r){fz(e,r);function e(t){r.call(this,t),this.hasPrev=!1}return e.prototype._next=function(t){this.hasPrev?this.destination.next([this.prev,t]):this.hasPrev=!0,this.prev=t},e}(hz.Subscriber)});var nw=u(iw=>{"use strict";var bz=Yc();function mz(){return bz.pairwise()(this)}iw.pairwise=mz});var sw=u(()=>{"use strict";var yz=v(),_z=nw();yz.Observable.prototype.pairwise=_z.pairwise});var aw=u(ow=>{"use strict";function gz(r,e){function t(){return!t.pred.apply(t.thisArg,arguments)}return t.pred=r,t.thisArg=e,t}ow.not=gz});var Kc=u(cw=>{"use strict";var wz=aw(),uw=Hs();function Sz(r,e){return function(t){return[uw.filter(r,e)(t),uw.filter(wz.not(r,e))(t)]}}cw.partition=Sz});var fw=u(lw=>{"use strict";var Oz=Kc();function xz(r,e){return Oz.partition(r,e)(this)}lw.partition=xz});var hw=u(()=>{"use strict";var qz=v(),Tz=fw();qz.Observable.prototype.partition=Tz.partition});var Gc=u(pw=>{"use strict";var Cz=hr();function Iz(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=r.length;if(t===0)throw new Error("list of properties cannot be empty.");return function(i){return Cz.map(Az(r,t))(i)}}pw.pluck=Iz;function Az(r,e){var t=function(i){for(var n=i,s=0;s<e;s++){var o=n[r[s]];if(typeof o!="undefined")n=o;else return}return n};return t}});var vw=u(dw=>{"use strict";var Ez=Gc();function jz(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return Ez.pluck.apply(void 0,r)(this)}dw.pluck=jz});var bw=u(()=>{"use strict";var kz=v(),Rz=vw();kz.Observable.prototype.pluck=Rz.pluck});var Xc=u(_w=>{"use strict";var mw=K(),yw=Ke();function Pz(r){return r?yw.multicast(function(){return new mw.Subject},r):yw.multicast(new mw.Subject)}_w.publish=Pz});var ww=u(gw=>{"use strict";var Nz=Xc();function Fz(r){return Nz.publish(r)(this)}gw.publish=Fz});var Sw=u(()=>{"use strict";var Mz=v(),Uz=ww();Mz.Observable.prototype.publish=Uz.publish});var Qc=u(vo=>{"use strict";var Zz=vo&&vo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Lz=K(),Dz=ei(),Vz=function(r){Zz(e,r);function e(t){r.call(this),this._value=t}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(t){var i=r.prototype._subscribe.call(this,t);return i&&!i.closed&&t.next(this._value),i},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Dz.ObjectUnsubscribedError;return this._value},e.prototype.next=function(t){r.prototype.next.call(this,this._value=t)},e}(Lz.Subject);vo.BehaviorSubject=Vz});var el=u(Ow=>{"use strict";var zz=Qc(),Wz=Ke();function Bz(r){return function(e){return Wz.multicast(new zz.BehaviorSubject(r))(e)}}Ow.publishBehavior=Bz});var qw=u(xw=>{"use strict";var $z=el();function Hz(r){return $z.publishBehavior(r)(this)}xw.publishBehavior=Hz});var Tw=u(()=>{"use strict";var Jz=v(),Yz=qw();Jz.Observable.prototype.publishBehavior=Yz.publishBehavior});var tl=u(Cw=>{"use strict";var Kz=pi(),Gz=Ke();function Xz(r,e,t,i){t&&typeof t!="function"&&(i=t);var n=typeof t=="function"?t:void 0,s=new Kz.ReplaySubject(r,e,i);return function(o){return Gz.multicast(function(){return s},n)(o)}}Cw.publishReplay=Xz});var Aw=u(Iw=>{"use strict";var Qz=tl();function e4(r,e,t,i){return Qz.publishReplay(r,e,t,i)(this)}Iw.publishReplay=e4});var Ew=u(()=>{"use strict";var t4=v(),r4=Aw();t4.Observable.prototype.publishReplay=r4.publishReplay});var rl=u(jw=>{"use strict";var i4=ri(),n4=Ke();function s4(){return function(r){return n4.multicast(new i4.AsyncSubject)(r)}}jw.publishLast=s4});var Rw=u(kw=>{"use strict";var o4=rl();function a4(){return o4.publishLast()(this)}kw.publishLast=a4});var Pw=u(()=>{"use strict";var u4=v(),c4=Rw();u4.Observable.prototype.publishLast=c4.publishLast});var il=u(Nw=>{"use strict";var l4=Oe(),f4=ss();function h4(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(i){return r.length===1&&l4.isArray(r[0])&&(r=r[0]),i.lift.call(f4.race.apply(void 0,[i].concat(r)))}}Nw.race=h4});var Fw=u(nl=>{"use strict";var p4=il(),d4=ss();nl.raceStatic=d4.race;function v4(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return p4.race.apply(void 0,r)(this)}nl.race=v4});var Mw=u(()=>{"use strict";var b4=v(),m4=Fw();b4.Observable.prototype.race=m4.race});var Lw=u(Zw=>{"use strict";var Uw=mr();function y4(r,e){return arguments.length>=2?Uw.reduce(r,e)(this):Uw.reduce(r)(this)}Zw.reduce=y4});var Dw=u(()=>{"use strict";var _4=v(),g4=Lw();_4.Observable.prototype.reduce=g4.reduce});var sl=u(bo=>{"use strict";var w4=bo&&bo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},S4=C(),O4=Fe();function x4(r){return r===void 0&&(r=-1),function(e){return r===0?new O4.EmptyObservable:r<0?e.lift(new Vw(-1,e)):e.lift(new Vw(r-1,e))}}bo.repeat=x4;var Vw=function(){function r(e,t){this.count=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new q4(e,this.count,this.source))},r}(),q4=function(r){w4(e,r);function e(t,i,n){r.call(this,t),this.count=i,this.source=n}return e.prototype.complete=function(){if(!this.isStopped){var t=this,i=t.source,n=t.count;if(n===0)return r.prototype.complete.call(this);n>-1&&(this.count=n-1),i.subscribe(this._unsubscribeAndRecycle())}},e}(S4.Subscriber)});var Ww=u(zw=>{"use strict";var T4=sl();function C4(r){return r===void 0&&(r=-1),T4.repeat(r)(this)}zw.repeat=C4});var Bw=u(()=>{"use strict";var I4=v(),A4=Ww();I4.Observable.prototype.repeat=A4.repeat});var ol=u(mo=>{"use strict";var E4=mo&&mo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},j4=K(),k4=Q(),R4=Y(),P4=P(),N4=N();function F4(r){return function(e){return e.lift(new M4(r))}}mo.repeatWhen=F4;var M4=function(){function r(e){this.notifier=e}return r.prototype.call=function(e,t){return t.subscribe(new U4(e,this.notifier,t))},r}(),U4=function(r){E4(e,r);function e(t,i,n){r.call(this,t),this.notifier=i,this.source=n,this.sourceIsBeingSubscribedTo=!0}return e.prototype.notifyNext=function(t,i,n,s,o){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(t){if(this.sourceIsBeingSubscribedTo===!1)return r.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return r.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this,i=t.notifications,n=t.retriesSubscription;i&&(i.unsubscribe(),this.notifications=null),n&&(n.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var t=this,i=t.notifications,n=t.retries,s=t.retriesSubscription;return this.notifications=null,this.retries=null,this.retriesSubscription=null,r.prototype._unsubscribeAndRecycle.call(this),this.notifications=i,this.retries=n,this.retriesSubscription=s,this},e.prototype.subscribeToRetries=function(){this.notifications=new j4.Subject;var t=k4.tryCatch(this.notifier)(this.notifications);if(t===R4.errorObject)return r.prototype.complete.call(this);this.retries=t,this.retriesSubscription=N4.subscribeToResult(this,t)},e}(P4.OuterSubscriber)});var Hw=u($w=>{"use strict";var Z4=ol();function L4(r){return Z4.repeatWhen(r)(this)}$w.repeatWhen=L4});var Jw=u(()=>{"use strict";var D4=v(),V4=Hw();D4.Observable.prototype.repeatWhen=V4.repeatWhen});var al=u(yo=>{"use strict";var z4=yo&&yo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},W4=C();function B4(r){return r===void 0&&(r=-1),function(e){return e.lift(new $4(r,e))}}yo.retry=B4;var $4=function(){function r(e,t){this.count=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new H4(e,this.count,this.source))},r}(),H4=function(r){z4(e,r);function e(t,i,n){r.call(this,t),this.count=i,this.source=n}return e.prototype.error=function(t){if(!this.isStopped){var i=this,n=i.source,s=i.count;if(s===0)return r.prototype.error.call(this,t);s>-1&&(this.count=s-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(W4.Subscriber)});var Kw=u(Yw=>{"use strict";var J4=al();function Y4(r){return r===void 0&&(r=-1),J4.retry(r)(this)}Yw.retry=Y4});var Gw=u(()=>{"use strict";var K4=v(),G4=Kw();K4.Observable.prototype.retry=G4.retry});var ul=u(_o=>{"use strict";var X4=_o&&_o.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Q4=K(),e3=Q(),Xw=Y(),t3=P(),r3=N();function i3(r){return function(e){return e.lift(new n3(r,e))}}_o.retryWhen=i3;var n3=function(){function r(e,t){this.notifier=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new s3(e,this.notifier,this.source))},r}(),s3=function(r){X4(e,r);function e(t,i,n){r.call(this,t),this.notifier=i,this.source=n}return e.prototype.error=function(t){if(!this.isStopped){var i=this.errors,n=this.retries,s=this.retriesSubscription;if(n)this.errors=null,this.retriesSubscription=null;else{if(i=new Q4.Subject,n=e3.tryCatch(this.notifier)(i),n===Xw.errorObject)return r.prototype.error.call(this,Xw.errorObject.e);s=r3.subscribeToResult(this,n)}this._unsubscribeAndRecycle(),this.errors=i,this.retries=n,this.retriesSubscription=s,i.next(t)}},e.prototype._unsubscribe=function(){var t=this,i=t.errors,n=t.retriesSubscription;i&&(i.unsubscribe(),this.errors=null),n&&(n.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,i,n,s,o){var a=this,c=a.errors,l=a.retries,f=a.retriesSubscription;this.errors=null,this.retries=null,this.retriesSubscription=null,this._unsubscribeAndRecycle(),this.errors=c,this.retries=l,this.retriesSubscription=f,this.source.subscribe(this)},e}(t3.OuterSubscriber)});var eS=u(Qw=>{"use strict";var o3=ul();function a3(r){return o3.retryWhen(r)(this)}Qw.retryWhen=a3});var tS=u(()=>{"use strict";var u3=v(),c3=eS();u3.Observable.prototype.retryWhen=c3.retryWhen});var cl=u(go=>{"use strict";var l3=go&&go.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},f3=P(),h3=N();function p3(r){return function(e){return e.lift(new d3(r))}}go.sample=p3;var d3=function(){function r(e){this.notifier=e}return r.prototype.call=function(e,t){var i=new v3(e),n=t.subscribe(i);return n.add(h3.subscribeToResult(i,this.notifier)),n},r}(),v3=function(r){l3(e,r);function e(){r.apply(this,arguments),this.hasValue=!1}return e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,i,n,s,o){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(f3.OuterSubscriber)});var iS=u(rS=>{"use strict";var b3=cl();function m3(r){return b3.sample(r)(this)}rS.sample=m3});var nS=u(()=>{"use strict";var y3=v(),_3=iS();y3.Observable.prototype.sample=_3.sample});var ll=u(wo=>{"use strict";var g3=wo&&wo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},w3=C(),S3=W();function O3(r,e){return e===void 0&&(e=S3.async),function(t){return t.lift(new x3(r,e))}}wo.sampleTime=O3;var x3=function(){function r(e,t){this.period=e,this.scheduler=t}return r.prototype.call=function(e,t){return t.subscribe(new q3(e,this.period,this.scheduler))},r}(),q3=function(r){g3(e,r);function e(t,i,n){r.call(this,t),this.period=i,this.scheduler=n,this.hasValue=!1,this.add(n.schedule(T3,i,{subscriber:this,period:i}))}return e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(w3.Subscriber);function T3(r){var e=r.subscriber,t=r.period;e.notifyNext(),this.schedule(r,t)}});var oS=u(sS=>{"use strict";var C3=W(),I3=ll();function A3(r,e){return e===void 0&&(e=C3.async),I3.sampleTime(r,e)(this)}sS.sampleTime=A3});var aS=u(()=>{"use strict";var E3=v(),j3=oS();E3.Observable.prototype.sampleTime=j3.sampleTime});var lS=u(cS=>{"use strict";var uS=uo();function k3(r,e){return arguments.length>=2?uS.scan(r,e)(this):uS.scan(r)(this)}cS.scan=k3});var fS=u(()=>{"use strict";var R3=v(),P3=lS();R3.Observable.prototype.scan=P3.scan});var fl=u(gr=>{"use strict";var pS=gr&&gr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},dS=C(),N3=Q(),hS=Y();function F3(r,e){return function(t){return t.lift(new vS(r,e))}}gr.sequenceEqual=F3;var vS=function(){function r(e,t){this.compareTo=e,this.comparor=t}return r.prototype.call=function(e,t){return t.subscribe(new bS(e,this.compareTo,this.comparor))},r}();gr.SequenceEqualOperator=vS;var bS=function(r){pS(e,r);function e(t,i,n){r.call(this,t),this.compareTo=i,this.comparor=n,this._a=[],this._b=[],this._oneComplete=!1,this.add(i.subscribe(new M3(t,this)))}return e.prototype._next=function(t){this._oneComplete&&this._b.length===0?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(this._a.length===0&&this._b.length===0):this._oneComplete=!0},e.prototype.checkValues=function(){for(var t=this,i=t._a,n=t._b,s=t.comparor;i.length>0&&n.length>0;){var o=i.shift(),a=n.shift(),c=!1;s?(c=N3.tryCatch(s)(o,a),c===hS.errorObject&&this.destination.error(hS.errorObject.e)):c=o===a,c||this.emit(!1)}},e.prototype.emit=function(t){var i=this.destination;i.next(t),i.complete()},e.prototype.nextB=function(t){this._oneComplete&&this._a.length===0?this.emit(!1):(this._b.push(t),this.checkValues())},e}(dS.Subscriber);gr.SequenceEqualSubscriber=bS;var M3=function(r){pS(e,r);function e(t,i){r.call(this,t),this.parent=i}return e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t)},e.prototype._complete=function(){this.parent._complete()},e}(dS.Subscriber)});var yS=u(mS=>{"use strict";var U3=fl();function Z3(r,e){return U3.sequenceEqual(r,e)(this)}mS.sequenceEqual=Z3});var _S=u(()=>{"use strict";var L3=v(),D3=yS();L3.Observable.prototype.sequenceEqual=D3.sequenceEqual});var hl=u(gS=>{"use strict";var V3=Ke(),z3=ho(),W3=K();function B3(){return new W3.Subject}function $3(){return function(r){return z3.refCount()(V3.multicast(B3)(r))}}gS.share=$3});var SS=u(wS=>{"use strict";var H3=hl();function J3(){return H3.share()(this)}wS.share=J3});var OS=u(()=>{"use strict";var Y3=v(),K3=SS();Y3.Observable.prototype.share=K3.share});var pl=u(xS=>{"use strict";var G3=pi();function X3(r,e,t){return function(i){return i.lift(Q3(r,e,t))}}xS.shareReplay=X3;function Q3(r,e,t){var i,n=0,s,o=!1,a=!1;return function(l){n++,(!i||o)&&(o=!1,i=new G3.ReplaySubject(r,e,t),s=l.subscribe({next:function(p){i.next(p)},error:function(p){o=!0,i.error(p)},complete:function(){a=!0,i.complete()}}));var f=i.subscribe(this);return function(){n--,f.unsubscribe(),s&&n===0&&a&&s.unsubscribe()}}}});var TS=u(qS=>{"use strict";var e2=pl();function t2(r,e,t){return e2.shareReplay(r,e,t)(this)}qS.shareReplay=t2});var CS=u(()=>{"use strict";var r2=v(),i2=TS();r2.Observable.prototype.shareReplay=i2.shareReplay});var dl=u(So=>{"use strict";var n2=So&&So.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},s2=C(),o2=vi();function a2(r){return function(e){return e.lift(new u2(r,e))}}So.single=a2;var u2=function(){function r(e,t){this.predicate=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new c2(e,this.predicate,this.source))},r}(),c2=function(r){n2(e,r);function e(t,i,n){r.call(this,t),this.predicate=i,this.source=n,this.seenValue=!1,this.index=0}return e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var i=this.index++;this.predicate?this.tryNext(t,i):this.applySingleValue(t)},e.prototype.tryNext=function(t,i){try{this.predicate(t,i,this.source)&&this.applySingleValue(t)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new o2.EmptyError)},e}(s2.Subscriber)});var AS=u(IS=>{"use strict";var l2=dl();function f2(r){return l2.single(r)(this)}IS.single=f2});var ES=u(()=>{"use strict";var h2=v(),p2=AS();h2.Observable.prototype.single=p2.single});var vl=u(Oo=>{"use strict";var d2=Oo&&Oo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},v2=C();function b2(r){return function(e){return e.lift(new m2(r))}}Oo.skip=b2;var m2=function(){function r(e){this.total=e}return r.prototype.call=function(e,t){return t.subscribe(new y2(e,this.total))},r}(),y2=function(r){d2(e,r);function e(t,i){r.call(this,t),this.total=i,this.count=0}return e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(v2.Subscriber)});var kS=u(jS=>{"use strict";var _2=vl();function g2(r){return _2.skip(r)(this)}jS.skip=g2});var RS=u(()=>{"use strict";var w2=v(),S2=kS();w2.Observable.prototype.skip=S2.skip});var bl=u(xo=>{"use strict";var O2=xo&&xo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},PS=C(),x2=vr();function q2(r){return function(e){return e.lift(new T2(r))}}xo.skipLast=q2;var T2=function(){function r(e){if(this._skipCount=e,this._skipCount<0)throw new x2.ArgumentOutOfRangeError}return r.prototype.call=function(e,t){return this._skipCount===0?t.subscribe(new PS.Subscriber(e)):t.subscribe(new C2(e,this._skipCount))},r}(),C2=function(r){O2(e,r);function e(t,i){r.call(this,t),this._skipCount=i,this._count=0,this._ring=new Array(i)}return e.prototype._next=function(t){var i=this._skipCount,n=this._count++;if(n<i)this._ring[n]=t;else{var s=n%i,o=this._ring,a=o[s];o[s]=t,this.destination.next(a)}},e}(PS.Subscriber)});var FS=u(NS=>{"use strict";var I2=bl();function A2(r){return I2.skipLast(r)(this)}NS.skipLast=A2});var MS=u(()=>{"use strict";var E2=v(),j2=FS();E2.Observable.prototype.skipLast=j2.skipLast});var ml=u(qo=>{"use strict";var k2=qo&&qo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},R2=P(),P2=N();function N2(r){return function(e){return e.lift(new F2(r))}}qo.skipUntil=N2;var F2=function(){function r(e){this.notifier=e}return r.prototype.call=function(e,t){return t.subscribe(new M2(e,this.notifier))},r}(),M2=function(r){k2(e,r);function e(t,i){r.call(this,t),this.hasValue=!1,this.isInnerStopped=!1,this.add(P2.subscribeToResult(this,i))}return e.prototype._next=function(t){this.hasValue&&r.prototype._next.call(this,t)},e.prototype._complete=function(){this.isInnerStopped?r.prototype._complete.call(this):this.unsubscribe()},e.prototype.notifyNext=function(t,i,n,s,o){this.hasValue=!0},e.prototype.notifyComplete=function(){this.isInnerStopped=!0,this.isStopped&&r.prototype._complete.call(this)},e}(R2.OuterSubscriber)});var ZS=u(US=>{"use strict";var U2=ml();function Z2(r){return U2.skipUntil(r)(this)}US.skipUntil=Z2});var LS=u(()=>{"use strict";var L2=v(),D2=ZS();L2.Observable.prototype.skipUntil=D2.skipUntil});var yl=u(To=>{"use strict";var V2=To&&To.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},z2=C();function W2(r){return function(e){return e.lift(new B2(r))}}To.skipWhile=W2;var B2=function(){function r(e){this.predicate=e}return r.prototype.call=function(e,t){return t.subscribe(new $2(e,this.predicate))},r}(),$2=function(r){V2(e,r);function e(t,i){r.call(this,t),this.predicate=i,this.skipping=!0,this.index=0}return e.prototype._next=function(t){var i=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||i.next(t)},e.prototype.tryCallPredicate=function(t){try{var i=this.predicate(t,this.index++);this.skipping=!!i}catch(n){this.destination.error(n)}},e}(z2.Subscriber)});var VS=u(DS=>{"use strict";var H2=yl();function J2(r){return H2.skipWhile(r)(this)}DS.skipWhile=J2});var zS=u(()=>{"use strict";var Y2=v(),K2=VS();Y2.Observable.prototype.skipWhile=K2.skipWhile});var gl=u(WS=>{"use strict";var G2=Me(),X2=Un(),Q2=Fe(),_l=ar(),eW=_e();function tW(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(t){var i=r[r.length-1];eW.isScheduler(i)?r.pop():i=null;var n=r.length;return n===1?_l.concat(new X2.ScalarObservable(r[0],i),t):n>1?_l.concat(new G2.ArrayObservable(r,i),t):_l.concat(new Q2.EmptyObservable(i),t)}}WS.startWith=tW});var $S=u(BS=>{"use strict";var rW=gl();function iW(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return rW.startWith.apply(void 0,r)(this)}BS.startWith=iW});var HS=u(()=>{"use strict";var nW=v(),sW=$S();nW.Observable.prototype.startWith=sW.startWith});var YS=u(wl=>{"use strict";var oW=se(),JS=function(){function r(e){if(this.root=e,e.setImmediate&&typeof e.setImmediate=="function")this.setImmediate=e.setImmediate.bind(e),this.clearImmediate=e.clearImmediate.bind(e);else{this.nextHandle=1,this.tasksByHandle={},this.currentlyRunningATask=!1,this.canUseProcessNextTick()?this.setImmediate=this.createProcessNextTickSetImmediate():this.canUsePostMessage()?this.setImmediate=this.createPostMessageSetImmediate():this.canUseMessageChannel()?this.setImmediate=this.createMessageChannelSetImmediate():this.canUseReadyStateChange()?this.setImmediate=this.createReadyStateChangeSetImmediate():this.setImmediate=this.createSetTimeoutSetImmediate();var t=function i(n){delete i.instance.tasksByHandle[n]};t.instance=this,this.clearImmediate=t}}return r.prototype.identify=function(e){return this.root.Object.prototype.toString.call(e)},r.prototype.canUseProcessNextTick=function(){return this.identify(this.root.process)==="[object process]"},r.prototype.canUseMessageChannel=function(){return!!this.root.MessageChannel},r.prototype.canUseReadyStateChange=function(){var e=this.root.document;return!!(e&&"onreadystatechange"in e.createElement("script"))},r.prototype.canUsePostMessage=function(){var e=this.root;if(e.postMessage&&!e.importScripts){var t=!0,i=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=i,t}return!1},r.prototype.partiallyApplied=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var n=function s(){var o=s,a=o.handler,c=o.args;typeof a=="function"?a.apply(void 0,c):new Function(""+a)()};return n.handler=e,n.args=t,n},r.prototype.addFromSetImmediateArguments=function(e){return this.tasksByHandle[this.nextHandle]=this.partiallyApplied.apply(void 0,e),this.nextHandle++},r.prototype.createProcessNextTickSetImmediate=function(){var e=function t(){var i=t.instance,n=i.addFromSetImmediateArguments(arguments);return i.root.process.nextTick(i.partiallyApplied(i.runIfPresent,n)),n};return e.instance=this,e},r.prototype.createPostMessageSetImmediate=function(){var e=this.root,t="setImmediate$"+e.Math.random()+"$",i=function s(o){var a=s.instance;o.source===e&&typeof o.data=="string"&&o.data.indexOf(t)===0&&a.runIfPresent(+o.data.slice(t.length))};i.instance=this,e.addEventListener("message",i,!1);var n=function s(){var o=s,a=o.messagePrefix,c=o.instance,l=c.addFromSetImmediateArguments(arguments);return c.root.postMessage(a+l,"*"),l};return n.instance=this,n.messagePrefix=t,n},r.prototype.runIfPresent=function(e){if(this.currentlyRunningATask)this.root.setTimeout(this.partiallyApplied(this.runIfPresent,e),0);else{var t=this.tasksByHandle[e];if(t){this.currentlyRunningATask=!0;try{t()}finally{this.clearImmediate(e),this.currentlyRunningATask=!1}}}},r.prototype.createMessageChannelSetImmediate=function(){var e=this,t=new this.root.MessageChannel;t.port1.onmessage=function(n){var s=n.data;e.runIfPresent(s)};var i=function n(){var s=n,o=s.channel,a=s.instance,c=a.addFromSetImmediateArguments(arguments);return o.port2.postMessage(c),c};return i.channel=t,i.instance=this,i},r.prototype.createReadyStateChangeSetImmediate=function(){var e=function t(){var i=t.instance,n=i.root,s=n.document,o=s.documentElement,a=i.addFromSetImmediateArguments(arguments),c=s.createElement("script");return c.onreadystatechange=function(){i.runIfPresent(a),c.onreadystatechange=null,o.removeChild(c),c=null},o.appendChild(c),a};return e.instance=this,e},r.prototype.createSetTimeoutSetImmediate=function(){var e=function t(){var i=t.instance,n=i.addFromSetImmediateArguments(arguments);return i.root.setTimeout(i.partiallyApplied(i.runIfPresent,n),0),n};return e.instance=this,e},r}();wl.ImmediateDefinition=JS;wl.Immediate=new JS(oW.root)});var GS=u(Co=>{"use strict";var aW=Co&&Co.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},KS=YS(),uW=cr(),cW=function(r){aW(e,r);function e(t,i){r.call(this,t,i),this.scheduler=t,this.work=i}return e.prototype.requestAsyncId=function(t,i,n){return n===void 0&&(n=0),n!==null&&n>0?r.prototype.requestAsyncId.call(this,t,i,n):(t.actions.push(this),t.scheduled||(t.scheduled=KS.Immediate.setImmediate(t.flush.bind(t,null))))},e.prototype.recycleAsyncId=function(t,i,n){if(n===void 0&&(n=0),n!==null&&n>0||n===null&&this.delay>0)return r.prototype.recycleAsyncId.call(this,t,i,n);t.actions.length===0&&(KS.Immediate.clearImmediate(i),t.scheduled=void 0)},e}(uW.AsyncAction);Co.AsapAction=cW});var XS=u(Io=>{"use strict";var lW=Io&&Io.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},fW=lr(),hW=function(r){lW(e,r);function e(){r.apply(this,arguments)}return e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var i=this.actions,n,s=-1,o=i.length;t=t||i.shift();do if(n=t.execute(t.state,t.delay))break;while(++s<o&&(t=i.shift()));if(this.active=!1,n){for(;++s<o&&(t=i.shift());)t.unsubscribe();throw n}},e}(fW.AsyncScheduler);Io.AsapScheduler=hW});var Sl=u(QS=>{"use strict";var pW=GS(),dW=XS();QS.asap=new dW.AsapScheduler(pW.AsapAction)});var e1=u(Ao=>{"use strict";var vW=Ao&&Ao.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},bW=v(),Ol=Sl(),mW=ur(),yW=function(r){vW(e,r);function e(t,i,n){i===void 0&&(i=0),n===void 0&&(n=Ol.asap),r.call(this),this.source=t,this.delayTime=i,this.scheduler=n,(!mW.isNumeric(i)||i<0)&&(this.delayTime=0),(!n||typeof n.schedule!="function")&&(this.scheduler=Ol.asap)}return e.create=function(t,i,n){return i===void 0&&(i=0),n===void 0&&(n=Ol.asap),new e(t,i,n)},e.dispatch=function(t){var i=t.source,n=t.subscriber;return this.add(i.subscribe(n))},e.prototype._subscribe=function(t){var i=this.delayTime,n=this.source,s=this.scheduler;return s.schedule(e.dispatch,i,{source:n,subscriber:t})},e}(bW.Observable);Ao.SubscribeOnObservable=yW});var r1=u(t1=>{"use strict";var _W=e1();function gW(r,e){return e===void 0&&(e=0),function(i){return i.lift(new wW(r,e))}}t1.subscribeOn=gW;var wW=function(){function r(e,t){this.scheduler=e,this.delay=t}return r.prototype.call=function(e,t){return new _W.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},r}()});var n1=u(i1=>{"use strict";var SW=r1();function OW(r,e){return e===void 0&&(e=0),SW.subscribeOn(r,e)(this)}i1.subscribeOn=OW});var s1=u(()=>{"use strict";var xW=v(),qW=n1();xW.Observable.prototype.subscribeOn=qW.subscribeOn});var jo=u(Eo=>{"use strict";var TW=Eo&&Eo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},CW=P(),IW=N();function AW(r,e){return function(i){return i.lift(new EW(r,e))}}Eo.switchMap=AW;var EW=function(){function r(e,t){this.project=e,this.resultSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new jW(e,this.project,this.resultSelector))},r}(),jW=function(r){TW(e,r);function e(t,i,n){r.call(this,t),this.project=i,this.resultSelector=n,this.index=0}return e.prototype._next=function(t){var i,n=this.index++;try{i=this.project(t,n)}catch(s){this.destination.error(s);return}this._innerSub(i,t,n)},e.prototype._innerSub=function(t,i,n){var s=this.innerSubscription;s&&s.unsubscribe(),this.add(this.innerSubscription=IW.subscribeToResult(this,t,i,n))},e.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(t){this.remove(t),this.innerSubscription=null,this.isStopped&&r.prototype._complete.call(this)},e.prototype.notifyNext=function(t,i,n,s,o){this.resultSelector?this._tryNotifyNext(t,i,n,s):this.destination.next(i)},e.prototype._tryNotifyNext=function(t,i,n,s){var o;try{o=this.resultSelector(t,i,n,s)}catch(a){this.destination.error(a);return}this.destination.next(o)},e}(CW.OuterSubscriber)});var xl=u(o1=>{"use strict";var kW=jo(),RW=Hu();function PW(){return kW.switchMap(RW.identity)}o1.switchAll=PW});var u1=u(a1=>{"use strict";var NW=xl();function FW(){return NW.switchAll()(this)}a1._switch=FW});var f1=u(()=>{"use strict";var c1=v(),l1=u1();c1.Observable.prototype.switch=l1._switch;c1.Observable.prototype._switch=l1._switch});var p1=u(h1=>{"use strict";var MW=jo();function UW(r,e){return MW.switchMap(r,e)(this)}h1.switchMap=UW});var d1=u(()=>{"use strict";var ZW=v(),LW=p1();ZW.Observable.prototype.switchMap=LW.switchMap});var ql=u(ko=>{"use strict";var DW=ko&&ko.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},VW=P(),zW=N();function WW(r,e){return function(t){return t.lift(new BW(r,e))}}ko.switchMapTo=WW;var BW=function(){function r(e,t){this.observable=e,this.resultSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new $W(e,this.observable,this.resultSelector))},r}(),$W=function(r){DW(e,r);function e(t,i,n){r.call(this,t),this.inner=i,this.resultSelector=n,this.index=0}return e.prototype._next=function(t){var i=this.innerSubscription;i&&i.unsubscribe(),this.add(this.innerSubscription=zW.subscribeToResult(this,this.inner,t,this.index++))},e.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(t){this.remove(t),this.innerSubscription=null,this.isStopped&&r.prototype._complete.call(this)},e.prototype.notifyNext=function(t,i,n,s,o){var a=this,c=a.resultSelector,l=a.destination;c?this.tryResultSelector(t,i,n,s):l.next(i)},e.prototype.tryResultSelector=function(t,i,n,s){var o=this,a=o.resultSelector,c=o.destination,l;try{l=a(t,i,n,s)}catch(f){c.error(f);return}c.next(l)},e}(VW.OuterSubscriber)});var b1=u(v1=>{"use strict";var HW=ql();function JW(r,e){return HW.switchMapTo(r,e)(this)}v1.switchMapTo=JW});var m1=u(()=>{"use strict";var YW=v(),KW=b1();YW.Observable.prototype.switchMapTo=KW.switchMapTo});var Tl=u(Ro=>{"use strict";var GW=Ro&&Ro.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},XW=C(),QW=vr(),e9=Fe();function t9(r){return function(e){return r===0?new e9.EmptyObservable:e.lift(new r9(r))}}Ro.take=t9;var r9=function(){function r(e){if(this.total=e,this.total<0)throw new QW.ArgumentOutOfRangeError}return r.prototype.call=function(e,t){return t.subscribe(new i9(e,this.total))},r}(),i9=function(r){GW(e,r);function e(t,i){r.call(this,t),this.total=i,this.count=0}return e.prototype._next=function(t){var i=this.total,n=++this.count;n<=i&&(this.destination.next(t),n===i&&(this.destination.complete(),this.unsubscribe()))},e}(XW.Subscriber)});var _1=u(y1=>{"use strict";var n9=Tl();function s9(r){return n9.take(r)(this)}y1.take=s9});var g1=u(()=>{"use strict";var o9=v(),a9=_1();o9.Observable.prototype.take=a9.take});var S1=u(w1=>{"use strict";var u9=lo();function c9(r){return u9.takeLast(r)(this)}w1.takeLast=c9});var O1=u(()=>{"use strict";var l9=v(),f9=S1();l9.Observable.prototype.takeLast=f9.takeLast});var Cl=u(Po=>{"use strict";var h9=Po&&Po.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},p9=P(),d9=N();function v9(r){return function(e){return e.lift(new b9(r))}}Po.takeUntil=v9;var b9=function(){function r(e){this.notifier=e}return r.prototype.call=function(e,t){return t.subscribe(new m9(e,this.notifier))},r}(),m9=function(r){h9(e,r);function e(t,i){r.call(this,t),this.notifier=i,this.add(d9.subscribeToResult(this,i))}return e.prototype.notifyNext=function(t,i,n,s,o){this.complete()},e.prototype.notifyComplete=function(){},e}(p9.OuterSubscriber)});var q1=u(x1=>{"use strict";var y9=Cl();function _9(r){return y9.takeUntil(r)(this)}x1.takeUntil=_9});var T1=u(()=>{"use strict";var g9=v(),w9=q1();g9.Observable.prototype.takeUntil=w9.takeUntil});var Il=u(No=>{"use strict";var S9=No&&No.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},O9=C();function x9(r){return function(e){return e.lift(new q9(r))}}No.takeWhile=x9;var q9=function(){function r(e){this.predicate=e}return r.prototype.call=function(e,t){return t.subscribe(new T9(e,this.predicate))},r}(),T9=function(r){S9(e,r);function e(t,i){r.call(this,t),this.predicate=i,this.index=0}return e.prototype._next=function(t){var i=this.destination,n;try{n=this.predicate(t,this.index++)}catch(s){i.error(s);return}this.nextOrComplete(t,n)},e.prototype.nextOrComplete=function(t,i){var n=this.destination;i?n.next(t):n.complete()},e}(O9.Subscriber)});var I1=u(C1=>{"use strict";var C9=Il();function I9(r){return C9.takeWhile(r)(this)}C1.takeWhile=I9});var A1=u(()=>{"use strict";var A9=v(),E9=I1();A9.Observable.prototype.takeWhile=E9.takeWhile});var _i=u(wr=>{"use strict";var j9=wr&&wr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},k9=P(),R9=N();wr.defaultThrottleConfig={leading:!0,trailing:!1};function P9(r,e){return e===void 0&&(e=wr.defaultThrottleConfig),function(t){return t.lift(new N9(r,e.leading,e.trailing))}}wr.throttle=P9;var N9=function(){function r(e,t,i){this.durationSelector=e,this.leading=t,this.trailing=i}return r.prototype.call=function(e,t){return t.subscribe(new F9(e,this.durationSelector,this.leading,this.trailing))},r}(),F9=function(r){j9(e,r);function e(t,i,n,s){r.call(this,t),this.destination=t,this.durationSelector=i,this._leading=n,this._trailing=s,this._hasTrailingValue=!1}return e.prototype._next=function(t){if(this.throttled)this._trailing&&(this._hasTrailingValue=!0,this._trailingValue=t);else{var i=this.tryDurationSelector(t);i&&this.add(this.throttled=R9.subscribeToResult(this,i)),this._leading&&(this.destination.next(t),this._trailing&&(this._hasTrailingValue=!0,this._trailingValue=t))}},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(i){return this.destination.error(i),null}},e.prototype._unsubscribe=function(){var t=this,i=t.throttled,n=t._trailingValue,s=t._hasTrailingValue,o=t._trailing;this._trailingValue=null,this._hasTrailingValue=!1,i&&(this.remove(i),this.throttled=null,i.unsubscribe())},e.prototype._sendTrailing=function(){var t=this,i=t.destination,n=t.throttled,s=t._trailing,o=t._trailingValue,a=t._hasTrailingValue;n&&s&&a&&(i.next(o),this._trailingValue=null,this._hasTrailingValue=!1)},e.prototype.notifyNext=function(t,i,n,s,o){this._sendTrailing(),this._unsubscribe()},e.prototype.notifyComplete=function(){this._sendTrailing(),this._unsubscribe()},e}(k9.OuterSubscriber)});var k1=u(j1=>{"use strict";var E1=_i();function M9(r,e){return e===void 0&&(e=E1.defaultThrottleConfig),E1.throttle(r,e)(this)}j1.throttle=M9});var R1=u(()=>{"use strict";var U9=v(),Z9=k1();U9.Observable.prototype.throttle=Z9.throttle});var Al=u(Fo=>{"use strict";var L9=Fo&&Fo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},D9=C(),V9=W(),z9=_i();function W9(r,e,t){return e===void 0&&(e=V9.async),t===void 0&&(t=z9.defaultThrottleConfig),function(i){return i.lift(new B9(r,e,t.leading,t.trailing))}}Fo.throttleTime=W9;var B9=function(){function r(e,t,i,n){this.duration=e,this.scheduler=t,this.leading=i,this.trailing=n}return r.prototype.call=function(e,t){return t.subscribe(new $9(e,this.duration,this.scheduler,this.leading,this.trailing))},r}(),$9=function(r){L9(e,r);function e(t,i,n,s,o){r.call(this,t),this.duration=i,this.scheduler=n,this.leading=s,this.trailing=o,this._hasTrailingValue=!1,this._trailingValue=null}return e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(H9,this.duration,{subscriber:this})),this.leading&&this.destination.next(t))},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(D9.Subscriber);function H9(r){var e=r.subscriber;e.clearThrottle()}});var N1=u(P1=>{"use strict";var J9=W(),Y9=_i(),K9=Al();function G9(r,e,t){return e===void 0&&(e=J9.async),t===void 0&&(t=Y9.defaultThrottleConfig),K9.throttleTime(r,e,t)(this)}P1.throttleTime=G9});var F1=u(()=>{"use strict";var X9=v(),Q9=N1();X9.Observable.prototype.throttleTime=Q9.throttleTime});var El=u(gi=>{"use strict";var e6=gi&&gi.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},t6=C(),r6=W();function i6(r){return r===void 0&&(r=r6.async),function(e){return e.lift(new n6(r))}}gi.timeInterval=i6;var M1=function(){function r(e,t){this.value=e,this.interval=t}return r}();gi.TimeInterval=M1;var n6=function(){function r(e){this.scheduler=e}return r.prototype.call=function(e,t){return t.subscribe(new s6(e,this.scheduler))},r}(),s6=function(r){e6(e,r);function e(t,i){r.call(this,t),this.scheduler=i,this.lastTime=0,this.lastTime=i.now()}return e.prototype._next=function(t){var i=this.scheduler.now(),n=i-this.lastTime;this.lastTime=i,this.destination.next(new M1(t,n))},e}(t6.Subscriber)});var kl=u(jl=>{"use strict";var o6=W(),U1=El();jl.TimeInterval=U1.TimeInterval;function a6(r){return r===void 0&&(r=o6.async),U1.timeInterval(r)(this)}jl.timeInterval=a6});var Z1=u(()=>{"use strict";var u6=v(),c6=kl();u6.Observable.prototype.timeInterval=c6.timeInterval});var Rl=u(Mo=>{"use strict";var l6=Mo&&Mo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},f6=function(r){l6(e,r);function e(){var t=r.call(this,"Timeout has occurred");this.name=t.name="TimeoutError",this.stack=t.stack,this.message=t.message}return e}(Error);Mo.TimeoutError=f6});var Pl=u(Uo=>{"use strict";var h6=Uo&&Uo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},p6=W(),d6=ci(),v6=C(),b6=Rl();function m6(r,e){e===void 0&&(e=p6.async);var t=d6.isDate(r),i=t?+r-e.now():Math.abs(r);return function(n){return n.lift(new y6(i,t,e,new b6.TimeoutError))}}Uo.timeout=m6;var y6=function(){function r(e,t,i,n){this.waitFor=e,this.absoluteTimeout=t,this.scheduler=i,this.errorInstance=n}return r.prototype.call=function(e,t){return t.subscribe(new _6(e,this.absoluteTimeout,this.waitFor,this.scheduler,this.errorInstance))},r}(),_6=function(r){h6(e,r);function e(t,i,n,s,o){r.call(this,t),this.absoluteTimeout=i,this.waitFor=n,this.scheduler=s,this.errorInstance=o,this.action=null,this.scheduleTimeout()}return e.dispatchTimeout=function(t){t.error(t.errorInstance)},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),r.prototype._next.call(this,t)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.errorInstance=null},e}(v6.Subscriber)});var D1=u(L1=>{"use strict";var g6=W(),w6=Pl();function S6(r,e){return e===void 0&&(e=g6.async),w6.timeout(r,e)(this)}L1.timeout=S6});var V1=u(()=>{"use strict";var O6=v(),x6=D1();O6.Observable.prototype.timeout=x6.timeout});var Nl=u(Zo=>{"use strict";var q6=Zo&&Zo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},T6=W(),C6=ci(),I6=P(),A6=N();function E6(r,e,t){return t===void 0&&(t=T6.async),function(i){var n=C6.isDate(r),s=n?+r-t.now():Math.abs(r);return i.lift(new j6(s,n,e,t))}}Zo.timeoutWith=E6;var j6=function(){function r(e,t,i,n){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=i,this.scheduler=n}return r.prototype.call=function(e,t){return t.subscribe(new k6(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},r}(),k6=function(r){q6(e,r);function e(t,i,n,s,o){r.call(this,t),this.absoluteTimeout=i,this.waitFor=n,this.withObservable=s,this.scheduler=o,this.action=null,this.scheduleTimeout()}return e.dispatchTimeout=function(t){var i=t.withObservable;t._unsubscribeAndRecycle(),t.add(A6.subscribeToResult(t,i))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),r.prototype._next.call(this,t)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null},e}(I6.OuterSubscriber)});var W1=u(z1=>{"use strict";var R6=W(),P6=Nl();function N6(r,e,t){return t===void 0&&(t=R6.async),P6.timeoutWith(r,e,t)(this)}z1.timeoutWith=N6});var B1=u(()=>{"use strict";var F6=v(),M6=W1();F6.Observable.prototype.timeoutWith=M6.timeoutWith});var Lo=u(Fl=>{"use strict";var U6=W(),Z6=hr();function L6(r){return r===void 0&&(r=U6.async),Z6.map(function(e){return new $1(e,r.now())})}Fl.timestamp=L6;var $1=function(){function r(e,t){this.value=e,this.timestamp=t}return r}();Fl.Timestamp=$1});var J1=u(H1=>{"use strict";var D6=W(),V6=Lo();function z6(r){return r===void 0&&(r=D6.async),V6.timestamp(r)(this)}H1.timestamp=z6});var Y1=u(()=>{"use strict";var W6=v(),B6=J1();W6.Observable.prototype.timestamp=B6.timestamp});var Ml=u(K1=>{"use strict";var $6=mr();function H6(r,e,t){return t===0?[e]:(r.push(e),r)}function J6(){return $6.reduce(H6,[])}K1.toArray=J6});var X1=u(G1=>{"use strict";var Y6=Ml();function K6(){return Y6.toArray()(this)}G1.toArray=K6});var Q1=u(()=>{"use strict";var G6=v(),X6=X1();G6.Observable.prototype.toArray=X6.toArray});var eO=u(()=>{});var Ul=u(Do=>{"use strict";var Q6=Do&&Do.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},tO=K(),eB=P(),tB=N();function rB(r){return function(t){return t.lift(new iB(r))}}Do.window=rB;var iB=function(){function r(e){this.windowBoundaries=e}return r.prototype.call=function(e,t){var i=new nB(e),n=t.subscribe(i);return n.closed||i.add(tB.subscribeToResult(i,this.windowBoundaries)),n},r}(),nB=function(r){Q6(e,r);function e(t){r.call(this,t),this.window=new tO.Subject,t.next(this.window)}return e.prototype.notifyNext=function(t,i,n,s,o){this.openWindow()},e.prototype.notifyError=function(t,i){this._error(t)},e.prototype.notifyComplete=function(t){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var i=this.destination,n=this.window=new tO.Subject;i.next(n)},e}(eB.OuterSubscriber)});var iO=u(rO=>{"use strict";var sB=Ul();function oB(r){return sB.window(r)(this)}rO.window=oB});var nO=u(()=>{"use strict";var aB=v(),uB=iO();aB.Observable.prototype.window=uB.window});var Zl=u(Vo=>{"use strict";var cB=Vo&&Vo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},lB=C(),sO=K();function fB(r,e){return e===void 0&&(e=0),function(i){return i.lift(new hB(r,e))}}Vo.windowCount=fB;var hB=function(){function r(e,t){this.windowSize=e,this.startWindowEvery=t}return r.prototype.call=function(e,t){return t.subscribe(new pB(e,this.windowSize,this.startWindowEvery))},r}(),pB=function(r){cB(e,r);function e(t,i,n){r.call(this,t),this.destination=t,this.windowSize=i,this.startWindowEvery=n,this.windows=[new sO.Subject],this.count=0,t.next(this.windows[0])}return e.prototype._next=function(t){for(var i=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,s=this.windowSize,o=this.windows,a=o.length,c=0;c<a&&!this.closed;c++)o[c].next(t);var l=this.count-s+1;if(l>=0&&l%i===0&&!this.closed&&o.shift().complete(),++this.count%i===0&&!this.closed){var f=new sO.Subject;o.push(f),n.next(f)}},e.prototype._error=function(t){var i=this.windows;if(i)for(;i.length>0&&!this.closed;)i.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(lB.Subscriber)});var aO=u(oO=>{"use strict";var dB=Zl();function vB(r,e){return e===void 0&&(e=0),dB.windowCount(r,e)(this)}oO.windowCount=vB});var uO=u(()=>{"use strict";var bB=v(),mB=aO();bB.Observable.prototype.windowCount=mB.windowCount});var Dl=u(zo=>{"use strict";var lO=zo&&zo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},yB=K(),_B=W(),gB=C(),cO=ur(),Ll=_e();function wB(r){var e=_B.async,t=null,i=Number.POSITIVE_INFINITY;return Ll.isScheduler(arguments[3])&&(e=arguments[3]),Ll.isScheduler(arguments[2])?e=arguments[2]:cO.isNumeric(arguments[2])&&(i=arguments[2]),Ll.isScheduler(arguments[1])?e=arguments[1]:cO.isNumeric(arguments[1])&&(t=arguments[1]),function(s){return s.lift(new SB(r,t,i,e))}}zo.windowTime=wB;var SB=function(){function r(e,t,i,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=i,this.scheduler=n}return r.prototype.call=function(e,t){return t.subscribe(new xB(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},r}(),OB=function(r){lO(e,r);function e(){r.apply(this,arguments),this._numberOfNextedValues=0}return e.prototype.next=function(t){this._numberOfNextedValues++,r.prototype.next.call(this,t)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(yB.Subject),xB=function(r){lO(e,r);function e(t,i,n,s,o){r.call(this,t),this.destination=t,this.windowTimeSpan=i,this.windowCreationInterval=n,this.maxWindowSize=s,this.scheduler=o,this.windows=[];var a=this.openWindow();if(n!==null&&n>=0){var c={subscriber:this,window:a,context:null},l={windowTimeSpan:i,windowCreationInterval:n,subscriber:this,scheduler:o};this.add(o.schedule(fO,i,c)),this.add(o.schedule(TB,n,l))}else{var f={subscriber:this,window:a,windowTimeSpan:i};this.add(o.schedule(qB,i,f))}}return e.prototype._next=function(t){for(var i=this.windows,n=i.length,s=0;s<n;s++){var o=i[s];o.closed||(o.next(t),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},e.prototype._error=function(t){for(var i=this.windows;i.length>0;)i.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var i=t.shift();i.closed||i.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new OB;this.windows.push(t);var i=this.destination;return i.next(t),t},e.prototype.closeWindow=function(t){t.complete();var i=this.windows;i.splice(i.indexOf(t),1)},e}(gB.Subscriber);function qB(r){var e=r.subscriber,t=r.windowTimeSpan,i=r.window;i&&e.closeWindow(i),r.window=e.openWindow(),this.schedule(r,t)}function TB(r){var e=r.windowTimeSpan,t=r.subscriber,i=r.scheduler,n=r.windowCreationInterval,s=t.openWindow(),o=this,a={action:o,subscription:null},c={subscriber:t,window:s,context:a};a.subscription=i.schedule(fO,e,c),o.add(a.subscription),o.schedule(r,n)}function fO(r){var e=r.subscriber,t=r.window,i=r.context;i&&i.action&&i.subscription&&i.action.remove(i.subscription),e.closeWindow(t)}});var dO=u(pO=>{"use strict";var CB=W(),hO=ur(),Vl=_e(),IB=Dl();function AB(r){var e=CB.async,t=null,i=Number.POSITIVE_INFINITY;return Vl.isScheduler(arguments[3])&&(e=arguments[3]),Vl.isScheduler(arguments[2])?e=arguments[2]:hO.isNumeric(arguments[2])&&(i=arguments[2]),Vl.isScheduler(arguments[1])?e=arguments[1]:hO.isNumeric(arguments[1])&&(t=arguments[1]),IB.windowTime(r,t,i,e)(this)}pO.windowTime=AB});var vO=u(()=>{"use strict";var EB=v(),jB=dO();EB.Observable.prototype.windowTime=jB.windowTime});var zl=u(Wo=>{"use strict";var kB=Wo&&Wo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},RB=K(),PB=J(),NB=Q(),bO=Y(),FB=P(),mO=N();function MB(r,e){return function(t){return t.lift(new UB(r,e))}}Wo.windowToggle=MB;var UB=function(){function r(e,t){this.openings=e,this.closingSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new ZB(e,this.openings,this.closingSelector))},r}(),ZB=function(r){kB(e,r);function e(t,i,n){r.call(this,t),this.openings=i,this.closingSelector=n,this.contexts=[],this.add(this.openSubscription=mO.subscribeToResult(this,i,i))}return e.prototype._next=function(t){var i=this.contexts;if(i)for(var n=i.length,s=0;s<n;s++)i[s].window.next(t)},e.prototype._error=function(t){var i=this.contexts;if(this.contexts=null,i)for(var n=i.length,s=-1;++s<n;){var o=i[s];o.window.error(t),o.subscription.unsubscribe()}r.prototype._error.call(this,t)},e.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var i=t.length,n=-1;++n<i;){var s=t[n];s.window.complete(),s.subscription.unsubscribe()}r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var i=t.length,n=-1;++n<i;){var s=t[n];s.window.unsubscribe(),s.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,i,n,s,o){if(t===this.openings){var a=this.closingSelector,c=NB.tryCatch(a)(i);if(c===bO.errorObject)return this.error(bO.errorObject.e);var l=new RB.Subject,f=new PB.Subscription,p={window:l,subscription:f};this.contexts.push(p);var y=mO.subscribeToResult(this,c,p);y.closed?this.closeWindow(this.contexts.length-1):(y.context=p,f.add(y)),this.destination.next(l)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(t!==-1){var i=this.contexts,n=i[t],s=n.window,o=n.subscription;i.splice(t,1),s.complete(),o.unsubscribe()}},e}(FB.OuterSubscriber)});var _O=u(yO=>{"use strict";var LB=zl();function DB(r,e){return LB.windowToggle(r,e)(this)}yO.windowToggle=DB});var gO=u(()=>{"use strict";var VB=v(),zB=_O();VB.Observable.prototype.windowToggle=zB.windowToggle});var Wl=u(Bo=>{"use strict";var WB=Bo&&Bo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},BB=K(),$B=Q(),wO=Y(),HB=P(),JB=N();function YB(r){return function(t){return t.lift(new KB(r))}}Bo.windowWhen=YB;var KB=function(){function r(e){this.closingSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new GB(e,this.closingSelector))},r}(),GB=function(r){WB(e,r);function e(t,i){r.call(this,t),this.destination=t,this.closingSelector=i,this.openWindow()}return e.prototype.notifyNext=function(t,i,n,s,o){this.openWindow(o)},e.prototype.notifyError=function(t,i){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){t===void 0&&(t=null),t&&(this.remove(t),t.unsubscribe());var i=this.window;i&&i.complete();var n=this.window=new BB.Subject;this.destination.next(n);var s=$B.tryCatch(this.closingSelector)();if(s===wO.errorObject){var o=wO.errorObject.e;this.destination.error(o),this.window.error(o)}else this.add(this.closingNotification=JB.subscribeToResult(this,s))},e}(HB.OuterSubscriber)});var OO=u(SO=>{"use strict";var XB=Wl();function QB(r){return XB.windowWhen(r)(this)}SO.windowWhen=QB});var xO=u(()=>{"use strict";var e5=v(),t5=OO();e5.Observable.prototype.windowWhen=t5.windowWhen});var Bl=u($o=>{"use strict";var r5=$o&&$o.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},i5=P(),n5=N();function s5(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(t){var i;typeof r[r.length-1]=="function"&&(i=r.pop());var n=r;return t.lift(new o5(n,i))}}$o.withLatestFrom=s5;var o5=function(){function r(e,t){this.observables=e,this.project=t}return r.prototype.call=function(e,t){return t.subscribe(new a5(e,this.observables,this.project))},r}(),a5=function(r){r5(e,r);function e(t,i,n){r.call(this,t),this.observables=i,this.project=n,this.toRespond=[];var s=i.length;this.values=new Array(s);for(var o=0;o<s;o++)this.toRespond.push(o);for(var o=0;o<s;o++){var a=i[o];this.add(n5.subscribeToResult(this,a,a,o))}}return e.prototype.notifyNext=function(t,i,n,s,o){this.values[n]=i;var a=this.toRespond;if(a.length>0){var c=a.indexOf(n);c!==-1&&a.splice(c,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(this.toRespond.length===0){var i=[t].concat(this.values);this.project?this._tryProject(i):this.destination.next(i)}},e.prototype._tryProject=function(t){var i;try{i=this.project.apply(this,t)}catch(n){this.destination.error(n);return}this.destination.next(i)},e}(i5.OuterSubscriber)});var TO=u(qO=>{"use strict";var u5=Bl();function c5(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return u5.withLatestFrom.apply(void 0,r)(this)}qO.withLatestFrom=c5});var CO=u(()=>{"use strict";var l5=v(),f5=TO();l5.Observable.prototype.withLatestFrom=f5.withLatestFrom});var AO=u(IO=>{"use strict";var h5=li();function p5(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return h5.zip.apply(void 0,r)(this)}IO.zipProto=p5});var EO=u(()=>{"use strict";var d5=v(),v5=AO();d5.Observable.prototype.zip=v5.zipProto});var $l=u(jO=>{"use strict";var b5=li();function m5(r){return function(e){return e.lift(new b5.ZipOperator(r))}}jO.zipAll=m5});var RO=u(kO=>{"use strict";var y5=$l();function _5(r){return y5.zipAll(r)(this)}kO.zipAll=_5});var PO=u(()=>{"use strict";var g5=v(),w5=RO();g5.Observable.prototype.zipAll=w5.zipAll});var Hl=u(NO=>{"use strict";var S5=function(){function r(e,t){t===void 0&&(t=Number.POSITIVE_INFINITY),this.subscribedFrame=e,this.unsubscribedFrame=t}return r}();NO.SubscriptionLog=S5});var Jl=u(MO=>{"use strict";var FO=Hl(),O5=function(){function r(){this.subscriptions=[]}return r.prototype.logSubscribedFrame=function(){return this.subscriptions.push(new FO.SubscriptionLog(this.scheduler.now())),this.subscriptions.length-1},r.prototype.logUnsubscribedFrame=function(e){var t=this.subscriptions,i=t[e];t[e]=new FO.SubscriptionLog(i.subscribedFrame,this.scheduler.now())},r}();MO.SubscriptionLoggable=O5});var Yl=u(UO=>{"use strict";function x5(r,e){for(var t=0,i=e.length;t<i;t++)for(var n=e[t],s=Object.getOwnPropertyNames(n.prototype),o=0,a=s.length;o<a;o++){var c=s[o];r.prototype[c]=n.prototype[c]}}UO.applyMixins=x5});var LO=u(Ho=>{"use strict";var q5=Ho&&Ho.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},T5=v(),C5=J(),I5=Jl(),A5=Yl(),ZO=function(r){q5(e,r);function e(t,i){r.call(this,function(n){var s=this,o=s.logSubscribedFrame();return n.add(new C5.Subscription(function(){s.logUnsubscribedFrame(o)})),s.scheduleMessages(n),n}),this.messages=t,this.subscriptions=[],this.scheduler=i}return e.prototype.scheduleMessages=function(t){for(var i=this.messages.length,n=0;n<i;n++){var s=this.messages[n];t.add(this.scheduler.schedule(function(o){var a=o.message,c=o.subscriber;a.notification.observe(c)},s.frame,{message:s,subscriber:t}))}},e}(T5.Observable);Ho.ColdObservable=ZO;A5.applyMixins(ZO,[I5.SubscriptionLoggable])});var VO=u(Jo=>{"use strict";var E5=Jo&&Jo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},j5=K(),k5=J(),R5=Jl(),P5=Yl(),DO=function(r){E5(e,r);function e(t,i){r.call(this),this.messages=t,this.subscriptions=[],this.scheduler=i}return e.prototype._subscribe=function(t){var i=this,n=i.logSubscribedFrame();return t.add(new k5.Subscription(function(){i.logUnsubscribedFrame(n)})),r.prototype._subscribe.call(this,t)},e.prototype.setup=function(){for(var t=this,i=t.messages.length,n=0;n<i;n++)(function(){var s=t.messages[n];t.scheduler.schedule(function(){s.notification.observe(t)},s.frame)})()},e}(j5.Subject);Jo.HotObservable=DO;P5.applyMixins(DO,[R5.SubscriptionLoggable])});var Kl=u(wi=>{"use strict";var zO=wi&&wi.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},N5=cr(),F5=lr(),M5=function(r){zO(e,r);function e(t,i){var n=this;t===void 0&&(t=WO),i===void 0&&(i=Number.POSITIVE_INFINITY),r.call(this,t,function(){return n.frame}),this.maxFrames=i,this.frame=0,this.index=-1}return e.prototype.flush=function(){for(var t=this,i=t.actions,n=t.maxFrames,s,o;(o=i.shift())&&(this.frame=o.delay)<=n&&!(s=o.execute(o.state,o.delay)););if(s){for(;o=i.shift();)o.unsubscribe();throw s}},e.frameTimeFactor=10,e}(F5.AsyncScheduler);wi.VirtualTimeScheduler=M5;var WO=function(r){zO(e,r);function e(t,i,n){n===void 0&&(n=t.index+=1),r.call(this,t,i),this.scheduler=t,this.work=i,this.index=n,this.active=!0,this.index=t.index=n}return e.prototype.schedule=function(t,i){if(i===void 0&&(i=0),!this.id)return r.prototype.schedule.call(this,t,i);this.active=!1;var n=new e(this.scheduler,this.work);return this.add(n),n.schedule(t,i)},e.prototype.requestAsyncId=function(t,i,n){n===void 0&&(n=0),this.delay=t.frame+n;var s=t.actions;return s.push(this),s.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,i,n){n===void 0&&(n=0)},e.prototype._execute=function(t,i){if(this.active===!0)return r.prototype._execute.call(this,t,i)},e.sortActions=function(t,i){return t.delay===i.delay?t.index===i.index?0:t.index>i.index?1:-1:t.delay>i.delay?1:-1},e}(N5.AsyncAction);wi.VirtualAction=WO});var HO=u(Yo=>{"use strict";var U5=Yo&&Yo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Z5=v(),Ue=nr(),BO=LO(),L5=VO(),Gl=Hl(),$O=Kl(),D5=750,V5=function(r){U5(e,r);function e(t){r.call(this,$O.VirtualAction,D5),this.assertDeepEqual=t,this.hotObservables=[],this.coldObservables=[],this.flushTests=[]}return e.prototype.createTime=function(t){var i=t.indexOf("|");if(i===-1)throw new Error('marble diagram for time should have a completion marker "|"');return i*e.frameTimeFactor},e.prototype.createColdObservable=function(t,i,n){if(t.indexOf("^")!==-1)throw new Error('cold observable cannot have subscription offset "^"');if(t.indexOf("!")!==-1)throw new Error('cold observable cannot have unsubscription marker "!"');var s=e.parseMarbles(t,i,n),o=new BO.ColdObservable(s,this);return this.coldObservables.push(o),o},e.prototype.createHotObservable=function(t,i,n){if(t.indexOf("!")!==-1)throw new Error('hot observable cannot have unsubscription marker "!"');var s=e.parseMarbles(t,i,n),o=new L5.HotObservable(s,this);return this.hotObservables.push(o),o},e.prototype.materializeInnerObservable=function(t,i){var n=this,s=[];return t.subscribe(function(o){s.push({frame:n.frame-i,notification:Ue.Notification.createNext(o)})},function(o){s.push({frame:n.frame-i,notification:Ue.Notification.createError(o)})},function(){s.push({frame:n.frame-i,notification:Ue.Notification.createComplete()})}),s},e.prototype.expectObservable=function(t,i){var n=this;i===void 0&&(i=null);var s=[],o={actual:s,ready:!1},a=e.parseMarblesAsSubscriptions(i).unsubscribedFrame,c;return this.schedule(function(){c=t.subscribe(function(l){var f=l;l instanceof Z5.Observable&&(f=n.materializeInnerObservable(f,n.frame)),s.push({frame:n.frame,notification:Ue.Notification.createNext(f)})},function(l){s.push({frame:n.frame,notification:Ue.Notification.createError(l)})},function(){s.push({frame:n.frame,notification:Ue.Notification.createComplete()})})},0),a!==Number.POSITIVE_INFINITY&&this.schedule(function(){return c.unsubscribe()},a),this.flushTests.push(o),{toBe:function(l,f,p){o.ready=!0,o.expected=e.parseMarbles(l,f,p,!0)}}},e.prototype.expectSubscriptions=function(t){var i={actual:t,ready:!1};return this.flushTests.push(i),{toBe:function(n){var s=typeof n=="string"?[n]:n;i.ready=!0,i.expected=s.map(function(o){return e.parseMarblesAsSubscriptions(o)})}}},e.prototype.flush=function(){for(var t=this.hotObservables;t.length>0;)t.shift().setup();r.prototype.flush.call(this);for(var i=this.flushTests.filter(function(s){return s.ready});i.length>0;){var n=i.shift();this.assertDeepEqual(n.actual,n.expected)}},e.parseMarblesAsSubscriptions=function(t){if(typeof t!="string")return new Gl.SubscriptionLog(Number.POSITIVE_INFINITY);for(var i=t.length,n=-1,s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,a=0;a<i;a++){var c=a*this.frameTimeFactor,l=t[a];switch(l){case"-":case" ":break;case"(":n=c;break;case")":n=-1;break;case"^":if(s!==Number.POSITIVE_INFINITY)throw new Error("found a second subscription point '^' in a subscription marble diagram. There can only be one.");s=n>-1?n:c;break;case"!":if(o!==Number.POSITIVE_INFINITY)throw new Error("found a second subscription point '^' in a subscription marble diagram. There can only be one.");o=n>-1?n:c;break;default:throw new Error("there can only be '^' and '!' markers in a subscription marble diagram. Found instead '"+l+"'.")}}return o<0?new Gl.SubscriptionLog(s):new Gl.SubscriptionLog(s,o)},e.parseMarbles=function(t,i,n,s){if(s===void 0&&(s=!1),t.indexOf("!")!==-1)throw new Error('conventional marble diagrams cannot have the unsubscription marker "!"');for(var o=t.length,a=[],c=t.indexOf("^"),l=c===-1?0:c*-this.frameTimeFactor,f=typeof i!="object"?function(S){return S}:function(S){return s&&i[S]instanceof BO.ColdObservable?i[S].messages:i[S]},p=-1,y=0;y<o;y++){var g=y*this.frameTimeFactor+l,m=void 0,O=t[y];switch(O){case"-":case" ":break;case"(":p=g;break;case")":p=-1;break;case"|":m=Ue.Notification.createComplete();break;case"^":break;case"#":m=Ue.Notification.createError(n||"error");break;default:m=Ue.Notification.createNext(f(O));break}m&&a.push({frame:p>-1?p:g,notification:m})}return a},e}($O.VirtualTimeScheduler);Yo.TestScheduler=V5});var YO=u(Xl=>{"use strict";var z5=se(),JO=function(){function r(e){e.requestAnimationFrame?(this.cancelAnimationFrame=e.cancelAnimationFrame.bind(e),this.requestAnimationFrame=e.requestAnimationFrame.bind(e)):e.mozRequestAnimationFrame?(this.cancelAnimationFrame=e.mozCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.mozRequestAnimationFrame.bind(e)):e.webkitRequestAnimationFrame?(this.cancelAnimationFrame=e.webkitCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.webkitRequestAnimationFrame.bind(e)):e.msRequestAnimationFrame?(this.cancelAnimationFrame=e.msCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.msRequestAnimationFrame.bind(e)):e.oRequestAnimationFrame?(this.cancelAnimationFrame=e.oCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.oRequestAnimationFrame.bind(e)):(this.cancelAnimationFrame=e.clearTimeout.bind(e),this.requestAnimationFrame=function(t){return e.setTimeout(t,1e3/60)})}return r}();Xl.RequestAnimationFrameDefinition=JO;Xl.AnimationFrame=new JO(z5.root)});var GO=u(Ko=>{"use strict";var W5=Ko&&Ko.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},B5=cr(),KO=YO(),$5=function(r){W5(e,r);function e(t,i){r.call(this,t,i),this.scheduler=t,this.work=i}return e.prototype.requestAsyncId=function(t,i,n){return n===void 0&&(n=0),n!==null&&n>0?r.prototype.requestAsyncId.call(this,t,i,n):(t.actions.push(this),t.scheduled||(t.scheduled=KO.AnimationFrame.requestAnimationFrame(t.flush.bind(t,null))))},e.prototype.recycleAsyncId=function(t,i,n){if(n===void 0&&(n=0),n!==null&&n>0||n===null&&this.delay>0)return r.prototype.recycleAsyncId.call(this,t,i,n);t.actions.length===0&&(KO.AnimationFrame.cancelAnimationFrame(i),t.scheduled=void 0)},e}(B5.AsyncAction);Ko.AnimationFrameAction=$5});var XO=u(Go=>{"use strict";var H5=Go&&Go.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},J5=lr(),Y5=function(r){H5(e,r);function e(){r.apply(this,arguments)}return e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var i=this.actions,n,s=-1,o=i.length;t=t||i.shift();do if(n=t.execute(t.state,t.delay))break;while(++s<o&&(t=i.shift()));if(this.active=!1,n){for(;++s<o&&(t=i.shift());)t.unsubscribe();throw n}},e}(J5.AsyncScheduler);Go.AnimationFrameScheduler=Y5});var e0=u(QO=>{"use strict";var K5=GO(),G5=XO();QO.animationFrame=new G5.AnimationFrameScheduler(K5.AnimationFrameAction)});var t0=u(_=>{"use strict";var X5=ro();_.audit=X5.audit;var Q5=Rc();_.auditTime=Q5.auditTime;var e8=Qu();_.buffer=e8.buffer;var t8=ec();_.bufferCount=t8.bufferCount;var r8=tc();_.bufferTime=r8.bufferTime;var i8=rc();_.bufferToggle=i8.bufferToggle;var n8=ic();_.bufferWhen=n8.bufferWhen;var s8=nc();_.catchError=s8.catchError;var o8=sc();_.combineAll=o8.combineAll;var a8=ni();_.combineLatest=a8.combineLatest;var u8=ac();_.concat=u8.concat;var c8=Jn();_.concatAll=c8.concatAll;var l8=As();_.concatMap=l8.concatMap;var f8=cc();_.concatMapTo=f8.concatMapTo;var h8=lc();_.count=h8.count;var p8=hc();_.debounce=p8.debounce;var d8=pc();_.debounceTime=d8.debounceTime;var v8=Ns();_.defaultIfEmpty=v8.defaultIfEmpty;var b8=dc();_.delay=b8.delay;var m8=bc();_.delayWhen=m8.delayWhen;var y8=fc();_.dematerialize=y8.dematerialize;var _8=yc();_.distinct=_8.distinct;var g8=Ls();_.distinctUntilChanged=g8.distinctUntilChanged;var w8=_c();_.distinctUntilKeyChanged=w8.distinctUntilKeyChanged;var S8=xc();_.elementAt=S8.elementAt;var O8=Nc();_.every=O8.every;var x8=wc();_.exhaust=x8.exhaust;var q8=Sc();_.exhaustMap=q8.exhaustMap;var T8=Oc();_.expand=T8.expand;var C8=Hs();_.filter=C8.filter;var I8=qc();_.finalize=I8.finalize;var A8=Ys();_.find=A8.find;var E8=Tc();_.findIndex=E8.findIndex;var j8=Cc();_.first=j8.first;var k8=Ac();_.groupBy=k8.groupBy;var R8=jc();_.ignoreElements=R8.ignoreElements;var P8=kc();_.isEmpty=P8.isEmpty;var N8=Pc();_.last=N8.last;var F8=hr();_.map=F8.map;var M8=Fc();_.mapTo=M8.mapTo;var U8=Uc();_.materialize=U8.materialize;var Z8=Zc();_.max=Z8.max;var L8=Dc();_.merge=L8.merge;var D8=oi();_.mergeAll=D8.mergeAll;var V8=or();_.mergeMap=V8.mergeMap;var z8=or();_.flatMap=z8.mergeMap;var W8=zc();_.mergeMapTo=W8.mergeMapTo;var B8=Wc();_.mergeScan=B8.mergeScan;var $8=Bc();_.min=$8.min;var H8=Ke();_.multicast=H8.multicast;var J8=si();_.observeOn=J8.observeOn;var Y8=as();_.onErrorResumeNext=Y8.onErrorResumeNext;var K8=Yc();_.pairwise=K8.pairwise;var G8=Kc();_.partition=G8.partition;var X8=Gc();_.pluck=X8.pluck;var Q8=Xc();_.publish=Q8.publish;var e$=el();_.publishBehavior=e$.publishBehavior;var t$=rl();_.publishLast=t$.publishLast;var r$=tl();_.publishReplay=r$.publishReplay;var i$=il();_.race=i$.race;var n$=mr();_.reduce=n$.reduce;var s$=sl();_.repeat=s$.repeat;var o$=ol();_.repeatWhen=o$.repeatWhen;var a$=al();_.retry=a$.retry;var u$=ul();_.retryWhen=u$.retryWhen;var c$=ho();_.refCount=c$.refCount;var l$=cl();_.sample=l$.sample;var f$=ll();_.sampleTime=f$.sampleTime;var h$=uo();_.scan=h$.scan;var p$=fl();_.sequenceEqual=p$.sequenceEqual;var d$=hl();_.share=d$.share;var v$=pl();_.shareReplay=v$.shareReplay;var b$=dl();_.single=b$.single;var m$=vl();_.skip=m$.skip;var y$=bl();_.skipLast=y$.skipLast;var _$=ml();_.skipUntil=_$.skipUntil;var g$=yl();_.skipWhile=g$.skipWhile;var w$=gl();_.startWith=w$.startWith;var S$=xl();_.switchAll=S$.switchAll;var O$=jo();_.switchMap=O$.switchMap;var x$=ql();_.switchMapTo=x$.switchMapTo;var q$=Tl();_.take=q$.take;var T$=lo();_.takeLast=T$.takeLast;var C$=Cl();_.takeUntil=C$.takeUntil;var I$=Il();_.takeWhile=I$.takeWhile;var A$=gc();_.tap=A$.tap;var E$=_i();_.throttle=E$.throttle;var j$=Al();_.throttleTime=j$.throttleTime;var k$=El();_.timeInterval=k$.timeInterval;var R$=Pl();_.timeout=R$.timeout;var P$=Nl();_.timeoutWith=P$.timeoutWith;var N$=Lo();_.timestamp=N$.timestamp;var F$=Ml();_.toArray=F$.toArray;var M$=Ul();_.window=M$.window;var U$=Zl();_.windowCount=U$.windowCount;var Z$=Dl();_.windowTime=Z$.windowTime;var L$=zl();_.windowToggle=L$.windowToggle;var D$=Wl();_.windowWhen=D$.windowWhen;var V$=Bl();_.withLatestFrom=V$.withLatestFrom;var z$=li();_.zip=z$.zip;var W$=$l();_.zipAll=W$.zipAll});var i0=u(L=>{"use strict";var r0=K();L.Subject=r0.Subject;L.AnonymousSubject=r0.AnonymousSubject;var B$=v();L.Observable=B$.Observable;nd();ld();qd();Wd();Yd();Xd();nv();sv();fv();vv();yv();Ov();Iv();Uv();Lv();zv();Hv();Jv();Qv();ib();ab();hb();bb();wb();Ib();Vb();tm();nm();cm();dm();ym();Sm();Cm();jm();Pm();Fm();Zm();zm();Hm();Km();Qm();ry();sy();uy();hy();by();Sy();Ty();Ey();Fy();Zy();Vy();Jy();Xy();t_();o_();f_();v_();y_();A_();k_();N_();Z_();z_();$_();G_();eg();ig();og();cg();mg();_g();Sg();Cg();Pg();Lg();Wg();Kg();Qg();rw();sw();hw();bw();Sw();Tw();Ew();Pw();Mw();Dw();Bw();Jw();Gw();tS();nS();aS();fS();_S();OS();CS();ES();RS();MS();LS();zS();HS();s1();f1();d1();m1();g1();O1();T1();A1();R1();F1();Z1();V1();B1();Y1();Q1();eO();nO();uO();vO();gO();xO();CO();EO();PO();var $$=J();L.Subscription=$$.Subscription;var H$=C();L.Subscriber=H$.Subscriber;var J$=ri();L.AsyncSubject=J$.AsyncSubject;var Y$=pi();L.ReplaySubject=Y$.ReplaySubject;var K$=Qc();L.BehaviorSubject=K$.BehaviorSubject;var G$=Hc();L.ConnectableObservable=G$.ConnectableObservable;var X$=nr();L.Notification=X$.Notification;var Q$=vi();L.EmptyError=Q$.EmptyError;var eH=vr();L.ArgumentOutOfRangeError=eH.ArgumentOutOfRangeError;var tH=ei();L.ObjectUnsubscribedError=tH.ObjectUnsubscribedError;var rH=Rl();L.TimeoutError=rH.TimeoutError;var iH=qu();L.UnsubscriptionError=iH.UnsubscriptionError;var nH=kl();L.TimeInterval=nH.TimeInterval;var sH=Lo();L.Timestamp=sH.Timestamp;var oH=HO();L.TestScheduler=oH.TestScheduler;var aH=Kl();L.VirtualTimeScheduler=aH.VirtualTimeScheduler;var Ql=Ku();L.AjaxResponse=Ql.AjaxResponse;L.AjaxError=Ql.AjaxError;L.AjaxTimeoutError=Ql.AjaxTimeoutError;var uH=An();L.pipe=uH.pipe;var cH=Sl(),lH=W(),fH=Gu(),hH=e0(),pH=Gr(),dH=rr(),vH=Qr(),bH=t0();L.operators=bH;var mH={asap:cH.asap,queue:fH.queue,animationFrame:hH.animationFrame,async:lH.async};L.Scheduler=mH;var yH={rxSubscriber:pH.rxSubscriber,observable:vH.observable,iterator:dH.iterator};L.Symbol=yH});var Sr=(t=>(t[t.Published=0]="Published",t[t.Prebuilt=1]="Prebuilt",t))(Sr||{});var Or=(q=>(q[q.Unknown=-1]="Unknown",q[q.Exp=0]="Exp",q[q.Dev=1]="Dev",q[q.Test=2]="Test",q[q.Preprod=3]="Preprod",q[q.FirstRelease=4]="FirstRelease",q[q.Prod=5]="Prod",q[q.Gov=6]="Gov",q[q.High=7]="High",q[q.DoD=8]="DoD",q[q.Mooncake=9]="Mooncake",q[q.Ex=10]="Ex",q[q.Rx=11]="Rx",q[q.Prv=12]="Prv",q[q.Local=13]="Local",q[q.GovFR=14]="GovFR",q[q.Other=100]="Other",q))(Or||{});var ef=class{constructor(){this.appClientId="";this.tenantId="";this.environmentId="";this.useExperimentalEndpoint=!1}},xH=()=>{var t,i,n,s;let r=process.env.cloud,e=process.env.copilotAgentType;return{appClientId:(t=process.env.appClientId)!=null?t:"",tenantId:(i=process.env.tenantId)!=null?i:"",environmentId:(n=process.env.environmentId)!=null?n:"",cloud:r?Or[r]:5,customPowerPlatformCloud:process.env.customPowerPlatformCloud,agentIdentifier:process.env.agentIdentifier,copilotAgentType:e?Sr[e]:0,directConnectUrl:process.env.directConnectUrl,useExperimentalEndpoint:((s=process.env.useExperimentalEndpoint)==null?void 0:s.toLocaleLowerCase())==="true"}};function xr(r,e){return function(){return r.apply(e,arguments)}}var{toString:h0}=Object.prototype,{getPrototypeOf:ta}=Object,{iterator:qi,toStringTag:rf}=Symbol,Ti=(r=>e=>{let t=h0.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),ge=r=>(r=r.toLowerCase(),e=>Ti(e)===r),Ci=r=>e=>typeof e===r,{isArray:xt}=Array,qr=Ci("undefined");function p0(r){return r!==null&&!qr(r)&&r.constructor!==null&&!qr(r.constructor)&&ae(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}var nf=ge("ArrayBuffer");function d0(r){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&nf(r.buffer),e}var v0=Ci("string"),ae=Ci("function"),sf=Ci("number"),Ii=r=>r!==null&&typeof r=="object",b0=r=>r===!0||r===!1,xi=r=>{if(Ti(r)!=="object")return!1;let e=ta(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(rf in r)&&!(qi in r)},m0=ge("Date"),y0=ge("File"),_0=ge("Blob"),g0=ge("FileList"),w0=r=>Ii(r)&&ae(r.pipe),S0=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||ae(r.append)&&((e=Ti(r))==="formdata"||e==="object"&&ae(r.toString)&&r.toString()==="[object FormData]"))},O0=ge("URLSearchParams"),[x0,q0,T0,C0]=["ReadableStream","Request","Response","Headers"].map(ge),I0=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Tr(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r=="undefined")return;let i,n;if(typeof r!="object"&&(r=[r]),xt(r))for(i=0,n=r.length;i<n;i++)e.call(null,r[i],i,r);else{let s=t?Object.getOwnPropertyNames(r):Object.keys(r),o=s.length,a;for(i=0;i<o;i++)a=s[i],e.call(null,r[a],a,r)}}function of(r,e){e=e.toLowerCase();let t=Object.keys(r),i=t.length,n;for(;i-- >0;)if(n=t[i],e===n.toLowerCase())return n;return null}var Xe=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,af=r=>!qr(r)&&r!==Xe;function ea(){let{caseless:r}=af(this)&&this||{},e={},t=(i,n)=>{let s=r&&of(e,n)||n;xi(e[s])&&xi(i)?e[s]=ea(e[s],i):xi(i)?e[s]=ea({},i):xt(i)?e[s]=i.slice():e[s]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&Tr(arguments[i],t);return e}var A0=(r,e,t,{allOwnKeys:i}={})=>(Tr(e,(n,s)=>{t&&ae(n)?r[s]=xr(n,t):r[s]=n},{allOwnKeys:i}),r),E0=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),j0=(r,e,t,i)=>{r.prototype=Object.create(e.prototype,i),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},k0=(r,e,t,i)=>{let n,s,o,a={};if(e=e||{},r==null)return e;do{for(n=Object.getOwnPropertyNames(r),s=n.length;s-- >0;)o=n[s],(!i||i(o,r,e))&&!a[o]&&(e[o]=r[o],a[o]=!0);r=t!==!1&&ta(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},R0=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;let i=r.indexOf(e,t);return i!==-1&&i===t},P0=r=>{if(!r)return null;if(xt(r))return r;let e=r.length;if(!sf(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},N0=(r=>e=>r&&e instanceof r)(typeof Uint8Array!="undefined"&&ta(Uint8Array)),F0=(r,e)=>{let i=(r&&r[qi]).call(r),n;for(;(n=i.next())&&!n.done;){let s=n.value;e.call(r,s[0],s[1])}},M0=(r,e)=>{let t,i=[];for(;(t=r.exec(e))!==null;)i.push(t);return i},U0=ge("HTMLFormElement"),Z0=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,i,n){return i.toUpperCase()+n}),tf=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),L0=ge("RegExp"),uf=(r,e)=>{let t=Object.getOwnPropertyDescriptors(r),i={};Tr(t,(n,s)=>{let o;(o=e(n,s,r))!==!1&&(i[s]=o||n)}),Object.defineProperties(r,i)},D0=r=>{uf(r,(e,t)=>{if(ae(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let i=r[t];if(ae(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},V0=(r,e)=>{let t={},i=n=>{n.forEach(s=>{t[s]=!0})};return xt(r)?i(r):i(String(r).split(e)),t},z0=()=>{},W0=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e;function B0(r){return!!(r&&ae(r.append)&&r[rf]==="FormData"&&r[qi])}var $0=r=>{let e=new Array(10),t=(i,n)=>{if(Ii(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[n]=i;let s=xt(i)?[]:{};return Tr(i,(o,a)=>{let c=t(o,n+1);!qr(c)&&(s[a]=c)}),e[n]=void 0,s}}return i};return t(r,0)},H0=ge("AsyncFunction"),J0=r=>r&&(Ii(r)||ae(r))&&ae(r.then)&&ae(r.catch),cf=((r,e)=>r?setImmediate:e?((t,i)=>(Xe.addEventListener("message",({source:n,data:s})=>{n===Xe&&s===t&&i.length&&i.shift()()},!1),n=>{i.push(n),Xe.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",ae(Xe.postMessage)),Y0=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Xe):typeof process!="undefined"&&process.nextTick||cf,K0=r=>r!=null&&ae(r[qi]),b={isArray:xt,isArrayBuffer:nf,isBuffer:p0,isFormData:S0,isArrayBufferView:d0,isString:v0,isNumber:sf,isBoolean:b0,isObject:Ii,isPlainObject:xi,isReadableStream:x0,isRequest:q0,isResponse:T0,isHeaders:C0,isUndefined:qr,isDate:m0,isFile:y0,isBlob:_0,isRegExp:L0,isFunction:ae,isStream:w0,isURLSearchParams:O0,isTypedArray:N0,isFileList:g0,forEach:Tr,merge:ea,extend:A0,trim:I0,stripBOM:E0,inherits:j0,toFlatObject:k0,kindOf:Ti,kindOfTest:ge,endsWith:R0,toArray:P0,forEachEntry:F0,matchAll:M0,isHTMLForm:U0,hasOwnProperty:tf,hasOwnProp:tf,reduceDescriptors:uf,freezeMethods:D0,toObjectSet:V0,toCamelCase:Z0,noop:z0,toFiniteNumber:W0,findKey:of,global:Xe,isContextDefined:af,isSpecCompliantForm:B0,toJSONObject:$0,isAsyncFn:H0,isThenable:J0,setImmediate:cf,asap:Y0,isIterable:K0};function qt(r,e,t,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),i&&(this.request=i),n&&(this.response=n,this.status=n.status?n.status:null)}b.inherits(qt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:b.toJSONObject(this.config),code:this.code,status:this.status}}});var lf=qt.prototype,ff={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{ff[r]={value:r}});Object.defineProperties(qt,ff);Object.defineProperty(lf,"isAxiosError",{value:!0});qt.from=(r,e,t,i,n,s)=>{let o=Object.create(lf);return b.toFlatObject(r,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),qt.call(o,r.message,e,t,i,n),o.cause=r,o.name=r.name,s&&Object.assign(o,s),o};var E=qt;var Ai=null;function ra(r){return b.isPlainObject(r)||b.isArray(r)}function pf(r){return b.endsWith(r,"[]")?r.slice(0,-2):r}function hf(r,e,t){return r?r.concat(e).map(function(n,s){return n=pf(n),!t&&s?"["+n+"]":n}).join(t?".":""):e}function G0(r){return b.isArray(r)&&!r.some(ra)}var X0=b.toFlatObject(b,{},null,function(e){return/^is[A-Z]/.test(e)});function Q0(r,e,t){if(!b.isObject(r))throw new TypeError("target must be an object");e=e||new(Ai||FormData),t=b.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(O,S){return!b.isUndefined(S[O])});let i=t.metaTokens,n=t.visitor||f,s=t.dots,o=t.indexes,c=(t.Blob||typeof Blob!="undefined"&&Blob)&&b.isSpecCompliantForm(e);if(!b.isFunction(n))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(b.isDate(m))return m.toISOString();if(b.isBoolean(m))return m.toString();if(!c&&b.isBlob(m))throw new E("Blob is not supported. Use a Buffer instead.");return b.isArrayBuffer(m)||b.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function f(m,O,S){let q=m;if(m&&!S&&typeof m=="object"){if(b.endsWith(O,"{}"))O=i?O:O.slice(0,-2),m=JSON.stringify(m);else if(b.isArray(m)&&G0(m)||(b.isFileList(m)||b.endsWith(O,"[]"))&&(q=b.toArray(m)))return O=pf(O),q.forEach(function(U,D){!(b.isUndefined(U)||U===null)&&e.append(o===!0?hf([O],D,s):o===null?O:O+"[]",l(U))}),!1}return ra(m)?!0:(e.append(hf(S,O,s),l(m)),!1)}let p=[],y=Object.assign(X0,{defaultVisitor:f,convertValue:l,isVisitable:ra});function g(m,O){if(!b.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+O.join("."));p.push(m),b.forEach(m,function(q,F){(!(b.isUndefined(q)||q===null)&&n.call(e,q,b.isString(F)?F.trim():F,O,y))===!0&&g(q,O?O.concat(F):[F])}),p.pop()}}if(!b.isObject(r))throw new TypeError("data must be an object");return g(r),e}var Ze=Q0;function df(r){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function vf(r,e){this._pairs=[],r&&Ze(r,this,e)}var bf=vf.prototype;bf.append=function(e,t){this._pairs.push([e,t])};bf.toString=function(e){let t=e?function(i){return e.call(this,i,df)}:df;return this._pairs.map(function(n){return t(n[0])+"="+t(n[1])},"").join("&")};var Ei=vf;function ex(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Cr(r,e,t){if(!e)return r;let i=t&&t.encode||ex;b.isFunction(t)&&(t={serialize:t});let n=t&&t.serialize,s;if(n?s=n(e,t):s=b.isURLSearchParams(e)?e.toString():new Ei(e,t).toString(i),s){let o=r.indexOf("#");o!==-1&&(r=r.slice(0,o)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}var ia=class{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){b.forEach(this.handlers,function(i){i!==null&&e(i)})}},na=ia;var ji={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var mf=typeof URLSearchParams!="undefined"?URLSearchParams:Ei;var yf=typeof FormData!="undefined"?FormData:null;var _f=typeof Blob!="undefined"?Blob:null;var gf={isBrowser:!0,classes:{URLSearchParams:mf,FormData:yf,Blob:_f},protocols:["http","https","file","blob","url","data"]};var aa={};l0(aa,{hasBrowserEnv:()=>oa,hasStandardBrowserEnv:()=>tx,hasStandardBrowserWebWorkerEnv:()=>rx,navigator:()=>sa,origin:()=>ix});var oa=typeof window!="undefined"&&typeof document!="undefined",sa=typeof navigator=="object"&&navigator||void 0,tx=oa&&(!sa||["ReactNative","NativeScript","NS"].indexOf(sa.product)<0),rx=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ix=oa&&window.location.href||"http://localhost";var B={...aa,...gf};function ua(r,e){return Ze(r,new B.classes.URLSearchParams,Object.assign({visitor:function(t,i,n,s){return B.isNode&&b.isBuffer(t)?(this.append(i,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function nx(r){return b.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function sx(r){let e={},t=Object.keys(r),i,n=t.length,s;for(i=0;i<n;i++)s=t[i],e[s]=r[s];return e}function ox(r){function e(t,i,n,s){let o=t[s++];if(o==="__proto__")return!0;let a=Number.isFinite(+o),c=s>=t.length;return o=!o&&b.isArray(n)?n.length:o,c?(b.hasOwnProp(n,o)?n[o]=[n[o],i]:n[o]=i,!a):((!n[o]||!b.isObject(n[o]))&&(n[o]=[]),e(t,i,n[o],s)&&b.isArray(n[o])&&(n[o]=sx(n[o])),!a)}if(b.isFormData(r)&&b.isFunction(r.entries)){let t={};return b.forEachEntry(r,(i,n)=>{e(nx(i),n,t,0)}),t}return null}var ki=ox;function ax(r,e,t){if(b.isString(r))try{return(e||JSON.parse)(r),b.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(t||JSON.stringify)(r)}var ca={transitional:ji,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let i=t.getContentType()||"",n=i.indexOf("application/json")>-1,s=b.isObject(e);if(s&&b.isHTMLForm(e)&&(e=new FormData(e)),b.isFormData(e))return n?JSON.stringify(ki(e)):e;if(b.isArrayBuffer(e)||b.isBuffer(e)||b.isStream(e)||b.isFile(e)||b.isBlob(e)||b.isReadableStream(e))return e;if(b.isArrayBufferView(e))return e.buffer;if(b.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return ua(e,this.formSerializer).toString();if((a=b.isFileList(e))||i.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return Ze(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return s||n?(t.setContentType("application/json",!1),ax(e)):e}],transformResponse:[function(e){let t=this.transitional||ca.transitional,i=t&&t.forcedJSONParsing,n=this.responseType==="json";if(b.isResponse(e)||b.isReadableStream(e))return e;if(e&&b.isString(e)&&(i&&!this.responseType||n)){let o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?E.from(a,E.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:B.classes.FormData,Blob:B.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};b.forEach(["delete","get","head","post","put","patch"],r=>{ca.headers[r]={}});var Tt=ca;var ux=b.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),wf=r=>{let e={},t,i,n;return r&&r.split(`
|
|
4
|
+
`).forEach(function(o){n=o.indexOf(":"),t=o.substring(0,n).trim().toLowerCase(),i=o.substring(n+1).trim(),!(!t||e[t]&&ux[t])&&(t==="set-cookie"?e[t]?e[t].push(i):e[t]=[i]:e[t]=e[t]?e[t]+", "+i:i)}),e};var Sf=Symbol("internals");function Ir(r){return r&&String(r).trim().toLowerCase()}function Ri(r){return r===!1||r==null?r:b.isArray(r)?r.map(Ri):String(r)}function cx(r){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=t.exec(r);)e[i[1]]=i[2];return e}var lx=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function la(r,e,t,i,n){if(b.isFunction(i))return i.call(this,e,t);if(n&&(e=t),!!b.isString(e)){if(b.isString(i))return e.indexOf(i)!==-1;if(b.isRegExp(i))return i.test(e)}}function fx(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,i)=>t.toUpperCase()+i)}function hx(r,e){let t=b.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(r,i+t,{value:function(n,s,o){return this[i].call(this,e,n,s,o)},configurable:!0})})}var Ct=class{constructor(e){e&&this.set(e)}set(e,t,i){let n=this;function s(a,c,l){let f=Ir(c);if(!f)throw new Error("header name must be a non-empty string");let p=b.findKey(n,f);(!p||n[p]===void 0||l===!0||l===void 0&&n[p]!==!1)&&(n[p||c]=Ri(a))}let o=(a,c)=>b.forEach(a,(l,f)=>s(l,f,c));if(b.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(b.isString(e)&&(e=e.trim())&&!lx(e))o(wf(e),t);else if(b.isObject(e)&&b.isIterable(e)){let a={},c,l;for(let f of e){if(!b.isArray(f))throw TypeError("Object iterator must return a key-value pair");a[l=f[0]]=(c=a[l])?b.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}o(a,t)}else e!=null&&s(t,e,i);return this}get(e,t){if(e=Ir(e),e){let i=b.findKey(this,e);if(i){let n=this[i];if(!t)return n;if(t===!0)return cx(n);if(b.isFunction(t))return t.call(this,n,i);if(b.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ir(e),e){let i=b.findKey(this,e);return!!(i&&this[i]!==void 0&&(!t||la(this,this[i],i,t)))}return!1}delete(e,t){let i=this,n=!1;function s(o){if(o=Ir(o),o){let a=b.findKey(i,o);a&&(!t||la(i,i[a],a,t))&&(delete i[a],n=!0)}}return b.isArray(e)?e.forEach(s):s(e),n}clear(e){let t=Object.keys(this),i=t.length,n=!1;for(;i--;){let s=t[i];(!e||la(this,this[s],s,e,!0))&&(delete this[s],n=!0)}return n}normalize(e){let t=this,i={};return b.forEach(this,(n,s)=>{let o=b.findKey(i,s);if(o){t[o]=Ri(n),delete t[s];return}let a=e?fx(s):String(s).trim();a!==s&&delete t[s],t[a]=Ri(n),i[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return b.forEach(this,(i,n)=>{i!=null&&i!==!1&&(t[n]=e&&b.isArray(i)?i.join(", "):i)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
|
5
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let i=new this(e);return t.forEach(n=>i.set(n)),i}static accessor(e){let i=(this[Sf]=this[Sf]={accessors:{}}).accessors,n=this.prototype;function s(o){let a=Ir(o);i[a]||(hx(n,o),i[a]=!0)}return b.isArray(e)?e.forEach(s):s(e),this}};Ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);b.reduceDescriptors(Ct.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(i){this[t]=i}}});b.freezeMethods(Ct);var H=Ct;function Ar(r,e){let t=this||Tt,i=e||t,n=H.from(i.headers),s=i.data;return b.forEach(r,function(a){s=a.call(t,s,n.normalize(),e?e.status:void 0)}),n.normalize(),s}function Er(r){return!!(r&&r.__CANCEL__)}function Of(r,e,t){E.call(this,r==null?"canceled":r,E.ERR_CANCELED,e,t),this.name="CanceledError"}b.inherits(Of,E,{__CANCEL__:!0});var xe=Of;function jr(r,e,t){let i=t.config.validateStatus;!t.status||!i||i(t.status)?r(t):e(new E("Request failed with status code "+t.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function fa(r){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function px(r,e){r=r||10;let t=new Array(r),i=new Array(r),n=0,s=0,o;return e=e!==void 0?e:1e3,function(c){let l=Date.now(),f=i[s];o||(o=l),t[n]=c,i[n]=l;let p=s,y=0;for(;p!==n;)y+=t[p++],p=p%r;if(n=(n+1)%r,n===s&&(s=(s+1)%r),l-o<e)return;let g=f&&l-f;return g?Math.round(y*1e3/g):void 0}}var xf=px;function dx(r,e){let t=0,i=1e3/e,n,s,o=(l,f=Date.now())=>{t=f,n=null,s&&(clearTimeout(s),s=null),r.apply(null,l)};return[(...l)=>{let f=Date.now(),p=f-t;p>=i?o(l,f):(n=l,s||(s=setTimeout(()=>{s=null,o(n)},i-p)))},()=>n&&o(n)]}var qf=dx;var It=(r,e,t=3)=>{let i=0,n=xf(50,250);return qf(s=>{let o=s.loaded,a=s.lengthComputable?s.total:void 0,c=o-i,l=n(c),f=o<=a;i=o;let p={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&f?(a-o)/l:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};r(p)},t)},ha=(r,e)=>{let t=r!=null;return[i=>e[0]({lengthComputable:t,total:r,loaded:i}),e[1]]},pa=r=>(...e)=>b.asap(()=>r(...e));var Tf=B.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,B.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(B.origin),B.navigator&&/(msie|trident)/i.test(B.navigator.userAgent)):()=>!0;var Cf=B.hasStandardBrowserEnv?{write(r,e,t,i,n,s){let o=[r+"="+encodeURIComponent(e)];b.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),b.isString(i)&&o.push("path="+i),b.isString(n)&&o.push("domain="+n),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(r){let e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function da(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function va(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function kr(r,e,t){let i=!da(e);return r&&(i||t==!1)?va(r,e):e}var If=r=>r instanceof H?{...r}:r;function we(r,e){e=e||{};let t={};function i(l,f,p,y){return b.isPlainObject(l)&&b.isPlainObject(f)?b.merge.call({caseless:y},l,f):b.isPlainObject(f)?b.merge({},f):b.isArray(f)?f.slice():f}function n(l,f,p,y){if(b.isUndefined(f)){if(!b.isUndefined(l))return i(void 0,l,p,y)}else return i(l,f,p,y)}function s(l,f){if(!b.isUndefined(f))return i(void 0,f)}function o(l,f){if(b.isUndefined(f)){if(!b.isUndefined(l))return i(void 0,l)}else return i(void 0,f)}function a(l,f,p){if(p in e)return i(l,f);if(p in r)return i(void 0,l)}let c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,f,p)=>n(If(l),If(f),p,!0)};return b.forEach(Object.keys(Object.assign({},r,e)),function(f){let p=c[f]||n,y=p(r[f],e[f],f);b.isUndefined(y)&&p!==a||(t[f]=y)}),t}var Pi=r=>{let e=we({},r),{data:t,withXSRFToken:i,xsrfHeaderName:n,xsrfCookieName:s,headers:o,auth:a}=e;e.headers=o=H.from(o),e.url=Cr(kr(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(b.isFormData(t)){if(B.hasStandardBrowserEnv||B.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){let[l,...f]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...f].join("; "))}}if(B.hasStandardBrowserEnv&&(i&&b.isFunction(i)&&(i=i(e)),i||i!==!1&&Tf(e.url))){let l=n&&s&&Cf.read(s);l&&o.set(n,l)}return e};var vx=typeof XMLHttpRequest!="undefined",Af=vx&&function(r){return new Promise(function(t,i){let n=Pi(r),s=n.data,o=H.from(n.headers).normalize(),{responseType:a,onUploadProgress:c,onDownloadProgress:l}=n,f,p,y,g,m;function O(){g&&g(),m&&m(),n.cancelToken&&n.cancelToken.unsubscribe(f),n.signal&&n.signal.removeEventListener("abort",f)}let S=new XMLHttpRequest;S.open(n.method.toUpperCase(),n.url,!0),S.timeout=n.timeout;function q(){if(!S)return;let U=H.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),oe={data:!a||a==="text"||a==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:U,config:r,request:S};jr(function(Ee){t(Ee),O()},function(Ee){i(Ee),O()},oe),S=null}"onloadend"in S?S.onloadend=q:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(q)},S.onabort=function(){S&&(i(new E("Request aborted",E.ECONNABORTED,r,S)),S=null)},S.onerror=function(){i(new E("Network Error",E.ERR_NETWORK,r,S)),S=null},S.ontimeout=function(){let D=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",oe=n.transitional||ji;n.timeoutErrorMessage&&(D=n.timeoutErrorMessage),i(new E(D,oe.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,r,S)),S=null},s===void 0&&o.setContentType(null),"setRequestHeader"in S&&b.forEach(o.toJSON(),function(D,oe){S.setRequestHeader(oe,D)}),b.isUndefined(n.withCredentials)||(S.withCredentials=!!n.withCredentials),a&&a!=="json"&&(S.responseType=n.responseType),l&&([y,m]=It(l,!0),S.addEventListener("progress",y)),c&&S.upload&&([p,g]=It(c),S.upload.addEventListener("progress",p),S.upload.addEventListener("loadend",g)),(n.cancelToken||n.signal)&&(f=U=>{S&&(i(!U||U.type?new xe(null,r,S):U),S.abort(),S=null)},n.cancelToken&&n.cancelToken.subscribe(f),n.signal&&(n.signal.aborted?f():n.signal.addEventListener("abort",f)));let F=fa(n.url);if(F&&B.protocols.indexOf(F)===-1){i(new E("Unsupported protocol "+F+":",E.ERR_BAD_REQUEST,r));return}S.send(s||null)})};var bx=(r,e)=>{let{length:t}=r=r?r.filter(Boolean):[];if(e||t){let i=new AbortController,n,s=function(l){if(!n){n=!0,a();let f=l instanceof Error?l:this.reason;i.abort(f instanceof E?f:new xe(f instanceof Error?f.message:f))}},o=e&&setTimeout(()=>{o=null,s(new E(`timeout ${e} of ms exceeded`,E.ETIMEDOUT))},e),a=()=>{r&&(o&&clearTimeout(o),o=null,r.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),r=null)};r.forEach(l=>l.addEventListener("abort",s));let{signal:c}=i;return c.unsubscribe=()=>b.asap(a),c}},Ef=bx;var mx=function*(r,e){let t=r.byteLength;if(!e||t<e){yield r;return}let i=0,n;for(;i<t;)n=i+e,yield r.slice(i,n),i=n},yx=async function*(r,e){for await(let t of _x(r))yield*mx(t,e)},_x=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}let e=r.getReader();try{for(;;){let{done:t,value:i}=await e.read();if(t)break;yield i}}finally{await e.cancel()}},ba=(r,e,t,i)=>{let n=yx(r,e),s=0,o,a=c=>{o||(o=!0,i&&i(c))};return new ReadableStream({async pull(c){try{let{done:l,value:f}=await n.next();if(l){a(),c.close();return}let p=f.byteLength;if(t){let y=s+=p;t(y)}c.enqueue(new Uint8Array(f))}catch(l){throw a(l),l}},cancel(c){return a(c),n.return()}},{highWaterMark:2})};var Fi=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",kf=Fi&&typeof ReadableStream=="function",gx=Fi&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),Rf=(r,...e)=>{try{return!!r(...e)}catch{return!1}},wx=kf&&Rf(()=>{let r=!1,e=new Request(B.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),jf=64*1024,ma=kf&&Rf(()=>b.isReadableStream(new Response("").body)),Ni={stream:ma&&(r=>r.body)};Fi&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ni[e]&&(Ni[e]=b.isFunction(r[e])?t=>t[e]():(t,i)=>{throw new E(`Response type '${e}' is not supported`,E.ERR_NOT_SUPPORT,i)})})})(new Response);var Sx=async r=>{if(r==null)return 0;if(b.isBlob(r))return r.size;if(b.isSpecCompliantForm(r))return(await new Request(B.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(b.isArrayBufferView(r)||b.isArrayBuffer(r))return r.byteLength;if(b.isURLSearchParams(r)&&(r=r+""),b.isString(r))return(await gx(r)).byteLength},Ox=async(r,e)=>{let t=b.toFiniteNumber(r.getContentLength());return t==null?Sx(e):t},Pf=Fi&&(async r=>{let{url:e,method:t,data:i,signal:n,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:f,withCredentials:p="same-origin",fetchOptions:y}=Pi(r);l=l?(l+"").toLowerCase():"text";let g=Ef([n,s&&s.toAbortSignal()],o),m,O=g&&g.unsubscribe&&(()=>{g.unsubscribe()}),S;try{if(c&&wx&&t!=="get"&&t!=="head"&&(S=await Ox(f,i))!==0){let oe=new Request(e,{method:"POST",body:i,duplex:"half"}),de;if(b.isFormData(i)&&(de=oe.headers.get("content-type"))&&f.setContentType(de),oe.body){let[Ee,Ge]=ha(S,It(pa(c)));i=ba(oe.body,jf,Ee,Ge)}}b.isString(p)||(p=p?"include":"omit");let q="credentials"in Request.prototype;m=new Request(e,{...y,signal:g,method:t.toUpperCase(),headers:f.normalize().toJSON(),body:i,duplex:"half",credentials:q?p:void 0});let F=await fetch(m,y),U=ma&&(l==="stream"||l==="response");if(ma&&(a||U&&O)){let oe={};["status","statusText","headers"].forEach(Oi=>{oe[Oi]=F[Oi]});let de=b.toFiniteNumber(F.headers.get("content-length")),[Ee,Ge]=a&&ha(de,It(pa(a),!0))||[];F=new Response(ba(F.body,jf,Ee,()=>{Ge&&Ge(),O&&O()}),oe)}l=l||"text";let D=await Ni[b.findKey(Ni,l)||"text"](F,r);return!U&&O&&O(),await new Promise((oe,de)=>{jr(oe,de,{data:D,headers:H.from(F.headers),status:F.status,statusText:F.statusText,config:r,request:m})})}catch(q){throw O&&O(),q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,r,m),{cause:q.cause||q}):E.from(q,q&&q.code,r,m)}});var ya={http:Ai,xhr:Af,fetch:Pf};b.forEach(ya,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});var Nf=r=>`- ${r}`,xx=r=>b.isFunction(r)||r===null||r===!1,Mi={getAdapter:r=>{r=b.isArray(r)?r:[r];let{length:e}=r,t,i,n={};for(let s=0;s<e;s++){t=r[s];let o;if(i=t,!xx(t)&&(i=ya[(o=String(t)).toLowerCase()],i===void 0))throw new E(`Unknown adapter '${o}'`);if(i)break;n[o||"#"+s]=i}if(!i){let s=Object.entries(n).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build")),o=e?s.length>1?`since :
|
|
6
6
|
`+s.map(Nf).join(`
|
|
7
|
-
`):" "+Nf(s[0]):"as no adapter specified";throw new
|
|
8
|
-
`+s):i.stack=s}catch{}}throw i}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=we(this.defaults,t);let{transitional:i,paramsSerializer:n,headers:s}=t;i!==void 0&&Pr.assertOptions(i,{silentJSONParsing:qe.transitional(qe.boolean),forcedJSONParsing:qe.transitional(qe.boolean),clarifyTimeoutError:qe.transitional(qe.boolean)},!1),n!=null&&(b.isFunction(n)?t.paramsSerializer={serialize:n}:Pr.assertOptions(n,{encode:qe.function,serialize:qe.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Pr.assertOptions(t,{baseUrl:qe.spelling("baseURL"),withXsrfToken:qe.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&b.merge(s.common,s[t.method]);s&&b.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),t.headers=H.concat(o,s);let a=[],c=!0;this.interceptors.request.forEach(function(O){typeof O.runWhen=="function"&&O.runWhen(t)===!1||(c=c&&O.synchronous,a.unshift(O.fulfilled,O.rejected))});let l=[];this.interceptors.response.forEach(function(O){l.push(O.fulfilled,O.rejected)});let f,p=0,y;if(!c){let m=[Ui.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,l),y=m.length,f=Promise.resolve(t);p<y;)f=f.then(m[p++],m[p++]);return f}y=a.length;let g=t;for(p=0;p<y;){let m=a[p++],O=a[p++];try{g=m(g)}catch(S){O.call(this,S);break}}try{f=Ui.call(this,g)}catch(m){return Promise.reject(m)}for(p=0,y=l.length;p<y;)f=f.then(l[p++],l[p++]);return f}getUri(e){e=we(this.defaults,e);let t=Rr(e.baseURL,e.url,e.allowAbsoluteUrls);return Ir(t,e.params,e.paramsSerializer)}};b.forEach(["delete","get","head","options"],function(e){jt.prototype[e]=function(t,i){return this.request(we(i||{},{method:e,url:t,data:(i||{}).data}))}});b.forEach(["post","put","patch"],function(e){function t(i){return function(s,o,a){return this.request(we(a||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}jt.prototype[e]=t(),jt.prototype[e+"Form"]=t(!0)});var Nr=jt;var _a=class r{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(s){t=s});let i=this;this.promise.then(n=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](n);i._listeners=null}),this.promise.then=n=>{let s,o=new Promise(a=>{i.subscribe(a),s=a}).then(n);return o.cancel=function(){i.unsubscribe(s)},o},e(function(s,o,a){i.reason||(i.reason=new xe(s,o,a),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=i=>{e.abort(i)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new r(function(n){e=n}),cancel:e}}},Mf=_a;function ga(r){return function(t){return r.apply(null,t)}}function wa(r){return b.isObject(r)&&r.isAxiosError===!0}var Sa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Sa).forEach(([r,e])=>{Sa[e]=r});var Uf=Sa;function Zf(r){let e=new Nr(r),t=qr(Nr.prototype.request,e);return b.extend(t,Nr.prototype,e,{allOwnKeys:!0}),b.extend(t,e,null,{allOwnKeys:!0}),t.create=function(n){return Zf(we(r,n))},t}var $=Zf(Ct);$.Axios=Nr;$.CanceledError=xe;$.CancelToken=Mf;$.isCancel=Er;$.VERSION=Zi;$.toFormData=Le;$.AxiosError=j;$.Cancel=$.CanceledError;$.all=function(e){return Promise.all(e)};$.spread=ga;$.isAxiosError=wa;$.mergeConfig=we;$.AxiosHeaders=H;$.formToJSON=r=>ki(b.isHTMLForm(r)?new FormData(r):r);$.getAdapter=Mi.getAdapter;$.HttpStatusCode=Uf;$.default=$;var Vi=$;var{Axios:EY,AxiosError:kY,CanceledError:RY,isCancel:PY,CancelToken:NY,VERSION:FY,all:MY,Cancel:UY,isAxiosError:ZY,spread:LY,toFormData:VY,AxiosHeaders:DY,HttpStatusCode:zY,formToJSON:WY,getAdapter:BY,mergeConfig:$Y}=Vi;var Di=class{constructor(e){this.API_VERSION="2022-03-01-preview";let{identifier:t,host:i}=e;this.baseURL=new URL(`/copilotstudio/prebuilt/authenticated/bots/${t}`,i),this.baseURL.searchParams.append("api-version",this.API_VERSION)}getConversationUrl(e){let t=new URL(this.baseURL.href);return t.pathname=`${t.pathname}/conversations`,e&&(t.pathname=`${t.pathname}/${e}`),t.href}};var zi=class{constructor(e){this.API_VERSION="2022-03-01-preview";let{schema:t,host:i}=e;this.baseURL=new URL(`/copilotstudio/dataverse-backed/authenticated/bots/${t}`,i),this.baseURL.searchParams.append("api-version",this.API_VERSION)}getConversationUrl(e){let t=new URL(this.baseURL.href);return t.pathname=`${t.pathname}/conversations`,e&&(t.pathname=`${t.pathname}/${e}`),t.href}};function Wi(r,e){var l,f;let t=5;if((l=r.directConnectUrl)!=null&&l.trim()){if(!Lf(r.directConnectUrl))throw new Error("directConnectUrl must be a valid URL");return r.directConnectUrl.toLocaleLowerCase().includes("tenants/00000000-0000-0000-0000-000000000000")?Wi({...r,directConnectUrl:""},e):qx(r.directConnectUrl,e).href}let i=r.cloud&&r.cloud.toString().trim()!=="",n=r.customPowerPlatformCloud!==void 0&&r.customPowerPlatformCloud.trim()!=="";if(i&&!Object.values(xr).includes(r.cloud))throw new Error("Invalid PowerPlatformCloud enum key");let s=i?r.cloud:-1;if(s===100&&n)throw new Error("customPowerPlatformCloud must be provided when PowerPlatformCloud is Other");if(!((f=r.environmentId)!=null&&f.trim()))throw new Error("EnvironmentId must be provided");if(r.agentIdentifier===void 0||r.agentIdentifier.trim()==="")throw new Error("AgentIdentifier must be provided");if(s!==-1&&(t=s),s===100)if(n&&Lf(r.customPowerPlatformCloud))t=100;else throw new Error("customPowerPlatformCloud must be provided when PowerPlatformCloud is Other");let o;if(r.copilotAgentType&&r.copilotAgentType.toString().trim()!=="")if(Object.values(Or).includes(r.copilotAgentType))o=r.copilotAgentType;else throw new Error("Invalid AgentType enum key");else o=0;r.customPowerPlatformCloud=n?r.customPowerPlatformCloud:"api.unknown.powerplatform.com";let a=Tx(t,r.environmentId,r.customPowerPlatformCloud);return{0:()=>new zi({host:a,schema:r.agentIdentifier}),1:()=>new Di({host:a,identifier:r.agentIdentifier})}[o]().getConversationUrl(e)}function Lf(r){try{return!!new URL(r)}catch{return!1}}function qx(r,e){let t=new URL(r);return t.searchParams.has("api-version")||t.searchParams.append("api-version","2022-03-01-preview"),t.pathname.endsWith("/")&&(t.pathname=t.pathname.slice(0,-1)),t.pathname.includes("/conversations")&&(t.pathname=t.pathname.substring(0,t.pathname.indexOf("/conversations"))),t.pathname=`${t.pathname}/conversations`,e&&(t.pathname=`${t.pathname}/${e}`),t}function Tx(r,e,t){if(r===100&&(!t||!t.trim()))throw new Error("cloudBaseAddress must be provided when PowerPlatformCloud is Other");t=t!=null?t:"api.unknown.powerplatform.com";let i=e.toLowerCase().replaceAll("-",""),n=Ix(r),s=i.substring(0,i.length-n),o=i.substring(i.length-n);return new URL(`https://${s}.${o}.environment.${Cx(r,t)}`)}function Cx(r,e){switch(r){case 13:return"api.powerplatform.localhost";case 0:return"api.exp.powerplatform.com";case 1:return"api.dev.powerplatform.com";case 12:return"api.prv.powerplatform.com";case 2:return"api.test.powerplatform.com";case 3:return"api.preprod.powerplatform.com";case 4:case 5:return"api.powerplatform.com";case 14:return"api.gov.powerplatform.microsoft.us";case 6:return"api.gov.powerplatform.microsoft.us";case 7:return"api.high.powerplatform.microsoft.us";case 8:return"api.appsplatform.us";case 9:return"api.powerplatform.partner.microsoftonline.cn";case 10:return"api.powerplatform.eaglex.ic.gov";case 11:return"api.powerplatform.microsoft.scloud";case 100:return e;default:throw new Error(`Invalid cluster category value: ${r}`)}}function Ix(r){switch(r){case 4:case 5:return 2;default:return 1}}var Yr=Xo(vp());var _n=class{constructor(e){this.activity=e}};var Op=Xo(gp());var wp={name:"@microsoft/agents-copilotstudio-client",version:"0.5.12-g2d752e9b13",homepage:"https://github.com/microsoft/Agents-for-js",repository:{type:"git",url:"git+https://github.com/microsoft/Agents-for-js.git"},author:{name:"Microsoft",email:"agentssdk@microsoft.com",url:"https://aka.ms/Agents"},description:"Microsoft Copilot Studio Client for JavaScript. Copilot Studio Client.",keywords:["Agents","copilotstudio","powerplatform"],main:"dist/src/index.js",types:"dist/src/index.d.ts",browser:{os:"./src/browser/os.ts",crypto:"./src/browser/crypto.ts"},scripts:{"build:browser":"esbuild --platform=browser --target=es2019 --format=esm --bundle --sourcemap --minify --outfile=dist/src/browser.mjs src/index.ts"},dependencies:{"@microsoft/agents-activity":"0.5.12-g2d752e9b13",axios:"^1.9.0",debug:"^4.3.7",rxjs:"5.5.12",uuid:"^11.1.0"},license:"MIT",files:["README.md","dist/src","src"],exports:{".":{import:{browser:"./dist/src/browser.mjs",default:"./dist/src/index.js"},require:{default:"./dist/src/index.js"}},"./package.json":"./package.json"},engines:{node:">=18.0.0"}};var Sn={};var wt=class wt{constructor(e,t){this.conversationId="";this.settings=e,this.client=Vi.create(),this.client.defaults.headers.common.Authorization=`Bearer ${t}`,this.client.defaults.headers.common["User-Agent"]=wt.getProductInfo(),this.logger=(0,Op.default)("copilot-studio-client")}async postRequestAsync(e){var f,p,y,g;let t=[];this.logger(`>>> SEND TO ${e.url}`);let i=await this.client(e);if(this.settings.useExperimentalEndpoint&&!((f=this.settings.directConnectUrl)!=null&&f.trim())){let m=(p=i.headers)==null?void 0:p[wt.islandExperimentalUrlHeaderKey];m&&(this.settings.directConnectUrl=m,this.logger(`Island Experimental URL: ${m}`))}this.conversationId=(g=(y=i.headers)==null?void 0:y[wt.conversationIdHeaderKey])!=null?g:"",this.conversationId&&this.logger(`Conversation ID: ${this.conversationId}`),this.logger("====================================================="),this.logger(`Headers: ${JSON.stringify(i.headers,null,2)}`),this.logger("=====================================================");let s=i.data.pipeThrough(new TextDecoderStream).getReader(),o="",a=[],c=async({done:m,value:O})=>m?(this.logger("Stream complete"),o+=O,a.push(o),a):(this.logger("Agent is typing..."),o+=O,await c(await s.read()));return(await s.read().then(c)).forEach(m=>{m.toString().split(`
|
|
9
|
-
`).filter(q=>q.substring(0,4)==="data"&&q!=="data: end\r").forEach(q=>{var F,U;try{let
|
|
7
|
+
`):" "+Nf(s[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i},adapters:ya};function _a(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new xe(null,r)}function Ui(r){return _a(r),r.headers=H.from(r.headers),r.data=Ar.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Mi.getAdapter(r.adapter||Tt.adapter)(r).then(function(i){return _a(r),i.data=Ar.call(r,r.transformResponse,i),i.headers=H.from(i.headers),i},function(i){return Er(i)||(_a(r),i&&i.response&&(i.response.data=Ar.call(r,r.transformResponse,i.response),i.response.headers=H.from(i.response.headers))),Promise.reject(i)})}var Zi="1.10.0";var Li={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{Li[r]=function(i){return typeof i===r||"a"+(e<1?"n ":" ")+r}});var Ff={};Li.transitional=function(e,t,i){function n(s,o){return"[Axios v"+Zi+"] Transitional option '"+s+"'"+o+(i?". "+i:"")}return(s,o,a)=>{if(e===!1)throw new E(n(o," has been removed"+(t?" in "+t:"")),E.ERR_DEPRECATED);return t&&!Ff[o]&&(Ff[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,o,a):!0}};Li.spelling=function(e){return(t,i)=>(console.warn(`${i} is likely a misspelling of ${e}`),!0)};function qx(r,e,t){if(typeof r!="object")throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);let i=Object.keys(r),n=i.length;for(;n-- >0;){let s=i[n],o=e[s];if(o){let a=r[s],c=a===void 0||o(a,s,r);if(c!==!0)throw new E("option "+s+" must be "+c,E.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new E("Unknown option "+s,E.ERR_BAD_OPTION)}}var Rr={assertOptions:qx,validators:Li};var qe=Rr.validators,At=class{constructor(e){this.defaults=e||{},this.interceptors={request:new na,response:new na}}async request(e,t){try{return await this._request(e,t)}catch(i){if(i instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;let s=n.stack?n.stack.replace(/^.+\n/,""):"";try{i.stack?s&&!String(i.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
8
|
+
`+s):i.stack=s}catch{}}throw i}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=we(this.defaults,t);let{transitional:i,paramsSerializer:n,headers:s}=t;i!==void 0&&Rr.assertOptions(i,{silentJSONParsing:qe.transitional(qe.boolean),forcedJSONParsing:qe.transitional(qe.boolean),clarifyTimeoutError:qe.transitional(qe.boolean)},!1),n!=null&&(b.isFunction(n)?t.paramsSerializer={serialize:n}:Rr.assertOptions(n,{encode:qe.function,serialize:qe.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Rr.assertOptions(t,{baseUrl:qe.spelling("baseURL"),withXsrfToken:qe.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&b.merge(s.common,s[t.method]);s&&b.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),t.headers=H.concat(o,s);let a=[],c=!0;this.interceptors.request.forEach(function(O){typeof O.runWhen=="function"&&O.runWhen(t)===!1||(c=c&&O.synchronous,a.unshift(O.fulfilled,O.rejected))});let l=[];this.interceptors.response.forEach(function(O){l.push(O.fulfilled,O.rejected)});let f,p=0,y;if(!c){let m=[Ui.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,l),y=m.length,f=Promise.resolve(t);p<y;)f=f.then(m[p++],m[p++]);return f}y=a.length;let g=t;for(p=0;p<y;){let m=a[p++],O=a[p++];try{g=m(g)}catch(S){O.call(this,S);break}}try{f=Ui.call(this,g)}catch(m){return Promise.reject(m)}for(p=0,y=l.length;p<y;)f=f.then(l[p++],l[p++]);return f}getUri(e){e=we(this.defaults,e);let t=kr(e.baseURL,e.url,e.allowAbsoluteUrls);return Cr(t,e.params,e.paramsSerializer)}};b.forEach(["delete","get","head","options"],function(e){At.prototype[e]=function(t,i){return this.request(we(i||{},{method:e,url:t,data:(i||{}).data}))}});b.forEach(["post","put","patch"],function(e){function t(i){return function(s,o,a){return this.request(we(a||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}At.prototype[e]=t(),At.prototype[e+"Form"]=t(!0)});var Pr=At;var ga=class r{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(s){t=s});let i=this;this.promise.then(n=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](n);i._listeners=null}),this.promise.then=n=>{let s,o=new Promise(a=>{i.subscribe(a),s=a}).then(n);return o.cancel=function(){i.unsubscribe(s)},o},e(function(s,o,a){i.reason||(i.reason=new xe(s,o,a),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=i=>{e.abort(i)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new r(function(n){e=n}),cancel:e}}},Mf=ga;function wa(r){return function(t){return r.apply(null,t)}}function Sa(r){return b.isObject(r)&&r.isAxiosError===!0}var Oa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Oa).forEach(([r,e])=>{Oa[e]=r});var Uf=Oa;function Zf(r){let e=new Pr(r),t=xr(Pr.prototype.request,e);return b.extend(t,Pr.prototype,e,{allOwnKeys:!0}),b.extend(t,e,null,{allOwnKeys:!0}),t.create=function(n){return Zf(we(r,n))},t}var $=Zf(Tt);$.Axios=Pr;$.CanceledError=xe;$.CancelToken=Mf;$.isCancel=Er;$.VERSION=Zi;$.toFormData=Ze;$.AxiosError=E;$.Cancel=$.CanceledError;$.all=function(e){return Promise.all(e)};$.spread=wa;$.isAxiosError=Sa;$.mergeConfig=we;$.AxiosHeaders=H;$.formToJSON=r=>ki(b.isHTMLForm(r)?new FormData(r):r);$.getAdapter=Mi.getAdapter;$.HttpStatusCode=Uf;$.default=$;var Di=$;var{Axios:CY,AxiosError:IY,CanceledError:AY,isCancel:EY,CancelToken:jY,VERSION:kY,all:RY,Cancel:PY,isAxiosError:NY,spread:FY,toFormData:MY,AxiosHeaders:UY,HttpStatusCode:ZY,formToJSON:LY,getAdapter:DY,mergeConfig:VY}=Di;var Vi=class{constructor(e){this.API_VERSION="2022-03-01-preview";let{identifier:t,host:i}=e;this.baseURL=new URL(`/copilotstudio/prebuilt/authenticated/bots/${t}`,i),this.baseURL.searchParams.append("api-version",this.API_VERSION)}getConversationUrl(e){let t=new URL(this.baseURL.href);return t.pathname=`${t.pathname}/conversations`,e&&(t.pathname=`${t.pathname}/${e}`),t.href}};var zi=class{constructor(e){this.API_VERSION="2022-03-01-preview";let{schema:t,host:i}=e;this.baseURL=new URL(`/copilotstudio/dataverse-backed/authenticated/bots/${t}`,i),this.baseURL.searchParams.append("api-version",this.API_VERSION)}getConversationUrl(e){let t=new URL(this.baseURL.href);return t.pathname=`${t.pathname}/conversations`,e&&(t.pathname=`${t.pathname}/${e}`),t.href}};function Bi(r,e){var l,f;let t=5;if((l=r.directConnectUrl)!=null&&l.trim()){if(!Nr(r.directConnectUrl))throw new Error("directConnectUrl must be a valid URL");return r.directConnectUrl.toLocaleLowerCase().includes("tenants/00000000-0000-0000-0000-000000000000")?Bi({...r,directConnectUrl:""},e):Tx(r.directConnectUrl,e).href}let i=r.cloud&&r.cloud.toString().trim()!=="",n=r.customPowerPlatformCloud!==void 0&&r.customPowerPlatformCloud.trim()!=="";if(i&&!Object.values(Or).includes(r.cloud))throw new Error("Invalid PowerPlatformCloud enum key");let s=i?r.cloud:-1;if(s===100&&n)throw new Error("customPowerPlatformCloud must be provided when PowerPlatformCloud is Other");if(!((f=r.environmentId)!=null&&f.trim()))throw new Error("EnvironmentId must be provided");if(r.agentIdentifier===void 0||r.agentIdentifier.trim()==="")throw new Error("AgentIdentifier must be provided");if(s!==-1&&(t=s),s===100)if(n&&Nr(r.customPowerPlatformCloud))t=100;else throw new Error("customPowerPlatformCloud must be provided when PowerPlatformCloud is Other");let o;if(r.copilotAgentType&&r.copilotAgentType.toString().trim()!=="")if(Object.values(Sr).includes(r.copilotAgentType))o=r.copilotAgentType;else throw new Error("Invalid AgentType enum key");else o=0;r.customPowerPlatformCloud=n?r.customPowerPlatformCloud:"api.unknown.powerplatform.com";let a=Cx(t,r.environmentId,r.customPowerPlatformCloud);return{0:()=>new zi({host:a,schema:r.agentIdentifier}),1:()=>new Vi({host:a,identifier:r.agentIdentifier})}[o]().getConversationUrl(e)}function Df(r,e=-1,t="",i=""){var n,s;if(!i&&!(r!=null&&r.directConnectUrl)){if(e===100&&!t)throw new Error("cloudBaseAddress must be provided when PowerPlatformCloudCategory is Other");if(!r&&e===-1)throw new Error("Either settings or cloud must be provided");if(r&&r.cloud&&r.cloud!==-1&&(e=r.cloud),e===100)if(t&&Nr(t))e=100;else if(r!=null&&r.customPowerPlatformCloud&&Nr(r.customPowerPlatformCloud))e=100,t=r.customPowerPlatformCloud;else throw new Error("Either CustomPowerPlatformCloud or cloudBaseAddress must be provided when PowerPlatformCloudCategory is Other");return t!=null||(t="api.unknown.powerplatform.com"),`https://${Wi(e,t)}/.default`}else if(i||(i=(n=r==null?void 0:r.directConnectUrl)!=null?n:""),i&&Nr(i)){if(Lf(new URL(i))===-1){let o=(s=r==null?void 0:r.cloud)!=null?s:e;if(o===100||o===-1)throw new Error("Unable to resolve the PowerPlatform Cloud from DirectConnectUrl. The Token Audience resolver requires a specific PowerPlatformCloudCategory.");if(o!==-1)return`https://${Wi(o,"")}/.default`;throw new Error("Unable to resolve the PowerPlatform Cloud from DirectConnectUrl. The Token Audience resolver requires a specific PowerPlatformCloudCategory.")}return`https://${Wi(Lf(new URL(i)),"")}/.default`}else throw new Error("DirectConnectUrl must be provided when DirectConnectUrl is set")}function Nr(r){try{let e=r.startsWith("http")?r:`https://${r}`;return!!new URL(e)}catch{return!1}}function Tx(r,e){let t=new URL(r);return t.searchParams.has("api-version")||t.searchParams.append("api-version","2022-03-01-preview"),t.pathname.endsWith("/")&&(t.pathname=t.pathname.slice(0,-1)),t.pathname.includes("/conversations")&&(t.pathname=t.pathname.substring(0,t.pathname.indexOf("/conversations"))),t.pathname=`${t.pathname}/conversations`,e&&(t.pathname=`${t.pathname}/${e}`),t}function Cx(r,e,t){if(r===100&&(!t||!t.trim()))throw new Error("cloudBaseAddress must be provided when PowerPlatformCloud is Other");t=t!=null?t:"api.unknown.powerplatform.com";let i=e.toLowerCase().replaceAll("-",""),n=Ix(r),s=i.substring(0,i.length-n),o=i.substring(i.length-n);return new URL(`https://${s}.${o}.environment.${Wi(r,t)}`)}function Wi(r,e){switch(r){case 13:return"api.powerplatform.localhost";case 0:return"api.exp.powerplatform.com";case 1:return"api.dev.powerplatform.com";case 12:return"api.prv.powerplatform.com";case 2:return"api.test.powerplatform.com";case 3:return"api.preprod.powerplatform.com";case 4:case 5:return"api.powerplatform.com";case 14:return"api.gov.powerplatform.microsoft.us";case 6:return"api.gov.powerplatform.microsoft.us";case 7:return"api.high.powerplatform.microsoft.us";case 8:return"api.appsplatform.us";case 9:return"api.powerplatform.partner.microsoftonline.cn";case 10:return"api.powerplatform.eaglex.ic.gov";case 11:return"api.powerplatform.microsoft.scloud";case 100:return e;default:throw new Error(`Invalid cluster category value: ${r}`)}}function Ix(r){switch(r){case 4:case 5:return 2;default:return 1}}function Lf(r){switch(r.host.toLowerCase()){case"api.powerplatform.localhost":return 13;case"api.exp.powerplatform.com":return 0;case"api.dev.powerplatform.com":return 1;case"api.prv.powerplatform.com":return 12;case"api.test.powerplatform.com":return 2;case"api.preprod.powerplatform.com":return 3;case"api.powerplatform.com":return 5;case"api.gov.powerplatform.microsoft.us":return 14;case"api.high.powerplatform.microsoft.us":return 7;case"api.appsplatform.us":return 8;case"api.powerplatform.partner.microsoftonline.cn":return 9;default:return-1}}var Yr=Qo(bp());var gn=class{constructor(e){this.activity=e}};var xp=Qo(wp());var Sp={name:"@microsoft/agents-copilotstudio-client",version:"0.5.19-gc1e2ea1096",homepage:"https://github.com/microsoft/Agents-for-js",repository:{type:"git",url:"git+https://github.com/microsoft/Agents-for-js.git"},author:{name:"Microsoft",email:"agentssdk@microsoft.com",url:"https://aka.ms/Agents"},description:"Microsoft Copilot Studio Client for JavaScript. Copilot Studio Client.",keywords:["Agents","copilotstudio","powerplatform"],main:"dist/src/index.js",types:"dist/src/index.d.ts",browser:{os:"./src/browser/os.ts",crypto:"./src/browser/crypto.ts"},scripts:{"build:browser":"esbuild --platform=browser --target=es2019 --format=esm --bundle --sourcemap --minify --outfile=dist/src/browser.mjs src/index.ts"},dependencies:{"@microsoft/agents-activity":"0.5.19-gc1e2ea1096",axios:"^1.9.0",debug:"^4.3.7",rxjs:"5.5.12",uuid:"^11.1.0"},license:"MIT",files:["README.md","dist/src","src"],exports:{".":{import:{browser:"./dist/src/browser.mjs",default:"./dist/src/index.js"},require:{default:"./dist/src/index.js"}},"./package.json":"./package.json"},engines:{node:">=20.0.0"}};var On={};var $e=class $e{constructor(e,t){this.conversationId="";this.settings=e,this.client=Di.create(),this.client.defaults.headers.common.Authorization=`Bearer ${t}`,this.client.defaults.headers.common["User-Agent"]=$e.getProductInfo(),this.logger=(0,xp.default)("copilot-studio-client")}async postRequestAsync(e){var f,p,y,g;let t=[];this.logger(`>>> SEND TO ${e.url}`);let i=await this.client(e);if(this.settings.useExperimentalEndpoint&&!((f=this.settings.directConnectUrl)!=null&&f.trim())){let m=(p=i.headers)==null?void 0:p[$e.islandExperimentalUrlHeaderKey];m&&(this.settings.directConnectUrl=m,this.logger(`Island Experimental URL: ${m}`))}this.conversationId=(g=(y=i.headers)==null?void 0:y[$e.conversationIdHeaderKey])!=null?g:"",this.conversationId&&this.logger(`Conversation ID: ${this.conversationId}`),this.logger("====================================================="),this.logger(`Headers: ${JSON.stringify(i.headers,null,2)}`),this.logger("=====================================================");let s=i.data.pipeThrough(new TextDecoderStream).getReader(),o="",a=[],c=async({done:m,value:O})=>m?(this.logger("Stream complete"),o+=O,a.push(o),a):(this.logger("Agent is typing..."),o+=O,await c(await s.read()));return(await s.read().then(c)).forEach(m=>{m.toString().split(`
|
|
9
|
+
`).filter(q=>q.substring(0,4)==="data"&&q!=="data: end\r").forEach(q=>{var F,U;try{let D=Yr.Activity.fromJson(q.substring(5,q.length));D.type===Yr.ActivityTypes.Message?(t.push(D),this.conversationId.trim()||(this.conversationId=(U=(F=D.conversation)==null?void 0:F.id)!=null?U:"",this.logger(`Conversation ID: ${this.conversationId}`))):this.logger("Activity type: ",D.type)}catch(D){throw this.logger("Error: ",D),D}})}),t}static getProductInfo(){let e=`CopilotStudioClient.agents-sdk-js/${Sp.version}`;return typeof window!="undefined"&&window.navigator?`${e} ${navigator.userAgent}`:`${e} nodejs/${process.version} ${On.platform()}-${On.arch()}/${On.release()}`}async startConversationAsync(e=!0){let n={method:"post",url:Bi(this.settings),headers:{Accept:"text/event-stream","Content-Type":"application/json"},data:{emitStartConversationEvent:e},responseType:"stream",adapter:"fetch"};return(await this.postRequestAsync(n))[0]}async askQuestionAsync(e,t=this.conversationId){var p,y;let n={type:"message",text:e,conversation:{id:t}},s=Yr.Activity.fromObject(n),o=(y=(p=s.conversation)==null?void 0:p.id)!=null?y:t,a=Bi(this.settings,o),c=new gn(s),l={method:"post",url:a,headers:{Accept:"text/event-stream","Content-Type":"application/json"},data:c,responseType:"stream",adapter:"fetch"};return await this.postRequestAsync(l)}};$e.conversationIdHeaderKey="x-ms-conversationid",$e.islandExperimentalUrlHeaderKey="x-ms-d2e-experimental",$e.scopeFromSettings=Df;var Op=$e;var X=[];for(let r=0;r<256;++r)X.push((r+256).toString(16).slice(1));function qp(r,e=0){return(X[r[e+0]]+X[r[e+1]]+X[r[e+2]]+X[r[e+3]]+"-"+X[r[e+4]]+X[r[e+5]]+"-"+X[r[e+6]]+X[r[e+7]]+"-"+X[r[e+8]]+X[r[e+9]]+"-"+X[r[e+10]]+X[r[e+11]]+X[r[e+12]]+X[r[e+13]]+X[r[e+14]]+X[r[e+15]]).toLowerCase()}var gu,uI=new Uint8Array(16);function wu(){if(!gu){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");gu=crypto.getRandomValues.bind(crypto)}return gu(uI)}var cI=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Su={randomUUID:cI};function lI(r,e,t){var n,s,o;if(Su.randomUUID&&!e&&!r)return Su.randomUUID();r=r||{};let i=(o=(s=r.random)!=null?s:(n=r.rng)==null?void 0:n.call(r))!=null?o:wu();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){if(t=t||0,t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let a=0;a<16;++a)e[t+a]=i[a];return e}return qp(i)}var Ou=lI;var Si=Qo(i0()),n0=class{static createConnection(e,t){let i=0,n,s,o=new Si.BehaviorSubject(0),a=Si.Observable.create(async f=>{if(n=f,o.value<2){o.next(2);return}l();let p=await e.startConversationAsync();s=p.conversation,i=0,c(p)}),c=f=>{n==null||n.next({...f,timestamp:new Date().toISOString(),channelData:{...f.channelData,"webchat:sequence-id":i++}})},l=()=>{if(!(t!=null&&t.showTyping))return;let f=s?{id:s.id,name:s.name}:{id:"agent",name:"Agent"};c({type:"typing",from:f})};return{connectionStatus$:o,activity$:a,postActivity(f){var p;if(!((p=f.text)!=null&&p.trim()))throw new Error("Activity text cannot be empty.");if(!n)throw new Error("Activity observer is not initialized.");return Si.Observable.create(async y=>{try{let g=Ou();c({...f,id:g}),l();let m=await e.askQuestionAsync(f.text);for(let O of m)c(O);y.next(g),y.complete()}catch(g){y.error(g)}})},end(){o.complete(),a.complete(),n&&(n.complete(),n=void 0)}}}};export{Sr as AgentType,ef as ConnectionSettings,Op as CopilotStudioClient,n0 as CopilotStudioWebChat,gn as ExecuteTurnRequest,Or as PowerPlatformCloud,Bi as getCopilotStudioConnectionUrl,Df as getTokenAudience,xH as loadCopilotStudioConnectionSettingsFromEnv};
|
|
10
10
|
//# sourceMappingURL=browser.mjs.map
|