@microsoft/agents-copilotstudio-client 0.6.1 → 0.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/browser.mjs +9 -9
- package/dist/src/browser.mjs.map +4 -4
- package/dist/src/copilotStudioClient.d.ts +8 -4
- package/dist/src/copilotStudioClient.js +34 -17
- package/dist/src/copilotStudioClient.js.map +1 -1
- package/dist/src/copilotStudioWebChat.d.ts +146 -28
- package/dist/src/copilotStudioWebChat.js +157 -27
- package/dist/src/copilotStudioWebChat.js.map +1 -1
- package/dist/src/powerPlatformEnvironment.js +13 -3
- package/dist/src/powerPlatformEnvironment.js.map +1 -1
- package/package.json +3 -4
- package/src/copilotStudioClient.ts +33 -19
- package/src/copilotStudioWebChat.ts +220 -56
- package/src/powerPlatformEnvironment.ts +14 -3
package/dist/src/browser.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var s0=Object.create;var Xo=Object.defineProperty;var o0=Object.getOwnPropertyDescriptor;var a0=Object.getOwnPropertyNames;var u0=Object.getPrototypeOf,c0=Object.prototype.hasOwnProperty;var u=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),l0=(r,e)=>{for(var t in e)Xo(r,t,{get:e[t],enumerable:!0})},f0=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a0(e))!c0.call(r,n)&&n!==t&&Xo(r,n,{get:()=>e[n],enumerable:!(i=o0(e,n))||i.enumerable});return r};var Qo=(r,e,t)=>(t=r!=null?s0(u0(r)):{},f0(e||!r||!r.__esModule?Xo(t,"default",{value:r,enumerable:!0}):t,r));var Fr=u(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.getParsedType=V.ZodParsedType=V.objectUtil=V.util=void 0;var xa;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{let s={};for(let o of n)s[o]=o;return s},r.getValidEnumValues=n=>{let s=r.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),o={};for(let a of s)o[a]=n[a];return r.objectValues(o)},r.objectValues=n=>r.objectKeys(n).map(function(s){return n[s]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let s=[];for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&s.push(o);return s},r.find=(n,s)=>{for(let o of n)if(s(o))return o},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function i(n,s=" | "){return n.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}r.joinValues=i,r.jsonStringifyReplacer=(n,s)=>typeof s=="bigint"?s.toString():s})(xa||(V.util=xa={}));var Vf;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Vf||(V.objectUtil=Vf={}));V.ZodParsedType=xa.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var Ax=r=>{switch(typeof r){case"undefined":return V.ZodParsedType.undefined;case"string":return V.ZodParsedType.string;case"number":return Number.isNaN(r)?V.ZodParsedType.nan:V.ZodParsedType.number;case"boolean":return V.ZodParsedType.boolean;case"function":return V.ZodParsedType.function;case"bigint":return V.ZodParsedType.bigint;case"symbol":return V.ZodParsedType.symbol;case"object":return Array.isArray(r)?V.ZodParsedType.array:r===null?V.ZodParsedType.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?V.ZodParsedType.promise:typeof Map!="undefined"&&r instanceof Map?V.ZodParsedType.map:typeof Set!="undefined"&&r instanceof Set?V.ZodParsedType.set:typeof Date!="undefined"&&r instanceof Date?V.ZodParsedType.date:V.ZodParsedType.object;default:return V.ZodParsedType.unknown}};V.getParsedType=Ax});var $i=u(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.ZodError=Le.quotelessJson=Le.ZodIssueCode=void 0;var zf=Fr();Le.ZodIssueCode=zf.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var Ex=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");Le.quotelessJson=Ex;var Mr=class r extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(s){return s.message},i={_errors:[]},n=s=>{for(let o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(n);else if(o.code==="invalid_return_type")n(o.returnTypeError);else if(o.code==="invalid_arguments")n(o.argumentsError);else if(o.path.length===0)i._errors.push(t(o));else{let a=i,c=0;for(;c<o.path.length;){let l=o.path[c];c===o.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(t(o))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return n(this),i}static assert(e){if(!(e instanceof r))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,zf.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},i=[];for(let n of this.issues)if(n.path.length>0){let s=n.path[0];t[s]=t[s]||[],t[s].push(e(n))}else i.push(e(n));return{formErrors:i,fieldErrors:t}}get formErrors(){return this.flatten()}};Le.ZodError=Mr;Mr.create=r=>new Mr(r)});var Ta=u(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});var ee=$i(),Qe=Fr(),jx=(r,e)=>{let t;switch(r.code){case ee.ZodIssueCode.invalid_type:r.received===Qe.ZodParsedType.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case ee.ZodIssueCode.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,Qe.util.jsonStringifyReplacer)}`;break;case ee.ZodIssueCode.unrecognized_keys:t=`Unrecognized key(s) in object: ${Qe.util.joinValues(r.keys,", ")}`;break;case ee.ZodIssueCode.invalid_union:t="Invalid input";break;case ee.ZodIssueCode.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${Qe.util.joinValues(r.options)}`;break;case ee.ZodIssueCode.invalid_enum_value:t=`Invalid enum value. Expected ${Qe.util.joinValues(r.options)}, received '${r.received}'`;break;case ee.ZodIssueCode.invalid_arguments:t="Invalid function arguments";break;case ee.ZodIssueCode.invalid_return_type:t="Invalid function return type";break;case ee.ZodIssueCode.invalid_date:t="Invalid date";break;case ee.ZodIssueCode.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:Qe.util.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case ee.ZodIssueCode.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case ee.ZodIssueCode.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case ee.ZodIssueCode.custom:t="Invalid input";break;case ee.ZodIssueCode.invalid_intersection_types:t="Intersection results could not be merged";break;case ee.ZodIssueCode.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case ee.ZodIssueCode.not_finite:t="Number must be finite";break;default:t=e.defaultError,Qe.util.assertNever(r)}return{message:t}};qa.default=jx});var Hi=u(De=>{"use strict";var kx=De&&De.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(De,"__esModule",{value:!0});De.defaultErrorMap=void 0;De.setErrorMap=Rx;De.getErrorMap=Px;var Wf=kx(Ta());De.defaultErrorMap=Wf.default;var Bf=Wf.default;function Rx(r){Bf=r}function Px(){return Bf}});var Ia=u(Z=>{"use strict";var Nx=Z&&Z.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Z,"__esModule",{value:!0});Z.isAsync=Z.isValid=Z.isDirty=Z.isAborted=Z.OK=Z.DIRTY=Z.INVALID=Z.ParseStatus=Z.EMPTY_PATH=Z.makeIssue=void 0;Z.addIssueToContext=Ux;var Fx=Hi(),$f=Nx(Ta()),Mx=r=>{let{data:e,path:t,errorMaps:i,issueData:n}=r,s=[...t,...n.path||[]],o={...n,path:s};if(n.message!==void 0)return{...n,path:s,message:n.message};let a="",c=i.filter(l=>!!l).slice().reverse();for(let l of c)a=l(o,{data:e,defaultError:a}).message;return{...n,path:s,message:a}};Z.makeIssue=Mx;Z.EMPTY_PATH=[];function Ux(r,e){let t=(0,Fx.getErrorMap)(),i=(0,Z.makeIssue)({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===$f.default?void 0:$f.default].filter(n=>!!n)});r.common.issues.push(i)}var Ca=class r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let i=[];for(let n of t){if(n.status==="aborted")return Z.INVALID;n.status==="dirty"&&e.dirty(),i.push(n.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,t){let i=[];for(let n of t){let s=await n.key,o=await n.value;i.push({key:s,value:o})}return r.mergeObjectSync(e,i)}static mergeObjectSync(e,t){let i={};for(let n of t){let{key:s,value:o}=n;if(s.status==="aborted"||o.status==="aborted")return Z.INVALID;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value!="undefined"||n.alwaysSet)&&(i[s.value]=o.value)}return{status:e.value,value:i}}};Z.ParseStatus=Ca;Z.INVALID=Object.freeze({status:"aborted"});var Zx=r=>({status:"dirty",value:r});Z.DIRTY=Zx;var Lx=r=>({status:"valid",value:r});Z.OK=Lx;var Dx=r=>r.status==="aborted";Z.isAborted=Dx;var Vx=r=>r.status==="dirty";Z.isDirty=Vx;var zx=r=>r.status==="valid";Z.isValid=zx;var Wx=r=>typeof Promise!="undefined"&&r instanceof Promise;Z.isAsync=Wx});var Jf=u(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0})});var Kf=u(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.errorUtil=void 0;var Yf;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(Yf||(Ji.errorUtil=Yf={}))});var uh=u(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0});h.discriminatedUnion=h.date=h.boolean=h.bigint=h.array=h.any=h.coerce=h.ZodFirstPartyTypeKind=h.late=h.ZodSchema=h.Schema=h.ZodReadonly=h.ZodPipeline=h.ZodBranded=h.BRAND=h.ZodNaN=h.ZodCatch=h.ZodDefault=h.ZodNullable=h.ZodOptional=h.ZodTransformer=h.ZodEffects=h.ZodPromise=h.ZodNativeEnum=h.ZodEnum=h.ZodLiteral=h.ZodLazy=h.ZodFunction=h.ZodSet=h.ZodMap=h.ZodRecord=h.ZodTuple=h.ZodIntersection=h.ZodDiscriminatedUnion=h.ZodUnion=h.ZodObject=h.ZodArray=h.ZodVoid=h.ZodNever=h.ZodUnknown=h.ZodAny=h.ZodNull=h.ZodUndefined=h.ZodSymbol=h.ZodDate=h.ZodBoolean=h.ZodBigInt=h.ZodNumber=h.ZodString=h.ZodType=void 0;h.NEVER=h.void=h.unknown=h.union=h.undefined=h.tuple=h.transformer=h.symbol=h.string=h.strictObject=h.set=h.record=h.promise=h.preprocess=h.pipeline=h.ostring=h.optional=h.onumber=h.oboolean=h.object=h.number=h.nullable=h.null=h.never=h.nativeEnum=h.nan=h.map=h.literal=h.lazy=h.intersection=h.instanceof=h.function=h.enum=h.effect=void 0;h.datetimeRegex=th;h.custom=ih;var w=$i(),Yi=Hi(),T=Kf(),d=Ia(),x=Fr(),be=class{constructor(e,t,i,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=i,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Gf=(r,e)=>{if((0,d.isValid)(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new w.ZodError(r.common.issues);return this._error=t,this._error}}};function j(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:i,description:n}=r;if(e&&(t||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(o,a)=>{var l,f;let{message:c}=r;return o.code==="invalid_enum_value"?{message:c!=null?c:a.defaultError}:typeof a.data=="undefined"?{message:(l=c!=null?c:i)!=null?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(f=c!=null?c:t)!=null?f:a.defaultError}},description:n}}var k=class{get description(){return this._def.description}_getType(e){return(0,x.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,x.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new d.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,x.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if((0,d.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let i=this.safeParse(e,t);if(i.success)return i.data;throw i.error}safeParse(e,t){var s;let i={common:{issues:[],async:(s=t==null?void 0:t.async)!=null?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,x.getParsedType)(e)},n=this._parseSync({data:e,path:i.path,parent:i});return Gf(i,n)}"~validate"(e){var i,n;let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,x.getParsedType)(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:t});return(0,d.isValid)(s)?{value:s.value}:{issues:t.common.issues}}catch(s){(n=(i=s==null?void 0:s.message)==null?void 0:i.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(s=>(0,d.isValid)(s)?{value:s.value}:{issues:t.common.issues})}async parseAsync(e,t){let i=await this.safeParseAsync(e,t);if(i.success)return i.data;throw i.error}async safeParseAsync(e,t){let i={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,x.getParsedType)(e)},n=this._parse({data:e,path:i.path,parent:i}),s=await((0,d.isAsync)(n)?n:Promise.resolve(n));return Gf(i,s)}refine(e,t){let i=n=>typeof t=="string"||typeof t=="undefined"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,s)=>{let o=e(n),a=()=>s.addIssue({code:w.ZodIssueCode.custom,...i(n)});return typeof Promise!="undefined"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,t){return this._refinement((i,n)=>e(i)?!0:(n.addIssue(typeof t=="function"?t(i,n):t),!1))}_refinement(e){return new he({schema:this,typeName:A.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return ve.create(this,this._def)}nullable(){return Ce.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Re.create(this)}promise(){return We.create(this,this._def)}or(e){return ot.create([this,e],this._def)}and(e){return at.create(this,e,this._def)}transform(e){return new he({...j(this._def),schema:this,typeName:A.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new ht({...j(this._def),innerType:this,defaultValue:t,typeName:A.ZodDefault})}brand(){return new Ur({typeName:A.ZodBranded,type:this,...j(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new pt({...j(this._def),innerType:this,catchValue:t,typeName:A.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Zr.create(this,e)}readonly(){return dt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};h.ZodType=k;h.Schema=k;h.ZodSchema=k;var Bx=/^c[^\s-]{8,}$/i,$x=/^[0-9a-z]+$/,Hx=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Jx=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Yx=/^[a-z0-9_-]{21}$/i,Kx=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Gx=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Xx=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Qx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Aa,eq=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tq=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,rq=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,iq=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,nq=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,sq=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Qf="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",oq=new RegExp(`^${Qf}$`);function eh(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);let t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function aq(r){return new RegExp(`^${eh(r)}$`)}function th(r){let e=`${Qf}T${eh(r)}`,t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function uq(r,e){return!!((e==="v4"||!e)&&eq.test(r)||(e==="v6"||!e)&&rq.test(r))}function cq(r,e){if(!Kx.test(r))return!1;try{let[t]=r.split(".");if(!t)return!1;let i=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(i));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function lq(r,e){return!!((e==="v4"||!e)&&tq.test(r)||(e==="v6"||!e)&&iq.test(r))}var Ve=class r extends k{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==x.ZodParsedType.string){let s=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(s,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.string,received:s.parsedType}),d.INVALID}let i=new d.ParseStatus,n;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="max")e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="length"){let o=e.data.length>s.value,a=e.data.length<s.value;(o||a)&&(n=this._getOrReturnCtx(e,n),o?(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")Xx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"email",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")Aa||(Aa=new RegExp(Qx,"u")),Aa.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"emoji",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")Jx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"uuid",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="nanoid")Yx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"nanoid",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")Bx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"cuid",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")$x.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"cuid2",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")Hx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"ulid",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"url",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"regex",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),i.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?th(s).test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="date"?oq.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:"date",message:s.message}),i.dirty()):s.kind==="time"?aq(s).test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.invalid_string,validation:"time",message:s.message}),i.dirty()):s.kind==="duration"?Gx.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"duration",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="ip"?uq(e.data,s.version)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"ip",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="jwt"?cq(e.data,s.alg)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"jwt",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="cidr"?lq(e.data,s.version)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"cidr",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="base64"?nq.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"base64",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):s.kind==="base64url"?sq.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{validation:"base64url",code:w.ZodIssueCode.invalid_string,message:s.message}),i.dirty()):x.util.assertNever(s);return{status:i.value,value:e.data}}_regex(e,t,i){return this.refinement(n=>e.test(n),{validation:t,code:w.ZodIssueCode.invalid_string,...T.errorUtil.errToObj(i)})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...T.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...T.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...T.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...T.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...T.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...T.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...T.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...T.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...T.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...T.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...T.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...T.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...T.errorUtil.errToObj(e)})}datetime(e){var t,i;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!=null?t:!1,local:(i=e==null?void 0:e.local)!=null?i:!1,...T.errorUtil.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,...T.errorUtil.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...T.errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...T.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...T.errorUtil.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...T.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...T.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...T.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...T.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...T.errorUtil.errToObj(t)})}nonempty(e){return this.min(1,T.errorUtil.errToObj(e))}trim(){return new r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};h.ZodString=Ve;Ve.create=r=>{var e;return new Ve({checks:[],typeName:A.ZodString,coerce:(e=r==null?void 0:r.coerce)!=null?e:!1,...j(r)})};function fq(r,e){let t=(r.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,n=t>i?t:i,s=Number.parseInt(r.toFixed(n).replace(".","")),o=Number.parseInt(e.toFixed(n).replace(".",""));return s%o/10**n}var et=class r extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==x.ZodParsedType.number){let s=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(s,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.number,received:s.parsedType}),d.INVALID}let i,n=new d.ParseStatus;for(let s of this._def.checks)s.kind==="int"?x.util.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:s.message}),n.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="multipleOf"?fq(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.not_finite,message:s.message}),n.dirty()):x.util.assertNever(s);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,T.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,T.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,T.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,T.errorUtil.toString(t))}setLimit(e,t,i,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:T.errorUtil.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:T.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:T.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:T.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:T.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:T.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:T.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:T.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:T.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:T.errorUtil.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.util.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(t===null||i.value>t)&&(t=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(t)&&Number.isFinite(e)}};h.ZodNumber=et;et.create=r=>new et({checks:[],typeName:A.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...j(r)});var tt=class r extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==x.ZodParsedType.bigint)return this._getInvalidInput(e);let i,n=new d.ParseStatus;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):x.util.assertNever(s);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.bigint,received:t.parsedType}),d.INVALID}gte(e,t){return this.setLimit("min",e,!0,T.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,T.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,T.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,T.errorUtil.toString(t))}setLimit(e,t,i,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:T.errorUtil.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:T.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:T.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:T.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:T.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:T.errorUtil.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};h.ZodBigInt=tt;tt.create=r=>{var e;return new tt({checks:[],typeName:A.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!=null?e:!1,...j(r)})};var rt=class extends k{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==x.ZodParsedType.boolean){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.boolean,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodBoolean=rt;rt.create=r=>new rt({typeName:A.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...j(r)});var it=class r extends k{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==x.ZodParsedType.date){let s=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(s,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.date,received:s.parsedType}),d.INVALID}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(s,{code:w.ZodIssueCode.invalid_date}),d.INVALID}let i=new d.ParseStatus,n;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),i.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(n=this._getOrReturnCtx(e,n),(0,d.addIssueToContext)(n,{code:w.ZodIssueCode.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):x.util.assertNever(s);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:T.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:T.errorUtil.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};h.ZodDate=it;it.create=r=>new it({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:A.ZodDate,...j(r)});var jt=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.symbol){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.symbol,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodSymbol=jt;jt.create=r=>new jt({typeName:A.ZodSymbol,...j(r)});var nt=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.undefined){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.undefined,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodUndefined=nt;nt.create=r=>new nt({typeName:A.ZodUndefined,...j(r)});var st=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.null){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.null,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodNull=st;st.create=r=>new st({typeName:A.ZodNull,...j(r)});var ze=class extends k{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,d.OK)(e.data)}};h.ZodAny=ze;ze.create=r=>new ze({typeName:A.ZodAny,...j(r)});var ke=class extends k{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,d.OK)(e.data)}};h.ZodUnknown=ke;ke.create=r=>new ke({typeName:A.ZodUnknown,...j(r)});var Se=class extends k{_parse(e){let t=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.never,received:t.parsedType}),d.INVALID}};h.ZodNever=Se;Se.create=r=>new Se({typeName:A.ZodNever,...j(r)});var kt=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.undefined){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.void,received:i.parsedType}),d.INVALID}return(0,d.OK)(e.data)}};h.ZodVoid=kt;kt.create=r=>new kt({typeName:A.ZodVoid,...j(r)});var Re=class r extends k{_parse(e){let{ctx:t,status:i}=this._processInputParams(e),n=this._def;if(t.parsedType!==x.ZodParsedType.array)return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.array,received:t.parsedType}),d.INVALID;if(n.exactLength!==null){let o=t.data.length>n.exactLength.value,a=t.data.length<n.exactLength.value;(o||a)&&((0,d.addIssueToContext)(t,{code:o?w.ZodIssueCode.too_big:w.ZodIssueCode.too_small,minimum:a?n.exactLength.value:void 0,maximum:o?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&((0,d.addIssueToContext)(t,{code:w.ZodIssueCode.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&((0,d.addIssueToContext)(t,{code:w.ZodIssueCode.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),t.common.async)return Promise.all([...t.data].map((o,a)=>n.type._parseAsync(new be(t,o,t.path,a)))).then(o=>d.ParseStatus.mergeArray(i,o));let s=[...t.data].map((o,a)=>n.type._parseSync(new be(t,o,t.path,a)));return d.ParseStatus.mergeArray(i,s)}get element(){return this._def.type}min(e,t){return new r({...this._def,minLength:{value:e,message:T.errorUtil.toString(t)}})}max(e,t){return new r({...this._def,maxLength:{value:e,message:T.errorUtil.toString(t)}})}length(e,t){return new r({...this._def,exactLength:{value:e,message:T.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}};h.ZodArray=Re;Re.create=(r,e)=>new Re({type:r,minLength:null,maxLength:null,exactLength:null,typeName:A.ZodArray,...j(e)});function Et(r){if(r instanceof ue){let e={};for(let t in r.shape){let i=r.shape[t];e[t]=ve.create(Et(i))}return new ue({...r._def,shape:()=>e})}else return r instanceof Re?new Re({...r._def,type:Et(r.element)}):r instanceof ve?ve.create(Et(r.unwrap())):r instanceof Ce?Ce.create(Et(r.unwrap())):r instanceof Te?Te.create(r.items.map(e=>Et(e))):r}var ue=class r extends k{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=x.util.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==x.ZodParsedType.object){let l=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(l,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.object,received:l.parsedType}),d.INVALID}let{status:i,ctx:n}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Se&&this._def.unknownKeys==="strip"))for(let l in n.data)o.includes(l)||a.push(l);let c=[];for(let l of o){let f=s[l],p=n.data[l];c.push({key:{status:"valid",value:l},value:f._parse(new be(n,p,n.path,l)),alwaysSet:l in n.data})}if(this._def.catchall instanceof Se){let l=this._def.unknownKeys;if(l==="passthrough")for(let f of a)c.push({key:{status:"valid",value:f},value:{status:"valid",value:n.data[f]}});else if(l==="strict")a.length>0&&((0,d.addIssueToContext)(n,{code:w.ZodIssueCode.unrecognized_keys,keys:a}),i.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let f of a){let p=n.data[f];c.push({key:{status:"valid",value:f},value:l._parse(new be(n,p,n.path,f)),alwaysSet:f in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let l=[];for(let f of c){let p=await f.key,y=await f.value;l.push({key:p,value:y,alwaysSet:f.alwaysSet})}return l}).then(l=>d.ParseStatus.mergeObjectSync(i,l)):d.ParseStatus.mergeObjectSync(i,c)}get shape(){return this._def.shape()}strict(e){return T.errorUtil.errToObj,new r({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,i)=>{var s,o,a,c;let n=(a=(o=(s=this._def).errorMap)==null?void 0:o.call(s,t,i).message)!=null?a:i.defaultError;return t.code==="unrecognized_keys"?{message:(c=T.errorUtil.errToObj(e).message)!=null?c:n}:{message:n}}}:{}})}strip(){return new r({...this._def,unknownKeys:"strip"})}passthrough(){return new r({...this._def,unknownKeys:"passthrough"})}extend(e){return new r({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new r({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:A.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new r({...this._def,catchall:e})}pick(e){let t={};for(let i of x.util.objectKeys(e))e[i]&&this.shape[i]&&(t[i]=this.shape[i]);return new r({...this._def,shape:()=>t})}omit(e){let t={};for(let i of x.util.objectKeys(this.shape))e[i]||(t[i]=this.shape[i]);return new r({...this._def,shape:()=>t})}deepPartial(){return Et(this)}partial(e){let t={};for(let i of x.util.objectKeys(this.shape)){let n=this.shape[i];e&&!e[i]?t[i]=n:t[i]=n.optional()}return new r({...this._def,shape:()=>t})}required(e){let t={};for(let i of x.util.objectKeys(this.shape))if(e&&!e[i])t[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof ve;)s=s._def.innerType;t[i]=s}return new r({...this._def,shape:()=>t})}keyof(){return rh(x.util.objectKeys(this.shape))}};h.ZodObject=ue;ue.create=(r,e)=>new ue({shape:()=>r,unknownKeys:"strip",catchall:Se.create(),typeName:A.ZodObject,...j(e)});ue.strictCreate=(r,e)=>new ue({shape:()=>r,unknownKeys:"strict",catchall:Se.create(),typeName:A.ZodObject,...j(e)});ue.lazycreate=(r,e)=>new ue({shape:r,unknownKeys:"strip",catchall:Se.create(),typeName:A.ZodObject,...j(e)});var ot=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),i=this._def.options;function n(s){for(let a of s)if(a.result.status==="valid")return a.result;for(let a of s)if(a.result.status==="dirty")return t.common.issues.push(...a.ctx.common.issues),a.result;let o=s.map(a=>new w.ZodError(a.ctx.common.issues));return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_union,unionErrors:o}),d.INVALID}if(t.common.async)return Promise.all(i.map(async s=>{let o={...t,common:{...t.common,issues:[]},parent:null};return{result:await s._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(n);{let s,o=[];for(let c of i){let l={...t,common:{...t.common,issues:[]},parent:null},f=c._parseSync({data:t.data,path:t.path,parent:l});if(f.status==="valid")return f;f.status==="dirty"&&!s&&(s={result:f,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(c=>new w.ZodError(c));return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_union,unionErrors:a}),d.INVALID}}get options(){return this._def.options}};h.ZodUnion=ot;ot.create=(r,e)=>new ot({options:r,typeName:A.ZodUnion,...j(e)});var je=r=>r instanceof ut?je(r.schema):r instanceof he?je(r.innerType()):r instanceof ct?[r.value]:r instanceof lt?r.options:r instanceof ft?x.util.objectValues(r.enum):r instanceof ht?je(r._def.innerType):r instanceof nt?[void 0]:r instanceof st?[null]:r instanceof ve?[void 0,...je(r.unwrap())]:r instanceof Ce?[null,...je(r.unwrap())]:r instanceof Ur||r instanceof dt?je(r.unwrap()):r instanceof pt?je(r._def.innerType):[],Ki=class r extends k{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.ZodParsedType.object)return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.object,received:t.parsedType}),d.INVALID;let i=this.discriminator,n=t.data[i],s=this.optionsMap.get(n);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):((0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),d.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,i){let n=new Map;for(let s of t){let o=je(s.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of o){if(n.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);n.set(a,s)}}return new r({typeName:A.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...j(i)})}};h.ZodDiscriminatedUnion=Ki;function Ea(r,e){let t=(0,x.getParsedType)(r),i=(0,x.getParsedType)(e);if(r===e)return{valid:!0,data:r};if(t===x.ZodParsedType.object&&i===x.ZodParsedType.object){let n=x.util.objectKeys(e),s=x.util.objectKeys(r).filter(a=>n.indexOf(a)!==-1),o={...r,...e};for(let a of s){let c=Ea(r[a],e[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(t===x.ZodParsedType.array&&i===x.ZodParsedType.array){if(r.length!==e.length)return{valid:!1};let n=[];for(let s=0;s<r.length;s++){let o=r[s],a=e[s],c=Ea(o,a);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return t===x.ZodParsedType.date&&i===x.ZodParsedType.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}var at=class extends k{_parse(e){let{status:t,ctx:i}=this._processInputParams(e),n=(s,o)=>{if((0,d.isAborted)(s)||(0,d.isAborted)(o))return d.INVALID;let a=Ea(s.value,o.value);return a.valid?(((0,d.isDirty)(s)||(0,d.isDirty)(o))&&t.dirty(),{status:t.value,value:a.data}):((0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_intersection_types}),d.INVALID)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([s,o])=>n(s,o)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};h.ZodIntersection=at;at.create=(r,e,t)=>new at({left:r,right:e,typeName:A.ZodIntersection,...j(t)});var Te=class r extends k{_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==x.ZodParsedType.array)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.array,received:i.parsedType}),d.INVALID;if(i.data.length<this._def.items.length)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),d.INVALID;!this._def.rest&&i.data.length>this._def.items.length&&((0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let s=[...i.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new be(i,o,i.path,a)):null}).filter(o=>!!o);return i.common.async?Promise.all(s).then(o=>d.ParseStatus.mergeArray(t,o)):d.ParseStatus.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new r({...this._def,rest:e})}};h.ZodTuple=Te;Te.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Te({items:r,typeName:A.ZodTuple,rest:null,...j(e)})};var Gi=class r extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==x.ZodParsedType.object)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.object,received:i.parsedType}),d.INVALID;let n=[],s=this._def.keyType,o=this._def.valueType;for(let a in i.data)n.push({key:s._parse(new be(i,a,i.path,a)),value:o._parse(new be(i,i.data[a],i.path,a)),alwaysSet:a in i.data});return i.common.async?d.ParseStatus.mergeObjectAsync(t,n):d.ParseStatus.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,i){return t instanceof k?new r({keyType:e,valueType:t,typeName:A.ZodRecord,...j(i)}):new r({keyType:Ve.create(),valueType:e,typeName:A.ZodRecord,...j(t)})}};h.ZodRecord=Gi;var Rt=class extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==x.ZodParsedType.map)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.map,received:i.parsedType}),d.INVALID;let n=this._def.keyType,s=this._def.valueType,o=[...i.data.entries()].map(([a,c],l)=>({key:n._parse(new be(i,a,i.path,[l,"key"])),value:s._parse(new be(i,c,i.path,[l,"value"]))}));if(i.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of o){let l=await c.key,f=await c.value;if(l.status==="aborted"||f.status==="aborted")return d.INVALID;(l.status==="dirty"||f.status==="dirty")&&t.dirty(),a.set(l.value,f.value)}return{status:t.value,value:a}})}else{let a=new Map;for(let c of o){let l=c.key,f=c.value;if(l.status==="aborted"||f.status==="aborted")return d.INVALID;(l.status==="dirty"||f.status==="dirty")&&t.dirty(),a.set(l.value,f.value)}return{status:t.value,value:a}}}};h.ZodMap=Rt;Rt.create=(r,e,t)=>new Rt({valueType:e,keyType:r,typeName:A.ZodMap,...j(t)});var Pt=class r extends k{_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==x.ZodParsedType.set)return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.set,received:i.parsedType}),d.INVALID;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&((0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&((0,d.addIssueToContext)(i,{code:w.ZodIssueCode.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let s=this._def.valueType;function o(c){let l=new Set;for(let f of c){if(f.status==="aborted")return d.INVALID;f.status==="dirty"&&t.dirty(),l.add(f.value)}return{status:t.value,value:l}}let a=[...i.data.values()].map((c,l)=>s._parse(new be(i,c,i.path,l)));return i.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(e,t){return new r({...this._def,minSize:{value:e,message:T.errorUtil.toString(t)}})}max(e,t){return new r({...this._def,maxSize:{value:e,message:T.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};h.ZodSet=Pt;Pt.create=(r,e)=>new Pt({valueType:r,minSize:null,maxSize:null,typeName:A.ZodSet,...j(e)});var Xi=class r extends k{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.ZodParsedType.function)return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.function,received:t.parsedType}),d.INVALID;function i(a,c){return(0,d.makeIssue)({data:a,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,Yi.getErrorMap)(),Yi.defaultErrorMap].filter(l=>!!l),issueData:{code:w.ZodIssueCode.invalid_arguments,argumentsError:c}})}function n(a,c){return(0,d.makeIssue)({data:a,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,Yi.getErrorMap)(),Yi.defaultErrorMap].filter(l=>!!l),issueData:{code:w.ZodIssueCode.invalid_return_type,returnTypeError:c}})}let s={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof We){let a=this;return(0,d.OK)(async function(...c){let l=new w.ZodError([]),f=await a._def.args.parseAsync(c,s).catch(g=>{throw l.addIssue(i(c,g)),l}),p=await Reflect.apply(o,this,f);return await a._def.returns._def.type.parseAsync(p,s).catch(g=>{throw l.addIssue(n(p,g)),l})})}else{let a=this;return(0,d.OK)(function(...c){let l=a._def.args.safeParse(c,s);if(!l.success)throw new w.ZodError([i(c,l.error)]);let f=Reflect.apply(o,this,l.data),p=a._def.returns.safeParse(f,s);if(!p.success)throw new w.ZodError([n(f,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new r({...this._def,args:Te.create(e).rest(ke.create())})}returns(e){return new r({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,i){return new r({args:e||Te.create([]).rest(ke.create()),returns:t||ke.create(),typeName:A.ZodFunction,...j(i)})}};h.ZodFunction=Xi;var ut=class extends k{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};h.ZodLazy=ut;ut.create=(r,e)=>new ut({getter:r,typeName:A.ZodLazy,...j(e)});var ct=class extends k{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(t,{received:t.data,code:w.ZodIssueCode.invalid_literal,expected:this._def.value}),d.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}};h.ZodLiteral=ct;ct.create=(r,e)=>new ct({value:r,typeName:A.ZodLiteral,...j(e)});function rh(r,e){return new lt({values:r,typeName:A.ZodEnum,...j(e)})}var lt=class r extends k{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),i=this._def.values;return(0,d.addIssueToContext)(t,{expected:x.util.joinValues(i),received:t.parsedType,code:w.ZodIssueCode.invalid_type}),d.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),i=this._def.values;return(0,d.addIssueToContext)(t,{received:t.data,code:w.ZodIssueCode.invalid_enum_value,options:i}),d.INVALID}return(0,d.OK)(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return r.create(e,{...this._def,...t})}exclude(e,t=this._def){return r.create(this.options.filter(i=>!e.includes(i)),{...this._def,...t})}};h.ZodEnum=lt;lt.create=rh;var ft=class extends k{_parse(e){let t=x.util.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==x.ZodParsedType.string&&i.parsedType!==x.ZodParsedType.number){let n=x.util.objectValues(t);return(0,d.addIssueToContext)(i,{expected:x.util.joinValues(n),received:i.parsedType,code:w.ZodIssueCode.invalid_type}),d.INVALID}if(this._cache||(this._cache=new Set(x.util.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let n=x.util.objectValues(t);return(0,d.addIssueToContext)(i,{received:i.data,code:w.ZodIssueCode.invalid_enum_value,options:n}),d.INVALID}return(0,d.OK)(e.data)}get enum(){return this._def.values}};h.ZodNativeEnum=ft;ft.create=(r,e)=>new ft({values:r,typeName:A.ZodNativeEnum,...j(e)});var We=class extends k{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.ZodParsedType.promise&&t.common.async===!1)return(0,d.addIssueToContext)(t,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.promise,received:t.parsedType}),d.INVALID;let i=t.parsedType===x.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,d.OK)(i.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};h.ZodPromise=We;We.create=(r,e)=>new We({type:r,typeName:A.ZodPromise,...j(e)});var he=class extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===A.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:i}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:o=>{(0,d.addIssueToContext)(i,o),o.fatal?t.abort():t.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),n.type==="preprocess"){let o=n.transform(i.data,s);if(i.common.async)return Promise.resolve(o).then(async a=>{if(t.value==="aborted")return d.INVALID;let c=await this._def.schema._parseAsync({data:a,path:i.path,parent:i});return c.status==="aborted"?d.INVALID:c.status==="dirty"||t.value==="dirty"?(0,d.DIRTY)(c.value):c});{if(t.value==="aborted")return d.INVALID;let a=this._def.schema._parseSync({data:o,path:i.path,parent:i});return a.status==="aborted"?d.INVALID:a.status==="dirty"||t.value==="dirty"?(0,d.DIRTY)(a.value):a}}if(n.type==="refinement"){let o=a=>{let c=n.refinement(a,s);if(i.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?d.INVALID:(a.status==="dirty"&&t.dirty(),o(a.value),{status:t.value,value:a.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>a.status==="aborted"?d.INVALID:(a.status==="dirty"&&t.dirty(),o(a.value).then(()=>({status:t.value,value:a.value}))))}if(n.type==="transform")if(i.common.async===!1){let o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!(0,d.isValid)(o))return d.INVALID;let a=n.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>(0,d.isValid)(o)?Promise.resolve(n.transform(o.value,s)).then(a=>({status:t.value,value:a})):d.INVALID);x.util.assertNever(n)}};h.ZodEffects=he;h.ZodTransformer=he;he.create=(r,e,t)=>new he({schema:r,typeName:A.ZodEffects,effect:e,...j(t)});he.createWithPreprocess=(r,e,t)=>new he({schema:e,effect:{type:"preprocess",transform:r},typeName:A.ZodEffects,...j(t)});var ve=class extends k{_parse(e){return this._getType(e)===x.ZodParsedType.undefined?(0,d.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};h.ZodOptional=ve;ve.create=(r,e)=>new ve({innerType:r,typeName:A.ZodOptional,...j(e)});var Ce=class extends k{_parse(e){return this._getType(e)===x.ZodParsedType.null?(0,d.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};h.ZodNullable=Ce;Ce.create=(r,e)=>new Ce({innerType:r,typeName:A.ZodNullable,...j(e)});var ht=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),i=t.data;return t.parsedType===x.ZodParsedType.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};h.ZodDefault=ht;ht.create=(r,e)=>new ht({innerType:r,typeName:A.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...j(e)});var pt=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),i={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return(0,d.isAsync)(n)?n.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new w.ZodError(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new w.ZodError(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};h.ZodCatch=pt;pt.create=(r,e)=>new pt({innerType:r,typeName:A.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...j(e)});var Nt=class extends k{_parse(e){if(this._getType(e)!==x.ZodParsedType.nan){let i=this._getOrReturnCtx(e);return(0,d.addIssueToContext)(i,{code:w.ZodIssueCode.invalid_type,expected:x.ZodParsedType.nan,received:i.parsedType}),d.INVALID}return{status:"valid",value:e.data}}};h.ZodNaN=Nt;Nt.create=r=>new Nt({typeName:A.ZodNaN,...j(r)});h.BRAND=Symbol("zod_brand");var Ur=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),i=t.data;return this._def.type._parse({data:i,path:t.path,parent:t})}unwrap(){return this._def.type}};h.ZodBranded=Ur;var Zr=class r extends k{_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?d.INVALID:s.status==="dirty"?(t.dirty(),(0,d.DIRTY)(s.value)):this._def.out._parseAsync({data:s.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?d.INVALID:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(e,t){return new r({in:e,out:t,typeName:A.ZodPipeline})}};h.ZodPipeline=Zr;var dt=class extends k{_parse(e){let t=this._def.innerType._parse(e),i=n=>((0,d.isValid)(n)&&(n.value=Object.freeze(n.value)),n);return(0,d.isAsync)(t)?t.then(n=>i(n)):i(t)}unwrap(){return this._def.innerType}};h.ZodReadonly=dt;dt.create=(r,e)=>new dt({innerType:r,typeName:A.ZodReadonly,...j(e)});function Xf(r,e){let t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}function ih(r,e={},t){return r?ze.create().superRefine((i,n)=>{var o,a;let s=r(i);if(s instanceof Promise)return s.then(c=>{var l,f;if(!c){let p=Xf(e,i),y=(f=(l=p.fatal)!=null?l:t)!=null?f:!0;n.addIssue({code:"custom",...p,fatal:y})}});if(!s){let c=Xf(e,i),l=(a=(o=c.fatal)!=null?o:t)!=null?a:!0;n.addIssue({code:"custom",...c,fatal:l})}}):ze.create()}h.late={object:ue.lazycreate};var A;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(A||(h.ZodFirstPartyTypeKind=A={}));var hq=(r,e={message:`Input not instance of ${r.name}`})=>ih(t=>t instanceof r,e);h.instanceof=hq;var nh=Ve.create;h.string=nh;var sh=et.create;h.number=sh;var pq=Nt.create;h.nan=pq;var dq=tt.create;h.bigint=dq;var oh=rt.create;h.boolean=oh;var vq=it.create;h.date=vq;var bq=jt.create;h.symbol=bq;var mq=nt.create;h.undefined=mq;var yq=st.create;h.null=yq;var _q=ze.create;h.any=_q;var gq=ke.create;h.unknown=gq;var wq=Se.create;h.never=wq;var Sq=kt.create;h.void=Sq;var Oq=Re.create;h.array=Oq;var xq=ue.create;h.object=xq;var qq=ue.strictCreate;h.strictObject=qq;var Tq=ot.create;h.union=Tq;var Cq=Ki.create;h.discriminatedUnion=Cq;var Iq=at.create;h.intersection=Iq;var Aq=Te.create;h.tuple=Aq;var Eq=Gi.create;h.record=Eq;var jq=Rt.create;h.map=jq;var kq=Pt.create;h.set=kq;var Rq=Xi.create;h.function=Rq;var Pq=ut.create;h.lazy=Pq;var Nq=ct.create;h.literal=Nq;var Fq=lt.create;h.enum=Fq;var Mq=ft.create;h.nativeEnum=Mq;var Uq=We.create;h.promise=Uq;var ah=he.create;h.effect=ah;h.transformer=ah;var Zq=ve.create;h.optional=Zq;var Lq=Ce.create;h.nullable=Lq;var Dq=he.createWithPreprocess;h.preprocess=Dq;var Vq=Zr.create;h.pipeline=Vq;var zq=()=>nh().optional();h.ostring=zq;var Wq=()=>sh().optional();h.onumber=Wq;var Bq=()=>oh().optional();h.oboolean=Bq;h.coerce={string:r=>Ve.create({...r,coerce:!0}),number:r=>et.create({...r,coerce:!0}),boolean:r=>rt.create({...r,coerce:!0}),bigint:r=>tt.create({...r,coerce:!0}),date:r=>it.create({...r,coerce:!0})};h.NEVER=d.INVALID});var ja=u(me=>{"use strict";var $q=me&&me.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),Ft=me&&me.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&$q(e,r,t)};Object.defineProperty(me,"__esModule",{value:!0});Ft(Hi(),me);Ft(Ia(),me);Ft(Jf(),me);Ft(Fr(),me);Ft(uh(),me);Ft($i(),me)});var z=u(ce=>{"use strict";var ch=ce&&ce.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),Hq=ce&&ce.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Jq=ce&&ce.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&ch(e,r,t);return Hq(e,r),e},Yq=ce&&ce.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&ch(e,r,t)};Object.defineProperty(ce,"__esModule",{value:!0});ce.z=void 0;var lh=Jq(ja());ce.z=lh;Yq(ja(),ce);ce.default=lh});var ka=u(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.actionTypesZodSchema=Mt.ActionTypes=void 0;var Kq=z(),fh;(function(r){r.OpenUrl="openUrl",r.ImBack="imBack",r.PostBack="postBack",r.PlayAudio="playAudio",r.PlayVideo="playVideo",r.ShowImage="showImage",r.DownloadFile="downloadFile",r.Signin="signin",r.Call="call",r.MessageBack="messageBack",r.OpenApp="openApp"})(fh||(Mt.ActionTypes=fh={}));Mt.actionTypesZodSchema=Kq.z.enum(["openUrl","imBack","postBack","playAudio","showImage","downloadFile","signin","call","messageBack","openApp"])});var Ra=u(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.semanticActionStateTypesZodSchema=Ut.SemanticActionStateTypes=void 0;var Gq=z(),hh;(function(r){r.Start="start",r.Continue="continue",r.Done="done"})(hh||(Ut.SemanticActionStateTypes=hh={}));Ut.semanticActionStateTypesZodSchema=Gq.z.enum(["start","continue","done"])});var Pa=u(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.attachmentLayoutTypesZodSchema=Zt.AttachmentLayoutTypes=void 0;var Xq=z(),ph;(function(r){r.List="list",r.Carousel="carousel"})(ph||(Zt.AttachmentLayoutTypes=ph={}));Zt.attachmentLayoutTypesZodSchema=Xq.z.enum(["list","carousel"])});var Na=u(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.Channels=void 0;var dh;(function(r){r.Alexa="alexa",r.Console="console",r.Directline="directline",r.DirectlineSpeech="directlinespeech",r.Email="email",r.Emulator="emulator",r.Facebook="facebook",r.Groupme="groupme",r.Line="line",r.Msteams="msteams",r.Omni="omnichannel",r.Outlook="outlook",r.Skype="skype",r.Slack="slack",r.Sms="sms",r.Telegram="telegram",r.Telephony="telephony",r.Test="test",r.Webchat="webchat"})(dh||(Qi.Channels=dh={}))});var Fa=u(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.endOfConversationCodesZodSchema=Lt.EndOfConversationCodes=void 0;var Qq=z(),vh;(function(r){r.Unknown="unknown",r.CompletedSuccessfully="completedSuccessfully",r.UserCancelled="userCancelled",r.AgentTimedOut="agentTimedOut",r.AgentIssuedInvalidMessage="agentIssuedInvalidMessage",r.ChannelFailed="channelFailed"})(vh||(Lt.EndOfConversationCodes=vh={}));Lt.endOfConversationCodesZodSchema=Qq.z.enum(["unknown","completedSuccessfully","userCancelled","agentTimedOut","agentIssuedInvalidMessage","channelFailed"])});var en=u(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.roleTypeZodSchema=Dt.RoleTypes=void 0;var eT=z(),bh;(function(r){r.User="user",r.Agent="bot",r.Skill="skill"})(bh||(Dt.RoleTypes=bh={}));Dt.roleTypeZodSchema=eT.z.enum(["user","bot","skill"])});var mh=u(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.addAIToActivity=void 0;var tT=(r,e,t)=>{var i;let n={type:"https://schema.org/Message","@type":"Message","@context":"https://schema.org","@id":"",additionalType:["AIGeneratedContent"],citation:e,usageInfo:t};(i=r.entities)!==null&&i!==void 0||(r.entities=[]),r.entities.push(n)};tn.addAIToActivity=tT});var yh=u(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.adaptiveCardInvokeActionZodSchema=void 0;var vt=z();rn.adaptiveCardInvokeActionZodSchema=vt.z.object({type:vt.z.string().min(1),id:vt.z.string().optional(),verb:vt.z.string().min(1),data:vt.z.record(vt.z.string().min(1),vt.z.any())})});var _h=u(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.default="ffffffff-ffff-ffff-ffff-ffffffffffff"});var gh=u(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.default="00000000-0000-0000-0000-000000000000"});var wh=u(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i});var Lr=u(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});var rT=wh();function iT(r){return typeof r=="string"&&rT.default.test(r)}La.default=iT});var Dr=u(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});var nT=Lr();function sT(r){if(!(0,nT.default)(r))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(r.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(r.slice(9,13),16))>>>8,e&255,(e=parseInt(r.slice(14,18),16))>>>8,e&255,(e=parseInt(r.slice(19,23),16))>>>8,e&255,(e=parseInt(r.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}Da.default=sT});var Pe=u(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.unsafeStringify=void 0;var oT=Lr(),G=[];for(let r=0;r<256;++r)G.push((r+256).toString(16).slice(1));function Sh(r,e=0){return(G[r[e+0]]+G[r[e+1]]+G[r[e+2]]+G[r[e+3]]+"-"+G[r[e+4]]+G[r[e+5]]+"-"+G[r[e+6]]+G[r[e+7]]+"-"+G[r[e+8]]+G[r[e+9]]+"-"+G[r[e+10]]+G[r[e+11]]+G[r[e+12]]+G[r[e+13]]+G[r[e+14]]+G[r[e+15]]).toLowerCase()}Vr.unsafeStringify=Sh;function aT(r,e=0){let t=Sh(r,e);if(!(0,oT.default)(t))throw TypeError("Stringified UUID is invalid");return t}Vr.default=aT});var nn=u(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});var Va,uT=new Uint8Array(16);function cT(){if(!Va){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Va=crypto.getRandomValues.bind(crypto)}return Va(uT)}za.default=cT});var Wa=u(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.updateV1State=void 0;var Oh=nn(),lT=Pe(),zr={};function fT(r,e,t){var s,o,a,c;let i,n=(s=r==null?void 0:r._v6)!=null?s:!1;if(r){let l=Object.keys(r);l.length===1&&l[0]==="_v6"&&(r=void 0)}if(r)i=xh((c=(a=r.random)!=null?a:(o=r.rng)==null?void 0:o.call(r))!=null?c:(0,Oh.default)(),r.msecs,r.nsecs,r.clockseq,r.node,e,t);else{let l=Date.now(),f=(0,Oh.default)();qh(zr,l,f),i=xh(f,zr.msecs,zr.nsecs,n?void 0:zr.clockseq,n?void 0:zr.node,e,t)}return e!=null?e:(0,lT.unsafeStringify)(i)}function qh(r,e,t){var i,n;return(i=r.msecs)!=null||(r.msecs=-1/0),(n=r.nsecs)!=null||(r.nsecs=0),e===r.msecs?(r.nsecs++,r.nsecs>=1e4&&(r.node=void 0,r.nsecs=0)):e>r.msecs?r.nsecs=0:e<r.msecs&&(r.node=void 0),r.node||(r.node=t.slice(10,16),r.node[0]|=1,r.clockseq=(t[8]<<8|t[9])&16383),r.msecs=e,r}Wr.updateV1State=qh;function xh(r,e,t,i,n,s,o=0){if(r.length<16)throw new Error("Random bytes length must be >= 16");if(!s)s=new Uint8Array(16),o=0;else if(o<0||o+16>s.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);e!=null||(e=Date.now()),t!=null||(t=0),i!=null||(i=(r[8]<<8|r[9])&16383),n!=null||(n=r.slice(10,16)),e+=122192928e5;let a=((e&268435455)*1e4+t)%4294967296;s[o++]=a>>>24&255,s[o++]=a>>>16&255,s[o++]=a>>>8&255,s[o++]=a&255;let c=e/4294967296*1e4&268435455;s[o++]=c>>>8&255,s[o++]=c&255,s[o++]=c>>>24&15|16,s[o++]=c>>>16&255,s[o++]=i>>>8|128,s[o++]=i&255;for(let l=0;l<6;++l)s[o++]=n[l];return s}Wr.default=fT});var $a=u(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});var hT=Dr(),pT=Pe();function dT(r){let e=typeof r=="string"?(0,hT.default)(r):r,t=vT(e);return typeof r=="string"?(0,pT.unsafeStringify)(t):t}Ba.default=dT;function vT(r){return Uint8Array.of((r[6]&15)<<4|r[7]>>4&15,(r[7]&15)<<4|(r[4]&240)>>4,(r[4]&15)<<4|(r[5]&240)>>4,(r[5]&15)<<4|(r[0]&240)>>4,(r[0]&15)<<4|(r[1]&240)>>4,(r[1]&15)<<4|(r[2]&240)>>4,96|r[2]&15,r[3],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])}});var Ch=u(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});function bT(r){let e=_T(r),t=yT(e,r.length*8);return mT(t)}function mT(r){let e=new Uint8Array(r.length*4);for(let t=0;t<r.length*4;t++)e[t]=r[t>>2]>>>t%4*8&255;return e}function Th(r){return(r+64>>>9<<4)+14+1}function yT(r,e){let t=new Uint32Array(Th(e)).fill(0);t.set(r),t[e>>5]|=128<<e%32,t[t.length-1]=e,r=t;let i=1732584193,n=-271733879,s=-1732584194,o=271733878;for(let a=0;a<r.length;a+=16){let c=i,l=n,f=s,p=o;i=te(i,n,s,o,r[a],7,-680876936),o=te(o,i,n,s,r[a+1],12,-389564586),s=te(s,o,i,n,r[a+2],17,606105819),n=te(n,s,o,i,r[a+3],22,-1044525330),i=te(i,n,s,o,r[a+4],7,-176418897),o=te(o,i,n,s,r[a+5],12,1200080426),s=te(s,o,i,n,r[a+6],17,-1473231341),n=te(n,s,o,i,r[a+7],22,-45705983),i=te(i,n,s,o,r[a+8],7,1770035416),o=te(o,i,n,s,r[a+9],12,-1958414417),s=te(s,o,i,n,r[a+10],17,-42063),n=te(n,s,o,i,r[a+11],22,-1990404162),i=te(i,n,s,o,r[a+12],7,1804603682),o=te(o,i,n,s,r[a+13],12,-40341101),s=te(s,o,i,n,r[a+14],17,-1502002290),n=te(n,s,o,i,r[a+15],22,1236535329),i=re(i,n,s,o,r[a+1],5,-165796510),o=re(o,i,n,s,r[a+6],9,-1069501632),s=re(s,o,i,n,r[a+11],14,643717713),n=re(n,s,o,i,r[a],20,-373897302),i=re(i,n,s,o,r[a+5],5,-701558691),o=re(o,i,n,s,r[a+10],9,38016083),s=re(s,o,i,n,r[a+15],14,-660478335),n=re(n,s,o,i,r[a+4],20,-405537848),i=re(i,n,s,o,r[a+9],5,568446438),o=re(o,i,n,s,r[a+14],9,-1019803690),s=re(s,o,i,n,r[a+3],14,-187363961),n=re(n,s,o,i,r[a+8],20,1163531501),i=re(i,n,s,o,r[a+13],5,-1444681467),o=re(o,i,n,s,r[a+2],9,-51403784),s=re(s,o,i,n,r[a+7],14,1735328473),n=re(n,s,o,i,r[a+12],20,-1926607734),i=ie(i,n,s,o,r[a+5],4,-378558),o=ie(o,i,n,s,r[a+8],11,-2022574463),s=ie(s,o,i,n,r[a+11],16,1839030562),n=ie(n,s,o,i,r[a+14],23,-35309556),i=ie(i,n,s,o,r[a+1],4,-1530992060),o=ie(o,i,n,s,r[a+4],11,1272893353),s=ie(s,o,i,n,r[a+7],16,-155497632),n=ie(n,s,o,i,r[a+10],23,-1094730640),i=ie(i,n,s,o,r[a+13],4,681279174),o=ie(o,i,n,s,r[a],11,-358537222),s=ie(s,o,i,n,r[a+3],16,-722521979),n=ie(n,s,o,i,r[a+6],23,76029189),i=ie(i,n,s,o,r[a+9],4,-640364487),o=ie(o,i,n,s,r[a+12],11,-421815835),s=ie(s,o,i,n,r[a+15],16,530742520),n=ie(n,s,o,i,r[a+2],23,-995338651),i=ne(i,n,s,o,r[a],6,-198630844),o=ne(o,i,n,s,r[a+7],10,1126891415),s=ne(s,o,i,n,r[a+14],15,-1416354905),n=ne(n,s,o,i,r[a+5],21,-57434055),i=ne(i,n,s,o,r[a+12],6,1700485571),o=ne(o,i,n,s,r[a+3],10,-1894986606),s=ne(s,o,i,n,r[a+10],15,-1051523),n=ne(n,s,o,i,r[a+1],21,-2054922799),i=ne(i,n,s,o,r[a+8],6,1873313359),o=ne(o,i,n,s,r[a+15],10,-30611744),s=ne(s,o,i,n,r[a+6],15,-1560198380),n=ne(n,s,o,i,r[a+13],21,1309151649),i=ne(i,n,s,o,r[a+4],6,-145523070),o=ne(o,i,n,s,r[a+11],10,-1120210379),s=ne(s,o,i,n,r[a+2],15,718787259),n=ne(n,s,o,i,r[a+9],21,-343485551),i=Be(i,c),n=Be(n,l),s=Be(s,f),o=Be(o,p)}return Uint32Array.of(i,n,s,o)}function _T(r){if(r.length===0)return new Uint32Array;let e=new Uint32Array(Th(r.length*8)).fill(0);for(let t=0;t<r.length;t++)e[t>>2]|=(r[t]&255)<<t%4*8;return e}function Be(r,e){let t=(r&65535)+(e&65535);return(r>>16)+(e>>16)+(t>>16)<<16|t&65535}function gT(r,e){return r<<e|r>>>32-e}function sn(r,e,t,i,n,s){return Be(gT(Be(Be(e,r),Be(i,s)),n),t)}function te(r,e,t,i,n,s,o){return sn(e&t|~e&i,r,e,n,s,o)}function re(r,e,t,i,n,s,o){return sn(e&i|t&~i,r,e,n,s,o)}function ie(r,e,t,i,n,s,o){return sn(e^t^i,r,e,n,s,o)}function ne(r,e,t,i,n,s,o){return sn(t^(e|~i),r,e,n,s,o)}Ha.default=bT});var Br=u(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.URL=Ne.DNS=Ne.stringToBytes=void 0;var Ih=Dr(),wT=Pe();function Ah(r){r=unescape(encodeURIComponent(r));let e=new Uint8Array(r.length);for(let t=0;t<r.length;++t)e[t]=r.charCodeAt(t);return e}Ne.stringToBytes=Ah;Ne.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Ne.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function ST(r,e,t,i,n,s){let o=typeof t=="string"?Ah(t):t,a=typeof i=="string"?(0,Ih.default)(i):i;if(typeof i=="string"&&(i=(0,Ih.default)(i)),(i==null?void 0:i.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+o.length);if(c.set(a),c.set(o,a.length),c=e(c),c[6]=c[6]&15|r,c[8]=c[8]&63|128,n){s=s||0;for(let l=0;l<16;++l)n[s+l]=c[l];return n}return(0,wT.unsafeStringify)(c)}Ne.default=ST});var jh=u(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.URL=bt.DNS=void 0;var OT=Ch(),Ja=Br(),Eh=Br();Object.defineProperty(bt,"DNS",{enumerable:!0,get:function(){return Eh.DNS}});Object.defineProperty(bt,"URL",{enumerable:!0,get:function(){return Eh.URL}});function Ya(r,e,t,i){return(0,Ja.default)(48,OT.default,r,e,t,i)}Ya.DNS=Ja.DNS;Ya.URL=Ja.URL;bt.default=Ya});var kh=u(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});var xT=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);Ka.default={randomUUID:xT}});var Ph=u(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});var Rh=kh(),qT=nn(),TT=Pe();function CT(r,e,t){var n,s,o;if(Rh.default.randomUUID&&!e&&!r)return Rh.default.randomUUID();r=r||{};let i=(o=(s=r.random)!=null?s:(n=r.rng)==null?void 0:n.call(r))!=null?o:(0,qT.default)();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){if(t=t||0,t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let a=0;a<16;++a)e[t+a]=i[a];return e}return(0,TT.unsafeStringify)(i)}Ga.default=CT});var Nh=u(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});function IT(r,e,t,i){switch(r){case 0:return e&t^~e&i;case 1:return e^t^i;case 2:return e&t^e&i^t&i;case 3:return e^t^i}}function Xa(r,e){return r<<e|r>>>32-e}function AT(r){let e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520],i=new Uint8Array(r.length+1);i.set(r),i[r.length]=128,r=i;let n=r.length/4+2,s=Math.ceil(n/16),o=new Array(s);for(let a=0;a<s;++a){let c=new Uint32Array(16);for(let l=0;l<16;++l)c[l]=r[a*64+l*4]<<24|r[a*64+l*4+1]<<16|r[a*64+l*4+2]<<8|r[a*64+l*4+3];o[a]=c}o[s-1][14]=(r.length-1)*8/Math.pow(2,32),o[s-1][14]=Math.floor(o[s-1][14]),o[s-1][15]=(r.length-1)*8&4294967295;for(let a=0;a<s;++a){let c=new Uint32Array(80);for(let m=0;m<16;++m)c[m]=o[a][m];for(let m=16;m<80;++m)c[m]=Xa(c[m-3]^c[m-8]^c[m-14]^c[m-16],1);let l=t[0],f=t[1],p=t[2],y=t[3],g=t[4];for(let m=0;m<80;++m){let O=Math.floor(m/20),S=Xa(l,5)+IT(O,f,p,y)+g+e[O]+c[m]>>>0;g=y,y=p,p=Xa(f,30)>>>0,f=l,l=S}t[0]=t[0]+l>>>0,t[1]=t[1]+f>>>0,t[2]=t[2]+p>>>0,t[3]=t[3]+y>>>0,t[4]=t[4]+g>>>0}return Uint8Array.of(t[0]>>24,t[0]>>16,t[0]>>8,t[0],t[1]>>24,t[1]>>16,t[1]>>8,t[1],t[2]>>24,t[2]>>16,t[2]>>8,t[2],t[3]>>24,t[3]>>16,t[3]>>8,t[3],t[4]>>24,t[4]>>16,t[4]>>8,t[4])}Qa.default=AT});var Mh=u(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.URL=mt.DNS=void 0;var ET=Nh(),eu=Br(),Fh=Br();Object.defineProperty(mt,"DNS",{enumerable:!0,get:function(){return Fh.DNS}});Object.defineProperty(mt,"URL",{enumerable:!0,get:function(){return Fh.URL}});function tu(r,e,t,i){return(0,eu.default)(80,ET.default,r,e,t,i)}tu.DNS=eu.DNS;tu.URL=eu.URL;mt.default=tu});var Uh=u(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});var jT=Pe(),kT=Wa(),RT=$a();function PT(r,e,t){r!=null||(r={}),t!=null||(t=0);let i=(0,kT.default)({...r,_v6:!0},new Uint8Array(16));if(i=(0,RT.default)(i),e){for(let n=0;n<16;n++)e[t+n]=i[n];return e}return(0,jT.unsafeStringify)(i)}ru.default=PT});var Zh=u(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});var NT=Dr(),FT=Pe();function MT(r){let e=typeof r=="string"?(0,NT.default)(r):r,t=UT(e);return typeof r=="string"?(0,FT.unsafeStringify)(t):t}iu.default=MT;function UT(r){return Uint8Array.of((r[3]&15)<<4|r[4]>>4&15,(r[4]&15)<<4|(r[5]&240)>>4,(r[5]&15)<<4|r[6]&15,r[7],(r[1]&15)<<4|(r[2]&240)>>4,(r[2]&15)<<4|(r[3]&240)>>4,16|(r[0]&240)>>4,(r[0]&15)<<4|(r[1]&240)>>4,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])}});var zh=u($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.updateV7State=void 0;var Lh=nn(),ZT=Pe(),nu={};function LT(r,e,t){var n,s,o;let i;if(r)i=Dh((o=(s=r.random)!=null?s:(n=r.rng)==null?void 0:n.call(r))!=null?o:(0,Lh.default)(),r.msecs,r.seq,e,t);else{let a=Date.now(),c=(0,Lh.default)();Vh(nu,a,c),i=Dh(c,nu.msecs,nu.seq,e,t)}return e!=null?e:(0,ZT.unsafeStringify)(i)}function Vh(r,e,t){var i,n;return(i=r.msecs)!=null||(r.msecs=-1/0),(n=r.seq)!=null||(r.seq=0),e>r.msecs?(r.seq=t[6]<<23|t[7]<<16|t[8]<<8|t[9],r.msecs=e):(r.seq=r.seq+1|0,r.seq===0&&r.msecs++),r}$r.updateV7State=Vh;function Dh(r,e,t,i,n=0){if(r.length<16)throw new Error("Random bytes length must be >= 16");if(!i)i=new Uint8Array(16),n=0;else if(n<0||n+16>i.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);return e!=null||(e=Date.now()),t!=null||(t=r[6]*127<<24|r[7]<<16|r[8]<<8|r[9]),i[n++]=e/1099511627776&255,i[n++]=e/4294967296&255,i[n++]=e/16777216&255,i[n++]=e/65536&255,i[n++]=e/256&255,i[n++]=e&255,i[n++]=112|t>>>28&15,i[n++]=t>>>20&255,i[n++]=128|t>>>14&63,i[n++]=t>>>6&255,i[n++]=t<<2&255|r[10]&3,i[n++]=r[11],i[n++]=r[12],i[n++]=r[13],i[n++]=r[14],i[n++]=r[15],i}$r.default=LT});var Wh=u(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});var DT=Lr();function VT(r){if(!(0,DT.default)(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}su.default=VT});var Bh=u(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.version=M.validate=M.v7=M.v6ToV1=M.v6=M.v5=M.v4=M.v3=M.v1ToV6=M.v1=M.stringify=M.parse=M.NIL=M.MAX=void 0;var zT=_h();Object.defineProperty(M,"MAX",{enumerable:!0,get:function(){return zT.default}});var WT=gh();Object.defineProperty(M,"NIL",{enumerable:!0,get:function(){return WT.default}});var BT=Dr();Object.defineProperty(M,"parse",{enumerable:!0,get:function(){return BT.default}});var $T=Pe();Object.defineProperty(M,"stringify",{enumerable:!0,get:function(){return $T.default}});var HT=Wa();Object.defineProperty(M,"v1",{enumerable:!0,get:function(){return HT.default}});var JT=$a();Object.defineProperty(M,"v1ToV6",{enumerable:!0,get:function(){return JT.default}});var YT=jh();Object.defineProperty(M,"v3",{enumerable:!0,get:function(){return YT.default}});var KT=Ph();Object.defineProperty(M,"v4",{enumerable:!0,get:function(){return KT.default}});var GT=Mh();Object.defineProperty(M,"v5",{enumerable:!0,get:function(){return GT.default}});var XT=Uh();Object.defineProperty(M,"v6",{enumerable:!0,get:function(){return XT.default}});var QT=Zh();Object.defineProperty(M,"v6ToV1",{enumerable:!0,get:function(){return QT.default}});var eC=zh();Object.defineProperty(M,"v7",{enumerable:!0,get:function(){return eC.default}});var tC=Lr();Object.defineProperty(M,"validate",{enumerable:!0,get:function(){return tC.default}});var rC=Wh();Object.defineProperty(M,"version",{enumerable:!0,get:function(){return rC.default}})});var ou=u(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.entityZodSchema=void 0;var $h=z();on.entityZodSchema=$h.z.object({type:$h.z.string().min(1)}).passthrough()});var Hh=u(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.semanticActionZodSchema=void 0;var Hr=z(),iC=ou(),nC=Ra();an.semanticActionZodSchema=Hr.z.object({id:Hr.z.string().min(1),state:Hr.z.union([nC.semanticActionStateTypesZodSchema,Hr.z.string().min(1)]),entities:Hr.z.record(iC.entityZodSchema)})});var Jh=u(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.cardActionZodSchema=void 0;var Ie=z(),sC=ka();un.cardActionZodSchema=Ie.z.object({type:Ie.z.union([sC.actionTypesZodSchema,Ie.z.string().min(1)]),title:Ie.z.string().min(1),image:Ie.z.string().min(1).optional(),text:Ie.z.string().min(1).optional(),displayText:Ie.z.string().min(1).optional(),value:Ie.z.any().optional(),channelData:Ie.z.unknown().optional(),imageAltText:Ie.z.string().min(1).optional()})});var Yh=u(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.suggestedActionsZodSchema=void 0;var cn=z(),oC=Jh();ln.suggestedActionsZodSchema=cn.z.object({to:cn.z.array(cn.z.string().min(1)),actions:cn.z.array(oC.cardActionZodSchema)})});var au=u(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.activityEventNamesZodSchema=Vt.ActivityEventNames=void 0;var aC=z(),Kh;(function(r){r.ContinueConversation="ContinueConversation",r.CreateConversation="CreateConversation"})(Kh||(Vt.ActivityEventNames=Kh={}));Vt.activityEventNamesZodSchema=aC.z.enum(["ContinueConversation","CreateConversation"])});var uu=u(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.activityImportanceZodSchema=zt.ActivityImportance=void 0;var uC=z(),Gh;(function(r){r.Low="low",r.Normal="normal",r.High="high"})(Gh||(zt.ActivityImportance=Gh={}));zt.activityImportanceZodSchema=uC.z.enum(["low","normal","high"])});var cu=u(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.activityTypesZodSchema=Wt.ActivityTypes=void 0;var cC=z(),Xh;(function(r){r.Message="message",r.ContactRelationUpdate="contactRelationUpdate",r.ConversationUpdate="conversationUpdate",r.Typing="typing",r.EndOfConversation="endOfConversation",r.Event="event",r.Invoke="invoke",r.InvokeResponse="invokeResponse",r.DeleteUserData="deleteUserData",r.MessageUpdate="messageUpdate",r.MessageDelete="messageDelete",r.InstallationUpdate="installationUpdate",r.MessageReaction="messageReaction",r.Suggestion="suggestion",r.Trace="trace",r.Handoff="handoff",r.Command="command",r.CommandResult="commandResult",r.Delay="delay"})(Xh||(Wt.ActivityTypes=Xh={}));Wt.activityTypesZodSchema=cC.z.enum(["message","contactRelationUpdate","conversationUpdate","typing","endOfConversation","event","invoke","invokeResponse","deleteUserData","messageUpdate","messageDelete","installationUpdate","messageReaction","suggestion","trace","handoff","command","commandResult","delay"])});var Qh=u(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.attachmentZodSchema=void 0;var Bt=z();fn.attachmentZodSchema=Bt.z.object({contentType:Bt.z.string().min(1),contentUrl:Bt.z.string().min(1).optional(),content:Bt.z.unknown().optional(),name:Bt.z.string().min(1).optional(),thumbnailUrl:Bt.z.string().min(1).optional()})});var lu=u(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.channelAccountZodSchema=void 0;var yt=z(),lC=en();hn.channelAccountZodSchema=yt.z.object({id:yt.z.string().min(1).optional(),name:yt.z.string().optional(),aadObjectId:yt.z.string().min(1).optional(),role:yt.z.union([lC.roleTypeZodSchema,yt.z.string().min(1)]).optional(),properties:yt.z.unknown().optional()})});var fu=u(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.conversationAccountZodSchema=void 0;var Ae=z(),fC=en();pn.conversationAccountZodSchema=Ae.z.object({isGroup:Ae.z.boolean().optional(),conversationType:Ae.z.string().min(1).optional(),tenantId:Ae.z.string().min(1).optional(),id:Ae.z.string().min(1),name:Ae.z.string().min(1).optional(),aadObjectId:Ae.z.string().min(1).optional(),role:Ae.z.union([fC.roleTypeZodSchema,Ae.z.string().min(1)]).optional(),properties:Ae.z.unknown().optional()})});var tp=u(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.conversationReferenceZodSchema=void 0;var Jr=z(),ep=lu(),hC=fu();dn.conversationReferenceZodSchema=Jr.z.object({activityId:Jr.z.string().min(1).optional(),user:ep.channelAccountZodSchema.optional(),locale:Jr.z.string().min(1).optional(),agent:ep.channelAccountZodSchema.optional().nullable(),conversation:hC.conversationAccountZodSchema,channelId:Jr.z.string().min(1),serviceUrl:Jr.z.string().min(1).optional()})});var hu=u($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.deliveryModesZodSchema=$t.DeliveryModes=void 0;var pC=z(),rp;(function(r){r.Normal="normal",r.Notification="notification",r.ExpectReplies="expectReplies",r.Ephemeral="ephemeral"})(rp||($t.DeliveryModes=rp={}));$t.deliveryModesZodSchema=pC.z.enum(["normal","notification","expectReplies","ephemeral"])});var pu=u(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.inputHintsZodSchema=Ht.InputHints=void 0;var dC=z(),ip;(function(r){r.AcceptingInput="acceptingInput",r.IgnoringInput="ignoringInput",r.ExpectingInput="expectingInput"})(ip||(Ht.InputHints=ip={}));Ht.inputHintsZodSchema=dC.z.enum(["acceptingInput","ignoringInput","expectingInput"])});var du=u(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.messageReactionTypesZodSchema=Jt.MessageReactionTypes=void 0;var vC=z(),np;(function(r){r.Like="like",r.PlusOne="plusOne"})(np||(Jt.MessageReactionTypes=np={}));Jt.messageReactionTypesZodSchema=vC.z.enum(["like","plusOne"])});var sp=u(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.messageReactionZodSchema=void 0;var vu=z(),bC=du();vn.messageReactionZodSchema=vu.z.object({type:vu.z.union([bC.messageReactionTypesZodSchema,vu.z.string().min(1)])})});var bu=u(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.textFormatTypesZodSchema=Yt.TextFormatTypes=void 0;var mC=z(),op;(function(r){r.Markdown="markdown",r.Plain="plain",r.Xml="xml"})(op||(Yt.TextFormatTypes=op={}));Yt.textFormatTypesZodSchema=mC.z.enum(["markdown","plain","xml"])});var ap=u(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.textHighlightZodSchema=void 0;var mu=z();bn.textHighlightZodSchema=mu.z.object({text:mu.z.string().min(1),occurrence:mu.z.number()})});var fp=u(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.Activity=_t.activityZodSchema=void 0;var yC=Bh(),I=z(),_C=Hh(),gC=Yh(),lp=au(),wC=uu(),yn=cu(),SC=Qh(),OC=Pa(),mn=lu(),up=Na(),xC=fu(),qC=tp(),TC=Fa(),CC=hu(),IC=ou(),AC=pu(),cp=sp(),EC=bu(),jC=ap();_t.activityZodSchema=I.z.object({type:I.z.union([yn.activityTypesZodSchema,I.z.string().min(1)]),text:I.z.string().optional(),id:I.z.string().min(1).optional(),channelId:I.z.string().min(1).optional(),from:mn.channelAccountZodSchema.optional(),timestamp:I.z.union([I.z.date(),I.z.string().min(1).datetime().optional(),I.z.string().min(1).transform(r=>new Date(r)).optional()]),localTimestamp:I.z.string().min(1).transform(r=>new Date(r)).optional().or(I.z.date()).optional(),localTimezone:I.z.string().min(1).optional(),callerId:I.z.string().min(1).optional(),serviceUrl:I.z.string().min(1).optional(),conversation:xC.conversationAccountZodSchema.optional(),recipient:mn.channelAccountZodSchema.optional(),textFormat:I.z.union([EC.textFormatTypesZodSchema,I.z.string().min(1)]).optional(),attachmentLayout:I.z.union([OC.attachmentLayoutTypesZodSchema,I.z.string().min(1)]).optional(),membersAdded:I.z.array(mn.channelAccountZodSchema).optional(),membersRemoved:I.z.array(mn.channelAccountZodSchema).optional(),reactionsAdded:I.z.array(cp.messageReactionZodSchema).optional(),reactionsRemoved:I.z.array(cp.messageReactionZodSchema).optional(),topicName:I.z.string().min(1).optional(),historyDisclosed:I.z.boolean().optional(),locale:I.z.string().min(1).optional(),speak:I.z.string().min(1).optional(),inputHint:I.z.union([AC.inputHintsZodSchema,I.z.string().min(1)]).optional(),summary:I.z.string().min(1).optional(),suggestedActions:gC.suggestedActionsZodSchema.optional(),attachments:I.z.array(SC.attachmentZodSchema).optional(),entities:I.z.array(IC.entityZodSchema.passthrough()).optional(),channelData:I.z.any().optional(),action:I.z.string().min(1).optional(),replyToId:I.z.string().min(1).optional(),label:I.z.string().min(1).optional(),valueType:I.z.string().min(1).optional(),value:I.z.unknown().optional(),name:I.z.union([lp.activityEventNamesZodSchema,I.z.string().min(1)]).optional(),relatesTo:qC.conversationReferenceZodSchema.optional(),code:I.z.union([TC.endOfConversationCodesZodSchema,I.z.string().min(1)]).optional(),expiration:I.z.string().min(1).datetime().optional(),importance:I.z.union([wC.activityImportanceZodSchema,I.z.string().min(1)]).optional(),deliveryMode:I.z.union([CC.deliveryModesZodSchema,I.z.string().min(1)]).optional(),listenFor:I.z.array(I.z.string().min(1)).optional(),textHighlights:I.z.array(jC.textHighlightZodSchema).optional(),semanticAction:_C.semanticActionZodSchema.optional()});var yu=class r{constructor(e){if(e===void 0)throw new Error("Invalid ActivityType: undefined");if(e===null)throw new Error("Invalid ActivityType: null");if(typeof e=="string"&&e.length===0)throw new Error("Invalid ActivityType: empty string");this.type=e}static fromJson(e){return this.fromObject(JSON.parse(e))}static fromObject(e){let t=_t.activityZodSchema.passthrough().parse(e),i=new r(t.type);return Object.assign(i,t),i}static getContinuationActivity(e){let t={type:yn.ActivityTypes.Event,name:lp.ActivityEventNames.ContinueConversation,id:(0,yC.v4)(),channelId:e.channelId,locale:e.locale,serviceUrl:e.serviceUrl,conversation:e.conversation,recipient:e.agent,from:e.user,relatesTo:e};return r.fromObject(t)}getAppropriateReplyToId(){if(this.type!==yn.ActivityTypes.ConversationUpdate||this.channelId!==up.Channels.Directline&&this.channelId!==up.Channels.Webchat)return this.id}getConversationReference(){if(this.recipient===null||this.recipient===void 0)throw new Error("Activity Recipient undefined");if(this.conversation===null||this.conversation===void 0)throw new Error("Activity Conversation undefined");if(this.channelId===null||this.channelId===void 0)throw new Error("Activity ChannelId undefined");if(this.serviceUrl===null||this.serviceUrl===void 0)throw new Error("Activity ServiceUrl undefined");return{activityId:this.getAppropriateReplyToId(),user:this.from,agent:this.recipient,conversation:this.conversation,channelId:this.channelId,locale:this.locale,serviceUrl:this.serviceUrl}}applyConversationReference(e,t=!1){var i,n,s;return this.channelId=e.channelId,(i=this.locale)!==null&&i!==void 0||(this.locale=e.locale),this.serviceUrl=e.serviceUrl,this.conversation=e.conversation,t?(this.from=e.user,this.recipient=(n=e.agent)!==null&&n!==void 0?n:void 0,e.activityId&&(this.id=e.activityId)):(this.from=(s=e.agent)!==null&&s!==void 0?s:void 0,this.recipient=e.user,e.activityId&&(this.replyToId=e.activityId)),this}clone(){let e=JSON.parse(JSON.stringify(this));for(let t in e)typeof e[t]=="string"&&!isNaN(Date.parse(e[t]))&&(e[t]=new Date(e[t]));return Object.setPrototypeOf(e,r.prototype),e}getMentions(e){let t=[];if(e.entities!==void 0)for(let i=0;i<e.entities.length;i++)e.entities[i].type.toLowerCase()==="mention"&&t.push(e.entities[i]);return t}normalizeMentions(e=!1){var t,i;if(this.type===yn.ActivityTypes.Message&&(e&&(this.removeRecipientMention(),this.entities!==void 0&&(!((t=this.recipient)===null||t===void 0)&&t.id)&&(this.entities=this.entities.filter(n=>{var s;return n.type.toLowerCase()==="mention"?n.mentioned.id!==((s=this.recipient)===null||s===void 0?void 0:s.id):!0}))),this.text&&(this.text=r.removeAt(this.text)),this.entities!==void 0)){let n=this.getMentions(this);for(let s of n)s.text&&(s.text=(i=r.removeAt(s.text))===null||i===void 0?void 0:i.trim())}}static removeAt(e){if(!e)return e;let t;do{t=!1;let i=e.toLowerCase().indexOf("<at");if(i>=0){let n=e.indexOf(">",i);if(n>0){let s=e.toLowerCase().indexOf("</at>",n);if(s>0){let o=e.substring(s+5);o.length>0&&!/\s/.test(o[0])&&(o=` ${o}`),e=e.substring(0,s)+o;let a=e.substring(n+1,s),c=e.substring(0,i);c.length>0&&!/\s$/.test(c)&&(c+=" "),e=c+a+o,t=!0}}}}while(t);return e}removeMentionText(e){let i=this.getMentions(this).filter(n=>n.mentioned.id===e);return i.length>0&&this.text&&(this.text=this.text.replace(i[0].text,"").trim()),this.text||""}removeRecipientMention(){return this.recipient!=null&&this.recipient.id?this.removeMentionText(this.recipient.id):""}getReplyConversationReference(e){let t=this.getConversationReference();return t.activityId=e,t}toJsonString(){return JSON.stringify(this)}};_t.Activity=yu});var hp=u(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.CallerIdConstants=void 0;_n.CallerIdConstants={PublicAzureChannel:"urn:botframework:azure",USGovChannel:"urn:botframework:azureusgov",AgentPrefix:"urn:botframework:aadappid:"}});var pp=u(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.activityTreatments=Kt.ActivityTreatments=void 0;var kC=z(),_u;(function(r){r.Targeted="targeted"})(_u||(Kt.ActivityTreatments=_u={}));Kt.activityTreatments=kC.z.nativeEnum(_u)});var bp=u(R=>{"use strict";var RC=R&&R.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),dp=R&&R.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&RC(e,r,t)};Object.defineProperty(R,"__esModule",{value:!0});R.ActivityTreatments=R.TextFormatTypes=R.MessageReactionTypes=R.InputHints=R.DeliveryModes=R.CallerIdConstants=R.ActivityTypes=R.ActivityImportance=R.ActivityEventNames=R.activityZodSchema=R.Activity=R.RoleTypes=R.EndOfConversationCodes=R.Channels=R.AttachmentLayoutTypes=R.SemanticActionStateTypes=R.ActionTypes=void 0;var PC=ka();Object.defineProperty(R,"ActionTypes",{enumerable:!0,get:function(){return PC.ActionTypes}});var NC=Ra();Object.defineProperty(R,"SemanticActionStateTypes",{enumerable:!0,get:function(){return NC.SemanticActionStateTypes}});var FC=Pa();Object.defineProperty(R,"AttachmentLayoutTypes",{enumerable:!0,get:function(){return FC.AttachmentLayoutTypes}});var MC=Na();Object.defineProperty(R,"Channels",{enumerable:!0,get:function(){return MC.Channels}});var UC=Fa();Object.defineProperty(R,"EndOfConversationCodes",{enumerable:!0,get:function(){return UC.EndOfConversationCodes}});var ZC=en();Object.defineProperty(R,"RoleTypes",{enumerable:!0,get:function(){return ZC.RoleTypes}});dp(mh(),R);dp(yh(),R);var vp=fp();Object.defineProperty(R,"Activity",{enumerable:!0,get:function(){return vp.Activity}});Object.defineProperty(R,"activityZodSchema",{enumerable:!0,get:function(){return vp.activityZodSchema}});var LC=au();Object.defineProperty(R,"ActivityEventNames",{enumerable:!0,get:function(){return LC.ActivityEventNames}});var DC=uu();Object.defineProperty(R,"ActivityImportance",{enumerable:!0,get:function(){return DC.ActivityImportance}});var VC=cu();Object.defineProperty(R,"ActivityTypes",{enumerable:!0,get:function(){return VC.ActivityTypes}});var zC=hp();Object.defineProperty(R,"CallerIdConstants",{enumerable:!0,get:function(){return zC.CallerIdConstants}});var WC=hu();Object.defineProperty(R,"DeliveryModes",{enumerable:!0,get:function(){return WC.DeliveryModes}});var BC=pu();Object.defineProperty(R,"InputHints",{enumerable:!0,get:function(){return BC.InputHints}});var $C=du();Object.defineProperty(R,"MessageReactionTypes",{enumerable:!0,get:function(){return $C.MessageReactionTypes}});var HC=bu();Object.defineProperty(R,"TextFormatTypes",{enumerable:!0,get:function(){return HC.TextFormatTypes}});var JC=pp();Object.defineProperty(R,"ActivityTreatments",{enumerable:!0,get:function(){return JC.ActivityTreatments}})});var yp=u((nG,mp)=>{var Gt=1e3,Xt=Gt*60,Qt=Xt*60,gt=Qt*24,YC=gt*7,KC=gt*365.25;mp.exports=function(r,e){e=e||{};var t=typeof r;if(t==="string"&&r.length>0)return GC(r);if(t==="number"&&isFinite(r))return e.long?QC(r):XC(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function GC(r){if(r=String(r),!(r.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(e){var t=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return t*KC;case"weeks":case"week":case"w":return t*YC;case"days":case"day":case"d":return t*gt;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Qt;case"minutes":case"minute":case"mins":case"min":case"m":return t*Xt;case"seconds":case"second":case"secs":case"sec":case"s":return t*Gt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function XC(r){var e=Math.abs(r);return e>=gt?Math.round(r/gt)+"d":e>=Qt?Math.round(r/Qt)+"h":e>=Xt?Math.round(r/Xt)+"m":e>=Gt?Math.round(r/Gt)+"s":r+"ms"}function QC(r){var e=Math.abs(r);return e>=gt?wn(r,e,gt,"day"):e>=Qt?wn(r,e,Qt,"hour"):e>=Xt?wn(r,e,Xt,"minute"):e>=Gt?wn(r,e,Gt,"second"):r+" ms"}function wn(r,e,t,i){var n=e>=t*1.5;return Math.round(r/t)+" "+i+(n?"s":"")}});var gp=u((sG,_p)=>{function eI(r){t.debug=t,t.default=t,t.coerce=c,t.disable=o,t.enable=n,t.enabled=a,t.humanize=yp(),t.destroy=l,Object.keys(r).forEach(f=>{t[f]=r[f]}),t.names=[],t.skips=[],t.formatters={};function e(f){let p=0;for(let y=0;y<f.length;y++)p=(p<<5)-p+f.charCodeAt(y),p|=0;return t.colors[Math.abs(p)%t.colors.length]}t.selectColor=e;function t(f){let p,y=null,g,m;function O(...S){if(!O.enabled)return;let q=O,F=Number(new Date),U=F-(p||F);q.diff=U,q.prev=p,q.curr=F,p=F,S[0]=t.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let D=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(de,Ee)=>{if(de==="%%")return"%";D++;let Ge=t.formatters[Ee];if(typeof Ge=="function"){let Oi=S[D];de=Ge.call(q,Oi),S.splice(D,1),D--}return de}),t.formatArgs.call(q,S),(q.log||t.log).apply(q,S)}return O.namespace=f,O.useColors=t.useColors(),O.color=t.selectColor(f),O.extend=i,O.destroy=t.destroy,Object.defineProperty(O,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(g!==t.namespaces&&(g=t.namespaces,m=t.enabled(f)),m),set:S=>{y=S}}),typeof t.init=="function"&&t.init(O),O}function i(f,p){let y=t(this.namespace+(typeof p=="undefined"?":":p)+f);return y.log=this.log,y}function n(f){t.save(f),t.namespaces=f,t.names=[],t.skips=[];let p=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let y of p)y[0]==="-"?t.skips.push(y.slice(1)):t.names.push(y)}function s(f,p){let y=0,g=0,m=-1,O=0;for(;y<f.length;)if(g<p.length&&(p[g]===f[y]||p[g]==="*"))p[g]==="*"?(m=g,O=y,g++):(y++,g++);else if(m!==-1)g=m+1,O++,y=O;else return!1;for(;g<p.length&&p[g]==="*";)g++;return g===p.length}function o(){let f=[...t.names,...t.skips.map(p=>"-"+p)].join(",");return t.enable(""),f}function a(f){for(let p of t.skips)if(s(f,p))return!1;for(let p of t.names)if(s(f,p))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}_p.exports=eI});var wp=u((le,Sn)=>{le.formatArgs=rI;le.save=iI;le.load=nI;le.useColors=tI;le.storage=sI();le.destroy=(()=>{let r=!1;return()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();le.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function tI(){if(typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let r;return typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&(r=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(r[1],10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function rI(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+Sn.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;r.splice(1,0,e,"color: inherit");let t=0,i=0;r[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(t++,n==="%c"&&(i=t))}),r.splice(i,0,e)}le.log=console.debug||console.log||(()=>{});function iI(r){try{r?le.storage.setItem("debug",r):le.storage.removeItem("debug")}catch{}}function nI(){let r;try{r=le.storage.getItem("debug")||le.storage.getItem("DEBUG")}catch{}return!r&&typeof process!="undefined"&&"env"in process&&(r=process.env.DEBUG),r}function sI(){try{return localStorage}catch{}}Sn.exports=gp()(le);var{formatters:oI}=Sn.exports;oI.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var se=u(Cp=>{"use strict";var fI=typeof window!="undefined"&&window,hI=typeof self!="undefined"&&typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&self,pI=typeof global!="undefined"&&global,Tp=fI||pI||hI;Cp.root=Tp;(function(){if(!Tp)throw new Error("RxJS could not find any global context (window, self, global)")})()});var Kr=u(Ip=>{"use strict";function dI(r){return typeof r=="function"}Ip.isFunction=dI});var Oe=u(Ap=>{"use strict";Ap.isArray=Array.isArray||function(r){return r&&typeof r.length=="number"}});var xu=u(Ep=>{"use strict";function vI(r){return r!=null&&typeof r=="object"}Ep.isObject=vI});var Y=u(jp=>{"use strict";jp.errorObject={e:{}}});var Q=u(Pp=>{"use strict";var kp=Y(),Rp;function bI(){try{return Rp.apply(this,arguments)}catch(r){return kp.errorObject.e=r,kp.errorObject}}function mI(r){return Rp=r,bI}Pp.tryCatch=mI});var qu=u(xn=>{"use strict";var yI=xn&&xn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},_I=function(r){yI(e,r);function e(t){r.call(this),this.errors=t;var i=Error.call(this,t?t.length+` errors occurred during unsubscription:
|
|
2
|
-
|
|
3
|
-
`):"");this.name=i.name="UnsubscriptionError",this.stack=i.stack,this.message=i.message}return e}(Error);xn.UnsubscriptionError=_I});var J=u(Mp=>{"use strict";var gI=Oe(),wI=xu(),SI=Kr(),Np=Q(),er=Y(),qn=qu(),OI=function(){function r(e){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}return r.prototype.unsubscribe=function(){var e=!1,t;if(!this.closed){var i=this,n=i._parent,s=i._parents,o=i._unsubscribe,a=i._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var c=-1,l=s?s.length:0;n;)n.remove(this),n=++c<l&&s[c]||null;if(SI.isFunction(o)){var f=Np.tryCatch(o).call(this);f===er.errorObject&&(e=!0,t=t||(er.errorObject.e instanceof qn.UnsubscriptionError?Fp(er.errorObject.e.errors):[er.errorObject.e]))}if(gI.isArray(a))for(c=-1,l=a.length;++c<l;){var p=a[c];if(wI.isObject(p)){var f=Np.tryCatch(p.unsubscribe).call(p);if(f===er.errorObject){e=!0,t=t||[];var y=er.errorObject.e;y instanceof qn.UnsubscriptionError?t=t.concat(Fp(y.errors)):t.push(y)}}}if(e)throw new qn.UnsubscriptionError(t)}},r.prototype.add=function(e){if(!e||e===r.EMPTY)return r.EMPTY;if(e===this)return this;var t=e;switch(typeof e){case"function":t=new r(e);case"object":if(t.closed||typeof t.unsubscribe!="function")return t;if(this.closed)return t.unsubscribe(),t;if(typeof t._addParent!="function"){var i=t;t=new r,t._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var n=this._subscriptions||(this._subscriptions=[]);return n.push(t),t._addParent(this),t},r.prototype.remove=function(e){var t=this._subscriptions;if(t){var i=t.indexOf(e);i!==-1&&t.splice(i,1)}},r.prototype._addParent=function(e){var t=this,i=t._parent,n=t._parents;!i||i===e?this._parent=e:n?n.indexOf(e)===-1&&n.push(e):this._parents=[e]},r.EMPTY=function(e){return e.closed=!0,e}(new r),r}();Mp.Subscription=OI;function Fp(r){return r.reduce(function(e,t){return e.concat(t instanceof qn.UnsubscriptionError?t.errors:t)},[])}});var Tu=u(Up=>{"use strict";Up.empty={closed:!0,next:function(r){},error:function(r){throw r},complete:function(){}}});var Gr=u(Tn=>{"use strict";var xI=se(),Cu=xI.root.Symbol;Tn.rxSubscriber=typeof Cu=="function"&&typeof Cu.for=="function"?Cu.for("rxSubscriber"):"@@rxSubscriber";Tn.$$rxSubscriber=Tn.rxSubscriber});var C=u(Cn=>{"use strict";var Dp=Cn&&Cn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Zp=Kr(),qI=J(),Iu=Tu(),Au=Gr(),Eu=function(r){Dp(e,r);function e(t,i,n){switch(r.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Iu.empty;break;case 1:if(!t){this.destination=Iu.empty;break}if(typeof t=="object"){if(TI(t)){var s=t[Au.rxSubscriber]();this.syncErrorThrowable=s.syncErrorThrowable,this.destination=s,s.add(this)}else this.syncErrorThrowable=!0,this.destination=new Lp(this,t);break}default:this.syncErrorThrowable=!0,this.destination=new Lp(this,t,i,n);break}}return e.prototype[Au.rxSubscriber]=function(){return this},e.create=function(t,i,n){var s=new e(t,i,n);return s.syncErrorThrowable=!1,s},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this,i=t._parent,n=t._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=i,this._parents=n,this},e}(qI.Subscription);Cn.Subscriber=Eu;var Lp=function(r){Dp(e,r);function e(t,i,n,s){r.call(this),this._parentSubscriber=t;var o,a=this;Zp.isFunction(i)?o=i:i&&(o=i.next,n=i.error,s=i.complete,i!==Iu.empty&&(a=Object.create(i),Zp.isFunction(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this))),this._context=a,this._next=o,this._error=n,this._complete=s}return e.prototype.next=function(t){if(!this.isStopped&&this._next){var i=this._parentSubscriber;i.syncErrorThrowable?this.__tryOrSetError(i,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var i=this._parentSubscriber;if(this._error)i.syncErrorThrowable?(this.__tryOrSetError(i,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(i.syncErrorThrowable)i.syncErrorValue=t,i.syncErrorThrown=!0,this.unsubscribe();else throw this.unsubscribe(),t}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var i=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};i.syncErrorThrowable?(this.__tryOrSetError(i,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,i){try{t.call(this._context,i)}catch(n){throw this.unsubscribe(),n}},e.prototype.__tryOrSetError=function(t,i,n){try{i.call(this._context,n)}catch(s){return t.syncErrorValue=s,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(Eu);function TI(r){return r instanceof Eu||"syncErrorThrowable"in r&&r[Au.rxSubscriber]}});var Wp=u(zp=>{"use strict";var ju=C(),Vp=Gr(),CI=Tu();function II(r,e,t){if(r){if(r instanceof ju.Subscriber)return r;if(r[Vp.rxSubscriber])return r[Vp.rxSubscriber]()}return!r&&!e&&!t?new ju.Subscriber(CI.empty):new ju.Subscriber(r,e,t)}zp.toSubscriber=II});var Qr=u(Xr=>{"use strict";var AI=se();function Bp(r){var e,t=r.Symbol;return typeof t=="function"?t.observable?e=t.observable:(e=t("observable"),t.observable=e):e="@@observable",e}Xr.getSymbolObservable=Bp;Xr.observable=Bp(AI.root);Xr.$$observable=Xr.observable});var In=u($p=>{"use strict";function EI(){}$p.noop=EI});var An=u(ku=>{"use strict";var jI=In();function kI(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return Hp(r)}ku.pipe=kI;function Hp(r){return r?r.length===1?r[0]:function(t){return r.reduce(function(i,n){return n(i)},t)}:jI.noop}ku.pipeFromArray=Hp});var v=u(Jp=>{"use strict";var ye=se(),RI=Wp(),PI=Qr(),NI=An(),FI=function(){function r(e){this._isScalar=!1,e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,i){var n=this.operator,s=RI.toSubscriber(e,t,i);if(n?n.call(s,this.source):s.add(this.source||!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.syncErrorThrown=!0,e.syncErrorValue=t,e.error(t)}},r.prototype.forEach=function(e,t){var i=this;if(t||(ye.root.Rx&&ye.root.Rx.config&&ye.root.Rx.config.Promise?t=ye.root.Rx.config.Promise:ye.root.Promise&&(t=ye.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(n,s){var o;o=i.subscribe(function(a){if(o)try{e(a)}catch(c){s(c),o.unsubscribe()}else e(a)},s,n)})},r.prototype._subscribe=function(e){return this.source.subscribe(e)},r.prototype[PI.observable]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return e.length===0?this:NI.pipeFromArray(e)(this)},r.prototype.toPromise=function(e){var t=this;if(e||(ye.root.Rx&&ye.root.Rx.config&&ye.root.Rx.config.Promise?e=ye.root.Rx.config.Promise:ye.root.Promise&&(e=ye.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(i,n){var s;t.subscribe(function(o){return s=o},function(o){return n(o)},function(){return i(s)})})},r.create=function(e){return new r(e)},r}();Jp.Observable=FI});var ei=u(En=>{"use strict";var MI=En&&En.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},UI=function(r){MI(e,r);function e(){var t=r.call(this,"object unsubscribed");this.name=t.name="ObjectUnsubscribedError",this.stack=t.stack,this.message=t.message}return e}(Error);En.ObjectUnsubscribedError=UI});var Ru=u(jn=>{"use strict";var ZI=jn&&jn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},LI=J(),DI=function(r){ZI(e,r);function e(t,i){r.call(this),this.subject=t,this.subscriber=i,this.closed=!1}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,i=t.observers;if(this.subject=null,!(!i||i.length===0||t.isStopped||t.closed)){var n=i.indexOf(this.subscriber);n!==-1&&i.splice(n,1)}}},e}(LI.Subscription);jn.SubjectSubscription=DI});var K=u(tr=>{"use strict";var Fu=tr&&tr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Yp=v(),VI=C(),Pu=J(),ti=ei(),zI=Ru(),WI=Gr(),Kp=function(r){Fu(e,r);function e(t){r.call(this,t),this.destination=t}return e}(VI.Subscriber);tr.SubjectSubscriber=Kp;var Gp=function(r){Fu(e,r);function e(){r.call(this),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}return e.prototype[WI.rxSubscriber]=function(){return new Kp(this)},e.prototype.lift=function(t){var i=new Nu(this,this);return i.operator=t,i},e.prototype.next=function(t){if(this.closed)throw new ti.ObjectUnsubscribedError;if(!this.isStopped)for(var i=this.observers,n=i.length,s=i.slice(),o=0;o<n;o++)s[o].next(t)},e.prototype.error=function(t){if(this.closed)throw new ti.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var i=this.observers,n=i.length,s=i.slice(),o=0;o<n;o++)s[o].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new ti.ObjectUnsubscribedError;this.isStopped=!0;for(var t=this.observers,i=t.length,n=t.slice(),s=0;s<i;s++)n[s].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(t){if(this.closed)throw new ti.ObjectUnsubscribedError;return r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){if(this.closed)throw new ti.ObjectUnsubscribedError;return this.hasError?(t.error(this.thrownError),Pu.Subscription.EMPTY):this.isStopped?(t.complete(),Pu.Subscription.EMPTY):(this.observers.push(t),new zI.SubjectSubscription(this,t))},e.prototype.asObservable=function(){var t=new Yp.Observable;return t.source=this,t},e.create=function(t,i){return new Nu(t,i)},e}(Yp.Observable);tr.Subject=Gp;var Nu=function(r){Fu(e,r);function e(t,i){r.call(this),this.destination=t,this.source=i}return e.prototype.next=function(t){var i=this.destination;i&&i.next&&i.next(t)},e.prototype.error=function(t){var i=this.destination;i&&i.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){var i=this.source;return i?this.source.subscribe(t):Pu.Subscription.EMPTY},e}(Gp);tr.AnonymousSubject=Nu});var ri=u(kn=>{"use strict";var BI=kn&&kn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},$I=K(),Xp=J(),HI=function(r){BI(e,r);function e(){r.apply(this,arguments),this.value=null,this.hasNext=!1,this.hasCompleted=!1}return e.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),Xp.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),Xp.Subscription.EMPTY):r.prototype._subscribe.call(this,t)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(t){this.hasCompleted||r.prototype.error.call(this,t)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&r.prototype.next.call(this,this.value),r.prototype.complete.call(this)},e}($I.Subject);kn.AsyncSubject=HI});var td=u(Pn=>{"use strict";var JI=Pn&&Pn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},YI=v(),Rn=Q(),He=Y(),Qp=ri(),KI=function(r){JI(e,r);function e(t,i,n,s,o){r.call(this),this.callbackFunc=t,this.selector=i,this.args=n,this.context=s,this.scheduler=o}return e.create=function(t,i,n){return i===void 0&&(i=void 0),function(){for(var s=[],o=0;o<arguments.length;o++)s[o-0]=arguments[o];return new e(t,i,s,this,n)}},e.prototype._subscribe=function(t){var i=this.callbackFunc,n=this.args,s=this.scheduler,o=this.subject;if(s)return s.schedule(e.dispatch,0,{source:this,subscriber:t,context:this.context});if(!o){o=this.subject=new Qp.AsyncSubject;var a=function l(){for(var f=[],p=0;p<arguments.length;p++)f[p-0]=arguments[p];var y=l.source,g=y.selector,m=y.subject;if(g){var O=Rn.tryCatch(g).apply(this,f);O===He.errorObject?m.error(He.errorObject.e):(m.next(O),m.complete())}else m.next(f.length<=1?f[0]:f),m.complete()};a.source=this;var c=Rn.tryCatch(i).apply(this.context,n.concat(a));c===He.errorObject&&o.error(He.errorObject.e)}return o.subscribe(t)},e.dispatch=function(t){var i=this,n=t.source,s=t.subscriber,o=t.context,a=n.callbackFunc,c=n.args,l=n.scheduler,f=n.subject;if(!f){f=n.subject=new Qp.AsyncSubject;var p=function g(){for(var m=[],O=0;O<arguments.length;O++)m[O-0]=arguments[O];var S=g.source,q=S.selector,F=S.subject;if(q){var U=Rn.tryCatch(q).apply(this,m);U===He.errorObject?i.add(l.schedule(GI,0,{err:He.errorObject.e,subject:F})):i.add(l.schedule(ed,0,{value:U,subject:F}))}else{var D=m.length<=1?m[0]:m;i.add(l.schedule(ed,0,{value:D,subject:F}))}};p.source=n;var y=Rn.tryCatch(a).apply(o,c.concat(p));y===He.errorObject&&f.error(He.errorObject.e)}i.add(f.subscribe(s))},e}(YI.Observable);Pn.BoundCallbackObservable=KI;function ed(r){var e=r.value,t=r.subject;t.next(e),t.complete()}function GI(r){var e=r.err,t=r.subject;t.error(e)}});var id=u(rd=>{"use strict";var XI=td();rd.bindCallback=XI.BoundCallbackObservable.create});var nd=u(()=>{"use strict";var QI=v(),eA=id();QI.Observable.bindCallback=eA.bindCallback});var ad=u(Fn=>{"use strict";var tA=Fn&&Fn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},rA=v(),Nn=Q(),Je=Y(),od=ri(),iA=function(r){tA(e,r);function e(t,i,n,s,o){r.call(this),this.callbackFunc=t,this.selector=i,this.args=n,this.context=s,this.scheduler=o}return e.create=function(t,i,n){return i===void 0&&(i=void 0),function(){for(var s=[],o=0;o<arguments.length;o++)s[o-0]=arguments[o];return new e(t,i,s,this,n)}},e.prototype._subscribe=function(t){var i=this.callbackFunc,n=this.args,s=this.scheduler,o=this.subject;if(s)return s.schedule(nA,0,{source:this,subscriber:t,context:this.context});if(!o){o=this.subject=new od.AsyncSubject;var a=function l(){for(var f=[],p=0;p<arguments.length;p++)f[p-0]=arguments[p];var y=l.source,g=y.selector,m=y.subject,O=f.shift();if(O)m.error(O);else if(g){var S=Nn.tryCatch(g).apply(this,f);S===Je.errorObject?m.error(Je.errorObject.e):(m.next(S),m.complete())}else m.next(f.length<=1?f[0]:f),m.complete()};a.source=this;var c=Nn.tryCatch(i).apply(this.context,n.concat(a));c===Je.errorObject&&o.error(Je.errorObject.e)}return o.subscribe(t)},e}(rA.Observable);Fn.BoundNodeCallbackObservable=iA;function nA(r){var e=this,t=r.source,i=r.subscriber,n=r.context,s=t,o=s.callbackFunc,a=s.args,c=s.scheduler,l=t.subject;if(!l){l=t.subject=new od.AsyncSubject;var f=function y(){for(var g=[],m=0;m<arguments.length;m++)g[m-0]=arguments[m];var O=y.source,S=O.selector,q=O.subject,F=g.shift();if(F)e.add(c.schedule(Mu,0,{err:F,subject:q}));else if(S){var U=Nn.tryCatch(S).apply(this,g);U===Je.errorObject?e.add(c.schedule(Mu,0,{err:Je.errorObject.e,subject:q})):e.add(c.schedule(sd,0,{value:U,subject:q}))}else{var D=g.length<=1?g[0]:g;e.add(c.schedule(sd,0,{value:D,subject:q}))}};f.source=t;var p=Nn.tryCatch(o).apply(n,a.concat(f));p===Je.errorObject&&e.add(c.schedule(Mu,0,{err:Je.errorObject.e,subject:l}))}e.add(l.subscribe(i))}function sd(r){var e=r.value,t=r.subject;t.next(e),t.complete()}function Mu(r){var e=r.err,t=r.subject;t.error(e)}});var cd=u(ud=>{"use strict";var sA=ad();ud.bindNodeCallback=sA.BoundNodeCallbackObservable.create});var ld=u(()=>{"use strict";var oA=v(),aA=cd();oA.Observable.bindNodeCallback=aA.bindNodeCallback});var _e=u(fd=>{"use strict";function uA(r){return r&&typeof r.schedule=="function"}fd.isScheduler=uA});var Un=u(Mn=>{"use strict";var cA=Mn&&Mn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},lA=v(),fA=function(r){cA(e,r);function e(t,i){r.call(this),this.value=t,this.scheduler=i,this._isScalar=!0,i&&(this._isScalar=!1)}return e.create=function(t,i){return new e(t,i)},e.dispatch=function(t){var i=t.done,n=t.value,s=t.subscriber;if(i){s.complete();return}s.next(n),!s.closed&&(t.done=!0,this.schedule(t))},e.prototype._subscribe=function(t){var i=this.value,n=this.scheduler;if(n)return n.schedule(e.dispatch,0,{done:!1,value:i,subscriber:t});t.next(i),t.closed||t.complete()},e}(lA.Observable);Mn.ScalarObservable=fA});var Fe=u(Zn=>{"use strict";var hA=Zn&&Zn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},pA=v(),dA=function(r){hA(e,r);function e(t){r.call(this),this.scheduler=t}return e.create=function(t){return new e(t)},e.dispatch=function(t){var i=t.subscriber;i.complete()},e.prototype._subscribe=function(t){var i=this.scheduler;if(i)return i.schedule(e.dispatch,0,{subscriber:t});t.complete()},e}(pA.Observable);Zn.EmptyObservable=dA});var Me=u(Ln=>{"use strict";var vA=Ln&&Ln.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},bA=v(),mA=Un(),yA=Fe(),_A=_e(),gA=function(r){vA(e,r);function e(t,i){r.call(this),this.array=t,this.scheduler=i,!i&&t.length===1&&(this._isScalar=!0,this.value=t[0])}return e.create=function(t,i){return new e(t,i)},e.of=function(){for(var t=[],i=0;i<arguments.length;i++)t[i-0]=arguments[i];var n=t[t.length-1];_A.isScheduler(n)?t.pop():n=null;var s=t.length;return s>1?new e(t,n):s===1?new mA.ScalarObservable(t[0],n):new yA.EmptyObservable(n)},e.dispatch=function(t){var i=t.array,n=t.index,s=t.count,o=t.subscriber;if(n>=s){o.complete();return}o.next(i[n]),!o.closed&&(t.index=n+1,this.schedule(t))},e.prototype._subscribe=function(t){var i=0,n=this.array,s=n.length,o=this.scheduler;if(o)return o.schedule(e.dispatch,0,{array:n,index:i,count:s,subscriber:t});for(var a=0;a<s&&!t.closed;a++)t.next(n[a]);t.complete()},e}(bA.Observable);Ln.ArrayObservable=gA});var P=u(Dn=>{"use strict";var wA=Dn&&Dn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},SA=C(),OA=function(r){wA(e,r);function e(){r.apply(this,arguments)}return e.prototype.notifyNext=function(t,i,n,s,o){this.destination.next(i)},e.prototype.notifyError=function(t,i){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(SA.Subscriber);Dn.OuterSubscriber=OA});var Uu=u(hd=>{"use strict";hd.isArrayLike=function(r){return r&&typeof r.length=="number"}});var Zu=u(pd=>{"use strict";function xA(r){return r&&typeof r.subscribe!="function"&&typeof r.then=="function"}pd.isPromise=xA});var rr=u(ii=>{"use strict";var qA=se();function dd(r){var e=r.Symbol;if(typeof e=="function")return e.iterator||(e.iterator=e("iterator polyfill")),e.iterator;var t=r.Set;if(t&&typeof new t()["@@iterator"]=="function")return"@@iterator";var i=r.Map;if(i)for(var n=Object.getOwnPropertyNames(i.prototype),s=0;s<n.length;++s){var o=n[s];if(o!=="entries"&&o!=="size"&&i.prototype[o]===i.prototype.entries)return o}return"@@iterator"}ii.symbolIteratorPonyfill=dd;ii.iterator=dd(qA.root);ii.$$iterator=ii.iterator});var vd=u(Vn=>{"use strict";var TA=Vn&&Vn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},CA=C(),IA=function(r){TA(e,r);function e(t,i,n){r.call(this),this.parent=t,this.outerValue=i,this.outerIndex=n,this.index=0}return e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(CA.Subscriber);Vn.InnerSubscriber=IA});var N=u(_d=>{"use strict";var AA=se(),EA=Uu(),jA=Zu(),kA=xu(),RA=v(),bd=rr(),md=vd(),yd=Qr();function PA(r,e,t,i){var n=new md.InnerSubscriber(r,t,i);if(n.closed)return null;if(e instanceof RA.Observable)return e._isScalar?(n.next(e.value),n.complete(),null):(n.syncErrorThrowable=!0,e.subscribe(n));if(EA.isArrayLike(e)){for(var s=0,o=e.length;s<o&&!n.closed;s++)n.next(e[s]);n.closed||n.complete()}else{if(jA.isPromise(e))return e.then(function(y){n.closed||(n.next(y),n.complete())},function(y){return n.error(y)}).then(null,function(y){AA.root.setTimeout(function(){throw y})}),n;if(e&&typeof e[bd.iterator]=="function"){var a=e[bd.iterator]();do{var c=a.next();if(c.done){n.complete();break}if(n.next(c.value),n.closed)break}while(!0)}else if(e&&typeof e[yd.observable]=="function"){var l=e[yd.observable]();if(typeof l.subscribe!="function")n.error(new TypeError("Provided object does not correctly implement Symbol.observable"));else return l.subscribe(new md.InnerSubscriber(r,t,i))}else{var f=kA.isObject(e)?"an invalid object":"'"+e+"'",p="You provided "+f+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";n.error(new TypeError(p))}}return null}_d.subscribeToResult=PA});var ni=u(ir=>{"use strict";var NA=ir&&ir.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},FA=Me(),MA=Oe(),UA=P(),ZA=N(),gd={};function LA(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=null;return typeof r[r.length-1]=="function"&&(t=r.pop()),r.length===1&&MA.isArray(r[0])&&(r=r[0].slice()),function(i){return i.lift.call(new FA.ArrayObservable([i].concat(r)),new wd(t))}}ir.combineLatest=LA;var wd=function(){function r(e){this.project=e}return r.prototype.call=function(e,t){return t.subscribe(new Sd(e,this.project))},r}();ir.CombineLatestOperator=wd;var Sd=function(r){NA(e,r);function e(t,i){r.call(this,t),this.project=i,this.active=0,this.values=[],this.observables=[]}return e.prototype._next=function(t){this.values.push(gd),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,i=t.length;if(i===0)this.destination.complete();else{this.active=i,this.toRespond=i;for(var n=0;n<i;n++){var s=t[n];this.add(ZA.subscribeToResult(this,s,s,n))}}},e.prototype.notifyComplete=function(t){(this.active-=1)===0&&this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){var a=this.values,c=a[n],l=this.toRespond?c===gd?--this.toRespond:this.toRespond:0;a[n]=i,l===0&&(this.project?this._tryProject(a):this.destination.next(a.slice()))},e.prototype._tryProject=function(t){var i;try{i=this.project.apply(this,t)}catch(n){this.destination.error(n);return}this.destination.next(i)},e}(UA.OuterSubscriber);ir.CombineLatestSubscriber=Sd});var xd=u(Od=>{"use strict";var DA=_e(),VA=Oe(),zA=Me(),WA=ni();function BA(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=null,i=null;return DA.isScheduler(r[r.length-1])&&(i=r.pop()),typeof r[r.length-1]=="function"&&(t=r.pop()),r.length===1&&VA.isArray(r[0])&&(r=r[0]),new zA.ArrayObservable(r,i).lift(new WA.CombineLatestOperator(t))}Od.combineLatest=BA});var qd=u(()=>{"use strict";var $A=v(),HA=xd();$A.Observable.combineLatest=HA.combineLatest});var Lu=u(Td=>{"use strict";var JA=Me();Td.of=JA.ArrayObservable.of});var Du=u(zn=>{"use strict";var YA=zn&&zn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Cd=se(),KA=v(),GA=function(r){YA(e,r);function e(t,i){r.call(this),this.promise=t,this.scheduler=i}return e.create=function(t,i){return new e(t,i)},e.prototype._subscribe=function(t){var i=this,n=this.promise,s=this.scheduler;if(s==null)this._isScalar?t.closed||(t.next(this.value),t.complete()):n.then(function(o){i.value=o,i._isScalar=!0,t.closed||(t.next(o),t.complete())},function(o){t.closed||t.error(o)}).then(null,function(o){Cd.root.setTimeout(function(){throw o})});else if(this._isScalar){if(!t.closed)return s.schedule(Id,0,{value:this.value,subscriber:t})}else n.then(function(o){i.value=o,i._isScalar=!0,t.closed||t.add(s.schedule(Id,0,{value:o,subscriber:t}))},function(o){t.closed||t.add(s.schedule(XA,0,{err:o,subscriber:t}))}).then(null,function(o){Cd.root.setTimeout(function(){throw o})})},e}(KA.Observable);zn.PromiseObservable=GA;function Id(r){var e=r.value,t=r.subscriber;t.closed||(t.next(e),t.complete())}function XA(r){var e=r.err,t=r.subscriber;t.closed||t.error(e)}});var Ed=u(Bn=>{"use strict";var QA=Bn&&Bn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},eE=se(),tE=v(),Wn=rr(),rE=function(r){QA(e,r);function e(t,i){if(r.call(this),this.scheduler=i,t==null)throw new Error("iterator cannot be null.");this.iterator=sE(t)}return e.create=function(t,i){return new e(t,i)},e.dispatch=function(t){var i=t.index,n=t.hasError,s=t.iterator,o=t.subscriber;if(n){o.error(t.error);return}var a=s.next();if(a.done){o.complete();return}if(o.next(a.value),t.index=i+1,o.closed){typeof s.return=="function"&&s.return();return}this.schedule(t)},e.prototype._subscribe=function(t){var i=0,n=this,s=n.iterator,o=n.scheduler;if(o)return o.schedule(e.dispatch,0,{index:i,iterator:s,subscriber:t});do{var a=s.next();if(a.done){t.complete();break}else t.next(a.value);if(t.closed){typeof s.return=="function"&&s.return();break}}while(!0)},e}(tE.Observable);Bn.IteratorObservable=rE;var iE=function(){function r(e,t,i){t===void 0&&(t=0),i===void 0&&(i=e.length),this.str=e,this.idx=t,this.len=i}return r.prototype[Wn.iterator]=function(){return this},r.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.str.charAt(this.idx++)}:{done:!0,value:void 0}},r}(),nE=function(){function r(e,t,i){t===void 0&&(t=0),i===void 0&&(i=oE(e)),this.arr=e,this.idx=t,this.len=i}return r.prototype[Wn.iterator]=function(){return this},r.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.arr[this.idx++]}:{done:!0,value:void 0}},r}();function sE(r){var e=r[Wn.iterator];if(!e&&typeof r=="string")return new iE(r);if(!e&&r.length!==void 0)return new nE(r);if(!e)throw new TypeError("object is not iterable");return r[Wn.iterator]()}var Ad=Math.pow(2,53)-1;function oE(r){var e=+r.length;return isNaN(e)?0:e===0||!aE(e)?e:(e=uE(e)*Math.floor(Math.abs(e)),e<=0?0:e>Ad?Ad:e)}function aE(r){return typeof r=="number"&&eE.root.isFinite(r)}function uE(r){var e=+r;return e===0||isNaN(e)?e:e<0?-1:1}});var jd=u($n=>{"use strict";var cE=$n&&$n.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},lE=v(),fE=Un(),hE=Fe(),pE=function(r){cE(e,r);function e(t,i){r.call(this),this.arrayLike=t,this.scheduler=i,!i&&t.length===1&&(this._isScalar=!0,this.value=t[0])}return e.create=function(t,i){var n=t.length;return n===0?new hE.EmptyObservable:n===1?new fE.ScalarObservable(t[0],i):new e(t,i)},e.dispatch=function(t){var i=t.arrayLike,n=t.index,s=t.length,o=t.subscriber;if(!o.closed){if(n>=s){o.complete();return}o.next(i[n]),t.index=n+1,this.schedule(t)}},e.prototype._subscribe=function(t){var i=0,n=this,s=n.arrayLike,o=n.scheduler,a=s.length;if(o)return o.schedule(e.dispatch,0,{arrayLike:s,index:i,length:a,subscriber:t});for(var c=0;c<a&&!t.closed;c++)t.next(s[c]);t.complete()},e}(lE.Observable);$n.ArrayLikeObservable=pE});var nr=u(kd=>{"use strict";var Vu=v(),dE=function(){function r(e,t,i){this.kind=e,this.value=t,this.error=i,this.hasValue=e==="N"}return r.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},r.prototype.do=function(e,t,i){var n=this.kind;switch(n){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return i&&i()}},r.prototype.accept=function(e,t,i){return e&&typeof e.next=="function"?this.observe(e):this.do(e,t,i)},r.prototype.toObservable=function(){var e=this.kind;switch(e){case"N":return Vu.Observable.of(this.value);case"E":return Vu.Observable.throw(this.error);case"C":return Vu.Observable.empty()}throw new Error("unexpected notification kind value")},r.createNext=function(e){return typeof e!="undefined"?new r("N",e):r.undefinedValueNotification},r.createError=function(e){return new r("E",void 0,e)},r.createComplete=function(){return r.completeNotification},r.completeNotification=new r("C"),r.undefinedValueNotification=new r("N",void 0),r}();kd.Notification=dE});var si=u(wt=>{"use strict";var vE=wt&&wt.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},bE=C(),zu=nr();function mE(r,e){return e===void 0&&(e=0),function(i){return i.lift(new Rd(r,e))}}wt.observeOn=mE;var Rd=function(){function r(e,t){t===void 0&&(t=0),this.scheduler=e,this.delay=t}return r.prototype.call=function(e,t){return t.subscribe(new Pd(e,this.scheduler,this.delay))},r}();wt.ObserveOnOperator=Rd;var Pd=function(r){vE(e,r);function e(t,i,n){n===void 0&&(n=0),r.call(this,t),this.scheduler=i,this.delay=n}return e.dispatch=function(t){var i=t.notification,n=t.destination;i.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new Nd(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(zu.Notification.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(zu.Notification.createError(t))},e.prototype._complete=function(){this.scheduleMessage(zu.Notification.createComplete())},e}(bE.Subscriber);wt.ObserveOnSubscriber=Pd;var Nd=function(){function r(e,t){this.notification=e,this.destination=t}return r}();wt.ObserveOnMessage=Nd});var Bu=u(Hn=>{"use strict";var yE=Hn&&Hn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},_E=Oe(),gE=Uu(),wE=Zu(),SE=Du(),OE=Ed(),xE=Me(),qE=jd(),TE=rr(),Fd=v(),CE=si(),Wu=Qr(),IE=function(r){yE(e,r);function e(t,i){r.call(this,null),this.ish=t,this.scheduler=i}return e.create=function(t,i){if(t!=null){if(typeof t[Wu.observable]=="function")return t instanceof Fd.Observable&&!i?t:new e(t,i);if(_E.isArray(t))return new xE.ArrayObservable(t,i);if(wE.isPromise(t))return new SE.PromiseObservable(t,i);if(typeof t[TE.iterator]=="function"||typeof t=="string")return new OE.IteratorObservable(t,i);if(gE.isArrayLike(t))return new qE.ArrayLikeObservable(t,i)}throw new TypeError((t!==null&&typeof t||t)+" is not observable")},e.prototype._subscribe=function(t){var i=this.ish,n=this.scheduler;return n==null?i[Wu.observable]().subscribe(t):i[Wu.observable]().subscribe(new CE.ObserveOnSubscriber(t,n,0))},e}(Fd.Observable);Hn.FromObservable=IE});var $u=u(Md=>{"use strict";var AE=Bu();Md.from=AE.FromObservable.create});var or=u(sr=>{"use strict";var EE=sr&&sr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},jE=N(),kE=P();function RE(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),function(n){return typeof e=="number"&&(t=e,e=null),n.lift(new Ud(r,e,t))}}sr.mergeMap=RE;var Ud=function(){function r(e,t,i){i===void 0&&(i=Number.POSITIVE_INFINITY),this.project=e,this.resultSelector=t,this.concurrent=i}return r.prototype.call=function(e,t){return t.subscribe(new Zd(e,this.project,this.resultSelector,this.concurrent))},r}();sr.MergeMapOperator=Ud;var Zd=function(r){EE(e,r);function e(t,i,n,s){s===void 0&&(s=Number.POSITIVE_INFINITY),r.call(this,t),this.project=i,this.resultSelector=n,this.concurrent=s,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var i,n=this.index++;try{i=this.project(t,n)}catch(s){this.destination.error(s);return}this.active++,this._innerSub(i,t,n)},e.prototype._innerSub=function(t,i,n){this.add(jE.subscribeToResult(this,t,i,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){this.resultSelector?this._notifyResultSelector(t,i,n,s):this.destination.next(i)},e.prototype._notifyResultSelector=function(t,i,n,s){var o;try{o=this.resultSelector(t,i,n,s)}catch(a){this.destination.error(a);return}this.destination.next(o)},e.prototype.notifyComplete=function(t){var i=this.buffer;this.remove(t),this.active--,i.length>0?this._next(i.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()},e}(kE.OuterSubscriber);sr.MergeMapSubscriber=Zd});var Hu=u(Ld=>{"use strict";function PE(r){return r}Ld.identity=PE});var oi=u(Dd=>{"use strict";var NE=or(),FE=Hu();function ME(r){return r===void 0&&(r=Number.POSITIVE_INFINITY),NE.mergeMap(FE.identity,null,r)}Dd.mergeAll=ME});var Jn=u(Vd=>{"use strict";var UE=oi();function ZE(){return UE.mergeAll(1)}Vd.concatAll=ZE});var ar=u(zd=>{"use strict";var LE=_e(),DE=Lu(),VE=$u(),zE=Jn();function WE(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return r.length===1||r.length===2&&LE.isScheduler(r[1])?VE.from(r[0]):zE.concatAll()(DE.of.apply(void 0,r))}zd.concat=WE});var Wd=u(()=>{"use strict";var BE=v(),$E=ar();BE.Observable.concat=$E.concat});var $d=u(Yn=>{"use strict";var Bd=Yn&&Yn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},HE=v(),JE=N(),YE=P(),KE=function(r){Bd(e,r);function e(t){r.call(this),this.observableFactory=t}return e.create=function(t){return new e(t)},e.prototype._subscribe=function(t){return new GE(t,this.observableFactory)},e}(HE.Observable);Yn.DeferObservable=KE;var GE=function(r){Bd(e,r);function e(t,i){r.call(this,t),this.factory=i,this.tryDefer()}return e.prototype.tryDefer=function(){try{this._callFactory()}catch(t){this._error(t)}},e.prototype._callFactory=function(){var t=this.factory();t&&this.add(JE.subscribeToResult(this,t))},e}(YE.OuterSubscriber)});var Jd=u(Hd=>{"use strict";var XE=$d();Hd.defer=XE.DeferObservable.create});var Yd=u(()=>{"use strict";var QE=v(),ej=Jd();QE.Observable.defer=ej.defer});var Gd=u(Kd=>{"use strict";var tj=Fe();Kd.empty=tj.EmptyObservable.create});var Xd=u(()=>{"use strict";var rj=v(),ij=Gd();rj.Observable.empty=ij.empty});var tv=u(Kn=>{"use strict";var ev=Kn&&Kn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},nj=v(),Qd=Fe(),sj=Oe(),oj=N(),aj=P(),uj=function(r){ev(e,r);function e(t,i){r.call(this),this.sources=t,this.resultSelector=i}return e.create=function(){for(var t=[],i=0;i<arguments.length;i++)t[i-0]=arguments[i];if(t===null||arguments.length===0)return new Qd.EmptyObservable;var n=null;return typeof t[t.length-1]=="function"&&(n=t.pop()),t.length===1&&sj.isArray(t[0])&&(t=t[0]),t.length===0?new Qd.EmptyObservable:new e(t,n)},e.prototype._subscribe=function(t){return new cj(t,this.sources,this.resultSelector)},e}(nj.Observable);Kn.ForkJoinObservable=uj;var cj=function(r){ev(e,r);function e(t,i,n){r.call(this,t),this.sources=i,this.resultSelector=n,this.completed=0,this.haveValues=0;var s=i.length;this.total=s,this.values=new Array(s);for(var o=0;o<s;o++){var a=i[o],c=oj.subscribeToResult(this,a,null,o);c&&(c.outerIndex=o,this.add(c))}}return e.prototype.notifyNext=function(t,i,n,s,o){this.values[n]=i,o._hasValue||(o._hasValue=!0,this.haveValues++)},e.prototype.notifyComplete=function(t){var i=this.destination,n=this,s=n.haveValues,o=n.resultSelector,a=n.values,c=a.length;if(!t._hasValue){i.complete();return}if(this.completed++,this.completed===c){if(s===c){var l=o?o.apply(this,a):a;i.next(l)}i.complete()}},e}(aj.OuterSubscriber)});var iv=u(rv=>{"use strict";var lj=tv();rv.forkJoin=lj.ForkJoinObservable.create});var nv=u(()=>{"use strict";var fj=v(),hj=iv();fj.Observable.forkJoin=hj.forkJoin});var sv=u(()=>{"use strict";var pj=v(),dj=$u();pj.Observable.from=dj.from});var uv=u(Gn=>{"use strict";var vj=Gn&&Gn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},bj=v(),mj=Q(),yj=Kr(),ov=Y(),_j=J(),av=Object.prototype.toString;function gj(r){return!!r&&typeof r.addListener=="function"&&typeof r.removeListener=="function"}function wj(r){return!!r&&typeof r.on=="function"&&typeof r.off=="function"}function Sj(r){return!!r&&av.call(r)==="[object NodeList]"}function Oj(r){return!!r&&av.call(r)==="[object HTMLCollection]"}function xj(r){return!!r&&typeof r.addEventListener=="function"&&typeof r.removeEventListener=="function"}var qj=function(r){vj(e,r);function e(t,i,n,s){r.call(this),this.sourceObj=t,this.eventName=i,this.selector=n,this.options=s}return e.create=function(t,i,n,s){return yj.isFunction(n)&&(s=n,n=void 0),new e(t,i,s,n)},e.setupSubscription=function(t,i,n,s,o){var a;if(Sj(t)||Oj(t))for(var c=0,l=t.length;c<l;c++)e.setupSubscription(t[c],i,n,s,o);else if(xj(t)){var f=t;t.addEventListener(i,n,o),a=function(){return f.removeEventListener(i,n,o)}}else if(wj(t)){var p=t;t.on(i,n),a=function(){return p.off(i,n)}}else if(gj(t)){var y=t;t.addListener(i,n),a=function(){return y.removeListener(i,n)}}else throw new TypeError("Invalid event target");s.add(new _j.Subscription(a))},e.prototype._subscribe=function(t){var i=this.sourceObj,n=this.eventName,s=this.options,o=this.selector,a=o?function(){for(var c=[],l=0;l<arguments.length;l++)c[l-0]=arguments[l];var f=mj.tryCatch(o).apply(void 0,c);f===ov.errorObject?t.error(ov.errorObject.e):t.next(f)}:function(c){return t.next(c)};e.setupSubscription(i,n,a,t,s)},e}(bj.Observable);Gn.FromEventObservable=qj});var lv=u(cv=>{"use strict";var Tj=uv();cv.fromEvent=Tj.FromEventObservable.create});var fv=u(()=>{"use strict";var Cj=v(),Ij=lv();Cj.Observable.fromEvent=Ij.fromEvent});var hv=u(Xn=>{"use strict";var Aj=Xn&&Xn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Ej=Kr(),jj=v(),kj=J(),Rj=function(r){Aj(e,r);function e(t,i,n){r.call(this),this.addHandler=t,this.removeHandler=i,this.selector=n}return e.create=function(t,i,n){return new e(t,i,n)},e.prototype._subscribe=function(t){var i=this,n=this.removeHandler,s=this.selector?function(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];i._callSelector(t,a)}:function(a){t.next(a)},o=this._callAddHandler(s,t);Ej.isFunction(n)&&t.add(new kj.Subscription(function(){n(s,o)}))},e.prototype._callSelector=function(t,i){try{var n=this.selector.apply(this,i);t.next(n)}catch(s){t.error(s)}},e.prototype._callAddHandler=function(t,i){try{return this.addHandler(t)||null}catch(n){i.error(n)}},e}(jj.Observable);Xn.FromEventPatternObservable=Rj});var dv=u(pv=>{"use strict";var Pj=hv();pv.fromEventPattern=Pj.FromEventPatternObservable.create});var vv=u(()=>{"use strict";var Nj=v(),Fj=dv();Nj.Observable.fromEventPattern=Fj.fromEventPattern});var mv=u(bv=>{"use strict";var Mj=Du();bv.fromPromise=Mj.PromiseObservable.create});var yv=u(()=>{"use strict";var Uj=v(),Zj=mv();Uj.Observable.fromPromise=Zj.fromPromise});var gv=u(Qn=>{"use strict";var Lj=Qn&&Qn.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Dj=v(),Vj=_e(),_v=function(r){return r},zj=function(r){Lj(e,r);function e(t,i,n,s,o){r.call(this),this.initialState=t,this.condition=i,this.iterate=n,this.resultSelector=s,this.scheduler=o}return e.create=function(t,i,n,s,o){return arguments.length==1?new e(t.initialState,t.condition,t.iterate,t.resultSelector||_v,t.scheduler):s===void 0||Vj.isScheduler(s)?new e(t,i,n,_v,s):new e(t,i,n,s,o)},e.prototype._subscribe=function(t){var i=this.initialState;if(this.scheduler)return this.scheduler.schedule(e.dispatch,0,{subscriber:t,iterate:this.iterate,condition:this.condition,resultSelector:this.resultSelector,state:i});var n=this,s=n.condition,o=n.resultSelector,a=n.iterate;do{if(s){var c=void 0;try{c=s(i)}catch(f){t.error(f);return}if(!c){t.complete();break}}var l=void 0;try{l=o(i)}catch(f){t.error(f);return}if(t.next(l),t.closed)break;try{i=a(i)}catch(f){t.error(f);return}}while(!0)},e.dispatch=function(t){var i=t.subscriber,n=t.condition;if(!i.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(a){i.error(a);return}else t.needIterate=!0;if(n){var s=void 0;try{s=n(t.state)}catch(a){i.error(a);return}if(!s){i.complete();return}if(i.closed)return}var o;try{o=t.resultSelector(t.state)}catch(a){i.error(a);return}if(!i.closed&&(i.next(o),!i.closed))return this.schedule(t)}},e}(Dj.Observable);Qn.GenerateObservable=zj});var Sv=u(wv=>{"use strict";var Wj=gv();wv.generate=Wj.GenerateObservable.create});var Ov=u(()=>{"use strict";var Bj=v(),$j=Sv();Bj.Observable.generate=$j.generate});var qv=u(es=>{"use strict";var xv=es&&es.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Hj=v(),Jj=N(),Yj=P(),Kj=function(r){xv(e,r);function e(t,i,n){r.call(this),this.condition=t,this.thenSource=i,this.elseSource=n}return e.create=function(t,i,n){return new e(t,i,n)},e.prototype._subscribe=function(t){var i=this,n=i.condition,s=i.thenSource,o=i.elseSource;return new Gj(t,n,s,o)},e}(Hj.Observable);es.IfObservable=Kj;var Gj=function(r){xv(e,r);function e(t,i,n,s){r.call(this,t),this.condition=i,this.thenSource=n,this.elseSource=s,this.tryIf()}return e.prototype.tryIf=function(){var t=this,i=t.condition,n=t.thenSource,s=t.elseSource,o;try{o=i();var a=o?n:s;a?this.add(Jj.subscribeToResult(this,a)):this._complete()}catch(c){this._error(c)}},e}(Yj.OuterSubscriber)});var Cv=u(Tv=>{"use strict";var Xj=qv();Tv._if=Xj.IfObservable.create});var Iv=u(()=>{"use strict";var Qj=v(),ek=Cv();Qj.Observable.if=ek._if});var ur=u(Av=>{"use strict";var tk=Oe();function rk(r){return!tk.isArray(r)&&r-parseFloat(r)+1>=0}Av.isNumeric=rk});var Ev=u(ts=>{"use strict";var ik=ts&&ts.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},nk=J(),sk=function(r){ik(e,r);function e(t,i){r.call(this)}return e.prototype.schedule=function(t,i){return i===void 0&&(i=0),this},e}(nk.Subscription);ts.Action=sk});var cr=u(rs=>{"use strict";var ok=rs&&rs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},jv=se(),ak=Ev(),uk=function(r){ok(e,r);function e(t,i){r.call(this,t,i),this.scheduler=t,this.pending=!1,this.work=i}return e.prototype.schedule=function(t,i){if(i===void 0&&(i=0),this.closed)return this;this.state=t,this.pending=!0;var n=this.id,s=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(s,n,i)),this.delay=i,this.id=this.id||this.requestAsyncId(s,this.id,i),this},e.prototype.requestAsyncId=function(t,i,n){return n===void 0&&(n=0),jv.root.setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,i,n){return n===void 0&&(n=0),n!==null&&this.delay===n&&this.pending===!1?i:jv.root.clearInterval(i)&&void 0||void 0},e.prototype.execute=function(t,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,i);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,i){var n=!1,s=void 0;try{this.work(t)}catch(o){n=!0,s=!!o&&o||new Error(o)}if(n)return this.unsubscribe(),s},e.prototype._unsubscribe=function(){var t=this.id,i=this.scheduler,n=i.actions,s=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,s!==-1&&n.splice(s,1),t!=null&&(this.id=this.recycleAsyncId(i,t,null)),this.delay=null},e}(ak.Action);rs.AsyncAction=uk});var Rv=u(kv=>{"use strict";var ck=function(){function r(e,t){t===void 0&&(t=r.now),this.SchedulerAction=e,this.now=t}return r.prototype.schedule=function(e,t,i){return t===void 0&&(t=0),new this.SchedulerAction(this,e).schedule(i,t)},r.now=Date.now?Date.now:function(){return+new Date},r}();kv.Scheduler=ck});var lr=u(is=>{"use strict";var lk=is&&is.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},fk=Rv(),hk=function(r){lk(e,r);function e(){r.apply(this,arguments),this.actions=[],this.active=!1,this.scheduled=void 0}return e.prototype.flush=function(t){var i=this.actions;if(this.active){i.push(t);return}var n;this.active=!0;do if(n=t.execute(t.state,t.delay))break;while(t=i.shift());if(this.active=!1,n){for(;t=i.shift();)t.unsubscribe();throw n}},e}(fk.Scheduler);is.AsyncScheduler=hk});var W=u(Pv=>{"use strict";var pk=cr(),dk=lr();Pv.async=new dk.AsyncScheduler(pk.AsyncAction)});var Nv=u(ns=>{"use strict";var vk=ns&&ns.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},bk=ur(),mk=v(),Ju=W(),yk=function(r){vk(e,r);function e(t,i){t===void 0&&(t=0),i===void 0&&(i=Ju.async),r.call(this),this.period=t,this.scheduler=i,(!bk.isNumeric(t)||t<0)&&(this.period=0),(!i||typeof i.schedule!="function")&&(this.scheduler=Ju.async)}return e.create=function(t,i){return t===void 0&&(t=0),i===void 0&&(i=Ju.async),new e(t,i)},e.dispatch=function(t){var i=t.index,n=t.subscriber,s=t.period;n.next(i),!n.closed&&(t.index+=1,this.schedule(t,s))},e.prototype._subscribe=function(t){var i=0,n=this.period,s=this.scheduler;t.add(s.schedule(e.dispatch,n,{index:i,subscriber:t,period:n}))},e}(mk.Observable);ns.IntervalObservable=yk});var Mv=u(Fv=>{"use strict";var _k=Nv();Fv.interval=_k.IntervalObservable.create});var Uv=u(()=>{"use strict";var gk=v(),wk=Mv();gk.Observable.interval=wk.interval});var ai=u(Zv=>{"use strict";var Sk=v(),Ok=Me(),xk=_e(),qk=oi();function Tk(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=Number.POSITIVE_INFINITY,i=null,n=r[r.length-1];return xk.isScheduler(n)?(i=r.pop(),r.length>1&&typeof r[r.length-1]=="number"&&(t=r.pop())):typeof n=="number"&&(t=r.pop()),i===null&&r.length===1&&r[0]instanceof Sk.Observable?r[0]:qk.mergeAll(t)(new Ok.ArrayObservable(r,i))}Zv.merge=Tk});var Lv=u(()=>{"use strict";var Ck=v(),Ik=ai();Ck.Observable.merge=Ik.merge});var ss=u(fr=>{"use strict";var Ak=fr&&fr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Ek=Oe(),jk=Me(),kk=P(),Rk=N();function Pk(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];if(r.length===1)if(Ek.isArray(r[0]))r=r[0];else return r[0];return new jk.ArrayObservable(r).lift(new Dv)}fr.race=Pk;var Dv=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new Vv(e))},r}();fr.RaceOperator=Dv;var Vv=function(r){Ak(e,r);function e(t){r.call(this,t),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}return e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,i=t.length;if(i===0)this.destination.complete();else{for(var n=0;n<i&&!this.hasFirst;n++){var s=t[n],o=Rk.subscribeToResult(this,s,s,n);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},e.prototype.notifyNext=function(t,i,n,s,o){if(!this.hasFirst){this.hasFirst=!0;for(var a=0;a<this.subscriptions.length;a++)if(a!==n){var c=this.subscriptions[a];c.unsubscribe(),this.remove(c)}this.subscriptions=null}this.destination.next(i)},e}(kk.OuterSubscriber);fr.RaceSubscriber=Vv});var zv=u(()=>{"use strict";var Nk=v(),Fk=ss();Nk.Observable.race=Fk.race});var Wv=u(os=>{"use strict";var Mk=os&&os.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Uk=v(),Zk=In(),Lk=function(r){Mk(e,r);function e(){r.call(this)}return e.create=function(){return new e},e.prototype._subscribe=function(t){Zk.noop()},e}(Uk.Observable);os.NeverObservable=Lk});var $v=u(Bv=>{"use strict";var Dk=Wv();Bv.never=Dk.NeverObservable.create});var Hv=u(()=>{"use strict";var Vk=v(),zk=$v();Vk.Observable.never=zk.never});var Jv=u(()=>{"use strict";var Wk=v(),Bk=Lu();Wk.Observable.of=Bk.of});var as=u(ui=>{"use strict";var $k=ui&&ui.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Hk=Bu(),Yv=Oe(),Jk=P(),Yk=N();function Kk(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return r.length===1&&Yv.isArray(r[0])&&(r=r[0]),function(t){return t.lift(new Kv(r))}}ui.onErrorResumeNext=Kk;function Gk(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=null;return r.length===1&&Yv.isArray(r[0])&&(r=r[0]),t=r.shift(),new Hk.FromObservable(t,null).lift(new Kv(r))}ui.onErrorResumeNextStatic=Gk;var Kv=function(){function r(e){this.nextSources=e}return r.prototype.call=function(e,t){return t.subscribe(new Xk(e,this.nextSources))},r}(),Xk=function(r){$k(e,r);function e(t,i){r.call(this,t),this.destination=t,this.nextSources=i}return e.prototype.notifyError=function(t,i){this.subscribeToNextSource()},e.prototype.notifyComplete=function(t){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource()},e.prototype._complete=function(){this.subscribeToNextSource()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();t?this.add(Yk.subscribeToResult(this,t)):this.destination.complete()},e}(Jk.OuterSubscriber)});var Xv=u(Gv=>{"use strict";var Qk=as();Gv.onErrorResumeNext=Qk.onErrorResumeNextStatic});var Qv=u(()=>{"use strict";var eR=v(),tR=Xv();eR.Observable.onErrorResumeNext=tR.onErrorResumeNext});var eb=u(us=>{"use strict";var rR=us&&us.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},iR=v();function nR(r){var e=r.obj,t=r.keys,i=r.length,n=r.index,s=r.subscriber;if(n===i){s.complete();return}var o=t[n];s.next([o,e[o]]),r.index=n+1,this.schedule(r)}var sR=function(r){rR(e,r);function e(t,i){r.call(this),this.obj=t,this.scheduler=i,this.keys=Object.keys(t)}return e.create=function(t,i){return new e(t,i)},e.prototype._subscribe=function(t){var i=this,n=i.keys,s=i.scheduler,o=n.length;if(s)return s.schedule(nR,0,{obj:this.obj,keys:n,length:o,index:0,subscriber:t});for(var a=0;a<o;a++){var c=n[a];t.next([c,this.obj[c]])}t.complete()},e}(iR.Observable);us.PairsObservable=sR});var rb=u(tb=>{"use strict";var oR=eb();tb.pairs=oR.PairsObservable.create});var ib=u(()=>{"use strict";var aR=v(),uR=rb();aR.Observable.pairs=uR.pairs});var nb=u(cs=>{"use strict";var cR=cs&&cs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},lR=v(),fR=function(r){cR(e,r);function e(t,i,n){r.call(this),this.start=t,this._count=i,this.scheduler=n}return e.create=function(t,i,n){return t===void 0&&(t=0),i===void 0&&(i=0),new e(t,i,n)},e.dispatch=function(t){var i=t.start,n=t.index,s=t.count,o=t.subscriber;if(n>=s){o.complete();return}o.next(i),!o.closed&&(t.index=n+1,t.start=i+1,this.schedule(t))},e.prototype._subscribe=function(t){var i=0,n=this.start,s=this._count,o=this.scheduler;if(o)return o.schedule(e.dispatch,0,{index:i,count:s,start:n,subscriber:t});do{if(i++>=s){t.complete();break}if(t.next(n++),t.closed)break}while(!0)},e}(lR.Observable);cs.RangeObservable=fR});var ob=u(sb=>{"use strict";var hR=nb();sb.range=hR.RangeObservable.create});var ab=u(()=>{"use strict";var pR=v(),dR=ob();pR.Observable.range=dR.range});var cb=u(ls=>{"use strict";var ub=ls&&ls.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},vR=v(),bR=N(),mR=P(),yR=function(r){ub(e,r);function e(t,i){r.call(this),this.resourceFactory=t,this.observableFactory=i}return e.create=function(t,i){return new e(t,i)},e.prototype._subscribe=function(t){var i=this,n=i.resourceFactory,s=i.observableFactory,o;try{return o=n(),new _R(t,o,s)}catch(a){t.error(a)}},e}(vR.Observable);ls.UsingObservable=yR;var _R=function(r){ub(e,r);function e(t,i,n){r.call(this,t),this.resource=i,this.observableFactory=n,t.add(i),this.tryUse()}return e.prototype.tryUse=function(){try{var t=this.observableFactory.call(this,this.resource);t&&this.add(bR.subscribeToResult(this,t))}catch(i){this._error(i)}},e}(mR.OuterSubscriber)});var fb=u(lb=>{"use strict";var gR=cb();lb.using=gR.UsingObservable.create});var hb=u(()=>{"use strict";var wR=v(),SR=fb();wR.Observable.using=SR.using});var pb=u(fs=>{"use strict";var OR=fs&&fs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},xR=v(),qR=function(r){OR(e,r);function e(t,i){r.call(this),this.error=t,this.scheduler=i}return e.create=function(t,i){return new e(t,i)},e.dispatch=function(t){var i=t.error,n=t.subscriber;n.error(i)},e.prototype._subscribe=function(t){var i=this.error,n=this.scheduler;if(t.syncErrorThrowable=!0,n)return n.schedule(e.dispatch,0,{error:i,subscriber:t});t.error(i)},e}(xR.Observable);fs.ErrorObservable=qR});var vb=u(db=>{"use strict";var TR=pb();db._throw=TR.ErrorObservable.create});var bb=u(()=>{"use strict";var CR=v(),IR=vb();CR.Observable.throw=IR._throw});var ci=u(mb=>{"use strict";function AR(r){return r instanceof Date&&!isNaN(+r)}mb.isDate=AR});var _b=u(hs=>{"use strict";var ER=hs&&hs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},jR=ur(),kR=v(),RR=W(),yb=_e(),PR=ci(),NR=function(r){ER(e,r);function e(t,i,n){t===void 0&&(t=0),r.call(this),this.period=-1,this.dueTime=0,jR.isNumeric(i)?this.period=Number(i)<1&&1||Number(i):yb.isScheduler(i)&&(n=i),yb.isScheduler(n)||(n=RR.async),this.scheduler=n,this.dueTime=PR.isDate(t)?+t-this.scheduler.now():t}return e.create=function(t,i,n){return t===void 0&&(t=0),new e(t,i,n)},e.dispatch=function(t){var i=t.index,n=t.period,s=t.subscriber,o=this;if(s.next(i),!s.closed){if(n===-1)return s.complete();t.index=i+1,o.schedule(t,n)}},e.prototype._subscribe=function(t){var i=0,n=this,s=n.period,o=n.dueTime,a=n.scheduler;return a.schedule(e.dispatch,o,{index:i,period:s,subscriber:t})},e}(kR.Observable);hs.TimerObservable=NR});var Yu=u(gb=>{"use strict";var FR=_b();gb.timer=FR.TimerObservable.create});var wb=u(()=>{"use strict";var MR=v(),UR=Yu();MR.Observable.timer=UR.timer});var li=u(St=>{"use strict";var Sb=St&&St.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},ZR=Me(),LR=Oe(),DR=C(),VR=P(),zR=N(),ps=rr();function WR(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(i){return i.lift.call(Ob.apply(void 0,[i].concat(r)))}}St.zip=WR;function Ob(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=r[r.length-1];return typeof t=="function"&&r.pop(),new ZR.ArrayObservable(r).lift(new xb(t))}St.zipStatic=Ob;var xb=function(){function r(e){this.project=e}return r.prototype.call=function(e,t){return t.subscribe(new qb(e,this.project))},r}();St.ZipOperator=xb;var qb=function(r){Sb(e,r);function e(t,i,n){n===void 0&&(n=Object.create(null)),r.call(this,t),this.iterators=[],this.active=0,this.project=typeof i=="function"?i:null,this.values=n}return e.prototype._next=function(t){var i=this.iterators;LR.isArray(t)?i.push(new $R(t)):typeof t[ps.iterator]=="function"?i.push(new BR(t[ps.iterator]())):i.push(new HR(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,i=t.length;if(i===0){this.destination.complete();return}this.active=i;for(var n=0;n<i;n++){var s=t[n];s.stillUnsubscribed?this.add(s.subscribe(s,n)):this.active--}},e.prototype.notifyInactive=function(){this.active--,this.active===0&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,i=t.length,n=this.destination,s=0;s<i;s++){var o=t[s];if(typeof o.hasValue=="function"&&!o.hasValue())return}for(var a=!1,c=[],s=0;s<i;s++){var o=t[s],l=o.next();if(o.hasCompleted()&&(a=!0),l.done){n.complete();return}c.push(l.value)}this.project?this._tryProject(c):n.next(c),a&&n.complete()},e.prototype._tryProject=function(t){var i;try{i=this.project.apply(this,t)}catch(n){this.destination.error(n);return}this.destination.next(i)},e}(DR.Subscriber);St.ZipSubscriber=qb;var BR=function(){function r(e){this.iterator=e,this.nextResult=e.next()}return r.prototype.hasValue=function(){return!0},r.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},r.prototype.hasCompleted=function(){var e=this.nextResult;return e&&e.done},r}(),$R=function(){function r(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return r.prototype[ps.iterator]=function(){return this},r.prototype.next=function(e){var t=this.index++,i=this.array;return t<this.length?{value:i[t],done:!1}:{value:null,done:!0}},r.prototype.hasValue=function(){return this.array.length>this.index},r.prototype.hasCompleted=function(){return this.array.length===this.index},r}(),HR=function(r){Sb(e,r);function e(t,i,n){r.call(this,t),this.parent=i,this.observable=n,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}return e.prototype[ps.iterator]=function(){return this},e.prototype.next=function(){var t=this.buffer;return t.length===0&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return this.buffer.length===0&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){this.buffer.push(i),this.parent.checkIterators()},e.prototype.subscribe=function(t,i){return zR.subscribeToResult(this,this.observable,this,i)},e}(VR.OuterSubscriber)});var Cb=u(Tb=>{"use strict";var JR=li();Tb.zip=JR.zipStatic});var Ib=u(()=>{"use strict";var YR=v(),KR=Cb();YR.Observable.zip=KR.zip});var hr=u(fi=>{"use strict";var GR=fi&&fi.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},XR=C();function QR(r,e){return function(i){if(typeof r!="function")throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new Ab(r,e))}}fi.map=QR;var Ab=function(){function r(e,t){this.project=e,this.thisArg=t}return r.prototype.call=function(e,t){return t.subscribe(new eP(e,this.project,this.thisArg))},r}();fi.MapOperator=Ab;var eP=function(r){GR(e,r);function e(t,i,n){r.call(this,t),this.project=i,this.count=0,this.thisArg=n||this}return e.prototype._next=function(t){var i;try{i=this.project.call(this.thisArg,t,this.count++)}catch(n){this.destination.error(n);return}this.destination.next(i)},e}(XR.Subscriber)});var Ku=u(fe=>{"use strict";var vs=fe&&fe.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},pe=se(),hi=Q(),pr=Y(),tP=v(),rP=C(),iP=hr();function nP(){if(pe.root.XMLHttpRequest)return new pe.root.XMLHttpRequest;if(pe.root.XDomainRequest)return new pe.root.XDomainRequest;throw new Error("CORS is not supported by your browser")}function sP(){if(pe.root.XMLHttpRequest)return new pe.root.XMLHttpRequest;var r=void 0;try{for(var e=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],t=0;t<3;t++)try{if(r=e[t],new pe.root.ActiveXObject(r))break}catch{}return new pe.root.ActiveXObject(r)}catch{throw new Error("XMLHttpRequest is not supported by your browser")}}function Eb(r,e){return e===void 0&&(e=null),new Ot({method:"GET",url:r,headers:e})}fe.ajaxGet=Eb;function jb(r,e,t){return new Ot({method:"POST",url:r,body:e,headers:t})}fe.ajaxPost=jb;function kb(r,e){return new Ot({method:"DELETE",url:r,headers:e})}fe.ajaxDelete=kb;function Rb(r,e,t){return new Ot({method:"PUT",url:r,body:e,headers:t})}fe.ajaxPut=Rb;function Pb(r,e,t){return new Ot({method:"PATCH",url:r,body:e,headers:t})}fe.ajaxPatch=Pb;var oP=iP.map(function(r,e){return r.response});function Nb(r,e){return oP(new Ot({method:"GET",url:r,responseType:"json",headers:e}))}fe.ajaxGetJSON=Nb;var Ot=function(r){vs(e,r);function e(t){r.call(this);var i={async:!0,createXHR:function(){return this.crossDomain?nP.call(this):sP()},crossDomain:!1,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if(typeof t=="string")i.url=t;else for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);this.request=i}return e.prototype._subscribe=function(t){return new Fb(t,this.request)},e.create=function(){var t=function(i){return new e(i)};return t.get=Eb,t.post=jb,t.delete=kb,t.put=Rb,t.patch=Pb,t.getJSON=Nb,t}(),e}(tP.Observable);fe.AjaxObservable=Ot;var Fb=function(r){vs(e,r);function e(t,i){r.call(this,t),this.request=i,this.done=!1;var n=i.headers=i.headers||{};!i.crossDomain&&!n["X-Requested-With"]&&(n["X-Requested-With"]="XMLHttpRequest"),!("Content-Type"in n)&&!(pe.root.FormData&&i.body instanceof pe.root.FormData)&&typeof i.body!="undefined"&&(n["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),i.body=this.serializeBody(i.body,i.headers["Content-Type"]),this.send()}return e.prototype.next=function(t){this.done=!0;var i=this,n=i.xhr,s=i.request,o=i.destination,a=new Mb(t,n,s);o.next(a)},e.prototype.send=function(){var t=this,i=t.request,n=t.request,s=n.user,o=n.method,a=n.url,c=n.async,l=n.password,f=n.headers,p=n.body,y=i.createXHR,g=hi.tryCatch(y).call(i);if(g===pr.errorObject)this.error(pr.errorObject.e);else{this.xhr=g,this.setupEvents(g,i);var m=void 0;if(s?m=hi.tryCatch(g.open).call(g,o,a,c,s,l):m=hi.tryCatch(g.open).call(g,o,a,c),m===pr.errorObject)return this.error(pr.errorObject.e),null;if(c&&(g.timeout=i.timeout,g.responseType=i.responseType),"withCredentials"in g&&(g.withCredentials=!!i.withCredentials),this.setHeaders(g,f),m=p?hi.tryCatch(g.send).call(g,p):hi.tryCatch(g.send).call(g),m===pr.errorObject)return this.error(pr.errorObject.e),null}return g},e.prototype.serializeBody=function(t,i){if(!t||typeof t=="string")return t;if(pe.root.FormData&&t instanceof pe.root.FormData)return t;if(i){var n=i.indexOf(";");n!==-1&&(i=i.substring(0,n))}switch(i){case"application/x-www-form-urlencoded":return Object.keys(t).map(function(s){return encodeURIComponent(s)+"="+encodeURIComponent(t[s])}).join("&");case"application/json":return JSON.stringify(t);default:return t}},e.prototype.setHeaders=function(t,i){for(var n in i)i.hasOwnProperty(n)&&t.setRequestHeader(n,i[n])},e.prototype.setupEvents=function(t,i){var n=i.progressSubscriber;function s(l){var f=s,p=f.subscriber,y=f.progressSubscriber,g=f.request;y&&y.error(l),p.error(new Zb(this,g))}if(t.ontimeout=s,s.request=i,s.subscriber=this,s.progressSubscriber=n,t.upload&&"withCredentials"in t){if(n){var o;o=function(l){var f=o.progressSubscriber;f.next(l)},pe.root.XDomainRequest?t.onprogress=o:t.upload.onprogress=o,o.progressSubscriber=n}var a;a=function(l){var f=a,p=f.progressSubscriber,y=f.subscriber,g=f.request;p&&p.error(l),y.error(new ds("ajax error",this,g))},t.onerror=a,a.request=i,a.subscriber=this,a.progressSubscriber=n}function c(l){var f=c,p=f.subscriber,y=f.progressSubscriber,g=f.request;if(this.readyState===4){var m=this.status===1223?204:this.status,O=this.responseType==="text"?this.response||this.responseText:this.response;m===0&&(m=O?200:0),200<=m&&m<300?(y&&y.complete(),p.next(l),p.complete()):(y&&y.error(l),p.error(new ds("ajax error "+m,this,g)))}}t.onreadystatechange=c,c.subscriber=this,c.progressSubscriber=n,c.request=i},e.prototype.unsubscribe=function(){var t=this,i=t.done,n=t.xhr;!i&&n&&n.readyState!==4&&typeof n.abort=="function"&&n.abort(),r.prototype.unsubscribe.call(this)},e}(rP.Subscriber);fe.AjaxSubscriber=Fb;var Mb=function(){function r(e,t,i){this.originalEvent=e,this.xhr=t,this.request=i,this.status=t.status,this.responseType=t.responseType||i.responseType,this.response=Ub(this.responseType,t)}return r}();fe.AjaxResponse=Mb;var ds=function(r){vs(e,r);function e(t,i,n){r.call(this,t),this.message=t,this.xhr=i,this.request=n,this.status=i.status,this.responseType=i.responseType||n.responseType,this.response=Ub(this.responseType,i)}return e}(Error);fe.AjaxError=ds;function Ub(r,e){switch(r){case"json":return"response"in e?e.responseType?e.response:JSON.parse(e.response||e.responseText||"null"):JSON.parse(e.responseText||"null");case"xml":return e.responseXML;case"text":default:return"response"in e?e.response:e.responseText}}var Zb=function(r){vs(e,r);function e(t,i){r.call(this,"ajax timeout",t,i)}return e}(ds);fe.AjaxTimeoutError=Zb});var Db=u(Lb=>{"use strict";var aP=Ku();Lb.ajax=aP.AjaxObservable.create});var Vb=u(()=>{"use strict";var uP=v(),cP=Db();uP.Observable.ajax=cP.ajax});var zb=u(bs=>{"use strict";var lP=bs&&bs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},fP=cr(),hP=function(r){lP(e,r);function e(t,i){r.call(this,t,i),this.scheduler=t,this.work=i}return e.prototype.schedule=function(t,i){return i===void 0&&(i=0),i>0?r.prototype.schedule.call(this,t,i):(this.delay=i,this.state=t,this.scheduler.flush(this),this)},e.prototype.execute=function(t,i){return i>0||this.closed?r.prototype.execute.call(this,t,i):this._execute(t,i)},e.prototype.requestAsyncId=function(t,i,n){return n===void 0&&(n=0),n!==null&&n>0||n===null&&this.delay>0?r.prototype.requestAsyncId.call(this,t,i,n):t.flush(this)},e}(fP.AsyncAction);bs.QueueAction=hP});var Wb=u(ms=>{"use strict";var pP=ms&&ms.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},dP=lr(),vP=function(r){pP(e,r);function e(){r.apply(this,arguments)}return e}(dP.AsyncScheduler);ms.QueueScheduler=vP});var Gu=u(Bb=>{"use strict";var bP=zb(),mP=Wb();Bb.queue=new mP.QueueScheduler(bP.QueueAction)});var pi=u(ys=>{"use strict";var yP=ys&&ys.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},_P=K(),gP=Gu(),$b=J(),wP=si(),SP=ei(),OP=Ru(),xP=function(r){yP(e,r);function e(t,i,n){t===void 0&&(t=Number.POSITIVE_INFINITY),i===void 0&&(i=Number.POSITIVE_INFINITY),r.call(this),this.scheduler=n,this._events=[],this._bufferSize=t<1?1:t,this._windowTime=i<1?1:i}return e.prototype.next=function(t){var i=this._getNow();this._events.push(new qP(i,t)),this._trimBufferThenGetEvents(),r.prototype.next.call(this,t)},e.prototype._subscribe=function(t){var i=this._trimBufferThenGetEvents(),n=this.scheduler,s;if(this.closed)throw new SP.ObjectUnsubscribedError;this.hasError||this.isStopped?s=$b.Subscription.EMPTY:(this.observers.push(t),s=new OP.SubjectSubscription(this,t)),n&&t.add(t=new wP.ObserveOnSubscriber(t,n));for(var o=i.length,a=0;a<o&&!t.closed;a++)t.next(i[a].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),s},e.prototype._getNow=function(){return(this.scheduler||gP.queue).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),i=this._bufferSize,n=this._windowTime,s=this._events,o=s.length,a=0;a<o&&!(t-s[a].time<n);)a++;return o>i&&(a=Math.max(a,o-i)),a>0&&s.splice(0,a),s},e}(_P.Subject);ys.ReplaySubject=xP;var qP=function(){function r(e,t){this.time=e,this.value=t}return r}()});var Yb=u(_s=>{"use strict";var TP=se();function Hb(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var i=e.length,n=0;n<i;n++){var s=e[n];for(var o in s)s.hasOwnProperty(o)&&(r[o]=s[o])}return r}_s.assignImpl=Hb;function Jb(r){return r.Object.assign||Hb}_s.getAssign=Jb;_s.assign=Jb(TP.root)});var Xb=u(Ss=>{"use strict";var CP=Ss&&Ss.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Xu=K(),IP=C(),Kb=v(),Gb=J(),AP=se(),gs=pi(),ws=Q(),Ye=Y(),EP=Yb(),jP=function(r){CP(e,r);function e(t,i){if(t instanceof Kb.Observable)r.call(this,i,t);else{if(r.call(this),this.WebSocketCtor=AP.root.WebSocket,this._output=new Xu.Subject,typeof t=="string"?this.url=t:EP.assign(this,t),!this.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new gs.ReplaySubject}}return e.prototype.resultSelector=function(t){return JSON.parse(t.data)},e.create=function(t){return new e(t)},e.prototype.lift=function(t){var i=new e(this,this.destination);return i.operator=t,i},e.prototype._resetState=function(){this.socket=null,this.source||(this.destination=new gs.ReplaySubject),this._output=new Xu.Subject},e.prototype.multiplex=function(t,i,n){var s=this;return new Kb.Observable(function(o){var a=ws.tryCatch(t)();a===Ye.errorObject?o.error(Ye.errorObject.e):s.next(a);var c=s.subscribe(function(l){var f=ws.tryCatch(n)(l);f===Ye.errorObject?o.error(Ye.errorObject.e):f&&o.next(l)},function(l){return o.error(l)},function(){return o.complete()});return function(){var l=ws.tryCatch(i)();l===Ye.errorObject?o.error(Ye.errorObject.e):s.next(l),c.unsubscribe()}})},e.prototype._connectSocket=function(){var t=this,i=this.WebSocketCtor,n=this._output,s=null;try{s=this.protocol?new i(this.url,this.protocol):new i(this.url),this.socket=s,this.binaryType&&(this.socket.binaryType=this.binaryType)}catch(a){n.error(a);return}var o=new Gb.Subscription(function(){t.socket=null,s&&s.readyState===1&&s.close()});s.onopen=function(a){var c=t.openObserver;c&&c.next(a);var l=t.destination;t.destination=IP.Subscriber.create(function(f){return s.readyState===1&&s.send(f)},function(f){var p=t.closingObserver;p&&p.next(void 0),f&&f.code?s.close(f.code,f.reason):n.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }")),t._resetState()},function(){var f=t.closingObserver;f&&f.next(void 0),s.close(),t._resetState()}),l&&l instanceof gs.ReplaySubject&&o.add(l.subscribe(t.destination))},s.onerror=function(a){t._resetState(),n.error(a)},s.onclose=function(a){t._resetState();var c=t.closeObserver;c&&c.next(a),a.wasClean?n.complete():n.error(a)},s.onmessage=function(a){var c=ws.tryCatch(t.resultSelector)(a);c===Ye.errorObject?n.error(Ye.errorObject.e):n.next(c)}},e.prototype._subscribe=function(t){var i=this,n=this.source;if(n)return n.subscribe(t);this.socket||this._connectSocket();var s=new Gb.Subscription;return s.add(this._output.subscribe(t)),s.add(function(){var o=i.socket;i._output.observers.length===0&&(o&&o.readyState===1&&o.close(),i._resetState())}),s},e.prototype.unsubscribe=function(){var t=this,i=t.source,n=t.socket;n&&n.readyState===1&&(n.close(),this._resetState()),r.prototype.unsubscribe.call(this),i||(this.destination=new gs.ReplaySubject)},e}(Xu.AnonymousSubject);Ss.WebSocketSubject=jP});var em=u(Qb=>{"use strict";var kP=Xb();Qb.webSocket=kP.WebSocketSubject.create});var tm=u(()=>{"use strict";var RP=v(),PP=em();RP.Observable.webSocket=PP.webSocket});var Qu=u(Os=>{"use strict";var NP=Os&&Os.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},FP=P(),MP=N();function UP(r){return function(t){return t.lift(new ZP(r))}}Os.buffer=UP;var ZP=function(){function r(e){this.closingNotifier=e}return r.prototype.call=function(e,t){return t.subscribe(new LP(e,this.closingNotifier))},r}(),LP=function(r){NP(e,r);function e(t,i){r.call(this,t),this.buffer=[],this.add(MP.subscribeToResult(this,i))}return e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,i,n,s,o){var a=this.buffer;this.buffer=[],this.destination.next(a)},e}(FP.OuterSubscriber)});var im=u(rm=>{"use strict";var DP=Qu();function VP(r){return DP.buffer(r)(this)}rm.buffer=VP});var nm=u(()=>{"use strict";var zP=v(),WP=im();zP.Observable.prototype.buffer=WP.buffer});var ec=u(xs=>{"use strict";var sm=xs&&xs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},om=C();function BP(r,e){return e===void 0&&(e=null),function(i){return i.lift(new $P(r,e))}}xs.bufferCount=BP;var $P=function(){function r(e,t){this.bufferSize=e,this.startBufferEvery=t,!t||e===t?this.subscriberClass=HP:this.subscriberClass=JP}return r.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},r}(),HP=function(r){sm(e,r);function e(t,i){r.call(this,t),this.bufferSize=i,this.buffer=[]}return e.prototype._next=function(t){var i=this.buffer;i.push(t),i.length==this.bufferSize&&(this.destination.next(i),this.buffer=[])},e.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),r.prototype._complete.call(this)},e}(om.Subscriber),JP=function(r){sm(e,r);function e(t,i,n){r.call(this,t),this.bufferSize=i,this.startBufferEvery=n,this.buffers=[],this.count=0}return e.prototype._next=function(t){var i=this,n=i.bufferSize,s=i.startBufferEvery,o=i.buffers,a=i.count;this.count++,a%s===0&&o.push([]);for(var c=o.length;c--;){var l=o[c];l.push(t),l.length===n&&(o.splice(c,1),this.destination.next(l))}},e.prototype._complete=function(){for(var t=this,i=t.buffers,n=t.destination;i.length>0;){var s=i.shift();s.length>0&&n.next(s)}r.prototype._complete.call(this)},e}(om.Subscriber)});var um=u(am=>{"use strict";var YP=ec();function KP(r,e){return e===void 0&&(e=null),YP.bufferCount(r,e)(this)}am.bufferCount=KP});var cm=u(()=>{"use strict";var GP=v(),XP=um();GP.Observable.prototype.bufferCount=XP.bufferCount});var tc=u(qs=>{"use strict";var QP=qs&&qs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},eN=W(),tN=C(),rN=_e();function iN(r){var e=arguments.length,t=eN.async;rN.isScheduler(arguments[arguments.length-1])&&(t=arguments[arguments.length-1],e--);var i=null;e>=2&&(i=arguments[1]);var n=Number.POSITIVE_INFINITY;return e>=3&&(n=arguments[2]),function(o){return o.lift(new nN(r,i,n,t))}}qs.bufferTime=iN;var nN=function(){function r(e,t,i,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=i,this.scheduler=n}return r.prototype.call=function(e,t){return t.subscribe(new oN(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},r}(),sN=function(){function r(){this.buffer=[]}return r}(),oN=function(r){QP(e,r);function e(t,i,n,s,o){r.call(this,t),this.bufferTimeSpan=i,this.bufferCreationInterval=n,this.maxBufferSize=s,this.scheduler=o,this.contexts=[];var a=this.openContext();if(this.timespanOnly=n==null||n<0,this.timespanOnly){var c={subscriber:this,context:a,bufferTimeSpan:i};this.add(a.closeAction=o.schedule(lm,i,c))}else{var l={subscriber:this,context:a},f={bufferTimeSpan:i,bufferCreationInterval:n,subscriber:this,scheduler:o};this.add(a.closeAction=o.schedule(fm,i,l)),this.add(o.schedule(aN,n,f))}}return e.prototype._next=function(t){for(var i=this.contexts,n=i.length,s,o=0;o<n;o++){var a=i[o],c=a.buffer;c.push(t),c.length==this.maxBufferSize&&(s=a)}s&&this.onBufferFull(s)},e.prototype._error=function(t){this.contexts.length=0,r.prototype._error.call(this,t)},e.prototype._complete=function(){for(var t=this,i=t.contexts,n=t.destination;i.length>0;){var s=i.shift();n.next(s.buffer)}r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var i=t.closeAction;if(i.unsubscribe(),this.remove(i),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,s={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(lm,n,s))}},e.prototype.openContext=function(){var t=new sN;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var i=this.contexts,n=i?i.indexOf(t):-1;n>=0&&i.splice(i.indexOf(t),1)},e}(tN.Subscriber);function lm(r){var e=r.subscriber,t=r.context;t&&e.closeContext(t),e.closed||(r.context=e.openContext(),r.context.closeAction=this.schedule(r,r.bufferTimeSpan))}function aN(r){var e=r.bufferCreationInterval,t=r.bufferTimeSpan,i=r.subscriber,n=r.scheduler,s=i.openContext(),o=this;i.closed||(i.add(s.closeAction=n.schedule(fm,t,{subscriber:i,context:s})),o.schedule(r,e))}function fm(r){var e=r.subscriber,t=r.context;e.closeContext(t)}});var pm=u(hm=>{"use strict";var uN=W(),cN=_e(),lN=tc();function fN(r){var e=arguments.length,t=uN.async;cN.isScheduler(arguments[arguments.length-1])&&(t=arguments[arguments.length-1],e--);var i=null;e>=2&&(i=arguments[1]);var n=Number.POSITIVE_INFINITY;return e>=3&&(n=arguments[2]),lN.bufferTime(r,i,n,t)(this)}hm.bufferTime=fN});var dm=u(()=>{"use strict";var hN=v(),pN=pm();hN.Observable.prototype.bufferTime=pN.bufferTime});var rc=u(Ts=>{"use strict";var dN=Ts&&Ts.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},vN=J(),vm=N(),bN=P();function mN(r,e){return function(i){return i.lift(new yN(r,e))}}Ts.bufferToggle=mN;var yN=function(){function r(e,t){this.openings=e,this.closingSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new _N(e,this.openings,this.closingSelector))},r}(),_N=function(r){dN(e,r);function e(t,i,n){r.call(this,t),this.openings=i,this.closingSelector=n,this.contexts=[],this.add(vm.subscribeToResult(this,i))}return e.prototype._next=function(t){for(var i=this.contexts,n=i.length,s=0;s<n;s++)i[s].buffer.push(t)},e.prototype._error=function(t){for(var i=this.contexts;i.length>0;){var n=i.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,r.prototype._error.call(this,t)},e.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var i=t.shift();this.destination.next(i.buffer),i.subscription.unsubscribe(),i.buffer=null,i.subscription=null}this.contexts=null,r.prototype._complete.call(this)},e.prototype.notifyNext=function(t,i,n,s,o){t?this.closeBuffer(t):this.openBuffer(i)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var i=this.closingSelector,n=i.call(this,t);n&&this.trySubscribe(n)}catch(s){this._error(s)}},e.prototype.closeBuffer=function(t){var i=this.contexts;if(i&&t){var n=t.buffer,s=t.subscription;this.destination.next(n),i.splice(i.indexOf(t),1),this.remove(s),s.unsubscribe()}},e.prototype.trySubscribe=function(t){var i=this.contexts,n=[],s=new vN.Subscription,o={buffer:n,subscription:s};i.push(o);var a=vm.subscribeToResult(this,t,o);!a||a.closed?this.closeBuffer(o):(a.context=o,this.add(a),s.add(a))},e}(bN.OuterSubscriber)});var mm=u(bm=>{"use strict";var gN=rc();function wN(r,e){return gN.bufferToggle(r,e)(this)}bm.bufferToggle=wN});var ym=u(()=>{"use strict";var SN=v(),ON=mm();SN.Observable.prototype.bufferToggle=ON.bufferToggle});var ic=u(Cs=>{"use strict";var xN=Cs&&Cs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},qN=J(),TN=Q(),_m=Y(),CN=P(),IN=N();function AN(r){return function(e){return e.lift(new EN(r))}}Cs.bufferWhen=AN;var EN=function(){function r(e){this.closingSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new jN(e,this.closingSelector))},r}(),jN=function(r){xN(e,r);function e(t,i){r.call(this,t),this.closingSelector=i,this.subscribing=!1,this.openBuffer()}return e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,i,n,s,o){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var i=this.buffer;this.buffer&&this.destination.next(i),this.buffer=[];var n=TN.tryCatch(this.closingSelector)();n===_m.errorObject?this.error(_m.errorObject.e):(t=new qN.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(IN.subscribeToResult(this,n)),this.subscribing=!1)},e}(CN.OuterSubscriber)});var wm=u(gm=>{"use strict";var kN=ic();function RN(r){return kN.bufferWhen(r)(this)}gm.bufferWhen=RN});var Sm=u(()=>{"use strict";var PN=v(),NN=wm();PN.Observable.prototype.bufferWhen=NN.bufferWhen});var nc=u(Is=>{"use strict";var FN=Is&&Is.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},MN=P(),UN=N();function ZN(r){return function(t){var i=new LN(r),n=t.lift(i);return i.caught=n}}Is.catchError=ZN;var LN=function(){function r(e){this.selector=e}return r.prototype.call=function(e,t){return t.subscribe(new DN(e,this.selector,this.caught))},r}(),DN=function(r){FN(e,r);function e(t,i,n){r.call(this,t),this.selector=i,this.caught=n}return e.prototype.error=function(t){if(!this.isStopped){var i=void 0;try{i=this.selector(t,this.caught)}catch(n){r.prototype.error.call(this,n);return}this._unsubscribeAndRecycle(),this.add(UN.subscribeToResult(this,i))}},e}(MN.OuterSubscriber)});var xm=u(Om=>{"use strict";var VN=nc();function zN(r){return VN.catchError(r)(this)}Om._catch=zN});var Cm=u(()=>{"use strict";var qm=v(),Tm=xm();qm.Observable.prototype.catch=Tm._catch;qm.Observable.prototype._catch=Tm._catch});var sc=u(Im=>{"use strict";var WN=ni();function BN(r){return function(e){return e.lift(new WN.CombineLatestOperator(r))}}Im.combineAll=BN});var Em=u(Am=>{"use strict";var $N=sc();function HN(r){return $N.combineAll(r)(this)}Am.combineAll=HN});var jm=u(()=>{"use strict";var JN=v(),YN=Em();JN.Observable.prototype.combineAll=YN.combineAll});var Rm=u(km=>{"use strict";var KN=ni();function GN(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return KN.combineLatest.apply(void 0,r)(this)}km.combineLatest=GN});var Pm=u(()=>{"use strict";var XN=v(),QN=Rm();XN.Observable.prototype.combineLatest=QN.combineLatest});var ac=u(oc=>{"use strict";var eF=ar(),tF=ar();oc.concatStatic=tF.concat;function rF(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(t){return t.lift.call(eF.concat.apply(void 0,[t].concat(r)))}}oc.concat=rF});var Nm=u(uc=>{"use strict";var iF=ac(),nF=ar();uc.concatStatic=nF.concat;function sF(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return iF.concat.apply(void 0,r)(this)}uc.concat=sF});var Fm=u(()=>{"use strict";var oF=v(),aF=Nm();oF.Observable.prototype.concat=aF.concat});var Um=u(Mm=>{"use strict";var uF=Jn();function cF(){return uF.concatAll()(this)}Mm.concatAll=cF});var Zm=u(()=>{"use strict";var lF=v(),fF=Um();lF.Observable.prototype.concatAll=fF.concatAll});var As=u(Lm=>{"use strict";var hF=or();function pF(r,e){return hF.mergeMap(r,e,1)}Lm.concatMap=pF});var Vm=u(Dm=>{"use strict";var dF=As();function vF(r,e){return dF.concatMap(r,e)(this)}Dm.concatMap=vF});var zm=u(()=>{"use strict";var bF=v(),mF=Vm();bF.Observable.prototype.concatMap=mF.concatMap});var cc=u(Wm=>{"use strict";var yF=As();function _F(r,e){return yF.concatMap(function(){return r},e)}Wm.concatMapTo=_F});var $m=u(Bm=>{"use strict";var gF=cc();function wF(r,e){return gF.concatMapTo(r,e)(this)}Bm.concatMapTo=wF});var Hm=u(()=>{"use strict";var SF=v(),OF=$m();SF.Observable.prototype.concatMapTo=OF.concatMapTo});var lc=u(Es=>{"use strict";var xF=Es&&Es.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},qF=C();function TF(r){return function(e){return e.lift(new CF(r,e))}}Es.count=TF;var CF=function(){function r(e,t){this.predicate=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new IF(e,this.predicate,this.source))},r}(),IF=function(r){xF(e,r);function e(t,i,n){r.call(this,t),this.predicate=i,this.source=n,this.count=0,this.index=0}return e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var i;try{i=this.predicate(t,this.index++,this.source)}catch(n){this.destination.error(n);return}i&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(qF.Subscriber)});var Ym=u(Jm=>{"use strict";var AF=lc();function EF(r){return AF.count(r)(this)}Jm.count=EF});var Km=u(()=>{"use strict";var jF=v(),kF=Ym();jF.Observable.prototype.count=kF.count});var fc=u(js=>{"use strict";var RF=js&&js.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},PF=C();function NF(){return function(e){return e.lift(new FF)}}js.dematerialize=NF;var FF=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new MF(e))},r}(),MF=function(r){RF(e,r);function e(t){r.call(this,t)}return e.prototype._next=function(t){t.observe(this.destination)},e}(PF.Subscriber)});var Xm=u(Gm=>{"use strict";var UF=fc();function ZF(){return UF.dematerialize()(this)}Gm.dematerialize=ZF});var Qm=u(()=>{"use strict";var LF=v(),DF=Xm();LF.Observable.prototype.dematerialize=DF.dematerialize});var hc=u(ks=>{"use strict";var VF=ks&&ks.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},zF=P(),WF=N();function BF(r){return function(e){return e.lift(new $F(r))}}ks.debounce=BF;var $F=function(){function r(e){this.durationSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new HF(e,this.durationSelector))},r}(),HF=function(r){VF(e,r);function e(t,i){r.call(this,t),this.durationSelector=i,this.hasValue=!1,this.durationSubscription=null}return e.prototype._next=function(t){try{var i=this.durationSelector.call(this,t);i&&this._tryNext(t,i)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,i){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),n=WF.subscribeToResult(this,i),n.closed||this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(t,i,n,s,o){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var t=this.value,i=this.durationSubscription;i&&(this.durationSubscription=null,i.unsubscribe(),this.remove(i)),this.value=null,this.hasValue=!1,r.prototype._next.call(this,t)}},e}(zF.OuterSubscriber)});var ty=u(ey=>{"use strict";var JF=hc();function YF(r){return JF.debounce(r)(this)}ey.debounce=YF});var ry=u(()=>{"use strict";var KF=v(),GF=ty();KF.Observable.prototype.debounce=GF.debounce});var pc=u(Rs=>{"use strict";var XF=Rs&&Rs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},QF=C(),eM=W();function tM(r,e){return e===void 0&&(e=eM.async),function(t){return t.lift(new rM(r,e))}}Rs.debounceTime=tM;var rM=function(){function r(e,t){this.dueTime=e,this.scheduler=t}return r.prototype.call=function(e,t){return t.subscribe(new iM(e,this.dueTime,this.scheduler))},r}(),iM=function(r){XF(e,r);function e(t,i,n){r.call(this,t),this.dueTime=i,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}return e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(nM,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){this.clearDebounce(),this.hasValue&&(this.destination.next(this.lastValue),this.lastValue=null,this.hasValue=!1)},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;t!==null&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(QF.Subscriber);function nM(r){r.debouncedNext()}});var ny=u(iy=>{"use strict";var sM=W(),oM=pc();function aM(r,e){return e===void 0&&(e=sM.async),oM.debounceTime(r,e)(this)}iy.debounceTime=aM});var sy=u(()=>{"use strict";var uM=v(),cM=ny();uM.Observable.prototype.debounceTime=cM.debounceTime});var Ns=u(Ps=>{"use strict";var lM=Ps&&Ps.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},fM=C();function hM(r){return r===void 0&&(r=null),function(e){return e.lift(new pM(r))}}Ps.defaultIfEmpty=hM;var pM=function(){function r(e){this.defaultValue=e}return r.prototype.call=function(e,t){return t.subscribe(new dM(e,this.defaultValue))},r}(),dM=function(r){lM(e,r);function e(t,i){r.call(this,t),this.defaultValue=i,this.isEmpty=!0}return e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(fM.Subscriber)});var ay=u(oy=>{"use strict";var vM=Ns();function bM(r){return r===void 0&&(r=null),vM.defaultIfEmpty(r)(this)}oy.defaultIfEmpty=bM});var uy=u(()=>{"use strict";var mM=v(),yM=ay();mM.Observable.prototype.defaultIfEmpty=yM.defaultIfEmpty});var dc=u(Fs=>{"use strict";var _M=Fs&&Fs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},gM=W(),wM=ci(),SM=C(),cy=nr();function OM(r,e){e===void 0&&(e=gM.async);var t=wM.isDate(r),i=t?+r-e.now():Math.abs(r);return function(n){return n.lift(new xM(i,e))}}Fs.delay=OM;var xM=function(){function r(e,t){this.delay=e,this.scheduler=t}return r.prototype.call=function(e,t){return t.subscribe(new qM(e,this.delay,this.scheduler))},r}(),qM=function(r){_M(e,r);function e(t,i,n){r.call(this,t),this.delay=i,this.scheduler=n,this.queue=[],this.active=!1,this.errored=!1}return e.dispatch=function(t){for(var i=t.source,n=i.queue,s=t.scheduler,o=t.destination;n.length>0&&n[0].time-s.now()<=0;)n.shift().notification.observe(o);if(n.length>0){var a=Math.max(0,n[0].time-s.now());this.schedule(t,a)}else this.unsubscribe(),i.active=!1},e.prototype._schedule=function(t){this.active=!0,this.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(this.errored!==!0){var i=this.scheduler,n=new TM(i.now()+this.delay,t);this.queue.push(n),this.active===!1&&this._schedule(i)}},e.prototype._next=function(t){this.scheduleNotification(cy.Notification.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t)},e.prototype._complete=function(){this.scheduleNotification(cy.Notification.createComplete())},e}(SM.Subscriber),TM=function(){function r(e,t){this.time=e,this.notification=t}return r}()});var fy=u(ly=>{"use strict";var CM=W(),IM=dc();function AM(r,e){return e===void 0&&(e=CM.async),IM.delay(r,e)(this)}ly.delay=AM});var hy=u(()=>{"use strict";var EM=v(),jM=fy();EM.Observable.prototype.delay=jM.delay});var bc=u(Ms=>{"use strict";var vc=Ms&&Ms.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},kM=C(),RM=v(),PM=P(),NM=N();function FM(r,e){return e?function(t){return new UM(t,e).lift(new py(r))}:function(t){return t.lift(new py(r))}}Ms.delayWhen=FM;var py=function(){function r(e){this.delayDurationSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new MM(e,this.delayDurationSelector))},r}(),MM=function(r){vc(e,r);function e(t,i){r.call(this,t),this.delayDurationSelector=i,this.completed=!1,this.delayNotifierSubscriptions=[],this.values=[]}return e.prototype.notifyNext=function(t,i,n,s,o){this.destination.next(t),this.removeSubscription(o),this.tryComplete()},e.prototype.notifyError=function(t,i){this._error(t)},e.prototype.notifyComplete=function(t){var i=this.removeSubscription(t);i&&this.destination.next(i),this.tryComplete()},e.prototype._next=function(t){try{var i=this.delayDurationSelector(t);i&&this.tryDelay(i,t)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete()},e.prototype.removeSubscription=function(t){t.unsubscribe();var i=this.delayNotifierSubscriptions.indexOf(t),n=null;return i!==-1&&(n=this.values[i],this.delayNotifierSubscriptions.splice(i,1),this.values.splice(i,1)),n},e.prototype.tryDelay=function(t,i){var n=NM.subscribeToResult(this,t,i);n&&!n.closed&&(this.add(n),this.delayNotifierSubscriptions.push(n)),this.values.push(i)},e.prototype.tryComplete=function(){this.completed&&this.delayNotifierSubscriptions.length===0&&this.destination.complete()},e}(PM.OuterSubscriber),UM=function(r){vc(e,r);function e(t,i){r.call(this),this.source=t,this.subscriptionDelay=i}return e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new ZM(t,this.source))},e}(RM.Observable),ZM=function(r){vc(e,r);function e(t,i){r.call(this),this.parent=t,this.source=i,this.sourceSubscribed=!1}return e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(kM.Subscriber)});var vy=u(dy=>{"use strict";var LM=bc();function DM(r,e){return LM.delayWhen(r,e)(this)}dy.delayWhen=DM});var by=u(()=>{"use strict";var VM=v(),zM=vy();VM.Observable.prototype.delayWhen=zM.delayWhen});var yy=u(mc=>{"use strict";var WM=se();function my(){return function(){function r(){this._values=[]}return r.prototype.add=function(e){this.has(e)||this._values.push(e)},r.prototype.has=function(e){return this._values.indexOf(e)!==-1},Object.defineProperty(r.prototype,"size",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),r.prototype.clear=function(){this._values.length=0},r}()}mc.minimalSetImpl=my;mc.Set=WM.root.Set||my()});var yc=u(di=>{"use strict";var BM=di&&di.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},$M=P(),HM=N(),JM=yy();function YM(r,e){return function(t){return t.lift(new KM(r,e))}}di.distinct=YM;var KM=function(){function r(e,t){this.keySelector=e,this.flushes=t}return r.prototype.call=function(e,t){return t.subscribe(new _y(e,this.keySelector,this.flushes))},r}(),_y=function(r){BM(e,r);function e(t,i,n){r.call(this,t),this.keySelector=i,this.values=new JM.Set,n&&this.add(HM.subscribeToResult(this,n))}return e.prototype.notifyNext=function(t,i,n,s,o){this.values.clear()},e.prototype.notifyError=function(t,i){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var i,n=this.destination;try{i=this.keySelector(t)}catch(s){n.error(s);return}this._finalizeNext(i,t)},e.prototype._finalizeNext=function(t,i){var n=this.values;n.has(t)||(n.add(t),this.destination.next(i))},e}($M.OuterSubscriber);di.DistinctSubscriber=_y});var wy=u(gy=>{"use strict";var GM=yc();function XM(r,e){return GM.distinct(r,e)(this)}gy.distinct=XM});var Sy=u(()=>{"use strict";var QM=v(),eU=wy();QM.Observable.prototype.distinct=eU.distinct});var Ls=u(Zs=>{"use strict";var tU=Zs&&Zs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},rU=C(),Oy=Q(),Us=Y();function iU(r,e){return function(t){return t.lift(new nU(r,e))}}Zs.distinctUntilChanged=iU;var nU=function(){function r(e,t){this.compare=e,this.keySelector=t}return r.prototype.call=function(e,t){return t.subscribe(new sU(e,this.compare,this.keySelector))},r}(),sU=function(r){tU(e,r);function e(t,i,n){r.call(this,t),this.keySelector=n,this.hasKey=!1,typeof i=="function"&&(this.compare=i)}return e.prototype.compare=function(t,i){return t===i},e.prototype._next=function(t){var i=this.keySelector,n=t;if(i&&(n=Oy.tryCatch(this.keySelector)(t),n===Us.errorObject))return this.destination.error(Us.errorObject.e);var s=!1;if(this.hasKey){if(s=Oy.tryCatch(this.compare)(this.key,n),s===Us.errorObject)return this.destination.error(Us.errorObject.e)}else this.hasKey=!0;s||(this.key=n,this.destination.next(t))},e}(rU.Subscriber)});var qy=u(xy=>{"use strict";var oU=Ls();function aU(r,e){return oU.distinctUntilChanged(r,e)(this)}xy.distinctUntilChanged=aU});var Ty=u(()=>{"use strict";var uU=v(),cU=qy();uU.Observable.prototype.distinctUntilChanged=cU.distinctUntilChanged});var _c=u(Cy=>{"use strict";var lU=Ls();function fU(r,e){return lU.distinctUntilChanged(function(t,i){return e?e(t[r],i[r]):t[r]===i[r]})}Cy.distinctUntilKeyChanged=fU});var Ay=u(Iy=>{"use strict";var hU=_c();function pU(r,e){return hU.distinctUntilKeyChanged(r,e)(this)}Iy.distinctUntilKeyChanged=pU});var Ey=u(()=>{"use strict";var dU=v(),vU=Ay();dU.Observable.prototype.distinctUntilKeyChanged=vU.distinctUntilKeyChanged});var gc=u(Ds=>{"use strict";var bU=Ds&&Ds.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},jy=C();function mU(r,e,t){return function(n){return n.lift(new yU(r,e,t))}}Ds.tap=mU;var yU=function(){function r(e,t,i){this.nextOrObserver=e,this.error=t,this.complete=i}return r.prototype.call=function(e,t){return t.subscribe(new _U(e,this.nextOrObserver,this.error,this.complete))},r}(),_U=function(r){bU(e,r);function e(t,i,n,s){r.call(this,t);var o=new jy.Subscriber(i,n,s);o.syncErrorThrowable=!0,this.add(o),this.safeSubscriber=o}return e.prototype._next=function(t){var i=this.safeSubscriber;i.next(t),i.syncErrorThrown?this.destination.error(i.syncErrorValue):this.destination.next(t)},e.prototype._error=function(t){var i=this.safeSubscriber;i.error(t),i.syncErrorThrown?this.destination.error(i.syncErrorValue):this.destination.error(t)},e.prototype._complete=function(){var t=this.safeSubscriber;t.complete(),t.syncErrorThrown?this.destination.error(t.syncErrorValue):this.destination.complete()},e}(jy.Subscriber)});var Ry=u(ky=>{"use strict";var gU=gc();function wU(r,e,t){return gU.tap(r,e,t)(this)}ky._do=wU});var Fy=u(()=>{"use strict";var Py=v(),Ny=Ry();Py.Observable.prototype.do=Ny._do;Py.Observable.prototype._do=Ny._do});var wc=u(Vs=>{"use strict";var SU=Vs&&Vs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},OU=P(),xU=N();function qU(){return function(r){return r.lift(new TU)}}Vs.exhaust=qU;var TU=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new CU(e))},r}(),CU=function(r){SU(e,r);function e(t){r.call(this,t),this.hasCompleted=!1,this.hasSubscription=!1}return e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(xU.subscribeToResult(this,t)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(OU.OuterSubscriber)});var Uy=u(My=>{"use strict";var IU=wc();function AU(){return IU.exhaust()(this)}My.exhaust=AU});var Zy=u(()=>{"use strict";var EU=v(),jU=Uy();EU.Observable.prototype.exhaust=jU.exhaust});var Sc=u(zs=>{"use strict";var kU=zs&&zs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},RU=P(),PU=N();function NU(r,e){return function(t){return t.lift(new FU(r,e))}}zs.exhaustMap=NU;var FU=function(){function r(e,t){this.project=e,this.resultSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new MU(e,this.project,this.resultSelector))},r}(),MU=function(r){kU(e,r);function e(t,i,n){r.call(this,t),this.project=i,this.resultSelector=n,this.hasSubscription=!1,this.hasCompleted=!1,this.index=0}return e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var i=this.index++,n=this.destination;try{var s=this.project(t,i);this.hasSubscription=!0,this.add(PU.subscribeToResult(this,s,t,i))}catch(o){n.error(o)}},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){var a=this,c=a.resultSelector,l=a.destination;c?this.trySelectResult(t,i,n,s):l.next(i)},e.prototype.trySelectResult=function(t,i,n,s){var o=this,a=o.resultSelector,c=o.destination;try{var l=a(t,i,n,s);c.next(l)}catch(f){c.error(f)}},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(RU.OuterSubscriber)});var Dy=u(Ly=>{"use strict";var UU=Sc();function ZU(r,e){return UU.exhaustMap(r,e)(this)}Ly.exhaustMap=ZU});var Vy=u(()=>{"use strict";var LU=v(),DU=Dy();LU.Observable.prototype.exhaustMap=DU.exhaustMap});var Oc=u(dr=>{"use strict";var VU=dr&&dr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},zU=Q(),zy=Y(),WU=P(),BU=N();function $U(r,e,t){return e===void 0&&(e=Number.POSITIVE_INFINITY),t===void 0&&(t=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(i){return i.lift(new Wy(r,e,t))}}dr.expand=$U;var Wy=function(){function r(e,t,i){this.project=e,this.concurrent=t,this.scheduler=i}return r.prototype.call=function(e,t){return t.subscribe(new By(e,this.project,this.concurrent,this.scheduler))},r}();dr.ExpandOperator=Wy;var By=function(r){VU(e,r);function e(t,i,n,s){r.call(this,t),this.project=i,this.concurrent=n,this.scheduler=s,this.index=0,this.active=0,this.hasCompleted=!1,n<Number.POSITIVE_INFINITY&&(this.buffer=[])}return e.dispatch=function(t){var i=t.subscriber,n=t.result,s=t.value,o=t.index;i.subscribeToProjection(n,s,o)},e.prototype._next=function(t){var i=this.destination;if(i.closed){this._complete();return}var n=this.index++;if(this.active<this.concurrent){i.next(t);var s=zU.tryCatch(this.project)(t,n);if(s===zy.errorObject)i.error(zy.errorObject.e);else if(!this.scheduler)this.subscribeToProjection(s,t,n);else{var o={subscriber:this,result:s,value:t,index:n};this.add(this.scheduler.schedule(e.dispatch,0,o))}}else this.buffer.push(t)},e.prototype.subscribeToProjection=function(t,i,n){this.active++,this.add(BU.subscribeToResult(this,t,i,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&this.active===0&&this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){this._next(i)},e.prototype.notifyComplete=function(t){var i=this.buffer;this.remove(t),this.active--,i&&i.length>0&&this._next(i.shift()),this.hasCompleted&&this.active===0&&this.destination.complete()},e}(WU.OuterSubscriber);dr.ExpandSubscriber=By});var Hy=u($y=>{"use strict";var HU=Oc();function JU(r,e,t){return e===void 0&&(e=Number.POSITIVE_INFINITY),t===void 0&&(t=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,HU.expand(r,e,t)(this)}$y.expand=JU});var Jy=u(()=>{"use strict";var YU=v(),KU=Hy();YU.Observable.prototype.expand=KU.expand});var vr=u(Ws=>{"use strict";var GU=Ws&&Ws.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},XU=function(r){GU(e,r);function e(){var t=r.call(this,"argument out of range");this.name=t.name="ArgumentOutOfRangeError",this.stack=t.stack,this.message=t.message}return e}(Error);Ws.ArgumentOutOfRangeError=XU});var xc=u(Bs=>{"use strict";var QU=Bs&&Bs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},eZ=C(),Yy=vr();function tZ(r,e){return function(t){return t.lift(new rZ(r,e))}}Bs.elementAt=tZ;var rZ=function(){function r(e,t){if(this.index=e,this.defaultValue=t,e<0)throw new Yy.ArgumentOutOfRangeError}return r.prototype.call=function(e,t){return t.subscribe(new iZ(e,this.index,this.defaultValue))},r}(),iZ=function(r){QU(e,r);function e(t,i,n){r.call(this,t),this.index=i,this.defaultValue=n}return e.prototype._next=function(t){this.index--===0&&(this.destination.next(t),this.destination.complete())},e.prototype._complete=function(){var t=this.destination;this.index>=0&&(typeof this.defaultValue!="undefined"?t.next(this.defaultValue):t.error(new Yy.ArgumentOutOfRangeError)),t.complete()},e}(eZ.Subscriber)});var Gy=u(Ky=>{"use strict";var nZ=xc();function sZ(r,e){return nZ.elementAt(r,e)(this)}Ky.elementAt=sZ});var Xy=u(()=>{"use strict";var oZ=v(),aZ=Gy();oZ.Observable.prototype.elementAt=aZ.elementAt});var Hs=u($s=>{"use strict";var uZ=$s&&$s.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},cZ=C();function lZ(r,e){return function(i){return i.lift(new fZ(r,e))}}$s.filter=lZ;var fZ=function(){function r(e,t){this.predicate=e,this.thisArg=t}return r.prototype.call=function(e,t){return t.subscribe(new hZ(e,this.predicate,this.thisArg))},r}(),hZ=function(r){uZ(e,r);function e(t,i,n){r.call(this,t),this.predicate=i,this.thisArg=n,this.count=0}return e.prototype._next=function(t){var i;try{i=this.predicate.call(this.thisArg,t,this.count++)}catch(n){this.destination.error(n);return}i&&this.destination.next(t)},e}(cZ.Subscriber)});var e_=u(Qy=>{"use strict";var pZ=Hs();function dZ(r,e){return pZ.filter(r,e)(this)}Qy.filter=dZ});var t_=u(()=>{"use strict";var vZ=v(),bZ=e_();vZ.Observable.prototype.filter=bZ.filter});var qc=u(Js=>{"use strict";var mZ=Js&&Js.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},yZ=C(),_Z=J();function gZ(r){return function(e){return e.lift(new wZ(r))}}Js.finalize=gZ;var wZ=function(){function r(e){this.callback=e}return r.prototype.call=function(e,t){return t.subscribe(new SZ(e,this.callback))},r}(),SZ=function(r){mZ(e,r);function e(t,i){r.call(this,t),this.add(new _Z.Subscription(i))}return e}(yZ.Subscriber)});var i_=u(r_=>{"use strict";var OZ=qc();function xZ(r){return OZ.finalize(r)(this)}r_._finally=xZ});var o_=u(()=>{"use strict";var n_=v(),s_=i_();n_.Observable.prototype.finally=s_._finally;n_.Observable.prototype._finally=s_._finally});var Ys=u(br=>{"use strict";var qZ=br&&br.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},TZ=C();function CZ(r,e){if(typeof r!="function")throw new TypeError("predicate is not a function");return function(t){return t.lift(new a_(r,t,!1,e))}}br.find=CZ;var a_=function(){function r(e,t,i,n){this.predicate=e,this.source=t,this.yieldIndex=i,this.thisArg=n}return r.prototype.call=function(e,t){return t.subscribe(new u_(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},r}();br.FindValueOperator=a_;var u_=function(r){qZ(e,r);function e(t,i,n,s,o){r.call(this,t),this.predicate=i,this.source=n,this.yieldIndex=s,this.thisArg=o,this.index=0}return e.prototype.notifyComplete=function(t){var i=this.destination;i.next(t),i.complete()},e.prototype._next=function(t){var i=this,n=i.predicate,s=i.thisArg,o=this.index++;try{var a=n.call(s||this,t,o,this.source);a&&this.notifyComplete(this.yieldIndex?o:t)}catch(c){this.destination.error(c)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(TZ.Subscriber);br.FindValueSubscriber=u_});var l_=u(c_=>{"use strict";var IZ=Ys();function AZ(r,e){return IZ.find(r,e)(this)}c_.find=AZ});var f_=u(()=>{"use strict";var EZ=v(),jZ=l_();EZ.Observable.prototype.find=jZ.find});var Tc=u(h_=>{"use strict";var kZ=Ys();function RZ(r,e){return function(t){return t.lift(new kZ.FindValueOperator(r,t,!0,e))}}h_.findIndex=RZ});var d_=u(p_=>{"use strict";var PZ=Tc();function NZ(r,e){return PZ.findIndex(r,e)(this)}p_.findIndex=NZ});var v_=u(()=>{"use strict";var FZ=v(),MZ=d_();FZ.Observable.prototype.findIndex=MZ.findIndex});var vi=u(Ks=>{"use strict";var UZ=Ks&&Ks.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},ZZ=function(r){UZ(e,r);function e(){var t=r.call(this,"no elements in sequence");this.name=t.name="EmptyError",this.stack=t.stack,this.message=t.message}return e}(Error);Ks.EmptyError=ZZ});var Cc=u(Gs=>{"use strict";var LZ=Gs&&Gs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},DZ=C(),VZ=vi();function zZ(r,e,t){return function(i){return i.lift(new WZ(r,e,t,i))}}Gs.first=zZ;var WZ=function(){function r(e,t,i,n){this.predicate=e,this.resultSelector=t,this.defaultValue=i,this.source=n}return r.prototype.call=function(e,t){return t.subscribe(new BZ(e,this.predicate,this.resultSelector,this.defaultValue,this.source))},r}(),BZ=function(r){LZ(e,r);function e(t,i,n,s,o){r.call(this,t),this.predicate=i,this.resultSelector=n,this.defaultValue=s,this.source=o,this.index=0,this.hasCompleted=!1,this._emitted=!1}return e.prototype._next=function(t){var i=this.index++;this.predicate?this._tryPredicate(t,i):this._emit(t,i)},e.prototype._tryPredicate=function(t,i){var n;try{n=this.predicate(t,i,this.source)}catch(s){this.destination.error(s);return}n&&this._emit(t,i)},e.prototype._emit=function(t,i){if(this.resultSelector){this._tryResultSelector(t,i);return}this._emitFinal(t)},e.prototype._tryResultSelector=function(t,i){var n;try{n=this.resultSelector(t,i)}catch(s){this.destination.error(s);return}this._emitFinal(n)},e.prototype._emitFinal=function(t){var i=this.destination;this._emitted||(this._emitted=!0,i.next(t),i.complete(),this.hasCompleted=!0)},e.prototype._complete=function(){var t=this.destination;!this.hasCompleted&&typeof this.defaultValue!="undefined"?(t.next(this.defaultValue),t.complete()):this.hasCompleted||t.error(new VZ.EmptyError)},e}(DZ.Subscriber)});var m_=u(b_=>{"use strict";var $Z=Cc();function HZ(r,e,t){return $Z.first(r,e,t)(this)}b_.first=HZ});var y_=u(()=>{"use strict";var JZ=v(),YZ=m_();JZ.Observable.prototype.first=YZ.first});var g_=u(__=>{"use strict";var KZ=function(){function r(){this.size=0,this._values=[],this._keys=[]}return r.prototype.get=function(e){var t=this._keys.indexOf(e);return t===-1?void 0:this._values[t]},r.prototype.set=function(e,t){var i=this._keys.indexOf(e);return i===-1?(this._keys.push(e),this._values.push(t),this.size++):this._values[i]=t,this},r.prototype.delete=function(e){var t=this._keys.indexOf(e);return t===-1?!1:(this._values.splice(t,1),this._keys.splice(t,1),this.size--,!0)},r.prototype.clear=function(){this._keys.length=0,this._values.length=0,this.size=0},r.prototype.forEach=function(e,t){for(var i=0;i<this.size;i++)e.call(t,this._values[i],this._keys[i])},r}();__.MapPolyfill=KZ});var S_=u(w_=>{"use strict";var GZ=se(),XZ=g_();w_.Map=GZ.root.Map||function(){return XZ.MapPolyfill}()});var x_=u(O_=>{"use strict";var QZ=function(){function r(){this.values={}}return r.prototype.delete=function(e){return this.values[e]=null,!0},r.prototype.set=function(e,t){return this.values[e]=t,this},r.prototype.get=function(e){return this.values[e]},r.prototype.forEach=function(e,t){var i=this.values;for(var n in i)i.hasOwnProperty(n)&&i[n]!==null&&e.call(t,i[n],n)},r.prototype.clear=function(){this.values={}},r}();O_.FastMap=QZ});var Ac=u(bi=>{"use strict";var Xs=bi&&bi.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},q_=C(),T_=J(),eL=v(),tL=K(),rL=S_(),iL=x_();function nL(r,e,t,i){return function(n){return n.lift(new sL(r,e,t,i))}}bi.groupBy=nL;var sL=function(){function r(e,t,i,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=i,this.subjectSelector=n}return r.prototype.call=function(e,t){return t.subscribe(new oL(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},r}(),oL=function(r){Xs(e,r);function e(t,i,n,s,o){r.call(this,t),this.keySelector=i,this.elementSelector=n,this.durationSelector=s,this.subjectSelector=o,this.groups=null,this.attemptedToUnsubscribe=!1,this.count=0}return e.prototype._next=function(t){var i;try{i=this.keySelector(t)}catch(n){this.error(n);return}this._group(t,i)},e.prototype._group=function(t,i){var n=this.groups;n||(n=this.groups=typeof i=="string"?new iL.FastMap:new rL.Map);var s=n.get(i),o;if(this.elementSelector)try{o=this.elementSelector(t)}catch(l){this.error(l)}else o=t;if(!s){s=this.subjectSelector?this.subjectSelector():new tL.Subject,n.set(i,s);var a=new Ic(i,s,this);if(this.destination.next(a),this.durationSelector){var c=void 0;try{c=this.durationSelector(new Ic(i,s))}catch(l){this.error(l);return}this.add(c.subscribe(new aL(i,s,this)))}}s.closed||s.next(o)},e.prototype._error=function(t){var i=this.groups;i&&(i.forEach(function(n,s){n.error(t)}),i.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach(function(i,n){i.complete()}),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,this.count===0&&r.prototype.unsubscribe.call(this))},e}(q_.Subscriber),aL=function(r){Xs(e,r);function e(t,i,n){r.call(this,i),this.key=t,this.group=i,this.parent=n}return e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this,i=t.parent,n=t.key;this.key=this.parent=null,i&&i.removeGroup(n)},e}(q_.Subscriber),Ic=function(r){Xs(e,r);function e(t,i,n){r.call(this),this.key=t,this.groupSubject=i,this.refCountSubscription=n}return e.prototype._subscribe=function(t){var i=new T_.Subscription,n=this,s=n.refCountSubscription,o=n.groupSubject;return s&&!s.closed&&i.add(new uL(s)),i.add(o.subscribe(t)),i},e}(eL.Observable);bi.GroupedObservable=Ic;var uL=function(r){Xs(e,r);function e(t){r.call(this),this.parent=t,t.count++}return e.prototype.unsubscribe=function(){var t=this.parent;!t.closed&&!this.closed&&(r.prototype.unsubscribe.call(this),t.count-=1,t.count===0&&t.attemptedToUnsubscribe&&t.unsubscribe())},e}(T_.Subscription)});var I_=u(Ec=>{"use strict";var C_=Ac();Ec.GroupedObservable=C_.GroupedObservable;function cL(r,e,t,i){return C_.groupBy(r,e,t,i)(this)}Ec.groupBy=cL});var A_=u(()=>{"use strict";var lL=v(),fL=I_();lL.Observable.prototype.groupBy=fL.groupBy});var jc=u(Qs=>{"use strict";var hL=Qs&&Qs.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},pL=C(),dL=In();function vL(){return function(e){return e.lift(new bL)}}Qs.ignoreElements=vL;var bL=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new mL(e))},r}(),mL=function(r){hL(e,r);function e(){r.apply(this,arguments)}return e.prototype._next=function(t){dL.noop()},e}(pL.Subscriber)});var j_=u(E_=>{"use strict";var yL=jc();function _L(){return yL.ignoreElements()(this)}E_.ignoreElements=_L});var k_=u(()=>{"use strict";var gL=v(),wL=j_();gL.Observable.prototype.ignoreElements=wL.ignoreElements});var kc=u(eo=>{"use strict";var SL=eo&&eo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},OL=C();function xL(){return function(r){return r.lift(new qL)}}eo.isEmpty=xL;var qL=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new TL(e))},r}(),TL=function(r){SL(e,r);function e(t){r.call(this,t)}return e.prototype.notifyComplete=function(t){var i=this.destination;i.next(t),i.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(OL.Subscriber)});var P_=u(R_=>{"use strict";var CL=kc();function IL(){return CL.isEmpty()(this)}R_.isEmpty=IL});var N_=u(()=>{"use strict";var AL=v(),EL=P_();AL.Observable.prototype.isEmpty=EL.isEmpty});var ro=u(to=>{"use strict";var jL=to&&to.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},kL=Q(),F_=Y(),RL=P(),PL=N();function NL(r){return function(t){return t.lift(new FL(r))}}to.audit=NL;var FL=function(){function r(e){this.durationSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new ML(e,this.durationSelector))},r}(),ML=function(r){jL(e,r);function e(t,i){r.call(this,t),this.durationSelector=i,this.hasValue=!1}return e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var i=kL.tryCatch(this.durationSelector)(t);if(i===F_.errorObject)this.destination.error(F_.errorObject.e);else{var n=PL.subscribeToResult(this,i);n.closed?this.clearThrottle():this.add(this.throttled=n)}}},e.prototype.clearThrottle=function(){var t=this,i=t.value,n=t.hasValue,s=t.throttled;s&&(this.remove(s),this.throttled=null,s.unsubscribe()),n&&(this.value=null,this.hasValue=!1,this.destination.next(i))},e.prototype.notifyNext=function(t,i,n,s){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(RL.OuterSubscriber)});var U_=u(M_=>{"use strict";var UL=ro();function ZL(r){return UL.audit(r)(this)}M_.audit=ZL});var Z_=u(()=>{"use strict";var LL=v(),DL=U_();LL.Observable.prototype.audit=DL.audit});var Rc=u(L_=>{"use strict";var VL=W(),zL=ro(),WL=Yu();function BL(r,e){return e===void 0&&(e=VL.async),zL.audit(function(){return WL.timer(r,e)})}L_.auditTime=BL});var V_=u(D_=>{"use strict";var $L=W(),HL=Rc();function JL(r,e){return e===void 0&&(e=$L.async),HL.auditTime(r,e)(this)}D_.auditTime=JL});var z_=u(()=>{"use strict";var YL=v(),KL=V_();YL.Observable.prototype.auditTime=KL.auditTime});var Pc=u(io=>{"use strict";var GL=io&&io.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},XL=C(),QL=vi();function eD(r,e,t){return function(i){return i.lift(new tD(r,e,t,i))}}io.last=eD;var tD=function(){function r(e,t,i,n){this.predicate=e,this.resultSelector=t,this.defaultValue=i,this.source=n}return r.prototype.call=function(e,t){return t.subscribe(new rD(e,this.predicate,this.resultSelector,this.defaultValue,this.source))},r}(),rD=function(r){GL(e,r);function e(t,i,n,s,o){r.call(this,t),this.predicate=i,this.resultSelector=n,this.defaultValue=s,this.source=o,this.hasValue=!1,this.index=0,typeof s!="undefined"&&(this.lastValue=s,this.hasValue=!0)}return e.prototype._next=function(t){var i=this.index++;if(this.predicate)this._tryPredicate(t,i);else{if(this.resultSelector){this._tryResultSelector(t,i);return}this.lastValue=t,this.hasValue=!0}},e.prototype._tryPredicate=function(t,i){var n;try{n=this.predicate(t,i,this.source)}catch(s){this.destination.error(s);return}if(n){if(this.resultSelector){this._tryResultSelector(t,i);return}this.lastValue=t,this.hasValue=!0}},e.prototype._tryResultSelector=function(t,i){var n;try{n=this.resultSelector(t,i)}catch(s){this.destination.error(s);return}this.lastValue=n,this.hasValue=!0},e.prototype._complete=function(){var t=this.destination;this.hasValue?(t.next(this.lastValue),t.complete()):t.error(new QL.EmptyError)},e}(XL.Subscriber)});var B_=u(W_=>{"use strict";var iD=Pc();function nD(r,e,t){return iD.last(r,e,t)(this)}W_.last=nD});var $_=u(()=>{"use strict";var sD=v(),oD=B_();sD.Observable.prototype.last=oD.last});var J_=u(H_=>{"use strict";function aD(r){return r(this)}H_.letProto=aD});var G_=u(()=>{"use strict";var Y_=v(),K_=J_();Y_.Observable.prototype.let=K_.letProto;Y_.Observable.prototype.letBind=K_.letProto});var Nc=u(no=>{"use strict";var uD=no&&no.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},cD=C();function lD(r,e){return function(t){return t.lift(new fD(r,e,t))}}no.every=lD;var fD=function(){function r(e,t,i){this.predicate=e,this.thisArg=t,this.source=i}return r.prototype.call=function(e,t){return t.subscribe(new hD(e,this.predicate,this.thisArg,this.source))},r}(),hD=function(r){uD(e,r);function e(t,i,n,s){r.call(this,t),this.predicate=i,this.thisArg=n,this.source=s,this.index=0,this.thisArg=n||this}return e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var i=!1;try{i=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(n){this.destination.error(n);return}i||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(cD.Subscriber)});var Q_=u(X_=>{"use strict";var pD=Nc();function dD(r,e){return pD.every(r,e)(this)}X_.every=dD});var eg=u(()=>{"use strict";var vD=v(),bD=Q_();vD.Observable.prototype.every=bD.every});var rg=u(tg=>{"use strict";var mD=hr();function yD(r,e){return mD.map(r,e)(this)}tg.map=yD});var ig=u(()=>{"use strict";var _D=v(),gD=rg();_D.Observable.prototype.map=gD.map});var Fc=u(so=>{"use strict";var wD=so&&so.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},SD=C();function OD(r){return function(e){return e.lift(new xD(r))}}so.mapTo=OD;var xD=function(){function r(e){this.value=e}return r.prototype.call=function(e,t){return t.subscribe(new qD(e,this.value))},r}(),qD=function(r){wD(e,r);function e(t,i){r.call(this,t),this.value=i}return e.prototype._next=function(t){this.destination.next(this.value)},e}(SD.Subscriber)});var sg=u(ng=>{"use strict";var TD=Fc();function CD(r){return TD.mapTo(r)(this)}ng.mapTo=CD});var og=u(()=>{"use strict";var ID=v(),AD=sg();ID.Observable.prototype.mapTo=AD.mapTo});var Uc=u(oo=>{"use strict";var ED=oo&&oo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},jD=C(),Mc=nr();function kD(){return function(e){return e.lift(new RD)}}oo.materialize=kD;var RD=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new PD(e))},r}(),PD=function(r){ED(e,r);function e(t){r.call(this,t)}return e.prototype._next=function(t){this.destination.next(Mc.Notification.createNext(t))},e.prototype._error=function(t){var i=this.destination;i.next(Mc.Notification.createError(t)),i.complete()},e.prototype._complete=function(){var t=this.destination;t.next(Mc.Notification.createComplete()),t.complete()},e}(jD.Subscriber)});var ug=u(ag=>{"use strict";var ND=Uc();function FD(){return ND.materialize()(this)}ag.materialize=FD});var cg=u(()=>{"use strict";var MD=v(),UD=ug();MD.Observable.prototype.materialize=UD.materialize});var uo=u(ao=>{"use strict";var ZD=ao&&ao.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},LD=C();function DD(r,e){var t=!1;return arguments.length>=2&&(t=!0),function(n){return n.lift(new VD(r,e,t))}}ao.scan=DD;var VD=function(){function r(e,t,i){i===void 0&&(i=!1),this.accumulator=e,this.seed=t,this.hasSeed=i}return r.prototype.call=function(e,t){return t.subscribe(new zD(e,this.accumulator,this.seed,this.hasSeed))},r}(),zD=function(r){ZD(e,r);function e(t,i,n,s){r.call(this,t),this.accumulator=i,this._seed=n,this.hasSeed=s,this.index=0}return Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(!this.hasSeed)this.seed=t,this.destination.next(t);else return this._tryNext(t)},e.prototype._tryNext=function(t){var i=this.index++,n;try{n=this.accumulator(this.seed,t,i)}catch(s){this.destination.error(s)}this.seed=n,this.destination.next(n)},e}(LD.Subscriber)});var lo=u(co=>{"use strict";var WD=co&&co.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},BD=C(),$D=vr(),HD=Fe();function JD(r){return function(t){return r===0?new HD.EmptyObservable:t.lift(new YD(r))}}co.takeLast=JD;var YD=function(){function r(e){if(this.total=e,this.total<0)throw new $D.ArgumentOutOfRangeError}return r.prototype.call=function(e,t){return t.subscribe(new KD(e,this.total))},r}(),KD=function(r){WD(e,r);function e(t,i){r.call(this,t),this.total=i,this.ring=new Array,this.count=0}return e.prototype._next=function(t){var i=this.ring,n=this.total,s=this.count++;if(i.length<n)i.push(t);else{var o=s%n;i[o]=t}},e.prototype._complete=function(){var t=this.destination,i=this.count;if(i>0)for(var n=this.count>=this.total?this.total:this.count,s=this.ring,o=0;o<n;o++){var a=i++%n;t.next(s[a])}t.complete()},e}(BD.Subscriber)});var mr=u(pg=>{"use strict";var lg=uo(),fg=lo(),GD=Ns(),hg=An();function XD(r,e){return arguments.length>=2?function(i){return hg.pipe(lg.scan(r,e),fg.takeLast(1),GD.defaultIfEmpty(e))(i)}:function(i){return hg.pipe(lg.scan(function(n,s,o){return r(n,s,o+1)}),fg.takeLast(1))(i)}}pg.reduce=XD});var Zc=u(dg=>{"use strict";var QD=mr();function eV(r){var e=typeof r=="function"?function(t,i){return r(t,i)>0?t:i}:function(t,i){return t>i?t:i};return QD.reduce(e)}dg.max=eV});var bg=u(vg=>{"use strict";var tV=Zc();function rV(r){return tV.max(r)(this)}vg.max=rV});var mg=u(()=>{"use strict";var iV=v(),nV=bg();iV.Observable.prototype.max=nV.max});var Dc=u(Lc=>{"use strict";var sV=ai(),oV=ai();Lc.mergeStatic=oV.merge;function aV(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(t){return t.lift.call(sV.merge.apply(void 0,[t].concat(r)))}}Lc.merge=aV});var yg=u(Vc=>{"use strict";var uV=Dc(),cV=ai();Vc.mergeStatic=cV.merge;function lV(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return uV.merge.apply(void 0,r)(this)}Vc.merge=lV});var _g=u(()=>{"use strict";var fV=v(),hV=yg();fV.Observable.prototype.merge=hV.merge});var wg=u(gg=>{"use strict";var pV=oi();function dV(r){return r===void 0&&(r=Number.POSITIVE_INFINITY),pV.mergeAll(r)(this)}gg.mergeAll=dV});var Sg=u(()=>{"use strict";var vV=v(),bV=wg();vV.Observable.prototype.mergeAll=bV.mergeAll});var xg=u(Og=>{"use strict";var mV=or();function yV(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),mV.mergeMap(r,e,t)(this)}Og.mergeMap=yV});var Cg=u(()=>{"use strict";var qg=v(),Tg=xg();qg.Observable.prototype.mergeMap=Tg.mergeMap;qg.Observable.prototype.flatMap=Tg.mergeMap});var zc=u(yr=>{"use strict";var _V=yr&&yr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},gV=P(),wV=N();function SV(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),typeof e=="number"&&(t=e,e=null),function(i){return i.lift(new Ig(r,e,t))}}yr.mergeMapTo=SV;var Ig=function(){function r(e,t,i){i===void 0&&(i=Number.POSITIVE_INFINITY),this.ish=e,this.resultSelector=t,this.concurrent=i}return r.prototype.call=function(e,t){return t.subscribe(new Ag(e,this.ish,this.resultSelector,this.concurrent))},r}();yr.MergeMapToOperator=Ig;var Ag=function(r){_V(e,r);function e(t,i,n,s){s===void 0&&(s=Number.POSITIVE_INFINITY),r.call(this,t),this.ish=i,this.resultSelector=n,this.concurrent=s,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return e.prototype._next=function(t){if(this.active<this.concurrent){var i=this.resultSelector,n=this.index++,s=this.ish,o=this.destination;this.active++,this._innerSub(s,o,i,t,n)}else this.buffer.push(t)},e.prototype._innerSub=function(t,i,n,s,o){this.add(wV.subscribeToResult(this,t,s,o))},e.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&this.destination.complete()},e.prototype.notifyNext=function(t,i,n,s,o){var a=this,c=a.resultSelector,l=a.destination;c?this.trySelectResult(t,i,n,s):l.next(i)},e.prototype.trySelectResult=function(t,i,n,s){var o=this,a=o.resultSelector,c=o.destination,l;try{l=a(t,i,n,s)}catch(f){c.error(f);return}c.next(l)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){var i=this.buffer;this.remove(t),this.active--,i.length>0?this._next(i.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()},e}(gV.OuterSubscriber);yr.MergeMapToSubscriber=Ag});var jg=u(Eg=>{"use strict";var OV=zc();function xV(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),OV.mergeMapTo(r,e,t)(this)}Eg.mergeMapTo=xV});var Pg=u(()=>{"use strict";var kg=v(),Rg=jg();kg.Observable.prototype.flatMapTo=Rg.mergeMapTo;kg.Observable.prototype.mergeMapTo=Rg.mergeMapTo});var Wc=u(_r=>{"use strict";var qV=_r&&_r.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},TV=Q(),Ng=Y(),CV=N(),IV=P();function AV(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),function(i){return i.lift(new Fg(r,e,t))}}_r.mergeScan=AV;var Fg=function(){function r(e,t,i){this.accumulator=e,this.seed=t,this.concurrent=i}return r.prototype.call=function(e,t){return t.subscribe(new Mg(e,this.accumulator,this.seed,this.concurrent))},r}();_r.MergeScanOperator=Fg;var Mg=function(r){qV(e,r);function e(t,i,n,s){r.call(this,t),this.accumulator=i,this.acc=n,this.concurrent=s,this.hasValue=!1,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return e.prototype._next=function(t){if(this.active<this.concurrent){var i=this.index++,n=TV.tryCatch(this.accumulator)(this.acc,t),s=this.destination;n===Ng.errorObject?s.error(Ng.errorObject.e):(this.active++,this._innerSub(n,t,i))}else this.buffer.push(t)},e.prototype._innerSub=function(t,i,n){this.add(CV.subscribeToResult(this,t,i,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&(this.hasValue===!1&&this.destination.next(this.acc),this.destination.complete())},e.prototype.notifyNext=function(t,i,n,s,o){var a=this.destination;this.acc=i,this.hasValue=!0,a.next(i)},e.prototype.notifyComplete=function(t){var i=this.buffer;this.remove(t),this.active--,i.length>0?this._next(i.shift()):this.active===0&&this.hasCompleted&&(this.hasValue===!1&&this.destination.next(this.acc),this.destination.complete())},e}(IV.OuterSubscriber);_r.MergeScanSubscriber=Mg});var Zg=u(Ug=>{"use strict";var EV=Wc();function jV(r,e,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),EV.mergeScan(r,e,t)(this)}Ug.mergeScan=jV});var Lg=u(()=>{"use strict";var kV=v(),RV=Zg();kV.Observable.prototype.mergeScan=RV.mergeScan});var Bc=u(Dg=>{"use strict";var PV=mr();function NV(r){var e=typeof r=="function"?function(t,i){return r(t,i)<0?t:i}:function(t,i){return t<i?t:i};return PV.reduce(e)}Dg.min=NV});var zg=u(Vg=>{"use strict";var FV=Bc();function MV(r){return FV.min(r)(this)}Vg.min=MV});var Wg=u(()=>{"use strict";var UV=v(),ZV=zg();UV.Observable.prototype.min=ZV.min});var ho=u(fo=>{"use strict";var LV=fo&&fo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},DV=C();function VV(){return function(e){return e.lift(new zV(e))}}fo.refCount=VV;var zV=function(){function r(e){this.connectable=e}return r.prototype.call=function(e,t){var i=this.connectable;i._refCount++;var n=new WV(e,i),s=t.subscribe(n);return n.closed||(n.connection=i.connect()),s},r}(),WV=function(r){LV(e,r);function e(t,i){r.call(this,t),this.connectable=i}return e.prototype._unsubscribe=function(){var t=this.connectable;if(!t){this.connection=null;return}this.connectable=null;var i=t._refCount;if(i<=0){this.connection=null;return}if(t._refCount=i-1,i>1){this.connection=null;return}var n=this.connection,s=t._connection;this.connection=null,s&&(!n||s===n)&&s.unsubscribe()},e}(DV.Subscriber)});var Hc=u(yi=>{"use strict";var $c=yi&&yi.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},BV=K(),$V=v(),HV=C(),Bg=J(),JV=ho(),$g=function(r){$c(e,r);function e(t,i){r.call(this),this.source=t,this.subjectFactory=i,this._refCount=0,this._isComplete=!1}return e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,t=this._connection=new Bg.Subscription,t.add(this.source.subscribe(new YV(this.getSubject(),this))),t.closed?(this._connection=null,t=Bg.Subscription.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return JV.refCount()(this)},e}($V.Observable);yi.ConnectableObservable=$g;var mi=$g.prototype;yi.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:mi._subscribe},_isComplete:{value:mi._isComplete,writable:!0},getSubject:{value:mi.getSubject},connect:{value:mi.connect},refCount:{value:mi.refCount}};var YV=function(r){$c(e,r);function e(t,i){r.call(this,t),this.connectable=i}return e.prototype._error=function(t){this._unsubscribe(),r.prototype._error.call(this,t)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var i=t._connection;t._refCount=0,t._subject=null,t._connection=null,i&&i.unsubscribe()}},e}(BV.SubjectSubscriber),ane=function(){function r(e){this.connectable=e}return r.prototype.call=function(e,t){var i=this.connectable;i._refCount++;var n=new KV(e,i),s=t.subscribe(n);return n.closed||(n.connection=i.connect()),s},r}(),KV=function(r){$c(e,r);function e(t,i){r.call(this,t),this.connectable=i}return e.prototype._unsubscribe=function(){var t=this.connectable;if(!t){this.connection=null;return}this.connectable=null;var i=t._refCount;if(i<=0){this.connection=null;return}if(t._refCount=i-1,i>1){this.connection=null;return}var n=this.connection,s=t._connection;this.connection=null,s&&(!n||s===n)&&s.unsubscribe()},e}(HV.Subscriber)});var Ke=u(Jc=>{"use strict";var GV=Hc();function XV(r,e){return function(i){var n;if(typeof r=="function"?n=r:n=function(){return r},typeof e=="function")return i.lift(new Hg(n,e));var s=Object.create(i,GV.connectableObservableDescriptor);return s.source=i,s.subjectFactory=n,s}}Jc.multicast=XV;var Hg=function(){function r(e,t){this.subjectFactory=e,this.selector=t}return r.prototype.call=function(e,t){var i=this.selector,n=this.subjectFactory(),s=i(n).subscribe(e);return s.add(t.subscribe(n)),s},r}();Jc.MulticastOperator=Hg});var Yg=u(Jg=>{"use strict";var QV=Ke();function ez(r,e){return QV.multicast(r,e)(this)}Jg.multicast=ez});var Kg=u(()=>{"use strict";var tz=v(),rz=Yg();tz.Observable.prototype.multicast=rz.multicast});var Xg=u(Gg=>{"use strict";var iz=si();function nz(r,e){return e===void 0&&(e=0),iz.observeOn(r,e)(this)}Gg.observeOn=nz});var Qg=u(()=>{"use strict";var sz=v(),oz=Xg();sz.Observable.prototype.observeOn=oz.observeOn});var tw=u(ew=>{"use strict";var az=as();function uz(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return az.onErrorResumeNext.apply(void 0,r)(this)}ew.onErrorResumeNext=uz});var rw=u(()=>{"use strict";var cz=v(),lz=tw();cz.Observable.prototype.onErrorResumeNext=lz.onErrorResumeNext});var Yc=u(po=>{"use strict";var fz=po&&po.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},hz=C();function pz(){return function(r){return r.lift(new dz)}}po.pairwise=pz;var dz=function(){function r(){}return r.prototype.call=function(e,t){return t.subscribe(new vz(e))},r}(),vz=function(r){fz(e,r);function e(t){r.call(this,t),this.hasPrev=!1}return e.prototype._next=function(t){this.hasPrev?this.destination.next([this.prev,t]):this.hasPrev=!0,this.prev=t},e}(hz.Subscriber)});var nw=u(iw=>{"use strict";var bz=Yc();function mz(){return bz.pairwise()(this)}iw.pairwise=mz});var sw=u(()=>{"use strict";var yz=v(),_z=nw();yz.Observable.prototype.pairwise=_z.pairwise});var aw=u(ow=>{"use strict";function gz(r,e){function t(){return!t.pred.apply(t.thisArg,arguments)}return t.pred=r,t.thisArg=e,t}ow.not=gz});var Kc=u(cw=>{"use strict";var wz=aw(),uw=Hs();function Sz(r,e){return function(t){return[uw.filter(r,e)(t),uw.filter(wz.not(r,e))(t)]}}cw.partition=Sz});var fw=u(lw=>{"use strict";var Oz=Kc();function xz(r,e){return Oz.partition(r,e)(this)}lw.partition=xz});var hw=u(()=>{"use strict";var qz=v(),Tz=fw();qz.Observable.prototype.partition=Tz.partition});var Gc=u(pw=>{"use strict";var Cz=hr();function Iz(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];var t=r.length;if(t===0)throw new Error("list of properties cannot be empty.");return function(i){return Cz.map(Az(r,t))(i)}}pw.pluck=Iz;function Az(r,e){var t=function(i){for(var n=i,s=0;s<e;s++){var o=n[r[s]];if(typeof o!="undefined")n=o;else return}return n};return t}});var vw=u(dw=>{"use strict";var Ez=Gc();function jz(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return Ez.pluck.apply(void 0,r)(this)}dw.pluck=jz});var bw=u(()=>{"use strict";var kz=v(),Rz=vw();kz.Observable.prototype.pluck=Rz.pluck});var Xc=u(_w=>{"use strict";var mw=K(),yw=Ke();function Pz(r){return r?yw.multicast(function(){return new mw.Subject},r):yw.multicast(new mw.Subject)}_w.publish=Pz});var ww=u(gw=>{"use strict";var Nz=Xc();function Fz(r){return Nz.publish(r)(this)}gw.publish=Fz});var Sw=u(()=>{"use strict";var Mz=v(),Uz=ww();Mz.Observable.prototype.publish=Uz.publish});var Qc=u(vo=>{"use strict";var Zz=vo&&vo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Lz=K(),Dz=ei(),Vz=function(r){Zz(e,r);function e(t){r.call(this),this._value=t}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(t){var i=r.prototype._subscribe.call(this,t);return i&&!i.closed&&t.next(this._value),i},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Dz.ObjectUnsubscribedError;return this._value},e.prototype.next=function(t){r.prototype.next.call(this,this._value=t)},e}(Lz.Subject);vo.BehaviorSubject=Vz});var el=u(Ow=>{"use strict";var zz=Qc(),Wz=Ke();function Bz(r){return function(e){return Wz.multicast(new zz.BehaviorSubject(r))(e)}}Ow.publishBehavior=Bz});var qw=u(xw=>{"use strict";var $z=el();function Hz(r){return $z.publishBehavior(r)(this)}xw.publishBehavior=Hz});var Tw=u(()=>{"use strict";var Jz=v(),Yz=qw();Jz.Observable.prototype.publishBehavior=Yz.publishBehavior});var tl=u(Cw=>{"use strict";var Kz=pi(),Gz=Ke();function Xz(r,e,t,i){t&&typeof t!="function"&&(i=t);var n=typeof t=="function"?t:void 0,s=new Kz.ReplaySubject(r,e,i);return function(o){return Gz.multicast(function(){return s},n)(o)}}Cw.publishReplay=Xz});var Aw=u(Iw=>{"use strict";var Qz=tl();function e4(r,e,t,i){return Qz.publishReplay(r,e,t,i)(this)}Iw.publishReplay=e4});var Ew=u(()=>{"use strict";var t4=v(),r4=Aw();t4.Observable.prototype.publishReplay=r4.publishReplay});var rl=u(jw=>{"use strict";var i4=ri(),n4=Ke();function s4(){return function(r){return n4.multicast(new i4.AsyncSubject)(r)}}jw.publishLast=s4});var Rw=u(kw=>{"use strict";var o4=rl();function a4(){return o4.publishLast()(this)}kw.publishLast=a4});var Pw=u(()=>{"use strict";var u4=v(),c4=Rw();u4.Observable.prototype.publishLast=c4.publishLast});var il=u(Nw=>{"use strict";var l4=Oe(),f4=ss();function h4(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(i){return r.length===1&&l4.isArray(r[0])&&(r=r[0]),i.lift.call(f4.race.apply(void 0,[i].concat(r)))}}Nw.race=h4});var Fw=u(nl=>{"use strict";var p4=il(),d4=ss();nl.raceStatic=d4.race;function v4(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return p4.race.apply(void 0,r)(this)}nl.race=v4});var Mw=u(()=>{"use strict";var b4=v(),m4=Fw();b4.Observable.prototype.race=m4.race});var Lw=u(Zw=>{"use strict";var Uw=mr();function y4(r,e){return arguments.length>=2?Uw.reduce(r,e)(this):Uw.reduce(r)(this)}Zw.reduce=y4});var Dw=u(()=>{"use strict";var _4=v(),g4=Lw();_4.Observable.prototype.reduce=g4.reduce});var sl=u(bo=>{"use strict";var w4=bo&&bo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},S4=C(),O4=Fe();function x4(r){return r===void 0&&(r=-1),function(e){return r===0?new O4.EmptyObservable:r<0?e.lift(new Vw(-1,e)):e.lift(new Vw(r-1,e))}}bo.repeat=x4;var Vw=function(){function r(e,t){this.count=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new q4(e,this.count,this.source))},r}(),q4=function(r){w4(e,r);function e(t,i,n){r.call(this,t),this.count=i,this.source=n}return e.prototype.complete=function(){if(!this.isStopped){var t=this,i=t.source,n=t.count;if(n===0)return r.prototype.complete.call(this);n>-1&&(this.count=n-1),i.subscribe(this._unsubscribeAndRecycle())}},e}(S4.Subscriber)});var Ww=u(zw=>{"use strict";var T4=sl();function C4(r){return r===void 0&&(r=-1),T4.repeat(r)(this)}zw.repeat=C4});var Bw=u(()=>{"use strict";var I4=v(),A4=Ww();I4.Observable.prototype.repeat=A4.repeat});var ol=u(mo=>{"use strict";var E4=mo&&mo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},j4=K(),k4=Q(),R4=Y(),P4=P(),N4=N();function F4(r){return function(e){return e.lift(new M4(r))}}mo.repeatWhen=F4;var M4=function(){function r(e){this.notifier=e}return r.prototype.call=function(e,t){return t.subscribe(new U4(e,this.notifier,t))},r}(),U4=function(r){E4(e,r);function e(t,i,n){r.call(this,t),this.notifier=i,this.source=n,this.sourceIsBeingSubscribedTo=!0}return e.prototype.notifyNext=function(t,i,n,s,o){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(t){if(this.sourceIsBeingSubscribedTo===!1)return r.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return r.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this,i=t.notifications,n=t.retriesSubscription;i&&(i.unsubscribe(),this.notifications=null),n&&(n.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var t=this,i=t.notifications,n=t.retries,s=t.retriesSubscription;return this.notifications=null,this.retries=null,this.retriesSubscription=null,r.prototype._unsubscribeAndRecycle.call(this),this.notifications=i,this.retries=n,this.retriesSubscription=s,this},e.prototype.subscribeToRetries=function(){this.notifications=new j4.Subject;var t=k4.tryCatch(this.notifier)(this.notifications);if(t===R4.errorObject)return r.prototype.complete.call(this);this.retries=t,this.retriesSubscription=N4.subscribeToResult(this,t)},e}(P4.OuterSubscriber)});var Hw=u($w=>{"use strict";var Z4=ol();function L4(r){return Z4.repeatWhen(r)(this)}$w.repeatWhen=L4});var Jw=u(()=>{"use strict";var D4=v(),V4=Hw();D4.Observable.prototype.repeatWhen=V4.repeatWhen});var al=u(yo=>{"use strict";var z4=yo&&yo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},W4=C();function B4(r){return r===void 0&&(r=-1),function(e){return e.lift(new $4(r,e))}}yo.retry=B4;var $4=function(){function r(e,t){this.count=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new H4(e,this.count,this.source))},r}(),H4=function(r){z4(e,r);function e(t,i,n){r.call(this,t),this.count=i,this.source=n}return e.prototype.error=function(t){if(!this.isStopped){var i=this,n=i.source,s=i.count;if(s===0)return r.prototype.error.call(this,t);s>-1&&(this.count=s-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(W4.Subscriber)});var Kw=u(Yw=>{"use strict";var J4=al();function Y4(r){return r===void 0&&(r=-1),J4.retry(r)(this)}Yw.retry=Y4});var Gw=u(()=>{"use strict";var K4=v(),G4=Kw();K4.Observable.prototype.retry=G4.retry});var ul=u(_o=>{"use strict";var X4=_o&&_o.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Q4=K(),e3=Q(),Xw=Y(),t3=P(),r3=N();function i3(r){return function(e){return e.lift(new n3(r,e))}}_o.retryWhen=i3;var n3=function(){function r(e,t){this.notifier=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new s3(e,this.notifier,this.source))},r}(),s3=function(r){X4(e,r);function e(t,i,n){r.call(this,t),this.notifier=i,this.source=n}return e.prototype.error=function(t){if(!this.isStopped){var i=this.errors,n=this.retries,s=this.retriesSubscription;if(n)this.errors=null,this.retriesSubscription=null;else{if(i=new Q4.Subject,n=e3.tryCatch(this.notifier)(i),n===Xw.errorObject)return r.prototype.error.call(this,Xw.errorObject.e);s=r3.subscribeToResult(this,n)}this._unsubscribeAndRecycle(),this.errors=i,this.retries=n,this.retriesSubscription=s,i.next(t)}},e.prototype._unsubscribe=function(){var t=this,i=t.errors,n=t.retriesSubscription;i&&(i.unsubscribe(),this.errors=null),n&&(n.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,i,n,s,o){var a=this,c=a.errors,l=a.retries,f=a.retriesSubscription;this.errors=null,this.retries=null,this.retriesSubscription=null,this._unsubscribeAndRecycle(),this.errors=c,this.retries=l,this.retriesSubscription=f,this.source.subscribe(this)},e}(t3.OuterSubscriber)});var eS=u(Qw=>{"use strict";var o3=ul();function a3(r){return o3.retryWhen(r)(this)}Qw.retryWhen=a3});var tS=u(()=>{"use strict";var u3=v(),c3=eS();u3.Observable.prototype.retryWhen=c3.retryWhen});var cl=u(go=>{"use strict";var l3=go&&go.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},f3=P(),h3=N();function p3(r){return function(e){return e.lift(new d3(r))}}go.sample=p3;var d3=function(){function r(e){this.notifier=e}return r.prototype.call=function(e,t){var i=new v3(e),n=t.subscribe(i);return n.add(h3.subscribeToResult(i,this.notifier)),n},r}(),v3=function(r){l3(e,r);function e(){r.apply(this,arguments),this.hasValue=!1}return e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,i,n,s,o){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(f3.OuterSubscriber)});var iS=u(rS=>{"use strict";var b3=cl();function m3(r){return b3.sample(r)(this)}rS.sample=m3});var nS=u(()=>{"use strict";var y3=v(),_3=iS();y3.Observable.prototype.sample=_3.sample});var ll=u(wo=>{"use strict";var g3=wo&&wo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},w3=C(),S3=W();function O3(r,e){return e===void 0&&(e=S3.async),function(t){return t.lift(new x3(r,e))}}wo.sampleTime=O3;var x3=function(){function r(e,t){this.period=e,this.scheduler=t}return r.prototype.call=function(e,t){return t.subscribe(new q3(e,this.period,this.scheduler))},r}(),q3=function(r){g3(e,r);function e(t,i,n){r.call(this,t),this.period=i,this.scheduler=n,this.hasValue=!1,this.add(n.schedule(T3,i,{subscriber:this,period:i}))}return e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(w3.Subscriber);function T3(r){var e=r.subscriber,t=r.period;e.notifyNext(),this.schedule(r,t)}});var oS=u(sS=>{"use strict";var C3=W(),I3=ll();function A3(r,e){return e===void 0&&(e=C3.async),I3.sampleTime(r,e)(this)}sS.sampleTime=A3});var aS=u(()=>{"use strict";var E3=v(),j3=oS();E3.Observable.prototype.sampleTime=j3.sampleTime});var lS=u(cS=>{"use strict";var uS=uo();function k3(r,e){return arguments.length>=2?uS.scan(r,e)(this):uS.scan(r)(this)}cS.scan=k3});var fS=u(()=>{"use strict";var R3=v(),P3=lS();R3.Observable.prototype.scan=P3.scan});var fl=u(gr=>{"use strict";var pS=gr&&gr.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},dS=C(),N3=Q(),hS=Y();function F3(r,e){return function(t){return t.lift(new vS(r,e))}}gr.sequenceEqual=F3;var vS=function(){function r(e,t){this.compareTo=e,this.comparor=t}return r.prototype.call=function(e,t){return t.subscribe(new bS(e,this.compareTo,this.comparor))},r}();gr.SequenceEqualOperator=vS;var bS=function(r){pS(e,r);function e(t,i,n){r.call(this,t),this.compareTo=i,this.comparor=n,this._a=[],this._b=[],this._oneComplete=!1,this.add(i.subscribe(new M3(t,this)))}return e.prototype._next=function(t){this._oneComplete&&this._b.length===0?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(this._a.length===0&&this._b.length===0):this._oneComplete=!0},e.prototype.checkValues=function(){for(var t=this,i=t._a,n=t._b,s=t.comparor;i.length>0&&n.length>0;){var o=i.shift(),a=n.shift(),c=!1;s?(c=N3.tryCatch(s)(o,a),c===hS.errorObject&&this.destination.error(hS.errorObject.e)):c=o===a,c||this.emit(!1)}},e.prototype.emit=function(t){var i=this.destination;i.next(t),i.complete()},e.prototype.nextB=function(t){this._oneComplete&&this._a.length===0?this.emit(!1):(this._b.push(t),this.checkValues())},e}(dS.Subscriber);gr.SequenceEqualSubscriber=bS;var M3=function(r){pS(e,r);function e(t,i){r.call(this,t),this.parent=i}return e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t)},e.prototype._complete=function(){this.parent._complete()},e}(dS.Subscriber)});var yS=u(mS=>{"use strict";var U3=fl();function Z3(r,e){return U3.sequenceEqual(r,e)(this)}mS.sequenceEqual=Z3});var _S=u(()=>{"use strict";var L3=v(),D3=yS();L3.Observable.prototype.sequenceEqual=D3.sequenceEqual});var hl=u(gS=>{"use strict";var V3=Ke(),z3=ho(),W3=K();function B3(){return new W3.Subject}function $3(){return function(r){return z3.refCount()(V3.multicast(B3)(r))}}gS.share=$3});var SS=u(wS=>{"use strict";var H3=hl();function J3(){return H3.share()(this)}wS.share=J3});var OS=u(()=>{"use strict";var Y3=v(),K3=SS();Y3.Observable.prototype.share=K3.share});var pl=u(xS=>{"use strict";var G3=pi();function X3(r,e,t){return function(i){return i.lift(Q3(r,e,t))}}xS.shareReplay=X3;function Q3(r,e,t){var i,n=0,s,o=!1,a=!1;return function(l){n++,(!i||o)&&(o=!1,i=new G3.ReplaySubject(r,e,t),s=l.subscribe({next:function(p){i.next(p)},error:function(p){o=!0,i.error(p)},complete:function(){a=!0,i.complete()}}));var f=i.subscribe(this);return function(){n--,f.unsubscribe(),s&&n===0&&a&&s.unsubscribe()}}}});var TS=u(qS=>{"use strict";var e2=pl();function t2(r,e,t){return e2.shareReplay(r,e,t)(this)}qS.shareReplay=t2});var CS=u(()=>{"use strict";var r2=v(),i2=TS();r2.Observable.prototype.shareReplay=i2.shareReplay});var dl=u(So=>{"use strict";var n2=So&&So.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},s2=C(),o2=vi();function a2(r){return function(e){return e.lift(new u2(r,e))}}So.single=a2;var u2=function(){function r(e,t){this.predicate=e,this.source=t}return r.prototype.call=function(e,t){return t.subscribe(new c2(e,this.predicate,this.source))},r}(),c2=function(r){n2(e,r);function e(t,i,n){r.call(this,t),this.predicate=i,this.source=n,this.seenValue=!1,this.index=0}return e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var i=this.index++;this.predicate?this.tryNext(t,i):this.applySingleValue(t)},e.prototype.tryNext=function(t,i){try{this.predicate(t,i,this.source)&&this.applySingleValue(t)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new o2.EmptyError)},e}(s2.Subscriber)});var AS=u(IS=>{"use strict";var l2=dl();function f2(r){return l2.single(r)(this)}IS.single=f2});var ES=u(()=>{"use strict";var h2=v(),p2=AS();h2.Observable.prototype.single=p2.single});var vl=u(Oo=>{"use strict";var d2=Oo&&Oo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},v2=C();function b2(r){return function(e){return e.lift(new m2(r))}}Oo.skip=b2;var m2=function(){function r(e){this.total=e}return r.prototype.call=function(e,t){return t.subscribe(new y2(e,this.total))},r}(),y2=function(r){d2(e,r);function e(t,i){r.call(this,t),this.total=i,this.count=0}return e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(v2.Subscriber)});var kS=u(jS=>{"use strict";var _2=vl();function g2(r){return _2.skip(r)(this)}jS.skip=g2});var RS=u(()=>{"use strict";var w2=v(),S2=kS();w2.Observable.prototype.skip=S2.skip});var bl=u(xo=>{"use strict";var O2=xo&&xo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},PS=C(),x2=vr();function q2(r){return function(e){return e.lift(new T2(r))}}xo.skipLast=q2;var T2=function(){function r(e){if(this._skipCount=e,this._skipCount<0)throw new x2.ArgumentOutOfRangeError}return r.prototype.call=function(e,t){return this._skipCount===0?t.subscribe(new PS.Subscriber(e)):t.subscribe(new C2(e,this._skipCount))},r}(),C2=function(r){O2(e,r);function e(t,i){r.call(this,t),this._skipCount=i,this._count=0,this._ring=new Array(i)}return e.prototype._next=function(t){var i=this._skipCount,n=this._count++;if(n<i)this._ring[n]=t;else{var s=n%i,o=this._ring,a=o[s];o[s]=t,this.destination.next(a)}},e}(PS.Subscriber)});var FS=u(NS=>{"use strict";var I2=bl();function A2(r){return I2.skipLast(r)(this)}NS.skipLast=A2});var MS=u(()=>{"use strict";var E2=v(),j2=FS();E2.Observable.prototype.skipLast=j2.skipLast});var ml=u(qo=>{"use strict";var k2=qo&&qo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},R2=P(),P2=N();function N2(r){return function(e){return e.lift(new F2(r))}}qo.skipUntil=N2;var F2=function(){function r(e){this.notifier=e}return r.prototype.call=function(e,t){return t.subscribe(new M2(e,this.notifier))},r}(),M2=function(r){k2(e,r);function e(t,i){r.call(this,t),this.hasValue=!1,this.isInnerStopped=!1,this.add(P2.subscribeToResult(this,i))}return e.prototype._next=function(t){this.hasValue&&r.prototype._next.call(this,t)},e.prototype._complete=function(){this.isInnerStopped?r.prototype._complete.call(this):this.unsubscribe()},e.prototype.notifyNext=function(t,i,n,s,o){this.hasValue=!0},e.prototype.notifyComplete=function(){this.isInnerStopped=!0,this.isStopped&&r.prototype._complete.call(this)},e}(R2.OuterSubscriber)});var ZS=u(US=>{"use strict";var U2=ml();function Z2(r){return U2.skipUntil(r)(this)}US.skipUntil=Z2});var LS=u(()=>{"use strict";var L2=v(),D2=ZS();L2.Observable.prototype.skipUntil=D2.skipUntil});var yl=u(To=>{"use strict";var V2=To&&To.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},z2=C();function W2(r){return function(e){return e.lift(new B2(r))}}To.skipWhile=W2;var B2=function(){function r(e){this.predicate=e}return r.prototype.call=function(e,t){return t.subscribe(new $2(e,this.predicate))},r}(),$2=function(r){V2(e,r);function e(t,i){r.call(this,t),this.predicate=i,this.skipping=!0,this.index=0}return e.prototype._next=function(t){var i=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||i.next(t)},e.prototype.tryCallPredicate=function(t){try{var i=this.predicate(t,this.index++);this.skipping=!!i}catch(n){this.destination.error(n)}},e}(z2.Subscriber)});var VS=u(DS=>{"use strict";var H2=yl();function J2(r){return H2.skipWhile(r)(this)}DS.skipWhile=J2});var zS=u(()=>{"use strict";var Y2=v(),K2=VS();Y2.Observable.prototype.skipWhile=K2.skipWhile});var gl=u(WS=>{"use strict";var G2=Me(),X2=Un(),Q2=Fe(),_l=ar(),eW=_e();function tW(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(t){var i=r[r.length-1];eW.isScheduler(i)?r.pop():i=null;var n=r.length;return n===1?_l.concat(new X2.ScalarObservable(r[0],i),t):n>1?_l.concat(new G2.ArrayObservable(r,i),t):_l.concat(new Q2.EmptyObservable(i),t)}}WS.startWith=tW});var $S=u(BS=>{"use strict";var rW=gl();function iW(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return rW.startWith.apply(void 0,r)(this)}BS.startWith=iW});var HS=u(()=>{"use strict";var nW=v(),sW=$S();nW.Observable.prototype.startWith=sW.startWith});var YS=u(wl=>{"use strict";var oW=se(),JS=function(){function r(e){if(this.root=e,e.setImmediate&&typeof e.setImmediate=="function")this.setImmediate=e.setImmediate.bind(e),this.clearImmediate=e.clearImmediate.bind(e);else{this.nextHandle=1,this.tasksByHandle={},this.currentlyRunningATask=!1,this.canUseProcessNextTick()?this.setImmediate=this.createProcessNextTickSetImmediate():this.canUsePostMessage()?this.setImmediate=this.createPostMessageSetImmediate():this.canUseMessageChannel()?this.setImmediate=this.createMessageChannelSetImmediate():this.canUseReadyStateChange()?this.setImmediate=this.createReadyStateChangeSetImmediate():this.setImmediate=this.createSetTimeoutSetImmediate();var t=function i(n){delete i.instance.tasksByHandle[n]};t.instance=this,this.clearImmediate=t}}return r.prototype.identify=function(e){return this.root.Object.prototype.toString.call(e)},r.prototype.canUseProcessNextTick=function(){return this.identify(this.root.process)==="[object process]"},r.prototype.canUseMessageChannel=function(){return!!this.root.MessageChannel},r.prototype.canUseReadyStateChange=function(){var e=this.root.document;return!!(e&&"onreadystatechange"in e.createElement("script"))},r.prototype.canUsePostMessage=function(){var e=this.root;if(e.postMessage&&!e.importScripts){var t=!0,i=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=i,t}return!1},r.prototype.partiallyApplied=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var n=function s(){var o=s,a=o.handler,c=o.args;typeof a=="function"?a.apply(void 0,c):new Function(""+a)()};return n.handler=e,n.args=t,n},r.prototype.addFromSetImmediateArguments=function(e){return this.tasksByHandle[this.nextHandle]=this.partiallyApplied.apply(void 0,e),this.nextHandle++},r.prototype.createProcessNextTickSetImmediate=function(){var e=function t(){var i=t.instance,n=i.addFromSetImmediateArguments(arguments);return i.root.process.nextTick(i.partiallyApplied(i.runIfPresent,n)),n};return e.instance=this,e},r.prototype.createPostMessageSetImmediate=function(){var e=this.root,t="setImmediate$"+e.Math.random()+"$",i=function s(o){var a=s.instance;o.source===e&&typeof o.data=="string"&&o.data.indexOf(t)===0&&a.runIfPresent(+o.data.slice(t.length))};i.instance=this,e.addEventListener("message",i,!1);var n=function s(){var o=s,a=o.messagePrefix,c=o.instance,l=c.addFromSetImmediateArguments(arguments);return c.root.postMessage(a+l,"*"),l};return n.instance=this,n.messagePrefix=t,n},r.prototype.runIfPresent=function(e){if(this.currentlyRunningATask)this.root.setTimeout(this.partiallyApplied(this.runIfPresent,e),0);else{var t=this.tasksByHandle[e];if(t){this.currentlyRunningATask=!0;try{t()}finally{this.clearImmediate(e),this.currentlyRunningATask=!1}}}},r.prototype.createMessageChannelSetImmediate=function(){var e=this,t=new this.root.MessageChannel;t.port1.onmessage=function(n){var s=n.data;e.runIfPresent(s)};var i=function n(){var s=n,o=s.channel,a=s.instance,c=a.addFromSetImmediateArguments(arguments);return o.port2.postMessage(c),c};return i.channel=t,i.instance=this,i},r.prototype.createReadyStateChangeSetImmediate=function(){var e=function t(){var i=t.instance,n=i.root,s=n.document,o=s.documentElement,a=i.addFromSetImmediateArguments(arguments),c=s.createElement("script");return c.onreadystatechange=function(){i.runIfPresent(a),c.onreadystatechange=null,o.removeChild(c),c=null},o.appendChild(c),a};return e.instance=this,e},r.prototype.createSetTimeoutSetImmediate=function(){var e=function t(){var i=t.instance,n=i.addFromSetImmediateArguments(arguments);return i.root.setTimeout(i.partiallyApplied(i.runIfPresent,n),0),n};return e.instance=this,e},r}();wl.ImmediateDefinition=JS;wl.Immediate=new JS(oW.root)});var GS=u(Co=>{"use strict";var aW=Co&&Co.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},KS=YS(),uW=cr(),cW=function(r){aW(e,r);function e(t,i){r.call(this,t,i),this.scheduler=t,this.work=i}return e.prototype.requestAsyncId=function(t,i,n){return n===void 0&&(n=0),n!==null&&n>0?r.prototype.requestAsyncId.call(this,t,i,n):(t.actions.push(this),t.scheduled||(t.scheduled=KS.Immediate.setImmediate(t.flush.bind(t,null))))},e.prototype.recycleAsyncId=function(t,i,n){if(n===void 0&&(n=0),n!==null&&n>0||n===null&&this.delay>0)return r.prototype.recycleAsyncId.call(this,t,i,n);t.actions.length===0&&(KS.Immediate.clearImmediate(i),t.scheduled=void 0)},e}(uW.AsyncAction);Co.AsapAction=cW});var XS=u(Io=>{"use strict";var lW=Io&&Io.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},fW=lr(),hW=function(r){lW(e,r);function e(){r.apply(this,arguments)}return e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var i=this.actions,n,s=-1,o=i.length;t=t||i.shift();do if(n=t.execute(t.state,t.delay))break;while(++s<o&&(t=i.shift()));if(this.active=!1,n){for(;++s<o&&(t=i.shift());)t.unsubscribe();throw n}},e}(fW.AsyncScheduler);Io.AsapScheduler=hW});var Sl=u(QS=>{"use strict";var pW=GS(),dW=XS();QS.asap=new dW.AsapScheduler(pW.AsapAction)});var e1=u(Ao=>{"use strict";var vW=Ao&&Ao.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},bW=v(),Ol=Sl(),mW=ur(),yW=function(r){vW(e,r);function e(t,i,n){i===void 0&&(i=0),n===void 0&&(n=Ol.asap),r.call(this),this.source=t,this.delayTime=i,this.scheduler=n,(!mW.isNumeric(i)||i<0)&&(this.delayTime=0),(!n||typeof n.schedule!="function")&&(this.scheduler=Ol.asap)}return e.create=function(t,i,n){return i===void 0&&(i=0),n===void 0&&(n=Ol.asap),new e(t,i,n)},e.dispatch=function(t){var i=t.source,n=t.subscriber;return this.add(i.subscribe(n))},e.prototype._subscribe=function(t){var i=this.delayTime,n=this.source,s=this.scheduler;return s.schedule(e.dispatch,i,{source:n,subscriber:t})},e}(bW.Observable);Ao.SubscribeOnObservable=yW});var r1=u(t1=>{"use strict";var _W=e1();function gW(r,e){return e===void 0&&(e=0),function(i){return i.lift(new wW(r,e))}}t1.subscribeOn=gW;var wW=function(){function r(e,t){this.scheduler=e,this.delay=t}return r.prototype.call=function(e,t){return new _W.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},r}()});var n1=u(i1=>{"use strict";var SW=r1();function OW(r,e){return e===void 0&&(e=0),SW.subscribeOn(r,e)(this)}i1.subscribeOn=OW});var s1=u(()=>{"use strict";var xW=v(),qW=n1();xW.Observable.prototype.subscribeOn=qW.subscribeOn});var jo=u(Eo=>{"use strict";var TW=Eo&&Eo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},CW=P(),IW=N();function AW(r,e){return function(i){return i.lift(new EW(r,e))}}Eo.switchMap=AW;var EW=function(){function r(e,t){this.project=e,this.resultSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new jW(e,this.project,this.resultSelector))},r}(),jW=function(r){TW(e,r);function e(t,i,n){r.call(this,t),this.project=i,this.resultSelector=n,this.index=0}return e.prototype._next=function(t){var i,n=this.index++;try{i=this.project(t,n)}catch(s){this.destination.error(s);return}this._innerSub(i,t,n)},e.prototype._innerSub=function(t,i,n){var s=this.innerSubscription;s&&s.unsubscribe(),this.add(this.innerSubscription=IW.subscribeToResult(this,t,i,n))},e.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(t){this.remove(t),this.innerSubscription=null,this.isStopped&&r.prototype._complete.call(this)},e.prototype.notifyNext=function(t,i,n,s,o){this.resultSelector?this._tryNotifyNext(t,i,n,s):this.destination.next(i)},e.prototype._tryNotifyNext=function(t,i,n,s){var o;try{o=this.resultSelector(t,i,n,s)}catch(a){this.destination.error(a);return}this.destination.next(o)},e}(CW.OuterSubscriber)});var xl=u(o1=>{"use strict";var kW=jo(),RW=Hu();function PW(){return kW.switchMap(RW.identity)}o1.switchAll=PW});var u1=u(a1=>{"use strict";var NW=xl();function FW(){return NW.switchAll()(this)}a1._switch=FW});var f1=u(()=>{"use strict";var c1=v(),l1=u1();c1.Observable.prototype.switch=l1._switch;c1.Observable.prototype._switch=l1._switch});var p1=u(h1=>{"use strict";var MW=jo();function UW(r,e){return MW.switchMap(r,e)(this)}h1.switchMap=UW});var d1=u(()=>{"use strict";var ZW=v(),LW=p1();ZW.Observable.prototype.switchMap=LW.switchMap});var ql=u(ko=>{"use strict";var DW=ko&&ko.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},VW=P(),zW=N();function WW(r,e){return function(t){return t.lift(new BW(r,e))}}ko.switchMapTo=WW;var BW=function(){function r(e,t){this.observable=e,this.resultSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new $W(e,this.observable,this.resultSelector))},r}(),$W=function(r){DW(e,r);function e(t,i,n){r.call(this,t),this.inner=i,this.resultSelector=n,this.index=0}return e.prototype._next=function(t){var i=this.innerSubscription;i&&i.unsubscribe(),this.add(this.innerSubscription=zW.subscribeToResult(this,this.inner,t,this.index++))},e.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(t){this.remove(t),this.innerSubscription=null,this.isStopped&&r.prototype._complete.call(this)},e.prototype.notifyNext=function(t,i,n,s,o){var a=this,c=a.resultSelector,l=a.destination;c?this.tryResultSelector(t,i,n,s):l.next(i)},e.prototype.tryResultSelector=function(t,i,n,s){var o=this,a=o.resultSelector,c=o.destination,l;try{l=a(t,i,n,s)}catch(f){c.error(f);return}c.next(l)},e}(VW.OuterSubscriber)});var b1=u(v1=>{"use strict";var HW=ql();function JW(r,e){return HW.switchMapTo(r,e)(this)}v1.switchMapTo=JW});var m1=u(()=>{"use strict";var YW=v(),KW=b1();YW.Observable.prototype.switchMapTo=KW.switchMapTo});var Tl=u(Ro=>{"use strict";var GW=Ro&&Ro.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},XW=C(),QW=vr(),e6=Fe();function t6(r){return function(e){return r===0?new e6.EmptyObservable:e.lift(new r6(r))}}Ro.take=t6;var r6=function(){function r(e){if(this.total=e,this.total<0)throw new QW.ArgumentOutOfRangeError}return r.prototype.call=function(e,t){return t.subscribe(new i6(e,this.total))},r}(),i6=function(r){GW(e,r);function e(t,i){r.call(this,t),this.total=i,this.count=0}return e.prototype._next=function(t){var i=this.total,n=++this.count;n<=i&&(this.destination.next(t),n===i&&(this.destination.complete(),this.unsubscribe()))},e}(XW.Subscriber)});var _1=u(y1=>{"use strict";var n6=Tl();function s6(r){return n6.take(r)(this)}y1.take=s6});var g1=u(()=>{"use strict";var o6=v(),a6=_1();o6.Observable.prototype.take=a6.take});var S1=u(w1=>{"use strict";var u6=lo();function c6(r){return u6.takeLast(r)(this)}w1.takeLast=c6});var O1=u(()=>{"use strict";var l6=v(),f6=S1();l6.Observable.prototype.takeLast=f6.takeLast});var Cl=u(Po=>{"use strict";var h6=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)},p6=P(),d6=N();function v6(r){return function(e){return e.lift(new b6(r))}}Po.takeUntil=v6;var b6=function(){function r(e){this.notifier=e}return r.prototype.call=function(e,t){return t.subscribe(new m6(e,this.notifier))},r}(),m6=function(r){h6(e,r);function e(t,i){r.call(this,t),this.notifier=i,this.add(d6.subscribeToResult(this,i))}return e.prototype.notifyNext=function(t,i,n,s,o){this.complete()},e.prototype.notifyComplete=function(){},e}(p6.OuterSubscriber)});var q1=u(x1=>{"use strict";var y6=Cl();function _6(r){return y6.takeUntil(r)(this)}x1.takeUntil=_6});var T1=u(()=>{"use strict";var g6=v(),w6=q1();g6.Observable.prototype.takeUntil=w6.takeUntil});var Il=u(No=>{"use strict";var S6=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)},O6=C();function x6(r){return function(e){return e.lift(new q6(r))}}No.takeWhile=x6;var q6=function(){function r(e){this.predicate=e}return r.prototype.call=function(e,t){return t.subscribe(new T6(e,this.predicate))},r}(),T6=function(r){S6(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}(O6.Subscriber)});var I1=u(C1=>{"use strict";var C6=Il();function I6(r){return C6.takeWhile(r)(this)}C1.takeWhile=I6});var A1=u(()=>{"use strict";var A6=v(),E6=I1();A6.Observable.prototype.takeWhile=E6.takeWhile});var _i=u(wr=>{"use strict";var j6=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)},k6=P(),R6=N();wr.defaultThrottleConfig={leading:!0,trailing:!1};function P6(r,e){return e===void 0&&(e=wr.defaultThrottleConfig),function(t){return t.lift(new N6(r,e.leading,e.trailing))}}wr.throttle=P6;var N6=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 F6(e,this.durationSelector,this.leading,this.trailing))},r}(),F6=function(r){j6(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=R6.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}(k6.OuterSubscriber)});var k1=u(j1=>{"use strict";var E1=_i();function M6(r,e){return e===void 0&&(e=E1.defaultThrottleConfig),E1.throttle(r,e)(this)}j1.throttle=M6});var R1=u(()=>{"use strict";var U6=v(),Z6=k1();U6.Observable.prototype.throttle=Z6.throttle});var Al=u(Fo=>{"use strict";var L6=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)},D6=C(),V6=W(),z6=_i();function W6(r,e,t){return e===void 0&&(e=V6.async),t===void 0&&(t=z6.defaultThrottleConfig),function(i){return i.lift(new B6(r,e,t.leading,t.trailing))}}Fo.throttleTime=W6;var B6=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 $6(e,this.duration,this.scheduler,this.leading,this.trailing))},r}(),$6=function(r){L6(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(H6,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}(D6.Subscriber);function H6(r){var e=r.subscriber;e.clearThrottle()}});var N1=u(P1=>{"use strict";var J6=W(),Y6=_i(),K6=Al();function G6(r,e,t){return e===void 0&&(e=J6.async),t===void 0&&(t=Y6.defaultThrottleConfig),K6.throttleTime(r,e,t)(this)}P1.throttleTime=G6});var F1=u(()=>{"use strict";var X6=v(),Q6=N1();X6.Observable.prototype.throttleTime=Q6.throttleTime});var El=u(gi=>{"use strict";var e9=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)},t9=C(),r9=W();function i9(r){return r===void 0&&(r=r9.async),function(e){return e.lift(new n9(r))}}gi.timeInterval=i9;var M1=function(){function r(e,t){this.value=e,this.interval=t}return r}();gi.TimeInterval=M1;var n9=function(){function r(e){this.scheduler=e}return r.prototype.call=function(e,t){return t.subscribe(new s9(e,this.scheduler))},r}(),s9=function(r){e9(e,r);function e(t,i){r.call(this,t),this.scheduler=i,this.lastTime=0,this.lastTime=i.now()}return e.prototype._next=function(t){var i=this.scheduler.now(),n=i-this.lastTime;this.lastTime=i,this.destination.next(new M1(t,n))},e}(t9.Subscriber)});var kl=u(jl=>{"use strict";var o9=W(),U1=El();jl.TimeInterval=U1.TimeInterval;function a9(r){return r===void 0&&(r=o9.async),U1.timeInterval(r)(this)}jl.timeInterval=a9});var Z1=u(()=>{"use strict";var u9=v(),c9=kl();u9.Observable.prototype.timeInterval=c9.timeInterval});var Rl=u(Mo=>{"use strict";var l9=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)},f9=function(r){l9(e,r);function e(){var t=r.call(this,"Timeout has occurred");this.name=t.name="TimeoutError",this.stack=t.stack,this.message=t.message}return e}(Error);Mo.TimeoutError=f9});var Pl=u(Uo=>{"use strict";var h9=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)},p9=W(),d9=ci(),v9=C(),b9=Rl();function m9(r,e){e===void 0&&(e=p9.async);var t=d9.isDate(r),i=t?+r-e.now():Math.abs(r);return function(n){return n.lift(new y9(i,t,e,new b9.TimeoutError))}}Uo.timeout=m9;var y9=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 _9(e,this.absoluteTimeout,this.waitFor,this.scheduler,this.errorInstance))},r}(),_9=function(r){h9(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}(v9.Subscriber)});var D1=u(L1=>{"use strict";var g9=W(),w9=Pl();function S9(r,e){return e===void 0&&(e=g9.async),w9.timeout(r,e)(this)}L1.timeout=S9});var V1=u(()=>{"use strict";var O9=v(),x9=D1();O9.Observable.prototype.timeout=x9.timeout});var Nl=u(Zo=>{"use strict";var q9=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)},T9=W(),C9=ci(),I9=P(),A9=N();function E9(r,e,t){return t===void 0&&(t=T9.async),function(i){var n=C9.isDate(r),s=n?+r-t.now():Math.abs(r);return i.lift(new j9(s,n,e,t))}}Zo.timeoutWith=E9;var j9=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 k9(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},r}(),k9=function(r){q9(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(A9.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}(I9.OuterSubscriber)});var W1=u(z1=>{"use strict";var R9=W(),P9=Nl();function N9(r,e,t){return t===void 0&&(t=R9.async),P9.timeoutWith(r,e,t)(this)}z1.timeoutWith=N9});var B1=u(()=>{"use strict";var F9=v(),M9=W1();F9.Observable.prototype.timeoutWith=M9.timeoutWith});var Lo=u(Fl=>{"use strict";var U9=W(),Z9=hr();function L9(r){return r===void 0&&(r=U9.async),Z9.map(function(e){return new $1(e,r.now())})}Fl.timestamp=L9;var $1=function(){function r(e,t){this.value=e,this.timestamp=t}return r}();Fl.Timestamp=$1});var J1=u(H1=>{"use strict";var D9=W(),V9=Lo();function z9(r){return r===void 0&&(r=D9.async),V9.timestamp(r)(this)}H1.timestamp=z9});var Y1=u(()=>{"use strict";var W9=v(),B9=J1();W9.Observable.prototype.timestamp=B9.timestamp});var Ml=u(K1=>{"use strict";var $9=mr();function H9(r,e,t){return t===0?[e]:(r.push(e),r)}function J9(){return $9.reduce(H9,[])}K1.toArray=J9});var X1=u(G1=>{"use strict";var Y9=Ml();function K9(){return Y9.toArray()(this)}G1.toArray=K9});var Q1=u(()=>{"use strict";var G9=v(),X9=X1();G9.Observable.prototype.toArray=X9.toArray});var eO=u(()=>{});var Ul=u(Do=>{"use strict";var Q9=Do&&Do.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},tO=K(),eB=P(),tB=N();function rB(r){return function(t){return t.lift(new iB(r))}}Do.window=rB;var iB=function(){function r(e){this.windowBoundaries=e}return r.prototype.call=function(e,t){var i=new nB(e),n=t.subscribe(i);return n.closed||i.add(tB.subscribeToResult(i,this.windowBoundaries)),n},r}(),nB=function(r){Q9(e,r);function e(t){r.call(this,t),this.window=new tO.Subject,t.next(this.window)}return e.prototype.notifyNext=function(t,i,n,s,o){this.openWindow()},e.prototype.notifyError=function(t,i){this._error(t)},e.prototype.notifyComplete=function(t){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var i=this.destination,n=this.window=new tO.Subject;i.next(n)},e}(eB.OuterSubscriber)});var iO=u(rO=>{"use strict";var sB=Ul();function oB(r){return sB.window(r)(this)}rO.window=oB});var nO=u(()=>{"use strict";var aB=v(),uB=iO();aB.Observable.prototype.window=uB.window});var Zl=u(Vo=>{"use strict";var cB=Vo&&Vo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},lB=C(),sO=K();function fB(r,e){return e===void 0&&(e=0),function(i){return i.lift(new hB(r,e))}}Vo.windowCount=fB;var hB=function(){function r(e,t){this.windowSize=e,this.startWindowEvery=t}return r.prototype.call=function(e,t){return t.subscribe(new pB(e,this.windowSize,this.startWindowEvery))},r}(),pB=function(r){cB(e,r);function e(t,i,n){r.call(this,t),this.destination=t,this.windowSize=i,this.startWindowEvery=n,this.windows=[new sO.Subject],this.count=0,t.next(this.windows[0])}return e.prototype._next=function(t){for(var i=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,s=this.windowSize,o=this.windows,a=o.length,c=0;c<a&&!this.closed;c++)o[c].next(t);var l=this.count-s+1;if(l>=0&&l%i===0&&!this.closed&&o.shift().complete(),++this.count%i===0&&!this.closed){var f=new sO.Subject;o.push(f),n.next(f)}},e.prototype._error=function(t){var i=this.windows;if(i)for(;i.length>0&&!this.closed;)i.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(lB.Subscriber)});var aO=u(oO=>{"use strict";var dB=Zl();function vB(r,e){return e===void 0&&(e=0),dB.windowCount(r,e)(this)}oO.windowCount=vB});var uO=u(()=>{"use strict";var bB=v(),mB=aO();bB.Observable.prototype.windowCount=mB.windowCount});var Dl=u(zo=>{"use strict";var lO=zo&&zo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},yB=K(),_B=W(),gB=C(),cO=ur(),Ll=_e();function wB(r){var e=_B.async,t=null,i=Number.POSITIVE_INFINITY;return Ll.isScheduler(arguments[3])&&(e=arguments[3]),Ll.isScheduler(arguments[2])?e=arguments[2]:cO.isNumeric(arguments[2])&&(i=arguments[2]),Ll.isScheduler(arguments[1])?e=arguments[1]:cO.isNumeric(arguments[1])&&(t=arguments[1]),function(s){return s.lift(new SB(r,t,i,e))}}zo.windowTime=wB;var SB=function(){function r(e,t,i,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=i,this.scheduler=n}return r.prototype.call=function(e,t){return t.subscribe(new xB(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},r}(),OB=function(r){lO(e,r);function e(){r.apply(this,arguments),this._numberOfNextedValues=0}return e.prototype.next=function(t){this._numberOfNextedValues++,r.prototype.next.call(this,t)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(yB.Subject),xB=function(r){lO(e,r);function e(t,i,n,s,o){r.call(this,t),this.destination=t,this.windowTimeSpan=i,this.windowCreationInterval=n,this.maxWindowSize=s,this.scheduler=o,this.windows=[];var a=this.openWindow();if(n!==null&&n>=0){var c={subscriber:this,window:a,context:null},l={windowTimeSpan:i,windowCreationInterval:n,subscriber:this,scheduler:o};this.add(o.schedule(fO,i,c)),this.add(o.schedule(TB,n,l))}else{var f={subscriber:this,window:a,windowTimeSpan:i};this.add(o.schedule(qB,i,f))}}return e.prototype._next=function(t){for(var i=this.windows,n=i.length,s=0;s<n;s++){var o=i[s];o.closed||(o.next(t),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},e.prototype._error=function(t){for(var i=this.windows;i.length>0;)i.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var i=t.shift();i.closed||i.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new OB;this.windows.push(t);var i=this.destination;return i.next(t),t},e.prototype.closeWindow=function(t){t.complete();var i=this.windows;i.splice(i.indexOf(t),1)},e}(gB.Subscriber);function qB(r){var e=r.subscriber,t=r.windowTimeSpan,i=r.window;i&&e.closeWindow(i),r.window=e.openWindow(),this.schedule(r,t)}function TB(r){var e=r.windowTimeSpan,t=r.subscriber,i=r.scheduler,n=r.windowCreationInterval,s=t.openWindow(),o=this,a={action:o,subscription:null},c={subscriber:t,window:s,context:a};a.subscription=i.schedule(fO,e,c),o.add(a.subscription),o.schedule(r,n)}function fO(r){var e=r.subscriber,t=r.window,i=r.context;i&&i.action&&i.subscription&&i.action.remove(i.subscription),e.closeWindow(t)}});var dO=u(pO=>{"use strict";var CB=W(),hO=ur(),Vl=_e(),IB=Dl();function AB(r){var e=CB.async,t=null,i=Number.POSITIVE_INFINITY;return Vl.isScheduler(arguments[3])&&(e=arguments[3]),Vl.isScheduler(arguments[2])?e=arguments[2]:hO.isNumeric(arguments[2])&&(i=arguments[2]),Vl.isScheduler(arguments[1])?e=arguments[1]:hO.isNumeric(arguments[1])&&(t=arguments[1]),IB.windowTime(r,t,i,e)(this)}pO.windowTime=AB});var vO=u(()=>{"use strict";var EB=v(),jB=dO();EB.Observable.prototype.windowTime=jB.windowTime});var zl=u(Wo=>{"use strict";var kB=Wo&&Wo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},RB=K(),PB=J(),NB=Q(),bO=Y(),FB=P(),mO=N();function MB(r,e){return function(t){return t.lift(new UB(r,e))}}Wo.windowToggle=MB;var UB=function(){function r(e,t){this.openings=e,this.closingSelector=t}return r.prototype.call=function(e,t){return t.subscribe(new ZB(e,this.openings,this.closingSelector))},r}(),ZB=function(r){kB(e,r);function e(t,i,n){r.call(this,t),this.openings=i,this.closingSelector=n,this.contexts=[],this.add(this.openSubscription=mO.subscribeToResult(this,i,i))}return e.prototype._next=function(t){var i=this.contexts;if(i)for(var n=i.length,s=0;s<n;s++)i[s].window.next(t)},e.prototype._error=function(t){var i=this.contexts;if(this.contexts=null,i)for(var n=i.length,s=-1;++s<n;){var o=i[s];o.window.error(t),o.subscription.unsubscribe()}r.prototype._error.call(this,t)},e.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var i=t.length,n=-1;++n<i;){var s=t[n];s.window.complete(),s.subscription.unsubscribe()}r.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var i=t.length,n=-1;++n<i;){var s=t[n];s.window.unsubscribe(),s.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,i,n,s,o){if(t===this.openings){var a=this.closingSelector,c=NB.tryCatch(a)(i);if(c===bO.errorObject)return this.error(bO.errorObject.e);var l=new RB.Subject,f=new PB.Subscription,p={window:l,subscription:f};this.contexts.push(p);var y=mO.subscribeToResult(this,c,p);y.closed?this.closeWindow(this.contexts.length-1):(y.context=p,f.add(y)),this.destination.next(l)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(t!==-1){var i=this.contexts,n=i[t],s=n.window,o=n.subscription;i.splice(t,1),s.complete(),o.unsubscribe()}},e}(FB.OuterSubscriber)});var _O=u(yO=>{"use strict";var LB=zl();function DB(r,e){return LB.windowToggle(r,e)(this)}yO.windowToggle=DB});var gO=u(()=>{"use strict";var VB=v(),zB=_O();VB.Observable.prototype.windowToggle=zB.windowToggle});var Wl=u(Bo=>{"use strict";var WB=Bo&&Bo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},BB=K(),$B=Q(),wO=Y(),HB=P(),JB=N();function YB(r){return function(t){return t.lift(new KB(r))}}Bo.windowWhen=YB;var KB=function(){function r(e){this.closingSelector=e}return r.prototype.call=function(e,t){return t.subscribe(new GB(e,this.closingSelector))},r}(),GB=function(r){WB(e,r);function e(t,i){r.call(this,t),this.destination=t,this.closingSelector=i,this.openWindow()}return e.prototype.notifyNext=function(t,i,n,s,o){this.openWindow(o)},e.prototype.notifyError=function(t,i){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){t===void 0&&(t=null),t&&(this.remove(t),t.unsubscribe());var i=this.window;i&&i.complete();var n=this.window=new BB.Subject;this.destination.next(n);var s=$B.tryCatch(this.closingSelector)();if(s===wO.errorObject){var o=wO.errorObject.e;this.destination.error(o),this.window.error(o)}else this.add(this.closingNotification=JB.subscribeToResult(this,s))},e}(HB.OuterSubscriber)});var OO=u(SO=>{"use strict";var XB=Wl();function QB(r){return XB.windowWhen(r)(this)}SO.windowWhen=QB});var xO=u(()=>{"use strict";var e5=v(),t5=OO();e5.Observable.prototype.windowWhen=t5.windowWhen});var Bl=u($o=>{"use strict";var r5=$o&&$o.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},i5=P(),n5=N();function s5(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return function(t){var i;typeof r[r.length-1]=="function"&&(i=r.pop());var n=r;return t.lift(new o5(n,i))}}$o.withLatestFrom=s5;var o5=function(){function r(e,t){this.observables=e,this.project=t}return r.prototype.call=function(e,t){return t.subscribe(new a5(e,this.observables,this.project))},r}(),a5=function(r){r5(e,r);function e(t,i,n){r.call(this,t),this.observables=i,this.project=n,this.toRespond=[];var s=i.length;this.values=new Array(s);for(var o=0;o<s;o++)this.toRespond.push(o);for(var o=0;o<s;o++){var a=i[o];this.add(n5.subscribeToResult(this,a,a,o))}}return e.prototype.notifyNext=function(t,i,n,s,o){this.values[n]=i;var a=this.toRespond;if(a.length>0){var c=a.indexOf(n);c!==-1&&a.splice(c,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(this.toRespond.length===0){var i=[t].concat(this.values);this.project?this._tryProject(i):this.destination.next(i)}},e.prototype._tryProject=function(t){var i;try{i=this.project.apply(this,t)}catch(n){this.destination.error(n);return}this.destination.next(i)},e}(i5.OuterSubscriber)});var TO=u(qO=>{"use strict";var u5=Bl();function c5(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return u5.withLatestFrom.apply(void 0,r)(this)}qO.withLatestFrom=c5});var CO=u(()=>{"use strict";var l5=v(),f5=TO();l5.Observable.prototype.withLatestFrom=f5.withLatestFrom});var AO=u(IO=>{"use strict";var h5=li();function p5(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return h5.zip.apply(void 0,r)(this)}IO.zipProto=p5});var EO=u(()=>{"use strict";var d5=v(),v5=AO();d5.Observable.prototype.zip=v5.zipProto});var $l=u(jO=>{"use strict";var b5=li();function m5(r){return function(e){return e.lift(new b5.ZipOperator(r))}}jO.zipAll=m5});var RO=u(kO=>{"use strict";var y5=$l();function _5(r){return y5.zipAll(r)(this)}kO.zipAll=_5});var PO=u(()=>{"use strict";var g5=v(),w5=RO();g5.Observable.prototype.zipAll=w5.zipAll});var Hl=u(NO=>{"use strict";var S5=function(){function r(e,t){t===void 0&&(t=Number.POSITIVE_INFINITY),this.subscribedFrame=e,this.unsubscribedFrame=t}return r}();NO.SubscriptionLog=S5});var Jl=u(MO=>{"use strict";var FO=Hl(),O5=function(){function r(){this.subscriptions=[]}return r.prototype.logSubscribedFrame=function(){return this.subscriptions.push(new FO.SubscriptionLog(this.scheduler.now())),this.subscriptions.length-1},r.prototype.logUnsubscribedFrame=function(e){var t=this.subscriptions,i=t[e];t[e]=new FO.SubscriptionLog(i.subscribedFrame,this.scheduler.now())},r}();MO.SubscriptionLoggable=O5});var Yl=u(UO=>{"use strict";function x5(r,e){for(var t=0,i=e.length;t<i;t++)for(var n=e[t],s=Object.getOwnPropertyNames(n.prototype),o=0,a=s.length;o<a;o++){var c=s[o];r.prototype[c]=n.prototype[c]}}UO.applyMixins=x5});var LO=u(Ho=>{"use strict";var q5=Ho&&Ho.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},T5=v(),C5=J(),I5=Jl(),A5=Yl(),ZO=function(r){q5(e,r);function e(t,i){r.call(this,function(n){var s=this,o=s.logSubscribedFrame();return n.add(new C5.Subscription(function(){s.logUnsubscribedFrame(o)})),s.scheduleMessages(n),n}),this.messages=t,this.subscriptions=[],this.scheduler=i}return e.prototype.scheduleMessages=function(t){for(var i=this.messages.length,n=0;n<i;n++){var s=this.messages[n];t.add(this.scheduler.schedule(function(o){var a=o.message,c=o.subscriber;a.notification.observe(c)},s.frame,{message:s,subscriber:t}))}},e}(T5.Observable);Ho.ColdObservable=ZO;A5.applyMixins(ZO,[I5.SubscriptionLoggable])});var VO=u(Jo=>{"use strict";var E5=Jo&&Jo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},j5=K(),k5=J(),R5=Jl(),P5=Yl(),DO=function(r){E5(e,r);function e(t,i){r.call(this),this.messages=t,this.subscriptions=[],this.scheduler=i}return e.prototype._subscribe=function(t){var i=this,n=i.logSubscribedFrame();return t.add(new k5.Subscription(function(){i.logUnsubscribedFrame(n)})),r.prototype._subscribe.call(this,t)},e.prototype.setup=function(){for(var t=this,i=t.messages.length,n=0;n<i;n++)(function(){var s=t.messages[n];t.scheduler.schedule(function(){s.notification.observe(t)},s.frame)})()},e}(j5.Subject);Jo.HotObservable=DO;P5.applyMixins(DO,[R5.SubscriptionLoggable])});var Kl=u(wi=>{"use strict";var zO=wi&&wi.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},N5=cr(),F5=lr(),M5=function(r){zO(e,r);function e(t,i){var n=this;t===void 0&&(t=WO),i===void 0&&(i=Number.POSITIVE_INFINITY),r.call(this,t,function(){return n.frame}),this.maxFrames=i,this.frame=0,this.index=-1}return e.prototype.flush=function(){for(var t=this,i=t.actions,n=t.maxFrames,s,o;(o=i.shift())&&(this.frame=o.delay)<=n&&!(s=o.execute(o.state,o.delay)););if(s){for(;o=i.shift();)o.unsubscribe();throw s}},e.frameTimeFactor=10,e}(F5.AsyncScheduler);wi.VirtualTimeScheduler=M5;var WO=function(r){zO(e,r);function e(t,i,n){n===void 0&&(n=t.index+=1),r.call(this,t,i),this.scheduler=t,this.work=i,this.index=n,this.active=!0,this.index=t.index=n}return e.prototype.schedule=function(t,i){if(i===void 0&&(i=0),!this.id)return r.prototype.schedule.call(this,t,i);this.active=!1;var n=new e(this.scheduler,this.work);return this.add(n),n.schedule(t,i)},e.prototype.requestAsyncId=function(t,i,n){n===void 0&&(n=0),this.delay=t.frame+n;var s=t.actions;return s.push(this),s.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,i,n){n===void 0&&(n=0)},e.prototype._execute=function(t,i){if(this.active===!0)return r.prototype._execute.call(this,t,i)},e.sortActions=function(t,i){return t.delay===i.delay?t.index===i.index?0:t.index>i.index?1:-1:t.delay>i.delay?1:-1},e}(N5.AsyncAction);wi.VirtualAction=WO});var HO=u(Yo=>{"use strict";var U5=Yo&&Yo.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Z5=v(),Ue=nr(),BO=LO(),L5=VO(),Gl=Hl(),$O=Kl(),D5=750,V5=function(r){U5(e,r);function e(t){r.call(this,$O.VirtualAction,D5),this.assertDeepEqual=t,this.hotObservables=[],this.coldObservables=[],this.flushTests=[]}return e.prototype.createTime=function(t){var i=t.indexOf("|");if(i===-1)throw new Error('marble diagram for time should have a completion marker "|"');return i*e.frameTimeFactor},e.prototype.createColdObservable=function(t,i,n){if(t.indexOf("^")!==-1)throw new Error('cold observable cannot have subscription offset "^"');if(t.indexOf("!")!==-1)throw new Error('cold observable cannot have unsubscription marker "!"');var s=e.parseMarbles(t,i,n),o=new BO.ColdObservable(s,this);return this.coldObservables.push(o),o},e.prototype.createHotObservable=function(t,i,n){if(t.indexOf("!")!==-1)throw new Error('hot observable cannot have unsubscription marker "!"');var s=e.parseMarbles(t,i,n),o=new L5.HotObservable(s,this);return this.hotObservables.push(o),o},e.prototype.materializeInnerObservable=function(t,i){var n=this,s=[];return t.subscribe(function(o){s.push({frame:n.frame-i,notification:Ue.Notification.createNext(o)})},function(o){s.push({frame:n.frame-i,notification:Ue.Notification.createError(o)})},function(){s.push({frame:n.frame-i,notification:Ue.Notification.createComplete()})}),s},e.prototype.expectObservable=function(t,i){var n=this;i===void 0&&(i=null);var s=[],o={actual:s,ready:!1},a=e.parseMarblesAsSubscriptions(i).unsubscribedFrame,c;return this.schedule(function(){c=t.subscribe(function(l){var f=l;l instanceof Z5.Observable&&(f=n.materializeInnerObservable(f,n.frame)),s.push({frame:n.frame,notification:Ue.Notification.createNext(f)})},function(l){s.push({frame:n.frame,notification:Ue.Notification.createError(l)})},function(){s.push({frame:n.frame,notification:Ue.Notification.createComplete()})})},0),a!==Number.POSITIVE_INFINITY&&this.schedule(function(){return c.unsubscribe()},a),this.flushTests.push(o),{toBe:function(l,f,p){o.ready=!0,o.expected=e.parseMarbles(l,f,p,!0)}}},e.prototype.expectSubscriptions=function(t){var i={actual:t,ready:!1};return this.flushTests.push(i),{toBe:function(n){var s=typeof n=="string"?[n]:n;i.ready=!0,i.expected=s.map(function(o){return e.parseMarblesAsSubscriptions(o)})}}},e.prototype.flush=function(){for(var t=this.hotObservables;t.length>0;)t.shift().setup();r.prototype.flush.call(this);for(var i=this.flushTests.filter(function(s){return s.ready});i.length>0;){var n=i.shift();this.assertDeepEqual(n.actual,n.expected)}},e.parseMarblesAsSubscriptions=function(t){if(typeof t!="string")return new Gl.SubscriptionLog(Number.POSITIVE_INFINITY);for(var i=t.length,n=-1,s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,a=0;a<i;a++){var c=a*this.frameTimeFactor,l=t[a];switch(l){case"-":case" ":break;case"(":n=c;break;case")":n=-1;break;case"^":if(s!==Number.POSITIVE_INFINITY)throw new Error("found a second subscription point '^' in a subscription marble diagram. There can only be one.");s=n>-1?n:c;break;case"!":if(o!==Number.POSITIVE_INFINITY)throw new Error("found a second subscription point '^' in a subscription marble diagram. There can only be one.");o=n>-1?n:c;break;default:throw new Error("there can only be '^' and '!' markers in a subscription marble diagram. Found instead '"+l+"'.")}}return o<0?new Gl.SubscriptionLog(s):new Gl.SubscriptionLog(s,o)},e.parseMarbles=function(t,i,n,s){if(s===void 0&&(s=!1),t.indexOf("!")!==-1)throw new Error('conventional marble diagrams cannot have the unsubscription marker "!"');for(var o=t.length,a=[],c=t.indexOf("^"),l=c===-1?0:c*-this.frameTimeFactor,f=typeof i!="object"?function(S){return S}:function(S){return s&&i[S]instanceof BO.ColdObservable?i[S].messages:i[S]},p=-1,y=0;y<o;y++){var g=y*this.frameTimeFactor+l,m=void 0,O=t[y];switch(O){case"-":case" ":break;case"(":p=g;break;case")":p=-1;break;case"|":m=Ue.Notification.createComplete();break;case"^":break;case"#":m=Ue.Notification.createError(n||"error");break;default:m=Ue.Notification.createNext(f(O));break}m&&a.push({frame:p>-1?p:g,notification:m})}return a},e}($O.VirtualTimeScheduler);Yo.TestScheduler=V5});var YO=u(Xl=>{"use strict";var z5=se(),JO=function(){function r(e){e.requestAnimationFrame?(this.cancelAnimationFrame=e.cancelAnimationFrame.bind(e),this.requestAnimationFrame=e.requestAnimationFrame.bind(e)):e.mozRequestAnimationFrame?(this.cancelAnimationFrame=e.mozCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.mozRequestAnimationFrame.bind(e)):e.webkitRequestAnimationFrame?(this.cancelAnimationFrame=e.webkitCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.webkitRequestAnimationFrame.bind(e)):e.msRequestAnimationFrame?(this.cancelAnimationFrame=e.msCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.msRequestAnimationFrame.bind(e)):e.oRequestAnimationFrame?(this.cancelAnimationFrame=e.oCancelAnimationFrame.bind(e),this.requestAnimationFrame=e.oRequestAnimationFrame.bind(e)):(this.cancelAnimationFrame=e.clearTimeout.bind(e),this.requestAnimationFrame=function(t){return e.setTimeout(t,1e3/60)})}return r}();Xl.RequestAnimationFrameDefinition=JO;Xl.AnimationFrame=new JO(z5.root)});var GO=u(Ko=>{"use strict";var W5=Ko&&Ko.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},B5=cr(),KO=YO(),$5=function(r){W5(e,r);function e(t,i){r.call(this,t,i),this.scheduler=t,this.work=i}return e.prototype.requestAsyncId=function(t,i,n){return n===void 0&&(n=0),n!==null&&n>0?r.prototype.requestAsyncId.call(this,t,i,n):(t.actions.push(this),t.scheduled||(t.scheduled=KO.AnimationFrame.requestAnimationFrame(t.flush.bind(t,null))))},e.prototype.recycleAsyncId=function(t,i,n){if(n===void 0&&(n=0),n!==null&&n>0||n===null&&this.delay>0)return r.prototype.recycleAsyncId.call(this,t,i,n);t.actions.length===0&&(KO.AnimationFrame.cancelAnimationFrame(i),t.scheduled=void 0)},e}(B5.AsyncAction);Ko.AnimationFrameAction=$5});var XO=u(Go=>{"use strict";var H5=Go&&Go.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},J5=lr(),Y5=function(r){H5(e,r);function e(){r.apply(this,arguments)}return e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var i=this.actions,n,s=-1,o=i.length;t=t||i.shift();do if(n=t.execute(t.state,t.delay))break;while(++s<o&&(t=i.shift()));if(this.active=!1,n){for(;++s<o&&(t=i.shift());)t.unsubscribe();throw n}},e}(J5.AsyncScheduler);Go.AnimationFrameScheduler=Y5});var e0=u(QO=>{"use strict";var K5=GO(),G5=XO();QO.animationFrame=new G5.AnimationFrameScheduler(K5.AnimationFrameAction)});var t0=u(_=>{"use strict";var X5=ro();_.audit=X5.audit;var Q5=Rc();_.auditTime=Q5.auditTime;var e8=Qu();_.buffer=e8.buffer;var t8=ec();_.bufferCount=t8.bufferCount;var r8=tc();_.bufferTime=r8.bufferTime;var i8=rc();_.bufferToggle=i8.bufferToggle;var n8=ic();_.bufferWhen=n8.bufferWhen;var s8=nc();_.catchError=s8.catchError;var o8=sc();_.combineAll=o8.combineAll;var a8=ni();_.combineLatest=a8.combineLatest;var u8=ac();_.concat=u8.concat;var c8=Jn();_.concatAll=c8.concatAll;var l8=As();_.concatMap=l8.concatMap;var f8=cc();_.concatMapTo=f8.concatMapTo;var h8=lc();_.count=h8.count;var p8=hc();_.debounce=p8.debounce;var d8=pc();_.debounceTime=d8.debounceTime;var v8=Ns();_.defaultIfEmpty=v8.defaultIfEmpty;var b8=dc();_.delay=b8.delay;var m8=bc();_.delayWhen=m8.delayWhen;var y8=fc();_.dematerialize=y8.dematerialize;var _8=yc();_.distinct=_8.distinct;var g8=Ls();_.distinctUntilChanged=g8.distinctUntilChanged;var w8=_c();_.distinctUntilKeyChanged=w8.distinctUntilKeyChanged;var S8=xc();_.elementAt=S8.elementAt;var O8=Nc();_.every=O8.every;var x8=wc();_.exhaust=x8.exhaust;var q8=Sc();_.exhaustMap=q8.exhaustMap;var T8=Oc();_.expand=T8.expand;var C8=Hs();_.filter=C8.filter;var I8=qc();_.finalize=I8.finalize;var A8=Ys();_.find=A8.find;var E8=Tc();_.findIndex=E8.findIndex;var j8=Cc();_.first=j8.first;var k8=Ac();_.groupBy=k8.groupBy;var R8=jc();_.ignoreElements=R8.ignoreElements;var P8=kc();_.isEmpty=P8.isEmpty;var N8=Pc();_.last=N8.last;var F8=hr();_.map=F8.map;var M8=Fc();_.mapTo=M8.mapTo;var U8=Uc();_.materialize=U8.materialize;var Z8=Zc();_.max=Z8.max;var L8=Dc();_.merge=L8.merge;var D8=oi();_.mergeAll=D8.mergeAll;var V8=or();_.mergeMap=V8.mergeMap;var z8=or();_.flatMap=z8.mergeMap;var W8=zc();_.mergeMapTo=W8.mergeMapTo;var B8=Wc();_.mergeScan=B8.mergeScan;var $8=Bc();_.min=$8.min;var H8=Ke();_.multicast=H8.multicast;var J8=si();_.observeOn=J8.observeOn;var Y8=as();_.onErrorResumeNext=Y8.onErrorResumeNext;var K8=Yc();_.pairwise=K8.pairwise;var G8=Kc();_.partition=G8.partition;var X8=Gc();_.pluck=X8.pluck;var Q8=Xc();_.publish=Q8.publish;var e$=el();_.publishBehavior=e$.publishBehavior;var t$=rl();_.publishLast=t$.publishLast;var r$=tl();_.publishReplay=r$.publishReplay;var i$=il();_.race=i$.race;var n$=mr();_.reduce=n$.reduce;var s$=sl();_.repeat=s$.repeat;var o$=ol();_.repeatWhen=o$.repeatWhen;var a$=al();_.retry=a$.retry;var u$=ul();_.retryWhen=u$.retryWhen;var c$=ho();_.refCount=c$.refCount;var l$=cl();_.sample=l$.sample;var f$=ll();_.sampleTime=f$.sampleTime;var h$=uo();_.scan=h$.scan;var p$=fl();_.sequenceEqual=p$.sequenceEqual;var d$=hl();_.share=d$.share;var v$=pl();_.shareReplay=v$.shareReplay;var b$=dl();_.single=b$.single;var m$=vl();_.skip=m$.skip;var y$=bl();_.skipLast=y$.skipLast;var _$=ml();_.skipUntil=_$.skipUntil;var g$=yl();_.skipWhile=g$.skipWhile;var w$=gl();_.startWith=w$.startWith;var S$=xl();_.switchAll=S$.switchAll;var O$=jo();_.switchMap=O$.switchMap;var x$=ql();_.switchMapTo=x$.switchMapTo;var q$=Tl();_.take=q$.take;var T$=lo();_.takeLast=T$.takeLast;var C$=Cl();_.takeUntil=C$.takeUntil;var I$=Il();_.takeWhile=I$.takeWhile;var A$=gc();_.tap=A$.tap;var E$=_i();_.throttle=E$.throttle;var j$=Al();_.throttleTime=j$.throttleTime;var k$=El();_.timeInterval=k$.timeInterval;var R$=Pl();_.timeout=R$.timeout;var P$=Nl();_.timeoutWith=P$.timeoutWith;var N$=Lo();_.timestamp=N$.timestamp;var F$=Ml();_.toArray=F$.toArray;var M$=Ul();_.window=M$.window;var U$=Zl();_.windowCount=U$.windowCount;var Z$=Dl();_.windowTime=Z$.windowTime;var L$=zl();_.windowToggle=L$.windowToggle;var D$=Wl();_.windowWhen=D$.windowWhen;var V$=Bl();_.withLatestFrom=V$.withLatestFrom;var z$=li();_.zip=z$.zip;var W$=$l();_.zipAll=W$.zipAll});var i0=u(L=>{"use strict";var r0=K();L.Subject=r0.Subject;L.AnonymousSubject=r0.AnonymousSubject;var B$=v();L.Observable=B$.Observable;nd();ld();qd();Wd();Yd();Xd();nv();sv();fv();vv();yv();Ov();Iv();Uv();Lv();zv();Hv();Jv();Qv();ib();ab();hb();bb();wb();Ib();Vb();tm();nm();cm();dm();ym();Sm();Cm();jm();Pm();Fm();Zm();zm();Hm();Km();Qm();ry();sy();uy();hy();by();Sy();Ty();Ey();Fy();Zy();Vy();Jy();Xy();t_();o_();f_();v_();y_();A_();k_();N_();Z_();z_();$_();G_();eg();ig();og();cg();mg();_g();Sg();Cg();Pg();Lg();Wg();Kg();Qg();rw();sw();hw();bw();Sw();Tw();Ew();Pw();Mw();Dw();Bw();Jw();Gw();tS();nS();aS();fS();_S();OS();CS();ES();RS();MS();LS();zS();HS();s1();f1();d1();m1();g1();O1();T1();A1();R1();F1();Z1();V1();B1();Y1();Q1();eO();nO();uO();vO();gO();xO();CO();EO();PO();var $$=J();L.Subscription=$$.Subscription;var H$=C();L.Subscriber=H$.Subscriber;var J$=ri();L.AsyncSubject=J$.AsyncSubject;var Y$=pi();L.ReplaySubject=Y$.ReplaySubject;var K$=Qc();L.BehaviorSubject=K$.BehaviorSubject;var G$=Hc();L.ConnectableObservable=G$.ConnectableObservable;var X$=nr();L.Notification=X$.Notification;var Q$=vi();L.EmptyError=Q$.EmptyError;var eH=vr();L.ArgumentOutOfRangeError=eH.ArgumentOutOfRangeError;var tH=ei();L.ObjectUnsubscribedError=tH.ObjectUnsubscribedError;var rH=Rl();L.TimeoutError=rH.TimeoutError;var iH=qu();L.UnsubscriptionError=iH.UnsubscriptionError;var nH=kl();L.TimeInterval=nH.TimeInterval;var sH=Lo();L.Timestamp=sH.Timestamp;var oH=HO();L.TestScheduler=oH.TestScheduler;var aH=Kl();L.VirtualTimeScheduler=aH.VirtualTimeScheduler;var Ql=Ku();L.AjaxResponse=Ql.AjaxResponse;L.AjaxError=Ql.AjaxError;L.AjaxTimeoutError=Ql.AjaxTimeoutError;var uH=An();L.pipe=uH.pipe;var cH=Sl(),lH=W(),fH=Gu(),hH=e0(),pH=Gr(),dH=rr(),vH=Qr(),bH=t0();L.operators=bH;var mH={asap:cH.asap,queue:fH.queue,animationFrame:hH.animationFrame,async:lH.async};L.Scheduler=mH;var yH={rxSubscriber:pH.rxSubscriber,observable:vH.observable,iterator:dH.iterator};L.Symbol=yH});var Sr=(t=>(t[t.Published=0]="Published",t[t.Prebuilt=1]="Prebuilt",t))(Sr||{});var Or=(q=>(q[q.Unknown=-1]="Unknown",q[q.Exp=0]="Exp",q[q.Dev=1]="Dev",q[q.Test=2]="Test",q[q.Preprod=3]="Preprod",q[q.FirstRelease=4]="FirstRelease",q[q.Prod=5]="Prod",q[q.Gov=6]="Gov",q[q.High=7]="High",q[q.DoD=8]="DoD",q[q.Mooncake=9]="Mooncake",q[q.Ex=10]="Ex",q[q.Rx=11]="Rx",q[q.Prv=12]="Prv",q[q.Local=13]="Local",q[q.GovFR=14]="GovFR",q[q.Other=100]="Other",q))(Or||{});var ef=class{constructor(){this.appClientId="";this.tenantId="";this.environmentId="";this.useExperimentalEndpoint=!1}},xH=()=>{var t,i,n,s;let r=process.env.cloud,e=process.env.copilotAgentType;return{appClientId:(t=process.env.appClientId)!=null?t:"",tenantId:(i=process.env.tenantId)!=null?i:"",environmentId:(n=process.env.environmentId)!=null?n:"",cloud:r?Or[r]:5,customPowerPlatformCloud:process.env.customPowerPlatformCloud,agentIdentifier:process.env.agentIdentifier,copilotAgentType:e?Sr[e]:0,directConnectUrl:process.env.directConnectUrl,useExperimentalEndpoint:((s=process.env.useExperimentalEndpoint)==null?void 0:s.toLocaleLowerCase())==="true"}};function xr(r,e){return function(){return r.apply(e,arguments)}}var{toString:h0}=Object.prototype,{getPrototypeOf:ta}=Object,{iterator:qi,toStringTag:rf}=Symbol,Ti=(r=>e=>{let t=h0.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),ge=r=>(r=r.toLowerCase(),e=>Ti(e)===r),Ci=r=>e=>typeof e===r,{isArray:xt}=Array,qr=Ci("undefined");function p0(r){return r!==null&&!qr(r)&&r.constructor!==null&&!qr(r.constructor)&&ae(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}var nf=ge("ArrayBuffer");function d0(r){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&nf(r.buffer),e}var v0=Ci("string"),ae=Ci("function"),sf=Ci("number"),Ii=r=>r!==null&&typeof r=="object",b0=r=>r===!0||r===!1,xi=r=>{if(Ti(r)!=="object")return!1;let e=ta(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(rf in r)&&!(qi in r)},m0=ge("Date"),y0=ge("File"),_0=ge("Blob"),g0=ge("FileList"),w0=r=>Ii(r)&&ae(r.pipe),S0=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||ae(r.append)&&((e=Ti(r))==="formdata"||e==="object"&&ae(r.toString)&&r.toString()==="[object FormData]"))},O0=ge("URLSearchParams"),[x0,q0,T0,C0]=["ReadableStream","Request","Response","Headers"].map(ge),I0=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Tr(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r=="undefined")return;let i,n;if(typeof r!="object"&&(r=[r]),xt(r))for(i=0,n=r.length;i<n;i++)e.call(null,r[i],i,r);else{let s=t?Object.getOwnPropertyNames(r):Object.keys(r),o=s.length,a;for(i=0;i<o;i++)a=s[i],e.call(null,r[a],a,r)}}function of(r,e){e=e.toLowerCase();let t=Object.keys(r),i=t.length,n;for(;i-- >0;)if(n=t[i],e===n.toLowerCase())return n;return null}var Xe=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,af=r=>!qr(r)&&r!==Xe;function ea(){let{caseless:r}=af(this)&&this||{},e={},t=(i,n)=>{let s=r&&of(e,n)||n;xi(e[s])&&xi(i)?e[s]=ea(e[s],i):xi(i)?e[s]=ea({},i):xt(i)?e[s]=i.slice():e[s]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&Tr(arguments[i],t);return e}var A0=(r,e,t,{allOwnKeys:i}={})=>(Tr(e,(n,s)=>{t&&ae(n)?r[s]=xr(n,t):r[s]=n},{allOwnKeys:i}),r),E0=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),j0=(r,e,t,i)=>{r.prototype=Object.create(e.prototype,i),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},k0=(r,e,t,i)=>{let n,s,o,a={};if(e=e||{},r==null)return e;do{for(n=Object.getOwnPropertyNames(r),s=n.length;s-- >0;)o=n[s],(!i||i(o,r,e))&&!a[o]&&(e[o]=r[o],a[o]=!0);r=t!==!1&&ta(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},R0=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;let i=r.indexOf(e,t);return i!==-1&&i===t},P0=r=>{if(!r)return null;if(xt(r))return r;let e=r.length;if(!sf(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},N0=(r=>e=>r&&e instanceof r)(typeof Uint8Array!="undefined"&&ta(Uint8Array)),F0=(r,e)=>{let i=(r&&r[qi]).call(r),n;for(;(n=i.next())&&!n.done;){let s=n.value;e.call(r,s[0],s[1])}},M0=(r,e)=>{let t,i=[];for(;(t=r.exec(e))!==null;)i.push(t);return i},U0=ge("HTMLFormElement"),Z0=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,i,n){return i.toUpperCase()+n}),tf=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),L0=ge("RegExp"),uf=(r,e)=>{let t=Object.getOwnPropertyDescriptors(r),i={};Tr(t,(n,s)=>{let o;(o=e(n,s,r))!==!1&&(i[s]=o||n)}),Object.defineProperties(r,i)},D0=r=>{uf(r,(e,t)=>{if(ae(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let i=r[t];if(ae(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},V0=(r,e)=>{let t={},i=n=>{n.forEach(s=>{t[s]=!0})};return xt(r)?i(r):i(String(r).split(e)),t},z0=()=>{},W0=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e;function B0(r){return!!(r&&ae(r.append)&&r[rf]==="FormData"&&r[qi])}var $0=r=>{let e=new Array(10),t=(i,n)=>{if(Ii(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[n]=i;let s=xt(i)?[]:{};return Tr(i,(o,a)=>{let c=t(o,n+1);!qr(c)&&(s[a]=c)}),e[n]=void 0,s}}return i};return t(r,0)},H0=ge("AsyncFunction"),J0=r=>r&&(Ii(r)||ae(r))&&ae(r.then)&&ae(r.catch),cf=((r,e)=>r?setImmediate:e?((t,i)=>(Xe.addEventListener("message",({source:n,data:s})=>{n===Xe&&s===t&&i.length&&i.shift()()},!1),n=>{i.push(n),Xe.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",ae(Xe.postMessage)),Y0=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Xe):typeof process!="undefined"&&process.nextTick||cf,K0=r=>r!=null&&ae(r[qi]),b={isArray:xt,isArrayBuffer:nf,isBuffer:p0,isFormData:S0,isArrayBufferView:d0,isString:v0,isNumber:sf,isBoolean:b0,isObject:Ii,isPlainObject:xi,isReadableStream:x0,isRequest:q0,isResponse:T0,isHeaders:C0,isUndefined:qr,isDate:m0,isFile:y0,isBlob:_0,isRegExp:L0,isFunction:ae,isStream:w0,isURLSearchParams:O0,isTypedArray:N0,isFileList:g0,forEach:Tr,merge:ea,extend:A0,trim:I0,stripBOM:E0,inherits:j0,toFlatObject:k0,kindOf:Ti,kindOfTest:ge,endsWith:R0,toArray:P0,forEachEntry:F0,matchAll:M0,isHTMLForm:U0,hasOwnProperty:tf,hasOwnProp:tf,reduceDescriptors:uf,freezeMethods:D0,toObjectSet:V0,toCamelCase:Z0,noop:z0,toFiniteNumber:W0,findKey:of,global:Xe,isContextDefined:af,isSpecCompliantForm:B0,toJSONObject:$0,isAsyncFn:H0,isThenable:J0,setImmediate:cf,asap:Y0,isIterable:K0};function qt(r,e,t,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),i&&(this.request=i),n&&(this.response=n,this.status=n.status?n.status:null)}b.inherits(qt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:b.toJSONObject(this.config),code:this.code,status:this.status}}});var lf=qt.prototype,ff={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{ff[r]={value:r}});Object.defineProperties(qt,ff);Object.defineProperty(lf,"isAxiosError",{value:!0});qt.from=(r,e,t,i,n,s)=>{let o=Object.create(lf);return b.toFlatObject(r,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),qt.call(o,r.message,e,t,i,n),o.cause=r,o.name=r.name,s&&Object.assign(o,s),o};var E=qt;var Ai=null;function ra(r){return b.isPlainObject(r)||b.isArray(r)}function pf(r){return b.endsWith(r,"[]")?r.slice(0,-2):r}function hf(r,e,t){return r?r.concat(e).map(function(n,s){return n=pf(n),!t&&s?"["+n+"]":n}).join(t?".":""):e}function G0(r){return b.isArray(r)&&!r.some(ra)}var X0=b.toFlatObject(b,{},null,function(e){return/^is[A-Z]/.test(e)});function Q0(r,e,t){if(!b.isObject(r))throw new TypeError("target must be an object");e=e||new(Ai||FormData),t=b.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(O,S){return!b.isUndefined(S[O])});let i=t.metaTokens,n=t.visitor||f,s=t.dots,o=t.indexes,c=(t.Blob||typeof Blob!="undefined"&&Blob)&&b.isSpecCompliantForm(e);if(!b.isFunction(n))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(b.isDate(m))return m.toISOString();if(b.isBoolean(m))return m.toString();if(!c&&b.isBlob(m))throw new E("Blob is not supported. Use a Buffer instead.");return b.isArrayBuffer(m)||b.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function f(m,O,S){let q=m;if(m&&!S&&typeof m=="object"){if(b.endsWith(O,"{}"))O=i?O:O.slice(0,-2),m=JSON.stringify(m);else if(b.isArray(m)&&G0(m)||(b.isFileList(m)||b.endsWith(O,"[]"))&&(q=b.toArray(m)))return O=pf(O),q.forEach(function(U,D){!(b.isUndefined(U)||U===null)&&e.append(o===!0?hf([O],D,s):o===null?O:O+"[]",l(U))}),!1}return ra(m)?!0:(e.append(hf(S,O,s),l(m)),!1)}let p=[],y=Object.assign(X0,{defaultVisitor:f,convertValue:l,isVisitable:ra});function g(m,O){if(!b.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+O.join("."));p.push(m),b.forEach(m,function(q,F){(!(b.isUndefined(q)||q===null)&&n.call(e,q,b.isString(F)?F.trim():F,O,y))===!0&&g(q,O?O.concat(F):[F])}),p.pop()}}if(!b.isObject(r))throw new TypeError("data must be an object");return g(r),e}var Ze=Q0;function df(r){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function vf(r,e){this._pairs=[],r&&Ze(r,this,e)}var bf=vf.prototype;bf.append=function(e,t){this._pairs.push([e,t])};bf.toString=function(e){let t=e?function(i){return e.call(this,i,df)}:df;return this._pairs.map(function(n){return t(n[0])+"="+t(n[1])},"").join("&")};var Ei=vf;function ex(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Cr(r,e,t){if(!e)return r;let i=t&&t.encode||ex;b.isFunction(t)&&(t={serialize:t});let n=t&&t.serialize,s;if(n?s=n(e,t):s=b.isURLSearchParams(e)?e.toString():new Ei(e,t).toString(i),s){let o=r.indexOf("#");o!==-1&&(r=r.slice(0,o)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}var ia=class{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){b.forEach(this.handlers,function(i){i!==null&&e(i)})}},na=ia;var ji={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var mf=typeof URLSearchParams!="undefined"?URLSearchParams:Ei;var yf=typeof FormData!="undefined"?FormData:null;var _f=typeof Blob!="undefined"?Blob:null;var gf={isBrowser:!0,classes:{URLSearchParams:mf,FormData:yf,Blob:_f},protocols:["http","https","file","blob","url","data"]};var aa={};l0(aa,{hasBrowserEnv:()=>oa,hasStandardBrowserEnv:()=>tx,hasStandardBrowserWebWorkerEnv:()=>rx,navigator:()=>sa,origin:()=>ix});var oa=typeof window!="undefined"&&typeof document!="undefined",sa=typeof navigator=="object"&&navigator||void 0,tx=oa&&(!sa||["ReactNative","NativeScript","NS"].indexOf(sa.product)<0),rx=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ix=oa&&window.location.href||"http://localhost";var B={...aa,...gf};function ua(r,e){return Ze(r,new B.classes.URLSearchParams,Object.assign({visitor:function(t,i,n,s){return B.isNode&&b.isBuffer(t)?(this.append(i,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function nx(r){return b.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function sx(r){let e={},t=Object.keys(r),i,n=t.length,s;for(i=0;i<n;i++)s=t[i],e[s]=r[s];return e}function ox(r){function e(t,i,n,s){let o=t[s++];if(o==="__proto__")return!0;let a=Number.isFinite(+o),c=s>=t.length;return o=!o&&b.isArray(n)?n.length:o,c?(b.hasOwnProp(n,o)?n[o]=[n[o],i]:n[o]=i,!a):((!n[o]||!b.isObject(n[o]))&&(n[o]=[]),e(t,i,n[o],s)&&b.isArray(n[o])&&(n[o]=sx(n[o])),!a)}if(b.isFormData(r)&&b.isFunction(r.entries)){let t={};return b.forEachEntry(r,(i,n)=>{e(nx(i),n,t,0)}),t}return null}var ki=ox;function ax(r,e,t){if(b.isString(r))try{return(e||JSON.parse)(r),b.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(t||JSON.stringify)(r)}var ca={transitional:ji,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let i=t.getContentType()||"",n=i.indexOf("application/json")>-1,s=b.isObject(e);if(s&&b.isHTMLForm(e)&&(e=new FormData(e)),b.isFormData(e))return n?JSON.stringify(ki(e)):e;if(b.isArrayBuffer(e)||b.isBuffer(e)||b.isStream(e)||b.isFile(e)||b.isBlob(e)||b.isReadableStream(e))return e;if(b.isArrayBufferView(e))return e.buffer;if(b.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return ua(e,this.formSerializer).toString();if((a=b.isFileList(e))||i.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return Ze(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return s||n?(t.setContentType("application/json",!1),ax(e)):e}],transformResponse:[function(e){let t=this.transitional||ca.transitional,i=t&&t.forcedJSONParsing,n=this.responseType==="json";if(b.isResponse(e)||b.isReadableStream(e))return e;if(e&&b.isString(e)&&(i&&!this.responseType||n)){let o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?E.from(a,E.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:B.classes.FormData,Blob:B.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};b.forEach(["delete","get","head","post","put","patch"],r=>{ca.headers[r]={}});var Tt=ca;var ux=b.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),wf=r=>{let e={},t,i,n;return r&&r.split(`
|
|
4
|
-
|
|
5
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let i=new this(e);return t.forEach(n=>i.set(n)),i}static accessor(e){let i=(this[Sf]=this[Sf]={accessors:{}}).accessors,n=this.prototype;function s(o){let a=Ir(o);i[a]||(hx(n,o),i[a]=!0)}return b.isArray(e)?e.forEach(s):s(e),this}};Ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);b.reduceDescriptors(Ct.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(i){this[t]=i}}});b.freezeMethods(Ct);var H=Ct;function Ar(r,e){let t=this||Tt,i=e||t,n=H.from(i.headers),s=i.data;return b.forEach(r,function(a){s=a.call(t,s,n.normalize(),e?e.status:void 0)}),n.normalize(),s}function Er(r){return!!(r&&r.__CANCEL__)}function Of(r,e,t){E.call(this,r==null?"canceled":r,E.ERR_CANCELED,e,t),this.name="CanceledError"}b.inherits(Of,E,{__CANCEL__:!0});var xe=Of;function jr(r,e,t){let i=t.config.validateStatus;!t.status||!i||i(t.status)?r(t):e(new E("Request failed with status code "+t.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function fa(r){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function px(r,e){r=r||10;let t=new Array(r),i=new Array(r),n=0,s=0,o;return e=e!==void 0?e:1e3,function(c){let l=Date.now(),f=i[s];o||(o=l),t[n]=c,i[n]=l;let p=s,y=0;for(;p!==n;)y+=t[p++],p=p%r;if(n=(n+1)%r,n===s&&(s=(s+1)%r),l-o<e)return;let g=f&&l-f;return g?Math.round(y*1e3/g):void 0}}var xf=px;function dx(r,e){let t=0,i=1e3/e,n,s,o=(l,f=Date.now())=>{t=f,n=null,s&&(clearTimeout(s),s=null),r.apply(null,l)};return[(...l)=>{let f=Date.now(),p=f-t;p>=i?o(l,f):(n=l,s||(s=setTimeout(()=>{s=null,o(n)},i-p)))},()=>n&&o(n)]}var qf=dx;var It=(r,e,t=3)=>{let i=0,n=xf(50,250);return qf(s=>{let o=s.loaded,a=s.lengthComputable?s.total:void 0,c=o-i,l=n(c),f=o<=a;i=o;let p={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&f?(a-o)/l:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};r(p)},t)},ha=(r,e)=>{let t=r!=null;return[i=>e[0]({lengthComputable:t,total:r,loaded:i}),e[1]]},pa=r=>(...e)=>b.asap(()=>r(...e));var Tf=B.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,B.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(B.origin),B.navigator&&/(msie|trident)/i.test(B.navigator.userAgent)):()=>!0;var Cf=B.hasStandardBrowserEnv?{write(r,e,t,i,n,s){let o=[r+"="+encodeURIComponent(e)];b.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),b.isString(i)&&o.push("path="+i),b.isString(n)&&o.push("domain="+n),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(r){let e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function da(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function va(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function kr(r,e,t){let i=!da(e);return r&&(i||t==!1)?va(r,e):e}var If=r=>r instanceof H?{...r}:r;function we(r,e){e=e||{};let t={};function i(l,f,p,y){return b.isPlainObject(l)&&b.isPlainObject(f)?b.merge.call({caseless:y},l,f):b.isPlainObject(f)?b.merge({},f):b.isArray(f)?f.slice():f}function n(l,f,p,y){if(b.isUndefined(f)){if(!b.isUndefined(l))return i(void 0,l,p,y)}else return i(l,f,p,y)}function s(l,f){if(!b.isUndefined(f))return i(void 0,f)}function o(l,f){if(b.isUndefined(f)){if(!b.isUndefined(l))return i(void 0,l)}else return i(void 0,f)}function a(l,f,p){if(p in e)return i(l,f);if(p in r)return i(void 0,l)}let c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,f,p)=>n(If(l),If(f),p,!0)};return b.forEach(Object.keys(Object.assign({},r,e)),function(f){let p=c[f]||n,y=p(r[f],e[f],f);b.isUndefined(y)&&p!==a||(t[f]=y)}),t}var Pi=r=>{let e=we({},r),{data:t,withXSRFToken:i,xsrfHeaderName:n,xsrfCookieName:s,headers:o,auth:a}=e;e.headers=o=H.from(o),e.url=Cr(kr(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(b.isFormData(t)){if(B.hasStandardBrowserEnv||B.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){let[l,...f]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...f].join("; "))}}if(B.hasStandardBrowserEnv&&(i&&b.isFunction(i)&&(i=i(e)),i||i!==!1&&Tf(e.url))){let l=n&&s&&Cf.read(s);l&&o.set(n,l)}return e};var vx=typeof XMLHttpRequest!="undefined",Af=vx&&function(r){return new Promise(function(t,i){let n=Pi(r),s=n.data,o=H.from(n.headers).normalize(),{responseType:a,onUploadProgress:c,onDownloadProgress:l}=n,f,p,y,g,m;function O(){g&&g(),m&&m(),n.cancelToken&&n.cancelToken.unsubscribe(f),n.signal&&n.signal.removeEventListener("abort",f)}let S=new XMLHttpRequest;S.open(n.method.toUpperCase(),n.url,!0),S.timeout=n.timeout;function q(){if(!S)return;let U=H.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),oe={data:!a||a==="text"||a==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:U,config:r,request:S};jr(function(Ee){t(Ee),O()},function(Ee){i(Ee),O()},oe),S=null}"onloadend"in S?S.onloadend=q:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(q)},S.onabort=function(){S&&(i(new E("Request aborted",E.ECONNABORTED,r,S)),S=null)},S.onerror=function(){i(new E("Network Error",E.ERR_NETWORK,r,S)),S=null},S.ontimeout=function(){let D=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",oe=n.transitional||ji;n.timeoutErrorMessage&&(D=n.timeoutErrorMessage),i(new E(D,oe.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,r,S)),S=null},s===void 0&&o.setContentType(null),"setRequestHeader"in S&&b.forEach(o.toJSON(),function(D,oe){S.setRequestHeader(oe,D)}),b.isUndefined(n.withCredentials)||(S.withCredentials=!!n.withCredentials),a&&a!=="json"&&(S.responseType=n.responseType),l&&([y,m]=It(l,!0),S.addEventListener("progress",y)),c&&S.upload&&([p,g]=It(c),S.upload.addEventListener("progress",p),S.upload.addEventListener("loadend",g)),(n.cancelToken||n.signal)&&(f=U=>{S&&(i(!U||U.type?new xe(null,r,S):U),S.abort(),S=null)},n.cancelToken&&n.cancelToken.subscribe(f),n.signal&&(n.signal.aborted?f():n.signal.addEventListener("abort",f)));let F=fa(n.url);if(F&&B.protocols.indexOf(F)===-1){i(new E("Unsupported protocol "+F+":",E.ERR_BAD_REQUEST,r));return}S.send(s||null)})};var bx=(r,e)=>{let{length:t}=r=r?r.filter(Boolean):[];if(e||t){let i=new AbortController,n,s=function(l){if(!n){n=!0,a();let f=l instanceof Error?l:this.reason;i.abort(f instanceof E?f:new xe(f instanceof Error?f.message:f))}},o=e&&setTimeout(()=>{o=null,s(new E(`timeout ${e} of ms exceeded`,E.ETIMEDOUT))},e),a=()=>{r&&(o&&clearTimeout(o),o=null,r.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),r=null)};r.forEach(l=>l.addEventListener("abort",s));let{signal:c}=i;return c.unsubscribe=()=>b.asap(a),c}},Ef=bx;var mx=function*(r,e){let t=r.byteLength;if(!e||t<e){yield r;return}let i=0,n;for(;i<t;)n=i+e,yield r.slice(i,n),i=n},yx=async function*(r,e){for await(let t of _x(r))yield*mx(t,e)},_x=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}let e=r.getReader();try{for(;;){let{done:t,value:i}=await e.read();if(t)break;yield i}}finally{await e.cancel()}},ba=(r,e,t,i)=>{let n=yx(r,e),s=0,o,a=c=>{o||(o=!0,i&&i(c))};return new ReadableStream({async pull(c){try{let{done:l,value:f}=await n.next();if(l){a(),c.close();return}let p=f.byteLength;if(t){let y=s+=p;t(y)}c.enqueue(new Uint8Array(f))}catch(l){throw a(l),l}},cancel(c){return a(c),n.return()}},{highWaterMark:2})};var Fi=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",kf=Fi&&typeof ReadableStream=="function",gx=Fi&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),Rf=(r,...e)=>{try{return!!r(...e)}catch{return!1}},wx=kf&&Rf(()=>{let r=!1,e=new Request(B.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),jf=64*1024,ma=kf&&Rf(()=>b.isReadableStream(new Response("").body)),Ni={stream:ma&&(r=>r.body)};Fi&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ni[e]&&(Ni[e]=b.isFunction(r[e])?t=>t[e]():(t,i)=>{throw new E(`Response type '${e}' is not supported`,E.ERR_NOT_SUPPORT,i)})})})(new Response);var Sx=async r=>{if(r==null)return 0;if(b.isBlob(r))return r.size;if(b.isSpecCompliantForm(r))return(await new Request(B.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(b.isArrayBufferView(r)||b.isArrayBuffer(r))return r.byteLength;if(b.isURLSearchParams(r)&&(r=r+""),b.isString(r))return(await gx(r)).byteLength},Ox=async(r,e)=>{let t=b.toFiniteNumber(r.getContentLength());return t==null?Sx(e):t},Pf=Fi&&(async r=>{let{url:e,method:t,data:i,signal:n,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:f,withCredentials:p="same-origin",fetchOptions:y}=Pi(r);l=l?(l+"").toLowerCase():"text";let g=Ef([n,s&&s.toAbortSignal()],o),m,O=g&&g.unsubscribe&&(()=>{g.unsubscribe()}),S;try{if(c&&wx&&t!=="get"&&t!=="head"&&(S=await Ox(f,i))!==0){let oe=new Request(e,{method:"POST",body:i,duplex:"half"}),de;if(b.isFormData(i)&&(de=oe.headers.get("content-type"))&&f.setContentType(de),oe.body){let[Ee,Ge]=ha(S,It(pa(c)));i=ba(oe.body,jf,Ee,Ge)}}b.isString(p)||(p=p?"include":"omit");let q="credentials"in Request.prototype;m=new Request(e,{...y,signal:g,method:t.toUpperCase(),headers:f.normalize().toJSON(),body:i,duplex:"half",credentials:q?p:void 0});let F=await fetch(m,y),U=ma&&(l==="stream"||l==="response");if(ma&&(a||U&&O)){let oe={};["status","statusText","headers"].forEach(Oi=>{oe[Oi]=F[Oi]});let de=b.toFiniteNumber(F.headers.get("content-length")),[Ee,Ge]=a&&ha(de,It(pa(a),!0))||[];F=new Response(ba(F.body,jf,Ee,()=>{Ge&&Ge(),O&&O()}),oe)}l=l||"text";let D=await Ni[b.findKey(Ni,l)||"text"](F,r);return!U&&O&&O(),await new Promise((oe,de)=>{jr(oe,de,{data:D,headers:H.from(F.headers),status:F.status,statusText:F.statusText,config:r,request:m})})}catch(q){throw O&&O(),q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,r,m),{cause:q.cause||q}):E.from(q,q&&q.code,r,m)}});var ya={http:Ai,xhr:Af,fetch:Pf};b.forEach(ya,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});var Nf=r=>`- ${r}`,xx=r=>b.isFunction(r)||r===null||r===!1,Mi={getAdapter:r=>{r=b.isArray(r)?r:[r];let{length:e}=r,t,i,n={};for(let s=0;s<e;s++){t=r[s];let o;if(i=t,!xx(t)&&(i=ya[(o=String(t)).toLowerCase()],i===void 0))throw new E(`Unknown adapter '${o}'`);if(i)break;n[o||"#"+s]=i}if(!i){let s=Object.entries(n).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build")),o=e?s.length>1?`since :
|
|
6
|
-
`+s.map(Nf).join(`
|
|
7
|
-
`)
|
|
8
|
-
`+s):i.stack=s}catch{}}throw i}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=we(this.defaults,t);let{transitional:i,paramsSerializer:n,headers:s}=t;i!==void 0&&Rr.assertOptions(i,{silentJSONParsing:qe.transitional(qe.boolean),forcedJSONParsing:qe.transitional(qe.boolean),clarifyTimeoutError:qe.transitional(qe.boolean)},!1),n!=null&&(b.isFunction(n)?t.paramsSerializer={serialize:n}:Rr.assertOptions(n,{encode:qe.function,serialize:qe.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Rr.assertOptions(t,{baseUrl:qe.spelling("baseURL"),withXsrfToken:qe.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&b.merge(s.common,s[t.method]);s&&b.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),t.headers=H.concat(o,s);let a=[],c=!0;this.interceptors.request.forEach(function(O){typeof O.runWhen=="function"&&O.runWhen(t)===!1||(c=c&&O.synchronous,a.unshift(O.fulfilled,O.rejected))});let l=[];this.interceptors.response.forEach(function(O){l.push(O.fulfilled,O.rejected)});let f,p=0,y;if(!c){let m=[Ui.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,l),y=m.length,f=Promise.resolve(t);p<y;)f=f.then(m[p++],m[p++]);return f}y=a.length;let g=t;for(p=0;p<y;){let m=a[p++],O=a[p++];try{g=m(g)}catch(S){O.call(this,S);break}}try{f=Ui.call(this,g)}catch(m){return Promise.reject(m)}for(p=0,y=l.length;p<y;)f=f.then(l[p++],l[p++]);return f}getUri(e){e=we(this.defaults,e);let t=kr(e.baseURL,e.url,e.allowAbsoluteUrls);return Cr(t,e.params,e.paramsSerializer)}};b.forEach(["delete","get","head","options"],function(e){At.prototype[e]=function(t,i){return this.request(we(i||{},{method:e,url:t,data:(i||{}).data}))}});b.forEach(["post","put","patch"],function(e){function t(i){return function(s,o,a){return this.request(we(a||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}At.prototype[e]=t(),At.prototype[e+"Form"]=t(!0)});var Pr=At;var ga=class r{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(s){t=s});let i=this;this.promise.then(n=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](n);i._listeners=null}),this.promise.then=n=>{let s,o=new Promise(a=>{i.subscribe(a),s=a}).then(n);return o.cancel=function(){i.unsubscribe(s)},o},e(function(s,o,a){i.reason||(i.reason=new xe(s,o,a),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=i=>{e.abort(i)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new r(function(n){e=n}),cancel:e}}},Mf=ga;function wa(r){return function(t){return r.apply(null,t)}}function Sa(r){return b.isObject(r)&&r.isAxiosError===!0}var Oa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Oa).forEach(([r,e])=>{Oa[e]=r});var Uf=Oa;function Zf(r){let e=new Pr(r),t=xr(Pr.prototype.request,e);return b.extend(t,Pr.prototype,e,{allOwnKeys:!0}),b.extend(t,e,null,{allOwnKeys:!0}),t.create=function(n){return Zf(we(r,n))},t}var $=Zf(Tt);$.Axios=Pr;$.CanceledError=xe;$.CancelToken=Mf;$.isCancel=Er;$.VERSION=Zi;$.toFormData=Ze;$.AxiosError=E;$.Cancel=$.CanceledError;$.all=function(e){return Promise.all(e)};$.spread=wa;$.isAxiosError=Sa;$.mergeConfig=we;$.AxiosHeaders=H;$.formToJSON=r=>ki(b.isHTMLForm(r)?new FormData(r):r);$.getAdapter=Mi.getAdapter;$.HttpStatusCode=Uf;$.default=$;var Di=$;var{Axios:CY,AxiosError:IY,CanceledError:AY,isCancel:EY,CancelToken:jY,VERSION:kY,all:RY,Cancel:PY,isAxiosError:NY,spread:FY,toFormData:MY,AxiosHeaders:UY,HttpStatusCode:ZY,formToJSON:LY,getAdapter:DY,mergeConfig:VY}=Di;var Vi=class{constructor(e){this.API_VERSION="2022-03-01-preview";let{identifier:t,host:i}=e;this.baseURL=new URL(`/copilotstudio/prebuilt/authenticated/bots/${t}`,i),this.baseURL.searchParams.append("api-version",this.API_VERSION)}getConversationUrl(e){let t=new URL(this.baseURL.href);return t.pathname=`${t.pathname}/conversations`,e&&(t.pathname=`${t.pathname}/${e}`),t.href}};var zi=class{constructor(e){this.API_VERSION="2022-03-01-preview";let{schema:t,host:i}=e;this.baseURL=new URL(`/copilotstudio/dataverse-backed/authenticated/bots/${t}`,i),this.baseURL.searchParams.append("api-version",this.API_VERSION)}getConversationUrl(e){let t=new URL(this.baseURL.href);return t.pathname=`${t.pathname}/conversations`,e&&(t.pathname=`${t.pathname}/${e}`),t.href}};function Bi(r,e){var l,f;let t=5;if((l=r.directConnectUrl)!=null&&l.trim()){if(!Nr(r.directConnectUrl))throw new Error("directConnectUrl must be a valid URL");return r.directConnectUrl.toLocaleLowerCase().includes("tenants/00000000-0000-0000-0000-000000000000")?Bi({...r,directConnectUrl:""},e):Tx(r.directConnectUrl,e).href}let i=r.cloud&&r.cloud.toString().trim()!=="",n=r.customPowerPlatformCloud!==void 0&&r.customPowerPlatformCloud.trim()!=="";if(i&&!Object.values(Or).includes(r.cloud))throw new Error("Invalid PowerPlatformCloud enum key");let s=i?r.cloud:-1;if(s===100&&n)throw new Error("customPowerPlatformCloud must be provided when PowerPlatformCloud is Other");if(!((f=r.environmentId)!=null&&f.trim()))throw new Error("EnvironmentId must be provided");if(r.agentIdentifier===void 0||r.agentIdentifier.trim()==="")throw new Error("AgentIdentifier must be provided");if(s!==-1&&(t=s),s===100)if(n&&Nr(r.customPowerPlatformCloud))t=100;else throw new Error("customPowerPlatformCloud must be provided when PowerPlatformCloud is Other");let o;if(r.copilotAgentType&&r.copilotAgentType.toString().trim()!=="")if(Object.values(Sr).includes(r.copilotAgentType))o=r.copilotAgentType;else throw new Error("Invalid AgentType enum key");else o=0;r.customPowerPlatformCloud=n?r.customPowerPlatformCloud:"api.unknown.powerplatform.com";let a=Cx(t,r.environmentId,r.customPowerPlatformCloud);return{0:()=>new zi({host:a,schema:r.agentIdentifier}),1:()=>new Vi({host:a,identifier:r.agentIdentifier})}[o]().getConversationUrl(e)}function Df(r,e=-1,t="",i=""){var n,s;if(!i&&!(r!=null&&r.directConnectUrl)){if(e===100&&!t)throw new Error("cloudBaseAddress must be provided when PowerPlatformCloudCategory is Other");if(!r&&e===-1)throw new Error("Either settings or cloud must be provided");if(r&&r.cloud&&r.cloud!==-1&&(e=r.cloud),e===100)if(t&&Nr(t))e=100;else if(r!=null&&r.customPowerPlatformCloud&&Nr(r.customPowerPlatformCloud))e=100,t=r.customPowerPlatformCloud;else throw new Error("Either CustomPowerPlatformCloud or cloudBaseAddress must be provided when PowerPlatformCloudCategory is Other");return t!=null||(t="api.unknown.powerplatform.com"),`https://${Wi(e,t)}/.default`}else if(i||(i=(n=r==null?void 0:r.directConnectUrl)!=null?n:""),i&&Nr(i)){if(Lf(new URL(i))===-1){let o=(s=r==null?void 0:r.cloud)!=null?s:e;if(o===100||o===-1)throw new Error("Unable to resolve the PowerPlatform Cloud from DirectConnectUrl. The Token Audience resolver requires a specific PowerPlatformCloudCategory.");if(o!==-1)return`https://${Wi(o,"")}/.default`;throw new Error("Unable to resolve the PowerPlatform Cloud from DirectConnectUrl. The Token Audience resolver requires a specific PowerPlatformCloudCategory.")}return`https://${Wi(Lf(new URL(i)),"")}/.default`}else throw new Error("DirectConnectUrl must be provided when DirectConnectUrl is set")}function Nr(r){try{let e=r.startsWith("http")?r:`https://${r}`;return!!new URL(e)}catch{return!1}}function Tx(r,e){let t=new URL(r);return t.searchParams.has("api-version")||t.searchParams.append("api-version","2022-03-01-preview"),t.pathname.endsWith("/")&&(t.pathname=t.pathname.slice(0,-1)),t.pathname.includes("/conversations")&&(t.pathname=t.pathname.substring(0,t.pathname.indexOf("/conversations"))),t.pathname=`${t.pathname}/conversations`,e&&(t.pathname=`${t.pathname}/${e}`),t}function Cx(r,e,t){if(r===100&&(!t||!t.trim()))throw new Error("cloudBaseAddress must be provided when PowerPlatformCloud is Other");t=t!=null?t:"api.unknown.powerplatform.com";let i=e.toLowerCase().replaceAll("-",""),n=Ix(r),s=i.substring(0,i.length-n),o=i.substring(i.length-n);return new URL(`https://${s}.${o}.environment.${Wi(r,t)}`)}function Wi(r,e){switch(r){case 13:return"api.powerplatform.localhost";case 0:return"api.exp.powerplatform.com";case 1:return"api.dev.powerplatform.com";case 12:return"api.prv.powerplatform.com";case 2:return"api.test.powerplatform.com";case 3:return"api.preprod.powerplatform.com";case 4:case 5:return"api.powerplatform.com";case 14:return"api.gov.powerplatform.microsoft.us";case 6:return"api.gov.powerplatform.microsoft.us";case 7:return"api.high.powerplatform.microsoft.us";case 8:return"api.appsplatform.us";case 9:return"api.powerplatform.partner.microsoftonline.cn";case 10:return"api.powerplatform.eaglex.ic.gov";case 11:return"api.powerplatform.microsoft.scloud";case 100:return e;default:throw new Error(`Invalid cluster category value: ${r}`)}}function Ix(r){switch(r){case 4:case 5:return 2;default:return 1}}function Lf(r){switch(r.host.toLowerCase()){case"api.powerplatform.localhost":return 13;case"api.exp.powerplatform.com":return 0;case"api.dev.powerplatform.com":return 1;case"api.prv.powerplatform.com":return 12;case"api.test.powerplatform.com":return 2;case"api.preprod.powerplatform.com":return 3;case"api.powerplatform.com":return 5;case"api.gov.powerplatform.microsoft.us":return 14;case"api.high.powerplatform.microsoft.us":return 7;case"api.appsplatform.us":return 8;case"api.powerplatform.partner.microsoftonline.cn":return 9;default:return-1}}var Yr=Qo(bp());var gn=class{constructor(e){this.activity=e}};var xp=Qo(wp());var Sp={name:"@microsoft/agents-copilotstudio-client",version:"0.6.1",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.6.1",axios:"^1.9.0",debug:"^4.3.7",rxjs:"5.5.12",uuid:"^11.1.0"},license:"MIT",files:["README.md","dist/src","src"],exports:{".":{import:{browser:"./dist/src/browser.mjs",default:"./dist/src/index.js"},require:{default:"./dist/src/index.js"}},"./package.json":"./package.json"},engines:{node:">=20.0.0"}};var On={};var $e=class $e{constructor(e,t){this.conversationId="";this.settings=e,this.client=Di.create(),this.client.defaults.headers.common.Authorization=`Bearer ${t}`,this.client.defaults.headers.common["User-Agent"]=$e.getProductInfo(),this.logger=(0,xp.default)("copilot-studio-client")}async postRequestAsync(e){var f,p,y,g;let t=[];this.logger(`>>> SEND TO ${e.url}`);let i=await this.client(e);if(this.settings.useExperimentalEndpoint&&!((f=this.settings.directConnectUrl)!=null&&f.trim())){let m=(p=i.headers)==null?void 0:p[$e.islandExperimentalUrlHeaderKey];m&&(this.settings.directConnectUrl=m,this.logger(`Island Experimental URL: ${m}`))}this.conversationId=(g=(y=i.headers)==null?void 0:y[$e.conversationIdHeaderKey])!=null?g:"",this.conversationId&&this.logger(`Conversation ID: ${this.conversationId}`),this.logger("====================================================="),this.logger(`Headers: ${JSON.stringify(i.headers,null,2)}`),this.logger("=====================================================");let s=i.data.pipeThrough(new TextDecoderStream).getReader(),o="",a=[],c=async({done:m,value:O})=>m?(this.logger("Stream complete"),o+=O,a.push(o),a):(this.logger("Agent is typing..."),o+=O,await c(await s.read()));return(await s.read().then(c)).forEach(m=>{m.toString().split(`
|
|
9
|
-
`).filter(q=>q.substring(0,4)==="data"&&q!=="data: end\r").forEach(q=>{var F,U;try{let D=Yr.Activity.fromJson(q.substring(5,q.length));D.type===Yr.ActivityTypes.Message?(t.push(D),this.conversationId.trim()||(this.conversationId=(U=(F=D.conversation)==null?void 0:F.id)!=null?U:"",this.logger(`Conversation ID: ${this.conversationId}`))):this.logger("Activity type: ",D.type)}catch(D){throw this.logger("Error: ",D),D}})}),t}static getProductInfo(){let e=`CopilotStudioClient.agents-sdk-js/${Sp.version}`;return typeof window!="undefined"&&window.navigator?`${e} ${navigator.userAgent}`:`${e} nodejs/${process.version} ${On.platform()}-${On.arch()}/${On.release()}`}async startConversationAsync(e=!0){let n={method:"post",url:Bi(this.settings),headers:{Accept:"text/event-stream","Content-Type":"application/json"},data:{emitStartConversationEvent:e},responseType:"stream",adapter:"fetch"};return(await this.postRequestAsync(n))[0]}async askQuestionAsync(e,t=this.conversationId){var p,y;let n={type:"message",text:e,conversation:{id:t}},s=Yr.Activity.fromObject(n),o=(y=(p=s.conversation)==null?void 0:p.id)!=null?y:t,a=Bi(this.settings,o),c=new gn(s),l={method:"post",url:a,headers:{Accept:"text/event-stream","Content-Type":"application/json"},data:c,responseType:"stream",adapter:"fetch"};return await this.postRequestAsync(l)}};$e.conversationIdHeaderKey="x-ms-conversationid",$e.islandExperimentalUrlHeaderKey="x-ms-d2e-experimental",$e.scopeFromSettings=Df;var Op=$e;var X=[];for(let r=0;r<256;++r)X.push((r+256).toString(16).slice(1));function qp(r,e=0){return(X[r[e+0]]+X[r[e+1]]+X[r[e+2]]+X[r[e+3]]+"-"+X[r[e+4]]+X[r[e+5]]+"-"+X[r[e+6]]+X[r[e+7]]+"-"+X[r[e+8]]+X[r[e+9]]+"-"+X[r[e+10]]+X[r[e+11]]+X[r[e+12]]+X[r[e+13]]+X[r[e+14]]+X[r[e+15]]).toLowerCase()}var gu,uI=new Uint8Array(16);function wu(){if(!gu){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");gu=crypto.getRandomValues.bind(crypto)}return gu(uI)}var cI=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Su={randomUUID:cI};function lI(r,e,t){var n,s,o;if(Su.randomUUID&&!e&&!r)return Su.randomUUID();r=r||{};let i=(o=(s=r.random)!=null?s:(n=r.rng)==null?void 0:n.call(r))!=null?o:wu();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){if(t=t||0,t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let a=0;a<16;++a)e[t+a]=i[a];return e}return qp(i)}var Ou=lI;var Si=Qo(i0()),n0=class{static createConnection(e,t){let i=0,n,s,o=new Si.BehaviorSubject(0),a=Si.Observable.create(async f=>{if(n=f,o.value<2){o.next(2);return}l();let p=await e.startConversationAsync();s=p.conversation,i=0,c(p)}),c=f=>{n==null||n.next({...f,timestamp:new Date().toISOString(),channelData:{...f.channelData,"webchat:sequence-id":i++}})},l=()=>{if(!(t!=null&&t.showTyping))return;let f=s?{id:s.id,name:s.name}:{id:"agent",name:"Agent"};c({type:"typing",from:f})};return{connectionStatus$:o,activity$:a,postActivity(f){var p;if(!((p=f.text)!=null&&p.trim()))throw new Error("Activity text cannot be empty.");if(!n)throw new Error("Activity observer is not initialized.");return Si.Observable.create(async y=>{try{let g=Ou();c({...f,id:g}),l();let m=await e.askQuestionAsync(f.text);for(let O of m)c(O);y.next(g),y.complete()}catch(g){y.error(g)}})},end(){o.complete(),a.complete(),n&&(n.complete(),n=void 0)}}}};export{Sr as AgentType,ef as ConnectionSettings,Op as CopilotStudioClient,n0 as CopilotStudioWebChat,gn as ExecuteTurnRequest,Or as PowerPlatformCloud,Bi as getCopilotStudioConnectionUrl,Df as getTokenAudience,xH as loadCopilotStudioConnectionSettingsFromEnv};
|
|
1
|
+
var Ja=Object.create;var In=Object.defineProperty;var Ka=Object.getOwnPropertyDescriptor;var Ga=Object.getOwnPropertyNames;var Ya=Object.getPrototypeOf,Xa=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qa=(t,e)=>{for(var r in e)In(t,r,{get:e[r],enumerable:!0})},ec=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Ga(e))!Xa.call(t,o)&&o!==r&&In(t,o,{get:()=>e[o],enumerable:!(n=Ka(e,o))||n.enumerable});return t};var vr=(t,e,r)=>(r=t!=null?Ja(Ya(t)):{},ec(e||!t||!t.__esModule?In(r,"default",{value:t,enumerable:!0}):r,t));var Wi=w((Ny,Hi)=>{var lt=1e3,ft=lt*60,pt=ft*60,Ze=pt*24,hu=Ze*7,yu=Ze*365.25;Hi.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return gu(t);if(r==="number"&&isFinite(t))return e.long?bu(t):vu(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function gu(t){if(t=String(t),!(t.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(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*yu;case"weeks":case"week":case"w":return r*hu;case"days":case"day":case"d":return r*Ze;case"hours":case"hour":case"hrs":case"hr":case"h":return r*pt;case"minutes":case"minute":case"mins":case"min":case"m":return r*ft;case"seconds":case"second":case"secs":case"sec":case"s":return r*lt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function vu(t){var e=Math.abs(t);return e>=Ze?Math.round(t/Ze)+"d":e>=pt?Math.round(t/pt)+"h":e>=ft?Math.round(t/ft)+"m":e>=lt?Math.round(t/lt)+"s":t+"ms"}function bu(t){var e=Math.abs(t);return e>=Ze?Dr(t,e,Ze,"day"):e>=pt?Dr(t,e,pt,"hour"):e>=ft?Dr(t,e,ft,"minute"):e>=lt?Dr(t,e,lt,"second"):t+" ms"}function Dr(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}});var Ki=w((Dy,Ji)=>{function _u(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=o,r.enabled=a,r.humanize=Wi(),r.destroy=u,Object.keys(t).forEach(d=>{r[d]=t[d]}),r.names=[],r.skips=[],r.formatters={};function e(d){let m=0;for(let b=0;b<d.length;b++)m=(m<<5)-m+d.charCodeAt(b),m|=0;return r.colors[Math.abs(m)%r.colors.length]}r.selectColor=e;function r(d){let m,b=null,C,h;function v(..._){if(!v.enabled)return;let x=v,P=Number(new Date),N=P-(m||P);x.diff=N,x.prev=m,x.curr=P,m=P,_[0]=r.coerce(_[0]),typeof _[0]!="string"&&_.unshift("%O");let z=0;_[0]=_[0].replace(/%([a-zA-Z%])/g,(te,ye)=>{if(te==="%%")return"%";z++;let ke=r.formatters[ye];if(typeof ke=="function"){let gr=_[z];te=ke.call(x,gr),_.splice(z,1),z--}return te}),r.formatArgs.call(x,_),(x.log||r.log).apply(x,_)}return v.namespace=d,v.useColors=r.useColors(),v.color=r.selectColor(d),v.extend=n,v.destroy=r.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>b!==null?b:(C!==r.namespaces&&(C=r.namespaces,h=r.enabled(d)),h),set:_=>{b=_}}),typeof r.init=="function"&&r.init(v),v}function n(d,m){let b=r(this.namespace+(typeof m=="undefined"?":":m)+d);return b.log=this.log,b}function o(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let m=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let b of m)b[0]==="-"?r.skips.push(b.slice(1)):r.names.push(b)}function i(d,m){let b=0,C=0,h=-1,v=0;for(;b<d.length;)if(C<m.length&&(m[C]===d[b]||m[C]==="*"))m[C]==="*"?(h=C,v=b,C++):(b++,C++);else if(h!==-1)C=h+1,v++,b=v;else return!1;for(;C<m.length&&m[C]==="*";)C++;return C===m.length}function s(){let d=[...r.names,...r.skips.map(m=>"-"+m)].join(",");return r.enable(""),d}function a(d){for(let m of r.skips)if(i(d,m))return!1;for(let m of r.names)if(i(d,m))return!0;return!1}function c(d){return d instanceof Error?d.stack||d.message:d}function u(){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 r.enable(r.load()),r}Ji.exports=_u});var Gi=w((G,Lr)=>{G.formatArgs=wu;G.save=Cu;G.load=Tu;G.useColors=xu;G.storage=Su();G.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})();G.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 xu(){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 t;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&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function wu(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Lr.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}G.log=console.debug||console.log||(()=>{});function Cu(t){try{t?G.storage.setItem("debug",t):G.storage.removeItem("debug")}catch{}}function Tu(){let t;try{t=G.storage.getItem("debug")||G.storage.getItem("DEBUG")}catch{}return!t&&typeof process!="undefined"&&"env"in process&&(t=process.env.DEBUG),t}function Su(){try{return localStorage}catch{}}Lr.exports=Ki()(G);var{formatters:Iu}=Lr.exports;Iu.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Fr=w(Ue=>{"use strict";var Au=Ue&&Ue.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.Logger=void 0;Ue.debug=Ru;var Ou=Au(Gi()),Eu=["info","warn","error","debug"],Mr=class{constructor(e=""){this.loggers={},this.initializeLoggers(e)}initializeLoggers(e){for(let r of Eu){let n=(0,Ou.default)(`${e}:${r}`);n.color=this.getPlatformColor(r),this.loggers[r]=n}}getPlatformColor(e){return{node:{info:"2",warn:"3",error:"1",debug:"4"},browser:{info:"#33CC99",warn:"#CCCC33",error:"#CC3366",debug:"#0066FF"}}[typeof window!="undefined"?"browser":"node"][e]}info(e,...r){this.loggers.info(e,...r)}warn(e,...r){this.loggers.warn(e,...r)}error(e,...r){this.loggers.error(e,...r)}debug(e,...r){this.loggers.debug(e,...r)}};Ue.Logger=Mr;function Ru(t){return new Mr(t)}});var tr=w(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.getParsedType=Z.ZodParsedType=Z.objectUtil=Z.util=void 0;var Yn;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},t.getValidEnumValues=o=>{let i=t.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return t.objectValues(s)},t.objectValues=o=>t.objectKeys(o).map(function(i){return o[i]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},t.find=(o,i)=>{for(let s of o)if(i(s))return s},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}t.joinValues=n,t.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Yn||(Z.util=Yn={}));var es;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(es||(Z.objectUtil=es={}));Z.ZodParsedType=Yn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var Zu=t=>{switch(typeof t){case"undefined":return Z.ZodParsedType.undefined;case"string":return Z.ZodParsedType.string;case"number":return Number.isNaN(t)?Z.ZodParsedType.nan:Z.ZodParsedType.number;case"boolean":return Z.ZodParsedType.boolean;case"function":return Z.ZodParsedType.function;case"bigint":return Z.ZodParsedType.bigint;case"symbol":return Z.ZodParsedType.symbol;case"object":return Array.isArray(t)?Z.ZodParsedType.array:t===null?Z.ZodParsedType.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Z.ZodParsedType.promise:typeof Map!="undefined"&&t instanceof Map?Z.ZodParsedType.map:typeof Set!="undefined"&&t instanceof Set?Z.ZodParsedType.set:typeof Date!="undefined"&&t instanceof Date?Z.ZodParsedType.date:Z.ZodParsedType.object;default:return Z.ZodParsedType.unknown}};Z.getParsedType=Zu});var Br=w(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.ZodError=Te.quotelessJson=Te.ZodIssueCode=void 0;var ts=tr();Te.ZodIssueCode=ts.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 Uu=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");Te.quotelessJson=Uu;var rr=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(i){return i.message},n={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return o(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ts.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];r[i]=r[i]||[],r[i].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Te.ZodError=rr;rr.create=t=>new rr(t)});var Qn=w(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});var $=Br(),De=tr(),Nu=(t,e)=>{let r;switch(t.code){case $.ZodIssueCode.invalid_type:t.received===De.ZodParsedType.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case $.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,De.util.jsonStringifyReplacer)}`;break;case $.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${De.util.joinValues(t.keys,", ")}`;break;case $.ZodIssueCode.invalid_union:r="Invalid input";break;case $.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${De.util.joinValues(t.options)}`;break;case $.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${De.util.joinValues(t.options)}, received '${t.received}'`;break;case $.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case $.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case $.ZodIssueCode.invalid_date:r="Invalid date";break;case $.ZodIssueCode.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:De.util.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case $.ZodIssueCode.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case $.ZodIssueCode.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case $.ZodIssueCode.custom:r="Invalid input";break;case $.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case $.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case $.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=e.defaultError,De.util.assertNever(t)}return{message:r}};Xn.default=Nu});var Hr=w(Se=>{"use strict";var Du=Se&&Se.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Se,"__esModule",{value:!0});Se.defaultErrorMap=void 0;Se.setErrorMap=Lu;Se.getErrorMap=Mu;var rs=Du(Qn());Se.defaultErrorMap=rs.default;var ns=rs.default;function Lu(t){ns=t}function Mu(){return ns}});var to=w(j=>{"use strict";var Fu=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(j,"__esModule",{value:!0});j.isAsync=j.isValid=j.isDirty=j.isAborted=j.OK=j.DIRTY=j.INVALID=j.ParseStatus=j.EMPTY_PATH=j.makeIssue=void 0;j.addIssueToContext=Vu;var zu=Hr(),os=Fu(Qn()),qu=t=>{let{data:e,path:r,errorMaps:n,issueData:o}=t,i=[...r,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:e,defaultError:a}).message;return{...o,path:i,message:a}};j.makeIssue=qu;j.EMPTY_PATH=[];function Vu(t,e){let r=(0,zu.getErrorMap)(),n=(0,j.makeIssue)({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===os.default?void 0:os.default].filter(o=>!!o)});t.common.issues.push(n)}var eo=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let o of r){if(o.status==="aborted")return j.INVALID;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let o of r){let i=await o.key,s=await o.value;n.push({key:i,value:s})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let o of r){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return j.INVALID;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value!="undefined"||o.alwaysSet)&&(n[i.value]=s.value)}return{status:e.value,value:n}}};j.ParseStatus=eo;j.INVALID=Object.freeze({status:"aborted"});var $u=t=>({status:"dirty",value:t});j.DIRTY=$u;var Bu=t=>({status:"valid",value:t});j.OK=Bu;var Hu=t=>t.status==="aborted";j.isAborted=Hu;var Wu=t=>t.status==="dirty";j.isDirty=Wu;var Ju=t=>t.status==="valid";j.isValid=Ju;var Ku=t=>typeof Promise!="undefined"&&t instanceof Promise;j.isAsync=Ku});var ss=w(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0})});var cs=w(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.errorUtil=void 0;var as;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(as||(Wr.errorUtil=as={}))});var _s=w(l=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});l.discriminatedUnion=l.date=l.boolean=l.bigint=l.array=l.any=l.coerce=l.ZodFirstPartyTypeKind=l.late=l.ZodSchema=l.Schema=l.ZodReadonly=l.ZodPipeline=l.ZodBranded=l.BRAND=l.ZodNaN=l.ZodCatch=l.ZodDefault=l.ZodNullable=l.ZodOptional=l.ZodTransformer=l.ZodEffects=l.ZodPromise=l.ZodNativeEnum=l.ZodEnum=l.ZodLiteral=l.ZodLazy=l.ZodFunction=l.ZodSet=l.ZodMap=l.ZodRecord=l.ZodTuple=l.ZodIntersection=l.ZodDiscriminatedUnion=l.ZodUnion=l.ZodObject=l.ZodArray=l.ZodVoid=l.ZodNever=l.ZodUnknown=l.ZodAny=l.ZodNull=l.ZodUndefined=l.ZodSymbol=l.ZodDate=l.ZodBoolean=l.ZodBigInt=l.ZodNumber=l.ZodString=l.ZodType=void 0;l.NEVER=l.void=l.unknown=l.union=l.undefined=l.tuple=l.transformer=l.symbol=l.string=l.strictObject=l.set=l.record=l.promise=l.preprocess=l.pipeline=l.ostring=l.optional=l.onumber=l.oboolean=l.object=l.number=l.nullable=l.null=l.never=l.nativeEnum=l.nan=l.map=l.literal=l.lazy=l.intersection=l.instanceof=l.function=l.enum=l.effect=void 0;l.datetimeRegex=ps;l.custom=hs;var y=Br(),Jr=Hr(),T=cs(),f=to(),g=tr(),ne=class{constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}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}},us=(t,e)=>{if((0,f.isValid)(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new y.ZodError(t.common.issues);return this._error=r,this._error}}};function O(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(s,a)=>{var u,d;let{message:c}=t;return s.code==="invalid_enum_value"?{message:c!=null?c:a.defaultError}:typeof a.data=="undefined"?{message:(u=c!=null?c:n)!=null?u:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(d=c!=null?c:r)!=null?d:a.defaultError}},description:o}}var E=class{get description(){return this._def.description}_getType(e){return(0,g.getParsedType)(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:(0,g.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new f.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,g.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if((0,f.isAsync)(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var i;let n={common:{issues:[],async:(i=r==null?void 0:r.async)!=null?i:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,g.getParsedType)(e)},o=this._parseSync({data:e,path:n.path,parent:n});return us(n,o)}"~validate"(e){var n,o;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,g.getParsedType)(e)};if(!this["~standard"].async)try{let i=this._parseSync({data:e,path:[],parent:r});return(0,f.isValid)(i)?{value:i.value}:{issues:r.common.issues}}catch(i){(o=(n=i==null?void 0:i.message)==null?void 0:n.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(i=>(0,f.isValid)(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,g.getParsedType)(e)},o=this._parse({data:e,path:n.path,parent:n}),i=await((0,f.isAsync)(o)?o:Promise.resolve(o));return us(n,i)}refine(e,r){let n=o=>typeof r=="string"||typeof r=="undefined"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,i)=>{let s=e(o),a=()=>i.addIssue({code:y.ZodIssueCode.custom,...n(o)});return typeof Promise!="undefined"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new ee({schema:this,typeName:I.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:r=>this["~validate"](r)}}optional(){return re.create(this,this._def)}nullable(){return pe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return be.create(this)}promise(){return Oe.create(this,this._def)}or(e){return $e.create([this,e],this._def)}and(e){return Be.create(this,e,this._def)}transform(e){return new ee({...O(this._def),schema:this,typeName:I.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Ge({...O(this._def),innerType:this,defaultValue:r,typeName:I.ZodDefault})}brand(){return new nr({typeName:I.ZodBranded,type:this,...O(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Ye({...O(this._def),innerType:this,catchValue:r,typeName:I.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return or.create(this,e)}readonly(){return Xe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};l.ZodType=E;l.Schema=E;l.ZodSchema=E;var Gu=/^c[^\s-]{8,}$/i,Yu=/^[0-9a-z]+$/,Xu=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Qu=/^[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,ed=/^[a-z0-9_-]{21}$/i,td=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,rd=/^[-+]?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)?)??$/,nd=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,od="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ro,id=/^(?:(?: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])$/,sd=/^(?:(?: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])$/,ad=/^(([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]))$/,cd=/^(([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])$/,ud=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dd=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ls="((\\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])))",ld=new RegExp(`^${ls}$`);function fs(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function fd(t){return new RegExp(`^${fs(t)}$`)}function ps(t){let e=`${ls}T${fs(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function pd(t,e){return!!((e==="v4"||!e)&&id.test(t)||(e==="v6"||!e)&&ad.test(t))}function md(t,e){if(!td.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function hd(t,e){return!!((e==="v4"||!e)&&sd.test(t)||(e==="v6"||!e)&&cd.test(t))}var Ie=class t extends E{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==g.ZodParsedType.string){let i=this._getOrReturnCtx(e);return(0,f.addIssueToContext)(i,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.string,received:i.parsedType}),f.INVALID}let n=new f.ParseStatus,o;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{code:y.ZodIssueCode.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{code:y.ZodIssueCode.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let s=e.data.length>i.value,a=e.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(e,o),s?(0,f.addIssueToContext)(o,{code:y.ZodIssueCode.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&(0,f.addIssueToContext)(o,{code:y.ZodIssueCode.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")nd.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"email",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")ro||(ro=new RegExp(od,"u")),ro.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"emoji",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Qu.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"uuid",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")ed.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"nanoid",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")Gu.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"cuid",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")Yu.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"cuid2",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")Xu.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"ulid",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"url",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"regex",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{code:y.ZodIssueCode.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{code:y.ZodIssueCode.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{code:y.ZodIssueCode.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?ps(i).test(e.data)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{code:y.ZodIssueCode.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?ld.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{code:y.ZodIssueCode.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?fd(i).test(e.data)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{code:y.ZodIssueCode.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?rd.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"duration",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?pd(e.data,i.version)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"ip",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?md(e.data,i.alg)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"jwt",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?hd(e.data,i.version)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"cidr",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?ud.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"base64",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?dd.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{validation:"base64url",code:y.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):g.util.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:y.ZodIssueCode.invalid_string,...T.errorUtil.errToObj(n)})}_addCheck(e){return new t({...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 r,n;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:(r=e==null?void 0:e.offset)!=null?r:!1,local:(n=e==null?void 0:e.local)!=null?n:!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,r){return this._addCheck({kind:"regex",regex:e,...T.errorUtil.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...T.errorUtil.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...T.errorUtil.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...T.errorUtil.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...T.errorUtil.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...T.errorUtil.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...T.errorUtil.errToObj(r)})}nonempty(e){return this.min(1,T.errorUtil.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...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 r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};l.ZodString=Ie;Ie.create=t=>{var e;return new Ie({checks:[],typeName:I.ZodString,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1,...O(t)})};function yd(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(t.toFixed(o).replace(".","")),s=Number.parseInt(e.toFixed(o).replace(".",""));return i%s/10**o}var Le=class t extends E{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)!==g.ZodParsedType.number){let i=this._getOrReturnCtx(e);return(0,f.addIssueToContext)(i,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.number,received:i.parsedType}),f.INVALID}let n,o=new f.ParseStatus;for(let i of this._def.checks)i.kind==="int"?g.util.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?yd(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.not_finite,message:i.message}),o.dirty()):g.util.assertNever(i);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,T.errorUtil.toString(r))}gt(e,r){return this.setLimit("min",e,!1,T.errorUtil.toString(r))}lte(e,r){return this.setLimit("max",e,!0,T.errorUtil.toString(r))}lt(e,r){return this.setLimit("max",e,!1,T.errorUtil.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:T.errorUtil.toString(o)}]})}_addCheck(e){return new t({...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,r){return this._addCheck({kind:"multipleOf",value:e,message:T.errorUtil.toString(r)})}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 r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&g.util.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};l.ZodNumber=Le;Le.create=t=>new Le({checks:[],typeName:I.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...O(t)});var Me=class t extends E{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)!==g.ZodParsedType.bigint)return this._getInvalidInput(e);let n,o=new f.ParseStatus;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):g.util.assertNever(i);return{status:o.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return(0,f.addIssueToContext)(r,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.bigint,received:r.parsedType}),f.INVALID}gte(e,r){return this.setLimit("min",e,!0,T.errorUtil.toString(r))}gt(e,r){return this.setLimit("min",e,!1,T.errorUtil.toString(r))}lte(e,r){return this.setLimit("max",e,!0,T.errorUtil.toString(r))}lt(e,r){return this.setLimit("max",e,!1,T.errorUtil.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:T.errorUtil.toString(o)}]})}_addCheck(e){return new t({...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,r){return this._addCheck({kind:"multipleOf",value:e,message:T.errorUtil.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};l.ZodBigInt=Me;Me.create=t=>{var e;return new Me({checks:[],typeName:I.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1,...O(t)})};var Fe=class extends E{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==g.ZodParsedType.boolean){let n=this._getOrReturnCtx(e);return(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.boolean,received:n.parsedType}),f.INVALID}return(0,f.OK)(e.data)}};l.ZodBoolean=Fe;Fe.create=t=>new Fe({typeName:I.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...O(t)});var ze=class t extends E{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==g.ZodParsedType.date){let i=this._getOrReturnCtx(e);return(0,f.addIssueToContext)(i,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.date,received:i.parsedType}),f.INVALID}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return(0,f.addIssueToContext)(i,{code:y.ZodIssueCode.invalid_date}),f.INVALID}let n=new f.ParseStatus,o;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{code:y.ZodIssueCode.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),(0,f.addIssueToContext)(o,{code:y.ZodIssueCode.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):g.util.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:T.errorUtil.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:T.errorUtil.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};l.ZodDate=ze;ze.create=t=>new ze({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:I.ZodDate,...O(t)});var ht=class extends E{_parse(e){if(this._getType(e)!==g.ZodParsedType.symbol){let n=this._getOrReturnCtx(e);return(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.symbol,received:n.parsedType}),f.INVALID}return(0,f.OK)(e.data)}};l.ZodSymbol=ht;ht.create=t=>new ht({typeName:I.ZodSymbol,...O(t)});var qe=class extends E{_parse(e){if(this._getType(e)!==g.ZodParsedType.undefined){let n=this._getOrReturnCtx(e);return(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.undefined,received:n.parsedType}),f.INVALID}return(0,f.OK)(e.data)}};l.ZodUndefined=qe;qe.create=t=>new qe({typeName:I.ZodUndefined,...O(t)});var Ve=class extends E{_parse(e){if(this._getType(e)!==g.ZodParsedType.null){let n=this._getOrReturnCtx(e);return(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.null,received:n.parsedType}),f.INVALID}return(0,f.OK)(e.data)}};l.ZodNull=Ve;Ve.create=t=>new Ve({typeName:I.ZodNull,...O(t)});var Ae=class extends E{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,f.OK)(e.data)}};l.ZodAny=Ae;Ae.create=t=>new Ae({typeName:I.ZodAny,...O(t)});var ve=class extends E{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,f.OK)(e.data)}};l.ZodUnknown=ve;ve.create=t=>new ve({typeName:I.ZodUnknown,...O(t)});var ce=class extends E{_parse(e){let r=this._getOrReturnCtx(e);return(0,f.addIssueToContext)(r,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.never,received:r.parsedType}),f.INVALID}};l.ZodNever=ce;ce.create=t=>new ce({typeName:I.ZodNever,...O(t)});var yt=class extends E{_parse(e){if(this._getType(e)!==g.ZodParsedType.undefined){let n=this._getOrReturnCtx(e);return(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.void,received:n.parsedType}),f.INVALID}return(0,f.OK)(e.data)}};l.ZodVoid=yt;yt.create=t=>new yt({typeName:I.ZodVoid,...O(t)});var be=class t extends E{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==g.ZodParsedType.array)return(0,f.addIssueToContext)(r,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.array,received:r.parsedType}),f.INVALID;if(o.exactLength!==null){let s=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(s||a)&&((0,f.addIssueToContext)(r,{code:s?y.ZodIssueCode.too_big:y.ZodIssueCode.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&((0,f.addIssueToContext)(r,{code:y.ZodIssueCode.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&((0,f.addIssueToContext)(r,{code:y.ZodIssueCode.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>o.type._parseAsync(new ne(r,s,r.path,a)))).then(s=>f.ParseStatus.mergeArray(n,s));let i=[...r.data].map((s,a)=>o.type._parseSync(new ne(r,s,r.path,a)));return f.ParseStatus.mergeArray(n,i)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:T.errorUtil.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:T.errorUtil.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:T.errorUtil.toString(r)}})}nonempty(e){return this.min(1,e)}};l.ZodArray=be;be.create=(t,e)=>new be({type:t,minLength:null,maxLength:null,exactLength:null,typeName:I.ZodArray,...O(e)});function mt(t){if(t instanceof Y){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=re.create(mt(n))}return new Y({...t._def,shape:()=>e})}else return t instanceof be?new be({...t._def,type:mt(t.element)}):t instanceof re?re.create(mt(t.unwrap())):t instanceof pe?pe.create(mt(t.unwrap())):t instanceof fe?fe.create(t.items.map(e=>mt(e))):t}var Y=class t extends E{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(),r=g.util.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==g.ZodParsedType.object){let u=this._getOrReturnCtx(e);return(0,f.addIssueToContext)(u,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.object,received:u.parsedType}),f.INVALID}let{status:n,ctx:o}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof ce&&this._def.unknownKeys==="strip"))for(let u in o.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let d=i[u],m=o.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new ne(o,m,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof ce){let u=this._def.unknownKeys;if(u==="passthrough")for(let d of a)c.push({key:{status:"valid",value:d},value:{status:"valid",value:o.data[d]}});else if(u==="strict")a.length>0&&((0,f.addIssueToContext)(o,{code:y.ZodIssueCode.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let d of a){let m=o.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new ne(o,m,o.path,d)),alwaysSet:d in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let u=[];for(let d of c){let m=await d.key,b=await d.value;u.push({key:m,value:b,alwaysSet:d.alwaysSet})}return u}).then(u=>f.ParseStatus.mergeObjectSync(n,u)):f.ParseStatus.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return T.errorUtil.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s,a,c;let o=(a=(s=(i=this._def).errorMap)==null?void 0:s.call(i,r,n).message)!=null?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(c=T.errorUtil.errToObj(e).message)!=null?c:o}:{message:o}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:I.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of g.util.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of g.util.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return mt(this)}partial(e){let r={};for(let n of g.util.objectKeys(this.shape)){let o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of g.util.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof re;)i=i._def.innerType;r[n]=i}return new t({...this._def,shape:()=>r})}keyof(){return ms(g.util.objectKeys(this.shape))}};l.ZodObject=Y;Y.create=(t,e)=>new Y({shape:()=>t,unknownKeys:"strip",catchall:ce.create(),typeName:I.ZodObject,...O(e)});Y.strictCreate=(t,e)=>new Y({shape:()=>t,unknownKeys:"strict",catchall:ce.create(),typeName:I.ZodObject,...O(e)});Y.lazycreate=(t,e)=>new Y({shape:t,unknownKeys:"strip",catchall:ce.create(),typeName:I.ZodObject,...O(e)});var $e=class extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new y.ZodError(a.ctx.common.issues));return(0,f.addIssueToContext)(r,{code:y.ZodIssueCode.invalid_union,unionErrors:s}),f.INVALID}if(r.common.async)return Promise.all(n.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new y.ZodError(c));return(0,f.addIssueToContext)(r,{code:y.ZodIssueCode.invalid_union,unionErrors:a}),f.INVALID}}get options(){return this._def.options}};l.ZodUnion=$e;$e.create=(t,e)=>new $e({options:t,typeName:I.ZodUnion,...O(e)});var ge=t=>t instanceof He?ge(t.schema):t instanceof ee?ge(t.innerType()):t instanceof We?[t.value]:t instanceof Je?t.options:t instanceof Ke?g.util.objectValues(t.enum):t instanceof Ge?ge(t._def.innerType):t instanceof qe?[void 0]:t instanceof Ve?[null]:t instanceof re?[void 0,...ge(t.unwrap())]:t instanceof pe?[null,...ge(t.unwrap())]:t instanceof nr||t instanceof Xe?ge(t.unwrap()):t instanceof Ye?ge(t._def.innerType):[],Kr=class t extends E{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==g.ZodParsedType.object)return(0,f.addIssueToContext)(r,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.object,received:r.parsedType}),f.INVALID;let n=this.discriminator,o=r.data[n],i=this.optionsMap.get(o);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):((0,f.addIssueToContext)(r,{code:y.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),f.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let o=new Map;for(let i of r){let s=ge(i.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);o.set(a,i)}}return new t({typeName:I.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...O(n)})}};l.ZodDiscriminatedUnion=Kr;function no(t,e){let r=(0,g.getParsedType)(t),n=(0,g.getParsedType)(e);if(t===e)return{valid:!0,data:t};if(r===g.ZodParsedType.object&&n===g.ZodParsedType.object){let o=g.util.objectKeys(e),i=g.util.objectKeys(t).filter(a=>o.indexOf(a)!==-1),s={...t,...e};for(let a of i){let c=no(t[a],e[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===g.ZodParsedType.array&&n===g.ZodParsedType.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let i=0;i<t.length;i++){let s=t[i],a=e[i],c=no(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===g.ZodParsedType.date&&n===g.ZodParsedType.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Be=class extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=(i,s)=>{if((0,f.isAborted)(i)||(0,f.isAborted)(s))return f.INVALID;let a=no(i.value,s.value);return a.valid?(((0,f.isDirty)(i)||(0,f.isDirty)(s))&&r.dirty(),{status:r.value,value:a.data}):((0,f.addIssueToContext)(n,{code:y.ZodIssueCode.invalid_intersection_types}),f.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};l.ZodIntersection=Be;Be.create=(t,e,r)=>new Be({left:t,right:e,typeName:I.ZodIntersection,...O(r)});var fe=class t extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==g.ZodParsedType.array)return(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.array,received:n.parsedType}),f.INVALID;if(n.data.length<this._def.items.length)return(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),f.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,f.addIssueToContext)(n,{code:y.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new ne(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(i).then(s=>f.ParseStatus.mergeArray(r,s)):f.ParseStatus.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};l.ZodTuple=fe;fe.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new fe({items:t,typeName:I.ZodTuple,rest:null,...O(e)})};var Gr=class t extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==g.ZodParsedType.object)return(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.object,received:n.parsedType}),f.INVALID;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in n.data)o.push({key:i._parse(new ne(n,a,n.path,a)),value:s._parse(new ne(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?f.ParseStatus.mergeObjectAsync(r,o):f.ParseStatus.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof E?new t({keyType:e,valueType:r,typeName:I.ZodRecord,...O(n)}):new t({keyType:Ie.create(),valueType:e,typeName:I.ZodRecord,...O(r)})}};l.ZodRecord=Gr;var gt=class extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==g.ZodParsedType.map)return(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.map,received:n.parsedType}),f.INVALID;let o=this._def.keyType,i=this._def.valueType,s=[...n.data.entries()].map(([a,c],u)=>({key:o._parse(new ne(n,a,n.path,[u,"key"])),value:i._parse(new ne(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return f.INVALID;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(u.value,d.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of s){let u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return f.INVALID;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(u.value,d.value)}return{status:r.value,value:a}}}};l.ZodMap=gt;gt.create=(t,e,r)=>new gt({valueType:e,keyType:t,typeName:I.ZodMap,...O(r)});var vt=class t extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==g.ZodParsedType.set)return(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.set,received:n.parsedType}),f.INVALID;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&((0,f.addIssueToContext)(n,{code:y.ZodIssueCode.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&((0,f.addIssueToContext)(n,{code:y.ZodIssueCode.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let d of c){if(d.status==="aborted")return f.INVALID;d.status==="dirty"&&r.dirty(),u.add(d.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>i._parse(new ne(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:T.errorUtil.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:T.errorUtil.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};l.ZodSet=vt;vt.create=(t,e)=>new vt({valueType:t,minSize:null,maxSize:null,typeName:I.ZodSet,...O(e)});var Yr=class t extends E{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==g.ZodParsedType.function)return(0,f.addIssueToContext)(r,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.function,received:r.parsedType}),f.INVALID;function n(a,c){return(0,f.makeIssue)({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,Jr.getErrorMap)(),Jr.defaultErrorMap].filter(u=>!!u),issueData:{code:y.ZodIssueCode.invalid_arguments,argumentsError:c}})}function o(a,c){return(0,f.makeIssue)({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,Jr.getErrorMap)(),Jr.defaultErrorMap].filter(u=>!!u),issueData:{code:y.ZodIssueCode.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Oe){let a=this;return(0,f.OK)(async function(...c){let u=new y.ZodError([]),d=await a._def.args.parseAsync(c,i).catch(C=>{throw u.addIssue(n(c,C)),u}),m=await Reflect.apply(s,this,d);return await a._def.returns._def.type.parseAsync(m,i).catch(C=>{throw u.addIssue(o(m,C)),u})})}else{let a=this;return(0,f.OK)(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new y.ZodError([n(c,u.error)]);let d=Reflect.apply(s,this,u.data),m=a._def.returns.safeParse(d,i);if(!m.success)throw new y.ZodError([o(d,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:fe.create(e).rest(ve.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||fe.create([]).rest(ve.create()),returns:r||ve.create(),typeName:I.ZodFunction,...O(n)})}};l.ZodFunction=Yr;var He=class extends E{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};l.ZodLazy=He;He.create=(t,e)=>new He({getter:t,typeName:I.ZodLazy,...O(e)});var We=class extends E{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return(0,f.addIssueToContext)(r,{received:r.data,code:y.ZodIssueCode.invalid_literal,expected:this._def.value}),f.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}};l.ZodLiteral=We;We.create=(t,e)=>new We({value:t,typeName:I.ZodLiteral,...O(e)});function ms(t,e){return new Je({values:t,typeName:I.ZodEnum,...O(e)})}var Je=class t extends E{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return(0,f.addIssueToContext)(r,{expected:g.util.joinValues(n),received:r.parsedType,code:y.ZodIssueCode.invalid_type}),f.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return(0,f.addIssueToContext)(r,{received:r.data,code:y.ZodIssueCode.invalid_enum_value,options:n}),f.INVALID}return(0,f.OK)(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};l.ZodEnum=Je;Je.create=ms;var Ke=class extends E{_parse(e){let r=g.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==g.ZodParsedType.string&&n.parsedType!==g.ZodParsedType.number){let o=g.util.objectValues(r);return(0,f.addIssueToContext)(n,{expected:g.util.joinValues(o),received:n.parsedType,code:y.ZodIssueCode.invalid_type}),f.INVALID}if(this._cache||(this._cache=new Set(g.util.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=g.util.objectValues(r);return(0,f.addIssueToContext)(n,{received:n.data,code:y.ZodIssueCode.invalid_enum_value,options:o}),f.INVALID}return(0,f.OK)(e.data)}get enum(){return this._def.values}};l.ZodNativeEnum=Ke;Ke.create=(t,e)=>new Ke({values:t,typeName:I.ZodNativeEnum,...O(e)});var Oe=class extends E{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==g.ZodParsedType.promise&&r.common.async===!1)return(0,f.addIssueToContext)(r,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.promise,received:r.parsedType}),f.INVALID;let n=r.parsedType===g.ZodParsedType.promise?r.data:Promise.resolve(r.data);return(0,f.OK)(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};l.ZodPromise=Oe;Oe.create=(t,e)=>new Oe({type:t,typeName:I.ZodPromise,...O(e)});var ee=class extends E{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===I.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,i={addIssue:s=>{(0,f.addIssueToContext)(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(n.data,i);if(n.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return f.INVALID;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?f.INVALID:c.status==="dirty"||r.value==="dirty"?(0,f.DIRTY)(c.value):c});{if(r.value==="aborted")return f.INVALID;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?f.INVALID:a.status==="dirty"||r.value==="dirty"?(0,f.DIRTY)(a.value):a}}if(o.type==="refinement"){let s=a=>{let c=o.refinement(a,i);if(n.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(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?f.INVALID:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?f.INVALID:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(o.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,f.isValid)(s))return f.INVALID;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>(0,f.isValid)(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:r.value,value:a})):f.INVALID);g.util.assertNever(o)}};l.ZodEffects=ee;l.ZodTransformer=ee;ee.create=(t,e,r)=>new ee({schema:t,typeName:I.ZodEffects,effect:e,...O(r)});ee.createWithPreprocess=(t,e,r)=>new ee({schema:e,effect:{type:"preprocess",transform:t},typeName:I.ZodEffects,...O(r)});var re=class extends E{_parse(e){return this._getType(e)===g.ZodParsedType.undefined?(0,f.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};l.ZodOptional=re;re.create=(t,e)=>new re({innerType:t,typeName:I.ZodOptional,...O(e)});var pe=class extends E{_parse(e){return this._getType(e)===g.ZodParsedType.null?(0,f.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};l.ZodNullable=pe;pe.create=(t,e)=>new pe({innerType:t,typeName:I.ZodNullable,...O(e)});var Ge=class extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===g.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};l.ZodDefault=Ge;Ge.create=(t,e)=>new Ge({innerType:t,typeName:I.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...O(e)});var Ye=class extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,f.isAsync)(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new y.ZodError(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new y.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};l.ZodCatch=Ye;Ye.create=(t,e)=>new Ye({innerType:t,typeName:I.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...O(e)});var bt=class extends E{_parse(e){if(this._getType(e)!==g.ZodParsedType.nan){let n=this._getOrReturnCtx(e);return(0,f.addIssueToContext)(n,{code:y.ZodIssueCode.invalid_type,expected:g.ZodParsedType.nan,received:n.parsedType}),f.INVALID}return{status:"valid",value:e.data}}};l.ZodNaN=bt;bt.create=t=>new bt({typeName:I.ZodNaN,...O(t)});l.BRAND=Symbol("zod_brand");var nr=class extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}};l.ZodBranded=nr;var or=class t extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?f.INVALID:i.status==="dirty"?(r.dirty(),(0,f.DIRTY)(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?f.INVALID:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:I.ZodPipeline})}};l.ZodPipeline=or;var Xe=class extends E{_parse(e){let r=this._def.innerType._parse(e),n=o=>((0,f.isValid)(o)&&(o.value=Object.freeze(o.value)),o);return(0,f.isAsync)(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};l.ZodReadonly=Xe;Xe.create=(t,e)=>new Xe({innerType:t,typeName:I.ZodReadonly,...O(e)});function ds(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function hs(t,e={},r){return t?Ae.create().superRefine((n,o)=>{var s,a;let i=t(n);if(i instanceof Promise)return i.then(c=>{var u,d;if(!c){let m=ds(e,n),b=(d=(u=m.fatal)!=null?u:r)!=null?d:!0;o.addIssue({code:"custom",...m,fatal:b})}});if(!i){let c=ds(e,n),u=(a=(s=c.fatal)!=null?s:r)!=null?a:!0;o.addIssue({code:"custom",...c,fatal:u})}}):Ae.create()}l.late={object:Y.lazycreate};var I;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(I||(l.ZodFirstPartyTypeKind=I={}));var gd=(t,e={message:`Input not instance of ${t.name}`})=>hs(r=>r instanceof t,e);l.instanceof=gd;var ys=Ie.create;l.string=ys;var gs=Le.create;l.number=gs;var vd=bt.create;l.nan=vd;var bd=Me.create;l.bigint=bd;var vs=Fe.create;l.boolean=vs;var _d=ze.create;l.date=_d;var xd=ht.create;l.symbol=xd;var wd=qe.create;l.undefined=wd;var Cd=Ve.create;l.null=Cd;var Td=Ae.create;l.any=Td;var Sd=ve.create;l.unknown=Sd;var Id=ce.create;l.never=Id;var Ad=yt.create;l.void=Ad;var Od=be.create;l.array=Od;var Ed=Y.create;l.object=Ed;var Rd=Y.strictCreate;l.strictObject=Rd;var Pd=$e.create;l.union=Pd;var kd=Kr.create;l.discriminatedUnion=kd;var jd=Be.create;l.intersection=jd;var Zd=fe.create;l.tuple=Zd;var Ud=Gr.create;l.record=Ud;var Nd=gt.create;l.map=Nd;var Dd=vt.create;l.set=Dd;var Ld=Yr.create;l.function=Ld;var Md=He.create;l.lazy=Md;var Fd=We.create;l.literal=Fd;var zd=Je.create;l.enum=zd;var qd=Ke.create;l.nativeEnum=qd;var Vd=Oe.create;l.promise=Vd;var bs=ee.create;l.effect=bs;l.transformer=bs;var $d=re.create;l.optional=$d;var Bd=pe.create;l.nullable=Bd;var Hd=ee.createWithPreprocess;l.preprocess=Hd;var Wd=or.create;l.pipeline=Wd;var Jd=()=>ys().optional();l.ostring=Jd;var Kd=()=>gs().optional();l.onumber=Kd;var Gd=()=>vs().optional();l.oboolean=Gd;l.coerce={string:t=>Ie.create({...t,coerce:!0}),number:t=>Le.create({...t,coerce:!0}),boolean:t=>Fe.create({...t,coerce:!0}),bigint:t=>Me.create({...t,coerce:!0}),date:t=>ze.create({...t,coerce:!0})};l.NEVER=f.INVALID});var oo=w(oe=>{"use strict";var Yd=oe&&oe.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),_t=oe&&oe.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Yd(e,t,r)};Object.defineProperty(oe,"__esModule",{value:!0});_t(Hr(),oe);_t(to(),oe);_t(ss(),oe);_t(tr(),oe);_t(_s(),oe);_t(Br(),oe)});var U=w(X=>{"use strict";var xs=X&&X.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Xd=X&&X.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Qd=X&&X.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&xs(e,t,r);return Xd(e,t),e},el=X&&X.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&xs(e,t,r)};Object.defineProperty(X,"__esModule",{value:!0});X.z=void 0;var ws=Qd(oo());X.z=ws;el(oo(),X);X.default=ws});var io=w(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.actionTypesZodSchema=xt.ActionTypes=void 0;var tl=U(),Cs;(function(t){t.OpenUrl="openUrl",t.ImBack="imBack",t.PostBack="postBack",t.PlayAudio="playAudio",t.PlayVideo="playVideo",t.ShowImage="showImage",t.DownloadFile="downloadFile",t.Signin="signin",t.Call="call",t.MessageBack="messageBack",t.OpenApp="openApp"})(Cs||(xt.ActionTypes=Cs={}));xt.actionTypesZodSchema=tl.z.enum(["openUrl","imBack","postBack","playAudio","showImage","downloadFile","signin","call","messageBack","openApp"])});var so=w(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.semanticActionStateTypesZodSchema=wt.SemanticActionStateTypes=void 0;var rl=U(),Ts;(function(t){t.Start="start",t.Continue="continue",t.Done="done"})(Ts||(wt.SemanticActionStateTypes=Ts={}));wt.semanticActionStateTypesZodSchema=rl.z.enum(["start","continue","done"])});var ao=w(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.attachmentLayoutTypesZodSchema=Ct.AttachmentLayoutTypes=void 0;var nl=U(),Ss;(function(t){t.List="list",t.Carousel="carousel"})(Ss||(Ct.AttachmentLayoutTypes=Ss={}));Ct.attachmentLayoutTypesZodSchema=nl.z.enum(["list","carousel"])});var co=w(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.Channels=void 0;var Is;(function(t){t.Alexa="alexa",t.Console="console",t.Directline="directline",t.DirectlineSpeech="directlinespeech",t.Email="email",t.Emulator="emulator",t.Facebook="facebook",t.Groupme="groupme",t.Line="line",t.Msteams="msteams",t.Omni="omnichannel",t.Outlook="outlook",t.Skype="skype",t.Slack="slack",t.Sms="sms",t.Telegram="telegram",t.Telephony="telephony",t.Test="test",t.Webchat="webchat"})(Is||(Xr.Channels=Is={}))});var uo=w(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.endOfConversationCodesZodSchema=Tt.EndOfConversationCodes=void 0;var ol=U(),As;(function(t){t.Unknown="unknown",t.CompletedSuccessfully="completedSuccessfully",t.UserCancelled="userCancelled",t.AgentTimedOut="agentTimedOut",t.AgentIssuedInvalidMessage="agentIssuedInvalidMessage",t.ChannelFailed="channelFailed"})(As||(Tt.EndOfConversationCodes=As={}));Tt.endOfConversationCodesZodSchema=ol.z.enum(["unknown","completedSuccessfully","userCancelled","agentTimedOut","agentIssuedInvalidMessage","channelFailed"])});var Qr=w(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.roleTypeZodSchema=St.RoleTypes=void 0;var il=U(),Os;(function(t){t.User="user",t.Agent="bot",t.Skill="skill"})(Os||(St.RoleTypes=Os={}));St.roleTypeZodSchema=il.z.enum(["user","bot","skill"])});var Es=w(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.addAIToActivity=void 0;var sl=(t,e,r)=>{var n;let o={type:"https://schema.org/Message","@type":"Message","@context":"https://schema.org","@id":"",additionalType:["AIGeneratedContent"],citation:e,usageInfo:r};(n=t.entities)!==null&&n!==void 0||(t.entities=[]),t.entities.push(o)};en.addAIToActivity=sl});var Rs=w(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.adaptiveCardInvokeActionZodSchema=void 0;var Qe=U();tn.adaptiveCardInvokeActionZodSchema=Qe.z.object({type:Qe.z.string().min(1),id:Qe.z.string().optional(),verb:Qe.z.string().min(1),data:Qe.z.record(Qe.z.string().min(1),Qe.z.any())})});var Ps=w(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.default="ffffffff-ffff-ffff-ffff-ffffffffffff"});var ks=w(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.default="00000000-0000-0000-0000-000000000000"});var js=w(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.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 ir=w(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});var al=js();function cl(t){return typeof t=="string"&&al.default.test(t)}mo.default=cl});var sr=w(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});var ul=ir();function dl(t){if(!(0,ul.default)(t))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(t.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(t.slice(9,13),16))>>>8,e&255,(e=parseInt(t.slice(14,18),16))>>>8,e&255,(e=parseInt(t.slice(19,23),16))>>>8,e&255,(e=parseInt(t.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}ho.default=dl});var _e=w(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.unsafeStringify=void 0;var ll=ir(),q=[];for(let t=0;t<256;++t)q.push((t+256).toString(16).slice(1));function Zs(t,e=0){return(q[t[e+0]]+q[t[e+1]]+q[t[e+2]]+q[t[e+3]]+"-"+q[t[e+4]]+q[t[e+5]]+"-"+q[t[e+6]]+q[t[e+7]]+"-"+q[t[e+8]]+q[t[e+9]]+"-"+q[t[e+10]]+q[t[e+11]]+q[t[e+12]]+q[t[e+13]]+q[t[e+14]]+q[t[e+15]]).toLowerCase()}ar.unsafeStringify=Zs;function fl(t,e=0){let r=Zs(t,e);if(!(0,ll.default)(r))throw TypeError("Stringified UUID is invalid");return r}ar.default=fl});var rn=w(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});var yo,pl=new Uint8Array(16);function ml(){if(!yo){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");yo=crypto.getRandomValues.bind(crypto)}return yo(pl)}go.default=ml});var vo=w(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.updateV1State=void 0;var Us=rn(),hl=_e(),cr={};function yl(t,e,r){var i,s,a,c;let n,o=(i=t==null?void 0:t._v6)!=null?i:!1;if(t){let u=Object.keys(t);u.length===1&&u[0]==="_v6"&&(t=void 0)}if(t)n=Ns((c=(a=t.random)!=null?a:(s=t.rng)==null?void 0:s.call(t))!=null?c:(0,Us.default)(),t.msecs,t.nsecs,t.clockseq,t.node,e,r);else{let u=Date.now(),d=(0,Us.default)();Ds(cr,u,d),n=Ns(d,cr.msecs,cr.nsecs,o?void 0:cr.clockseq,o?void 0:cr.node,e,r)}return e!=null?e:(0,hl.unsafeStringify)(n)}function Ds(t,e,r){var n,o;return(n=t.msecs)!=null||(t.msecs=-1/0),(o=t.nsecs)!=null||(t.nsecs=0),e===t.msecs?(t.nsecs++,t.nsecs>=1e4&&(t.node=void 0,t.nsecs=0)):e>t.msecs?t.nsecs=0:e<t.msecs&&(t.node=void 0),t.node||(t.node=r.slice(10,16),t.node[0]|=1,t.clockseq=(r[8]<<8|r[9])&16383),t.msecs=e,t}ur.updateV1State=Ds;function Ns(t,e,r,n,o,i,s=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(!i)i=new Uint8Array(16),s=0;else if(s<0||s+16>i.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`);e!=null||(e=Date.now()),r!=null||(r=0),n!=null||(n=(t[8]<<8|t[9])&16383),o!=null||(o=t.slice(10,16)),e+=122192928e5;let a=((e&268435455)*1e4+r)%4294967296;i[s++]=a>>>24&255,i[s++]=a>>>16&255,i[s++]=a>>>8&255,i[s++]=a&255;let c=e/4294967296*1e4&268435455;i[s++]=c>>>8&255,i[s++]=c&255,i[s++]=c>>>24&15|16,i[s++]=c>>>16&255,i[s++]=n>>>8|128,i[s++]=n&255;for(let u=0;u<6;++u)i[s++]=o[u];return i}ur.default=yl});var _o=w(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});var gl=sr(),vl=_e();function bl(t){let e=typeof t=="string"?(0,gl.default)(t):t,r=_l(e);return typeof t=="string"?(0,vl.unsafeStringify)(r):r}bo.default=bl;function _l(t){return Uint8Array.of((t[6]&15)<<4|t[7]>>4&15,(t[7]&15)<<4|(t[4]&240)>>4,(t[4]&15)<<4|(t[5]&240)>>4,(t[5]&15)<<4|(t[0]&240)>>4,(t[0]&15)<<4|(t[1]&240)>>4,(t[1]&15)<<4|(t[2]&240)>>4,96|t[2]&15,t[3],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}});var Ms=w(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});function xl(t){let e=Tl(t),r=Cl(e,t.length*8);return wl(r)}function wl(t){let e=new Uint8Array(t.length*4);for(let r=0;r<t.length*4;r++)e[r]=t[r>>2]>>>r%4*8&255;return e}function Ls(t){return(t+64>>>9<<4)+14+1}function Cl(t,e){let r=new Uint32Array(Ls(e)).fill(0);r.set(t),r[e>>5]|=128<<e%32,r[r.length-1]=e,t=r;let n=1732584193,o=-271733879,i=-1732584194,s=271733878;for(let a=0;a<t.length;a+=16){let c=n,u=o,d=i,m=s;n=B(n,o,i,s,t[a],7,-680876936),s=B(s,n,o,i,t[a+1],12,-389564586),i=B(i,s,n,o,t[a+2],17,606105819),o=B(o,i,s,n,t[a+3],22,-1044525330),n=B(n,o,i,s,t[a+4],7,-176418897),s=B(s,n,o,i,t[a+5],12,1200080426),i=B(i,s,n,o,t[a+6],17,-1473231341),o=B(o,i,s,n,t[a+7],22,-45705983),n=B(n,o,i,s,t[a+8],7,1770035416),s=B(s,n,o,i,t[a+9],12,-1958414417),i=B(i,s,n,o,t[a+10],17,-42063),o=B(o,i,s,n,t[a+11],22,-1990404162),n=B(n,o,i,s,t[a+12],7,1804603682),s=B(s,n,o,i,t[a+13],12,-40341101),i=B(i,s,n,o,t[a+14],17,-1502002290),o=B(o,i,s,n,t[a+15],22,1236535329),n=H(n,o,i,s,t[a+1],5,-165796510),s=H(s,n,o,i,t[a+6],9,-1069501632),i=H(i,s,n,o,t[a+11],14,643717713),o=H(o,i,s,n,t[a],20,-373897302),n=H(n,o,i,s,t[a+5],5,-701558691),s=H(s,n,o,i,t[a+10],9,38016083),i=H(i,s,n,o,t[a+15],14,-660478335),o=H(o,i,s,n,t[a+4],20,-405537848),n=H(n,o,i,s,t[a+9],5,568446438),s=H(s,n,o,i,t[a+14],9,-1019803690),i=H(i,s,n,o,t[a+3],14,-187363961),o=H(o,i,s,n,t[a+8],20,1163531501),n=H(n,o,i,s,t[a+13],5,-1444681467),s=H(s,n,o,i,t[a+2],9,-51403784),i=H(i,s,n,o,t[a+7],14,1735328473),o=H(o,i,s,n,t[a+12],20,-1926607734),n=W(n,o,i,s,t[a+5],4,-378558),s=W(s,n,o,i,t[a+8],11,-2022574463),i=W(i,s,n,o,t[a+11],16,1839030562),o=W(o,i,s,n,t[a+14],23,-35309556),n=W(n,o,i,s,t[a+1],4,-1530992060),s=W(s,n,o,i,t[a+4],11,1272893353),i=W(i,s,n,o,t[a+7],16,-155497632),o=W(o,i,s,n,t[a+10],23,-1094730640),n=W(n,o,i,s,t[a+13],4,681279174),s=W(s,n,o,i,t[a],11,-358537222),i=W(i,s,n,o,t[a+3],16,-722521979),o=W(o,i,s,n,t[a+6],23,76029189),n=W(n,o,i,s,t[a+9],4,-640364487),s=W(s,n,o,i,t[a+12],11,-421815835),i=W(i,s,n,o,t[a+15],16,530742520),o=W(o,i,s,n,t[a+2],23,-995338651),n=J(n,o,i,s,t[a],6,-198630844),s=J(s,n,o,i,t[a+7],10,1126891415),i=J(i,s,n,o,t[a+14],15,-1416354905),o=J(o,i,s,n,t[a+5],21,-57434055),n=J(n,o,i,s,t[a+12],6,1700485571),s=J(s,n,o,i,t[a+3],10,-1894986606),i=J(i,s,n,o,t[a+10],15,-1051523),o=J(o,i,s,n,t[a+1],21,-2054922799),n=J(n,o,i,s,t[a+8],6,1873313359),s=J(s,n,o,i,t[a+15],10,-30611744),i=J(i,s,n,o,t[a+6],15,-1560198380),o=J(o,i,s,n,t[a+13],21,1309151649),n=J(n,o,i,s,t[a+4],6,-145523070),s=J(s,n,o,i,t[a+11],10,-1120210379),i=J(i,s,n,o,t[a+2],15,718787259),o=J(o,i,s,n,t[a+9],21,-343485551),n=Ee(n,c),o=Ee(o,u),i=Ee(i,d),s=Ee(s,m)}return Uint32Array.of(n,o,i,s)}function Tl(t){if(t.length===0)return new Uint32Array;let e=new Uint32Array(Ls(t.length*8)).fill(0);for(let r=0;r<t.length;r++)e[r>>2]|=(t[r]&255)<<r%4*8;return e}function Ee(t,e){let r=(t&65535)+(e&65535);return(t>>16)+(e>>16)+(r>>16)<<16|r&65535}function Sl(t,e){return t<<e|t>>>32-e}function nn(t,e,r,n,o,i){return Ee(Sl(Ee(Ee(e,t),Ee(n,i)),o),r)}function B(t,e,r,n,o,i,s){return nn(e&r|~e&n,t,e,o,i,s)}function H(t,e,r,n,o,i,s){return nn(e&n|r&~n,t,e,o,i,s)}function W(t,e,r,n,o,i,s){return nn(e^r^n,t,e,o,i,s)}function J(t,e,r,n,o,i,s){return nn(r^(e|~n),t,e,o,i,s)}xo.default=xl});var dr=w(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.URL=xe.DNS=xe.stringToBytes=void 0;var Fs=sr(),Il=_e();function zs(t){t=unescape(encodeURIComponent(t));let e=new Uint8Array(t.length);for(let r=0;r<t.length;++r)e[r]=t.charCodeAt(r);return e}xe.stringToBytes=zs;xe.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8";xe.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Al(t,e,r,n,o,i){let s=typeof r=="string"?zs(r):r,a=typeof n=="string"?(0,Fs.default)(n):n;if(typeof n=="string"&&(n=(0,Fs.default)(n)),(n==null?void 0:n.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+s.length);if(c.set(a),c.set(s,a.length),c=e(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,o){i=i||0;for(let u=0;u<16;++u)o[i+u]=c[u];return o}return(0,Il.unsafeStringify)(c)}xe.default=Al});var Vs=w(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.URL=et.DNS=void 0;var Ol=Ms(),wo=dr(),qs=dr();Object.defineProperty(et,"DNS",{enumerable:!0,get:function(){return qs.DNS}});Object.defineProperty(et,"URL",{enumerable:!0,get:function(){return qs.URL}});function Co(t,e,r,n){return(0,wo.default)(48,Ol.default,t,e,r,n)}Co.DNS=wo.DNS;Co.URL=wo.URL;et.default=Co});var $s=w(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});var El=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);To.default={randomUUID:El}});var Hs=w(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});var Bs=$s(),Rl=rn(),Pl=_e();function kl(t,e,r){var o,i,s;if(Bs.default.randomUUID&&!e&&!t)return Bs.default.randomUUID();t=t||{};let n=(s=(i=t.random)!=null?i:(o=t.rng)==null?void 0:o.call(t))!=null?s:(0,Rl.default)();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){if(r=r||0,r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let a=0;a<16;++a)e[r+a]=n[a];return e}return(0,Pl.unsafeStringify)(n)}So.default=kl});var Ws=w(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});function jl(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function Io(t,e){return t<<e|t>>>32-e}function Zl(t){let e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520],n=new Uint8Array(t.length+1);n.set(t),n[t.length]=128,t=n;let o=t.length/4+2,i=Math.ceil(o/16),s=new Array(i);for(let a=0;a<i;++a){let c=new Uint32Array(16);for(let u=0;u<16;++u)c[u]=t[a*64+u*4]<<24|t[a*64+u*4+1]<<16|t[a*64+u*4+2]<<8|t[a*64+u*4+3];s[a]=c}s[i-1][14]=(t.length-1)*8/Math.pow(2,32),s[i-1][14]=Math.floor(s[i-1][14]),s[i-1][15]=(t.length-1)*8&4294967295;for(let a=0;a<i;++a){let c=new Uint32Array(80);for(let h=0;h<16;++h)c[h]=s[a][h];for(let h=16;h<80;++h)c[h]=Io(c[h-3]^c[h-8]^c[h-14]^c[h-16],1);let u=r[0],d=r[1],m=r[2],b=r[3],C=r[4];for(let h=0;h<80;++h){let v=Math.floor(h/20),_=Io(u,5)+jl(v,d,m,b)+C+e[v]+c[h]>>>0;C=b,b=m,m=Io(d,30)>>>0,d=u,u=_}r[0]=r[0]+u>>>0,r[1]=r[1]+d>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+b>>>0,r[4]=r[4]+C>>>0}return Uint8Array.of(r[0]>>24,r[0]>>16,r[0]>>8,r[0],r[1]>>24,r[1]>>16,r[1]>>8,r[1],r[2]>>24,r[2]>>16,r[2]>>8,r[2],r[3]>>24,r[3]>>16,r[3]>>8,r[3],r[4]>>24,r[4]>>16,r[4]>>8,r[4])}Ao.default=Zl});var Ks=w(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.URL=tt.DNS=void 0;var Ul=Ws(),Oo=dr(),Js=dr();Object.defineProperty(tt,"DNS",{enumerable:!0,get:function(){return Js.DNS}});Object.defineProperty(tt,"URL",{enumerable:!0,get:function(){return Js.URL}});function Eo(t,e,r,n){return(0,Oo.default)(80,Ul.default,t,e,r,n)}Eo.DNS=Oo.DNS;Eo.URL=Oo.URL;tt.default=Eo});var Gs=w(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});var Nl=_e(),Dl=vo(),Ll=_o();function Ml(t,e,r){t!=null||(t={}),r!=null||(r=0);let n=(0,Dl.default)({...t,_v6:!0},new Uint8Array(16));if(n=(0,Ll.default)(n),e){for(let o=0;o<16;o++)e[r+o]=n[o];return e}return(0,Nl.unsafeStringify)(n)}Ro.default=Ml});var Ys=w(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});var Fl=sr(),zl=_e();function ql(t){let e=typeof t=="string"?(0,Fl.default)(t):t,r=Vl(e);return typeof t=="string"?(0,zl.unsafeStringify)(r):r}Po.default=ql;function Vl(t){return Uint8Array.of((t[3]&15)<<4|t[4]>>4&15,(t[4]&15)<<4|(t[5]&240)>>4,(t[5]&15)<<4|t[6]&15,t[7],(t[1]&15)<<4|(t[2]&240)>>4,(t[2]&15)<<4|(t[3]&240)>>4,16|(t[0]&240)>>4,(t[0]&15)<<4|(t[1]&240)>>4,t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}});var ta=w(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.updateV7State=void 0;var Xs=rn(),$l=_e(),ko={};function Bl(t,e,r){var o,i,s;let n;if(t)n=Qs((s=(i=t.random)!=null?i:(o=t.rng)==null?void 0:o.call(t))!=null?s:(0,Xs.default)(),t.msecs,t.seq,e,r);else{let a=Date.now(),c=(0,Xs.default)();ea(ko,a,c),n=Qs(c,ko.msecs,ko.seq,e,r)}return e!=null?e:(0,$l.unsafeStringify)(n)}function ea(t,e,r){var n,o;return(n=t.msecs)!=null||(t.msecs=-1/0),(o=t.seq)!=null||(t.seq=0),e>t.msecs?(t.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],t.msecs=e):(t.seq=t.seq+1|0,t.seq===0&&t.msecs++),t}lr.updateV7State=ea;function Qs(t,e,r,n,o=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(!n)n=new Uint8Array(16),o=0;else if(o<0||o+16>n.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);return e!=null||(e=Date.now()),r!=null||(r=t[6]*127<<24|t[7]<<16|t[8]<<8|t[9]),n[o++]=e/1099511627776&255,n[o++]=e/4294967296&255,n[o++]=e/16777216&255,n[o++]=e/65536&255,n[o++]=e/256&255,n[o++]=e&255,n[o++]=112|r>>>28&15,n[o++]=r>>>20&255,n[o++]=128|r>>>14&63,n[o++]=r>>>6&255,n[o++]=r<<2&255|t[10]&3,n[o++]=t[11],n[o++]=t[12],n[o++]=t[13],n[o++]=t[14],n[o++]=t[15],n}lr.default=Bl});var ra=w(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});var Hl=ir();function Wl(t){if(!(0,Hl.default)(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)}jo.default=Wl});var na=w(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.version=k.validate=k.v7=k.v6ToV1=k.v6=k.v5=k.v4=k.v3=k.v1ToV6=k.v1=k.stringify=k.parse=k.NIL=k.MAX=void 0;var Jl=Ps();Object.defineProperty(k,"MAX",{enumerable:!0,get:function(){return Jl.default}});var Kl=ks();Object.defineProperty(k,"NIL",{enumerable:!0,get:function(){return Kl.default}});var Gl=sr();Object.defineProperty(k,"parse",{enumerable:!0,get:function(){return Gl.default}});var Yl=_e();Object.defineProperty(k,"stringify",{enumerable:!0,get:function(){return Yl.default}});var Xl=vo();Object.defineProperty(k,"v1",{enumerable:!0,get:function(){return Xl.default}});var Ql=_o();Object.defineProperty(k,"v1ToV6",{enumerable:!0,get:function(){return Ql.default}});var ef=Vs();Object.defineProperty(k,"v3",{enumerable:!0,get:function(){return ef.default}});var tf=Hs();Object.defineProperty(k,"v4",{enumerable:!0,get:function(){return tf.default}});var rf=Ks();Object.defineProperty(k,"v5",{enumerable:!0,get:function(){return rf.default}});var nf=Gs();Object.defineProperty(k,"v6",{enumerable:!0,get:function(){return nf.default}});var of=Ys();Object.defineProperty(k,"v6ToV1",{enumerable:!0,get:function(){return of.default}});var sf=ta();Object.defineProperty(k,"v7",{enumerable:!0,get:function(){return sf.default}});var af=ir();Object.defineProperty(k,"validate",{enumerable:!0,get:function(){return af.default}});var cf=ra();Object.defineProperty(k,"version",{enumerable:!0,get:function(){return cf.default}})});var Zo=w(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.entityZodSchema=void 0;var oa=U();on.entityZodSchema=oa.z.object({type:oa.z.string().min(1)}).passthrough()});var ia=w(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.semanticActionZodSchema=void 0;var fr=U(),uf=Zo(),df=so();sn.semanticActionZodSchema=fr.z.object({id:fr.z.string().min(1),state:fr.z.union([df.semanticActionStateTypesZodSchema,fr.z.string().min(1)]),entities:fr.z.record(uf.entityZodSchema)})});var sa=w(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.cardActionZodSchema=void 0;var me=U(),lf=io();an.cardActionZodSchema=me.z.object({type:me.z.union([lf.actionTypesZodSchema,me.z.string().min(1)]),title:me.z.string().min(1),image:me.z.string().min(1).optional(),text:me.z.string().min(1).optional(),displayText:me.z.string().min(1).optional(),value:me.z.any().optional(),channelData:me.z.unknown().optional(),imageAltText:me.z.string().min(1).optional()})});var aa=w(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.suggestedActionsZodSchema=void 0;var cn=U(),ff=sa();un.suggestedActionsZodSchema=cn.z.object({to:cn.z.array(cn.z.string().min(1)),actions:cn.z.array(ff.cardActionZodSchema)})});var Uo=w(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.activityEventNamesZodSchema=It.ActivityEventNames=void 0;var pf=U(),ca;(function(t){t.ContinueConversation="ContinueConversation",t.CreateConversation="CreateConversation"})(ca||(It.ActivityEventNames=ca={}));It.activityEventNamesZodSchema=pf.z.enum(["ContinueConversation","CreateConversation"])});var No=w(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.activityImportanceZodSchema=At.ActivityImportance=void 0;var mf=U(),ua;(function(t){t.Low="low",t.Normal="normal",t.High="high"})(ua||(At.ActivityImportance=ua={}));At.activityImportanceZodSchema=mf.z.enum(["low","normal","high"])});var Do=w(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.activityTypesZodSchema=Ot.ActivityTypes=void 0;var hf=U(),da;(function(t){t.Message="message",t.ContactRelationUpdate="contactRelationUpdate",t.ConversationUpdate="conversationUpdate",t.Typing="typing",t.EndOfConversation="endOfConversation",t.Event="event",t.Invoke="invoke",t.InvokeResponse="invokeResponse",t.DeleteUserData="deleteUserData",t.MessageUpdate="messageUpdate",t.MessageDelete="messageDelete",t.InstallationUpdate="installationUpdate",t.MessageReaction="messageReaction",t.Suggestion="suggestion",t.Trace="trace",t.Handoff="handoff",t.Command="command",t.CommandResult="commandResult",t.Delay="delay"})(da||(Ot.ActivityTypes=da={}));Ot.activityTypesZodSchema=hf.z.enum(["message","contactRelationUpdate","conversationUpdate","typing","endOfConversation","event","invoke","invokeResponse","deleteUserData","messageUpdate","messageDelete","installationUpdate","messageReaction","suggestion","trace","handoff","command","commandResult","delay"])});var la=w(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.attachmentZodSchema=void 0;var Et=U();dn.attachmentZodSchema=Et.z.object({contentType:Et.z.string().min(1),contentUrl:Et.z.string().min(1).optional(),content:Et.z.unknown().optional(),name:Et.z.string().min(1).optional(),thumbnailUrl:Et.z.string().min(1).optional()})});var Lo=w(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.channelAccountZodSchema=void 0;var rt=U(),yf=Qr();ln.channelAccountZodSchema=rt.z.object({id:rt.z.string().min(1).optional(),name:rt.z.string().optional(),aadObjectId:rt.z.string().min(1).optional(),role:rt.z.union([yf.roleTypeZodSchema,rt.z.string().min(1)]).optional(),properties:rt.z.unknown().optional()})});var Mo=w(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.conversationAccountZodSchema=void 0;var he=U(),gf=Qr();fn.conversationAccountZodSchema=he.z.object({isGroup:he.z.boolean().optional(),conversationType:he.z.string().min(1).optional(),tenantId:he.z.string().min(1).optional(),id:he.z.string().min(1),name:he.z.string().min(1).optional(),aadObjectId:he.z.string().min(1).optional(),role:he.z.union([gf.roleTypeZodSchema,he.z.string().min(1)]).optional(),properties:he.z.unknown().optional()})});var pa=w(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.conversationReferenceZodSchema=void 0;var pr=U(),fa=Lo(),vf=Mo();pn.conversationReferenceZodSchema=pr.z.object({activityId:pr.z.string().min(1).optional(),user:fa.channelAccountZodSchema.optional(),locale:pr.z.string().min(1).optional(),agent:fa.channelAccountZodSchema.optional().nullable(),conversation:vf.conversationAccountZodSchema,channelId:pr.z.string().min(1),serviceUrl:pr.z.string().min(1).optional()})});var Fo=w(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.deliveryModesZodSchema=Rt.DeliveryModes=void 0;var bf=U(),ma;(function(t){t.Normal="normal",t.Notification="notification",t.ExpectReplies="expectReplies",t.Ephemeral="ephemeral"})(ma||(Rt.DeliveryModes=ma={}));Rt.deliveryModesZodSchema=bf.z.enum(["normal","notification","expectReplies","ephemeral"])});var zo=w(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.inputHintsZodSchema=Pt.InputHints=void 0;var _f=U(),ha;(function(t){t.AcceptingInput="acceptingInput",t.IgnoringInput="ignoringInput",t.ExpectingInput="expectingInput"})(ha||(Pt.InputHints=ha={}));Pt.inputHintsZodSchema=_f.z.enum(["acceptingInput","ignoringInput","expectingInput"])});var qo=w(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.messageReactionTypesZodSchema=kt.MessageReactionTypes=void 0;var xf=U(),ya;(function(t){t.Like="like",t.PlusOne="plusOne"})(ya||(kt.MessageReactionTypes=ya={}));kt.messageReactionTypesZodSchema=xf.z.enum(["like","plusOne"])});var ga=w(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.messageReactionZodSchema=void 0;var Vo=U(),wf=qo();mn.messageReactionZodSchema=Vo.z.object({type:Vo.z.union([wf.messageReactionTypesZodSchema,Vo.z.string().min(1)])})});var $o=w(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.textFormatTypesZodSchema=jt.TextFormatTypes=void 0;var Cf=U(),va;(function(t){t.Markdown="markdown",t.Plain="plain",t.Xml="xml"})(va||(jt.TextFormatTypes=va={}));jt.textFormatTypesZodSchema=Cf.z.enum(["markdown","plain","xml"])});var ba=w(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.textHighlightZodSchema=void 0;var Bo=U();hn.textHighlightZodSchema=Bo.z.object({text:Bo.z.string().min(1),occurrence:Bo.z.number()})});var Ca=w(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.Activity=nt.activityZodSchema=void 0;var Tf=na(),S=U(),Sf=ia(),If=aa(),wa=Uo(),Af=No(),gn=Do(),Of=la(),Ef=ao(),yn=Lo(),_a=co(),Rf=Mo(),Pf=pa(),kf=uo(),jf=Fo(),Zf=Zo(),Uf=zo(),xa=ga(),Nf=$o(),Df=ba();nt.activityZodSchema=S.z.object({type:S.z.union([gn.activityTypesZodSchema,S.z.string().min(1)]),text:S.z.string().optional(),id:S.z.string().min(1).optional(),channelId:S.z.string().min(1).optional(),from:yn.channelAccountZodSchema.optional(),timestamp:S.z.union([S.z.date(),S.z.string().min(1).datetime().optional(),S.z.string().min(1).transform(t=>new Date(t)).optional()]),localTimestamp:S.z.string().min(1).transform(t=>new Date(t)).optional().or(S.z.date()).optional(),localTimezone:S.z.string().min(1).optional(),callerId:S.z.string().min(1).optional(),serviceUrl:S.z.string().min(1).optional(),conversation:Rf.conversationAccountZodSchema.optional(),recipient:yn.channelAccountZodSchema.optional(),textFormat:S.z.union([Nf.textFormatTypesZodSchema,S.z.string().min(1)]).optional(),attachmentLayout:S.z.union([Ef.attachmentLayoutTypesZodSchema,S.z.string().min(1)]).optional(),membersAdded:S.z.array(yn.channelAccountZodSchema).optional(),membersRemoved:S.z.array(yn.channelAccountZodSchema).optional(),reactionsAdded:S.z.array(xa.messageReactionZodSchema).optional(),reactionsRemoved:S.z.array(xa.messageReactionZodSchema).optional(),topicName:S.z.string().min(1).optional(),historyDisclosed:S.z.boolean().optional(),locale:S.z.string().min(1).optional(),speak:S.z.string().min(1).optional(),inputHint:S.z.union([Uf.inputHintsZodSchema,S.z.string().min(1)]).optional(),summary:S.z.string().min(1).optional(),suggestedActions:If.suggestedActionsZodSchema.optional(),attachments:S.z.array(Of.attachmentZodSchema).optional(),entities:S.z.array(Zf.entityZodSchema.passthrough()).optional(),channelData:S.z.any().optional(),action:S.z.string().min(1).optional(),replyToId:S.z.string().min(1).optional(),label:S.z.string().min(1).optional(),valueType:S.z.string().min(1).optional(),value:S.z.unknown().optional(),name:S.z.union([wa.activityEventNamesZodSchema,S.z.string().min(1)]).optional(),relatesTo:Pf.conversationReferenceZodSchema.optional(),code:S.z.union([kf.endOfConversationCodesZodSchema,S.z.string().min(1)]).optional(),expiration:S.z.string().min(1).datetime().optional(),importance:S.z.union([Af.activityImportanceZodSchema,S.z.string().min(1)]).optional(),deliveryMode:S.z.union([jf.deliveryModesZodSchema,S.z.string().min(1)]).optional(),listenFor:S.z.array(S.z.string().min(1)).optional(),textHighlights:S.z.array(Df.textHighlightZodSchema).optional(),semanticAction:Sf.semanticActionZodSchema.optional()});var Ho=class t{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 r=nt.activityZodSchema.passthrough().parse(e),n=new t(r.type);return Object.assign(n,r),n}static getContinuationActivity(e){let r={type:gn.ActivityTypes.Event,name:wa.ActivityEventNames.ContinueConversation,id:(0,Tf.v4)(),channelId:e.channelId,locale:e.locale,serviceUrl:e.serviceUrl,conversation:e.conversation,recipient:e.agent,from:e.user,relatesTo:e};return t.fromObject(r)}getAppropriateReplyToId(){if(this.type!==gn.ActivityTypes.ConversationUpdate||this.channelId!==_a.Channels.Directline&&this.channelId!==_a.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");return{activityId:this.getAppropriateReplyToId(),user:this.from,agent:this.recipient,conversation:this.conversation,channelId:this.channelId,locale:this.locale,serviceUrl:this.serviceUrl}}applyConversationReference(e,r=!1){var n,o,i;return this.channelId=e.channelId,(n=this.locale)!==null&&n!==void 0||(this.locale=e.locale),this.serviceUrl=e.serviceUrl,this.conversation=e.conversation,r?(this.from=e.user,this.recipient=(o=e.agent)!==null&&o!==void 0?o:void 0,e.activityId&&(this.id=e.activityId)):(this.from=(i=e.agent)!==null&&i!==void 0?i:void 0,this.recipient=e.user,e.activityId&&(this.replyToId=e.activityId)),this}clone(){let e=JSON.parse(JSON.stringify(this));for(let r in e)typeof e[r]=="string"&&!isNaN(Date.parse(e[r]))&&(e[r]=new Date(e[r]));return Object.setPrototypeOf(e,t.prototype),e}getMentions(e){let r=[];if(e.entities!==void 0)for(let n=0;n<e.entities.length;n++)e.entities[n].type.toLowerCase()==="mention"&&r.push(e.entities[n]);return r}normalizeMentions(e=!1){var r,n;if(this.type===gn.ActivityTypes.Message&&(e&&(this.removeRecipientMention(),this.entities!==void 0&&(!((r=this.recipient)===null||r===void 0)&&r.id)&&(this.entities=this.entities.filter(o=>{var i;return o.type.toLowerCase()==="mention"?o.mentioned.id!==((i=this.recipient)===null||i===void 0?void 0:i.id):!0}))),this.text&&(this.text=t.removeAt(this.text)),this.entities!==void 0)){let o=this.getMentions(this);for(let i of o)i.text&&(i.text=(n=t.removeAt(i.text))===null||n===void 0?void 0:n.trim())}}static removeAt(e){if(!e)return e;let r;do{r=!1;let n=e.toLowerCase().indexOf("<at");if(n>=0){let o=e.indexOf(">",n);if(o>0){let i=e.toLowerCase().indexOf("</at>",o);if(i>0){let s=e.substring(i+5);s.length>0&&!/\s/.test(s[0])&&(s=` ${s}`),e=e.substring(0,i)+s;let a=e.substring(o+1,i),c=e.substring(0,n);c.length>0&&!/\s$/.test(c)&&(c+=" "),e=c+a+s,r=!0}}}}while(r);return e}removeMentionText(e){let n=this.getMentions(this).filter(o=>o.mentioned.id===e);return n.length>0&&this.text&&(this.text=this.text.replace(n[0].text,"").trim()),this.text||""}removeRecipientMention(){return this.recipient!=null&&this.recipient.id?this.removeMentionText(this.recipient.id):""}getReplyConversationReference(e){let r=this.getConversationReference();return r.activityId=e,r}toJsonString(){return JSON.stringify(this)}};nt.Activity=Ho});var Ta=w(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.CallerIdConstants=void 0;vn.CallerIdConstants={PublicAzureChannel:"urn:botframework:azure",USGovChannel:"urn:botframework:azureusgov",AgentPrefix:"urn:botframework:aadappid:"}});var Sa=w(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.activityTreatments=Zt.ActivityTreatments=void 0;var Lf=U(),Wo;(function(t){t.Targeted="targeted"})(Wo||(Zt.ActivityTreatments=Wo={}));Zt.activityTreatments=Lf.z.nativeEnum(Wo)});var Oa=w(R=>{"use strict";var Mf=R&&R.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Ia=R&&R.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Mf(e,t,r)};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 Ff=io();Object.defineProperty(R,"ActionTypes",{enumerable:!0,get:function(){return Ff.ActionTypes}});var zf=so();Object.defineProperty(R,"SemanticActionStateTypes",{enumerable:!0,get:function(){return zf.SemanticActionStateTypes}});var qf=ao();Object.defineProperty(R,"AttachmentLayoutTypes",{enumerable:!0,get:function(){return qf.AttachmentLayoutTypes}});var Vf=co();Object.defineProperty(R,"Channels",{enumerable:!0,get:function(){return Vf.Channels}});var $f=uo();Object.defineProperty(R,"EndOfConversationCodes",{enumerable:!0,get:function(){return $f.EndOfConversationCodes}});var Bf=Qr();Object.defineProperty(R,"RoleTypes",{enumerable:!0,get:function(){return Bf.RoleTypes}});Ia(Es(),R);Ia(Rs(),R);var Aa=Ca();Object.defineProperty(R,"Activity",{enumerable:!0,get:function(){return Aa.Activity}});Object.defineProperty(R,"activityZodSchema",{enumerable:!0,get:function(){return Aa.activityZodSchema}});var Hf=Uo();Object.defineProperty(R,"ActivityEventNames",{enumerable:!0,get:function(){return Hf.ActivityEventNames}});var Wf=No();Object.defineProperty(R,"ActivityImportance",{enumerable:!0,get:function(){return Wf.ActivityImportance}});var Jf=Do();Object.defineProperty(R,"ActivityTypes",{enumerable:!0,get:function(){return Jf.ActivityTypes}});var Kf=Ta();Object.defineProperty(R,"CallerIdConstants",{enumerable:!0,get:function(){return Kf.CallerIdConstants}});var Gf=Fo();Object.defineProperty(R,"DeliveryModes",{enumerable:!0,get:function(){return Gf.DeliveryModes}});var Yf=zo();Object.defineProperty(R,"InputHints",{enumerable:!0,get:function(){return Yf.InputHints}});var Xf=qo();Object.defineProperty(R,"MessageReactionTypes",{enumerable:!0,get:function(){return Xf.MessageReactionTypes}});var Qf=$o();Object.defineProperty(R,"TextFormatTypes",{enumerable:!0,get:function(){return Qf.TextFormatTypes}});var ep=Sa();Object.defineProperty(R,"ActivityTreatments",{enumerable:!0,get:function(){return ep.ActivityTreatments}})});var zt=(r=>(r[r.Published=0]="Published",r[r.Prebuilt=1]="Prebuilt",r))(zt||{});var qt=(x=>(x[x.Unknown=-1]="Unknown",x[x.Exp=0]="Exp",x[x.Dev=1]="Dev",x[x.Test=2]="Test",x[x.Preprod=3]="Preprod",x[x.FirstRelease=4]="FirstRelease",x[x.Prod=5]="Prod",x[x.Gov=6]="Gov",x[x.High=7]="High",x[x.DoD=8]="DoD",x[x.Mooncake=9]="Mooncake",x[x.Ex=10]="Ex",x[x.Rx=11]="Rx",x[x.Prv=12]="Prv",x[x.Local=13]="Local",x[x.GovFR=14]="GovFR",x[x.Other=100]="Other",x))(qt||{});var ai=class{constructor(){this.appClientId="";this.tenantId="";this.environmentId="";this.useExperimentalEndpoint=!1}},yp=()=>{var r,n,o,i;let t=process.env.cloud,e=process.env.copilotAgentType;return{appClientId:(r=process.env.appClientId)!=null?r:"",tenantId:(n=process.env.tenantId)!=null?n:"",environmentId:(o=process.env.environmentId)!=null?o:"",cloud:t?qt[t]:5,customPowerPlatformCloud:process.env.customPowerPlatformCloud,agentIdentifier:process.env.agentIdentifier,copilotAgentType:e?zt[e]:0,directConnectUrl:process.env.directConnectUrl,useExperimentalEndpoint:((i=process.env.useExperimentalEndpoint)==null?void 0:i.toLocaleLowerCase())==="true"}};function Vt(t,e){return function(){return t.apply(e,arguments)}}var{toString:tc}=Object.prototype,{getPrototypeOf:On}=Object,{iterator:_r,toStringTag:ui}=Symbol,xr=(t=>e=>{let r=tc.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),se=t=>(t=t.toLowerCase(),e=>xr(e)===t),wr=t=>e=>typeof e===t,{isArray:it}=Array,$t=wr("undefined");function rc(t){return t!==null&&!$t(t)&&t.constructor!==null&&!$t(t.constructor)&&K(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var di=se("ArrayBuffer");function nc(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&di(t.buffer),e}var oc=wr("string"),K=wr("function"),li=wr("number"),Cr=t=>t!==null&&typeof t=="object",ic=t=>t===!0||t===!1,br=t=>{if(xr(t)!=="object")return!1;let e=On(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ui in t)&&!(_r in t)},sc=se("Date"),ac=se("File"),cc=se("Blob"),uc=se("FileList"),dc=t=>Cr(t)&&K(t.pipe),lc=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||K(t.append)&&((e=xr(t))==="formdata"||e==="object"&&K(t.toString)&&t.toString()==="[object FormData]"))},fc=se("URLSearchParams"),[pc,mc,hc,yc]=["ReadableStream","Request","Response","Headers"].map(se),gc=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Bt(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t=="undefined")return;let n,o;if(typeof t!="object"&&(t=[t]),it(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{let i=r?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length,a;for(n=0;n<s;n++)a=i[n],e.call(null,t[a],a,t)}}function fi(t,e){e=e.toLowerCase();let r=Object.keys(t),n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}var je=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,pi=t=>!$t(t)&&t!==je;function An(){let{caseless:t}=pi(this)&&this||{},e={},r=(n,o)=>{let i=t&&fi(e,o)||o;br(e[i])&&br(n)?e[i]=An(e[i],n):br(n)?e[i]=An({},n):it(n)?e[i]=n.slice():e[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Bt(arguments[n],r);return e}var vc=(t,e,r,{allOwnKeys:n}={})=>(Bt(e,(o,i)=>{r&&K(o)?t[i]=Vt(o,r):t[i]=o},{allOwnKeys:n}),t),bc=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),_c=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},xc=(t,e,r,n)=>{let o,i,s,a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!n||n(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=r!==!1&&On(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},wc=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let n=t.indexOf(e,r);return n!==-1&&n===r},Cc=t=>{if(!t)return null;if(it(t))return t;let e=t.length;if(!li(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Tc=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&On(Uint8Array)),Sc=(t,e)=>{let n=(t&&t[_r]).call(t),o;for(;(o=n.next())&&!o.done;){let i=o.value;e.call(t,i[0],i[1])}},Ic=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Ac=se("HTMLFormElement"),Oc=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),ci=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Ec=se("RegExp"),mi=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};Bt(r,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(n[i]=s||o)}),Object.defineProperties(t,n)},Rc=t=>{mi(t,(e,r)=>{if(K(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=t[r];if(K(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Pc=(t,e)=>{let r={},n=o=>{o.forEach(i=>{r[i]=!0})};return it(t)?n(t):n(String(t).split(e)),r},kc=()=>{},jc=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Zc(t){return!!(t&&K(t.append)&&t[ui]==="FormData"&&t[_r])}var Uc=t=>{let e=new Array(10),r=(n,o)=>{if(Cr(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[o]=n;let i=it(n)?[]:{};return Bt(n,(s,a)=>{let c=r(s,o+1);!$t(c)&&(i[a]=c)}),e[o]=void 0,i}}return n};return r(t,0)},Nc=se("AsyncFunction"),Dc=t=>t&&(Cr(t)||K(t))&&K(t.then)&&K(t.catch),hi=((t,e)=>t?setImmediate:e?((r,n)=>(je.addEventListener("message",({source:o,data:i})=>{o===je&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),je.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",K(je.postMessage)),Lc=typeof queueMicrotask!="undefined"?queueMicrotask.bind(je):typeof process!="undefined"&&process.nextTick||hi,Mc=t=>t!=null&&K(t[_r]),p={isArray:it,isArrayBuffer:di,isBuffer:rc,isFormData:lc,isArrayBufferView:nc,isString:oc,isNumber:li,isBoolean:ic,isObject:Cr,isPlainObject:br,isReadableStream:pc,isRequest:mc,isResponse:hc,isHeaders:yc,isUndefined:$t,isDate:sc,isFile:ac,isBlob:cc,isRegExp:Ec,isFunction:K,isStream:dc,isURLSearchParams:fc,isTypedArray:Tc,isFileList:uc,forEach:Bt,merge:An,extend:vc,trim:gc,stripBOM:bc,inherits:_c,toFlatObject:xc,kindOf:xr,kindOfTest:se,endsWith:wc,toArray:Cc,forEachEntry:Sc,matchAll:Ic,isHTMLForm:Ac,hasOwnProperty:ci,hasOwnProp:ci,reduceDescriptors:mi,freezeMethods:Rc,toObjectSet:Pc,toCamelCase:Oc,noop:kc,toFiniteNumber:jc,findKey:fi,global:je,isContextDefined:pi,isSpecCompliantForm:Zc,toJSONObject:Uc,isAsyncFn:Nc,isThenable:Dc,setImmediate:hi,asap:Lc,isIterable:Mc};function st(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}p.inherits(st,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:p.toJSONObject(this.config),code:this.code,status:this.status}}});var yi=st.prototype,gi={};["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(t=>{gi[t]={value:t}});Object.defineProperties(st,gi);Object.defineProperty(yi,"isAxiosError",{value:!0});st.from=(t,e,r,n,o,i)=>{let s=Object.create(yi);return p.toFlatObject(t,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),st.call(s,t.message,e,r,n,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};var A=st;var Tr=null;function En(t){return p.isPlainObject(t)||p.isArray(t)}function bi(t){return p.endsWith(t,"[]")?t.slice(0,-2):t}function vi(t,e,r){return t?t.concat(e).map(function(o,i){return o=bi(o),!r&&i?"["+o+"]":o}).join(r?".":""):e}function Fc(t){return p.isArray(t)&&!t.some(En)}var zc=p.toFlatObject(p,{},null,function(e){return/^is[A-Z]/.test(e)});function qc(t,e,r){if(!p.isObject(t))throw new TypeError("target must be an object");e=e||new(Tr||FormData),r=p.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,_){return!p.isUndefined(_[v])});let n=r.metaTokens,o=r.visitor||d,i=r.dots,s=r.indexes,c=(r.Blob||typeof Blob!="undefined"&&Blob)&&p.isSpecCompliantForm(e);if(!p.isFunction(o))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(p.isDate(h))return h.toISOString();if(p.isBoolean(h))return h.toString();if(!c&&p.isBlob(h))throw new A("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(h)||p.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function d(h,v,_){let x=h;if(h&&!_&&typeof h=="object"){if(p.endsWith(v,"{}"))v=n?v:v.slice(0,-2),h=JSON.stringify(h);else if(p.isArray(h)&&Fc(h)||(p.isFileList(h)||p.endsWith(v,"[]"))&&(x=p.toArray(h)))return v=bi(v),x.forEach(function(N,z){!(p.isUndefined(N)||N===null)&&e.append(s===!0?vi([v],z,i):s===null?v:v+"[]",u(N))}),!1}return En(h)?!0:(e.append(vi(_,v,i),u(h)),!1)}let m=[],b=Object.assign(zc,{defaultVisitor:d,convertValue:u,isVisitable:En});function C(h,v){if(!p.isUndefined(h)){if(m.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));m.push(h),p.forEach(h,function(x,P){(!(p.isUndefined(x)||x===null)&&o.call(e,x,p.isString(P)?P.trim():P,v,b))===!0&&C(x,v?v.concat(P):[P])}),m.pop()}}if(!p.isObject(t))throw new TypeError("data must be an object");return C(t),e}var Ce=qc;function _i(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function xi(t,e){this._pairs=[],t&&Ce(t,this,e)}var wi=xi.prototype;wi.append=function(e,r){this._pairs.push([e,r])};wi.toString=function(e){let r=e?function(n){return e.call(this,n,_i)}:_i;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};var Sr=xi;function Vc(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ht(t,e,r){if(!e)return t;let n=r&&r.encode||Vc;p.isFunction(r)&&(r={serialize:r});let o=r&&r.serialize,i;if(o?i=o(e,r):i=p.isURLSearchParams(e)?e.toString():new Sr(e,r).toString(n),i){let s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}var Rn=class{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){p.forEach(this.handlers,function(n){n!==null&&e(n)})}},Pn=Rn;var Ir={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Ci=typeof URLSearchParams!="undefined"?URLSearchParams:Sr;var Ti=typeof FormData!="undefined"?FormData:null;var Si=typeof Blob!="undefined"?Blob:null;var Ii={isBrowser:!0,classes:{URLSearchParams:Ci,FormData:Ti,Blob:Si},protocols:["http","https","file","blob","url","data"]};var Zn={};Qa(Zn,{hasBrowserEnv:()=>jn,hasStandardBrowserEnv:()=>$c,hasStandardBrowserWebWorkerEnv:()=>Bc,navigator:()=>kn,origin:()=>Hc});var jn=typeof window!="undefined"&&typeof document!="undefined",kn=typeof navigator=="object"&&navigator||void 0,$c=jn&&(!kn||["ReactNative","NativeScript","NS"].indexOf(kn.product)<0),Bc=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hc=jn&&window.location.href||"http://localhost";var L={...Zn,...Ii};function Un(t,e){return Ce(t,new L.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return L.isNode&&p.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function Wc(t){return p.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Jc(t){let e={},r=Object.keys(t),n,o=r.length,i;for(n=0;n<o;n++)i=r[n],e[i]=t[i];return e}function Kc(t){function e(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;let a=Number.isFinite(+s),c=i>=r.length;return s=!s&&p.isArray(o)?o.length:s,c?(p.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!p.isObject(o[s]))&&(o[s]=[]),e(r,n,o[s],i)&&p.isArray(o[s])&&(o[s]=Jc(o[s])),!a)}if(p.isFormData(t)&&p.isFunction(t.entries)){let r={};return p.forEachEntry(t,(n,o)=>{e(Wc(n),o,r,0)}),r}return null}var Ar=Kc;function Gc(t,e,r){if(p.isString(t))try{return(e||JSON.parse)(t),p.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Nn={transitional:Ir,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=p.isObject(e);if(i&&p.isHTMLForm(e)&&(e=new FormData(e)),p.isFormData(e))return o?JSON.stringify(Ar(e)):e;if(p.isArrayBuffer(e)||p.isBuffer(e)||p.isStream(e)||p.isFile(e)||p.isBlob(e)||p.isReadableStream(e))return e;if(p.isArrayBufferView(e))return e.buffer;if(p.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Un(e,this.formSerializer).toString();if((a=p.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return Ce(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),Gc(e)):e}],transformResponse:[function(e){let r=this.transitional||Nn.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(p.isResponse(e)||p.isReadableStream(e))return e;if(e&&p.isString(e)&&(n&&!this.responseType||o)){let s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?A.from(a,A.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:L.classes.FormData,Blob:L.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};p.forEach(["delete","get","head","post","put","patch"],t=>{Nn.headers[t]={}});var at=Nn;var Yc=p.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"]),Ai=t=>{let e={},r,n,o;return t&&t.split(`
|
|
2
|
+
`).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||e[r]&&Yc[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e};var Oi=Symbol("internals");function Wt(t){return t&&String(t).trim().toLowerCase()}function Or(t){return t===!1||t==null?t:p.isArray(t)?t.map(Or):String(t)}function Xc(t){let e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}var Qc=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Dn(t,e,r,n,o){if(p.isFunction(n))return n.call(this,e,r);if(o&&(e=r),!!p.isString(e)){if(p.isString(n))return e.indexOf(n)!==-1;if(p.isRegExp(n))return n.test(e)}}function eu(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function tu(t,e){let r=p.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(o,i,s){return this[n].call(this,e,o,i,s)},configurable:!0})})}var ct=class{constructor(e){e&&this.set(e)}set(e,r,n){let o=this;function i(a,c,u){let d=Wt(c);if(!d)throw new Error("header name must be a non-empty string");let m=p.findKey(o,d);(!m||o[m]===void 0||u===!0||u===void 0&&o[m]!==!1)&&(o[m||c]=Or(a))}let s=(a,c)=>p.forEach(a,(u,d)=>i(u,d,c));if(p.isPlainObject(e)||e instanceof this.constructor)s(e,r);else if(p.isString(e)&&(e=e.trim())&&!Qc(e))s(Ai(e),r);else if(p.isObject(e)&&p.isIterable(e)){let a={},c,u;for(let d of e){if(!p.isArray(d))throw TypeError("Object iterator must return a key-value pair");a[u=d[0]]=(c=a[u])?p.isArray(c)?[...c,d[1]]:[c,d[1]]:d[1]}s(a,r)}else e!=null&&i(r,e,n);return this}get(e,r){if(e=Wt(e),e){let n=p.findKey(this,e);if(n){let o=this[n];if(!r)return o;if(r===!0)return Xc(o);if(p.isFunction(r))return r.call(this,o,n);if(p.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Wt(e),e){let n=p.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Dn(this,this[n],n,r)))}return!1}delete(e,r){let n=this,o=!1;function i(s){if(s=Wt(s),s){let a=p.findKey(n,s);a&&(!r||Dn(n,n[a],a,r))&&(delete n[a],o=!0)}}return p.isArray(e)?e.forEach(i):i(e),o}clear(e){let r=Object.keys(this),n=r.length,o=!1;for(;n--;){let i=r[n];(!e||Dn(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){let r=this,n={};return p.forEach(this,(o,i)=>{let s=p.findKey(n,i);if(s){r[s]=Or(o),delete r[i];return}let a=e?eu(i):String(i).trim();a!==i&&delete r[i],r[a]=Or(o),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return p.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=e&&p.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
|
|
3
|
+
`)}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,...r){let n=new this(e);return r.forEach(o=>n.set(o)),n}static accessor(e){let n=(this[Oi]=this[Oi]={accessors:{}}).accessors,o=this.prototype;function i(s){let a=Wt(s);n[a]||(tu(o,s),n[a]=!0)}return p.isArray(e)?e.forEach(i):i(e),this}};ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);p.reduceDescriptors(ct.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});p.freezeMethods(ct);var F=ct;function Jt(t,e){let r=this||at,n=e||r,o=F.from(n.headers),i=n.data;return p.forEach(t,function(a){i=a.call(r,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function Kt(t){return!!(t&&t.__CANCEL__)}function Ei(t,e,r){A.call(this,t==null?"canceled":t,A.ERR_CANCELED,e,r),this.name="CanceledError"}p.inherits(Ei,A,{__CANCEL__:!0});var de=Ei;function Gt(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new A("Request failed with status code "+r.status,[A.ERR_BAD_REQUEST,A.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ln(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ru(t,e){t=t||10;let r=new Array(t),n=new Array(t),o=0,i=0,s;return e=e!==void 0?e:1e3,function(c){let u=Date.now(),d=n[i];s||(s=u),r[o]=c,n[o]=u;let m=i,b=0;for(;m!==o;)b+=r[m++],m=m%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),u-s<e)return;let C=d&&u-d;return C?Math.round(b*1e3/C):void 0}}var Ri=ru;function nu(t,e){let r=0,n=1e3/e,o,i,s=(u,d=Date.now())=>{r=d,o=null,i&&(clearTimeout(i),i=null),t.apply(null,u)};return[(...u)=>{let d=Date.now(),m=d-r;m>=n?s(u,d):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},n-m)))},()=>o&&s(o)]}var Pi=nu;var ut=(t,e,r=3)=>{let n=0,o=Ri(50,250);return Pi(i=>{let s=i.loaded,a=i.lengthComputable?i.total:void 0,c=s-n,u=o(c),d=s<=a;n=s;let m={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&d?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(m)},r)},Mn=(t,e)=>{let r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Fn=t=>(...e)=>p.asap(()=>t(...e));var ki=L.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,L.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(L.origin),L.navigator&&/(msie|trident)/i.test(L.navigator.userAgent)):()=>!0;var ji=L.hasStandardBrowserEnv?{write(t,e,r,n,o,i){let s=[t+"="+encodeURIComponent(e)];p.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),p.isString(n)&&s.push("path="+n),p.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){let e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function zn(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function qn(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Yt(t,e,r){let n=!zn(e);return t&&(n||r==!1)?qn(t,e):e}var Zi=t=>t instanceof F?{...t}:t;function ae(t,e){e=e||{};let r={};function n(u,d,m,b){return p.isPlainObject(u)&&p.isPlainObject(d)?p.merge.call({caseless:b},u,d):p.isPlainObject(d)?p.merge({},d):p.isArray(d)?d.slice():d}function o(u,d,m,b){if(p.isUndefined(d)){if(!p.isUndefined(u))return n(void 0,u,m,b)}else return n(u,d,m,b)}function i(u,d){if(!p.isUndefined(d))return n(void 0,d)}function s(u,d){if(p.isUndefined(d)){if(!p.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function a(u,d,m){if(m in e)return n(u,d);if(m in t)return n(void 0,u)}let c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,d,m)=>o(Zi(u),Zi(d),m,!0)};return p.forEach(Object.keys(Object.assign({},t,e)),function(d){let m=c[d]||o,b=m(t[d],e[d],d);p.isUndefined(b)&&m!==a||(r[d]=b)}),r}var Er=t=>{let e=ae({},t),{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=e;e.headers=s=F.from(s),e.url=Ht(Yt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(p.isFormData(r)){if(L.hasStandardBrowserEnv||L.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){let[u,...d]=c?c.split(";").map(m=>m.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...d].join("; "))}}if(L.hasStandardBrowserEnv&&(n&&p.isFunction(n)&&(n=n(e)),n||n!==!1&&ki(e.url))){let u=o&&i&&ji.read(i);u&&s.set(o,u)}return e};var ou=typeof XMLHttpRequest!="undefined",Ui=ou&&function(t){return new Promise(function(r,n){let o=Er(t),i=o.data,s=F.from(o.headers).normalize(),{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,d,m,b,C,h;function v(){C&&C(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function x(){if(!_)return;let N=F.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),D={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:N,config:t,request:_};Gt(function(ye){r(ye),v()},function(ye){n(ye),v()},D),_=null}"onloadend"in _?_.onloadend=x:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(x)},_.onabort=function(){_&&(n(new A("Request aborted",A.ECONNABORTED,t,_)),_=null)},_.onerror=function(){n(new A("Network Error",A.ERR_NETWORK,t,_)),_=null},_.ontimeout=function(){let z=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",D=o.transitional||Ir;o.timeoutErrorMessage&&(z=o.timeoutErrorMessage),n(new A(z,D.clarifyTimeoutError?A.ETIMEDOUT:A.ECONNABORTED,t,_)),_=null},i===void 0&&s.setContentType(null),"setRequestHeader"in _&&p.forEach(s.toJSON(),function(z,D){_.setRequestHeader(D,z)}),p.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),a&&a!=="json"&&(_.responseType=o.responseType),u&&([b,h]=ut(u,!0),_.addEventListener("progress",b)),c&&_.upload&&([m,C]=ut(c),_.upload.addEventListener("progress",m),_.upload.addEventListener("loadend",C)),(o.cancelToken||o.signal)&&(d=N=>{_&&(n(!N||N.type?new de(null,t,_):N),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));let P=Ln(o.url);if(P&&L.protocols.indexOf(P)===-1){n(new A("Unsupported protocol "+P+":",A.ERR_BAD_REQUEST,t));return}_.send(i||null)})};var iu=(t,e)=>{let{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,o,i=function(u){if(!o){o=!0,a();let d=u instanceof Error?u:this.reason;n.abort(d instanceof A?d:new de(d instanceof Error?d.message:d))}},s=e&&setTimeout(()=>{s=null,i(new A(`timeout ${e} of ms exceeded`,A.ETIMEDOUT))},e),a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),t=null)};t.forEach(u=>u.addEventListener("abort",i));let{signal:c}=n;return c.unsubscribe=()=>p.asap(a),c}},Ni=iu;var su=function*(t,e){let r=t.byteLength;if(!e||r<e){yield t;return}let n=0,o;for(;n<r;)o=n+e,yield t.slice(n,o),n=o},au=async function*(t,e){for await(let r of cu(t))yield*su(r,e)},cu=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},Vn=(t,e,r,n)=>{let o=au(t,e),i=0,s,a=c=>{s||(s=!0,n&&n(c))};return new ReadableStream({async pull(c){try{let{done:u,value:d}=await o.next();if(u){a(),c.close();return}let m=d.byteLength;if(r){let b=i+=m;r(b)}c.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})};var Pr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Li=Pr&&typeof ReadableStream=="function",uu=Pr&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Mi=(t,...e)=>{try{return!!t(...e)}catch{return!1}},du=Li&&Mi(()=>{let t=!1,e=new Request(L.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Di=64*1024,$n=Li&&Mi(()=>p.isReadableStream(new Response("").body)),Rr={stream:$n&&(t=>t.body)};Pr&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Rr[e]&&(Rr[e]=p.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new A(`Response type '${e}' is not supported`,A.ERR_NOT_SUPPORT,n)})})})(new Response);var lu=async t=>{if(t==null)return 0;if(p.isBlob(t))return t.size;if(p.isSpecCompliantForm(t))return(await new Request(L.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(p.isArrayBufferView(t)||p.isArrayBuffer(t))return t.byteLength;if(p.isURLSearchParams(t)&&(t=t+""),p.isString(t))return(await uu(t)).byteLength},fu=async(t,e)=>{let r=p.toFiniteNumber(t.getContentLength());return r==null?lu(e):r},Fi=Pr&&(async t=>{let{url:e,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:d,withCredentials:m="same-origin",fetchOptions:b}=Er(t);u=u?(u+"").toLowerCase():"text";let C=Ni([o,i&&i.toAbortSignal()],s),h,v=C&&C.unsubscribe&&(()=>{C.unsubscribe()}),_;try{if(c&&du&&r!=="get"&&r!=="head"&&(_=await fu(d,n))!==0){let D=new Request(e,{method:"POST",body:n,duplex:"half"}),te;if(p.isFormData(n)&&(te=D.headers.get("content-type"))&&d.setContentType(te),D.body){let[ye,ke]=Mn(_,ut(Fn(c)));n=Vn(D.body,Di,ye,ke)}}p.isString(m)||(m=m?"include":"omit");let x="credentials"in Request.prototype;h=new Request(e,{...b,signal:C,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:x?m:void 0});let P=await fetch(h,b),N=$n&&(u==="stream"||u==="response");if($n&&(a||N&&v)){let D={};["status","statusText","headers"].forEach(gr=>{D[gr]=P[gr]});let te=p.toFiniteNumber(P.headers.get("content-length")),[ye,ke]=a&&Mn(te,ut(Fn(a),!0))||[];P=new Response(Vn(P.body,Di,ye,()=>{ke&&ke(),v&&v()}),D)}u=u||"text";let z=await Rr[p.findKey(Rr,u)||"text"](P,t);return!N&&v&&v(),await new Promise((D,te)=>{Gt(D,te,{data:z,headers:F.from(P.headers),status:P.status,statusText:P.statusText,config:t,request:h})})}catch(x){throw v&&v(),x&&x.name==="TypeError"&&/Load failed|fetch/i.test(x.message)?Object.assign(new A("Network Error",A.ERR_NETWORK,t,h),{cause:x.cause||x}):A.from(x,x&&x.code,t,h)}});var Bn={http:Tr,xhr:Ui,fetch:Fi};p.forEach(Bn,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});var zi=t=>`- ${t}`,pu=t=>p.isFunction(t)||t===null||t===!1,kr={getAdapter:t=>{t=p.isArray(t)?t:[t];let{length:e}=t,r,n,o={};for(let i=0;i<e;i++){r=t[i];let s;if(n=r,!pu(r)&&(n=Bn[(s=String(r)).toLowerCase()],n===void 0))throw new A(`Unknown adapter '${s}'`);if(n)break;o[s||"#"+i]=n}if(!n){let i=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build")),s=e?i.length>1?`since :
|
|
4
|
+
`+i.map(zi).join(`
|
|
5
|
+
`):" "+zi(i[0]):"as no adapter specified";throw new A("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:Bn};function Hn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new de(null,t)}function jr(t){return Hn(t),t.headers=F.from(t.headers),t.data=Jt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),kr.getAdapter(t.adapter||at.adapter)(t).then(function(n){return Hn(t),n.data=Jt.call(t,t.transformResponse,n),n.headers=F.from(n.headers),n},function(n){return Kt(n)||(Hn(t),n&&n.response&&(n.response.data=Jt.call(t,t.transformResponse,n.response),n.response.headers=F.from(n.response.headers))),Promise.reject(n)})}var Zr="1.10.0";var Ur={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ur[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var qi={};Ur.transitional=function(e,r,n){function o(i,s){return"[Axios v"+Zr+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(e===!1)throw new A(o(s," has been removed"+(r?" in "+r:"")),A.ERR_DEPRECATED);return r&&!qi[s]&&(qi[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,s,a):!0}};Ur.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function mu(t,e,r){if(typeof t!="object")throw new A("options must be an object",A.ERR_BAD_OPTION_VALUE);let n=Object.keys(t),o=n.length;for(;o-- >0;){let i=n[o],s=e[i];if(s){let a=t[i],c=a===void 0||s(a,i,t);if(c!==!0)throw new A("option "+i+" must be "+c,A.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new A("Unknown option "+i,A.ERR_BAD_OPTION)}}var Xt={assertOptions:mu,validators:Ur};var le=Xt.validators,dt=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Pn,response:new Pn}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;let i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
6
|
+
`+i):n.stack=i}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=ae(this.defaults,r);let{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Xt.assertOptions(n,{silentJSONParsing:le.transitional(le.boolean),forcedJSONParsing:le.transitional(le.boolean),clarifyTimeoutError:le.transitional(le.boolean)},!1),o!=null&&(p.isFunction(o)?r.paramsSerializer={serialize:o}:Xt.assertOptions(o,{encode:le.function,serialize:le.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Xt.assertOptions(r,{baseUrl:le.spelling("baseURL"),withXsrfToken:le.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&p.merge(i.common,i[r.method]);i&&p.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),r.headers=F.concat(s,i);let a=[],c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(c=c&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});let u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let d,m=0,b;if(!c){let h=[jr.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,u),b=h.length,d=Promise.resolve(r);m<b;)d=d.then(h[m++],h[m++]);return d}b=a.length;let C=r;for(m=0;m<b;){let h=a[m++],v=a[m++];try{C=h(C)}catch(_){v.call(this,_);break}}try{d=jr.call(this,C)}catch(h){return Promise.reject(h)}for(m=0,b=u.length;m<b;)d=d.then(u[m++],u[m++]);return d}getUri(e){e=ae(this.defaults,e);let r=Yt(e.baseURL,e.url,e.allowAbsoluteUrls);return Ht(r,e.params,e.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(e){dt.prototype[e]=function(r,n){return this.request(ae(n||{},{method:e,url:r,data:(n||{}).data}))}});p.forEach(["post","put","patch"],function(e){function r(n){return function(i,s,a){return this.request(ae(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}dt.prototype[e]=r(),dt.prototype[e+"Form"]=r(!0)});var Qt=dt;var Wn=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});let n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i,s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},e(function(i,s,a){n.reason||(n.reason=new de(i,s,a),r(n.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 r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new t(function(o){e=o}),cancel:e}}},Vi=Wn;function Jn(t){return function(r){return t.apply(null,r)}}function Kn(t){return p.isObject(t)&&t.isAxiosError===!0}var Gn={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(Gn).forEach(([t,e])=>{Gn[e]=t});var $i=Gn;function Bi(t){let e=new Qt(t),r=Vt(Qt.prototype.request,e);return p.extend(r,Qt.prototype,e,{allOwnKeys:!0}),p.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return Bi(ae(t,o))},r}var M=Bi(at);M.Axios=Qt;M.CanceledError=de;M.CancelToken=Vi;M.isCancel=Kt;M.VERSION=Zr;M.toFormData=Ce;M.AxiosError=A;M.Cancel=M.CanceledError;M.all=function(e){return Promise.all(e)};M.spread=Jn;M.isAxiosError=Kn;M.mergeConfig=ae;M.AxiosHeaders=F;M.formToJSON=t=>Ar(p.isHTMLForm(t)?new FormData(t):t);M.getAdapter=kr.getAdapter;M.HttpStatusCode=$i;M.default=M;var Nr=M;var{Axios:by,AxiosError:_y,CanceledError:xy,isCancel:wy,CancelToken:Cy,VERSION:Ty,all:Sy,Cancel:Iy,isAxiosError:Ay,spread:Oy,toFormData:Ey,AxiosHeaders:Ry,HttpStatusCode:Py,formToJSON:ky,getAdapter:jy,mergeConfig:Zy}=Nr;var Xi=vr(Fr());var zr=class{constructor(e){this.API_VERSION="2022-03-01-preview";let{identifier:r,host:n}=e;this.baseURL=new URL(`/copilotstudio/prebuilt/authenticated/bots/${r}`,n),this.baseURL.searchParams.append("api-version",this.API_VERSION)}getConversationUrl(e){let r=new URL(this.baseURL.href);return r.pathname=`${r.pathname}/conversations`,e&&(r.pathname=`${r.pathname}/${e}`),r.href}};var qr=class{constructor(e){this.API_VERSION="2022-03-01-preview";let{schema:r,host:n}=e;this.baseURL=new URL(`/copilotstudio/dataverse-backed/authenticated/bots/${r}`,n),this.baseURL.searchParams.append("api-version",this.API_VERSION)}getConversationUrl(e){let r=new URL(this.baseURL.href);return r.pathname=`${r.pathname}/conversations`,e&&(r.pathname=`${r.pathname}/${e}`),r.href}};var Ne=(0,Xi.debug)("copilot-studio:power-platform");function $r(t,e){var d,m;let r=5;if((d=t.directConnectUrl)!=null&&d.trim()){if(Ne.debug(`Using direct connection: ${t.directConnectUrl}`),!er(t.directConnectUrl))throw new Error("directConnectUrl must be a valid URL");return t.directConnectUrl.toLowerCase().includes("tenants/00000000-0000-0000-0000-000000000000")?(Ne.debug(`Direct connection cannot be used, forcing default settings flow. Tenant ID is missing in the URL: ${t.directConnectUrl}`),$r({...t,directConnectUrl:""},e)):Pu(t.directConnectUrl,e).href}let n=t.cloud&&t.cloud.toString().trim()!=="",o=t.customPowerPlatformCloud!==void 0&&t.customPowerPlatformCloud.trim()!=="";if(n&&!Object.values(qt).includes(t.cloud))throw new Error("Invalid PowerPlatformCloud enum key");let i=n?t.cloud:-1;if(i===100&&o)throw new Error("customPowerPlatformCloud must be provided when PowerPlatformCloud is Other");if(!((m=t.environmentId)!=null&&m.trim()))throw new Error("EnvironmentId must be provided");if(t.agentIdentifier===void 0||t.agentIdentifier.trim()==="")throw new Error("AgentIdentifier must be provided");if(i!==-1&&(Ne.debug(`Using specified cloud setting: ${i}`),r=i),i===100)if(o&&er(t.customPowerPlatformCloud))Ne.debug(`Using custom Power Platform cloud: ${t.customPowerPlatformCloud}`),r=100;else throw new Error("customPowerPlatformCloud must be a valid URL");let s;if(t.copilotAgentType&&t.copilotAgentType.toString().trim()!=="")if(Object.values(zt).includes(t.copilotAgentType))Ne.debug(`Using specified agent type: ${t.copilotAgentType}`),s=t.copilotAgentType;else throw new Error("Invalid AgentType enum key");else Ne.debug("Using default agent type: Published"),s=0;t.customPowerPlatformCloud=o?t.customPowerPlatformCloud:"api.unknown.powerplatform.com";let a=ku(r,t.environmentId,t.customPowerPlatformCloud),u={0:()=>new qr({host:a,schema:t.agentIdentifier}),1:()=>new zr({host:a,identifier:t.agentIdentifier})}[s]().getConversationUrl(e);return Ne.debug(`Generated Copilot Studio connection URL: ${u}`),u}function Qi(t,e=-1,r="",n=""){var o,i;if(!n&&!(t!=null&&t.directConnectUrl)){if(e===100&&!r)throw new Error("cloudBaseAddress must be provided when PowerPlatformCloudCategory is Other");if(!t&&e===-1)throw new Error("Either settings or cloud must be provided");if(t&&t.cloud&&t.cloud!==-1&&(e=t.cloud),e===100)if(r&&er(r))e=100;else if(t!=null&&t.customPowerPlatformCloud&&er(t.customPowerPlatformCloud))e=100,r=t.customPowerPlatformCloud;else throw new Error("Either CustomPowerPlatformCloud or cloudBaseAddress must be provided when PowerPlatformCloudCategory is Other");return r!=null||(r="api.unknown.powerplatform.com"),`https://${Vr(e,r)}/.default`}else if(n||(n=(o=t==null?void 0:t.directConnectUrl)!=null?o:""),n&&er(n)){if(Yi(new URL(n))===-1){let s=(i=t==null?void 0:t.cloud)!=null?i:e;if(s===100||s===-1)throw new Error("Unable to resolve the PowerPlatform Cloud from DirectConnectUrl. The Token Audience resolver requires a specific PowerPlatformCloudCategory.");if(s!==-1)return`https://${Vr(s,"")}/.default`;throw new Error("Unable to resolve the PowerPlatform Cloud from DirectConnectUrl. The Token Audience resolver requires a specific PowerPlatformCloudCategory.")}return`https://${Vr(Yi(new URL(n)),"")}/.default`}else throw new Error("DirectConnectUrl must be provided when DirectConnectUrl is set")}function er(t){try{let e=t.startsWith("http")?t:`https://${t}`;return!!new URL(e)}catch{return!1}}function Pu(t,e){let r=new URL(t);return r.searchParams.has("api-version")||r.searchParams.append("api-version","2022-03-01-preview"),r.pathname.endsWith("/")&&(r.pathname=r.pathname.slice(0,-1)),r.pathname.includes("/conversations")&&(r.pathname=r.pathname.substring(0,r.pathname.indexOf("/conversations"))),r.pathname=`${r.pathname}/conversations`,e&&(r.pathname=`${r.pathname}/${e}`),r}function ku(t,e,r){if(t===100&&(!r||!r.trim()))throw new Error("cloudBaseAddress must be provided when PowerPlatformCloud is Other");r=r!=null?r:"api.unknown.powerplatform.com";let n=e.toLowerCase().replaceAll("-",""),o=ju(t),i=n.substring(0,n.length-o),s=n.substring(n.length-o);return new URL(`https://${i}.${s}.environment.${Vr(t,r)}`)}function Vr(t,e){switch(t){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: ${t}`)}}function ju(t){switch(t){case 4:case 5:return 2;default:return 1}}function Yi(t){switch(t.host.toLowerCase()){case"api.powerplatform.localhost":return 13;case"api.exp.powerplatform.com":return 0;case"api.dev.powerplatform.com":return 1;case"api.prv.powerplatform.com":return 12;case"api.test.powerplatform.com":return 2;case"api.preprod.powerplatform.com":return 3;case"api.powerplatform.com":return 5;case"api.gov.powerplatform.microsoft.us":return 14;case"api.high.powerplatform.microsoft.us":return 7;case"api.appsplatform.us":return 8;case"api.powerplatform.partner.microsoftonline.cn":return 9;default:return-1}}var mr=vr(Oa());var bn=class{constructor(e){this.activity=e}};var Pa=vr(Fr());var Ea={name:"@microsoft/agents-copilotstudio-client",version:"0.6.11",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.6.11",axios:"^1.9.0",rxjs:"7.8.2",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 _n={};var Q=(0,Pa.debug)("copilot-studio:client"),we=class we{constructor(e,r){this.conversationId="";this.settings=e,this.client=Nr.create(),this.client.defaults.headers.common.Authorization=`Bearer ${r}`,this.client.defaults.headers.common["User-Agent"]=we.getProductInfo()}async postRequestAsync(e){var m,b,C,h;let r=[];Q.debug(`>>> SEND TO ${e.url}`);let n=await this.client(e);if(this.settings.useExperimentalEndpoint&&!((m=this.settings.directConnectUrl)!=null&&m.trim())){let v=(b=n.headers)==null?void 0:b[we.islandExperimentalUrlHeaderKey];v&&(this.settings.directConnectUrl=v,Q.debug(`Island Experimental URL: ${v}`))}this.conversationId=(h=(C=n.headers)==null?void 0:C[we.conversationIdHeaderKey])!=null?h:"",this.conversationId&&Q.debug(`Conversation ID: ${this.conversationId}`);let o={...n.headers};delete o.Authorization,delete o[we.conversationIdHeaderKey],Q.debug("Headers received:",o);let s=n.data.pipeThrough(new TextDecoderStream).getReader(),a="",c=[],u=async({done:v,value:_})=>v?(Q.debug("Stream complete"),a+=_,c.push(a),c):(Q.info("Agent is typing ..."),a+=_,await u(await s.read()));return(await s.read().then(u)).forEach(v=>{v.toString().split(`
|
|
7
|
+
`).filter(P=>P.substring(0,4)==="data"&&P!=="data: end\r").forEach(P=>{var N,z;try{let D=mr.Activity.fromJson(P.substring(5,P.length));D.type===mr.ActivityTypes.Message?(r.push(D),this.conversationId.trim()||(this.conversationId=(z=(N=D.conversation)==null?void 0:N.id)!=null?z:"",Q.debug(`Conversation ID: ${this.conversationId}`))):Q.debug(`Activity type: ${D.type}`)}catch(D){throw Q.error("Error: ",D),D}})}),r}static getProductInfo(){let e=`CopilotStudioClient.agents-sdk-js/${Ea.version}`,r;return typeof window!="undefined"&&window.navigator?r=`${e} ${navigator.userAgent}`:r=`${e} nodejs/${process.version} ${_n.platform()}-${_n.arch()}/${_n.release()}`,Q.debug(`User-Agent: ${r}`),r}async startConversationAsync(e=!0){var a;let o={method:"post",url:$r(this.settings),headers:{Accept:"text/event-stream","Content-Type":"application/json"},data:{emitStartConversationEvent:e},responseType:"stream",adapter:"fetch"};Q.info("Starting conversation ...");let i=await this.postRequestAsync(o),s=i[0];return Q.info(`Conversation '${(a=s.conversation)==null?void 0:a.id}' started. Received ${i.length} activities.`,i),s}async askQuestionAsync(e,r=this.conversationId){var m,b;let o={type:"message",text:e,conversation:{id:r}},i=mr.Activity.fromObject(o),s=(b=(m=i.conversation)==null?void 0:m.id)!=null?b:r,a=$r(this.settings,s),c=new bn(i),u={method:"post",url:a,headers:{Accept:"text/event-stream","Content-Type":"application/json"},data:c,responseType:"stream",adapter:"fetch"};Q.info(`Asking question: ${e} ...`);let d=await this.postRequestAsync(u);return Q.info(`Received ${d.length} activities.`,d),d}};we.conversationIdHeaderKey="x-ms-conversationid",we.islandExperimentalUrlHeaderKey="x-ms-d2e-experimental",we.scopeFromSettings=Qi;var Ra=we;var V=[];for(let t=0;t<256;++t)V.push((t+256).toString(16).slice(1));function ka(t,e=0){return(V[t[e+0]]+V[t[e+1]]+V[t[e+2]]+V[t[e+3]]+"-"+V[t[e+4]]+V[t[e+5]]+"-"+V[t[e+6]]+V[t[e+7]]+"-"+V[t[e+8]]+V[t[e+9]]+"-"+V[t[e+10]]+V[t[e+11]]+V[t[e+12]]+V[t[e+13]]+V[t[e+14]]+V[t[e+15]]).toLowerCase()}var Jo,rp=new Uint8Array(16);function Ko(){if(!Jo){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Jo=crypto.getRandomValues.bind(crypto)}return Jo(rp)}var np=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Go={randomUUID:np};function op(t,e,r){var o,i,s;if(Go.randomUUID&&!e&&!t)return Go.randomUUID();t=t||{};let n=(s=(i=t.random)!=null?i:(o=t.rng)==null?void 0:o.call(t))!=null?s:Ko();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){if(r=r||0,r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let a=0;a<16;++a)e[r+a]=n[a];return e}return ka(n)}var Yo=op;var Xo=function(t,e){return Xo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Xo(t,e)};function Re(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Xo(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function hr(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ut(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i}function Nt(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,i;n<o;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}function ie(t){return typeof t=="function"}function xn(t){var e=function(n){Error.call(n),n.stack=new Error().stack},r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var wn=xn(function(t){return function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
8
|
+
`+r.map(function(n,o){return o+1+") "+n.toString()}).join(`
|
|
9
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function yr(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Dt=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,r,n,o,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=hr(s),c=a.next();!c.done;c=a.next()){var u=c.value;u.remove(this)}}catch(v){e={error:v}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}else s.remove(this);var d=this.initialTeardown;if(ie(d))try{d()}catch(v){i=v instanceof wn?v.errors:[v]}var m=this._finalizers;if(m){this._finalizers=null;try{for(var b=hr(m),C=b.next();!C.done;C=b.next()){var h=C.value;try{ja(h)}catch(v){i=i!=null?i:[],v instanceof wn?i=Nt(Nt([],Ut(i)),Ut(v.errors)):i.push(v)}}}catch(v){n={error:v}}finally{try{C&&!C.done&&(o=b.return)&&o.call(b)}finally{if(n)throw n.error}}}if(i)throw new wn(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)ja(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&yr(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&yr(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}();var Qo=Dt.EMPTY;function Cn(t){return t instanceof Dt||t&&"closed"in t&&ie(t.remove)&&ie(t.add)&&ie(t.unsubscribe)}function ja(t){ie(t)?t():t.unsubscribe()}var ue={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Lt={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Lt.delegate;return o!=null&&o.setTimeout?o.setTimeout.apply(o,Nt([t,e],Ut(r))):setTimeout.apply(void 0,Nt([t,e],Ut(r)))},clearTimeout:function(t){var e=Lt.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Za(t){Lt.setTimeout(function(){var e=ue.onUnhandledError;if(e)e(t);else throw t})}function ei(){}var Ua=function(){return ti("C",void 0,void 0)}();function Na(t){return ti("E",void 0,t)}function Da(t){return ti("N",t,void 0)}function ti(t,e,r){return{kind:t,value:e,error:r}}var ot=null;function Mt(t){if(ue.useDeprecatedSynchronousErrorHandling){var e=!ot;if(e&&(ot={errorThrown:!1,error:null}),t(),e){var r=ot,n=r.errorThrown,o=r.error;if(ot=null,n)throw o}}else t()}function La(t){ue.useDeprecatedSynchronousErrorHandling&&ot&&(ot.errorThrown=!0,ot.error=t)}var oi=function(t){Re(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Cn(r)&&r.add(n)):n.destination=cp,n}return e.create=function(r,n,o){return new Sn(r,n,o)},e.prototype.next=function(r){this.isStopped?ni(Da(r),this):this._next(r)},e.prototype.error=function(r){this.isStopped?ni(Na(r),this):(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped?ni(Ua,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Dt);var ip=Function.prototype.bind;function ri(t,e){return ip.call(t,e)}var sp=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var r=this.partialObserver;if(r.next)try{r.next(e)}catch(n){Tn(n)}},t.prototype.error=function(e){var r=this.partialObserver;if(r.error)try{r.error(e)}catch(n){Tn(n)}else Tn(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(r){Tn(r)}},t}(),Sn=function(t){Re(e,t);function e(r,n,o){var i=t.call(this)||this,s;if(ie(r)||!r)s={next:r!=null?r:void 0,error:n!=null?n:void 0,complete:o!=null?o:void 0};else{var a;i&&ue.useDeprecatedNextContext?(a=Object.create(r),a.unsubscribe=function(){return i.unsubscribe()},s={next:r.next&&ri(r.next,a),error:r.error&&ri(r.error,a),complete:r.complete&&ri(r.complete,a)}):s=r}return i.destination=new sp(s),i}return e}(oi);function Tn(t){ue.useDeprecatedSynchronousErrorHandling?La(t):Za(t)}function ap(t){throw t}function ni(t,e){var r=ue.onStoppedNotification;r&&Lt.setTimeout(function(){return r(t,e)})}var cp={closed:!0,next:ei,error:ap,complete:ei};var Ma=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Fa(t){return t}function za(t){return t.length===0?Fa:t.length===1?t[0]:function(r){return t.reduce(function(n,o){return o(n)},r)}}var Ft=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,n){var o=this,i=dp(e)?e:new Sn(e,r,n);return Mt(function(){var s=o,a=s.operator,c=s.source;i.add(a?a.call(i,c):c?o._subscribe(i):o._trySubscribe(i))}),i},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){e.error(r)}},t.prototype.forEach=function(e,r){var n=this;return r=qa(r),new r(function(o,i){var s=new Sn({next:function(a){try{e(a)}catch(c){i(c),s.unsubscribe()}},error:i,complete:o});n.subscribe(s)})},t.prototype._subscribe=function(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)},t.prototype[Ma]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return za(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=qa(e),new e(function(n,o){var i;r.subscribe(function(s){return i=s},function(s){return o(s)},function(){return n(i)})})},t.create=function(e){return new t(e)},t}();function qa(t){var e;return(e=t!=null?t:ue.Promise)!==null&&e!==void 0?e:Promise}function up(t){return t&&ie(t.next)&&ie(t.error)&&ie(t.complete)}function dp(t){return t&&t instanceof oi||up(t)&&Cn(t)}var Va=xn(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}});var ii=function(t){Re(e,t);function e(){var r=t.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return e.prototype.lift=function(r){var n=new $a(this,this);return n.operator=r,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new Va},e.prototype.next=function(r){var n=this;Mt(function(){var o,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var s=hr(n.currentObservers),a=s.next();!a.done;a=s.next()){var c=a.value;c.next(r)}}catch(u){o={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}}})},e.prototype.error=function(r){var n=this;Mt(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var o=n.observers;o.length;)o.shift().error(r)}})},e.prototype.complete=function(){var r=this;Mt(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var n=this,o=this,i=o.hasError,s=o.isStopped,a=o.observers;return i||s?Qo:(this.currentObservers=null,a.push(r),new Dt(function(){n.currentObservers=null,yr(a,r)}))},e.prototype._checkFinalizedStatuses=function(r){var n=this,o=n.hasError,i=n.thrownError,s=n.isStopped;o?r.error(i):s&&r.complete()},e.prototype.asObservable=function(){var r=new Ft;return r.source=this,r},e.create=function(r,n){return new $a(r,n)},e}(Ft);var $a=function(t){Re(e,t);function e(r,n){var o=t.call(this)||this;return o.destination=r,o.source=n,o}return e.prototype.next=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,r)},e.prototype.error=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.call(n,r)},e.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},e.prototype._subscribe=function(r){var n,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&o!==void 0?o:Qo},e}(ii);var si=function(t){Re(e,t);function e(r){var n=t.call(this)||this;return n._value=r,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(r){var n=t.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},e.prototype.getValue=function(){var r=this,n=r.hasError,o=r.thrownError,i=r._value;if(n)throw o;return this._throwIfClosed(),i},e.prototype.next=function(r){t.prototype.next.call(this,this._value=r)},e}(ii);var Wa=vr(Fr()),Pe=(0,Wa.debug)("copilot-studio:webchat"),Ba=class{static createConnection(e,r){Pe.info("--> Creating connection between Copilot Studio and WebChat ...");let n=0,o,i,s=new si(0),a=Ha(async d=>{if(o=d,s.value<2){s.next(2);return}Pe.debug("--> Connection established."),u();let m=await e.startConversationAsync();i=m.conversation,n=0,c(m)}),c=d=>{let m={...d,timestamp:new Date().toISOString(),channelData:{...d.channelData,"webchat:sequence-id":n++}};Pe.debug(`Notify '${m.type}' activity to WebChat:`,m),o==null||o.next(m)},u=()=>{if(!(r!=null&&r.showTyping))return;let d=i?{id:i.id,name:i.name}:{id:"agent",name:"Agent"};c({type:"typing",from:d})};return{connectionStatus$:s,activity$:a,postActivity(d){var m;if(Pe.info("--> Preparing to send activity to Copilot Studio ..."),!((m=d.text)!=null&&m.trim()))throw new Error("Activity text cannot be empty.");if(!o)throw new Error("Activity subscriber is not initialized.");return Ha(async b=>{try{let C=Yo();Pe.info("--> Sending activity to Copilot Studio ..."),c({...d,id:C}),u();let h=await e.askQuestionAsync(d.text);for(let v of h)c(v);b.next(C),b.complete(),Pe.info("--> Activity received correctly from Copilot Studio.")}catch(C){Pe.error("Error sending Activity to Copilot Studio:",C),b.error(C)}})},end(){Pe.info("--> Ending connection between Copilot Studio and WebChat ..."),s.complete(),o&&(o.complete(),o=void 0)}}}};function Ha(t){return new Ft(e=>{Promise.resolve(t(e)).catch(r=>e.error(r))})}export{zt as AgentType,ai as ConnectionSettings,Ra as CopilotStudioClient,Ba as CopilotStudioWebChat,bn as ExecuteTurnRequest,qt as PowerPlatformCloud,$r as getCopilotStudioConnectionUrl,Qi as getTokenAudience,yp as loadCopilotStudioConnectionSettingsFromEnv};
|
|
10
10
|
//# sourceMappingURL=browser.mjs.map
|