@microsoft/agents-copilotstudio-client 0.5.12-g2d752e9b13 → 0.5.16-g6bdf69cc43

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.
@@ -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 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().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: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:
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(`
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(),e6=v1();QW.Observable.prototype.switchMapTo=e6.switchMapTo});var Tl=u(ko=>{"use strict";var t6=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)},r6=C(),i6=br(),n6=Me();function s6(r){return function(e){return r===0?new n6.EmptyObservable:e.lift(new o6(r))}}ko.take=s6;var o6=function(){function r(e){if(this.total=e,this.total<0)throw new i6.ArgumentOutOfRangeError}return r.prototype.call=function(e,t){return t.subscribe(new a6(e,this.total))},r}(),a6=function(r){t6(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}(r6.Subscriber)});var y1=u(m1=>{"use strict";var u6=Tl();function c6(r){return u6.take(r)(this)}m1.take=c6});var _1=u(()=>{"use strict";var l6=v(),f6=y1();l6.Observable.prototype.take=f6.take});var w1=u(g1=>{"use strict";var h6=co();function p6(r){return h6.takeLast(r)(this)}g1.takeLast=p6});var S1=u(()=>{"use strict";var d6=v(),v6=w1();d6.Observable.prototype.takeLast=v6.takeLast});var Cl=u(Ro=>{"use strict";var b6=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)},m6=P(),y6=N();function _6(r){return function(e){return e.lift(new g6(r))}}Ro.takeUntil=_6;var g6=function(){function r(e){this.notifier=e}return r.prototype.call=function(e,t){return t.subscribe(new w6(e,this.notifier))},r}(),w6=function(r){b6(e,r);function e(t,i){r.call(this,t),this.notifier=i,this.add(y6.subscribeToResult(this,i))}return e.prototype.notifyNext=function(t,i,n,s,o){this.complete()},e.prototype.notifyComplete=function(){},e}(m6.OuterSubscriber)});var x1=u(O1=>{"use strict";var S6=Cl();function O6(r){return S6.takeUntil(r)(this)}O1.takeUntil=O6});var q1=u(()=>{"use strict";var x6=v(),q6=x1();x6.Observable.prototype.takeUntil=q6.takeUntil});var Il=u(Po=>{"use strict";var T6=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)},C6=C();function I6(r){return function(e){return e.lift(new A6(r))}}Po.takeWhile=I6;var A6=function(){function r(e){this.predicate=e}return r.prototype.call=function(e,t){return t.subscribe(new j6(e,this.predicate))},r}(),j6=function(r){T6(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}(C6.Subscriber)});var C1=u(T1=>{"use strict";var E6=Il();function k6(r){return E6.takeWhile(r)(this)}T1.takeWhile=k6});var I1=u(()=>{"use strict";var R6=v(),P6=C1();R6.Observable.prototype.takeWhile=P6.takeWhile});var _i=u(Sr=>{"use strict";var N6=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)},F6=P(),M6=N();Sr.defaultThrottleConfig={leading:!0,trailing:!1};function U6(r,e){return e===void 0&&(e=Sr.defaultThrottleConfig),function(t){return t.lift(new Z6(r,e.leading,e.trailing))}}Sr.throttle=U6;var Z6=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 L6(e,this.durationSelector,this.leading,this.trailing))},r}(),L6=function(r){N6(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=M6.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}(F6.OuterSubscriber)});var E1=u(j1=>{"use strict";var A1=_i();function V6(r,e){return e===void 0&&(e=A1.defaultThrottleConfig),A1.throttle(r,e)(this)}j1.throttle=V6});var k1=u(()=>{"use strict";var D6=v(),z6=E1();D6.Observable.prototype.throttle=z6.throttle});var Al=u(No=>{"use strict";var W6=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)},B6=C(),$6=W(),H6=_i();function J6(r,e,t){return e===void 0&&(e=$6.async),t===void 0&&(t=H6.defaultThrottleConfig),function(i){return i.lift(new Y6(r,e,t.leading,t.trailing))}}No.throttleTime=J6;var Y6=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 K6(e,this.duration,this.scheduler,this.leading,this.trailing))},r}(),K6=function(r){W6(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(G6,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}(B6.Subscriber);function G6(r){var e=r.subscriber;e.clearThrottle()}});var P1=u(R1=>{"use strict";var X6=W(),Q6=_i(),e9=Al();function t9(r,e,t){return e===void 0&&(e=X6.async),t===void 0&&(t=Q6.defaultThrottleConfig),e9.throttleTime(r,e,t)(this)}R1.throttleTime=t9});var N1=u(()=>{"use strict";var r9=v(),i9=P1();r9.Observable.prototype.throttleTime=i9.throttleTime});var jl=u(gi=>{"use strict";var n9=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)},s9=C(),o9=W();function a9(r){return r===void 0&&(r=o9.async),function(e){return e.lift(new u9(r))}}gi.timeInterval=a9;var F1=function(){function r(e,t){this.value=e,this.interval=t}return r}();gi.TimeInterval=F1;var u9=function(){function r(e){this.scheduler=e}return r.prototype.call=function(e,t){return t.subscribe(new c9(e,this.scheduler))},r}(),c9=function(r){n9(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}(s9.Subscriber)});var kl=u(El=>{"use strict";var l9=W(),M1=jl();El.TimeInterval=M1.TimeInterval;function f9(r){return r===void 0&&(r=l9.async),M1.timeInterval(r)(this)}El.timeInterval=f9});var U1=u(()=>{"use strict";var h9=v(),p9=kl();h9.Observable.prototype.timeInterval=p9.timeInterval});var Rl=u(Fo=>{"use strict";var d9=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)},v9=function(r){d9(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=v9});var Pl=u(Mo=>{"use strict";var b9=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)},m9=W(),y9=ci(),_9=C(),g9=Rl();function w9(r,e){e===void 0&&(e=m9.async);var t=y9.isDate(r),i=t?+r-e.now():Math.abs(r);return function(n){return n.lift(new S9(i,t,e,new g9.TimeoutError))}}Mo.timeout=w9;var S9=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 O9(e,this.absoluteTimeout,this.waitFor,this.scheduler,this.errorInstance))},r}(),O9=function(r){b9(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}(_9.Subscriber)});var L1=u(Z1=>{"use strict";var x9=W(),q9=Pl();function T9(r,e){return e===void 0&&(e=x9.async),q9.timeout(r,e)(this)}Z1.timeout=T9});var V1=u(()=>{"use strict";var C9=v(),I9=L1();C9.Observable.prototype.timeout=I9.timeout});var Nl=u(Uo=>{"use strict";var A9=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)},j9=W(),E9=ci(),k9=P(),R9=N();function P9(r,e,t){return t===void 0&&(t=j9.async),function(i){var n=E9.isDate(r),s=n?+r-t.now():Math.abs(r);return i.lift(new N9(s,n,e,t))}}Uo.timeoutWith=P9;var N9=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 F9(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},r}(),F9=function(r){A9(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(R9.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}(k9.OuterSubscriber)});var z1=u(D1=>{"use strict";var M9=W(),U9=Nl();function Z9(r,e,t){return t===void 0&&(t=M9.async),U9.timeoutWith(r,e,t)(this)}D1.timeoutWith=Z9});var W1=u(()=>{"use strict";var L9=v(),V9=z1();L9.Observable.prototype.timeoutWith=V9.timeoutWith});var Zo=u(Fl=>{"use strict";var D9=W(),z9=pr();function W9(r){return r===void 0&&(r=D9.async),z9.map(function(e){return new B1(e,r.now())})}Fl.timestamp=W9;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 B9=W(),$9=Zo();function H9(r){return r===void 0&&(r=B9.async),$9.timestamp(r)(this)}$1.timestamp=H9});var J1=u(()=>{"use strict";var J9=v(),Y9=H1();J9.Observable.prototype.timestamp=Y9.timestamp});var Ml=u(Y1=>{"use strict";var K9=yr();function G9(r,e,t){return t===0?[e]:(r.push(e),r)}function X9(){return K9.reduce(G9,[])}Y1.toArray=X9});var G1=u(K1=>{"use strict";var Q9=Ml();function eB(){return Q9.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(b.isBoolean(m))return m.toString();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
4
  `).forEach(function(o){n=o.indexOf(":"),t=o.substring(0,n).trim().toLowerCase(),i=o.substring(n+1).trim(),!(!t||e[t]&&ax[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 Ar(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 ux(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 cx=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function ca(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 lx(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,i)=>t.toUpperCase()+i)}function fx(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 It=class{constructor(e){e&&this.set(e)}set(e,t,i){let n=this;function s(a,c,l){let f=Ar(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())&&!cx(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=Ar(e),e){let i=b.findKey(this,e);if(i){let n=this[i];if(!t)return n;if(t===!0)return ux(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=Ar(e),e){let i=b.findKey(this,e);return!!(i&&this[i]!==void 0&&(!t||ca(this,this[i],i,t)))}return!1}delete(e,t){let i=this,n=!1;function s(o){if(o=Ar(o),o){let a=b.findKey(i,o);a&&(!t||ca(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||ca(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?lx(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=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 :
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,y),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 :
6
6
  `+s.map(Nf).join(`
7
- `):" "+Nf(s[0]):"as no adapter specified";throw new j("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i},adapters:ma};function ya(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new xe(null,r)}function Ui(r){return ya(r),r.headers=H.from(r.headers),r.data=jr.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Mi.getAdapter(r.adapter||Ct.adapter)(r).then(function(i){return ya(r),i.data=jr.call(r,r.transformResponse,i),i.headers=H.from(i.headers),i},function(i){return Er(i)||(ya(r),i&&i.response&&(i.response.data=jr.call(r,r.transformResponse,i.response),i.response.headers=H.from(i.response.headers))),Promise.reject(i)})}var Zi="1.9.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 j(n(o," has been removed"+(t?" in "+t:"")),j.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 xx(r,e,t){if(typeof r!="object")throw new j("options must be an object",j.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 j("option "+s+" must be "+c,j.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new j("Unknown option "+s,j.ERR_BAD_OPTION)}}var Pr={assertOptions:xx,validators:Li};var qe=Pr.validators,jt=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ia,response:new ia}}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&&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(`
7
+ `):" "+Nf(s[0]):"as no adapter specified";throw new j("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i},adapters:ma};function ya(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new xe(null,r)}function Ui(r){return ya(r),r.headers=H.from(r.headers),r.data=jr.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Mi.getAdapter(r.adapter||Ct.adapter)(r).then(function(i){return ya(r),i.data=jr.call(r,r.transformResponse,i),i.headers=H.from(i.headers),i},function(i){return Er(i)||(ya(r),i&&i.response&&(i.response.data=jr.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 j(n(o," has been removed"+(t?" in "+t:"")),j.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 xx(r,e,t){if(typeof r!="object")throw new j("options must be an object",j.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 j("option "+s+" must be "+c,j.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new j("Unknown option "+s,j.ERR_BAD_OPTION)}}var Pr={assertOptions:xx,validators:Li};var qe=Pr.validators,jt=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ia,response:new ia}}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&&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.16-g6bdf69cc43",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.16-g6bdf69cc43",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 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
9
  `).filter(q=>q.substring(0,4)==="data"&&q!=="data: end\r").forEach(q=>{var F,U;try{let V=Yr.Activity.fromJson(q.substring(5,q.length));V.type===Yr.ActivityTypes.Message?(t.push(V),this.conversationId.trim()||(this.conversationId=(U=(F=V.conversation)==null?void 0:F.id)!=null?U:"",this.logger(`Conversation ID: ${this.conversationId}`))):this.logger("Activity type: ",V.type)}catch(V){throw this.logger("Error: ",V),V}})}),t}static getProductInfo(){let e=`CopilotStudioClient.agents-sdk-js/${wp.version}`;return typeof window!="undefined"&&window.navigator?`${e} ${navigator.userAgent}`:`${e} nodejs/${process.version} ${Sn.platform()}-${Sn.arch()}/${Sn.release()}`}async startConversationAsync(e=!0){let n={method:"post",url:Wi(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=Wi(this.settings,o),c=new _n(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)}};wt.conversationIdHeaderKey="x-ms-conversationid",wt.islandExperimentalUrlHeaderKey="x-ms-d2e-experimental";var Sp=wt;var X=[];for(let r=0;r<256;++r)X.push((r+256).toString(16).slice(1));function xp(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,hI=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(hI)}var pI=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Su={randomUUID:pI};function dI(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 xp(i)}var Ou=dI;var Si=Xo(r0()),i0=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{Or as AgentType,ef as ConnectionSettings,Sp as CopilotStudioClient,i0 as CopilotStudioWebChat,_n as ExecuteTurnRequest,xr as PowerPlatformCloud,Wi as getCopilotStudioConnectionUrl,IH as loadCopilotStudioConnectionSettingsFromEnv};
10
10
  //# sourceMappingURL=browser.mjs.map