(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{42510:function(e,t,r){"use strict";let{FetchHTTPClient:n}=r(64167);let AnalyticsResponse=class AnalyticsResponse{constructor(e,t,r,n){this.success=e,this.statusCode=t,this.message=r,this.eventResponseList=n}};let EventResponse=class EventResponse{constructor(e,t,r){this.messageId=e,this.results=t,this.segmentEvent=r}};let BatchInterceptor=class BatchInterceptor{static toAnalyticsResponse(e,t,r){let n=JSON.parse(JSON.stringify(e.batch)),o=[],[a,s,c]=[r.success,t.status,t.statusText];if(s>=200&&s<=299){let e=JSON.parse(JSON.stringify(r));return"validationReports"in e&&e.validationReports.forEach(e=>{let t=n.find(t=>t.messageId===e.messageId);t&&o.push(new EventResponse(t.messageId,e.results,t))}),new AnalyticsResponse(a,s,c,o)}if(s>=400&&s<=499){let e=JSON.parse(JSON.stringify(r)),t=e.message,l="error"in t?t.error:c;return n.forEach(e=>{o.push(new EventResponse(e.messageId,[],e))}),new AnalyticsResponse(a,s,l,o)}return n.forEach(e=>{o.push(new EventResponse(e.messageId,[],e))}),new AnalyticsResponse(a,s,c,o)}};e.exports={AnalyticsFetchHTTPClient:class extends n{constructor(e,t){super(),this.httpClient="function"==typeof e?new n(e):null!=e?e:new n,this.analyticsClient=t}async makeRequest(e){let t=this.httpClient.makeRequest(e),r=await t;if(429===r.status)return t;let n=this.analyticsClient.getResponseCallback();if(null!==n){let t=await r.clone().json(),o=BatchInterceptor.toAnalyticsResponse(e.data,r,t);n(o)}return t}}}},34479:function(e,t,r){"use strict";let n=r(96486),{Analytics:o}=r(64167),{AnalyticsFetchHTTPClient:a}=r(42510),{requireValue:s,validateTrackEvent:c,validateTraitEvent:l,validateUIEvent:f,validateScreenEvent:d,validateOperationalEvent:h,validateAliasType:p,validateGroupType:g,validateEnvOverrideIfPresent:y}=r(29941),v="prod";function useDefault(e,t){return void 0===e?t:e}let LoggingResponseCallback=class LoggingResponseCallback{static callback(e){let t=e.statusCode;t>=200&&t<=299?0===e.eventResponseList.length?console.debug("Event(s) submitted to GASv3"):e.eventResponseList.forEach(e=>{console.warn("Validation report for event with message ID %s:\n",e.messageId,JSON.stringify(e,null,2))}):400===t||404===t?(console.warn("GASv3 submission failed with HTTP Status Code %d: %s",e.statusCode,e.message),e.eventResponseList.forEach(e=>{console.warn("Event with message ID %s:\n",e.messageId,JSON.stringify(e,null,2))})):(console.info("GASv3 submission failed with HTTP Status Code %d: %s",e.statusCode,e.message),e.eventResponseList.forEach(e=>{console.debug("Event with message ID %s:\n",e.messageId,JSON.stringify(e,null,2))}))}};let AnalyticsClient=class AnalyticsClient{static _buildProperties({userIdType:e,tenantIdType:t,tenantId:r,event:o,subproduct:a,product:s,env:c,datacenter:l,version:f,origin:d,orgId:h,workspaceId:p,aliases:g,groups:y},v){return n.merge({},o,{product:s,env:c,datacenter:l,version:f,eventType:v,subproduct:a,userIdType:e,tenantIdType:t,tenantId:r,origin:d,orgId:h,workspaceId:p,aliases:g,groups:y})}constructor({env:e,product:t,subproduct:r,sendEventHook:n,datacenter:c,version:l,origin:f,maxEventsInBatch:d,flushInterval:h,baseUrl:p,logger:g,errorHandler:m,perimeter:b,httpClient:_,httpRequestTimeout:w,maxRetries:S,envOverride:k}){var C,I;s(e,"env"),s(t,"product"),y(k),this.console=useDefault(g,console),this.config={env:e,product:t,subproduct:r,sendEventHook:n,datacenter:c,origin:useDefault(f,"server"),version:l},this.validationMode=e===v?"quiet":"complete",this.responseCallback=LoggingResponseCallback.callback,this.analyticsClient=new o({writeKey:"BLANK",flushAt:d||250,flushInterval:h||1e4,maxRetries:S||3,host:p||(C=e,(I=b)&&"fedramp-moderate"===I?C===v?"https://as.atlassian-us-gov-mod.com/api":"https://as.staging.atl-paas-us-gov-mod.net/api":C===v?"https://as.atlassian.com/api":"https://as.staging.atl-paas.net/api"),path:"/api/v1/batch",httpRequestTimeout:w,httpClient:new a(_,this)}),m&&"function"==typeof m&&this.analyticsClient.on("error",m),this.groups=void 0,this.aliases=void 0}_getTimeoutMilliseconds(e){let t=useDefault(e,6e4);return t<5e3?(this.console.warn(`timeoutMilliseconds was set less than the allowed minimum of 5000. Using the minimum allowed value instead.`),5e3):t}_eventCallback(e){this.config.sendEventHook&&this.config.sendEventHook(e)}_buildCompleteTrackEvent({userIdType:e,userId:t,anonymousId:r,tenantIdType:o,tenantId:a,trackEvent:s,subproduct:c,product:l,os:f,timestamp:d,orgId:h,workspaceId:p,groups:g,validationMode:y}){let v=n.merge({},this.groups,g);return{userId:t,anonymousId:r,event:s.actionSubject+" "+s.action,properties:AnalyticsClient._buildProperties({userIdType:e,tenantIdType:o,tenantId:a,event:s,subproduct:useDefault(c,this.config.subproduct),product:useDefault(l,this.config.product),env:this.config.env,datacenter:this.config.datacenter,version:this.config.version,origin:useDefault(s.origin,this.config.origin),orgId:h,workspaceId:p,aliases:this.aliases,groups:n.isEmpty(v)?void 0:v},"track"),timestamp:d,context:{os:f,validationMode:null!=y?y:this.validationMode}}}_buildCompleteTraitEvent({entityType:e,entityId:t,entityTraits:r,os:n,timestamp:o,tenantId:a,tenantIdType:s,validationMode:c}){return{anonymousId:"dummy-id",traits:{entityId:t,entityTraits:r,entityType:e},timestamp:o,context:{os:n,validationMode:null!=c?c:this.validationMode},tenantId:a,tenantIdType:s}}_buildCompleteOperationalEvent({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,operationalEvent:a,subproduct:s,product:c,os:l,timestamp:f,orgId:d,workspaceId:h,validationMode:p}){return{userId:t,anonymousId:r,event:a.actionSubject+" "+a.action,properties:AnalyticsClient._buildProperties({userIdType:e,tenantIdType:n,tenantId:o,event:a,subproduct:useDefault(s,this.config.subproduct),product:useDefault(c,this.config.product),env:this.config.env,datacenter:this.config.datacenter,version:this.config.version,origin:useDefault(a.origin,this.config.origin),orgId:d,workspaceId:h,aliases:this.aliases,groups:this.groups},"operational"),timestamp:f,context:{os:l,validationMode:null!=p?p:this.validationMode}}}_buildCompleteUIEvent({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,uiEvent:a,subproduct:s,product:c,os:l,timestamp:f,orgId:d,workspaceId:h,validationMode:p}){return{userId:t,anonymousId:r,event:a.actionSubject+" "+a.action,properties:AnalyticsClient._buildProperties({userIdType:e,tenantIdType:n,tenantId:o,event:a,subproduct:useDefault(s,this.config.subproduct),product:useDefault(c,this.config.product),env:this.config.env,datacenter:this.config.datacenter,version:this.config.version,origin:useDefault(a.origin,this.config.origin),orgId:d,workspaceId:h,aliases:this.aliases,groups:this.groups},"ui"),timestamp:f,context:{os:l,validationMode:null!=p?p:this.validationMode}}}_buildScreenEvent({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,name:a,screenEvent:s,subproduct:c,product:l,os:f,timestamp:d,orgId:h,workspaceId:p,validationMode:g}){return{userId:t,anonymousId:r,name:a,properties:AnalyticsClient._buildProperties({userIdType:e,tenantIdType:n,tenantId:o,event:s,subproduct:useDefault(c,this.config.subproduct),product:useDefault(l,this.config.product),env:this.config.env,datacenter:this.config.datacenter,version:this.config.version,origin:useDefault(s.origin,this.config.origin),orgId:h,workspaceId:p,aliases:this.aliases,groups:this.groups},"screen"),timestamp:d,context:{os:f,validationMode:null!=g?g:this.validationMode}}}sendOperationalEvent({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,operationalEvent:a,subproduct:s,product:c,os:l,timestamp:f,orgId:d,workspaceId:p,validationMode:g}){return h({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,timestamp:f,operationalEvent:a}).then(()=>new Promise((h,y)=>{let v=this._buildCompleteOperationalEvent({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,operationalEvent:a,subproduct:s,product:c,os:l,timestamp:f,orgId:d,workspaceId:p,validationMode:g});this.analyticsClient.track(v,(e,t)=>{e?y(e):(this._eventCallback(v,t),h(t))})}))}sendTrackEvent({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,trackEvent:a,groups:s,subproduct:l,product:f,os:d,timestamp:h,orgId:p,workspaceId:g,validationMode:y}){return c({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,timestamp:h,trackEvent:a,groups:s}).then(()=>new Promise((c,v)=>{let m=this._buildCompleteTrackEvent({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,trackEvent:a,subproduct:l,product:f,os:d,timestamp:h,orgId:p,workspaceId:g,groups:s,validationMode:y});this.analyticsClient.track(m,(e,t)=>{e?v(e):(this._eventCallback(m,t),c(t))})}))}sendTraitEvent({entityType:e,entityId:t,entityTraits:r,os:n,timestamp:o,tenantId:a,tenantIdType:s,validationMode:c}){return l({entityType:e,entityId:t,entityTraits:r,timestamp:o,tenantId:a,tenantIdType:s}).then(()=>new Promise((l,f)=>{let d=this._buildCompleteTraitEvent({entityType:e,entityId:t,entityTraits:r,os:n,timestamp:o,tenantId:a,tenantIdType:s,validationMode:c});this.analyticsClient.identify(d,(e,t)=>{e?f(e):(this._eventCallback(d,t),l(t))})}))}sendUIEvent({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,uiEvent:a,subproduct:s,product:c,os:l,timestamp:d,orgId:h,workspaceId:p,validationMode:g}){return f({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,timestamp:d,uiEvent:a}).then(()=>new Promise((f,y)=>{let v=this._buildCompleteUIEvent({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,uiEvent:a,subproduct:s,product:c,os:l,timestamp:d,orgId:h,workspaceId:p,validationMode:g});this.analyticsClient.track(v,(e,t)=>{e?y(e):(this._eventCallback(v,t),f(t))})}))}sendScreenEvent({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,name:a,screenEvent:s,subproduct:c,product:l,os:f,timestamp:h,orgId:p,workspaceId:g,validationMode:y}){return d({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,name:a,timestamp:h,screenEvent:s}).then(()=>new Promise((d,v)=>{let m=this._buildScreenEvent({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,name:a,screenEvent:s,subproduct:c,product:l,os:f,timestamp:h,orgId:p,workspaceId:g,validationMode:y});this.analyticsClient.page(m,(e,t)=>{e?v(e):(this._eventCallback(m,t),d(t))})}))}gracefulShutdown(){return new Promise((e,t)=>{this.analyticsClient.closeAndFlush().then(t=>{e(t)}).catch(e=>{t(e)})})}setGroup(e,t){this.groups||(this.groups={}),g(e),this.groups[e]=t}clearGroups(){this.groups=void 0}setAlias(e,t){this.aliases||(this.aliases={}),p(e),this.aliases[e]=t}clearAliases(){this.aliases=void 0}setResponseCallback(e){this.responseCallback=e}getResponseCallback(){return this.responseCallback}setEventValidationMode(e){this.validationMode=e}};e.exports={AnalyticsClient}},7796:function(e){"use strict";let t={};e.exports={isAllowedAliasType:function(e){return Object.values(t).includes(e)},ALIAS_TYPE:t}},69385:function(e){"use strict";let t="type",r=["id",t];e.exports={CONTAINER_OBJECT_FIELDS_ALLOWED:r,CONTAINER_OBJECT_FIELDS_MANDATORY:["id"],CONTAINER_OBJECT_FIELD_ID:"id",CONTAINER_OBJECT_FIELD_TYPE:t,isAllowedContainerObjectField:function(e){return r.some(t=>t===e)},isValidContainerObjectField:function(e,t){return r.some(t=>t===e)&&"string"==typeof t}}},24427:function(e,t,r){"use strict";let n=r(96486),o="AJS_ANONYMOUS_USER",a="ATLASSIAN_ACCOUNT",s="EMAIL_UUID",c="SITE",l="SITE_USER",f="TRELLO_USER",d="TRELLO_WORKSPACE",h=[o,a,s,"ORG",c,l,f,d];e.exports={AJS_ANONYMOUS_USER:o,ATLASSIAN_ACCOUNT:a,EMAIL_UUID:s,ORG:"ORG",SITE:c,SITE_USER:l,TRELLO_USER:f,TRELLO_WORKSPACE:d,isValidEntityType:function(e){return h.includes(e)},isValidEntityTraitValue:function(e){return n.isFinite(e)||n.isString(e)&&!n.isEmpty(e)||n.isDate(e)||n.isBoolean(e)}}},79743:function(e){"use strict";let t={FEDRAMP_MODERATE_SANDBOX:"fedramp-moderate-sandbox"};e.exports={isAllowedEnvOverride:function(e){return Object.values(t).includes(e)},ENV_OVERRIDES:t}},10309:function(e){"use strict";let t={TRANSACTION_ACCOUNT_ID:"transactionAccountId",PRODUCT_INTEGRATIONS_VENDOR_ID:"productIntegrationsVendorId"};e.exports={isAllowedGroupType:function(e){return Object.values(t).includes(e)},GROUP_TYPE:t}},57343:function(e){"use strict";let t="cloudId",r="halpTeamId",n="loomOrgId",o="trelloWorkspaceId",a="none",s=[t,r,n,o,a];e.exports={CLOUD_ID:t,HALP_TEAM_ID:r,NONE:a,LOOM_ORG_ID:n,TRELLO_WORKSPACE_ID:o,isValidTenantType:function(e){return s.includes(e)}}},74272:function(e){"use strict";let t="atlassianAccount",r="trello",n="hashedEmail",o="opsgenie",a="halp",s="customerAccount",c="loom";e.exports={ATLASSIAN_ACCOUNT:t,TRELLO:r,HASHED_EMAIL:n,OPSGENIE:o,HALP:a,CUSTOMER_ACCOUNT:s,LOOM:c,isValidUserIdType:function(e){return[t,r,n,o,a,s,c].includes(e)}}},99979:function(e,t,r){"use strict";let{AnalyticsClient:n}=r(34479),o=r(57343),a=r(74272),s=r(24427),{GROUP_TYPE:c}=r(10309),{ALIAS_TYPE:l}=r(7796),{ENV_OVERRIDES:f}=r(79743);e.exports={analyticsClient:function(e){return new n(e)},AnalyticsClient:n,tenantTypes:o,userTypes:a,entityTypes:s,aliasTypes:l,groupTypes:c,envOverrides:f}},29941:function(e,t,r){"use strict";let n=r(96486),o=r(57343),a=r(74272),s=r(24427),{CONTAINER_OBJECT_FIELDS_MANDATORY:c,isAllowedContainerObjectField:l,isValidContainerObjectField:f}=r(69385),{isPlainObject:d}=r(3291),{isAllowedAliasType:h}=r(7796),{isAllowedGroupType:p}=r(10309),{isAllowedEnvOverride:g}=r(79743),y="properties.containers";function requireValidEntityData({entityType:e,entityTraits:t}){if(!s.isValidEntityType(e))throw Error(`Unknown entityType ${e}`);if(!n.isObject(t))throw Error("traits.entityTraits should be Object");n.forEach(t,(e,t)=>{if(!s.isValidEntityTraitValue(e))throw Error(`entityTraits.${t}: ${e} should be one of [String|Number|Boolean|Date]`)})}function requireValidTenantData({tenantId:e,tenantIdType:t}){if(e&&requireValue(t,"tenantIdType"),t){if(!o.isValidTenantType(t))throw Error(`Unknown tenantIdType ${t}`);t!==o.NONE&&requireValue(e,"tenantId")}}function requireValidUserData({userIdType:e,userId:t,anonymousId:r}){if(function({userIdType:e,userId:t}){if(t&&requireValue(e,"userIdType"),e){if(!a.isValidUserIdType(e))throw Error(`Unknown userIdType ${e}`);requireValue(t,"userId")}}({userIdType:e,userId:t}),!t&&!r)throw Error("At least one set of identifiers must be passed - userIdType and userId, or anonymousId")}function requireValue(e,t){if(!e)throw Error(`Value ${t} cannot be undefined`);return e}function requireValidContainers(e){if(e&&e.containers){let t=e.containers;if(d(t)){let r={};Object.keys(t).forEach(e=>{r[e]=function(e,t){let r=t[e];if(r){if(d(r)){let e={};return n.merge(e,function(e){let t={};return c.forEach(r=>{let n=e[r];if(f(r,n))t[r]=n;else throw Error(`Mandatory ContainerObject field "${r}" is not valid: "${n}" ; expected a value of type "string"`)}),t}(r)),n.merge(e,function(e){let t={};return Object.keys(e).forEach(r=>{let n=e[r];if(l(r)){if(f(r,n))t[r]=n;else throw Error(`ContainerObject field "${r}" is not valid: "${n}" ; expected a value of type "string"`)}}),t}(r)),e}throw Error(`ContainerObject "${y}.${e}" is not an object.`)}throw Error(`Container Key "${y}.${e}" has no ContainerObject.`)}(e,t)}),e.containers=r}else throw Error(`"${y}" is not an object.`)}}e.exports={requireValue,validateOperationalEvent:function({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,operationalEvent:a}){try{return requireValidUserData({userIdType:e,userId:t,anonymousId:r}),requireValidTenantData({tenantId:o,tenantIdType:n}),requireValue(a,"operationalEvent"),requireValue(a.source,"operationalEvent.source"),requireValue(a.action,"operationalEvent.action"),requireValue(a.actionSubject,"operationalEvent.actionSubject"),requireValidContainers(a),Promise.resolve()}catch(e){return Promise.reject(e)}},validateTrackEvent:function({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,trackEvent:a,groups:s}){try{return requireValidUserData({userIdType:e,userId:t,anonymousId:r}),requireValidTenantData({tenantId:o,tenantIdType:n}),requireValue(a,"trackEvent"),requireValue(a.source,"trackEvent.source"),requireValue(a.action,"trackEvent.action"),requireValue(a.actionSubject,"trackEvent.actionSubject"),requireValidContainers(a),s&&Object.keys(s).forEach(e=>{if(!p(e))throw Error(`groups object has unsupported groupKey: ${e}`)}),Promise.resolve()}catch(e){return Promise.reject(e)}},validateUIEvent:function({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,uiEvent:a}){try{return requireValidUserData({userIdType:e,userId:t,anonymousId:r}),requireValidTenantData({tenantId:o,tenantIdType:n}),requireValue(a,"uiEvent"),requireValue(a.action,"uiEvent.action"),requireValue(a.actionSubject,"uiEvent.actionSubject"),requireValidContainers(a),Promise.resolve()}catch(e){return Promise.reject(e)}},validateScreenEvent:function({userIdType:e,userId:t,anonymousId:r,tenantIdType:n,tenantId:o,name:a,screenEvent:s}){try{return requireValidUserData({userIdType:e,userId:t,anonymousId:r}),requireValidTenantData({tenantId:o,tenantIdType:n}),requireValue(a,"name"),requireValue(s,"screenEvent"),requireValue(s.platform,"screenEvent.platform"),requireValidContainers(s),Promise.resolve()}catch(e){return Promise.reject(e)}},validateTraitEvent:function({entityType:e,entityId:t,entityTraits:r,tenantId:n,tenantIdType:o}){try{return requireValue(e,"entityType"),requireValue(t,"entityId"),requireValue(r,"entityTraits"),requireValidEntityData({entityType:e,entityTraits:r}),requireValidTenantData({tenantId:n,tenantIdType:o}),Promise.resolve()}catch(e){return Promise.reject(e)}},requireValidEntityData,requireValidUserData,requireValidTenantData,requireValidContainers,validateAliasType:function(e){if(requireValue(e,"aliasType"),!h(e))throw Error(`Unknown aliasType ${e}`)},validateGroupType:function(e){if(requireValue(e,"groupType"),!p(e))throw Error(`Unknown groupType ${e}`)},validateEnvOverrideIfPresent:function(e){if(e&&!g(e))throw Error(`Unknown envOverrides value ${e}`)},CONTAINERS_PATH_PREFIX:y}},3291:function(e){"use strict";function isObjectObject(e){return!0==(null!==e&&"object"==typeof e&&!1===Array.isArray(e))&&"[object Object]"===Object.prototype.toString.call(e)}e.exports={isPlainObject:function(e){if(!1===isObjectObject(e))return!1;let t=e.constructor;if("function"!=typeof t)return!1;let r=t.prototype;return!1!==isObjectObject(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}}},64167:function(e,t,r){"use strict";function pTimeout(e,t){return new Promise(function(r,n){var o=setTimeout(function(){n(Error("Promise timed out"))},t);e.then(function(e){return clearTimeout(o),r(e)}).catch(n)})}r.r(t),r.d(t,{Analytics:function(){return Analytics},Context:function(){return Context},FetchHTTPClient:function(){return FetchHTTPClient},default:function(){return C}});var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]{if(!e.writeKey)throw new n("writeKey","writeKey is missing.")},o="1.3.0";function backoff(e){var t=e.minTimeout,r=e.factor,n=e.attempt,o=e.maxTimeout;return Math.min((Math.random()+1)*(void 0===t?500:t)*Math.pow(void 0===r?2:r,n),void 0===o?1/0:o)}let stripTrailingSlash=e=>e.replace(/\/$/,""),tryCreateFormattedUrl=(e,t)=>stripTrailingSlash(new URL(t||"",e).href);for(var a,createDeferred=function(){var e,t,r=new Promise(function(r,n){e=r,t=n});return{resolve:e,reject:t,promise:r}},s=256,c=[];s--;)c[s]=(s+256).toString(16).substring(1);function v4(){var e,t=0,r="";if(!a||s+16>256){for(a=Array(t=256);t--;)a[t]=256*Math.random()|0;t=s=0}for(;t<16;t++)e=a[s+t],6==t?r+=c[15&e|64]:8==t?r+=c[63&e|128]:r+=c[e],1&t&&t>1&&t<11&&(r+="-");return s++,r}let ContextBatch=class ContextBatch{constructor(e){this.id=v4(),this.items=[],this.sizeInBytes=0,this.maxEventCount=Math.max(1,e)}tryAdd(e){if(this.length===this.maxEventCount)return{success:!1,message:`Event limit of ${this.maxEventCount} has been exceeded.`};let t=this.calculateSize(e.context);return t>32768?{success:!1,message:"Event exceeds maximum event size of 32 KB"}:this.sizeInBytes+t>491520?{success:!1,message:"Event has caused batch size to exceed 480 KB"}:(this.items.push(e),this.sizeInBytes+=t,{success:!0})}get length(){return this.items.length}calculateSize(e){return encodeURI(JSON.stringify(e.event)).split(/%..|i/).length}getEvents(){let e=this.items.map(({context:e})=>e.event);return e}getContexts(){return this.items.map(e=>e.context)}resolveEvents(){this.items.forEach(({resolver:e,context:t})=>e(t))}};var l=r(66784);let b64encode=e=>l.lW.from(e).toString("base64");function noop(){}let Publisher=class Publisher{constructor({host:e,path:t,maxRetries:r,flushAt:n,flushInterval:o,writeKey:a,httpRequestTimeout:s,httpClient:c,disable:l},f){this._emitter=f,this._maxRetries=r,this._flushAt=Math.max(n,1),this._flushInterval=o,this._auth=b64encode(`${a}:`),this._url=tryCreateFormattedUrl(e??"https://api.segment.io",t??"/v1/batch"),this._httpRequestTimeout=s??1e4,this._disable=!!l,this._httpClient=c}createBatch(){this.pendingFlushTimeout&&clearTimeout(this.pendingFlushTimeout);let e=new ContextBatch(this._flushAt);return this._batch=e,this.pendingFlushTimeout=setTimeout(()=>{e===this._batch&&(this._batch=void 0),this.pendingFlushTimeout=void 0,e.length&&this.send(e).catch(noop)},this._flushInterval),e}clearBatch(){this.pendingFlushTimeout&&clearTimeout(this.pendingFlushTimeout),this._batch=void 0}flush(e){if(!e||(this._flushPendingItemsCount=e,!this._batch))return;let t=this._batch.length===e;t&&(this.send(this._batch).catch(noop),this.clearBatch())}enqueue(e){let t=this._batch??this.createBatch(),{promise:r,resolve:n}=createDeferred(),o={context:e,resolver:n},a=t.tryAdd(o);if(a.success){let e=t.length===this._flushPendingItemsCount,n=t.length===this._flushAt;return(n||e)&&(this.send(t).catch(noop),this.clearBatch()),r}t.length&&(this.send(t).catch(noop),this.clearBatch());let s=this.createBatch(),c=s.tryAdd(o);if(!c.success)return e.setFailedDelivery({reason:Error(c.message)}),Promise.resolve(e);{let e=s.length===this._flushPendingItemsCount;return e&&(this.send(s).catch(noop),this.clearBatch()),r}}async send(e){this._flushPendingItemsCount&&(this._flushPendingItemsCount-=e.length);let t=e.getEvents(),r=this._maxRetries+1,n=0;for(;n=200&&n.status<300){e.resolveEvents();return}if(400===n.status){resolveFailedBatch(e,Error(`[${n.status}] ${n.statusText}`));return}o=Error(`[${n.status}] ${n.statusText}`)}catch(e){o=e}if(n===r){resolveFailedBatch(e,o);return}await function(e){return new Promise(t=>setTimeout(t,e))}(backoff({attempt:n,minTimeout:25,maxTimeout:1e3}))}}};function resolveFailedBatch(e,t){e.getContexts().forEach(e=>e.setFailedDelivery({reason:t})),e.resolveEvents()}var f=r(83454);let detectRuntime=()=>"object"==typeof f&&f&&"object"==typeof f.env&&f.env&&"string"==typeof f.version?"node":"object"==typeof window?"browser":"undefined"!=typeof WebSocketPair?"cloudflare-worker":"string"==typeof EdgeRuntime?"vercel-edge":"undefined"!=typeof WorkerGlobalScope&&"function"==typeof importScripts?"web-worker":"unknown";var d=r(83454);let createConfiguredNodePlugin=(e,t)=>{let r=new Publisher(e,t);return{publisher:r,plugin:function(e){function action(t){return!function(e){e.updateEvent("context.library.name","@segment/analytics-node"),e.updateEvent("context.library.version",o);let t=detectRuntime();"node"===t&&e.updateEvent("_metadata.nodeVersion",d.version),e.updateEvent("_metadata.jsRuntime",t)}(t),e.enqueue(t)}return{name:"Segment.io",type:"destination",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),alias:action,group:action,identify:action,page:action,screen:action,track:action}}(r)}};function dset(e,t,r){t.split&&(t=t.split("."));for(var n,o,a=0,s=t.length,c=e;at.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}(e,["options"]),y=__assign(__assign(__assign({timestamp:new Date},d),{integrations:s,context:l}),f),v=__assign(__assign({},y),{messageId:this.createMessageId()});return function(e){if(!(null!=e))throw new n("Event",g);if("object"!=typeof e)throw new n("Event",p)}(v),function(e){if(!isString(e.type))throw new n(".type",h)}(v),"track"===v.type&&(function(e){if(!isString(e.event))throw new n(".event",h)}(v),function(e){if(!isPlainObject(e.properties))throw new n(".properties",p)}(v)),["group","identify"].includes(v.type)&&function(e){if(!isPlainObject(e.traits))throw new n(".traits",p)}(v),function(e){var t,r,o,a=".userId/anonymousId/previousId/groupId",s=null!==(o=null!==(r=null!==(t=e.userId)&&void 0!==t?t:e.anonymousId)&&void 0!==r?r:e.groupId)&&void 0!==o?o:e.previousId;if(null!=s){if(!isString(s))throw new n(a,h)}else throw new n(a,g)}(v),v},EventFactory}();let createMessageId=()=>`node-next-${Date.now()}-${v4()}`;let NodeEventFactory=class NodeEventFactory extends y{constructor(){super({createMessageId:createMessageId})}};var v=function(){function CoreLogger(){this._logs=[]}return CoreLogger.prototype.log=function(e,t,r){var n=new Date;this._logs.push({level:e,message:t,time:n,extras:r})},Object.defineProperty(CoreLogger.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),CoreLogger.prototype.flush=function(){if(this.logs.length>1){var e=this._logs.reduce(function(e,t){var r,n,o,a=__assign(__assign({},t),{json:JSON.stringify(t.extras,null," "),extras:t.extras});delete a.time;var s=null!==(o=null===(n=t.time)||void 0===n?void 0:n.toISOString())&&void 0!==o?o:"";return e[s]&&(s="".concat(s,"-").concat(Math.random())),__assign(__assign({},e),((r={})[s]=a,r))},{});console.table?console.table(e):console.log(e)}else this.logs.forEach(function(e){var t=e.level,r=e.message,n=e.extras;"info"===t||"debug"===t?console.log(r,null!=n?n:""):console[t](r,null!=n?n:"")});this._logs=[]},CoreLogger}(),m=function(e){function NullStats(){return null!==e&&e.apply(this,arguments)||this}return __extends(NullStats,e),NullStats.prototype.gauge=function(){for(var e=[],t=0;tt=>{let r=t.failedDelivery();return r?e(r.reason,t):e(void 0,t)},dispatchAndEmit=async(e,t,r,n)=>{try{let o=new Context(e),a=await function(e,t,r,n){return __awaiter(this,void 0,void 0,function(){var o,a;return __generator(this,function(s){switch(s.label){case 0:if(r.emit("dispatch_start",e),o=Date.now(),!t.isEmpty())return[3,2];return[4,t.dispatchSingle(e)];case 1:return a=s.sent(),[3,4];case 2:return[4,t.dispatch(e)];case 3:a=s.sent(),s.label=4;case 4:var c,l,f,d,h,p;if(!(null==n?void 0:n.callback))return[3,6];return[4,(f=a,d=n.callback,c=o,h=Math.max((null!=(l=n.timeout)?l:300)-(Date.now()-c),0),p=function(){try{return Promise.resolve(d(f))}catch(e){return Promise.reject(e)}},new Promise(function(e){return setTimeout(e,h)}).then(function(){return pTimeout(p(),1e3)}).catch(function(e){null==f||f.log("warn","Callback Error",{error:e}),null==f||f.stats.increment("callback_error")}).then(function(){return f}))];case 5:a=s.sent(),s.label=6;case 6:return(null==n?void 0:n.debug)&&a.flush(),[2,a]}})})}(o,t,r,{...n?{callback:normalizeDispatchCb(n)}:{}}),s=a.failedDelivery();s?r.emit("error",{code:"delivery_failure",reason:s.reason,ctx:a}):r.emit(e.type,a)}catch(e){r.emit("error",{code:"unknown",reason:e})}};var _=function(){function Emitter(e){var t;this.callbacks={},this.warned=!1,this.maxListeners=null!==(t=null==e?void 0:e.maxListeners)&&void 0!==t?t:10}return Emitter.prototype.warnIfPossibleMemoryLeak=function(e){!this.warned&&this.maxListeners&&this.callbacks[e].length>this.maxListeners&&(console.warn("Event Emitter: Possible memory leak detected; ".concat(String(e)," has exceeded ").concat(this.maxListeners," listeners.")),this.warned=!0)},Emitter.prototype.on=function(e,t){return this.callbacks[e]?(this.callbacks[e].push(t),this.warnIfPossibleMemoryLeak(e)):this.callbacks[e]=[t],this},Emitter.prototype.once=function(e,t){var r=this,on=function(){for(var n=[],o=0;oe.maxAttempts||e.includes(t))&&(e.queue.push(t),!0)});return this.queue=this.queue.sort(function(t,r){return e.getAttempts(t)-e.getAttempts(r)}),n},PriorityQueue.prototype.pushWithBackoff=function(e){var t=this;if(0===this.getAttempts(e))return this.push(e)[0];var r=this.updateAttempts(e);return!(r>this.maxAttempts||this.includes(e))&&(setTimeout(function(){t.queue.push(e),t.future=t.future.filter(function(t){return t.id!==e.id}),t.emit(w)},backoff({attempt:r-1})),this.future.push(e),!0)},PriorityQueue.prototype.getAttempts=function(e){var t;return null!==(t=this.seen[e.id])&&void 0!==t?t:0},PriorityQueue.prototype.updateAttempts=function(e){return this.seen[e.id]=this.getAttempts(e)+1,this.getAttempts(e)},PriorityQueue.prototype.includes=function(e){return this.queue.includes(e)||this.future.includes(e)||!!this.queue.find(function(t){return t.id===e.id})||!!this.future.find(function(t){return t.id===e.id})},PriorityQueue.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(PriorityQueue.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(PriorityQueue.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),PriorityQueue}(_),createTaskGroup=function(){var e,t,r=0;return{done:function(){return e},run:function(n){var o=n();return"object"==typeof o&&null!==o&&"then"in o&&"function"==typeof o.then&&(1==++r&&(e=new Promise(function(e){return t=e})),o.finally(function(){return 0==--r&&t()})),o}}};function attempt(e,t){e.log("debug","plugin",{plugin:t.name});var r=new Date().getTime(),n=t[e.event.type];return void 0===n?Promise.resolve(e):(function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e()];case 1:return[2,t.sent()];case 2:return[2,Promise.reject(t.sent())];case 3:return[2]}})})})(function(){return n.apply(t,[e])}).then(function(e){var n=new Date().getTime()-r;return e.stats.gauge("plugin_time",n,["plugin:".concat(t.name)]),e}).catch(function(r){if(r instanceof ContextCancelation&&"middleware_cancellation"===r.type)throw r;return r instanceof ContextCancelation?e.log("warn",r.type,{plugin:t.name,error:r}):(e.log("error","plugin Error",{plugin:t.name,error:r}),e.stats.increment("plugin_error",1,["plugin:".concat(t.name)])),r})}var k=function(e){function CoreEventQueue(t){var r=e.call(this)||this;return r.criticalTasks=createTaskGroup(),r.plugins=[],r.failedInitializations=[],r.flushing=!1,r.queue=t,r.queue.on(w,function(){r.scheduleFlush(0)}),r}return __extends(CoreEventQueue,e),CoreEventQueue.prototype.register=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var n=this;return __generator(this,function(o){switch(o.label){case 0:return[4,Promise.resolve(t.load(e,r)).then(function(){n.plugins.push(t)}).catch(function(r){if("destination"===t.type){n.failedInitializations.push(t.name),console.warn(t.name,r),e.log("warn","Failed to load destination",{plugin:t.name,error:r});return}throw r})];case 1:return o.sent(),[2]}})})},CoreEventQueue.prototype.deregister=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){switch(o.label){case 0:if(o.trys.push([0,3,,4]),!t.unload)return[3,2];return[4,Promise.resolve(t.unload(e,r))];case 1:o.sent(),o.label=2;case 2:return this.plugins=this.plugins.filter(function(e){return e.name!==t.name}),[3,4];case 3:return n=o.sent(),e.log("warn","Failed to unload destination",{plugin:t.name,error:n}),[3,4];case 4:return[2]}})})},CoreEventQueue.prototype.dispatch=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),t=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,t]})})},CoreEventQueue.prototype.subscribeToDelivery=function(e){return __awaiter(this,void 0,void 0,function(){var t=this;return __generator(this,function(r){return[2,new Promise(function(r){var onDeliver=function(n,o){n.isSame(e)&&(t.off("flush",onDeliver),r(n))};t.on("flush",onDeliver)})]})})},CoreEventQueue.prototype.dispatchSingle=function(e){return __awaiter(this,void 0,void 0,function(){var t=this;return __generator(this,function(r){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch(function(r){return t.enqueuRetry(r,e)?t.subscribeToDelivery(e):(e.setFailedDelivery({reason:r}),e)})]})})},CoreEventQueue.prototype.isEmpty=function(){return 0===this.queue.length},CoreEventQueue.prototype.scheduleFlush=function(e){var t=this;void 0===e&&(e=500),this.flushing||(this.flushing=!0,setTimeout(function(){t.flush().then(function(){setTimeout(function(){t.flushing=!1,t.queue.length&&t.scheduleFlush(0)},0)})},e))},CoreEventQueue.prototype.deliver=function(e){return __awaiter(this,void 0,void 0,function(){var t,r,n,o;return __generator(this,function(a){switch(a.label){case 0:return[4,this.criticalTasks.done()];case 1:a.sent(),t=Date.now(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=a.sent(),r=Date.now()-t,this.emit("delivery_success",e),e.stats.gauge("delivered",r),e.log("debug","Delivered",e.event),[2,e];case 4:throw o=n=a.sent(),e.log("error","Failed to deliver",o),this.emit("delivery_failure",e,o),e.stats.increment("delivery_failed"),n;case 5:return[2]}})})},CoreEventQueue.prototype.enqueuRetry=function(e,t){return(!(e instanceof ContextCancelation)||!!e.retry)&&this.queue.pushWithBackoff(t)},CoreEventQueue.prototype.flush=function(){return __awaiter(this,void 0,void 0,function(){var e,t;return __generator(this,function(r){switch(r.label){case 0:if(0===this.queue.length||!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=r.sent(),this.emit("flush",e,!0),[3,4];case 3:return t=r.sent(),this.enqueuRetry(t,e)||(e.setFailedDelivery({reason:t}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}})})},CoreEventQueue.prototype.isReady=function(){return!0},CoreEventQueue.prototype.availableExtensions=function(e){var t,r,n=(t="type",r={},this.plugins.filter(function(t){if("destination"!==t.type&&"Segment.io"!==t.name)return!0;var r,n,o,a=void 0;return null===(r=t.alternativeNames)||void 0===r||r.forEach(function(t){void 0!==e[t]&&(a=e[t])}),null!==(o=null!==(n=e[t.name])&&void 0!==n?n:a)&&void 0!==o?o:!1!==("Segment.io"===t.name||e.All)}).forEach(function(e){var n,o=void 0;if("string"==typeof t){var a=e[t];o="string"!=typeof a?JSON.stringify(a):a}else t instanceof Function&&(o=t(e));void 0!==o&&(r[o]=__spreadArray(__spreadArray([],null!==(n=r[o])&&void 0!==n?n:[],!0),[e],!1))}),r),o=n.before,a=n.enrichment,s=n.destination,c=n.after;return{before:void 0===o?[]:o,enrichment:void 0===a?[]:a,destinations:void 0===s?[]:s,after:void 0===c?[]:c}},CoreEventQueue.prototype.flushOne=function(e){var t,r;return __awaiter(this,void 0,void 0,function(){var n,o,a,s,c,l,f,d,h,p,g,y,v;return __generator(this,function(m){switch(m.label){case 0:if(!this.isReady())throw Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),o=(n=this.availableExtensions(null!==(t=e.event.integrations)&&void 0!==t?t:{})).before,a=n.enrichment,s=0,c=o,m.label=1;case 1:var _;if(!(s{if("cloudflare-worker"===detectRuntime())return[];let t=new(globalThis.AbortController||AbortController),r=setTimeout(()=>{t.abort()},e);return r?.unref?.(),[t.signal,r]},fetch=async(...e)=>{if(globalThis.fetch)return globalThis.fetch(...e);if("string"!=typeof EdgeRuntime)return(await r.e(1068).then(r.t.bind(r,1068,23))).default(...e);throw Error("Invariant: an edge runtime that does not support fetch should not exist")};let FetchHTTPClient=class FetchHTTPClient{constructor(e){this._fetch=e??fetch}async makeRequest(e){let[t,r]=abortSignalAfterTimeout(e.httpRequestTimeout),n={url:e.url,method:e.method,headers:e.headers,body:JSON.stringify(e.data),signal:t};return this._fetch(e.url,n).finally(()=>clearTimeout(r))}};let Analytics=class Analytics extends NodeEmitter{constructor(e){super(),this._isClosed=!1,this._pendingEvents=0,this._isFlushing=!1,validateSettings(e),this._eventFactory=new NodeEventFactory,this._queue=new NodeEventQueue;let t=e.flushInterval??1e4;this._closeAndFlushDefaultTimeout=1.25*t;let{plugin:r,publisher:n}=createConfiguredNodePlugin({writeKey:e.writeKey,host:e.host,path:e.path,maxRetries:e.maxRetries??3,flushAt:e.flushAt??e.maxEventsInBatch??15,httpRequestTimeout:e.httpRequestTimeout,disable:e.disable,flushInterval:t,httpClient:"function"==typeof e.httpClient?new FetchHTTPClient(e.httpClient):e.httpClient??new FetchHTTPClient},this);this._publisher=n,this.ready=this.register(r).then(()=>void 0),this.emit("initialize",e),function(e){for(var t=e.constructor.prototype,r=0,n=Object.getOwnPropertyNames(t);r{this._pendingEvents?this.once("drained",()=>{e()}):e()}).finally(()=>{this._isFlushing=!1});return e?pTimeout(r,e).catch(()=>void 0):r}_dispatch(e,t){if(this._isClosed){this.emit("call_after_close",e);return}this._pendingEvents++,dispatchAndEmit(e,this._queue,this,t).catch(e=>e).finally(()=>{this._pendingEvents--,this._pendingEvents||this.emit("drained")})}alias({userId:e,previousId:t,context:r,timestamp:n,integrations:o},a){let s=this._eventFactory.alias(e,t,{context:r,integrations:o,timestamp:n});this._dispatch(s,a)}group({timestamp:e,groupId:t,userId:r,anonymousId:n,traits:o={},context:a,integrations:s},c){let l=this._eventFactory.group(t,o,{context:a,anonymousId:n,userId:r,timestamp:e,integrations:s});this._dispatch(l,c)}identify({userId:e,anonymousId:t,traits:r={},context:n,timestamp:o,integrations:a},s){let c=this._eventFactory.identify(e,r,{context:n,anonymousId:t,userId:e,timestamp:o,integrations:a});this._dispatch(c,s)}page({userId:e,anonymousId:t,category:r,name:n,properties:o,context:a,timestamp:s,integrations:c},l){let f=this._eventFactory.page(r??null,n??null,o,{context:a,anonymousId:t,userId:e,timestamp:s,integrations:c});this._dispatch(f,l)}screen({userId:e,anonymousId:t,category:r,name:n,properties:o,context:a,timestamp:s,integrations:c},l){let f=this._eventFactory.screen(r??null,n??null,o,{context:a,anonymousId:t,userId:e,timestamp:s,integrations:c});this._dispatch(f,l)}track({userId:e,anonymousId:t,event:r,properties:n,context:o,timestamp:a,integrations:s},c){let l=this._eventFactory.track(r,n,{context:o,userId:e,anonymousId:t,timestamp:a,integrations:s});this._dispatch(l,c)}register(...e){return this._queue.criticalTasks.run(async()=>{let t=Context.system(),r=e.map(e=>this._queue.register(t,e,this));await Promise.all(r),this.emit("register",e.map(e=>e.name))})}async deregister(...e){let t=Context.system(),r=e.map(e=>{let r=this._queue.plugins.find(t=>t.name===e);if(r)return this._queue.deregister(t,r,this);t.log("warn",`plugin ${e} not found`)});await Promise.all(r),this.emit("deregister",e)}};var C=Analytics},66784:function(e,t,r){"use strict";/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */let n=r(79742),o=r(80645),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function createBuffer(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Buffer.prototype),t}function Buffer(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(e)}return from(e,t,r)}function from(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!Buffer.isEncoding(t))throw TypeError("Unknown encoding: "+t);let r=0|byteLength(e,t),n=createBuffer(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(isInstance(e,Uint8Array)){let t=new Uint8Array(e);return fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength)}return fromArrayLike(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(isInstance(e,ArrayBuffer)||e&&isInstance(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(isInstance(e,SharedArrayBuffer)||e&&isInstance(e.buffer,SharedArrayBuffer)))return fromArrayBuffer(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return Buffer.from(n,t,r);let o=function(e){var t;if(Buffer.isBuffer(e)){let t=0|checked(e.length),r=createBuffer(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?createBuffer(0):fromArrayLike(e):"Buffer"===e.type&&Array.isArray(e.data)?fromArrayLike(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return Buffer.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function assertSize(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function allocUnsafe(e){return assertSize(e),createBuffer(e<0?0:0|checked(e))}function fromArrayLike(e){let t=e.length<0?0:0|checked(e.length),r=createBuffer(t);for(let n=0;n=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||isInstance(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(o)return n?-1:utf8ToBytes(e).length;t=(""+t).toLowerCase(),o=!0}}function slowToString(e,t,r){let o=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(a=r=+r)!=a&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return -1;r=e.length-1}else if(r<0){if(!o)return -1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,o);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,o);throw TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,o){let a,s=1,c=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,c/=2,l/=2,r/=2}function read(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){let n=-1;for(a=r;ac&&(r=c-l),a=r;a>=0;a--){let r=!0;for(let n=0;n239?4:t>223?3:t>191?2:1;if(o+s<=r){let r,n,c,l;switch(s){case 1:t<128&&(a=t);break;case 2:(192&(r=e[o+1]))==128&&(l=(31&t)<<6|63&r)>127&&(a=l);break;case 3:r=e[o+1],n=e[o+2],(192&r)==128&&(192&n)==128&&(l=(15&t)<<12|(63&r)<<6|63&n)>2047&&(l<55296||l>57343)&&(a=l);break;case 4:r=e[o+1],n=e[o+2],c=e[o+3],(192&r)==128&&(192&n)==128&&(192&c)==128&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&c)>65535&&l<1114112&&(a=l)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),o+=s}return function(e){let t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nr)throw RangeError("Trying to access beyond buffer length")}function checkInt(e,t,r,n,o,a){if(!Buffer.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw RangeError("Index out of range")}function wrtBigUInt64LE(e,t,r,n,o){checkIntBI(t,n,o,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function wrtBigUInt64BE(e,t,r,n,o){checkIntBI(t,n,o,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function checkIEEE754(e,t,r,n,o,a){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function writeFloat(e,t,r,n,a){return t=+t,r>>>=0,a||checkIEEE754(e,t,r,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,a){return t=+t,r>>>=0,a||checkIEEE754(e,t,r,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,r,n,52,8),r+8}t.lW=Buffer,t.h2=50,Buffer.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(e,t,r){return from(e,t,r)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(e,t,r){return(assertSize(e),e<=0)?createBuffer(e):void 0!==t?"string"==typeof r?createBuffer(e).fill(t,r):createBuffer(e).fill(t):createBuffer(e)},Buffer.allocUnsafe=function(e){return allocUnsafe(e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(e)},Buffer.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==Buffer.prototype},Buffer.compare=function(e,t){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),isInstance(t,Uint8Array)&&(t=Buffer.from(t,t.offset,t.byteLength)),!Buffer.isBuffer(e)||!Buffer.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,a=Math.min(r,n);on.length?(Buffer.isBuffer(t)||(t=Buffer.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else if(Buffer.isBuffer(t))t.copy(n,o);else throw TypeError('"list" argument must be an Array of Buffers');o+=t.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},a&&(Buffer.prototype[a]=Buffer.prototype.inspect),Buffer.prototype.compare=function(e,t,r,n,o){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),!Buffer.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;let a=o-n,s=r-t,c=Math.min(a,s),l=this.slice(n,o),f=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let p=this.length-t;if((void 0===r||r>p)&&(r=p),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let g=!1;for(;;)switch(n){case"hex":return function(e,t,r,n){let o;r=Number(r)||0;let a=e.length-r;n?(n=Number(n))>a&&(n=a):n=a;let s=t.length;for(n>s/2&&(n=s/2),o=0;o>8,o.push(r%256),o.push(n);return o}(e,this.length-d),this,d,h);default:if(g)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),g=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},Buffer.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=this[e],o=1,a=0;for(;++a>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod(function(e){validateNumber(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&boundsError(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+16777216*this[++e],o=this[++e]+256*this[++e]+65536*this[++e]+16777216*r;return BigInt(n)+(BigInt(o)<>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&boundsError(e,this.length-8);let n=16777216*t+65536*this[++e]+256*this[++e]+this[++e],o=16777216*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=this[e],o=1,a=0;for(;++a=(o*=128)&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=t,o=1,a=this[e+--n];for(;n>0&&(o*=256);)a+=this[e+--n]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},Buffer.prototype.readInt8=function(e,t){return(e>>>=0,t||checkOffset(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},Buffer.prototype.readInt16LE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod(function(e){validateNumber(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&boundsError(e,this.length-8);let n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&boundsError(e,this.length-8);let n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||checkOffset(e,4,this.length),o.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),o.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),o.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),o.read(this,e,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;checkInt(this,e,t,r,n,0)}let o=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;checkInt(this,e,t,r,n,0)}let o=r-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+r},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,255,0),this[t]=255&e,t+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod(function(e,t=0){return wrtBigUInt64LE(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod(function(e,t=0){return wrtBigUInt64BE(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),Buffer.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);checkInt(this,e,t,r,n-1,-n)}let o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},Buffer.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);checkInt(this,e,t,r,n-1,-n)}let o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},Buffer.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},Buffer.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod(function(e,t=0){return wrtBigUInt64LE(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),Buffer.prototype.writeBigInt64BE=defineBigIntMethod(function(e,t=0){return wrtBigUInt64BE(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),Buffer.prototype.writeFloatLE=function(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function(e,t,r,n){if(!Buffer.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function checkIntBI(e,t,r,n,o,a){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${o} and < 2${o} ** ${(a+1)*8}${o}`:`>= -(2${o} ** ${(a+1)*8-1}${o}) and < 2 ** ${(a+1)*8-1}${o}`:`>= ${t}${o} and <= ${r}${o}`,new s.ERR_OUT_OF_RANGE("value",n,e)}validateNumber(o,"offset"),(void 0===n[o]||void 0===n[o+a])&&boundsError(o,n.length-(a+1))}function validateNumber(e,t){if("number"!=typeof e)throw new s.ERR_INVALID_ARG_TYPE(t,"number",e)}function boundsError(e,t,r){if(Math.floor(e)!==e)throw validateNumber(e,r),new s.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new s.ERR_BUFFER_OUT_OF_BOUNDS;throw new s.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}E("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),E("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),E("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?o=addNumericalSeparator(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=addNumericalSeparator(o)),o+="n"),n+=` It must be ${t}. Received ${o}`},RangeError);let c=/[^+/0-9A-Za-z-_]/g;function utf8ToBytes(e,t){let r;t=t||1/0;let n=e.length,o=null,a=[];for(let s=0;s55295&&r<57344){if(!o){if(r>56319||s+1===n){(t-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function base64ToBytes(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(c,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function blitBuffer(e,t,r,n){let o;for(o=0;o=t.length)&&!(o>=e.length);++o)t[o+r]=e[o];return o}function isInstance(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let l=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function defineBigIntMethod(e){return"undefined"==typeof BigInt?BufferBigIntNotDefined:e}function BufferBigIntNotDefined(){throw Error("BigInt not supported")}},79742:function(e,t){"use strict";t.byteLength=function(e){var t=getLens(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,a=getLens(e),s=a[0],c=a[1],l=new o((s+c)*3/4-c),f=0,d=c>0?s-4:s;for(r=0;r>16&255,l[f++]=t>>8&255,l[f++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[f++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[f++]=t>>8&255,l[f++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,a=[],s=0,c=n-o;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}(e,s,s+16383>c?c:s+16383));return 1===o?a.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===o&&a.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),a.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},80645:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */t.read=function(e,t,r,n,o){var a,s,c=8*o-n-1,l=(1<>1,d=-7,h=r?o-1:0,p=r?-1:1,g=e[t+h];for(h+=p,a=g&(1<<-d)-1,g>>=-d,d+=c;d>0;a=256*a+e[t+h],h+=p,d-=8);for(s=a&(1<<-d)-1,a>>=-d,d+=n;d>0;s=256*s+e[t+h],h+=p,d-=8);if(0===a)a=1-f;else{if(a===l)return s?NaN:(g?-1:1)*(1/0);s+=Math.pow(2,n),a-=f}return(g?-1:1)*s*Math.pow(2,a-n)},t.write=function(e,t,r,n,o,a){var s,c,l,f=8*a-o-1,d=(1<>1,p=23===o?5960464477539062e-23:0,g=n?0:a-1,y=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(c=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+h>=1?t+=p/l:t+=p*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=d?(c=0,s=d):s+h>=1?(c=(t*l-1)*Math.pow(2,o),s+=h):(c=t*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;e[r+g]=255&c,g+=y,c/=256,o-=8);for(s=s<0;e[r+g]=255&s,g+=y,s/=256,f-=8);e[r+g-y]|=128*v}},62705:function(e,t,r){var n=r(55639).Symbol;e.exports=n},44239:function(e,t,r){var n=r(62705),o=r(89607),a=r(2333),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):a(e)}},27561:function(e,t,r){var n=r(67990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},31957:function(e,t,r){var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},89607:function(e,t,r){var n=r(62705),o=Object.prototype,a=o.hasOwnProperty,s=o.toString,c=n?n.toStringTag:void 0;e.exports=function(e){var t=a.call(e,c),r=e[c];try{e[c]=void 0;var n=!0}catch(e){}var o=s.call(e);return n&&(t?e[c]=r:delete e[c]),o}},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},55639:function(e,t,r){var n=r(31957),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},67990:function(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},23279:function(e,t,r){var n=r(13218),o=r(7771),a=r(14841),s=Math.max,c=Math.min;e.exports=function(e,t,r){var l,f,d,h,p,g,y=0,v=!1,m=!1,b=!0;if("function"!=typeof e)throw TypeError("Expected a function");function invokeFunc(t){var r=l,n=f;return l=f=void 0,y=t,h=e.apply(n,r)}function shouldInvoke(e){var r=e-g,n=e-y;return void 0===g||r>=t||r<0||m&&n>=d}function timerExpired(){var e,r,n,a=o();if(shouldInvoke(a))return trailingEdge(a);p=setTimeout(timerExpired,(e=a-g,r=a-y,n=t-e,m?c(n,d-r):n))}function trailingEdge(e){return(p=void 0,b&&l)?invokeFunc(e):(l=f=void 0,h)}function debounced(){var e,r=o(),n=shouldInvoke(r);if(l=arguments,f=this,g=r,n){if(void 0===p)return y=e=g,p=setTimeout(timerExpired,t),v?invokeFunc(e):h;if(m)return clearTimeout(p),p=setTimeout(timerExpired,t),invokeFunc(g)}return void 0===p&&(p=setTimeout(timerExpired,t)),h}return t=a(t)||0,n(r)&&(v=!!r.leading,d=(m="maxWait"in r)?s(a(r.maxWait)||0,t):d,b="trailing"in r?!!r.trailing:b),debounced.cancel=function(){void 0!==p&&clearTimeout(p),y=0,l=g=f=p=void 0},debounced.flush=function(){return void 0===p?h:trailingEdge(o())},debounced}},13218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},33448:function(e,t,r){var n=r(44239),o=r(37005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},96486:function(e,t,r){var n;e=r.nmd(e),(function(){var o,a="Expected a function",s="__lodash_hash_undefined__",c="__lodash_placeholder__",l=1/0,f=0/0,d=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],h="[object Arguments]",p="[object Array]",g="[object Boolean]",y="[object Date]",v="[object Error]",m="[object Function]",b="[object GeneratorFunction]",_="[object Map]",w="[object Number]",S="[object Object]",k="[object Promise]",C="[object RegExp]",I="[object Set]",A="[object String]",x="[object Symbol]",O="[object WeakMap]",T="[object ArrayBuffer]",L="[object DataView]",B="[object Float32Array]",j="[object Float64Array]",R="[object Int8Array]",F="[object Int16Array]",M="[object Int32Array]",P="[object Uint8Array]",D="[object Uint8ClampedArray]",U="[object Uint16Array]",N="[object Uint32Array]",z=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,G=RegExp(q.source),H=RegExp(W.source),K=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,Y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,et=RegExp(ee.source),er=/^\s+/,en=/\s/,eo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ei=/\{\n\/\* \[wrapped with (.+)\] \*/,ea=/,? & /,es=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,eu=/[()=,{}\[\]\/\s]/,ec=/\\(\\)?/g,el=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ef=/\w*$/,ed=/^[-+]0x[0-9a-f]+$/i,eh=/^0b[01]+$/i,ep=/^\[object .+?Constructor\]$/,eg=/^0o[0-7]+$/i,ey=/^(?:0|[1-9]\d*)$/,ev=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,em=/($^)/,eb=/['\n\r\u2028\u2029\\]/g,e_="\ud800-\udfff",ew="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",eS="\\u2700-\\u27bf",eE="a-z\\xdf-\\xf6\\xf8-\\xff",ek="A-Z\\xc0-\\xd6\\xd8-\\xde",eC="\\ufe0e\\ufe0f",eI="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",eA="['’]",ex="["+eI+"]",eO="["+ew+"]",eT="["+eE+"]",eL="[^"+e_+eI+"\\d+"+eS+eE+ek+"]",eB="\ud83c[\udffb-\udfff]",ej="[^"+e_+"]",eR="(?:\ud83c[\udde6-\uddff]){2}",eF="[\ud800-\udbff][\udc00-\udfff]",eM="["+ek+"]",eP="\\u200d",eD="(?:"+eT+"|"+eL+")",eU="(?:"+eA+"(?:d|ll|m|re|s|t|ve))?",eN="(?:"+eA+"(?:D|LL|M|RE|S|T|VE))?",ez="(?:"+eO+"|"+eB+")?",e$="["+eC+"]?",eV="(?:"+eP+"(?:"+[ej,eR,eF].join("|")+")"+e$+ez+")*",eW=e$+ez+eV,eG="(?:"+["["+eS+"]",eR,eF].join("|")+")"+eW,eH="(?:"+[ej+eO+"?",eO,eR,eF,"["+e_+"]"].join("|")+")",eK=RegExp(eA,"g"),eJ=RegExp(eO,"g"),eZ=RegExp(eB+"(?="+eB+")|"+eH+eW,"g"),eQ=RegExp([eM+"?"+eT+"+"+eU+"(?="+[ex,eM,"$"].join("|")+")","(?:"+eM+"|"+eL+")+"+eN+"(?="+[ex,eM+eD,"$"].join("|")+")",eM+"?"+eD+"+"+eU,eM+"+"+eN,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",eG].join("|"),"g"),eX=RegExp("["+eP+e_+ew+eC+"]"),eY=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,e0=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],e1=-1,e2={};e2[B]=e2[j]=e2[R]=e2[F]=e2[M]=e2[P]=e2[D]=e2[U]=e2[N]=!0,e2[h]=e2[p]=e2[T]=e2[g]=e2[L]=e2[y]=e2[v]=e2[m]=e2[_]=e2[w]=e2[S]=e2[C]=e2[I]=e2[A]=e2[O]=!1;var e3={};e3[h]=e3[p]=e3[T]=e3[L]=e3[g]=e3[y]=e3[B]=e3[j]=e3[R]=e3[F]=e3[M]=e3[_]=e3[w]=e3[S]=e3[C]=e3[I]=e3[A]=e3[x]=e3[P]=e3[D]=e3[U]=e3[N]=!0,e3[v]=e3[m]=e3[O]=!1;var e4={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},e6=parseFloat,e5=parseInt,e8="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,e9="object"==typeof self&&self&&self.Object===Object&&self,e7=e8||e9||Function("return this")(),te=t&&!t.nodeType&&t,tt=te&&e&&!e.nodeType&&e,tr=tt&&tt.exports===te,tn=tr&&e8.process,to=function(){try{var e=tt&&tt.require&&tt.require("util").types;if(e)return e;return tn&&tn.binding&&tn.binding("util")}catch(e){}}(),ti=to&&to.isArrayBuffer,ta=to&&to.isDate,ts=to&&to.isMap,tu=to&&to.isRegExp,tc=to&&to.isSet,tl=to&&to.isTypedArray;function apply(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function arrayAggregator(e,t,r,n){for(var o=-1,a=null==e?0:e.length;++o-1}function arrayIncludesWith(e,t,r){for(var n=-1,o=null==e?0:e.length;++n-1;);return r}function charsEndIndex(e,t){for(var r=e.length;r--&&baseIndexOf(t,e[r],0)>-1;);return r}var td=basePropertyOf({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),th=basePropertyOf({"&":"&","<":"<",">":">",'"':""","'":"'"});function escapeStringChar(e){return"\\"+e4[e]}function hasUnicode(e){return eX.test(e)}function mapToArray(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function overArg(e,t){return function(r){return e(t(r))}}function replaceHolders(e,t){for(var r=-1,n=e.length,o=0,a=[];++r",""":'"',"'":"'"}),tg=function runInContext(e){var t,r,n,en,e_=(e=null==e?e7:tg.defaults(e7.Object(),e,tg.pick(e7,e0))).Array,ew=e.Date,eS=e.Error,eE=e.Function,ek=e.Math,eC=e.Object,eI=e.RegExp,eA=e.String,ex=e.TypeError,eO=e_.prototype,eT=eE.prototype,eL=eC.prototype,eB=e["__core-js_shared__"],ej=eT.toString,eR=eL.hasOwnProperty,eF=0,eM=(t=/[^.]+$/.exec(eB&&eB.keys&&eB.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"",eP=eL.toString,eD=ej.call(eC),eU=e7._,eN=eI("^"+ej.call(eR).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ez=tr?e.Buffer:o,e$=e.Symbol,eV=e.Uint8Array,eW=ez?ez.allocUnsafe:o,eG=overArg(eC.getPrototypeOf,eC),eH=eC.create,eZ=eL.propertyIsEnumerable,eX=eO.splice,e4=e$?e$.isConcatSpreadable:o,e8=e$?e$.iterator:o,e9=e$?e$.toStringTag:o,te=function(){try{var e=getNative(eC,"defineProperty");return e({},"",{}),e}catch(e){}}(),tt=e.clearTimeout!==e7.clearTimeout&&e.clearTimeout,tn=ew&&ew.now!==e7.Date.now&&ew.now,to=e.setTimeout!==e7.setTimeout&&e.setTimeout,tf=ek.ceil,ty=ek.floor,tv=eC.getOwnPropertySymbols,tm=ez?ez.isBuffer:o,tb=e.isFinite,t_=eO.join,tw=overArg(eC.keys,eC),tS=ek.max,tE=ek.min,tk=ew.now,tC=e.parseInt,tI=ek.random,tA=eO.reverse,tx=getNative(e,"DataView"),tO=getNative(e,"Map"),tT=getNative(e,"Promise"),tL=getNative(e,"Set"),tB=getNative(e,"WeakMap"),tj=getNative(eC,"create"),tR=tB&&new tB,tF={},tM=toSource(tx),tP=toSource(tO),tD=toSource(tT),tU=toSource(tL),tN=toSource(tB),tz=e$?e$.prototype:o,t$=tz?tz.valueOf:o,tV=tz?tz.toString:o;function lodash(e){if(isObjectLike(e)&&!rM(e)&&!(e instanceof LazyWrapper)){if(e instanceof LodashWrapper)return e;if(eR.call(e,"__wrapped__"))return wrapperClone(e)}return new LodashWrapper(e)}var tq=function(){function object(){}return function(e){if(!isObject(e))return{};if(eH)return eH(e);object.prototype=e;var t=new object;return object.prototype=o,t}}();function baseLodash(){}function LodashWrapper(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function LazyWrapper(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Hash(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function baseClone(e,t,r,n,a,s){var c,l=1&t,f=2&t,d=4&t;if(r&&(c=a?r(e,n,a,s):r(e)),o!==c)return c;if(!isObject(e))return e;var p=rM(e);if(p){if(v=e.length,k=new e.constructor(v),v&&"string"==typeof e[0]&&eR.call(e,"index")&&(k.index=e.index,k.input=e.input),c=k,!l)return copyArray(e,c)}else{var v,k,O,z,$,V=t2(e),q=V==m||V==b;if(rD(e))return cloneBuffer(e,l);if(V==S||V==h||q&&!a){if(c=f||q?{}:initCloneObject(e),!l)return f?(O=($=c)&©Object(e,keysIn(e),$),copyObject(e,t1(e),O)):(z=baseAssign(c,e),copyObject(e,t0(e),z))}else{if(!e3[V])return a?e:{};c=function(e,t,r){var n,o,a=e.constructor;switch(t){case T:return cloneArrayBuffer(e);case g:case y:return new a(+e);case L:return n=r?cloneArrayBuffer(e.buffer):e.buffer,new e.constructor(n,e.byteOffset,e.byteLength);case B:case j:case R:case F:case M:case P:case D:case U:case N:return cloneTypedArray(e,r);case _:return new a;case w:case A:return new a(e);case C:return(o=new e.constructor(e.source,ef.exec(e))).lastIndex=e.lastIndex,o;case I:return new a;case x:return t$?eC(t$.call(e)):{}}}(e,V,l)}}s||(s=new Stack);var W=s.get(e);if(W)return W;s.set(e,c),r$(e)?e.forEach(function(n){c.add(baseClone(n,t,r,n,e,s))}):rN(e)&&e.forEach(function(n,o){c.set(o,baseClone(n,t,r,o,e,s))});var G=d?f?getAllKeysIn:getAllKeys:f?keysIn:keys,H=p?o:G(e);return arrayEach(H||e,function(n,o){H&&(n=e[o=n]),assignValue(c,o,baseClone(n,t,r,o,e,s))}),c}function baseConformsTo(e,t,r){var n=r.length;if(null==e)return!n;for(e=eC(e);n--;){var a=r[n],s=t[a],c=e[a];if(o===c&&!(a in e)||!s(c))return!1}return!0}function baseDelay(e,t,r){if("function"!=typeof e)throw new ex(a);return t6(function(){e.apply(o,r)},t)}function baseDifference(e,t,r,n){var o=-1,a=arrayIncludes,s=!0,c=e.length,l=[],f=t.length;if(!c)return l;r&&(t=arrayMap(t,baseUnary(r))),n?(a=arrayIncludesWith,s=!1):t.length>=200&&(a=cacheHas,s=!1,t=new SetCache(t));e:for(;++o-1},ListCache.prototype.set=function(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},MapCache.prototype.clear=function(){this.size=0,this.__data__={hash:new Hash,map:new(tO||ListCache),string:new Hash}},MapCache.prototype.delete=function(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t},MapCache.prototype.get=function(e){return getMapData(this,e).get(e)},MapCache.prototype.has=function(e){return getMapData(this,e).has(e)},MapCache.prototype.set=function(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},SetCache.prototype.add=SetCache.prototype.push=function(e){return this.__data__.set(e,s),this},SetCache.prototype.has=function(e){return this.__data__.has(e)},Stack.prototype.clear=function(){this.__data__=new ListCache,this.size=0},Stack.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Stack.prototype.get=function(e){return this.__data__.get(e)},Stack.prototype.has=function(e){return this.__data__.has(e)},Stack.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ListCache){var n=r.__data__;if(!tO||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new MapCache(n)}return r.set(e,t),this.size=r.size,this};var tW=createBaseEach(baseForOwn),tG=createBaseEach(baseForOwnRight,!0);function baseEvery(e,t){var r=!0;return tW(e,function(e,n,o){return r=!!t(e,n,o)}),r}function baseExtremum(e,t,r){for(var n=-1,a=e.length;++n0&&r(c)?t>1?baseFlatten(c,t-1,r,n,o):arrayPush(o,c):n||(o[o.length]=c)}return o}var tH=createBaseFor(),tK=createBaseFor(!0);function baseForOwn(e,t){return e&&tH(e,t,keys)}function baseForOwnRight(e,t){return e&&tK(e,t,keys)}function baseFunctions(e,t){return arrayFilter(t,function(t){return isFunction(e[t])})}function baseGet(e,t){t=castPath(t,e);for(var r=0,n=t.length;null!=e&&rt}function baseHas(e,t){return null!=e&&eR.call(e,t)}function baseHasIn(e,t){return null!=e&&t in eC(e)}function baseIntersection(e,t,r){for(var n=r?arrayIncludesWith:arrayIncludes,a=e[0].length,s=e.length,c=s,l=e_(s),f=1/0,d=[];c--;){var h=e[c];c&&t&&(h=arrayMap(h,baseUnary(t))),f=tE(h.length,f),l[c]=!r&&(t||a>=120&&h.length>=120)?new SetCache(c&&h):o}h=e[0];var p=-1,g=l[0];e:for(;++p=c)return l;return l*("desc"==r[n]?-1:1)}}return e.index-t.index}(e,t,r)})}function basePickBy(e,t,r){for(var n=-1,o=t.length,a={};++n-1;)c!==e&&eX.call(c,l,1),eX.call(e,l,1);return e}function basePullAt(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==a){var a=o;isIndex(o)?eX.call(e,o,1):baseUnset(e,o)}}return e}function baseRandom(e,t){return e+ty(tI()*(t-e+1))}function baseRepeat(e,t){var r="";if(!e||t<1||t>9007199254740991)return r;do t%2&&(r+=e),(t=ty(t/2))&&(e+=e);while(t);return r}function baseRest(e,t){return t5(overRest(e,t,identity),e+"")}function baseSet(e,t,r,n){if(!isObject(e))return e;t=castPath(t,e);for(var a=-1,s=t.length,c=s-1,l=e;null!=l&&++ao?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=e_(o);++n>>1,s=e[a];null!==s&&!isSymbol(s)&&(r?s<=t:s=200){var f=t?null:tX(e);if(f)return setToArray(f);s=!1,o=cacheHas,l=new SetCache}else l=t?[]:c;e:for(;++n=n?e:baseSlice(e,t,r)}var tQ=tt||function(e){return e7.clearTimeout(e)};function cloneBuffer(e,t){if(t)return e.slice();var r=e.length,n=eW?eW(r):new e.constructor(r);return e.copy(n),n}function cloneArrayBuffer(e){var t=new e.constructor(e.byteLength);return new eV(t).set(new eV(e)),t}function cloneTypedArray(e,t){var r=t?cloneArrayBuffer(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function compareAscending(e,t){if(e!==t){var r=o!==e,n=null===e,a=e==e,s=isSymbol(e),c=o!==t,l=null===t,f=t==t,d=isSymbol(t);if(!l&&!d&&!s&&e>t||s&&c&&f&&!l&&!d||n&&c&&f||!r&&f||!a)return 1;if(!n&&!s&&!d&&e1?r[a-1]:o,c=a>2?r[2]:o;for(s=e.length>3&&"function"==typeof s?(a--,s):o,c&&isIterateeCall(r[0],r[1],c)&&(s=a<3?o:s,a=1),t=eC(t);++n-1?a[s?t[c]:c]:o}}function createFlow(e){return flatRest(function(t){var r=t.length,n=r,s=LodashWrapper.prototype.thru;for(e&&t.reverse();n--;){var c=t[n];if("function"!=typeof c)throw new ex(a);if(s&&!l&&"wrapper"==getFuncName(c))var l=new LodashWrapper([],!0)}for(n=l?n:r;++n1&&_.reverse(),h&&fl))return!1;var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var p=-1,g=!0,y=2&r?new SetCache:o;for(s.set(e,t),s.set(t,e);++p-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(eo,"{\n/* [wrapped with "+t+"] */\n")}(a,(n=(o=a.match(ei))?o[1].split(ea):[],arrayEach(d,function(e){var t="_."+e[0];r&e[1]&&!arrayIncludes(n,t)&&n.push(t)}),n.sort())))}function shortOut(e){var t=0,r=0;return function(){var n=tk(),a=16-(n-r);if(r=n,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function shuffleSelf(e,t){var r=-1,n=e.length,a=n-1;for(t=o===t?n:t;++r1?e[t-1]:o;return r="function"==typeof r?(e.pop(),r):o,unzipWith(e,r)});function chain(e){var t=lodash(e);return t.__chain__=!0,t}function thru(e,t){return t(e)}var rg=flatRest(function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,interceptor=function(t){return baseAt(t,e)};return!(t>1)&&!this.__actions__.length&&n instanceof LazyWrapper&&isIndex(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:thru,args:[interceptor],thisArg:o}),new LodashWrapper(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(interceptor)}),ry=createAggregator(function(e,t,r){eR.call(e,r)?++e[r]:baseAssignValue(e,r,1)}),rv=createFind(findIndex),rm=createFind(findLastIndex);function forEach(e,t){return(rM(e)?arrayEach:tW)(e,getIteratee(t,3))}function forEachRight(e,t){return(rM(e)?function(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}:tG)(e,getIteratee(t,3))}var rb=createAggregator(function(e,t,r){eR.call(e,r)?e[r].push(t):baseAssignValue(e,r,[t])}),r_=baseRest(function(e,t,r){var n=-1,o="function"==typeof t,a=isArrayLike(e)?e_(e.length):[];return tW(e,function(e){a[++n]=o?apply(t,e,r):baseInvoke(e,t,r)}),a}),rw=createAggregator(function(e,t,r){baseAssignValue(e,r,t)});function map(e,t){return(rM(e)?arrayMap:baseMap)(e,getIteratee(t,3))}var rS=createAggregator(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]}),rE=baseRest(function(e,t){if(null==e)return[];var r=t.length;return r>1&&isIterateeCall(e,t[0],t[1])?t=[]:r>2&&isIterateeCall(t[0],t[1],t[2])&&(t=[t[0]]),baseOrderBy(e,baseFlatten(t,1),[])}),rk=tn||function(){return e7.Date.now()};function ary(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,createWrap(e,128,o,o,o,o,t)}function before(e,t){var r;if("function"!=typeof t)throw new ex(a);return e=toInteger(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var rC=baseRest(function(e,t,r){var n=1;if(r.length){var o=replaceHolders(r,getHolder(rC));n|=32}return createWrap(e,n,t,r,o)}),rI=baseRest(function(e,t,r){var n=3;if(r.length){var o=replaceHolders(r,getHolder(rI));n|=32}return createWrap(t,n,e,r,o)});function debounce(e,t,r){var n,s,c,l,f,d,h=0,p=!1,g=!1,y=!0;if("function"!=typeof e)throw new ex(a);function invokeFunc(t){var r=n,a=s;return n=s=o,h=t,l=e.apply(a,r)}function shouldInvoke(e){var r=e-d,n=e-h;return o===d||r>=t||r<0||g&&n>=c}function timerExpired(){var e,r,n,o=rk();if(shouldInvoke(o))return trailingEdge(o);f=t6(timerExpired,(e=o-d,r=o-h,n=t-e,g?tE(n,c-r):n))}function trailingEdge(e){return(f=o,y&&n)?invokeFunc(e):(n=s=o,l)}function debounced(){var e,r=rk(),a=shouldInvoke(r);if(n=arguments,s=this,d=r,a){if(o===f)return h=e=d,f=t6(timerExpired,t),p?invokeFunc(e):l;if(g)return tQ(f),f=t6(timerExpired,t),invokeFunc(d)}return o===f&&(f=t6(timerExpired,t)),l}return t=toNumber(t)||0,isObject(r)&&(p=!!r.leading,c=(g="maxWait"in r)?tS(toNumber(r.maxWait)||0,t):c,y="trailing"in r?!!r.trailing:y),debounced.cancel=function(){o!==f&&tQ(f),h=0,n=d=s=f=o},debounced.flush=function(){return o===f?l:trailingEdge(rk())},debounced}var rA=baseRest(function(e,t){return baseDelay(e,1,t)}),rx=baseRest(function(e,t,r){return baseDelay(e,toNumber(t)||0,r)});function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ex(a);var memoized=function(){var r=arguments,n=t?t.apply(this,r):r[0],o=memoized.cache;if(o.has(n))return o.get(n);var a=e.apply(this,r);return memoized.cache=o.set(n,a)||o,a};return memoized.cache=new(memoize.Cache||MapCache),memoized}function negate(e){if("function"!=typeof e)throw new ex(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}memoize.Cache=MapCache;var rO=baseRest(function(e,t){var r=(t=1==t.length&&rM(t[0])?arrayMap(t[0],baseUnary(getIteratee())):arrayMap(baseFlatten(t,1),baseUnary(getIteratee()))).length;return baseRest(function(n){for(var o=-1,a=tE(n.length,r);++o=t}),rF=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike(e)&&eR.call(e,"callee")&&!eZ.call(e,"callee")},rM=e_.isArray,rP=ti?baseUnary(ti):function(e){return isObjectLike(e)&&baseGetTag(e)==T};function isArrayLike(e){return null!=e&&isLength(e.length)&&!isFunction(e)}function isArrayLikeObject(e){return isObjectLike(e)&&isArrayLike(e)}var rD=tm||stubFalse,rU=ta?baseUnary(ta):function(e){return isObjectLike(e)&&baseGetTag(e)==y};function isError(e){if(!isObjectLike(e))return!1;var t=baseGetTag(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!isPlainObject(e)}function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==m||t==b||"[object AsyncFunction]"==t||"[object Proxy]"==t}function isInteger(e){return"number"==typeof e&&e==toInteger(e)}function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function isObject(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function isObjectLike(e){return null!=e&&"object"==typeof e}var rN=ts?baseUnary(ts):function(e){return isObjectLike(e)&&t2(e)==_};function isNumber(e){return"number"==typeof e||isObjectLike(e)&&baseGetTag(e)==w}function isPlainObject(e){if(!isObjectLike(e)||baseGetTag(e)!=S)return!1;var t=eG(e);if(null===t)return!0;var r=eR.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ej.call(r)==eD}var rz=tu?baseUnary(tu):function(e){return isObjectLike(e)&&baseGetTag(e)==C},r$=tc?baseUnary(tc):function(e){return isObjectLike(e)&&t2(e)==I};function isString(e){return"string"==typeof e||!rM(e)&&isObjectLike(e)&&baseGetTag(e)==A}function isSymbol(e){return"symbol"==typeof e||isObjectLike(e)&&baseGetTag(e)==x}var rV=tl?baseUnary(tl):function(e){return isObjectLike(e)&&isLength(e.length)&&!!e2[baseGetTag(e)]},rq=createRelationalOperation(baseLt),rW=createRelationalOperation(function(e,t){return e<=t});function toArray(e){if(!e)return[];if(isArrayLike(e))return isString(e)?stringToArray(e):copyArray(e);if(e8&&e[e8])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[e8]());var t=t2(e);return(t==_?mapToArray:t==I?setToArray:values)(e)}function toFinite(e){return e?(e=toNumber(e))===l||e===-l?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}function toInteger(e){var t=toFinite(e),r=t%1;return t==t?r?t-r:t:0}function toLength(e){return e?baseClamp(toInteger(e),0,4294967295):0}function toNumber(e){if("number"==typeof e)return e;if(isSymbol(e))return f;if(isObject(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=isObject(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=baseTrim(e);var r=eh.test(e);return r||eg.test(e)?e5(e.slice(2),r?2:8):ed.test(e)?f:+e}function toPlainObject(e){return copyObject(e,keysIn(e))}function toString(e){return null==e?"":baseToString(e)}var rG=createAssigner(function(e,t){if(isPrototype(t)||isArrayLike(t)){copyObject(t,keys(t),e);return}for(var r in t)eR.call(t,r)&&assignValue(e,r,t[r])}),rH=createAssigner(function(e,t){copyObject(t,keysIn(t),e)}),rK=createAssigner(function(e,t,r,n){copyObject(t,keysIn(t),e,n)}),rJ=createAssigner(function(e,t,r,n){copyObject(t,keys(t),e,n)}),rZ=flatRest(baseAt),rQ=baseRest(function(e,t){e=eC(e);var r=-1,n=t.length,a=n>2?t[2]:o;for(a&&isIterateeCall(t[0],t[1],a)&&(n=1);++r1),t}),copyObject(e,getAllKeysIn(e),r),n&&(r=baseClone(r,7,customOmitClone));for(var o=t.length;o--;)baseUnset(r,t[o]);return r}),r6=flatRest(function(e,t){return null==e?{}:basePickBy(e,t,function(t,r){return hasIn(e,r)})});function pickBy(e,t){if(null==e)return{};var r=arrayMap(getAllKeysIn(e),function(e){return[e]});return t=getIteratee(t),basePickBy(e,r,function(e,r){return t(e,r[0])})}var r5=createToPairs(keys),r8=createToPairs(keysIn);function values(e){return null==e?[]:baseValues(e,keys(e))}var r9=createCompounder(function(e,t,r){return t=t.toLowerCase(),e+(r?capitalize(t):t)});function capitalize(e){return ni(toString(e).toLowerCase())}function deburr(e){return(e=toString(e))&&e.replace(ev,td).replace(eJ,"")}var r7=createCompounder(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),ne=createCompounder(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),nt=createCaseFirst("toLowerCase"),nr=createCompounder(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}),nn=createCompounder(function(e,t,r){return e+(r?" ":"")+ni(t)}),no=createCompounder(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),ni=createCaseFirst("toUpperCase");function words(e,t,r){if(e=toString(e),t=r?o:t,o===t){var n;return(n=e,eY.test(n))?e.match(eQ)||[]:e.match(es)||[]}return e.match(t)||[]}var na=baseRest(function(e,t){try{return apply(e,o,t)}catch(e){return isError(e)?e:new eS(e)}}),ns=flatRest(function(e,t){return arrayEach(t,function(t){baseAssignValue(e,t=toKey(t),rC(e[t],e))}),e});function constant(e){return function(){return e}}var nu=createFlow(),nc=createFlow(!0);function identity(e){return e}function iteratee(e){return baseIteratee("function"==typeof e?e:baseClone(e,1))}var nl=baseRest(function(e,t){return function(r){return baseInvoke(r,e,t)}}),nf=baseRest(function(e,t){return function(r){return baseInvoke(e,r,t)}});function mixin(e,t,r){var n=keys(t),o=baseFunctions(t,n);null!=r||isObject(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=baseFunctions(t,keys(t)));var a=!(isObject(r)&&"chain"in r)||!!r.chain,s=isFunction(e);return arrayEach(o,function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(a||t){var r=e(this.__wrapped__);return(r.__actions__=copyArray(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,arrayPush([this.value()],arguments))})}),e}function noop(){}var nd=createOver(arrayMap),nh=createOver(arrayEvery),np=createOver(arraySome);function property(e){return isKey(e)?baseProperty(toKey(e)):function(t){return baseGet(t,e)}}var ng=createRange(),ny=createRange(!0);function stubArray(){return[]}function stubFalse(){return!1}var nv=createMathOperation(function(e,t){return e+t},0),nm=createRound("ceil"),nb=createMathOperation(function(e,t){return e/t},1),n_=createRound("floor"),nw=createMathOperation(function(e,t){return e*t},1),nS=createRound("round"),nE=createMathOperation(function(e,t){return e-t},0);return lodash.after=function(e,t){if("function"!=typeof t)throw new ex(a);return e=toInteger(e),function(){if(--e<1)return t.apply(this,arguments)}},lodash.ary=ary,lodash.assign=rG,lodash.assignIn=rH,lodash.assignInWith=rK,lodash.assignWith=rJ,lodash.at=rZ,lodash.before=before,lodash.bind=rC,lodash.bindAll=ns,lodash.bindKey=rI,lodash.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return rM(e)?e:[e]},lodash.chain=chain,lodash.chunk=function(e,t,r){t=(r?isIterateeCall(e,t,r):o===t)?1:tS(toInteger(t),0);var n=null==e?0:e.length;if(!n||t<1)return[];for(var a=0,s=0,c=e_(tf(n/t));aa?0:a+r),(n=o===n||n>a?a:toInteger(n))<0&&(n+=a),n=r>n?0:toLength(n);r>>0)?(e=toString(e))&&("string"==typeof t||null!=t&&!rz(t))&&!(t=baseToString(t))&&hasUnicode(e)?castSlice(stringToArray(e),0,r):e.split(t,r):[]},lodash.spread=function(e,t){if("function"!=typeof e)throw new ex(a);return t=null==t?0:tS(toInteger(t),0),baseRest(function(r){var n=r[t],o=castSlice(r,0,t);return n&&arrayPush(o,n),apply(e,this,o)})},lodash.tail=function(e){var t=null==e?0:e.length;return t?baseSlice(e,1,t):[]},lodash.take=function(e,t,r){return e&&e.length?baseSlice(e,0,(t=r||o===t?1:toInteger(t))<0?0:t):[]},lodash.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?baseSlice(e,(t=n-(t=r||o===t?1:toInteger(t)))<0?0:t,n):[]},lodash.takeRightWhile=function(e,t){return e&&e.length?baseWhile(e,getIteratee(t,3),!1,!0):[]},lodash.takeWhile=function(e,t){return e&&e.length?baseWhile(e,getIteratee(t,3)):[]},lodash.tap=function(e,t){return t(e),e},lodash.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new ex(a);return isObject(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),debounce(e,t,{leading:n,maxWait:t,trailing:o})},lodash.thru=thru,lodash.toArray=toArray,lodash.toPairs=r5,lodash.toPairsIn=r8,lodash.toPath=function(e){return rM(e)?arrayMap(e,toKey):isSymbol(e)?[e]:copyArray(t8(toString(e)))},lodash.toPlainObject=toPlainObject,lodash.transform=function(e,t,r){var n=rM(e),o=n||rD(e)||rV(e);if(t=getIteratee(t,4),null==r){var a=e&&e.constructor;r=o?n?new a:[]:isObject(e)&&isFunction(a)?tq(eG(e)):{}}return(o?arrayEach:baseForOwn)(e,function(e,n,o){return t(r,e,n,o)}),r},lodash.unary=function(e){return ary(e,1)},lodash.union=ra,lodash.unionBy=rs,lodash.unionWith=ru,lodash.uniq=function(e){return e&&e.length?baseUniq(e):[]},lodash.uniqBy=function(e,t){return e&&e.length?baseUniq(e,getIteratee(t,2)):[]},lodash.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?baseUniq(e,o,t):[]},lodash.unset=function(e,t){return null==e||baseUnset(e,t)},lodash.unzip=unzip,lodash.unzipWith=unzipWith,lodash.update=function(e,t,r){return null==e?e:baseUpdate(e,t,castFunction(r))},lodash.updateWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:baseUpdate(e,t,castFunction(r),n)},lodash.values=values,lodash.valuesIn=function(e){return null==e?[]:baseValues(e,keysIn(e))},lodash.without=rc,lodash.words=words,lodash.wrap=function(e,t){return rT(castFunction(t),e)},lodash.xor=rl,lodash.xorBy=rf,lodash.xorWith=rd,lodash.zip=rh,lodash.zipObject=function(e,t){return baseZipObject(e||[],t||[],assignValue)},lodash.zipObjectDeep=function(e,t){return baseZipObject(e||[],t||[],baseSet)},lodash.zipWith=rp,lodash.entries=r5,lodash.entriesIn=r8,lodash.extend=rH,lodash.extendWith=rK,mixin(lodash,lodash),lodash.add=nv,lodash.attempt=na,lodash.camelCase=r9,lodash.capitalize=capitalize,lodash.ceil=nm,lodash.clamp=function(e,t,r){return o===r&&(r=t,t=o),o!==r&&(r=(r=toNumber(r))==r?r:0),o!==t&&(t=(t=toNumber(t))==t?t:0),baseClamp(toNumber(e),t,r)},lodash.clone=function(e){return baseClone(e,4)},lodash.cloneDeep=function(e){return baseClone(e,5)},lodash.cloneDeepWith=function(e,t){return baseClone(e,5,t="function"==typeof t?t:o)},lodash.cloneWith=function(e,t){return baseClone(e,4,t="function"==typeof t?t:o)},lodash.conformsTo=function(e,t){return null==t||baseConformsTo(e,t,keys(t))},lodash.deburr=deburr,lodash.defaultTo=function(e,t){return null==e||e!=e?t:e},lodash.divide=nb,lodash.endsWith=function(e,t,r){e=toString(e),t=baseToString(t);var n=e.length,a=r=o===r?n:baseClamp(toInteger(r),0,n);return(r-=t.length)>=0&&e.slice(r,a)==t},lodash.eq=eq,lodash.escape=function(e){return(e=toString(e))&&H.test(e)?e.replace(W,th):e},lodash.escapeRegExp=function(e){return(e=toString(e))&&et.test(e)?e.replace(ee,"\\$&"):e},lodash.every=function(e,t,r){var n=rM(e)?arrayEvery:baseEvery;return r&&isIterateeCall(e,t,r)&&(t=o),n(e,getIteratee(t,3))},lodash.find=rv,lodash.findIndex=findIndex,lodash.findKey=function(e,t){return baseFindKey(e,getIteratee(t,3),baseForOwn)},lodash.findLast=rm,lodash.findLastIndex=findLastIndex,lodash.findLastKey=function(e,t){return baseFindKey(e,getIteratee(t,3),baseForOwnRight)},lodash.floor=n_,lodash.forEach=forEach,lodash.forEachRight=forEachRight,lodash.forIn=function(e,t){return null==e?e:tH(e,getIteratee(t,3),keysIn)},lodash.forInRight=function(e,t){return null==e?e:tK(e,getIteratee(t,3),keysIn)},lodash.forOwn=function(e,t){return e&&baseForOwn(e,getIteratee(t,3))},lodash.forOwnRight=function(e,t){return e&&baseForOwnRight(e,getIteratee(t,3))},lodash.get=get,lodash.gt=rj,lodash.gte=rR,lodash.has=function(e,t){return null!=e&&hasPath(e,t,baseHas)},lodash.hasIn=hasIn,lodash.head=head,lodash.identity=identity,lodash.includes=function(e,t,r,n){e=isArrayLike(e)?e:values(e),r=r&&!n?toInteger(r):0;var o=e.length;return r<0&&(r=tS(o+r,0)),isString(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&baseIndexOf(e,t,r)>-1},lodash.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var o=null==r?0:toInteger(r);return o<0&&(o=tS(n+o,0)),baseIndexOf(e,t,o)},lodash.inRange=function(e,t,r){var n,a,s;return t=toFinite(t),o===r?(r=t,t=0):r=toFinite(r),(n=e=toNumber(e))>=tE(a=t,s=r)&&n=-9007199254740991&&e<=9007199254740991},lodash.isSet=r$,lodash.isString=isString,lodash.isSymbol=isSymbol,lodash.isTypedArray=rV,lodash.isUndefined=function(e){return o===e},lodash.isWeakMap=function(e){return isObjectLike(e)&&t2(e)==O},lodash.isWeakSet=function(e){return isObjectLike(e)&&"[object WeakSet]"==baseGetTag(e)},lodash.join=function(e,t){return null==e?"":t_.call(e,t)},lodash.kebabCase=r7,lodash.last=last,lodash.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var a=n;return o!==r&&(a=(a=toInteger(r))<0?tS(n+a,0):tE(a,n-1)),t==t?function(e,t,r){for(var n=r+1;n--&&e[n]!==t;);return n}(e,t,a):baseFindIndex(e,baseIsNaN,a,!0)},lodash.lowerCase=ne,lodash.lowerFirst=nt,lodash.lt=rq,lodash.lte=rW,lodash.max=function(e){return e&&e.length?baseExtremum(e,identity,baseGt):o},lodash.maxBy=function(e,t){return e&&e.length?baseExtremum(e,getIteratee(t,2),baseGt):o},lodash.mean=function(e){return baseMean(e,identity)},lodash.meanBy=function(e,t){return baseMean(e,getIteratee(t,2))},lodash.min=function(e){return e&&e.length?baseExtremum(e,identity,baseLt):o},lodash.minBy=function(e,t){return e&&e.length?baseExtremum(e,getIteratee(t,2),baseLt):o},lodash.stubArray=stubArray,lodash.stubFalse=stubFalse,lodash.stubObject=function(){return{}},lodash.stubString=function(){return""},lodash.stubTrue=function(){return!0},lodash.multiply=nw,lodash.nth=function(e,t){return e&&e.length?baseNth(e,toInteger(t)):o},lodash.noConflict=function(){return e7._===this&&(e7._=eU),this},lodash.noop=noop,lodash.now=rk,lodash.pad=function(e,t,r){e=toString(e);var n=(t=toInteger(t))?stringSize(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return createPadding(ty(o),r)+e+createPadding(tf(o),r)},lodash.padEnd=function(e,t,r){e=toString(e);var n=(t=toInteger(t))?stringSize(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var a=tI();return tE(e+a*(t-e+e6("1e-"+((a+"").length-1))),t)}return baseRandom(e,t)},lodash.reduce=function(e,t,r){var n=rM(e)?arrayReduce:baseReduce,o=arguments.length<3;return n(e,getIteratee(t,4),r,o,tW)},lodash.reduceRight=function(e,t,r){var n=rM(e)?arrayReduceRight:baseReduce,o=arguments.length<3;return n(e,getIteratee(t,4),r,o,tG)},lodash.repeat=function(e,t,r){return t=(r?isIterateeCall(e,t,r):o===t)?1:toInteger(t),baseRepeat(toString(e),t)},lodash.replace=function(){var e=arguments,t=toString(e[0]);return e.length<3?t:t.replace(e[1],e[2])},lodash.result=function(e,t,r){t=castPath(t,e);var n=-1,a=t.length;for(a||(a=1,e=o);++n9007199254740991)return[];var r=4294967295,n=tE(e,4294967295);t=getIteratee(t),e-=4294967295;for(var o=baseTimes(n,t);++r=s)return e;var l=r-stringSize(n);if(l<1)return n;var f=c?castSlice(c,0,l).join(""):e.slice(0,l);if(o===a)return f+n;if(c&&(l+=f.length-l),rz(a)){if(e.slice(l).search(a)){var d,h=f;for(a.global||(a=eI(a.source,toString(ef.exec(a))+"g")),a.lastIndex=0;d=a.exec(h);)var p=d.index;f=f.slice(0,o===p?l:p)}}else if(e.indexOf(baseToString(a),l)!=l){var g=f.lastIndexOf(a);g>-1&&(f=f.slice(0,g))}return f+n},lodash.unescape=function(e){return(e=toString(e))&&G.test(e)?e.replace(q,tp):e},lodash.uniqueId=function(e){var t=++eF;return toString(e)+t},lodash.upperCase=no,lodash.upperFirst=ni,lodash.each=forEach,lodash.eachRight=forEachRight,lodash.first=head,mixin(lodash,(en={},baseForOwn(lodash,function(e,t){eR.call(lodash.prototype,t)||(en[t]=e)}),en),{chain:!1}),lodash.VERSION="4.17.21",arrayEach(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){lodash[e].placeholder=lodash}),arrayEach(["drop","take"],function(e,t){LazyWrapper.prototype[e]=function(r){r=o===r?1:tS(toInteger(r),0);var n=this.__filtered__&&!t?new LazyWrapper(this):this.clone();return n.__filtered__?n.__takeCount__=tE(r,n.__takeCount__):n.__views__.push({size:tE(r,4294967295),type:e+(n.__dir__<0?"Right":"")}),n},LazyWrapper.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),arrayEach(["filter","map","takeWhile"],function(e,t){var r=t+1,n=1==r||3==r;LazyWrapper.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:getIteratee(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),arrayEach(["head","last"],function(e,t){var r="take"+(t?"Right":"");LazyWrapper.prototype[e]=function(){return this[r](1).value()[0]}}),arrayEach(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");LazyWrapper.prototype[e]=function(){return this.__filtered__?new LazyWrapper(this):this[r](1)}}),LazyWrapper.prototype.compact=function(){return this.filter(identity)},LazyWrapper.prototype.find=function(e){return this.filter(e).head()},LazyWrapper.prototype.findLast=function(e){return this.reverse().find(e)},LazyWrapper.prototype.invokeMap=baseRest(function(e,t){return"function"==typeof e?new LazyWrapper(this):this.map(function(r){return baseInvoke(r,e,t)})}),LazyWrapper.prototype.reject=function(e){return this.filter(negate(getIteratee(e)))},LazyWrapper.prototype.slice=function(e,t){e=toInteger(e);var r=this;return r.__filtered__&&(e>0||t<0)?new LazyWrapper(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),o!==t&&(r=(t=toInteger(t))<0?r.dropRight(-t):r.take(t-e)),r)},LazyWrapper.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},LazyWrapper.prototype.toArray=function(){return this.take(4294967295)},baseForOwn(LazyWrapper.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),a=lodash[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);a&&(lodash.prototype[t]=function(){var t=this.__wrapped__,c=n?[1]:arguments,l=t instanceof LazyWrapper,f=c[0],d=l||rM(t),interceptor=function(e){var t=a.apply(lodash,arrayPush([e],c));return n&&h?t[0]:t};d&&r&&"function"==typeof f&&1!=f.length&&(l=d=!1);var h=this.__chain__,p=!!this.__actions__.length,g=s&&!h,y=l&&!p;if(!s&&d){t=y?t:new LazyWrapper(this);var v=e.apply(t,c);return v.__actions__.push({func:thru,args:[interceptor],thisArg:o}),new LodashWrapper(v,h)}return g&&y?e.apply(this,c):(v=this.thru(interceptor),g?n?v.value()[0]:v.value():v)})}),arrayEach(["pop","push","shift","sort","splice","unshift"],function(e){var t=eO[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);lodash.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(rM(o)?o:[],e)}return this[r](function(r){return t.apply(rM(r)?r:[],e)})}}),baseForOwn(LazyWrapper.prototype,function(e,t){var r=lodash[t];if(r){var n=r.name+"";eR.call(tF,n)||(tF[n]=[]),tF[n].push({name:t,func:r})}}),tF[createHybrid(o,2).name]=[{name:"wrapper",func:o}],LazyWrapper.prototype.clone=function(){var e=new LazyWrapper(this.__wrapped__);return e.__actions__=copyArray(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=copyArray(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=copyArray(this.__views__),e},LazyWrapper.prototype.reverse=function(){if(this.__filtered__){var e=new LazyWrapper(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},LazyWrapper.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=rM(e),n=t<0,o=r?e.length:0,a=function(e,t,r){for(var n=-1,o=r.length;++n=this.__values__.length,t=e?o:this.__values__[this.__index__++];return{done:e,value:t}},lodash.prototype.plant=function(e){for(var t,r=this;r instanceof baseLodash;){var n=wrapperClone(r);n.__index__=0,n.__values__=o,t?a.__wrapped__=n:t=n;var a=n;r=r.__wrapped__}return a.__wrapped__=e,t},lodash.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof LazyWrapper){var t=e;return this.__actions__.length&&(t=new LazyWrapper(this)),(t=t.reverse()).__actions__.push({func:thru,args:[reverse],thisArg:o}),new LodashWrapper(t,this.__chain__)}return this.thru(reverse)},lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=function(){return baseWrapperValue(this.__wrapped__,this.__actions__)},lodash.prototype.first=lodash.prototype.head,e8&&(lodash.prototype[e8]=function(){return this}),lodash}();e7._=tg,o!==(n=(function(){return tg}).call(t,r,t,e))&&(e.exports=n)}).call(this)},7771:function(e,t,r){var n=r(55639);e.exports=function(){return n.Date.now()}},14841:function(e,t,r){var n=r(27561),o=r(13218),a=r(33448),s=0/0,c=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,f=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return s;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=l.test(e);return r||f.test(e)?d(e.slice(2),r?2:8):c.test(e)?s:+e}},83454:function(e,t,r){"use strict";var n,o;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(o=r.g.process)?void 0:o.env)?r.g.process:r(77663)},91118:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(81134)}])},96589:function(e,t,r){"use strict";r.d(t,{Ht:function(){return a},WR:function(){return d},et:function(){return s},lB:function(){return l},oZ:function(){return f}});var n,o=r(248),percent=function(e,t){return Math.round(e*t/100)},darken=function(e,t){return Object.assign(Object.assign({},e),{l:e.l-percent(e.l,t)})},alpha=function(e,t){return Object.assign(Object.assign({},e),{a:t})},a={red:{h:11,s:80,l:45,a:1},blurpleLight:{h:240,s:83.3,l:95.3,a:1},blurpleMedium:{h:242,s:81,l:87.6,a:1},blurple:{h:242,s:88.4,l:66.3,a:1},blurpleDark:{h:242,s:87.6,l:62,a:1},offWhite:{h:45,s:36.4,l:95.7,a:1},blueLight:{h:206,s:58.3,l:85.9,a:1},blue:{h:206,s:100,l:73.3,a:1},blueDark:{h:206,s:29.5,l:33.9,a:1},orangeLight:{h:6,s:100,l:89.6,a:1},orange:{h:11,s:100,l:62.2,a:1},orangeDark:{h:11,s:79.9,l:64.9,a:1},tealLight:{h:180,s:20,l:67.6,a:1},teal:{h:180,s:51.4,l:51.6,a:1},tealDark:{h:180,s:16.2,l:22.9,a:1},yellowLight:{h:39,s:100,l:87.8,a:1},yellow:{h:50,s:100,l:57.3,a:1},yellowDark:{h:39,s:100,l:68,a:1}},s={grey8:{h:0,s:0,l:13,a:1},grey7:{h:246,s:16,l:26,a:1},grey6:{h:252,s:13,l:46,a:1},grey5:{h:240,s:7,l:62,a:1},grey4:{h:259,s:12,l:75,a:1},grey3:{h:260,s:11,l:85,a:1},grey2:{h:260,s:11,l:95,a:1},grey1:{h:240,s:7,l:97,a:1},white:{h:0,s:0,l:100,a:1}},c={focusRing:alpha(a.blurple,.5),record:a.orange,recordHover:darken(a.orange,15.8),recordActive:darken(a.orange,31.6),info:a.blue,success:a.teal,warning:a.yellowDark,danger:a.red,dangerHover:darken(a.red,15.8),dangerActive:darken(a.red,31.6),backdrop:alpha(s.grey8,.5),backdropDark:alpha(s.grey8,.9),backdropTwilight:alpha({h:245,s:44.8,l:46.9,a:1},.8),disabledContent:s.grey5,highlight:{h:a.blurpleLight.h,s:a.blurpleLight.s,l:66.3,a:.15}},l={light:Object.assign(Object.assign({primary:a.blurple,primaryHover:darken(a.blurple,15.8),primaryActive:darken(a.blurple,31.6),body:s.grey8,bodyDimmed:s.grey6,background:s.white,backgroundHover:alpha(s.grey7,.1),backgroundActive:alpha(s.grey7,.3),backgroundSecondary:alpha(s.grey7,.04),backgroundSecondary2:{h:45,s:34,l:78,a:.2},overlay:s.white,border:alpha(s.grey6,.2)},c),{disabledBackground:s.grey2,formFieldBorder:s.grey3,formFieldBackground:s.white,buttonBorder:alpha(s.grey6,.25),upgrade:{h:206,s:100,l:93,a:1},upgradeHover:darken({h:206,s:100,l:93,a:1},9),upgradeActive:darken({h:206,s:100,l:93,a:1},17),tabBackground:alpha(s.grey6,.15),discoveryBackground:{h:206,s:100,l:93,a:1},discoveryLightBackground:{h:206,s:100,l:97,a:1},discoveryTitle:s.grey8,discoveryHighlight:{h:206,s:100,l:77,a:.3}}),dark:Object.assign(Object.assign({primary:{h:242,s:87,l:73,a:1},primaryHover:darken(a.blurple,15.8),primaryActive:darken(a.blurple,31.6),body:s.grey1,bodyDimmed:s.grey5,background:s.grey8,backgroundHover:alpha(s.white,.1),backgroundActive:alpha(s.white,.2),backgroundSecondary:alpha(s.white,.04),backgroundSecondary2:{h:45,s:13,l:44,a:.2},overlay:Object.assign(Object.assign({},n=s.grey8),{l:n.l+percent(n.l,50)}),border:alpha(s.grey4,.2)},c),{disabledBackground:darken(s.grey6,50),formFieldBorder:s.grey6,formFieldBackground:s.grey8,buttonBorder:alpha(s.white,.25),upgrade:{h:206,s:92,l:81,a:1},upgradeHover:darken({h:206,s:92,l:81,a:1},9),upgradeActive:darken({h:206,s:92,l:81,a:1},17),tabBackground:alpha(s.white,.15),discoveryBackground:{h:206,s:92,l:81,a:1},discoveryLightBackground:s.grey8,discoveryTitle:a.blue,discoveryHighlight:{h:206,s:100,l:77,a:.3}})},f=Object.assign(Object.assign({},a),s),d=(0,o._)(Object.keys(f)).concat((0,o._)(Object.keys(l.light)))},27710:function(e,t,r){"use strict";r.d(t,{b0:function(){return getColorsCssVarsObject},f1:function(){return getVariablesCssVarsObject},tc:function(){return getThemeStyles}});var n,o,a,s,c=r(24043),l=r(248),f=r(72662),d=r(96589),h=r(93733),getCssVarsFromObject=function(e,t){var r={};return Object.entries(t).forEach(function(t){var n=(0,c._)(t,2),o=n[0],a=n[1];r["--lns-".concat((e?"".concat(e,"-"):"")+o)]=a}),r},p=getCssVarsFromObject(void 0,{unit:"".concat(f.bf/16,"rem")}),g=getCssVarsFromObject("fontWeight",f.vC),y=getCssVarsFromObject(void 0,(n={},Object.entries(f.iH).forEach(function(e){var t=(0,c._)(e,2),r=t[0],o=t[1],a={};a["fontSize-".concat(r)]=(0,h.u)(o.fontSize),a["lineHeight-".concat(r)]=o.lineHeight,Object.assign(n,a,{})}),n)),v=getCssVarsFromObject("radius",f.pD),m=getCssVarsFromObject("shadow",f.q),b=getCssVarsFromObject(void 0,(o={},Object.entries(f.RZ).forEach(function(e){var t=(0,c._)(e,2),r=t[0],n=t[1];o["space-".concat(r)]=(0,h.u)(n)}),o)),_=getCssVarsFromObject(void 0,{formFieldBorderWidth:"1px",formFieldBorderWidthFocus:"2px",formFieldHeight:(0,h.u)(4.5),formFieldRadius:(0,h.u)(2.25),formFieldHorizontalPadding:(0,h.u)(2),formFieldBorderShadow:"\n inset 0 0 0 var(--lns-formFieldBorderWidth) var(--lns-color-formFieldBorder)\n ",formFieldBorderShadowFocus:"\n inset 0 0 0 var(--lns-formFieldBorderWidthFocus) var(--lns-color-blurple),\n 0 0 0 var(--lns-formFieldBorderWidthFocus) var(--lns-color-focusRing)\n "}),w=getCssVarsFromObject("color",(a={},Object.keys(Object.assign(Object.assign({},d.Ht),d.et)).forEach(function(e){a[e]="hsla(".concat(d.oZ[e].h,",").concat(d.oZ[e].s,"%,").concat(d.oZ[e].l,"%,").concat(d.oZ[e].a,")")}),a)),S=getCssVarsFromObject(void 0,Object.assign(Object.assign({},(s=function(e,t){return Object.keys(e).reduce(function(r,n){var o=e[n];return r["".concat(t,"-color-").concat(n)]="hsla(".concat(o.h,",").concat(o.s,"%,").concat(o.l,"%,").concat(o.a,")"),r},{})})(d.lB.light,"themeLight")),s(d.lB.dark,"themeDark"))),k=[p,y,v,m,b,_],getVariablesCssVarsObject=function(){var e;return(e=Object).assign.apply(e,[{},g].concat((0,l._)(k)))},getColorsCssVarsObject=function(){return Object.assign(Object.assign({},w),S)},getThemeStylesString=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":root";return"\n ".concat(e||":root",',\n .theme-light,\n [data-lens-theme="light"] {\n ').concat(Object.keys(d.lB.light).map(function(e){return"--lns-color-".concat(e,": var(--lns-themeLight-color-").concat(e,");")}).join(""),'\n }\n\n .theme-dark,\n [data-lens-theme="dark"] {\n ').concat(Object.keys(d.lB.dark).map(function(e){return"--lns-color-".concat(e,": var(--lns-themeDark-color-").concat(e,");")}).join(""),"\n }\n ")},getThemeStyles=function(){var e=document.createElement("style");e.innerHTML=getThemeStylesString(),document.head.appendChild(e)}},72976:function(e,t,r){"use strict";r(23279),r(67294)},93733:function(e,t,r){"use strict";r.d(t,{nl:function(){return o.nl},hb:function(){return o.hb},Rv:function(){return getColorValue},yb:function(){return getFocusRing},On:function(){return getFontWeight},x_:function(){return getPlacement},H5:function(){return getRadius},$C:function(){return o.$C},av:function(){return o.av},W1:function(){return o.W1},Xj:function(){return getShadow},ap:function(){return a.a},TX:function(){return a.T},y3:function(){return getTextSize},w3:function(){return pascalCaseToKebabCase},u:function(){return a.u}});var n=r(96589),getColorValue=function(e){if(e)return e in n.oZ||e in n.lB.light?"var(--lns-color-".concat(e,")"):e},o=r(88171),a=r(412),getTextSize=function(e){return e&&"\n font-size: var(--lns-fontSize-".concat(e,");\n line-height: var(--lns-lineHeight-").concat(e,");\n")},getRadius=function(e){return e&&"border-radius: var(--lns-radius-".concat(e,");")},getFontWeight=function(e){return e&&"font-weight: var(--lns-fontWeight-".concat(e,");")},getShadow=function(e){return e&&"box-shadow: var(--lns-shadow-".concat(e,");")},getFocusRing=function(e,t){var r=e||getColorValue("focusRing");return"box-shadow:".concat(t||""," 0 0 0 2px ").concat(r,";")},getPlacement=function(e,t){return({center:{bottom:0,top:"calc((100vh - ".concat(e,") / 2)"),position:"relative"},bottom:{bottom:0,top:"unset",position:"absolute"},undefined:{bottom:void 0,top:"15vh",position:"relative"}})[t]},pascalCaseToKebabCase=function(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}},88171:function(e,t,r){"use strict";r.d(t,{$C:function(){return getResponsiveBoolean},$n:function(){return objectToBreakpoints},Uw:function(){return getResponsiveGridSections},W1:function(){return getResponsiveOneOf},av:function(){return getResponsiveNumber},hb:function(){return getAlignmentStyles},nl:function(){return arrayToBreakpoints}});var n=r(24043),o=r(72662),a=r(412);r(72976);var getMediaCss=function(e,t,r){return"@media(".concat(e,": ").concat(t,"){").concat(r,"}")},arrayToBreakpoints=function(e){return getMediaCss("max-width",Object.values(o.AV)[0],e[0])+e.reduce(function(e,t,r){return e+getMediaCss("min-width","".concat(Object.values(o.AV)[r]),t)},"")},objectToBreakpoints=function(e,t){var r=[];return t.default&&r.push("".concat(e,": ").concat(t.default,";")),delete t.default,Object.entries(t).forEach(function(t){var a=(0,n._)(t,2),s=a[0],c=a[1],l=s in o.AV?o.AV[s]:s;r.push("@media(min-width: ".concat(l,"){ ").concat(e,": ").concat(c," }"))}),r.join(" ")},getResponsiveOneOf=function(e,t){return Array.isArray(t)?arrayToBreakpoints(t.map(function(t){return"".concat(e,": ").concat(t,";")})):"object"==typeof t?objectToBreakpoints(e,t):"".concat(e,": ").concat(t,";")},getAlignmentStyles=function(e,t){if(e){if(Array.isArray(e)){var r=[];return e.map(function(e){r.push(t[e])}),getResponsiveOneOf("align-items",r)}return"align-items ".concat(t[e],";")}},getResponsiveBoolean=function(e,t,r){return Array.isArray(r)?arrayToBreakpoints(r.map(function(r){var n=!0===r?t[0]:t[1];return"".concat(e,": ").concat(n,";")})):"".concat(e,": ").concat(t[0],";")},getResponsiveNumber=function(e,t){if(t||0===t)return Array.isArray(t)?arrayToBreakpoints(t.map(function(t){return"".concat(e,": ").concat(t)})):"object"!=typeof t||Array.isArray(t)?"".concat(e,": ").concat(t,";"):objectToBreakpoints(e,t)},transformColumns=function(e){return Array.isArray(e)?e.map(function(e){return(0,a.T)(e)}).join(" "):e},getResponsiveGridSections=function(e,t){if(e){if("object"==typeof e&&!Array.isArray(e)){var r={};return Object.entries(e).forEach(function(e){var t=(0,n._)(e,2),o=t[0],a=t[1];return r[o]=transformColumns(a)}),objectToBreakpoints("grid-template-".concat(t),r)}return"grid-template-".concat(t,": ").concat(transformColumns(e),";")}}},412:function(e,t,r){"use strict";r.d(t,{T:function(){return getSizeValue},a:function(){return getSize},u:function(){return u}});var n=r(24043),o=r(93733),a=r(72662),s=r(88171),u=function(e){return e&&"calc(".concat(e," * var(--lns-unit, ").concat(a.bf,"px))")},getSizeValue=function(e){return e in a.RZ?"var(--lns-space-".concat(e,")"):e&&isNaN(e)?"".concat(e):0===e?"0":e?"".concat(u(e)):void 0},getSize=function(e,t){if(t||0===t){if(Array.isArray(t)){var r=t.map(function(t){return"".concat(e,": ").concat(getSizeValue(t))});return(0,o.nl)(r)}if("object"==typeof t){var a={};return Object.entries(t).forEach(function(e){var t=(0,n._)(e,2),r=t[0],o=t[1];return a[r]=getSizeValue(o)}),(0,s.$n)(e,a)}return"".concat(e,": ").concat(getSizeValue(t),";")}}},72662:function(e,t,r){"use strict";r.d(t,{AV:function(){return d},RZ:function(){return f},bf:function(){return o},iH:function(){return a},pD:function(){return c},q:function(){return l},vC:function(){return s}});var n=r(93733),o=8,a={small:{fontSize:1.5,lineHeight:1.5},"body-sm":{fontSize:1.5,lineHeight:1.5},medium:{fontSize:1.75,lineHeight:1.6},"body-md":{fontSize:1.75,lineHeight:1.6},large:{fontSize:2.25,lineHeight:1.45},"body-lg":{fontSize:2.25,lineHeight:1.45},xlarge:{fontSize:3,lineHeight:1.35},"heading-sm":{fontSize:3,lineHeight:1.35},xxlarge:{fontSize:4,lineHeight:1.2},"heading-md":{fontSize:4,lineHeight:1.2},xxxlarge:{fontSize:6,lineHeight:1.15},"heading-lg":{fontSize:6,lineHeight:1.15}},s={book:400,bold:700},c={medium:(0,n.u)(1),large:(0,n.u)(2),xlarge:(0,n.u)(3),full:(0,n.u)(999)},l={small:"0 ".concat((0,n.u)(.5)," ").concat((0,n.u)(1.25)," hsla(0, 0%, 0%, 0.05)"),medium:"0 ".concat((0,n.u)(.5)," ").concat((0,n.u)(1.25)," hsla(0, 0%, 0%, 0.1)"),large:"0 ".concat((0,n.u)(.75)," ").concat((0,n.u)(3)," hsla(0, 0%, 0%, 0.1)")},f={xsmall:.5,small:1,medium:2,large:3,xlarge:5,xxlarge:8},d={xsmall:"31em",small:"48em",medium:"64em",large:"75em"}},37793:function(e,t,r){"use strict";r.d(t,{$6:function(){return O},$v:function(){return d},A0:function(){return a},BN:function(){return U},Dy:function(){return M},EK:function(){return y},Eq:function(){return C},Fv:function(){return s},Gp:function(){return B},HF:function(){return x},Hl:function(){return W},Hr:function(){return G},Ir:function(){return N},Jw:function(){return q},Ll:function(){return A},Mk:function(){return _},Mo:function(){return L},PQ:function(){return b},TX:function(){return $},VD:function(){return l},ZK:function(){return H},Zd:function(){return v},bN:function(){return m},c0:function(){return w},e$:function(){return g},eB:function(){return T},g8:function(){return p},hB:function(){return S},kW:function(){return D},lJ:function(){return f},mK:function(){return j},mu:function(){return V},o$:function(){return z},oG:function(){return k},pO:function(){return F},r9:function(){return c},s2:function(){return I},sR:function(){return h},sZ:function(){return o},th:function(){return R},xe:function(){return n},zW:function(){return P}});var n="Sign Up CTA Click",o="App Store Click",a="Google Play Click",s="Contact Sales CTA Click",c="Learn to Loom Grid Card Click",l="Community Loom Video Page Visit",f="Community Loom Collection Page Visit",d="Contact Sales Page Visit",h="Experiment eligibility precheck failed",p="Header Menu Hover",g="Header Menu Focus",y="Header Menu Click",v="Banner Click",m="appInstallButton",b="appStore",_="banner",w="communityLoomCollectionPage",S="communityLoomVideoPage",k="contactSalesCta",C="contactSalesPage",I="downloadCta",A="experimentEligibilityPrecheck",x="exploreLoomForSales",O="freeTrialCta",T="getLoomAICta",L="getLoomCta",B="getLoomForFreeCta",j="getStartedCta",R="getStartedSdkCustomCta",F="getVerified",M="getVerifiedCta",P="googlePlay",D="headerMenu",U="learnToLoomGridCard",N="loomAIWorkflowsHomepage",z="loomSdkApiCta",$="pricingHeroCardEnterprise",V="registerSdkCta",q="sdkDeveloperPortalCta",W="sdkGetStarted",G="signUpCta",H="translatorDetected"},86274:function(e,t,r){"use strict";r.d(t,{B3:function(){return f},M$:function(){return o},Ss:function(){return c},Uc:function(){return s},cZ:function(){return a},td:function(){return l}});var n,o="production";n=window.location.hostname;var a="production"===o,s="stage.loom.com"===n,c="preview"===o,l="development"===o,f=window.location.toString().includes("stage.loom.com")?"https://stage.loom.com/graphql":"https://mulligan.indiedemos.com/graphql"},63554:function(e,t,r){"use strict";r.d(t,{Sl:function(){return o},dn:function(){return s},gF:function(){return f},mX:function(){return l}});var n=r(86274),o='function loadExternalJS(url, location, callback) {\n var scriptTag = document.createElement("script");\n scriptTag.src = url;\n scriptTag.type = "text/javascript";\n scriptTag.onreadystatechange = callback;\n scriptTag.onload = callback;\n window.atlGlobalLoadStart = new Date();\n location.appendChild(scriptTag);\n}',a=n.cZ?"https://atl-global.atlassian.com/js/atl-global.min.js":"https://atl-global.stg.atlassian.com/js/atl-global.min.js",s='\n loadExternalJS("'.concat(a,'", document.body, initializeATLAnalytics);\n function initializeATLAnalytics() {\n window.ace.analytics.Initializer.initGAS({\n gasv3Product: \'loom\',\n });\n setTimeout(function() {\n window.ace.analytics.GASv3.sendTrackEvent("view", "page", "", {\n eventSource: document.title,\n pathname: window.location.pathname,\n eventContainer: "loom-content",\n });\n }, 1500);\n }'),c="mllYsZ0rym6Ar4fuuJjAMsrZpK5LwmUR";'\n!function(){var i="segmentAnalytics",analytics=window[i]=window[i]||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","screen","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware","register"];analytics.factory=function(e){return function(){if(window[i].initialized)return window[i][e].apply(window[i],arguments);var n=Array.prototype.slice.call(arguments);if(["track","screen","alias","group","page","identify"].indexOf(e)>-1){var c=document.querySelector("link[rel=\'canonical\']");n.push({__t:"bpc",c:c&&c.getAttribute("href")||void 0,p:location.pathname,u:location.href,s:location.search,t:document.title,r:document.referrer})}n.unshift(e);analytics.push(n);return analytics}};for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(!e||!(null===(t=window)||void 0===t?void 0:t.segmentAnalytics)){f.u("Missing consent: Segment pageEvent",{name:e,props:r});return}window.dataLayer=window.dataLayer||[];var o=getAnalyticsIds().anonID;window.segmentAnalytics.page(e,(0,n._)({name:e,anon_swimlane:getAnonSwimLane(o)},r))}},71393:function(e,t,r){"use strict";r.d(t,{y:function(){return convertSegmentEventNameToGasV3EventName},_:function(){return b}});var n,o=r(11010),a=r(72253),s=r(14932),c=r(70655),l=r(99979),f=r(86274),d=r(3219),h=f.cZ?"prod":"stg",p=null,g=r(49036),y=r(33943),v=r(33023),m=r(37793),b=(n=(0,o._)(function(e,t){var r,n,o,f,m,b,_;return(0,c.Jh)(this,function(c){if(!e||!t.action)return d.u("Analytics event: Invalid event or properties",{event:e,properties:t}),[2];if(!window.OptanonActiveGroups||!window.OptanonActiveGroups.includes(",2,"))return d.u("Analytics event: Missing consent",{event:e,properties:t}),[2];n={userId:(r=(0,g.NA)(y.b)).id?"".concat(r.id):void 0,userIdType:r.id?"loom":void 0,anonymousId:(0,v.tW)(),workspaceId:r.id?r.default_workspace_id:void 0},o=t.actionSubject?convertSegmentEventNameToGasV3EventName(t.actionSubject):null,b={source:"loom-content",action:null!==(f=t.action)&&void 0!==f?f:null,actionSubject:o,actionSubjectId:null!==(m=null==t?void 0:t.actionSubjectId)&&void 0!==m?m:null,attributes:(0,s._)((0,a._)({},t.attributes),{anonSwimlane:(0,v.J5)(n.anonymousId),userId:n.userId})};try{switch(p||(p=(0,l.analyticsClient)({env:h,version:"1.0.0",product:"loom",errorHandler:function(e){console.log("[Atlassian Analytics] Error sending event via atlassian node client",e),d.v("Atlassian Analytics: Error",e)},sendEventHook:function(e){console.log("[Atlassian Analytics] Event sent via atlassian node client",e),d.u("Atlassian Analytics: Send success",e)}})),_=p,e){case"track":_.sendTrackEvent((0,s._)((0,a._)({},n),{trackEvent:b}));break;case"operational":_.sendOperationalEvent((0,s._)((0,a._)({},n),{operationalEvent:b}));break;case"ui":_.sendUIEvent((0,s._)((0,a._)({},n),{uiEvent:b}))}}catch(r){d.v("Error sending event via atlassian node client",(0,a._)({event:e,segmentEventName:t.actionSubject,error:r},n,b))}return[2]})}),function(e,t){return n.apply(this,arguments)});function convertSegmentEventNameToGasV3EventName(e){var t;switch(e){case"App Install Button Click":t=m.bN;break;case m.sZ:t=m.PQ;break;case m.Zd:t=m.Mk;break;case m.lJ:t=m.c0;case m.VD:t=m.hB;break;case m.Fv:t=m.oG;break;case m.$v:t=m.Eq;break;case"Download CTA Click":t=m.s2;break;case m.sR:t=m.Ll;break;case"Explore Loom for Sales Click":t=m.HF;break;case"Free Trial CTA Click":t=m.$6;break;case"Get Loom AI CTA Click":t=m.eB;break;case"Get Loom CTA Click":t=m.Mo;break;case"Get Loom for Free CTA Click":t=m.Gp;break;case"Get Started CTA Click":t=m.mK;break;case"Get Started SDK Custom CTA":t=m.th;break;case"Get Verified":t=m.pO;break;case"Get Verified CTA Click":t=m.Dy;break;case m.A0:t=m.zW;break;case m.r9:t=m.BN;break;case"Loom AI workflows homepage click":t=m.Ir;break;case"Loom SDK API CTA Click":t=m.o$;break;case"Pricing Hero Card Enterprise":t=m.TX;break;case"Register SDK CTA Click":t=m.mu;break;case"SDK Developer Portal CTA Click":t=m.Jw;break;case"SDK Get Started Click":t=m.Hl;break;case m.xe:case"Sign Up CTA":t=m.Hr;break;default:t=e}return t}},3219:function(e,t,r){"use strict";let n,o,a,s,c,l,f,d,h;r.d(t,{v:function(){return error},u:function(){return info}});var p,g,y=r(72253),v=r(14932);let m={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},b=console,_={};Object.keys(m).forEach(e=>{_[e]=b[e]});let w="Datadog Browser SDK:",S={debug:_.debug.bind(b,w),log:_.log.bind(b,w),info:_.info.bind(b,w),warn:_.warn.bind(b,w),error:_.error.bind(b,w)},k="https://docs.datadoghq.com",C=`${k}/real_user_monitoring/browser/troubleshooting`,I="More details:";function catchUserErrors(e,t){return(...r)=>{try{return e(...r)}catch(e){S.error(t,e)}}}let A=!1;function setDebugMode(e){A=e}function monitor(e){return function(){return callMonitored(e,this,arguments)}}function callMonitored(e,t,r){try{return e.apply(t,r)}catch(e){monitorError(e)}}function monitorError(e){if(displayIfDebugEnabled(e),n)try{n(e)}catch(e){displayIfDebugEnabled(e)}}function displayIfDebugEnabled(...e){A&&S.error("[MONITOR]",...e)}function getGlobalObject(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let e=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof e&&(e="object"==typeof self?self:"object"==typeof window?window:{}),e}function getType(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function mergeInto(e,t,r=function(){if("undefined"!=typeof WeakSet){let e=new WeakSet;return{hasAlreadyBeenSeen(t){let r=e.has(t);return r||e.add(t),r}}}let e=[];return{hasAlreadyBeenSeen(t){let r=e.indexOf(t)>=0;return r||e.push(t),r}}}()){if(void 0===t)return e;if("object"!=typeof t||null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){let e=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,e)}if(r.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){let n=Array.isArray(e)?e:[];for(let e=0;e"}finally{n(),o(),a(),s()}}function detachToJsonMethod(e){let t=e.toJSON;return t?(delete e.toJSON,()=>{e.toJSON=t}):functionUtils_noop}function sanitize(e,t=225280){let r=detachToJsonMethod(Object.prototype),n=detachToJsonMethod(Array.prototype),o=[],a=new WeakMap,s=sanitizeProcessor(e,"$",void 0,o,a),c=JSON.stringify(s),l=c?c.length:0;if(l>t){warnOverCharacterLimit(t,"discarded",e);return}for(;o.length>0&&lt){warnOverCharacterLimit(t,"truncated",e);break}r.target[s]=c}else for(let s in r.source)if(Object.prototype.hasOwnProperty.call(r.source,s)){let c=sanitizeProcessor(r.source[s],r.path,s,o,a);if(void 0!==c&&(l+=JSON.stringify(c).length+n+s.length+3,n=1),l>t){warnOverCharacterLimit(t,"truncated",e);break}r.target[s]=c}}return r(),n(),s}function sanitizeProcessor(e,t,r,n,o){let a=function(e){if(e&&"function"==typeof e.toJSON)try{return e.toJSON()}catch(e){}return e}(e);if(!a||"object"!=typeof a)return"bigint"==typeof a?`[BigInt] ${a.toString()}`:"function"==typeof a?`[Function] ${a.name||"unknown"}`:"symbol"==typeof a?`[Symbol] ${a.description||a.toString()}`:a;let s=function sanitizeObjects(e){try{if(e instanceof Event)return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?sanitizeObjects(e.currentTarget):null,target:e.target?sanitizeObjects(e.target):null};if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;let t=Object.prototype.toString.call(e),r=t.match(/\[object (.*)\]/);if(r&&r[1])return`[${r[1]}]`}catch(e){}return"[Unserializable]"}(a);if("[Object]"!==s&&"[Array]"!==s&&"[Error]"!==s)return s;if(o.has(e))return`[Reference seen at ${o.get(e)}]`;let c=void 0!==r?`${t}.${r}`:t,l=Array.isArray(a)?[]:{};return o.set(e,c),n.push({source:a,target:l,path:c}),l}function warnOverCharacterLimit(e,t,r){S.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,r)}let Observable=class Observable{constructor(e){this.onFirstSubscribe=e,this.observers=[]}subscribe(e){return this.observers.push(e),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0),{unsubscribe:()=>{this.observers=this.observers.filter(t=>e!==t),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}}notify(e){this.observers.forEach(t=>t(e))}};function mergeObservables(...e){return new Observable(t=>{let r=e.map(e=>e.subscribe(e=>t.notify(e)));return()=>r.forEach(e=>e.unsubscribe())})}function ensureProperties(e,t,r){let n={...e};for(let[e,{required:o,type:a}]of Object.entries(t))"string"!==a||isDefined(n[e])||(n[e]=String(n[e])),o&&isDefined(n[e])&&S.warn(`The property ${e} of ${r} is required; context will not be sent to the intake.`);return n}function isDefined(e){return null==e||""===e}function createContextManager(e="",{propertiesConfig:t={}}={}){let r={},n=new Observable,o={getContext:()=>mergeInto(void 0,r),setContext:a=>{!function(e){let t="object"===getType(e);return t||S.error("Unsupported context:",e),t}(a)?o.clearContext():r=sanitize(ensureProperties(a,t,e)),n.notify()},setContextProperty:(o,a)=>{r=sanitize(ensureProperties({...r,[o]:a},t,e)),n.notify()},removeContextProperty:o=>{delete r[o],ensureProperties(r,t,e),n.notify()},clearContext:()=>{r={},n.notify()},changeObservable:n};return o}let O={GRANTED:"granted",NOT_GRANTED:"not-granted"};function addEventListeners(e,t,r,n,{once:o,capture:a,passive:s}={}){let c=monitor(t=>{(t.isTrusted||t.__ddIsTrusted||e.allowUntrustedEvents)&&(o&&stop(),n(t))}),l=s?{capture:a,passive:s}:a,f=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,d=getZoneJsOriginalValue(f,"addEventListener");function stop(){let e=getZoneJsOriginalValue(f,"removeEventListener");r.forEach(r=>e.call(t,r,c,l))}return r.forEach(e=>d.call(t,e,c,l)),{stop}}function objectHasValue(e,t){return Object.keys(e).some(r=>e[r]===t)}function isEmptyObject(e){return 0===Object.keys(e).length}let T=[];function storeContextManager(e,t,r,n){let o=`_dd_c_${r}_${n}`;T.push(addEventListeners(e,window,["storage"],({key:e})=>{o===e&&t.setContext(getFromStorage())},void 0)),t.changeObservable.subscribe(function(){localStorage.setItem(o,JSON.stringify(t.getContext()))});let a=combine(getFromStorage(),t.getContext());function getFromStorage(){let e=localStorage.getItem(o);return e?JSON.parse(e):{}}isEmptyObject(a)||t.setContext(a)}function computeStackTrace(e){let t=[],r=tryToGetString(e,"stack"),n=String(e);return r&&r.startsWith(n)&&(r=r.slice(n.length)),r&&r.split("\n").forEach(e=>{let r=function(e){let t=j.exec(e);if(!t)return;let r=t[2]&&0===t[2].indexOf("native"),n=t[2]&&0===t[2].indexOf("eval"),o=R.exec(t[2]);return n&&o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{args:r?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||"?",line:t[3]?+t[3]:void 0,url:r?void 0:t[2]}}(e)||function(e){let t=F.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:"?",line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){let t=M.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||"?",line:+t[3],url:t[2]}}(e)||function(e){let t=P.exec(e);if(!t)return;let r=t[3]&&t[3].indexOf(" > eval")>-1,n=D.exec(t[3]);return r&&n&&(t[3]=n[1],t[4]=n[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||"?",line:t[4]?+t[4]:void 0,url:t[3]}}(e);r&&(!r.func&&r.line&&(r.func="?"),t.push(r))}),{message:tryToGetString(e,"message"),name:tryToGetString(e,"name"),stack:t}}let L="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet||\\w+\\.|\\/).*?)",B="(?::(\\d+))",j=RegExp(`^\\s*at (.*?) ?\\(${L}${B}?${B}?\\)?\\s*$`,"i"),R=RegExp(`\\((\\S*)${B}${B}\\)`),F=RegExp(`^\\s*at ?${L}${B}?${B}??\\s*$`,"i"),M=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,P=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?\s*$/i,D=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function tryToGetString(e,t){if("object"!=typeof e||!e||!(t in e))return;let r=e[t];return"string"==typeof r?r:void 0}let U=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function createHandlingStack(e){let t;let r=Error(e);return r.name="HandlingStack",callMonitored(()=>{let e=computeStackTrace(r);e.stack=e.stack.slice(2),t=toStackTraceString(e)}),t}function toStackTraceString(e){let t=formatErrorMessage(e);return e.stack.forEach(e=>{let r="?"===e.func?"":e.func,n=e.args&&e.args.length>0?`(${e.args.join(", ")})`:"",o=e.line?`:${e.line}`:"",a=e.line&&e.column?`:${e.column}`:"";t+=` at ${r}${n} @ ${e.url}${o}${a}`}),t}function formatErrorMessage(e){return`${e.name||"Error"}: ${e.message}`}let N="No stack, consider using an instance of Error";function computeRawError({stackTrace:e,originalError:t,handlingStack:r,componentStack:n,startClocks:o,nonErrorPrefix:a,useFallbackStack:s=!0,source:c,handling:l}){var f;let d=isError(t);return!e&&d&&(e=computeStackTrace(t)),{startClocks:o,source:c,handling:l,handlingStack:r,componentStack:n,originalError:t,type:e?e.name:void 0,message:(null==(f=e)?void 0:f.message)&&(null==f?void 0:f.name)?f.message:d?"Empty message":`${a} ${jsonStringify(sanitize(t))}`,stack:e?toStackTraceString(e):s?N:void 0,causes:d?function(e,t){let r=e,n=[];for(;isError(null==r?void 0:r.cause)&&n.length<10;){let e=computeStackTrace(r.cause);n.push({message:r.cause.message,source:t,type:null==e?void 0:e.name,stack:e&&toStackTraceString(e)}),r=r.cause}return n.length?n:void 0}(t,c):void 0,fingerprint:isError(t)&&"dd_fingerprint"in t?String(t.dd_fingerprint):void 0,context:function(e){if(null!==e&&"object"==typeof e&&"dd_context"in e)return e.dd_context}(t)}}function isError(e){return e instanceof Error||"[object Error]"===Object.prototype.toString.call(e)}(p=g||(g={})).PROFILING="profiling",p.TRACK_INTAKE_REQUESTS="track_intake_requests",p.WRITABLE_RESOURCE_GRAPHQL="writable_resource_graphql",p.DOM_MUTATION_IGNORING="dom_mutation_ignoring";let z=new Set,$="datadoghq.com",V=["ddsource","ddtags"];function dateNow(){return new Date().getTime()}function relativeNow(){return performance.now()}function clocksNow(){return{relative:relativeNow(),timeStamp:dateNow()}}function getNavigationStart(){return void 0===o&&(o=performance.timing.navigationStart),o}function sendToExtension(e,t){let r=window.__ddBrowserSdkExtensionCallback;r&&r({type:e,payload:t})}function performDraw(e){return 0!==e&&100*Math.random()<=e}function removeItem(e,t){let r=e.indexOf(t);r>=0&&e.splice(r,1)}function boundedBuffer_createBoundedBuffer(){let e=[];return{add:t=>{let r=e.push(t);r>500&&e.splice(0,1)},remove:t=>{removeItem(e,t)},drain:t=>{e.forEach(e=>e(t)),e.length=0}}}let q={log:"log",configuration:"configuration",usage:"usage"},W=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost",""],G=["ddog-gov.com"],H=boundedBuffer_createBoundedBuffer(),onRawTelemetryEventCollected=e=>{H.add(()=>onRawTelemetryEventCollected(e))};function addTelemetryDebug(e,t){displayIfDebugEnabled(m.debug,e,t),onRawTelemetryEventCollected({type:q.log,message:e,status:"debug",...t})}function addTelemetryError(e,t){onRawTelemetryEventCollected({type:q.log,status:"error",...function(e){if(isError(e)){let t=computeStackTrace(e);return{error:{kind:t.name,stack:toStackTraceString((t.stack=t.stack.filter(e=>!e.url||W.some(t=>e.url.startsWith(t))),t))},message:t.message}}return{error:{stack:N},message:`Uncaught ${jsonStringify(e)}`}}(e),...t})}function displayAlreadyInitializedError(e,t){t.silentMultipleInit||S.error(`${e} is already initialized.`)}let K={AGENT:"agent",CONSOLE:"console",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function isAuthorized(e,t,r){let n=r.getHandler(),o=Array.isArray(n)?n:[n];return Z[e]>=Z[r.getLevel()]&&o.includes(t)}let J={ok:"ok",debug:"debug",info:"info",notice:"notice",warn:"warn",error:"error",critical:"critical",alert:"alert",emerg:"emerg"},Z={[J.ok]:0,[J.debug]:1,[J.info]:2,[J.notice]:4,[J.warn]:5,[J.error]:6,[J.critical]:7,[J.alert]:8,[J.emerg]:9};function createErrorFieldFromRawError(e,{includeMessage:t=!1}={}){return{stack:e.stack,kind:e.type,message:t?e.message:void 0,causes:e.causes,fingerprint:e.fingerprint,handling:e.handling}}let Q={console:"console",http:"http"},X=Object.keys(J);let Logger=class Logger{constructor(e,t,r=Q.http,n=J.debug,o={}){this.handleLogStrategy=e,this.handlerType=r,this.level=n,this.contextManager=createContextManager("logger"),this.contextManager.setContext(o),t&&this.contextManager.setContextProperty("logger",{name:t})}logImplementation(e,t,r=J.info,n,o){let a;let s=sanitize(t);if(null!=n){let e=computeRawError({originalError:n,nonErrorPrefix:"Provided",source:K.LOGGER,handling:"handled",startClocks:clocksNow()});a=combine({error:createErrorFieldFromRawError(e,{includeMessage:!0})},s)}else a=s;this.handleLogStrategy({message:sanitize(e),context:a,status:r},this,o)}log(e,t,r=J.info,n){let o;isAuthorized(r,Q.http,this)&&(o=createHandlingStack("log")),this.logImplementation(e,t,r,n,o)}setContext(e){this.contextManager.setContext(e)}getContext(){return this.contextManager.getContext()}setContextProperty(e,t){this.contextManager.setContextProperty(e,t)}removeContextProperty(e){this.contextManager.removeContextProperty(e)}clearContext(){this.contextManager.clearContext()}setHandler(e){this.handlerType=e}getHandler(){return this.handlerType}setLevel(e){this.level=e}getLevel(){return this.level}};function createLoggerMethod(e){return function(t,r,n){let o;isAuthorized(e,Q.http,this)&&(o=createHandlingStack("log")),this.logImplementation(t,r,e,n,o)}}function getEventBridge(){let e=getGlobalObject().DatadogEventBridge;if(e)return{getCapabilities(){var t;return JSON.parse((null===(t=e.getCapabilities)||void 0===t?void 0:t.call(e))||"[]")},getPrivacyLevel(){var t;return null===(t=e.getPrivacyLevel)||void 0===t?void 0:t.call(e)},getAllowedWebViewHosts:()=>JSON.parse(e.getAllowedWebViewHosts()),send(t,r,n){e.send(JSON.stringify({eventType:t,event:r,view:n?{id:n}:void 0}))}}}function canUseEventBridge(e){var t;void 0===e&&(e=null===(t=getGlobalObject().location)||void 0===t?void 0:t.hostname);let r=getEventBridge();return!!r&&r.getAllowedWebViewHosts().some(t=>e===t||e.endsWith(`.${t}`))}function instrumentMethod(e,t,r,{computeHandlingStack:n}={}){let o=e[t];if("function"!=typeof o){if(!(t in e&&t.startsWith("on")))return{stop:functionUtils_noop};o=functionUtils_noop}let a=!1,instrumentation=function(){let e;if(a)return o.apply(this,arguments);let t=Array.from(arguments);callMonitored(r,null,[{target:this,parameters:t,onPostCall:t=>{e=t},handlingStack:n?createHandlingStack("instrumented method"):void 0}]);let s=o.apply(this,t);return e&&callMonitored(e,null,[s]),s};return e[t]=instrumentation,{stop:()=>{a=!0,e[t]===instrumentation&&(e[t]=o)}}}function normalizeUrl(e){return function(e,t){let r=function(){if(void 0===a)try{let e=new Y("http://test/path");a="http://test/path"===e.href}catch(e){a=!1}return a?Y:void 0}();if(r)try{return void 0!==t?new r(e,t):new r(e)}catch(r){throw Error(`Failed to construct URL: ${String(r)} ${jsonStringify({url:e,base:t})}`)}if(void 0===t&&!/:/.test(e))throw Error(`Invalid URL: '${e}'`);let n=document,o=n.createElement("a");if(void 0!==t){n=document.implementation.createHTMLDocument("");let e=n.createElement("base");e.href=t,n.head.appendChild(e),n.body.appendChild(o)}return o.href=e,o}(e,location.href).href}!function(e,t,r,n){var o,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(a<3?o(s):a>3?o(t,r,s):o(t,r))||s);a>3&&s&&Object.defineProperty(t,r,s)}([function(e,t,r){let o=r.value;r.value=function(...e){let t=n?monitor(o):o;return t.apply(this,e)}}],Logger.prototype,"logImplementation",null),Logger.prototype.ok=createLoggerMethod(J.ok),Logger.prototype.debug=createLoggerMethod(J.debug),Logger.prototype.info=createLoggerMethod(J.info),Logger.prototype.notice=createLoggerMethod(J.notice),Logger.prototype.warn=createLoggerMethod(J.warn),Logger.prototype.error=createLoggerMethod(J.error),Logger.prototype.critical=createLoggerMethod(J.critical),Logger.prototype.alert=createLoggerMethod(J.alert),Logger.prototype.emerg=createLoggerMethod(J.emerg);let Y=URL;function initFetchObservable(){return s||(s=new Observable(e=>{if(!window.fetch)return;let{stop:t}=instrumentMethod(window,"fetch",t=>(function({parameters:e,onPostCall:t,handlingStack:r},n){let[o,a]=e,s=a&&a.method;void 0===s&&o instanceof Request&&(s=o.method);let c=void 0!==s?String(s).toUpperCase():"GET",l=o instanceof Request?o.url:normalizeUrl(String(o)),f=clocksNow(),d={state:"start",init:a,input:o,method:c,startClocks:f,url:l,handlingStack:r};n.notify(d),e[0]=d.input,e[1]=d.init,t(e=>(function(e,t,r){function reportFetch(t){r.state="resolve",Object.assign(r,t),e.notify(r)}t.then(monitor(e=>{reportFetch({response:e,responseType:e.type,status:e.status,isAborted:!1})}),monitor(e=>{var t,n;reportFetch({status:0,isAborted:(null===(n=null===(t=r.init)||void 0===t?void 0:t.signal)||void 0===n?void 0:n.aborted)||e instanceof DOMException&&e.code===DOMException.ABORT_ERR,error:e})}))})(n,e,d))})(t,e),{computeHandlingStack:!0});return t})),s}function generateUUID(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,generateUUID)}let ee=/([\w-]+)\s*=\s*([^;]+)/g;function setCookie(e,t,r=0,n){let o=new Date;o.setTime(o.getTime()+r);let a=`expires=${o.toUTCString()}`,s=n&&n.crossSite?"none":"strict",c=n&&n.domain?`;domain=${n.domain}`:"",l=n&&n.secure?";secure":"",f=n&&n.partitioned?";partitioned":"";document.cookie=`${e}=${t};${a};path=/;samesite=${s}${c}${l}${f}`}function getCookie(e){return function(e,t){for(ee.lastIndex=0;;){let r=ee.exec(e);if(r){if(r[1]===t)return r[2]}else break}}(document.cookie,e)}function getInitCookie(e){return l||(l=function(e){let t=new Map;for(ee.lastIndex=0;;){let r=ee.exec(e);if(r)t.set(r[1],r[2]);else break}return t}(document.cookie)),l.get(e)}let et="_dd_s";function objectValues(e){return Object.values(e)}let er=144e5,en=31536e6,eo={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},ei=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function getExpiredSessionState(e,t){let r={isExpired:"1"};return t.trackAnonymousUser&&((null==e?void 0:e.anonymousId)?r.anonymousId=null==e?void 0:e.anonymousId:r.anonymousId=generateUUID()),r}function isSessionInExpiredState(e){return void 0!==e.isExpired||!((void 0===e.created||dateNow()-Number(e.created)"anonymousId"===e?`aid=${t}`:`${e}=${t}`).join("&")}function toSessionState(e){let t={};return e&&(-1!==e.indexOf("&")||ei.test(e))&&e.split("&").forEach(e=>{let r=ei.exec(e);if(null!==r){let[,e,n]=r;"aid"===e?t.anonymousId=n:t[e]=n}}),t}function selectCookieStrategy(e){let t=function(e){let t={};return t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=function(){if(void 0===f){let e=`dd_site_test_${generateUUID()}`,t=window.location.hostname.split("."),r=t.pop();for(;t.length&&!getCookie(e);)setCookie(e,"test",1e3,{domain:r=`${t.pop()}.${r}`});setCookie(e,"",0,{domain:r}),f=r}return f}()),t}(e);return!function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{let t=`dd_cookie_test_${generateUUID()}`,r="test";setCookie(t,r,6e4,e);let n=getCookie(t)===r;return setCookie(t,"",0,e),n}catch(e){return S.error(e),!1}}(t)?void 0:{type:eo.COOKIE,cookieOptions:t}}function storeSessionCookie(e,t,r,n){setCookie(et,toSessionString(r),t.trackAnonymousUser?en:n,e)}function retrieveSessionCookie(){let e=getCookie(et),t=toSessionState(e);return t}function selectLocalStorageStrategy(){try{let e=generateUUID(),t=`_dd_test_${e}`;localStorage.setItem(t,e);let r=localStorage.getItem(t);return localStorage.removeItem(t),e===r?{type:eo.LOCAL_STORAGE}:void 0}catch(e){return}}function persistInLocalStorage(e){localStorage.setItem(et,toSessionString(e))}function retrieveSessionFromLocalStorage(){let e=localStorage.getItem(et);return toSessionState(e)}let ea=[];function processSessionStoreOperations(e,t,r=0){var n;let o;let{isLockEnabled:a,persistSession:s,expireSession:c}=t,persistWithLock=e=>s({...e,lock:o}),retrieveStore=()=>{let e=t.retrieveSession(),r=e.lock;return e.lock&&delete e.lock,{session:e,lock:r}};if(d||(d=e),e!==d){ea.push(e);return}if(a&&r>=100){next(t);return}let l=retrieveStore();if(a&&(l.lock||(o=generateUUID(),persistWithLock(l.session),(l=retrieveStore()).lock!==o))){retryLater(e,t,r);return}let f=e.process(l.session);if(a&&(l=retrieveStore()).lock!==o){retryLater(e,t,r);return}if(f&&(isSessionInExpiredState(f)?c(f):(expandSessionState(f),a?persistWithLock(f):s(f))),a&&!(f&&isSessionInExpiredState(f))){if((l=retrieveStore()).lock!==o){retryLater(e,t,r);return}s(l.session),f=l.session}null===(n=e.after)||void 0===n||n.call(e,f||l.session),next(t)}function retryLater(e,t,r){timer_setTimeout(()=>{processSessionStoreOperations(e,t,r+1)},10)}function next(e){d=void 0;let t=ea.shift();t&&processSessionStoreOperations(t,e)}function createEndpointBuilder(e,t,r){let n=function(e,t){let r=`/api/v2/${t}`,n=e.proxy;if("string"==typeof n){let e=normalizeUrl(n);return t=>`${e}?ddforward=${encodeURIComponent(`${r}?${t}`)}`}if("function"==typeof n)return e=>n({path:r,parameters:e});let o=function(e,t){let{site:r=$,internalAnalyticsSubdomain:n}=t;if("logs"===e&&t.usePciIntake&&r===$)return"pci.browser-intake-datadoghq.com";if(n&&r===$)return`${n}.${$}`;if("dd0g-gov.com"===r)return`http-intake.logs.${r}`;let o=r.split("."),a=o.pop();return`browser-intake-${o.join("-")}.${a}`}(t,e);return e=>`https://${o}${r}?${e}`}(e,t);return{build(o,a){let s=function({clientToken:e,internalAnalyticsSubdomain:t},r,n,o,{retry:a,encoding:s}){let c=["sdk_version:6.8.0",`api:${o}`].concat(n);a&&c.push(`retry_count:${a.count}`,`retry_after:${a.lastFailureStatus}`);let l=["ddsource=browser",`ddtags=${encodeURIComponent(c.join(","))}`,`dd-api-key=${e}`,`dd-evp-origin-version=${encodeURIComponent("6.8.0")}`,"dd-evp-origin=browser",`dd-request-id=${generateUUID()}`];return s&&l.push(`dd-evp-encoding=${s}`),"rum"===r&&l.push(`batch_time=${dateNow()}`),t&&l.reverse(),l.join("&")}(e,t,r,o,a);return n(s)},tags:r,urlPrefix:n(""),trackType:t}}function buildTag(e,t){let r=200-e.length-1;(t.length>r||function(){try{return RegExp("[\\p{Ll}]","u"),!0}catch(e){return!1}}()&&RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(t))&&S.warn(`${e} value doesn't meet tag requirements and will be sanitized. ${I} ${k}/getting_started/tagging/#defining-tags`);let n=t.replace(/,/g,"_");return`${e}:${n}`}function isString(e,t){return null==e||"string"==typeof e||(S.error(`${t} must be defined as a string`),!1)}function isSampleRate(e,t){return!!(void 0===e||"number"==typeof e&&e>=0&&e<=100)||(S.error(`${t} Sample Rate should be a number between 0 and 100`),!1)}let es={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function buildRawReportError(e){return{startClocks:clocksNow(),source:K.REPORT,handling:"unhandled",...e}}function buildStack(e,t,r,n,o){return r?toStackTraceString({name:e,message:t,stack:[{func:"?",url:r,line:null!=n?n:void 0,column:null!=o?o:void 0}]}):void 0}function validateAndBuildForwardOption(e,t,r){if(void 0===e)return[];if(!("all"===e||Array.isArray(e)&&e.every(e=>t.includes(e)))){S.error(`${r} should be "all" or an array with allowed values "${t.join('", "')}"`);return}return"all"===e?t:function(e){let t=new Set;return e.forEach(e=>t.add(e)),Array.from(t)}(e)}let eu="logs",ec={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function willSyntheticsInjectRum(){return!!(window._DATADOG_SYNTHETICS_INJECTS_RUM||getInitCookie("datadog-synthetics-injects-rum"))}let el=1/0,ef=null,ed=new Set,eh=[];function computeTrackingType(e){return performDraw(e.sessionSampleRate)?"1":"0"}let ep={},eg={[m.log]:J.info,[m.debug]:J.debug,[m.info]:J.info,[m.warn]:J.warn,[m.error]:J.error},ey=new WeakMap;function openXhr({target:e,parameters:[t,r]}){ey.set(e,{state:"open",method:String(t).toUpperCase(),url:normalizeUrl(String(r))})}function abortXhr({target:e}){let t=ey.get(e);t&&(t.isAborted=!0)}function truncateResponseText(e,t){return e.length>t.requestErrorResponseLengthLimit?`${e.substring(0,t.requestErrorResponseLengthLimit)}...`:e}let ev=class{constructor(){this.callbacks={}}notify(e,t){let r=this.callbacks[e];r&&r.forEach(e=>e(t))}subscribe(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:()=>{this.callbacks[e]=this.callbacks[e].filter(e=>t!==e)}}}},em={[J.ok]:m.debug,[J.debug]:m.debug,[J.info]:m.info,[J.notice]:m.info,[J.warn]:m.warn,[J.error]:m.error,[J.critical]:m.error,[J.alert]:m.error,[J.emerg]:m.error};function createBatch({encoder:e,request:t,flushController:r,messageBytesLimit:n}){let o={},a=r.flushObservable.subscribe(r=>(function(r){var n;let a=objectValues(o).join("\n");o={};let s=(n=r.reason,objectValues(ec).includes(n)),c=s?t.sendOnExit:t.send;if(s&&e.isAsync){let t=e.finishSync();t.outputBytesCount&&c(formatPayloadFromEncoder(t));let r=[t.pendingData,a].filter(Boolean).join("\n");r&&c({data:r,bytesCount:computeBytesCount(r)})}else a&&e.write(e.isEmpty?a:` ${a}`),e.finish(e=>{c(formatPayloadFromEncoder(e))})})(r));function addOrUpdate(t,a){let s=jsonStringify(t),c=e.estimateEncodedBytesCount(s);if(c>=n){S.warn(`Discarded a message whose size was bigger than the maximum allowed size ${n}KB. ${I} ${C}/#technical-limitations`);return}void 0!==a&&void 0!==o[a]&&function(t){let n=o[t];delete o[t];let a=e.estimateEncodedBytesCount(n);r.notifyAfterRemoveMessage(a)}(a),r.notifyBeforeAddMessage(c),void 0!==a?(o[a]=s,r.notifyAfterAddMessage()):e.write(e.isEmpty?s:` ${s}`,e=>{r.notifyAfterAddMessage(e-c)})}return{flushController:r,add:addOrUpdate,upsert:addOrUpdate,stop:a.unsubscribe}}function formatPayloadFromEncoder(e){return{data:"string"==typeof e.output?e.output:new Blob([e.output],{type:"text/plain"}),bytesCount:e.outputBytesCount,encoding:e.encoding}}function sendWithRetryStrategy(e,t,r,n,o){0===t.transportStatus&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?send(e,t,r,{onSuccess:()=>retryQueuedPayloads(0,t,r,n,o),onFailure:()=>{t.queuedPayloads.enqueue(e),function scheduleRetry(e,t,r,n){2===e.transportStatus&&timer_setTimeout(()=>{let o=e.queuedPayloads.first();send(o,e,t,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=1e3,retryQueuedPayloads(1,e,t,r,n)},onFailure:()=>{e.currentBackoffTime=Math.min(6e4,2*e.currentBackoffTime),scheduleRetry(e,t,r,n)}})},e.currentBackoffTime)}(t,r,n,o)}}):t.queuedPayloads.enqueue(e)}function send(e,t,r,{onSuccess:n,onFailure:o}){t.bandwidthMonitor.add(e),r(e,r=>{t.bandwidthMonitor.remove(e),"opaque"!==r.type&&(0===r.status&&!navigator.onLine||408===r.status||429===r.status||r.status>=500)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:r.status},o()):(t.transportStatus=0,n())})}function retryQueuedPayloads(e,t,r,n,o){0===e&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:`Reached max ${n} events size queued for upload: ${3}MiB`,source:K.AGENT,startClocks:clocksNow()}),t.queueFullReported=!0);let a=t.queuedPayloads;for(t.queuedPayloads=newPayloadQueue();a.size()>0;)sendWithRetryStrategy(a.dequeue(),t,r,n,o)}function newPayloadQueue(){let e=[];return{bytesCount:0,enqueue(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:()=>e[0],dequeue(){let t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:()=>e.length,isFull(){return this.bytesCount>=3145728}}}let eb=!1;function fetchStrategy(e,t,r){let n=e.build("fetch",t);fetch(n,{method:"POST",body:t.data,mode:"cors"}).then(monitor(e=>null==r?void 0:r({status:e.status,type:e.type}))).catch(monitor(()=>null==r?void 0:r({status:0})))}function startBatchWithReplica(e,t,r,n,o,a,s=createBatch){let c=createBatchFromConfig(e,t),l=r&&createBatchFromConfig(e,r);function createBatchFromConfig(e,{endpoint:t,encoder:r}){return s({encoder:r,request:function(e,t,r){let n={transportStatus:0,currentBackoffTime:1e3,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=81920&&this.ongoingRequestCount<32},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}},queuedPayloads:newPayloadQueue(),queueFullReported:!1},sendStrategyForRetry=(r,n)=>(function(e,t,r,n){let o=function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}}()&&r.bytesCountnull==n?void 0:n({status:e.status,type:e.type}))).catch(monitor(()=>fetchStrategy(e,r,n)))}else fetchStrategy(e,r,n)})(e,t,r,n);return{send:t=>{sendWithRetryStrategy(t,n,sendStrategyForRetry,e.trackType,r)},sendOnExit:r=>{!function(e,t,r){let n=!!navigator.sendBeacon&&r.bytesCountflush(e.reason)),c=o.subscribe(()=>flush("session_expire")),l=new Observable(()=>()=>{s.unsubscribe(),c.unsubscribe()}),f=0,d=0;function flush(e){if(0===d)return;let t=d,r=f;d=0,f=0,cancelDurationLimitTimeout(),l.notify({reason:e,messagesCount:t,bytesCount:r})}function cancelDurationLimitTimeout(){timer_clearTimeout(a),a=void 0}return{flushObservable:l,get messagesCount(){return d},notifyBeforeAddMessage(e){f+e>=t&&flush("bytes_limit"),d+=1,f+=e,void 0===a&&(a=timer_setTimeout(()=>{flush("duration_limit")},r))},notifyAfterAddMessage(r=0){f+=r,d>=e?flush("messages_limit"):f>=t&&flush("bytes_limit")},notifyAfterRemoveMessage(e){f-=e,0==(d-=1)&&cancelDurationLimitTimeout()}}}({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageMayExitObservable:o,sessionExpireObservable:a}),messageBytesLimit:e.messageBytesLimit})}return{flushObservable:c.flushController.flushObservable,add(e,t=!0){c.add(e),l&&t&&l.add(r.transformMessage?r.transformMessage(e):e)},upsert:(e,t)=>{c.upsert(e,t),l&&l.upsert(r.transformMessage?r.transformMessage(e):e,t)},stop:()=>{c.stop(),l&&l.stop()}}}function createIdentityEncoder(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(r,n){let o=computeBytesCount(r);t+=o,e+=r,n&&n(o)},finish(e){e(this.finishSync())},finishSync(){let r={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,r},estimateEncodedBytesCount:e=>e.length}}let e_="DISCARDED",ew="SKIPPED",createHooks=function(){let e={};return{register:(t,r)=>(e[t]||(e[t]=[]),e[t].push(r),{unregister:()=>{e[t]=e[t].filter(e=>e!==r)}}),triggerHook(t,r){let n=e[t]||[],o=[];for(let e of n){let t=e(r);if(t===e_)return e_;t!==ew&&o.push(t)}return combine(...o)}}},eS=function(e){let t=createContextManager("global context"),r=createContextManager("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}}),n=createContextManager("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}}),o=function(e){let t=new Observable;return{tryToInit(t){e||(e=t)},update(r){e=r,t.notify()},isGranted:()=>e===O.GRANTED,observable:t}}();function getCommonContext(){return{view:{referrer:document.referrer,url:window.location.href},context:t.getContext(),user:r.getContext(),account:n.getContext()}}let a=function(e,t,r){let n,o;let a=boundedBuffer_createBoundedBuffer(),s=t.observable.subscribe(tryStartLogs);function tryStartLogs(){if(!o||!n||!t.isGranted())return;s.unsubscribe();let e=r(n,o);a.drain(e)}return{init(e){var r;if(!e){S.error("Missing configuration");return}if(Array.isArray(r=e.enableExperimentalFeatures)&&function(e){e.forEach(e=>{z.add(e)})}(r.filter(e=>objectHasValue(g,e))),canUseEventBridge()&&(e={...e,clientToken:"empty"}),n=e,o){displayAlreadyInitializedError("DD_LOGS",e);return}let a=function(e){!0===e.usePciIntake&&e.site&&"datadoghq.com"!==e.site&&S.warn("PCI compliance for Logs is only available for Datadog organizations in the US1 site. Default intake will be used.");let t=function(e){var t,r,n,o,a,s,c;if(!e||!e.clientToken){S.error("Client Token is not configured, we will not send any data.");return}if((!(c=e.site)||"string"!=typeof c||/(datadog|ddog|datad0g|dd0g)/.test(c)||(S.error(`Site should be a valid Datadog site. ${I} ${k}/getting_started/site/.`),0))&&isSampleRate(e.sessionSampleRate,"Session")&&isSampleRate(e.telemetrySampleRate,"Telemetry")&&isSampleRate(e.telemetryConfigurationSampleRate,"Telemetry Configuration")&&isSampleRate(e.telemetryUsageSampleRate,"Telemetry Usage")&&isString(e.version,"Version")&&isString(e.env,"Env")&&isString(e.service,"Service")){if(void 0!==e.trackingConsent&&!objectHasValue(O,e.trackingConsent)){S.error('Tracking Consent should be either "granted" or "not-granted"');return}return{beforeSend:e.beforeSend&&catchUserErrors(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:function(e){switch(e.sessionPersistence){case eo.COOKIE:return selectCookieStrategy(e);case eo.LOCAL_STORAGE:return selectLocalStorageStrategy();case void 0:{let t=selectCookieStrategy(e);return!t&&e.allowFallbackToLocalStorage&&(t=selectLocalStorageStrategy()),t}default:S.error(`Invalid session persistence '${String(e.sessionPersistence)}'`)}}(e),sessionSampleRate:null!==(t=e.sessionSampleRate)&&void 0!==t?t:100,telemetrySampleRate:null!==(r=e.telemetrySampleRate)&&void 0!==r?r:20,telemetryConfigurationSampleRate:null!==(n=e.telemetryConfigurationSampleRate)&&void 0!==n?n:5,telemetryUsageSampleRate:null!==(o=e.telemetryUsageSampleRate)&&void 0!==o?o:5,service:e.service||void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:null!==(a=e.trackingConsent)&&void 0!==a?a:O.GRANTED,trackAnonymousUser:null===(s=e.trackAnonymousUser)||void 0===s||s,storeContextsAcrossPages:!!e.storeContextsAcrossPages,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:3e4,batchMessagesLimit:50,messageBytesLimit:262144,...function(e){let t=e.site||$,r=function(e){let{env:t,service:r,version:n,datacenter:o}=e,a=[];return t&&a.push(buildTag("env",t)),r&&a.push(buildTag("service",r)),n&&a.push(buildTag("version",n)),o&&a.push(buildTag("datacenter",o)),a}(e),n={logsEndpointBuilder:createEndpointBuilder(e,"logs",r),rumEndpointBuilder:createEndpointBuilder(e,"rum",r),profilingEndpointBuilder:createEndpointBuilder(e,"profile",r),sessionReplayEndpointBuilder:createEndpointBuilder(e,"replay",r)},o=function(e,t){if(!e.replica)return;let r={...e,site:$,clientToken:e.replica.clientToken},n={logsEndpointBuilder:createEndpointBuilder(r,"logs",t),rumEndpointBuilder:createEndpointBuilder(r,"rum",t)};return{applicationId:e.replica.applicationId,...n}}(e,r);return{replica:o,site:t,...n}}(e)}}}(e),r=validateAndBuildForwardOption(e.forwardConsoleLogs,objectValues(m),"Forward Console Logs"),n=validateAndBuildForwardOption(e.forwardReports,objectValues(es),"Forward Reports");if(t&&r&&n)return e.forwardErrorsToLogs&&!r.includes(m.error)&&r.push(m.error),{forwardErrorsToLogs:!1!==e.forwardErrorsToLogs,forwardConsoleLogs:r,forwardReports:n,requestErrorResponseLengthLimit:32768,...t}}(e);a&&(o=a,initFetchObservable().subscribe(functionUtils_noop),t.tryToInit(a.trackingConsent),tryStartLogs())},get initConfiguration(){return n},getInternalContext:functionUtils_noop,handleLog(t,r,n,o=e(),s=dateNow()){a.add(e=>e.handleLog(t,r,n,o,s))}}}(getCommonContext,o,(s,c)=>{s.storeContextsAcrossPages&&(storeContextManager(c,t,eu,2),storeContextManager(c,r,eu,1),storeContextManager(c,n,eu,4));let l=e(s,c,getCommonContext,o);return a={init:e=>{displayAlreadyInitializedError("DD_LOGS",e)},initConfiguration:s,...l},l}),s={},c=new Logger((...e)=>a.handleLog(...e));return function(e){let t={version:"6.8.0",onReady(e){e()},...e};return Object.defineProperty(t,"_setDebug",{get:()=>setDebugMode,enumerable:!1}),t}({logger:c,init:monitor(e=>a.init(e)),setTrackingConsent:monitor(e=>{o.update(e),onRawTelemetryEventCollected({type:q.usage,usage:{feature:"set-tracking-consent",tracking_consent:e}})}),getGlobalContext:monitor(()=>t.getContext()),setGlobalContext:monitor(e=>t.setContext(e)),setGlobalContextProperty:monitor((e,r)=>t.setContextProperty(e,r)),removeGlobalContextProperty:monitor(e=>t.removeContextProperty(e)),clearGlobalContext:monitor(()=>t.clearContext()),createLogger:monitor((e,t={})=>(s[e]=new Logger((...e)=>a.handleLog(...e),sanitize(e),t.handler,t.level,sanitize(t.context)),s[e])),getLogger:monitor(e=>s[e]),getInitConfiguration:monitor(()=>mergeInto(void 0,a.initConfiguration)),getInternalContext:monitor(e=>a.getInternalContext(e)),setUser:monitor(r.setContext),getUser:monitor(r.getContext),setUserProperty:monitor(r.setContextProperty),removeUserProperty:monitor(r.removeContextProperty),clearUser:monitor(r.clearContext),setAccount:monitor(n.setContext),getAccount:monitor(n.getContext),setAccountProperty:monitor(n.setContextProperty),removeAccountProperty:monitor(n.removeContextProperty),clearAccount:monitor(n.clearContext)})}(function(e,t,r,o){let a=new ev,s=createHooks(),l=[];a.subscribe(1,e=>sendToExtension("logs",e));let reportError=e=>{a.notify(0,{rawLogsEvent:{message:e.message,date:e.startClocks.timeStamp,origin:K.AGENT,status:J.error}}),addTelemetryDebug("Error reported to customer",{"error.message":e.message})},f=new Observable(e=>{let{stop:r}=addEventListeners(t,window,["visibilitychange","freeze"],t=>{"visibilitychange"===t.type&&"hidden"===document.visibilityState?e.notify({reason:ec.HIDDEN}):"freeze"===t.type&&e.notify({reason:ec.FROZEN})},{capture:!0}),n=addEventListeners(t,window,["beforeunload"],()=>{e.notify({reason:ec.UNLOADING})},void 0).stop;return()=>{r(),n()}}),d=!t.sessionStoreStrategyType||canUseEventBridge()||willSyntheticsInjectRum()?function(e){let t="1"===computeTrackingType(e),r=t?{}:void 0;return{findTrackedSession:()=>r,expireObservable:new Observable}}(t):function(e,t){let r=function(e,t,r,n){let o=new Observable,a=new Observable,s=function(e,t,r,n){let o;let a=new Observable,s=new Observable,l=new Observable,f=e.type===eo.COOKIE?function(e,t){let r={isLockEnabled:0===(null!=c?c:c=function(e=window){var t;let r=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(r)?0:(null===(t=e.navigator.vendor)||void 0===t?void 0:t.indexOf("Apple"))===0||/safari/i.test(r)&&!/chrome|android/i.test(r)?1:2}()),persistSession:r=>storeSessionCookie(t,e,r,9e5),retrieveSession:retrieveSessionCookie,expireSession:r=>storeSessionCookie(t,e,getExpiredSessionState(r,e),er)};return!function(e){let t=getInitCookie(et);if(!t){let t=getInitCookie("_dd"),r=getInitCookie("_dd_r"),n=getInitCookie("_dd_l"),o={};t&&(o.id=t),n&&/^[01]$/.test(n)&&(o.logs=n),r&&/^[012]$/.test(r)&&(o.rum=r),isEmptyObject(o)||(expandSessionState(o),e.persistSession(o))}}(r),r}(t,e.cookieOptions):{isLockEnabled:!1,persistSession:persistInLocalStorage,retrieveSession:retrieveSessionFromLocalStorage,expireSession:e=>{persistInLocalStorage(getExpiredSessionState(e,t))}},{expireSession:d}=f,h=timer_setInterval(function(){processSessionStoreOperations({process:e=>isSessionInExpiredState(e)?getExpiredSessionState(e,t):void 0,after:synchronizeSession},f)},1e3);startSession();let{throttled:p,cancel:g}=function(e,t,r){let n,o;let a=!r||void 0===r.leading||r.leading,s=!r||void 0===r.trailing||r.trailing,c=!1;return{throttled:(...t)=>{if(c){n=t;return}a?e(...t):n=t,c=!0,o=timer_setTimeout(()=>{s&&n&&e(...n),c=!1,n=void 0},1e3)},cancel:()=>{timer_clearTimeout(o),c=!1,n=void 0}}}(()=>{processSessionStoreOperations({process:e=>{if(isEmptyObject(e))return;let t=synchronizeSession(e);return function(e){if(isEmptyObject(e))return 0;let{trackingType:t,isTracked:o}=n(e[r]);e[r]=t,delete e.isExpired,o&&!e.id&&(e.id=generateUUID(),e.created=String(dateNow()))}(t),t},after:e=>{isEmptyObject(e)||hasSessionInCache()||(o=e,a.notify()),o=e}},f)},0);function synchronizeSession(e){var n;return isSessionInExpiredState(e)&&(e=getExpiredSessionState(e,t)),hasSessionInCache()&&((n=e,o.id!==n.id||o[r]!==n[r])?(o=getExpiredSessionState(o,t),s.notify()):(l.notify({previousState:o,newState:e}),o=e)),e}function startSession(){processSessionStoreOperations({process:e=>{if(isEmptyObject(e))return getExpiredSessionState(e,t)},after:e=>{o=e}},f)}function hasSessionInCache(){return void 0!==o[r]}return{expandOrRenewSession:p,expandSession:function(){processSessionStoreOperations({process:e=>hasSessionInCache()?synchronizeSession(e):void 0},f)},getSession:()=>o,renewObservable:a,expireObservable:s,sessionStateUpdateObservable:l,restartSession:startSession,expire:()=>{g(),d(o),synchronizeSession(getExpiredSessionState(o,t))},stop:()=>{timer_clearInterval(h)},updateSessionState:function(e){processSessionStoreOperations({process:t=>({...t,...e}),after:synchronizeSession},f)}}}(e.sessionStoreStrategyType,e,t,r);eh.push(()=>s.stop());let l=function({expireDelay:e,maxEntries:t}){let r=[];ef||(ef=timer_setInterval(()=>void ed.forEach(e=>e()),6e4));let clearExpiredValues=()=>{let t=relativeNow()-e;for(;r.length>0&&r[r.length-1].endTime{removeItem(r,o)},close:e=>{o.endTime=e}};return t&&r.length>=t&&r.pop(),r.unshift(o),o},find:function(e=el,t={returnInactive:!1}){for(let n of r)if(n.startTime<=e){if(t.returnInactive||e<=n.endTime)return n.value;break}},closeActive:function(e){let t=r[0];t&&t.endTime===el&&t.close(e)},findAll:function(e=el,t=0){let n=e+t;return r.filter(t=>t.startTime<=n&&e<=t.endTime).map(e=>e.value)},reset:function(){r=[]},stop:function(){ed.delete(clearExpiredValues),0===ed.size&&ef&&(timer_clearInterval(ef),ef=null)}}}({expireDelay:er});function buildSessionContext(){return{id:s.getSession().id,trackingType:s.getSession()[t],isReplayForced:!!s.getSession().forcedReplay,anonymousId:s.getSession().anonymousId}}return eh.push(()=>l.stop()),s.renewObservable.subscribe(()=>{l.add(buildSessionContext(),relativeNow()),o.notify()}),s.expireObservable.subscribe(()=>{a.notify(),l.closeActive(relativeNow())}),s.expandOrRenewSession(),l.add(buildSessionContext(),{relative:0,timeStamp:getNavigationStart()}.relative),n.observable.subscribe(()=>{n.isGranted()?s.expandOrRenewSession():s.expire()}),function(e,t){let{stop:r}=addEventListeners(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0});eh.push(r)}(e,()=>{n.isGranted()&&s.expandOrRenewSession()}),function(e,t){let expandSessionWhenVisible=()=>{"visible"===document.visibilityState&&t()},{stop:r}=addEventListeners(e,document,["visibilitychange"],expandSessionWhenVisible,void 0);eh.push(r);let n=timer_setInterval(expandSessionWhenVisible,6e4);eh.push(()=>{timer_clearInterval(n)})}(e,()=>s.expandSession()),function(e,t){let{stop:r}=addEventListeners(e,window,["resume"],t,{capture:!0});eh.push(r)}(e,()=>s.restartSession()),{findSession:(e,t)=>l.find(e,t),renewObservable:o,expireObservable:a,sessionStateUpdateObservable:s.sessionStateUpdateObservable,expire:s.expire,updateSessionState:s.updateSessionState}}(e,"logs",t=>(function(e,t){let r="0"===t||"1"===t?t:computeTrackingType(e);return{trackingType:r,isTracked:"1"===r}})(e,t),t);return{findTrackedSession:(e,t={returnInactive:!1})=>{let n=r.findSession(e,t);return n&&"1"===n.trackingType?{id:n.id,anonymousId:n.anonymousId}:void 0},expireObservable:r.expireObservable}}(t,o),{stop:p,getRUMInternalContext:g}=function(e){let t=window,r=!1;function getRUMInternalContext(e){let n=willSyntheticsInjectRum(),o=n?t.DD_RUM_SYNTHETICS:t.DD_RUM,a=function(e,t){if(t&&t.getInternalContext)return t.getInternalContext(e)}(e,o);if(a)return a;n&&!r&&(r=!0,addTelemetryDebug("Logs sent before RUM is injected by the synthetics worker",{testId:function(){let e=window._DATADOG_SYNTHETICS_PUBLIC_ID||getInitCookie("datadog-synthetics-public-id");return"string"==typeof e?e:void 0}(),resultId:function(){let e=window._DATADOG_SYNTHETICS_RESULT_ID||getInitCookie("datadog-synthetics-result-id");return"string"==typeof e?e:void 0}()}))}return e.register(0,({startTime:e})=>{let t=getRUMInternalContext(e);return t||ew}),{getRUMInternalContext,stop:()=>{r=!1}}}(s),{stop:y}=function(e,t,r,o,a,s){var c;let l=function(e,t){let r;let o=new Observable,a=new Set,s=!G.includes(t.site)&&performDraw(t.telemetrySampleRate),c={[q.log]:s,[q.configuration]:s&&performDraw(t.telemetryConfigurationSampleRate),[q.usage]:s&&performDraw(t.telemetryUsageSampleRate)},l={is_local_file:"file:"===window.location.protocol,is_worker:"WorkerGlobalScope"in self};return onRawTelemetryEventCollected=n=>{let s=jsonStringify(n);if(c[n.type]&&a.size{r=e},observable:o,enabled:s}}("browser-logs-sdk",t);l.setContextProvider(()=>{var e,t,r,n,o,c;return{application:{id:null===(e=s())||void 0===e?void 0:e.application_id},session:{id:null===(t=a.findTrackedSession())||void 0===t?void 0:t.id},view:{id:null===(n=null===(r=s())||void 0===r?void 0:r.view)||void 0===n?void 0:n.id},action:{id:null===(c=null===(o=s())||void 0===o?void 0:o.user_action)||void 0===c?void 0:c.id}}});let f=[];if(canUseEventBridge()){let e=getEventBridge(),t=l.observable.subscribe(t=>e.send("internal_telemetry",t));f.push(()=>t.unsubscribe())}else{let e=startBatchWithReplica(t,{endpoint:t.rumEndpointBuilder,encoder:createIdentityEncoder()},t.replica&&{endpoint:t.replica.rumEndpointBuilder,encoder:createIdentityEncoder()},r,o,a.expireObservable);f.push(()=>e.stop());let n=l.observable.subscribe(r=>e.add(r,"datad0g.com"===t.site));f.push(()=>n.unsubscribe())}return H.drain(),c=function(e){let t={session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:e.sessionPersistence,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent};return{forward_errors_to_logs:e.forwardErrorsToLogs,forward_console_logs:e.forwardConsoleLogs,forward_reports:e.forwardReports,use_pci_intake:e.usePciIntake,...t}}(e),onRawTelemetryEventCollected({type:q.configuration,configuration:c}),{telemetry:l,stop:()=>{f.forEach(e=>e())}}}(e,t,reportError,f,d,g);l.push(()=>y()),function(e,t){function handleResponse(r,n){var o,a;function onResponseDataAvailable(e){let o={isAborted:n.isAborted,handlingStack:n.handlingStack};t.notify(0,{rawLogsEvent:{message:`${"xhr"===r?"XHR":"Fetch"} error ${n.method} ${n.url}`,date:n.startClocks.timeStamp,error:{stack:e||"Failed to load",handling:void 0},http:{method:n.method,status_code:n.status,url:n.url},status:J.error,origin:K.NETWORK},domainContext:o})}o=n.url,!V.every(e=>o.includes(e))&&(0===n.status&&"opaque"!==n.responseType||n.status>=500)&&("xhr"in n?onResponseDataAvailable("string"==typeof(a=n.xhr).response?truncateResponseText(a.response,e):a.response):n.response?function(e,t,r){var n,o,a;let s=function(e){try{return e.clone()}catch(e){return}}(e);s&&s.body?window.TextDecoder?(n=s.body,o=t.requestErrorResponseLengthLimit,a=(e,t)=>{e?r(`Unable to retrieve response: ${e}`):r(t)},function(e,t,r){let n=e.getReader(),o=[],a=0;function onDone(){let e,s;if(n.cancel().catch(functionUtils_noop),r.collectStreamBody){let t;if(1===o.length)t=o[0];else{t=new Uint8Array(a);let e=0;o.forEach(r=>{t.set(r,e),e+=r.length})}e=t.slice(0,r.bytesLimit),s=t.length>r.bytesLimit}t(void 0,e,s)}(function readMore(){n.read().then(monitor(e=>{if(e.done){onDone();return}r.collectStreamBody&&o.push(e.value),(a+=e.value.length)>r.bytesLimit?onDone():readMore()}),monitor(e=>t(e)))})()}(n,(e,t,r)=>{if(e)a(e);else{let e=new TextDecoder().decode(t);r&&(e+="..."),a(void 0,e)}},{bytesLimit:o,collectStreamBody:!0})):s.text().then(monitor(e=>r(truncateResponseText(e,t))),monitor(e=>r(`Unable to retrieve response: ${e}`))):r()}(n.response,e,onResponseDataAvailable):n.error&&onResponseDataAvailable(truncateResponseText(toStackTraceString(computeStackTrace(n.error)),e)))}e.forwardErrorsToLogs&&((h||(h=new Observable(t=>{let{stop:r}=instrumentMethod(XMLHttpRequest.prototype,"open",openXhr),{stop:n}=instrumentMethod(XMLHttpRequest.prototype,"send",r=>{(function({target:e,handlingStack:t},r,n){let o=ey.get(e);if(!o)return;o.state="start",o.startClocks=clocksNow(),o.isAborted=!1,o.xhr=e,o.handlingStack=t;let a=!1,{stop:s}=instrumentMethod(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&onEnd()}),onEnd=()=>{var t;c(),s(),a||(a=!0,o.state="complete",o.duration=(t=o.startClocks.timeStamp,dateNow()-t),o.status=e.status,n.notify({...o}))},{stop:c}=addEventListeners(r,e,["loadend"],onEnd,void 0);n.notify(o)})(r,e,t)},{computeHandlingStack:!0}),{stop:o}=instrumentMethod(XMLHttpRequest.prototype,"abort",abortXhr);return()=>{r(),n(),o()}})),h).subscribe(e=>{"complete"===e.state&&handleResponse("xhr",e)}),initFetchObservable().subscribe(e=>{"resolve"===e.state&&handleResponse("fetch",e)}))}(t,a),function(e,t){if(!e.forwardErrorsToLogs)return;let r=new Observable,{stop:n}=function(e){let handleRuntimeError=(t,r)=>{let n=computeRawError({stackTrace:r,originalError:t,startClocks:clocksNow(),nonErrorPrefix:"Uncaught",source:K.SOURCE,handling:"unhandled"});e.notify(n)},{stop:t}=instrumentMethod(window,"onerror",({parameters:[e,t,r,n,o]})=>{let a;isError(o)||(a=function(e,t,r,n){let o,a;if(void 0===t)return;let{name:s,message:c}=("[object String]"===({}).toString.call(e)&&([,o,a]=U.exec(e)),{name:o,message:a});return{name:s,message:c,stack:[{url:t,column:n,line:r}]}}(e,t,r,n)),handleRuntimeError(null!=o?o:e,a)}),{stop:r}=instrumentMethod(window,"onunhandledrejection",({parameters:[e]})=>{handleRuntimeError(e.reason||"Empty reason")});return{stop:()=>{t(),r()}}}(r);r.subscribe(e=>{t.notify(0,{rawLogsEvent:{message:e.message,date:e.startClocks.timeStamp,error:createErrorFieldFromRawError(e),origin:K.SOURCE,status:J.error},messageContext:e.context})})}(t,a),function(e,t){(function(e){let t=e.map(e=>(ep[e]||(ep[e]=new Observable(t=>{let r=b[e];return b[e]=(...n)=>{r.apply(console,n);let o=createHandlingStack("console error");callMonitored(()=>{t.notify(function(e,t,r){let n=e.map(e=>"string"==typeof e?sanitize(e):isError(e)?formatErrorMessage(computeStackTrace(e)):jsonStringify(sanitize(e),void 0,2)).join(" ");if(t===m.error){let o=e.find(isError),a=computeRawError({originalError:o,handlingStack:r,startClocks:clocksNow(),source:K.CONSOLE,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return a.message=n,{api:t,message:n,handlingStack:r,error:a}}return{api:t,message:n,error:void 0,handlingStack:r}}(n,e,o))})},()=>{b[e]=r}})),ep[e]));return mergeObservables(...t)})(e.forwardConsoleLogs).subscribe(e=>{var r;let n={rawLogsEvent:{date:dateNow(),message:e.message,origin:K.CONSOLE,error:e.error&&createErrorFieldFromRawError(e.error),status:eg[e.api]},messageContext:null===(r=e.error)||void 0===r?void 0:r.context,domainContext:{handlingStack:e.handlingStack}};t.notify(0,n)})}(t,a),function(e,t){(function(e,t){let r=[];t.includes(es.cspViolation)&&r.push(new Observable(t=>{let{stop:r}=addEventListeners(e,document,["securitypolicyviolation"],e=>{t.notify(function(e){let t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return buildRawReportError({type:e.effectiveDirective,message:`${es.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:buildStack(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${function(e,t,r=""){let n=e.charCodeAt(t-1),o=n>=55296&&n<=56319?t+1:t;return e.length<=o?e:`${e.slice(0,o)}${r}`}(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}(e))},void 0);return r}));let n=t.filter(e=>e!==es.cspViolation);return n.length&&r.push(new Observable(e=>{if(!window.ReportingObserver)return;let t=monitor((t,r)=>t.forEach(t=>e.notify(function(e){let{type:t,body:r}=e;return buildRawReportError({type:r.id,message:`${t}: ${r.message}`,originalError:e,stack:buildStack(r.id,r.message,r.sourceFile,r.lineNumber,r.columnNumber)})}(t)))),r=new window.ReportingObserver(t,{types:n,buffered:!0});return r.observe(),()=>{r.disconnect()}})),mergeObservables(...r)})(e,e.forwardReports).subscribe(e=>{let r,n=e.message,o="deprecation"===e.originalError.type?J.warn:J.error;if(o===J.error)r=createErrorFieldFromRawError(e);else if(e.stack){var a,s;n+=` Found in ${a=e.stack,null===(s=/@ (.+)/.exec(a))||void 0===s?void 0:s[1]}`}t.notify(0,{rawLogsEvent:{date:dateNow(),message:n,origin:K.REPORT,error:r,status:o}})})}(t,a);let{handleLog:v}={handleLog:function(e,t,r,n,o){let s=combine(t.getContext(),e.context);if(isAuthorized(e.status,Q.console,t)&&function({status:e,message:t},r){_[em[e]].call(b,t,r)}(e,s),isAuthorized(e.status,Q.http,t)){let t={rawLogsEvent:{date:o||dateNow(),message:e.message,status:e.status,origin:K.LOGGER},messageContext:s,savedCommonContext:n};r&&(t.domainContext={handlingStack:r}),a.notify(0,t)}}};if(!function(e,t,r,n,o,a){let s=X.concat(["custom"]),c={};s.forEach(e=>{var r;let n,o;c[e]=(r=t.eventRateLimiterThreshold,n=0,o=!1,{isLimitReached(){if(0===n&&timer_setTimeout(()=>{n=0},6e4),(n+=1)<=r||o)return o=!1,!1;if(n===r+1){o=!0;try{a({message:`Reached max number of ${e}s by minute: ${r}`,source:K.AGENT,startClocks:clocksNow()})}finally{o=!1}}return!0}})}),r.subscribe(0,({rawLogsEvent:a,messageContext:s,savedCommonContext:l,domainContext:f})=>{var d,h;let p;let g=a.date-getNavigationStart(),y=e.findTrackedSession(g),v=e.findTrackedSession(g,{returnInactive:!0});if(!v)return;let m=l||o();!isEmptyObject(m.account)&&m.account.id&&(p=m.account),y&&y.anonymousId&&!m.user.anonymous_id&&(m.user.anonymous_id=y.anonymousId);let b=n.triggerHook(0,{startTime:g}),_=combine({service:t.service,session_id:y?y.id:void 0,session:y?{id:y.id}:void 0,usr:isEmptyObject(m.user)?void 0:m.user,account:p,view:m.view},m.context,b,a,s);(null===(d=t.beforeSend)||void 0===d?void 0:d.call(t,_,f))===!1||_.origin!==K.AGENT&&(null!==(h=c[_.status])&&void 0!==h?h:c.custom).isLimitReached()||r.notify(1,_)})}(d,t,a,s,r,reportError),canUseEventBridge())!function(e){let t=getEventBridge();e.subscribe(1,e=>{t.send("log",e)})}(a);else{let{stop:e}=function(e,t,r,n,o){let a=startBatchWithReplica(e,{endpoint:e.logsEndpointBuilder,encoder:createIdentityEncoder()},e.replica&&{endpoint:e.replica.logsEndpointBuilder,encoder:createIdentityEncoder()},r,n,o.expireObservable);return t.subscribe(1,e=>{a.add(e)}),a}(t,a,reportError,f,d);l.push(()=>e())}return{handleLog:v,getInternalContext:e=>{let t=d.findTrackedSession(e);if(t)return{session_id:t.id}},stop:()=>{l.forEach(e=>e()),p()}}});!function(e,t,r){let n=e[t];n&&!n.q&&n.version&&S.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),e[t]=r,n&&n.q&&n.q.forEach(e=>catchUserErrors(e,"onReady callback threw an error:")())}(getGlobalObject(),"DD_LOGS",eS);var eE=r(71393),ek="loom-marketing";eS.init({clientToken:"pubb1955571dc736e541b72313c6942242f",site:"datadoghq.com",forwardErrorsToLogs:!1,sessionSampleRate:100,telemetrySampleRate:0,env:"production"});var info=function(e,t){eS.logger.info(e,(0,v._)((0,y._)({},t),{client:ek,gasV3EventName:t.segmentEventName?(0,eE.y)(t.segmentEventName):void 0}))},error=function(e,t){eS.logger.error(e,(0,v._)((0,y._)({},t),{client:ek,gasV3EventName:t.segmentEventName?(0,eE.y)(t.segmentEventName):void 0}))}},82350:function(e,t,r){"use strict";r.d(t,{cA:function(){return PageBgColorProvider},sW:function(){return usePageBgColor}});var n=r(24043),o=r(85893),a=r(67294),s=(0,a.createContext)({color:"bg-grey-7",setColor:function(){}});function PageBgColorProvider(e){var t=e.children,r=(0,n._)((0,a.useState)(""),2),c=r[0],l=r[1];return(0,a.useEffect)(function(){l(s)},[]),(0,o.jsx)(s.Provider,{value:{color:c,setColor:l},children:t})}s.displayName="PageBgColor";var usePageBgColor=function(){var e=(0,a.useContext)(s);return{color:e.color,setColor:e.setColor}}},49036:function(e,t,r){"use strict";r.d(t,{NA:function(){return getValue},fZ:function(){return writable}});var noop=function(){return function(){}};function getValue(e){var t;return e.subscribe(function(e){return t=e})(),t}function writable(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:noop,n=[],set=function(r){if(e="function"==typeof r?r(e):r,t)for(var o=0;o-1&&n.splice(e,1),0===n.length&&(t=void t())}}}}},33943:function(e,t,r){"use strict";r.d(t,{b:function(){return f}});var n=r(11010),o=r(72253),a=r(14932),s=r(70655),c=r(86274),l=(0,r(49036).fZ)({userFetched:!1}),f={subscribe:l.subscribe};function _getUserData(){return(_getUserData=(0,n._)(function(){var e,t,r,n,f,d;return(0,s.Jh)(this,function(s){switch(s.label){case 0:if(!window.location.search.includes("login=true"))return[3,1];return l.set({id:11,first_name:"Usagi",last_name:"Tsukino",email:"usagi.tsukino@fake.fake",avatars:[{thumb:"avatars/default-avatar.svg"}],default_workspace_id:123,persona:{persona_v1:{use_case_plan:"work"}},userFetched:!0}),[3,5];case 1:return[4,fetch(c.B3,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:"\n {\n me {\n id\n first_name\n last_name\n email\n avatars {\n thumb\n }\n default_workspace_id\n persona\n }\n }\n "})})];case 2:if(!(e=s.sent()).ok)return[3,4];return[4,e.json()];case 3:return(n=null==(r=s.sent())?void 0:null===(t=r.data)||void 0===t?void 0:t.me)?(l.set((0,a._)((0,o._)({},n),{userFetched:!0})),null===(d=window.segmentAnalytics)||void 0===d||null===(f=d.identify)||void 0===f||f.call(d,n.id,{email:n.email,firstName:n.first_name,lastName:n.last_name})):l.set({userFetched:!0}),[3,5];case 4:l.set({userFetched:!0}),s.label=5;case 5:return[2]}})})).apply(this,arguments)}(function(){return _getUserData.apply(this,arguments)})().catch(function(){})},81134:function(e,t,r){"use strict";r.r(t),r.d(t,{MyApp:function(){return MyApp},default:function(){return $}});var n=r(72253),o=r(85893);r(6303),r(26153);var a=r(67294);let s=(0,a.lazy)(()=>r.e(4922).then(r.bind(r,34922)));function i(e){return(0,o.jsx)(a.Suspense,{fallback:null,children:(0,o.jsx)(s,{...e})})}var c=r(27710);/*! * css-vars-ponyfill * v2.4.8 * https://jhildenbiddle.github.io/css-vars-ponyfill/ * (c) 2018-2022 John Hildenbiddle * MIT license */function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t * MIT license */function getUrls(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={mimeType:t.mimeType||null,onBeforeSend:t.onBeforeSend||Function.prototype,onSuccess:t.onSuccess||Function.prototype,onError:t.onError||Function.prototype,onComplete:t.onComplete||Function.prototype},n=Array.isArray(e)?e:[e],o=Array.apply(null,Array(n.length)).map(function(e){return null});function isValidCss(e){var t="string"==typeof e,r=t&&"<"===e.trim().charAt(0);return t&&!r}function onError(e,t){r.onError(e,n[t],t)}function onSuccess(e,t){var a=r.onSuccess(e,n[t],t);e=!1===a?"":a||e,o[t]=e,-1===o.indexOf(null)&&r.onComplete(o)}var a=document.createElement("a");n.forEach(function(e,t){if(a.setAttribute("href",e),a.href=String(a.href),document.all&&!window.atob&&a.host.split(":")[0]!==location.host.split(":")[0]){if(a.protocol===location.protocol){var n=new XDomainRequest;n.open("GET",e),n.timeout=0,n.onprogress=Function.prototype,n.ontimeout=Function.prototype,n.onload=function(){var e=n.responseText;isValidCss(e)?onSuccess(e,t):onError(n,t)},n.onerror=function(e){onError(n,t)},setTimeout(function(){n.send()},0)}else console.warn("Internet Explorer 9 Cross-Origin (CORS) requests must use the same protocol (".concat(e,")")),onError(null,t)}else{var o=new XMLHttpRequest;o.open("GET",e),r.mimeType&&o.overrideMimeType&&o.overrideMimeType(r.mimeType),r.onBeforeSend(o,e,t),o.onreadystatechange=function(){if(4===o.readyState){var e=o.responseText;o.status<400&&isValidCss(e)?onSuccess(e,t):0===o.status&&isValidCss(e)?onSuccess(e,t):onError(o,t)}},o.send()}})}/** * Gets CSS data from