@interfere/react 12.3.4 → 12.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/dist/{api-DSUjs8zG.d.mts → api-BXjfYV5Z.d.mts} +1 -0
- package/dist/api-C8aG7li1.mjs +1 -0
- package/dist/cors-guard-CwkqEjzL.mjs +1 -0
- package/dist/{delivery-D9hzPDs9.mjs → delivery-D7hULClu.mjs} +1 -1
- package/dist/error-boundary.d.mts +1 -1
- package/dist/export-filter-CnyAaPct.mjs +1 -0
- package/dist/exporter-BtHqkV3R.mjs +1 -0
- package/dist/exporter-logs-BbzSiQJi.mjs +1 -0
- package/dist/index-C3K6oR4l.d.mts +4 -0
- package/dist/ingest-backoff-BdBT-jss.mjs +1 -0
- package/dist/instrumentations-qhx6Oc_F.mjs +1 -0
- package/dist/{instrumentations-S-BCpguB.d.mts → instrumentations-zBdPJHog.d.mts} +7 -1
- package/dist/internal/capture/capture-boundary.d.mts +1 -1
- package/dist/internal/capture/capture.d.mts +1 -1
- package/dist/internal/ingest-backoff/ingest-backoff.d.mts +3 -2
- package/dist/internal/ingest-backoff/ingest-backoff.mjs +1 -1
- package/dist/internal/kernel-registry.d.mts +1 -1
- package/dist/internal/kernel.d.mts +2 -2
- package/dist/internal/kernel.mjs +1 -1
- package/dist/internal/otel/export-filter.d.mts +2 -2
- package/dist/internal/otel/export-filter.mjs +1 -1
- package/dist/internal/otel/exporter-logs.mjs +1 -1
- package/dist/internal/otel/exporter.mjs +1 -1
- package/dist/internal/otel/index.d.mts +3 -3
- package/dist/internal/otel/index.mjs +1 -1
- package/dist/internal/otel/instrumentations/cors-guard.d.mts +26 -0
- package/dist/internal/otel/instrumentations/cors-guard.mjs +1 -0
- package/dist/internal/otel/instrumentations/instrumentations.d.mts +1 -1
- package/dist/internal/otel/instrumentations/instrumentations.mjs +1 -1
- package/dist/internal/otel/instrumentations/propagation-targets.d.mts +6 -0
- package/dist/internal/otel/instrumentations/propagation-targets.mjs +1 -0
- package/dist/internal/otel/keepalive-chunks.d.mts +6 -0
- package/dist/internal/otel/keepalive-chunks.mjs +1 -0
- package/dist/internal/otel/page-scope-context-manager.d.mts +1 -1
- package/dist/internal/otel/page-scope-context-manager.mjs +1 -1
- package/dist/internal/otel/provider.d.mts +1 -1
- package/dist/internal/otel/provider.mjs +1 -1
- package/dist/internal/page-lifecycle/keepalive-budget.d.mts +2 -2
- package/dist/internal/page-lifecycle/keepalive-budget.mjs +1 -1
- package/dist/internal/plugins/plugin-runtime.d.mts +1 -1
- package/dist/internal/plugins/plugin-runtime.mjs +1 -1
- package/dist/internal/react-context.d.mts +1 -1
- package/dist/internal/react-dom-keys.d.mts +3 -0
- package/dist/internal/react-dom-keys.mjs +1 -0
- package/dist/internal/sw-queue-protocol.d.mts +2 -0
- package/dist/internal/sw-queue-protocol.mjs +1 -0
- package/dist/internal/sw-queue.mjs +1 -1
- package/dist/internal/version.mjs +1 -1
- package/dist/internal/wrapper-singleton.d.mts +1 -1
- package/dist/internal/wrapper-singleton.mjs +1 -1
- package/dist/keepalive-budget-BfoHXD04.mjs +1 -0
- package/dist/keepalive-chunks-BZv3PhHT.mjs +1 -0
- package/dist/kernel-BZI0jyJI.mjs +1 -0
- package/dist/msw-C0yLYJU2.mjs +255 -0
- package/dist/page-scope-context-manager-Bs-m4fv7.mjs +1 -0
- package/dist/{page-scope-context-manager-r92ZMJok.d.mts → page-scope-context-manager-DUhBvuAz.d.mts} +2 -2
- package/dist/{plugin-runtime-DSj0FM1Q.mjs → plugin-runtime-DgB1_Xc5.mjs} +1 -1
- package/dist/plugins/device.d.mts +1 -1
- package/dist/plugins/errors.d.mts +1 -1
- package/dist/plugins/lib/loader.d.mts +1 -1
- package/dist/plugins/lib/types.d.mts +1 -1
- package/dist/plugins/logs.d.mts +1 -1
- package/dist/plugins/page-events.d.mts +1 -1
- package/dist/plugins/rage-clicks.d.mts +1 -1
- package/dist/plugins/replay/index.d.mts +1 -1
- package/dist/plugins/replay/index.mjs +1 -1
- package/dist/plugins/replay/upload/delivery.d.mts +1 -1
- package/dist/plugins/replay/upload/delivery.mjs +1 -1
- package/dist/propagation-targets-BXDetg0k.mjs +1 -0
- package/dist/provider-B8YtuhDX.mjs +1 -0
- package/dist/{provider-cUByhzgv.d.mts → provider-Dy0mVCx5.d.mts} +4 -2
- package/dist/{provider-D4QjZp3L.d.mts → provider-vp8Aao8Q.d.mts} +11 -8
- package/dist/provider.d.mts +1 -1
- package/dist/react-dom-keys-BIJuLkQR.mjs +1 -0
- package/dist/react-error-handler.d.mts +1 -1
- package/dist/{session-retry-TrzzihIM.mjs → session-retry-Dgkk0yui.mjs} +1 -1
- package/dist/sw-queue-protocol-DnTSOWxy.mjs +1 -0
- package/dist/sw-queue-protocol-DqP1EQtQ.d.mts +22 -0
- package/dist/tracking/api.d.mts +1 -1
- package/dist/tracking/api.mjs +1 -1
- package/dist/tracking/lifecycle.fixture.d.mts +73 -0
- package/dist/tracking/lifecycle.fixture.mjs +1 -0
- package/dist/tracking/registration.fixture.d.mts +1 -1
- package/dist/tracking/registration.fixture.mjs +1 -255
- package/dist/tracking/session-retry.mjs +1 -1
- package/dist/{version-DusHm2Q4.mjs → version-CPcWUmrA.mjs} +1 -1
- package/package.json +3 -4
- package/dist/api-DvHT4Dyw.mjs +0 -1
- package/dist/export-filter-Cixywxpu.mjs +0 -1
- package/dist/exporter-De0h9YP5.mjs +0 -1
- package/dist/exporter-logs-DS2AXWnV.mjs +0 -1
- package/dist/index-DpkTHU1a.d.mts +0 -4
- package/dist/ingest-backoff-B1OeEV3h.mjs +0 -1
- package/dist/instrumentations-NN81kslu.mjs +0 -1
- package/dist/keepalive-budget-DeafGnVZ.mjs +0 -1
- package/dist/kernel-BVG-7Zau.mjs +0 -1
- package/dist/page-scope-context-manager-DhArvVJ_.mjs +0 -1
- package/dist/provider-CElaujE6.mjs +0 -1
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
var __commonJSMin=(cb,mod)=>()=>(mod||(cb((mod={exports:{}}).exports,mod),cb=null),mod.exports),POSITIONALS_EXP$1=/(%?)(%([sdijo]))/g;function serializePositional$1(positional,flag){switch(flag){case`s`:return positional;case`d`:case`i`:return Number(positional);case`j`:return JSON.stringify(positional);case`o`:{if(typeof positional==`string`)return positional;let json=JSON.stringify(positional);return json===`{}`||json===`[]`||/^\[object .+?\]$/.test(json)?positional:json}}}function format$3(message,...positionals){if(positionals.length===0)return message;let positionalIndex=0,formattedMessage=message.replace(POSITIONALS_EXP$1,(match,isEscaped,_,flag)=>{let positional=positionals[positionalIndex],value=serializePositional$1(positional,flag);return isEscaped?match:(positionalIndex++,value)});return positionalIndex<positionals.length&&(formattedMessage+=` ${positionals.slice(positionalIndex).join(` `)}`),formattedMessage=formattedMessage.replace(/%{2,2}/g,`%`),formattedMessage}var STACK_FRAMES_TO_IGNORE$1=2;function cleanErrorStack$1(error){if(!error.stack)return;let nextStack=error.stack.split(`
|
|
2
|
+
`);nextStack.splice(1,STACK_FRAMES_TO_IGNORE$1),error.stack=nextStack.join(`
|
|
3
|
+
`)}var InvariantError$1=class extends Error{constructor(message,...positionals){super(message),this.message=message,this.name=`Invariant Violation`,this.message=format$3(message,...positionals),cleanErrorStack$1(this)}},invariant$1=(predicate,message,...positionals)=>{if(!predicate)throw new InvariantError$1(message,...positionals)};invariant$1.as=(ErrorConstructor,predicate,message,...positionals)=>{if(!predicate){let formatMessage=positionals.length===0?message:format$3(message,...positionals),error;try{error=Reflect.construct(ErrorConstructor,[formatMessage])}catch{error=ErrorConstructor(formatMessage)}throw error}};function formatMessage(message,...positionals){return`[MSW] ${format$3(message,...positionals)}`}function warn$2(message,...positionals){console.warn(formatMessage(message,...positionals))}function error$2(message,...positionals){console.error(formatMessage(message,...positionals))}const devUtils={formatMessage,warn:warn$2,error:error$2};var InternalError=class extends Error{constructor(message){super(message),this.name=`InternalError`}},LensList$1=class{#list;#lens;constructor(){this.#list=[],this.#lens=new Map}get[Symbol.iterator](){return this.#list[Symbol.iterator].bind(this.#list)}entries(){return this.#lens.entries()}get(key){return this.#lens.get(key)||[]}getAll(){return this.#list.map(([,value])=>value)}append(key,value){this.#list.push([key,value]),this.#openLens(key,list=>list.push(value))}prepend(key,value){this.#list.unshift([key,value]),this.#openLens(key,list=>list.unshift(value))}delete(key,value){if(this.size===0)return!1;let values=this.#lens.get(key);if(!values)return!1;let index=values.indexOf(value);return index!==-1&&(values.splice(index,1),this.#list.splice(this.#list.findIndex(item=>item[0]===key&&item[1]===value),1),!0)}deleteAll(key){this.size!==0&&(this.#list=this.#list.filter(item=>item[0]!==key),this.#lens.delete(key))}get size(){return this.#list.length}clear(){this.size!==0&&(this.#list.length=0,this.#lens.clear())}#openLens(key,setter){setter(this.#lens.get(key)||this.#lens.set(key,[]).get(key))}};const kDefaultPrevented$2=Symbol(`kDefaultPrevented`),kPropagationStopped$1=Symbol(`kPropagationStopped`),kImmediatePropagationStopped$1=Symbol(`kImmediatePropagationStopped`);var TypedEvent$1=class extends MessageEvent{[kDefaultPrevented$2];[kPropagationStopped$1];[kImmediatePropagationStopped$1];constructor(...args){super(args[0],args[1]),this[kDefaultPrevented$2]=!1}get defaultPrevented(){return this[kDefaultPrevented$2]}preventDefault(){super.preventDefault(),this[kDefaultPrevented$2]=!0}stopImmediatePropagation(){super.stopImmediatePropagation(),this[kImmediatePropagationStopped$1]=!0}},Emitter$2=class{#listeners;#listenerOptions;#listenerAbortCleanups;#typelessListeners;#hookListeners;#hookListenerOptions;#hookListenerAbortCleanups;hooks;constructor(){this.#listeners=new LensList$1,this.#listenerOptions=new WeakMap,this.#listenerAbortCleanups=new WeakMap,this.#typelessListeners=new WeakSet,this.#hookListeners=new LensList$1,this.#hookListenerOptions=new WeakMap,this.#hookListenerAbortCleanups=new WeakMap,this.hooks={on:(hook,callback,options)=>{if(!options?.signal?.aborted){if(options?.once){let original=callback,wrapper=((...args)=>(this.#deleteHookListener(hook,wrapper),original(...args)));callback=wrapper}if(this.#hookListeners.append(hook,callback),options&&this.#hookListenerOptions.set(callback,options),options?.signal){let{signal}=options,onAbort=()=>{this.#deleteHookListener(hook,callback)};signal.addEventListener(`abort`,onAbort,{once:!0}),this.#hookListenerAbortCleanups.set(callback,()=>{signal.removeEventListener(`abort`,onAbort)})}}},removeListener:(hook,callback)=>{this.#deleteHookListener(hook,callback)}}}#deleteHookListener(hook,callback){this.#hookListeners.delete(hook,callback);let cleanup=this.#hookListenerAbortCleanups.get(callback);cleanup&&(cleanup(),this.#hookListenerAbortCleanups.delete(callback))}#deleteListener(type,listener){let removed=this.#listeners.delete(type,listener),cleanup=this.#listenerAbortCleanups.get(listener);return cleanup&&(cleanup(),this.#listenerAbortCleanups.delete(listener)),removed}on(type,listener,options){return this.#addListener(type,listener,options),this}once(type,listener,options){return this.on(type,listener,{...options||{},once:!0})}earlyOn(type,listener,options){return this.#addListener(type,listener,options,`prepend`),this}earlyOnce(type,listener,options){return this.earlyOn(type,listener,{...options||{},once:!0})}emit(event){if(this.#listeners.size===0)return!1;let hasListeners=this.listenerCount(event.type)>0,proxiedEvent=this.#proxyEvent(event);for(let listener of this.#matchListeners(event.type)){if(proxiedEvent.event[kPropagationStopped$1]!=null&&proxiedEvent.event[kPropagationStopped$1]!==this)return proxiedEvent.revoke(),!1;if(proxiedEvent.event[kImmediatePropagationStopped$1])break;this.#callListener(proxiedEvent.event,listener)}return proxiedEvent.revoke(),hasListeners}async emitAsPromise(event){if(this.#listeners.size===0)return[];let pendingListeners=[],proxiedEvent=this.#proxyEvent(event);for(let listener of this.#matchListeners(event.type)){if(proxiedEvent.event[kPropagationStopped$1]!=null&&proxiedEvent.event[kPropagationStopped$1]!==this)return proxiedEvent.revoke(),[];if(proxiedEvent.event[kImmediatePropagationStopped$1])break;let returnValue=await Promise.resolve(this.#callListener(proxiedEvent.event,listener));this.#isTypelessListener(listener)||pendingListeners.push(returnValue)}return proxiedEvent.revoke(),Promise.allSettled(pendingListeners).then(results=>results.map(result=>result.status===`fulfilled`?result.value:result.reason))}*emitAsGenerator(event){if(this.#listeners.size===0)return;let proxiedEvent=this.#proxyEvent(event);for(let listener of this.#matchListeners(event.type)){if(proxiedEvent.event[kPropagationStopped$1]!=null&&proxiedEvent.event[kPropagationStopped$1]!==this){proxiedEvent.revoke();return}if(proxiedEvent.event[kImmediatePropagationStopped$1])break;let returnValue=this.#callListener(proxiedEvent.event,listener);this.#isTypelessListener(listener)||(yield returnValue)}proxiedEvent.revoke()}removeListener(type,listener){let options=this.#listenerOptions.get(listener);if(this.#deleteListener(type,listener))for(let hook of this.#hookListeners.get(`removeListener`).slice())hook(type,listener,options)}removeAllListeners(type){if(type==null){for(let[listenerType,listeners$1]of this.#listeners.entries())for(;listeners$1.length>0;)this.removeListener(listenerType,listeners$1[0]);for(let[hookType,hookListener]of[...this.#hookListeners])this.#hookListenerOptions.get(hookListener)?.persist||this.#deleteHookListener(hookType,hookListener);return}let listeners=this.listeners(type);for(;listeners.length>0;)this.removeListener(type,listeners[0])}listeners(type){return type==null?this.#listeners.getAll():this.#listeners.get(type)}listenerCount(type){return type==null?this.#listeners.size:this.listeners(type).length}#addListener(type,listener,options,insertMode=`append`){if(!options?.signal?.aborted){for(let hook of this.#hookListeners.get(`newListener`).slice())hook(type,listener,options);if(type===`*`&&this.#typelessListeners.add(listener),insertMode===`prepend`?this.#listeners.prepend(type,listener):this.#listeners.append(type,listener),options&&(this.#listenerOptions.set(listener,options),options.signal)){let{signal}=options,onAbort=()=>{this.removeListener(type,listener)};signal.addEventListener(`abort`,onAbort,{once:!0}),this.#listenerAbortCleanups.set(listener,()=>{signal.removeEventListener(`abort`,onAbort)})}}}#proxyEvent(event){let{stopPropagation}=event;return event.stopPropagation=()=>{event[kPropagationStopped$1]=this,stopPropagation.call(event)},{event,revoke(){event.stopPropagation=stopPropagation}}}#callListener(event,listener){for(let hook of this.#hookListeners.get(`beforeEmit`).slice())if(hook(event)===!1)return;let returnValue=listener.call(this,event),options=this.#listenerOptions.get(listener);if(options?.once){let type=this.#isTypelessListener(listener)?`*`:event.type;if(this.#deleteListener(type,listener))for(let hook of this.#hookListeners.get(`removeListener`).slice())hook(type,listener,options)}return returnValue}*#matchListeners(type){let snapshot=[];for(let[key,listener]of this.#listeners)(key===`*`||key===type)&&snapshot.push(listener);yield*snapshot}#isTypelessListener(listener){return this.#typelessListeners.has(listener)}},defaultParseOptions={decodeValues:!0,map:!1,silent:!1,split:`auto`};function isForbiddenKey(key){return typeof key!=`string`||key in{}}function createNullObj(){return Object.create(null)}function isNonEmptyString$1(str){return typeof str==`string`&&!!str.trim()}function parseString(setCookieValue,options){var parts=setCookieValue.split(`;`).filter(isNonEmptyString$1),nameValuePairStr=parts.shift();if(!nameValuePairStr)return null;var parsed=parseNameValuePair(nameValuePairStr),name=parsed.name,value=parsed.value;if(options=options?Object.assign({},defaultParseOptions,options):defaultParseOptions,isForbiddenKey(name))return null;try{value=options.decodeValues?decodeURIComponent(value):value}catch(e){console.error(`set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.`,e)}var cookie=createNullObj();return cookie.name=name,cookie.value=value,parts.forEach(function(part){var sides=part.split(`=`),key=sides.shift().trim().toLowerCase();if(!isForbiddenKey(key)){var value=sides.join(`=`).trim();if(key===`expires`)cookie.expires=new Date(value);else if(key===`max-age`){var n=parseInt(value,10);Number.isNaN(n)||(cookie.maxAge=n)}else key===`secure`?cookie.secure=!0:key===`httponly`?cookie.httpOnly=!0:key===`samesite`?cookie.sameSite=value:key===`partitioned`?cookie.partitioned=!0:key&&(cookie[key]=value)}}),cookie}function parseNameValuePair(nameValuePairStr){var name=``,value=``,nameValueArr=nameValuePairStr.split(`=`);return nameValueArr.length>1?(name=nameValueArr.shift(),value=nameValueArr.join(`=`)):value=nameValuePairStr,{name,value}}function parseSetCookie(input,options){if(options=options?Object.assign({},defaultParseOptions,options):defaultParseOptions,!input)return options.map?createNullObj():[];if(input.headers){if(typeof input.headers.getSetCookie==`function`)input=input.headers.getSetCookie();else if(input.headers[`set-cookie`])input=input.headers[`set-cookie`];else{var sch=input.headers[Object.keys(input.headers).find(function(key){return key.toLowerCase()===`set-cookie`})];!sch&&input.headers.cookie&&!options.silent&&console.warn(`Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning.`),input=sch}}var split=options.split,isArray=Array.isArray(input);if(split===`auto`&&(split=!isArray),isArray||(input=[input]),input=input.filter(isNonEmptyString$1),split&&(input=input.map(splitCookiesString).flat()),options.map){var cookies=createNullObj();return input.reduce(function(cookies,str){var cookie=parseString(str,options);return cookie&&!isForbiddenKey(cookie.name)&&(cookies[cookie.name]=cookie),cookies},cookies)}return input.map(function(str){return parseString(str,options)}).filter(Boolean)}function splitCookiesString(cookiesString){if(Array.isArray(cookiesString))return cookiesString;if(typeof cookiesString!=`string`)return[];var cookiesStrings=[],pos=0,start,ch,lastComma,nextStart,cookiesSeparatorFound;function skipWhitespace(){for(;pos<cookiesString.length&&/\s/.test(cookiesString.charAt(pos));)pos+=1;return pos<cookiesString.length}function notSpecialChar(){return ch=cookiesString.charAt(pos),ch!==`=`&&ch!==`;`&&ch!==`,`}for(;pos<cookiesString.length;){for(start=pos,cookiesSeparatorFound=!1;skipWhitespace();)if(ch=cookiesString.charAt(pos),ch===`,`){for(lastComma=pos,pos+=1,skipWhitespace(),nextStart=pos;pos<cookiesString.length&¬SpecialChar();)pos+=1;pos<cookiesString.length&&cookiesString.charAt(pos)===`=`?(cookiesSeparatorFound=!0,pos=nextStart,cookiesStrings.push(cookiesString.substring(start,lastComma)),start=pos):pos=lastComma+1}else pos+=1;(!cookiesSeparatorFound||pos>=cookiesString.length)&&cookiesStrings.push(cookiesString.substring(start,cookiesString.length))}return cookiesStrings}parseSetCookie.parseSetCookie=parseSetCookie,parseSetCookie.parse=parseSetCookie,parseSetCookie.parseString=parseString,parseSetCookie.splitCookiesString=splitCookiesString;const HEADERS_INVALID_CHARACTERS=/[^a-z0-9\-#$%&'*+.^_`|~]/i;function normalizeHeaderName(name){if(HEADERS_INVALID_CHARACTERS.test(name)||name.trim()===``)throw TypeError(`Invalid character in header field name`);return name.trim().toLowerCase()}const charCodesToRemove=[`
|
|
4
|
+
`,`\r`,` `,` `],HEADER_VALUE_REMOVE_REGEXP=RegExp(`(^[${charCodesToRemove.join(``)}]|$[${charCodesToRemove.join(``)}])`,`g`);function normalizeHeaderValue(value){return value.replace(HEADER_VALUE_REMOVE_REGEXP,``)}function isValidHeaderName(value){if(typeof value!=`string`||value.length===0)return!1;for(let i=0;i<value.length;i++){let character=value.charCodeAt(i);if(character>127||!isToken(character))return!1}return!0}function isToken(value){return![127,32,`(`,`)`,`<`,`>`,`@`,`,`,`;`,`:`,`\\`,`"`,`/`,`[`,`]`,`?`,`=`,`{`,`}`].includes(value)}function isValidHeaderValue(value){if(typeof value!=`string`||value.trim()!==value)return!1;for(let i=0;i<value.length;i++){let character=value.charCodeAt(i);if(character===0||character===10||character===13)return!1}return!0}let _Symbol$toStringTag;const NORMALIZED_HEADERS=Symbol(`normalizedHeaders`),RAW_HEADER_NAMES=Symbol(`rawHeaderNames`);var Headers$1=class Headers{constructor(init){this[NORMALIZED_HEADERS]={},this[RAW_HEADER_NAMES]=new Map,this[_Symbol$toStringTag]=`Headers`,[`Headers`,`HeadersPolyfill`].includes(init?.constructor?.name)||init instanceof Headers||globalThis.Headers!==void 0&&init instanceof globalThis.Headers?init.forEach((value,name)=>{this.append(name,value)},this):Array.isArray(init)?init.forEach(([name,value])=>{this.append(name,Array.isArray(value)?value.join(`, `):value)}):init&&Object.getOwnPropertyNames(init).forEach(name=>{let value=init[name];this.append(name,Array.isArray(value)?value.join(`, `):value)})}[(_Symbol$toStringTag=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(let[name]of this.entries())yield name}*values(){for(let[,value]of this.entries())yield value}*entries(){let sortedKeys=Object.keys(this[NORMALIZED_HEADERS]).sort((a,b)=>a.localeCompare(b));for(let name of sortedKeys)if(name===`set-cookie`)for(let value of this.getSetCookie())yield[name,value];else yield[name,this.get(name)]}has(name){if(!isValidHeaderName(name))throw TypeError(`Invalid header name "${name}"`);return this[NORMALIZED_HEADERS].hasOwnProperty(normalizeHeaderName(name))}get(name){if(!isValidHeaderName(name))throw TypeError(`Invalid header name "${name}"`);return this[NORMALIZED_HEADERS][normalizeHeaderName(name)]??null}set(name,value){if(!isValidHeaderName(name)||!isValidHeaderValue(value))return;let normalizedName=normalizeHeaderName(name),normalizedValue=normalizeHeaderValue(value);this[NORMALIZED_HEADERS][normalizedName]=normalizeHeaderValue(normalizedValue),this[RAW_HEADER_NAMES].set(normalizedName,name)}append(name,value){if(!isValidHeaderName(name)||!isValidHeaderValue(value))return;let normalizedName=normalizeHeaderName(name),normalizedValue=normalizeHeaderValue(value),resolvedValue=this.has(normalizedName)?`${this.get(normalizedName)}, ${normalizedValue}`:normalizedValue;this.set(name,resolvedValue)}delete(name){if(!isValidHeaderName(name)||!this.has(name))return;let normalizedName=normalizeHeaderName(name);delete this[NORMALIZED_HEADERS][normalizedName],this[RAW_HEADER_NAMES].delete(normalizedName)}forEach(callback,thisArg){for(let[name,value]of this.entries())callback.call(thisArg,value,name,this)}getSetCookie(){let setCookieHeader=this.get(`set-cookie`);return setCookieHeader===null?[]:setCookieHeader===``?[``]:splitCookiesString(setCookieHeader)}};const SOURCE_FRAME=/[/\\]msw[/\\]src[/\\](.+)/,BUILD_FRAME=/(node_modules)?[/\\]lib[/\\](core|browser|node|native|iife)[/\\]|^[^/\\]*$/;function getCallFrame(error){let stack=error.stack;if(!stack)return;let declarationFrame=stack.split(`
|
|
5
|
+
`).slice(1).find(frame=>!(SOURCE_FRAME.test(frame)||BUILD_FRAME.test(frame)));if(declarationFrame)return declarationFrame.replace(/\s*at [^()]*\(([^)]+)\)/,`$1`).replace(/^@/,``)}function isIterable(fn){return fn?Reflect.has(fn,Symbol.iterator)||Reflect.has(fn,Symbol.asyncIterator):!1}function isNodeProcess$1(){if(typeof navigator<`u`&&navigator.product===`ReactNative`)return!0;if(typeof process<`u`){let type=process.type;return type===`renderer`||type===`worker`?!1:!!(process.versions&&process.versions.node)}return!1}var __defProp$4=Object.defineProperty,__export$2=(target,all)=>{for(var name in all)__defProp$4(target,name,{get:all[name],enumerable:!0})},colors_exports$1={};__export$2(colors_exports$1,{blue:()=>blue$1,gray:()=>gray$1,green:()=>green$1,red:()=>red$1,yellow:()=>yellow$1});function yellow$1(text){return`\x1B[33m${text}\x1B[0m`}function blue$1(text){return`\x1B[34m${text}\x1B[0m`}function gray$1(text){return`\x1B[90m${text}\x1B[0m`}function red$1(text){return`\x1B[31m${text}\x1B[0m`}function green$1(text){return`\x1B[32m${text}\x1B[0m`}var IS_NODE$1=isNodeProcess$1(),Logger$1=class{constructor(name){this.name=name,this.prefix=`[${this.name}]`;let LOGGER_NAME=getVariable$1(`DEBUG`),LOGGER_LEVEL=getVariable$1(`LOG_LEVEL`);LOGGER_NAME===`1`||LOGGER_NAME===`true`||LOGGER_NAME!==void 0&&this.name.startsWith(LOGGER_NAME)?(this.debug=isDefinedAndNotEquals$1(LOGGER_LEVEL,`debug`)?noop$2:this.debug,this.info=isDefinedAndNotEquals$1(LOGGER_LEVEL,`info`)?noop$2:this.info,this.success=isDefinedAndNotEquals$1(LOGGER_LEVEL,`success`)?noop$2:this.success,this.warning=isDefinedAndNotEquals$1(LOGGER_LEVEL,`warning`)?noop$2:this.warning,this.error=isDefinedAndNotEquals$1(LOGGER_LEVEL,`error`)?noop$2:this.error):(this.info=noop$2,this.success=noop$2,this.warning=noop$2,this.error=noop$2,this.only=noop$2)}prefix;extend(domain){return new Logger$1(`${this.name}:${domain}`)}debug(message,...positionals){this.logEntry({level:`debug`,message:gray$1(message),positionals,prefix:this.prefix,colors:{prefix:`gray`}})}info(message,...positionals){this.logEntry({level:`info`,message,positionals,prefix:this.prefix,colors:{prefix:`blue`}});let performance2=new PerformanceEntry$1;return(message2,...positionals2)=>{performance2.measure(),this.logEntry({level:`info`,message:`${message2} ${gray$1(`${performance2.deltaTime}ms`)}`,positionals:positionals2,prefix:this.prefix,colors:{prefix:`blue`}})}}success(message,...positionals){this.logEntry({level:`info`,message,positionals,prefix:`\u2714 ${this.prefix}`,colors:{timestamp:`green`,prefix:`green`}})}warning(message,...positionals){this.logEntry({level:`warning`,message,positionals,prefix:`\u26A0 ${this.prefix}`,colors:{timestamp:`yellow`,prefix:`yellow`}})}error(message,...positionals){this.logEntry({level:`error`,message,positionals,prefix:`\u2716 ${this.prefix}`,colors:{timestamp:`red`,prefix:`red`}})}only(callback){callback()}createEntry(level,message){return{timestamp:new Date,level,message}}logEntry(args){let{level,message,prefix,colors:customColors,positionals=[]}=args,entry=this.createEntry(level,message),timestampColor=customColors?.timestamp||`gray`,prefixColor=customColors?.prefix||`gray`,colorize={timestamp:colors_exports$1[timestampColor],prefix:colors_exports$1[prefixColor]};this.getWriter(level)([colorize.timestamp(this.formatTimestamp(entry.timestamp))].concat(prefix==null?[]:colorize.prefix(prefix),serializeInput$1(message)).join(` `),...positionals.map(serializeInput$1))}formatTimestamp(timestamp){return`${timestamp.toLocaleTimeString(`en-GB`)}:${timestamp.getMilliseconds()}`}getWriter(level){switch(level){case`debug`:case`success`:case`info`:return log$1;case`warning`:return warn$1;case`error`:return error$1}}},PerformanceEntry$1=class{startTime;endTime;deltaTime;constructor(){this.startTime=performance.now()}measure(){this.endTime=performance.now();let deltaTime=this.endTime-this.startTime;this.deltaTime=deltaTime.toFixed(2)}},noop$2=()=>void 0;function log$1(message,...positionals){if(IS_NODE$1){process.stdout.write(format$3(message,...positionals)+`
|
|
6
|
+
`);return}console.log(message,...positionals)}function warn$1(message,...positionals){if(IS_NODE$1){process.stderr.write(format$3(message,...positionals)+`
|
|
7
|
+
`);return}console.warn(message,...positionals)}function error$1(message,...positionals){if(IS_NODE$1){process.stderr.write(format$3(message,...positionals)+`
|
|
8
|
+
`);return}console.error(message,...positionals)}function getVariable$1(variableName){return IS_NODE$1?process.env[variableName]:globalThis[variableName]?.toString()}function isDefinedAndNotEquals$1(value,expected){return value!==void 0&&value!==expected}function serializeInput$1(message){return message===void 0?`undefined`:message===null?`null`:typeof message==`string`?message:typeof message==`object`?JSON.stringify(message):message.toString()}var MemoryLeakError$1=class extends Error{constructor(emitter,type,count){super(`Possible EventEmitter memory leak detected. ${count} ${type.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=emitter,this.type=type,this.count=count,this.name=`MaxListenersExceededWarning`}},_Emitter$1=class{static listenerCount(emitter,eventName){return emitter.listenerCount(eventName)}constructor(){this.events=new Map,this.maxListeners=_Emitter$1.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}_emitInternalEvent(internalEventName,eventName,listener){this.emit(internalEventName,eventName,listener)}_getListeners(eventName){return Array.prototype.concat.apply([],this.events.get(eventName))||[]}_removeListener(listeners,listener){let index=listeners.indexOf(listener);return index>-1&&listeners.splice(index,1),[]}_wrapOnceListener(eventName,listener){let onceListener=(...data)=>(this.removeListener(eventName,onceListener),listener.apply(this,data));return Object.defineProperty(onceListener,"name",{value:listener.name}),onceListener}setMaxListeners(maxListeners){return this.maxListeners=maxListeners,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(eventName,...data){let listeners=this._getListeners(eventName);return listeners.forEach(listener=>{listener.apply(this,data)}),listeners.length>0}addListener(eventName,listener){this._emitInternalEvent(`newListener`,eventName,listener);let nextListeners=this._getListeners(eventName).concat(listener);if(this.events.set(eventName,nextListeners),this.maxListeners>0&&this.listenerCount(eventName)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;let memoryLeakWarning=new MemoryLeakError$1(this,eventName,this.listenerCount(eventName));console.warn(memoryLeakWarning)}return this}on(eventName,listener){return this.addListener(eventName,listener)}once(eventName,listener){return this.addListener(eventName,this._wrapOnceListener(eventName,listener))}prependListener(eventName,listener){let listeners=this._getListeners(eventName);if(listeners.length>0){let nextListeners=[listener].concat(listeners);this.events.set(eventName,nextListeners)}else this.events.set(eventName,listeners.concat(listener));return this}prependOnceListener(eventName,listener){return this.prependListener(eventName,this._wrapOnceListener(eventName,listener))}removeListener(eventName,listener){let listeners=this._getListeners(eventName);return listeners.length>0&&(this._removeListener(listeners,listener),this.events.set(eventName,listeners),this._emitInternalEvent(`removeListener`,eventName,listener)),this}off(eventName,listener){return this.removeListener(eventName,listener)}removeAllListeners(eventName){return eventName?this.events.delete(eventName):this.events.clear(),this}listeners(eventName){return Array.from(this._getListeners(eventName))}listenerCount(eventName){return this._getListeners(eventName).length}rawListeners(eventName){return this.listeners(eventName)}},Emitter$1=_Emitter$1;Emitter$1.defaultMaxListeners=10;function createDeferredExecutor$2(){let executor=(resolve,reject)=>{executor.state=`pending`,executor.resolve=data=>executor.state===`pending`?(executor.result=data,resolve(data instanceof Promise?data:Promise.resolve(data).then(value=>(executor.state=`fulfilled`,value)))):void 0,executor.reject=reason=>{if(executor.state===`pending`)return queueMicrotask(()=>{executor.state=`rejected`}),reject(executor.rejectionReason=reason)}};return executor}var DeferredPromise$2=class extends Promise{#executor;resolve;reject;constructor(executor=null){let deferredExecutor=createDeferredExecutor$2();super((originalResolve,originalReject)=>{deferredExecutor(originalResolve,originalReject),executor?.(deferredExecutor.resolve,deferredExecutor.reject)}),this.#executor=deferredExecutor,this.resolve=this.#executor.resolve,this.reject=this.#executor.reject}get state(){return this.#executor.state}get rejectionReason(){return this.#executor.rejectionReason}then(onFulfilled,onRejected){return this.#decorate(super.then(onFulfilled,onRejected))}catch(onRejected){return this.#decorate(super.catch(onRejected))}finally(onfinally){return this.#decorate(super.finally(onfinally))}#decorate(promise){return Object.defineProperties(promise,{resolve:{configurable:!0,value:this.resolve},reject:{configurable:!0,value:this.reject}})}};function getGlobalSymbol$2(symbol){return globalThis[symbol]||void 0}function setGlobalSymbol$2(symbol,value){globalThis[symbol]=value}function deleteGlobalSymbol$2(symbol){delete globalThis[symbol]}let InterceptorReadyState$3=function(InterceptorReadyState$1){return InterceptorReadyState$1.INACTIVE=`INACTIVE`,InterceptorReadyState$1.APPLYING=`APPLYING`,InterceptorReadyState$1.APPLIED=`APPLIED`,InterceptorReadyState$1.DISPOSING=`DISPOSING`,InterceptorReadyState$1.DISPOSED=`DISPOSED`,InterceptorReadyState$1}({});var Interceptor$2=class{constructor(symbol){this.symbol=symbol,this.readyState=InterceptorReadyState$3.INACTIVE,this.emitter=new Emitter$1,this.subscriptions=[],this.logger=new Logger$1(symbol.description),this.emitter.setMaxListeners(0),this.logger.info(`constructing the interceptor...`)}checkEnvironment(){return!0}apply(){let logger=this.logger.extend(`apply`);if(logger.info(`applying the interceptor...`),this.readyState===InterceptorReadyState$3.APPLIED){logger.info(`intercepted already applied!`);return}if(!this.checkEnvironment()){logger.info(`the interceptor cannot be applied in this environment!`);return}this.readyState=InterceptorReadyState$3.APPLYING;let runningInstance=this.getInstance();if(runningInstance){logger.info(`found a running instance, reusing...`),this.on=(event,listener)=>(logger.info(`proxying the "%s" listener`,event),runningInstance.emitter.addListener(event,listener),this.subscriptions.push(()=>{runningInstance.emitter.removeListener(event,listener),logger.info(`removed proxied "%s" listener!`,event)}),this),this.readyState=InterceptorReadyState$3.APPLIED;return}logger.info(`no running instance found, setting up a new instance...`),this.setup(),this.setInstance(),this.readyState=InterceptorReadyState$3.APPLIED}setup(){}on(event,listener){let logger=this.logger.extend(`on`);return this.readyState===InterceptorReadyState$3.DISPOSING||this.readyState===InterceptorReadyState$3.DISPOSED?(logger.info(`cannot listen to events, already disposed!`),this):(logger.info(`adding "%s" event listener:`,event,listener),this.emitter.on(event,listener),this)}once(event,listener){return this.emitter.once(event,listener),this}off(event,listener){return this.emitter.off(event,listener),this}removeAllListeners(event){return this.emitter.removeAllListeners(event),this}dispose(){let logger=this.logger.extend(`dispose`);if(this.readyState===InterceptorReadyState$3.DISPOSED){logger.info(`cannot dispose, already disposed!`);return}if(logger.info(`disposing the interceptor...`),this.readyState=InterceptorReadyState$3.DISPOSING,!this.getInstance()){logger.info(`no interceptors running, skipping dispose...`);return}if(this.clearInstance(),logger.info(`global symbol deleted:`,getGlobalSymbol$2(this.symbol)),this.subscriptions.length>0){logger.info(`disposing of %d subscriptions...`,this.subscriptions.length);for(let dispose of this.subscriptions)dispose();this.subscriptions=[],logger.info(`disposed of all subscriptions!`,this.subscriptions.length)}this.emitter.removeAllListeners(),logger.info(`destroyed the listener!`),this.readyState=InterceptorReadyState$3.DISPOSED}getInstance(){let instance=getGlobalSymbol$2(this.symbol);return this.logger.info(`retrieved global instance:`,instance?.constructor?.name),instance}setInstance(){setGlobalSymbol$2(this.symbol,this),this.logger.info(`set global instance!`,this.symbol.description)}clearInstance(){deleteGlobalSymbol$2(this.symbol),this.logger.info(`cleared global instance!`,this.symbol.description)}},InterceptorError$1=class InterceptorError extends Error{constructor(message){super(message),this.name=`InterceptorError`,Object.setPrototypeOf(this,InterceptorError.prototype)}};(class RequestController{static{this.PENDING=0}static{this.PASSTHROUGH=1}static{this.RESPONSE=2}static{this.ERROR=3}constructor(request,source){this.request=request,this.source=source,this.readyState=RequestController.PENDING,this.handled=new DeferredPromise$2}get#handled(){return this.handled}async passthrough(){invariant$1.as(InterceptorError$1,this.readyState===RequestController.PENDING,`Failed to passthrough the "%s %s" request: the request has already been handled`,this.request.method,this.request.url),this.readyState=RequestController.PASSTHROUGH,await this.source.passthrough(),this.#handled.resolve()}respondWith(response){invariant$1.as(InterceptorError$1,this.readyState===RequestController.PENDING,`Failed to respond to the "%s %s" request with "%d %s": the request has already been handled (%d)`,this.request.method,this.request.url,response.status,response.statusText||`OK`,this.readyState),this.readyState=RequestController.RESPONSE,this.#handled.resolve(),this.source.respondWith(response)}errorWith(reason){invariant$1.as(InterceptorError$1,this.readyState===RequestController.PENDING,`Failed to error the "%s %s" request with "%s": the request has already been handled (%d)`,this.request.method,this.request.url,reason?.toString(),this.readyState),this.readyState=RequestController.ERROR,this.source.errorWith(reason),this.#handled.resolve()}});function createRequestId$2(){return Math.random().toString(16).slice(2)}function canParseUrl$1(url){try{return new URL(url),!0}catch{return!1}}function getValueBySymbol$1(symbolName,source){let symbol=Object.getOwnPropertySymbols(source).find(symbol$1=>symbol$1.description===symbolName);if(symbol)return Reflect.get(source,symbol)}const kStatus$1=Symbol(`kStatus`),kUrl$1=Symbol(`kUrl`);var FetchResponse$1=class FetchResponse extends Response{static{this.STATUS_CODES_WITHOUT_BODY=[101,103,204,205,304]}static{this.STATUS_CODES_WITH_REDIRECT=[301,302,303,307,308]}static isConfigurableStatusCode(status){return status>=200&&status<=599}static isRedirectResponse(status){return FetchResponse.STATUS_CODES_WITH_REDIRECT.includes(status)}static isResponseWithBody(status){return!FetchResponse.STATUS_CODES_WITHOUT_BODY.includes(status)}static setStatus(status,response){let internalState=getValueBySymbol$1(`state`,response);internalState?internalState.status=status:Object.defineProperty(response,"status",{value:status,enumerable:!0,configurable:!0,writable:!1}),Object.defineProperty(response,kStatus$1,{value:status,enumerable:!1})}static setUrl(url,response){if(!url||url===`about:`||!canParseUrl$1(url))return;let state=getValueBySymbol$1(`state`,response);state?state.urlList.push(new URL(url)):Object.defineProperty(response,"url",{value:url,enumerable:!0,configurable:!0,writable:!1}),Object.defineProperty(response,kUrl$1,{value:url,enumerable:!1})}static parseRawHeaders(rawHeaders){let headers=new Headers;for(let line=0;line<rawHeaders.length;line+=2)headers.append(rawHeaders[line],rawHeaders[line+1]);return headers}static clone(response){try{return response.clone()}catch(error){return Response.json(error instanceof Error?{name:error.name,message:error.message,stack:error.stack}:{},{status:500,statusText:`Unclonable Response`})}}constructor(body,init={}){let status=init.status??200,safeStatus=FetchResponse.isConfigurableStatusCode(status)?status:200,finalBody=FetchResponse.isResponseWithBody(status)?body:null;super(finalBody,{status:safeStatus,statusText:init.statusText,headers:init.headers}),status!==safeStatus&&FetchResponse.setStatus(status,this),FetchResponse.setUrl(init.url,this)}clone(){let clonedResponse=super.clone(),customStatus=Reflect.get(this,kStatus$1);customStatus&&FetchResponse.setStatus(customStatus,clonedResponse);let customUrl=Reflect.get(this,kUrl$1);return customUrl&&FetchResponse.setUrl(customUrl,clonedResponse),clonedResponse}},BatchInterceptor=class BatchInterceptor extends Interceptor$2{constructor(options){BatchInterceptor.symbol=Symbol.for(options.name),super(BatchInterceptor.symbol),this.interceptors=options.interceptors}setup(){let logger=this.logger.extend(`setup`);logger.info(`applying all %d interceptors...`,this.interceptors.length);for(let interceptor of this.interceptors)logger.info(`applying "%s" interceptor...`,interceptor.constructor.name),interceptor.apply(),logger.info(`adding interceptor dispose subscription`),this.subscriptions.push(()=>interceptor.dispose())}on(event,listener){for(let interceptor of this.interceptors)interceptor.on(event,listener);return this}once(event,listener){for(let interceptor of this.interceptors)interceptor.once(event,listener);return this}off(event,listener){for(let interceptor of this.interceptors)interceptor.off(event,listener);return this}removeAllListeners(event){for(let interceptors of this.interceptors)interceptors.removeAllListeners(event);return this}};new TextEncoder;function getCleanUrl(url,isAbsolute=!0){return[isAbsolute&&url.origin,url.pathname].filter(Boolean).join(``)}var __create$1=Object.create,__defProp$3=Object.defineProperty,__getOwnPropDesc$1=Object.getOwnPropertyDescriptor,__getOwnPropNames$1=Object.getOwnPropertyNames,__getProtoOf$1=Object.getPrototypeOf,__hasOwnProp$1=Object.prototype.hasOwnProperty,__commonJS$1=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames$1(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports},__copyProps$1=(to,from,except,desc)=>{if(from&&typeof from==`object`||typeof from==`function`)for(let key of __getOwnPropNames$1(from))!__hasOwnProp$1.call(to,key)&&key!==except&&__defProp$3(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc$1(from,key))||desc.enumerable});return to},__toESM$1=(mod,isNodeMode,target)=>(target=mod==null?{}:__create$1(__getProtoOf$1(mod)),__copyProps$1(isNodeMode||!mod||!mod.__esModule?__defProp$3(target,`default`,{value:mod,enumerable:!0}):target,mod)),require_codes=__commonJS$1({"node_modules/.pnpm/statuses@2.0.2/node_modules/statuses/codes.json"(exports,module){module.exports={100:`Continue`,101:`Switching Protocols`,102:`Processing`,103:`Early Hints`,200:`OK`,201:`Created`,202:`Accepted`,203:`Non-Authoritative Information`,204:`No Content`,205:`Reset Content`,206:`Partial Content`,207:`Multi-Status`,208:`Already Reported`,226:`IM Used`,300:`Multiple Choices`,301:`Moved Permanently`,302:`Found`,303:`See Other`,304:`Not Modified`,305:`Use Proxy`,307:`Temporary Redirect`,308:`Permanent Redirect`,400:`Bad Request`,401:`Unauthorized`,402:`Payment Required`,403:`Forbidden`,404:`Not Found`,405:`Method Not Allowed`,406:`Not Acceptable`,407:`Proxy Authentication Required`,408:`Request Timeout`,409:`Conflict`,410:`Gone`,411:`Length Required`,412:`Precondition Failed`,413:`Payload Too Large`,414:`URI Too Long`,415:`Unsupported Media Type`,416:`Range Not Satisfiable`,417:`Expectation Failed`,418:`I'm a Teapot`,421:`Misdirected Request`,422:`Unprocessable Entity`,423:`Locked`,424:`Failed Dependency`,425:`Too Early`,426:`Upgrade Required`,428:`Precondition Required`,429:`Too Many Requests`,431:`Request Header Fields Too Large`,451:`Unavailable For Legal Reasons`,500:`Internal Server Error`,501:`Not Implemented`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`,505:`HTTP Version Not Supported`,506:`Variant Also Negotiates`,507:`Insufficient Storage`,508:`Loop Detected`,509:`Bandwidth Limit Exceeded`,510:`Not Extended`,511:`Network Authentication Required`}}}),allStatuses=__toESM$1(__commonJS$1({"node_modules/.pnpm/statuses@2.0.2/node_modules/statuses/index.js"(exports,module){var codes=require_codes();module.exports=status,status.message=codes,status.code=createMessageToStatusCodeMap(codes),status.codes=createStatusCodeList(codes),status.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},status.empty={204:!0,205:!0,304:!0},status.retry={502:!0,503:!0,504:!0};function createMessageToStatusCodeMap(codes2){var map={};return Object.keys(codes2).forEach(function(code){var message2=codes2[code],status2=Number(code);map[message2.toLowerCase()]=status2}),map}function createStatusCodeList(codes2){return Object.keys(codes2).map(function(code){return Number(code)})}function getStatusCode(message2){var msg=message2.toLowerCase();if(!Object.prototype.hasOwnProperty.call(status.code,msg))throw Error(`invalid status message: "`+message2+`"`);return status.code[msg]}function getStatusMessage(code){if(!Object.prototype.hasOwnProperty.call(status.message,code))throw Error(`invalid status code: `+code);return status.message[code]}function status(code){if(typeof code==`number`)return getStatusMessage(code);if(typeof code!=`string`)throw TypeError(`code must be a number or string`);var n=parseInt(code,10);return isNaN(n)?getStatusCode(code):getStatusMessage(n)}}})(),1),statuses=allStatuses.default||allStatuses;statuses.message;var statuses_default=statuses;
|
|
9
|
+
/*! Bundled license information:
|
|
10
|
+
|
|
11
|
+
statuses/index.js:
|
|
12
|
+
(*!
|
|
13
|
+
* statuses
|
|
14
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
15
|
+
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
16
|
+
* MIT Licensed
|
|
17
|
+
*)
|
|
18
|
+
*/
|
|
19
|
+
const{message:message$1}=statuses_default,kSetCookie=Symbol(`kSetCookie`);function normalizeResponseInit(init={}){let status=init?.status||200,statusText=init?.statusText||message$1[status]||``,headers=new Headers(init?.headers);return{...init,headers,status,statusText}}function decorateResponse(response,init){init.type&&Object.defineProperty(response,"type",{value:init.type,enumerable:!0,writable:!1});let responseCookies=init.headers.get(`set-cookie`);return responseCookies&&Object.defineProperty(response,kSetCookie,{value:responseCookies,enumerable:!1,writable:!1}),response}function getRawSetCookie(response){return Reflect.get(response,kSetCookie)}function copyResponseOwnProperties(source,target){for(let propertyName of Reflect.ownKeys(source)){let descriptor=Object.getOwnPropertyDescriptor(source,propertyName),existingDescriptor=Object.getOwnPropertyDescriptor(target,propertyName);descriptor&&existingDescriptor==null&&Object.defineProperty(target,propertyName,descriptor)}}const bodyType=Symbol(`bodyType`),kDefaultContentType=Symbol.for(`kDefaultContentType`);var HttpResponse=class HttpResponse extends FetchResponse$1{[bodyType]=null;constructor(body,init){let responseInit=normalizeResponseInit(init);super(body,responseInit),decorateResponse(this,responseInit)}static error(){return super.error()}static text(body,init){let responseInit=normalizeResponseInit(init),hasExplicitContentType=responseInit.headers.has(`Content-Type`);hasExplicitContentType||responseInit.headers.set(`Content-Type`,`text/plain`),responseInit.headers.has(`Content-Length`)||responseInit.headers.set(`Content-Length`,body?new Blob([body]).size.toString():`0`);let response=new HttpResponse(body,responseInit);return hasExplicitContentType||Object.defineProperty(response,kDefaultContentType,{value:!0,enumerable:!1}),response}static json(body,init){let responseInit=normalizeResponseInit(init),hasExplicitContentType=responseInit.headers.has(`Content-Type`);hasExplicitContentType||responseInit.headers.set(`Content-Type`,`application/json`);let responseText=JSON.stringify(body);responseInit.headers.has(`Content-Length`)||responseInit.headers.set(`Content-Length`,responseText?new Blob([responseText]).size.toString():`0`);let response=new HttpResponse(responseText,responseInit);return hasExplicitContentType||Object.defineProperty(response,kDefaultContentType,{value:!0,enumerable:!1}),response}static xml(body,init){let responseInit=normalizeResponseInit(init),hasExplicitContentType=responseInit.headers.has(`Content-Type`);hasExplicitContentType||responseInit.headers.set(`Content-Type`,`text/xml`);let response=new HttpResponse(body,responseInit);return hasExplicitContentType||Object.defineProperty(response,kDefaultContentType,{value:!0,enumerable:!1}),response}static html(body,init){let responseInit=normalizeResponseInit(init),hasExplicitContentType=responseInit.headers.has(`Content-Type`);hasExplicitContentType||responseInit.headers.set(`Content-Type`,`text/html`);let response=new HttpResponse(body,responseInit);return hasExplicitContentType||Object.defineProperty(response,kDefaultContentType,{value:!0,enumerable:!1}),response}static arrayBuffer(body,init){let responseInit=normalizeResponseInit(init),hasExplicitContentType=responseInit.headers.has(`Content-Type`);hasExplicitContentType||responseInit.headers.set(`Content-Type`,`application/octet-stream`),body&&!responseInit.headers.has(`Content-Length`)&&responseInit.headers.set(`Content-Length`,body.byteLength.toString());let response=new HttpResponse(body,responseInit);return hasExplicitContentType||Object.defineProperty(response,kDefaultContentType,{value:!0,enumerable:!1}),response}static formData(body,init){return new HttpResponse(body,normalizeResponseInit(init))}};function createDeferredExecutor$1(){let executor=((resolve,reject)=>{executor.state=`pending`,executor.resolve=data=>executor.state===`pending`?(executor.result=data,resolve(data instanceof Promise?data:Promise.resolve(data).then(value=>(executor.state=`fulfilled`,value)))):void 0,executor.reject=reason=>{if(executor.state===`pending`)return queueMicrotask(()=>{executor.state=`rejected`}),reject(executor.rejectionReason=reason)}});return executor}var DeferredPromise$1=class extends Promise{#executor;resolve;reject;constructor(executor=null){let deferredExecutor=createDeferredExecutor$1();super((originalResolve,originalReject)=>{deferredExecutor(originalResolve,originalReject),executor?.(deferredExecutor.resolve,deferredExecutor.reject)}),this.#executor=deferredExecutor,this.resolve=this.#executor.resolve,this.reject=this.#executor.reject}get state(){return this.#executor.state}get rejectionReason(){return this.#executor.rejectionReason}then(onFulfilled,onRejected){return this.#decorate(super.then(onFulfilled,onRejected))}catch(onRejected){return this.#decorate(super.catch(onRejected))}finally(onfinally){return this.#decorate(super.finally(onfinally))}#decorate(promise){return Object.defineProperties(promise,{resolve:{configurable:!0,value:this.resolve},reject:{configurable:!0,value:this.reject}})}};function observeResponseBodyStream(response){if(response.body==null||response.bodyUsed||response.body.locked)return null;let settled=new DeferredPromise$1,reader=response.body.getReader(),observedResponse=new FetchResponse$1(new ReadableStream({async pull(controller){try{let readResult=await reader.read();if(readResult.done){settled.resolve(),controller.close();return}controller.enqueue(readResult.value)}catch(error){throw settled.resolve(),error}},async cancel(reason){settled.resolve(),await reader.cancel(reason)}}),{status:response.status,statusText:response.statusText,headers:response.headers});return copyResponseOwnProperties(response,observedResponse),{response:observedResponse,settled}}var RequestHandler=class RequestHandler{static cache=new WeakMap;kind=`request`;resolver;resolverIterator;resolverIteratorResult;resolverIteratorCleanups;options;scheduledCleanups;info;isUsed;constructor(args){this.resolver=args.resolver,this.options=args.options,this.scheduledCleanups=new Map;let callFrame=getCallFrame(Error());this.info={...args.info,callFrame},this.isUsed=!1}reset(){this.scheduledCleanups.clear();let iterator=this.resolverIterator;this.resolverIterator=void 0,this.resolverIteratorResult=void 0,this.resolverIteratorCleanups=void 0,typeof iterator?.return==`function`&&Promise.resolve(iterator.return())}restore(){this.options?.once&&(this.reset(),this.isUsed=!1)}async parse(_args){return{}}async test(args){let parsedResult=await this.parse({request:args.request,resolutionContext:args.resolutionContext});return this.predicate({request:args.request,parsedResult,resolutionContext:args.resolutionContext})}extendResolverArgs(_args){return{}}cloneRequestOrGetFromCache(request){let existingClone=RequestHandler.cache.get(request);if(existingClone!==void 0)return existingClone;let clonedRequest=request.clone();return RequestHandler.cache.set(request,clonedRequest),clonedRequest}async run(args){if(this.isUsed&&this.options?.once)return null;let requestClone=this.cloneRequestOrGetFromCache(args.request),parsedResult=await this.parse({request:args.request,resolutionContext:args.resolutionContext});if(!await this.predicate({request:args.request,parsedResult,resolutionContext:args.resolutionContext})||this.isUsed&&this.options?.once)return null;this.isUsed=!0;let executeResolver=this.wrapResolver(this.resolver),resolverExtras=this.extendResolverArgs({request:args.request,parsedResult}),listenerController=new AbortController,finalizeFunction,getFinalize=()=>(finalizeFunction??=(args.request.signal.aborted||args.request.signal.addEventListener(`abort`,()=>this.runScheduledCleanups(args.requestId),{once:!0,signal:listenerController.signal}),callback=>{this.scheduleCleanup(args.requestId,callback),args.request.signal.aborted&&this.runScheduledCleanups(args.requestId)}),finalizeFunction),mockedResponse=await executeResolver({...resolverExtras,get finalize(){return getFinalize()},requestId:args.requestId,request:args.request}).catch(errorOrResponse=>{if(errorOrResponse instanceof Response)return errorOrResponse;throw errorOrResponse}).finally(()=>{listenerController.abort()});return mockedResponse&&forwardResponseCookies(mockedResponse),this.createExecutionResult({request:requestClone,requestId:args.requestId,response:mockedResponse,parsedResult})}wrapResolver(resolver){return async info=>{if(!this.resolverIterator){let result;try{result=await resolver(info)}catch(error){throw await this.runScheduledCleanups(info.requestId),error}if(!isIterable(result))return this.complete({request:info.request,requestId:info.requestId,response:result});let existingCleanups=this.scheduledCleanups.get(info.requestId);existingCleanups!=null&&existingCleanups.length>0&&(this.resolverIteratorCleanups=existingCleanups,this.scheduledCleanups.delete(info.requestId)),this.resolverIterator=Symbol.iterator in result?result[Symbol.iterator]():result[Symbol.asyncIterator]()}this.isUsed=!1;let{done,value}=await this.resolverIterator.next(),nextResponse=await value;return nextResponse&&(this.resolverIteratorResult=nextResponse.clone()),done?(this.isUsed=!0,this.complete({request:info.request,requestId:info.requestId,response:this.resolverIteratorResult?.clone()})):nextResponse}}createExecutionResult(args){return{handler:this,request:args.request,requestId:args.requestId,response:args.response,parsedResult:args.parsedResult}}scheduleCleanup(requestId,callback){if(this.resolverIterator){(this.resolverIteratorCleanups||=[]).unshift(callback);return}let cleanups=this.scheduledCleanups.get(requestId)||[];cleanups.unshift(callback),this.scheduledCleanups.set(requestId,cleanups)}async exhaustCleanups(cleanups){let errors=[];for(let cleanup of cleanups)try{await cleanup()}catch(error){error instanceof Error&&errors.push(error)}errors.length>0&&devUtils.error(`Failed to execute cleanup for request handler "%s"`,this.info.header,AggregateError(errors,`Failed to execute cleanup for request handler "${this.info.header}"`))}takeScheduledCleanups(requestId){if(this.resolverIterator&&this.resolverIteratorCleanups!=null&&this.resolverIteratorCleanups.length>0){let cleanups2=this.resolverIteratorCleanups;return this.resolverIteratorCleanups=void 0,cleanups2}let cleanups=this.scheduledCleanups.get(requestId);if(cleanups&&cleanups.length!==0)return this.scheduledCleanups.delete(requestId),cleanups}async runScheduledCleanups(requestId){let cleanups=this.takeScheduledCleanups(requestId);cleanups&&await this.exhaustCleanups(cleanups)}async complete(args){let cleanups=this.takeScheduledCleanups(args.requestId);if(!cleanups)return args.response;let observedResponse=args.response?observeResponseBodyStream(args.response):null;if(!observedResponse)return await this.exhaustCleanups(cleanups),args.response;let listenerController=new AbortController,runCleanupsOnce=()=>{listenerController.signal.aborted||(listenerController.abort(),this.exhaustCleanups(cleanups))};return observedResponse.settled.then(runCleanupsOnce),args.request.signal.aborted?runCleanupsOnce():args.request.signal.addEventListener(`abort`,runCleanupsOnce,{once:!0,signal:listenerController.signal}),observedResponse.response}};function forwardResponseCookies(response){if(typeof document>`u`)return;let responseCookies=getRawSetCookie(response);if(!responseCookies)return;let allResponseCookies=Headers$1.prototype.getSetCookie.call(new Headers([[`set-cookie`,responseCookies]]));for(let cookieString of allResponseCookies)document.cookie=cookieString}var import_dist$1=__commonJSMin((exports=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.pathToRegexp=exports.tokensToRegexp=exports.regexpToFunction=exports.match=exports.tokensToFunction=exports.compile=exports.parse=void 0;function lexer(str){for(var tokens=[],i=0;i<str.length;){var char=str[i];if(char===`*`||char===`+`||char===`?`){tokens.push({type:`MODIFIER`,index:i,value:str[i++]});continue}if(char===`\\`){tokens.push({type:`ESCAPED_CHAR`,index:i++,value:str[i++]});continue}if(char===`{`){tokens.push({type:`OPEN`,index:i,value:str[i++]});continue}if(char===`}`){tokens.push({type:`CLOSE`,index:i,value:str[i++]});continue}if(char===`:`){for(var name=``,j=i+1;j<str.length;){var code=str.charCodeAt(j);if(code>=48&&code<=57||code>=65&&code<=90||code>=97&&code<=122||code===95){name+=str[j++];continue}break}if(!name)throw TypeError(`Missing parameter name at ${i}`);tokens.push({type:`NAME`,index:i,value:name}),i=j;continue}if(char===`(`){var count=1,pattern=``,j=i+1;if(str[j]===`?`)throw TypeError(`Pattern cannot start with "?" at ${j}`);for(;j<str.length;){if(str[j]===`\\`){pattern+=str[j++]+str[j++];continue}if(str[j]===`)`){if(count--,count===0){j++;break}}else if(str[j]===`(`&&(count++,str[j+1]!==`?`))throw TypeError(`Capturing groups are not allowed at ${j}`);pattern+=str[j++]}if(count)throw TypeError(`Unbalanced pattern at ${i}`);if(!pattern)throw TypeError(`Missing pattern at ${i}`);tokens.push({type:`PATTERN`,index:i,value:pattern}),i=j;continue}tokens.push({type:`CHAR`,index:i,value:str[i++]})}return tokens.push({type:`END`,index:i,value:``}),tokens}function parse(str,options){options===void 0&&(options={});for(var tokens=lexer(str),_a=options.prefixes,prefixes=_a===void 0?`./`:_a,_b=options.delimiter,delimiter=_b===void 0?`/#?`:_b,result=[],key=0,i=0,path=``,tryConsume=function(type){if(i<tokens.length&&tokens[i].type===type)return tokens[i++].value},mustConsume=function(type){var value=tryConsume(type);if(value!==void 0)return value;var _a=tokens[i],nextType=_a.type,index=_a.index;throw TypeError(`Unexpected ${nextType} at ${index}, expected ${type}`)},consumeText=function(){for(var result=``,value;value=tryConsume(`CHAR`)||tryConsume(`ESCAPED_CHAR`);)result+=value;return result},isSafe=function(value){for(var _i=0,delimiter_1=delimiter;_i<delimiter_1.length;_i++){var char=delimiter_1[_i];if(value.indexOf(char)>-1)return!0}return!1},safePattern=function(prefix){var prev=result[result.length-1],prevText=prefix||(prev&&typeof prev==`string`?prev:``);if(prev&&!prevText)throw TypeError(`Must have text between two parameters, missing text after "${prev.name}"`);return!prevText||isSafe(prevText)?`[^${escapeString(delimiter)}]+?`:`(?:(?!${escapeString(prevText)})[^${escapeString(delimiter)}])+?`};i<tokens.length;){var char=tryConsume(`CHAR`),name=tryConsume(`NAME`),pattern=tryConsume(`PATTERN`);if(name||pattern){var prefix=char||``;prefixes.indexOf(prefix)===-1&&(path+=prefix,prefix=``),path&&=(result.push(path),``),result.push({name:name||key++,prefix,suffix:``,pattern:pattern||safePattern(prefix),modifier:tryConsume(`MODIFIER`)||``});continue}var value=char||tryConsume(`ESCAPED_CHAR`);if(value){path+=value;continue}if(path&&=(result.push(path),``),tryConsume(`OPEN`)){var prefix=consumeText(),name_1=tryConsume(`NAME`)||``,pattern_1=tryConsume(`PATTERN`)||``,suffix=consumeText();mustConsume(`CLOSE`),result.push({name:name_1||(pattern_1?key++:``),pattern:name_1&&!pattern_1?safePattern(prefix):pattern_1,prefix,suffix,modifier:tryConsume(`MODIFIER`)||``});continue}mustConsume(`END`)}return result}exports.parse=parse;function compile(str,options){return tokensToFunction(parse(str,options),options)}exports.compile=compile;function tokensToFunction(tokens,options){options===void 0&&(options={});var reFlags=flags(options),_a=options.encode,encode=_a===void 0?function(x){return x}:_a,_b=options.validate,validate=_b===void 0||_b,matches=tokens.map(function(token){if(typeof token==`object`)return RegExp(`^(?:${token.pattern})\$`,reFlags)});return function(data){for(var path=``,i=0;i<tokens.length;i++){var token=tokens[i];if(typeof token==`string`){path+=token;continue}var value=data?data[token.name]:void 0,optional=token.modifier===`?`||token.modifier===`*`,repeat=token.modifier===`*`||token.modifier===`+`;if(Array.isArray(value)){if(!repeat)throw TypeError(`Expected "${token.name}" to not repeat, but got an array`);if(value.length===0){if(optional)continue;throw TypeError(`Expected "${token.name}" to not be empty`)}for(var j=0;j<value.length;j++){var segment=encode(value[j],token);if(validate&&!matches[i].test(segment))throw TypeError(`Expected all "${token.name}" to match "${token.pattern}", but got "${segment}"`);path+=token.prefix+segment+token.suffix}continue}if(typeof value==`string`||typeof value==`number`){var segment=encode(String(value),token);if(validate&&!matches[i].test(segment))throw TypeError(`Expected "${token.name}" to match "${token.pattern}", but got "${segment}"`);path+=token.prefix+segment+token.suffix;continue}if(!optional){var typeOfMessage=repeat?`an array`:`a string`;throw TypeError(`Expected "${token.name}" to be ${typeOfMessage}`)}}return path}}exports.tokensToFunction=tokensToFunction;function match(str,options){var keys=[];return regexpToFunction(pathToRegexp(str,keys,options),keys,options)}exports.match=match;function regexpToFunction(re,keys,options){options===void 0&&(options={});var _a=options.decode,decode=_a===void 0?function(x){return x}:_a;return function(pathname){var m=re.exec(pathname);if(!m)return!1;for(var path=m[0],index=m.index,params=Object.create(null),_loop_1=function(i){if(m[i]===void 0)return`continue`;var key=keys[i-1];key.modifier===`*`||key.modifier===`+`?params[key.name]=m[i].split(key.prefix+key.suffix).map(function(value){return decode(value,key)}):params[key.name]=decode(m[i],key)},i=1;i<m.length;i++)_loop_1(i);return{path,index,params}}}exports.regexpToFunction=regexpToFunction;function escapeString(str){return str.replace(/([.+*?=^!:${}()[\]|/\\])/g,`\\$1`)}function flags(options){return options&&options.sensitive?``:`i`}function regexpToRegexp(path,keys){if(!keys)return path;for(var groupsRegex=/\((?:\?<(.*?)>)?(?!\?)/g,index=0,execResult=groupsRegex.exec(path.source);execResult;)keys.push({name:execResult[1]||index++,prefix:``,suffix:``,modifier:``,pattern:``}),execResult=groupsRegex.exec(path.source);return path}function arrayToRegexp(paths,keys,options){var parts=paths.map(function(path){return pathToRegexp(path,keys,options).source});return RegExp(`(?:${parts.join(`|`)})`,flags(options))}function stringToRegexp(path,keys,options){return tokensToRegexp(parse(path,options),keys,options)}function tokensToRegexp(tokens,keys,options){options===void 0&&(options={});for(var _a=options.strict,strict=_a!==void 0&&_a,_b=options.start,start=_b===void 0||_b,_c=options.end,end=_c===void 0||_c,_d=options.encode,encode=_d===void 0?function(x){return x}:_d,_e=options.delimiter,delimiter=_e===void 0?`/#?`:_e,_f=options.endsWith,endsWithRe=`[${escapeString(_f===void 0?``:_f)}]|\$`,delimiterRe=`[${escapeString(delimiter)}]`,route=start?`^`:``,_i=0,tokens_1=tokens;_i<tokens_1.length;_i++){var token=tokens_1[_i];if(typeof token==`string`)route+=escapeString(encode(token));else{var prefix=escapeString(encode(token.prefix)),suffix=escapeString(encode(token.suffix));if(token.pattern){if(keys&&keys.push(token),prefix||suffix){if(token.modifier===`+`||token.modifier===`*`){var mod=token.modifier===`*`?`?`:``;route+=`(?:${prefix}((?:${token.pattern})(?:${suffix}${prefix}(?:${token.pattern}))*)${suffix})${mod}`}else route+=`(?:${prefix}(${token.pattern})${suffix})${token.modifier}`}else{if(token.modifier===`+`||token.modifier===`*`)throw TypeError(`Can not repeat "${token.name}" without a prefix and suffix`);route+=`(${token.pattern})${token.modifier}`}}else route+=`(?:${prefix}${suffix})${token.modifier}`}}if(end)strict||(route+=`${delimiterRe}?`),route+=options.endsWith?`(?=${endsWithRe})`:`$`;else{var endToken=tokens[tokens.length-1],isEndDelimited=typeof endToken==`string`?delimiterRe.indexOf(endToken[endToken.length-1])>-1:endToken===void 0;strict||(route+=`(?:${delimiterRe}(?=${endsWithRe}))?`),isEndDelimited||(route+=`(?=${delimiterRe}|${endsWithRe})`)}return new RegExp(route,flags(options))}exports.tokensToRegexp=tokensToRegexp;function pathToRegexp(path,keys,options){return path instanceof RegExp?regexpToRegexp(path,keys):Array.isArray(path)?arrayToRegexp(path,keys,options):stringToRegexp(path,keys,options)}exports.pathToRegexp=pathToRegexp}))();const REDUNDANT_CHARACTERS_EXP=/[?|#].*$/g;function cleanUrl(path){return path.endsWith(`?`)?path:path.replace(REDUNDANT_CHARACTERS_EXP,``)}function isAbsoluteUrl(url){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(url)}function getAbsoluteUrl(path,baseUrl){if(isAbsoluteUrl(path)||path.startsWith(`*`))return path;let origin=baseUrl||typeof location<`u`&&location.href;return origin?decodeURI(new URL(encodeURI(path),origin).href):path}function normalizePath(path,baseUrl){return path instanceof RegExp?path:cleanUrl(getAbsoluteUrl(path,baseUrl))}function coercePath(path){return path.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g,(_,parameterName,wildcard)=>{let expression=`(.*)`;return parameterName?parameterName.startsWith(`:`)?`${parameterName}${wildcard}`:`${parameterName}${expression}`:expression}).replace(/([^/])(:)(?=(?:\d+|\(\.\*\))(?=\/|$))/,`$1\\$2`).replace(/^([^/]+)(:)(?=\/\/)/,`$1\\$2`)}function matchRequestUrl(url,path,baseUrl){let normalizedPath=normalizePath(path,baseUrl),cleanPath=typeof normalizedPath==`string`?coercePath(normalizedPath):normalizedPath,cleanUrl=getCleanUrl(url),result=(0,import_dist$1.match)(cleanPath,{decode:decodeURIComponent})(cleanUrl),params=result&&result.params||{};return{matches:result!==!1,params}}function getTimestamp(options){let now=new Date,timestamp=`${now.getHours().toString().padStart(2,`0`)}:${now.getMinutes().toString().padStart(2,`0`)}:${now.getSeconds().toString().padStart(2,`0`)}`;return options?.milliseconds?`${timestamp}.${now.getMilliseconds().toString().padStart(3,`0`)}`:timestamp}function toPublicUrl(url){let urlInstance=url instanceof URL?url:new URL(url);return typeof location<`u`&&urlInstance.origin===location.origin?urlInstance.pathname:urlInstance.origin+urlInstance.pathname}function isObject$2(value){return typeof value==`object`&&!!value&&!Array.isArray(value)}const kConnect=Symbol(`kConnect`),kAutoConnect=Symbol(`kAutoConnect`),kSiblingHandlers=Symbol(`kSiblingHandlers`);function getSiblingHandlers(owner){return Reflect.get(owner,kSiblingHandlers)||[]}function groupHandlersByKind(handlers){let groups={},pushUnique=(kind,handler)=>{let bucket=groups[kind]||=[];bucket.includes(handler)||bucket.push(handler)};for(let handler of handlers){pushUnique(handler.kind,handler);for(let sibling of getSiblingHandlers(handler))pushUnique(sibling.kind,sibling)}return groups}var HandlersController=class{getInitialState(initialHandlers){invariant$1(this.#validateHandlers(initialHandlers),devUtils.formatMessage(`Failed to apply given request handlers: invalid input. Did you forget to spread the request handlers Array?`));let normalizedInitialHandlers=groupHandlersByKind(initialHandlers);return{initialHandlers:normalizedInitialHandlers,handlers:{...normalizedInitialHandlers}}}currentHandlers(){return Object.values(this.getState().handlers).flat().filter(handler=>handler!=null)}getHandlersByKind(kind){return this.getState().handlers[kind]||[]}use(nextHandlers){if(invariant$1(this.#validateHandlers(nextHandlers),devUtils.formatMessage(`[MSW] Failed to call "use()" with the given request handlers: invalid input. Did you forget to spread the array of request handlers?`)),nextHandlers.length===0)return;let{handlers}=this.getState(),overrides=groupHandlersByKind(nextHandlers);for(let kind in overrides){let overridesForKind=overrides[kind],existingForKind=handlers[kind];handlers[kind]=existingForKind?[...overridesForKind,...existingForKind]:overridesForKind}this.setState({handlers})}reset(nextHandlers){invariant$1(nextHandlers.length>0?this.#validateHandlers(nextHandlers):!0,devUtils.formatMessage(`Failed to replace initial handlers during reset: invalid handlers. Did you forget to spread the handlers array?`));for(let handler of this.currentHandlers())`reset`in handler&&handler.reset();let{initialHandlers}=this.getState();if(nextHandlers.length===0){this.setState({handlers:{...initialHandlers}});return}let normalizedNextHandlers=groupHandlersByKind(nextHandlers);this.setState({initialHandlers:normalizedNextHandlers,handlers:{...normalizedNextHandlers}})}restore(){for(let handler of this.currentHandlers())`restore`in handler&&handler.restore()}#validateHandlers(handlers){return handlers.every(handler=>!Array.isArray(handler))}},InMemoryHandlersController=class extends HandlersController{#handlers;#initialHandlers;constructor(initialHandlers){super();let initialState=this.getInitialState(initialHandlers);this.#initialHandlers=initialState.initialHandlers,this.#handlers=initialState.handlers}getState(){return{initialHandlers:this.#initialHandlers,handlers:this.#handlers}}setState(nextState){nextState.initialHandlers&&(this.#initialHandlers=nextState.initialHandlers),nextState.handlers&&(this.#handlers=nextState.handlers)}},Disposable=class{subscriptions=[];dispose(){let subscription,errors=[];for(;subscription=this.subscriptions.shift();)try{subscription()}catch(error){error instanceof Error&&errors.push(error)}errors.length>0&&console.error(AggregateError(errors,devUtils.formatMessage(`Failed to dispose of some side effects. This is likely an issue with MSW, please report it on GitHub: https://github.com/mswjs/msw/issues`)))}};function toReadonlyArray(source){let clone=[...source];return Object.freeze(clone),clone}const executeHandlers=async({request,requestId,handlers,resolutionContext})=>{let matchingHandler=null,result=null;for(let handler of handlers)if(result=await handler.run({request,requestId,resolutionContext}),result!==null&&(matchingHandler=handler),result?.response)break;return matchingHandler?{handler:matchingHandler,parsedResult:result?.parsedResult,response:result?.response}:null};function isStringEqual(actual,expected){return actual.toLowerCase()===expected.toLowerCase()}function getStatusCodeColor(status){return status<300?`#69AB32`:status<400?`#F0BB4B`:`#E95F5D`}async function serializeRequest(request){let requestText=await request.clone().text();return{url:new URL(request.url),method:request.method,headers:Object.fromEntries(request.headers.entries()),body:requestText}}const{message}=statuses_default;async function serializeResponse(response){let responseClone=response.clone(),responseText=await responseClone.text(),responseStatus=responseClone.status||200;return{status:responseStatus,statusText:responseClone.statusText||message[responseStatus]||`OK`,headers:Object.fromEntries(responseClone.headers.entries()),body:responseText}}var __create=Object.create,__defProp$2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports},__copyProps=(to,from,except,desc)=>{if(from&&typeof from==`object`||typeof from==`function`)for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp$2(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},allCookie=((mod,isNodeMode,target)=>(target=mod==null?{}:__create(__getProtoOf(mod)),__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp$2(target,`default`,{value:mod,enumerable:!0}):target,mod)))(__commonJS({"node_modules/.pnpm/cookie@1.1.1/node_modules/cookie/dist/index.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseCookie=parseCookie,exports.parse=parseCookie,exports.stringifyCookie=stringifyCookie,exports.stringifySetCookie=stringifySetCookie,exports.serialize=stringifySetCookie,exports.parseSetCookie=parseSetCookie,exports.stringifySetCookie=stringifySetCookie,exports.serialize=stringifySetCookie;var cookieNameRegExp=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,cookieValueRegExp=/^[\u0021-\u003A\u003C-\u007E]*$/,domainValueRegExp=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,pathValueRegExp=/^[\u0020-\u003A\u003D-\u007E]*$/,maxAgeRegExp=/^-?\d+$/,__toString=Object.prototype.toString,NullObject=(()=>{let C=function(){};return C.prototype=Object.create(null),C})();function parseCookie(str,options){let obj=new NullObject,len=str.length;if(len<2)return obj;let dec=options?.decode||decode,index=0;do{let eqIdx=eqIndex(str,index,len);if(eqIdx===-1)break;let endIdx=endIndex(str,index,len);if(eqIdx>endIdx){index=str.lastIndexOf(`;`,eqIdx-1)+1;continue}let key=valueSlice(str,index,eqIdx);obj[key]===void 0&&(obj[key]=dec(valueSlice(str,eqIdx+1,endIdx))),index=endIdx+1}while(index<len);return obj}function stringifyCookie(cookie2,options){let enc=options?.encode||encodeURIComponent,cookieStrings=[];for(let name of Object.keys(cookie2)){let val=cookie2[name];if(val===void 0)continue;if(!cookieNameRegExp.test(name))throw TypeError(`cookie name is invalid: ${name}`);let value=enc(val);if(!cookieValueRegExp.test(value))throw TypeError(`cookie val is invalid: ${val}`);cookieStrings.push(`${name}=${value}`)}return cookieStrings.join(`; `)}function stringifySetCookie(_name,_val,_opts){let cookie2=typeof _name==`object`?_name:{..._opts,name:_name,value:String(_val)},enc=(typeof _val==`object`?_val:_opts)?.encode||encodeURIComponent;if(!cookieNameRegExp.test(cookie2.name))throw TypeError(`argument name is invalid: ${cookie2.name}`);let value=cookie2.value?enc(cookie2.value):``;if(!cookieValueRegExp.test(value))throw TypeError(`argument val is invalid: ${cookie2.value}`);let str=cookie2.name+`=`+value;if(cookie2.maxAge!==void 0){if(!Number.isInteger(cookie2.maxAge))throw TypeError(`option maxAge is invalid: ${cookie2.maxAge}`);str+=`; Max-Age=`+cookie2.maxAge}if(cookie2.domain){if(!domainValueRegExp.test(cookie2.domain))throw TypeError(`option domain is invalid: ${cookie2.domain}`);str+=`; Domain=`+cookie2.domain}if(cookie2.path){if(!pathValueRegExp.test(cookie2.path))throw TypeError(`option path is invalid: ${cookie2.path}`);str+=`; Path=`+cookie2.path}if(cookie2.expires){if(!isDate(cookie2.expires)||!Number.isFinite(cookie2.expires.valueOf()))throw TypeError(`option expires is invalid: ${cookie2.expires}`);str+=`; Expires=`+cookie2.expires.toUTCString()}if(cookie2.httpOnly&&(str+=`; HttpOnly`),cookie2.secure&&(str+=`; Secure`),cookie2.partitioned&&(str+=`; Partitioned`),cookie2.priority)switch(typeof cookie2.priority==`string`?cookie2.priority.toLowerCase():void 0){case`low`:str+=`; Priority=Low`;break;case`medium`:str+=`; Priority=Medium`;break;case`high`:str+=`; Priority=High`;break;default:throw TypeError(`option priority is invalid: ${cookie2.priority}`)}if(cookie2.sameSite)switch(typeof cookie2.sameSite==`string`?cookie2.sameSite.toLowerCase():cookie2.sameSite){case!0:case`strict`:str+=`; SameSite=Strict`;break;case`lax`:str+=`; SameSite=Lax`;break;case`none`:str+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid: ${cookie2.sameSite}`)}return str}function parseSetCookie(str,options){let dec=options?.decode||decode,len=str.length,endIdx=endIndex(str,0,len),eqIdx=eqIndex(str,0,endIdx),setCookie=eqIdx===-1?{name:``,value:dec(valueSlice(str,0,endIdx))}:{name:valueSlice(str,0,eqIdx),value:dec(valueSlice(str,eqIdx+1,endIdx))},index=endIdx+1;for(;index<len;){let endIdx2=endIndex(str,index,len),eqIdx2=eqIndex(str,index,endIdx2),attr=eqIdx2===-1?valueSlice(str,index,endIdx2):valueSlice(str,index,eqIdx2),val=eqIdx2===-1?void 0:valueSlice(str,eqIdx2+1,endIdx2);switch(attr.toLowerCase()){case`httponly`:setCookie.httpOnly=!0;break;case`secure`:setCookie.secure=!0;break;case`partitioned`:setCookie.partitioned=!0;break;case`domain`:setCookie.domain=val;break;case`path`:setCookie.path=val;break;case`max-age`:val&&maxAgeRegExp.test(val)&&(setCookie.maxAge=Number(val));break;case`expires`:if(!val)break;let date=new Date(val);Number.isFinite(date.valueOf())&&(setCookie.expires=date);break;case`priority`:if(!val)break;let priority=val.toLowerCase();(priority===`low`||priority===`medium`||priority===`high`)&&(setCookie.priority=priority);break;case`samesite`:if(!val)break;let sameSite=val.toLowerCase();(sameSite===`lax`||sameSite===`strict`||sameSite===`none`)&&(setCookie.sameSite=sameSite)}index=endIdx2+1}return setCookie}function endIndex(str,min,len){let index=str.indexOf(`;`,min);return index===-1?len:index}function eqIndex(str,min,max){let index=str.indexOf(`=`,min);return index<max?index:-1}function valueSlice(str,min,max){let start=min,end=max;do{let code=str.charCodeAt(start);if(code!==32&&code!==9)break}while(++start<end);for(;end>start;){let code=str.charCodeAt(end-1);if(code!==32&&code!==9)break;end--}return str.slice(start,end)}function decode(str){if(str.indexOf(`%`)===-1)return str;try{return decodeURIComponent(str)}catch{return str}}function isDate(val){return __toString.call(val)===`[object Date]`}}})(),1),cookie=allCookie.default||allCookie,parse$1=cookie.parse,serialize$7=cookie.serialize,import_cjs=__commonJSMin((exports=>{function shareSameDomainSuffix(hostname,vhost){return hostname.endsWith(vhost)?hostname.length===vhost.length||hostname[hostname.length-vhost.length-1]===`.`:!1}function extractDomainWithSuffix(hostname,publicSuffix){let publicSuffixIndex=hostname.length-publicSuffix.length-2,lastDotBeforeSuffixIndex=hostname.lastIndexOf(`.`,publicSuffixIndex);return lastDotBeforeSuffixIndex===-1?hostname:hostname.slice(lastDotBeforeSuffixIndex+1)}function getDomain$1(suffix,hostname,options){if(options.validHosts!==null){let validHosts=options.validHosts;for(let vhost of validHosts)if(shareSameDomainSuffix(hostname,vhost))return vhost}let numberOfLeadingDots=0;if(hostname.startsWith(`.`))for(;numberOfLeadingDots<hostname.length&&hostname[numberOfLeadingDots]===`.`;)numberOfLeadingDots+=1;return suffix.length===hostname.length-numberOfLeadingDots?null:extractDomainWithSuffix(hostname,suffix)}function getDomainWithoutSuffix$1(domain,suffix){return domain.slice(0,-suffix.length-1)}let CONTROL_CHARS=/[\t\n\r]/g,extractedHostnameValidated=!1;function isValidHostnameChar(code){return code>=97&&code<=122||code>=48&&code<=57||code>127||code>=65&&code<=90||code===45||code===95}function getSpecialScheme(url,schemeStart,colonIndex){let length=colonIndex-schemeStart,c0=url.charCodeAt(schemeStart)|32;if(length===2)return+(c0===119&&(url.charCodeAt(schemeStart+1)|32)==115);if(length===3){let c1=url.charCodeAt(schemeStart+1)|32,c2=url.charCodeAt(schemeStart+2)|32;return+(c0===119&&c1===115&&c2===115||c0===102&&c1===116&&c2===112)}if(length===4){let c1=url.charCodeAt(schemeStart+1)|32,c2=url.charCodeAt(schemeStart+2)|32,c3=url.charCodeAt(schemeStart+3)|32;return c0===104&&c1===116&&c2===116&&c3===112?1:c0===102&&c1===105&&c2===108&&c3===101?2:0}return length===5?+(c0===104&&(url.charCodeAt(schemeStart+1)|32)==116&&(url.charCodeAt(schemeStart+2)|32)==116&&(url.charCodeAt(schemeStart+3)|32)==112&&(url.charCodeAt(schemeStart+4)|32)==115):0}function extractHostname(url,urlIsValidHostname,validate=!1){let start=0,end=url.length,hasUpper=!1,isSpecial=!1;if(extractedHostnameValidated=!1,!urlIsValidHostname){if(url.startsWith(`data:`))return null;for(;start<url.length&&url.charCodeAt(start)<=32;)start+=1;for(;end>start+1&&url.charCodeAt(end-1)<=32;)--end;if(url.charCodeAt(start)===47&&url.charCodeAt(start+1)===47)start+=2;else{let indexOfProtocol=url.indexOf(`:/`,start);if(indexOfProtocol!==-1){let special=getSpecialScheme(url,start,indexOfProtocol);if(special===1)for(isSpecial=!0,start=indexOfProtocol+2;url.charCodeAt(start)===47||url.charCodeAt(start)===92;)start+=1;else if(special===2){isSpecial=!0,start=indexOfProtocol+1;let slashes=0;for(;(url.charCodeAt(start)===47||url.charCodeAt(start)===92)&&slashes<2;)start+=1,slashes+=1;if(slashes<2)return null}else{for(let i=start;i<indexOfProtocol;i+=1){let code=url.charCodeAt(i)|32;if(!(code>=97&&code<=122||code>=48&&code<=57||code===46||code===45||code===43)){let raw=url.charCodeAt(i);return raw===9||raw===10||raw===13?extractHostname(url.replace(CONTROL_CHARS,``),urlIsValidHostname,validate):null}}if(url.charCodeAt(indexOfProtocol+2)===47)start=indexOfProtocol+3;else return null}}else if(url.charCodeAt(start)!==91){let indexOfColon=-1;for(let i=start;i<end;i+=1){let code=url.charCodeAt(i);if(code===9||code===10||code===13)return extractHostname(url.replace(CONTROL_CHARS,``),urlIsValidHostname,validate);if(code===58){indexOfColon=i;break}if(code===47||code===92||code===63||code===35)break}if(indexOfColon!==-1){let hasIdentifier=!1;for(let i=indexOfColon+1;i<end;i+=1){let code=url.charCodeAt(i);if(code===47||code===92||code===63||code===35)break;if(code===64){hasIdentifier=!0;break}}if(!hasIdentifier){let allDigits=!0,i=indexOfColon+1;for(;i<end;i+=1){let code=url.charCodeAt(i);if(code===47||code===92||code===63||code===35)break;if(code<48||code>57){allDigits=!1;break}}if(i===indexOfColon+1&&(allDigits=!1),!allDigits){let special=getSpecialScheme(url,start,indexOfColon);if(special===0){let isBareIpv6=!1;for(let j=indexOfColon+1;j<end;j+=1){let code=url.charCodeAt(j);if(code===47||code===92||code===63||code===35)break;if(code===58){isBareIpv6=!0;break}}if(!isBareIpv6)return null}else if(isSpecial=!0,start=indexOfColon+1,special===2){let slashes=0;for(;(url.charCodeAt(start)===47||url.charCodeAt(start)===92)&&slashes<2;)start+=1,slashes+=1;if(slashes<2)return null}else for(;url.charCodeAt(start)===47||url.charCodeAt(start)===92;)start+=1}}}}}let indexOfIdentifier=-1,indexOfClosingBracket=-1,indexOfPort=-1,indexOfFirstColon=-1,hasControl=!1,vValid=validate,vLastDot=start-1,vLastCode=-1;if(validate&&start<end){let c0=url.charCodeAt(start);(!(isValidHostnameChar(c0)||c0===46||c0===95)||c0===45)&&(vValid=!1)}for(let i=start;i<end;i+=1){let code=url.charCodeAt(i);if(code<64){if(code===47||code===35||code===63){end=i;break}code===58?(indexOfFirstColon===-1&&(indexOfFirstColon=i),indexOfPort=i):code===9||code===10||code===13?hasControl=!0:validate&&(code===46?((i-vLastDot>64||vLastCode===46||vLastCode===45)&&(vValid=!1),vLastDot=i):(code<48||code>57)&&(code!==45||vLastCode===46)&&(vValid=!1))}else if(isSpecial&&code===92){end=i;break}else code===64?(indexOfIdentifier=i,indexOfFirstColon=-1):code===93?indexOfClosingBracket=i:code>=65&&code<=90?hasUpper=!0:validate&&!isValidHostnameChar(code)&&(vValid=!1);validate&&(vLastCode=code)}if(hasControl)return extractHostname(url.replace(CONTROL_CHARS,``),urlIsValidHostname,validate);if(indexOfIdentifier!==-1&&indexOfIdentifier>=start&&indexOfIdentifier<end&&(start=indexOfIdentifier+1),url.charCodeAt(start)===91)return indexOfClosingBracket===-1?null:url.slice(start+1,indexOfClosingBracket).toLowerCase();if(indexOfPort!==-1&&indexOfPort>start&&indexOfPort<end&&indexOfFirstColon===indexOfPort&&(end=indexOfPort),start>=end)return null;validate&&vValid&&indexOfIdentifier===-1&&indexOfPort===-1&&indexOfClosingBracket===-1&&url.charCodeAt(end-1)!==46&&end-start<=255&&end-vLastDot-1<=63&&vLastCode!==45&&(extractedHostnameValidated=!0)}for(;end>start+1&&url.charCodeAt(end-1)===46;)--end;let hostname=start!==0||end!==url.length?url.slice(start,end):url;return hasUpper?hostname.toLowerCase():hostname}function isProbablyIpv4(hostname){if(hostname.length<7||hostname.length>15)return!1;let numberOfDots=0;for(let i=0;i<hostname.length;i+=1){let code=hostname.charCodeAt(i);if(code===46)numberOfDots+=1;else if(code<48||code>57)return!1}return numberOfDots===3&&hostname.charCodeAt(0)!==46&&hostname.charCodeAt(hostname.length-1)!==46}function isProbablyIpv6(hostname){if(hostname.length<3)return!1;let start=+!!hostname.startsWith(`[`),end=hostname.length;if(hostname[end-1]===`]`&&--end,end-start>39)return!1;let hasColon=!1;for(;start<end;start+=1){let code=hostname.charCodeAt(start);if(code===58)hasColon=!0;else if(!(code>=48&&code<=57||code>=97&&code<=102||code>=65&&code<=70))return!1}return hasColon}function isIp(hostname){return isProbablyIpv6(hostname)||isProbablyIpv4(hostname)}let SPECIAL_USE_DOMAINS=[`test`,`localhost`,`invalid`,`example`,`example.com`,`example.net`,`example.org`,`local`,`onion`,`alt`,`home.arpa`,`ipv4only.arpa`,`resolver.arpa`,`service.arpa`,`6tisch.arpa`,`eap.arpa`];function isSpecialUse(hostname){for(let name of SPECIAL_USE_DOMAINS)if(hostname.endsWith(name)&&(hostname.length===name.length||hostname.charCodeAt(hostname.length-name.length-1)===46))return!0;return!1}function isValidAscii(code){return code>=97&&code<=122||code>=48&&code<=57||code>127}function isValidHostname(hostname){if(hostname.length>255||hostname.length===0||!isValidAscii(hostname.charCodeAt(0))&&hostname.charCodeAt(0)!==46&&hostname.charCodeAt(0)!==95)return!1;let lastDotIndex=-1,lastCharCode=-1,len=hostname.length;for(let i=0;i<len;i+=1){let code=hostname.charCodeAt(i);if(code===46){if(i-lastDotIndex>64||lastCharCode===46||lastCharCode===45)return!1;lastDotIndex=i}else if(!(isValidAscii(code)||code===45||code===95)||code===45&&lastCharCode===46)return!1;lastCharCode=code}return len-lastDotIndex-1<=63&&lastCharCode!==45}function setDefaultsImpl({allowIcannDomains=!0,allowPrivateDomains=!1,detectIp=!0,detectSpecialUse=!1,extractHostname=!0,mixedInputs=!0,validHosts=null,validateHostname=!0}){return{allowIcannDomains,allowPrivateDomains,detectIp,detectSpecialUse,extractHostname,mixedInputs,validHosts,validateHostname}}let DEFAULT_OPTIONS=setDefaultsImpl({});function setDefaults(options){return options===void 0?DEFAULT_OPTIONS:setDefaultsImpl(options)}function getSubdomain$1(hostname,domain){return domain.length===hostname.length?``:hostname.slice(0,-domain.length-1)}function getEmptyResult(){return{domain:null,domainWithoutSuffix:null,hostname:null,isIcann:null,isIp:null,isPrivate:null,isSpecialUse:null,publicSuffix:null,subdomain:null}}function resetResult(result){result.domain=null,result.domainWithoutSuffix=null,result.hostname=null,result.isIcann=null,result.isIp=null,result.isPrivate=null,result.isSpecialUse=null,result.publicSuffix=null,result.subdomain=null}function parseImpl(url,step,suffixLookup,partialOptions,result){let options=setDefaults(partialOptions);if(typeof url!=`string`)return result;let urlIsValid=!1;return options.extractHostname?options.mixedInputs?(urlIsValid=isValidHostname(url),result.hostname=extractHostname(url,urlIsValid,options.validateHostname)):result.hostname=extractHostname(url,!1,options.validateHostname):result.hostname=url,options.detectIp&&result.hostname!==null&&(result.isIp=isIp(result.hostname),result.isIp)?result:options.validateHostname&&options.extractHostname&&result.hostname!==null&&!(urlIsValid&&result.hostname===url)&&!extractedHostnameValidated&&!isValidHostname(result.hostname)?(result.hostname=null,result):(step===0||result.hostname===null||(step===5&&options.detectSpecialUse&&(result.isSpecialUse=isSpecialUse(result.hostname)),suffixLookup(result.hostname,options,result),step===2||result.publicSuffix===null)||(result.domain=getDomain$1(result.publicSuffix,result.hostname,options),step===3||result.domain===null)||(result.subdomain=getSubdomain$1(result.hostname,result.domain),step===4)||(result.domainWithoutSuffix=getDomainWithoutSuffix$1(result.domain,result.publicSuffix)),result)}function fastPathLookup(hostname,options,out){if(!options.allowPrivateDomains&&hostname.length>3){let last=hostname.length-1,c3=hostname.charCodeAt(last),c2=hostname.charCodeAt(last-1),c1=hostname.charCodeAt(last-2),c0=hostname.charCodeAt(last-3);if(c3===109&&c2===111&&c1===99&&c0===46)return out.isIcann=!0,out.isPrivate=!1,out.publicSuffix=`com`,!0;if(c3===103&&c2===114&&c1===111&&c0===46)return out.isIcann=!0,out.isPrivate=!1,out.publicSuffix=`org`,!0;if(c3===117&&c2===100&&c1===101&&c0===46)return out.isIcann=!0,out.isPrivate=!1,out.publicSuffix=`edu`,!0;if(c3===118&&c2===111&&c1===103&&c0===46)return out.isIcann=!0,out.isPrivate=!1,out.publicSuffix=`gov`,!0;if(c3===116&&c2===101&&c1===110&&c0===46)return out.isIcann=!0,out.isPrivate=!1,out.publicSuffix=`net`,!0;if(c3===101&&c2===100&&c1===46)return out.isIcann=!0,out.isPrivate=!1,out.publicSuffix=`de`,!0}return!1}let nodeFlags=new Uint8Array([1,2,1,1,1,1,1,1,1,1,1,1,0,2,2,2,0,2,2,0,2,0,0,1,0,0,2,1,1,1,1,1,1,0,0,0,1,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,1,0,0,0,0,0,0,1,1,1,0,2,0,0,0,0,0,0,0,2,0,2,2,0,0,2,2,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,2,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,2,2,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,1,0,2,2,0,0,0,2,0,1,1,0,2,0,2,2,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,0,0,0,0,1,0,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,2,2,0,2,2,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,2,0,2,2,2,2,0,0,0,0,2,0,0,0,0,0,0,0,2,2,0,0,0,2,2,1,1,1,1,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,2,2,0,0,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,2,2,1,2,1,1,1,2,1,1,1,1,1,0,1,1,1,1,2,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,2,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,0,0,0,0]),edgeStart=new Uint16Array([0,0,0,10,11,18,106,111,117,124,130,136,145,146,147,148,149,150,151,153,154,155,157,159,225,238,240,241,242,257,264,265,268,269,270,273,275,294,295,297,306,311,328,329,332,334,335,337,371,372,374,377,378,382,384,388,391,423,426,439,440,448,449,451,461,475,476,477,486,487,524,529,545,565,571,612,613,640,667,668,816,822,825,826,827,832,837,846,868,869,870,871,872,873,874,892,894,895,898,900,901,903,905,920,935,940,941,943,944,945,946,947,949,952,957,958,959,961,962,965,968,969,970,983,985,997,1008,1016,1018,1059,1062,1066,1067,1069,1072,1083,1085,1095,1097,1103,1105,1106,1108,1111,1112,1113,1165,1167,1169,1189,1190,1191,1192,1194,1205,1236,1247,1259,1268,1275,1280,1293,1304,1317,1318,1329,1363,1364,1365,1380,1395,1467,1468,1470,1471,1505,1506,1507,1508,1511,1515,1517,1546,1547,1555,1556,1557,1559,1561,1562,1564,1565,1566,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1592,1593,1594,1596,2051,2054,2055,2057,2064,2071,2081,2085,2096,2097,2098,2110,2111,2113,2115,2116,2123,2124,2126,2127,2129,2130,2131,2132,2133,2207,2209,2230,2231,2232,2234,2260,2261,2312,2313,2315,2322,2328,2338,2348,2401,2402,2403,2413,2427,2428,2431,2438,2439,2447,2448,2449,2450,2451,2462,2463,2464,2466,2467,2468,2470,2480,2492,2498,2530,2534,2536,2537,2539,2540,2551,2552,2554,2562,2569,2575,2580,2581,2587,2590,2596,2603,2604,2611,2619,2620,2621,2659,2665,2680,2681,2686,2704,2735,2753,2755,2758,2766,2768,2775,2827,2851,2852,2853,2854,2855,2856,2857,2864,2865,2866,2867,2868,2869,2871,2872,2876,2956,2969,2970,3407,3411,3425,3477,3505,3527,3585,3607,3622,3685,3736,3774,3810,3835,3977,4023,4074,4093,4127,4142,4162,4192,4223,4246,4277,4307,4339,4366,4441,4463,4501,4511,4545,4564,4590,4632,4682,4708,4777,4778,4780,4803,4826,4862,4893,4910,4967,4980,5004,5033,5035,5069,5085,5113,5418,5427,5436,5443,5460,5464,5470,5509,5511,5518,5525,5534,5541,5542,5553,5556,5571,5572,5581,5582,5591,5600,5606,5608,5609,5610,5646,5647,5649,5657,5664,5677,5681,5683,5684,5690,5697,5711,5721,5726,5734,5742,5748,5749,5753,5755,5756,5768,5769,5770,5771,5773,5774,5777,5779,5782,5786,5787,5788,5794,5795,5796,5798,5800,5802,5803,5804,5807,5809,5812,5813,5815,6013,6020,6021,6031,6036,6053,6067,6076,6077,6078,6082,6083,6085,6087,6093,6094,6097,6098,6100,6101,6102,7002,7004,7008,7026,7035,7038,7045,7046,7048,7049,7050,7052,7104,7105,7108,7109,7226,7227,7238,7249,7256,7259,7268,7269,7270,7285,7340,7531,7533,7534,7536,7541,7554,7569,7576,7585,7588,7591,7598,7606,7610,7611,7612,7626,7630,7639,7640,7641,7645,7680,7681,7698,7705,7713,7714,7719,7727,7771,7772,7778,7781,7792,7797,7798,7801,7803,7838,7839,7845,7852,7853,7862,7871,7886,7890,7942,7943,7948,7950,7953,7955,7956,7957,7966,7980,7988,8002,8014,8015,8017,8019,8041,8052,8058,8059,8071,8083,8170,8182,8190,8193,8199,8224,8227,8228,8229,8231,8234,8237,8248,8250,8252,8280,8354,8361,8365,8366,8375,8397,8398,8403,8404,8483,8485,8487,8496,8500,8506,8512,8518,8528,8533,8534,8552,8563,8568,8573,8583,8589,8593,8599,8605,10214,10215,10216,10223,10225]),edgeLength=new Uint8Array([3,3,3,3,3,3,3,3,5,8,8,2,2,3,3,3,3,3,8,5,5,5,5,5,3,3,5,5,9,12,19,8,19,8,11,9,9,8,7,7,6,8,9,16,10,7,7,11,8,6,6,9,7,11,7,14,4,4,4,4,4,4,10,7,6,6,6,6,10,10,6,10,10,22,11,9,10,10,10,9,10,8,7,7,7,8,21,13,11,11,9,10,9,13,10,8,8,9,12,9,7,10,7,7,13,7,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,8,6,3,3,3,3,3,3,2,5,3,3,3,7,2,2,2,2,2,2,3,3,3,1,1,7,8,5,2,2,7,2,2,1,4,1,11,9,9,5,5,8,5,5,5,5,5,5,5,3,3,3,3,3,5,11,9,9,13,7,14,7,6,6,6,7,6,6,6,6,6,10,7,11,9,4,4,4,4,4,6,6,6,6,6,8,7,10,9,9,9,8,9,8,7,10,6,9,8,10,10,7,8,1,9,10,12,12,12,10,9,9,10,10,9,9,1,1,5,3,3,3,3,3,3,3,3,3,3,3,3,6,6,6,4,3,3,3,7,4,4,4,3,3,6,7,3,4,1,2,2,2,6,1,2,2,2,2,2,12,5,3,8,9,13,4,4,13,9,9,11,7,3,12,9,2,2,2,3,3,3,3,3,8,2,2,3,3,3,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,4,3,7,10,15,7,15,15,20,15,9,10,10,12,14,14,14,12,12,12,12,12,14,14,10,10,10,10,14,9,9,9,10,14,14,14,13,13,9,9,9,9,9,9,7,8,6,8,8,6,8,13,8,8,6,13,8,11,13,8,6,13,8,6,9,10,10,12,14,14,14,12,12,12,12,14,14,10,10,10,10,9,9,9,10,14,14,11,13,13,9,9,9,9,9,9,2,6,9,2,2,3,3,3,3,3,3,3,3,3,4,4,4,2,3,3,3,3,3,3,7,7,2,3,2,2,5,3,3,3,3,3,3,4,2,2,2,2,2,2,3,3,3,3,3,3,3,4,5,7,2,2,12,8,10,8,10,7,18,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,2,2,3,3,3,5,5,3,8,8,6,8,6,6,4,6,7,7,7,10,11,2,5,5,3,3,3,3,3,3,5,5,6,11,10,7,7,7,4,4,4,2,3,3,3,3,3,2,7,5,5,3,3,3,3,3,3,3,3,7,7,7,11,7,6,9,6,6,8,10,8,6,8,13,4,4,4,4,4,10,8,11,8,8,8,10,10,7,10,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,7,10,13,7,8,7,11,8,8,6,9,8,8,6,6,6,8,8,6,6,6,6,6,9,7,6,4,4,4,4,4,4,4,6,6,6,9,7,8,10,8,8,2,3,3,3,3,3,2,8,9,9,2,2,2,3,3,3,2,3,3,3,9,2,2,3,3,3,3,3,3,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,12,5,5,3,5,4,2,3,2,4,3,9,2,2,2,2,2,5,5,3,8,8,13,6,10,9,4,7,9,11,2,3,7,3,3,4,1,3,4,2,9,3,3,12,5,3,7,10,10,7,4,4,6,14,7,9,7,13,2,2,2,2,2,2,3,3,3,3,3,8,15,4,4,2,3,3,3,7,4,9,9,2,3,3,3,5,3,2,2,7,2,7,6,6,7,2,4,2,2,2,2,2,2,8,8,8,9,5,2,3,3,3,3,3,3,10,7,4,4,4,4,3,4,2,3,3,3,3,3,10,7,4,4,4,4,2,3,3,3,3,10,7,4,4,4,4,3,9,6,6,6,9,13,9,2,2,2,8,7,9,5,3,3,3,5,5,13,12,9,10,7,8,7,6,8,6,11,12,7,9,10,4,4,7,8,11,6,7,9,8,7,10,8,9,15,7,8,5,4,7,2,3,3,3,2,14,10,2,14,10,2,14,3,9,13,13,10,14,16,17,11,2,14,2,14,3,9,13,10,14,16,17,11,14,10,14,2,7,3,10,7,14,10,2,14,10,9,9,17,6,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,10,10,10,12,9,4,10,11,8,8,8,7,9,5,3,3,3,3,3,3,3,3,5,8,4,4,4,4,4,4,6,16,3,3,14,3,14,2,14,9,13,10,10,14,16,17,11,6,9,10,10,12,14,14,14,12,12,12,12,14,14,10,10,10,10,14,9,9,9,10,14,14,14,9,9,9,9,9,9,2,14,9,13,10,10,14,16,17,11,6,2,14,9,17,13,10,10,14,16,17,11,6,2,14,9,13,10,14,16,17,11,2,14,9,13,10,16,11,2,14,10,19,7,2,14,9,13,10,19,10,7,14,16,17,11,6,2,14,9,13,10,19,7,14,16,17,11,2,14,9,13,17,13,10,10,14,16,17,11,6,3,2,14,9,13,10,10,14,16,17,11,6,9,10,12,14,14,14,12,12,12,12,12,14,14,14,10,10,10,14,9,9,9,9,14,14,14,13,13,14,9,9,9,9,9,9,4,11,2,14,9,13,17,13,10,19,10,7,14,16,17,11,6,2,14,9,13,17,13,10,19,10,7,14,16,17,11,6,2,9,10,10,7,17,3,3,12,12,16,15,15,12,14,14,14,20,20,13,12,12,12,12,12,12,20,25,14,14,12,12,10,10,10,10,9,9,9,25,4,9,17,10,7,14,16,21,13,13,14,20,14,13,17,24,9,12,13,25,13,21,20,17,9,9,9,9,9,9,12,17,4,4,9,9,9,10,10,12,14,14,14,12,12,12,12,12,14,14,10,10,10,10,14,9,9,9,10,14,14,14,13,13,9,9,9,9,9,9,1,5,8,7,11,11,1,3,3,3,4,8,9,10,14,14,12,12,12,12,14,14,10,10,10,10,14,9,9,9,10,14,14,14,13,13,9,9,9,9,9,7,4,4,4,4,4,4,4,4,4,4,9,12,6,14,4,12,7,2,2,1,2,7,6,4,4,4,6,8,8,7,4,5,6,3,3,3,3,4,16,8,5,4,3,3,3,5,2,2,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,11,12,7,7,13,9,10,17,12,8,9,7,8,5,12,10,13,14,5,5,5,13,5,5,5,3,3,3,5,16,5,5,5,5,5,7,12,14,8,12,8,10,12,9,11,7,9,7,10,7,13,9,7,12,8,17,7,7,16,10,13,13,8,10,10,14,17,7,16,16,15,8,10,10,12,17,17,7,17,14,7,10,17,8,7,7,7,8,15,15,7,14,10,10,10,11,11,7,7,13,8,10,7,16,7,8,7,14,17,12,10,11,21,8,9,7,13,9,8,13,6,12,7,6,13,10,10,10,8,18,9,17,13,10,12,6,13,6,11,8,13,10,13,18,13,11,13,8,16,7,10,8,16,12,10,8,8,14,11,8,15,8,8,7,7,12,7,8,9,14,15,8,9,10,9,15,7,8,8,12,13,9,10,15,15,13,7,10,10,20,7,6,9,6,6,14,11,14,11,12,9,10,16,16,12,7,11,28,8,11,10,7,21,8,7,9,4,4,4,17,7,8,6,9,6,6,13,6,6,6,6,18,20,14,8,11,12,9,10,13,15,19,8,9,12,7,10,16,12,9,9,9,14,12,11,9,12,11,18,9,9,9,10,7,7,16,8,9,7,13,12,10,18,7,8,11,7,7,8,8,13,7,7,7,11,15,13,11,7,8,15,11,7,8,18,14,13,18,15,10,12,12,9,7,11,11,8,7,10,8,14,12,10,18,7,10,9,7,8,13,10,14,10,8,8,23,7,7,11,12,12,17,7,7,11,11,17,16,16,7,8,11,14,14,8,10,7,7,16,16,13,9,11,9,15,15,11,11,7,7,14,7,9,7,7,16,10,13,10,11,14,7,11,10,11,7,11,10,11,15,11,15,10,12,17,10,14,13,11,11,12,13,10,7,13,10,16,12,21,9,10,10,7,11,14,17,7,7,8,11,12,8,15,14,14,8,17,12,10,10,7,9,11,7,10,7,11,18,7,11,7,12,11,8,8,14,12,7,8,15,3,7,7,5,2,9,2,2,2,2,2,2,2,3,3,3,3,3,3,3,2,5,3,3,3,3,3,3,4,4,3,3,3,3,3,3,5,11,6,4,7,10,7,7,11,1,10,2,2,3,3,3,3,3,3,3,3,5,7,3,5,6,3,3,5,2,2,5,3,4,13,11,3,3,6,3,5,14,2,2,3,8,2,2,12,5,18,5,3,3,3,16,5,5,5,10,7,13,12,13,9,12,14,19,9,9,21,9,9,10,6,9,6,15,10,6,12,8,6,10,15,4,4,6,6,9,9,12,16,14,23,7,7,7,14,9,7,7,11,14,10,7,10,10,10,12,6,11,10,13,11,15,11,7,12,10,3,7,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,4,3,7,2,5,5,3,3,5,5,5,5,7,6,6,6,4,4,4,4,4,4,6,6,6,6,6,7,10,2,2,2,5,5,5,5,3,3,3,3,3,5,5,10,9,11,8,7,12,8,9,7,6,13,11,6,13,7,9,9,4,4,4,4,4,6,10,7,8,13,8,8,9,14,7,8,10,7,7,7,9,6,9,7,2,12,5,3,3,13,4,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,4,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,4,4,4,4,4,4,4,4,4,4,4,4,9,3,3,3,3,3,3,3,3,3,3,4,2,2,2,5,3,3,3,3,3,3,3,3,4,4,1,7,6,4,12,3,3,3,3,3,8,7,3,3,3,3,3,3,4,4,11,14,2,8,3,5,5,8,10,8,6,4,7,17,7,4,5,2,6,3,2,4,4,2,12,5,5,3,15,13,10,8,11,2,2,3,3,3,3,3,3,3,3,4,4,5,3,3,3,3,4,18,2,12,5,3,3,3,3,3,5,16,8,8,9,6,6,4,4,4,4,31,6,6,10,11,21,10,9,7,10,7,7,2,4,4,4,4,6,5,3,3,4,3,3,3,3,3,3,3,3,3,6,6,6,2,2,2,5,3,3,3,7,7,4,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,8,2,3,3,3,3,3,5,9,11,3,3,3,3,4,4,3,3,3,3,3,5,10,9,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,11,10,10,10,10,10,11,10,11,10,11,10,9,9,11,3,3,3,3,3,3,5,3,7,8,8,7,6,6,11,4,4,4,7,8,9,9,2,3,7,4,4,2,5,5,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,2,2,5,5,5,5,5,3,3,5,5,5,7,7,6,6,6,4,4,4,4,4,4,4,4,4,4,6,6,8,8,1,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,6,9,12,3,7,10,7,2,2,3,3,3,3,3,4,3,3,2,2,2,2,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,8,8,6,6,8,6,7,4,4,4,4,4,4,6,7,5,5,20,19,8,10,9,7,10,6,8,11,6,6,6,6,13,12,8,6,7,14,11,9,2,5,3,6,2,3,2,2,2,2,2,2,2,5,4,3,7,6,4,7,4,3,6,4,7,2,7,7,7,5,5,5,5,3,3,3,3,3,3,3,3,3,5,9,10,10,11,7,8,20,7,8,9,8,12,6,6,6,8,9,8,12,6,6,8,13,10,12,6,6,7,7,9,6,4,4,4,4,4,4,10,6,6,6,7,14,11,10,7,8,10,8,11,14,11,11,9,7,9,8,11,9,17,10,9,2,2,2,9,3,3,3,3,15,14,9,5,5,2,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,15,12,22,19,17,18,18,19,21,7,16,16,5,5,5,5,5,5,5,5,5,5,5,7,5,5,5,5,5,5,5,5,5,5,5,9,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,7,16,11,11,7,7,7,7,17,7,8,12,15,9,19,7,19,8,21,11,12,19,14,22,7,7,7,7,7,7,7,7,7,7,7,16,16,19,24,12,7,14,7,12,7,8,10,10,13,7,12,12,7,7,10,18,15,12,16,7,14,12,17,10,16,17,12,17,25,7,7,7,13,6,9,6,9,18,6,6,11,20,10,6,6,6,6,6,6,17,6,6,6,15,6,6,6,6,6,8,14,11,12,11,15,13,19,17,21,7,18,8,13,13,8,12,8,6,6,13,6,15,15,16,6,6,16,6,6,6,14,6,18,6,6,6,17,18,9,13,15,8,19,8,15,15,18,14,16,4,4,4,4,4,4,4,4,4,4,4,4,6,11,10,11,6,21,23,12,17,12,11,14,13,22,15,15,11,12,14,12,7,12,8,12,14,12,18,10,8,16,19,17,12,14,15,8,19,17,12,13,13,15,18,13,23,24,23,21,17,24,8,21,8,14,14,16,20,14,8,8,15,20,8,19,21,9,8,13,12,13,15,11,8,11,9,9,8,11,8,21,14,21,15,15,13,7,19,7,7,7,7,7,7,16,12,17,18,7,7,11,11,7,9,9,2,2,3,3,2,2,2,3,3,3,3,3,3,3,3,3,3,4,5,5,5,5,5,5,5,5,3,3,10,10,7,9,7,7,7,6,8,6,6,6,6,6,6,6,7,6,8,6,6,9,7,7,7,4,4,4,4,4,4,4,4,8,9,8,7,8,7,8,10,7,5,5,5,5,5,5,3,9,7,7,8,6,6,6,6,6,6,6,6,9,6,6,9,11,13,7,8,9,9,5,5,5,7,8,6,6,6,6,6,6,6,7,8,9,7,10,9,10,7,8,5,5,5,5,5,5,7,7,9,8,7,7,6,6,6,6,6,6,10,6,6,6,6,6,6,6,6,6,6,6,9,10,4,4,4,4,8,7,7,10,10,9,8,8,15,9,8,8,8,8,8,9,10,9,10,7,8,13,5,5,5,5,5,3,3,7,7,8,6,6,6,4,4,11,9,7,8,9,10,7,5,5,5,5,5,3,3,7,6,6,13,7,9,8,7,5,5,5,5,5,5,5,5,3,3,3,3,7,8,7,8,13,6,6,6,6,6,6,6,6,6,6,6,6,6,6,8,8,6,6,6,6,7,6,7,6,6,9,7,4,4,4,4,4,4,4,7,8,7,8,9,8,8,8,7,10,7,8,5,5,5,5,5,5,5,5,3,7,7,7,7,9,7,10,9,6,6,6,6,6,8,8,6,6,6,7,6,6,6,9,9,4,4,13,7,10,9,9,12,7,8,8,10,8,8,8,8,8,8,5,5,5,5,3,7,7,11,7,9,8,8,6,6,10,6,8,8,8,6,7,6,6,12,4,4,4,4,4,4,4,4,4,9,8,8,16,8,9,8,7,5,5,5,5,5,3,3,7,7,7,10,15,8,9,8,9,9,6,6,6,6,6,6,7,4,8,7,8,8,7,8,11,8,5,5,5,5,5,3,7,7,6,11,16,7,6,4,4,4,4,9,9,8,8,8,13,12,8,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,11,7,8,8,9,13,7,7,7,9,8,8,9,12,7,12,7,12,8,7,10,12,9,9,6,6,8,8,6,6,6,6,6,6,6,9,8,9,11,8,6,6,6,6,6,12,7,6,6,6,9,7,7,6,6,6,6,6,11,9,6,6,6,6,6,7,9,4,4,4,4,4,4,4,4,9,9,9,9,7,7,7,7,7,11,7,7,8,8,8,8,8,8,9,8,9,9,7,7,11,11,7,12,8,8,8,8,8,7,8,8,8,8,8,13,12,8,8,8,8,7,7,7,9,5,5,5,5,5,5,5,3,3,7,7,11,7,8,8,8,6,6,6,6,6,6,6,6,6,6,6,10,11,6,7,9,4,4,4,4,4,4,9,9,8,9,8,8,8,7,7,5,5,5,5,5,5,5,5,5,5,3,3,11,7,7,7,9,6,6,11,8,10,6,6,6,12,8,8,7,6,6,8,7,4,4,4,4,4,4,4,4,9,10,9,9,8,10,9,11,8,5,5,5,7,6,6,8,7,4,4,4,4,8,7,7,8,7,8,8,5,5,5,5,7,7,8,8,8,6,6,6,6,6,10,8,9,13,6,7,6,6,8,7,8,4,4,4,4,11,8,8,8,10,5,5,8,7,8,13,8,7,6,8,6,9,7,8,7,5,5,5,5,5,5,3,3,7,8,9,6,4,8,10,10,8,12,9,13,2,7,5,5,5,5,5,7,7,10,6,6,6,6,6,6,6,8,4,4,9,8,8,8,14,8,8,8,9,8,5,5,5,5,5,3,3,9,6,6,6,6,10,12,6,6,6,6,6,6,6,4,4,4,4,11,8,7,8,8,8,5,5,3,3,3,3,7,7,6,8,6,8,11,7,6,6,6,7,4,8,11,9,10,5,5,5,3,3,3,7,7,8,9,8,15,9,6,6,6,6,6,6,11,11,4,4,4,4,4,7,9,9,10,8,7,5,5,5,5,5,5,3,3,8,6,6,6,6,6,6,6,6,6,9,7,4,4,4,4,4,9,9,8,8,10,13,5,5,5,3,17,7,7,7,7,7,8,6,8,13,6,6,6,6,6,6,6,6,4,4,4,9,10,8,8,8,5,5,5,5,3,7,7,7,8,8,6,6,6,8,8,8,9,10,8,4,8,10,9,8,8,8,9,13,10,5,5,5,5,5,5,5,5,5,5,3,3,7,8,9,9,7,7,7,10,9,9,8,9,8,8,8,6,6,6,6,6,6,6,6,6,6,6,6,6,8,12,6,6,6,6,6,6,6,6,6,12,4,4,4,4,4,4,4,4,4,4,4,11,8,8,9,9,10,8,9,7,7,5,5,5,5,5,5,3,7,8,7,6,6,8,6,6,10,4,7,8,9,12,8,7,7,5,5,5,5,5,5,3,3,7,14,7,9,8,8,6,6,8,12,12,6,6,7,7,10,4,4,4,4,4,9,9,14,9,13,8,7,5,5,5,6,6,6,7,4,8,7,5,5,5,5,5,5,5,5,3,3,7,7,7,8,6,6,6,6,6,6,12,6,6,6,6,4,4,9,9,8,8,11,7,7,7,5,5,5,3,9,8,6,6,7,4,4,4,4,4,4,8,8,11,5,5,5,7,7,7,9,6,6,6,6,6,6,9,8,4,4,4,4,7,12,9,8,8,8,7,10,10,5,5,5,5,5,5,5,3,11,14,8,7,8,8,6,6,6,6,6,8,7,6,6,6,7,6,8,9,4,4,4,7,8,9,7,9,7,7,9,8,5,5,5,5,5,5,5,5,5,11,3,9,7,7,12,14,8,6,6,12,11,8,6,6,6,6,6,6,6,6,6,15,7,4,4,4,16,9,9,9,8,9,9,9,9,9,8,8,8,13,11,8,5,5,5,5,3,7,6,6,8,8,8,6,6,7,10,7,4,4,4,4,9,7,8,7,7,7,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,7,7,7,9,6,6,6,6,6,8,8,7,7,9,6,6,6,7,6,6,6,6,6,15,4,4,4,4,4,8,8,7,8,12,9,8,8,8,8,8,9,8,8,10,8,8,8,8,16,9,10,2,5,5,5,5,5,5,5,9,7,6,8,9,4,4,4,4,4,7,8,8,8,9,8,11,10,5,5,5,5,3,7,8,6,6,6,6,6,8,6,6,6,6,4,12,10,12,7,7,7,7,7,7,7,5,5,5,5,3,3,7,7,10,8,9,7,6,10,7,6,6,4,4,8,9,7,9,9,9,9,8,8,8,8,10,5,5,5,5,5,5,8,7,6,6,6,10,6,7,10,7,4,4,4,4,4,4,4,12,9,10,7,7,10,8,10,5,12,9,6,6,6,6,6,7,6,4,4,4,10,9,9,8,7,7,5,5,5,5,5,5,3,3,13,7,7,9,7,7,7,8,9,9,7,8,6,6,6,6,6,6,6,6,6,6,6,6,6,7,13,9,15,15,4,4,4,4,4,10,10,9,8,9,8,8,9,7,8,7,8,5,5,7,6,6,6,4,4,4,7,8,11,8,5,5,5,5,5,5,5,7,6,6,6,6,6,6,9,11,10,7,4,4,4,9,8,8,5,5,5,5,5,9,9,6,6,6,6,6,6,6,9,9,4,4,4,4,8,8,8,9,9,8,8,8,13,2,4,2,7,5,5,5,5,5,5,9,9,6,6,6,6,10,8,8,8,6,6,6,4,4,9,8,10,8,9,8,8,8,9,8,8,5,3,3,3,11,6,6,6,7,6,6,6,4,4,9,8,5,5,5,5,5,3,11,8,6,6,6,6,6,9,7,4,4,14,10,9,8,12,8,8,8,11,15,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,11,11,11,10,10,7,7,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,3,3,3,7,11,7,7,11,11,7,8,9,10,7,7,9,9,9,9,7,7,10,8,13,8,8,8,8,11,10,6,6,8,10,11,14,14,6,6,6,6,6,6,9,11,7,7,6,8,12,11,11,6,6,10,6,6,6,6,6,10,7,7,6,6,11,6,6,6,11,8,9,7,6,10,11,9,10,11,7,11,8,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,6,6,8,9,10,9,6,6,6,10,6,6,6,6,11,10,11,10,9,8,7,7,7,7,11,14,8,10,9,9,8,8,7,11,8,8,8,11,11,10,10,9,10,8,11,10,8,11,9,12,8,10,8,11,8,9,9,11,11,10,11,13,8,7,8,8,9,7,8,8,8,8,7,8,2,2,2,2,2,2,2,4,4,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,2,3,3,3,3,3,3,3,3,8,6,4,4,4,11,7,11,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,5,5,5,3,3,3,3,8,7,7,8,8,4,8,7,7,7,9,7,8,9,8,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,6,3,3,3,3,3,3,3,3,4,2,2,3,3,3,3,3,4,5,5,3,8,8,6,9,4,4,10,7,3,3,3,2,5,3,3,3,3,3,3,3,3,3,3,3,3,4,3,2,2,2,3,3,3,3,3,4,10,2,3,3,3,3,3,3,3,4,2,3,3,3,3,3,3,3,3,2,2,3,3,3,5,2,4,2,6,2,2,9,5,5,3,3,3,3,3,3,3,5,5,5,9,8,7,6,6,11,4,4,4,4,4,4,4,4,6,6,7,7,11,8,8,6,5,11,2,3,3,3,3,3,3,3,3,3,3,3,3,3,4,2,2,3,3,3,3,3,3,6,4,4,4,4,3,3,3,3,5,7,2,3,3,3,3,3,8,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,6,4,4,4,4,2,2,3,3,3,3,3,3,3,4,3,3,3,3,3,3,3,3,3,3,3,3,4,2,2,3,3,3,3,3,3,2,3,3,3,3,3,6,3,3,8,10,3,4,4,1,1,1,1,1,1,1,8,9,10,7,7,1,1,3,8,7,7,8,8,8,1,6,1,1,6,3,3,4,7,3,3,5,5,4,4,4,4,4,2,7,7,8,12,3,4,5,1,3,4,4,10,4,3,3,3,8,7,7,2,2,2,2,2,2,2,2,2,12,9,20,7,5,5,5,9,13,5,5,5,5,5,3,3,3,16,5,5,5,13,7,8,8,11,8,7,9,7,11,12,9,9,8,8,11,10,14,7,12,10,11,13,7,9,11,17,17,14,13,7,8,7,10,10,7,16,13,7,8,17,12,9,8,6,7,10,6,6,12,6,8,10,8,8,8,6,8,6,14,6,6,6,13,6,10,6,6,7,14,8,6,6,10,11,10,9,9,7,7,6,6,6,9,9,7,9,10,9,13,12,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,6,8,9,10,9,7,10,10,8,7,8,7,10,12,9,8,15,8,7,8,8,7,7,15,13,7,10,9,14,18,16,7,24,7,8,10,11,16,8,14,7,9,9,9,13,19,14,15,14,11,7,13,9,10,7,13,9,10,11,12,8,9,2,3,5,8,7,4,4,10,5,3,3,3,3,3,5,4,4,4,2,2,2,2,2,1,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,2,2,2,3,3,3,3,3,3,3,3,3,3,4,2,12,5,3,8,10,15,6,7,2,3,2,5,5,12,2,5,5,5,5,2,2,5,5,12,9,5,2,2,9,5,5,12,12,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,9,12,5,8,8,9,5,5,5,8,19,7,16,15,14,9,9,9,9,7,11,11,11,7,14,10,10,5,5,5,5,5,5,5,5,5,15,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,9,9,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,14,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,15,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,12,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,9,9,12,9,9,12,12,12,15,7,11,7,14,11,18,13,8,18,15,18,12,14,12,8,8,8,8,9,9,9,12,7,10,10,8,8,12,12,12,7,12,12,9,7,7,7,7,7,8,15,12,9,10,10,7,10,10,13,11,10,9,22,11,9,8,8,8,8,8,13,18,13,9,15,19,9,7,7,10,7,7,7,11,8,13,17,7,7,10,10,10,7,20,16,7,7,7,7,7,7,11,21,12,12,13,11,14,16,8,8,13,11,7,7,13,7,7,14,15,15,6,6,6,6,6,6,6,6,6,6,13,10,18,6,6,6,6,6,6,6,6,6,11,8,8,12,12,11,11,8,12,9,9,9,13,13,9,9,9,9,9,9,6,10,12,6,6,6,6,17,11,7,7,7,7,14,14,12,6,7,7,6,6,15,10,13,10,6,8,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,13,9,9,15,13,6,12,12,6,19,11,10,7,7,16,8,19,17,9,9,9,9,9,6,6,6,10,8,16,8,6,6,9,6,6,6,6,6,6,6,6,8,8,8,6,7,6,6,6,6,6,6,6,6,6,6,6,14,6,6,6,6,20,6,9,6,14,9,9,9,6,9,8,8,12,9,8,8,8,8,7,8,12,7,8,8,8,6,8,6,6,6,6,6,6,6,9,8,8,6,6,13,9,12,13,12,14,13,12,11,11,6,8,8,8,6,13,12,11,11,12,6,11,12,11,13,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,15,6,6,6,6,6,6,6,13,6,6,6,6,6,6,6,6,6,6,6,6,6,8,8,8,8,6,18,6,12,13,13,13,9,10,15,9,12,6,6,6,6,6,6,6,6,9,15,10,9,10,13,9,19,8,18,17,10,10,8,8,6,6,6,6,6,6,10,14,8,16,16,9,8,15,8,8,10,12,14,7,7,8,8,7,7,7,7,8,13,13,11,9,9,9,12,10,17,8,11,9,7,7,14,8,14,14,7,7,7,7,7,7,14,7,7,7,7,7,10,10,8,14,7,7,7,7,8,8,8,8,8,17,9,7,15,7,8,12,7,9,14,7,7,7,9,13,8,14,7,16,18,13,15,14,12,13,10,15,9,7,7,7,10,13,15,15,9,9,9,9,19,11,7,11,11,13,8,8,8,8,7,12,19,17,9,9,13,7,7,7,9,7,7,7,12,13,15,10,8,8,14,15,12,13,13,8,12,14,7,11,7,14,15,13,12,8,8,8,8,11,13,15,15,8,13,12,8,8,8,13,10,16,14,11,8,8,12,12,9,15,15,12,12,13,8,8,9,12,13,9,8,8,8,8,8,8,8,8,8,8,8,11,12,11,7,14,7,13,13,13,12,18,16,7,12,11,10,10,15,9,9,9,21,7,7,7,11,16,8,8,11,11,7,7,7,7,7,19,7,7,7,7,7,7,7,7,7,12,8,9,12,14,11,9,9,9,22,12,3,4,8,8,15,4,2,2,5,5,3,3,3,3,3,3,6,6,4,4,4,12,7,10,2,3,3,3,3,3,3,3,6,7,3,7,5,14,4,4,7,8,10,4,1,3,3,6,2,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,4,2,2,5,3,4,2,2,2,2,2,2,11,5,5,5,11,5,5,3,5,5,5,5,11,14,13,9,11,9,12,8,11,11,8,11,16,9,9,7,10,9,12,8,15,6,7,6,6,13,10,8,11,8,6,6,6,12,16,6,11,7,8,9,18,6,6,9,4,4,6,13,6,6,6,6,8,8,9,16,7,7,14,7,8,8,8,7,7,7,7,7,7,15,13,7,10,7,7,10,12,16,15,7,9,9,14,11,11,10,9,10,8,12,7,8,7,7,10,12,7,12,8,7,2,3,3,3,3,3,3,3,3,3,3,5,3,3,5,5,5,10,4,8,7,10,3,3,3,3,3,3,3,3,3,3,1,3,3,3,3,3,3,3,7,4,5,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,6,6,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,8,2,2,2,8,12,7,7,5,5,5,5,5,5,5,5,5,5,5,5,8,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,7,11,9,8,8,8,7,8,9,7,7,9,7,7,7,10,7,7,10,9,10,6,6,6,6,6,6,15,7,8,9,9,8,6,6,10,9,6,8,13,9,7,6,6,6,6,6,6,12,6,6,7,6,7,6,6,6,10,10,7,6,6,6,4,4,4,4,4,4,4,4,4,4,4,4,4,4,6,14,6,6,7,7,9,6,6,6,6,9,9,8,9,10,9,8,9,12,7,7,7,8,7,10,12,11,9,10,7,7,7,9,10,10,8,12,9,7,7,9,8,8,8,10,7,7,8,9,9,7,7,7,8,2,4,6,3,4,2,3,3,3,3,2,3,3,3,3,3,3,3,3,4,4,4,4,5,5,3,3,3,3,3,3,3,3,5,8,6,4,7,3,3,3,3,3,3,3,12,3,3,3,3,3,3,4,4,2,3,5,3,4,7,3,3,3,3,3,3,4,3,3,3,3,3,3,3,4,3,3,6,4,3,4,2,2,2,5,3,3,3,3,3,5,4,4,4,4,7,6,8,9,2,2,2,2,3,3,3,5,7,2,3,3,8,7,7,2,2,8,5,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,8,8,7,7,6,10,6,9,7,11,4,6,8,8,7,8,4,5,5,5,3,3,11,8,9,6,6,8,7,4,4,7,8,7,2,2,3,3,3,3,4,3,3,3,3,3,3,3,3,7,2,2,5,3,3,2,3,3,3,3,3,3,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,12,5,5,3,3,3,5,10,12,6,15,4,6,6,7,14,9,3,3,3,3,3,8,2,2,3,5,3,3,3,3,3,3,8,8,8,7,5,8,4,6,11,2,2,6,7,3,3,2,9,8,5,5,3,3,3,5,5,7,7,6,6,10,6,8,6,8,9,7,4,4,4,4,7,6,6,7,7,10,9,8,11,8,3,3,3,3,3,4,4,2,3,3,3,3,3,7,6,2,5,6,7,6,4,8,9,11,2,2,3,3,3,3,3,3,3,2,2,5,3,3,3,3,3,9,9,6,4,8,7,7,5,9,8,6,8,7,8,5,5,5,5,5,3,3,3,16,8,7,7,7,8,7,7,7,7,9,6,9,6,10,7,7,7,6,10,8,9,11,11,8,4,4,10,8,8,6,9,6,11,8,8,8,15,7,8,9,5,3,3,3,3,3,5,11,2,2,3,8,9,10,3,2,2,2,2,2,2,3,6,4,2,2,3,3,3,3,3,3,3,3,3,3,4,4,2,3,3,3,3,3,3,3,11,5,3,3,3,3,3,3,3,3,6,7,4,4,2,3,3,3,3,3,3,3,3,12,7,4,12,4,6,5,4,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,2,3,3,3,3,3,3,3,3,4,4,11,10,6,4,6,10,8,3,3,3,3,3,3,3,3,5,4,4,4,2,2,2,2,2,2,2,2,5,3,4,4,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,5,5,5,5,5,5,3,3,3,3,3,3,3,3,7,8,8,7,13,12,10,10,8,8,7,7,9,12,11,6,6,8,8,9,7,7,7,10,15,10,4,4,4,4,4,11,8,8,9,7,9,14,14,12,2,2,2,2,2,2,2,3,3,3,3,3,12,5,5,5,11,10,7,9,3,8,7,3,15,13,11,4,4,2,2,2,19,7,5,5,3,3,3,3,3,3,3,5,22,18,6,14,17,4,4,19,16,18,2,3,3,2,3,2,3,3,6,4,2,3,3,2,5,3,3,3,3,3,3,3,9,9,2,3,2,2,2,3,3,3,5,7,14,7,7,12,9,13,6,11,6,10,9,7,7,8,12,12,8,8,8,10,7,7,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,5,8,10,7,8,11,8,12,9,4,7,7,9,13,2,3,3,3,3,3,3,2,3,3,3,1,2,2,3,3,3,3,3,3,5,2,2,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,4,4,4,3,2,3,3,3,3,5,2,2,2,2,5,5,5,5,3,3,3,3,3,3,3,3,3,7,7,7,7,7,8,8,8,8,8,12,9,8,8,9,8,6,17,6,6,6,8,8,6,6,6,6,6,6,6,6,6,6,6,7,4,4,8,8,9,9,9,7,7,7,7,7,7,7,9,9,9,7,8,8,8,10,7,13,10,8,9,3,3,5,13,3,3,3,3,3,7,7,6,6,10,13,11,11,8,8,9,8,9,9,10,10,10,11,10,10,13,13,16,15,11,12,9,9,10,9,11,10,9,9,14,7,8,3,10,7,7,3,2,2,2,5,3,3,3,3,3,3,3,3,3,3,3,3,6,7,2,2,3,3,3,3,3,3,3,3,4,11,6,7,4,6,2,2,3,3,3,1,3,3,3,3,3,3,6,4,4,2,2,2,3,3,3,3,4,4,6,6,6,6,5,4,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,9,11,6,10,9,12,7,7,11,14,9,7,12,3,3,7,12,11,12,7,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,9,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,11,5,5,5,5,5,5,5,5,11,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,3,3,3,5,5,5,5,5,5,5,5,5,5,5,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,5,5,5,5,5,5,5,5,5,5,5,5,5,3,10,3,3,3,11,3,5,9,11,8,12,14,9,7,8,7,7,11,11,7,7,10,9,8,10,9,7,7,7,7,7,7,8,8,7,11,8,8,8,7,7,10,8,7,13,12,7,17,10,8,8,11,7,11,11,14,7,11,7,8,6,9,20,8,7,9,16,7,10,6,11,10,8,9,7,16,11,11,9,8,9,8,8,8,11,8,15,8,8,9,7,8,8,11,10,7,5,7,10,10,15,7,7,7,8,7,8,8,10,11,10,10,10,11,11,7,8,6,8,8,8,10,6,8,6,6,7,8,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,16,6,15,6,7,11,11,7,9,10,11,13,10,6,16,8,10,12,11,6,6,6,6,6,6,6,10,6,10,7,7,7,7,11,7,11,6,6,6,6,6,6,17,7,7,6,6,12,22,6,6,6,6,6,8,6,6,6,6,7,6,6,5,6,6,8,11,6,9,14,11,9,11,7,7,8,6,6,6,8,10,9,6,6,6,6,9,7,6,6,6,6,6,15,6,4,4,4,6,4,17,8,11,6,6,9,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,6,6,6,6,10,6,10,6,6,6,6,12,8,6,6,6,6,6,6,6,6,6,9,6,6,6,6,18,6,6,6,8,9,10,7,8,9,10,11,7,13,6,8,8,6,6,14,7,7,7,7,10,7,14,9,6,6,9,15,9,7,14,6,11,14,13,7,12,8,7,7,7,7,7,12,7,10,9,16,6,8,6,5,17,6,8,10,4,6,4,10,15,17,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,4,4,11,7,4,4,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,19,17,6,10,11,6,6,6,6,18,6,6,11,4,4,4,5,6,6,6,9,5,6,4,6,6,4,6,6,6,6,10,6,6,4,6,6,10,6,10,6,6,6,6,11,6,6,10,6,6,8,6,6,6,8,6,11,4,11,9,10,9,11,4,8,4,11,12,7,9,8,6,7,7,8,12,12,11,13,10,11,7,7,7,9,7,11,10,7,7,7,16,11,10,11,17,9,9,8,8,7,7,7,9,7,7,7,14,7,13,9,11,10,14,10,10,12,11,10,7,10,5,14,8,8,8,9,7,8,7,7,9,8,7,8,7,7,7,7,7,7,7,11,8,10,8,7,8,14,11,8,9,9,9,8,24,10,10,12,7,7,15,11,8,8,12,11,8,9,9,7,8,9,10,11,10,11,7,12,7,7,11,9,8,14,13,12,8,11,10,8,8,7,7,14,9,10,8,9,11,7,14,8,8,13,8,8,12,7,10,14,14,11,9,10,9,9,7,7,11,11,13,9,13,5,5,5,7,9,5,11,12,14,8,7,7,11,10,9,7,8,8,7,10,11,11,5,5,7,5,5,5,7,7,15,7,7,8,7,15,12,12,10,7,8,7,11,7,7,7,23,11,8,8,11,10,7,8,11,7,19,7,7,6,9,9,9,11,3,4,7,8,6,6,4,10,8,2,2]),edgeChild=new Uint16Array([0,0,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,12,1,1,1,1,1,17,1,1,1,12,1,12,1,12,13,1,1,1,1,12,1,12,1,1,1,1,1,14,21,1,1,1,1,1,1,1,19,12,1,1,1,1,1,1,1,20,1,1,1,16,18,1,1,15,1,1,1,1,12,1,1,1,1,1,1,22,1,1,1,1,12,1,1,1,1,1,1,1,1,12,12,12,12,12,12,12,12,12,12,12,12,1,24,25,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,1,12,12,12,12,1,32,0,0,0,1,1,1,1,35,34,1,1,1,1,1,33,1,1,1,1,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,0,0,0,0,39,40,0,0,0,0,12,1,1,12,1,1,1,1,43,44,44,44,43,44,43,43,45,44,43,44,43,43,43,43,43,43,45,43,43,43,43,43,43,44,46,46,44,43,43,43,43,43,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,49,51,49,49,49,51,49,50,49,52,49,50,50,49,49,49,50,52,50,52,49,50,50,12,54,54,53,55,50,52,49,49,47,48,56,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,59,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,66,1,12,1,1,65,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,77,0,0,0,0,0,0,0,0,0,0,0,0,0,75,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,12,1,1,1,1,88,1,90,1,1,1,1,1,1,1,1,93,1,1,1,1,1,1,1,1,1,1,1,1,0,1,96,96,1,1,12,1,99,1,1,1,1,1,1,1,97,1,98,1,100,1,1,1,1,1,101,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,109,110,1,1,1,1,1,1,112,112,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,120,121,1,1,1,1,1,1,1,1,1,1,1,1,1,121,1,1,1,1,1,1,1,1,1,1,121,1,1,1,1,1,1,1,1,1,125,122,124,119,1,123,1,1,113,1,1,1,1,116,1,126,1,1,1,1,1,1,118,1,107,1,108,1,12,127,105,1,111,1,1,1,1,1,106,114,1,12,12,12,117,115,1,1,1,1,1,1,0,0,0,0,1,12,12,1,1,1,1,1,12,133,1,1,1,1,1,1,1,1,1,1,1,12,135,1,1,1,1,1,1,1,1,136,137,12,12,134,132,44,44,139,49,49,138,141,140,1,1,0,0,0,0,0,0,0,0,0,0,0,0,144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,142,0,0,0,0,1,0,143,131,1,0,1,12,12,1,1,1,1,1,0,0,0,0,0,0,0,1,147,146,20,1,1,12,12,1,20,12,12,1,1,1,1,1,133,1,1,151,1,1,1,1,152,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1,1,135,1,1,151,1,1,1,1,152,1,1,133,1,1,1,151,1,1,1,1,152,1,1,133,1,1,1,1,1,1,1,1,133,1,1,1,1,1,1,1,1,1,1,1,159,1,1,1,151,1,1,1,1,1,152,1,1,159,1,1,1,1,1,1,1,1,1,1,133,1,1,1,1,151,1,1,1,1,152,1,1,1,133,1,1,151,1,1,1,1,163,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1,166,1,1,159,1,1,1,1,1,151,1,1,1,1,1,152,1,1,159,1,1,1,1,1,151,1,1,1,1,1,152,1,153,157,157,12,1,12,165,1,1,1,1,1,157,157,157,153,1,1,1,156,157,160,164,1,1,1,1,156,156,1,1,155,153,153,156,169,155,169,1,1,167,1,155,154,156,1,1,1,1,156,1,158,1,1,1,12,1,161,1,161,1,1,1,161,160,162,168,155,153,1,1,1,1,1,1,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,172,171,172,171,171,171,171,173,173,171,172,171,172,171,171,12,1,12,12,12,12,1,12,12,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,193,1,1,1,1,12,199,200,201,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,150,1,1,1,1,1,1,1,1,1,1,1,196,1,1,1,184,1,209,1,1,1,207,1,1,204,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,12,1,1,1,1,1,1,1,1,176,190,1,1,1,186,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,182,1,1,1,1,1,1,1,191,1,1,1,1,195,1,1,1,1,170,1,1,189,1,1,1,192,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,180,1,12,1,1,12,1,1,1,1,183,1,1,1,188,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,208,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,194,1,1,1,1,1,12,1,1,1,1,1,1,1,1,175,12,1,1,1,178,12,1,1,1,1,1,1,1,198,1,1,1,1,1,1,1,1,1,1,177,1,1,1,1,1,1,203,1,1,1,181,1,1,1,187,1,12,1,1,12,1,1,1,1,1,1,1,1,1,1,191,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,174,1,1,1,1,1,1,1,1,1,1,185,1,1,1,1,1,1,1,1,1,1,1,205,1,1,1,1,1,1,1,1,1,1,12,1,206,1,1,12,1,1,1,1,179,1,1,1,185,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,197,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,12,1,1,1,1,1,1,1,1,1,202,1,1,12,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,219,0,0,0,0,0,220,0,0,0,0,0,0,1,12,1,1,1,224,1,1,1,0,225,222,223,1,1,1,1,1,1,230,1,232,1,1,1,1,1,1,1,1,1,1,1,228,1,1,1,1,1,234,1,1,12,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,233,1,1,1,12,1,1,1,1,229,1,1,1,227,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,231,1,1,1,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,240,13,1,1,1,12,12,237,238,1,1,1,1,239,1,1,12,1,1,1,1,1,1,1,241,1,1,12,16,1,1,1,1,1,1,242,1,1,1,12,12,1,1,1,1,1,1,242,12,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,255,255,1,0,0,0,0,0,1,12,0,0,0,0,0,0,0,0,171,260,261,1,12,1,1,1,1,12,263,1,1,262,1,1,265,1,1,1,1,1,1,1,1,0,1,1,1,269,270,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,12,1,0,1,0,0,0,0,1,0,1,0,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,12,0,281,0,0,282,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,12,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,59,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0,306,0,0,0,0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,12,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,324,324,325,324,0,185,1,1,13,320,1,318,0,0,0,0,0,0,0,321,1,1,326,1,204,1,1,1,1,319,1,316,1,322,1,314,1,323,1,315,1,1,1,1,1,1,1,12,1,1,1,1,12,317,317,1,1,1,184,1,1,12,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,12,1,1,1,1,313,1,0,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,329,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,265,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,369,369,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,1,337,348,1,1,336,371,1,342,1,1,334,366,1,1,352,333,338,1,1,1,345,376,354,1,1,1,1,1,1,355,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0,364,368,0,0,78,1,1,0,362,339,375,340,343,350,1,365,0,1,0,78,359,357,1,0,0,1,1,1,0,0,0,0,378,1,1,349,1,78,1,0,1,1,1,381,1,0,0,78,356,0,1,335,1,1,1,0,1,1,358,1,0,1,1,1,0,1,383,346,1,1,0,1,0,0,374,0,1,1,1,78,367,1,1,363,360,1,1,1,1,1,1,1,1,1,1,1,341,1,1,1,1,1,1,1,1,1,1,1,373,0,78,1,1,1,1,0,1,1,1,1,1,1,0,0,1,1,377,1,1,1,0,0,380,0,0,0,1,353,1,0,78,379,1,0,0,0,0,382,1,1,0,0,1,0,1,0,351,0,347,0,1,1,1,0,1,1,0,370,344,372,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,1,397,397,1,1,12,12,1,397,1,1,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,409,1,1,0,1,1,1,1,204,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,427,427,1,1,0,0,314,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,439,1,438,1,1,1,1,1,1,1,1,1,443,1,12,12,1,1,1,1,1,12,1,1,1,1,451,1,1,1,453,1,1,1,1,1,1,1,1,1,1,450,1,445,1,1,1,1,432,1,1,1,1,1,1,1,1,446,12,1,1,1,1,452,1,1,1,447,441,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,314,1,430,1,1,12,449,1,1,314,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,434,1,1,1,1,1,1,1,1,1,1,1,452,1,1,1,1,314,1,448,1,1,1,442,436,1,1,1,1,1,437,1,454,440,1,1,1,1,1,435,1,1,1,1,1,1,1,1,1,431,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,444,1,1,1,1,1,1,1,1,1,1,1,1,433,1,1,1,1,1,1,1,219,455,1,1,1,1,1,12,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,0,0,460,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,12,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,464,0,464,464,464,464,464,464,464,0,464,464,464,464,464,1,464,464,464,0,464,464,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,469,468,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,473,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,466,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,467,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,475,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,464,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,465,0,0,476,471,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,470,0,0,0,0,0,0,0,0,0,0,0,0,0,464,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,465,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,464,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,474,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,12,1,1,1,1,1,1,1,1,1,1,1,1,486,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,198,198,1,490,1,1,1,489,1,1,1,1,485,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,487,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,491,1,1,488,1,1,1,1,1,1,1,1,369,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,492,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,503,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,1,0,1,0,0,12,1,505,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,12,12,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,1,0,0,0,0,0,0,0,1,0,0,1,0,1,1,1,1,0,0,0,1,0,0,0,1,59,1,1,12,12,12,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,524,1,1,1,1,1,1,1,525,1,1,1,1,1,1,1,523,1,1,12,1,527,238,1,1,12,12,1,1,12,1,12,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,531,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,537,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,131,1,12,542,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,106,1,1,12,1,1,1,12,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,547,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,143,1,1,1,227,1,1,12,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,1,571,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,219,1,325,1,1,1,1,1,1,1,1,1,0,0,576,1,1,1,1,0,578,0,78,0,577,0,1,1,1,0,1,1,1,1,1,1,12,0,0,0,0,1,0,0,0,0,0,0,584,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,580,580,0,583,581,580,580,580,580,580,585,580,580,589,580,580,580,580,580,580,580,580,580,580,586,583,580,580,583,580,580,580,580,580,580,580,580,580,580,580,580,580,581,580,580,580,580,580,587,580,580,580,580,580,580,0,0,0,1,588,1,1,1,1,582,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,12,593,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,12,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,12,1,1,12,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,95,64,278,304,408,533,0,4,67,235,253,280,305,331,385,410,0,497,517,534,595,9,0,60,87,395,406,426,574,0,495,516,530,610,0,30,6,0,459,498,600,559,69,0,7,283,254,386,461,413,536,78,596,0,575,307,415,463,9,104,286,504,6,30,0,309,78,388,78,481,10,6,130,247,273,0,611,507,0,562,0,63,6,6,250,94,2,429,396,407,594,0,6,0,6,284,102,6,560,499,538,0,462,387,271,285,8,70,103,597,541,389,310,298,416,145,73,288,545,508,599,563,332,327,477,6,74,148,11,0,248,520,546,564,512,550,569,609,36,6,259,293,330,302,217,30,526,552,217,41,215,264,294,303,403,420,479,272,0,72,561,0,400,414,297,78,246,78,0,579,544,502,290,418,78,390,384,0,0,0,9,554,570,216,0,421,404,529,514,572,613,84,217,42,295,393,422,568,0,509,291,274,78,214,79,28,387,30,6,391,328,301,602,590,522,549,511,0,257,80,30,402,419,0,30,423,0,218,591,515,9,405,424,217,247,85,221,592,573,556,480,425,394,249,226,86,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,411,0,0,0,0,0,0,0,0,81,0,128,0,0,83,548,0,0,0,0,0,0,0,27,0,551,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,411,0,0,0,0,501,0,256,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0,0,0,0,0,0,615,0,0,0,0,0,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,392,0,0,0,482,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,0,0,0,0,0,0,493,0,0,0,0,0,0,401,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0,0,0,0,0,0,0,0,0,0,513,0,0,0,0,0,0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0,0,0,0,268,279,0,0,0,0,0,528,275,0,0,0,0,0,0,0,0,0,0,0,0,0,510,0,0,0,0,0,0,0,0,0,0,0,456,0,0,0,312,0,0,0,0,0,0,252,0,0,0,0,0,0,23,0,0,0,0,567,0,0,0,0,598,519,0,0,0,0,243,0,0,0,0,0,0,0,0,0,478,0,0,0,0,0,61,0,0,0,266,57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,245,0,0,0,0,0,277,608,0,71,0,0,0,0,0,0,0,0,0,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,149,0,276,0,0,0,0,0,0,566,0,0,0,0,0,0,521,0,0,0,0,0,0,0,0,0,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,0,500,0,0,0,0,0,553,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,82,0,0,0,0,0,0,0,0,0,0,0,0,484,0,483,0,0,0,0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,457,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,287,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,535,0,0,0,0,0,0,0,0,296,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,236,0,0,0,0,0,0,0,0,0,0,83,0,604,0,0,0,0,0,0,0,0,0,0,0,0,244,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,607,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,518,0,0,0,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,496,0,612,0,0,428,0,0,0,0,0,0,0,0,0,0,0,0,399,0,0,0,543,0,92,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,29,91,0,0,0,0,0,0,0,0,0,0,0,0,289,0,0,0,213,0,0,0,0,0,0,557,0,0,0,0,129,0,0,0,0,0,558,0,0,0,0,0,0,0,411,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,311,0,0,0,0,0,5,0,0,0,0,0,0,0,299,0,0,0,0,0,0,0,0,0,0,0,0,0,532,0,0,0,412,0,0,398,0,0,0,0,0,0,601,0,0,0,539,0,0,89,0,540,0,0,0,0,0,0,0,0,0,0,506,458,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,267,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,616,0,0,0,0,0,555,0,0,0,0,0,0,0,0,0,0,300,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,0,0,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,621,621,621,621,621,621,620,622]),labelText=`orgmilcomschnetedugovdrrformsfeedbackofficialaccoorgmilschnetgovmagazinemediaunioncargopilotgroupcaarespressworksaerodromeworkinggroupair-traffic-controlaircraftaccident-preventioneducatormarketplaceambulanceinsurancecateringairportrepbodyenginesoftwaremodellingair-surveillanceconsultingchartertrainermaintenanceservicesdesignflightskydivingfreightassociationstudentgroundhandlingdgcafuelclubtaxicrewshowballooningexpresstraderbrokerauthoragentsairtrafficjournalistsafetyconsultantmicrolightaccident-investigationparachutingequipmentproductionfederationrecreationscientistnavigationengineertradingglidingleasingresearchpassenger-associationentertainmentparaglidinghangglidingaerobaticrotorcraftemergencycertificationgovernmentaeroclubexchangelogisticschampionshiphomebuiltcouncilconferencecontrolairlinecivilaviationjournalorgcomnetedugovcoorgcomnomnetobjofforgcomnetuwukiloappsframerorgmilcomnetedugovcoradioorgcomnetcommuneedogpbcoitgvorgedugov*spreviewfrontendrelayononstagingupid*mtls*privatelinktypedreamdeveloperbravemochawindsurfaivenmirenupsunwnextbegetngrokclerkwale2bwebcsbrunputerflutterflowspawnbaseshiptodaymagicpatternsnetlifyondigitaloceanrailwayhostedclaudehasurabotdashvercelgithubluyanigadgetreplitcloudflaretelebitedgecomputeevervaultexponyatnoopencrpplxzeaburwasmerframerzeropsconvexmedusajsspritesonherculeseasypanelstreamlitsnowflakemesserliloginlinehackclubcodepennorthflankbase44corespeedleapcellngrok-freeclerkstagelovableon-fleek*us-west-3ap-south-2us-central-2us-central-1eu-central-1ap-south-1us-west-2us-east-2eu-north-1ap-north-1us-west-1us-east-1*rcloudintsegorgmilcomgobbetnetintedugovturmusicasenasamutualcoopip6uriurnin-addre164homeirisgovdixdaemoncloudnssthwien*inexexkunden4accogvormymyspreadshop4lima2ixortsinfofuturecmsfuturehosting12hpprivfuturemailinglima-cityfunkfeuer123webseitednshomemelmyspreadshopcloudletswasantqldvicactnswtascatholicwasaqldvictasidwasantozqldorgcomvicasnactnetedugovnswtasconfcomairflowlambda-urltransfer-webappairflowtransfer-webapptransfer-webapptransfer-webapp-fipstransfer-webappeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1privatenotebookstudiolabelingnotebookstudionotebooknotebook-fipslabelingnotebookstudionotebook-fipsnotebookstudio-fipsnotebook-fipsnotebookstudionotebook-fipsnotebookstudioeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2experimentsus-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1onrepostsagemakercopporgmilcompronetintedugovbiznameinfoshoprsorgmilcomnetedugovbrendlyresolvenzauscotvstoreorgcomnetedugovbizinfoidacaicoittvorgmilcomschnetedugovinfocloudezproxyacmymyspreadshopkuleuvenwebhostingtransurl123websitecloudnsinterhostsolutionsddns5476103298edgfacbmlonihkjutwvqpsryxzbarsycoororgcomedumyftpno-iporxcloud-ipfor-somemmafanfor-morewebhopselfipjozidyndnscloudnsdscloudfor-thefor-betteractivetrailcoeconorestooteorgcomeconeteduassurmoneyafricaarchitectesrestaurantloisirstourismavocatsinfoagrounivcoorgcomnetedugovtvdeportesaludtksatorgmilcomwebgobnetinteducienciaboliviarevistacooperativaempresanombreindustriamusicapatriamedicinademocraciapoliticapuebloindigenaplurinacionalarteblogwikiinfoagrotransportenoticiasprofesionalacademiaeconomiaecologiamovimientotecnologianaturalsimplesitecepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesmscepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesms*biaamfmtcmptvfeirasampajampanatalbelemananiradiog12medindfndbmdtrdthepoaggfjdfdefinfenflegsegongengcngorgzlgslglogppgmillelqslcimcomnomadmjabimbbibbsbabcrectecsjcetcpscpvhudieticriapipsiecnbiorioecogeoteoodoproatoartfstmatvetdetbetnetcntnotfotgrueduajuespappreptmpemparqsrvadvdevgovntrturagrjorfarjusmusdesvixxyzcozfozslzbhzmaringasantamariacampinagrandegoianiasorocabafloripasaobernardocuritibaboavistarecifeaparecidasaogoncasalvadorcuiabamorenamacapalondrinacontagemsocialfortalmaceioleilaoosascoriobranconiteroi9guacutcheblogflogvlogwikitaxicoopmanauspalmascaxiasjoinvillebaruericampinassantoandreribeiraoriopretoweorgcomnetedugovv0windsurfshiptodaycloudsitecoaccoorgnetgovofmilcomgovmediatechzacoorgcomnetedugsjgovmydnspenfnlabnbmbgcbcqconcontnuyksknsmyspreadshopno-ipawdevboxbarsyonidatemfuinabusavinstanceseceuguukussryzespawncsxcloud-ipmyphotosfantasyleaguetwmailcleverappsscrappingccwucloudnsftpaccessgame-serverccgovobjectsrmalpgcust*svcalp1aeappenginermalpgmyspreadshop4lima2ixsquare7cloudscale123websitefirenet12hpflowgotdnslinkyard-cloudcloudnslima-citydnskingobjectstorageedaccogoorusorgcomnetinteduaéroportxn--aroport-byaassogouvcomilgobgovcloudnses-1eu-west-1us-east-1euvipit1eurarubait1s3lbwebsites3websiteru-spbru-mskelasticcsrunstnukukcaukusnl-ams-1fr-par-1fr-par-2functionsnodess3ddlwhmrdbfnck8sifrs3-websitecockpitscblmgdbdtwhkafkpubprivs3ddlwhmrdbk8sifrs3-websitecockpitscblmgdbdtwhkafks3ddlrdbk8sifrs3-websitecockpitscblmgdbdtwhkafkk8sscalebookpl-wawfr-parnl-amsbaremetalsmartlabelinginstancesdechk2kuleuvenlaravelvoorloperurownoxazapscwhstgrvaporonline-serverobservablehqelementorantagonistreclaimjoteluluencowaydiademjelasticmatlabmagentositetrendhostingaxarnetperspectajenv-arubajelejoteravendbemergenttrafficplexconvexkeliwebserveboltbegetcdnstaticson-rancherprimetelonstackitunison-servicesdnshomelinkyardbarsyjelecloudnscocomnetgovmycn-northwest-1cn-north-1s3s3-accesspoints3-websites3s3-accesspointrdsdualstacks3-deprecatedemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspoints3s3-accesspointrdsdualstackemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicn-northwest-1cn-north-1cn-northwest-1ebcomputeelbcn-north-1airflowcn-northwest-1cn-north-1oncn-northwest-1cn-north-1amazonawssagemakeramazonwebservicesdirectasgdsdhehahljlnmhbacscahqhshhihnlnynsnmofjbjzjxjtjhkcqtwgsjssxnxjxgxxzgz網絡网络公司orgmilcomnetedugovxn--55qx5dcanva-appsxn--io0a7iquickconnectcanvasitekhsjxn--od0algmyqnapcloudsrvrlessclustersrealtimestorageleadpagescarrdcrdorgmilcomnomnetedugovhidnssupabaserdpareplmypiumsoxmitotaplpagesfirewalledreplitowodevwebview-assetsvfswebview-assetss3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9eu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1s3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackanalytics-gatewayemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstacks3-deprecateds3-websites3-object-lambdaexecute-apis3s3-accesspoints3-websites3-accesspoint-fipss3-fipss3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipss3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9vfss3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9eu-west-3ap-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1us-northeast-1ap-southeast-1me-south-1af-south-1ap-south-1ap-southeast-7us-west-2eu-west-2ap-east-2us-east-2ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1mrapaccesspoints3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3eu-west-3ap-south-2eu-south-2computes3-ap-northeast-2elbrdss3-ap-east-1s3-sa-east-1s3-us-gov-west-1s3-eu-central-1s3-ca-central-1eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3s3-website-us-west-2s3-website-eu-west-1s3-external-1eu-central-1me-central-1ca-central-1il-central-1s3-us-west-1s3-eu-west-1s3-website-sa-east-1s3-website-ap-southeast-2ap-northeast-1ap-southeast-1s3-us-west-2s3-eu-west-2me-south-1af-south-1eu-south-1ap-south-1us-west-2eu-west-2us-east-2s3-website-ap-southeast-1s3-1s3-globals3-ap-northeast-3eu-north-1airflowap-southeast-2s3-us-gov-east-1s3-fips-us-gov-east-1s3-me-south-1s3-ap-south-1ap-northeast-2s3-website-us-west-1ap-southeast-5s3-eu-north-1s3-ap-southeast-1s3-website-us-gov-west-1compute-1s3-eu-west-3us-gov-west-1s3-website-ap-northeast-1us-gov-east-1s3-fips-us-gov-west-1s3-website-us-east-1s3-ap-southeast-2ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1s3-us-east-2s3-ap-northeast-1authauthauth-fipsauth-fipseu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1rframeservicesbuilderstg-builderdev-builder*ociocpocsdemoinstanceeu-west-3eu-south-2ap-southeast-3ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1previeweu-4us-4us-1eu-1us-2eu-2us-3eu-3appspaasrag-cloudrag-cloud-chjcloudjcloud-ver-jpcdemonodebalancermembersipeuxvsoncillaocelotonzayalilynxsphinxfentigercustomercaracalo365cloudstaticxendevapp001testcode-builder-stgplatformmediasiteprojedrydpagesjsu2u2-localx0desazacncoitrueu4uhkukgrbrushatenadiarymyspreadshopfrom-flfrom-wvwebspace-hosttheworkpchatenablogcursorusercontentservesarcasmapplinzisakuratanwixsiteappchizigiizeis-into-carsdnsiskinkyadobeaemcloudis-a-therapistpgfogmyvncdojinis-an-actress1kappfldrvkozowqa2jpnmexprgmrfirewall-gatewaydynnscafjsfbsbxooguyxnbayfrom-gawoltlab-demois-a-anarchistwiardwebteaches-yogadattowebtb-hostinglive-websiteservegamegotpantheonfrom-nhsubsc-payfrom-ohvipsinaappfrom-cadyndns-officehomelinuxfrom-mahercules-appservebbsstreakusercontentfrom-okfrom-wyfastly-terrariumis-a-llamaqualyhqportalserveexchangeon-vaporvivenushopciscofreakgrayjayleaguesmetaaiusercontentfrom-iais-a-libertariansaves-the-whalestaveusercontentyolasiteoperaunitepoint2thisis-a-catererclaudeusercontentlinodeusercontentfrom-vagithubusercontentsells-for-lesshosteurcanva-appsplaystation-cloudddnsfreefrom-pafrom-prfrom-waddnskingoutsystemscloudhotelwithflightmydattois-a-nascarfanmydbserverminiserverdamnserverservehumouris-a-playerfrom-nvfrom-nmemergentagentgentappsamplifyappfrom-kyis-an-accountantnfshostserveircfrom-akpythonanywherestackhero-networkpostman-echolikescandydyndns-mailobservableusercontentserveftpfreeboxosfrom-utcdn77-storageamazonawsneat-urldyndns-serverlinodeis-a-teacherfrom-vtgleezemythic-beastsus1-pleniteu1-plenitla1-plenitpaywhirlservecounterstrikejdevcloudhealth-carereformis-into-animegoogleapisis-a-painterafricaisa-hockeynutatmetais-an-actora2hostedis-a-democratdatadetectest-le-patrondigitaloceanspacesis-a-designeris-a-hunterlinodeobjectstemp-dnsissmarterthanyoufrom-arsimplesiteevennodetownnews-stagingis-a-liberalgooglecodejelasticservemp3qualyhqpartnerdyndns-free1cooldnsest-a-la-masiondrayddnsdynuddnsfrom-orfrom-miis-a-bloggerfrom-himydobisscanvacodeis-an-engineerest-a-la-maisonupsunappdevinappswafflecellmyasustorwpenginepoweredfrom-ctservep2psame-appmyshopblocksthingdustdatalikes-piediscordsezis-with-thebanddev-myqnapcloudlpusercontentis-leetshopitsite3utilitiesis-a-personaltrainersinaappladeskis-a-cheflogoipselfipbase44-sandboxnospamproxyalibabacloudcsmesswithdnsauthgearappsiamallamawithgooglelutrausercontentmochausercontentframercanvasmytabitdyndns-homew-credentialless-staticblitzcpserverdiscordsaysis-a-nurseappspotatlassian-isolated-3premotewdfrom-mtwixstudiocode0emm180rmyactivedirectoryawsappsmytuleapdnsabrpolyspaceqbuserrenderbuiltwithdarkboutirgotdnsabrdnsdopaascanva-hosted-embedawsglobalacceleratorhomesecuritypcmyiphostditchyouripclever-clouddyndns-ipon-aptibleis-a-musiciansecuritytacticsappspaceusercontenthomeunixstrapiappsame-previewcf-ipfsmycloudnaselasticbeanstalkis-certifieddontexistkasserverik-serverdrive-platformatlassian-3pfirebaseappherokuappawsapprunnerbarsycenteris-a-cubicle-slaveservehttpmyshopifyis-a-guruquicksytessiiitesorsitesmagicpatternsappis-a-cpameteorappfrom-wiis-a-rockstarbumbleshrimpdattolocalreadthedocs-hostedfrom-rifamilydsdyndns-picsplesknsbplaceddnsaliasdynaliasdyndns-remotedoomdnsip-ddnsblogdnsis-a-doctorroutingthecloudamazoncognitobarsyonlinedsmynasddnsgurucloudflare-ipfsdeus-canvasfrom-idsmushcdnpagespeedmobilizerdyndns-at-homeunusualpersonhosted-by-previderis-a-republicandyn-o-saurstreamlitappworkisboringonthewificprapidqualifioappis-uberleetis-slickgetmyipwpdevcloudtypeformdyndns-at-workgentlentapismynascloudw-corp-staticblitzfrom-ingeekgalaxyservebeerfrom-mdonrenderspace-to-rentaivencloudappspacehostedwafaicloudcodespotblogspotatlassian-3p-us-gov-modfrom-ndfrom-msis-a-techieis-a-studentcustomer-ociis-a-photographerdurumisfrom-ksmassivegriddyndns-wikiis-an-entertaineris-a-hard-workermysecuritycamerafrom-mnrackmazedyndns-blogis-a-bulls-fanwritesthisblogfreemyipsimple-urlfrom-sdreservdauthgear-stagingest-mon-blogueuris-into-gamesrice-labsxtooldevicesakurawebis-an-anarchistoraclecloudappsdyndns-worksells-for-urhcloudfrom-dcfastvps-serverwpmucdnis-a-geekscrysecfrom-txis-into-cartoonsmodelscapetrycloudflarelocaltonetstreak-linkbalena-devicesfrom-njforgeblocksfreebox-oswebadorsitefrom-ncdoesntexisthobby-sitestreaklinkshomesecuritymacownprovidertuleap-partnersdattorelaywphostedmailalpha-myqnapcloudservequakeis-a-socialistservehalflifepivohostingdynuhostingquipelementsw-staticblitzdyndns-webfrom-deproject-studyaliases121is-not-certifiedhercules-devis-a-financialadvisorservepicsis-a-greenloseyouripfrom-ilwithyoutubemwcloudnonprodwiredbladehostingdnsdojofrom-tnpixolinomyqnapcloudis-an-artisthostedpiis-a-landscaperauiusercontentoaiusercontenton-forgeis-a-conservativedreamhostersnet-freaksapps-1and1is-goneencoreapifastly-edgefrom-nesalesforcefrom-scdeployagentoraclegovcloudappsfrom-alis-a-lawyercechirevultrobjectsstufftoreadisa-geekddnsgeeklovableprojecttry-snowplowfrom-moblogsyteis-a-bookkeepernogmyforumravendbmyboxdeelementoredsaacficogoorinforgcomgobnatneteduidstoreorgcomnetintedudevnomepublorgcomneteduathgovtestscalculatorspaynowinfoquizzesresearchedcloudnsfunnelsassessmentsjscaleforcetmacltdorgmilcompronetgovbizpresseklogesrsccloudcustomfltusrcloude4corealmgovmunicontentproxy9metacentrumdyndyndyndnsdynpagespages-researchitionoccustomercomymyspreadshopipv64diskussionsbereich4limacomrub2ixfirewall-gatewayddnssspdnsbarsykeymachinesquare7myhome-serverspeedpartnercommunity-proschuldockxenonconnectgünstigliefernbwcloud-os-instancedyndnssecmy-routerxn--gnstigliefern-wobin-butterl-o-g-i-nisteingeekin-dslin-berlinin-brbfuettertdasnetzleitungsenin-vpnlcube-serverdyn-ip24logoipdyn-berlinruhr-uni-bochum12hpgoipsrvdnsfruskygit-repossvn-reposinternet-dnsgünstigbestellenhome-webserverxn--gnstigbestellen-zvbbplacedheimdnscosidnswebspaceconfiglima-citydyndns1istmeinvirtualuserschulplattformmy-gatewayddnsseclebtimnetztest-iservmein-iservvirtual-userhome64iservschuletaifun-dnstraeumtgeradeschulserverdynamisches-dns123webseitednshomehs-heilbronndnsupdaterbssgraphicdwadpdwdaepeweaawapaafpfwfabwbpbacwcpcciwebuserapiobjectsidsiskospockkimodorikerbonesteamsparisjanewaypicardglobaltarpitreedpikekiraworfsulukirkarchertuckerhackercanarywesleystagingprereleaset3r2lpbravepanelngrokiservstglclcrmerpflypagesbarsyvivenushoplocalcertlocalplayerbearbloggatewaydeno-stagingis-not-ais-a-goodbotdashvercelmocha-sandboxplatter-appreplitgithubpreviewworkersinbrowserevervaultis-ahrsndenoxmitmodxmyaddrstorageapipayloadgrebedocruncontainersstgstagelclstageloginlineis-a-fullstackcodepenleapcellngrok-freeis-coolstoragewebharemediatechlibp2pdiscourseimaginecomyspreadshopstoreregbiz123hjemmesidefirmcoorgcomnetedugovsldorgmilcomwebgobartnetedugovtmorgpolcomsocartnetedugovassoagrondiscoodontk12medcuegyecpaabgengorgmilgalsaltulcomadmesmgobpubdocmonfindgnriouioproartlatvetnetfotedulojgovntrturibrbarxxxofficialbasechefprofmktgpsictechinfoarqtcontdentrrpppsiqgit-pagesritmedfieorgcomlibprieduaipgovriikmeactvsportorgmilcomscieunnetedugovnameinfopintouchtawktotawkmyspreadshoporgcomnomgobedu123miwebcomputeorgcomnetedugovbiznameinfocognito-idpeusc-de-east-1onjelasticnxaspdnsbarsydirectwpdeuxfleurstransurldogadoprvwcloudnsamazonwebservicesdnshomeuserpartycokoobinmkmfidemopaasdymyspreadshopalandkapsiikixn--hkkinen-5wacloudplatformdatacenterhäkkinen123kotisivuidacorgmilcompronetedugovbiznameinforadioorgcomneteduuserexperts-comptablestmmyspreadshopgretaprdcomnomynhccifbxoshuissier-justicenotairesaeroportfreeboxoson-webavocatassoportgouvkdnschirurgiens-dentistes-en-franceavouesfbx-os123sitewebveterinairechirurgiens-dentistespharmacienchambagrimedecinfreebox-osdediboxgoupilemszicpyicpvicppleysheezypagesedugovcnpyorgcomcybllcpvtnetedugovtnxonlineschooldaemond6atcopanelorgnetplybotdashstackitkaasorgmilcomnetedugovbizmodltdorgcomedugovcoorgcomneteduappwriteacorgcomnetedugovcloudtranslateusercontentorgcomnetedumobiassoorgcomnetedugovbarsysimplesitediscourseindorgmilcomgobneteduorgcomwebnetedugovguaminfonxhra教育敎育網絡网絡组織組織网络網络组织組织公司政府個人个人箇人ltdorgcomincneteduidvgovxn--uc0ay4axn--55qx5dxn--mk0axixn--io0a7ixn--uc0atvxn--zf0avxxn--lcvr32dxn--od0algxn--wcvs22dxn--gmqw5axn--od0aq3bxn--mxtq1mxn--ciqpnxn--tn0agxn--gmq050iorgmilcomgobneteduiservwp2tempurlmircloudfreesitewpmudevmyfastgadgetcloudaccessjelehalfboltfastvpsemergenteasypanelopencraftizcombrendlynamefromrtpersoadultmedorgpolrelcomproartnetedufirminfoassoshopcoopgouvtmcomediahotelforumvideosportorgsexagrargameslakaseroticaerotikatozsdereklamcasino2000filmsuliinfoboltshopprivnewsszexcityutazasjogaszkonyveloingatlaneacaicogoormyᬩᬮᬶmilwebschnetkopbizzonedesaponpesxn--9tfkymyspreadshopgovmytabittabitorderravpageaccok12idforgnetgovmuniltdplcaccotttvorgcomnetmeca6g5gpgamubacaicniocoukuptverdruscsdelhiindorgmilcomwebnicfingenpronetintedugovresbizbiharbarsyinternetbusinessschooltravelsupabasealumnigujaratfirminfoaeropostbankcoopindevscloudnsno-ipbarsybarrell-of-knowledgebarrel-of-knowledgensupdategroks-thisdnsupdatefor-ourknowsitalldvrcammittwalddynamic-dnsv-infowebhopselfipdyndnshere-for-moreilovecollegemayfirstforumzcloudnsmittwaldservertypo3servergroks-theeusekd1cdndyndnsidrawsainaueuapjpusstagemocksysdevicesclientcustreservdcustdevdisrecprodtestingcobeebyteutwenteboxfusebravepstmndedynngrokorgmilcomnomnetedugovqcxqzzbarsythingdustmo-siemensrb-hostingfh-muenstergitbookbluebitecloudbeesusercontentnodeartkiloappsforgerockdarklangresinstagingapigeebubbleb-datascryptedhypernodedappnodepantheonsitegitlabgithubkeeneticvirtualservercleverappshostyhostingon-rioedugitticketstelebitwixstudioon-k3sicp0icp12038jeleqotolairbubbleappsmyaddrstolosmyrdbxwebflowdrive-platformbeagleboardhasura-applolipopdefinimavaporcloudmusicianwebflowtestazurecontainerresindevicereadthedocsloginlineeditorxmoonscalesandcatsbasicserverwebthingsbrowsersafetymarkbeebyteappbitbucketidaccovistablogorgschnetgovxn--mgba3a4f16axn--mgba3a4fraarvanedgeايرانایرانjclaspeziapdudcefegelemeperetevebacanatavaparasabgagfgogrgpgalclblimfmrmcbmbvbfclcmcvcrcpcchlimifibicivipirisimncnbnanenrnpntnnolomobocoaogorosopotoptvtatctbtmtltotpusulunutpspapaqsvpvvvtvavvrtrsrprgrfrcrbrarorkrvstsssbscsmsispzczbzbozen-suedtirolmyspreadshopxn--bulsan-sdtirol-nsbxn--valledaoste-ebbtrentinoaltoadigetrentin-sued-tirolxn--forlcesena-c8axn--forl-cesena-fcbxn--bozen-sdtirol-2obtriestetrentinsuedtiroltrentino-s-tirollecceudineaostesienaparmaluccapaviagenoapaduaaostamonzaabruzzoternirietiturinmilanbozenlaziofermoleccocuneonuoropratola-speziavdataaligfvgpugmolcalcamlomumbsicpmnvenvaoedugovabrsarmaremrbastoslazibxosfirenzetrentinosüdtirolval-d-aostavalle-aostamessinacremonaravennatoscanatrentin-suedtirolbolognacalabriaurbinopesarofriuli-v-giuliaogliastraxn--valle-aoste-ebblaquilaandriatranibarlettasyncloudxn--valle-d-aoste-ehbaostavalleyvalled-aostatrentino-alto-adigevallee-d-aostexn--balsan-sdtirol-nsbpistoiasicilialucaniacataniaiserniaperugiabresciaveneziagorizialiguriaimperiabulsan-suedtirolbalsan-suedtirolbarlettatraniandriaxn--trentino-sdtirol-szbforlì-cesenatuscanyvallée-d-aostemantovavallée-aostecasertapiemontevalleaostaval-daostafriulivgiuliatrevisoforli-cesenavalléedaosteferrarapescaravald-aostatrentino-altoadigefriuli-vegiuliavallee-aostecarboniaiglesiastarantomediocampidanovalleedaostetrentinosud-tirolcampobassotrentinsüd-tiroltrentinosüd-tirolmonzabrianzatrentino-südtirolxn--trentino-sd-tirol-c3bpotenzacosenzavicenzaemiliaromagnavenicefrosinonemarchepordenonetrentinosued-tirolvaresemolisevalléeaostefriuli-veneziagiuliabasilicatalatinaanconasavonaveronamodenabiellabolzano-altoadigepugliafoggiaumbriatrentino-stirolgenovapadovamateranovararagusapiacenzatrentinostirolvalleeaostetempio-olbiasudsardegnatrentinsudtirolmassa-carrarafriuliveneziagiuliatrentinosuedtirolandria-barletta-tranitrapanixn--cesenaforl-i8amaceratacaltanissettaascoli-picenobrindisicarraramassacagliaririmininapolivibo-valentiachietibulsan-sudtirolbalsan-sudtiroltrentino-a-adigebulsanbalsaniglesiascarboniamilanotorinoteramodell-ogliastraarezzotrentinoalto-adigerovigotrentovenetoiglesias-carboniatrentino-sud-tirolaltoadigereggio-emiliareggio-calabriasardegnatranibarlettaandriapiedmontxn--sdtirol-n2amedio-campidanotrentino-süd-tirolfriuli-vgiuliafriuli-ve-giuliaromeennaromapisa32-b16-b64-blodiastibarineencomonaplesforlicesenailiadboxosalessandriasicilytrani-barletta-andriaxn--trentin-sdtirol-7vbpesarourbinotrentinsued-tirolcesena-forliforlìcesenaemilia-romagnamonzaebrianzaxn--trentinsdtirol-nsbtrentinos-tiroltrentinsüdtirolvalledaostaolbia-tempiocampidanomediovibovalentiasassarivalle-daostalombardysud-sardegnafriulivegiuliareggioemiliamonzaedellabrianzaalto-adigevercellitrentin-sudtiroltraniandriabarlettatrentino-sudtirolascolipicenobozen-südtirolfriulive-giuliaflorencexn--cesena-forl-mcbcarbonia-iglesiasaosta-valleycarrara-massadellogliastratrentinoa-adigexn--valleaoste-e7apesaro-urbinoxn--trentinosdtirol-7vbxn--trentin-sd-tirol-rzbxn--trentinsd-tirol-6vbtrani-andria-barlettatrentin-süd-tirolxn--trentinosd-tirol-rzbgrossetomonza-e-della-brianzasüdtirolreggiocalabriatrentinoaadigetrentin-südtirolverbano-cusio-ossolafriuliv-giuliaverbaniacampaniatrentino-aadigefriulivenezia-giuliasardiniaandriabarlettatranibarletta-trani-andriacatanzarooristanourbino-pesarocesena-forlìvalle-d-aostacampidano-medio123homepagesiracusatempioolbiasuedtirollombardiaavellinocesenaforlìtrentinofriuli-venezia-giuliabozen-sudtirolandria-trani-barlettabulsan-südtirolbalsan-südtirolmonza-brianzabolzanotrentino-sued-tirolbellunosalernolivornocrotonesondriodnshometrentinsud-tirolmassacarraratrentin-sud-tiroltrentino-suedtirolviterbobergamocesenaforliolbiatempiopalermobeneventoagrigentoofcoorgnetfmaitvphdengorgmilcomschnetedugovperagrikanieasukehandachitatokaiaisaikonanoharuamaobuhigashiuraowariasahiinuyamatobishimaiwakurashitarainazawatoyonegamagorimihamatoyotataharakariyayatomioguchikomakimiyoshinishiotokonamekiyosuchiryutoyohashiokazakiisshikikasugaikotakiratoeianjotogofusosetohazutsushimashinshirotakahamanisshinshikatsuhekinantoyokawaichinomiyatoyoakeodateogataakitaikawakyowahonjoogayurihonjonoshirokamiokakatagamimitanegojomeyokotekosakadaisenkazunonikahohonjyomoriyoshimisatohappoukamikoanihachirogatahigashinarusesembokufujisatokitaakitaitayanagiowanitakkomutsutsurutahirosakigonoheoirasetowadamisawanohejiaomorishingohiranairokunohehashikamitsugarushichinohehachinohenakadomarisannohekuroishisakaeisumiasahiotakiinzaiabikomatsudoyachiyomutsuzawakujukuriomigawakashiwatoganemihamanaritasakuranagaramobarahanamigawachoshishiroichoseikozakishisuikatorimidorichonankyonanfuttsuonjukufunabashinagareyamanodasosatakochuotohnoshourayasukimitsuyokaichibayotsukaidosodegauratateyamakamagayayokoshibahikariyachimatakatsuuratomisatokisarazukamogawaichikawanarashinoichinomiyashimofusaminamibososhirakoichiharaoamishirasatoikatahonaiainansaijoseiyoiyoozuuwajimaniihamanamikatamasakiuchikokihokutobetoonshikokuchuomatsuyamaimabarikamijimakumakogenyawatahamamatsunosabaeikedaobamasakaifukuiohionotsurugamihamawakasaminamiechizeneiheijikatsuyamatakahamaechizensoedaukihaomutaokawanishiogoribuzenonojosueumiokiotochikugosasagurisaigawamizumakishinyoshitomikurumekurateyamadakasuganakamamiyamanogatatakatahakataiizukakawaratagawakasuyaashiyainatsukimunakataminamitsuikishonaikurogifukuchikeisenhigashimiyakoshinguyukuhashiokagakiyamekogaongausuikahotohochuotoyotsumiyawakadazaifuhisayamatachiaraiyanagawanakagawahirokawachikujochikushinochikuhochikuzennamieotamaokumashowateneiiwakikoorinangoononishigoshimogoomotegomishimafukushimaasakawakagamiishishirakawaiitatefutabahiratayugawahanawakitakatakawamatakunimiyabukibandaihigashihironoyamatomiharuyamatsuriaizubangedatesomaaizuwakamatsuyanaizuaizumisatonishiaizuizumizakikitashiobarataishinkaneyamakoriyamainawashirotanagurafurudonosamegawasukagawaishikawatamakawaikedaogakitaruiginanenahashimahichisonakatsugawaibigawashirakawamizunamiminokamomitakekawauesekigaharatomikasakahogikitagatayamagatatajimianpachimotosuyaotsukakamigaharahidakanisekitokigujominogodoyorogifukasamatsutakayamawanouchihigashishirakawakasaharashimonitatsumagoichiyodakannakanrashowameiwakiryuotaoratomiokafujiokaitakuranaganoharahigashiagatsumatakasakishibukawaminakamikatashinatsukiyonokawabanumataannakaoizumimidorishintoisesakiuenoyoshiokakusatsutakayamanakanojonanmokutamamuratatebayashimaebashiotakekaitadaiwahongofuchukuietajimashobaramiharahatsukaichihigashihiroshimamiyoshikumanokurenakasakaseraseranishiasaminamifukuyamashinichionomichiosakikamijimajinsekikogentakeharaotobenanaeikedatohmaozoraobiraabirakyowaeniwataikibibaisharirebunerimohiroooketootarupippunishiokoppechitosefurubirahakodateshiranukakitahiroshimakushiroobihironanporoiwamizawaniikappukunneppufukushimanakasatsunaitoyourakuromatsunaiakabirakamisunagawashibechaurakawakamifuranonakatombetsuasahikawashimokawakayabeokoppebiratoriabashirisaromaatsumanumatahidakabifukamukawamikasahorokanaitoyotomisarufutsuhigashikawaishikarikitamiyoichiesashiiwanaitomariminamifuranoakkeshifuranotoyakoyakumootoineppushikaoishiraoinemuronayorohaboroashorobihororishirifujiutashinaihokutotakasuebetsuurausuassabukikonaishimamakinaiedatetoyabieinikiesanuryuoumuteshikagarikubetsuashibetsukimobetsuaibetsutobetsusobetsuembetsushimizuchippubetsurishirihokuryuhoronobeshintokutsubetsushibetsuhonbetsumombetsutsukigatakuriyamakoshimizushiriuchikutchanmurorannoboribetsukamishihorowassamushinshinotsukembuchiwakkanaikamoenaikiyosatotakinoueshikabesunagawafukagawanakagawatakikawakamikawahigashikagurahamatonbetsumatsumaemoseushirankoshishakotanimakanemashikeotofuketomakomaisandatambaitamiawajikasaiasagoshisoonoakoyashirotoyookaminamiawajiinagawafukusakitakasagokamigorikasugaharimayokawaashiyahimejiakashitaishiaogakisannantakinosumototakarazukanishinomiyashingugoshikinishiwakiyokatakaaioimikisayoyabukawanishiamagasakisasayamashinonsenkakogawaichikawakamikawatatsunotsukubaiwamaogawaasahisakaitokaioaraiitakobandodaigosuifuinaamikasumigaurakashimaomitamayachiyoshimodatetomobetoridehitachinakainashikisakuragawakasamayawaramoriyahitachiomiyanamegatayamagatahitachikamisuushikutakahagiibarakitonekoganakasowayukimihojosomitoryugasakishimotsumafujishirotsuchiurachikuseihitachiotashirosatotamatsukuriuchiharashikahakuinanaotsubatawajimakahokukawakitatsurugikaganominotosuzuuchinadakomatsuanamizunakanotohakusannonoichikanazawaiwateshiwafudaikawaimoriokaofunatohanamakikuzumakikitakamininohekunoheyamadayahabasumitaichinosekitanohatahiraizumirikuzentakatajobojiotsuchihironomiyakoiwaizumikarumaiichinohenodakujitonooshushizukuishifujisawamizusawakamaishikanegasakimannoutazukotohiraayagawazentsujihigashikagawauchinomikanonjisanukimarugamemitoyotakamatsutadotsunaoshimatonoshoakuneamamiizumihiokiyusuikinkoisasookouyamanakatanekagoshimakanoyaisenkawanabeminamitanemakurazakitarumizunishinoomotematsumotosatsumasendaioimatsudaayaseebinamiurazushinakaiodawaraiseharasagamiharahakoneaikawakaiseiatsugitsukuihadanoyamatoyamakitazamaoisochigasakininomiyayokosukakamakuraminamiashigarafujisawasamukawakiyokawahiratsukayugawaraokawaumajikochitsunootoyoakiinonishitosayasudahidakamiharasakawaniyodogawahigashitsunokagamigeiseisusakiotsukinaharisukumomurototosakamiochitoyotosashimizumotoyamanankokunakamurakitagawayusuharaogunichoyoukiasoutoozugyokutoamakusamifunetakamoriyamagaminamataminamiogunikikuchisumotoyamatonagasumashikiaraokumamotokamiamakusanishiharayatsushiroayabeseikasakyoideineujinakagyokameokakyotangokyotanabekyotambaminamiyamashiroyamashinatanabeyawatawazukaminaminantanmiyazuhigashiyamafukuchiyamakitamukokamojoyokizumaizuruujitawaraoyamazakinagaokakyokumiyamakawagoeinabeshimameiwaasahitaikiudonoisetsukisosakikuwanamihamamiyamasuzukatamakimisuginabarikumanokomonominamiisewataraitobakiwatakikihotadomatsusakayokkaichikameyamaureshinoishinomakishichikashukuohirataiwaosakizaohigashimatsushimashikamaiwanumashibataogawaraonagawakawasakiseminemarumoriminamisanrikukakudamuratawakuyatomiyanatoriwataritagajomisatotomekamirifushiroishimatsushimayamamotoshiogamafurukawahyugaebinotsunosaitoayakushimanobeokakitauramiyazakitakazakigokaseshiibamimatashintomikunitomikitakatakobayashikawaminamitakaharukijotakanabemiyakonojonishimeranichinankitagawakadogawamorotsukakisofukushimaminamimakisakaeobuseikedaogawamiasaokayaasahiotakiotarichinoinaomichikumakomaganechikuhokukaruizawayasuokaooshikaikusakaminamiaikitogakushimatsukawakawakamitateshinatakamorikitaaikishiojirimiyadahakubaiizunaiijimaiiyamamiyotasuzakayasakatoguraookuwanagawaminowahirayayamagataminamiminowafujimiomachisakakitakaginaganonakanosakuhokomoronagisoshinanomachiwadauedaiidaharasuwatomiachiaokianankisosakunozawaonsenagematsutakayamashimosuwamatsumotoyamanouchinakagawamochizukiazuminotatsunoobamaomuraseihiunzenosetofutsuikichijiwanagasakiisahayahasamisaikaikawatanasasebohiradokuchinotsugototogitsutsushimashimabarashinkamigotomatsuurayamazoekashibaikomakawaitenrioyodosangokoryoudaojiikarugayamatokoriyamatenkawakatsuragikurotakikawakamimiyakemitsuetakatorikamikitayamayamatotakadahegurishinjokanmakisakuraitawaramotogoseoudanarasoniandokawanishishimoichihigashiyoshinokashiharashimokitayamanosegawayoshinomintsivorytopazsakuragehirnsumomoaseinetopalmail-boxmokurenyoitamuikaojiyagosensanjoaganomyokoseiroagaomishibataniigatanagaokamurakamiuonumayuzawakariwatagamitainaitsunanminamiuonumatochioyahikojoetsuseiroukamosadoizumozakitokamachiitoigawasekikawakashiwazakitsubamemitsukekokonoesaikiusukibeppuusahimeshimakunisakihasamataketatsukumihitaoitahijikusuyufukujukamitsuebungoonobungotakadaibaraniimibizentsuyamaokayamakasaokahayashimayakagemaniwaakaiwamisakishinjotamanotakahashikibichuowakesojanagishookumenannishiawakurakurashikiasakuchisetouchikagaminosatoshotomigusukunakagusukuyaeseizenaurumaiheyaaguniogiminanjokinminamidaitokitanakagusukuyonaguniokinawaishigakikunigamiurasoekadenataramahiraraginozataketomishimojizamamitonakiitomanhigashimotobuyonabarugushikamionnanahanagohaebarukumejimakitadaitonakijinnishiharayomitanginowantokashikiishikawaikedasuitaminohizuminishisakaikananabenodaitoosakasayamayaokishiwadatadaokakaizukatondabayashichihayaakasakakumatorikadomasayamahigashiosakashijonawatehirakatataishimisakitajirihannansennankatanotoyonominatosettsuhigashiyodogawaibarakinosekitachuohigashisumiyoshifujiiderakashiwaraizumiotsutoyonakamatsubaramoriguchiizumisanoshimamototakatsukineyagawahabikinotakaishikawachinaganoyoshinogarikamiminearitaouchiimarihizenogikashimaariakekiyamafukudomikitagatakitahataomachigenkaikanzakinishiaritakyuragisagataratosutakushiroishikaratsuhamatamakouhokukawagoeyoshidasatteogoseirumaasakaurawaogawaniizaomiyayoriiotakishikihonjooganohannohanyuinasaitamaokegawaarakawayoshikawayokozehasudasayamahidakafukayachichibuiwatsukiryokamiyoshimikamiizumifujimiwarabiranzanmiyoshiminanoyashiosakadosugitomisatohigashichichibutodasokakukiyonokazoshiraokakasukabekounosukawajimatsurugashimamiyashirokitamotohatoyamamoroyamahatogayakumagayakawaguchinagatorokamisatomatsubushinamegawatokigawakamikawafujiminohigashimatsuyamakoshigayatokorozawas3isk01isk02ryuohkoseikonanaishorittotakashimamaibarahikonetorahimenishiazaikokagamokotoyasuotsukusatsunagahamamoriyamatoyosatotakatsukinotogawaomihachimanhigashiomiakagiunnanizumogotsuamayatsukakakinokimatsuehamadamasudahikawahikimiokuizumoyasugiyakumomisatotamayuohdahigashiizumookinoshimanishinoshimatsuwanoshimaneshimadafujiedayoshidashimodagotembaiwataatamikosaiyaizuitoizumishimahaibaramakinoharaomaezakikawanehonkannamisusonohigashiizufukuroinumazukawazufujiaraishizuokahamamatsushimizuizunokunimatsuzakimorimachiminamiizunishiizukikugawakakegawafujikawafujinomiyaujiietsugaoyamayaitaohiranikkoashikagakuroisokanumasakurashioyakarasuyamamotegiichikaikaminokawatochigihagamokanogisanobatonasumibunasushiobaranishikatautsunomiyaiwafunemashikoshimotsukeohtawaratakanezawaitanokomatsushimatokushimaichibaminamiaizumiwajikikainanmiyoshinarutomimamugiananmatsushigesanagochishishikuinakagawamachidachiyodakomaefussainagitaitochofufuchuomeotahigashiyamatotoshimaokutamaaogashimakodairaedogawaarakawahachiojishinagawatachikawashibuyasuginamihinodekiyosesumidaoshimanerimamitakahamuraadachinakanomizuhobunkyomegurominatokoganeihigashikurumekokubunjihigashimurayamamusashimurayamatamakitahinochuokotokatsushikakouzushimaogasawaraakishimakunitachishinjukusetagayamusashinohachijoitabashiakirunohinoharachizunanbukotouramisasawakasayonagokogehinoyazutottorinichinansakaiminatokawaharaoyabetairainamiasahinantoimizufuchutakaokakurobeyamadajohanatoyamatonaminyuzenfunahashinakaniikawanamerikawaunazukitogahimiuozufukumitsutateyamakamiichiiwadearidayuasainamitaijikatsuragiaridagawatanabemihamahidakakainankiminomisatoshingushirahamakamitondayurakozakoyagobokitayamawakayamakudoyamahashimotokushimotokozagawahirogawakinokawanachikatsuurarsuseroeoishidasagaeoguniasahinagaitendonanyoobanazawanishikawasakataohkuratozawamikawamamurogawayamagatafunagatatakahatashonaishinjokahokuiideyuzakawanishitsuruokakaminoyamayamanobeshiratakamurayamanakayamakaneyamahigashineyonezawasakegawamitouubeyuuabushimonosekitabuseoshimatoyotaiwakunihikarishunannagatohagihofukudamatsutokuyamashowadoshitsurunanbukoshukaiminami-alpsnirasakikosugeotsukioshinohokutominobuyamanashifuefukichuokofuichikawamisatoyamanakakonakamichitabayamanishikatsuranarusawafujikawahayakawafujiyoshidafujikawaguchikouenohara長野京都岐阜大阪三重群馬千葉滋賀佐賀奈良adednelgaccogogror秋田愛知高知埼玉沖縄栃木熊本岩手青森山梨新潟島根鳥取長崎香川宮城石川大分宮崎茨城山口兵庫山形徳島広島福島福岡岡山富山静岡愛媛福井東京xn--4it168dhatenadiaryxn--vgu402ckawaiishophatenablogcocottenamaste北海道penneehimeiwateversestabachibashigagonnagunmapermahaccaakitaosakauh-ohblushkochiaichifukuikuroncapooitigohyogotokyokyotopunyuthickcheap0t00g00j0mie2-ddaapyawjg0amfemsubxiiboomoobutchueekpgwrgrherskrboyrdyupperunderflierchipsmydnsheavyangryhippygirlyrulez神奈川鹿児島和歌山bambinaxn--nit225kokayamasaitamaxn--k7yn95exn--1lqs03nsapporoparasitelolipopmcxn--efvn9sniigatafukuokatokushimafukushimahiroshimakagoshimafakefurokinawaxn--8pvr4ucoolblogxn--0trq7p7nnkawasakinagasakimiyazakichilloutxn--8ltr62kxn--klty5xpeeweezombiecutegirlxn--rny31hxn--uuwu58axn--ntso0iqx3axn--djrs72d6uytoyamanikitanyantakagawamimozanagoyaboyfriendxn--2m4a15egreaterchowderegoismyamagatafashionstorexn--elqq16hxn--pssu33lsendaimiyagixn--rht27zpecoriaomorisaloonwatsonvivianxn--djty4knobushipigboatnaganopinokoxn--f6qx53asadistvelvetsecretxn--5js045dchicappayamanashiibarakidigickgirlfriendxn--1lqs71dmongolianxn--c3s14mxn--qqqt11mtochigixn--5rtq34kparallelo0o0mondkobesagabonadecaoitanarafoolkilldecimainhiholomosblokilociaoundopupugifutankcrapflopnooroopsmodsholyjeezstripperpepperbittershizuokaxn--rht3dkitakyushureadymadeicurusversusmatrixxn--rht61ehungryfloppygloomycrankyhandcraftedlittlestarxn--klt787dxn--kltx9awhitesnowsunnydaytottorilovepoptheshopbuyshopxn--5rtp49cxn--d5qv7z876cwebaccelxn--kbrq7oxn--4pvxsxn--1ctwolovesickkumamotocatfoodxn--tor131oyokohamawakayamatonkotsuxn--ehqz56nxn--uist22hxn--6btw5axn--kltp7dyamaguchifrenchkisspussycatxn--4it797kxn--uisz3gbabybluexn--zbx025dnetgamersxn--7t0a264ckanagawaxn--6orx2rishikawaxn--ntsq17ghalfmoonschoolbusjellybeanxn--mkru45iusercontentlolitapunkxn--32vp30hsakurastoragehokkaidoshimanecandypopbabymilksupersaleweblikeraindropbackdropwebsozaikikirarahateblodaynightmeneacsccogoormobiinfoaeusxxorgmilcomnetedugovorgcomnetedugovbizinfotmprdorgmilcomnomedugovassnotairespresseassocoopgouvveterinairemedecinpharmaciensorgnetedugovtraorgcomedurepgovmeneperekgacscaiiocogoitoresmshsseoulbusanulsandaeguc01milvkimmvchungnamjeonnamjeonbukeliv-dnsgyeonggijejueliv-cdnincheondaejeongangwongyeongbukgwangjuchungbukgyeongnameliv-apicoeduindorgcomembnetedugovorgmilcomnetedugovjcloudorgcomnetintedugovperbnrinfocooyorgcomnetedugovipfscanvamypepw3sstorachakeeneticjoinmcinbrowserdwebcyonnftstoragemyfritzaemewphlxachotelltdorgcomwebsocschngonetintedugrpgovassnomgacsccoorgnetedugovbizinfo123websiteidorgmilcomasnnetedugovconfidmedorgcomplcschnetedugovaccoorgnetgovpresstmassoirseproxaccosoundcasthoptocraftvp4c66orgnetedugovitsmcdirmyboxbarsyedgestacksynologylogintonohostwebhopdiskstationi234tcp4hoocgroknoipprivmydsddnsdnsforlohmustransipdscloudfilegear-sgbrasiliafilegearframerbarsybarsyonlinecoprdorgmilcomnomedugovinforgcomnetedugovnameacprorgcomartnetedugovpresseinfoassoinstgouvorgnycedugovbarsydscloudjuorgcomnetedugovminisiteaccoororgcomnetgovorgmilcompronetintedugovbizmuseumnameinfoaerocoopaccoorgcomnetintedugovbizcooporgcomgobneteduorgmilcomnetedugovbiznameaccoorgmilneteduadvgovcoorgcomnetaltgovforgotherhiskeeneticispmanagernomassoprod5476132eastasiacentraluswesteuropewestus2eastus2rucdnwest1-usfra1-desandboxjls-sto1jls-sto3jls-sto2aglobalabglobalsslmapprodfreetlsmapvpslon-1lon-2ny-1fr-1sg-1ny-2paassnwebpaashostingjelasticnordeste-idcsocuserpagescwebfileblobservicebuscoreatlricnjsjelasticwebsitestoragesezagbinruhuukjptsmyspreadshopmynetnameakamaiorigin-stagingfrom-coipv64dynv6cdn77serveblogadobeaemcloudhicamsprytdnsupno-ipownipde5ovhicpfirewall-gatewaysytesmypsxbarsyusgovcloudapimyamazemyradwebakamaihdsaveincloudfastlylbfrom-lasubsc-paysquare7in-the-bandblackbaudcdnhomelinuxoninfernoctfcloudservebbsdns-dynamiccloudfrontakamai-stagingipifonyham-radio-opsenseeringclickrisingcommunity-profrom-nylocalcertgrafana-devedgesuite-stagingcloudflareanycasteating-organicatlassian-devmydattofeste-iplocaltotorprojectknx-serveredgekeycloudflareglobalcloudyclustercasacamserveftpakamaized-stagingakamaiorigindns-cloudmyeffectboomlabotdashbuyshousestwmailhetemlazure-mobilein-dslthruhereredirectmedynuddnsbouncemesupabaseluyanicloudappakamaicloudfunctionsdebiannhlfanpgafanstatic-accessin-vpnmysynologymafeloappudohomeftptrafficmanagersiteleafseidatmemsetcloudflarecloudaccesskeyword-onazure-apiis-a-chefdoes-itgets-itwebhopselfiphomeipkicks-assedgesuitewindowsserver-ontunnelmolemydissentscrapper-sitecloudflarecnuni5srcfggffiobbzabchrsndenodynuopikddnsvpndnsakadnselastxkinghostvps-hostfastlyhomeunixazureedgeshopselectdontexistmyfritzcloudjiffyalwaysdatasells-itsquaresbroke-itazurefddattolocalat-band-campmeinforumfamilydsazurestaticappsdefinimabplaceddnsaliasdynaliasnow-dnsblogdnsroutingthecloudendofinternetdsmynasakamaiedgemymediapcadobeio-staticakamaiedge-stagingakamaihd-stagingddns-ipprivatizehealthinsurancelive-onkrellianschokokeksmassivegridmysecuritycamerarackmazeserveminecraftfrom-azis-a-geekakamaizedmoonscaleoffice-on-theusgovtrafficmanageradobeioruntimeedgekey-stagingreserve-onlinechannelsdvrdnsdojousgovcloudappcdn77-sslapps-1and1podzoneazurewebsitesdynathomescaleforceyandexcloudvusercontentisa-geekcdn-edgescoaemalcesappwriteazimuthtlonarvonoticeablestorecomwebrecnetperotherfirminfoartslgdloncogoiltdorgmilcolcomplcschgenngonetedugovbiznamefirmmobiacincoorgmilcomnomwebgobnetintedubizinfocomyspreadshopdemongovtransurl123websitehosting-clusterkhplaycistrongsnesosvalervålerxn--vler-qoaossandeheroysandeherøybøboheroyherøyxn--hery-iraxn--b-5gavalerbøboxn--b-5gasandesandexn--hery-iraxn--vler-qoavålerhåreålaahavaofsfvfhlolnlalrlhmfmtmahcostntbuåstrmreigersundmyspreadshopgálsáeidsvolltingvollgildeskalflorøvadsøvardøvanylvenxn--bhccavuotna-k7astrandaxn--kvnangen-k0axn--sknland-fxaxn--mosjen-eyarakkestadhyllestadnannestadvevelstadvaapstenordre-landsondre-landsøndre-landtjieltexn--vrggt-xqadsør-aurdalsor-aurdalheradstordmoldefordeførdeseljefedjeryggehemnexn--krehamn-dxasognegranesøgnebrynetjomevallebykletokkegiskedovretjømehobølvoldasaudatolgasømnaviknadønnasomnadonnatranafrananesnaraumasmolatrænafrænalesjasmølaørstaorstahitrafloraaukraloppafrøyarissasnasahalsagalsaromsaraisaráisafroyasnåsagronghobolfjelltydalårdalardalaskimharamkraanghkekråanghkesorumbarumhurumbærumsørummodumsálátbálátfrognbjugnvåganvagangulenskienløtenlotenstrynvefsnxn--merker-kuaskaunsveiobømlobomloskjåkvardoflorovadsosalatbalatsálatklæbuklabuselbubarduulvikskjakklepprisørxn--nttery-byaeflåeidflahofmilgolholsellomskifetvikdepvgsfhsaskerrisorhamarasnesåsnesrørosrorosxn--slat-5namasoynaroyvaroyluroydyroyaskoyradoyandoyrodoymeloyradøyandøyrødøymeløyaskøylurøydyrøymåsøyværøynærøyhoylandethøylandetdivtasvuodnalørenskoglorenskognesoddtangenxn--tjme-hraxn--smla-hraxn--stjrdal-s1aunjargalillehammerunjárgaxn--hamary-fyadavvenjargaxn--bearalvhki-y4a123hjemmesidegjerdrumxn--brnnysund-m8acxn--tnsberg-q1axn--mlatvuopmi-s4axn--snsa-roaxn--skierv-utaxn--brum-voatysfjordkvafjordeidfjordkvæfjordsongdalenmjondalenmjøndalenxn--gls-elackragerogáŋgaviikagangaviikasørreisasorreisasør-varangersor-varangerxn--risr-iraskiervaxn--frna-woaxn--trna-woakvinesdalleksvikleirvikrøyrvikroyrviksvelvikvenneslaevje-og-hornnessandnessjøenmarnardalvindafjordsandefjordenebakksnillfjordullensvangxn--trany-yuabrønnøysundnamsskoganaustevollxn--stjrdalshalsen-sqbnord-aurdalnord-frontrøgstadtrogstadgrimstadflakstadgjerstadxn--sandy-yuaxn--leagaviika-52bnore-og-uvdalvegarsheixn--rlingen-mxaxn--ggaviika-8ya47hvegårsheikarlsoykvitsoymasfjordenhamaroyinderoyosteroydavvenjárgasauheradguovdageaidnuxn--vre-eiker-k8abronnoysiellakkrødsheradkrodsheradkvinnheradbrønnøyxn--mtta-vrjjat-k7afxn--lrenskog-54akvitsøyvárggátkarlsøyosterøyinderøyhamarøybronnoysundxn--aurskog-hland-jnbbahccavuotnabáhccavuotnagiehtavuoatnastor-elvdalmidtre-gauldalxn--gildeskl-g0akarasjokevenassixn--bievt-0qaxn--yer-znalebesbynessebyxn--hbmer-xqamalselvmålselvxn--unjrga-rtamøre-og-romsdalmore-og-romsdalhareidmelandørlandorlandstrandålgårdsolundalgardafjordåfjorddielddanuorrikautokeinoxn--stre-toten-zcbskodjeaejriestangeliernebamblestokkefauskesnåasesnaasekongsvingerlangevagberlevagxn--flor-jrahattfjelldalostre-totenøstre-totenvestfoldxn--mely-iraálaheadjualaheadjunordreisaxn--troms-zuaxn--lgrd-poacporsangerflatangerstavangerleikangerbremangersamnangergieldakarasjohkaxn--rdy-0nabfrostautsirasnoasatromsaxn--sr-aurdal-l8aflekkefjordjølsterjolsteraremarkhedmarknååmesjevuemienaamesjevuemiexn--vard-jrarollagmeråkermerakerorskogørskogxn--bdddj-mrabdákŋoluoktaxn--osyro-wuaaknoluoktatrysilskjervøymandaljondalbindalrindalmeldalsuldalorkdalsigdalalvdallærdalhurdalsirdalverdallerdallardaloppdalåseralaseralhadselkragerødivttasvuotnaoverhallasteinkjerxn--hnefoss-q1askedsmokorsettromsøxn--dyry-iravestre-totenmuseumxn--sandnessjen-ogbrahkkeravjufylkesbiblbájddarbajddarxn--laheadju-7yarennesøyxn--koluokta-7ya57hxn--hgebostad-g3aleirfjordstorfjordbalsfjordbåtsfjordbatsfjordmuosátbievátloabátkárášjohkanøtterøyxn--mjndalen-64anordkappláhppilahppialstahaugsiljanverranrøykenroykenhaldenlyngenbergenhortenhønefosshonefosstroandinbeiarnvarggatosoyroosøyrotromsoidrettmuosatbievatruovatloabatvoagattynsetnessetxn--indery-fyaskánitskanitraholtråholtxn--ystre-slidre-ujbandebusarpsborgbearduxn--karlsy-fyahordalandjorpelandjørpelanddeatnuringsakersør-odalsor-odalxn--slt-elabringerikeaudnedalnittedalnissedalhemsedalslattumsurnadalxn--blt-elabelverumstjørdalnaustdalhjartdalgjøvikfyresdalhasviknarviklarvikgjovikmalvikgamviklenvikporsgrunnstjordalengerdaldrobakdrøbakxn--msy-ula0hvestvagoyxn--vgan-qoaxn--ryken-vuaxn--lten-graxn--stfold-9xaxn--hpmir-xqaxn--lury-iramálatvuopmimalatvuopmitysværkirkenesbirkenesmoskenesbáidárxn--fjord-lraxn--rdal-poabahcavuotnabáhcavuotnaxn--frde-gralindåsbearalvahkixn--hobl-iraráhkkerávjuxn--loabt-0qavågåáltábodøsundlundraderådeetnetimeholeauregrueoddavagavegaranatanaarnasolasulaaltalekafusavangbergkvamåmliamlibokntinnroangranosenoslobodorøstroststatåmotamotivguprivøyeroyerliermossvossxn--nvuotna-hwalusterlunnermarkerhábmerhabmerhvalerfjalerxn--rholt-mratysvarbaidarfitjargaularhápmirhapmirmelhusfosnesøksnesoksnestysneshemnesevenesflesbergeidsbergtonsbergtønsberglindasxn--sndre-land-0cbnamsosxn--srum-graøystre-slidreoystre-slidrevestre-slidretrondheimbalestrandxn--langevg-jxaaustrheimxn--skjk-soavagsoyaveroysandoykarmoyfinnoytranoyvestbytranbysykkylvenxn--hyanger-q1aspjelkavikandasuoloxn--fl-ziaxn--drbak-wuastathellexn--sr-varanger-ggbtelemarkxn--bhcavuotna-s4axn--porsgu-sta26fčáhcesuolocahcesuoloakrehamnåkrehamnsandøykarmøyfinnøytranøyvågsøyaverøynamdalseidxn--lesund-huabadaddjaxn--vegrshei-c0axn--btsfjord-9zagildeskålporsanguxn--trgstad-r1anávuotnanavuotnahammerfestxn--sgne-graxn--brnny-wuacibestadharstadnarviikaevenáššivestnesgjemnessandnesagdenesrennesoyxn--avery-yuaxn--tysvr-vrabearalváhkikongsbergspydebergrandabergxn--andy-iradavvesiidaxn--krdsherad-m8aporsáŋgufredrikstadbjerkreimringeburennebuaurskog-holandnotteroyxn--vgsy-qoa0jxn--rmskog-byaskierváivelandbyglandfrolandaurlandforsandxn--bjddar-ptamidsundålesundalesundfetsundfarsundovre-eikerøvre-eikerakershusxn--moreke-juasørfoldøstfoldostfoldsorfoldhøyangerhoyangerlevangerorkangertanangerxn--vestvgy-ixa6olillesandulsteinxn--rennesy-v1agranvinskjervoyxn--klbu-woalavagisxn--h-2faxn--ryrvik-byakafjordkåfjordseljordfolkebiblxn--gjvik-wuajevnakerxn--kfjord-iuabudejjuxn--kranghke-b0axn--davvenjrga-y4axn--rland-uuaxn--ldingen-q1axn--mlselv-iuaxn--rady-iraxn--linds-prabrumunddalxn--ygarden-p1amo-i-ranaeidskogrømskogromskoghjelmelandxn--finny-yuaxn--sr-odal-q1axn--skjervy-v1aballangenkvanangenkvænangengratangenxn--hmmrfeasta-s4acvossevangensuohkanxn--rde-ulaxn--mli-tlaxn--ksnes-uuanordlandskanlandskånlandsortlandfuoiskuxn--rros-graxn--hcesuolo-7ya35bxn--eveni-0qa01gagaivuotnagáivuotnaxn--seral-lradrammenmodalenmosjoenjan-mayentorskensteigengloppenxn--snes-poamatta-varjjatxn--sr-fron-q1aomasvuotnajessheimbådåddjåxn--krager-gyaxn--kvfjord-nxaxn--asky-iraxn--snase-nraxn--bidr-5nacholtålenxn--vads-jraxn--jlster-byamosjøenxn--rst-0nastavernxn--ostery-fyaxn--oppegrd-ixaxn--sknit-yqaxn--risa-5naoppegårdskiptvetrendalenholtalenxn--mot-tlaxn--lhppi-xqaxn--holtlen-hxaxn--srreisa-q1akopervikxn--muost-0qaxn--bmlo-grahokksundkvalsundegersundxn--karmy-yuaullensakerxn--hylandet-54axn--kvitsy-fyaxn--bod-2nalangevågberlevågkristiansandxn--rsta-frahornindalstjørdalshalsenstjordalshalsensandnessjoenhámmárfeastaxn--lrdal-srasør-fronsor-fronnord-odalkristiansundmátta-várjjatvestvågøynesoddennotoddenbuskerudøygardenoygardensalangenlavangenralingenrælingenlodingenlødingenleaŋgaviikalaakesvuemieleangaviikauenorgexn--srfold-byaaskvollxn--rskog-uuaxn--nry-yla5gxn--vry-yla5ghammarfeastaxn--rhkkervju-01afxn--givuotna-8yakommunekrokstadelvanedre-eikerhagebostadhægebostadxn--berlevg-jxakviteseidxn--s-1faxn--l-1faxn--nmesjevuemie-tcbafuosskomoårekemoarekexn--lt-liacxn--jrpeland-54asvalbardoppegardholmestrandtvedestrandsogndalsokndalarendalsunndalfolldalxn--krjohka-hwab49jlyngdaletnedalnorddalsaltdalgausdalskedsmovaksdalgjesdalstordalxn--frya-hraaarbortedrangedalxn--smna-graaurskog-hølandxn--vg-yiabtjeldsundhaugesundlindesnesxn--mre-og-romsdal-qqbxn--dnna-gradynheremerseineshacknetenterprisecloudmineaccomaorimāoriorgmilcriiwigennetschoolhealthkiwigovtgeekxn--mori-qsacloudnsparliamentcomedorgcompronetedugovmuseumwebsitekinservicebarsywebsitebuildereerobookheimdnsleapcelleero-stagetechcrscsslorigingohomecdbedeeeiemesecabgngilnlalplchfisiincnnoroptatitmtltruauhulumkdkukskjplvtrgrfrkrhrusesismycynzcznetinteduassoososcloudstgbetaaezaeuhkusjshatenadiarycdn77hoptozaptois-a-knightmyftpno-ipjpnddnssdpdnsspdnsbarsysweetpepperis-a-bruinsfanis-very-sweetservegameis-a-soxfanhomelinuxcdn77-secureservebbsmisconfusedwebredirectblogsitefreedesktopcouchpotatofriestoolforgeaccesscamis-lostreadmyblogsmall-webfedorapeopleserveftpis-a-celticsfanmywirepotagertwmailin-dslsellsyourhomeread-booksfreeddnscable-modemis-savednflfanufcfanmlbfanstuff-4-saleendoftheinternetin-vpnmy-firewallhomeftpis-localis-a-chefboldlygoingnowherewebhopselfipkicks-assroxatunkcamdvrfedoraprojectgotdnsdvrdnsdyndnspubtlspimientahomeunixdontexistfedorainfracloudwmflabsfspagesbmoattachmentsteckidsfamilydsdnsaliasdynaliasnow-dnscloudnsdoomdnsduckdnsblogdnshomednsroutingthecloudendofinternetdsmynasip-dynamicpoivronhttpbinmyfirewallis-very-evilmysecuritycamerais-a-linux-userwmcloudis-a-geektuxfamilyis-a-candidatedoesntexistis-very-badhobby-sitegame-hostaltervistais-foundis-a-patsfandnsdojohepforgepodzonedynservcollegefanis-very-goodfrom-meis-very-niceisa-geeknerdpolacmedsldingorgcomnomgobabonetedupleskaemhlxmyboxrockyprvcydeuxfleurspdnscodebergheyflowstatichostorgmilcomnomgobneteduorgcomeduiorgmilcomngonetedugovcloudns1337ngrokacorggogfamcomwebgobnetedugokgopgkpgovgosbizpasaugumicsopozpapuwmwsrprusiskwpspkppspkmpspokeoiawsawifoumsdnskokwpmuppuppsppiwwiwoowuzswkzoschrzpisdnwzmiuwwitdpssewsseumigugimoirmpinbwinbwiihupporzgwgriwupowwskrwioswuozstarostwokonsulattmpccopruszkowmyspreadshopostrodakartuzyopolegminamediaustkazgorajgoraolawailawalomzawloclradombytomjaworznotargilubinkoninzagantorunkutnokepnonakloczestsopotsanokturekplockslasksklepzarowlukowmedaidgdaorgmilrelcomnomatmgsmartneteduelkgovwawsossexbiztgorysejnytychypomorzeboleslawiechomesklepsdscloudunicloudzakopanelegnicarawa-mazbydgoszczswidnikkrasnikwloclawekbielawamragowograjeworealestatebeskidykaszubymalopolskaprzeworskswiebodzinlecznadfirmaszkolawarmiagdyniamiastakazimierz-dolnymalborkswidnicadlugolekaostrolekapodlasieelblagtravelsimplesitezachpomormielecszczecinnieruchomosciwalbrzychlezajsklublinbedzinpoznanwielunmielnooleckostarachowicedkontopowiatwroclawrybniksuwalkileborkslupskgdanskostrowwlkptarnobrzegtourismwegrowkrakowglogowyou2pilanysamailwrocinfoagroautobeepshopprivlapypiszlodzcfolksecommerce-shopmazurypulawyskoczowrzeszowpomorskiezgierzkaliszolkuszlowiczostrowiecsosnowiecmazowszewodzislawbialowiezazgorzeleckatowicepabianicejelenia-gorawolominkarpaczsieradznowarudaczeladzkonskowolaskierniewiceswinoujscieturystykabieszczadycieszynketrzynolsztynbialystokbabia-goraprochowicewarszawastalowa-wolapolkowicegorlicegliwiceponiatowalimanowalubartowaugustowkobierzyceopocznognieznoszczytnokolobrzegshoparenapodhalebielskoklodzkostargardatwithplayitownnamecoorgnetedugovacorgcomproestnetedugovbiznameislaprofinforechtngrokmedaaaacacpaenglawjurbarbarsykeeneticavocatacctcloudnsorgcomsecplonetedugov123paginaweborgcomnetintedugovnomepublidkinbarsygovx443cloudnsorgmilcomnetedugovcooporgmilcomschnetedugovnamecomcannetlibassoaemclantmcontstoreorgcomnomrecwwwbarsyfirminfoshopartsstackitmyddnswebspacelima-cityacincooxorgedugovbarsybrendlyhbvpsvpsspectrumlandinghostingacppmordoviamcprecbgorgmilcomspbnetintedumsknovgovbirrasmcdirmytismircloudvladimirnalchikadygeyamarinepyatigorskmyjinobashkiriaeurodirvladikavkazna4ugroznykustanaikalmykiacldmaildagestaniranbuildcanvaliaravalwixdevelopmentappwritemigrationneedleverceldatabasestackitcodereplravendbonporterlovableaccoorgmilnetgovcoopmedorgcompubschnetedugovservicemecomygovorggovtvmedorgcomnetedugovinfoedgfacbmlonihkutwpsryxzbdtmacfhppmyspreadshopbrandpartiorgcomfhvpress123minsidaitcouldbeworlanbibkommunalforbundfhskiopsyskomvuxkomforbnaturbruksgymnloginlineorgcomnetedugovenscaledeuusentbotdaorgmilcomnetgovnowteleporthashbangplatformlovablebarsyshopwarebasehoplixbarsyonlinemsf5gitappgitpagewawamscofigma-govcaffeinefigmacanvasoltstscwputerbarsysupportchatgptsquareomniweopensocialcpanelplaycodenotionnovecorewpsquaredpreviewjelecyonbyensrhtfastvpspieboxconvexjouwwebheyflowplatformshloginlinemadethissourcecraftclouderaorgorgcomartedugouvunivmeorgcomnetedugovsurveysstatichfheiyuxs4allprojectmyfastubervibehostapp-ionosdeployagentmecoorgcomschnetedugovbizcncostoreorgmilcomneteduembaixadaconsuladokiraranohoprincipesaotomeheliohobarsystorebaseshopwaresellfyabkhaziavologdamordoviapenzalenugsochinavoiexnetspbmsknovnorth-kazakhstanashgabadkareliaarmeniageorgiavladimirnalchikivanovobukharaadygeyakhakassiakalugakrasnodarjambylaktyubinsktroitskbryanskobninskkurganazerbaijanpokrovskbashkiriatselinogradvladikavkazmurmansktulatuvamangyshlaktashkentchimkentgroznykaragandatermezarkhangelskkustanaikalmykiabalashoveast-kazakhstankaracoldagestantogliattibarsyredorgcomgobedumirenknightpointaccoorgjelasticdiscoursecleverappsschacmiincogoornetonlineshopcogoorgmilcomwebnicnetintedugovbiznametestcoorgmilcomnomnetedugovorangecloudpersoindorgcomfinnatnetgovensmincomtourismintlinfox0611oyaorgmilcomnetedugovquickconnectvpnplusnettprequalifymeaddrmyaddrntdllwadlnctvavdrk12orgmilpolbeltelcomwebgennetedutskkepgovbbsbiznameinfocoorgmilcompronetedugovbiznameinfobetter-thanworse-thansakurafromdyndnson-the-webmymailerorgmilurlcomneteduidvgovmydnsgameclubebizmeneacsccogotvorhotelmilmobiinfovodteiflgplkmsmsbcckhincndnvncoztltmkckppzpdprvcvkvlvcrkrkscxuzchernovtsyrivneyaltaodesavolynrovnolutskltdinforgcomnetedugovbizvinnicazhitomirternopilpoltavakropyvnytskyizaporizhzhiasevastopolsebastopoluzhgoroduzhhorodkharkovkharkivvinnytsiakhmelnytskyizaporizhzhecrimeaodessazhytomyrnikolaevcherkassydonetskluganskluhanskkirovogradivano-frankivskchernivtsikrymkievkyivlvivsumyzakarpattiamykolaivcherkasychernigovkhersonchernihivdnipropetrovskdnepropetrovskkhmelnitskiyneacsccogoorusorgmilcomedugovmyspreadshopadimono-ipbarsybarsyonlinelayershiftnh-servretrosnubapicampaignservicelugaffinitylotteryweeklylotteryraffleentrygluglugsmeaccoindependent-inquestnimsitecopropymntltdorgplcschnetgovnhsbarsyindependent-commissionindependent-reviewpolicepublic-inquiryindependent-panelconnhospindependent-inquiryroyal-commissionoraclegovcloudappscck12libccphxcclibpvtparochchtrcck12libcceatonk12coglibtecgendstmusann-arborwashtenawcck12glghcck12sealibforksolympiabainbridge-islkeyporthoquiamyarrow-pointcentraliaport-townsendsequimport-ludlowrentonsilverdalebremertonredmondsheltonbellevueport-orchardport-angeleskingstonchehalisaberdeengig-harborseattlepoulsboidmdndsddemenegacalamaiavawapailalflnmdcncscohnhmihiviwiriinmntnmocoutvtctmtgunjokakwvnvprarorasmskstxwynykyazisadninsnngosrvis-bymircloudservernamepointtoenscaledland-4-salefreeddnsstuff-4-saleazure-apinoipcloudnsgolffanheliohostazurewebsitesgvorgmilcomgubneteducoorgcomnetd0egvorgmilcomnetedugovmydnsiacostoree12orgmilcomnomwebgobbibrectecnetintedugovraremprendefirminfoartseducok12orgcomnethidnsidacaiiosonlahanamhanoicamauhueorgcompronetintedugovbizbacninhtayninhhoabinhnamdinhtravinhhaiphongvinhlonghaiduongquangnamquangtrithuathienhuequangninhbacgianghaugiangquangbinhsoctrangbentrethanhphohochiminhdanangkontumhatinhkhanhhoathanhhoahealthgialailaocaiyenbaibackanngheanlonganphuyenphuthocanthodaklakdongnainameinfovinhphucdongthapkiengiangtiengiangquangngailaichaulangsonlamdongdaknonghagiangangiangcaobangbinhduongninhthuanbinhthuanbaclieuthaibinhninhbinhbinhdinhtuyenquanghungyenbaria-vungtauthainguyendienbienbinhphuocschbizputerimagine-proxyorgcomnetedugovcloud66advisormypetsdyndnsxn--8dbq2axn--4dbgdty6cxn--5dbhl8dxn--hebda8bxn--80auxn--d1atxn--c1avgxn--o1acxn--o1achxn--90azhxn--55qx5dxn--uc0atvxn--od0algxn--wcvs22dxn--gmqw5axn--mxtq1mxn--12c1fe0brxn--h3cuzk1dixn--12co0c3b4evaxn--12cfi8ixb8lxn--o3cyx2axn--m3ch0j3axn--j1adpxn--90amcxn--90a1afxn--h1ahnxn--j1ael8bxn--h1alizxn--c1avgxn--j1aefxn--80aaa0cvacxn--41acaffeineexeopentunnelbotdashtelebitorgtmaccoagricorgmilnomwebnicngonetaltedugovlawnisschoolgrondaraccoorgmilcomschnetedugovbizinfoprg1-zeropstritonstackitlimazeropsaccoorgmilgovяспборгкоммскбизмирсамаракрымсочиакодпроргобрупрצהלממשלישובאקדמיהองค์กรธุรกิจรัฐบาลศึกษาทหารเน็ต教育網絡組織公司政府個人닷넷한국澳门新闻澳門联通家電嘉里招聘通販닷컴삼성コムგეбгрфеюadcdbdgdidmdsdtdaebedeeegeiejekemenepereseveyegabacalamanauavapaqasazacfbfafgfnfpfwftfbgcgagggegkgngmgsgpgvgtgugilmlnlalclglplsltlhmimjmkmmmomambmcmdmfmgmzmpmsmtmgbbblbsbecccacnclcmcvctcscmhkhghchbhthphshlinikifigiaibicivisikninhnmncnbngnsnpnvntnjoionomobocoaofodorosotoptstttytatbtetgtithtmtltrusuvuaucueuguhulumunufjdjbjtjsjlkmkhkfkdkcktkukskpkgpmpnpkpjpgqaqmqiqsvtvcvbvmvlvrwpwtwzwbwcwawgwkwmwtrsrprgrfrercrbrarnrmrlrkrirhrwsusrssspsgsesbsaslsmsissxmxaxcxuypysylymykygybycyuztzsznzmzkzdzczbzazελευ世界台灣购物公益点看臺灣网络書籍在线网站手机机构大拿游戏信息台湾谷歌慈善商标香港中国餐厅网址中國商城食品微博政务移动集团公司八卦商店健康网店政府时尚佛山中信娱乐广东企业homedepotengineeringاماراتrepublicankuokgroupversicherungchannelcitadelxn--pgbs0dhxn--b4w605ferdstatebankwebsitexn--mgb9awbf亚马逊淡马锡alibabaxn--ngbc5azdxn--mgbbh1axn--45br5cyltoshibabuildworldcloudtradeguideplacespacedancemoviephoneprimesmilebiblestyleappleazurestoreskypegripexn--l1accdrivelottehorsehouseleasechasereisestadahondaomegaaetnaamicaninjanokiamediadeltavodkaedekaosakapizzaslingemailgmailtirolshelltmallfinallegaltotalhotelamfamforumrehabmusicciticricohcoachwatchboschearthfaithirishmiamiarchidubaiguccipraxiみんなストアセールcanonsalononionnikonepsonkoelngreensevencrownikanoradioaudioweiboglobopromogalloyahoociscorodeovideomangobingotokyovolvolottokyotophotosmartsportquesttrusthyattjetztadultcymrubaidutushuxn--kprw13dubankclickblackmerckgroupsharpcheapnowtvxn--h2brj9cקוםհայоргсрбмонкомбелмкдқазрусукрمصرقطرعربكومdadcfdmedwedredphdthdbidpidkrdmsdltdiceonewmeglemoerwecfageacbanbambaaaammakianraspacpaaxawtfbcgaegongingaigvigorgdogdhlmilrilonlaolloluoljllcalgalnflafltelsrlfrllplkimibmcamcombommomifmabbjcbscbwebcabnabtabmlbpubabcbbcnecincpncllcstcwtcpwcnyckfhbzhovhmoiskiobisbitcifyituipinvinwinxincbnbcnmanfangdnmenrenkpnmtnyunrunfununobiojioriohbogmofooboooooacoecoceongoproartistottnttbbtcateatlatvetpetbetnethktmitfitintjothotgotdotbotprueduicujnjyouinknhktdkappsapgapmapdnptopgopllpjmpzipvipripesqtrvdtvitvdevmovgovhivnrwlawsewnewbmwwownowhowdvrftrmtrsfrbarcartvscrseusawsupsubssbsadsddsldssasbmsmlsxxxboxfoxgmxtjxsextaxbuyflydiysoyjoyskypaydaygayxyzanzbizwebersenerpokerlameractortatarsolarລາວคอมไทยtourslocusnexuslexusgiftsbeatsboatspartspressglassswissकॉमनेटtiresgivescodeshomesgamestunesshoescardswalesloansvegastoolsdealsautosparisファッションworkssucksrocksxeroxforexfedexpartylillymoneystudyrugbytoraytoday中文网xn--unup4y天主教飞利浦新加坡enterprises我爱你嘉里大酒店christmasxn--fct429kholdingsxn--8y0a063axn--mgbx4cd0ablifestyleabogadoallstatenetbankكاثوليكxn--s9brj9cxn--gk3at1ebestbuycharityxn--55qx5dmicrosoftpropertybasketballhomegoodscorsicajewelrygallerygrocerysurgerycountrybrusselsverisignferreroxn--czr694bhdfcbankcommbanksoftbankپاكستانپاکستانnextdirectالسعوديهالعليانxn--h2brj9c8cxn--80adxhksshikshaxn--mgbai9azgqp6jcuisinellabarclayscatholicxn--kpry57dcompanyxn--xhq521bblackfridayxn--mgba3a3ejtsandvikxn--d1acj3bacademydownloadمليسياxn--j1amhxn--w4r85el8fhu5dnraipirangaathletaxn--fhbeixn--mgbqly7cvafrzuerichxn--c2br7gஇலங்கைcontractorsxn--io0a7igraphicsinsurancetemasekxn--xkc2al3hye2amotorcyclesphotographydirectoryplumbingxn--vhquvclothingtrainingcleaningwilliamhilllightingxn--mgba3a4f16ashoppingcateringeducationokinawapicturesventuresproductionsxn--9et52uwalmartഭാരതംsupportrealestatecapitalonexn--nqv7fs00emaauspostfloristdentistxn--qxamgodaddybradescobargainsmitsubishikerryhotelsxn--9dbq2axn--3pxu8kimmobilienxn--fjq720axn--mgbtx2bholidaymckinseymadridbusinessbuildershelsinkixn--4gbrimмоскваالسعودیةcoffeedegreelacaixapartnersalsaceofficeabbvievoyageorangegeorgeonlinechromemobilekindlegoogleoraclecircleschulesecureinsurexn--mgba7c0bbn0aestatexn--mgbc0a9azcgcruisehangoutxn--vuq861bxn--42c2d9arexrothfirestoneuniversityxn--nnx388alifeinsuranceextraspaceонлайнvermögensberatersoftwarexn--fiqs8sxn--mgbab2bdxn--w4rs40ltiendaभारतम्africatoyotaotsukasakuracameracreditcardnagoyaconsultingnetworkjunipertheatermonsterprogressivepioneerxn--55qw42gracingdatingvotingvikinglivinggivingxn--bck1b9a5dre4cbrotherweatherjoburgفلسطينlplfinancialxn--clchc0ea0b2g2a9gcdfutbolschoolsocialglobaldentalwoodsidechanelairtelmatteltravelrealtorwebcamstreamభారత్unicomalstomxn--nodexn--6frz82gmuseumfurniturexn--rvc1e0am3exn--mix891faccenturexn--11b4c3dismailineustardiscountquebeccomsecclinicservicesxn--y9a3aqxn--c1avgswatchchurchsearchالاردنmarketingcontacthealthmonashshoujisanofitaipeiamericanexpresssuzukiアマゾンクラウドポイントbhartiグーグルxn--mgberp4a5d4armemorialxn--1qqw23alondonmormoninstitutevisionbostonnortoncouponmaisonamazonvirginberlindesigndurbanolayannissananquanxihuanhitachikaufengardenreisenbayerntechnologydatsunxn--90a3aclatinocasinostudiophysioxn--ngbe9e0apharmacytattootaobaoaramcoexpertreportabbottdirectselectimamatfairwindspictettargetmarketintuittravelersinsurancecreditdupontryukyusuppliesxn--tckwebnpparibasschmidtmerckmsdyodobashirestaurantbridgestonecricketxn--fpcrj9c3dbostikbroadwayattorneylefrakemerckxn--fiq228c5hscareersfarmerswinnersflowersxn--wgbh1cguitarsxn--54b7fta0ccxn--p1acfmakeupgalluplandroverxn--kcrx77d1x4agoldpointbauhausxn--mgbayh7gpahiphopplaystationxn--mgba3a4fraxn--eckvdtc9dhyundaixn--gckr3f0fistanbulticketsmarketsflightschintaireviewsxn--3e0b707ewindowsxn--fiqz9sfinancialxn--fzys8d69uvgmابوظبيdiscoverreviewবাংলাxn--5su34j936bgsgmoscowobserverapartmentsдетиارامكوсайтeurovisionxn--i1b6b1a6a2exn--xkc2dl3a5ee0hتونسموقعبارتڀارتشبكةعمانبيتكعراقreadkredbondlandbandfundfoodprodgoldfordtubecafesafelifeggeeieeefreefagepagegugezonewinememenamegamesaleablebikenikelikecarecbreherefiresaveloveliveblueartedatesitevotecaseluxebofamodaltdaasdatiaayogasinavanashiaasiajavabbvatevavivadatazaraarpacasavisasncfprofmaifsurfgolfdvagsongbingpingwangkpmggoogblogpohlfailcooldellcalldeallidlsarlfilmteamroomfarmimdbarabclubhdfcicbchsbcgmbhrichtechfishdishcashminiernikddiaudiwikimobitaxicitikiwidesiqponskinloanakdnwienopenporncerntownimmolimoolloinfonicofidolegosaxozeroaerovivoautovotomotofastbestresthostpostnextlgbtchatseatgiftmeetdietreitmintrentgentspotscotguruitausohumenucyoubanklinkpinkdclktalksilkbookseekworkrsvpaarpjeepshopcoophelpcamppccwshowbeerstarruhrflirweirhaircarsparsjprshausplusnewstipstoysjobskidsfanspicsdocsxboxamexsexynavycitysonyarmyallybabyplaydeliverybuzzgbizlamborghiniphilipsලංකාಭಾರತfitnessexpresslanxesspfizercenterwalterlawyersoccercareerkosherbrokerlockerdealerdoctorauthorxn--mgbqly7c0a67fbcvermögensberatungjaguarxn--pssy2uxn--hxt814eflickrrepairrogersairbusxn--mgbai9a5eva00beventsyachtsxn--t60b56aভাৰতভারতभारतभारोतviajeshermeshughesxn--j1aefसंगठनvillasଭାରତclaimshotelsભારતzapposphotosjuegoscondostatamotorsgratistennisਭਾਰਤtkmaxxtjmaxxschaeffleryandexxn--80aswgrealtysafetybeautyluxuryxn--3ds443gsupplyfamilyxn--o3cw4hhockeysydneyxn--90aenissayalipayenergycomputeragencyxn--rovu88b電訊盈科xn--gecrj9cstatefarmaccountantaquarelleolayangroup香格里拉xn--p1ai组织机构xn--1ck2e1bxn--mgbt3dhdschwarzموريتانياabudhabinowruzkomatsufujitsuhospitalxn--80asehdbxn--mgbtf8flxn--j6w193gxn--yfro4i67oprudentialxn--flw351ecruisescoursesrecipesxn--e1a4cferrarixn--ses554gxn--wgbl6awatchesstaplessinglesxn--mgbcpq6gpa1axn--otu796dpropertiescreditunionxn--mgbah1a3hjkrdstockholmhisamitsuالسعوديةstcgroupdomainsoriginscouponsbloombergclubmedfroganslimitedxn--80aqecdr1aexposedinternationalequipmentbarclaycardxn--q7ce6axn--mgbi4ecexpprotectionassociatesconstructionxn--cck2b3bxn--45q11candroidfoundationישראלxn--mgbca7dzdocliniqueboutiqueengineerxn--qxa6asystemsfirmdalefashionauctionxn--nqv7finfinitirentalsreliancetradingweddingfishinghostinggentingbookingcookingxn--3hcrj9cgraingerxn--czrs0tdemocratsamsungyokohamaxn--h2breg3evexn--nyqy26alundbeckmelbournevacationssolutionsfrontierxn--vermgensberatung-pwbmanagementxn--cg4bkixn--mgb2ddeslincolnhamburgsandvikcoromantblockbusterairforcebarefootxn--4dbrk0ceinvestmentsfeedbackcommunityxn--ngbrxالبحرينdiamondsamsterdamhealthcareredumbrellaxn--mxtq1mxn--2scrj9cagakhanxn--mgbpl2fhкатоликcaravanசிங்கப்பூர்richardlimortgageamericanfamilyxn--fzc2c9e2cscholarshipssaarlandxn--imr513nvlaanderensamsclubgoodyearkitchenஇந்தியாweatherchannelallfinanzxn--kput3iالسعودیۃxn--90aisxn--efvy88hالجزائرxn--mgbaam7a8hexchangejpmorganxn--tiq49xqyjfidelitysecurityxn--mk1bu44cwanggouxn--fiq64bxn--6qq986b3xlxn--mgbbh1a71exn--80ao21amarshallsxn--5tzm5gtravelerspanasoniclatrobeyoutubeaccountantsxn--rhqv96gxn--cckwcxetdanalyticsxn--ygbi2ammxبازاربھارتسوريةorganicfreseniusسورياxn--9krt00axn--qcka1pmcxn--jlq480n2rgdeloittesciencefinancexn--jvr189mxn--30rr7yhomesensehotmailbaseballfootballleclercboehringerxn--q9jyb4cxn--mix082fاليمنهمراهpolitieسودانايرانایرانnetflixyamaxunxn--lgbbat1ad8jcollegestoragecapetowncolognekerrypropertiesxn--mgbgu82axn--ogbpf8flxn--czru2dwhoswhociprianilasallexn--g2xx48cforsalebanamexaudiblexn--vermgensberater-ctbxn--zfr164bericssonvanguardxn--45brj9cindustriestheatremarriottxn--3bst00mcomparexn--mgberp4a5d4a87gcapitaldigitalالمغربbarcelonashangrilaxn--d1alfcalvinkleinwwwcitysapporokawasakinagoyasendaikobekitakyushuyokohamackjp`,numberOfNodes=nodeFlags.length,numberOfEdges=edgeLength.length,edgeOffset=new Uint32Array(numberOfEdges),edgeHash=new Uint32Array(numberOfEdges),wildcardEdge=new Int32Array(numberOfNodes).fill(-1);for(let node=0,offset=0;node<numberOfNodes;node+=1)for(let edge=edgeStart[node];edge<edgeStart[node+1];edge+=1){edgeOffset[edge]=offset;let end=offset+edgeLength[edge],hash=5381;for(let i=end-1;i>=offset;--i)hash=hash*33^labelText.charCodeAt(i);edgeHash[edge]=hash>>>0,edgeLength[edge]===1&&labelText.charCodeAt(offset)===42&&(wildcardEdge[node]=edge),offset=end}let matchNode=-1,matchStart=0,matchEnd=0;function labelEquals(edge,hostname,start,length){if(edgeLength[edge]!==length)return!1;let offset=edgeOffset[edge];for(let i=0;i<length;i+=1)if(labelText.charCodeAt(offset+i)!==hostname.charCodeAt(start+i))return!1;return!0}function findEdge(node,hash,hostname,start,length){let lo=edgeStart[node],hi=edgeStart[node+1];for(;lo<hi;){let mid=lo+hi>>>1,value=edgeHash[mid];if(value<hash)lo=mid+1;else if(value>hash)hi=mid;else{for(let e=mid;e>=lo&&edgeHash[e]===hash;--e)if(labelEquals(e,hostname,start,length))return e;for(let e=mid+1;e<hi&&edgeHash[e]===hash;e+=1)if(labelEquals(e,hostname,start,length))return e;return-1}}return-1}function walk(hostname,root,allowedMask){let node=root,end=hostname.length,hash=5381;matchNode=-1;for(let i=hostname.length-1;i>=0;--i){let code=hostname.charCodeAt(i);if(code===46){let start=i+1,edge=findEdge(node,hash>>>0,hostname,start,end-start);if(edge===-1&&(edge=wildcardEdge[node]),edge===-1)return matchNode!==-1;node=edgeChild[edge],(nodeFlags[node]&allowedMask)!==0&&(matchNode=node,matchStart=start,matchEnd=end),end=i,hash=5381}else hash=hash*33^code}let edge=findEdge(node,hash>>>0,hostname,0,end);return edge===-1&&(edge=wildcardEdge[node]),edge!==-1&&(node=edgeChild[edge],(nodeFlags[node]&allowedMask)!==0&&(matchNode=node,matchStart=0,matchEnd=end)),matchNode!==-1}function suffixLookup(hostname,options,out){if(fastPathLookup(hostname,options,out))return;let allowedMask=(options.allowPrivateDomains?2:0)|!!options.allowIcannDomains;if(walk(hostname,623,allowedMask)){out.isIcann=!!(nodeFlags[matchNode]&1),out.isPrivate=!!(nodeFlags[matchNode]&2),out.publicSuffix=hostname.slice(matchEnd+1);return}if(walk(hostname,619,allowedMask)){out.isIcann=!!(nodeFlags[matchNode]&1),out.isPrivate=!!(nodeFlags[matchNode]&2),out.publicSuffix=hostname.slice(matchStart);return}out.isIcann=!1,out.isPrivate=!1;let lastDot=hostname.lastIndexOf(`.`);out.publicSuffix=lastDot===-1?hostname:hostname.slice(lastDot+1)}let RESULT=getEmptyResult();function getDomain(url,options){return resetResult(RESULT),parseImpl(url,3,suffixLookup,options,RESULT).domain}exports.getDomain=getDomain}))();function pathMatch(reqPath,cookiePath){return!!(cookiePath===reqPath||reqPath.indexOf(cookiePath)===0&&(cookiePath[cookiePath.length-1]===`/`||reqPath.startsWith(cookiePath)&&reqPath[cookiePath.length]===`/`))}var SPECIAL_USE_DOMAINS=[`local`,`example`,`invalid`,`localhost`,`test`],SPECIAL_TREATMENT_DOMAINS=[`localhost`,`invalid`],defaultGetPublicSuffixOptions={allowSpecialUseDomain:!1,ignoreError:!1};function getPublicSuffix(domain,options={}){options={...defaultGetPublicSuffixOptions,...options};let domainParts=domain.split(`.`),topLevelDomain=domainParts[domainParts.length-1],allowSpecialUseDomain=!!options.allowSpecialUseDomain,ignoreError=!!options.ignoreError;if(allowSpecialUseDomain&&topLevelDomain!==void 0&&SPECIAL_USE_DOMAINS.includes(topLevelDomain)){if(domainParts.length>1)return`${domainParts[domainParts.length-2]}.${topLevelDomain}`;if(SPECIAL_TREATMENT_DOMAINS.includes(topLevelDomain))return topLevelDomain}if(!ignoreError&&topLevelDomain!==void 0&&SPECIAL_USE_DOMAINS.includes(topLevelDomain))throw Error(`Cookie has domain set to the public suffix "${topLevelDomain}" which is a special use domain. To allow this, configure your CookieJar with {allowSpecialUseDomain: true, rejectPublicSuffixes: false}.`);let publicSuffix=(0,import_cjs.getDomain)(domain,{allowIcannDomains:!0,allowPrivateDomains:!0});if(publicSuffix)return publicSuffix}function permuteDomain(domain,allowSpecialUseDomain){let pubSuf=getPublicSuffix(domain,{allowSpecialUseDomain});if(!pubSuf)return;if(pubSuf==domain)return[domain];domain.slice(-1)==`.`&&(domain=domain.slice(0,-1));let parts=domain.slice(0,-(pubSuf.length+1)).split(`.`).reverse(),cur=pubSuf,permutations=[cur];for(;parts.length;)cur=`${parts.shift()}.${cur}`,permutations.push(cur);return permutations}var Store=class{constructor(){this.synchronous=!1}findCookie(_domain,_path,_key,_callback){throw Error(`findCookie is not implemented`)}findCookies(_domain,_path,_allowSpecialUseDomain=!1,_callback){throw Error(`findCookies is not implemented`)}putCookie(_cookie,_callback){throw Error(`putCookie is not implemented`)}updateCookie(_oldCookie,_newCookie,_callback){throw Error(`updateCookie is not implemented`)}removeCookie(_domain,_path,_key,_callback){throw Error(`removeCookie is not implemented`)}removeCookies(_domain,_path,_callback){throw Error(`removeCookies is not implemented`)}removeAllCookies(_callback){throw Error(`removeAllCookies is not implemented`)}getAllCookies(_callback){throw Error(`getAllCookies is not implemented (therefore jar cannot be serialized)`)}},objectToString=obj=>Object.prototype.toString.call(obj),safeArrayToString=(arr,seenArrays)=>typeof arr.join==`function`?(seenArrays.add(arr),arr.map(val=>val==null||seenArrays.has(val)?``:safeToStringImpl(val,seenArrays)).join()):objectToString(arr),safeToStringImpl=(val,seenArrays=new WeakSet)=>typeof val!=`object`||!val?String(val):typeof val.toString==`function`?Array.isArray(val)?safeArrayToString(val,seenArrays):String(val):objectToString(val),safeToString=val=>safeToStringImpl(val);function createPromiseCallback(cb){let callback,resolve,reject,promise=new Promise((_resolve,_reject)=>{resolve=_resolve,reject=_reject});return callback=typeof cb==`function`?(err,result)=>{try{err?cb(err):cb(null,result)}catch(e){reject(e instanceof Error?e:Error())}}:(err,result)=>{try{err?reject(err):resolve(result)}catch(e){reject(e instanceof Error?e:Error())}},{promise,callback,resolve:value=>(callback(null,value),promise),reject:error=>(callback(error),promise)}}function inOperator(k,o){return k in o}var MemoryCookieStore=class extends Store{constructor(){super(),this.synchronous=!0,this.idx=Object.create(null)}findCookie(domain,path,key,callback){let promiseCallback=createPromiseCallback(callback);if(domain==null||path==null||key==null)return promiseCallback.resolve(void 0);let result=this.idx[domain]?.[path]?.[key];return promiseCallback.resolve(result)}findCookies(domain,path,allowSpecialUseDomain=!1,callback){typeof allowSpecialUseDomain==`function`&&(callback=allowSpecialUseDomain,allowSpecialUseDomain=!0);let results=[],promiseCallback=createPromiseCallback(callback);if(!domain)return promiseCallback.resolve([]);let pathMatcher;pathMatcher=path?function(domainIndex){for(let cookiePath in domainIndex)if(pathMatch(path,cookiePath)){let pathIndex=domainIndex[cookiePath];for(let key in pathIndex){let value=pathIndex[key];value&&results.push(value)}}}:function(domainIndex){for(let curPath in domainIndex){let pathIndex=domainIndex[curPath];for(let key in pathIndex){let value=pathIndex[key];value&&results.push(value)}}};let domains=permuteDomain(domain,allowSpecialUseDomain)||[domain],idx=this.idx;return domains.forEach(curDomain=>{let domainIndex=idx[curDomain];domainIndex&&pathMatcher(domainIndex)}),promiseCallback.resolve(results)}putCookie(cookie,callback){let promiseCallback=createPromiseCallback(callback),{domain,path,key}=cookie;if(domain==null||path==null||key==null)return promiseCallback.resolve(void 0);let domainEntry=this.idx[domain]??Object.create(null);this.idx[domain]=domainEntry;let pathEntry=domainEntry[path]??Object.create(null);return domainEntry[path]=pathEntry,pathEntry[key]=cookie,promiseCallback.resolve(void 0)}updateCookie(_oldCookie,newCookie,callback){if(callback)this.putCookie(newCookie,callback);else return this.putCookie(newCookie)}removeCookie(domain,path,key,callback){let promiseCallback=createPromiseCallback(callback);return delete this.idx[domain]?.[path]?.[key],promiseCallback.resolve(void 0)}removeCookies(domain,path,callback){let promiseCallback=createPromiseCallback(callback),domainEntry=this.idx[domain];return domainEntry&&(path?delete domainEntry[path]:delete this.idx[domain]),promiseCallback.resolve(void 0)}removeAllCookies(callback){let promiseCallback=createPromiseCallback(callback);return this.idx=Object.create(null),promiseCallback.resolve(void 0)}getAllCookies(callback){let promiseCallback=createPromiseCallback(callback),cookies=[],idx=this.idx;return Object.keys(idx).forEach(domain=>{let domainEntry=idx[domain]??{};Object.keys(domainEntry).forEach(path=>{let pathEntry=domainEntry[path]??{};Object.keys(pathEntry).forEach(key=>{let keyEntry=pathEntry[key];keyEntry!=null&&cookies.push(keyEntry)})})}),cookies.sort((a,b)=>(a.creationIndex||0)-(b.creationIndex||0)),promiseCallback.resolve(cookies)}};function isNonEmptyString(data){return isString(data)&&data!==``}function isEmptyString$1(data){return data===``||data instanceof String&&data.toString()===``}function isString(data){return typeof data==`string`||data instanceof String}function isObject$1(data){return objectToString(data)===`[object Object]`}function validate(bool,cbOrMessage,message){if(bool)return;let cb=typeof cbOrMessage==`function`?cbOrMessage:void 0,options=typeof cbOrMessage==`function`?message:cbOrMessage;isObject$1(options)||(options=`[object Object]`);let err=new ParameterError(safeToString(options));if(cb)cb(err);else throw err}var ParameterError=class extends Error{},version=`6.0.2`,PrefixSecurityEnum={SILENT:`silent`,STRICT:`strict`,DISABLED:`unsafe-disabled`};Object.freeze(PrefixSecurityEnum);var IP_V6_REGEX=`
|
|
20
|
+
\\[?(?:
|
|
21
|
+
(?:[a-fA-F\\d]{1,4}:){7}(?:[a-fA-F\\d]{1,4}|:)|
|
|
22
|
+
(?:[a-fA-F\\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|:[a-fA-F\\d]{1,4}|:)|
|
|
23
|
+
(?:[a-fA-F\\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,2}|:)|
|
|
24
|
+
(?:[a-fA-F\\d]{1,4}:){4}(?:(?::[a-fA-F\\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,3}|:)|
|
|
25
|
+
(?:[a-fA-F\\d]{1,4}:){3}(?:(?::[a-fA-F\\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,4}|:)|
|
|
26
|
+
(?:[a-fA-F\\d]{1,4}:){2}(?:(?::[a-fA-F\\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,5}|:)|
|
|
27
|
+
(?:[a-fA-F\\d]{1,4}:){1}(?:(?::[a-fA-F\\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,6}|:)|
|
|
28
|
+
(?::(?:(?::[a-fA-F\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,7}|:))
|
|
29
|
+
)(?:%[0-9a-zA-Z]{1,})?\\]?
|
|
30
|
+
`.replace(/\s*\/\/.*$/gm,``).replace(/\n/g,``).trim(),IP_V6_REGEX_OBJECT=RegExp(`^${IP_V6_REGEX}$`),IP_V4_REGEX_OBJECT=RegExp(`^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$`);function domainToASCII(domain){return new URL(`http://${domain}`).hostname}function canonicalDomain(domainName){if(domainName==null)return;let str=domainName.trim().replace(/^\./,``);return IP_V6_REGEX_OBJECT.test(str)?(str.startsWith(`[`)||(str=`[`+str),str.endsWith(`]`)||(str+=`]`),domainToASCII(str).slice(1,-1)):/[^\u0001-\u007f]/.test(str)?domainToASCII(str):str.toLowerCase()}function formatDate(date){return date.toUTCString()}function parseDate(cookieDate){if(!cookieDate)return;let flags={foundTime:void 0,foundDayOfMonth:void 0,foundMonth:void 0,foundYear:void 0},dateTokens=cookieDate.split(DELIMITER).filter(token=>token.length>0);for(let dateToken of dateTokens){if(flags.foundTime===void 0){let[,hours,minutes,seconds]=TIME.exec(dateToken)||[];if(hours!=null&&minutes!=null&&seconds!=null){let parsedHours=parseInt(hours,10),parsedMinutes=parseInt(minutes,10),parsedSeconds=parseInt(seconds,10);if(!isNaN(parsedHours)&&!isNaN(parsedMinutes)&&!isNaN(parsedSeconds)){flags.foundTime={hours:parsedHours,minutes:parsedMinutes,seconds:parsedSeconds};continue}}}if(flags.foundDayOfMonth===void 0&&DAY_OF_MONTH.test(dateToken)){let dayOfMonth=parseInt(dateToken,10);if(!isNaN(dayOfMonth)){flags.foundDayOfMonth=dayOfMonth;continue}}if(flags.foundMonth===void 0&&MONTH.test(dateToken)){let month=months.indexOf(dateToken.substring(0,3).toLowerCase());if(month>=0&&month<=11){flags.foundMonth=month;continue}}if(flags.foundYear===void 0&&YEAR.test(dateToken)){let parsedYear=parseInt(dateToken,10);if(!isNaN(parsedYear)){flags.foundYear=parsedYear;continue}}}if(flags.foundYear!==void 0&&flags.foundYear>=70&&flags.foundYear<=99&&(flags.foundYear+=1900),flags.foundYear!==void 0&&flags.foundYear>=0&&flags.foundYear<=69&&(flags.foundYear+=2e3),flags.foundDayOfMonth===void 0||flags.foundMonth===void 0||flags.foundYear===void 0||flags.foundTime===void 0||flags.foundDayOfMonth<1||flags.foundDayOfMonth>31||flags.foundYear<1601||flags.foundTime.hours>23||flags.foundTime.minutes>59||flags.foundTime.seconds>59)return;let date=new Date(Date.UTC(flags.foundYear,flags.foundMonth,flags.foundDayOfMonth,flags.foundTime.hours,flags.foundTime.minutes,flags.foundTime.seconds));if(date.getUTCFullYear()===flags.foundYear&&date.getUTCMonth()===flags.foundMonth&&date.getUTCDate()===flags.foundDayOfMonth)return date}var months=[`jan`,`feb`,`mar`,`apr`,`may`,`jun`,`jul`,`aug`,`sep`,`oct`,`nov`,`dec`],DELIMITER=/[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/,TIME=/^(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[\x00-\x2F\x3A-\xFF][\x00-\xFF]*)?$/,DAY_OF_MONTH=/^[0-9]{1,2}(?:[\x00-\x2F\x3A-\xFF][\x00-\xFF]*)?$/,MONTH=/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[\x00-\xFF]*$/i,YEAR=/^[\x30-\x39]{2,4}(?:[\x00-\x2F\x3A-\xFF][\x00-\xFF]*)?$/,COOKIE_OCTETS=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/,PATH_VALUE=/[\x20-\x3A\x3C-\x7E]+/,CONTROL_CHARS=/[\x00-\x1F]/,TERMINATORS=[`
|
|
31
|
+
`,`\r`,`\0`];function trimTerminator(str){if(isEmptyString$1(str))return str;for(let t=0;t<TERMINATORS.length;t++){let terminator=TERMINATORS[t],terminatorIdx=terminator?str.indexOf(terminator):-1;terminatorIdx!==-1&&(str=str.slice(0,terminatorIdx))}return str}function parseCookiePair(cookiePair,looseMode){cookiePair=trimTerminator(cookiePair);let firstEq=cookiePair.indexOf(`=`);if(looseMode)firstEq===0&&(cookiePair=cookiePair.substring(1),firstEq=cookiePair.indexOf(`=`));else if(firstEq<=0)return;let cookieName,cookieValue;if(firstEq<=0?(cookieName=``,cookieValue=cookiePair.trim()):(cookieName=cookiePair.slice(0,firstEq).trim(),cookieValue=cookiePair.slice(firstEq+1).trim()),CONTROL_CHARS.test(cookieName)||CONTROL_CHARS.test(cookieValue))return;let c=new Cookie;return c.key=cookieName,c.value=cookieValue,c}function parse(str,options){if(isEmptyString$1(str)||!isString(str))return;str=str.trim();let firstSemi=str.indexOf(`;`),c=parseCookiePair(firstSemi===-1?str:str.slice(0,firstSemi),options?.loose??!1);if(!c)return;if(firstSemi===-1)return c;let unparsed=str.slice(firstSemi+1).trim();if(unparsed.length===0)return c;let cookie_avs=unparsed.split(`;`);for(;cookie_avs.length;){let av=(cookie_avs.shift()??``).trim();if(av.length===0)continue;let av_sep=av.indexOf(`=`),av_key,av_value;switch(av_sep===-1?(av_key=av,av_value=null):(av_key=av.slice(0,av_sep),av_value=av.slice(av_sep+1)),av_key=av_key.trim().toLowerCase(),av_value&&=av_value.trim(),av_key){case`expires`:if(av_value){let exp=parseDate(av_value);exp&&(c.expires=exp)}break;case`max-age`:if(av_value&&/^-?[0-9]+$/.test(av_value)){let delta=parseInt(av_value,10);c.setMaxAge(delta)}break;case`domain`:if(av_value){let domain=av_value.trim().replace(/^\./,``);domain&&(c.domain=domain.toLowerCase())}break;case`path`:c.path=av_value&&av_value[0]===`/`?av_value:null;break;case`secure`:c.secure=!0;break;case`httponly`:c.httpOnly=!0;break;case`samesite`:switch(av_value?av_value.toLowerCase():``){case`strict`:c.sameSite=`strict`;break;case`lax`:c.sameSite=`lax`;break;case`none`:c.sameSite=`none`;break;default:c.sameSite=void 0}break;default:c.extensions=c.extensions||[],c.extensions.push(av)}}return c}function fromJSON(str){if(!str||isEmptyString$1(str))return;let obj;if(typeof str==`string`)try{obj=JSON.parse(str)}catch{return}else obj=str;let c=new Cookie;return Cookie.serializableProperties.forEach(prop=>{if(obj&&typeof obj==`object`&&inOperator(prop,obj)){let val=obj[prop];if(val===void 0||inOperator(prop,cookieDefaults)&&val===cookieDefaults[prop])return;switch(prop){case`key`:case`value`:case`sameSite`:typeof val==`string`&&(c[prop]=val);break;case`expires`:case`creation`:case`lastAccessed`:typeof val==`number`||typeof val==`string`||val instanceof Date?c[prop]=obj[prop]==`Infinity`?`Infinity`:new Date(val):val===null&&(c[prop]=null);break;case`maxAge`:(typeof val==`number`||val===`Infinity`||val===`-Infinity`)&&(c[prop]=val);break;case`domain`:case`path`:(typeof val==`string`||val===null)&&(c[prop]=val);break;case`secure`:case`httpOnly`:typeof val==`boolean`&&(c[prop]=val);break;case`extensions`:Array.isArray(val)&&val.every(item=>typeof item==`string`)&&(c[prop]=val);break;case`hostOnly`:case`pathIsDefault`:(typeof val==`boolean`||val===null)&&(c[prop]=val)}}}),c}var cookieDefaults={key:``,value:``,expires:`Infinity`,maxAge:null,domain:null,path:null,secure:!1,httpOnly:!1,extensions:null,hostOnly:null,pathIsDefault:null,creation:null,lastAccessed:null,sameSite:void 0},_Cookie=class _Cookie{constructor(options={}){this.key=options.key??cookieDefaults.key,this.value=options.value??cookieDefaults.value,this.expires=options.expires??cookieDefaults.expires,this.maxAge=options.maxAge??cookieDefaults.maxAge,this.domain=options.domain??cookieDefaults.domain,this.path=options.path??cookieDefaults.path,this.secure=options.secure??cookieDefaults.secure,this.httpOnly=options.httpOnly??cookieDefaults.httpOnly,this.extensions=options.extensions??cookieDefaults.extensions,this.creation=options.creation??cookieDefaults.creation,this.hostOnly=options.hostOnly??cookieDefaults.hostOnly,this.pathIsDefault=options.pathIsDefault??cookieDefaults.pathIsDefault,this.lastAccessed=options.lastAccessed??cookieDefaults.lastAccessed,this.sameSite=options.sameSite??cookieDefaults.sameSite,this.creation=options.creation??new Date,Object.defineProperty(this,"creationIndex",{configurable:!1,enumerable:!1,writable:!0,value:++_Cookie.cookiesCreated}),this.creationIndex=_Cookie.cookiesCreated}[Symbol.for(`nodejs.util.inspect.custom`)](){let now=Date.now(),hostOnly=this.hostOnly==null?`?`:this.hostOnly.toString(),createAge=this.creation&&this.creation!==`Infinity`?`${String(now-this.creation.getTime())}ms`:`?`,accessAge=this.lastAccessed&&this.lastAccessed!==`Infinity`?`${String(now-this.lastAccessed.getTime())}ms`:`?`;return`Cookie="${this.toString()}; hostOnly=${hostOnly}; aAge=${accessAge}; cAge=${createAge}"`}toJSON(){let obj={};for(let prop of _Cookie.serializableProperties){let val=this[prop];if(val!==cookieDefaults[prop])switch(prop){case`key`:case`value`:case`sameSite`:typeof val==`string`&&(obj[prop]=val);break;case`expires`:case`creation`:case`lastAccessed`:typeof val==`number`||typeof val==`string`||val instanceof Date?obj[prop]=val==`Infinity`?`Infinity`:new Date(val).toISOString():val===null&&(obj[prop]=null);break;case`maxAge`:(typeof val==`number`||val===`Infinity`||val===`-Infinity`)&&(obj[prop]=val);break;case`domain`:case`path`:(typeof val==`string`||val===null)&&(obj[prop]=val);break;case`secure`:case`httpOnly`:typeof val==`boolean`&&(obj[prop]=val);break;case`extensions`:Array.isArray(val)&&(obj[prop]=val);break;case`hostOnly`:case`pathIsDefault`:(typeof val==`boolean`||val===null)&&(obj[prop]=val)}}return obj}clone(){return fromJSON(this.toJSON())}validate(){if(!this.value||!COOKIE_OCTETS.test(this.value)||this.expires!=`Infinity`&&!(this.expires instanceof Date)&&!parseDate(this.expires)||this.maxAge!=null&&this.maxAge!==`Infinity`&&(this.maxAge===`-Infinity`||this.maxAge<=0)||this.path!=null&&!PATH_VALUE.test(this.path))return!1;let cdomain=this.cdomain();return!cdomain||!cdomain.match(/\.$/)&&getPublicSuffix(cdomain)!=null}setExpires(exp){this.expires=exp instanceof Date?exp:parseDate(exp)||`Infinity`}setMaxAge(age){this.maxAge=age===1/0?`Infinity`:age===-1/0?`-Infinity`:age}cookieString(){let val=this.value||``;return this.key?`${this.key}=${val}`:val}toString(){let str=this.cookieString();return this.expires!=`Infinity`&&this.expires instanceof Date&&(str+=`; Expires=${formatDate(this.expires)}`),this.maxAge!=null&&this.maxAge!=1/0&&(str+=`; Max-Age=${String(this.maxAge)}`),this.domain&&!this.hostOnly&&(str+=`; Domain=${this.domain}`),this.path&&(str+=`; Path=${this.path}`),this.secure&&(str+=`; Secure`),this.httpOnly&&(str+=`; HttpOnly`),this.sameSite&&this.sameSite!==`none`&&(this.sameSite.toLowerCase()===_Cookie.sameSiteCanonical.lax.toLowerCase()?str+=`; SameSite=${_Cookie.sameSiteCanonical.lax}`:this.sameSite.toLowerCase()===_Cookie.sameSiteCanonical.strict.toLowerCase()?str+=`; SameSite=${_Cookie.sameSiteCanonical.strict}`:str+=`; SameSite=${this.sameSite}`),this.extensions&&this.extensions.forEach(ext=>{str+=`; ${ext}`}),str}TTL(now=Date.now()){if(this.maxAge!=null&&typeof this.maxAge==`number`)return this.maxAge<=0?0:this.maxAge*1e3;let expires=this.expires;return expires===`Infinity`?1/0:(expires?.getTime()??now)-(now||Date.now())}expiryTime(now){if(this.maxAge!=null){let relativeTo=now||this.lastAccessed||new Date,maxAge=typeof this.maxAge==`number`?this.maxAge:-1/0,age=maxAge<=0?-1/0:maxAge*1e3;return relativeTo===`Infinity`?1/0:relativeTo.getTime()+age}return this.expires==`Infinity`?1/0:this.expires?this.expires.getTime():void 0}expiryDate(now){let millisec=this.expiryTime(now);return millisec==1/0?new Date(2147483647e3):millisec==-1/0?new Date(0):millisec==null?void 0:new Date(millisec)}isPersistent(){return this.maxAge!=null||this.expires!=`Infinity`}canonicalizedDomain(){return canonicalDomain(this.domain)}cdomain(){return canonicalDomain(this.domain)}static parse(str,options){return parse(str,options)}static fromJSON(str){return fromJSON(str)}};_Cookie.cookiesCreated=0,_Cookie.sameSiteLevel={strict:3,lax:2,none:1},_Cookie.sameSiteCanonical={strict:`Strict`,lax:`Lax`},_Cookie.serializableProperties=[`key`,`value`,`expires`,`maxAge`,`domain`,`path`,`secure`,`httpOnly`,`extensions`,`hostOnly`,`pathIsDefault`,`creation`,`lastAccessed`,`sameSite`];var Cookie=_Cookie,MAX_TIME=2147483647e3;function cookieCompare(a,b){let cmp,aPathLen=a.path?a.path.length:0;return cmp=(b.path?b.path.length:0)-aPathLen,cmp!==0||(cmp=(a.creation&&a.creation instanceof Date?a.creation.getTime():MAX_TIME)-(b.creation&&b.creation instanceof Date?b.creation.getTime():MAX_TIME),cmp!==0)||(cmp=(a.creationIndex||0)-(b.creationIndex||0)),cmp}function defaultPath(path){if(!path||path.slice(0,1)!==`/`)return`/`;if(path===`/`)return path;let rightSlash=path.lastIndexOf(`/`);return rightSlash===0?`/`:path.slice(0,rightSlash)}var IP_REGEX_LOWERCASE=/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-f\d]{1,4}:){7}(?:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,2}|:)|(?:[a-f\d]{1,4}:){4}(?:(?::[a-f\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,3}|:)|(?:[a-f\d]{1,4}:){3}(?:(?::[a-f\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,4}|:)|(?:[a-f\d]{1,4}:){2}(?:(?::[a-f\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,5}|:)|(?:[a-f\d]{1,4}:){1}(?:(?::[a-f\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,6}|:)|(?::(?:(?::[a-f\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,7}|:)))$)/;function domainMatch(domain,cookieDomain,canonicalize){if(domain==null||cookieDomain==null)return;let _str,_domStr;if(canonicalize===!1?(_str=domain,_domStr=cookieDomain):(_str=canonicalDomain(domain),_domStr=canonicalDomain(cookieDomain)),_str==null||_domStr==null)return;if(_str==_domStr)return!0;let idx=_str.lastIndexOf(_domStr);return idx<=0||_str.length!==_domStr.length+idx||_str.substring(idx-1,idx)!==`.`?!1:!IP_REGEX_LOWERCASE.test(_str)}function isLoopbackV4(address){let octets=address.split(`.`);return octets.length===4&&octets[0]!==void 0&&parseInt(octets[0],10)===127}function isLoopbackV6(address){return address===`::1`}function isNormalizedLocalhostTLD(lowerHost){return lowerHost.endsWith(`.localhost`)}function isLocalHostname(host){let lowerHost=host.toLowerCase();return lowerHost===`localhost`||isNormalizedLocalhostTLD(lowerHost)}function hostNoBrackets(host){return host.length>=2&&host.startsWith(`[`)&&host.endsWith(`]`)?host.substring(1,host.length-1):host}function isPotentiallyTrustworthy(inputUrl,allowSecureOnLocal=!0){let url;if(typeof inputUrl==`string`)try{url=new URL(inputUrl)}catch{return!1}else url=inputUrl;let scheme=url.protocol.replace(`:`,``).toLowerCase(),hostname=hostNoBrackets(url.hostname).replace(/\.+$/,``);return scheme===`https`||scheme===`wss`?!0:allowSecureOnLocal?IP_V4_REGEX_OBJECT.test(hostname)?isLoopbackV4(hostname):IP_V6_REGEX_OBJECT.test(hostname)?isLoopbackV6(hostname):isLocalHostname(hostname):!1}var defaultSetCookieOptions={loose:!1,sameSiteContext:void 0,ignoreError:!1,http:!0},defaultGetCookieOptions={http:!0,expire:!0,allPaths:!1,sameSiteContext:void 0,sort:void 0},SAME_SITE_CONTEXT_VAL_ERR=`Invalid sameSiteContext option for getCookies(); expected one of "strict", "lax", or "none"`;function getCookieContext(url){if(url&&typeof url==`object`&&`hostname`in url&&typeof url.hostname==`string`&&`pathname`in url&&typeof url.pathname==`string`&&`protocol`in url&&typeof url.protocol==`string`)return{hostname:url.hostname,pathname:url.pathname,protocol:url.protocol};if(typeof url==`string`){let parsed=new URL(url),pathname=parsed.pathname;try{pathname=decodeURI(pathname)}catch{}return{hostname:parsed.hostname,pathname,protocol:parsed.protocol}}throw new ParameterError("`url` argument is not a string or URL.")}function checkSameSiteContext(value){let context=value.toLowerCase();if(context===`none`||context===`lax`||context===`strict`)return context}function isSecurePrefixConditionMet(cookie){return!(typeof cookie.key==`string`&&cookie.key.startsWith(`__Secure-`))||cookie.secure}function isHostPrefixConditionMet(cookie){return!(typeof cookie.key==`string`&&cookie.key.startsWith(`__Host-`))||!!(cookie.secure&&cookie.hostOnly&&cookie.path!=null&&cookie.path===`/`)}function getNormalizedPrefixSecurity(prefixSecurity){let normalizedPrefixSecurity=prefixSecurity.toLowerCase();switch(normalizedPrefixSecurity){case PrefixSecurityEnum.STRICT:case PrefixSecurityEnum.SILENT:case PrefixSecurityEnum.DISABLED:return normalizedPrefixSecurity;default:return PrefixSecurityEnum.SILENT}}var CookieJar=class _CookieJar{constructor(store,options){typeof options==`boolean`&&(options={rejectPublicSuffixes:options}),this.rejectPublicSuffixes=options?.rejectPublicSuffixes??!0,this.enableLooseMode=options?.looseMode??!1,this.allowSpecialUseDomain=options?.allowSpecialUseDomain??!0,this.allowSecureOnLocal=options?.allowSecureOnLocal??!0,this.prefixSecurity=getNormalizedPrefixSecurity(options?.prefixSecurity??`silent`),this.store=store??new MemoryCookieStore}callSync(fn){if(!this.store.synchronous)throw Error(`CookieJar store is not synchronous; use async API instead.`);let syncErr=null,syncResult;try{fn.call(this,(error,result)=>{syncErr=error,syncResult=result})}catch(err){syncErr=err}if(syncErr)throw syncErr;return syncResult}setCookie(cookie,url,options,callback){typeof options==`function`&&(callback=options,options=void 0);let promiseCallback=createPromiseCallback(callback),cb=promiseCallback.callback,context;try{if(typeof url==`string`&&validate(isNonEmptyString(url),callback,safeToString(options)),context=getCookieContext(url),typeof url==`function`)return promiseCallback.reject(Error(`No URL was specified`));if(typeof options==`function`&&(options=defaultSetCookieOptions),validate(typeof cb==`function`,cb),!isNonEmptyString(cookie)&&!isObject$1(cookie)&&cookie instanceof String&&cookie.length==0)return promiseCallback.resolve(void 0)}catch(err){return promiseCallback.reject(err)}let host=canonicalDomain(context.hostname)??null,loose=options?.loose||this.enableLooseMode,sameSiteContext=null;if(options?.sameSiteContext&&(sameSiteContext=checkSameSiteContext(options.sameSiteContext),!sameSiteContext))return promiseCallback.reject(Error(SAME_SITE_CONTEXT_VAL_ERR));if(typeof cookie==`string`||cookie instanceof String){let parsedCookie=Cookie.parse(cookie.toString(),{loose});if(!parsedCookie){let err=Error(`Cookie failed to parse`);return options?.ignoreError?promiseCallback.resolve(void 0):promiseCallback.reject(err)}cookie=parsedCookie}else if(!(cookie instanceof Cookie)){let err=Error(`First argument to setCookie must be a Cookie object or string`);return options?.ignoreError?promiseCallback.resolve(void 0):promiseCallback.reject(err)}let now=options?.now||new Date;if(this.rejectPublicSuffixes&&cookie.domain)try{let cdomain=cookie.cdomain();if((typeof cdomain==`string`?getPublicSuffix(cdomain,{allowSpecialUseDomain:this.allowSpecialUseDomain,ignoreError:options?.ignoreError}):null)==null&&!IP_V6_REGEX_OBJECT.test(cookie.domain)){let err=Error(`Cookie has domain set to a public suffix`);return options?.ignoreError?promiseCallback.resolve(void 0):promiseCallback.reject(err)}}catch(err){return options?.ignoreError?promiseCallback.resolve(void 0):promiseCallback.reject(err)}if(cookie.domain){if(!domainMatch(host??void 0,cookie.cdomain()??void 0,!1)){let err=Error(`Cookie not in this host's domain. Cookie:${cookie.cdomain()??`null`} Request:${host??`null`}`);return options?.ignoreError?promiseCallback.resolve(void 0):promiseCallback.reject(err)}cookie.hostOnly??(cookie.hostOnly=!1)}else cookie.hostOnly=!0,cookie.domain=host;if((!cookie.path||cookie.path[0]!==`/`)&&(cookie.path=defaultPath(context.pathname),cookie.pathIsDefault=!0),options?.http===!1&&cookie.httpOnly){let err=Error(`Cookie is HttpOnly and this isn't an HTTP API`);return options.ignoreError?promiseCallback.resolve(void 0):promiseCallback.reject(err)}if(cookie.sameSite!==`none`&&cookie.sameSite!==void 0&&sameSiteContext&&sameSiteContext===`none`){let err=Error(`Cookie is SameSite but this is a cross-origin request`);return options?.ignoreError?promiseCallback.resolve(void 0):promiseCallback.reject(err)}let ignoreErrorForPrefixSecurity=this.prefixSecurity===PrefixSecurityEnum.SILENT;if(this.prefixSecurity!==PrefixSecurityEnum.DISABLED){let errorFound=!1,errorMsg;if(isSecurePrefixConditionMet(cookie)?isHostPrefixConditionMet(cookie)||(errorFound=!0,errorMsg=`Cookie has __Host prefix but either Secure or HostOnly attribute is not set or Path is not '/'`):(errorFound=!0,errorMsg=`Cookie has __Secure prefix but Secure attribute is not set`),errorFound)return options?.ignoreError||ignoreErrorForPrefixSecurity?promiseCallback.resolve(void 0):promiseCallback.reject(Error(errorMsg))}let store=this.store;return store.updateCookie||=async function(_oldCookie,newCookie,cb2){return this.putCookie(newCookie).then(()=>cb2?.(null),error=>cb2?.(error))},store.findCookie(cookie.domain,cookie.path,cookie.key,function(err,oldCookie){if(err){cb(err);return}let next=function(err2){err2?cb(err2):typeof cookie==`string`?cb(null,void 0):cb(null,cookie)};if(oldCookie){if(options&&`http`in options&&options.http===!1&&oldCookie.httpOnly){err=Error(`old Cookie is HttpOnly and this isn't an HTTP API`),options.ignoreError?cb(null,void 0):cb(err);return}cookie instanceof Cookie&&(cookie.creation=oldCookie.creation,cookie.creationIndex=oldCookie.creationIndex,cookie.lastAccessed=now,store.updateCookie(oldCookie,cookie,next))}else cookie instanceof Cookie&&(cookie.creation=cookie.lastAccessed=now,store.putCookie(cookie,next))}),promiseCallback.promise}setCookieSync(cookie,url,options){let setCookieFn=options?this.setCookie.bind(this,cookie,url,options):this.setCookie.bind(this,cookie,url);return this.callSync(setCookieFn)}getCookies(url,options,callback){typeof options==`function`?(callback=options,options=defaultGetCookieOptions):options===void 0&&(options=defaultGetCookieOptions);let promiseCallback=createPromiseCallback(callback),cb=promiseCallback.callback,context;try{typeof url==`string`&&validate(isNonEmptyString(url),cb,url),context=getCookieContext(url),validate(isObject$1(options),cb,safeToString(options)),validate(typeof cb==`function`,cb)}catch(parameterError){return promiseCallback.reject(parameterError)}let host=canonicalDomain(context.hostname),path=context.pathname||`/`,potentiallyTrustworthy=isPotentiallyTrustworthy(url,this.allowSecureOnLocal),sameSiteLevel=0;if(options.sameSiteContext){let sameSiteContext=checkSameSiteContext(options.sameSiteContext);if(sameSiteContext==null||(sameSiteLevel=Cookie.sameSiteLevel[sameSiteContext],!sameSiteLevel))return promiseCallback.reject(Error(SAME_SITE_CONTEXT_VAL_ERR))}let http=options.http??!0,now=Date.now(),expireCheck=options.expire??!0,allPaths=options.allPaths??!1,store=this.store;function matchingCookie(c){if(c.hostOnly){if(c.domain!=host)return!1}else if(!domainMatch(host??void 0,c.domain??void 0,!1))return!1;if(!allPaths&&typeof c.path==`string`&&!pathMatch(path,c.path)||c.secure&&!potentiallyTrustworthy||c.httpOnly&&!http)return!1;if(sameSiteLevel){let cookieLevel;if(cookieLevel=c.sameSite===`lax`?Cookie.sameSiteLevel.lax:c.sameSite===`strict`?Cookie.sameSiteLevel.strict:Cookie.sameSiteLevel.none,cookieLevel>sameSiteLevel)return!1}let expiryTime=c.expiryTime();return expireCheck&&expiryTime!=null&&expiryTime<=now?(store.removeCookie(c.domain,c.path,c.key,()=>{}),!1):!0}return store.findCookies(host,allPaths?null:path,this.allowSpecialUseDomain,(err,cookies)=>{if(err){cb(err);return}if(cookies==null){cb(null,[]);return}cookies=cookies.filter(matchingCookie),`sort`in options&&options.sort!==!1&&(cookies=cookies.sort(cookieCompare));let now2=new Date;for(let cookie of cookies)cookie.lastAccessed=now2;cb(null,cookies)}),promiseCallback.promise}getCookiesSync(url,options){return this.callSync(this.getCookies.bind(this,url,options))??[]}getCookieString(url,options,callback){typeof options==`function`&&(callback=options,options=void 0);let promiseCallback=createPromiseCallback(callback);return this.getCookies(url,options,function(err,cookies){err?promiseCallback.callback(err):promiseCallback.callback(null,cookies?.sort(cookieCompare).map(c=>c.cookieString()).join(`; `))}),promiseCallback.promise}getCookieStringSync(url,options){return this.callSync(options?this.getCookieString.bind(this,url,options):this.getCookieString.bind(this,url))??``}getSetCookieStrings(url,options,callback){typeof options==`function`&&(callback=options,options=void 0);let promiseCallback=createPromiseCallback(callback);return this.getCookies(url,options,function(err,cookies){err?promiseCallback.callback(err):promiseCallback.callback(null,cookies?.map(c=>c.toString()))}),promiseCallback.promise}getSetCookieStringsSync(url,options={}){return this.callSync(this.getSetCookieStrings.bind(this,url,options))??[]}serialize(callback){let promiseCallback=createPromiseCallback(callback),type=this.store.constructor.name;isObject$1(type)&&(type=null);let serialized={version:`tough-cookie@${version}`,storeType:type,rejectPublicSuffixes:this.rejectPublicSuffixes,enableLooseMode:this.enableLooseMode,allowSpecialUseDomain:this.allowSpecialUseDomain,prefixSecurity:getNormalizedPrefixSecurity(this.prefixSecurity),cookies:[]};return typeof this.store.getAllCookies==`function`?(this.store.getAllCookies((err,cookies)=>{if(err){promiseCallback.callback(err);return}if(cookies==null){promiseCallback.callback(null,serialized);return}serialized.cookies=cookies.map(cookie=>{let serializedCookie=cookie.toJSON();return delete serializedCookie.creationIndex,serializedCookie}),promiseCallback.callback(null,serialized)}),promiseCallback.promise):promiseCallback.reject(Error(`store does not support getAllCookies and cannot be serialized`))}serializeSync(){return this.callSync(callback=>{this.serialize(callback)})}toJSON(){return this.serializeSync()}_importCookies(serialized,callback){let cookies;if(serialized&&typeof serialized==`object`&&inOperator(`cookies`,serialized)&&Array.isArray(serialized.cookies)&&(cookies=serialized.cookies),!cookies){callback(Error(`serialized jar has no cookies array`),void 0);return}cookies=cookies.slice();let putNext=err=>{if(err){callback(err,void 0);return}if(Array.isArray(cookies)){if(!cookies.length){callback(err,this);return}let cookie;try{cookie=Cookie.fromJSON(cookies.shift())}catch(e){callback(e instanceof Error?e:Error(),void 0);return}if(cookie===void 0){putNext(null);return}this.store.putCookie(cookie,putNext)}};putNext(null)}_importCookiesSync(serialized){this.callSync(this._importCookies.bind(this,serialized))}clone(newStore,callback){typeof newStore==`function`&&(callback=newStore,newStore=void 0);let promiseCallback=createPromiseCallback(callback),cb=promiseCallback.callback;return this.serialize((err,serialized)=>err?promiseCallback.reject(err):_CookieJar.deserialize(serialized??``,newStore,cb)),promiseCallback.promise}_cloneSync(newStore){let cloneFn=newStore&&typeof newStore!=`function`?this.clone.bind(this,newStore):this.clone.bind(this);return this.callSync(callback=>{cloneFn(callback)})}cloneSync(newStore){if(!newStore)return this._cloneSync();if(!newStore.synchronous)throw Error(`CookieJar clone destination store is not synchronous; use async API instead.`);return this._cloneSync(newStore)}removeAllCookies(callback){let promiseCallback=createPromiseCallback(callback),cb=promiseCallback.callback,store=this.store;return typeof store.removeAllCookies==`function`&&store.removeAllCookies!==Store.prototype.removeAllCookies?(store.removeAllCookies(cb),promiseCallback.promise):(store.getAllCookies((err,cookies)=>{if(err){cb(err);return}if(cookies||=[],cookies.length===0){cb(null,void 0);return}let completedCount=0,removeErrors=[],removeCookieCb=function(removeErr){if(removeErr&&removeErrors.push(removeErr),completedCount++,completedCount===cookies.length){removeErrors[0]?cb(removeErrors[0]):cb(null,void 0);return}};cookies.forEach(cookie=>{store.removeCookie(cookie.domain,cookie.path,cookie.key,removeCookieCb)})}),promiseCallback.promise)}removeAllCookiesSync(){this.callSync(callback=>{this.removeAllCookies(callback)})}static deserialize(strOrObj,store,callback){typeof store==`function`&&(callback=store,store=void 0);let promiseCallback=createPromiseCallback(callback),serialized;if(typeof strOrObj==`string`)try{serialized=JSON.parse(strOrObj)}catch(e){return promiseCallback.reject(e instanceof Error?e:Error())}else serialized=strOrObj;let readSerializedProperty=property=>serialized&&typeof serialized==`object`&&inOperator(property,serialized)?serialized[property]:void 0,readSerializedBoolean=property=>{let value=readSerializedProperty(property);return typeof value==`boolean`?value:void 0},jar=new _CookieJar(store,{rejectPublicSuffixes:readSerializedBoolean(`rejectPublicSuffixes`),looseMode:readSerializedBoolean(`enableLooseMode`),allowSpecialUseDomain:readSerializedBoolean(`allowSpecialUseDomain`),prefixSecurity:getNormalizedPrefixSecurity((property=>{let value=readSerializedProperty(property);return typeof value==`string`?value:void 0})(`prefixSecurity`)??`silent`)});return jar._importCookies(serialized,err=>{if(err){promiseCallback.callback(err);return}promiseCallback.callback(null,jar)}),promiseCallback.promise}static deserializeSync(strOrObj,store){let serialized=typeof strOrObj==`string`?JSON.parse(strOrObj):strOrObj,readSerializedProperty=property=>serialized&&typeof serialized==`object`&&inOperator(property,serialized)?serialized[property]:void 0,readSerializedBoolean=property=>{let value=readSerializedProperty(property);return typeof value==`boolean`?value:void 0},jar=new _CookieJar(store,{rejectPublicSuffixes:readSerializedBoolean(`rejectPublicSuffixes`),looseMode:readSerializedBoolean(`enableLooseMode`),allowSpecialUseDomain:readSerializedBoolean(`allowSpecialUseDomain`),prefixSecurity:getNormalizedPrefixSecurity((property=>{let value=readSerializedProperty(property);return typeof value==`string`?value:void 0})(`prefixSecurity`)??`silent`)});if(!jar.store.synchronous)throw Error(`CookieJar store is not synchronous; use async API instead.`);return jar._importCookiesSync(serialized),jar}static fromJSON(jsonString,store){return _CookieJar.deserializeSync(jsonString,store)}};
|
|
32
|
+
/*!
|
|
33
|
+
* Copyright (c) 2015-2020, Salesforce.com, Inc.
|
|
34
|
+
* All rights reserved.
|
|
35
|
+
*
|
|
36
|
+
* Redistribution and use in source and binary forms, with or without
|
|
37
|
+
* modification, are permitted provided that the following conditions are met:
|
|
38
|
+
*
|
|
39
|
+
* 1. Redistributions of source code must retain the above copyright notice,
|
|
40
|
+
* this list of conditions and the following disclaimer.
|
|
41
|
+
*
|
|
42
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
43
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
44
|
+
* and/or other materials provided with the distribution.
|
|
45
|
+
*
|
|
46
|
+
* 3. Neither the name of Salesforce.com nor the names of its contributors may
|
|
47
|
+
* be used to endorse or promote products derived from this software without
|
|
48
|
+
* specific prior written permission.
|
|
49
|
+
*
|
|
50
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
51
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
52
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
53
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
54
|
+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
55
|
+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
56
|
+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
57
|
+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
58
|
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
59
|
+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
60
|
+
* POSSIBILITY OF SUCH DAMAGE.
|
|
61
|
+
*/
|
|
62
|
+
function jsonParse(value){try{return JSON.parse(value)}catch{return}}const cookieStore=new class{#storageKey=`__msw-cookie-store__`;#jar;#memoryStore;constructor(){isNodeProcess$1()||invariant$1(typeof localStorage<`u`,"Failed to create a CookieStore: `localStorage` is not available in this environment. This is likely an issue with your environment, which has been detected as browser (or browser-like) environment and must implement global browser APIs correctly."),this.#memoryStore=new MemoryCookieStore,this.#memoryStore.idx=this.getCookieStoreIndex(),this.#jar=new CookieJar(this.#memoryStore)}getCookies(url){return this.#jar.getCookiesSync(url)}async setCookie(cookieName,url){await this.#jar.setCookie(cookieName,url),this.persist()}getCookieStoreIndex(){if(typeof localStorage>`u`||typeof localStorage.getItem!=`function`)return{};let cookiesString=localStorage.getItem(this.#storageKey);if(cookiesString==null)return{};let rawCookies=jsonParse(cookiesString);if(rawCookies==null)return{};let cookies={};for(let rawCookie of rawCookies){let cookie=Cookie.fromJSON(rawCookie);cookie!=null&&cookie.domain!=null&&cookie.path!=null&&(cookies[cookie.domain]||={},cookies[cookie.domain][cookie.path]||={},cookies[cookie.domain][cookie.path][cookie.key]=cookie)}return cookies}persist(){if(typeof localStorage>`u`||typeof localStorage.setItem!=`function`)return;let data=[],{idx}=this.#memoryStore;for(let domain in idx)for(let path in idx[domain])for(let key in idx[domain][path])data.push(idx[domain][path][key].toJSON());localStorage.setItem(this.#storageKey,JSON.stringify(data))}};function parseCookies(input){let parsedCookies=parse$1(input),cookies={};for(let cookieName in parsedCookies)parsedCookies[cookieName]!==void 0&&(cookies[cookieName]=parsedCookies[cookieName]);return cookies}function getAllDocumentCookies(){return parseCookies(document.cookie)}function getDocumentCookies(request){if(typeof document>`u`||typeof location>`u`)return{};switch(request.credentials){case`same-origin`:{let requestUrl=new URL(request.url);return location.origin===requestUrl.origin?getAllDocumentCookies():{}}case`include`:return getAllDocumentCookies();default:return{}}}function getAllRequestCookies(request){let requestCookieHeader=request.headers.get(`cookie`),cookiesFromHeaders=requestCookieHeader?parseCookies(requestCookieHeader):{},cookiesFromDocument=getDocumentCookies(request);for(let name in cookiesFromDocument)request.headers.append(`cookie`,serialize$7(name,cookiesFromDocument[name]));let cookiesFromStore=cookieStore.getCookies(request.url),storedCookiesObject=Object.fromEntries(cookiesFromStore.map(cookie=>[cookie.key,cookie.value]));for(let cookie of cookiesFromStore)request.headers.append(`cookie`,cookie.toString());return{...cookiesFromDocument,...storedCookiesObject,...cookiesFromHeaders}}var HttpMethods=(HttpMethods2=>(HttpMethods2.HEAD=`HEAD`,HttpMethods2.GET=`GET`,HttpMethods2.POST=`POST`,HttpMethods2.PUT=`PUT`,HttpMethods2.PATCH=`PATCH`,HttpMethods2.OPTIONS=`OPTIONS`,HttpMethods2.DELETE=`DELETE`,HttpMethods2))(HttpMethods||{}),HttpHandler=class extends RequestHandler{constructor(method,predicate,resolver,options){let displayPath=typeof predicate==`function`?`[custom predicate]`:predicate;super({info:{header:`${method}${displayPath?` ${displayPath}`:``}`,path:predicate,method},resolver,options}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){let{method,path}=this.info;!path||path instanceof RegExp||typeof path==`function`||cleanUrl(path)!==path&&devUtils.warn(`Found a redundant usage of query parameters in the request handler URL for "${method} ${path}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/http/intercepting-requests#querysearch-parameters`)}async parse(args){let url=new URL(args.request.url),cookies=getAllRequestCookies(args.request);if(typeof this.info.path==`function`){let customPredicateResult=await this.info.path({request:args.request,cookies});return{match:typeof customPredicateResult==`boolean`?{matches:customPredicateResult,params:{}}:customPredicateResult,cookies}}return{match:this.info.path?matchRequestUrl(url,this.info.path,args.resolutionContext?.baseUrl):{matches:!1,params:{}},cookies}}async predicate(args){let hasMatchingMethod=this.matchMethod(args.request.method),hasMatchingUrl=args.parsedResult.match.matches;return hasMatchingMethod&&hasMatchingUrl}matchMethod(actualMethod){return this.info.method instanceof RegExp?this.info.method.test(actualMethod):isStringEqual(this.info.method,actualMethod)}extendResolverArgs(args){return{params:args.parsedResult.match?.params||{},cookies:args.parsedResult.cookies}}async log(args){let publicUrl=toPublicUrl(args.request.url),loggedRequest=await serializeRequest(args.request),loggedResponse=await serializeResponse(args.response),statusColor=getStatusCodeColor(loggedResponse.status);console.groupCollapsed(devUtils.formatMessage(`${getTimestamp()} ${args.request.method} ${publicUrl} (%c${loggedResponse.status} ${loggedResponse.statusText}%c)`),`color:${statusColor}`,`color:inherit`),console.log(`Request`,loggedRequest),console.log(`Handler:`,this),console.log(`Response`,loggedResponse),console.groupEnd()}};function createHttpHandler(method){return(predicate,resolver,options={})=>new HttpHandler(method,predicate,resolver,options)}const http={all:createHttpHandler(/.+/),head:createHttpHandler(HttpMethods.HEAD),get:createHttpHandler(HttpMethods.GET),post:createHttpHandler(HttpMethods.POST),put:createHttpHandler(HttpMethods.PUT),delete:createHttpHandler(HttpMethods.DELETE),patch:createHttpHandler(HttpMethods.PATCH),options:createHttpHandler(HttpMethods.OPTIONS)};async function until$1(callback){try{return[null,await callback().catch(error=>{throw error})]}catch(error){return[error,null]}}function isCommonAssetRequest(request){let url=new URL(request.url);return url.protocol===`file:`||/(fonts\.googleapis\.com)/.test(url.hostname)||/node_modules/.test(url.pathname)||url.pathname.includes(`@vite`)?!0:/\.(s?css|less|m?jsx?|m?tsx?|html|ttf|otf|woff|woff2|eot|gif|jpe?g|png|avif|webp|svg|mp4|webm|ogg|mov|mp3|wav|ogg|flac|aac|pdf|txt|csv|json|xml|md|zip|tar|gz|rar|7z)$/i.test(url.pathname)}async function storeResponseCookies(request,response){let responseCookies=getRawSetCookie(response);responseCookies&&await cookieStore.setCookie(responseCookies,request.url)}var d$1=e=>String(e);d$1.open=d$1.close=``;var i$1=()=>d$1,t$1=`\x1B[39m`,o=`\x1B[49m`,F=(e,r,a,n,l)=>{let m=``,g=0;do m+=e.substring(g,n)+a,g=n+l,n=e.indexOf(r,g);while(~n);return m+e.substring(g)},u$1=(e,r,a=e,n=e.length)=>{let l=r.length,m=g=>{let s=g+``,x=s.indexOf(r,n);return~x?e+F(s,r,a,x,l)+r:e+s+r};return m.open=e,m.close=r,m},B=(e,r)=>u$1(e,r,e,5),c=e=>{let r=e.charCodeAt(0)===35?e.slice(1):e,a=parseInt(r,16)||0;return r.length<6?`${(a>>8&15)*17};${(a>>4&15)*17};${(a&15)*17}`:`${a>>16&255};${a>>8&255};${a&255}`};function y$1(e){let r=e?u$1:i$1;return{isColorSupported:e,reset:r(`\x1B[0m`,`\x1B[0m`),bold:r(`\x1B[1m`,`\x1B[22m`,`\x1B[22m\x1B[1m`),dim:r(`\x1B[2m`,`\x1B[22m`,`\x1B[22m\x1B[2m`),italic:r(`\x1B[3m`,`\x1B[23m`),underline:r(`\x1B[4m`,`\x1B[24m`),inverse:r(`\x1B[7m`,`\x1B[27m`),hidden:r(`\x1B[8m`,`\x1B[28m`),strikethrough:r(`\x1B[9m`,`\x1B[29m`),black:r(`\x1B[30m`,t$1),red:r(`\x1B[31m`,t$1),green:r(`\x1B[32m`,t$1),yellow:r(`\x1B[33m`,t$1),blue:r(`\x1B[34m`,t$1),magenta:r(`\x1B[35m`,t$1),cyan:r(`\x1B[36m`,t$1),white:r(`\x1B[37m`,t$1),gray:r(`\x1B[90m`,t$1),bgBlack:r(`\x1B[40m`,o),bgRed:r(`\x1B[41m`,o),bgGreen:r(`\x1B[42m`,o),bgYellow:r(`\x1B[43m`,o),bgBlue:r(`\x1B[44m`,o),bgMagenta:r(`\x1B[45m`,o),bgCyan:r(`\x1B[46m`,o),bgWhite:r(`\x1B[47m`,o),blackBright:r(`\x1B[90m`,t$1),redBright:r(`\x1B[91m`,t$1),greenBright:r(`\x1B[92m`,t$1),yellowBright:r(`\x1B[93m`,t$1),blueBright:r(`\x1B[94m`,t$1),magentaBright:r(`\x1B[95m`,t$1),cyanBright:r(`\x1B[96m`,t$1),whiteBright:r(`\x1B[97m`,t$1),bgBlackBright:r(`\x1B[100m`,o),bgRedBright:r(`\x1B[101m`,o),bgGreenBright:r(`\x1B[102m`,o),bgYellowBright:r(`\x1B[103m`,o),bgBlueBright:r(`\x1B[104m`,o),bgMagentaBright:r(`\x1B[105m`,o),bgCyanBright:r(`\x1B[106m`,o),bgWhiteBright:r(`\x1B[107m`,o),rgb:e?(n,l,m)=>B(`\x1B[38;2;${n};${l};${m}m`,t$1):i$1,bgRgb:e?(n,l,m)=>B(`\x1B[48;2;${n};${l};${m}m`,o):i$1,hex:e?n=>B(`\x1B[38;2;${c(n)}m`,t$1):i$1,bgHex:e?n=>B(`\x1B[48;2;${c(n)}m`,o):i$1}}function C$1(){let e=typeof process<`u`?process:void 0,r=e?.env||{},a=r.FORCE_TTY!==`false`,n=e?.argv||[];return!(`NO_COLOR`in r||n.includes(`--no-color`))&&(`FORCE_COLOR`in r||n.includes(`--color`)||e?.platform===`win32`||a&&r.TERM!==`dumb`||`CI`in r)||typeof window<`u`&&!!window.chrome}function h$1({force:e}={}){return y$1(e||C$1())}var $=h$1();function _mergeNamespaces(n,m){return m.forEach(function(e){e&&typeof e!=`string`&&!Array.isArray(e)&&Object.keys(e).forEach(function(k){if(k!=="default"&&!(k in n)){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:!0,get:function(){return e[k]}})}})}),Object.freeze(n)}function getKeysOfEnumerableProperties(object,compareKeys){let rawKeys=Object.keys(object),keys=compareKeys===null?rawKeys:rawKeys.sort(compareKeys);if(Object.getOwnPropertySymbols)for(let symbol of Object.getOwnPropertySymbols(object))Object.getOwnPropertyDescriptor(object,symbol).enumerable&&keys.push(symbol);return keys}function printIteratorEntries(iterator,config,indentation,depth,refs,printer,separator=`: `,length){let result=``,width=0,current=iterator.next();if(!current.done){result+=config.spacingOuter;let indentationNext=indentation+config.indent;for(;!current.done;){if(result+=indentationNext,width++===config.maxWidth){result+=typeof length==`number`?`…(${length-width+1})`:`…`;break}let name=printer(current.value[0],config,indentationNext,depth,refs),value=printer(current.value[1],config,indentationNext,depth,refs);result+=name+separator+value,current=iterator.next(),current.done?config.min||(result+=`,`):result+=`,${config.spacingInner}`}result+=config.spacingOuter+indentation}return result}function printIteratorValues(iterator,config,indentation,depth,refs,printer,length){let result=``,width=0,current=iterator.next();if(!current.done){result+=config.spacingOuter;let indentationNext=indentation+config.indent;for(;!current.done;){if(result+=indentationNext,width++===config.maxWidth){result+=typeof length==`number`?`…(${length-width+1})`:`…`;break}result+=printer(current.value,config,indentationNext,depth,refs),current=iterator.next(),current.done?config.min||(result+=`,`):result+=`,${config.spacingInner}`}result+=config.spacingOuter+indentation}return result}function printListItems(list,config,indentation,depth,refs,printer){let result=``;list=list instanceof ArrayBuffer?new DataView(list):list;let isDataView=l=>l instanceof DataView,length=isDataView(list)?list.byteLength:list.length;if(length>0){result+=config.spacingOuter;let indentationNext=indentation+config.indent;for(let i=0;i<length;i++){if(result+=indentationNext,i===config.maxWidth){result+=`…(${length-i})`;break}(isDataView(list)||i in list)&&(result+=printer(isDataView(list)?list.getInt8(i):list[i],config,indentationNext,depth,refs)),i<length-1?result+=`,${config.spacingInner}`:config.min||(result+=`,`)}result+=config.spacingOuter+indentation}return result}function printObjectProperties(val,config,indentation,depth,refs,printer,compareKeysOverride=config.compareKeys){let result=``,keys=getKeysOfEnumerableProperties(val,compareKeysOverride);if(keys.length>0){result+=config.spacingOuter;let indentationNext=indentation+config.indent;for(let i=0;i<keys.length;i++){if(result+=indentationNext,i===config.maxWidth){result+=`…(${keys.length-i})`;break}let key=keys[i],name=!config.quoteKeys&&isUnquotableKey(key)?key:printer(key,config,indentationNext,depth,refs),value=printer(val[key],config,indentationNext,depth,refs);result+=`${name}: ${value}`,i<keys.length-1?result+=`,${config.spacingInner}`:config.min||(result+=`,`)}result+=config.spacingOuter+indentation}return result}const keyStrRegExp=/^[a-z_]\w*$/i;function isUnquotableKey(key){return typeof key==`string`&&key!==`__proto__`&&keyStrRegExp.test(key)}const asymmetricMatcher=typeof Symbol==`function`&&Symbol.for?Symbol.for(`jest.asymmetricMatcher`):1267621,plugin$5={serialize:(val,config,indentation,depth,refs,printer)=>{let stringedValue=val.toString();if(stringedValue===`ArrayContaining`||stringedValue===`ArrayNotContaining`)return++depth>config.maxDepth?`[${stringedValue}]`:`${stringedValue+` `}[${printListItems(val.sample,config,indentation,depth,refs,printer)}]`;if(stringedValue===`ObjectContaining`||stringedValue===`ObjectNotContaining`)return++depth>config.maxDepth?`[${stringedValue}]`:`${stringedValue+` `}{${printObjectProperties(val.sample,config,indentation,depth,refs,printer)}}`;if(stringedValue===`StringMatching`||stringedValue===`StringNotMatching`||stringedValue===`StringContaining`||stringedValue===`StringNotContaining`)return stringedValue+` `+printer(val.sample,config,indentation,depth,refs);if(typeof val.toAsymmetricMatcher!=`function`)throw TypeError(`Asymmetric matcher ${val.constructor.name} does not implement toAsymmetricMatcher()`);return val.toAsymmetricMatcher()},test:val=>val&&val.$$typeof===asymmetricMatcher},OBJECT_NAMES=new Set([`DOMStringMap`,`NamedNodeMap`]),ARRAY_REGEXP=/^(?:HTML\w*Collection|NodeList)$/;function testName(name){return OBJECT_NAMES.has(name)||ARRAY_REGEXP.test(name)}const test$4=val=>val&&val.constructor&&!!val.constructor.name&&testName(val.constructor.name);function isNamedNodeMap(collection){return collection.constructor.name===`NamedNodeMap`}const plugin$4={serialize:(collection,config,indentation,depth,refs,printer)=>{let name=collection.constructor.name;return++depth>config.maxDepth?`[${name}]`:(config.min?``:name+` `)+(OBJECT_NAMES.has(name)?`{${printObjectProperties(isNamedNodeMap(collection)?[...collection].reduce((props,attribute)=>(props[attribute.name]=attribute.value,props),{}):{...collection},config,indentation,depth,refs,printer)}}`:`[${printListItems([...collection],config,indentation,depth,refs,printer)}]`)},test:test$4};function escapeHTML(str){return str.replaceAll(`<`,`<`).replaceAll(`>`,`>`)}function printProps(keys,props,config,indentation,depth,refs,printer){let indentationNext=indentation+config.indent,colors=config.colors;return keys.map(key=>{let value=props[key];if(typeof value==`string`&&value[0]===`_`&&value.startsWith(`__vitest_`)&&/__vitest_\d+__/.test(value))return``;let printed=printer(value,config,indentationNext,depth,refs);return typeof value!=`string`&&(printed.includes(`
|
|
63
|
+
`)&&(printed=config.spacingOuter+indentationNext+printed+config.spacingOuter+indentation),printed=`{${printed}}`),`${config.spacingInner+indentation+colors.prop.open+key+colors.prop.close}=${colors.value.open}${printed}${colors.value.close}`}).join(``)}function printChildren(children,config,indentation,depth,refs,printer){return children.map(child=>config.spacingOuter+indentation+(typeof child==`string`?printText(child,config):printer(child,config,indentation,depth,refs))).join(``)}function printShadowRoot(children,config,indentation,depth,refs,printer){return config.printShadowRoot===!1?``:[`${config.spacingOuter+indentation}#shadow-root`,printChildren(children,config,indentation+config.indent,depth,refs,printer)].join(``)}function printText(text,config){let contentColor=config.colors.content;return contentColor.open+escapeHTML(text)+contentColor.close}function printComment(comment,config){let commentColor=config.colors.comment;return`${commentColor.open}<!--${escapeHTML(comment)}-->${commentColor.close}`}function printElement(type,printedProps,printedChildren,config,indentation){let tagColor=config.colors.tag;return`${tagColor.open}<${type}${printedProps&&tagColor.close+printedProps+config.spacingOuter+indentation+tagColor.open}${printedChildren?`>${tagColor.close}${printedChildren}${config.spacingOuter}${indentation}${tagColor.open}</${type}`:`${printedProps&&!config.min?``:` `}/`}>${tagColor.close}`}function printElementAsLeaf(type,config){let tagColor=config.colors.tag;return`${tagColor.open}<${type}${tagColor.close} …${tagColor.open} />${tagColor.close}`}const ELEMENT_REGEXP=/^(?:(?:HTML|SVG)\w*)?Element$/;function testHasAttribute(val){try{return typeof val.hasAttribute==`function`&&val.hasAttribute(`is`)}catch{return!1}}function testNode(val){let constructorName=val.constructor.name,{nodeType,tagName}=val,isCustomElement=typeof tagName==`string`&&tagName.includes(`-`)||testHasAttribute(val);return nodeType===1&&(ELEMENT_REGEXP.test(constructorName)||isCustomElement)||nodeType===3&&constructorName===`Text`||nodeType===8&&constructorName===`Comment`||nodeType===11&&constructorName===`DocumentFragment`}const test$3=val=>val?.constructor?.name&&testNode(val);function nodeIsText(node){return node.nodeType===3}function nodeIsComment(node){return node.nodeType===8}function nodeIsFragment(node){return node.nodeType===11}function filterChildren(children,filterNode){let filtered=children.filter(node=>node.nodeType!==3||(node.data||``).trim().length>0);return filterNode&&(filtered=filtered.filter(filterNode)),filtered}function serializeDOM(node,config,indentation,depth,refs,printer,filterNode){if(nodeIsText(node))return printText(node.data,config);if(nodeIsComment(node))return printComment(node.data,config);let type=nodeIsFragment(node)?`DocumentFragment`:node.tagName.toLowerCase();if(++depth>config.maxDepth)return printElementAsLeaf(type,config);let children=Array.prototype.slice.call(node.childNodes||node.children),shadowChildren=nodeIsFragment(node)||!node.shadowRoot?[]:Array.prototype.slice.call(node.shadowRoot.children),resolvedChildren=filterNode?filterChildren(children,filterNode):children,resolvedShadowChildren=filterNode?filterChildren(shadowChildren,filterNode):shadowChildren;return printElement(type,printProps(nodeIsFragment(node)?[]:Array.from(node.attributes,attr=>attr.name).sort(),nodeIsFragment(node)?{}:[...node.attributes].reduce((props,attribute)=>(props[attribute.name]=attribute.value,props),{}),config,indentation+config.indent,depth,refs,printer),(resolvedShadowChildren.length>0?printShadowRoot(resolvedShadowChildren,config,indentation+config.indent,depth,refs,printer):``)+printChildren(resolvedChildren,config,indentation+config.indent,depth,refs,printer),config,indentation)}const serialize$3=(node,config,indentation,depth,refs,printer)=>serializeDOM(node,config,indentation,depth,refs,printer);function createDOMElementFilter(filterNode){return{test:test$3,serialize:(node,config,indentation,depth,refs,printer)=>serializeDOM(node,config,indentation,depth,refs,printer,filterNode)}}const plugin$3={serialize:serialize$3,test:test$3},IS_ORDERED_SENTINEL$1=`@@__IMMUTABLE_ORDERED__@@`,getImmutableName=name=>`Immutable.${name}`,printAsLeaf=name=>`[${name}]`;function printImmutableEntries(val,config,indentation,depth,refs,printer,type){return++depth>config.maxDepth?printAsLeaf(getImmutableName(type)):`${getImmutableName(type)+` `}{${printIteratorEntries(val.entries(),config,indentation,depth,refs,printer)}}`}function getRecordEntries(val){let i=0;return{next(){if(i<val._keys.length){let key=val._keys[i++];return{done:!1,value:[key,val.get(key)]}}return{done:!0,value:void 0}}}}function printImmutableRecord(val,config,indentation,depth,refs,printer){let name=getImmutableName(val._name||`Record`);return++depth>config.maxDepth?printAsLeaf(name):`${name+` `}{${printIteratorEntries(getRecordEntries(val),config,indentation,depth,refs,printer)}}`}function printImmutableSeq(val,config,indentation,depth,refs,printer){let name=getImmutableName(`Seq`);return++depth>config.maxDepth?printAsLeaf(name):val[`@@__IMMUTABLE_KEYED__@@`]?`${name+` `}{${val._iter||val._object?printIteratorEntries(val.entries(),config,indentation,depth,refs,printer):`…`}}`:`${name+` `}[${val._iter||val._array||val._collection||val._iterable?printIteratorValues(val.values(),config,indentation,depth,refs,printer):`…`}]`}function printImmutableValues(val,config,indentation,depth,refs,printer,type){return++depth>config.maxDepth?printAsLeaf(getImmutableName(type)):`${getImmutableName(type)+` `}[${printIteratorValues(val.values(),config,indentation,depth,refs,printer)}]`}const plugin$2={serialize:(val,config,indentation,depth,refs,printer)=>val[`@@__IMMUTABLE_MAP__@@`]?printImmutableEntries(val,config,indentation,depth,refs,printer,val[IS_ORDERED_SENTINEL$1]?`OrderedMap`:`Map`):val[`@@__IMMUTABLE_LIST__@@`]?printImmutableValues(val,config,indentation,depth,refs,printer,`List`):val[`@@__IMMUTABLE_SET__@@`]?printImmutableValues(val,config,indentation,depth,refs,printer,val[IS_ORDERED_SENTINEL$1]?`OrderedSet`:`Set`):val[`@@__IMMUTABLE_STACK__@@`]?printImmutableValues(val,config,indentation,depth,refs,printer,`Stack`):val[`@@__IMMUTABLE_SEQ__@@`]?printImmutableSeq(val,config,indentation,depth,refs,printer):printImmutableRecord(val,config,indentation,depth,refs,printer),test:val=>val&&(val[`@@__IMMUTABLE_ITERABLE__@@`]===!0||val[`@@__IMMUTABLE_RECORD__@@`]===!0)};var commonjsGlobal=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,`default`)?x.default:x}var reactIs$1={exports:{}},reactIs_production={},hasRequiredReactIs_production
|
|
64
|
+
/**
|
|
65
|
+
* @license React
|
|
66
|
+
* react-is.production.js
|
|
67
|
+
*
|
|
68
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the MIT license found in the
|
|
71
|
+
* LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/
|
|
73
|
+
;function requireReactIs_production(){if(hasRequiredReactIs_production)return reactIs_production;hasRequiredReactIs_production=1;var REACT_ELEMENT_TYPE=Symbol.for(`react.transitional.element`),REACT_PORTAL_TYPE=Symbol.for(`react.portal`),REACT_FRAGMENT_TYPE=Symbol.for(`react.fragment`),REACT_STRICT_MODE_TYPE=Symbol.for(`react.strict_mode`),REACT_PROFILER_TYPE=Symbol.for(`react.profiler`),REACT_CONSUMER_TYPE=Symbol.for(`react.consumer`),REACT_CONTEXT_TYPE=Symbol.for(`react.context`),REACT_FORWARD_REF_TYPE=Symbol.for(`react.forward_ref`),REACT_SUSPENSE_TYPE=Symbol.for(`react.suspense`),REACT_SUSPENSE_LIST_TYPE=Symbol.for(`react.suspense_list`),REACT_MEMO_TYPE=Symbol.for(`react.memo`),REACT_LAZY_TYPE=Symbol.for(`react.lazy`),REACT_VIEW_TRANSITION_TYPE=Symbol.for(`react.view_transition`),REACT_CLIENT_REFERENCE=Symbol.for(`react.client.reference`);function typeOf(object){if(typeof object==`object`&&object){var $$typeof=object.$$typeof;switch($$typeof){case REACT_ELEMENT_TYPE:switch(object=object.type,object){case REACT_FRAGMENT_TYPE:case REACT_PROFILER_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_SUSPENSE_TYPE:case REACT_SUSPENSE_LIST_TYPE:case REACT_VIEW_TRANSITION_TYPE:return object;default:switch(object&&=object.$$typeof,object){case REACT_CONTEXT_TYPE:case REACT_FORWARD_REF_TYPE:case REACT_LAZY_TYPE:case REACT_MEMO_TYPE:return object;case REACT_CONSUMER_TYPE:return object;default:return $$typeof}}case REACT_PORTAL_TYPE:return $$typeof}}}return reactIs_production.ContextConsumer=REACT_CONSUMER_TYPE,reactIs_production.ContextProvider=REACT_CONTEXT_TYPE,reactIs_production.Element=REACT_ELEMENT_TYPE,reactIs_production.ForwardRef=REACT_FORWARD_REF_TYPE,reactIs_production.Fragment=REACT_FRAGMENT_TYPE,reactIs_production.Lazy=REACT_LAZY_TYPE,reactIs_production.Memo=REACT_MEMO_TYPE,reactIs_production.Portal=REACT_PORTAL_TYPE,reactIs_production.Profiler=REACT_PROFILER_TYPE,reactIs_production.StrictMode=REACT_STRICT_MODE_TYPE,reactIs_production.Suspense=REACT_SUSPENSE_TYPE,reactIs_production.SuspenseList=REACT_SUSPENSE_LIST_TYPE,reactIs_production.isContextConsumer=function(object){return typeOf(object)===REACT_CONSUMER_TYPE},reactIs_production.isContextProvider=function(object){return typeOf(object)===REACT_CONTEXT_TYPE},reactIs_production.isElement=function(object){return typeof object==`object`&&!!object&&object.$$typeof===REACT_ELEMENT_TYPE},reactIs_production.isForwardRef=function(object){return typeOf(object)===REACT_FORWARD_REF_TYPE},reactIs_production.isFragment=function(object){return typeOf(object)===REACT_FRAGMENT_TYPE},reactIs_production.isLazy=function(object){return typeOf(object)===REACT_LAZY_TYPE},reactIs_production.isMemo=function(object){return typeOf(object)===REACT_MEMO_TYPE},reactIs_production.isPortal=function(object){return typeOf(object)===REACT_PORTAL_TYPE},reactIs_production.isProfiler=function(object){return typeOf(object)===REACT_PROFILER_TYPE},reactIs_production.isStrictMode=function(object){return typeOf(object)===REACT_STRICT_MODE_TYPE},reactIs_production.isSuspense=function(object){return typeOf(object)===REACT_SUSPENSE_TYPE},reactIs_production.isSuspenseList=function(object){return typeOf(object)===REACT_SUSPENSE_LIST_TYPE},reactIs_production.isValidElementType=function(type){return!!(typeof type==`string`||typeof type==`function`||type===REACT_FRAGMENT_TYPE||type===REACT_PROFILER_TYPE||type===REACT_STRICT_MODE_TYPE||type===REACT_SUSPENSE_TYPE||type===REACT_SUSPENSE_LIST_TYPE||type===REACT_VIEW_TRANSITION_TYPE||typeof type==`object`&&type&&(type.$$typeof===REACT_LAZY_TYPE||type.$$typeof===REACT_MEMO_TYPE||type.$$typeof===REACT_CONTEXT_TYPE||type.$$typeof===REACT_CONSUMER_TYPE||type.$$typeof===REACT_FORWARD_REF_TYPE||type.$$typeof===REACT_CLIENT_REFERENCE||type.getModuleId!==void 0))},reactIs_production.typeOf=typeOf,reactIs_production}var reactIs_development$1={},hasRequiredReactIs_development$1
|
|
74
|
+
/**
|
|
75
|
+
* @license React
|
|
76
|
+
* react-is.development.js
|
|
77
|
+
*
|
|
78
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the MIT license found in the
|
|
81
|
+
* LICENSE file in the root directory of this source tree.
|
|
82
|
+
*/
|
|
83
|
+
;function requireReactIs_development$1(){return hasRequiredReactIs_development$1?reactIs_development$1:(hasRequiredReactIs_development$1=1,process.env.NODE_ENV!==`production`&&(function(){function typeOf(object){if(typeof object==`object`&&object){var $$typeof=object.$$typeof;switch($$typeof){case REACT_ELEMENT_TYPE:switch(object=object.type,object){case REACT_FRAGMENT_TYPE:case REACT_PROFILER_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_SUSPENSE_TYPE:case REACT_SUSPENSE_LIST_TYPE:case REACT_VIEW_TRANSITION_TYPE:return object;default:switch(object&&=object.$$typeof,object){case REACT_CONTEXT_TYPE:case REACT_FORWARD_REF_TYPE:case REACT_LAZY_TYPE:case REACT_MEMO_TYPE:return object;case REACT_CONSUMER_TYPE:return object;default:return $$typeof}}case REACT_PORTAL_TYPE:return $$typeof}}}var REACT_ELEMENT_TYPE=Symbol.for(`react.transitional.element`),REACT_PORTAL_TYPE=Symbol.for(`react.portal`),REACT_FRAGMENT_TYPE=Symbol.for(`react.fragment`),REACT_STRICT_MODE_TYPE=Symbol.for(`react.strict_mode`),REACT_PROFILER_TYPE=Symbol.for(`react.profiler`),REACT_CONSUMER_TYPE=Symbol.for(`react.consumer`),REACT_CONTEXT_TYPE=Symbol.for(`react.context`),REACT_FORWARD_REF_TYPE=Symbol.for(`react.forward_ref`),REACT_SUSPENSE_TYPE=Symbol.for(`react.suspense`),REACT_SUSPENSE_LIST_TYPE=Symbol.for(`react.suspense_list`),REACT_MEMO_TYPE=Symbol.for(`react.memo`),REACT_LAZY_TYPE=Symbol.for(`react.lazy`),REACT_VIEW_TRANSITION_TYPE=Symbol.for(`react.view_transition`),REACT_CLIENT_REFERENCE=Symbol.for(`react.client.reference`);reactIs_development$1.ContextConsumer=REACT_CONSUMER_TYPE,reactIs_development$1.ContextProvider=REACT_CONTEXT_TYPE,reactIs_development$1.Element=REACT_ELEMENT_TYPE,reactIs_development$1.ForwardRef=REACT_FORWARD_REF_TYPE,reactIs_development$1.Fragment=REACT_FRAGMENT_TYPE,reactIs_development$1.Lazy=REACT_LAZY_TYPE,reactIs_development$1.Memo=REACT_MEMO_TYPE,reactIs_development$1.Portal=REACT_PORTAL_TYPE,reactIs_development$1.Profiler=REACT_PROFILER_TYPE,reactIs_development$1.StrictMode=REACT_STRICT_MODE_TYPE,reactIs_development$1.Suspense=REACT_SUSPENSE_TYPE,reactIs_development$1.SuspenseList=REACT_SUSPENSE_LIST_TYPE,reactIs_development$1.isContextConsumer=function(object){return typeOf(object)===REACT_CONSUMER_TYPE},reactIs_development$1.isContextProvider=function(object){return typeOf(object)===REACT_CONTEXT_TYPE},reactIs_development$1.isElement=function(object){return typeof object==`object`&&!!object&&object.$$typeof===REACT_ELEMENT_TYPE},reactIs_development$1.isForwardRef=function(object){return typeOf(object)===REACT_FORWARD_REF_TYPE},reactIs_development$1.isFragment=function(object){return typeOf(object)===REACT_FRAGMENT_TYPE},reactIs_development$1.isLazy=function(object){return typeOf(object)===REACT_LAZY_TYPE},reactIs_development$1.isMemo=function(object){return typeOf(object)===REACT_MEMO_TYPE},reactIs_development$1.isPortal=function(object){return typeOf(object)===REACT_PORTAL_TYPE},reactIs_development$1.isProfiler=function(object){return typeOf(object)===REACT_PROFILER_TYPE},reactIs_development$1.isStrictMode=function(object){return typeOf(object)===REACT_STRICT_MODE_TYPE},reactIs_development$1.isSuspense=function(object){return typeOf(object)===REACT_SUSPENSE_TYPE},reactIs_development$1.isSuspenseList=function(object){return typeOf(object)===REACT_SUSPENSE_LIST_TYPE},reactIs_development$1.isValidElementType=function(type){return!!(typeof type==`string`||typeof type==`function`||type===REACT_FRAGMENT_TYPE||type===REACT_PROFILER_TYPE||type===REACT_STRICT_MODE_TYPE||type===REACT_SUSPENSE_TYPE||type===REACT_SUSPENSE_LIST_TYPE||type===REACT_VIEW_TRANSITION_TYPE||typeof type==`object`&&type&&(type.$$typeof===REACT_LAZY_TYPE||type.$$typeof===REACT_MEMO_TYPE||type.$$typeof===REACT_CONTEXT_TYPE||type.$$typeof===REACT_CONSUMER_TYPE||type.$$typeof===REACT_FORWARD_REF_TYPE||type.$$typeof===REACT_CLIENT_REFERENCE||type.getModuleId!==void 0))},reactIs_development$1.typeOf=typeOf})(),reactIs_development$1)}var hasRequiredReactIs$1;function requireReactIs$1(){return hasRequiredReactIs$1?reactIs$1.exports:(hasRequiredReactIs$1=1,reactIs$1.exports=process.env.NODE_ENV===`production`?requireReactIs_production():requireReactIs_development$1(),reactIs$1.exports)}var reactIsExports$1=requireReactIs$1(),ReactIs19=_mergeNamespaces({__proto__:null,default:getDefaultExportFromCjs(reactIsExports$1)},[reactIsExports$1]),reactIs={exports:{}},reactIs_production_min={},hasRequiredReactIs_production_min
|
|
84
|
+
/**
|
|
85
|
+
* @license React
|
|
86
|
+
* react-is.production.min.js
|
|
87
|
+
*
|
|
88
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the MIT license found in the
|
|
91
|
+
* LICENSE file in the root directory of this source tree.
|
|
92
|
+
*/
|
|
93
|
+
;function requireReactIs_production_min(){if(hasRequiredReactIs_production_min)return reactIs_production_min;hasRequiredReactIs_production_min=1;var b=Symbol.for(`react.element`),c=Symbol.for(`react.portal`),d=Symbol.for(`react.fragment`),e=Symbol.for(`react.strict_mode`),f=Symbol.for(`react.profiler`),g=Symbol.for(`react.provider`),h=Symbol.for(`react.context`),k=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),m=Symbol.for(`react.suspense`),n=Symbol.for(`react.suspense_list`),p=Symbol.for(`react.memo`),q=Symbol.for(`react.lazy`),t=Symbol.for(`react.offscreen`),u=Symbol.for(`react.module.reference`);function v(a){if(typeof a==`object`&&a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a&&=a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}return reactIs_production_min.ContextConsumer=h,reactIs_production_min.ContextProvider=g,reactIs_production_min.Element=b,reactIs_production_min.ForwardRef=l,reactIs_production_min.Fragment=d,reactIs_production_min.Lazy=q,reactIs_production_min.Memo=p,reactIs_production_min.Portal=c,reactIs_production_min.Profiler=f,reactIs_production_min.StrictMode=e,reactIs_production_min.Suspense=m,reactIs_production_min.SuspenseList=n,reactIs_production_min.isAsyncMode=function(){return!1},reactIs_production_min.isConcurrentMode=function(){return!1},reactIs_production_min.isContextConsumer=function(a){return v(a)===h},reactIs_production_min.isContextProvider=function(a){return v(a)===g},reactIs_production_min.isElement=function(a){return typeof a==`object`&&!!a&&a.$$typeof===b},reactIs_production_min.isForwardRef=function(a){return v(a)===l},reactIs_production_min.isFragment=function(a){return v(a)===d},reactIs_production_min.isLazy=function(a){return v(a)===q},reactIs_production_min.isMemo=function(a){return v(a)===p},reactIs_production_min.isPortal=function(a){return v(a)===c},reactIs_production_min.isProfiler=function(a){return v(a)===f},reactIs_production_min.isStrictMode=function(a){return v(a)===e},reactIs_production_min.isSuspense=function(a){return v(a)===m},reactIs_production_min.isSuspenseList=function(a){return v(a)===n},reactIs_production_min.isValidElementType=function(a){return!!(typeof a==`string`||typeof a==`function`||a===d||a===f||a===e||a===m||a===n||a===t||typeof a==`object`&&a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||a.getModuleId!==void 0))},reactIs_production_min.typeOf=v,reactIs_production_min}var reactIs_development={},hasRequiredReactIs_development
|
|
94
|
+
/**
|
|
95
|
+
* @license React
|
|
96
|
+
* react-is.development.js
|
|
97
|
+
*
|
|
98
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
99
|
+
*
|
|
100
|
+
* This source code is licensed under the MIT license found in the
|
|
101
|
+
* LICENSE file in the root directory of this source tree.
|
|
102
|
+
*/
|
|
103
|
+
;function requireReactIs_development(){return hasRequiredReactIs_development?reactIs_development:(hasRequiredReactIs_development=1,process.env.NODE_ENV!==`production`&&(function(){var REACT_ELEMENT_TYPE=Symbol.for(`react.element`),REACT_PORTAL_TYPE=Symbol.for(`react.portal`),REACT_FRAGMENT_TYPE=Symbol.for(`react.fragment`),REACT_STRICT_MODE_TYPE=Symbol.for(`react.strict_mode`),REACT_PROFILER_TYPE=Symbol.for(`react.profiler`),REACT_PROVIDER_TYPE=Symbol.for(`react.provider`),REACT_CONTEXT_TYPE=Symbol.for(`react.context`),REACT_SERVER_CONTEXT_TYPE=Symbol.for(`react.server_context`),REACT_FORWARD_REF_TYPE=Symbol.for(`react.forward_ref`),REACT_SUSPENSE_TYPE=Symbol.for(`react.suspense`),REACT_SUSPENSE_LIST_TYPE=Symbol.for(`react.suspense_list`),REACT_MEMO_TYPE=Symbol.for(`react.memo`),REACT_LAZY_TYPE=Symbol.for(`react.lazy`),REACT_OFFSCREEN_TYPE=Symbol.for(`react.offscreen`),REACT_MODULE_REFERENCE=Symbol.for(`react.module.reference`);function isValidElementType(type){return!!(typeof type==`string`||typeof type==`function`||type===REACT_FRAGMENT_TYPE||type===REACT_PROFILER_TYPE||type===REACT_STRICT_MODE_TYPE||type===REACT_SUSPENSE_TYPE||type===REACT_SUSPENSE_LIST_TYPE||type===REACT_OFFSCREEN_TYPE||typeof type==`object`&&type&&(type.$$typeof===REACT_LAZY_TYPE||type.$$typeof===REACT_MEMO_TYPE||type.$$typeof===REACT_PROVIDER_TYPE||type.$$typeof===REACT_CONTEXT_TYPE||type.$$typeof===REACT_FORWARD_REF_TYPE||type.$$typeof===REACT_MODULE_REFERENCE||type.getModuleId!==void 0))}function typeOf(object){if(typeof object==`object`&&object){var $$typeof=object.$$typeof;switch($$typeof){case REACT_ELEMENT_TYPE:var type=object.type;switch(type){case REACT_FRAGMENT_TYPE:case REACT_PROFILER_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_SUSPENSE_TYPE:case REACT_SUSPENSE_LIST_TYPE:return type;default:var $$typeofType=type&&type.$$typeof;switch($$typeofType){case REACT_SERVER_CONTEXT_TYPE:case REACT_CONTEXT_TYPE:case REACT_FORWARD_REF_TYPE:case REACT_LAZY_TYPE:case REACT_MEMO_TYPE:case REACT_PROVIDER_TYPE:return $$typeofType;default:return $$typeof}}case REACT_PORTAL_TYPE:return $$typeof}}}var ContextConsumer=REACT_CONTEXT_TYPE,ContextProvider=REACT_PROVIDER_TYPE,Element=REACT_ELEMENT_TYPE,ForwardRef=REACT_FORWARD_REF_TYPE,Fragment=REACT_FRAGMENT_TYPE,Lazy=REACT_LAZY_TYPE,Memo=REACT_MEMO_TYPE,Portal=REACT_PORTAL_TYPE,Profiler=REACT_PROFILER_TYPE,StrictMode=REACT_STRICT_MODE_TYPE,Suspense=REACT_SUSPENSE_TYPE,SuspenseList=REACT_SUSPENSE_LIST_TYPE,hasWarnedAboutDeprecatedIsAsyncMode=!1,hasWarnedAboutDeprecatedIsConcurrentMode=!1;function isAsyncMode(object){return hasWarnedAboutDeprecatedIsAsyncMode||(hasWarnedAboutDeprecatedIsAsyncMode=!0,console.warn(`The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.`)),!1}function isConcurrentMode(object){return hasWarnedAboutDeprecatedIsConcurrentMode||(hasWarnedAboutDeprecatedIsConcurrentMode=!0,console.warn(`The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.`)),!1}function isContextConsumer(object){return typeOf(object)===REACT_CONTEXT_TYPE}function isContextProvider(object){return typeOf(object)===REACT_PROVIDER_TYPE}function isElement(object){return typeof object==`object`&&!!object&&object.$$typeof===REACT_ELEMENT_TYPE}function isForwardRef(object){return typeOf(object)===REACT_FORWARD_REF_TYPE}function isFragment(object){return typeOf(object)===REACT_FRAGMENT_TYPE}function isLazy(object){return typeOf(object)===REACT_LAZY_TYPE}function isMemo(object){return typeOf(object)===REACT_MEMO_TYPE}function isPortal(object){return typeOf(object)===REACT_PORTAL_TYPE}function isProfiler(object){return typeOf(object)===REACT_PROFILER_TYPE}function isStrictMode(object){return typeOf(object)===REACT_STRICT_MODE_TYPE}function isSuspense(object){return typeOf(object)===REACT_SUSPENSE_TYPE}function isSuspenseList(object){return typeOf(object)===REACT_SUSPENSE_LIST_TYPE}reactIs_development.ContextConsumer=ContextConsumer,reactIs_development.ContextProvider=ContextProvider,reactIs_development.Element=Element,reactIs_development.ForwardRef=ForwardRef,reactIs_development.Fragment=Fragment,reactIs_development.Lazy=Lazy,reactIs_development.Memo=Memo,reactIs_development.Portal=Portal,reactIs_development.Profiler=Profiler,reactIs_development.StrictMode=StrictMode,reactIs_development.Suspense=Suspense,reactIs_development.SuspenseList=SuspenseList,reactIs_development.isAsyncMode=isAsyncMode,reactIs_development.isConcurrentMode=isConcurrentMode,reactIs_development.isContextConsumer=isContextConsumer,reactIs_development.isContextProvider=isContextProvider,reactIs_development.isElement=isElement,reactIs_development.isForwardRef=isForwardRef,reactIs_development.isFragment=isFragment,reactIs_development.isLazy=isLazy,reactIs_development.isMemo=isMemo,reactIs_development.isPortal=isPortal,reactIs_development.isProfiler=isProfiler,reactIs_development.isStrictMode=isStrictMode,reactIs_development.isSuspense=isSuspense,reactIs_development.isSuspenseList=isSuspenseList,reactIs_development.isValidElementType=isValidElementType,reactIs_development.typeOf=typeOf})(),reactIs_development)}var hasRequiredReactIs;function requireReactIs(){return hasRequiredReactIs?reactIs.exports:(hasRequiredReactIs=1,reactIs.exports=process.env.NODE_ENV===`production`?requireReactIs_production_min():requireReactIs_development(),reactIs.exports)}var reactIsExports=requireReactIs(),ReactIs18=_mergeNamespaces({__proto__:null,default:getDefaultExportFromCjs(reactIsExports)},[reactIsExports]);const ReactIs=Object.fromEntries([`isAsyncMode`,`isConcurrentMode`,`isContextConsumer`,`isContextProvider`,`isElement`,`isForwardRef`,`isFragment`,`isLazy`,`isMemo`,`isPortal`,`isProfiler`,`isStrictMode`,`isSuspense`,`isSuspenseList`,`isValidElementType`].map(m=>[m,v=>ReactIs18[m](v)||ReactIs19[m](v)]));function getChildren(arg,children=[]){if(Array.isArray(arg))for(let item of arg)getChildren(item,children);else arg!=null&&arg!==!1&&arg!==``&&children.push(arg);return children}function getType$2(element){let type=element.type;if(typeof type==`string`)return type;if(typeof type==`function`)return type.displayName||type.name||`Unknown`;if(ReactIs.isFragment(element))return`React.Fragment`;if(ReactIs.isSuspense(element))return`React.Suspense`;if(typeof type==`object`&&type){if(ReactIs.isContextProvider(element))return`Context.Provider`;if(ReactIs.isContextConsumer(element))return`Context.Consumer`;if(ReactIs.isForwardRef(element)){if(type.displayName)return type.displayName;let functionName=type.render.displayName||type.render.name||``;return functionName===``?`ForwardRef`:`ForwardRef(${functionName})`}if(ReactIs.isMemo(element)){let functionName=type.displayName||type.type.displayName||type.type.name||``;return functionName===``?`Memo`:`Memo(${functionName})`}}return`UNDEFINED`}function getPropKeys$1(element){let{props}=element;return Object.keys(props).filter(key=>key!==`children`&&props[key]!==void 0).sort()}const plugin$1={serialize:(element,config,indentation,depth,refs,printer)=>++depth>config.maxDepth?printElementAsLeaf(getType$2(element),config):printElement(getType$2(element),printProps(getPropKeys$1(element),element.props,config,indentation+config.indent,depth,refs,printer),printChildren(getChildren(element.props.children),config,indentation+config.indent,depth,refs,printer),config,indentation),test:val=>val!=null&&ReactIs.isElement(val)},testSymbol=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.test.json`):245830487;function getPropKeys(object){let{props}=object;return props?Object.keys(props).filter(key=>props[key]!==void 0).sort():[]}const plugin$6={serialize:(object,config,indentation,depth,refs,printer)=>++depth>config.maxDepth?printElementAsLeaf(object.type,config):printElement(object.type,object.props?printProps(getPropKeys(object),object.props,config,indentation+config.indent,depth,refs,printer):``,object.children?printChildren(object.children,config,indentation+config.indent,depth,refs,printer):``,config,indentation),test:val=>val&&val.$$typeof===testSymbol},toString$1=Object.prototype.toString,toISOString=Date.prototype.toISOString,errorToString=Error.prototype.toString,regExpToString=RegExp.prototype.toString;function getConstructorName$1(val){return typeof val.constructor==`function`&&val.constructor.name||`Object`}function isWindow(val){return typeof window<`u`&&val===window}const SYMBOL_REGEXP=/^Symbol\((.*)\)(.*)$/,NEWLINE_REGEXP=/\n/g;var PrettyFormatPluginError=class extends Error{constructor(message,stack){super(message),this.stack=stack,this.name=this.constructor.name}};function isToStringedArrayType(toStringed){return toStringed===`[object Array]`||toStringed===`[object ArrayBuffer]`||toStringed===`[object DataView]`||toStringed===`[object Float32Array]`||toStringed===`[object Float64Array]`||toStringed===`[object Int8Array]`||toStringed===`[object Int16Array]`||toStringed===`[object Int32Array]`||toStringed===`[object Uint8Array]`||toStringed===`[object Uint8ClampedArray]`||toStringed===`[object Uint16Array]`||toStringed===`[object Uint32Array]`}function printNumber(val){return Object.is(val,-0)?`-0`:String(val)}function printBigInt(val){return String(`${val}n`)}function printFunction(val,printFunctionName){return printFunctionName?`[Function ${val.name||`anonymous`}]`:`[Function]`}function printSymbol(val){return Symbol.prototype.toString.call(val).replace(SYMBOL_REGEXP,`Symbol($1)`)}function printError(val){return`[${errorToString.call(val)}]`}function printBasicValue(val,printFunctionName,escapeRegex,escapeString,singleQuote){if(val===!0||val===!1)return`${val}`;if(val===void 0)return`undefined`;if(val===null)return`null`;let typeOf=typeof val;if(typeOf===`number`)return printNumber(val);if(typeOf===`bigint`)return printBigInt(val);if(typeOf===`string`){let q=singleQuote?`'`:`"`;if(escapeString){let escapePattern=singleQuote?/['\\]/g:/["\\]/g;return`${q}${val.replaceAll(escapePattern,`\\$&`)}${q}`}return`${q}${val}${q}`}if(typeOf===`function`)return printFunction(val,printFunctionName);if(typeOf===`symbol`)return printSymbol(val);let toStringed=toString$1.call(val);return toStringed===`[object WeakMap]`?`WeakMap {}`:toStringed===`[object WeakSet]`?`WeakSet {}`:toStringed===`[object Function]`||toStringed===`[object GeneratorFunction]`?printFunction(val,printFunctionName):toStringed===`[object Symbol]`?printSymbol(val):toStringed===`[object Date]`?Number.isNaN(+val)?`Date { NaN }`:toISOString.call(val):toStringed===`[object Error]`?printError(val):toStringed===`[object RegExp]`?escapeRegex?regExpToString.call(val).replaceAll(/[$()*+.?[\\\]^{|}]/g,`\\$&`):regExpToString.call(val):val instanceof Error?printError(val):null}function printComplexValue(val,config,indentation,depth,refs,hasCalledToJSON){if(refs.includes(val))return`[Circular]`;refs=[...refs],refs.push(val);let hitMaxDepth=++depth>config.maxDepth,min=config.min;if(config.callToJSON&&!hitMaxDepth&&val.toJSON&&typeof val.toJSON==`function`&&!hasCalledToJSON)return printer(val.toJSON(),config,indentation,depth,refs,!0);let toStringed=toString$1.call(val);return toStringed===`[object Arguments]`?hitMaxDepth?`[Arguments]`:`${min?``:`Arguments `}[${printListItems(val,config,indentation,depth,refs,printer)}]`:isToStringedArrayType(toStringed)?hitMaxDepth?`[${val.constructor.name}]`:`${!config.printBasicPrototype&&val.constructor.name===`Array`?``:`${val.constructor.name} `}[${printListItems(val,config,indentation,depth,refs,printer)}]`:toStringed===`[object Map]`?hitMaxDepth?`[Map]`:`Map {${printIteratorEntries(val.entries(),config,indentation,depth,refs,printer,` => `,val.size)}}`:toStringed===`[object Set]`?hitMaxDepth?`[Set]`:`Set {${printIteratorValues(val.values(),config,indentation,depth,refs,printer,val.size)}}`:hitMaxDepth||isWindow(val)?`[${getConstructorName$1(val)}]`:`${!config.printBasicPrototype&&getConstructorName$1(val)===`Object`?``:`${getConstructorName$1(val)} `}{${printObjectProperties(val,config,indentation,depth,refs,printer)}}`}const ErrorPlugin={test:val=>val&&val instanceof Error,serialize(val,config,indentation,depth,refs,printer){if(refs.includes(val))return`[Circular]`;refs=[...refs,val];let hitMaxDepth=++depth>config.maxDepth,{message,cause,...rest}=val,entries={message,...cause===void 0?{}:{cause},...val instanceof AggregateError?{errors:val.errors}:{},...rest},name=val.name===`Error`?getConstructorName$1(val):val.name;return hitMaxDepth?`[${name}]`:`${name} {${printObjectProperties(entries,config,indentation,depth,refs,printer,null)}}`}};function isNewPlugin(plugin){return plugin.serialize!=null}function printPlugin(plugin,val,config,indentation,depth,refs){let printed;try{printed=isNewPlugin(plugin)?plugin.serialize(val,config,indentation,depth,refs,printer):plugin.print(val,valChild=>printer(valChild,config,indentation,depth,refs),str=>{let indentationNext=indentation+config.indent;return indentationNext+str.replaceAll(NEWLINE_REGEXP,`\n${indentationNext}`)},{edgeSpacing:config.spacingOuter,min:config.min,spacing:config.spacingInner},config.colors)}catch(error){throw new PrettyFormatPluginError(error.message,error.stack)}if(typeof printed!=`string`)throw TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof printed}".`);return printed}function findPlugin(plugins,val){for(let plugin of plugins)try{if(plugin.test(val))return plugin}catch(error){throw new PrettyFormatPluginError(error.message,error.stack)}return null}function printer(val,config,indentation,depth,refs,hasCalledToJSON){let result,plugin=findPlugin(config.plugins,val);if(plugin!==null)result=printPlugin(plugin,val,config,indentation,depth,refs);else{let basicResult=printBasicValue(val,config.printFunctionName,config.escapeRegex,config.escapeString,config.singleQuote);result=basicResult===null?printComplexValue(val,config,indentation,depth,refs,hasCalledToJSON):basicResult}return config._outputLengthPerDepth[depth]??=0,config._outputLengthPerDepth[depth]+=result.length,config._outputLengthPerDepth[depth]>config.maxOutputLength&&(config.maxDepth=0),result}const DEFAULT_THEME={comment:`gray`,content:`reset`,prop:`yellow`,tag:`cyan`,value:`green`},DEFAULT_THEME_KEYS=Object.keys(DEFAULT_THEME),DEFAULT_OPTIONS={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:1/0,maxOutputLength:1e6,maxWidth:1/0,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,printShadowRoot:!0,theme:DEFAULT_THEME,singleQuote:!1,quoteKeys:!0,spacingInner:`
|
|
104
|
+
`,spacingOuter:`
|
|
105
|
+
`};function validateOptions$1(options){for(let key of Object.keys(options))if(!Object.hasOwn(DEFAULT_OPTIONS,key))throw Error(`pretty-format: Unknown option "${key}".`);if(options.min&&options.indent!==void 0&&options.indent!==0)throw Error(`pretty-format: Options "min" and "indent" cannot be used together.`)}function getColorsHighlight(){return DEFAULT_THEME_KEYS.reduce((colors,key)=>{let value=DEFAULT_THEME[key],color=value&&$[value];if(color&&typeof color.close==`string`&&typeof color.open==`string`)colors[key]=color;else throw Error(`pretty-format: Option "theme" has a key "${key}" whose value "${value}" is undefined in ansi-styles.`);return colors},Object.create(null))}function getColorsEmpty(){return DEFAULT_THEME_KEYS.reduce((colors,key)=>(colors[key]={close:``,open:``},colors),Object.create(null))}function getPrintFunctionName(options){return options?.printFunctionName??DEFAULT_OPTIONS.printFunctionName}function getEscapeRegex(options){return options?.escapeRegex??DEFAULT_OPTIONS.escapeRegex}function getEscapeString(options){return options?.escapeString??DEFAULT_OPTIONS.escapeString}function getConfig(options){return{callToJSON:options?.callToJSON??DEFAULT_OPTIONS.callToJSON,colors:options?.highlight?getColorsHighlight():getColorsEmpty(),compareKeys:typeof options?.compareKeys==`function`||options?.compareKeys===null?options.compareKeys:DEFAULT_OPTIONS.compareKeys,escapeRegex:getEscapeRegex(options),escapeString:getEscapeString(options),indent:options?.min?``:createIndent(options?.indent??DEFAULT_OPTIONS.indent),maxDepth:options?.maxDepth??DEFAULT_OPTIONS.maxDepth,maxWidth:options?.maxWidth??DEFAULT_OPTIONS.maxWidth,min:options?.min??DEFAULT_OPTIONS.min,plugins:options?.plugins??DEFAULT_OPTIONS.plugins,printBasicPrototype:options?.printBasicPrototype??!options?.min,printFunctionName:getPrintFunctionName(options),printShadowRoot:options?.printShadowRoot??!0,spacingInner:options?.spacingInner??(options?.min?` `:`
|
|
106
|
+
`),spacingOuter:options?.spacingOuter??(options?.min?``:`
|
|
107
|
+
`),singleQuote:options?.singleQuote??DEFAULT_OPTIONS.singleQuote,quoteKeys:options?.quoteKeys??DEFAULT_OPTIONS.quoteKeys,maxOutputLength:options?.maxOutputLength??DEFAULT_OPTIONS.maxOutputLength,_outputLengthPerDepth:[]}}function createIndent(indent){return Array.from({length:indent+1}).join(` `)}function format$2(val,options){options&&validateOptions$1(options);let config=getConfig(options),plugin=findPlugin(config.plugins,val);if(plugin!==null)return printPlugin(plugin,val,config,``,0,[]);let basicResult=printBasicValue(val,config.printFunctionName,config.escapeRegex,config.escapeString,config.singleQuote);return basicResult===null?printComplexValue(val,config,``,0,[]):basicResult}const plugins={AsymmetricMatcher:plugin$5,DOMCollection:plugin$4,DOMElement:plugin$3,Immutable:plugin$2,ReactElement:plugin$1,ReactTestComponent:plugin$6,Error:ErrorPlugin},{AsymmetricMatcher:AsymmetricMatcher$3,DOMCollection:DOMCollection$2,DOMElement:DOMElement$2,Immutable:Immutable$2,ReactElement:ReactElement$2,ReactTestComponent:ReactTestComponent$2}=plugins,PLUGINS$2=[ReactTestComponent$2,ReactElement$2,DOMElement$2,DOMCollection$2,Immutable$2,AsymmetricMatcher$3];function stringify(object,maxDepth=10,{maxLength,filterNode,...options}={}){let MAX_LENGTH=maxLength??1e4,result,filterFn=typeof filterNode==`string`?createNodeFilterFromSelector(filterNode):filterNode,plugins=filterFn?[ReactTestComponent$2,ReactElement$2,createDOMElementFilter(filterFn),DOMCollection$2,Immutable$2,AsymmetricMatcher$3]:PLUGINS$2;try{result=format$2(object,{maxDepth,escapeString:!1,plugins,...options})}catch{result=format$2(object,{callToJSON:!1,maxDepth,escapeString:!1,plugins,...options})}return result.length>=MAX_LENGTH&&maxDepth>1?stringify(object,Math.floor(Math.min(maxDepth,2**53-1)/2),{maxLength,filterNode,...options}):result}function createNodeFilterFromSelector(selector){return node=>{if(node.nodeType===8)return!1;if(node.nodeType===1&&node.matches)try{return!node.matches(selector)}catch{return!0}return!0}}const formatRegExp=/%[sdjifoOc%]/g;function format$1(args,options={}){let formatArg=item=>inspect$1(item,options);if(typeof args[0]!=`string`){let objects=[];for(let i=0;i<args.length;i++)objects.push(formatArg(args[i]));return objects.join(` `)}let len=args.length,i=1,template=args[0],str=String(template).replace(formatRegExp,x=>{if(x===`%%`)return`%`;if(i>=len)return x;switch(x){case`%s`:{let value=args[i++];return typeof value==`bigint`?`${value.toString()}n`:typeof value==`number`&&value===0&&1/value<0?`-0`:typeof value==`object`&&value?typeof value.toString==`function`&&value.toString!==Object.prototype.toString?value.toString():formatArg(value):String(value)}case`%d`:{let value=args[i++];return typeof value==`bigint`?`${value.toString()}n`:typeof value==`symbol`?`NaN`:Number(value).toString()}case`%i`:{let value=args[i++];return typeof value==`bigint`?`${value.toString()}n`:Number.parseInt(String(value)).toString()}case`%f`:return Number.parseFloat(String(args[i++])).toString();case`%o`:case`%O`:return formatArg(args[i++]);case`%c`:return i++,``;case`%j`:try{return JSON.stringify(args[i++])}catch(err){let m=err.message;if(m.includes(`circular structure`)||m.includes(`cyclic structures`)||m.includes(`cyclic object`))return`[Circular]`;throw err}default:return x}});for(let x=args[i];i<len;x=args[++i])str+=typeof x!=`object`||!x?` ${typeof x==`symbol`?x.toString():x}`:` ${formatArg(x)}`;return str}function inspect$1(obj,options){let{truncate,multiline,...stringifyOptions}=options??{},prettyFormatOptions={singleQuote:!0,quoteKeys:!1,min:!0,spacingInner:` `,spacingOuter:` `,printBasicPrototype:!1,compareKeys:null,...multiline?{min:!1,spacingInner:void 0,spacingOuter:void 0}:{}},threshold=truncate??0,formatted=stringify(obj,void 0,{...prettyFormatOptions,...stringifyOptions,maxLength:threshold||void 0});if(threshold===0||formatted.length<=threshold)return formatted;let type=Object.prototype.toString.call(obj);if(typeof obj==`string`){let end=threshold-1;return end>0&&isHighSurrogate$1(formatted[end-1])&&--end,`'${formatted.slice(1,end)}…'`}return type===`[object Array]`||type===`[object Object]`||type===`[object Set]`||type===`[object Map]`?stringifyByMaxWidth(obj,threshold,{...prettyFormatOptions,...stringifyOptions,maxDepth:1}):stringify(obj,void 0,{...prettyFormatOptions,...stringifyOptions,maxDepth:0})}function truncateString(string,maxLength){if(string.length<=maxLength)return string;let end=maxLength-1;return isHighSurrogate$1(string[end-1])&&--end,`${string.slice(0,end)}…`}function stringifyByMaxWidth(object,threshold,options){function evaluate(x){return stringify(object,void 0,{...options,maxWidth:x})}return evaluate(binarySearch$1(0,threshold,x=>evaluate(x).length<=threshold))}function binarySearch$1(x0,x1,f){for(;x0+1<x1;){let x=Math.floor((x0+x1)/2);f(x)?x0=x:x1=x}return x0}function isHighSurrogate$1(char){return char>=`\ud800`&&char<=`\udbff`}RegExp(`\\.(${`apng.bmp.png.jpe?g.jfif.pjpeg.pjp.gif.svg.ico.webp.avif.mp4.webm.ogg.mp3.wav.flac.aac.woff2?.eot.ttf.otf.webmanifest.pdf.txt`.split(`.`).join(`|`)})$`);function createSimpleStackTrace(options){let{message=`$$stack trace error`,stackTraceLimit=1}=options||{},limit=Error.stackTraceLimit,prepareStackTrace=Error.prepareStackTrace;Error.stackTraceLimit=stackTraceLimit,Error.prepareStackTrace=e=>e.stack;let stackTrace=Error(message).stack||``;return Error.prepareStackTrace=prepareStackTrace,Error.stackTraceLimit=limit,stackTrace}function notNullish(v){return v!=null}function assertTypes(value,name,types){let receivedType=typeof value;if(!types.includes(receivedType))throw TypeError(`${name} value must be ${types.join(` or `)}, received "${receivedType}"`)}function isPrimitive$1(value){return value===null||typeof value!=`function`&&typeof value!=`object`}function filterOutComments(s){let result=[],commentState=`none`;for(let i=0;i<s.length;++i)commentState===`singleline`?s[i]===`
|
|
108
|
+
`&&(commentState=`none`):commentState===`multiline`?s[i-1]===`*`&&s[i]===`/`&&(commentState=`none`):commentState===`none`&&(s[i]===`/`&&s[i+1]===`/`?commentState=`singleline`:s[i]===`/`&&s[i+1]===`*`?(commentState=`multiline`,i+=2):result.push(s[i]));return result.join(``)}function toArray(array){return array??=[],Array.isArray(array)?array:[array]}function isObject(item){return typeof item==`object`&&!!item&&!Array.isArray(item)}function isFinalObj(obj){return obj===Object.prototype||obj===Function.prototype||obj===RegExp.prototype}function getType$1(value){return Object.prototype.toString.apply(value).slice(8,-1)}function collectOwnProperties(obj,collector){let collect=typeof collector==`function`?collector:key=>collector.add(key);Object.getOwnPropertyNames(obj).forEach(collect),Object.getOwnPropertySymbols(obj).forEach(collect)}function getOwnProperties(obj){let ownProps=new Set;return isFinalObj(obj)?[]:(collectOwnProperties(obj,ownProps),Array.from(ownProps))}const defaultCloneOptions={forceWritable:!1};function deepClone(val,options=defaultCloneOptions){return clone(val,new WeakMap,options)}function clone(val,seen,options=defaultCloneOptions){let k,out;if(seen.has(val))return seen.get(val);if(Array.isArray(val)){for(out=Array.from({length:k=val.length}),seen.set(val,out);k--;)out[k]=clone(val[k],seen,options);return out}if(Object.prototype.toString.call(val)===`[object Object]`){out=Object.create(Object.getPrototypeOf(val)),seen.set(val,out);let props=getOwnProperties(val);for(let k of props){let descriptor=Object.getOwnPropertyDescriptor(val,k);if(!descriptor)continue;let cloned=clone(val[k],seen,options);options.forceWritable?Object.defineProperty(out,k,{enumerable:descriptor.enumerable,configurable:!0,writable:!0,value:cloned}):`get`in descriptor?Object.defineProperty(out,k,{...descriptor,get(){return cloned}}):Object.defineProperty(out,k,{...descriptor,value:cloned})}return out}return val}function noop$1(){}function objectAttr(source,path,defaultValue=void 0){let paths=path.replace(/\[(\d+)\]/g,`.$1`).split(`.`),result=source;for(let p of paths)if(result=new Object(result)[p],result===void 0)return defaultValue;return result}function createDefer(){let resolve=null,reject=null,p=new Promise((_resolve,_reject)=>{resolve=_resolve,reject=_reject});return p.resolve=resolve,p.reject=reject,p}function getCallLastIndex(code){let charIndex=-1,inString=null,startedBracers=0,endedBracers=0,beforeChar=null;for(;charIndex<=code.length;){beforeChar=code[charIndex],charIndex++;let char=code[charIndex];if((char===`"`||char===`'`||char==="`")&&beforeChar!==`\\`&&(inString===char?inString=null:inString||=char),inString||(char===`(`&&startedBracers++,char===`)`&&endedBracers++),startedBracers&&endedBracers&&startedBracers===endedBracers)return charIndex}return null}function isNegativeNaN(val){if(!Number.isNaN(val))return!1;let f64=new Float64Array(1);return f64[0]=val,new Uint32Array(f64.buffer)[1]>>>31==1}function ordinal(i){let j=i%10,k=i%100;return j===1&&k!==11?`${i}st`:j===2&&k!==12?`${i}nd`:j===3&&k!==13?`${i}rd`:`${i}th`}function unique(array){return Array.from(new Set(array))}const _DRIVE_LETTER_START_RE=/^[A-Za-z]:\//;function normalizeWindowsPath(input=``){return input&&input.replace(/\\/g,`/`).replace(_DRIVE_LETTER_START_RE,r=>r.toUpperCase())}const _IS_ABSOLUTE_RE=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function cwd(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}const resolve=function(...arguments_){arguments_=arguments_.map(argument=>normalizeWindowsPath(argument));let resolvedPath=``,resolvedAbsolute=!1;for(let index=arguments_.length-1;index>=-1&&!resolvedAbsolute;index--){let path=index>=0?arguments_[index]:cwd();path&&path.length!==0&&(resolvedPath=`${path}/${resolvedPath}`,resolvedAbsolute=isAbsolute(path))}return resolvedPath=normalizeString(resolvedPath,!resolvedAbsolute),resolvedAbsolute&&!isAbsolute(resolvedPath)?`/${resolvedPath}`:resolvedPath.length>0?resolvedPath:`.`};function normalizeString(path,allowAboveRoot){let res=``,lastSegmentLength=0,lastSlash=-1,dots=0,char=null;for(let index=0;index<=path.length;++index){if(index<path.length)char=path[index];else if(char===`/`)break;else char=`/`;if(char===`/`){if(lastSlash!==index-1&&dots!==1){if(dots===2){if(res.length<2||lastSegmentLength!==2||res[res.length-1]!==`.`||res[res.length-2]!==`.`){if(res.length>2){let lastSlashIndex=res.lastIndexOf(`/`);lastSlashIndex===-1?(res=``,lastSegmentLength=0):(res=res.slice(0,lastSlashIndex),lastSegmentLength=res.length-1-res.lastIndexOf(`/`)),lastSlash=index,dots=0;continue}if(res.length>0){res=``,lastSegmentLength=0,lastSlash=index,dots=0;continue}}allowAboveRoot&&(res+=res.length>0?`/..`:`..`,lastSegmentLength=2)}else res.length>0?res+=`/${path.slice(lastSlash+1,index)}`:res=path.slice(lastSlash+1,index),lastSegmentLength=index-lastSlash-1}lastSlash=index,dots=0}else char===`.`&&dots!==-1?++dots:dots=-1}return res}const isAbsolute=function(p){return _IS_ABSOLUTE_RE.test(p)};var build={},hasRequiredBuild;function requireBuild(){if(hasRequiredBuild)return build;hasRequiredBuild=1,Object.defineProperty(build,"__esModule",{value:!0}),build.default=diffSequence;let pkg=`diff-sequences`,countCommonItemsF=(aIndex,aEnd,bIndex,bEnd,isCommon)=>{let nCommon=0;for(;aIndex<aEnd&&bIndex<bEnd&&isCommon(aIndex,bIndex);)aIndex+=1,bIndex+=1,nCommon+=1;return nCommon},countCommonItemsR=(aStart,aIndex,bStart,bIndex,isCommon)=>{let nCommon=0;for(;aStart<=aIndex&&bStart<=bIndex&&isCommon(aIndex,bIndex);)--aIndex,--bIndex,nCommon+=1;return nCommon},extendPathsF=(d,aEnd,bEnd,bF,isCommon,aIndexesF,iMaxF)=>{let iF=0,kF=-d,aFirst=aIndexesF[iF],aIndexPrev1=aFirst;aIndexesF[iF]+=countCommonItemsF(aFirst+1,aEnd,bF+aFirst-kF+1,bEnd,isCommon);let nF=d<iMaxF?d:iMaxF;for(iF+=1,kF+=2;iF<=nF;iF+=1,kF+=2){if(iF!==d&&aIndexPrev1<aIndexesF[iF])aFirst=aIndexesF[iF];else if(aFirst=aIndexPrev1+1,aEnd<=aFirst)return iF-1;aIndexPrev1=aIndexesF[iF],aIndexesF[iF]=aFirst+countCommonItemsF(aFirst+1,aEnd,bF+aFirst-kF+1,bEnd,isCommon)}return iMaxF},extendPathsR=(d,aStart,bStart,bR,isCommon,aIndexesR,iMaxR)=>{let iR=0,kR=d,aFirst=aIndexesR[iR],aIndexPrev1=aFirst;aIndexesR[iR]-=countCommonItemsR(aStart,aFirst-1,bStart,bR+aFirst-kR-1,isCommon);let nR=d<iMaxR?d:iMaxR;for(iR+=1,kR-=2;iR<=nR;iR+=1,kR-=2){if(iR!==d&&aIndexesR[iR]<aIndexPrev1)aFirst=aIndexesR[iR];else if(aFirst=aIndexPrev1-1,aFirst<aStart)return iR-1;aIndexPrev1=aIndexesR[iR],aIndexesR[iR]=aFirst-countCommonItemsR(aStart,aFirst-1,bStart,bR+aFirst-kR-1,isCommon)}return iMaxR},extendOverlappablePathsF=(d,aStart,aEnd,bStart,bEnd,isCommon,aIndexesF,iMaxF,aIndexesR,iMaxR,division)=>{let bF=bStart-aStart,aLength=aEnd-aStart,baDeltaLength=bEnd-bStart-aLength,kMinOverlapF=-baDeltaLength-(d-1),kMaxOverlapF=-baDeltaLength+(d-1),aIndexPrev1=0,nF=d<iMaxF?d:iMaxF;for(let iF=0,kF=-d;iF<=nF;iF+=1,kF+=2){let insert=iF===0||iF!==d&&aIndexPrev1<aIndexesF[iF],aLastPrev=insert?aIndexesF[iF]:aIndexPrev1,aFirst=insert?aLastPrev:aLastPrev+1,bFirst=bF+aFirst-kF,nCommonF=countCommonItemsF(aFirst+1,aEnd,bFirst+1,bEnd,isCommon),aLast=aFirst+nCommonF;if(aIndexPrev1=aIndexesF[iF],aIndexesF[iF]=aLast,kMinOverlapF<=kF&&kF<=kMaxOverlapF){let iR=(d-1-(kF+baDeltaLength))/2;if(iR<=iMaxR&&aIndexesR[iR]-1<=aLast){let bLastPrev=bF+aLastPrev-(insert?kF+1:kF-1),nCommonR=countCommonItemsR(aStart,aLastPrev,bStart,bLastPrev,isCommon),aIndexPrevFirst=aLastPrev-nCommonR,bIndexPrevFirst=bLastPrev-nCommonR,aEndPreceding=aIndexPrevFirst+1,bEndPreceding=bIndexPrevFirst+1;division.nChangePreceding=d-1,d-1===aEndPreceding+bEndPreceding-aStart-bStart?(division.aEndPreceding=aStart,division.bEndPreceding=bStart):(division.aEndPreceding=aEndPreceding,division.bEndPreceding=bEndPreceding),division.nCommonPreceding=nCommonR,nCommonR!==0&&(division.aCommonPreceding=aEndPreceding,division.bCommonPreceding=bEndPreceding),division.nCommonFollowing=nCommonF,nCommonF!==0&&(division.aCommonFollowing=aFirst+1,division.bCommonFollowing=bFirst+1);let aStartFollowing=aLast+1,bStartFollowing=bFirst+nCommonF+1;return division.nChangeFollowing=d-1,d-1===aEnd+bEnd-aStartFollowing-bStartFollowing?(division.aStartFollowing=aEnd,division.bStartFollowing=bEnd):(division.aStartFollowing=aStartFollowing,division.bStartFollowing=bStartFollowing),!0}}}return!1},extendOverlappablePathsR=(d,aStart,aEnd,bStart,bEnd,isCommon,aIndexesF,iMaxF,aIndexesR,iMaxR,division)=>{let bR=bEnd-aEnd,aLength=aEnd-aStart,baDeltaLength=bEnd-bStart-aLength,kMinOverlapR=baDeltaLength-d,kMaxOverlapR=baDeltaLength+d,aIndexPrev1=0,nR=d<iMaxR?d:iMaxR;for(let iR=0,kR=d;iR<=nR;iR+=1,kR-=2){let insert=iR===0||iR!==d&&aIndexesR[iR]<aIndexPrev1,aLastPrev=insert?aIndexesR[iR]:aIndexPrev1,aFirst=insert?aLastPrev:aLastPrev-1,bFirst=bR+aFirst-kR,nCommonR=countCommonItemsR(aStart,aFirst-1,bStart,bFirst-1,isCommon),aLast=aFirst-nCommonR;if(aIndexPrev1=aIndexesR[iR],aIndexesR[iR]=aLast,kMinOverlapR<=kR&&kR<=kMaxOverlapR){let iF=(d+(kR-baDeltaLength))/2;if(iF<=iMaxF&&aLast-1<=aIndexesF[iF]){let bLast=bFirst-nCommonR;if(division.nChangePreceding=d,d===aLast+bLast-aStart-bStart?(division.aEndPreceding=aStart,division.bEndPreceding=bStart):(division.aEndPreceding=aLast,division.bEndPreceding=bLast),division.nCommonPreceding=nCommonR,nCommonR!==0&&(division.aCommonPreceding=aLast,division.bCommonPreceding=bLast),division.nChangeFollowing=d-1,d===1)division.nCommonFollowing=0,division.aStartFollowing=aEnd,division.bStartFollowing=bEnd;else{let bLastPrev=bR+aLastPrev-(insert?kR-1:kR+1),nCommonF=countCommonItemsF(aLastPrev,aEnd,bLastPrev,bEnd,isCommon);division.nCommonFollowing=nCommonF,nCommonF!==0&&(division.aCommonFollowing=aLastPrev,division.bCommonFollowing=bLastPrev);let aStartFollowing=aLastPrev+nCommonF,bStartFollowing=bLastPrev+nCommonF;d-1===aEnd+bEnd-aStartFollowing-bStartFollowing?(division.aStartFollowing=aEnd,division.bStartFollowing=bEnd):(division.aStartFollowing=aStartFollowing,division.bStartFollowing=bStartFollowing)}return!0}}}return!1},divide=(nChange,aStart,aEnd,bStart,bEnd,isCommon,aIndexesF,aIndexesR,division)=>{let bF=bStart-aStart,bR=bEnd-aEnd,aLength=aEnd-aStart,bLength=bEnd-bStart,baDeltaLength=bLength-aLength,iMaxF=aLength,iMaxR=aLength;if(aIndexesF[0]=aStart-1,aIndexesR[0]=aEnd,baDeltaLength%2==0){let dMin=(nChange||baDeltaLength)/2,dMax=(aLength+bLength)/2;for(let d=1;d<=dMax;d+=1)if(iMaxF=extendPathsF(d,aEnd,bEnd,bF,isCommon,aIndexesF,iMaxF),d<dMin)iMaxR=extendPathsR(d,aStart,bStart,bR,isCommon,aIndexesR,iMaxR);else if(extendOverlappablePathsR(d,aStart,aEnd,bStart,bEnd,isCommon,aIndexesF,iMaxF,aIndexesR,iMaxR,division))return}else{let dMin=((nChange||baDeltaLength)+1)/2,dMax=(aLength+bLength+1)/2,d=1;for(iMaxF=extendPathsF(d,aEnd,bEnd,bF,isCommon,aIndexesF,iMaxF),d+=1;d<=dMax;d+=1)if(iMaxR=extendPathsR(d-1,aStart,bStart,bR,isCommon,aIndexesR,iMaxR),d<dMin)iMaxF=extendPathsF(d,aEnd,bEnd,bF,isCommon,aIndexesF,iMaxF);else if(extendOverlappablePathsF(d,aStart,aEnd,bStart,bEnd,isCommon,aIndexesF,iMaxF,aIndexesR,iMaxR,division))return}throw Error(`${pkg}: no overlap aStart=${aStart} aEnd=${aEnd} bStart=${bStart} bEnd=${bEnd}`)},findSubsequences=(nChange,aStart,aEnd,bStart,bEnd,transposed,callbacks,aIndexesF,aIndexesR,division)=>{if(bEnd-bStart<aEnd-aStart){if(transposed=!transposed,transposed&&callbacks.length===1){let{foundSubsequence,isCommon}=callbacks[0];callbacks[1]={foundSubsequence:(nCommon,bCommon,aCommon)=>{foundSubsequence(nCommon,aCommon,bCommon)},isCommon:(bIndex,aIndex)=>isCommon(aIndex,bIndex)}}let tStart=aStart,tEnd=aEnd;aStart=bStart,aEnd=bEnd,bStart=tStart,bEnd=tEnd}let{foundSubsequence,isCommon}=callbacks[+!!transposed];divide(nChange,aStart,aEnd,bStart,bEnd,isCommon,aIndexesF,aIndexesR,division);let{nChangePreceding,aEndPreceding,bEndPreceding,nCommonPreceding,aCommonPreceding,bCommonPreceding,nCommonFollowing,aCommonFollowing,bCommonFollowing,nChangeFollowing,aStartFollowing,bStartFollowing}=division;aStart<aEndPreceding&&bStart<bEndPreceding&&findSubsequences(nChangePreceding,aStart,aEndPreceding,bStart,bEndPreceding,transposed,callbacks,aIndexesF,aIndexesR,division),nCommonPreceding!==0&&foundSubsequence(nCommonPreceding,aCommonPreceding,bCommonPreceding),nCommonFollowing!==0&&foundSubsequence(nCommonFollowing,aCommonFollowing,bCommonFollowing),aStartFollowing<aEnd&&bStartFollowing<bEnd&&findSubsequences(nChangeFollowing,aStartFollowing,aEnd,bStartFollowing,bEnd,transposed,callbacks,aIndexesF,aIndexesR,division)},validateLength=(name,arg)=>{if(typeof arg!=`number`)throw TypeError(`${pkg}: ${name} typeof ${typeof arg} is not a number`);if(!Number.isSafeInteger(arg))throw RangeError(`${pkg}: ${name} value ${arg} is not a safe integer`);if(arg<0)throw RangeError(`${pkg}: ${name} value ${arg} is a negative integer`)},validateCallback=(name,arg)=>{let type=typeof arg;if(type!==`function`)throw TypeError(`${pkg}: ${name} typeof ${type} is not a function`)};function diffSequence(aLength,bLength,isCommon,foundSubsequence){validateLength(`aLength`,aLength),validateLength(`bLength`,bLength),validateCallback(`isCommon`,isCommon),validateCallback(`foundSubsequence`,foundSubsequence);let nCommonF=countCommonItemsF(0,aLength,0,bLength,isCommon);if(nCommonF!==0&&foundSubsequence(nCommonF,0,0),aLength!==nCommonF||bLength!==nCommonF){let aStart=nCommonF,bStart=nCommonF,nCommonR=countCommonItemsR(aStart,aLength-1,bStart,bLength-1,isCommon),aEnd=aLength-nCommonR,bEnd=bLength-nCommonR,nCommonFR=nCommonF+nCommonR;aLength!==nCommonFR&&bLength!==nCommonFR&&findSubsequences(0,aStart,aEnd,bStart,bEnd,!1,[{foundSubsequence,isCommon}],[0],[0],{aCommonFollowing:0,aCommonPreceding:0,aEndPreceding:0,aStartFollowing:0,bCommonFollowing:0,bCommonPreceding:0,bEndPreceding:0,bStartFollowing:0,nChangeFollowing:0,nChangePreceding:0,nCommonFollowing:0,nCommonPreceding:0}),nCommonR!==0&&foundSubsequence(nCommonR,aEnd,bEnd)}}return build}var diffSequences=getDefaultExportFromCjs(requireBuild());function isImmutable(v){return v&&(v[`@@__IMMUTABLE_ITERABLE__@@`]||v[`@@__IMMUTABLE_RECORD__@@`])}const OBJECT_PROTO=Object.getPrototypeOf({});function getUnserializableMessage(err){return err instanceof Error?`<unserializable>: ${err.message}`:typeof err==`string`?`<unserializable>: ${err}`:`<unserializable>`}function serializeValue(val,seen=new WeakMap){if(!val||typeof val==`string`)return val;if(val instanceof Error&&`toJSON`in val&&typeof val.toJSON==`function`){let jsonValue=val.toJSON();return jsonValue&&jsonValue!==val&&typeof jsonValue==`object`&&(typeof val.message==`string`&&safe(()=>jsonValue.message??=normalizeErrorMessage(val.message)),typeof val.stack==`string`&&safe(()=>jsonValue.stack??=val.stack),typeof val.name==`string`&&safe(()=>jsonValue.name??=val.name),val.cause!=null&&safe(()=>jsonValue.cause??=serializeValue(val.cause,seen))),serializeValue(jsonValue,seen)}if(typeof val==`function`)return`Function<${val.name||`anonymous`}>`;if(typeof val==`symbol`)return val.toString();if(typeof val!=`object`)return val;if(typeof Buffer<`u`&&val instanceof Buffer)return`<Buffer(${val.length}) ...>`;if(typeof Uint8Array<`u`&&val instanceof Uint8Array)return`<Uint8Array(${val.length}) ...>`;if(isImmutable(val))return serializeValue(val.toJSON(),seen);if(val instanceof Promise||val.constructor&&val.constructor.prototype===`AsyncFunction`)return`Promise`;if(typeof Element<`u`&&val instanceof Element)return val.tagName;if(typeof val.toJSON==`function`)return serializeValue(val.toJSON(),seen);if(seen.has(val))return seen.get(val);if(Array.isArray(val)){let clone=Array(val.length);return seen.set(val,clone),val.forEach((e,i)=>{try{clone[i]=serializeValue(e,seen)}catch(err){clone[i]=getUnserializableMessage(err)}}),clone}{let clone=Object.create(null);seen.set(val,clone);let obj=val;for(;obj&&obj!==OBJECT_PROTO;)Object.getOwnPropertyNames(obj).forEach(key=>{if(!(key in clone))try{clone[key]=serializeValue(val[key],seen)}catch(err){delete clone[key],clone[key]=getUnserializableMessage(err)}}),obj=Object.getPrototypeOf(obj);return val instanceof Error&&safe(()=>clone.message=normalizeErrorMessage(val.message)),clone}}function safe(fn){try{return fn()}catch{}}function normalizeErrorMessage(message){return message.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,`$1`).replace(/__(vite_ssr_import|vi_import)_\d+__\./g,``).replace(/getByTestId('__vitest_\d+__')/g,`page`)}const SAFE_TIMERS_SYMBOL=Symbol(`vitest:SAFE_TIMERS`);function getSafeTimers(){let{setTimeout:safeSetTimeout,setInterval:safeSetInterval,clearInterval:safeClearInterval,clearTimeout:safeClearTimeout,setImmediate:safeSetImmediate,clearImmediate:safeClearImmediate,queueMicrotask:safeQueueMicrotask}=globalThis[SAFE_TIMERS_SYMBOL]||globalThis,{nextTick:safeNextTick}=globalThis[SAFE_TIMERS_SYMBOL]||globalThis.process||{};return{nextTick:safeNextTick,setTimeout:safeSetTimeout,setInterval:safeSetInterval,clearInterval:safeClearInterval,clearTimeout:safeClearTimeout,setImmediate:safeSetImmediate,clearImmediate:safeClearImmediate,queueMicrotask:safeQueueMicrotask}}function delay(timeout,scheduler=setTimeout){return new Promise(resolve=>scheduler(resolve,timeout))}var comma=44,chars=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,intToChar=new Uint8Array(64),charToInt=new Uint8Array(128);for(let i=0;i<chars.length;i++){let c=chars.charCodeAt(i);intToChar[i]=c,charToInt[c]=i}function decodeInteger(reader,relative){let value=0,shift=0,integer=0;do integer=charToInt[reader.next()],value|=(integer&31)<<shift,shift+=5;while(integer&32);let shouldNegate=value&1;return value>>>=1,shouldNegate&&(value=-2147483648|-value),relative+value}function hasMoreVlq(reader,max){return reader.pos>=max?!1:reader.peek()!==comma}var StringReader=class{constructor(buffer){this.pos=0,this.buffer=buffer}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(char){let{buffer,pos}=this,idx=buffer.indexOf(char,pos);return idx===-1?buffer.length:idx}};function decode(mappings){let{length}=mappings,reader=new StringReader(mappings),decoded=[],genColumn=0,sourcesIndex=0,sourceLine=0,sourceColumn=0,namesIndex=0;do{let semi=reader.indexOf(`;`),line=[],sorted=!0,lastCol=0;for(genColumn=0;reader.pos<semi;){let seg;genColumn=decodeInteger(reader,genColumn),genColumn<lastCol&&(sorted=!1),lastCol=genColumn,hasMoreVlq(reader,semi)?(sourcesIndex=decodeInteger(reader,sourcesIndex),sourceLine=decodeInteger(reader,sourceLine),sourceColumn=decodeInteger(reader,sourceColumn),hasMoreVlq(reader,semi)?(namesIndex=decodeInteger(reader,namesIndex),seg=[genColumn,sourcesIndex,sourceLine,sourceColumn,namesIndex]):seg=[genColumn,sourcesIndex,sourceLine,sourceColumn]):seg=[genColumn],line.push(seg),reader.pos++}sorted||sort(line),decoded.push(line),reader.pos=semi+1}while(reader.pos<=length);return decoded}function sort(line){line.sort(sortComparator$1)}function sortComparator$1(a,b){return a[0]-b[0]}var COLUMN=0,SOURCES_INDEX=1,SOURCE_LINE=2,SOURCE_COLUMN=3,NAMES_INDEX=4,found=!1;function binarySearch(haystack,needle,low,high){for(;low<=high;){let mid=low+(high-low>>1),cmp=haystack[mid][COLUMN]-needle;if(cmp===0)return found=!0,mid;cmp<0?low=mid+1:high=mid-1}return found=!1,low-1}function upperBound(haystack,needle,index){for(let i=index+1;i<haystack.length&&haystack[i][COLUMN]===needle;index=i++);return index}function lowerBound(haystack,needle,index){for(let i=index-1;i>=0&&haystack[i][COLUMN]===needle;index=i--);return index}function memoizedBinarySearch(haystack,needle,state,key){let{lastKey,lastNeedle,lastIndex}=state,low=0,high=haystack.length-1;if(key===lastKey){if(needle===lastNeedle)return found=lastIndex!==-1&&haystack[lastIndex][COLUMN]===needle,lastIndex;needle>=lastNeedle?low=lastIndex===-1?0:lastIndex:high=lastIndex}return state.lastKey=key,state.lastNeedle=needle,state.lastIndex=binarySearch(haystack,needle,low,high)}var LINE_GTR_ZERO="`line` must be greater than 0 (lines start at line 1)",COL_GTR_EQ_ZERO="`column` must be greater than or equal to 0 (columns start at column 0)",LEAST_UPPER_BOUND=-1,GREATEST_LOWER_BOUND=1;function cast(map){return map}function decodedMappings(map){var _a;return(_a=cast(map))._decoded||(_a._decoded=decode(cast(map)._encoded))}function originalPositionFor(map,needle){let{line,column,bias}=needle;if(line--,line<0)throw Error(LINE_GTR_ZERO);if(column<0)throw Error(COL_GTR_EQ_ZERO);let decoded=decodedMappings(map);if(line>=decoded.length)return OMapping(null,null,null,null);let segments=decoded[line],index=traceSegmentInternal(segments,cast(map)._decodedMemo,line,column,bias||GREATEST_LOWER_BOUND);if(index===-1)return OMapping(null,null,null,null);let segment=segments[index];if(segment.length===1)return OMapping(null,null,null,null);let{names,resolvedSources}=map;return OMapping(resolvedSources[segment[SOURCES_INDEX]],segment[SOURCE_LINE]+1,segment[SOURCE_COLUMN],segment.length===5?names[segment[NAMES_INDEX]]:null)}function OMapping(source,line,column,name){return{source,line,column,name}}function traceSegmentInternal(segments,memo,line,column,bias){let index=memoizedBinarySearch(segments,column,memo,line);return found?index=(bias===LEAST_UPPER_BOUND?upperBound:lowerBound)(segments,column,index):bias===LEAST_UPPER_BOUND&&index++,index===-1||index===segments.length?-1:index}const CHROME_IE_STACK_REGEXP=/^\s*at .*(?:\S:\d+|\(native\))/m,SAFARI_NATIVE_CODE_REGEXP=/^(?:eval@)?(?:\[native code\])?$/,stackIgnorePatterns=[`node:internal`,/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,`/vitest/dist/`,`/vitest/src/`,`/packages/expect/src/`,`/packages/snapshot/src/`,`/node_modules/chai/`,`/node_modules/tinyspy/`,`/vite/dist/node/module-runner`,`/rolldown-vite/dist/node/module-runner`,`/deps/chunk-`,`/deps/@vitest`,`/deps/loupe`,`/deps/chai`,`/browser-playwright/dist/locators.js`,`/browser-webdriverio/dist/locators.js`,`/browser-preview/dist/locators.js`,/node:\w+/,/__vitest_test__/,/__vitest_browser__/,`/@id/__x00__vitest/browser`,/\/deps\/vitest_/,`/deps/vitest.js`],NOW_LENGTH=Date.now().toString().length,REGEXP_VITEST=RegExp(`vitest=\\d{${NOW_LENGTH}}`);function extractLocation(urlLike){if(!urlLike.includes(`:`))return[urlLike];let parts=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(urlLike.replace(/^\(|\)$/g,``));if(!parts)return[urlLike];let url=parts[1];if(url.startsWith(`async `)&&(url=url.slice(6)),url.startsWith(`http:`)||url.startsWith(`https:`)){let urlObj=new URL(url);urlObj.searchParams.delete(`import`),urlObj.searchParams.delete(`browserv`),url=tryDecode(urlObj.pathname,decodeURI)+urlObj.hash+urlObj.search}if(url.startsWith(`/@fs/`)){let isWindows=/^\/@fs\/[a-zA-Z]:\//.test(url);url=url.slice(isWindows?5:4)}return url.includes(`vitest=`)&&(url=url.replace(REGEXP_VITEST,``).replace(/[?&]$/,``)),[url,parts[2]||void 0,parts[3]||void 0]}function tryDecode(value,decode){try{return decode(value)}catch{return value}}function parseSingleFFOrSafariStack(raw){let line=raw.trim();if(SAFARI_NATIVE_CODE_REGEXP.test(line)||(line.includes(` > eval`)&&(line=line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),!line.includes(`@`)))return null;let atIndex=-1,locationPart=``,functionName;for(let i=0;i<line.length;i++)if(line[i]===`@`){let candidateLocation=line.slice(i+1);if(candidateLocation.includes(`:`)&&candidateLocation.length>=3){atIndex=i,locationPart=candidateLocation,functionName=i>0?line.slice(0,i):void 0;break}}if(atIndex===-1||!locationPart.includes(`:`)||locationPart.length<3)return null;let[url,lineNumber,columnNumber]=extractLocation(locationPart);return!url||!lineNumber||!columnNumber?null:{file:url,method:functionName||``,line:Number.parseInt(lineNumber),column:Number.parseInt(columnNumber)}}function parseSingleStack(raw){let line=raw.trim();return CHROME_IE_STACK_REGEXP.test(line)?parseSingleV8Stack(line):parseSingleFFOrSafariStack(line)}function parseSingleV8Stack(raw){let line=raw.trim();if(!CHROME_IE_STACK_REGEXP.test(line))return null;line.includes(`(eval `)&&(line=line.replace(/eval code/g,`eval`).replace(/(\(eval at [^()]*)|(,.*$)/g,``));let sanitizedLine=line.replace(/^\s+/,``).replace(/\(eval code/g,`(`).replace(/^.*?\s+/,``),location=sanitizedLine.match(/ (\(.+\)$)/);sanitizedLine=location?sanitizedLine.replace(location[0],``):sanitizedLine;let[url,lineNumber,columnNumber]=extractLocation(location?location[1]:sanitizedLine),method=location&&sanitizedLine||``,file=url&&[`eval`,`<anonymous>`].includes(url)?void 0:url;return!file||!lineNumber||!columnNumber?null:(method.startsWith(`async `)&&(method=method.slice(6)),file.startsWith(`file://`)&&(file=tryDecode(file.slice(7),decodeURIComponent)),file=file.startsWith(`node:`)||file.startsWith(`internal:`)?file:resolve(file),method&&=method.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,`$1`).replace(/__(vite_ssr_import|vi_import)_\d+__\./g,``).replace(/(Object\.)?__vite_ssr_export_default__\s?/g,``),{method,file,line:Number.parseInt(lineNumber),column:Number.parseInt(columnNumber)})}function parseStacktrace(stack,options={}){let{ignoreStackEntries=stackIgnorePatterns}=options,stacks=CHROME_IE_STACK_REGEXP.test(stack)?parseV8Stacktrace(stack):parseFFOrSafariStackTrace(stack),helperIndex=stacks.findLastIndex(s=>s.method.includes(`__VITEST_HELPER__`));return helperIndex>=0&&(stacks=stacks.slice(helperIndex+1)),stacks.map(stack=>{options.getUrlId&&(stack.file=options.getUrlId(stack.file));let map=options.getSourceMap?.(stack.file);if(!map||typeof map!=`object`||!map.version)return shouldFilter(ignoreStackEntries,stack.file)?null:stack;let traceMap=new DecodedMap(map,stack.file);if(stack.line<=0||stack.column<=0)return stack;let position=getOriginalPosition(traceMap,{line:stack.line,column:stack.column-1});if(!position)return stack;let{line,column,source,name}=position,file=source||stack.file;return/\/\w:\//.test(file)&&(file=file.slice(1)),shouldFilter(ignoreStackEntries,file)?null:line!=null&&column!=null?{line,column:column+1,file,method:name||stack.method}:stack}).filter(s=>s!=null)}function shouldFilter(ignoreStackEntries,file){return ignoreStackEntries.some(p=>file.match(p))}function parseFFOrSafariStackTrace(stack){return stack.split(`
|
|
109
|
+
`).map(line=>parseSingleFFOrSafariStack(line)).filter(notNullish)}function parseV8Stacktrace(stack){return stack.split(`
|
|
110
|
+
`).map(line=>parseSingleV8Stack(line)).filter(notNullish)}function parseErrorStacktrace(e,options={}){if(!e||isPrimitive$1(e))return[];if(`stacks`in e&&e.stacks)return e.stacks;let stackStr=e.stack||``,stackFrames=typeof stackStr==`string`?parseStacktrace(stackStr,options):[];if(!stackFrames.length){let e_=e;e_.fileName!=null&&e_.lineNumber!=null&&e_.columnNumber!=null&&(stackFrames=parseStacktrace(`${e_.fileName}:${e_.lineNumber}:${e_.columnNumber}`,options)),e_.sourceURL!=null&&e_.line!=null&&e_._column!=null&&(stackFrames=parseStacktrace(`${e_.sourceURL}:${e_.line}:${e_.column}`,options))}return options.frameFilter&&(stackFrames=stackFrames.filter(f=>options.frameFilter(e,f)!==!1)),e.stacks=stackFrames,stackFrames}var DecodedMap=class{map;_encoded;_decoded;_decodedMemo;url;version;names=[];resolvedSources;constructor(map,from){this.map=map;let{mappings,names,sources}=map;this.version=map.version,this.names=names||[],this._encoded=mappings||``,this._decodedMemo=memoizedState(),this.url=from,this.resolvedSources=(sources||[]).map(s=>resolve(from,`..`,s||``))}};function memoizedState(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function getOriginalPosition(map,needle){let result=originalPositionFor(map,needle);return result.column==null?null:result}function getNames(task){let names=[task.name],current=task;for(;current?.suite;)current=current.suite,current?.name&&names.unshift(current.name);return current!==task.file&&names.unshift(task.file.name),names}function createTaskName(names,separator=` > `){return names.filter(name=>name!==void 0).join(separator)}var Diff=class{0;1;constructor(op,text){this[0]=op,this[1]=text}};function diff_commonPrefix(text1,text2){if(!text1||!text2||text1.charAt(0)!==text2.charAt(0))return 0;let pointermin=0,pointermax=Math.min(text1.length,text2.length),pointermid=pointermax,pointerstart=0;for(;pointermin<pointermid;)text1.substring(pointerstart,pointermid)===text2.substring(pointerstart,pointermid)?(pointermin=pointermid,pointerstart=pointermin):pointermax=pointermid,pointermid=Math.floor((pointermax-pointermin)/2+pointermin);return pointermid}function diff_commonSuffix(text1,text2){if(!text1||!text2||text1.charAt(text1.length-1)!==text2.charAt(text2.length-1))return 0;let pointermin=0,pointermax=Math.min(text1.length,text2.length),pointermid=pointermax,pointerend=0;for(;pointermin<pointermid;)text1.substring(text1.length-pointermid,text1.length-pointerend)===text2.substring(text2.length-pointermid,text2.length-pointerend)?(pointermin=pointermid,pointerend=pointermin):pointermax=pointermid,pointermid=Math.floor((pointermax-pointermin)/2+pointermin);return pointermid}function diff_commonOverlap_(text1,text2){let text1_length=text1.length,text2_length=text2.length;if(text1_length===0||text2_length===0)return 0;text1_length>text2_length?text1=text1.substring(text1_length-text2_length):text1_length<text2_length&&(text2=text2.substring(0,text1_length));let text_length=Math.min(text1_length,text2_length);if(text1===text2)return text_length;let best=0,length=1;for(;;){let pattern=text1.substring(text_length-length),found=text2.indexOf(pattern);if(found===-1)return best;length+=found,(found===0||text1.substring(text_length-length)===text2.substring(0,length))&&(best=length,length++)}}function diff_cleanupSemantic(diffs){let changes=!1,equalities=[],equalitiesLength=0,lastEquality=null,pointer=0,length_insertions1=0,length_deletions1=0,length_insertions2=0,length_deletions2=0;for(;pointer<diffs.length;)diffs[pointer][0]===0?(equalities[equalitiesLength++]=pointer,length_insertions1=length_insertions2,length_deletions1=length_deletions2,length_insertions2=0,length_deletions2=0,lastEquality=diffs[pointer][1]):(diffs[pointer][0]===1?length_insertions2+=diffs[pointer][1].length:length_deletions2+=diffs[pointer][1].length,lastEquality&&lastEquality.length<=Math.max(length_insertions1,length_deletions1)&&lastEquality.length<=Math.max(length_insertions2,length_deletions2)&&(diffs.splice(equalities[equalitiesLength-1],0,new Diff(-1,lastEquality)),diffs[equalities[equalitiesLength-1]+1][0]=1,equalitiesLength--,equalitiesLength--,pointer=equalitiesLength>0?equalities[equalitiesLength-1]:-1,length_insertions1=0,length_deletions1=0,length_insertions2=0,length_deletions2=0,lastEquality=null,changes=!0)),pointer++;for(changes&&diff_cleanupMerge(diffs),diff_cleanupSemanticLossless(diffs),pointer=1;pointer<diffs.length;){if(diffs[pointer-1][0]===-1&&diffs[pointer][0]===1){let deletion=diffs[pointer-1][1],insertion=diffs[pointer][1],overlap_length1=diff_commonOverlap_(deletion,insertion),overlap_length2=diff_commonOverlap_(insertion,deletion);overlap_length1>=overlap_length2?(overlap_length1>=deletion.length/2||overlap_length1>=insertion.length/2)&&(diffs.splice(pointer,0,new Diff(0,insertion.substring(0,overlap_length1))),diffs[pointer-1][1]=deletion.substring(0,deletion.length-overlap_length1),diffs[pointer+1][1]=insertion.substring(overlap_length1),pointer++):(overlap_length2>=deletion.length/2||overlap_length2>=insertion.length/2)&&(diffs.splice(pointer,0,new Diff(0,deletion.substring(0,overlap_length2))),diffs[pointer-1][0]=1,diffs[pointer-1][1]=insertion.substring(0,insertion.length-overlap_length2),diffs[pointer+1][0]=-1,diffs[pointer+1][1]=deletion.substring(overlap_length2),pointer++),pointer++}pointer++}}const nonAlphaNumericRegex_=/[^a-z0-9]/i,whitespaceRegex_=/\s/,linebreakRegex_=/[\r\n]/,blanklineEndRegex_=/\n\r?\n$/,blanklineStartRegex_=/^\r?\n\r?\n/;function diff_cleanupSemanticLossless(diffs){let pointer=1;for(;pointer<diffs.length-1;){if(diffs[pointer-1][0]===0&&diffs[pointer+1][0]===0){let equality1=diffs[pointer-1][1],edit=diffs[pointer][1],equality2=diffs[pointer+1][1],commonOffset=diff_commonSuffix(equality1,edit);if(commonOffset){let commonString=edit.substring(edit.length-commonOffset);equality1=equality1.substring(0,equality1.length-commonOffset),edit=commonString+edit.substring(0,edit.length-commonOffset),equality2=commonString+equality2}let bestEquality1=equality1,bestEdit=edit,bestEquality2=equality2,bestScore=diff_cleanupSemanticScore_(equality1,edit)+diff_cleanupSemanticScore_(edit,equality2);for(;edit.charAt(0)===equality2.charAt(0);){equality1+=edit.charAt(0),edit=edit.substring(1)+equality2.charAt(0),equality2=equality2.substring(1);let score=diff_cleanupSemanticScore_(equality1,edit)+diff_cleanupSemanticScore_(edit,equality2);score>=bestScore&&(bestScore=score,bestEquality1=equality1,bestEdit=edit,bestEquality2=equality2)}diffs[pointer-1][1]!==bestEquality1&&(bestEquality1?diffs[pointer-1][1]=bestEquality1:(diffs.splice(pointer-1,1),pointer--),diffs[pointer][1]=bestEdit,bestEquality2?diffs[pointer+1][1]=bestEquality2:(diffs.splice(pointer+1,1),pointer--))}pointer++}}function diff_cleanupMerge(diffs){diffs.push(new Diff(0,``));let pointer=0,count_delete=0,count_insert=0,text_delete=``,text_insert=``,commonlength;for(;pointer<diffs.length;)switch(diffs[pointer][0]){case 1:count_insert++,text_insert+=diffs[pointer][1],pointer++;break;case-1:count_delete++,text_delete+=diffs[pointer][1],pointer++;break;case 0:count_delete+count_insert>1?(count_delete!==0&&count_insert!==0&&(commonlength=diff_commonPrefix(text_insert,text_delete),commonlength!==0&&(pointer-count_delete-count_insert>0&&diffs[pointer-count_delete-count_insert-1][0]===0?diffs[pointer-count_delete-count_insert-1][1]+=text_insert.substring(0,commonlength):(diffs.splice(0,0,new Diff(0,text_insert.substring(0,commonlength))),pointer++),text_insert=text_insert.substring(commonlength),text_delete=text_delete.substring(commonlength)),commonlength=diff_commonSuffix(text_insert,text_delete),commonlength!==0&&(diffs[pointer][1]=text_insert.substring(text_insert.length-commonlength)+diffs[pointer][1],text_insert=text_insert.substring(0,text_insert.length-commonlength),text_delete=text_delete.substring(0,text_delete.length-commonlength))),pointer-=count_delete+count_insert,diffs.splice(pointer,count_delete+count_insert),text_delete.length&&(diffs.splice(pointer,0,new Diff(-1,text_delete)),pointer++),text_insert.length&&(diffs.splice(pointer,0,new Diff(1,text_insert)),pointer++),pointer++):pointer!==0&&diffs[pointer-1][0]===0?(diffs[pointer-1][1]+=diffs[pointer][1],diffs.splice(pointer,1)):pointer++,count_insert=0,count_delete=0,text_delete=``,text_insert=``}diffs.at(-1)?.[1]===``&&diffs.pop();let changes=!1;for(pointer=1;pointer<diffs.length-1;)diffs[pointer-1][0]===0&&diffs[pointer+1][0]===0&&(diffs[pointer][1].substring(diffs[pointer][1].length-diffs[pointer-1][1].length)===diffs[pointer-1][1]?(diffs[pointer][1]=diffs[pointer-1][1]+diffs[pointer][1].substring(0,diffs[pointer][1].length-diffs[pointer-1][1].length),diffs[pointer+1][1]=diffs[pointer-1][1]+diffs[pointer+1][1],diffs.splice(pointer-1,1),changes=!0):diffs[pointer][1].substring(0,diffs[pointer+1][1].length)===diffs[pointer+1][1]&&(diffs[pointer-1][1]+=diffs[pointer+1][1],diffs[pointer][1]=diffs[pointer][1].substring(diffs[pointer+1][1].length)+diffs[pointer+1][1],diffs.splice(pointer+1,1),changes=!0)),pointer++;changes&&diff_cleanupMerge(diffs)}function diff_cleanupSemanticScore_(one,two){if(!one||!two)return 6;let char1=one.charAt(one.length-1),char2=two.charAt(0),nonAlphaNumeric1=char1.match(nonAlphaNumericRegex_),nonAlphaNumeric2=char2.match(nonAlphaNumericRegex_),whitespace1=nonAlphaNumeric1&&char1.match(whitespaceRegex_),whitespace2=nonAlphaNumeric2&&char2.match(whitespaceRegex_),lineBreak1=whitespace1&&char1.match(linebreakRegex_),lineBreak2=whitespace2&&char2.match(linebreakRegex_),blankLine1=lineBreak1&&one.match(blanklineEndRegex_),blankLine2=lineBreak2&&two.match(blanklineStartRegex_);return blankLine1||blankLine2?5:lineBreak1||lineBreak2?4:nonAlphaNumeric1&&!whitespace1&&whitespace2?3:whitespace1||whitespace2?2:nonAlphaNumeric1||nonAlphaNumeric2?1:0}const NO_DIFF_MESSAGE=`Compared values have no visual difference.`;function formatTrailingSpaces(line,trailingSpaceFormatter){return line.replace(/\s+$/,match=>trailingSpaceFormatter(match))}function printDiffLine(line,isFirstOrLast,color,indicator,trailingSpaceFormatter,emptyFirstOrLastLinePlaceholder){return line.length===0?indicator===` `?isFirstOrLast&&emptyFirstOrLastLinePlaceholder.length!==0?color(`${indicator} ${emptyFirstOrLastLinePlaceholder}`):``:color(indicator):color(`${indicator} ${formatTrailingSpaces(line,trailingSpaceFormatter)}`)}function printDeleteLine(line,isFirstOrLast,{aColor,aIndicator,changeLineTrailingSpaceColor,emptyFirstOrLastLinePlaceholder}){return printDiffLine(line,isFirstOrLast,aColor,aIndicator,changeLineTrailingSpaceColor,emptyFirstOrLastLinePlaceholder)}function printInsertLine(line,isFirstOrLast,{bColor,bIndicator,changeLineTrailingSpaceColor,emptyFirstOrLastLinePlaceholder}){return printDiffLine(line,isFirstOrLast,bColor,bIndicator,changeLineTrailingSpaceColor,emptyFirstOrLastLinePlaceholder)}function printCommonLine(line,isFirstOrLast,{commonColor,commonIndicator,commonLineTrailingSpaceColor,emptyFirstOrLastLinePlaceholder}){return printDiffLine(line,isFirstOrLast,commonColor,commonIndicator,commonLineTrailingSpaceColor,emptyFirstOrLastLinePlaceholder)}function createPatchMark(aStart,aEnd,bStart,bEnd,{patchColor}){return patchColor(`@@ -${aStart+1},${aEnd-aStart} +${bStart+1},${bEnd-bStart} @@`)}function joinAlignedDiffsNoExpand(diffs,options){let iLength=diffs.length,nContextLines=options.contextLines,nContextLines2=nContextLines+nContextLines,jLength=iLength,hasExcessAtStartOrEnd=!1,nExcessesBetweenChanges=0,i=0;for(;i!==iLength;){let iStart=i;for(;i!==iLength&&diffs[i][0]===0;)i+=1;if(iStart!==i){if(iStart===0)i>nContextLines&&(jLength-=i-nContextLines,hasExcessAtStartOrEnd=!0);else if(i===iLength){let n=i-iStart;n>nContextLines&&(jLength-=n-nContextLines,hasExcessAtStartOrEnd=!0)}else{let n=i-iStart;n>nContextLines2&&(jLength-=n-nContextLines2,nExcessesBetweenChanges+=1)}}for(;i!==iLength&&diffs[i][0]!==0;)i+=1}let hasPatch=nExcessesBetweenChanges!==0||hasExcessAtStartOrEnd;nExcessesBetweenChanges===0?hasExcessAtStartOrEnd&&(jLength+=1):jLength+=nExcessesBetweenChanges+1;let jLast=jLength-1,lines=[],jPatchMark=0;hasPatch&&lines.push(``);let aStart=0,bStart=0,aEnd=0,bEnd=0,pushCommonLine=line=>{let j=lines.length;lines.push(printCommonLine(line,j===0||j===jLast,options)),aEnd+=1,bEnd+=1},pushDeleteLine=line=>{let j=lines.length;lines.push(printDeleteLine(line,j===0||j===jLast,options)),aEnd+=1},pushInsertLine=line=>{let j=lines.length;lines.push(printInsertLine(line,j===0||j===jLast,options)),bEnd+=1};for(i=0;i!==iLength;){let iStart=i;for(;i!==iLength&&diffs[i][0]===0;)i+=1;if(iStart!==i){if(iStart===0){i>nContextLines&&(iStart=i-nContextLines,aStart=iStart,bStart=iStart,aEnd=aStart,bEnd=bStart);for(let iCommon=iStart;iCommon!==i;iCommon+=1)pushCommonLine(diffs[iCommon][1])}else if(i===iLength){let iEnd=i-iStart>nContextLines?iStart+nContextLines:i;for(let iCommon=iStart;iCommon!==iEnd;iCommon+=1)pushCommonLine(diffs[iCommon][1])}else{let nCommon=i-iStart;if(nCommon>nContextLines2){let iEnd=iStart+nContextLines;for(let iCommon=iStart;iCommon!==iEnd;iCommon+=1)pushCommonLine(diffs[iCommon][1]);lines[jPatchMark]=createPatchMark(aStart,aEnd,bStart,bEnd,options),jPatchMark=lines.length,lines.push(``);let nOmit=nCommon-nContextLines2;aStart=aEnd+nOmit,bStart=bEnd+nOmit,aEnd=aStart,bEnd=bStart;for(let iCommon=i-nContextLines;iCommon!==i;iCommon+=1)pushCommonLine(diffs[iCommon][1])}else for(let iCommon=iStart;iCommon!==i;iCommon+=1)pushCommonLine(diffs[iCommon][1])}}for(;i!==iLength&&diffs[i][0]===-1;)pushDeleteLine(diffs[i][1]),i+=1;for(;i!==iLength&&diffs[i][0]===1;)pushInsertLine(diffs[i][1]),i+=1}return hasPatch&&(lines[jPatchMark]=createPatchMark(aStart,aEnd,bStart,bEnd,options)),lines.join(`
|
|
111
|
+
`)}function joinAlignedDiffsExpand(diffs,options){return diffs.map((diff,i,diffs)=>{let line=diff[1],isFirstOrLast=i===0||i===diffs.length-1;switch(diff[0]){case-1:return printDeleteLine(line,isFirstOrLast,options);case 1:return printInsertLine(line,isFirstOrLast,options);default:return printCommonLine(line,isFirstOrLast,options)}}).join(`
|
|
112
|
+
`)}const noColor=string=>string;function getDefaultOptions(){return{aAnnotation:`Expected`,aColor:$.green,aIndicator:`-`,bAnnotation:`Received`,bColor:$.red,bIndicator:`+`,changeColor:$.inverse,changeLineTrailingSpaceColor:noColor,commonColor:$.dim,commonIndicator:` `,commonLineTrailingSpaceColor:noColor,compareKeys:void 0,contextLines:5,emptyFirstOrLastLinePlaceholder:``,expand:!1,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:$.yellow,printBasicPrototype:!1,truncateThreshold:0,truncateAnnotation:`... Diff result is truncated`,truncateAnnotationColor:noColor}}function getCompareKeys(compareKeys){return compareKeys&&typeof compareKeys==`function`?compareKeys:void 0}function getContextLines(contextLines){return typeof contextLines==`number`&&Number.isSafeInteger(contextLines)&&contextLines>=0?contextLines:5}function normalizeDiffOptions(options={}){return{...getDefaultOptions(),...options,compareKeys:getCompareKeys(options.compareKeys),contextLines:getContextLines(options.contextLines)}}function isEmptyString(lines){return lines.length===1&&lines[0].length===0}function countChanges(diffs){let a=0,b=0;return diffs.forEach(diff=>{switch(diff[0]){case-1:a+=1;break;case 1:b+=1}}),{a,b}}function printAnnotation({aAnnotation,aColor,aIndicator,bAnnotation,bColor,bIndicator,includeChangeCounts,omitAnnotationLines},changeCounts){if(omitAnnotationLines)return``;let aRest=``,bRest=``;if(includeChangeCounts){let aCount=String(changeCounts.a),bCount=String(changeCounts.b),baAnnotationLengthDiff=bAnnotation.length-aAnnotation.length,aAnnotationPadding=` `.repeat(Math.max(0,baAnnotationLengthDiff)),bAnnotationPadding=` `.repeat(Math.max(0,-baAnnotationLengthDiff)),baCountLengthDiff=bCount.length-aCount.length,aCountPadding=` `.repeat(Math.max(0,baCountLengthDiff)),bCountPadding=` `.repeat(Math.max(0,-baCountLengthDiff));aRest=`${aAnnotationPadding} ${aIndicator} ${aCountPadding}${aCount}`,bRest=`${bAnnotationPadding} ${bIndicator} ${bCountPadding}${bCount}`}let a=`${aIndicator} ${aAnnotation}${aRest}`,b=`${bIndicator} ${bAnnotation}${bRest}`;return`${aColor(a)}\n${bColor(b)}\n\n`}function printDiffLines(diffs,truncated,options){return printAnnotation(options,countChanges(diffs))+(options.expand?joinAlignedDiffsExpand(diffs,options):joinAlignedDiffsNoExpand(diffs,options))+(truncated?options.truncateAnnotationColor(`\n${options.truncateAnnotation}`):``)}function diffLinesUnified(aLines,bLines,options){let normalizedOptions=normalizeDiffOptions(options),[diffs,truncated]=diffLinesRaw(isEmptyString(aLines)?[]:aLines,isEmptyString(bLines)?[]:bLines,normalizedOptions);return printDiffLines(diffs,truncated,normalizedOptions)}function diffLinesUnified2(aLinesDisplay,bLinesDisplay,aLinesCompare,bLinesCompare,options){if(isEmptyString(aLinesDisplay)&&isEmptyString(aLinesCompare)&&(aLinesDisplay=[],aLinesCompare=[]),isEmptyString(bLinesDisplay)&&isEmptyString(bLinesCompare)&&(bLinesDisplay=[],bLinesCompare=[]),aLinesDisplay.length!==aLinesCompare.length||bLinesDisplay.length!==bLinesCompare.length)return diffLinesUnified(aLinesDisplay,bLinesDisplay,options);let[diffs,truncated]=diffLinesRaw(aLinesCompare,bLinesCompare,options),aIndex=0,bIndex=0;return diffs.forEach(diff=>{switch(diff[0]){case-1:diff[1]=aLinesDisplay[aIndex],aIndex+=1;break;case 1:diff[1]=bLinesDisplay[bIndex],bIndex+=1;break;default:diff[1]=bLinesDisplay[bIndex],aIndex+=1,bIndex+=1}}),printDiffLines(diffs,truncated,normalizeDiffOptions(options))}function diffLinesRaw(aLines,bLines,options){let truncate=options?.truncateThreshold??!1,truncateThreshold=Math.max(Math.floor(options?.truncateThreshold??0),0),aLength=truncate?Math.min(aLines.length,truncateThreshold):aLines.length,bLength=truncate?Math.min(bLines.length,truncateThreshold):bLines.length,truncated=aLength!==aLines.length||bLength!==bLines.length,isCommon=(aIndex,bIndex)=>aLines[aIndex]===bLines[bIndex],diffs=[],aIndex=0,bIndex=0;for(diffSequences(aLength,bLength,isCommon,(nCommon,aCommon,bCommon)=>{for(;aIndex!==aCommon;aIndex+=1)diffs.push(new Diff(-1,aLines[aIndex]));for(;bIndex!==bCommon;bIndex+=1)diffs.push(new Diff(1,bLines[bIndex]));for(;nCommon!==0;--nCommon,aIndex+=1,bIndex+=1)diffs.push(new Diff(0,bLines[bIndex]))});aIndex!==aLength;aIndex+=1)diffs.push(new Diff(-1,aLines[aIndex]));for(;bIndex!==bLength;bIndex+=1)diffs.push(new Diff(1,bLines[bIndex]));return[diffs,truncated]}function getType(value){if(value===void 0)return`undefined`;if(value===null)return`null`;if(Array.isArray(value))return`array`;if(typeof value==`boolean`)return`boolean`;if(typeof value==`function`)return`function`;if(typeof value==`number`)return`number`;if(typeof value==`string`)return`string`;if(typeof value==`bigint`)return`bigint`;if(typeof value==`object`){if(value!=null){if(value.constructor===RegExp)return`regexp`;if(value.constructor===Map)return`map`;if(value.constructor===Set)return`set`;if(value.constructor===Date)return`date`}return`object`}if(typeof value==`symbol`)return`symbol`;throw Error(`value of unknown type: ${value}`)}function getNewLineSymbol(string){return string.includes(`\r
|
|
113
|
+
`)?`\r
|
|
114
|
+
`:`
|
|
115
|
+
`}function diffStrings(a,b,options){let truncate=options?.truncateThreshold??!1,truncateThreshold=Math.max(Math.floor(options?.truncateThreshold??0),0),aLength=a.length,bLength=b.length;if(truncate){let aMultipleLines=a.includes(`
|
|
116
|
+
`),bMultipleLines=b.includes(`
|
|
117
|
+
`),aNewLineSymbol=getNewLineSymbol(a),bNewLineSymbol=getNewLineSymbol(b),_a=aMultipleLines?`${a.split(aNewLineSymbol,truncateThreshold).join(aNewLineSymbol)}\n`:a,_b=bMultipleLines?`${b.split(bNewLineSymbol,truncateThreshold).join(bNewLineSymbol)}\n`:b;aLength=_a.length,bLength=_b.length}let truncated=aLength!==a.length||bLength!==b.length,isCommon=(aIndex,bIndex)=>a[aIndex]===b[bIndex],aIndex=0,bIndex=0,diffs=[];return diffSequences(aLength,bLength,isCommon,(nCommon,aCommon,bCommon)=>{aIndex!==aCommon&&diffs.push(new Diff(-1,a.slice(aIndex,aCommon))),bIndex!==bCommon&&diffs.push(new Diff(1,b.slice(bIndex,bCommon))),aIndex=aCommon+nCommon,bIndex=bCommon+nCommon,diffs.push(new Diff(0,b.slice(bCommon,bIndex)))}),aIndex!==aLength&&diffs.push(new Diff(-1,a.slice(aIndex))),bIndex!==bLength&&diffs.push(new Diff(1,b.slice(bIndex))),[diffs,truncated]}function concatenateRelevantDiffs(op,diffs,changeColor){return diffs.reduce((reduced,diff)=>reduced+(diff[0]===0?diff[1]:diff[0]===op&&diff[1].length!==0?changeColor(diff[1]):``),``)}var ChangeBuffer=class{op;line;lines;changeColor;constructor(op,changeColor){this.op=op,this.line=[],this.lines=[],this.changeColor=changeColor}pushSubstring(substring){this.pushDiff(new Diff(this.op,substring))}pushLine(){this.lines.push(this.line.length===1?this.line[0][0]===this.op?this.line[0]:new Diff(this.op,this.line[0][1]):new Diff(this.op,concatenateRelevantDiffs(this.op,this.line,this.changeColor))),this.line.length=0}isLineEmpty(){return this.line.length===0}pushDiff(diff){this.line.push(diff)}align(diff){let string=diff[1];if(string.includes(`
|
|
118
|
+
`)){let substrings=string.split(`
|
|
119
|
+
`),iLast=substrings.length-1;substrings.forEach((substring,i)=>{i<iLast?(this.pushSubstring(substring),this.pushLine()):substring.length!==0&&this.pushSubstring(substring)})}else this.pushDiff(diff)}moveLinesTo(lines){this.isLineEmpty()||this.pushLine(),lines.push(...this.lines),this.lines.length=0}},CommonBuffer=class{deleteBuffer;insertBuffer;lines;constructor(deleteBuffer,insertBuffer){this.deleteBuffer=deleteBuffer,this.insertBuffer=insertBuffer,this.lines=[]}pushDiffCommonLine(diff){this.lines.push(diff)}pushDiffChangeLines(diff){let isDiffEmpty=diff[1].length===0;(!isDiffEmpty||this.deleteBuffer.isLineEmpty())&&this.deleteBuffer.pushDiff(diff),(!isDiffEmpty||this.insertBuffer.isLineEmpty())&&this.insertBuffer.pushDiff(diff)}flushChangeLines(){this.deleteBuffer.moveLinesTo(this.lines),this.insertBuffer.moveLinesTo(this.lines)}align(diff){let op=diff[0],string=diff[1];if(string.includes(`
|
|
120
|
+
`)){let substrings=string.split(`
|
|
121
|
+
`),iLast=substrings.length-1;substrings.forEach((substring,i)=>{if(i===0){let subdiff=new Diff(op,substring);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(subdiff)):(this.pushDiffChangeLines(subdiff),this.flushChangeLines())}else i<iLast?this.pushDiffCommonLine(new Diff(op,substring)):substring.length!==0&&this.pushDiffChangeLines(new Diff(op,substring))})}else this.pushDiffChangeLines(diff)}getLines(){return this.flushChangeLines(),this.lines}};function getAlignedDiffs(diffs,changeColor){let deleteBuffer=new ChangeBuffer(-1,changeColor),insertBuffer=new ChangeBuffer(1,changeColor),commonBuffer=new CommonBuffer(deleteBuffer,insertBuffer);return diffs.forEach(diff=>{switch(diff[0]){case-1:deleteBuffer.align(diff);break;case 1:insertBuffer.align(diff);break;default:commonBuffer.align(diff)}}),commonBuffer.getLines()}function hasCommonDiff(diffs,isMultiline){if(isMultiline){let iLast=diffs.length-1;return diffs.some((diff,i)=>diff[0]===0&&(i!==iLast||diff[1]!==`
|
|
122
|
+
`))}return diffs.some(diff=>diff[0]===0)}function diffStringsUnified(a,b,options){if(a!==b&&a.length!==0&&b.length!==0){let isMultiline=a.includes(`
|
|
123
|
+
`)||b.includes(`
|
|
124
|
+
`),[diffs,truncated]=diffStringsRaw(isMultiline?`${a}\n`:a,isMultiline?`${b}\n`:b,!0,options);if(hasCommonDiff(diffs,isMultiline)){let optionsNormalized=normalizeDiffOptions(options);return printDiffLines(getAlignedDiffs(diffs,optionsNormalized.changeColor),truncated,optionsNormalized)}}return diffLinesUnified(a.split(`
|
|
125
|
+
`),b.split(`
|
|
126
|
+
`),options)}function diffStringsRaw(a,b,cleanup,options){let[diffs,truncated]=diffStrings(a,b,options);return diff_cleanupSemantic(diffs),[diffs,truncated]}function getCommonMessage(message,options){let{commonColor}=normalizeDiffOptions(options);return commonColor(message)}const{AsymmetricMatcher:AsymmetricMatcher$2,DOMCollection:DOMCollection$1,DOMElement:DOMElement$1,Immutable:Immutable$1,ReactElement:ReactElement$1,ReactTestComponent:ReactTestComponent$1}=plugins,PLUGINS$1=[ReactTestComponent$1,ReactElement$1,DOMElement$1,DOMCollection$1,Immutable$1,AsymmetricMatcher$2,plugins.Error],FORMAT_OPTIONS={maxDepth:20,plugins:PLUGINS$1},FALLBACK_FORMAT_OPTIONS={callToJSON:!1,maxDepth:8,plugins:PLUGINS$1},DEFAULT_MEMORIZE=(_,v)=>v;function diff(a,b,options,memorize=DEFAULT_MEMORIZE){if(Object.is(a,b))return``;let aType=getType(a),expectedType=aType,omitDifference=!1;if(aType===`object`&&typeof a.asymmetricMatch==`function`){if(a.$$typeof!==Symbol.for(`jest.asymmetricMatcher`)||typeof a.getExpectedType!=`function`)return;expectedType=a.getExpectedType(),omitDifference=expectedType===`string`}if(expectedType!==getType(b)){let{aAnnotation,aColor,aIndicator,bAnnotation,bColor,bIndicator}=normalizeDiffOptions(options),formatOptions=getFormatOptions(FALLBACK_FORMAT_OPTIONS,options),aDisplay=format$2(a,formatOptions),bDisplay=format$2(b,formatOptions),MAX_LENGTH=1e5;function truncate(s){return s.length<=MAX_LENGTH?s:`${s.slice(0,MAX_LENGTH)}...`}return aDisplay=memorize(`expected`,truncate(aDisplay)),bDisplay=memorize(`actual`,truncate(bDisplay)),`${`${aColor(`${aIndicator} ${aAnnotation}:`)}\n${aDisplay}`}\n\n${`${bColor(`${bIndicator} ${bAnnotation}:`)}\n${bDisplay}`}`}if(!omitDifference)switch(aType){case`string`:return diffLinesUnified(a.split(`
|
|
127
|
+
`),b.split(`
|
|
128
|
+
`),options);case`boolean`:case`number`:return comparePrimitive(a,b,options,memorize);case`map`:return compareObjects(sortMap(a),sortMap(b),options,memorize);case`set`:return compareObjects(sortSet(a),sortSet(b),options,memorize);default:return compareObjects(a,b,options,memorize)}}function createMemorize(memory){return(pointer,stringifiedValue)=>(memory[pointer]=stringifiedValue,stringifiedValue)}function comparePrimitive(a,b,options,memorize=DEFAULT_MEMORIZE){let aFormat=memorize(`expected`,format$2(a,FORMAT_OPTIONS)),bFormat=memorize(`actual`,format$2(b,FORMAT_OPTIONS));return aFormat===bFormat?``:diffLinesUnified(aFormat.split(`
|
|
129
|
+
`),bFormat.split(`
|
|
130
|
+
`),options)}function sortMap(map){return new Map(Array.from(map.entries()).sort())}function sortSet(set){return new Set(Array.from(set.values()).sort())}function compareObjects(a,b,options,memorize=DEFAULT_MEMORIZE){let difference,hasThrown=!1;try{difference=getObjectsDifference(a,b,getFormatOptions(FORMAT_OPTIONS,options),options,memorize)}catch{hasThrown=!0}let noDiffMessage=getCommonMessage(NO_DIFF_MESSAGE,options);return(difference===void 0||difference===noDiffMessage)&&(difference=getObjectsDifference(a,b,getFormatOptions(FALLBACK_FORMAT_OPTIONS,options),options,memorize),difference!==noDiffMessage&&!hasThrown&&(difference=`${getCommonMessage("Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.",options)}\n\n${difference}`)),difference}function getDefaultFormatOptions(options){return getFormatOptions(FORMAT_OPTIONS,options)}function getFormatOptions(formatOptions,options){let{compareKeys,printBasicPrototype,maxDepth}=normalizeDiffOptions(options);return{...formatOptions,compareKeys,printBasicPrototype,maxDepth:maxDepth??formatOptions.maxDepth}}function getObjectsDifference(a,b,formatOptions,options,memorize=DEFAULT_MEMORIZE){let formatOptionsZeroIndent={...formatOptions,indent:0},aCompare=format$2(a,formatOptionsZeroIndent),bCompare=format$2(b,formatOptionsZeroIndent);if(aCompare===bCompare)return getCommonMessage(NO_DIFF_MESSAGE,options);{let aDisplay=memorize(`expected`,format$2(a,formatOptions)),bDisplay=memorize(`actual`,format$2(b,formatOptions));return diffLinesUnified2(aDisplay.split(`
|
|
131
|
+
`),bDisplay.split(`
|
|
132
|
+
`),aCompare.split(`
|
|
133
|
+
`),bCompare.split(`
|
|
134
|
+
`),options)}}const MAX_DIFF_STRING_LENGTH=2e4;function isAsymmetricMatcher(data){return getType$1(data)===`Object`&&typeof data.asymmetricMatch==`function`}function isReplaceable(obj1,obj2){let obj1Type=getType$1(obj1);return obj1Type===getType$1(obj2)&&(obj1Type===`Object`||obj1Type===`Array`)}function printDiffOrStringify(received,expected,options,memory){let{aAnnotation,bAnnotation}=normalizeDiffOptions(options);if(typeof expected==`string`&&typeof received==`string`&&expected.length>0&&received.length>0&&expected.length<=MAX_DIFF_STRING_LENGTH&&received.length<=MAX_DIFF_STRING_LENGTH&&expected!==received){if(expected.includes(`
|
|
135
|
+
`)||received.includes(`
|
|
136
|
+
`))return diffStringsUnified(expected,received,options);let[diffs]=diffStringsRaw(expected,received),hasCommonDiff=diffs.some(diff=>diff[0]===0),printLabel=getLabelPrinter(aAnnotation,bAnnotation);return`${printLabel(aAnnotation)+printExpected$1(getCommonAndChangedSubstrings(diffs,-1,hasCommonDiff))}\n${printLabel(bAnnotation)+printReceived$1(getCommonAndChangedSubstrings(diffs,1,hasCommonDiff))}`}let clonedExpected=deepClone(expected,{forceWritable:!0}),{replacedExpected,replacedActual}=replaceAsymmetricMatcher(deepClone(received,{forceWritable:!0}),clonedExpected);return diff(replacedExpected,replacedActual,options,memory?createMemorize(memory):DEFAULT_MEMORIZE)}function replaceAsymmetricMatcher(actual,expected,actualReplaced=new WeakSet,expectedReplaced=new WeakSet){return actual instanceof Error&&expected instanceof Error&&actual.cause!==void 0&&expected.cause===void 0?(delete actual.cause,{replacedActual:actual,replacedExpected:expected}):!isReplaceable(actual,expected)||actualReplaced.has(actual)||expectedReplaced.has(expected)?{replacedActual:actual,replacedExpected:expected}:(actualReplaced.add(actual),expectedReplaced.add(expected),getOwnProperties(expected).forEach(key=>{let expectedValue=expected[key],actualValue=actual[key];if(isAsymmetricMatcher(expectedValue)){if(expectedValue.asymmetricMatch(actualValue))expected[key]=actualValue;else if(`sample`in expectedValue&&expectedValue.sample!==void 0&&isReplaceable(actualValue,expectedValue.sample)){let replaced=replaceAsymmetricMatcher(actualValue,expectedValue.sample,actualReplaced,expectedReplaced);actual[key]=replaced.replacedActual,expected[key]=replaced.replacedExpected}}else if(isAsymmetricMatcher(actualValue)){if(actualValue.asymmetricMatch(expectedValue))actual[key]=expectedValue;else if(`sample`in actualValue&&actualValue.sample!==void 0&&isReplaceable(actualValue.sample,expectedValue)){let replaced=replaceAsymmetricMatcher(actualValue.sample,expectedValue,actualReplaced,expectedReplaced);actual[key]=replaced.replacedActual,expected[key]=replaced.replacedExpected}}else if(isReplaceable(actualValue,expectedValue)){let replaced=replaceAsymmetricMatcher(actualValue,expectedValue,actualReplaced,expectedReplaced);actual[key]=replaced.replacedActual,expected[key]=replaced.replacedExpected}}),{replacedActual:actual,replacedExpected:expected})}function getLabelPrinter(...strings){let maxLength=strings.reduce((max,string)=>string.length>max?string.length:max,0);return string=>`${string}: ${` `.repeat(maxLength-string.length)}`}function replaceTrailingSpaces$1(text){return text.replace(/\s+$/gm,spaces=>`·`.repeat(spaces.length))}function printReceived$1(object){return $.red(replaceTrailingSpaces$1(stringify(object)))}function printExpected$1(value){return $.green(replaceTrailingSpaces$1(stringify(value)))}function getCommonAndChangedSubstrings(diffs,op,hasCommonDiff){return diffs.reduce((reduced,diff)=>reduced+(diff[0]===0?diff[1]:diff[0]===op?hasCommonDiff?$.inverse(diff[1]):diff[1]:``),``)}function processError(_err,diffOptions,seen=new WeakSet){if(!_err||typeof _err!=`object`)return{message:String(_err)};let err=_err;if(err.showDiff||err.showDiff===void 0&&err.expected!==void 0&&err.actual!==void 0){let options={...diffOptions,...err.diffOptions};err.diff=printDiffOrStringify(err.actual,err.expected,options,err),err.expected=prettifyValue(err.expected,options),err.actual=prettifyValue(err.actual,options)}try{!seen.has(err)&&typeof err.cause==`object`&&(seen.add(err),err.cause=processError(err.cause,diffOptions,seen))}catch{}try{return serializeValue(err)}catch(e){return serializeValue(Error(`Failed to fully serialize error: ${e?.message}\nInner error message: ${err?.message}`))}}function prettifyValue(value,options){return typeof value==`string`?value:format$2(value,getDefaultFormatOptions(options))}var PendingError=class extends Error{message;note;code=`VITEST_PENDING`;taskId;constructor(message,task,note){super(message),this.message=message,this.note=note,this.taskId=task.id}},FixtureDependencyError=class extends Error{name=`FixtureDependencyError`},FixtureAccessError=class extends Error{name=`FixtureAccessError`},FixtureParseError=class extends Error{name=`FixtureParseError`},TestSyntaxError=class extends Error{name=`TestSyntaxError`;constructor(message){super(message),Object.defineProperty(this,"__vitest_test_syntax_error__",{value:!0,enumerable:!1})}};const fnMap=new WeakMap,testFixtureMap=new WeakMap,hooksMap=new WeakMap;function setFn(key,fn){fnMap.set(key,fn)}function setTestFixture(key,fixture){testFixtureMap.set(key,fixture)}function getTestFixtures(key){return testFixtureMap.get(key)}function setHooks(key,hooks){hooksMap.set(key,hooks)}function getHooks(key){return hooksMap.get(key)}const FIXTURE_STACK_TRACE_KEY=Symbol.for(`VITEST_FIXTURE_STACK_TRACE`);var TestFixtures=class TestFixtures{_suiteContexts;_overrides=new WeakMap;_registrations;static _definitions=[];static _builtinFixtures=[`task`,`signal`,`onTestFailed`,`onTestFinished`,`skip`,`annotate`,`bench`];static _fixtureOptionKeys=[`auto`,`injected`,`scope`];static _fixtureScopes=[`test`,`file`,`worker`];static _workerContextSuite={type:`worker`};static clearDefinitions(){TestFixtures._definitions.length=0}static getWorkerContexts(){return TestFixtures._definitions.map(f=>f.getWorkerContext())}static getFileContexts(file){return TestFixtures._definitions.map(f=>f.getFileContext(file))}static isFixtureOptions(obj){return isObject(obj)&&Object.keys(obj).some(key=>TestFixtures._fixtureOptionKeys.includes(key))}constructor(registrations){this._registrations=registrations??new Map,this._suiteContexts=new WeakMap,TestFixtures._definitions.push(this)}extend(runner,userFixtures){let{suite}=getCurrentSuite(),isTopLevel=!suite||suite.file===suite,registrations=this.parseUserFixtures(runner,userFixtures,isTopLevel);return new TestFixtures(registrations)}get(suite){let currentSuite=suite;for(;currentSuite;){let overrides=this._overrides.get(currentSuite);if(overrides)return overrides;if(currentSuite===currentSuite.file)break;currentSuite=currentSuite.suite||currentSuite.file}return this._registrations}override(runner,userFixtures){let{suite:currentSuite,file}=getCurrentSuite(),suite=currentSuite||file,isTopLevel=!currentSuite||currentSuite.file===currentSuite,suiteRegistrations=new Map(this.get(suite)),registrations=this.parseUserFixtures(runner,userFixtures,isTopLevel,suiteRegistrations);isTopLevel?this._registrations=registrations:this._overrides.set(suite,registrations)}getFileContext(file){return this._suiteContexts.has(file)||this._suiteContexts.set(file,Object.create(null)),this._suiteContexts.get(file)}getWorkerContext(){return this._suiteContexts.has(TestFixtures._workerContextSuite)||this._suiteContexts.set(TestFixtures._workerContextSuite,Object.create(null)),this._suiteContexts.get(TestFixtures._workerContextSuite)}parseUserFixtures(runner,userFixtures,supportNonTest,registrations=new Map(this._registrations)){let errors=[];Object.entries(userFixtures).forEach(([name,fn])=>{let options,value,_options;Array.isArray(fn)&&fn.length>=2&&TestFixtures.isFixtureOptions(fn[1])?(_options=fn[1],options={auto:_options.auto??!1,scope:_options.scope??`test`,injected:_options.injected??!1},value=options.injected?runner.injectValue?.(name)??fn[0]:fn[0]):value=fn;let parent=registrations.get(name);parent&&options?(parent.scope!==options.scope&&errors.push(new FixtureDependencyError(`The "${name}" fixture was already registered with a "${options.scope}" scope.`)),parent.auto!==options.auto&&errors.push(new FixtureDependencyError(`The "${name}" fixture was already registered as { auto: ${options.auto} }.`))):parent?options={auto:parent.auto,scope:parent.scope,injected:parent.injected}:options||={auto:!1,injected:!1,scope:`test`},options.scope&&!TestFixtures._fixtureScopes.includes(options.scope)&&errors.push(new FixtureDependencyError(`The "${name}" fixture has unknown scope "${options.scope}".`)),!supportNonTest&&options.scope!==`test`&&errors.push(new FixtureDependencyError(`The "${name}" fixture cannot be defined with a ${options.scope} scope${!_options?.scope&&parent?.scope?` (inherited from the base fixture)`:``} inside the describe block. Define it at the top level of the file instead.`));let deps=isFixtureFunction(value)?getUsedProps(value):new Set,item={name,value,auto:options.auto??!1,injected:options.injected??!1,scope:options.scope??`test`,deps,parent};isFixtureFunction(value)&&Object.assign(value,{[FIXTURE_STACK_TRACE_KEY]:Error(`STACK_TRACE_ERROR`)}),registrations.set(name,item),item.scope===`worker`&&(runner.pool===`vmThreads`||runner.pool===`vmForks`)&&(item.scope=`file`)});for(let fixture of registrations.values())for(let depName of fixture.deps){if(TestFixtures._builtinFixtures.includes(depName))continue;let dep=registrations.get(depName);if(!dep){errors.push(new FixtureDependencyError(`The "${fixture.name}" fixture depends on unknown fixture "${depName}".`));continue}if(depName===fixture.name&&!fixture.parent){errors.push(new FixtureDependencyError(`The "${fixture.name}" fixture depends on itself, but does not have a base implementation.`));continue}if(TestFixtures._fixtureScopes.indexOf(fixture.scope)>TestFixtures._fixtureScopes.indexOf(dep.scope)){errors.push(new FixtureDependencyError(`The ${fixture.scope} "${fixture.name}" fixture cannot depend on a ${dep.scope} fixture "${dep.name}".`));continue}}if(errors.length===1)throw errors[0];if(errors.length>1)throw AggregateError(errors,`Cannot resolve user fixtures. See errors for more information.`);return registrations}};const cleanupFnArrayMap=new WeakMap,contextHasFixturesCache=new WeakMap;function withFixtures(fn,options){let collector=getCurrentSuite(),suite=options?.suite||collector.suite||collector.file;return async hookContext=>{let context=hookContext||options?.context;if(!context)return options?.suiteHook&&validateSuiteHook(fn,options.suiteHook,options.stackTraceError),fn({});let fixtures=options?.fixtures||getTestFixtures(context);if(!fixtures)return fn(context);let registrations=fixtures.get(suite);if(!registrations.size)return fn(context);let usedFixtures=[],usedProps=getUsedProps(fn);for(let fixture of registrations.values())(isAutoFixture(fixture,options)||usedProps.has(fixture.name))&&usedFixtures.push(fixture);if(!usedFixtures.length)return fn(context);cleanupFnArrayMap.has(context)||cleanupFnArrayMap.set(context,[]);let cleanupFnArray=cleanupFnArrayMap.get(context),pendingFixtures=resolveDeps(usedFixtures,registrations);if(!pendingFixtures.length)return fn(context);if(options?.suiteHook){let testScopedFixtures=pendingFixtures.filter(f=>f.scope===`test`);if(testScopedFixtures.length>0){let fixtureNames=testScopedFixtures.map(f=>`"${f.name}"`).join(`, `),error=new FixtureDependencyError(`Test-scoped fixtures cannot be used inside ${options.suiteHook} hook. The following fixtures are test-scoped: ${fixtureNames}. Use { scope: 'file' } or { scope: 'worker' } fixtures instead, or move the logic to ${{aroundAll:`aroundEach`,beforeAll:`beforeEach`,afterAll:`afterEach`}[options.suiteHook]} hook.`);throw options.stackTraceError?.stack&&(error.stack=error.message+options.stackTraceError.stack.replace(options.stackTraceError.message,``)),error}}contextHasFixturesCache.has(context)||contextHasFixturesCache.set(context,new WeakSet);let cachedFixtures=contextHasFixturesCache.get(context);for(let fixture of pendingFixtures)if(fixture.scope===`test`){if(cachedFixtures.has(fixture))continue;cachedFixtures.add(fixture);try{context[fixture.name]=await resolveTestFixtureValue(fixture,context,cleanupFnArray)}catch(error){throw cachedFixtures.delete(fixture),error}cleanupFnArray.push(()=>{cachedFixtures.delete(fixture)})}else{let resolvedValue=await resolveScopeFixtureValue(fixtures,suite,fixture);context[fixture.name]=resolvedValue}return fn(context)}}function isAutoFixture(fixture,options){return!(!fixture.auto||options?.suiteHook&&fixture.scope===`test`)}function isFixtureFunction(value){return typeof value==`function`}function resolveTestFixtureValue(fixture,context,cleanupFnArray){return isFixtureFunction(fixture.value)?resolveFixtureFunction(fixture.value,fixture.name,context,cleanupFnArray):fixture.value}const scopedFixturePromiseCache=new WeakMap;async function resolveScopeFixtureValue(fixtures,suite,fixture){let workerContext=fixtures.getWorkerContext(),fileContext=fixtures.getFileContext(suite.file),fixtureContext=fixture.scope===`worker`?workerContext:fileContext;if(!isFixtureFunction(fixture.value))return fixtureContext[fixture.name]=fixture.value,fixture.value;if(fixture.name in fixtureContext)return fixtureContext[fixture.name];if(scopedFixturePromiseCache.has(fixture))return scopedFixturePromiseCache.get(fixture);cleanupFnArrayMap.has(fixtureContext)||cleanupFnArrayMap.set(fixtureContext,[]);let cleanupFnFileArray=cleanupFnArrayMap.get(fixtureContext),promise=resolveFixtureFunction(fixture.value,fixture.name,fixture.scope===`file`?{...workerContext,...fileContext}:fixtureContext,cleanupFnFileArray).then(value=>(fixtureContext[fixture.name]=value,value)).finally(()=>{scopedFixturePromiseCache.delete(fixture)});return scopedFixturePromiseCache.set(fixture,promise),promise}async function resolveFixtureFunction(fixtureFn,fixtureName,context,cleanupFnArray){let useFnArgPromise=createDefer(),stackTraceError=FIXTURE_STACK_TRACE_KEY in fixtureFn&&fixtureFn[FIXTURE_STACK_TRACE_KEY]instanceof Error?fixtureFn[FIXTURE_STACK_TRACE_KEY]:void 0,isUseFnArgResolved=!1,fixtureReturn=fixtureFn(context,async useFnArg=>{isUseFnArgResolved=!0,useFnArgPromise.resolve(useFnArg);let useReturnPromise=createDefer();cleanupFnArray.push(async()=>{useReturnPromise.resolve(),await fixtureReturn}),await useReturnPromise}).then(()=>{if(!isUseFnArgResolved){let error=Error(`Fixture "${fixtureName}" returned without calling "use". Make sure to call "use" in every code path of the fixture function.`);stackTraceError?.stack&&(error.stack=error.message+stackTraceError.stack.replace(stackTraceError.message,``)),useFnArgPromise.reject(error)}}).catch(e=>{if(!isUseFnArgResolved){useFnArgPromise.reject(e);return}throw e});return useFnArgPromise}function resolveDeps(usedFixtures,registrations,depSet=new Set,pendingFixtures=[]){return usedFixtures.forEach(fixture=>{if(!pendingFixtures.includes(fixture)){if(!isFixtureFunction(fixture.value)||!fixture.deps){pendingFixtures.push(fixture);return}if(depSet.has(fixture)){if(fixture.parent)fixture=fixture.parent;else throw Error(`Circular fixture dependency detected: ${fixture.name} <- ${[...depSet].reverse().map(d=>d.name).join(` <- `)}`)}depSet.add(fixture),resolveDeps(Array.from(fixture.deps,n=>n===fixture.name?fixture.parent:registrations.get(n)).filter(n=>!!n),registrations,depSet,pendingFixtures),pendingFixtures.push(fixture),depSet.clear()}}),pendingFixtures}function validateSuiteHook(fn,hook,suiteError){let usedProps=getUsedProps(fn,{sourceError:suiteError,suiteHook:hook});if(usedProps.size){let error=new FixtureAccessError(`The ${hook} hook uses fixtures "${[...usedProps].join(`", "`)}", but has no access to context. Did you forget to call it as "test.${hook}()" instead of "${hook}()"?\nIf you used internal "suite" task as the first argument previously, access it in the second argument instead. See https://vitest.dev/guide/test-context#suite-level-hooks`);throw suiteError&&(error.stack=suiteError.stack?.replace(suiteError.message,error.message)),error}}const kPropsSymbol=Symbol(`$vitest:fixture-props`),kPropNamesSymbol=Symbol(`$vitest:fixture-prop-names`);function configureProps(fn,options){Object.defineProperty(fn,kPropsSymbol,{value:options,enumerable:!1})}function memoProps(fn,props){return fn[kPropNamesSymbol]=props,props}function getUsedProps(fn,{sourceError,suiteHook}={}){if(kPropNamesSymbol in fn)return fn[kPropNamesSymbol];let{index:fixturesIndex=0,original:implementation=fn}=kPropsSymbol in fn?fn[kPropsSymbol]:{},fnString=filterOutComments(implementation.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(fnString)&&(fnString=fnString.split(/__async\((?:this|null),/)[1]);let match=fnString.match(/[^(]*\(([^)]*)/);if(!match)return memoProps(fn,new Set);let args=splitByComma(match[1]);if(!args.length)return memoProps(fn,new Set);let fixturesArgument=args[fixturesIndex];if(!fixturesArgument)return memoProps(fn,new Set);if(!(fixturesArgument[0]===`{`&&fixturesArgument.endsWith(`}`))){let ordinalArgument=ordinal(fixturesIndex+1),error=new FixtureParseError(`The ${ordinalArgument} argument inside a fixture must use object destructuring pattern, e.g. ({ task } => {}). Instead, received "${fixturesArgument}".${suiteHook?` If you used internal "suite" task as the ${ordinalArgument} argument previously, access it in the ${ordinal(fixturesIndex+2)} argument instead.`:``}`);throw sourceError&&(error.stack=sourceError.stack?.replace(sourceError.message,error.message)),error}let props=splitByComma(fixturesArgument.slice(1,-1).replace(/\s/g,``)).map(prop=>prop.replace(/:.*|=.*/g,``)),last=props.at(-1);if(last&&last.startsWith(`...`)){let error=new FixtureParseError(`Rest parameters are not supported in fixtures, received "${last}".`);throw sourceError&&(error.stack=sourceError.stack?.replace(sourceError.message,error.message)),error}return memoProps(fn,new Set(props))}function splitByComma(s){let result=[],stack=[],start=0;for(let i=0;i<s.length;i++)if(s[i]===`{`||s[i]===`[`)stack.push(s[i]===`{`?`}`:`]`);else if(s[i]===stack.at(-1))stack.pop();else if(!stack.length&&s[i]===`,`){let token=s.substring(start,i).trim();token&&result.push(token),start=i+1}let lastToken=s.substring(start).trim();return lastToken&&result.push(lastToken),result}const kChainableContext=Symbol(`kChainableContext`);function getChainableContext(chainable){return chainable?.[kChainableContext]}function createChainable(keys,fn,context){function create(context){let chain=function(...args){return fn.apply(context,args)};Object.assign(chain,fn),Object.defineProperty(chain,kChainableContext,{value:{withContext:()=>chain.bind(context),extendContext:ctx=>create({...context,...ctx}),getFixtures:()=>context.fixtures,setContext:(key,value)=>{context[key]=value},mergeContext:ctx=>{Object.assign(context,ctx)}},enumerable:!1});for(let key of keys)Object.defineProperty(chain,key,{get(){return create({...context,[key]:!0})}});return chain}let chain=create(context??{});return Object.defineProperty(chain,"fn",{value:fn,enumerable:!1}),chain}function getDefaultHookTimeout(){return getRunner().config.hookTimeout}const CLEANUP_TIMEOUT_KEY=Symbol.for(`VITEST_CLEANUP_TIMEOUT`),CLEANUP_STACK_TRACE_KEY=Symbol.for(`VITEST_CLEANUP_STACK_TRACE`),AROUND_TIMEOUT_KEY=Symbol.for(`VITEST_AROUND_TIMEOUT`),AROUND_STACK_TRACE_KEY=Symbol.for(`VITEST_AROUND_STACK_TRACE`);function beforeAll(fn,timeout=getDefaultHookTimeout()){assertTypes(fn,`"beforeAll" callback`,[`function`]);let stackTraceError=Error(`STACK_TRACE_ERROR`),context=getChainableContext(this);return getCurrentSuite().on(`beforeAll`,Object.assign(withTimeout(withSuiteFixtures(`beforeAll`,fn,context,stackTraceError),timeout,!0,stackTraceError),{[CLEANUP_TIMEOUT_KEY]:timeout,[CLEANUP_STACK_TRACE_KEY]:stackTraceError}))}function afterAll(fn,timeout){assertTypes(fn,`"afterAll" callback`,[`function`]);let context=getChainableContext(this),stackTraceError=Error(`STACK_TRACE_ERROR`);return getCurrentSuite().on(`afterAll`,withTimeout(withSuiteFixtures(`afterAll`,fn,context,stackTraceError),timeout??getDefaultHookTimeout(),!0,stackTraceError))}function beforeEach(fn,timeout=getDefaultHookTimeout()){assertTypes(fn,`"beforeEach" callback`,[`function`]);let stackTraceError=Error(`STACK_TRACE_ERROR`);return getCurrentSuite().on(`beforeEach`,Object.assign(withTimeout((context,suite)=>withFixtures(fn,{suite})(context),timeout??getDefaultHookTimeout(),!0,stackTraceError,abortIfTimeout),{[CLEANUP_TIMEOUT_KEY]:timeout,[CLEANUP_STACK_TRACE_KEY]:stackTraceError}))}function afterEach(fn,timeout){return assertTypes(fn,`"afterEach" callback`,[`function`]),getCurrentSuite().on(`afterEach`,withTimeout((context,suite)=>withFixtures(fn,{suite})(context),timeout??getDefaultHookTimeout(),!0,Error(`STACK_TRACE_ERROR`),abortIfTimeout))}const onTestFinished=createTestHook(`onTestFinished`,(test,handler,timeout)=>{test.onFinished||=[],test.onFinished.push(withTimeout(handler,timeout??getDefaultHookTimeout(),!0,Error(`STACK_TRACE_ERROR`),abortIfTimeout))});function aroundAll(fn,timeout){assertTypes(fn,`"aroundAll" callback`,[`function`]);let stackTraceError=Error(`STACK_TRACE_ERROR`),resolvedTimeout=timeout??getDefaultHookTimeout(),context=getChainableContext(this);return getCurrentSuite().on(`aroundAll`,Object.assign(withSuiteFixtures(`aroundAll`,fn,context,stackTraceError,1),{[AROUND_TIMEOUT_KEY]:resolvedTimeout,[AROUND_STACK_TRACE_KEY]:stackTraceError}))}function aroundEach(fn,timeout){assertTypes(fn,`"aroundEach" callback`,[`function`]);let stackTraceError=Error(`STACK_TRACE_ERROR`),resolvedTimeout=timeout??getDefaultHookTimeout();return getCurrentSuite().on(`aroundEach`,Object.assign((runTest,context,suite)=>{let innerFn=ctx=>fn(runTest,ctx,suite);return configureProps(innerFn,{index:1,original:fn}),withFixtures(innerFn,{suite})(context)},{[AROUND_TIMEOUT_KEY]:resolvedTimeout,[AROUND_STACK_TRACE_KEY]:stackTraceError}))}function withSuiteFixtures(suiteHook,fn,context,stackTraceError,contextIndex=0){return(...args)=>{let suite=args.at(-1),prefix=args.slice(0,-1),wrapper=ctx=>fn(...prefix,ctx,suite);configureProps(wrapper,{index:contextIndex,original:fn});let fixtures=context?.getFixtures(),fileContext=fixtures?.getFileContext(suite.file);return withFixtures(wrapper,{suiteHook,fixtures,context:fileContext,stackTraceError})()}}function createTestHook(name,handler){return(fn,timeout)=>{throw assertTypes(fn,`"${name}" callback`,[`function`]),Error(`Hook ${name}() can only be called inside a test`)}}function findTestFileStackTrace(testFilePath,error){let stack;try{stack=error.stack}catch{return}if(stack)return parseStacktrace(stack,{ignoreStackEntries:[]}).find(stack=>stack.file===testFilePath)}function validateTags(config,tags){if(!config.strictTags)return;let availableTags=new Set(config.tags.map(tag=>tag.name));for(let tag of tags)if(!availableTags.has(tag))throw createNoTagsError(config.tags,tag)}function createNoTagsError(availableTags,tag,prefix=`tag`){throw availableTags.length?Error(`The ${prefix} "${tag}" is not defined in the configuration. Available tags are:\n${availableTags.map(t=>`- ${t.name}${t.description?`: ${t.description}`:``}`).join(`
|
|
137
|
+
`)}`):Error(`The Vitest config doesn't define any "tags", cannot apply "${tag}" ${prefix} for this test. See: https://vitest.dev/guide/test-tags`)}const suite=createSuite();createTest(function(name,optionsOrFn,optionsOrTest){getCurrentSuite().test.fn.call(this,formatName(name),optionsOrFn,optionsOrTest)});let runner,defaultSuite,currentTestFilepath;function assert$2(condition,message){if(!condition)throw Error(`Vitest failed to find ${message}. One of the following is possible:
|
|
138
|
+
- "vitest" is imported directly without running "vitest" command
|
|
139
|
+
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
140
|
+
- "vitest" is imported inside Vite / Vitest config file
|
|
141
|
+
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
142
|
+
`)}function getRunner(){assert$2(runner,`the runner`)}function getCurrentSuite(){let currentSuite=collectorContext.currentSuite||defaultSuite;return assert$2(currentSuite,`the current suite`),currentSuite}function createSuiteHooks(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[],aroundEach:[],aroundAll:[]}}const POSITIVE_INFINITY=1/0;function assignDefined(target,source){for(let key in source)source[key]!==void 0&&(target[key]=source[key]);return target}function parseArguments(optionsOrFn,timeoutOrTest){if(typeof timeoutOrTest==`object`&&timeoutOrTest)throw TypeError(`Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.`);let options={},fn;if(typeof timeoutOrTest==`number`?options={timeout:timeoutOrTest}:typeof optionsOrFn==`object`&&(options=optionsOrFn),typeof optionsOrFn==`function`){if(typeof timeoutOrTest==`function`)throw TypeError(`Cannot use two functions as arguments. Please use the second argument for options.`);fn=optionsOrFn}else typeof timeoutOrTest==`function`&&(fn=timeoutOrTest);return{options,handler:fn}}function createSuiteCollector(name,factory=()=>{},mode,each,suiteOptions){let tasks=[],suite;initSuite(!0);let task=function(name=``,options={}){let currentSuite=collectorContext.currentSuite?.suite,testTags=unique([...(currentSuite??collectorContext.currentSuite?.file)?.tags||[],...toArray(options.tags)]),tagsOptions=testTags.map(tag=>{let tagDefinition=runner.config.tags?.find(t=>t.name===tag);if(!tagDefinition&&runner.config.strictTags)throw createNoTagsError(runner.config.tags,tag);return tagDefinition}).filter(r=>r!=null).sort((tag1,tag2)=>(tag2.priority??POSITIVE_INFINITY)-(tag1.priority??POSITIVE_INFINITY)).reduce((acc,tag)=>{let{name,description,priority,meta,...options}=tag;return assignDefined(acc,options),meta&&(acc.meta=Object.assign(acc.meta??Object.create(null),meta)),acc},{}),testOwnMeta=options.meta,parentOptions=collectorContext.currentSuite?.options;options=assignDefined({...parentOptions,...tagsOptions},options);let timeout=options.timeout??runner.config.testTimeout,parentMeta=currentSuite?.meta,tagMeta=tagsOptions.meta,testMeta=Object.create(null);tagMeta&&Object.assign(testMeta,tagMeta),parentMeta&&Object.assign(testMeta,parentMeta),testOwnMeta&&Object.assign(testMeta,testOwnMeta);let task={id:``,name,fullName:createTaskName([currentSuite?.fullName??collectorContext.currentSuite?.file?.fullName,name]),fullTestName:createTaskName([currentSuite?.fullTestName,name]),suite:currentSuite,each:options.each,fails:options.fails,context:void 0,type:`test`,file:currentSuite?.file??collectorContext.currentSuite?.file,timeout,retry:options.retry??runner.config.retry,repeats:options.repeats??runner.config.repeats,mode:options.only?`only`:options.skip?`skip`:options.todo?`todo`:`run`,meta:testMeta,annotations:[],artifacts:[],benchmarks:[],tags:testTags},handler=options.handler;task.mode===`run`&&!handler&&(task.mode=`todo`),(options.concurrent??runner.config.sequence.concurrent)&&(task.concurrent=!0),task.shuffle=suiteOptions?.shuffle;let context=createTestContext(task,runner);Object.defineProperty(task,"context",{value:context,enumerable:!1}),setTestFixture(context,options.fixtures??new TestFixtures);let limit=Error.stackTraceLimit;Error.stackTraceLimit=10;let stackTraceError=Error(`STACK_TRACE_ERROR`);if(Error.stackTraceLimit=limit,handler&&setFn(task,withTimeout(withCancel(withAwaitAsyncAssertions(withFixtures(handler,{context}),task),task.context.signal),timeout,!1,stackTraceError,(_,error)=>abortIfTimeout([context],error))),runner.config.includeTaskLocation){let stack=findTestFileStackTrace(currentTestFilepath,stackTraceError);stack&&(task.location={line:stack.line,column:stack.column})}return tasks.push(task),task},test=createTest(function(name,optionsOrFn,timeoutOrTest){let{options,handler}=parseArguments(optionsOrFn,timeoutOrTest),concurrent=this.concurrent??options?.concurrent;concurrent!=null&&(options.concurrent=concurrent);let test=task(formatName(name),{...assignDefined({...this},options),handler});test.type=`test`}),collector={type:`collector`,name,mode,suite,options:suiteOptions,test,file:suite.file,tasks,collect,task,clear,on:addHook};function addHook(name,...fn){getHooks(suite)[name].push(...fn)}function initSuite(includeLocation){typeof suiteOptions==`number`&&(suiteOptions={timeout:suiteOptions});let currentSuite=collectorContext.currentSuite?.suite,parentTask=currentSuite??collectorContext.currentSuite?.file,suiteTags=toArray(suiteOptions?.tags);validateTags(runner.config,suiteTags),suite={id:``,type:`suite`,name,fullName:createTaskName([currentSuite?.fullName??collectorContext.currentSuite?.file?.fullName,name]),fullTestName:createTaskName([currentSuite?.fullTestName,name]),suite:currentSuite,mode,each,file:currentSuite?.file??collectorContext.currentSuite?.file,shuffle:suiteOptions?.shuffle,tasks:[],meta:suiteOptions?.meta??Object.create(null),concurrent:suiteOptions?.concurrent,tags:unique([...parentTask?.tags||[],...suiteTags])},setHooks(suite,createSuiteHooks())}function clear(){tasks.length=0,initSuite(!1)}async function collect(file){if(!file)throw TypeError(`File is required to collect tasks.`);factory&&await runWithSuite(collector,()=>factory(test));let allChildren=[],containsOnly=!1,containsTest=!1;for(let i of tasks){let child=i.type===`collector`?await i.collect(file):i;allChildren.push(child),(child.mode===`only`||child.type===`suite`&&child.containsOnly)&&(containsOnly=!0),(child.type===`test`||child.type===`suite`&&child.containsTest)&&(containsTest=!0)}return suite.tasks=allChildren,suite.containsOnly=containsOnly,suite.containsTest=containsTest,suite}return collectTask(collector),collector}function withAwaitAsyncAssertions(fn,task){return(async(...args)=>{let fnResult=await fn(...args);if(task.promises){let errors=(await Promise.allSettled(task.promises)).map(r=>r.status===`rejected`?r.reason:void 0).filter(Boolean);if(errors.length)throw errors}return fnResult})}function createSuite(){function suiteFn(name,factoryOrOptions,optionsOrFactory){let currentSuite=collectorContext.currentSuite||defaultSuite,{options,handler:factory}=parseArguments(factoryOrOptions,optionsOrFactory),{meta:parentMeta,...parentOptions}=currentSuite?.options||{};options=assignDefined({...parentOptions},options);let shuffle=this.shuffle??options.shuffle??currentSuite?.options?.shuffle??void 0;shuffle!=null&&(options.shuffle=shuffle);let mode=this.only??options.only?`only`:this.skip??options.skip?`skip`:this.todo??options.todo?`todo`:`run`;mode===`run`&&!factory&&(mode=`todo`);let concurrent=this.concurrent??options.concurrent;return concurrent!=null&&(options.concurrent=concurrent),parentMeta&&(options.meta=Object.assign(Object.create(null),parentMeta,options.meta)),createSuiteCollector(formatName(name),factory,mode,this.each,options)}return suiteFn.each=function(cases,...args){let context=getChainableContext(this),suite=context.withContext();return context.setContext(`each`,!0),Array.isArray(cases)&&args.length&&(cases=formatTemplateString(cases,args)),(name,optionsOrFn,fnOrOptions)=>{let _name=formatName(name),arrayOnlyCases=cases.every(Array.isArray),{options,handler}=parseArguments(optionsOrFn,fnOrOptions),fnFirst=typeof optionsOrFn==`function`;cases.forEach((i,idx)=>{let items=Array.isArray(i)?i:[i];fnFirst?arrayOnlyCases?suite(formatTitle(_name,items,idx),handler?()=>handler(...items):void 0,options.timeout):suite(formatTitle(_name,items,idx),handler?()=>handler(i):void 0,options.timeout):arrayOnlyCases?suite(formatTitle(_name,items,idx),options,handler?()=>handler(...items):void 0):suite(formatTitle(_name,items,idx),options,handler?()=>handler(i):void 0)}),context.setContext(`each`,void 0)}},suiteFn.for=function(cases,...args){let suite=getChainableContext(this).withContext();return Array.isArray(cases)&&args.length&&(cases=formatTemplateString(cases,args)),(name,optionsOrFn,fnOrOptions)=>{let name_=formatName(name),{options,handler}=parseArguments(optionsOrFn,fnOrOptions);cases.forEach((item,idx)=>{suite(formatTitle(name_,toArray(item),idx),options,handler?()=>handler(item):void 0)})}},suiteFn.skipIf=condition=>condition?suite.skip:suite,suiteFn.runIf=condition=>condition?suite:suite.skip,createChainable([`concurrent`,`shuffle`,`skip`,`only`,`todo`],suiteFn)}function createTaskCollector(fn){let taskFn=fn;taskFn.each=function(cases,...args){let context=getChainableContext(this),test=context.withContext();return context.setContext(`each`,!0),Array.isArray(cases)&&args.length&&(cases=formatTemplateString(cases,args)),(name,optionsOrFn,fnOrOptions)=>{let _name=formatName(name),arrayOnlyCases=cases.every(Array.isArray),{options,handler}=parseArguments(optionsOrFn,fnOrOptions),fnFirst=typeof optionsOrFn==`function`;cases.forEach((i,idx)=>{let items=Array.isArray(i)?i:[i];fnFirst?arrayOnlyCases?test(formatTitle(_name,items,idx),handler?()=>handler(...items):void 0,options.timeout):test(formatTitle(_name,items,idx),handler?()=>handler(i):void 0,options.timeout):arrayOnlyCases?test(formatTitle(_name,items,idx),options,handler?()=>handler(...items):void 0):test(formatTitle(_name,items,idx),options,handler?()=>handler(i):void 0)}),context.setContext(`each`,void 0)}},taskFn.for=function(cases,...args){let test=getChainableContext(this).withContext();return Array.isArray(cases)&&args.length&&(cases=formatTemplateString(cases,args)),(name,optionsOrFn,fnOrOptions)=>{let _name=formatName(name),{options,handler}=parseArguments(optionsOrFn,fnOrOptions);cases.forEach((item,idx)=>{let handlerWrapper=handler?ctx=>handler(item,ctx):void 0;handlerWrapper&&configureProps(handlerWrapper,{index:1,original:handler}),test(formatTitle(_name,toArray(item),idx),options,handlerWrapper)})}},taskFn.skipIf=function(condition){return getChainableContext(this).extendContext({skip:!!condition})},taskFn.runIf=function(condition){return getChainableContext(this).extendContext({skip:!condition})};function parseBuilderFixtures(fixturesOrName,optionsOrFn,maybeFn){if(typeof fixturesOrName!=`string`)return fixturesOrName;let fixtureName=fixturesOrName,fixtureOptions,fixtureValue;if(maybeFn===void 0?typeof optionsOrFn==`object`&&optionsOrFn&&!Array.isArray(optionsOrFn)&&TestFixtures.isFixtureOptions(optionsOrFn)?(fixtureOptions=optionsOrFn,fixtureValue={}):(fixtureOptions=void 0,fixtureValue=optionsOrFn):(fixtureOptions=optionsOrFn,fixtureValue=maybeFn),typeof fixtureValue==`function`){let builderFn=fixtureValue,fixture=async(ctx,use)=>{let cleanup;await use(await builderFn(ctx,{onCleanup:fn=>{if(cleanup!==void 0)throw Error(`onCleanup can only be called once per fixture. Define separate fixtures if you need multiple cleanup functions.`);cleanup=fn}})),cleanup&&await cleanup()};return configureProps(fixture,{original:builderFn}),fixtureOptions?{[fixtureName]:[fixture,fixtureOptions]}:{[fixtureName]:fixture}}return fixtureOptions?{[fixtureName]:[fixtureValue,fixtureOptions]}:{[fixtureName]:fixtureValue}}return taskFn.override=function(fixturesOrName,optionsOrFn,maybeFn){let userFixtures=parseBuilderFixtures(fixturesOrName,optionsOrFn,maybeFn);return getChainableContext(this).getFixtures().override(runner,userFixtures),this},taskFn.scoped=function(fixtures){return console.warn(`test.scoped() is deprecated and will be removed in future versions. Please use test.override() instead.`),this.override(fixtures)},taskFn.extend=function(fixturesOrName,optionsOrFn,maybeFn){let userFixtures=parseBuilderFixtures(fixturesOrName,optionsOrFn,maybeFn),fixtures=getChainableContext(this).getFixtures().extend(runner,userFixtures),_test=createTest(function(name,optionsOrFn,optionsOrTest){fn.call(this,formatName(name),optionsOrFn,optionsOrTest)});return getChainableContext(_test).mergeContext({fixtures}),_test},taskFn.describe=suite,taskFn.suite=suite,taskFn.beforeEach=beforeEach,taskFn.afterEach=afterEach,taskFn.beforeAll=beforeAll,taskFn.afterAll=afterAll,taskFn.aroundEach=aroundEach,taskFn.aroundAll=aroundAll,createChainable([`concurrent`,`skip`,`only`,`todo`,`fails`],taskFn,{fixtures:new TestFixtures})}function createTest(fn){return createTaskCollector(fn)}function formatName(name){return typeof name==`string`?name:typeof name==`function`?name.name||`<anonymous>`:String(name)}function formatTitle(template,items,idx){(template.includes(`%#`)||template.includes(`%$`))&&(template=template.replace(/%%/g,`__vitest_escaped_%__`).replace(/%#/g,`${idx}`).replace(/%\$/g,`${idx+1}`).replace(/__vitest_escaped_%__/g,`%%`));let count=template.split(`%`).length-1;template.includes(`%f`)&&(template.match(/%f/g)||[]).forEach((_,i)=>{if(isNegativeNaN(items[i])||Object.is(items[i],-0)){let occurrence=0;template=template.replace(/%f/g,match=>(occurrence++,occurrence===i+1?`-%f`:match))}});let inspectOptions={truncate:runner.config.taskTitleValueFormatTruncate},isObjectItem=isObject(items[0]);function formatAttribute(s){return s.replace(/\$([$\p{ID_Continue}.]+)/gu,(_,key)=>{let isArrayKey=/^\d+$/.test(key);if(!isObjectItem&&!isArrayKey)return`$${key}`;let arrayElement=isArrayKey?objectAttr(items,key):void 0,value=isObjectItem?objectAttr(items[0],key,arrayElement):arrayElement;return typeof value==`string`?inspectOptions.truncate?truncateString(value,inspectOptions.truncate):value:inspect$1(value,inspectOptions)})}let output=``,i=0;return handleRegexMatch(template,formatRegExp,match=>{output+=i<count?format$1([match[0],items[i++]],inspectOptions):match[0]},nonMatch=>{output+=formatAttribute(nonMatch)}),output}function handleRegexMatch(input,regex,onMatch,onNonMatch){let lastIndex=0;for(let m of input.matchAll(regex))lastIndex<m.index&&onNonMatch(input.slice(lastIndex,m.index)),onMatch(m),lastIndex=m.index+m[0].length;lastIndex<input.length&&onNonMatch(input.slice(lastIndex))}function formatTemplateString(cases,args){let header=cases.join(``).trim().replace(/ /g,``).split(`
|
|
143
|
+
`).map(i=>i.split(`|`))[0],res=[];for(let i=0;i<Math.floor(args.length/header.length);i++){let oneCase={};for(let j=0;j<header.length;j++)oneCase[header[j]]=args[i*header.length+j];res.push(oneCase)}return res}async function recordArtifact(task,artifact){let runner=getRunner(),stack=findTestFileStackTrace(task.file.filepath,Error(`STACK_TRACE`));if(stack&&(artifact.location={file:stack.file,line:stack.line,column:stack.column},artifact.type===`internal:annotation`&&(artifact.annotation.location=artifact.location)),Array.isArray(artifact.attachments))for(let attachment of artifact.attachments)manageArtifactAttachment(attachment);if(artifact.type===`internal:annotation`)return artifact;if(!runner.onTestArtifactRecord)throw Error(`Test runner doesn't support test artifacts.`);await finishSendTasksUpdate(runner);let resolvedArtifact=await runner.onTestArtifactRecord(task,artifact);return task.artifacts.push(resolvedArtifact),resolvedArtifact}const table=[];for(let i=65;i<91;i++)table.push(String.fromCharCode(i));for(let i=97;i<123;i++)table.push(String.fromCharCode(i));for(let i=0;i<10;i++)table.push(i.toString(10));table.push(`+`,`/`);function encodeUint8Array(bytes){let base64=``,len=bytes.byteLength;for(let i=0;i<len;i+=3)if(len===i+1){let a=(bytes[i]&252)>>2,b=(bytes[i]&3)<<4;base64+=table[a],base64+=table[b],base64+=`==`}else if(len===i+2){let a=(bytes[i]&252)>>2,b=(bytes[i]&3)<<4|(bytes[i+1]&240)>>4,c=(bytes[i+1]&15)<<2;base64+=table[a],base64+=table[b],base64+=table[c],base64+=`=`}else{let a=(bytes[i]&252)>>2,b=(bytes[i]&3)<<4|(bytes[i+1]&240)>>4,c=(bytes[i+1]&15)<<2|(bytes[i+2]&192)>>6,d=bytes[i+2]&63;base64+=table[a],base64+=table[b],base64+=table[c],base64+=table[d]}return base64}function recordAsyncOperation(test,promise){return promise=promise.finally(()=>{if(!test.promises)return;let index=test.promises.indexOf(promise);index!==-1&&test.promises.splice(index,1)}),test.promises||=[],test.promises.push(promise),promise}function manageArtifactAttachment(attachment){if(attachment.body==null&&!attachment.path)throw TypeError(`Test attachment requires "body" or "path" to be set. Both are missing.`);if(attachment.body&&attachment.path)throw TypeError(`Test attachment requires only one of "body" or "path" to be set. Both are specified.`);if(attachment.path&&attachment.bodyEncoding)throw TypeError(`Test attachment with "path" should not have "bodyEncoding" specified.`);attachment.body instanceof Uint8Array&&(attachment.body=encodeUint8Array(attachment.body)),attachment.body!=null&&(attachment.bodyEncoding??=`base64`)}const now$2=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;var TaskDeadline=class{startTime=now$2();endTime;timer;operations=new Set;constructor(timeout,onTimeout){this.endTime=this.startTime+timeout;let{setTimeout}=getSafeTimers();this.timer=setTimeout(onTimeout,timeout),this.timer.unref?.()}remaining(){return this.endTime-now$2()}exceeded(){return now$2()>=this.endTime}clear(){let{clearTimeout}=getSafeTimers();clearTimeout(this.timer)}derive(){return Math.max(Math.floor(this.remaining())-100,1)}track(name,promise,timeout,source){let operation={name,source,promise,endTime:now$2()+timeout};return this.operations.add(operation),promise.finally(()=>this.operations.delete(operation)).catch(()=>{}),promise}settle(){if(!this.operations.size)return;let operations=[...this.operations],pending=()=>operations.filter(operation=>this.operations.has(operation)),due=operations.filter(operation=>operation.endTime<=this.endTime);if(!due.length)return Promise.resolve(operations);let{setTimeout}=getSafeTimers(),waitUntil=Math.max(...due.map(operation=>operation.endTime))+500;return Promise.race([Promise.all(due.map(operation=>operation.promise)).then(pending),new Promise(resolve=>setTimeout(()=>{resolve(pending())},Math.max(waitUntil-now$2(),0)))])}};const collectorContext={tasks:[],currentSuite:null};function collectTask(task){collectorContext.currentSuite?.tasks.push(task)}async function runWithSuite(suite,fn){let prev=collectorContext.currentSuite;collectorContext.currentSuite=suite,await fn(),collectorContext.currentSuite=prev}function withTimeout(fn,timeout,isHook=!1,stackTraceError,onTimeout){return timeout<=0||timeout===1/0?fn:function(...args){let runner=getRunner(),previousDeadline=runner._deadline;return new Promise((resolve_,reject_)=>{let settled=!1,deadline=new TaskDeadline(timeout,()=>{let pending=deadline.settle();if(pending){pending.then(rejectTimeoutError,reject);return}rejectTimeoutError()});runner._deadline=deadline;function rejectTimeoutError(pending){if(settled)return;settled=!0;let error=makeTimeoutError(isHook,timeout,stackTraceError,pending);onTimeout?.(args,error),reject_(error)}function resolve(result){if(runner._deadline=previousDeadline,deadline.clear(),deadline.exceeded()){rejectTimeoutError();return}settled=!0,resolve_(result)}function reject(error){settled||(settled=!0,runner._deadline=previousDeadline,deadline.clear(),reject_(error))}try{let result=fn(...args);typeof result==`object`&&result&&typeof result.then==`function`?result.then(resolve,reject):resolve(result)}catch(error){reject(error)}})}}function withCancel(fn,signal){return function(...args){return new Promise((resolve,reject)=>{let onAbort=()=>reject(signal.reason);signal.addEventListener(`abort`,onAbort,{once:!0});let cleanup=()=>signal.removeEventListener(`abort`,onAbort);try{let result=fn(...args);typeof result==`object`&&result&&typeof result.then==`function`?result.then(value=>{cleanup(),resolve(value)},error=>{cleanup(),reject(error)}):(cleanup(),resolve(result))}catch(error){cleanup(),reject(error)}})}}const abortControllers=new WeakMap;function abortIfTimeout([context],error){context&&abortContextSignal(context,error)}function abortContextSignal(context,error){abortControllers.get(context)?.abort(error)}function createTestContext(test,runner){let context=function(){throw Error(`done() callback is deprecated, use promise instead`)},abortController=abortControllers.get(context);return abortController||(abortController=new AbortController,abortControllers.set(context,abortController)),context.signal=abortController.signal,context.task=test,context.skip=(condition,note)=>{if(condition!==!1)throw test.result??={state:`skip`},test.result.pending=!0,new PendingError(`test is skipped; abort execution`,test,typeof condition==`string`?condition:note)},context.annotate=((message,type,attachment)=>{if(test.result&&test.result.state!==`run`)throw Error(`Cannot annotate tests outside of the test run. The test "${test.name}" finished running with the "${test.result.state}" state already.`);let annotation={message,type:typeof type==`object`||type===void 0?`notice`:type},annotationAttachment=typeof type==`object`?type:attachment;return annotationAttachment&&(annotation.attachment=annotationAttachment,manageArtifactAttachment(annotation.attachment)),recordAsyncOperation(test,recordArtifact(test,{type:`internal:annotation`,annotation}).then(async({annotation})=>{if(!runner.onTestAnnotate)throw Error(`Test runner doesn't support test annotations.`);await finishSendTasksUpdate(runner);let resolvedAnnotation=await runner.onTestAnnotate(test,annotation);return test.annotations.push(resolvedAnnotation),resolvedAnnotation}))}),context.onTestFailed=(handler,timeout)=>{test.onFailed||=[],test.onFailed.push(withTimeout(handler,timeout??runner.config.hookTimeout,!0,Error(`STACK_TRACE_ERROR`),(_,error)=>abortController.abort(error)))},context.onTestFinished=(handler,timeout)=>{test.onFinished||=[],test.onFinished.push(withTimeout(handler,timeout??runner.config.hookTimeout,!0,Error(`STACK_TRACE_ERROR`),(_,error)=>abortController.abort(error)))},runner.extendTaskContext?.(context)||context}function makeTimeoutError(isHook,timeout,stackTraceError,pending){let waiting=pending?.length?` while waiting for ${pending.map(operation=>operation.name).join(`, `)}`:``,lastOperationSource=pending?.at(-1)?.source;lastOperationSource&&(stackTraceError=lastOperationSource);let message=`${isHook?`Hook`:`Test`} timed out in ${timeout}ms${waiting}.\nIf this is a long-running ${isHook?`hook`:`test`}, pass a timeout value as the last argument or configure it globally with "${isHook?`hookTimeout`:`testTimeout`}".`,error=Error(message);return stackTraceError?.stack&&(error.stack=stackTraceError.stack.replace(stackTraceError.message,error.message)),error}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,Date.now;const{clearTimeout,setTimeout:setTimeout$1}=getSafeTimers(),packs=new Map,eventsPacks=[],pendingTasksUpdates=[];function sendTasksUpdate(runner){if(packs.size){let taskPacks=Array.from(packs).map(([id,task])=>[id,task[0],task[1]]),p=runner.onTaskUpdate?.(taskPacks,eventsPacks);p&&(pendingTasksUpdates.push(p),p.then(()=>pendingTasksUpdates.splice(pendingTasksUpdates.indexOf(p),1),()=>{})),eventsPacks.length=0,packs.clear()}}async function finishSendTasksUpdate(runner){sendTasksUpdate(runner),await Promise.all(pendingTasksUpdates)}function getWorkerState(){let workerState=globalThis.__vitest_worker__;if(!workerState)throw Error(`Vitest failed to access its internal state.
|
|
144
|
+
|
|
145
|
+
One of the following is possible:
|
|
146
|
+
- "vitest" is imported directly without running "vitest" command
|
|
147
|
+
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
148
|
+
- "vitest" is imported inside Vite / Vitest config file
|
|
149
|
+
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
150
|
+
`);return workerState}function isChildProcess(){return typeof process<`u`&&!!process.send}function resetModules(modules,resetMocks=!1){let skipPaths=[/\/vitest\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...resetMocks?[]:[/^mock:/]];modules.idToModuleMap.forEach((node,path)=>{skipPaths.some(re=>re.test(path))||(node.promise=void 0,node.exports=void 0,node.evaluated=!1,node.importers.clear())})}function isMockFunction(fn){return typeof fn==`function`&&`_isMockFunction`in fn&&fn._isMockFunction===!0}const MOCK_RESTORE=new Set,DIRTY_MOCK_STATES=new Set,DIRTY_MOCK_CONFIGS=new Set,addToSet=Set.prototype.add,MOCK_REFS=new WeakMap,MOCK_FINALIZER=new FinalizationRegistry(ref=>{DIRTY_MOCK_STATES.delete(ref),DIRTY_MOCK_CONFIGS.delete(ref)}),MOCK_CONFIGS=new WeakMap,MOCKS_BY_STATE=new WeakMap;function markDirty(set,mock){let ref=MOCK_REFS.get(mock);ref||(ref=new WeakRef(mock),MOCK_REFS.set(mock,ref),MOCK_FINALIZER.register(mock,ref)),addToSet.call(set,ref)}function unmarkDirty(set,mock){let ref=MOCK_REFS.get(mock);ref&&set.delete(ref)}function forEachDirty(set,fn){for(let ref of set){let mock=ref.deref();mock?fn(mock):set.delete(ref)}}function createMockInstance(options={}){let{originalImplementation,restore,mockImplementation,resetToMockImplementation,resetToMockName}=options;restore&&MOCK_RESTORE.add(restore);let config=getDefaultConfig(originalImplementation),state=getDefaultState(),mock=createMock({config,state,...options}),mockLength=(mockImplementation||originalImplementation)?.length??0;Object.defineProperty(mock,"length",{writable:!0,enumerable:!1,value:mockLength,configurable:!0}),resetToMockName&&(config.mockName=mock.name||`vi.fn()`),MOCK_CONFIGS.set(mock,config),MOCKS_BY_STATE.set(state,mock),mock._isMockFunction=!0,mock.getMockImplementation=()=>config.onceMockImplementations[0]||config.mockImplementation;let updateMockPrototype=()=>{options.prototypeMembers?.length||reparentMockPrototype(mock,config.onceMockImplementations[0]||config.mockImplementation||originalImplementation)};return Object.defineProperty(mock,"mock",{configurable:!1,enumerable:!0,writable:!1,value:state}),mock.mockImplementation=function(implementation){return markDirty(DIRTY_MOCK_CONFIGS,mock),config.mockImplementation=implementation,updateMockPrototype(),mock},mock.mockImplementationOnce=function(implementation){return markDirty(DIRTY_MOCK_CONFIGS,mock),config.onceMockImplementations.push(implementation),updateMockPrototype(),mock},mock.withImplementation=function(implementation,callback){markDirty(DIRTY_MOCK_CONFIGS,mock);let previousImplementation=config.mockImplementation,previousOnceImplementations=config.onceMockImplementations,reset=()=>{config.mockImplementation=previousImplementation,config.onceMockImplementations=previousOnceImplementations,markDirty(DIRTY_MOCK_CONFIGS,mock),updateMockPrototype()};config.mockImplementation=implementation,config.onceMockImplementations=[],updateMockPrototype();let returnValue=callback();return typeof returnValue==`object`&&typeof returnValue?.then==`function`?returnValue.then(()=>(reset(),mock)):(reset(),mock)},mock.mockReturnThis=function(){return mock.mockImplementation(function(){return this})},mock.mockReturnValue=function(value){return mock.mockImplementation(function(){return new.target&&throwConstructorError(`mockReturnValue`),value})},mock.mockReturnValueOnce=function(value){return mock.mockImplementationOnce(function(){return new.target&&throwConstructorError(`mockReturnValueOnce`),value})},mock.mockThrow=function(value){return mock.mockImplementation(function(){throw value})},mock.mockThrowOnce=function(value){return mock.mockImplementationOnce(function(){throw value})},mock.mockResolvedValue=function(value){return mock.mockImplementation(function(){return new.target&&throwConstructorError(`mockResolvedValue`),Promise.resolve(value)})},mock.mockResolvedValueOnce=function(value){return mock.mockImplementationOnce(function(){return new.target&&throwConstructorError(`mockResolvedValueOnce`),Promise.resolve(value)})},mock.mockRejectedValue=function(value){return mock.mockImplementation(function(){return new.target&&throwConstructorError(`mockRejectedValue`),Promise.reject(value)})},mock.mockRejectedValueOnce=function(value){return mock.mockImplementationOnce(function(){return new.target&&throwConstructorError(`mockRejectedValueOnce`),Promise.reject(value)})},mock.mockClear=function(){return state.calls=[],state.contexts=[],state.instances=[],state.invocationCallOrder=[],state.results=[],state.settledResults=[],unmarkDirty(DIRTY_MOCK_STATES,mock),mock},mock.mockReset=function(){return mock.mockClear(),config.mockImplementation=resetToMockImplementation?mockImplementation:void 0,config.mockName=resetToMockName&&mock.name||`vi.fn()`,config.onceMockImplementations=[],unmarkDirty(DIRTY_MOCK_CONFIGS,mock),updateMockPrototype(),mock},mock.mockRestore=function(){return mock.mockReset(),restore?.()},mock.mockName=function(name){return typeof name==`string`&&(markDirty(DIRTY_MOCK_CONFIGS,mock),config.mockName=name),mock},mock.getMockName=function(){return config.mockName||`vi.fn()`},Symbol.dispose&&(mock[Symbol.dispose]=()=>mock.mockRestore()),mockImplementation?mock.mockImplementation(mockImplementation):updateMockPrototype(),mock}function fn(originalImplementation){return originalImplementation!=null&&isMockFunction(originalImplementation)?originalImplementation:createMockInstance({mockImplementation:originalImplementation,resetToMockImplementation:!0})}function spyOn(object,key,accessor){assert$1(object!=null,`The vi.spyOn() function could not find an object to spy upon. The first argument must be defined.`),assert$1(typeof object==`object`||typeof object==`function`,`Vitest cannot spy on a primitive value.`);let[originalDescriptorObject,originalDescriptor]=getDescriptor(object,key)||[];assert$1(originalDescriptor||key in object,`The property "${String(key)}" is not defined on the ${typeof object}.`);let accessType=accessor||`value`,ssr=!1;accessType===`value`&&originalDescriptor&&originalDescriptor.value==null&&originalDescriptor.get&&(accessType=`get`,ssr=!0);let original;originalDescriptor?(original=originalDescriptor[accessType],original==null&&accessType===`value`&&(original=object[key])):original=accessType===`value`?object[key]:()=>object[key];let originalImplementation=ssr&&original?original():original,originalType=typeof originalImplementation;if(assert$1(originalType===`function`||accessType!==`value`&&original==null,`vi.spyOn() can only spy on a function. Received ${originalType}.`),isMockFunction(originalImplementation))return originalImplementation;let reassign=cb=>{let{value,...desc}=originalDescriptor||{configurable:!0,writable:!0};accessType!==`value`&&delete desc.writable,desc[accessType]=cb,Object.defineProperty(object,key,desc)},mock=createMockInstance({restore:()=>{originalDescriptorObject===object?originalDescriptor&&!original?Object.defineProperty(object,key,originalDescriptor):reassign(original):Reflect.deleteProperty(object,key)},originalImplementation,resetToMockName:!0});try{reassign(ssr?()=>mock:mock)}catch(error){throw error instanceof TypeError&&Symbol.toStringTag&&object[Symbol.toStringTag]===`Module`&&(error.message.includes(`Cannot redefine property`)||error.message.includes(`Cannot replace module namespace`)||error.message.includes(`can't redefine non-configurable property`))?TypeError(`Cannot spy on export "${String(key)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/mocking/modules#mocking-a-module`,{cause:error}):error}return mock}function getDescriptor(obj,method){let objDescriptor=Object.getOwnPropertyDescriptor(obj,method);if(objDescriptor)return[obj,objDescriptor];let currentProto=Object.getPrototypeOf(obj);for(;currentProto!==null;){let descriptor=Object.getOwnPropertyDescriptor(currentProto,method);if(descriptor)return[currentProto,descriptor];currentProto=Object.getPrototypeOf(currentProto)}}function assert$1(condition,message){if(!condition)throw Error(message)}let invocationCallCounter=1;function createMock({state,config,name:mockName,prototypeState,prototypeConfig,keepMembersImplementation,mockImplementation,prototypeMembers=[]}){let original=config.mockOriginal,pseudoOriginal=mockImplementation,name=mockName||original?.name||`Mock`,noopImplementation=function(){},prototypeMock=prototypeState&&MOCKS_BY_STATE.get(prototypeState),namedObject={[name]:function(...args){markDirty(DIRTY_MOCK_STATES,namedObject[name]),prototypeMock&&markDirty(DIRTY_MOCK_STATES,prototypeMock),registerCalls(args,state,prototypeState),registerInvocationOrder(invocationCallCounter++,state,prototypeState);let result={type:`incomplete`,value:void 0},settledResult={type:`incomplete`,value:void 0};registerResult(result,state,prototypeState),registerSettledResult(settledResult,state,prototypeState);let context=new.target?void 0:this,[instanceIndex,instancePrototypeIndex]=registerInstance(context,state,prototypeState),[contextIndex,contextPrototypeIndex]=registerContext(context,state,prototypeState),implementation=config.onceMockImplementations.shift()||config.mockImplementation||prototypeConfig?.onceMockImplementations.shift()||prototypeConfig?.mockImplementation||original||noopImplementation,returnValue,thrownValue,didThrow=!1;try{if(new.target){prototypeMembers.length===0&&reparentMockPrototype(mock,implementation===noopImplementation?void 0:implementation),returnValue=Reflect.construct(implementation,args,new.target);for(let prop of prototypeMembers){let prototypeMock=returnValue[prop];if(prototypeMock!==mock.prototype[prop])continue;let isMock=isMockFunction(prototypeMock),prototypeState=isMock?prototypeMock.mock:void 0,prototypeConfig=isMock?MOCK_CONFIGS.get(prototypeMock):void 0;returnValue[prop]=createMockInstance({originalImplementation:keepMembersImplementation?prototypeConfig?.mockOriginal:void 0,prototypeState,prototypeConfig,keepMembersImplementation})}}else returnValue=Reflect.apply(implementation,this,args)}catch(error){throw thrownValue=error,didThrow=!0,error instanceof TypeError&&error.message.includes(`is not a constructor`)&&console.warn(`[vitest] The ${namedObject[name].getMockName()} mock did not use 'function' or 'class' in its implementation, see https://vitest.dev/api/vi#vi-spyon for examples.`),error}finally{didThrow?(result.type=`throw`,result.value=thrownValue,settledResult.type=`rejected`,settledResult.value=thrownValue):(result.type=`return`,result.value=returnValue,new.target&&(state.contexts[contextIndex-1]=returnValue,state.instances[instanceIndex-1]=returnValue,contextPrototypeIndex!=null&&prototypeState&&(prototypeState.contexts[contextPrototypeIndex-1]=returnValue),instancePrototypeIndex!=null&&prototypeState&&(prototypeState.instances[instancePrototypeIndex-1]=returnValue)),returnValue instanceof Promise?returnValue.then(settledValue=>{settledResult.type=`fulfilled`,settledResult.value=settledValue},rejectedValue=>{settledResult.type=`rejected`,settledResult.value=rejectedValue}):(settledResult.type=`fulfilled`,settledResult.value=returnValue))}return returnValue}},mock=namedObject[name],copyPropertiesFrom=original||pseudoOriginal;return copyPropertiesFrom&©OriginalStaticProperties(mock,copyPropertiesFrom),mock}function reparentMockPrototype(mock,implementation){let mockPrototype=mock.prototype;if(mockPrototype==null)return;let parent=implementation?.prototype??Object.prototype;mockPrototype!==parent&&Object.getPrototypeOf(mockPrototype)!==parent&&Object.setPrototypeOf(mockPrototype,parent)}function registerCalls(args,state,prototypeState){state.calls.push(args),prototypeState?.calls.push(args)}function registerInvocationOrder(order,state,prototypeState){state.invocationCallOrder.push(order),prototypeState?.invocationCallOrder.push(order)}function registerResult(result,state,prototypeState){state.results.push(result),prototypeState?.results.push(result)}function registerSettledResult(result,state,prototypeState){state.settledResults.push(result),prototypeState?.settledResults.push(result)}function registerInstance(instance,state,prototypeState){return[state.instances.push(instance),prototypeState?.instances.push(instance)]}function registerContext(context,state,prototypeState){return[state.contexts.push(context),prototypeState?.contexts.push(context)]}function copyOriginalStaticProperties(mock,original){let{properties,descriptors}=getAllProperties(original);for(let key of properties){let descriptor=descriptors[key];getDescriptor(mock,key)||Object.defineProperty(mock,key,descriptor)}}const ignoreProperties=new Set([`length`,`name`,`prototype`,Symbol.for(`nodejs.util.promisify.custom`)]);function getAllProperties(original){let properties=new Set,descriptors={};for(;original&&original!==Object.prototype&&original!==Function.prototype;){let ownProperties=[...Object.getOwnPropertyNames(original),...Object.getOwnPropertySymbols(original)];for(let prop of ownProperties)descriptors[prop]||ignoreProperties.has(prop)||(properties.add(prop),descriptors[prop]=Object.getOwnPropertyDescriptor(original,prop));original=Object.getPrototypeOf(original)}return{properties,descriptors}}function getDefaultConfig(original){return{mockImplementation:void 0,mockOriginal:original,mockName:`vi.fn()`,onceMockImplementations:[]}}function getDefaultState(){let state={calls:[],contexts:[],instances:[],invocationCallOrder:[],settledResults:[],results:[],get lastCall(){return state.calls.at(-1)}};return state}function restoreAllMocks(){for(let restore of MOCK_RESTORE)restore();MOCK_RESTORE.clear()}function clearAllMocks(){forEachDirty(DIRTY_MOCK_STATES,mock=>mock.mockClear())}function resetAllMocks(){forEachDirty(DIRTY_MOCK_STATES,mock=>mock.mockReset()),forEachDirty(DIRTY_MOCK_CONFIGS,mock=>mock.mockReset())}function throwConstructorError(shorthand){throw TypeError(`Cannot use \`${shorthand}\` when called with \`new\`. Use \`mockImplementation\` with a \`class\` keyword instead. See https://vitest.dev/api/mock#class-support for more information.`)}var __defProp$1=Object.defineProperty,__defNormalProp=(obj,key,value)=>key in obj?__defProp$1(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__name=(target,value)=>__defProp$1(target,`name`,{value,configurable:!0}),__export$1=(target,all)=>{for(var name in all)__defProp$1(target,name,{get:all[name],enumerable:!0})},__publicField=(obj,key,value)=>__defNormalProp(obj,typeof key==`symbol`?key:key+``,value),utils_exports={};__export$1(utils_exports,{addChainableMethod:()=>addChainableMethod,addLengthGuard:()=>addLengthGuard,addMethod:()=>addMethod,addProperty:()=>addProperty,checkError:()=>check_error_exports,compareByInspect:()=>compareByInspect,eql:()=>deep_eql_default,events:()=>events,expectTypes:()=>expectTypes,flag:()=>flag,getActual:()=>getActual,getMessage:()=>getMessage2,getName:()=>getName,getOperator:()=>getOperator,getOwnEnumerableProperties:()=>getOwnEnumerableProperties,getOwnEnumerablePropertySymbols:()=>getOwnEnumerablePropertySymbols,getPathInfo:()=>getPathInfo,hasProperty:()=>hasProperty,inspect:()=>inspect2,isNaN:()=>isNaN2,isNumeric:()=>isNumeric,isProxyEnabled:()=>isProxyEnabled,isRegExp:()=>isRegExp2,objDisplay:()=>objDisplay,overwriteChainableMethod:()=>overwriteChainableMethod,overwriteMethod:()=>overwriteMethod,overwriteProperty:()=>overwriteProperty,proxify:()=>proxify,test:()=>test$1,transferFlags:()=>transferFlags,type:()=>type});var check_error_exports={};__export$1(check_error_exports,{compatibleConstructor:()=>compatibleConstructor,compatibleInstance:()=>compatibleInstance,compatibleMessage:()=>compatibleMessage,getConstructorName:()=>getConstructorName,getMessage:()=>getMessage});function isErrorInstance(obj){return obj instanceof Error||Object.prototype.toString.call(obj)===`[object Error]`}__name(isErrorInstance,`isErrorInstance`);function isRegExp(obj){return Object.prototype.toString.call(obj)===`[object RegExp]`}__name(isRegExp,`isRegExp`);function compatibleInstance(thrown,errorLike){return isErrorInstance(errorLike)&&thrown===errorLike}__name(compatibleInstance,`compatibleInstance`);function compatibleConstructor(thrown,errorLike){return isErrorInstance(errorLike)?thrown.constructor===errorLike.constructor||thrown instanceof errorLike.constructor:(typeof errorLike==`object`||typeof errorLike==`function`)&&errorLike.prototype?thrown.constructor===errorLike||thrown instanceof errorLike:!1}__name(compatibleConstructor,`compatibleConstructor`);function compatibleMessage(thrown,errMatcher){let comparisonString=typeof thrown==`string`?thrown:thrown.message;return comparisonString===void 0?!1:isRegExp(errMatcher)?errMatcher.test(comparisonString):typeof errMatcher==`string`&&comparisonString.indexOf(errMatcher)!==-1}__name(compatibleMessage,`compatibleMessage`);function getConstructorName(errorLike){let constructorName=errorLike;return isErrorInstance(errorLike)?constructorName=errorLike.constructor.name:typeof errorLike==`function`&&(constructorName=errorLike.name,constructorName===``&&(constructorName=new errorLike().name||constructorName)),constructorName}__name(getConstructorName,`getConstructorName`);function getMessage(errorLike){let msg=``;return errorLike&&errorLike.message?msg=errorLike.message:typeof errorLike==`string`&&(msg=errorLike),msg}__name(getMessage,`getMessage`);function flag(obj,key,value){let flags=obj.__flags||=Object.create(null);if(arguments.length===3)flags[key]=value;else return flags[key]}__name(flag,`flag`);function test$1(obj,args){let negate=flag(obj,`negate`),expr=args[0];return negate?!expr:expr}__name(test$1,`test`);function type(obj){if(obj===void 0)return`undefined`;if(obj===null)return`null`;let stringTag=obj[Symbol.toStringTag];return typeof stringTag==`string`?stringTag:Object.prototype.toString.call(obj).slice(8,-1)}__name(type,`type`);var canElideFrames=`captureStackTrace`in Error,_AssertionError=class _AssertionError extends Error{constructor(message=`Unspecified AssertionError`,props,ssf){super(message),__publicField(this,`message`),this.message=message,canElideFrames&&Error.captureStackTrace(this,ssf||_AssertionError);for(let key in props)key in this||(this[key]=props[key])}get name(){return`AssertionError`}get ok(){return!1}toJSON(stack){return{...this,name:this.name,message:this.message,ok:!1,stack:stack===!1?void 0:this.stack}}};__name(_AssertionError,`AssertionError`);var AssertionError=_AssertionError;function expectTypes(obj,types){let flagMsg=flag(obj,`message`),ssfi=flag(obj,`ssfi`);flagMsg=flagMsg?flagMsg+`: `:``,obj=flag(obj,`object`),types=types.map(function(t){return t.toLowerCase()}),types.sort();let str=types.map(function(t,index){let art=~[`a`,`e`,`i`,`o`,`u`].indexOf(t.charAt(0))?`an`:`a`;return(types.length>1&&index===types.length-1?`or `:``)+art+` `+t}).join(`, `),objType=type(obj).toLowerCase();if(!types.some(function(expected){return objType===expected}))throw new AssertionError(flagMsg+`object tested must be `+str+`, but `+objType+` given`,void 0,ssfi)}__name(expectTypes,`expectTypes`);function getActual(obj,args){return args.length>4?args[4]:obj._obj}__name(getActual,`getActual`);var ansiColors={bold:[`1`,`22`],dim:[`2`,`22`],italic:[`3`,`23`],underline:[`4`,`24`],inverse:[`7`,`27`],hidden:[`8`,`28`],strike:[`9`,`29`],black:[`30`,`39`],red:[`31`,`39`],green:[`32`,`39`],yellow:[`33`,`39`],blue:[`34`,`39`],magenta:[`35`,`39`],cyan:[`36`,`39`],white:[`37`,`39`],brightblack:[`30;1`,`39`],brightred:[`31;1`,`39`],brightgreen:[`32;1`,`39`],brightyellow:[`33;1`,`39`],brightblue:[`34;1`,`39`],brightmagenta:[`35;1`,`39`],brightcyan:[`36;1`,`39`],brightwhite:[`37;1`,`39`],grey:[`90`,`39`]},styles={special:`cyan`,number:`yellow`,bigint:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,symbol:`green`,date:`magenta`,regexp:`red`},truncator=`…`;function colorise(value,styleType){let color=ansiColors[styles[styleType]]||ansiColors[styleType]||``;return color?`\x1B[${color[0]}m${String(value)}\x1B[${color[1]}m`:String(value)}__name(colorise,`colorise`);function normaliseOptions({showHidden=!1,depth=2,colors=!1,customInspect=!0,showProxy=!1,maxArrayLength=1/0,breakLength=1/0,seen=[],truncate:truncate2=1/0,stylize=String}={},inspect3){let options={showHidden:!!showHidden,depth:Number(depth),colors:!!colors,customInspect:!!customInspect,showProxy:!!showProxy,maxArrayLength:Number(maxArrayLength),breakLength:Number(breakLength),truncate:Number(truncate2),seen,inspect:inspect3,stylize};return options.colors&&(options.stylize=colorise),options}__name(normaliseOptions,`normaliseOptions`);function isHighSurrogate(char){return char>=`\ud800`&&char<=`\udbff`}__name(isHighSurrogate,`isHighSurrogate`);function truncate(string,length,tail=truncator){string=String(string);let tailLength=tail.length,stringLength=string.length;if(tailLength>length&&stringLength>tailLength)return tail;if(stringLength>length&&stringLength>tailLength){let end=length-tailLength;return end>0&&isHighSurrogate(string[end-1])&&--end,`${string.slice(0,end)}${tail}`}return string}__name(truncate,`truncate`);function inspectList(list,options,inspectItem,separator=`, `){inspectItem||=options.inspect;let size=list.length;if(size===0)return``;let originalLength=options.truncate,output=``,peek=``,truncated=``;for(let i=0;i<size;i+=1){let last=i+1===list.length,secondToLast=i+2===list.length;truncated=`${truncator}(${list.length-i})`;let value=list[i];options.truncate=originalLength-output.length-(last?0:separator.length);let string=peek||inspectItem(value,options)+(last?``:separator),nextLength=output.length+string.length,truncatedLength=nextLength+truncated.length;if(last&&nextLength>originalLength&&output.length+truncated.length<=originalLength||!last&&!secondToLast&&truncatedLength>originalLength||(peek=last?``:inspectItem(list[i+1],options)+(secondToLast?``:separator),!last&&secondToLast&&truncatedLength>originalLength&&nextLength+peek.length>originalLength))break;if(output+=string,!last&&!secondToLast&&nextLength+peek.length>=originalLength){truncated=`${truncator}(${list.length-i-1})`;break}truncated=``}return`${output}${truncated}`}__name(inspectList,`inspectList`);function quoteComplexKey(key){return key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?key:JSON.stringify(key).replace(/'/g,`\\'`).replace(/\\"/g,`"`).replace(/(^"|"$)/g,`'`)}__name(quoteComplexKey,`quoteComplexKey`);function inspectProperty([key,value],options){return options.truncate-=2,typeof key==`string`?key=quoteComplexKey(key):typeof key!=`number`&&(key=`[${options.inspect(key,options)}]`),options.truncate-=key.length,value=options.inspect(value,options),`${key}: ${value}`}__name(inspectProperty,`inspectProperty`);function inspectArray(array,options){let nonIndexProperties=Object.keys(array).slice(array.length);if(!array.length&&!nonIndexProperties.length)return`[]`;options.truncate-=4;let listContents=inspectList(array,options);options.truncate-=listContents.length;let propertyContents=``;return nonIndexProperties.length&&(propertyContents=inspectList(nonIndexProperties.map(key=>[key,array[key]]),options,inspectProperty)),`[ ${listContents}${propertyContents?`, ${propertyContents}`:``} ]`}__name(inspectArray,`inspectArray`);var getArrayName=__name(array=>typeof Buffer==`function`&&array instanceof Buffer?`Buffer`:array[Symbol.toStringTag]?array[Symbol.toStringTag]:array.constructor.name,`getArrayName`);function inspectTypedArray(array,options){let name=getArrayName(array);options.truncate-=name.length+4;let nonIndexProperties=Object.keys(array).slice(array.length);if(!array.length&&!nonIndexProperties.length)return`${name}[]`;let output=``;for(let i=0;i<array.length;i++){let string=`${options.stylize(truncate(array[i],options.truncate),`number`)}${i===array.length-1?``:`, `}`;if(options.truncate-=string.length,array[i]!==array.length&&options.truncate<=3){output+=`${truncator}(${array.length-array[i]+1})`;break}output+=string}let propertyContents=``;return nonIndexProperties.length&&(propertyContents=inspectList(nonIndexProperties.map(key=>[key,array[key]]),options,inspectProperty)),`${name}[ ${output}${propertyContents?`, ${propertyContents}`:``} ]`}__name(inspectTypedArray,`inspectTypedArray`);function inspectDate(dateObject,options){let stringRepresentation=dateObject.toJSON();if(stringRepresentation===null)return`Invalid Date`;let split=stringRepresentation.split(`T`),date=split[0];return options.stylize(`${date}T${truncate(split[1],options.truncate-date.length-1)}`,`date`)}__name(inspectDate,`inspectDate`);function inspectFunction(func,options){let functionType=func[Symbol.toStringTag]||`Function`,name=func.name;return name?options.stylize(`[${functionType} ${truncate(name,options.truncate-11)}]`,`special`):options.stylize(`[${functionType}]`,`special`)}__name(inspectFunction,`inspectFunction`);function inspectMapEntry([key,value],options){return options.truncate-=4,key=options.inspect(key,options),options.truncate-=key.length,value=options.inspect(value,options),`${key} => ${value}`}__name(inspectMapEntry,`inspectMapEntry`);function mapToEntries(map){let entries=[];return map.forEach((value,key)=>{entries.push([key,value])}),entries}__name(mapToEntries,`mapToEntries`);function inspectMap(map,options){return map.size===0?`Map{}`:(options.truncate-=7,`Map{ ${inspectList(mapToEntries(map),options,inspectMapEntry)} }`)}__name(inspectMap,`inspectMap`);var isNaN$1=Number.isNaN||(i=>i!==i);function inspectNumber(number,options){return isNaN$1(number)?options.stylize(`NaN`,`number`):number===1/0?options.stylize(`Infinity`,`number`):number===-1/0?options.stylize(`-Infinity`,`number`):number===0?options.stylize(1/number==1/0?`+0`:`-0`,`number`):options.stylize(truncate(String(number),options.truncate),`number`)}__name(inspectNumber,`inspectNumber`);function inspectBigInt(number,options){let nums=truncate(number.toString(),options.truncate-1);return nums!==truncator&&(nums+=`n`),options.stylize(nums,`bigint`)}__name(inspectBigInt,`inspectBigInt`);function inspectRegExp(value,options){let flags=value.toString().split(`/`)[2],sourceLength=options.truncate-(2+flags.length),source=value.source;return options.stylize(`/${truncate(source,sourceLength)}/${flags}`,`regexp`)}__name(inspectRegExp,`inspectRegExp`);function arrayFromSet(set2){let values=[];return set2.forEach(value=>{values.push(value)}),values}__name(arrayFromSet,`arrayFromSet`);function inspectSet(set2,options){return set2.size===0?`Set{}`:(options.truncate-=7,`Set{ ${inspectList(arrayFromSet(set2),options)} }`)}__name(inspectSet,`inspectSet`);var stringEscapeChars=RegExp(`['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]`,`g`),escapeCharacters={"\b":`\\b`," ":`\\t`,"\n":`\\n`,"\f":`\\f`,"\r":`\\r`,"'":`\\'`,"\\":`\\\\`},hex=16,unicodeLength=4;function escape(char){return escapeCharacters[char]||`\\u${`0000${char.charCodeAt(0).toString(hex)}`.slice(-unicodeLength)}`}__name(escape,`escape`);function inspectString(string,options){return stringEscapeChars.test(string)&&(string=string.replace(stringEscapeChars,escape)),options.stylize(`'${truncate(string,options.truncate-2)}'`,`string`)}__name(inspectString,`inspectString`);function inspectSymbol(value){return`description`in Symbol.prototype?value.description?`Symbol(${value.description})`:`Symbol()`:value.toString()}__name(inspectSymbol,`inspectSymbol`);var promise_default=__name(()=>`Promise{…}`,`getPromiseValue`);function inspectObject(object,options){let properties=Object.getOwnPropertyNames(object),symbols=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(object):[];if(properties.length===0&&symbols.length===0)return`{}`;if(options.truncate-=4,options.seen=options.seen||[],options.seen.includes(object))return`[Circular]`;options.seen.push(object);let propertyContents=inspectList(properties.map(key=>[key,object[key]]),options,inspectProperty),symbolContents=inspectList(symbols.map(key=>[key,object[key]]),options,inspectProperty);options.seen.pop();let sep=``;return propertyContents&&symbolContents&&(sep=`, `),`{ ${propertyContents}${sep}${symbolContents} }`}__name(inspectObject,`inspectObject`);var toStringTag=typeof Symbol<`u`&&Symbol.toStringTag?Symbol.toStringTag:!1;function inspectClass(value,options){let name=``;return toStringTag&&toStringTag in value&&(name=value[toStringTag]),name||=value.constructor.name,(!name||name===`_class`)&&(name=`<Anonymous Class>`),options.truncate-=name.length,`${name}${inspectObject(value,options)}`}__name(inspectClass,`inspectClass`);function inspectArguments(args,options){return args.length===0?`Arguments[]`:(options.truncate-=13,`Arguments[ ${inspectList(args,options)} ]`)}__name(inspectArguments,`inspectArguments`);var errorKeys=[`stack`,`line`,`column`,`name`,`message`,`fileName`,`lineNumber`,`columnNumber`,`number`,`description`,`cause`];function inspectObject2(error,options){let properties=Object.getOwnPropertyNames(error).filter(key=>errorKeys.indexOf(key)===-1),name=error.name;options.truncate-=name.length;let message=``;if(typeof error.message==`string`?message=truncate(error.message,options.truncate):properties.unshift(`message`),message=message?`: ${message}`:``,options.truncate-=message.length+5,options.seen=options.seen||[],options.seen.includes(error))return`[Circular]`;options.seen.push(error);let propertyContents=inspectList(properties.map(key=>[key,error[key]]),options,inspectProperty);return`${name}${message}${propertyContents?` { ${propertyContents} }`:``}`}__name(inspectObject2,`inspectObject`);function inspectAttribute([key,value],options){return options.truncate-=3,value?`${options.stylize(String(key),`yellow`)}=${options.stylize(`"${value}"`,`string`)}`:`${options.stylize(String(key),`yellow`)}`}__name(inspectAttribute,`inspectAttribute`);function inspectNodeCollection(collection,options){return inspectList(collection,options,inspectNode,`
|
|
151
|
+
`)}__name(inspectNodeCollection,`inspectNodeCollection`);function inspectNode(node,options){switch(node.nodeType){case 1:return inspectHTML(node,options);case 3:return options.inspect(node.data,options);default:return options.inspect(node,options)}}__name(inspectNode,`inspectNode`);function inspectHTML(element,options){let properties=element.getAttributeNames(),name=element.tagName.toLowerCase(),head=options.stylize(`<${name}`,`special`),headClose=options.stylize(`>`,`special`),tail=options.stylize(`</${name}>`,`special`);options.truncate-=name.length*2+5;let propertyContents=``;properties.length>0&&(propertyContents+=` `,propertyContents+=inspectList(properties.map(key=>[key,element.getAttribute(key)]),options,inspectAttribute,` `)),options.truncate-=propertyContents.length;let truncate2=options.truncate,children=inspectNodeCollection(element.children,options);return children&&children.length>truncate2&&(children=`${truncator}(${element.children.length})`),`${head}${propertyContents}${headClose}${children}${tail}`}__name(inspectHTML,`inspectHTML`);var chaiInspect=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`chai/inspect`):`@@chai/inspect`,nodeInspect=Symbol.for(`nodejs.util.inspect.custom`),constructorMap=new WeakMap,stringTagMap={},baseTypesMap={undefined:__name((value,options)=>options.stylize(`undefined`,`undefined`),`undefined`),null:__name((value,options)=>options.stylize(`null`,`null`),`null`),boolean:__name((value,options)=>options.stylize(String(value),`boolean`),`boolean`),Boolean:__name((value,options)=>options.stylize(String(value),`boolean`),`Boolean`),number:inspectNumber,Number:inspectNumber,bigint:inspectBigInt,BigInt:inspectBigInt,string:inspectString,String:inspectString,function:inspectFunction,Function:inspectFunction,symbol:inspectSymbol,Symbol:inspectSymbol,Array:inspectArray,Date:inspectDate,Map:inspectMap,Set:inspectSet,RegExp:inspectRegExp,Promise:promise_default,WeakSet:__name((value,options)=>options.stylize(`WeakSet{…}`,`special`),`WeakSet`),WeakMap:__name((value,options)=>options.stylize(`WeakMap{…}`,`special`),`WeakMap`),Arguments:inspectArguments,Int8Array:inspectTypedArray,Uint8Array:inspectTypedArray,Uint8ClampedArray:inspectTypedArray,Int16Array:inspectTypedArray,Uint16Array:inspectTypedArray,Int32Array:inspectTypedArray,Uint32Array:inspectTypedArray,Float32Array:inspectTypedArray,Float64Array:inspectTypedArray,Generator:__name(()=>``,`Generator`),DataView:__name(()=>``,`DataView`),ArrayBuffer:__name(()=>``,`ArrayBuffer`),Error:inspectObject2,HTMLCollection:inspectNodeCollection,NodeList:inspectNodeCollection},inspectCustom=__name((value,options,type3,inspectFn)=>chaiInspect in value&&typeof value[chaiInspect]==`function`?value[chaiInspect](options):nodeInspect in value&&typeof value[nodeInspect]==`function`?value[nodeInspect](options.depth,options,inspectFn):`inspect`in value&&typeof value.inspect==`function`?value.inspect(options.depth,options):`constructor`in value&&constructorMap.has(value.constructor)?constructorMap.get(value.constructor)(value,options):stringTagMap[type3]?stringTagMap[type3](value,options):``,`inspectCustom`),toString=Object.prototype.toString;function inspect(value,opts={}){let options=normaliseOptions(opts,inspect),{customInspect}=options,type3=value===null?`null`:typeof value;if(type3===`object`&&(type3=toString.call(value).slice(8,-1)),type3 in baseTypesMap)return baseTypesMap[type3](value,options);if(customInspect&&value){let output=inspectCustom(value,options,type3,inspect);if(output)return typeof output==`string`?output:inspect(output,options)}let proto=value?Object.getPrototypeOf(value):!1;return proto===Object.prototype||proto===null?inspectObject(value,options):value&&typeof HTMLElement==`function`&&value instanceof HTMLElement?inspectHTML(value,options):`constructor`in value?value.constructor===Object?inspectObject(value,options):inspectClass(value,options):value===Object(value)?inspectObject(value,options):options.stylize(String(value),type3)}__name(inspect,`inspect`);var config={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:[`then`,`catch`,`inspect`,`toJSON`],deepEqual:null};function inspect2(obj,showHidden,depth,colors){return inspect(obj,{colors,depth:depth===void 0?2:depth,showHidden,truncate:config.truncateThreshold?config.truncateThreshold:1/0})}__name(inspect2,`inspect`);function objDisplay(obj){let str=inspect2(obj),type3=Object.prototype.toString.call(obj);if(config.truncateThreshold&&str.length>=config.truncateThreshold){if(type3===`[object Function]`){let objAsFunction=obj;return!objAsFunction.name||objAsFunction.name===``?`[Function]`:`[Function: `+objAsFunction.name+`]`}if(type3===`[object Array]`)return`[ Array(`+obj.length+`) ]`;if(type3===`[object Object]`){let keys=Object.keys(obj);return`{ Object (`+(keys.length>2?keys.splice(0,2).join(`, `)+`, ...`:keys.join(`, `))+`) }`}return str}return str}__name(objDisplay,`objDisplay`);function getMessage2(obj,args){let negate=flag(obj,`negate`),val=flag(obj,`object`),expected=args[3],actual=getActual(obj,args),rawMsg=negate?args[2]:args[1],flagMsg=flag(obj,`message`);typeof rawMsg==`function`&&(rawMsg=rawMsg());let msg=(rawMsg||``).replace(/#\{(this|act|exp)\}/g,function(_,tag){return objDisplay(tag===`this`?val:tag===`act`?actual:expected)});return flagMsg?flagMsg+`: `+msg:msg}__name(getMessage2,`getMessage`);function transferFlags(source,object,includeAll){let sourceWithFlags=source,objWithFlags=object,flags=sourceWithFlags.__flags||=Object.create(null),objFlags=objWithFlags.__flags||=Object.create(null);includeAll=arguments.length!==3||includeAll;for(let flag3 in flags)(includeAll||flag3!==`object`&&flag3!==`ssfi`&&flag3!==`lockSsfi`&&flag3!=`message`)&&(objFlags[flag3]=flags[flag3])}__name(transferFlags,`transferFlags`);function type2(obj){if(obj===void 0)return`undefined`;if(obj===null)return`null`;let stringTag=obj[Symbol.toStringTag];return typeof stringTag==`string`?stringTag:Object.prototype.toString.call(obj).slice(8,-1)}__name(type2,`type`);function FakeMap(){this._key=`chai/deep-eql__`+Math.random()+Date.now()}__name(FakeMap,`FakeMap`),FakeMap.prototype={get:__name(function(key){return key[this._key]},`get`),set:__name(function(key,value){Object.isExtensible(key)&&Object.defineProperty(key,this._key,{value,configurable:!0})},`set`)};var MemoizeMap=typeof WeakMap==`function`?WeakMap:FakeMap;function memoizeCompare(leftHandOperand,rightHandOperand,memoizeMap){if(!memoizeMap||isPrimitive(leftHandOperand)||isPrimitive(rightHandOperand))return null;var leftHandMap=memoizeMap.get(leftHandOperand);if(leftHandMap){var result=leftHandMap.get(rightHandOperand);if(typeof result==`boolean`)return result}return null}__name(memoizeCompare,`memoizeCompare`);function memoizeSet(leftHandOperand,rightHandOperand,memoizeMap,result){if(!(!memoizeMap||isPrimitive(leftHandOperand)||isPrimitive(rightHandOperand))){var leftHandMap=memoizeMap.get(leftHandOperand);leftHandMap?leftHandMap.set(rightHandOperand,result):(leftHandMap=new MemoizeMap,leftHandMap.set(rightHandOperand,result),memoizeMap.set(leftHandOperand,leftHandMap))}}__name(memoizeSet,`memoizeSet`);var deep_eql_default=deepEqual;function deepEqual(leftHandOperand,rightHandOperand,options){if(options&&options.comparator)return extensiveDeepEqual(leftHandOperand,rightHandOperand,options);var simpleResult=simpleEqual(leftHandOperand,rightHandOperand);return simpleResult===null?extensiveDeepEqual(leftHandOperand,rightHandOperand,options):simpleResult}__name(deepEqual,`deepEqual`);function simpleEqual(leftHandOperand,rightHandOperand){return leftHandOperand===rightHandOperand?leftHandOperand!==0||1/leftHandOperand==1/rightHandOperand:leftHandOperand!==leftHandOperand&&rightHandOperand!==rightHandOperand?!0:isPrimitive(leftHandOperand)||isPrimitive(rightHandOperand)?!1:null}__name(simpleEqual,`simpleEqual`);function extensiveDeepEqual(leftHandOperand,rightHandOperand,options){options||={},options.memoize=options.memoize===!1?!1:options.memoize||new MemoizeMap;var comparator=options&&options.comparator,memoizeResultLeft=memoizeCompare(leftHandOperand,rightHandOperand,options.memoize);if(memoizeResultLeft!==null)return memoizeResultLeft;var memoizeResultRight=memoizeCompare(rightHandOperand,leftHandOperand,options.memoize);if(memoizeResultRight!==null)return memoizeResultRight;if(comparator){var comparatorResult=comparator(leftHandOperand,rightHandOperand);if(comparatorResult===!1||comparatorResult===!0)return memoizeSet(leftHandOperand,rightHandOperand,options.memoize,comparatorResult),comparatorResult;var simpleResult=simpleEqual(leftHandOperand,rightHandOperand);if(simpleResult!==null)return simpleResult}var leftHandType=type2(leftHandOperand);if(leftHandType!==type2(rightHandOperand))return memoizeSet(leftHandOperand,rightHandOperand,options.memoize,!1),!1;memoizeSet(leftHandOperand,rightHandOperand,options.memoize,!0);var result=extensiveDeepEqualByType(leftHandOperand,rightHandOperand,leftHandType,options);return memoizeSet(leftHandOperand,rightHandOperand,options.memoize,result),result}__name(extensiveDeepEqual,`extensiveDeepEqual`);function extensiveDeepEqualByType(leftHandOperand,rightHandOperand,leftHandType,options){switch(leftHandType){case`String`:case`Number`:case`Boolean`:case`Date`:return deepEqual(leftHandOperand.valueOf(),rightHandOperand.valueOf());case`Promise`:case`Symbol`:case`function`:case`WeakMap`:case`WeakSet`:return leftHandOperand===rightHandOperand;case`Error`:return keysEqual(leftHandOperand,rightHandOperand,[`name`,`message`,`code`],options);case`Arguments`:case`Int8Array`:case`Uint8Array`:case`Uint8ClampedArray`:case`Int16Array`:case`Uint16Array`:case`Int32Array`:case`Uint32Array`:case`Float32Array`:case`Float64Array`:case`Array`:return iterableEqual(leftHandOperand,rightHandOperand,options);case`RegExp`:return regexpEqual(leftHandOperand,rightHandOperand);case`Generator`:return generatorEqual(leftHandOperand,rightHandOperand,options);case`DataView`:return iterableEqual(new Uint8Array(leftHandOperand.buffer),new Uint8Array(rightHandOperand.buffer),options);case`ArrayBuffer`:return iterableEqual(new Uint8Array(leftHandOperand),new Uint8Array(rightHandOperand),options);case`Set`:return entriesEqual(leftHandOperand,rightHandOperand,options);case`Map`:return entriesEqual(leftHandOperand,rightHandOperand,options);case`Temporal.PlainDate`:case`Temporal.PlainTime`:case`Temporal.PlainDateTime`:case`Temporal.Instant`:case`Temporal.ZonedDateTime`:case`Temporal.PlainYearMonth`:case`Temporal.PlainMonthDay`:return leftHandOperand.equals(rightHandOperand);case`Temporal.Duration`:return leftHandOperand.total(`nanoseconds`)===rightHandOperand.total(`nanoseconds`);case`Temporal.TimeZone`:case`Temporal.Calendar`:return leftHandOperand.toString()===rightHandOperand.toString();default:return objectEqual(leftHandOperand,rightHandOperand,options)}}__name(extensiveDeepEqualByType,`extensiveDeepEqualByType`);function regexpEqual(leftHandOperand,rightHandOperand){return leftHandOperand.toString()===rightHandOperand.toString()}__name(regexpEqual,`regexpEqual`);function entriesEqual(leftHandOperand,rightHandOperand,options){try{if(leftHandOperand.size!==rightHandOperand.size)return!1;if(leftHandOperand.size===0)return!0}catch{return!1}var leftHandItems=[],rightHandItems=[];return leftHandOperand.forEach(__name(function(key,value){leftHandItems.push([key,value])},`gatherEntries`)),rightHandOperand.forEach(__name(function(key,value){rightHandItems.push([key,value])},`gatherEntries`)),iterableEqual(leftHandItems.sort(),rightHandItems.sort(),options)}__name(entriesEqual,`entriesEqual`);function iterableEqual(leftHandOperand,rightHandOperand,options){var length=leftHandOperand.length;if(length!==rightHandOperand.length)return!1;if(length===0)return!0;for(var index=-1;++index<length;)if(deepEqual(leftHandOperand[index],rightHandOperand[index],options)===!1)return!1;return!0}__name(iterableEqual,`iterableEqual`);function generatorEqual(leftHandOperand,rightHandOperand,options){return iterableEqual(getGeneratorEntries(leftHandOperand),getGeneratorEntries(rightHandOperand),options)}__name(generatorEqual,`generatorEqual`);function hasIteratorFunction(target){return typeof Symbol<`u`&&typeof target==`object`&&Symbol.iterator!==void 0&&typeof target[Symbol.iterator]==`function`}__name(hasIteratorFunction,`hasIteratorFunction`);function getIteratorEntries(target){if(hasIteratorFunction(target))try{return getGeneratorEntries(target[Symbol.iterator]())}catch{return[]}return[]}__name(getIteratorEntries,`getIteratorEntries`);function getGeneratorEntries(generator){for(var generatorResult=generator.next(),accumulator=[generatorResult.value];generatorResult.done===!1;)generatorResult=generator.next(),accumulator.push(generatorResult.value);return accumulator}__name(getGeneratorEntries,`getGeneratorEntries`);function getEnumerableKeys(target){var keys=[];for(var key in target)keys.push(key);return keys}__name(getEnumerableKeys,`getEnumerableKeys`);function getEnumerableSymbols(target){for(var keys=[],allKeys=Object.getOwnPropertySymbols(target),i=0;i<allKeys.length;i+=1){var key=allKeys[i];Object.getOwnPropertyDescriptor(target,key).enumerable&&keys.push(key)}return keys}__name(getEnumerableSymbols,`getEnumerableSymbols`);function keysEqual(leftHandOperand,rightHandOperand,keys,options){var length=keys.length;if(length===0)return!0;for(var i=0;i<length;i+=1)if(deepEqual(leftHandOperand[keys[i]],rightHandOperand[keys[i]],options)===!1)return!1;return!0}__name(keysEqual,`keysEqual`);function objectEqual(leftHandOperand,rightHandOperand,options){var leftHandKeys=getEnumerableKeys(leftHandOperand),rightHandKeys=getEnumerableKeys(rightHandOperand),leftHandSymbols=getEnumerableSymbols(leftHandOperand),rightHandSymbols=getEnumerableSymbols(rightHandOperand);if(leftHandKeys=leftHandKeys.concat(leftHandSymbols),rightHandKeys=rightHandKeys.concat(rightHandSymbols),leftHandKeys.length&&leftHandKeys.length===rightHandKeys.length)return iterableEqual(mapSymbols(leftHandKeys).sort(),mapSymbols(rightHandKeys).sort())!==!1&&keysEqual(leftHandOperand,rightHandOperand,leftHandKeys,options);var leftHandEntries=getIteratorEntries(leftHandOperand),rightHandEntries=getIteratorEntries(rightHandOperand);return leftHandEntries.length&&leftHandEntries.length===rightHandEntries.length?(leftHandEntries.sort(),rightHandEntries.sort(),iterableEqual(leftHandEntries,rightHandEntries,options)):leftHandKeys.length===0&&leftHandEntries.length===0&&rightHandKeys.length===0&&rightHandEntries.length===0}__name(objectEqual,`objectEqual`);function isPrimitive(value){return typeof value!=`object`||!value}__name(isPrimitive,`isPrimitive`);function mapSymbols(arr){return arr.map(__name(function(entry){return typeof entry==`symbol`?entry.toString():entry},`mapSymbol`))}__name(mapSymbols,`mapSymbols`);function hasProperty(obj,name){return obj!=null&&name in Object(obj)}__name(hasProperty,`hasProperty`);function parsePath(path){return path.replace(/([^\\])\[/g,`$1.[`).match(/(\\\.|[^.]+?)+/g).map(value=>{if(value===`constructor`||value===`__proto__`||value===`prototype`)return{};let mArr=/^\[(\d+)\]$/.exec(value),parsed=null;return parsed=mArr?{i:parseFloat(mArr[1])}:{p:value.replace(/\\([.[\]])/g,`$1`)},parsed})}__name(parsePath,`parsePath`);function internalGetPathValue(obj,parsed,pathDepth){let temporaryValue=obj,res=null;pathDepth=pathDepth===void 0?parsed.length:pathDepth;for(let i=0;i<pathDepth;i++){let part=parsed[i];temporaryValue&&(temporaryValue=part.p===void 0?temporaryValue[part.i]:temporaryValue[part.p],i===pathDepth-1&&(res=temporaryValue))}return res}__name(internalGetPathValue,`internalGetPathValue`);function getPathInfo(obj,path){let parsed=parsePath(path),last=parsed[parsed.length-1],info={parent:parsed.length>1?internalGetPathValue(obj,parsed,parsed.length-1):obj,name:last.p||last.i,value:internalGetPathValue(obj,parsed)};return info.exists=hasProperty(info.parent,info.name),info}__name(getPathInfo,`getPathInfo`);var _Assertion=class _Assertion{constructor(obj,msg,ssfi,lockSsfi){return __publicField(this,`__flags`,{}),flag(this,`ssfi`,ssfi||_Assertion),flag(this,`lockSsfi`,lockSsfi),flag(this,`object`,obj),flag(this,`message`,msg),flag(this,`eql`,config.deepEqual||deep_eql_default),proxify(this)}static get includeStack(){return console.warn(`Assertion.includeStack is deprecated, use chai.config.includeStack instead.`),config.includeStack}static set includeStack(value){console.warn(`Assertion.includeStack is deprecated, use chai.config.includeStack instead.`),config.includeStack=value}static get showDiff(){return console.warn(`Assertion.showDiff is deprecated, use chai.config.showDiff instead.`),config.showDiff}static set showDiff(value){console.warn(`Assertion.showDiff is deprecated, use chai.config.showDiff instead.`),config.showDiff=value}static addProperty(name,fn){addProperty(this.prototype,name,fn)}static addMethod(name,fn){addMethod(this.prototype,name,fn)}static addChainableMethod(name,fn,chainingBehavior){addChainableMethod(this.prototype,name,fn,chainingBehavior)}static overwriteProperty(name,fn){overwriteProperty(this.prototype,name,fn)}static overwriteMethod(name,fn){overwriteMethod(this.prototype,name,fn)}static overwriteChainableMethod(name,fn,chainingBehavior){overwriteChainableMethod(this.prototype,name,fn,chainingBehavior)}assert(_expr,msg,_negateMsg,expected,_actual,showDiff){let ok=test$1(this,arguments);if(!1!==showDiff&&(showDiff=!0),expected===void 0&&_actual===void 0&&(showDiff=!1),!0!==config.showDiff&&(showDiff=!1),!ok){msg=getMessage2(this,arguments);let assertionErrorObjectProperties={actual:getActual(this,arguments),expected,showDiff},operator=getOperator(this,arguments);throw operator&&(assertionErrorObjectProperties.operator=operator),new AssertionError(msg,assertionErrorObjectProperties,config.includeStack?this.assert:flag(this,`ssfi`))}}get _obj(){return flag(this,`object`)}set _obj(val){flag(this,`object`,val)}};__name(_Assertion,`Assertion`);var Assertion=_Assertion,events=new EventTarget,_PluginEvent=class extends Event{constructor(type3,name,fn){super(type3),this.name=String(name),this.fn=fn}};__name(_PluginEvent,`PluginEvent`);var PluginEvent=_PluginEvent;function isProxyEnabled(){return config.useProxy&&typeof Proxy<`u`&&typeof Reflect<`u`}__name(isProxyEnabled,`isProxyEnabled`);function addProperty(ctx,name,getter){getter=getter===void 0?function(){}:getter,Object.defineProperty(ctx,name,{get:__name(function propertyGetter(){!isProxyEnabled()&&!flag(this,`lockSsfi`)&&flag(this,`ssfi`,propertyGetter);let result=getter.call(this);if(result!==void 0)return result;let newAssertion=new Assertion;return transferFlags(this,newAssertion),newAssertion},`propertyGetter`),configurable:!0}),events.dispatchEvent(new PluginEvent(`addProperty`,name,getter))}__name(addProperty,`addProperty`);var fnLengthDesc=Object.getOwnPropertyDescriptor(function(){},`length`);function addLengthGuard(fn,assertionName,isChainable){return fnLengthDesc?.configurable&&Object.defineProperty(fn,"length",{get:__name(function(){throw Error(isChainable?`Invalid Chai property: `+assertionName+`.length. Due to a compatibility issue, "length" cannot directly follow "`+assertionName+`". Use "`+assertionName+`.lengthOf" instead.`:`Invalid Chai property: `+assertionName+`.length. See docs for proper usage of "`+assertionName+`".`)},`get`)}),fn}__name(addLengthGuard,`addLengthGuard`);function getProperties(object){let result=Object.getOwnPropertyNames(object);function addProperty2(property){result.indexOf(property)===-1&&result.push(property)}__name(addProperty2,`addProperty`);let proto=Object.getPrototypeOf(object);for(;proto!==null;)Object.getOwnPropertyNames(proto).forEach(addProperty2),proto=Object.getPrototypeOf(proto);return result}__name(getProperties,`getProperties`);var builtins=[`__flags`,`__methods`,`_obj`,`assert`];function proxify(obj,nonChainableMethodName){return isProxyEnabled()?new Proxy(obj,{get:__name(function proxyGetter(target,property){if(typeof property==`string`&&config.proxyExcludedKeys.indexOf(property)===-1&&!Reflect.has(target,property)){if(nonChainableMethodName)throw Error(`Invalid Chai property: `+String(nonChainableMethodName)+`.`+property+`. See docs for proper usage of "`+String(nonChainableMethodName)+`".`);let suggestion=null,suggestionDistance=4;throw getProperties(target).forEach(function(prop){if(!Object.prototype.hasOwnProperty(prop)&&builtins.indexOf(prop)===-1){let dist=stringDistanceCapped(property,prop,suggestionDistance);dist<suggestionDistance&&(suggestion=prop,suggestionDistance=dist)}}),Error(suggestion===null?`Invalid Chai property: `+property:`Invalid Chai property: `+property+`. Did you mean "`+suggestion+`"?`)}return builtins.indexOf(property)===-1&&!flag(target,`lockSsfi`)&&flag(target,`ssfi`,proxyGetter),Reflect.get(target,property)},`proxyGetter`)}):obj}__name(proxify,`proxify`);function stringDistanceCapped(strA,strB,cap){if(Math.abs(strA.length-strB.length)>=cap)return cap;let memo=[];for(let i=0;i<=strA.length;i++)memo[i]=Array(strB.length+1).fill(0),memo[i][0]=i;for(let j=0;j<strB.length;j++)memo[0][j]=j;for(let i=1;i<=strA.length;i++){let ch=strA.charCodeAt(i-1);for(let j=1;j<=strB.length;j++){if(Math.abs(i-j)>=cap){memo[i][j]=cap;continue}memo[i][j]=Math.min(memo[i-1][j]+1,memo[i][j-1]+1,memo[i-1][j-1]+(ch===strB.charCodeAt(j-1)?0:1))}}return memo[strA.length][strB.length]}__name(stringDistanceCapped,`stringDistanceCapped`);function addMethod(ctx,name,method){let methodWrapper=__name(function(){flag(this,`lockSsfi`)||flag(this,`ssfi`,methodWrapper);let result=method.apply(this,arguments);if(result!==void 0)return result;let newAssertion=new Assertion;return transferFlags(this,newAssertion),newAssertion},`methodWrapper`);addLengthGuard(methodWrapper,name,!1),ctx[name]=proxify(methodWrapper,name),events.dispatchEvent(new PluginEvent(`addMethod`,name,method))}__name(addMethod,`addMethod`);function overwriteProperty(ctx,name,getter){let _get=Object.getOwnPropertyDescriptor(ctx,name),_super=__name(function(){},`_super`);_get&&typeof _get.get==`function`&&(_super=_get.get),Object.defineProperty(ctx,name,{get:__name(function overwritingPropertyGetter(){!isProxyEnabled()&&!flag(this,`lockSsfi`)&&flag(this,`ssfi`,overwritingPropertyGetter);let origLockSsfi=flag(this,`lockSsfi`);flag(this,`lockSsfi`,!0);let result=getter(_super).call(this);if(flag(this,`lockSsfi`,origLockSsfi),result!==void 0)return result;let newAssertion=new Assertion;return transferFlags(this,newAssertion),newAssertion},`overwritingPropertyGetter`),configurable:!0})}__name(overwriteProperty,`overwriteProperty`);function overwriteMethod(ctx,name,method){let _method=ctx[name],_super=__name(function(){throw Error(String(name)+` is not a function`)},`_super`);_method&&typeof _method==`function`&&(_super=_method);function overwritingMethodWrapper(){flag(this,`lockSsfi`)||flag(this,`ssfi`,overwritingMethodWrapper);let origLockSsfi=flag(this,`lockSsfi`);flag(this,`lockSsfi`,!0);let result=method(_super).apply(this,arguments);if(flag(this,`lockSsfi`,origLockSsfi),result!==void 0)return result;let newAssertion=new Assertion;return transferFlags(this,newAssertion),newAssertion}__name(overwritingMethodWrapper,`overwritingMethodWrapper`),addLengthGuard(overwritingMethodWrapper,String(name),!1),ctx[name]=proxify(overwritingMethodWrapper,name)}__name(overwriteMethod,`overwriteMethod`);var canSetPrototype=typeof Object.setPrototypeOf==`function`,testFn=__name(function(){},`testFn`),excludeNames=Object.getOwnPropertyNames(testFn).filter(function(name){let propDesc=Object.getOwnPropertyDescriptor(testFn,name);return typeof propDesc!=`object`||!propDesc.configurable}),call=Function.prototype.call,apply=Function.prototype.apply,_PluginAddChainableMethodEvent=class extends PluginEvent{constructor(type3,name,fn,chainingBehavior){super(type3,name,fn),this.chainingBehavior=chainingBehavior}};__name(_PluginAddChainableMethodEvent,`PluginAddChainableMethodEvent`);var PluginAddChainableMethodEvent=_PluginAddChainableMethodEvent;function addChainableMethod(ctx,name,method,chainingBehavior){let ctxChainable=ctx;typeof chainingBehavior!=`function`&&(chainingBehavior=__name(function(){},`chainingBehavior`));let chainableBehavior={method,chainingBehavior};ctxChainable.__methods||={},ctxChainable.__methods[name]=chainableBehavior,Object.defineProperty(ctx,name,{get:__name(function(){chainableBehavior.chainingBehavior.call(this);function chainableMethodWrapper(...args){flag(this,`lockSsfi`)||flag(this,`ssfi`,chainableMethodWrapper);let result=chainableBehavior.method.apply(this,args);if(result!==void 0)return result;let newAssertion=new Assertion;return transferFlags(this,newAssertion),newAssertion}if(__name(chainableMethodWrapper,`chainableMethodWrapper`),addLengthGuard(chainableMethodWrapper,name,!0),canSetPrototype){let prototype=Object.create(this);prototype.call=call,prototype.apply=apply,Object.setPrototypeOf(chainableMethodWrapper,prototype)}else Object.getOwnPropertyNames(ctx).forEach(function(asserterName){if(excludeNames.indexOf(asserterName)!==-1)return;let pd=Object.getOwnPropertyDescriptor(ctx,asserterName);pd&&Object.defineProperty(chainableMethodWrapper,asserterName,pd)});return transferFlags(this,chainableMethodWrapper),proxify(chainableMethodWrapper)},`chainableMethodGetter`),configurable:!0}),events.dispatchEvent(new PluginAddChainableMethodEvent(`addChainableMethod`,name,method,chainingBehavior))}__name(addChainableMethod,`addChainableMethod`);function overwriteChainableMethod(ctx,name,method,chainingBehavior){let chainableBehavior=ctx.__methods[name],_chainingBehavior=chainableBehavior.chainingBehavior;chainableBehavior.chainingBehavior=__name(function(){let result=chainingBehavior(_chainingBehavior).call(this);if(result!==void 0)return result;let newAssertion=new Assertion;return transferFlags(this,newAssertion),newAssertion},`overwritingChainableMethodGetter`);let _method=chainableBehavior.method;chainableBehavior.method=__name(function(){let result=method(_method).apply(this,arguments);if(result!==void 0)return result;let newAssertion=new Assertion;return transferFlags(this,newAssertion),newAssertion},`overwritingChainableMethodWrapper`)}__name(overwriteChainableMethod,`overwriteChainableMethod`);function compareByInspect(a,b){return inspect2(a)<inspect2(b)?-1:1}__name(compareByInspect,`compareByInspect`);function getOwnEnumerablePropertySymbols(obj){return typeof Object.getOwnPropertySymbols==`function`?Object.getOwnPropertySymbols(obj).filter(function(sym){return Object.getOwnPropertyDescriptor(obj,sym)?.enumerable}):[]}__name(getOwnEnumerablePropertySymbols,`getOwnEnumerablePropertySymbols`);function getOwnEnumerableProperties(obj){return Object.keys(obj).concat(getOwnEnumerablePropertySymbols(obj))}__name(getOwnEnumerableProperties,`getOwnEnumerableProperties`);var isNaN2=Number.isNaN;function isObjectType(obj){let objectType=type(obj);return[`Array`,`Object`,`Function`].indexOf(objectType)!==-1}__name(isObjectType,`isObjectType`);function getOperator(obj,args){let operator=flag(obj,`operator`),negate=flag(obj,`negate`),expected=args[3],msg=negate?args[2]:args[1];if(operator)return String(operator);if(typeof msg==`function`&&(msg=msg()),msg||=``,!msg)return;let msgString=String(msg);if(/\shave\s/.test(msgString))return;let isObject=isObjectType(expected);return/\snot\s/.test(msgString)?isObject?`notDeepStrictEqual`:`notStrictEqual`:isObject?`deepStrictEqual`:`strictEqual`}__name(getOperator,`getOperator`);function getName(fn){return fn.name}__name(getName,`getName`);function isRegExp2(obj){return Object.prototype.toString.call(obj)===`[object RegExp]`}__name(isRegExp2,`isRegExp`);function isNumeric(obj){return[`Number`,`BigInt`].includes(type(obj))}__name(isNumeric,`isNumeric`);var{flag:flag2}=utils_exports;[`to`,`be`,`been`,`is`,`and`,`has`,`have`,`with`,`that`,`which`,`at`,`of`,`same`,`but`,`does`,`still`,`also`].forEach(function(chain){Assertion.addProperty(chain)}),Assertion.addProperty(`not`,function(){flag2(this,`negate`,!0)}),Assertion.addProperty(`deep`,function(){flag2(this,`deep`,!0)}),Assertion.addProperty(`nested`,function(){flag2(this,`nested`,!0)}),Assertion.addProperty(`own`,function(){flag2(this,`own`,!0)}),Assertion.addProperty(`ordered`,function(){flag2(this,`ordered`,!0)}),Assertion.addProperty(`any`,function(){flag2(this,`any`,!0),flag2(this,`all`,!1)}),Assertion.addProperty(`all`,function(){flag2(this,`all`,!0),flag2(this,`any`,!1)});var functionTypes={function:[`function`,`asyncfunction`,`generatorfunction`,`asyncgeneratorfunction`],asyncfunction:[`asyncfunction`,`asyncgeneratorfunction`],generatorfunction:[`generatorfunction`,`asyncgeneratorfunction`],asyncgeneratorfunction:[`asyncgeneratorfunction`]};function an(type3,msg){msg&&flag2(this,`message`,msg),type3=type3.toLowerCase();let obj=flag2(this,`object`),article=~[`a`,`e`,`i`,`o`,`u`].indexOf(type3.charAt(0))?`an `:`a `,detectedType=type(obj).toLowerCase();functionTypes.function.includes(type3)?this.assert(functionTypes[type3].includes(detectedType),`expected #{this} to be `+article+type3,`expected #{this} not to be `+article+type3):this.assert(type3===detectedType,`expected #{this} to be `+article+type3,`expected #{this} not to be `+article+type3)}__name(an,`an`),Assertion.addChainableMethod(`an`,an),Assertion.addChainableMethod(`a`,an);function SameValueZero(a,b){return isNaN2(a)&&isNaN2(b)||a===b}__name(SameValueZero,`SameValueZero`);function includeChainingBehavior(){flag2(this,`contains`,!0)}__name(includeChainingBehavior,`includeChainingBehavior`);function include(val,msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`),objType=type(obj).toLowerCase(),flagMsg=flag2(this,`message`),negate=flag2(this,`negate`),ssfi=flag2(this,`ssfi`),isDeep=flag2(this,`deep`),descriptor=isDeep?`deep `:``,isEql=isDeep?flag2(this,`eql`):SameValueZero;flagMsg=flagMsg?flagMsg+`: `:``;let included=!1;switch(objType){case`string`:included=obj.indexOf(val)!==-1;break;case`weakset`:if(isDeep)throw new AssertionError(flagMsg+`unable to use .deep.include with WeakSet`,void 0,ssfi);included=obj.has(val);break;case`map`:obj.forEach(function(item){included||=isEql(item,val)});break;case`set`:isDeep?obj.forEach(function(item){included||=isEql(item,val)}):included=obj.has(val);break;case`array`:included=isDeep?obj.some(function(item){return isEql(item,val)}):obj.indexOf(val)!==-1;break;default:{if(val!==Object(val))throw new AssertionError(flagMsg+`the given combination of arguments (`+objType+` and `+type(val).toLowerCase()+`) is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a `+type(val).toLowerCase(),void 0,ssfi);let props=Object.keys(val),firstErr=null,numErrs=0;if(props.forEach(function(prop){let propAssertion=new Assertion(obj);if(transferFlags(this,propAssertion,!0),flag2(propAssertion,`lockSsfi`,!0),!negate||props.length===1){propAssertion.property(prop,val[prop]);return}try{propAssertion.property(prop,val[prop])}catch(err){if(!check_error_exports.compatibleConstructor(err,AssertionError))throw err;firstErr===null&&(firstErr=err),numErrs++}},this),negate&&props.length>1&&numErrs===props.length)throw firstErr;return}}this.assert(included,`expected #{this} to `+descriptor+`include `+inspect2(val),`expected #{this} to not `+descriptor+`include `+inspect2(val))}__name(include,`include`),Assertion.addChainableMethod(`include`,include,includeChainingBehavior),Assertion.addChainableMethod(`contain`,include,includeChainingBehavior),Assertion.addChainableMethod(`contains`,include,includeChainingBehavior),Assertion.addChainableMethod(`includes`,include,includeChainingBehavior),Assertion.addProperty(`ok`,function(){this.assert(flag2(this,`object`),`expected #{this} to be truthy`,`expected #{this} to be falsy`)}),Assertion.addProperty(`true`,function(){this.assert(!0===flag2(this,`object`),`expected #{this} to be true`,`expected #{this} to be false`,!flag2(this,`negate`))}),Assertion.addProperty(`numeric`,function(){let object=flag2(this,`object`);this.assert([`Number`,`BigInt`].includes(type(object)),`expected #{this} to be numeric`,`expected #{this} to not be numeric`,!flag2(this,`negate`))}),Assertion.addProperty(`callable`,function(){let val=flag2(this,`object`),ssfi=flag2(this,`ssfi`),message=flag2(this,`message`),msg=message?`${message}: `:``,negate=flag2(this,`negate`),assertionMessage=negate?`${msg}expected ${inspect2(val)} not to be a callable function`:`${msg}expected ${inspect2(val)} to be a callable function`,isCallable=[`Function`,`AsyncFunction`,`GeneratorFunction`,`AsyncGeneratorFunction`].includes(type(val));if(isCallable&&negate||!isCallable&&!negate)throw new AssertionError(assertionMessage,void 0,ssfi)}),Assertion.addProperty(`false`,function(){this.assert(!1===flag2(this,`object`),`expected #{this} to be false`,`expected #{this} to be true`,!!flag2(this,`negate`))}),Assertion.addProperty(`null`,function(){this.assert(flag2(this,`object`)===null,`expected #{this} to be null`,`expected #{this} not to be null`)}),Assertion.addProperty(`undefined`,function(){this.assert(flag2(this,`object`)===void 0,`expected #{this} to be undefined`,`expected #{this} not to be undefined`)}),Assertion.addProperty(`NaN`,function(){this.assert(isNaN2(flag2(this,`object`)),`expected #{this} to be NaN`,`expected #{this} not to be NaN`)});function assertExist(){let val=flag2(this,`object`);this.assert(val!=null,`expected #{this} to exist`,`expected #{this} to not exist`)}__name(assertExist,`assertExist`),Assertion.addProperty(`exist`,assertExist),Assertion.addProperty(`exists`,assertExist),Assertion.addProperty(`empty`,function(){let val=flag2(this,`object`),ssfi=flag2(this,`ssfi`),flagMsg=flag2(this,`message`),itemsCount;switch(flagMsg=flagMsg?flagMsg+`: `:``,type(val).toLowerCase()){case`array`:case`string`:itemsCount=val.length;break;case`map`:case`set`:itemsCount=val.size;break;case`weakmap`:case`weakset`:throw new AssertionError(flagMsg+`.empty was passed a weak collection`,void 0,ssfi);case`function`:throw new AssertionError((flagMsg+`.empty was passed a function `+getName(val)).trim(),void 0,ssfi);default:if(val!==Object(val))throw new AssertionError(flagMsg+`.empty was passed non-string primitive `+inspect2(val),void 0,ssfi);itemsCount=Object.keys(val).length}this.assert(itemsCount===0,`expected #{this} to be empty`,`expected #{this} not to be empty`)});function checkArguments(){let type3=type(flag2(this,`object`));this.assert(type3===`Arguments`,`expected #{this} to be arguments but got `+type3,`expected #{this} to not be arguments`)}__name(checkArguments,`checkArguments`),Assertion.addProperty(`arguments`,checkArguments),Assertion.addProperty(`Arguments`,checkArguments);function assertEqual(val,msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`);if(flag2(this,`deep`)){let prevLockSsfi=flag2(this,`lockSsfi`);flag2(this,`lockSsfi`,!0),this.eql(val),flag2(this,`lockSsfi`,prevLockSsfi)}else this.assert(val===obj,`expected #{this} to equal #{exp}`,`expected #{this} to not equal #{exp}`,val,this._obj,!0)}__name(assertEqual,`assertEqual`),Assertion.addMethod(`equal`,assertEqual),Assertion.addMethod(`equals`,assertEqual),Assertion.addMethod(`eq`,assertEqual);function assertEql(obj,msg){msg&&flag2(this,`message`,msg);let eql=flag2(this,`eql`);this.assert(eql(obj,flag2(this,`object`)),`expected #{this} to deeply equal #{exp}`,`expected #{this} to not deeply equal #{exp}`,obj,this._obj,!0)}__name(assertEql,`assertEql`),Assertion.addMethod(`eql`,assertEql),Assertion.addMethod(`eqls`,assertEql);function assertAbove(n,msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`),doLength=flag2(this,`doLength`),flagMsg=flag2(this,`message`),msgPrefix=flagMsg?flagMsg+`: `:``,ssfi=flag2(this,`ssfi`),objType=type(obj).toLowerCase(),nType=type(n).toLowerCase();if(doLength&&objType!==`map`&&objType!==`set`&&new Assertion(obj,flagMsg,ssfi,!0).to.have.property(`length`),!doLength&&objType===`date`&&nType!==`date`)throw new AssertionError(msgPrefix+`the argument to above must be a date`,void 0,ssfi);if(!isNumeric(n)&&(doLength||isNumeric(obj)))throw new AssertionError(msgPrefix+`the argument to above must be a number`,void 0,ssfi);if(!doLength&&objType!==`date`&&!isNumeric(obj)){let printObj=objType===`string`?`'`+obj+`'`:obj;throw new AssertionError(msgPrefix+`expected `+printObj+` to be a number or a date`,void 0,ssfi)}if(doLength){let descriptor=`length`,itemsCount;objType===`map`||objType===`set`?(descriptor=`size`,itemsCount=obj.size):itemsCount=obj.length,this.assert(itemsCount>n,`expected #{this} to have a `+descriptor+` above #{exp} but got #{act}`,`expected #{this} to not have a `+descriptor+` above #{exp}`,n,itemsCount)}else this.assert(obj>n,`expected #{this} to be above #{exp}`,`expected #{this} to be at most #{exp}`,n)}__name(assertAbove,`assertAbove`),Assertion.addMethod(`above`,assertAbove),Assertion.addMethod(`gt`,assertAbove),Assertion.addMethod(`greaterThan`,assertAbove);function assertLeast(n,msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`),doLength=flag2(this,`doLength`),flagMsg=flag2(this,`message`),msgPrefix=flagMsg?flagMsg+`: `:``,ssfi=flag2(this,`ssfi`),objType=type(obj).toLowerCase(),nType=type(n).toLowerCase(),errorMessage,shouldThrow=!0;if(doLength&&objType!==`map`&&objType!==`set`&&new Assertion(obj,flagMsg,ssfi,!0).to.have.property(`length`),!doLength&&objType===`date`&&nType!==`date`)errorMessage=msgPrefix+`the argument to least must be a date`;else if(!isNumeric(n)&&(doLength||isNumeric(obj)))errorMessage=msgPrefix+`the argument to least must be a number`;else if(!doLength&&objType!==`date`&&!isNumeric(obj)){let printObj=objType===`string`?`'`+obj+`'`:obj;errorMessage=msgPrefix+`expected `+printObj+` to be a number or a date`}else shouldThrow=!1;if(shouldThrow)throw new AssertionError(errorMessage,void 0,ssfi);if(doLength){let descriptor=`length`,itemsCount;objType===`map`||objType===`set`?(descriptor=`size`,itemsCount=obj.size):itemsCount=obj.length,this.assert(itemsCount>=n,`expected #{this} to have a `+descriptor+` at least #{exp} but got #{act}`,`expected #{this} to have a `+descriptor+` below #{exp}`,n,itemsCount)}else this.assert(obj>=n,`expected #{this} to be at least #{exp}`,`expected #{this} to be below #{exp}`,n)}__name(assertLeast,`assertLeast`),Assertion.addMethod(`least`,assertLeast),Assertion.addMethod(`gte`,assertLeast),Assertion.addMethod(`greaterThanOrEqual`,assertLeast);function assertBelow(n,msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`),doLength=flag2(this,`doLength`),flagMsg=flag2(this,`message`),msgPrefix=flagMsg?flagMsg+`: `:``,ssfi=flag2(this,`ssfi`),objType=type(obj).toLowerCase(),nType=type(n).toLowerCase(),errorMessage,shouldThrow=!0;if(doLength&&objType!==`map`&&objType!==`set`&&new Assertion(obj,flagMsg,ssfi,!0).to.have.property(`length`),!doLength&&objType===`date`&&nType!==`date`)errorMessage=msgPrefix+`the argument to below must be a date`;else if(!isNumeric(n)&&(doLength||isNumeric(obj)))errorMessage=msgPrefix+`the argument to below must be a number`;else if(!doLength&&objType!==`date`&&!isNumeric(obj)){let printObj=objType===`string`?`'`+obj+`'`:obj;errorMessage=msgPrefix+`expected `+printObj+` to be a number or a date`}else shouldThrow=!1;if(shouldThrow)throw new AssertionError(errorMessage,void 0,ssfi);if(doLength){let descriptor=`length`,itemsCount;objType===`map`||objType===`set`?(descriptor=`size`,itemsCount=obj.size):itemsCount=obj.length,this.assert(itemsCount<n,`expected #{this} to have a `+descriptor+` below #{exp} but got #{act}`,`expected #{this} to not have a `+descriptor+` below #{exp}`,n,itemsCount)}else this.assert(obj<n,`expected #{this} to be below #{exp}`,`expected #{this} to be at least #{exp}`,n)}__name(assertBelow,`assertBelow`),Assertion.addMethod(`below`,assertBelow),Assertion.addMethod(`lt`,assertBelow),Assertion.addMethod(`lessThan`,assertBelow);function assertMost(n,msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`),doLength=flag2(this,`doLength`),flagMsg=flag2(this,`message`),msgPrefix=flagMsg?flagMsg+`: `:``,ssfi=flag2(this,`ssfi`),objType=type(obj).toLowerCase(),nType=type(n).toLowerCase(),errorMessage,shouldThrow=!0;if(doLength&&objType!==`map`&&objType!==`set`&&new Assertion(obj,flagMsg,ssfi,!0).to.have.property(`length`),!doLength&&objType===`date`&&nType!==`date`)errorMessage=msgPrefix+`the argument to most must be a date`;else if(!isNumeric(n)&&(doLength||isNumeric(obj)))errorMessage=msgPrefix+`the argument to most must be a number`;else if(!doLength&&objType!==`date`&&!isNumeric(obj)){let printObj=objType===`string`?`'`+obj+`'`:obj;errorMessage=msgPrefix+`expected `+printObj+` to be a number or a date`}else shouldThrow=!1;if(shouldThrow)throw new AssertionError(errorMessage,void 0,ssfi);if(doLength){let descriptor=`length`,itemsCount;objType===`map`||objType===`set`?(descriptor=`size`,itemsCount=obj.size):itemsCount=obj.length,this.assert(itemsCount<=n,`expected #{this} to have a `+descriptor+` at most #{exp} but got #{act}`,`expected #{this} to have a `+descriptor+` above #{exp}`,n,itemsCount)}else this.assert(obj<=n,`expected #{this} to be at most #{exp}`,`expected #{this} to be above #{exp}`,n)}__name(assertMost,`assertMost`),Assertion.addMethod(`most`,assertMost),Assertion.addMethod(`lte`,assertMost),Assertion.addMethod(`lessThanOrEqual`,assertMost),Assertion.addMethod(`within`,function(start,finish,msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`),doLength=flag2(this,`doLength`),flagMsg=flag2(this,`message`),msgPrefix=flagMsg?flagMsg+`: `:``,ssfi=flag2(this,`ssfi`),objType=type(obj).toLowerCase(),startType=type(start).toLowerCase(),finishType=type(finish).toLowerCase(),errorMessage,shouldThrow=!0,range=startType===`date`&&finishType===`date`?start.toISOString()+`..`+finish.toISOString():start+`..`+finish;if(doLength&&objType!==`map`&&objType!==`set`&&new Assertion(obj,flagMsg,ssfi,!0).to.have.property(`length`),!doLength&&objType===`date`&&(startType!==`date`||finishType!==`date`))errorMessage=msgPrefix+`the arguments to within must be dates`;else if((!isNumeric(start)||!isNumeric(finish))&&(doLength||isNumeric(obj)))errorMessage=msgPrefix+`the arguments to within must be numbers`;else if(!doLength&&objType!==`date`&&!isNumeric(obj)){let printObj=objType===`string`?`'`+obj+`'`:obj;errorMessage=msgPrefix+`expected `+printObj+` to be a number or a date`}else shouldThrow=!1;if(shouldThrow)throw new AssertionError(errorMessage,void 0,ssfi);if(doLength){let descriptor=`length`,itemsCount;objType===`map`||objType===`set`?(descriptor=`size`,itemsCount=obj.size):itemsCount=obj.length,this.assert(itemsCount>=start&&itemsCount<=finish,`expected #{this} to have a `+descriptor+` within `+range,`expected #{this} to not have a `+descriptor+` within `+range)}else this.assert(obj>=start&&obj<=finish,`expected #{this} to be within `+range,`expected #{this} to not be within `+range)});function assertInstanceOf(constructor,msg){msg&&flag2(this,`message`,msg);let target=flag2(this,`object`),ssfi=flag2(this,`ssfi`),flagMsg=flag2(this,`message`),isInstanceOf;try{isInstanceOf=target instanceof constructor}catch(err){throw err instanceof TypeError?(flagMsg=flagMsg?flagMsg+`: `:``,new AssertionError(flagMsg+`The instanceof assertion needs a constructor but `+type(constructor)+` was given.`,void 0,ssfi)):err}let name=getName(constructor);name??=`an unnamed constructor`,this.assert(isInstanceOf,`expected #{this} to be an instance of `+name,`expected #{this} to not be an instance of `+name)}__name(assertInstanceOf,`assertInstanceOf`),Assertion.addMethod(`instanceof`,assertInstanceOf),Assertion.addMethod(`instanceOf`,assertInstanceOf);function assertProperty(name,val,msg){msg&&flag2(this,`message`,msg);let isNested=flag2(this,`nested`),isOwn=flag2(this,`own`),flagMsg=flag2(this,`message`),obj=flag2(this,`object`),ssfi=flag2(this,`ssfi`),nameType=typeof name;if(flagMsg=flagMsg?flagMsg+`: `:``,isNested){if(nameType!==`string`)throw new AssertionError(flagMsg+`the argument to property must be a string when using nested syntax`,void 0,ssfi)}else if(nameType!==`string`&&nameType!==`number`&&nameType!==`symbol`)throw new AssertionError(flagMsg+`the argument to property must be a string, number, or symbol`,void 0,ssfi);if(isNested&&isOwn)throw new AssertionError(flagMsg+`The "nested" and "own" flags cannot be combined.`,void 0,ssfi);if(obj==null)throw new AssertionError(flagMsg+`Target cannot be null or undefined.`,void 0,ssfi);let isDeep=flag2(this,`deep`),negate=flag2(this,`negate`),pathInfo=isNested?getPathInfo(obj,name):null,value=isNested?pathInfo.value:obj[name],isEql=isDeep?flag2(this,`eql`):(val1,val2)=>val1===val2,descriptor=``;isDeep&&(descriptor+=`deep `),isOwn&&(descriptor+=`own `),isNested&&(descriptor+=`nested `),descriptor+=`property `;let hasProperty2;hasProperty2=isOwn?Object.prototype.hasOwnProperty.call(obj,name):isNested?pathInfo.exists:hasProperty(obj,name),(!negate||arguments.length===1)&&this.assert(hasProperty2,`expected #{this} to have `+descriptor+inspect2(name),`expected #{this} to not have `+descriptor+inspect2(name)),arguments.length>1&&this.assert(hasProperty2&&isEql(val,value),`expected #{this} to have `+descriptor+inspect2(name)+` of #{exp}, but got #{act}`,`expected #{this} to not have `+descriptor+inspect2(name)+` of #{act}`,val,value),flag2(this,`object`,value)}__name(assertProperty,`assertProperty`),Assertion.addMethod(`property`,assertProperty);function assertOwnProperty(_name,_value,_msg){flag2(this,`own`,!0),assertProperty.apply(this,arguments)}__name(assertOwnProperty,`assertOwnProperty`),Assertion.addMethod(`ownProperty`,assertOwnProperty),Assertion.addMethod(`haveOwnProperty`,assertOwnProperty);function assertOwnPropertyDescriptor(name,descriptor,msg){typeof descriptor==`string`&&(msg=descriptor,descriptor=null),msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`),actualDescriptor=Object.getOwnPropertyDescriptor(Object(obj),name),eql=flag2(this,`eql`);actualDescriptor&&descriptor?this.assert(eql(descriptor,actualDescriptor),`expected the own property descriptor for `+inspect2(name)+` on #{this} to match `+inspect2(descriptor)+`, got `+inspect2(actualDescriptor),`expected the own property descriptor for `+inspect2(name)+` on #{this} to not match `+inspect2(descriptor),descriptor,actualDescriptor,!0):this.assert(actualDescriptor,`expected #{this} to have an own property descriptor for `+inspect2(name),`expected #{this} to not have an own property descriptor for `+inspect2(name)),flag2(this,`object`,actualDescriptor)}__name(assertOwnPropertyDescriptor,`assertOwnPropertyDescriptor`),Assertion.addMethod(`ownPropertyDescriptor`,assertOwnPropertyDescriptor),Assertion.addMethod(`haveOwnPropertyDescriptor`,assertOwnPropertyDescriptor);function assertLengthChain(){flag2(this,`doLength`,!0)}__name(assertLengthChain,`assertLengthChain`);function assertLength(n,msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`),objType=type(obj).toLowerCase(),flagMsg=flag2(this,`message`),ssfi=flag2(this,`ssfi`),descriptor=`length`,itemsCount;switch(objType){case`map`:case`set`:descriptor=`size`,itemsCount=obj.size;break;default:new Assertion(obj,flagMsg,ssfi,!0).to.have.property(`length`),itemsCount=obj.length}this.assert(itemsCount==n,`expected #{this} to have a `+descriptor+` of #{exp} but got #{act}`,`expected #{this} to not have a `+descriptor+` of #{act}`,n,itemsCount)}__name(assertLength,`assertLength`),Assertion.addChainableMethod(`length`,assertLength,assertLengthChain),Assertion.addChainableMethod(`lengthOf`,assertLength,assertLengthChain);function assertMatch(re,msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`);this.assert(re.exec(obj),`expected #{this} to match `+re,`expected #{this} not to match `+re)}__name(assertMatch,`assertMatch`),Assertion.addMethod(`match`,assertMatch),Assertion.addMethod(`matches`,assertMatch),Assertion.addMethod(`string`,function(str,msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`);new Assertion(obj,flag2(this,`message`),flag2(this,`ssfi`),!0).is.a(`string`),this.assert(~obj.indexOf(str),`expected #{this} to contain `+inspect2(str),`expected #{this} to not contain `+inspect2(str))});function assertKeys(keys){let obj=flag2(this,`object`),objType=type(obj),keysType=type(keys),ssfi=flag2(this,`ssfi`),isDeep=flag2(this,`deep`),str,deepStr=``,actual,ok=!0,flagMsg=flag2(this,`message`);flagMsg=flagMsg?flagMsg+`: `:``;let mixedArgsMsg=flagMsg+`when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments`;if(objType===`Map`||objType===`Set`)deepStr=isDeep?`deeply `:``,actual=[],obj.forEach(function(val,key){actual.push(key)}),keysType!==`Array`&&(keys=Array.prototype.slice.call(arguments));else{switch(actual=getOwnEnumerableProperties(obj),keysType){case`Array`:if(arguments.length>1)throw new AssertionError(mixedArgsMsg,void 0,ssfi);break;case`Object`:if(arguments.length>1)throw new AssertionError(mixedArgsMsg,void 0,ssfi);keys=Object.keys(keys);break;default:keys=Array.prototype.slice.call(arguments)}keys=keys.map(function(val){return typeof val==`symbol`?val:String(val)})}if(!keys.length)throw new AssertionError(flagMsg+`keys required`,void 0,ssfi);let len=keys.length,any=flag2(this,`any`),all=flag2(this,`all`),expected=keys,isEql=isDeep?flag2(this,`eql`):(val1,val2)=>val1===val2;!any&&!all&&(all=!0);let uniqueExpected=[...new Set(expected)];if(any&&(ok=uniqueExpected.some(function(expectedKey){return actual.some(function(actualKey){return isEql(expectedKey,actualKey)})})),all&&(ok=uniqueExpected.every(function(expectedKey){return actual.some(function(actualKey){return isEql(expectedKey,actualKey)})}),flag2(this,`contains`)||(ok&&=uniqueExpected.length==actual.length)),len>1){keys=keys.map(function(key){return inspect2(key)});let last=keys.pop();all&&(str=keys.join(`, `)+`, and `+last),any&&(str=keys.join(`, `)+`, or `+last)}else str=inspect2(keys[0]);str=(len>1?`keys `:`key `)+str,str=(flag2(this,`contains`)?`contain `:`have `)+str,this.assert(ok,`expected #{this} to `+deepStr+str,`expected #{this} to not `+deepStr+str,expected.slice(0).sort(compareByInspect),actual.sort(compareByInspect),!0)}__name(assertKeys,`assertKeys`),Assertion.addMethod(`keys`,assertKeys),Assertion.addMethod(`key`,assertKeys);function assertThrows(errorLike,errMsgMatcher,msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`),ssfi=flag2(this,`ssfi`),flagMsg=flag2(this,`message`),negate=flag2(this,`negate`)||!1;new Assertion(obj,flagMsg,ssfi,!0).is.a(`function`),(isRegExp2(errorLike)||typeof errorLike==`string`)&&(errMsgMatcher=errorLike,errorLike=null);let caughtErr,errorWasThrown=!1;try{obj()}catch(err){errorWasThrown=!0,caughtErr=err}let everyArgIsUndefined=errorLike===void 0&&errMsgMatcher===void 0,everyArgIsDefined=!!(errorLike&&errMsgMatcher),errorLikeFail=!1,errMsgMatcherFail=!1;if(everyArgIsUndefined||!everyArgIsUndefined&&!negate){let errorLikeString=`an error`;errorLike instanceof Error?errorLikeString=`#{exp}`:errorLike&&(errorLikeString=check_error_exports.getConstructorName(errorLike));let actual=caughtErr;if(caughtErr instanceof Error)actual=caughtErr.toString();else if(typeof caughtErr==`string`)actual=caughtErr;else if(caughtErr&&(typeof caughtErr==`object`||typeof caughtErr==`function`))try{actual=check_error_exports.getConstructorName(caughtErr)}catch{}this.assert(errorWasThrown,`expected #{this} to throw `+errorLikeString,`expected #{this} to not throw an error but #{act} was thrown`,errorLike&&errorLike.toString(),actual)}if(errorLike&&caughtErr&&(errorLike instanceof Error&&check_error_exports.compatibleInstance(caughtErr,errorLike)===negate&&(everyArgIsDefined&&negate?errorLikeFail=!0:this.assert(negate,`expected #{this} to throw #{exp} but #{act} was thrown`,`expected #{this} to not throw #{exp}`+(caughtErr&&!negate?` but #{act} was thrown`:``),errorLike.toString(),caughtErr.toString())),check_error_exports.compatibleConstructor(caughtErr,errorLike)===negate&&(everyArgIsDefined&&negate?errorLikeFail=!0:this.assert(negate,`expected #{this} to throw #{exp} but #{act} was thrown`,`expected #{this} to not throw #{exp}`+(caughtErr?` but #{act} was thrown`:``),errorLike instanceof Error?errorLike.toString():errorLike&&check_error_exports.getConstructorName(errorLike),caughtErr instanceof Error?caughtErr.toString():caughtErr&&check_error_exports.getConstructorName(caughtErr)))),caughtErr&&errMsgMatcher!=null){let placeholder=`including`;isRegExp2(errMsgMatcher)&&(placeholder=`matching`),check_error_exports.compatibleMessage(caughtErr,errMsgMatcher)===negate&&(everyArgIsDefined&&negate?errMsgMatcherFail=!0:this.assert(negate,`expected #{this} to throw error `+placeholder+` #{exp} but got #{act}`,`expected #{this} to throw error not `+placeholder+` #{exp}`,errMsgMatcher,check_error_exports.getMessage(caughtErr)))}errorLikeFail&&errMsgMatcherFail&&this.assert(negate,`expected #{this} to throw #{exp} but #{act} was thrown`,`expected #{this} to not throw #{exp}`+(caughtErr?` but #{act} was thrown`:``),errorLike instanceof Error?errorLike.toString():errorLike&&check_error_exports.getConstructorName(errorLike),caughtErr instanceof Error?caughtErr.toString():caughtErr&&check_error_exports.getConstructorName(caughtErr)),flag2(this,`object`,caughtErr)}__name(assertThrows,`assertThrows`),Assertion.addMethod(`throw`,assertThrows),Assertion.addMethod(`throws`,assertThrows),Assertion.addMethod(`Throw`,assertThrows);function respondTo(method,msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`),itself=flag2(this,`itself`),context=typeof obj==`function`&&!itself?obj.prototype[method]:obj[method];this.assert(typeof context==`function`,`expected #{this} to respond to `+inspect2(method),`expected #{this} to not respond to `+inspect2(method))}__name(respondTo,`respondTo`),Assertion.addMethod(`respondTo`,respondTo),Assertion.addMethod(`respondsTo`,respondTo),Assertion.addProperty(`itself`,function(){flag2(this,`itself`,!0)});function satisfy(matcher,msg){msg&&flag2(this,`message`,msg);let result=matcher(flag2(this,`object`));this.assert(result,`expected #{this} to satisfy `+objDisplay(matcher),`expected #{this} to not satisfy`+objDisplay(matcher),!flag2(this,`negate`),result)}__name(satisfy,`satisfy`),Assertion.addMethod(`satisfy`,satisfy),Assertion.addMethod(`satisfies`,satisfy);function closeTo(expected,delta,msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`),flagMsg=flag2(this,`message`),ssfi=flag2(this,`ssfi`);new Assertion(obj,flagMsg,ssfi,!0).is.numeric;let message="A `delta` value is required for `closeTo`";if(delta==null||(new Assertion(delta,flagMsg,ssfi,!0).is.numeric,message="A `expected` value is required for `closeTo`",expected==null))throw new AssertionError(flagMsg?`${flagMsg}: ${message}`:message,void 0,ssfi);new Assertion(expected,flagMsg,ssfi,!0).is.numeric;let abs=__name(x=>x<0?-x:x,`abs`),strip=__name(number=>parseFloat(parseFloat(number).toPrecision(12)),`strip`);this.assert(strip(abs(obj-expected))<=delta,`expected #{this} to be close to `+expected+` +/- `+delta,`expected #{this} not to be close to `+expected+` +/- `+delta)}__name(closeTo,`closeTo`),Assertion.addMethod(`closeTo`,closeTo),Assertion.addMethod(`approximately`,closeTo);function isSubsetOf(_subset,_superset,cmp,contains,ordered){let superset=Array.from(_superset),subset=Array.from(_subset);if(!contains){if(subset.length!==superset.length)return!1;superset=superset.slice()}return subset.every(function(elem,idx){if(ordered)return cmp?cmp(elem,superset[idx]):elem===superset[idx];if(!cmp){let matchIdx=superset.indexOf(elem);return matchIdx!==-1&&(contains||superset.splice(matchIdx,1),!0)}return superset.some(function(elem2,matchIdx){return cmp(elem,elem2)?(contains||superset.splice(matchIdx,1),!0):!1})})}__name(isSubsetOf,`isSubsetOf`),Assertion.addMethod(`members`,function(subset,msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`),flagMsg=flag2(this,`message`),ssfi=flag2(this,`ssfi`);new Assertion(obj,flagMsg,ssfi,!0).to.be.iterable,new Assertion(subset,flagMsg,ssfi,!0).to.be.iterable;let contains=flag2(this,`contains`),ordered=flag2(this,`ordered`),subject,failMsg,failNegateMsg;contains?(subject=ordered?`an ordered superset`:`a superset`,failMsg=`expected #{this} to be `+subject+` of #{exp}`,failNegateMsg=`expected #{this} to not be `+subject+` of #{exp}`):(subject=ordered?`ordered members`:`members`,failMsg=`expected #{this} to have the same `+subject+` as #{exp}`,failNegateMsg=`expected #{this} to not have the same `+subject+` as #{exp}`);let cmp=flag2(this,`deep`)?flag2(this,`eql`):void 0;this.assert(isSubsetOf(subset,obj,cmp,contains,ordered),failMsg,failNegateMsg,subset,obj,!0)}),Assertion.addProperty(`iterable`,function(msg){msg&&flag2(this,`message`,msg);let obj=flag2(this,`object`);this.assert(obj!=null&&typeof obj[Symbol.iterator]==`function`,`expected #{this} to be an iterable`,`expected #{this} to not be an iterable`,obj)});function oneOf(list,msg){msg&&flag2(this,`message`,msg);let expected=flag2(this,`object`),flagMsg=flag2(this,`message`),ssfi=flag2(this,`ssfi`),contains=flag2(this,`contains`),isDeep=flag2(this,`deep`),eql=flag2(this,`eql`);new Assertion(list,flagMsg,ssfi,!0).to.be.an(`array`),contains?this.assert(list.some(function(possibility){return expected.indexOf(possibility)>-1||isDeep&&Array.isArray(expected)&&expected.some(function(item){return eql(item,possibility)})}),`expected #{this} to `+(isDeep?`deeply `:``)+`contain one of #{exp}`,`expected #{this} to not `+(isDeep?`deeply `:``)+`contain one of #{exp}`,list,expected):isDeep?this.assert(list.some(function(possibility){return eql(expected,possibility)}),`expected #{this} to deeply equal one of #{exp}`,`expected #{this} to not deeply equal one of #{exp}`,list,expected):this.assert(list.indexOf(expected)>-1,`expected #{this} to be one of #{exp}`,`expected #{this} to not be one of #{exp}`,list,expected)}__name(oneOf,`oneOf`),Assertion.addMethod(`oneOf`,oneOf);function assertChanges(subject,prop,msg){msg&&flag2(this,`message`,msg);let fn=flag2(this,`object`),flagMsg=flag2(this,`message`),ssfi=flag2(this,`ssfi`);new Assertion(fn,flagMsg,ssfi,!0).is.a(`function`);let initial;prop==null?(new Assertion(subject,flagMsg,ssfi,!0).is.a(`function`),initial=subject()):(new Assertion(subject,flagMsg,ssfi,!0).to.have.property(prop),initial=subject[prop]),fn();let final=prop==null?subject():subject[prop],msgObj=prop==null?initial:`.`+prop;flag2(this,`deltaMsgObj`,msgObj),flag2(this,`initialDeltaValue`,initial),flag2(this,`finalDeltaValue`,final),flag2(this,`deltaBehavior`,`change`),flag2(this,`realDelta`,final!==initial),this.assert(initial!==final,`expected `+msgObj+` to change`,`expected `+msgObj+` to not change`)}__name(assertChanges,`assertChanges`),Assertion.addMethod(`change`,assertChanges),Assertion.addMethod(`changes`,assertChanges);function assertIncreases(subject,prop,msg){msg&&flag2(this,`message`,msg);let fn=flag2(this,`object`),flagMsg=flag2(this,`message`),ssfi=flag2(this,`ssfi`);new Assertion(fn,flagMsg,ssfi,!0).is.a(`function`);let initial;prop==null?(new Assertion(subject,flagMsg,ssfi,!0).is.a(`function`),initial=subject()):(new Assertion(subject,flagMsg,ssfi,!0).to.have.property(prop),initial=subject[prop]),new Assertion(initial,flagMsg,ssfi,!0).is.a(`number`),fn();let final=prop==null?subject():subject[prop],msgObj=prop==null?initial:`.`+prop;flag2(this,`deltaMsgObj`,msgObj),flag2(this,`initialDeltaValue`,initial),flag2(this,`finalDeltaValue`,final),flag2(this,`deltaBehavior`,`increase`),flag2(this,`realDelta`,final-initial),this.assert(final-initial>0,`expected `+msgObj+` to increase`,`expected `+msgObj+` to not increase`)}__name(assertIncreases,`assertIncreases`),Assertion.addMethod(`increase`,assertIncreases),Assertion.addMethod(`increases`,assertIncreases);function assertDecreases(subject,prop,msg){msg&&flag2(this,`message`,msg);let fn=flag2(this,`object`),flagMsg=flag2(this,`message`),ssfi=flag2(this,`ssfi`);new Assertion(fn,flagMsg,ssfi,!0).is.a(`function`);let initial;prop==null?(new Assertion(subject,flagMsg,ssfi,!0).is.a(`function`),initial=subject()):(new Assertion(subject,flagMsg,ssfi,!0).to.have.property(prop),initial=subject[prop]),new Assertion(initial,flagMsg,ssfi,!0).is.a(`number`),fn();let final=prop==null?subject():subject[prop],msgObj=prop==null?initial:`.`+prop;flag2(this,`deltaMsgObj`,msgObj),flag2(this,`initialDeltaValue`,initial),flag2(this,`finalDeltaValue`,final),flag2(this,`deltaBehavior`,`decrease`),flag2(this,`realDelta`,initial-final),this.assert(final-initial<0,`expected `+msgObj+` to decrease`,`expected `+msgObj+` to not decrease`)}__name(assertDecreases,`assertDecreases`),Assertion.addMethod(`decrease`,assertDecreases),Assertion.addMethod(`decreases`,assertDecreases);function assertDelta(delta,msg){msg&&flag2(this,`message`,msg);let msgObj=flag2(this,`deltaMsgObj`),initial=flag2(this,`initialDeltaValue`),final=flag2(this,`finalDeltaValue`),behavior=flag2(this,`deltaBehavior`),realDelta=flag2(this,`realDelta`),expression;expression=behavior===`change`?Math.abs(final-initial)===Math.abs(delta):realDelta===Math.abs(delta),this.assert(expression,`expected `+msgObj+` to `+behavior+` by `+delta,`expected `+msgObj+` to not `+behavior+` by `+delta)}__name(assertDelta,`assertDelta`),Assertion.addMethod(`by`,assertDelta),Assertion.addProperty(`extensible`,function(){let obj=flag2(this,`object`),isExtensible=obj===Object(obj)&&Object.isExtensible(obj);this.assert(isExtensible,`expected #{this} to be extensible`,`expected #{this} to not be extensible`)}),Assertion.addProperty(`sealed`,function(){let obj=flag2(this,`object`),isSealed=obj!==Object(obj)||Object.isSealed(obj);this.assert(isSealed,`expected #{this} to be sealed`,`expected #{this} to not be sealed`)}),Assertion.addProperty(`frozen`,function(){let obj=flag2(this,`object`),isFrozen=obj!==Object(obj)||Object.isFrozen(obj);this.assert(isFrozen,`expected #{this} to be frozen`,`expected #{this} to not be frozen`)}),Assertion.addProperty(`finite`,function(_msg){let obj=flag2(this,`object`);this.assert(typeof obj==`number`&&isFinite(obj),`expected #{this} to be a finite number`,`expected #{this} to not be a finite number`)});function compareSubset(expected,actual){return expected===actual?!0:typeof actual==typeof expected?typeof expected!=`object`||!expected?expected===actual:actual?Array.isArray(expected)?Array.isArray(actual)?expected.every(function(exp){return actual.some(function(act){return compareSubset(exp,act)})}):!1:expected instanceof Date?actual instanceof Date&&expected.getTime()===actual.getTime():Object.keys(expected).every(function(key){let expectedValue=expected[key],actualValue=actual[key];return typeof expectedValue==`object`&&expectedValue&&actualValue!==null?compareSubset(expectedValue,actualValue):typeof expectedValue==`function`?expectedValue(actualValue):actualValue===expectedValue}):!1:!1}__name(compareSubset,`compareSubset`),Assertion.addMethod(`containSubset`,function(expected){let actual=flag(this,`object`),showDiff=config.showDiff;this.assert(compareSubset(expected,actual),`expected #{act} to contain subset #{exp}`,`expected #{act} to not contain subset #{exp}`,expected,actual,showDiff)});function expect(val,message){return new Assertion(val,message)}__name(expect,`expect`),expect.fail=function(actual,expected,message,operator){let msg=message;throw arguments.length<2&&(msg=actual,actual=void 0),new AssertionError(msg||`expect.fail()`,{actual,expected,operator},expect.fail)};var should_exports={};__export$1(should_exports,{Should:()=>Should,should:()=>should});function loadShould(){function shouldGetter(){return this instanceof String||this instanceof Number||this instanceof Boolean||typeof Symbol==`function`&&this instanceof Symbol||typeof BigInt==`function`&&this instanceof BigInt?new Assertion(this.valueOf(),null,shouldGetter):new Assertion(this,null,shouldGetter)}__name(shouldGetter,`shouldGetter`);function shouldSetter(value){Object.defineProperty(this,"should",{value,enumerable:!0,configurable:!0,writable:!0})}__name(shouldSetter,`shouldSetter`),Object.defineProperty(Object.prototype,"should",{set:shouldSetter,get:shouldGetter,configurable:!0});let should2={};return should2.fail=function(actual,expected,message,operator){throw arguments.length<2&&(message=actual,actual=void 0),message||=`should.fail()`,new AssertionError(message,{actual,expected,operator},should2.fail)},should2.equal=function(actual,expected,message){new Assertion(actual,message).to.equal(expected)},should2.Throw=function(fn,errt,errs,msg){new Assertion(fn,msg).to.Throw(errt,errs)},should2.exist=function(val,msg){new Assertion(val,msg).to.exist},should2.not={},should2.not.equal=function(actual,expected,msg){new Assertion(actual,msg).to.not.equal(expected)},should2.not.Throw=function(fn,errt,errs,msg){new Assertion(fn,msg).to.not.Throw(errt,errs)},should2.not.exist=function(val,msg){new Assertion(val,msg).to.not.exist},should2.throw=should2.Throw,should2.not.throw=should2.not.Throw,should2}__name(loadShould,`loadShould`);var should=loadShould,Should=loadShould;function assert(express,errmsg){new Assertion(null,null,assert,!0).assert(express,errmsg,`[ negation message unavailable ]`)}__name(assert,`assert`),assert.fail=function(actual,expected,message,operator){throw arguments.length<2&&(message=actual,actual=void 0),message||=`assert.fail()`,new AssertionError(message,{actual,expected,operator},assert.fail)},assert.isOk=function(val,msg){new Assertion(val,msg,assert.isOk,!0).is.ok},assert.isNotOk=function(val,msg){new Assertion(val,msg,assert.isNotOk,!0).is.not.ok},assert.equal=function(act,exp,msg){let test2=new Assertion(act,msg,assert.equal,!0);test2.assert(exp==flag(test2,`object`),`expected #{this} to equal #{exp}`,`expected #{this} to not equal #{act}`,exp,act,!0)},assert.notEqual=function(act,exp,msg){let test2=new Assertion(act,msg,assert.notEqual,!0);test2.assert(exp!=flag(test2,`object`),`expected #{this} to not equal #{exp}`,`expected #{this} to equal #{act}`,exp,act,!0)},assert.strictEqual=function(act,exp,msg){new Assertion(act,msg,assert.strictEqual,!0).to.equal(exp)},assert.notStrictEqual=function(act,exp,msg){new Assertion(act,msg,assert.notStrictEqual,!0).to.not.equal(exp)},assert.deepEqual=assert.deepStrictEqual=function(act,exp,msg){new Assertion(act,msg,assert.deepEqual,!0).to.eql(exp)},assert.notDeepEqual=function(act,exp,msg){new Assertion(act,msg,assert.notDeepEqual,!0).to.not.eql(exp)},assert.isAbove=function(val,abv,msg){new Assertion(val,msg,assert.isAbove,!0).to.be.above(abv)},assert.isAtLeast=function(val,atlst,msg){new Assertion(val,msg,assert.isAtLeast,!0).to.be.least(atlst)},assert.isBelow=function(val,blw,msg){new Assertion(val,msg,assert.isBelow,!0).to.be.below(blw)},assert.isAtMost=function(val,atmst,msg){new Assertion(val,msg,assert.isAtMost,!0).to.be.most(atmst)},assert.isTrue=function(val,msg){new Assertion(val,msg,assert.isTrue,!0).is.true},assert.isNotTrue=function(val,msg){new Assertion(val,msg,assert.isNotTrue,!0).to.not.equal(!0)},assert.isFalse=function(val,msg){new Assertion(val,msg,assert.isFalse,!0).is.false},assert.isNotFalse=function(val,msg){new Assertion(val,msg,assert.isNotFalse,!0).to.not.equal(!1)},assert.isNull=function(val,msg){new Assertion(val,msg,assert.isNull,!0).to.equal(null)},assert.isNotNull=function(val,msg){new Assertion(val,msg,assert.isNotNull,!0).to.not.equal(null)},assert.isNaN=function(val,msg){new Assertion(val,msg,assert.isNaN,!0).to.be.NaN},assert.isNotNaN=function(value,message){new Assertion(value,message,assert.isNotNaN,!0).not.to.be.NaN},assert.exists=function(val,msg){new Assertion(val,msg,assert.exists,!0).to.exist},assert.notExists=function(val,msg){new Assertion(val,msg,assert.notExists,!0).to.not.exist},assert.isUndefined=function(val,msg){new Assertion(val,msg,assert.isUndefined,!0).to.equal(void 0)},assert.isDefined=function(val,msg){new Assertion(val,msg,assert.isDefined,!0).to.not.equal(void 0)},assert.isCallable=function(value,message){new Assertion(value,message,assert.isCallable,!0).is.callable},assert.isNotCallable=function(value,message){new Assertion(value,message,assert.isNotCallable,!0).is.not.callable},assert.isObject=function(val,msg){new Assertion(val,msg,assert.isObject,!0).to.be.a(`object`)},assert.isNotObject=function(val,msg){new Assertion(val,msg,assert.isNotObject,!0).to.not.be.a(`object`)},assert.isArray=function(val,msg){new Assertion(val,msg,assert.isArray,!0).to.be.an(`array`)},assert.isNotArray=function(val,msg){new Assertion(val,msg,assert.isNotArray,!0).to.not.be.an(`array`)},assert.isString=function(val,msg){new Assertion(val,msg,assert.isString,!0).to.be.a(`string`)},assert.isNotString=function(val,msg){new Assertion(val,msg,assert.isNotString,!0).to.not.be.a(`string`)},assert.isNumber=function(val,msg){new Assertion(val,msg,assert.isNumber,!0).to.be.a(`number`)},assert.isNotNumber=function(val,msg){new Assertion(val,msg,assert.isNotNumber,!0).to.not.be.a(`number`)},assert.isNumeric=function(val,msg){new Assertion(val,msg,assert.isNumeric,!0).is.numeric},assert.isNotNumeric=function(val,msg){new Assertion(val,msg,assert.isNotNumeric,!0).is.not.numeric},assert.isFinite=function(val,msg){new Assertion(val,msg,assert.isFinite,!0).to.be.finite},assert.isBoolean=function(val,msg){new Assertion(val,msg,assert.isBoolean,!0).to.be.a(`boolean`)},assert.isNotBoolean=function(val,msg){new Assertion(val,msg,assert.isNotBoolean,!0).to.not.be.a(`boolean`)},assert.typeOf=function(val,type3,msg){new Assertion(val,msg,assert.typeOf,!0).to.be.a(type3)},assert.notTypeOf=function(value,type3,message){new Assertion(value,message,assert.notTypeOf,!0).to.not.be.a(type3)},assert.instanceOf=function(val,type3,msg){new Assertion(val,msg,assert.instanceOf,!0).to.be.instanceOf(type3)},assert.notInstanceOf=function(val,type3,msg){new Assertion(val,msg,assert.notInstanceOf,!0).to.not.be.instanceOf(type3)},assert.include=function(exp,inc,msg){new Assertion(exp,msg,assert.include,!0).include(inc)},assert.notInclude=function(exp,inc,msg){new Assertion(exp,msg,assert.notInclude,!0).not.include(inc)},assert.deepInclude=function(exp,inc,msg){new Assertion(exp,msg,assert.deepInclude,!0).deep.include(inc)},assert.notDeepInclude=function(exp,inc,msg){new Assertion(exp,msg,assert.notDeepInclude,!0).not.deep.include(inc)},assert.nestedInclude=function(exp,inc,msg){new Assertion(exp,msg,assert.nestedInclude,!0).nested.include(inc)},assert.notNestedInclude=function(exp,inc,msg){new Assertion(exp,msg,assert.notNestedInclude,!0).not.nested.include(inc)},assert.deepNestedInclude=function(exp,inc,msg){new Assertion(exp,msg,assert.deepNestedInclude,!0).deep.nested.include(inc)},assert.notDeepNestedInclude=function(exp,inc,msg){new Assertion(exp,msg,assert.notDeepNestedInclude,!0).not.deep.nested.include(inc)},assert.ownInclude=function(exp,inc,msg){new Assertion(exp,msg,assert.ownInclude,!0).own.include(inc)},assert.notOwnInclude=function(exp,inc,msg){new Assertion(exp,msg,assert.notOwnInclude,!0).not.own.include(inc)},assert.deepOwnInclude=function(exp,inc,msg){new Assertion(exp,msg,assert.deepOwnInclude,!0).deep.own.include(inc)},assert.notDeepOwnInclude=function(exp,inc,msg){new Assertion(exp,msg,assert.notDeepOwnInclude,!0).not.deep.own.include(inc)},assert.match=function(exp,re,msg){new Assertion(exp,msg,assert.match,!0).to.match(re)},assert.notMatch=function(exp,re,msg){new Assertion(exp,msg,assert.notMatch,!0).to.not.match(re)},assert.property=function(obj,prop,msg){new Assertion(obj,msg,assert.property,!0).to.have.property(prop)},assert.notProperty=function(obj,prop,msg){new Assertion(obj,msg,assert.notProperty,!0).to.not.have.property(prop)},assert.propertyVal=function(obj,prop,val,msg){new Assertion(obj,msg,assert.propertyVal,!0).to.have.property(prop,val)},assert.notPropertyVal=function(obj,prop,val,msg){new Assertion(obj,msg,assert.notPropertyVal,!0).to.not.have.property(prop,val)},assert.deepPropertyVal=function(obj,prop,val,msg){new Assertion(obj,msg,assert.deepPropertyVal,!0).to.have.deep.property(prop,val)},assert.notDeepPropertyVal=function(obj,prop,val,msg){new Assertion(obj,msg,assert.notDeepPropertyVal,!0).to.not.have.deep.property(prop,val)},assert.ownProperty=function(obj,prop,msg){new Assertion(obj,msg,assert.ownProperty,!0).to.have.own.property(prop)},assert.notOwnProperty=function(obj,prop,msg){new Assertion(obj,msg,assert.notOwnProperty,!0).to.not.have.own.property(prop)},assert.ownPropertyVal=function(obj,prop,value,msg){new Assertion(obj,msg,assert.ownPropertyVal,!0).to.have.own.property(prop,value)},assert.notOwnPropertyVal=function(obj,prop,value,msg){new Assertion(obj,msg,assert.notOwnPropertyVal,!0).to.not.have.own.property(prop,value)},assert.deepOwnPropertyVal=function(obj,prop,value,msg){new Assertion(obj,msg,assert.deepOwnPropertyVal,!0).to.have.deep.own.property(prop,value)},assert.notDeepOwnPropertyVal=function(obj,prop,value,msg){new Assertion(obj,msg,assert.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(prop,value)},assert.nestedProperty=function(obj,prop,msg){new Assertion(obj,msg,assert.nestedProperty,!0).to.have.nested.property(prop)},assert.notNestedProperty=function(obj,prop,msg){new Assertion(obj,msg,assert.notNestedProperty,!0).to.not.have.nested.property(prop)},assert.nestedPropertyVal=function(obj,prop,val,msg){new Assertion(obj,msg,assert.nestedPropertyVal,!0).to.have.nested.property(prop,val)},assert.notNestedPropertyVal=function(obj,prop,val,msg){new Assertion(obj,msg,assert.notNestedPropertyVal,!0).to.not.have.nested.property(prop,val)},assert.deepNestedPropertyVal=function(obj,prop,val,msg){new Assertion(obj,msg,assert.deepNestedPropertyVal,!0).to.have.deep.nested.property(prop,val)},assert.notDeepNestedPropertyVal=function(obj,prop,val,msg){new Assertion(obj,msg,assert.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(prop,val)},assert.lengthOf=function(exp,len,msg){new Assertion(exp,msg,assert.lengthOf,!0).to.have.lengthOf(len)},assert.hasAnyKeys=function(obj,keys,msg){new Assertion(obj,msg,assert.hasAnyKeys,!0).to.have.any.keys(keys)},assert.hasAllKeys=function(obj,keys,msg){new Assertion(obj,msg,assert.hasAllKeys,!0).to.have.all.keys(keys)},assert.containsAllKeys=function(obj,keys,msg){new Assertion(obj,msg,assert.containsAllKeys,!0).to.contain.all.keys(keys)},assert.doesNotHaveAnyKeys=function(obj,keys,msg){new Assertion(obj,msg,assert.doesNotHaveAnyKeys,!0).to.not.have.any.keys(keys)},assert.doesNotHaveAllKeys=function(obj,keys,msg){new Assertion(obj,msg,assert.doesNotHaveAllKeys,!0).to.not.have.all.keys(keys)},assert.hasAnyDeepKeys=function(obj,keys,msg){new Assertion(obj,msg,assert.hasAnyDeepKeys,!0).to.have.any.deep.keys(keys)},assert.hasAllDeepKeys=function(obj,keys,msg){new Assertion(obj,msg,assert.hasAllDeepKeys,!0).to.have.all.deep.keys(keys)},assert.containsAllDeepKeys=function(obj,keys,msg){new Assertion(obj,msg,assert.containsAllDeepKeys,!0).to.contain.all.deep.keys(keys)},assert.doesNotHaveAnyDeepKeys=function(obj,keys,msg){new Assertion(obj,msg,assert.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(keys)},assert.doesNotHaveAllDeepKeys=function(obj,keys,msg){new Assertion(obj,msg,assert.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(keys)},assert.throws=function(fn,errorLike,errMsgMatcher,msg){return(typeof errorLike==`string`||errorLike instanceof RegExp)&&(errMsgMatcher=errorLike,errorLike=null),flag(new Assertion(fn,msg,assert.throws,!0).to.throw(errorLike,errMsgMatcher),`object`)},assert.doesNotThrow=function(fn,errorLike,errMsgMatcher,message){(typeof errorLike==`string`||errorLike instanceof RegExp)&&(errMsgMatcher=errorLike,errorLike=null),new Assertion(fn,message,assert.doesNotThrow,!0).to.not.throw(errorLike,errMsgMatcher)},assert.operator=function(val,operator,val2,msg){let ok;switch(operator){case`==`:ok=val==val2;break;case`===`:ok=val===val2;break;case`>`:ok=val>val2;break;case`>=`:ok=val>=val2;break;case`<`:ok=val<val2;break;case`<=`:ok=val<=val2;break;case`!=`:ok=val!=val2;break;case`!==`:ok=val!==val2;break;default:throw msg&&=msg+`: `,new AssertionError(msg+`Invalid operator "`+operator+`"`,void 0,assert.operator)}let test2=new Assertion(ok,msg,assert.operator,!0);test2.assert(!0===flag(test2,`object`),`expected `+inspect2(val)+` to be `+operator+` `+inspect2(val2),`expected `+inspect2(val)+` to not be `+operator+` `+inspect2(val2))},assert.closeTo=function(act,exp,delta,msg){new Assertion(act,msg,assert.closeTo,!0).to.be.closeTo(exp,delta)},assert.approximately=function(act,exp,delta,msg){new Assertion(act,msg,assert.approximately,!0).to.be.approximately(exp,delta)},assert.sameMembers=function(set1,set2,msg){new Assertion(set1,msg,assert.sameMembers,!0).to.have.same.members(set2)},assert.notSameMembers=function(set1,set2,msg){new Assertion(set1,msg,assert.notSameMembers,!0).to.not.have.same.members(set2)},assert.sameDeepMembers=function(set1,set2,msg){new Assertion(set1,msg,assert.sameDeepMembers,!0).to.have.same.deep.members(set2)},assert.notSameDeepMembers=function(set1,set2,msg){new Assertion(set1,msg,assert.notSameDeepMembers,!0).to.not.have.same.deep.members(set2)},assert.sameOrderedMembers=function(set1,set2,msg){new Assertion(set1,msg,assert.sameOrderedMembers,!0).to.have.same.ordered.members(set2)},assert.notSameOrderedMembers=function(set1,set2,msg){new Assertion(set1,msg,assert.notSameOrderedMembers,!0).to.not.have.same.ordered.members(set2)},assert.sameDeepOrderedMembers=function(set1,set2,msg){new Assertion(set1,msg,assert.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(set2)},assert.notSameDeepOrderedMembers=function(set1,set2,msg){new Assertion(set1,msg,assert.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(set2)},assert.includeMembers=function(superset,subset,msg){new Assertion(superset,msg,assert.includeMembers,!0).to.include.members(subset)},assert.notIncludeMembers=function(superset,subset,msg){new Assertion(superset,msg,assert.notIncludeMembers,!0).to.not.include.members(subset)},assert.includeDeepMembers=function(superset,subset,msg){new Assertion(superset,msg,assert.includeDeepMembers,!0).to.include.deep.members(subset)},assert.notIncludeDeepMembers=function(superset,subset,msg){new Assertion(superset,msg,assert.notIncludeDeepMembers,!0).to.not.include.deep.members(subset)},assert.includeOrderedMembers=function(superset,subset,msg){new Assertion(superset,msg,assert.includeOrderedMembers,!0).to.include.ordered.members(subset)},assert.notIncludeOrderedMembers=function(superset,subset,msg){new Assertion(superset,msg,assert.notIncludeOrderedMembers,!0).to.not.include.ordered.members(subset)},assert.includeDeepOrderedMembers=function(superset,subset,msg){new Assertion(superset,msg,assert.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(subset)},assert.notIncludeDeepOrderedMembers=function(superset,subset,msg){new Assertion(superset,msg,assert.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(subset)},assert.oneOf=function(inList,list,msg){new Assertion(inList,msg,assert.oneOf,!0).to.be.oneOf(list)},assert.isIterable=function(obj,msg){if(obj==null||typeof obj[Symbol.iterator]!=`function`)throw msg=msg?`${msg} expected ${inspect2(obj)} to be an iterable`:`expected ${inspect2(obj)} to be an iterable`,new AssertionError(msg,void 0,assert.isIterable)},assert.changes=function(fn,obj,prop,msg){arguments.length===3&&typeof obj==`function`&&(msg=prop,prop=null),new Assertion(fn,msg,assert.changes,!0).to.change(obj,prop)},assert.changesBy=function(fn,obj,prop,delta,msg){if(arguments.length===4&&typeof obj==`function`){let tmpMsg=delta;delta=prop,msg=tmpMsg}else arguments.length===3&&(delta=prop,prop=null);new Assertion(fn,msg,assert.changesBy,!0).to.change(obj,prop).by(delta)},assert.doesNotChange=function(fn,obj,prop,msg){return arguments.length===3&&typeof obj==`function`&&(msg=prop,prop=null),new Assertion(fn,msg,assert.doesNotChange,!0).to.not.change(obj,prop)},assert.changesButNotBy=function(fn,obj,prop,delta,msg){if(arguments.length===4&&typeof obj==`function`){let tmpMsg=delta;delta=prop,msg=tmpMsg}else arguments.length===3&&(delta=prop,prop=null);new Assertion(fn,msg,assert.changesButNotBy,!0).to.change(obj,prop).but.not.by(delta)},assert.increases=function(fn,obj,prop,msg){return arguments.length===3&&typeof obj==`function`&&(msg=prop,prop=null),new Assertion(fn,msg,assert.increases,!0).to.increase(obj,prop)},assert.increasesBy=function(fn,obj,prop,delta,msg){if(arguments.length===4&&typeof obj==`function`){let tmpMsg=delta;delta=prop,msg=tmpMsg}else arguments.length===3&&(delta=prop,prop=null);new Assertion(fn,msg,assert.increasesBy,!0).to.increase(obj,prop).by(delta)},assert.doesNotIncrease=function(fn,obj,prop,msg){return arguments.length===3&&typeof obj==`function`&&(msg=prop,prop=null),new Assertion(fn,msg,assert.doesNotIncrease,!0).to.not.increase(obj,prop)},assert.increasesButNotBy=function(fn,obj,prop,delta,msg){if(arguments.length===4&&typeof obj==`function`){let tmpMsg=delta;delta=prop,msg=tmpMsg}else arguments.length===3&&(delta=prop,prop=null);new Assertion(fn,msg,assert.increasesButNotBy,!0).to.increase(obj,prop).but.not.by(delta)},assert.decreases=function(fn,obj,prop,msg){return arguments.length===3&&typeof obj==`function`&&(msg=prop,prop=null),new Assertion(fn,msg,assert.decreases,!0).to.decrease(obj,prop)},assert.decreasesBy=function(fn,obj,prop,delta,msg){if(arguments.length===4&&typeof obj==`function`){let tmpMsg=delta;delta=prop,msg=tmpMsg}else arguments.length===3&&(delta=prop,prop=null);new Assertion(fn,msg,assert.decreasesBy,!0).to.decrease(obj,prop).by(delta)},assert.doesNotDecrease=function(fn,obj,prop,msg){return arguments.length===3&&typeof obj==`function`&&(msg=prop,prop=null),new Assertion(fn,msg,assert.doesNotDecrease,!0).to.not.decrease(obj,prop)},assert.doesNotDecreaseBy=function(fn,obj,prop,delta,msg){if(arguments.length===4&&typeof obj==`function`){let tmpMsg=delta;delta=prop,msg=tmpMsg}else arguments.length===3&&(delta=prop,prop=null);return new Assertion(fn,msg,assert.doesNotDecreaseBy,!0).to.not.decrease(obj,prop).by(delta)},assert.decreasesButNotBy=function(fn,obj,prop,delta,msg){if(arguments.length===4&&typeof obj==`function`){let tmpMsg=delta;delta=prop,msg=tmpMsg}else arguments.length===3&&(delta=prop,prop=null);new Assertion(fn,msg,assert.decreasesButNotBy,!0).to.decrease(obj,prop).but.not.by(delta)},assert.ifError=function(val){if(val)throw val},assert.isExtensible=function(obj,msg){new Assertion(obj,msg,assert.isExtensible,!0).to.be.extensible},assert.isNotExtensible=function(obj,msg){new Assertion(obj,msg,assert.isNotExtensible,!0).to.not.be.extensible},assert.isSealed=function(obj,msg){new Assertion(obj,msg,assert.isSealed,!0).to.be.sealed},assert.isNotSealed=function(obj,msg){new Assertion(obj,msg,assert.isNotSealed,!0).to.not.be.sealed},assert.isFrozen=function(obj,msg){new Assertion(obj,msg,assert.isFrozen,!0).to.be.frozen},assert.isNotFrozen=function(obj,msg){new Assertion(obj,msg,assert.isNotFrozen,!0).to.not.be.frozen},assert.isEmpty=function(val,msg){new Assertion(val,msg,assert.isEmpty,!0).to.be.empty},assert.isNotEmpty=function(val,msg){new Assertion(val,msg,assert.isNotEmpty,!0).to.not.be.empty},assert.containsSubset=function(val,exp,msg){new Assertion(val,msg).to.containSubset(exp)},assert.doesNotContainSubset=function(val,exp,msg){new Assertion(val,msg).to.not.containSubset(exp)};for(let[name,as]of[[`isOk`,`ok`],[`isNotOk`,`notOk`],[`throws`,`throw`],[`throws`,`Throw`],[`isExtensible`,`extensible`],[`isNotExtensible`,`notExtensible`],[`isSealed`,`sealed`],[`isNotSealed`,`notSealed`],[`isFrozen`,`frozen`],[`isNotFrozen`,`notFrozen`],[`isEmpty`,`empty`],[`isNotEmpty`,`notEmpty`],[`isCallable`,`isFunction`],[`isNotCallable`,`isNotFunction`],[`containsSubset`,`containSubset`]])assert[as]=assert[name];var used=[];function use(fn){let exports={use,AssertionError,util:utils_exports,config,expect,assert,Assertion,...should_exports};return~used.indexOf(fn)||(fn(exports,utils_exports),used.push(fn)),exports}__name(use,`use`);const plugin={serialize:(val,config,indentation,depth,refs,printer)=>{let name=val.getMockName(),nameString=name===`vi.fn()`?``:` ${name}`,callsString=``;if(val.mock.calls.length!==0){let indentationNext=indentation+config.indent;callsString=` {${config.spacingOuter}${indentationNext}"calls": ${printer(val.mock.calls,config,indentationNext,depth,refs)}${config.min?`, `:`,`}${config.spacingOuter}${indentationNext}"results": ${printer(val.mock.results,config,indentationNext,depth,refs)}${config.min?``:`,`}${config.spacingOuter}${indentation}}`}return`[MockFunction${nameString}]${callsString}`},test:val=>val&&!!val._isMockFunction},{DOMCollection,DOMElement,Immutable,ReactElement,ReactTestComponent,AsymmetricMatcher:AsymmetricMatcher$1}=plugins;let PLUGINS=[ReactTestComponent,ReactElement,DOMElement,DOMCollection,Immutable,AsymmetricMatcher$1,plugin];function addSerializer(plugin){PLUGINS=[plugin].concat(PLUGINS)}function getSerializers(){return PLUGINS}const lineSplitRE=/\r?\n/;function positionToOffset(source,lineNumber,columnNumber){let lines=source.split(lineSplitRE),nl=/\r\n/.test(source)?2:1,start=0;if(lineNumber>lines.length)return source.length;for(let i=0;i<lineNumber-1;i++)start+=lines[i].length+nl;return start+columnNumber}function offsetToLineNumber(source,offset){if(offset>source.length)throw Error(`offset is longer than source length! offset ${offset} > length ${source.length}`);let lines=source.split(lineSplitRE),nl=/\r\n/.test(source)?2:1,counted=0,line=0;for(;line<lines.length;line++){let lineLength=lines[line].length+nl;if(counted+lineLength>=offset)break;counted+=lineLength}return line+1}Object.freeze(()=>{}),globalThis.Event,(async()=>{}).constructor;function p(e=globalThis){let t=`unknown`,n=`unknown`;if(e.Bun||e.process&&e.process.versions?.bun){t=`bun`;let r=e.Bun?.version;if(r)n=r;else{let t=e.process?.versions?.bun;t&&(n=t)}}else e.Deno?(t=`deno`,n=e.Deno.version?.deno??`unknown`):e.process&&e.process.release?.name===`node`?(t=`node`,n=e.process.versions?.node??`unknown`):e.HermesInternal?(t=`hermes`,n=e.HermesInternal.getRuntimeProperties?.()[`OSS Release Version`]??`unknown`):m(e)&&e.navigator.userAgent===`Cloudflare-Workers`?t=`workerd`:m(e)&&e.navigator.userAgent.toLowerCase().startsWith(`quickjs-ng`)?(t=`quickjs-ng`,n=e.navigator.userAgent.split(`/`)[1]??`unknown`):typeof e.Netlify==`object`?t=`netlify`:typeof e.EdgeRuntime==`string`?t=`edge-light`:e.__lagon__?t=`lagon`:e.fastly?t=`fastly`:e.$262&&e.lockdown&&e.AsyncDisposableStack?t=`moddable`:e.d8?(t=`v8`,n=typeof e.version==`function`?e.version():`unknown`):e.inIon&&e.performance&&e.performance.mozMemory?t=`spidermonkey`:typeof e.$==`object`&&e.$!==null&&`IsHTMLDDA`in e.$?t=`jsc`:e.window&&e.navigator&&(t=`browser`);return{runtime:t,version:n}}function m(e=globalThis){return typeof e.navigator==`object`&&e.navigator!==null&&typeof e.navigator.userAgent==`string`}const{runtime:h,version:g}=p();globalThis.performance.now.bind(globalThis.performance),globalThis.process?.hrtime?.bigint.bind(globalThis.process?.hrtime),globalThis.Bun?.nanoseconds;var require_branding=__commonJSMin((exports=>{Object.defineProperty(exports,"__esModule",{value:!0})})),require_messages=__commonJSMin((exports=>{Object.defineProperty(exports,"__esModule",{value:!0})})),require_overloads=__commonJSMin((exports=>{Object.defineProperty(exports,"__esModule",{value:!0})})),require_utils=__commonJSMin((exports=>{Object.defineProperty(exports,"__esModule",{value:!0})}));__commonJSMin((exports=>{var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||(`get`in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports$1){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports$1,p)&&__createBinding(exports$1,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.expectTypeOf=void 0,__exportStar(require_branding(),exports),__exportStar(require_messages(),exports),__exportStar(require_overloads(),exports),__exportStar(require_utils(),exports);let fn=()=>!0;exports.expectTypeOf=_actual=>{let nonFunctionProperties=[`parameters`,`returns`,`resolves`,`not`,`items`,`constructorParameters`,`thisParameter`,`instance`,`guards`,`asserts`];function createBranded(){return{inspect:()=>!0,configure:()=>createBranded(),toEqualTypeOf:fn}}let obj={toBeAny:fn,toBeUnknown:fn,toBeNever:fn,toBeFunction:fn,toBeObject:fn,toBeArray:fn,toBeString:fn,toBeNumber:fn,toBeBoolean:fn,toBeVoid:fn,toBeSymbol:fn,toBeNull:fn,toBeUndefined:fn,toBeNullable:fn,toBeBigInt:fn,toMatchTypeOf:fn,toEqualTypeOf:fn,toBeConstructibleWith:fn,toMatchObjectType:fn,toExtend:fn,map:exports.expectTypeOf,toBeCallableWith:exports.expectTypeOf,extract:exports.expectTypeOf,exclude:exports.expectTypeOf,pick:exports.expectTypeOf,omit:exports.expectTypeOf,toHaveProperty:exports.expectTypeOf,parameter:exports.expectTypeOf,get branded(){return createBranded()}};return nonFunctionProperties.forEach(prop=>Object.defineProperty(obj,prop,{get:()=>(0,exports.expectTypeOf)({})})),obj}}))();var naturalCompare$1={exports:{}},hasRequiredNaturalCompare;function requireNaturalCompare(){if(hasRequiredNaturalCompare)return naturalCompare$1.exports;hasRequiredNaturalCompare=1;
|
|
152
|
+
/*
|
|
153
|
+
* @version 1.4.0
|
|
154
|
+
* @date 2015-10-26
|
|
155
|
+
* @stability 3 - Stable
|
|
156
|
+
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
|
|
157
|
+
* @license MIT License
|
|
158
|
+
*/
|
|
159
|
+
var naturalCompare=function(a,b){var i,codeA,codeB=1,posA=0,posB=0,alphabet=String.alphabet;function getCode(str,pos,code){if(code){for(i=pos;code=getCode(str,i),code<76&&code>65;)++i;return+str.slice(pos-1,i)}return code=alphabet&&alphabet.indexOf(str.charAt(pos)),code>-1?code+76:(code=str.charCodeAt(pos)||0,code<45||code>127?code:code<46?65:code<48?code-1:code<58?code+18:code<65?code-11:code<91?code+11:code<97?code-37:code<123?code+5:code-63)}if((a+=``)!=(b+=``)){for(;codeB;)if(codeA=getCode(a,posA++),codeB=getCode(b,posB++),codeA<76&&codeB<76&&codeA>66&&codeB>66&&(codeA=getCode(a,posA,posA),codeB=getCode(b,posB,posA=i),posB=i),codeA!=codeB)return codeA<codeB?-1:1}return 0};try{naturalCompare$1.exports=naturalCompare}catch{String.naturalCompare=naturalCompare}return naturalCompare$1.exports}var naturalCompare=getDefaultExportFromCjs(requireNaturalCompare());function testNameToKey(testName,count){return`${testName} ${count}`}function keyToTestName(key){if(!/ \d+$/.test(key))throw Error(`Snapshot keys must end with a number.`);return key.replace(/ \d+$/,``)}function evaluateSnapshotFile(filepath,content){let data=Object.create(null);try{Function(`exports`,content)(data)}catch(cause){throw Error(`Invalid snapshot file, please manually fix or delete it: ${filepath}`,{cause})}return data}function addExtraLineBreaks(string){return string.includes(`
|
|
160
|
+
`)?`\n${string}\n`:string}function removeExtraLineBreaks(string){return string.length>2&&string[0]===`
|
|
161
|
+
`&&string.endsWith(`
|
|
162
|
+
`)?string.slice(1,-1):string}function serialize(val,indent=2,formatOverrides={}){return normalizeNewlines(format$2(val,{escapeRegex:!0,indent,plugins:getSerializers(),printFunctionName:!1,...formatOverrides}))}function escapeBacktickString(str){return str.replace(/`|\\|\$\{/g,`\\$&`).replace(/\r/g,`\\r`)}function printBacktickString(str){return`\`${escapeBacktickString(str)}\``}function normalizeNewlines(string){return string.replace(/\r\n|\r/g,`
|
|
163
|
+
`)}async function saveSnapshotFile(environment,snapshotData,snapshotPath){let snapshots=Object.keys(snapshotData).sort(naturalCompare).map(key=>`exports[${printBacktickString(key)}] = ${printBacktickString(normalizeNewlines(snapshotData[key]))};`),content=`${environment.getHeader()}\n\n${snapshots.join(`
|
|
164
|
+
|
|
165
|
+
`)}\n`,oldContent=await environment.readSnapshotFile(snapshotPath);(oldContent==null||oldContent!==content)&&await environment.saveSnapshotFile(snapshotPath,content)}function deepMergeArray(target=[],source=[]){let mergedOutput=Array.from(target);return source.forEach((sourceElement,index)=>{let targetElement=mergedOutput[index];Array.isArray(target[index])?mergedOutput[index]=deepMergeArray(target[index],sourceElement):isObject(targetElement)?mergedOutput[index]=deepMergeSnapshot(target[index],sourceElement):mergedOutput[index]=sourceElement}),mergedOutput}function deepMergeSnapshot(target,source){if(isObject(target)&&isObject(source)){let mergedOutput={...target};return Object.keys(source).forEach(key=>{isObject(source[key])&&!source[key].$$typeof?key in target?mergedOutput[key]=deepMergeSnapshot(target[key],source[key]):Object.assign(mergedOutput,{[key]:source[key]}):Array.isArray(source[key])?mergedOutput[key]=deepMergeArray(target[key],source[key]):Object.assign(mergedOutput,{[key]:source[key]})}),mergedOutput}return Array.isArray(target)&&Array.isArray(source)?deepMergeArray(target,source):target}var DefaultMap=class extends Map{defaultFn;constructor(defaultFn,entries){super(entries),this.defaultFn=defaultFn}get(key){return this.has(key)||this.set(key,this.defaultFn(key)),super.get(key)}},CounterMap=class extends DefaultMap{constructor(){super(()=>0)}_total;valueOf(){return this._total=this.total()}increment(key){this._total!==void 0&&this._total++,this.set(key,this.get(key)+1)}total(){if(this._total!==void 0)return this._total;let total=0;for(let x of this.values())total+=x;return total}};function memo(fn){let cache=new Map;return arg=>(cache.has(arg)||cache.set(arg,fn(arg)),cache.get(arg))}async function saveInlineSnapshots(environment,snapshots){let MagicString=(await import(`./dist-Bcb677YG.mjs`)).default,files=new Set(snapshots.map(i=>i.file));await Promise.all(Array.from(files).map(async file=>{let snaps=snapshots.filter(i=>i.file===file),code=await environment.readSnapshotFile(file);if(code==null)throw Error(`cannot read ${file} when saving inline snapshot`);let s=new MagicString(code);for(let snap of snaps)replaceInlineSnap(code,s,positionToOffset(code,snap.line,snap.column),snap.snapshot,snap.assertionName);let transformed=s.toString();transformed!==code&&await environment.saveSnapshotFile(file,transformed)}))}const defaultStartObjectRegex=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function escapeRegExp(s){return s.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}const buildStartObjectRegex=memo(assertionName=>{let replaced=defaultStartObjectRegex.source.replace(`toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot`,escapeRegExp(assertionName));return new RegExp(replaced)});function replaceObjectSnap(code,s,index,newSnap,assertionName){let _code=code.slice(index),startMatch=(assertionName?buildStartObjectRegex(assertionName):defaultStartObjectRegex).exec(_code);if(!startMatch)return!1;_code=_code.slice(startMatch.index);let callEnd=getCallLastIndex(_code);if(callEnd===null)return!1;callEnd+=index+startMatch.index;let shapeEnd=getObjectShapeEndIndex(code,index+startMatch.index+startMatch[0].length),snap=`, ${prepareSnapString(newSnap,code,index)}`;return shapeEnd===callEnd?s.appendLeft(callEnd,snap):s.overwrite(shapeEnd,callEnd,snap),!0}function getObjectShapeEndIndex(code,index){let startBraces=1,endBraces=0;for(;startBraces!==endBraces&&index<code.length;){let s=code[index++];s===`{`?startBraces++:s===`}`&&endBraces++}return index}function prepareSnapString(snap,source,index){let lineNumber=offsetToLineNumber(source,index),indent=source.split(lineSplitRE)[lineNumber-1].match(/^\s*/)[0]||``,indentNext=indent.includes(` `)?`${indent}\t`:`${indent} `,lines=snap.trim().replace(/\\/g,`\\\\`).split(/\n/g);return lines.length<=1?`\`${lines.join(`
|
|
166
|
+
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}\``:`\`\n${lines.map(i=>i?indentNext+i:``).join(`
|
|
167
|
+
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}\n${indent}\``}const defaultMethodNames=[`toMatchInlineSnapshot`,`toThrowErrorMatchingInlineSnapshot`];function getCodeStartingAtIndex(code,index,methodNames){for(let name of methodNames){let adjusted=index-name.length;if(adjusted>=0&&code.slice(adjusted,index)===name)return{code:code.slice(adjusted),index:adjusted}}return{code:code.slice(index),index}}const defaultStartRegex=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/,buildStartRegex=memo(assertionName=>{let replaced=defaultStartRegex.source.replace(`toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot`,escapeRegExp(assertionName));return new RegExp(replaced)});function replaceInlineSnap(code,s,currentIndex,newSnap,assertionName){let{code:codeStartingAtIndex,index}=getCodeStartingAtIndex(code,currentIndex,assertionName?[assertionName]:defaultMethodNames),startMatch=(assertionName?buildStartRegex(assertionName):defaultStartRegex).exec(codeStartingAtIndex),firstKeywordMatch=(assertionName?new RegExp(escapeRegExp(assertionName)):/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/).exec(codeStartingAtIndex);if(!startMatch||startMatch.index!==firstKeywordMatch?.index)return replaceObjectSnap(code,s,index,newSnap,assertionName);let quote=startMatch[1],startIndex=index+startMatch.index+startMatch[0].length,snapString=prepareSnapString(newSnap,code,index);if(quote===`)`)return s.appendRight(startIndex-1,snapString),!0;let endMatch=RegExp(`(?:^|[^\\\\])${quote}`).exec(code.slice(startIndex));if(!endMatch)return!1;let endIndex=startIndex+endMatch.index+endMatch[0].length;return s.overwrite(startIndex-1,endIndex,snapString),!0}const INDENTATION_REGEX=/^([^\S\n]*)\S/m;function stripSnapshotIndentation(inlineSnapshot){let match=inlineSnapshot.match(INDENTATION_REGEX);if(!match||!match[1])return inlineSnapshot;let indentation=match[1],lines=inlineSnapshot.split(/\n/g);if(lines.length<=2||lines[0].trim()!==``||lines.at(-1)?.trim()!==``)return inlineSnapshot;for(let i=1;i<lines.length-1;i++)if(lines[i]!==``){if(lines[i].indexOf(indentation)!==0)return inlineSnapshot;lines[i]=lines[i].substring(indentation.length)}return lines[lines.length-1]=``,inlineSnapshot=lines.join(`
|
|
168
|
+
`),inlineSnapshot}async function saveRawSnapshots(environment,snapshots){await Promise.all(snapshots.map(async snap=>{snap.readonly||await environment.saveSnapshotFile(snap.file,snap.snapshot)}))}function isSameStackPosition(x,y){return x.file===y.file&&x.column===y.column&&x.line===y.line}var SnapshotState=class SnapshotState{testFilePath;snapshotPath;_counters=new CounterMap;_dirty;_updateSnapshot;_snapshotData;_initialData;_inlineSnapshots;_inlineSnapshotStacks;_testIdToKeys=new DefaultMap(()=>[]);_rawSnapshots;_rawSnapshotFiles=new Set;_uncheckedKeys;_snapshotFormat;_environment;_fileExists;expand;_added=new CounterMap;_matched=new CounterMap;_unmatched=new CounterMap;_updated=new CounterMap;get added(){return this._added}set added(value){this._added._total=value}get matched(){return this._matched}set matched(value){this._matched._total=value}get unmatched(){return this._unmatched}set unmatched(value){this._unmatched._total=value}get updated(){return this._updated}set updated(value){this._updated._total=value}constructor(testFilePath,snapshotPath,fileData,options){this.testFilePath=testFilePath,this.snapshotPath=snapshotPath;let data=fileData??Object.create(null);this._fileExists=fileData!=null;let update=options.updateSnapshot,dirty=(update===`all`||update===`new`)&&fileData!=null;this._initialData={...data},this._snapshotData={...data},this._dirty=dirty,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.expand=options.expand||!1,this._updateSnapshot=options.updateSnapshot,this._snapshotFormat={printBasicPrototype:!1,escapeString:!1,maxOutputLength:2**27,...options.snapshotFormat},this._environment=options.snapshotEnvironment}static async create(testFilePath,options){let environment=options.snapshotEnvironment,snapshotPath=await environment.resolvePath(testFilePath),fileData;if(environment.readSnapshotFileData)fileData=await environment.readSnapshotFileData(snapshotPath);else{let content=await environment.readSnapshotFile(snapshotPath);fileData=content==null?null:evaluateSnapshotFile(snapshotPath,content)}return new SnapshotState(testFilePath,snapshotPath,fileData,options)}get snapshotUpdateState(){return this._updateSnapshot}get environment(){return this._environment}markSnapshotsAsCheckedForTest(testName){this._uncheckedKeys.forEach(uncheckedKey=>{uncheckedKey.startsWith(testName)&&/^ \d+$|^ > /.test(uncheckedKey.slice(testName.length))&&this._uncheckedKeys.delete(uncheckedKey)})}clearTest(testId){this._inlineSnapshots=this._inlineSnapshots.filter(s=>s.testId!==testId),this._inlineSnapshotStacks=this._inlineSnapshotStacks.filter(s=>s.testId!==testId);for(let key of this._testIdToKeys.get(testId)){let name=keyToTestName(key),count=this._counters.get(name);count>0&&((key in this._snapshotData||key in this._initialData)&&(this._snapshotData[key]=this._initialData[key]),this._counters.set(name,count-1))}this._testIdToKeys.delete(testId),this.added.delete(testId),this.updated.delete(testId),this.matched.delete(testId),this.unmatched.delete(testId)}_inferInlineSnapshotStack(stacks){let promiseIndex=stacks.findIndex(i=>i.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(promiseIndex!==-1)return stacks[promiseIndex+3];let pollChainIndex=stacks.findIndex(i=>i.method.match(/__VITEST_POLL_CHAIN__/));if(pollChainIndex!==-1)return stacks[pollChainIndex+1];for(let i=0;i<stacks.length;i++){let match=stacks[i].method.match(/__INLINE_SNAPSHOT_OFFSET_(\d+)__/);if(match)return stacks[i+Number(match[1])]??null}let customMatcherIndex=stacks.findIndex(i=>i.method.includes(`__VITEST_EXTEND_ASSERTION__`));if(customMatcherIndex!==-1)return stacks[customMatcherIndex+3]??null;let stackIndex=stacks.findIndex(i=>i.method.includes(`__INLINE_SNAPSHOT__`));return stackIndex===-1?null:stacks[stackIndex+2]}_addSnapshot(key,receivedSerialized,options){this._dirty=!0,options.stack?this._inlineSnapshots.push({...options.stack,snapshot:receivedSerialized,testId:options.testId,assertionName:options.assertionName}):options.rawSnapshot?this._rawSnapshots.push({...options.rawSnapshot,snapshot:receivedSerialized}):this._snapshotData[key]=receivedSerialized}_resolveKey(testId,testName,key){this._counters.increment(testName);let count=this._counters.get(testName);return key||=testNameToKey(testName,count),this._testIdToKeys.get(testId).push(key),{key,count}}_resolveInlineStack(options){let{testId,snapshot,assertionName,error}=options,stacks=parseErrorStacktrace(error,{ignoreStackEntries:[]}),_stack=this._inferInlineSnapshotStack(stacks);if(!_stack){let message=stacks.map(s=>` ${s.file}:${s.line}:${s.column}${s.method?` (${s.method})`:``}`).join(`
|
|
169
|
+
`);throw Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.\n${message}`)}let stack=this.environment.processStackTrace?.(_stack)||_stack;stack.column--;let snapshotsWithSameStack=this._inlineSnapshotStacks.filter(s=>isSameStackPosition(s,stack));if(snapshotsWithSameStack.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(s=>!isSameStackPosition(s,stack));let differentSnapshot=snapshotsWithSameStack.find(s=>s.snapshot!==snapshot);if(differentSnapshot)throw Object.assign(Error(`${assertionName} with different snapshots cannot be called at the same location`),{actual:snapshot,expected:differentSnapshot.snapshot})}return this._inlineSnapshotStacks.push({...stack,testId,snapshot}),stack}_reconcile(opts){return opts.hasSnapshot&&this._updateSnapshot===`all`||(!opts.hasSnapshot||!opts.snapshotIsPersisted)&&(this._updateSnapshot===`new`||this._updateSnapshot===`all`)?(this._updateSnapshot===`all`?opts.pass?this.matched.increment(opts.testId):(opts.hasSnapshot?this.updated.increment(opts.testId):this.added.increment(opts.testId),this._addSnapshot(opts.key,opts.addValue,{stack:opts.stack,testId:opts.testId,rawSnapshot:opts.rawSnapshot,assertionName:opts.assertionName})):(this._addSnapshot(opts.key,opts.addValue,{stack:opts.stack,testId:opts.testId,rawSnapshot:opts.rawSnapshot,assertionName:opts.assertionName}),this.added.increment(opts.testId)),{actual:``,count:opts.count,expected:``,key:opts.key,pass:!0}):opts.pass?(this.matched.increment(opts.testId),{actual:``,count:opts.count,expected:``,key:opts.key,pass:!0}):(this.unmatched.increment(opts.testId),{actual:opts.actualDisplay,count:opts.count,expected:opts.expectedDisplay,key:opts.key,pass:!1})}async save(){let hasExternalSnapshots=Object.keys(this._snapshotData).length,hasInlineSnapshots=this._inlineSnapshots.length,hasRawSnapshots=this._rawSnapshots.length,isEmpty=!hasExternalSnapshots&&!hasInlineSnapshots&&!hasRawSnapshots,status={deleted:!1,saved:!1};return(this._dirty||this._uncheckedKeys.size)&&!isEmpty?(hasExternalSnapshots&&(await saveSnapshotFile(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=!0),hasInlineSnapshots&&await saveInlineSnapshots(this._environment,this._inlineSnapshots),hasRawSnapshots&&await saveRawSnapshots(this._environment,this._rawSnapshots),status.saved=!0):!hasExternalSnapshots&&this._fileExists&&(this._updateSnapshot===`all`&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=!1),status.deleted=!0),status}getUncheckedCount(){return this._uncheckedKeys.size||0}getUncheckedKeys(){return Array.from(this._uncheckedKeys)}removeUncheckedKeys(){this._updateSnapshot===`all`&&this._uncheckedKeys.size&&(this._dirty=!0,this._uncheckedKeys.forEach(key=>delete this._snapshotData[key]),this._uncheckedKeys.clear())}probeExpectedSnapshot(options){let count=this._counters.get(options.testName)+1,key=testNameToKey(options.testName,count);return{key,count,data:options?.isInline?options.inlineSnapshot:this._snapshotData[key],markAsChecked:()=>{this._counters.increment(options.testName),this._testIdToKeys.get(options.testId).push(key),this._uncheckedKeys.delete(key)}}}match({testId,testName,received,key,inlineSnapshot,isInline,error,rawSnapshot,assertionName}){let resolved=this._resolveKey(testId,testName,key);key=resolved.key;let count=resolved.count;isInline&&this._snapshotData[key]!==void 0||this._uncheckedKeys.delete(key);let receivedSerialized=rawSnapshot&&typeof received==`string`?received:serialize(received,void 0,this._snapshotFormat);rawSnapshot||(receivedSerialized=addExtraLineBreaks(receivedSerialized)),rawSnapshot&&(this._rawSnapshotFiles.add(rawSnapshot.file),rawSnapshot.content&&/\r\n/.test(rawSnapshot.content)&&!/\r\n/.test(receivedSerialized)&&(rawSnapshot.content=normalizeNewlines(rawSnapshot.content)));let expected=isInline?inlineSnapshot:rawSnapshot?rawSnapshot.content:this._snapshotData[key],expectedTrimmed=rawSnapshot?expected:expected?.trim(),pass=expectedTrimmed===(rawSnapshot?receivedSerialized:receivedSerialized.trim()),hasSnapshot=expected!==void 0,snapshotIsPersisted=isInline||this._fileExists||rawSnapshot&&rawSnapshot.content!=null;pass&&!isInline&&!rawSnapshot&&(this._snapshotData[key]=receivedSerialized);let stack=isInline?this._resolveInlineStack({testId,snapshot:receivedSerialized,assertionName:assertionName||`toMatchInlineSnapshot`,error:error||Error(`snapshot`)}):void 0;return this._reconcile({testId,key,count,pass,hasSnapshot,snapshotIsPersisted:!!snapshotIsPersisted,addValue:receivedSerialized,actualDisplay:rawSnapshot?receivedSerialized:removeExtraLineBreaks(receivedSerialized),expectedDisplay:expectedTrimmed===void 0?void 0:rawSnapshot?expectedTrimmed:removeExtraLineBreaks(expectedTrimmed),stack,rawSnapshot,assertionName})}processDomainSnapshot({testId,received,expectedSnapshot,matchResult,isInline,error,assertionName}){let stack=isInline?this._resolveInlineStack({testId,snapshot:received,assertionName,error:error||Error(`STACK_TRACE_ERROR`)}):void 0,actualResolved=matchResult?.resolved??received,expectedResolved=matchResult?.expected??expectedSnapshot.data;return this._reconcile({testId,key:expectedSnapshot.key,count:expectedSnapshot.count,pass:matchResult?.pass??!1,hasSnapshot:expectedSnapshot.data!==void 0,snapshotIsPersisted:isInline?!0:this._fileExists,addValue:actualResolved,actualDisplay:removeExtraLineBreaks(actualResolved),expectedDisplay:expectedResolved===void 0?void 0:removeExtraLineBreaks(expectedResolved),stack,assertionName})}getSnapshotFiles(){let files=Array.from(this._rawSnapshotFiles);return(this._fileExists||Object.keys(this._snapshotData).length)&&files.unshift(this.snapshotPath),files}async pack(){let snapshot={filepath:this.testFilePath,added:0,fileDeleted:!1,matched:0,unchecked:0,uncheckedKeys:[],unmatched:0,updated:0},uncheckedCount=this.getUncheckedCount(),uncheckedKeys=this.getUncheckedKeys();uncheckedCount&&this.removeUncheckedKeys();let status=await this.save();return snapshot.fileDeleted=status.deleted,snapshot.added=this.added.total(),snapshot.matched=this.matched.total(),snapshot.unmatched=this.unmatched.total(),snapshot.updated=this.updated.total(),snapshot.unchecked=status.deleted?0:uncheckedCount,snapshot.uncheckedKeys=Array.from(uncheckedKeys),snapshot}};function createMismatchError(message,expand,actual,expected){let error=Error(message);return Object.defineProperty(error,"actual",{value:actual,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(error,"expected",{value:expected,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(error,"diffOptions",{value:{expand}}),error}var SnapshotClient=class{options;snapshotStateMap=new Map;constructor(options={}){this.options=options}async setup(filepath,options){this.snapshotStateMap.has(filepath)||this.snapshotStateMap.set(filepath,await SnapshotState.create(filepath,options))}async finish(filepath){let result=await this.getSnapshotState(filepath).pack();return this.snapshotStateMap.delete(filepath),result}skipTest(filepath,testName){this.getSnapshotState(filepath).markSnapshotsAsCheckedForTest(testName)}clearTest(filepath,testId){this.getSnapshotState(filepath).clearTest(testId)}getSnapshotState(filepath){let state=this.snapshotStateMap.get(filepath);if(!state)throw Error(`The snapshot state for '${filepath}' is not found. Did you call 'SnapshotClient.setup()'?`);return state}match(options){let{filepath,name,testId=name,message,isInline=!1,properties,inlineSnapshot,error,errorMessage,rawSnapshot,assertionName}=options,{received}=options;if(!filepath)throw Error(`Snapshot cannot be used outside of test`);let snapshotState=this.getSnapshotState(filepath);if(rawSnapshot?.file===snapshotState.snapshotPath)throw Error(`File snapshot cannot use the same path as the test snapshot file: ${rawSnapshot.file}`);let testName=[name,...message?[message]:[]].join(` > `),expectedSnapshot=snapshotState.probeExpectedSnapshot({testName,testId,isInline,inlineSnapshot});if(typeof properties==`object`){if(typeof received!=`object`||!received)throw expectedSnapshot.markAsChecked(),Error(`Received value must be an object when the matcher has properties`);let propertiesPass;try{propertiesPass=this.options.isEqual?.(received,properties)??!1}catch(err){throw expectedSnapshot.markAsChecked(),err}if(!propertiesPass)return expectedSnapshot.markAsChecked(),{pass:!1,message:()=>errorMessage||`Snapshot properties mismatched`,actual:received,expected:properties};received=deepMergeSnapshot(received,properties)}let{actual,expected,key,pass}=snapshotState.match({testId,testName,received,isInline,error,inlineSnapshot,rawSnapshot,assertionName});return{pass,message:()=>`Snapshot \`${key||`unknown`}\` mismatched`,actual:rawSnapshot?actual:actual?.trim(),expected:rawSnapshot?expected:expected?.trim()}}assert(options){let result=this.match(options);if(!result.pass){let snapshotState=this.getSnapshotState(options.filepath);throw createMismatchError(result.message(),snapshotState.expand,result.actual,result.expected)}}matchDomain(options){let{received,filepath,name,testId=name,message,adapter,isInline=!1,inlineSnapshot,error}=options;if(!filepath)throw Error(`Snapshot cannot be used outside of test`);let captured=adapter.capture(received),rendered=adapter.render(captured),snapshotState=this.getSnapshotState(filepath),testName=[name,...message?[message]:[]].join(` > `),expectedSnapshot=snapshotState.probeExpectedSnapshot({testName,testId,isInline,inlineSnapshot});expectedSnapshot.markAsChecked();let matchResult=expectedSnapshot.data===void 0?void 0:adapter.match(captured,adapter.parseExpected(expectedSnapshot.data)),{actual,expected,key,pass}=snapshotState.processDomainSnapshot({testId,received:rendered,expectedSnapshot,matchResult,isInline,error,assertionName:options.assertionName});return{pass,message:()=>`Snapshot \`${key}\` mismatched`,actual:actual?.trim(),expected:expected?.trim()}}async pollMatchDomain(options){let{poll,filepath,name,testId=name,message,adapter,isInline=!1,inlineSnapshot,error,timeout=1e3,interval=50}=options;if(!filepath)throw Error(`Snapshot cannot be used outside of test`);let snapshotState=this.getSnapshotState(filepath),testName=[name,...message?[message]:[]].join(` > `),expectedSnapshot=snapshotState.probeExpectedSnapshot({testName,testId,isInline,inlineSnapshot}),reference=expectedSnapshot.data!==void 0&&snapshotState.snapshotUpdateState!==`all`?adapter.parseExpected(expectedSnapshot.data):void 0,timeoutController=new AbortController,stableResult=await getStableSnapshot({adapter,poll:()=>poll({signal:timeoutController.signal}),interval,timedOut:timeout>0?new Promise(r=>setTimeout(()=>{timeoutController.abort(),r()},timeout)):void 0,match:reference?captured=>adapter.match(captured,reference).pass:void 0});if(expectedSnapshot.markAsChecked(),stableResult?.rendered===void 0){if(stableResult?.lastPollError)throw stableResult.lastPollError;return{pass:!1,message:()=>`poll() did not produce a stable snapshot within the timeout`}}let matchResult=expectedSnapshot.data===void 0?void 0:adapter.match(stableResult.captured,adapter.parseExpected(expectedSnapshot.data)),{actual,expected,key,pass}=snapshotState.processDomainSnapshot({testId,received:stableResult.rendered,expectedSnapshot,matchResult,isInline,error,assertionName:options.assertionName});return{pass,message:()=>`Snapshot \`${key}\` mismatched`,actual:actual?.trim(),expected:expected?.trim()}}async assertRaw(options){if(!options.rawSnapshot)throw Error(`Raw snapshot is required`);let{filepath,rawSnapshot}=options;if(rawSnapshot.content==null){if(!filepath)throw Error(`Snapshot cannot be used outside of test`);let snapshotState=this.getSnapshotState(filepath);options.filepath||=filepath,rawSnapshot.file=await snapshotState.environment.resolveRawPath(filepath,rawSnapshot.file),rawSnapshot.content=await snapshotState.environment.readSnapshotFile(rawSnapshot.file)??void 0}return this.assert(options)}clear(){this.snapshotStateMap.clear()}};async function getStableSnapshot({adapter,poll,interval,timedOut,match}){let lastRendered,lastPollError,lastStable;for(;;){try{let pollResult=await raceWith$1(Promise.resolve(poll()),timedOut);if(!pollResult.ok)break;let captured=adapter.capture(pollResult.value),rendered=adapter.render(captured);if(lastRendered!==void 0&&rendered===lastRendered){if(lastStable={captured,rendered},!match||match(captured))break}else lastRendered=rendered,lastStable=void 0}catch(pollError){lastRendered=void 0,lastStable=void 0,lastPollError=pollError}if(!(await raceWith$1(new Promise(r=>setTimeout(r,interval)),timedOut)).ok)break}return{...lastStable,lastPollError}}function raceWith$1(promise,other){let left=promise.then(value=>({ok:!0,value}));return other?Promise.race([left,other.then(value=>({ok:!1,value}))]):left}const ChaiStyleAssertions=(chai,utils)=>{function defProperty(name,delegateTo){utils.addProperty(chai.Assertion.prototype,name,function(){let jestMethod=chai.Assertion.prototype[delegateTo];if(!jestMethod)throw Error(`Cannot delegate to ${String(delegateTo)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return jestMethod.call(this)})}function defPropertyWithArgs(name,delegateTo,...args){utils.addProperty(chai.Assertion.prototype,name,function(){let jestMethod=chai.Assertion.prototype[delegateTo];if(!jestMethod)throw Error(`Cannot delegate to ${String(delegateTo)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return jestMethod.call(this,...args)})}function defMethod(name,delegateTo){utils.addMethod(chai.Assertion.prototype,name,function(...args){let jestMethod=chai.Assertion.prototype[delegateTo];if(!jestMethod)throw Error(`Cannot delegate to ${String(delegateTo)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return jestMethod.call(this,...args)})}defProperty(`called`,`toHaveBeenCalled`),defProperty(`calledOnce`,`toHaveBeenCalledOnce`),defPropertyWithArgs(`calledTwice`,`toHaveBeenCalledTimes`,2),defPropertyWithArgs(`calledThrice`,`toHaveBeenCalledTimes`,3),defMethod(`callCount`,`toHaveBeenCalledTimes`),defMethod(`calledWith`,`toHaveBeenCalledWith`),defMethod(`calledOnceWith`,`toHaveBeenCalledExactlyOnceWith`),defMethod(`lastCalledWith`,`toHaveBeenLastCalledWith`),defMethod(`nthCalledWith`,`toHaveBeenNthCalledWith`),defMethod(`returned`,`toHaveReturnedWith`),defMethod(`returnedWith`,`toHaveReturnedWith`),defMethod(`returnedTimes`,`toHaveReturnedTimes`),defMethod(`lastReturnedWith`,`toHaveLastReturnedWith`),defMethod(`nthReturnedWith`,`toHaveNthReturnedWith`),defMethod(`calledBefore`,`toHaveBeenCalledBefore`),defMethod(`calledAfter`,`toHaveBeenCalledAfter`)},MATCHERS_OBJECT=Symbol.for(`matchers-object`),JEST_MATCHERS_OBJECT=Symbol.for(`$$jest-matchers-object`),GLOBAL_EXPECT=Symbol.for(`expect-global`),ASYMMETRIC_MATCHERS_OBJECT=Symbol.for(`asymmetric-matchers-object`),customMatchers={toSatisfy(actual,expected,message){let{printReceived,printExpected,matcherHint}=this.utils,pass=expected(actual);return{pass,message:()=>pass?`\
|
|
170
|
+
${matcherHint(`.not.toSatisfy`,`received`,``)}
|
|
171
|
+
|
|
172
|
+
Expected value to not satisfy:
|
|
173
|
+
${message||printExpected(expected)}
|
|
174
|
+
Received:
|
|
175
|
+
${printReceived(actual)}`:`\
|
|
176
|
+
${matcherHint(`.toSatisfy`,`received`,``)}
|
|
177
|
+
|
|
178
|
+
Expected value to satisfy:
|
|
179
|
+
${message||printExpected(expected)}
|
|
180
|
+
|
|
181
|
+
Received:
|
|
182
|
+
${printReceived(actual)}`}},toBeOneOf(actual,expected){let{equals,customTesters}=this,{printReceived,printExpected,matcherHint,iterableEquality}=this.utils,testers=[...customTesters,iterableEquality],pass;if(Array.isArray(expected))pass=expected.length===0||expected.some(item=>equals(item,actual,testers));else if(expected instanceof Set)pass=expected.size===0||expected.has(actual)||[...expected].some(item=>equals(item,actual,testers));else throw TypeError(`You must provide an array or set to ${matcherHint(`.toBeOneOf`)}, not '${typeof expected}'.`);return{pass,message:()=>pass?`\
|
|
183
|
+
${matcherHint(`.not.toBeOneOf`,`received`,``)}
|
|
184
|
+
|
|
185
|
+
Expected value to not be one of:
|
|
186
|
+
${printExpected(expected)}
|
|
187
|
+
Received:
|
|
188
|
+
${printReceived(actual)}`:`\
|
|
189
|
+
${matcherHint(`.toBeOneOf`,`received`,``)}
|
|
190
|
+
|
|
191
|
+
Expected value to be one of:
|
|
192
|
+
${printExpected(expected)}
|
|
193
|
+
|
|
194
|
+
Received:
|
|
195
|
+
${printReceived(actual)}`}}},EXPECTED_COLOR=$.green,RECEIVED_COLOR=$.red,INVERTED_COLOR=$.inverse,BOLD_WEIGHT=$.bold,DIM_COLOR=$.dim;function matcherHint(matcherName,received=`received`,expected=`expected`,options={}){let{comment=``,isDirectExpectCall=!1,isNot=!1,promise=``,secondArgument=``,expectedColor=EXPECTED_COLOR,receivedColor=RECEIVED_COLOR,secondArgumentColor=EXPECTED_COLOR}=options,hint=``,dimString=`expect`;return!isDirectExpectCall&&received!==``&&(hint+=DIM_COLOR(`${dimString}(`)+receivedColor(received),dimString=`)`),promise!==``&&(hint+=DIM_COLOR(`${dimString}.`)+promise,dimString=``),isNot&&(hint+=`${DIM_COLOR(`${dimString}.`)}not`,dimString=``),matcherName.includes(`.`)?dimString+=matcherName:(hint+=DIM_COLOR(`${dimString}.`)+matcherName,dimString=``),expected===``?dimString+=`()`:(hint+=DIM_COLOR(`${dimString}(`)+expectedColor(expected),secondArgument&&(hint+=DIM_COLOR(`, `)+secondArgumentColor(secondArgument)),dimString=`)`),comment!==``&&(dimString+=` // ${comment}`),dimString!==``&&(hint+=DIM_COLOR(dimString)),hint}function replaceTrailingSpaces(text){return text.replace(/\s+$/gm,spaces=>`·`.repeat(spaces.length))}function printReceived(object){return RECEIVED_COLOR(replaceTrailingSpaces(stringify(object)))}function printExpected(value){return EXPECTED_COLOR(replaceTrailingSpaces(stringify(value)))}function getMatcherUtils(){return{EXPECTED_COLOR,RECEIVED_COLOR,INVERTED_COLOR,BOLD_WEIGHT,DIM_COLOR,diff,matcherHint,printReceived,printExpected,printDiffOrStringify,printWithType}}function printWithType(name,value,print){let type=getType$1(value);return(type!==`null`&&type!==`undefined`?`${name} has type: ${type}\n`:``)+`${name} has value: ${print(value)}`}function addCustomEqualityTesters(newTesters){if(!Array.isArray(newTesters))throw TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${getType$1(newTesters)}"`);globalThis[JEST_MATCHERS_OBJECT].customEqualityTesters.push(...newTesters)}function getCustomEqualityTesters(){return globalThis[JEST_MATCHERS_OBJECT].customEqualityTesters}function equals(a,b,customTesters,strictCheck){return customTesters||=[],eq(a,b,[],[],customTesters,strictCheck?hasKey:hasDefinedKey)}function isAsymmetric(obj){return!!obj&&typeof obj==`object`&&`asymmetricMatch`in obj&&isA(`Function`,obj.asymmetricMatch)}function asymmetricMatch(a,b,customTesters){let asymmetricA=isAsymmetric(a),asymmetricB=isAsymmetric(b);if(asymmetricA&&asymmetricB)return;let testers=customTesters.filter(tester=>!isSubsetEqualityTester(tester));if(asymmetricA)return a.asymmetricMatch(b,testers);if(asymmetricB)return b.asymmetricMatch(a,testers)}function isError(value){if(typeof Error.isError==`function`)return Error.isError(value);switch(Object.prototype.toString.call(value)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:return!0;default:return value instanceof Error}}function eq(a,b,aStack,bStack,customTesters,hasKey){let result=!0,asymmetricResult=asymmetricMatch(a,b,customTesters);if(asymmetricResult!==void 0)return asymmetricResult;let testerContext={equals};for(let i=0;i<customTesters.length;i++){let customTesterResult=customTesters[i].call(testerContext,a,b,customTesters);if(customTesterResult!==void 0)return customTesterResult}if(typeof URL==`function`&&a instanceof URL&&b instanceof URL)return a.href===b.href;if(Object.is(a,b))return!0;if(a===null||b===null)return a===b;let className=Object.prototype.toString.call(a);if(className!==Object.prototype.toString.call(b))return!1;switch(className){case`[object Boolean]`:case`[object String]`:case`[object Number]`:return typeof a==typeof b?typeof a!=`object`&&typeof b!=`object`?Object.is(a,b):Object.is(a.valueOf(),b.valueOf()):!1;case`[object Date]`:{let numA=+a,numB=+b;return numA===numB||Number.isNaN(numA)&&Number.isNaN(numB)}case`[object RegExp]`:return a.source===b.source&&a.flags===b.flags;case`[object Temporal.Instant]`:case`[object Temporal.ZonedDateTime]`:case`[object Temporal.PlainDateTime]`:case`[object Temporal.PlainDate]`:case`[object Temporal.PlainTime]`:case`[object Temporal.PlainYearMonth]`:case`[object Temporal.PlainMonthDay]`:return a.equals(b);case`[object Temporal.Duration]`:return a.toString()===b.toString()}if(typeof a!=`object`||typeof b!=`object`)return!1;if(isDomNode(a)&&isDomNode(b))return a.isEqualNode(b);let length=aStack.length;for(;length--;)if(aStack[length]===a)return bStack[length]===b;else if(bStack[length]===b)return!1;if(aStack.push(a),bStack.push(b),className===`[object Array]`&&a.length!==b.length)return!1;if(isError(a)&&isError(b))try{return isErrorEqual(a,b,aStack,bStack,customTesters,hasKey)}finally{aStack.pop(),bStack.pop()}let aKeys=keys(a,hasKey),key,size=aKeys.length;if(keys(b,hasKey).length!==size)return!1;for(;size--;)if(key=aKeys[size],result=hasKey(b,key)&&eq(a[key],b[key],aStack,bStack,customTesters,hasKey),!result)return!1;return aStack.pop(),bStack.pop(),result}function isErrorEqual(a,b,aStack,bStack,customTesters,hasKey){let result=Object.prototype.toString.call(a)===Object.prototype.toString.call(b)&&a.name===b.name&&a.message===b.message;return b.cause!==void 0&&(result&&=eq(a.cause,b.cause,aStack,bStack,customTesters,hasKey)),a instanceof AggregateError&&b instanceof AggregateError&&(result&&=eq(a.errors,b.errors,aStack,bStack,customTesters,hasKey)),result&&=eq({...a},{...b},aStack,bStack,customTesters,hasKey),result}function keys(obj,hasKey){let keys=[];for(let key in obj)hasKey(obj,key)&&keys.push(key);return keys.concat(Object.getOwnPropertySymbols(obj).filter(symbol=>Object.getOwnPropertyDescriptor(obj,symbol).enumerable))}function hasDefinedKey(obj,key){return hasKey(obj,key)&&obj[key]!==void 0}function hasKey(obj,key){return Object.hasOwn(obj,key)}function isA(typeName,value){return Object.prototype.toString.apply(value)===`[object ${typeName}]`}function isDomNode(obj){return typeof obj==`object`&&!!obj&&`nodeType`in obj&&typeof obj.nodeType==`number`&&`nodeName`in obj&&typeof obj.nodeName==`string`&&`isEqualNode`in obj&&typeof obj.isEqualNode==`function`}const IS_KEYED_SENTINEL=`@@__IMMUTABLE_KEYED__@@`,IS_SET_SENTINEL=`@@__IMMUTABLE_SET__@@`,IS_ORDERED_SENTINEL=`@@__IMMUTABLE_ORDERED__@@`;function isImmutableUnorderedKeyed(maybeKeyed){return!!(maybeKeyed&&maybeKeyed[IS_KEYED_SENTINEL]&&!maybeKeyed[IS_ORDERED_SENTINEL])}function isImmutableUnorderedSet(maybeSet){return!!(maybeSet&&maybeSet[IS_SET_SENTINEL]&&!maybeSet[IS_ORDERED_SENTINEL])}function isObjectLiteral(source){return typeof source==`object`&&!!source&&!Array.isArray(source)}function isImmutableList(source){return!!(source&&isObjectLiteral(source)&&source[`@@__IMMUTABLE_LIST__@@`])}function isImmutableOrderedKeyed(source){return!!(source&&isObjectLiteral(source)&&source[IS_KEYED_SENTINEL]&&source[IS_ORDERED_SENTINEL])}function isImmutableOrderedSet(source){return!!(source&&isObjectLiteral(source)&&source[IS_SET_SENTINEL]&&source[IS_ORDERED_SENTINEL])}function isImmutableRecord(source){return!!(source&&isObjectLiteral(source)&&source[`@@__IMMUTABLE_RECORD__@@`])}const IteratorSymbol=Symbol.iterator;function hasIterator(object){return!!(object!=null&&object[IteratorSymbol])}function iterableEquality(a,b,customTesters=[],aStack=[],bStack=[]){if(typeof a!=`object`||typeof b!=`object`||Array.isArray(a)||Array.isArray(b)||!hasIterator(a)||!hasIterator(b))return;if(a.constructor!==b.constructor)return!1;let length=aStack.length;for(;length--;)if(aStack[length]===a)return bStack[length]===b;aStack.push(a),bStack.push(b);let filteredCustomTesters=[...customTesters.filter(t=>t!==iterableEquality),iterableEqualityWithStack];function iterableEqualityWithStack(a,b){return iterableEquality(a,b,[...customTesters],[...aStack],[...bStack])}if(a.size!==void 0){if(a.size!==b.size)return!1;if(isA(`Set`,a)||isImmutableUnorderedSet(a)){let allFound=!0;for(let aValue of a)if(!b.has(aValue)){let has=!1;for(let bValue of b)equals(aValue,bValue,filteredCustomTesters)===!0&&(has=!0);if(has===!1){allFound=!1;break}}return aStack.pop(),bStack.pop(),allFound}if(isA(`Map`,a)||isImmutableUnorderedKeyed(a)){let allFound=!0;for(let aEntry of a)if(!b.has(aEntry[0])||!equals(aEntry[1],b.get(aEntry[0]),filteredCustomTesters)){let has=!1;for(let bEntry of b){let matchedKey=equals(aEntry[0],bEntry[0],filteredCustomTesters),matchedValue=!1;matchedKey===!0&&(matchedValue=equals(aEntry[1],bEntry[1],filteredCustomTesters)),matchedValue===!0&&(has=!0)}if(has===!1){allFound=!1;break}}return aStack.pop(),bStack.pop(),allFound}}let bIterator=b[IteratorSymbol]();for(let aValue of a){let nextB=bIterator.next();if(nextB.done||!equals(aValue,nextB.value,filteredCustomTesters))return!1}return!bIterator.next().done||!isImmutableList(a)&&!isImmutableOrderedKeyed(a)&&!isImmutableOrderedSet(a)&&!isImmutableRecord(a)&&!equals(Object.entries(a),Object.entries(b),filteredCustomTesters)?!1:(aStack.pop(),bStack.pop(),!0)}function hasPropertyInObject(object,key){return!object||typeof object!=`object`||object===Object.prototype?!1:Object.hasOwn(object,key)||hasPropertyInObject(Object.getPrototypeOf(object),key)}function isObjectWithKeys(a){return isObject(a)&&!isError(a)&&!Array.isArray(a)&&!(a instanceof Date)&&!(a instanceof Set)&&!(a instanceof Map)}const subsetEqualityTesters=new WeakSet;function registerSubsetEqualityTester(tester){return subsetEqualityTesters.add(tester),tester}function isSubsetEqualityTester(tester){return tester===subsetEquality||subsetEqualityTesters.has(tester)}function subsetEquality(object,subset,customTesters=[]){let filteredCustomTesters=customTesters.filter(t=>t!==subsetEquality),subsetEqualityWithContext=(seenReferences=new WeakMap)=>registerSubsetEqualityTester((object,subset)=>{if(isObjectWithKeys(subset))return Object.keys(subset).every(key=>{if(subset[key]!=null&&typeof subset[key]==`object`){if(seenReferences.has(subset[key]))return equals(object[key],subset[key],filteredCustomTesters);seenReferences.set(subset[key],!0)}let result=object!=null&&hasPropertyInObject(object,key)&&equals(object[key],subset[key],[...filteredCustomTesters,subsetEqualityWithContext(seenReferences)]);return seenReferences.delete(subset[key]),result})});return subsetEqualityWithContext()(object,subset)}function typeEquality(a,b){if(a!=null&&b!=null&&a.constructor!==b.constructor)return!1}function arrayBufferEquality(a,b){let dataViewA=a,dataViewB=b;if(!(a instanceof DataView&&b instanceof DataView)){if(!(a instanceof ArrayBuffer)||!(b instanceof ArrayBuffer))return;try{dataViewA=new DataView(a),dataViewB=new DataView(b)}catch{return}}if(dataViewA.byteLength!==dataViewB.byteLength)return!1;for(let i=0;i<dataViewA.byteLength;i++)if(dataViewA.getUint8(i)!==dataViewB.getUint8(i))return!1;return!0}function sparseArrayEquality(a,b,customTesters=[]){if(!Array.isArray(a)||!Array.isArray(b))return;let aKeys=Object.keys(a),bKeys=Object.keys(b);return equals(a,b,customTesters.filter(t=>t!==sparseArrayEquality),!0)&&equals(aKeys,bKeys)}function generateToBeMessage(deepEqualityName,expected=`#{this}`,actual=`#{exp}`){let toBeMessage=`expected ${expected} to be ${actual} // Object.is equality`;return[`toStrictEqual`,`toEqual`].includes(deepEqualityName)?`${toBeMessage}\n\nIf it should pass with deep equality, replace "toBe" with "${deepEqualityName}"\n\nExpected: ${expected}\nReceived: serializes to the same string\n`:toBeMessage}function pluralize(word,count){return`${count} ${word}${count===1?``:`s`}`}function getObjectKeys(object){return[...Object.keys(object),...Object.getOwnPropertySymbols(object).filter(s=>Object.getOwnPropertyDescriptor(object,s)?.enumerable)]}function getObjectSubset(object,subset,customTesters){let stripped=0,getObjectSubsetWithContext=(seenReferences=new WeakMap)=>(object,subset)=>{if(Array.isArray(object)){if(Array.isArray(subset)&&subset.length===object.length)return subset.map((sub,i)=>getObjectSubsetWithContext(seenReferences)(object[i],sub))}else if(object instanceof Date)return object;else if(isObject(object)&&isObject(subset)){if(equals(object,subset,[...customTesters,iterableEquality,subsetEquality]))return subset;let trimmed={};seenReferences.set(object,trimmed),typeof object.constructor==`function`&&typeof object.constructor.name==`string`&&Object.defineProperty(trimmed,"constructor",{enumerable:!1,value:object.constructor});for(let key of getObjectKeys(object))hasPropertyInObject(subset,key)?trimmed[key]=seenReferences.has(object[key])?seenReferences.get(object[key]):getObjectSubsetWithContext(seenReferences)(object[key],subset[key]):seenReferences.has(object[key])||(stripped+=1,isObject(object[key])&&(stripped+=getObjectKeys(object[key]).length),getObjectSubsetWithContext(seenReferences)(object[key],subset[key]));if(getObjectKeys(trimmed).length>0)return trimmed}return object};return{subset:getObjectSubsetWithContext()(object,subset),stripped}}function isStandardSchema(obj){return!!obj&&(typeof obj==`object`||typeof obj==`function`)&&obj[`~standard`]&&typeof obj[`~standard`].validate==`function`}if(!Object.hasOwn(globalThis,MATCHERS_OBJECT)){let globalState=new WeakMap,matchers=Object.create(null),customEqualityTesters=[],asymmetricMatchers=Object.create(null);Object.defineProperty(globalThis,MATCHERS_OBJECT,{configurable:!0,get:()=>globalState}),Object.defineProperty(globalThis,JEST_MATCHERS_OBJECT,{configurable:!0,get:()=>({state:globalState.get(globalThis[GLOBAL_EXPECT]),matchers,customEqualityTesters})}),Object.defineProperty(globalThis,ASYMMETRIC_MATCHERS_OBJECT,{configurable:!0,get:()=>asymmetricMatchers})}function getState(expect){return globalThis[MATCHERS_OBJECT].get(expect)}function setState(state,expect){let map=globalThis[MATCHERS_OBJECT],current=map.get(expect),next=Object.defineProperties(current||{},Object.getOwnPropertyDescriptors(state));current||map.set(expect,next)}var AsymmetricMatcher=class{sample;inverse;$$typeof=Symbol.for(`jest.asymmetricMatcher`);constructor(sample,inverse=!1){this.sample=sample,this.inverse=inverse}getMatcherContext(expect){return{...getState(expect||globalThis[GLOBAL_EXPECT]),equals,isNot:this.inverse,customTesters:getCustomEqualityTesters(),utils:{...getMatcherUtils(),diff,stringify,iterableEquality,subsetEquality}}}};AsymmetricMatcher.prototype[Symbol.for(`chai/inspect`)]=function(options){let result=stringify(this,options.depth,{min:!0});return result.length<=options.truncate?result:`${this.toString()}{…}`};var StringContaining=class extends AsymmetricMatcher{constructor(sample,inverse=!1){if(!isA(`String`,sample))throw Error(`Expected is not a string`);super(sample,inverse)}asymmetricMatch(other){let result=isA(`String`,other)&&other.includes(this.sample);return this.inverse?!result:result}toString(){return`String${this.inverse?`Not`:``}Containing`}getExpectedType(){return`string`}},Anything=class extends AsymmetricMatcher{asymmetricMatch(other){return other!=null}toString(){return`Anything`}toAsymmetricMatcher(){return`Anything`}},ObjectContaining=class extends AsymmetricMatcher{constructor(sample,inverse=!1){super(sample,inverse)}getPrototype(obj){return Object.getPrototypeOf?Object.getPrototypeOf(obj):obj.constructor.prototype===obj?null:obj.constructor.prototype}hasProperty(obj,property){return obj?Object.hasOwn(obj,property)?!0:this.hasProperty(this.getPrototype(obj),property):!1}getProperties(obj){return[...Object.keys(obj),...Object.getOwnPropertySymbols(obj).filter(s=>Object.getOwnPropertyDescriptor(obj,s)?.enumerable)]}asymmetricMatch(other,customTesters){if(typeof this.sample!=`object`)throw TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let result=!0,properties=this.getProperties(this.sample);for(let property of properties){if(!this.hasProperty(other,property)){result=!1;break}let value=this.sample[property],otherValue=other[property];if(!equals(value,otherValue,customTesters)){result=!1;break}}return this.inverse?!result:result}toString(){return`Object${this.inverse?`Not`:``}Containing`}getExpectedType(){return`object`}},ArrayContaining=class extends AsymmetricMatcher{constructor(sample,inverse=!1){super(sample,inverse)}asymmetricMatch(other,customTesters){if(!Array.isArray(this.sample))throw TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);let result=this.sample.length===0||Array.isArray(other)&&this.sample.every(item=>other.some(another=>equals(item,another,customTesters)));return this.inverse?!result:result}toString(){return`Array${this.inverse?`Not`:``}Containing`}getExpectedType(){return`array`}},Any=class extends AsymmetricMatcher{constructor(sample){if(sample===void 0)throw TypeError(`any() expects to be passed a constructor function. Please pass one or use anything() to match any object.`);super(sample)}fnNameFor(func){if(func.name)return func.name;let matches=Function.prototype.toString.call(func).match(/^(?:async)?\s*function\s*(?:\*\s*)?([\w$]+)\s*\(/);return matches?matches[1]:`<anonymous>`}asymmetricMatch(other){return this.sample===String?typeof other==`string`||other instanceof String:this.sample===Number?typeof other==`number`||other instanceof Number:this.sample===Function?typeof other==`function`||typeof other==`function`:this.sample===Boolean?typeof other==`boolean`||other instanceof Boolean:this.sample===BigInt?typeof other==`bigint`||other instanceof BigInt:this.sample===Symbol?typeof other==`symbol`||other instanceof Symbol:this.sample===Object?typeof other==`object`:other instanceof this.sample}toString(){return`Any`}getExpectedType(){return this.sample===String?`string`:this.sample===Number?`number`:this.sample===Function?`function`:this.sample===Object?`object`:this.sample===Boolean?`boolean`:this.fnNameFor(this.sample)}toAsymmetricMatcher(){return`Any<${this.fnNameFor(this.sample)}>`}},StringMatching=class extends AsymmetricMatcher{constructor(sample,inverse=!1){if(!isA(`String`,sample)&&!isA(`RegExp`,sample))throw Error(`Expected is not a String or a RegExp`);super(new RegExp(sample),inverse)}asymmetricMatch(other){let result=isA(`String`,other)&&this.sample.test(other);return this.inverse?!result:result}toString(){return`String${this.inverse?`Not`:``}Matching`}getExpectedType(){return`string`}},CloseTo=class extends AsymmetricMatcher{precision;constructor(sample,precision=2,inverse=!1){if(!isA(`Number`,sample))throw Error(`Expected is not a Number`);if(!isA(`Number`,precision))throw Error(`Precision is not a Number`);super(sample),this.inverse=inverse,this.precision=precision}asymmetricMatch(other){if(!isA(`Number`,other))return!1;let result=!1;return result=other===1/0&&this.sample===1/0||other===-1/0&&this.sample===-1/0||Math.abs(this.sample-other)<10**-this.precision/2,this.inverse?!result:result}toString(){return`Number${this.inverse?`Not`:``}CloseTo`}getExpectedType(){return`number`}toAsymmetricMatcher(){return[this.toString(),this.sample,`(${pluralize(`digit`,this.precision)})`].join(` `)}},SchemaMatching=class extends AsymmetricMatcher{result;constructor(sample,inverse=!1){if(!isStandardSchema(sample))throw TypeError(`SchemaMatching expected to receive a Standard Schema.`);super(sample,inverse)}asymmetricMatch(other){let result=this.sample[`~standard`].validate(other);if(result instanceof Promise)throw TypeError(`Async schema validation is not supported in asymmetric matchers.`);this.result=result;let pass=!this.result.issues||this.result.issues.length===0;return this.inverse?!pass:pass}toString(){return`Schema${this.inverse?`Not`:``}Matching`}getExpectedType(){return`object`}toAsymmetricMatcher(){let{utils}=this.getMatcherContext();return(this.result?.issues||[]).length>0?`${this.toString()} ${utils.stringify(this.result,void 0,{printBasicPrototype:!1})}`:this.toString()}};const JestAsymmetricMatchers=(chai,utils)=>{utils.addMethod(chai.expect,`anything`,()=>new Anything),utils.addMethod(chai.expect,`any`,expected=>new Any(expected)),utils.addMethod(chai.expect,`stringContaining`,expected=>new StringContaining(expected)),utils.addMethod(chai.expect,`objectContaining`,expected=>new ObjectContaining(expected)),utils.addMethod(chai.expect,`arrayContaining`,expected=>new ArrayContaining(expected)),utils.addMethod(chai.expect,`stringMatching`,expected=>new StringMatching(expected)),utils.addMethod(chai.expect,`closeTo`,(expected,precision)=>new CloseTo(expected,precision)),utils.addMethod(chai.expect,`schemaMatching`,expected=>new SchemaMatching(expected)),chai.expect.not={stringContaining:expected=>new StringContaining(expected,!0),objectContaining:expected=>new ObjectContaining(expected,!0),arrayContaining:expected=>new ArrayContaining(expected,!0),stringMatching:expected=>new StringMatching(expected,!0),closeTo:(expected,precision)=>new CloseTo(expected,precision,!0),schemaMatching:expected=>new SchemaMatching(expected,!0)}};function createAssertionMessage(util,assertion,hasArgs){let soft=util.flag(assertion,`soft`)?`.soft`:``,not=util.flag(assertion,`negate`)?`not.`:``,name=`${util.flag(assertion,`_name`)}(${hasArgs?`expected`:``})`,promiseName=util.flag(assertion,`promise`);return`expect${soft}(actual)${promiseName?`.${promiseName}`:``}.${not}${name}`}function recordAsyncExpect(_test,promise,assertion,error,isSoft){let test=_test;if(test&&promise instanceof Promise){promise=promise.finally(()=>{if(!test.promises)return;let index=test.promises.indexOf(promise);index!==-1&&test.promises.splice(index,1)}),test.promises||=[],isSoft&&(promise=promise.then(noop$1,err=>{handleTestError(test,err)})),test.promises.push(promise);let resolved=!1;return test.onFinished??=[],test.onFinished.push(()=>{if(!resolved){let awaitError=Error(`Promise returned by \`${assertion}\` was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not guaranteed to complete before the test finishes:\n\nawait ${assertion}\n`);throw error.stack&&(awaitError.stack=error.stack.replace(error.message,awaitError.message)),awaitError}}),{then(onFulfilled,onRejected){return resolved=!0,promise.then(onFulfilled,onRejected)},catch(onRejected){return resolved=!0,promise.catch(onRejected)},finally(onFinally){return resolved=!0,promise.finally(onFinally)},[Symbol.toStringTag]:`Promise`}}return promise}function handleTestError(test,err){test.result||={state:`fail`},test.result.state=`fail`,test.result.errors||=[],test.result.errors.push(processError(err))}function wrapAssertion(utils,name,fn){return function(...args){if(name!==`withTest`&&utils.flag(this,`_name`,name),!utils.flag(this,`soft`))try{return fn.apply(this,args)}finally{}let test=utils.flag(this,`vitest-test`);if(!test)throw Error(`expect.soft() can only be used inside a test`);try{let result=fn.apply(this,args);return result&&typeof result==`object`&&typeof result.then==`function`?result.then(noop$1,err=>{handleTestError(test,err)}):result}catch(err){handleTestError(test,err)}}}const JestChaiExpect=(chai,utils)=>{let{AssertionError}=chai,customTesters=getCustomEqualityTesters();function def(name,fn){let addMethod=n=>{let softWrapper=wrapAssertion(utils,n,fn);utils.addMethod(chai.Assertion.prototype,n,softWrapper),utils.addMethod(globalThis[JEST_MATCHERS_OBJECT].matchers,n,softWrapper)};Array.isArray(name)?name.forEach(n=>addMethod(n)):addMethod(name)}[`throw`,`throws`,`Throw`].forEach(m=>{utils.overwriteMethod(chai.Assertion.prototype,m,_super=>function(...args){let promise=utils.flag(this,`promise`),object=utils.flag(this,`object`),isNot=utils.flag(this,`negate`);if(promise===`rejects`)utils.flag(this,`object`,()=>{throw object});else if(promise===`resolves`&&typeof object!=`function`){if(isNot)return;{let message=utils.flag(this,`message`)||`expected promise to throw an error, but it didn't`;throw new AssertionError(message,{showDiff:!1},utils.flag(this,`ssfi`))}}_super.apply(this,args)})}),def(`withTest`,function(test){return utils.flag(this,`vitest-test`,test),this}),def(`toEqual`,function(expected){let actual=utils.flag(this,`object`),equal=equals(actual,expected,[...customTesters,iterableEquality]);return this.assert(equal,`expected #{this} to deeply equal #{exp}`,`expected #{this} to not deeply equal #{exp}`,expected,actual)}),def(`toStrictEqual`,function(expected){let obj=utils.flag(this,`object`),equal=equals(obj,expected,[...customTesters,iterableEquality,typeEquality,sparseArrayEquality,arrayBufferEquality],!0);return this.assert(equal,`expected #{this} to strictly equal #{exp}`,`expected #{this} to not strictly equal #{exp}`,expected,obj)}),def(`toBe`,function(expected){let actual=this._obj,pass=Object.is(actual,expected),deepEqualityName=``;return pass||(equals(actual,expected,[...customTesters,iterableEquality,typeEquality,sparseArrayEquality,arrayBufferEquality],!0)?deepEqualityName=`toStrictEqual`:equals(actual,expected,[...customTesters,iterableEquality])&&(deepEqualityName=`toEqual`)),this.assert(pass,generateToBeMessage(deepEqualityName),`expected #{this} not to be #{exp} // Object.is equality`,expected,actual)}),def(`toMatchObject`,function(expected){let actual=this._obj,pass=equals(actual,expected,[...customTesters,iterableEquality,subsetEquality]),isNot=utils.flag(this,`negate`),{subset:actualSubset,stripped}=getObjectSubset(actual,expected,customTesters);if(pass&&isNot||!pass&&!isNot){let msg=utils.getMessage(this,[pass,`expected #{this} to match object #{exp}`,`expected #{this} to not match object #{exp}`,expected,actualSubset,!1]),message=stripped===0?msg:`${msg}\n(${stripped} matching ${stripped===1?`property`:`properties`} omitted from actual)`;throw new AssertionError(message,{showDiff:!0,expected,actual:actualSubset})}}),def(`toMatch`,function(expected){let actual=this._obj;if(typeof actual!=`string`)throw TypeError(`.toMatch() expects to receive a string, but got ${typeof actual}`);return this.assert(typeof expected==`string`?actual.includes(expected):actual.match(expected),`expected #{this} to match #{exp}`,`expected #{this} not to match #{exp}`,expected,actual)}),def(`toContain`,function(item){let actual=this._obj;if(typeof Node<`u`&&actual instanceof Node){if(!(item instanceof Node))throw TypeError(`toContain() expected a DOM node as the argument, but got ${typeof item}`);return this.assert(actual.contains(item),`expected #{this} to contain element #{exp}`,`expected #{this} not to contain element #{exp}`,item,actual)}if(typeof DOMTokenList<`u`&&actual instanceof DOMTokenList){assertTypes(item,`class name`,[`string`]);let expectedClassList=utils.flag(this,`negate`)?actual.value.replace(item,``).trim():`${actual.value} ${item}`;return this.assert(actual.contains(item),`expected "${actual.value}" to contain "${item}"`,`expected "${actual.value}" not to contain "${item}"`,expectedClassList,actual.value)}return typeof actual==`string`&&typeof item==`string`?this.assert(actual.includes(item),`expected #{this} to contain #{exp}`,`expected #{this} not to contain #{exp}`,item,actual):(actual!=null&&typeof actual!=`string`&&utils.flag(this,`object`,Array.from(actual)),this.contain(item))}),def(`toContainEqual`,function(expected){let obj=utils.flag(this,`object`),index=Array.from(obj).findIndex(item=>equals(item,expected,[...customTesters,iterableEquality]));this.assert(index!==-1,`expected #{this} to deep equally contain #{exp}`,`expected #{this} to not deep equally contain #{exp}`,expected)}),def(`toBeTruthy`,function(){let obj=utils.flag(this,`object`);this.assert(!!obj,`expected #{this} to be truthy`,`expected #{this} to not be truthy`,!0,obj)}),def(`toBeFalsy`,function(){let obj=utils.flag(this,`object`);this.assert(!obj,`expected #{this} to be falsy`,`expected #{this} to not be falsy`,!1,obj)}),def(`toBeGreaterThan`,function(expected){let actual=this._obj;return assertTypes(actual,`actual`,[`number`,`bigint`]),assertTypes(expected,`expected`,[`number`,`bigint`]),this.assert(actual>expected,`expected ${actual} to be greater than ${expected}`,`expected ${actual} to be not greater than ${expected}`,expected,actual,!1)}),def(`toBeGreaterThanOrEqual`,function(expected){let actual=this._obj;return assertTypes(actual,`actual`,[`number`,`bigint`]),assertTypes(expected,`expected`,[`number`,`bigint`]),this.assert(actual>=expected,`expected ${actual} to be greater than or equal to ${expected}`,`expected ${actual} to be not greater than or equal to ${expected}`,expected,actual,!1)}),def(`toBeLessThan`,function(expected){let actual=this._obj;return assertTypes(actual,`actual`,[`number`,`bigint`]),assertTypes(expected,`expected`,[`number`,`bigint`]),this.assert(actual<expected,`expected ${actual} to be less than ${expected}`,`expected ${actual} to be not less than ${expected}`,expected,actual,!1)}),def(`toBeLessThanOrEqual`,function(expected){let actual=this._obj;return assertTypes(actual,`actual`,[`number`,`bigint`]),assertTypes(expected,`expected`,[`number`,`bigint`]),this.assert(actual<=expected,`expected ${actual} to be less than or equal to ${expected}`,`expected ${actual} to be not less than or equal to ${expected}`,expected,actual,!1)}),def(`toBeNaN`,function(){let obj=utils.flag(this,`object`);this.assert(Number.isNaN(obj),`expected #{this} to be NaN`,`expected #{this} not to be NaN`,NaN,obj)}),def(`toBeUndefined`,function(){let obj=utils.flag(this,`object`);this.assert(obj===void 0,`expected #{this} to be undefined`,`expected #{this} not to be undefined`,void 0,obj)}),def(`toBeNull`,function(){let obj=utils.flag(this,`object`);this.assert(obj===null,`expected #{this} to be null`,`expected #{this} not to be null`,null,obj)}),def(`toBeNullable`,function(){let obj=utils.flag(this,`object`);this.assert(obj==null,`expected #{this} to be nullish`,`expected #{this} not to be nullish`,null,obj)}),def(`toBeDefined`,function(){let obj=utils.flag(this,`object`);this.assert(obj!==void 0,`expected #{this} to be defined`,`expected #{this} to be undefined`,obj)}),def(`toBeTypeOf`,function(expected){let actual=typeof this._obj,equal=expected===actual;return this.assert(equal,`expected #{this} to be type of #{exp}`,`expected #{this} not to be type of #{exp}`,expected,actual)}),def(`toBeInstanceOf`,function(obj){return this.instanceOf(obj)}),def(`toHaveLength`,function(length){return this.have.length(length)}),def(`toHaveProperty`,function(...args){Array.isArray(args[0])&&(args[0]=args[0].map(key=>String(key).replace(/([.[\]])/g,`\\$1`)).join(`.`));let actual=this._obj;if(actual==null)throw TypeError(`.toHaveProperty() expects to receive a valid object, but got ${actual}`);let[propertyName,expected]=args,{value,exists}=Object.hasOwn(actual,propertyName)?{value:actual[propertyName],exists:!0}:utils.getPathInfo(actual,propertyName),pass=exists&&(args.length===1||equals(expected,value,[...customTesters,iterableEquality])),valueString=args.length===1?``:` with value ${inspect$1(expected,{truncate:40})}`;return this.assert(pass,`expected #{this} to have property "${propertyName}"${valueString}`,`expected #{this} to not have property "${propertyName}"${valueString}`,expected,exists?value:void 0)}),def(`toBeCloseTo`,function(received,precision=2){let expected=this._obj,pass=!1,expectedDiff=0,receivedDiff=0;return received===1/0&&expected===1/0||received===-1/0&&expected===-1/0?pass=!0:(expectedDiff=10**-precision/2,receivedDiff=Math.abs(expected-received),pass=receivedDiff<expectedDiff),this.assert(pass,`expected #{this} to be close to #{exp}, received difference is ${receivedDiff}, but expected ${expectedDiff}`,`expected #{this} to not be close to #{exp}, received difference is ${receivedDiff}, but expected ${expectedDiff}`,received,expected,!1)});function assertIsMock(assertion){if(!isMockFunction(assertion._obj))throw TypeError(`${utils.inspect(assertion._obj)} is not a spy or a call to a spy!`)}function getSpy(assertion){return assertIsMock(assertion),assertion._obj}def([`toHaveBeenCalledTimes`,`toBeCalledTimes`],function(number){let spy=getSpy(this),spyName=spy.getMockName(),callCount=spy.mock.calls.length;return this.assert(callCount===number,`expected "${spyName}" to be called #{exp} times, but got ${callCount} times`,`expected "${spyName}" to not be called #{exp} times`,number,callCount,!1)}),def(`toHaveBeenCalledOnce`,function(){let spy=getSpy(this),spyName=spy.getMockName(),callCount=spy.mock.calls.length;return this.assert(callCount===1,`expected "${spyName}" to be called once, but got ${callCount} times`,`expected "${spyName}" to not be called once`,1,callCount,!1)}),def([`toHaveBeenCalled`,`toBeCalled`],function(){let spy=getSpy(this),spyName=spy.getMockName(),callCount=spy.mock.calls.length,called=callCount>0,isNot=utils.flag(this,`negate`),msg=utils.getMessage(this,[called,`expected "${spyName}" to be called at least once`,`expected "${spyName}" to not be called at all, but actually been called ${callCount} times`,!0,called]);if(called&&isNot&&(msg=formatCalls(spy,msg)),called&&isNot||!called&&!isNot)throw new AssertionError(msg)});function equalsArgumentArray(a,b){return a.length===b.length&&a.every((aItem,i)=>equals(aItem,b[i],[...customTesters,iterableEquality]))}def([`toHaveBeenCalledWith`,`toBeCalledWith`],function(...args){let spy=getSpy(this),spyName=spy.getMockName(),pass=spy.mock.calls.some(callArg=>equalsArgumentArray(callArg,args)),isNot=utils.flag(this,`negate`);if(pass&&isNot||!pass&&!isNot){let msg=utils.getMessage(this,[pass,`expected "${spyName}" to be called with arguments: #{exp}`,`expected "${spyName}" to not be called with arguments: #{exp}`,args]);throw new AssertionError(formatCalls(spy,msg,args))}}),def(`toHaveBeenCalledExactlyOnceWith`,function(...args){let spy=getSpy(this),spyName=spy.getMockName(),callCount=spy.mock.calls.length,pass=spy.mock.calls.some(callArg=>equalsArgumentArray(callArg,args))&&callCount===1,isNot=utils.flag(this,`negate`);if(pass&&isNot||!pass&&!isNot){let msg=utils.getMessage(this,[pass,`expected "${spyName}" to be called once with arguments: #{exp}`,`expected "${spyName}" to not be called once with arguments: #{exp}`,args]);throw new AssertionError(formatCalls(spy,msg,args))}}),def(`toHaveBeenNthCalledWith`,function(times,...args){let spy=getSpy(this),spyName=spy.getMockName(),nthCall=spy.mock.calls[times-1],callCount=spy.mock.calls.length,isCalled=times<=callCount;this.assert(nthCall&&equalsArgumentArray(nthCall,args),`expected ${ordinal(times)} "${spyName}" call to have been called with #{exp}${isCalled?``:`, but called only ${callCount} times`}`,`expected ${ordinal(times)} "${spyName}" call to not have been called with #{exp}`,args,nthCall,isCalled)}),def(`toHaveBeenLastCalledWith`,function(...args){let spy=getSpy(this),spyName=spy.getMockName(),lastCall=spy.mock.calls.at(-1);this.assert(lastCall&&equalsArgumentArray(lastCall,args),`expected last "${spyName}" call to have been called with #{exp}`,`expected last "${spyName}" call to not have been called with #{exp}`,args,lastCall)});function isSpyCalledBeforeAnotherSpy(beforeSpy,afterSpy,failIfNoFirstInvocation){let beforeInvocationCallOrder=beforeSpy.mock.invocationCallOrder,afterInvocationCallOrder=afterSpy.mock.invocationCallOrder;return beforeInvocationCallOrder.length===0?!failIfNoFirstInvocation:afterInvocationCallOrder.length!==0&&beforeInvocationCallOrder[0]<afterInvocationCallOrder[0]}def([`toHaveBeenCalledBefore`],function(resultSpy,failIfNoFirstInvocation=!0){let expectSpy=getSpy(this);if(!isMockFunction(resultSpy))throw TypeError(`${utils.inspect(resultSpy)} is not a spy or a call to a spy`);this.assert(isSpyCalledBeforeAnotherSpy(expectSpy,resultSpy,failIfNoFirstInvocation),`expected "${expectSpy.getMockName()}" to have been called before "${resultSpy.getMockName()}"`,`expected "${expectSpy.getMockName()}" to not have been called before "${resultSpy.getMockName()}"`,resultSpy,expectSpy)}),def([`toHaveBeenCalledAfter`],function(resultSpy,failIfNoFirstInvocation=!0){let expectSpy=getSpy(this);if(!isMockFunction(resultSpy))throw TypeError(`${utils.inspect(resultSpy)} is not a spy or a call to a spy`);this.assert(isSpyCalledBeforeAnotherSpy(resultSpy,expectSpy,failIfNoFirstInvocation),`expected "${expectSpy.getMockName()}" to have been called after "${resultSpy.getMockName()}"`,`expected "${expectSpy.getMockName()}" to not have been called after "${resultSpy.getMockName()}"`,resultSpy,expectSpy)}),def([`toThrow`,`toThrowError`],function(expected){if(typeof expected==`string`||expected===void 0||expected instanceof RegExp)return this.throws(expected);let obj=this._obj,promise=utils.flag(this,`promise`),isNot=utils.flag(this,`negate`),thrown=null;if(promise===`rejects`)thrown=obj;else if(promise===`resolves`&&typeof obj!=`function`){if(isNot)return;{let message=utils.flag(this,`message`)||`expected promise to throw an error, but it didn't`;throw new AssertionError(message,{showDiff:!1},utils.flag(this,`ssfi`))}}else{let isThrow=!1;try{obj()}catch(err){isThrow=!0,thrown=err}if(!isThrow&&!isNot){let message=utils.flag(this,`message`)||`expected function to throw an error, but it didn't`;throw new AssertionError(message,{showDiff:!1},utils.flag(this,`ssfi`))}}if(typeof expected==`function`){let name=expected.name||expected.prototype.constructor.name;return this.assert(thrown&&thrown instanceof expected,`expected error to be instance of ${name}`,`expected error not to be instance of ${name}`,expected,thrown)}if(isError(expected)){let equal=equals(thrown,expected,[...customTesters,iterableEquality]);return this.assert(equal,`expected a thrown error to be #{exp}`,`expected a thrown error not to be #{exp}`,expected,thrown)}if(typeof expected==`object`&&`asymmetricMatch`in expected&&typeof expected.asymmetricMatch==`function`){let matcher=expected;return this.assert(thrown&&matcher.asymmetricMatch(thrown,[...customTesters,iterableEquality]),`expected error to match asymmetric matcher`,`expected error not to match asymmetric matcher`,matcher,thrown)}let equal=equals(thrown,expected,[...customTesters,iterableEquality]);return this.assert(equal,`expected a thrown value to equal #{exp}`,`expected a thrown value not to equal #{exp}`,expected,thrown)}),[{name:`toHaveResolved`,condition:spy=>spy.mock.settledResults.length>0&&spy.mock.settledResults.some(({type})=>type===`fulfilled`),action:`resolved`},{name:[`toHaveReturned`,`toReturn`],condition:spy=>spy.mock.calls.length>0&&spy.mock.results.some(({type})=>type!==`throw`),action:`called`}].forEach(({name,condition,action})=>{def(name,function(){let spy=getSpy(this),spyName=spy.getMockName(),pass=condition(spy);this.assert(pass,`expected "${spyName}" to be successfully ${action} at least once`,`expected "${spyName}" to not be successfully ${action}`,pass,!pass,!1)})}),[{name:`toHaveResolvedTimes`,condition:(spy,times)=>spy.mock.settledResults.reduce((s,{type})=>type===`fulfilled`?++s:s,0)===times,action:`resolved`},{name:[`toHaveReturnedTimes`,`toReturnTimes`],condition:(spy,times)=>spy.mock.results.reduce((s,{type})=>type===`throw`?s:++s,0)===times,action:`called`}].forEach(({name,condition,action})=>{def(name,function(times){let spy=getSpy(this),spyName=spy.getMockName(),pass=condition(spy,times);this.assert(pass,`expected "${spyName}" to be successfully ${action} ${times} times`,`expected "${spyName}" to not be successfully ${action} ${times} times`,`expected resolved times: ${times}`,`received resolved times: ${pass}`,!1)})}),[{name:`toHaveResolvedWith`,condition:(spy,value)=>spy.mock.settledResults.some(({type,value:result})=>type===`fulfilled`&&equals(value,result,[...customTesters,iterableEquality])),action:`resolve`},{name:[`toHaveReturnedWith`,`toReturnWith`],condition:(spy,value)=>spy.mock.results.some(({type,value:result})=>type===`return`&&equals(value,result,[...customTesters,iterableEquality])),action:`return`}].forEach(({name,condition,action})=>{def(name,function(value){let spy=getSpy(this),pass=condition(spy,value),isNot=utils.flag(this,`negate`);if(pass&&isNot||!pass&&!isNot){let spyName=spy.getMockName(),msg=utils.getMessage(this,[pass,`expected "${spyName}" to ${action} with: #{exp} at least once`,`expected "${spyName}" to not ${action} with: #{exp}`,value]),results=action===`return`?spy.mock.results:spy.mock.settledResults;throw new AssertionError(formatReturns(spy,results,msg,value))}})}),[{name:`toHaveLastResolvedWith`,condition:(spy,value)=>{let result=spy.mock.settledResults.at(-1);return!!(result&&result.type===`fulfilled`&&equals(result.value,value,[...customTesters,iterableEquality]))},action:`resolve`},{name:`toHaveLastReturnedWith`,condition:(spy,value)=>{let result=spy.mock.results.at(-1);return!!(result&&result.type===`return`&&equals(result.value,value,[...customTesters,iterableEquality]))},action:`return`}].forEach(({name,condition,action})=>{def(name,function(value){let spy=getSpy(this),result=(action===`return`?spy.mock.results:spy.mock.settledResults).at(-1),spyName=spy.getMockName();this.assert(condition(spy,value),`expected last "${spyName}" call to ${action} #{exp}`,`expected last "${spyName}" call to not ${action} #{exp}`,value,result?.value)})}),[{name:`toHaveNthResolvedWith`,condition:(spy,index,value)=>{let result=spy.mock.settledResults[index-1];return result&&result.type===`fulfilled`&&equals(result.value,value,[...customTesters,iterableEquality])},action:`resolve`},{name:`toHaveNthReturnedWith`,condition:(spy,index,value)=>{let result=spy.mock.results[index-1];return result&&result.type===`return`&&equals(result.value,value,[...customTesters,iterableEquality])},action:`return`}].forEach(({name,condition,action})=>{def(name,function(nthCall,value){let spy=getSpy(this),spyName=spy.getMockName(),result=(action===`return`?spy.mock.results:spy.mock.settledResults)[nthCall-1],ordinalCall=`${ordinal(nthCall)} call`;this.assert(condition(spy,nthCall,value),`expected ${ordinalCall} "${spyName}" call to ${action} #{exp}`,`expected ${ordinalCall} "${spyName}" call to not ${action} #{exp}`,value,result?.value)})}),def(`withContext`,function(context){for(let key in context)utils.flag(this,key,context[key]);return this}),utils.addProperty(chai.Assertion.prototype,`resolves`,function(){let error=Error(`resolves`);utils.flag(this,`promise`,`resolves`),utils.flag(this,`error`,error);let test=utils.flag(this,`vitest-test`),obj=utils.flag(this,`object`);if(utils.flag(this,`poll`))throw SyntaxError(`expect.poll() is not supported in combination with .resolves`);if(typeof obj?.then!=`function`)throw TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof obj}'.`);let proxy=new Proxy(this,{get:(target,key,receiver)=>{let result=Reflect.get(target,key,receiver);return typeof result==`function`?(...args)=>{utils.flag(this,`_name`,key);let promise=Promise.resolve(obj).then(value=>(utils.flag(this,`object`,value),result.call(this,...args)),err=>{let _error=new AssertionError(`promise rejected "${utils.inspect(err)}" instead of resolving`,{showDiff:!1});throw _error.cause=err,_error}).catch(err=>{throw isError(err)&&error.stack&&(err.stack=error.stack.replace(error.message,err.message)),err});return recordAsyncExpect(test,promise,createAssertionMessage(utils,this,!!args.length),error,utils.flag(this,`soft`))}:result instanceof chai.Assertion?proxy:result}});return proxy}),utils.addProperty(chai.Assertion.prototype,`rejects`,function(){let error=Error(`rejects`);utils.flag(this,`promise`,`rejects`),utils.flag(this,`error`,error);let test=utils.flag(this,`vitest-test`),obj=utils.flag(this,`object`),wrapper=typeof obj==`function`?obj():obj;if(utils.flag(this,`poll`))throw SyntaxError(`expect.poll() is not supported in combination with .rejects`);if(typeof wrapper?.then!=`function`)throw TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof wrapper}'.`);let proxy=new Proxy(this,{get:(target,key,receiver)=>{let result=Reflect.get(target,key,receiver);return typeof result==`function`?(...args)=>{utils.flag(this,`_name`,key);let promise=Promise.resolve(wrapper).then(value=>{throw new AssertionError(`promise resolved "${utils.inspect(value)}" instead of rejecting`,{showDiff:!0,expected:Error(`rejected promise`),actual:value})},err=>(utils.flag(this,`object`,err),result.call(this,...args))).catch(err=>{throw isError(err)&&error.stack&&(err.stack=error.stack.replace(error.message,err.message)),err});return recordAsyncExpect(test,promise,createAssertionMessage(utils,this,!!args.length),error,utils.flag(this,`soft`))}:result instanceof chai.Assertion?proxy:result}});return proxy})};function formatCalls(spy,msg,showActualCall){return spy.mock.calls.length&&(msg+=$.gray(`\n\nReceived:\n\n${spy.mock.calls.map((callArg,i)=>{let methodCall=$.bold(` ${ordinal(i+1)} ${spy.getMockName()} call:\n\n`);return methodCall+=showActualCall?diff(showActualCall,callArg,{omitAnnotationLines:!0}):stringify(callArg).split(`
|
|
196
|
+
`).map(line=>` ${line}`).join(`
|
|
197
|
+
`),methodCall+=`
|
|
198
|
+
`,methodCall}).join(`
|
|
199
|
+
`)}`)),msg+=$.gray(`\n\nNumber of calls: ${$.bold(spy.mock.calls.length)}\n`),msg}function formatReturns(spy,results,msg,showActualReturn){return results.length&&(msg+=$.gray(`\n\nReceived:\n\n${results.map((callReturn,i)=>{let methodCall=$.bold(` ${ordinal(i+1)} ${spy.getMockName()} call return:\n\n`);return methodCall+=showActualReturn?diff(showActualReturn,callReturn.value,{omitAnnotationLines:!0}):stringify(callReturn).split(`
|
|
200
|
+
`).map(line=>` ${line}`).join(`
|
|
201
|
+
`),methodCall+=`
|
|
202
|
+
`,methodCall}).join(`
|
|
203
|
+
`)}`)),msg+=$.gray(`\n\nNumber of calls: ${$.bold(spy.mock.calls.length)}\n`),msg}function getMatcherState(assertion,expect){let obj=assertion._obj,isNot=utils_exports.flag(assertion,`negate`),promise=utils_exports.flag(assertion,`promise`)||``,customMessage=utils_exports.flag(assertion,`message`),jestUtils={...getMatcherUtils(),diff,stringify,iterableEquality,subsetEquality},task=utils_exports.flag(assertion,`vitest-test`),currentTestName=task?.fullTestName??``;task?.type!==`test`&&(task=void 0);let matcherState={...getState(expect),currentTestName,customTesters:getCustomEqualityTesters(),isNot,utils:jestUtils,promise,equals,suppressedErrors:[],soft:utils_exports.flag(assertion,`soft`),poll:utils_exports.flag(assertion,`poll`),assertion};return Object.assign(matcherState,{task}),{state:matcherState,isNot,obj,customMessage}}var JestExtendError=class extends Error{actual;expected;__vitest_error_context__;constructor(message,actual,expected,__vitest_error_context__){super(message),this.actual=actual,this.expected=expected,this.__vitest_error_context__=__vitest_error_context__}};function JestExtendPlugin(c,expect,matchers){return(_,utils)=>{Object.entries(matchers).forEach(([expectAssertionName,expectAssertion])=>{function __VITEST_EXTEND_ASSERTION__(...args){let{state,isNot,obj,customMessage}=getMatcherState(this,expect),result=expectAssertion.call(state,obj,...args);if(result&&typeof result==`object`&&typeof result.then==`function`)return result.then(({pass,message,actual,expected,meta})=>{if(pass&&isNot||!pass&&!isNot)throw new JestExtendError((customMessage?`${customMessage}: `:``)+message(),actual,expected,{assertionName:expectAssertionName,meta})});let{pass,message,actual,expected,meta}=result;if(pass&&isNot||!pass&&!isNot)throw new JestExtendError((customMessage?`${customMessage}: `:``)+message(),actual,expected,{assertionName:expectAssertionName,meta})}let softWrapper=wrapAssertion(utils,expectAssertionName,__VITEST_EXTEND_ASSERTION__);if(utils.addMethod(globalThis[JEST_MATCHERS_OBJECT].matchers,expectAssertionName,softWrapper),utils.addMethod(c.Assertion.prototype,expectAssertionName,softWrapper),expectAssertion.__vitest_poll_takeover__){let addedMethod=c.Assertion.prototype[expectAssertionName];Object.defineProperty(addedMethod,"__vitest_poll_takeover__",{value:!0})}class CustomMatcher extends AsymmetricMatcher{constructor(inverse=!1,...sample){super(sample,inverse)}asymmetricMatch(other,customTesters){let context=this.getMatcherContext(expect),{pass}=expectAssertion.call(customTesters?{...context,customTesters}:context,other,...this.sample);return this.inverse?!pass:pass}toString(){return`${this.inverse?`not.`:``}${expectAssertionName}`}getExpectedType(){return`any`}toAsymmetricMatcher(){return`${this.toString()}<${this.sample.map(item=>stringify(item)).join(`, `)}>`}}let customMatcher=(...sample)=>new CustomMatcher(!1,...sample);Object.defineProperty(expect,expectAssertionName,{configurable:!0,enumerable:!0,value:customMatcher,writable:!0}),Object.defineProperty(expect.not,expectAssertionName,{configurable:!0,enumerable:!0,value:(...sample)=>new CustomMatcher(!0,...sample),writable:!0}),Object.defineProperty(globalThis[ASYMMETRIC_MATCHERS_OBJECT],expectAssertionName,{configurable:!0,enumerable:!0,value:customMatcher,writable:!0})})}}const JestExtend=(chai,utils)=>{utils.addMethod(chai.expect,`extend`,(expect,expects)=>{use(JestExtendPlugin(chai,expect,expects))})};function isBenchResult(value){return typeof value==`object`&&!!value&&`latency`in value&&typeof value.latency?.mean==`number`}function formatOps(ops){return ops.toLocaleString(`en-US`,{minimumFractionDigits:2,maximumFractionDigits:2})}const benchMatchers={toBeFasterThan(actual,expected,options){let{matcherHint,RECEIVED_COLOR,EXPECTED_COLOR}=this.utils,delta=options?.delta??0;if(!isBenchResult(actual))throw TypeError(`${matcherHint(`.toBeFasterThan`)} expects the actual value to be a benchmark result.`);if(!isBenchResult(expected))throw TypeError(`${matcherHint(`.toBeFasterThan`)} expects the expected value to be a benchmark result.`);let threshold=expected.latency.mean*(1-delta),pass=actual.latency.mean<threshold;return{pass,message:()=>{let relation=((actual.latency.mean-expected.latency.mean)/expected.latency.mean*100).toFixed(2);return pass?`${matcherHint(`.not.toBeFasterThan`)}\n\nExpected to not be faster, but was ${Math.abs(Number(relation))}% faster.\n\nReceived: ${RECEIVED_COLOR(formatOps(actual.throughput.mean))} ops/sec\nExpected: ${EXPECTED_COLOR(formatOps(expected.throughput.mean))} ops/sec\n`:`${matcherHint(`.toBeFasterThan`)}\n\nExpected to be faster${delta>0?` by at least ${(delta*100).toFixed(0)}%`:``}, but was ${Number(relation)>0?`${relation}% slower`:`only ${Math.abs(Number(relation))}% faster`}.\n\nReceived: ${RECEIVED_COLOR(formatOps(actual.throughput.mean))} ops/sec\nExpected: ${EXPECTED_COLOR(formatOps(expected.throughput.mean))} ops/sec\n`}}},toBeSlowerThan(actual,expected,options){let{matcherHint,RECEIVED_COLOR,EXPECTED_COLOR}=this.utils,delta=options?.delta??0;if(!isBenchResult(actual))throw TypeError(`${matcherHint(`.toBeSlowerThan`)} expects the actual value to be a benchmark result.`);if(!isBenchResult(expected))throw TypeError(`${matcherHint(`.toBeSlowerThan`)} expects the expected value to be a benchmark result.`);let threshold=expected.latency.mean*(1+delta),pass=actual.latency.mean>threshold;return{pass,message:()=>{let relation=((actual.latency.mean-expected.latency.mean)/expected.latency.mean*100).toFixed(2);return pass?`${matcherHint(`.not.toBeSlowerThan`)}\n\nExpected to not be slower, but was ${relation}% slower.\n\nReceived: ${RECEIVED_COLOR(formatOps(actual.throughput.mean))} ops/sec\nExpected: ${EXPECTED_COLOR(formatOps(expected.throughput.mean))} ops/sec\n`:`${matcherHint(`.toBeSlowerThan`)}\n\nExpected to be slower${delta>0?` by at least ${(delta*100).toFixed(0)}%`:``}, but was ${Number(relation)<0?`${Math.abs(Number(relation))}% faster`:`only ${relation}% slower`}.\n\nReceived: ${RECEIVED_COLOR(formatOps(actual.throughput.mean))} ops/sec\nExpected: ${EXPECTED_COLOR(formatOps(expected.throughput.mean))} ops/sec\n`}}}};var fakeTimersSrc={},global$1,hasRequiredGlobal;function requireGlobal(){return hasRequiredGlobal?global$1:(hasRequiredGlobal=1,global$1=commonjsGlobal===void 0?typeof window<`u`?window:self:commonjsGlobal,global$1)}var throwsOnProto_1,hasRequiredThrowsOnProto;function requireThrowsOnProto(){if(hasRequiredThrowsOnProto)return throwsOnProto_1;hasRequiredThrowsOnProto=1;let throwsOnProto;try{({}).__proto__,throwsOnProto=!1}catch{throwsOnProto=!0}return throwsOnProto_1=throwsOnProto,throwsOnProto_1}var copyPrototypeMethods,hasRequiredCopyPrototypeMethods;function requireCopyPrototypeMethods(){if(hasRequiredCopyPrototypeMethods)return copyPrototypeMethods;hasRequiredCopyPrototypeMethods=1;var call=Function.call,throwsOnProto=requireThrowsOnProto(),disallowedProperties=[`size`,`caller`,`callee`,`arguments`];return throwsOnProto&&disallowedProperties.push(`__proto__`),copyPrototypeMethods=function(prototype){return Object.getOwnPropertyNames(prototype).reduce(function(result,name){return disallowedProperties.includes(name)||typeof prototype[name]!=`function`||(result[name]=call.bind(prototype[name])),result},Object.create(null))},copyPrototypeMethods}var array,hasRequiredArray;function requireArray(){return hasRequiredArray?array:(hasRequiredArray=1,array=requireCopyPrototypeMethods()(Array.prototype),array)}var calledInOrder_1,hasRequiredCalledInOrder;function requireCalledInOrder(){if(hasRequiredCalledInOrder)return calledInOrder_1;hasRequiredCalledInOrder=1;var every=requireArray().every;function hasCallsLeft(callMap,spy){return callMap[spy.id]===void 0&&(callMap[spy.id]=0),callMap[spy.id]<spy.callCount}function checkAdjacentCalls(callMap,spy,index,spies){var calledBeforeNext=!0;return index!==spies.length-1&&(calledBeforeNext=spy.calledBefore(spies[index+1])),hasCallsLeft(callMap,spy)&&calledBeforeNext?(callMap[spy.id]+=1,!0):!1}function calledInOrder(spies){return every(arguments.length>1?arguments:spies,checkAdjacentCalls.bind(null,{}))}return calledInOrder_1=calledInOrder,calledInOrder_1}var className_1,hasRequiredClassName;function requireClassName(){if(hasRequiredClassName)return className_1;hasRequiredClassName=1;function className(value){return value.constructor&&value.constructor.name||null}return className_1=className,className_1}var deprecated={},hasRequiredDeprecated;function requireDeprecated(){return hasRequiredDeprecated?deprecated:(hasRequiredDeprecated=1,(function(exports){exports.wrap=function(func,msg){var wrapped=function(){return exports.printWarning(msg),func.apply(this,arguments)};return func.prototype&&(wrapped.prototype=func.prototype),wrapped},exports.defaultMsg=function(packageName,funcName){return`${packageName}.${funcName} is deprecated and will be removed from the public API in a future version of ${packageName}.`},exports.printWarning=function(msg){typeof process==`object`&&process.emitWarning?process.emitWarning(msg):console.info?console.info(msg):console.log(msg)}})(deprecated),deprecated)}var every,hasRequiredEvery;function requireEvery(){return hasRequiredEvery?every:(hasRequiredEvery=1,every=function(obj,fn){var pass=!0;try{obj.forEach(function(){if(!fn.apply(this,arguments))throw Error()})}catch{pass=!1}return pass},every)}var functionName,hasRequiredFunctionName;function requireFunctionName(){return hasRequiredFunctionName?functionName:(hasRequiredFunctionName=1,functionName=function(func){if(!func)return``;try{return func.displayName||func.name||(String(func).match(/function ([^\s(]+)/)||[])[1]}catch{return``}},functionName)}var orderByFirstCall_1,hasRequiredOrderByFirstCall;function requireOrderByFirstCall(){if(hasRequiredOrderByFirstCall)return orderByFirstCall_1;hasRequiredOrderByFirstCall=1;var sort=requireArray().sort,slice=requireArray().slice;function comparator(a,b){var aCall=a.getCall(0),bCall=b.getCall(0);return(aCall&&aCall.callId||-1)<(bCall&&bCall.callId||-1)?-1:1}function orderByFirstCall(spies){return sort(slice(spies),comparator)}return orderByFirstCall_1=orderByFirstCall,orderByFirstCall_1}var _function,hasRequired_function;function require_function(){return hasRequired_function?_function:(hasRequired_function=1,_function=requireCopyPrototypeMethods()(Function.prototype),_function)}var map,hasRequiredMap;function requireMap(){return hasRequiredMap?map:(hasRequiredMap=1,map=requireCopyPrototypeMethods()(Map.prototype),map)}var object,hasRequiredObject;function requireObject(){return hasRequiredObject?object:(hasRequiredObject=1,object=requireCopyPrototypeMethods()(Object.prototype),object)}var set,hasRequiredSet;function requireSet(){return hasRequiredSet?set:(hasRequiredSet=1,set=requireCopyPrototypeMethods()(Set.prototype),set)}var string,hasRequiredString;function requireString(){return hasRequiredString?string:(hasRequiredString=1,string=requireCopyPrototypeMethods()(String.prototype),string)}var prototypes,hasRequiredPrototypes;function requirePrototypes(){return hasRequiredPrototypes?prototypes:(hasRequiredPrototypes=1,prototypes={array:requireArray(),function:require_function(),map:requireMap(),object:requireObject(),set:requireSet(),string:requireString()},prototypes)}var typeDetect$1={exports:{}},typeDetect=typeDetect$1.exports,hasRequiredTypeDetect;function requireTypeDetect(){return hasRequiredTypeDetect?typeDetect$1.exports:(hasRequiredTypeDetect=1,(function(module,exports){(function(global,factory){module.exports=factory()})(typeDetect,(function(){var promiseExists=typeof Promise==`function`,globalObject=typeof self==`object`?self:commonjsGlobal,symbolExists=typeof Symbol<`u`,mapExists=typeof Map<`u`,setExists=typeof Set<`u`,weakMapExists=typeof WeakMap<`u`,weakSetExists=typeof WeakSet<`u`,dataViewExists=typeof DataView<`u`,symbolIteratorExists=symbolExists&&Symbol.iterator!==void 0,symbolToStringTagExists=symbolExists&&Symbol.toStringTag!==void 0,setEntriesExists=setExists&&typeof Set.prototype.entries==`function`,mapEntriesExists=mapExists&&typeof Map.prototype.entries==`function`,setIteratorPrototype=setEntriesExists&&Object.getPrototypeOf(new Set().entries()),mapIteratorPrototype=mapEntriesExists&&Object.getPrototypeOf(new Map().entries()),arrayIteratorExists=symbolIteratorExists&&typeof Array.prototype[Symbol.iterator]==`function`,arrayIteratorPrototype=arrayIteratorExists&&Object.getPrototypeOf([][Symbol.iterator]()),stringIteratorExists=symbolIteratorExists&&typeof String.prototype[Symbol.iterator]==`function`,stringIteratorPrototype=stringIteratorExists&&Object.getPrototypeOf(``[Symbol.iterator]()),toStringLeftSliceLength=8,toStringRightSliceLength=-1;function typeDetect(obj){var typeofObj=typeof obj;if(typeofObj!==`object`)return typeofObj;if(obj===null)return`null`;if(obj===globalObject)return`global`;if(Array.isArray(obj)&&(symbolToStringTagExists===!1||!(Symbol.toStringTag in obj)))return`Array`;if(typeof window==`object`&&window!==null){if(typeof window.location==`object`&&obj===window.location)return`Location`;if(typeof window.document==`object`&&obj===window.document)return`Document`;if(typeof window.navigator==`object`){if(typeof window.navigator.mimeTypes==`object`&&obj===window.navigator.mimeTypes)return`MimeTypeArray`;if(typeof window.navigator.plugins==`object`&&obj===window.navigator.plugins)return`PluginArray`}if((typeof window.HTMLElement==`function`||typeof window.HTMLElement==`object`)&&obj instanceof window.HTMLElement){if(obj.tagName===`BLOCKQUOTE`)return`HTMLQuoteElement`;if(obj.tagName===`TD`)return`HTMLTableDataCellElement`;if(obj.tagName===`TH`)return`HTMLTableHeaderCellElement`}}var stringTag=symbolToStringTagExists&&obj[Symbol.toStringTag];if(typeof stringTag==`string`)return stringTag;var objPrototype=Object.getPrototypeOf(obj);return objPrototype===RegExp.prototype?`RegExp`:objPrototype===Date.prototype?`Date`:promiseExists&&objPrototype===Promise.prototype?`Promise`:setExists&&objPrototype===Set.prototype?`Set`:mapExists&&objPrototype===Map.prototype?`Map`:weakSetExists&&objPrototype===WeakSet.prototype?`WeakSet`:weakMapExists&&objPrototype===WeakMap.prototype?`WeakMap`:dataViewExists&&objPrototype===DataView.prototype?`DataView`:mapExists&&objPrototype===mapIteratorPrototype?`Map Iterator`:setExists&&objPrototype===setIteratorPrototype?`Set Iterator`:arrayIteratorExists&&objPrototype===arrayIteratorPrototype?`Array Iterator`:stringIteratorExists&&objPrototype===stringIteratorPrototype?`String Iterator`:objPrototype===null?`Object`:Object.prototype.toString.call(obj).slice(toStringLeftSliceLength,toStringRightSliceLength)}return typeDetect}))})(typeDetect$1),typeDetect$1.exports)}var typeOf,hasRequiredTypeOf;function requireTypeOf(){if(hasRequiredTypeOf)return typeOf;hasRequiredTypeOf=1;var type=requireTypeDetect();return typeOf=function(value){return type(value).toLowerCase()},typeOf}var valueToString_1,hasRequiredValueToString;function requireValueToString(){if(hasRequiredValueToString)return valueToString_1;hasRequiredValueToString=1;function valueToString(value){return value&&value.toString?value.toString():String(value)}return valueToString_1=valueToString,valueToString_1}var lib,hasRequiredLib;function requireLib(){return hasRequiredLib?lib:(hasRequiredLib=1,lib={global:requireGlobal(),calledInOrder:requireCalledInOrder(),className:requireClassName(),deprecated:requireDeprecated(),every:requireEvery(),functionName:requireFunctionName(),orderByFirstCall:requireOrderByFirstCall(),prototypes:requirePrototypes(),typeOf:requireTypeOf(),valueToString:requireValueToString()},lib)}var hasRequiredFakeTimersSrc;function requireFakeTimersSrc(){if(hasRequiredFakeTimersSrc)return fakeTimersSrc;hasRequiredFakeTimersSrc=1;let globalObject=requireLib().global,timersModule,timersPromisesModule;if(typeof __vitest_required__<`u`){try{timersModule=__vitest_required__.timers}catch{}try{timersPromisesModule=__vitest_required__.timersPromises}catch{}}function withGlobal(_global){let maxTimeout=2**31-1,idCounterStart=0xe8d4a51000,NOOP=function(){},NOOP_ARRAY=function(){return[]},isPresent={},timeoutResult,addTimerReturnsObject=!1;_global.setTimeout&&(isPresent.setTimeout=!0,timeoutResult=_global.setTimeout(NOOP,0),addTimerReturnsObject=typeof timeoutResult==`object`),isPresent.clearTimeout=!!_global.clearTimeout,isPresent.setInterval=!!_global.setInterval,isPresent.clearInterval=!!_global.clearInterval,isPresent.hrtime=_global.process&&typeof _global.process.hrtime==`function`,isPresent.hrtimeBigint=isPresent.hrtime&&typeof _global.process.hrtime.bigint==`function`,isPresent.nextTick=_global.process&&typeof _global.process.nextTick==`function`;let utilPromisify=_global.process&&_global.__vitest_required__&&_global.__vitest_required__.util.promisify;isPresent.performance=_global.performance&&typeof _global.performance.now==`function`;let hasPerformancePrototype=_global.Performance&&(typeof _global.Performance).match(/^(function|object)$/),hasPerformanceConstructorPrototype=_global.performance&&_global.performance.constructor&&_global.performance.constructor.prototype;isPresent.queueMicrotask=Object.prototype.hasOwnProperty.call(_global,`queueMicrotask`),isPresent.requestAnimationFrame=_global.requestAnimationFrame&&typeof _global.requestAnimationFrame==`function`,isPresent.cancelAnimationFrame=_global.cancelAnimationFrame&&typeof _global.cancelAnimationFrame==`function`,isPresent.requestIdleCallback=_global.requestIdleCallback&&typeof _global.requestIdleCallback==`function`,isPresent.cancelIdleCallback=_global.cancelIdleCallback&&typeof _global.cancelIdleCallback==`function`,isPresent.setImmediate=_global.setImmediate&&typeof _global.setImmediate==`function`,isPresent.clearImmediate=_global.clearImmediate&&typeof _global.clearImmediate==`function`,isPresent.Intl=_global.Intl&&typeof _global.Intl==`object`,isPresent.Temporal=_global.Temporal!==null&&typeof _global.Temporal==`object`&&_global.Temporal.Now!==void 0&&_global.Temporal.Instant!==void 0,_global.clearTimeout&&_global.clearTimeout(timeoutResult);let NativeDate=_global.Date,NativeIntl=isPresent.Intl?Object.defineProperties(Object.create(null),Object.getOwnPropertyDescriptors(_global.Intl)):void 0,NativeTemporal=isPresent.Temporal?_global.Temporal:void 0,uniqueTimerId=idCounterStart,uniqueTimerOrder=0;if(NativeDate===void 0)throw Error("The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");isPresent.Date=!0;class FakePerformanceEntry{constructor(name,entryType,startTime,duration){this.name=name,this.entryType=entryType,this.startTime=startTime,this.duration=duration}toJSON(){return JSON.stringify({...this})}}function isNumberFinite(num){return Number.isFinite?Number.isFinite(num):isFinite(num)}function checkIsNearInfiniteLimit(clock,i){clock.loopLimit&&i===clock.loopLimit-1&&(clock.isNearInfiniteLimit=!0)}function resetIsNearInfiniteLimit(clock){clock&&(clock.isNearInfiniteLimit=!1)}function parseTime(str){if(!str)return 0;let strings=str.split(`:`),l=strings.length,i=l,ms=0,parsed;if(l>3||!/^(\d\d:){0,2}\d\d?$/.test(str))throw Error(`tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits`);for(;i--;){if(parsed=parseInt(strings[i],10),parsed>=60)throw Error(`Invalid time ${str}`);ms+=parsed*60**(l-i-1)}return ms*1e3}function nanoRemainder(msFloat){let modulo=1e6,remainder=msFloat*1e6%modulo,positiveRemainder=remainder<0?remainder+modulo:remainder;return Math.floor(positiveRemainder)}function getEpoch(epoch){if(!epoch)return 0;if(typeof epoch==`number`)return epoch;if(typeof epoch.getTime==`function`)return epoch.getTime();if(typeof epoch.epochMilliseconds==`number`)return epoch.epochMilliseconds;throw TypeError(`now should be milliseconds since UNIX epoch`)}function inRange(from,to,timer){return timer&&timer.callAt>=from&&timer.callAt<=to}function getInfiniteLoopError(clock,job){let infiniteLoopError=Error(`Aborting after running ${clock.loopLimit} timers, assuming an infinite loop!`);if(!job.error)return infiniteLoopError;let computedTargetPattern=/target\.*[<|(|[].*?[>|\]|)]\s*/,clockMethodPattern=new RegExp(String(Object.keys(clock).join(`|`)));addTimerReturnsObject&&(clockMethodPattern=RegExp(`\\s+at (Object\\.)?(?:${Object.keys(clock).join(`|`)})\\s+`));let matchedLineIndex=-1;job.error.stack.split(`
|
|
204
|
+
`).some(function(line,i){return line.match(computedTargetPattern)?(matchedLineIndex=i,!0):line.match(clockMethodPattern)?(matchedLineIndex=i,!1):matchedLineIndex>=0});let stack=`${infiniteLoopError}\n${job.type||`Microtask`} - ${job.func.name||`anonymous`}\n${job.error.stack.split(`
|
|
205
|
+
`).slice(matchedLineIndex+1).join(`
|
|
206
|
+
`)}`;try{Object.defineProperty(infiniteLoopError,"stack",{value:stack})}catch{}return infiniteLoopError}function createDate(){class ClockDate extends NativeDate{static clock;constructor(...args){args.length===0?super(ClockDate.clock.now):super(...args),Object.defineProperty(this,"constructor",{value:NativeDate,enumerable:!1})}static[Symbol.hasInstance](instance){return instance instanceof NativeDate}}ClockDate.isFake=!0,NativeDate.now&&(ClockDate.now=function(){return ClockDate.clock.now});let NativeDateWithToSource=NativeDate;return NativeDateWithToSource.toSource&&(ClockDate.toSource=function(){return NativeDateWithToSource.toSource()}),ClockDate.toString=function(){return NativeDateWithToSource.toString()},new Proxy(ClockDate,{apply(){if(this instanceof ClockDate)throw TypeError("A Proxy should only capture `new` calls with the `construct` handler. This is not supposed to be possible, so check the logic.");return new NativeDate(ClockDate.clock.now).toString()}})}function createIntl(clock){let IntlWithClock={clock};return Object.getOwnPropertyNames(NativeIntl).forEach(property=>IntlWithClock[property]=NativeIntl[property]),IntlWithClock.DateTimeFormat=function(...args){let realFormatter=new NativeIntl.DateTimeFormat(...args),formatter={};return[`formatRange`,`formatRangeToParts`,`resolvedOptions`].forEach(method=>{formatter[method]=realFormatter[method].bind(realFormatter)}),[`format`,`formatToParts`].forEach(method=>{formatter[method]=function(date){return realFormatter[method](date||IntlWithClock.clock.now)}}),formatter},IntlWithClock.DateTimeFormat.prototype=Object.create(NativeIntl.DateTimeFormat.prototype),IntlWithClock.DateTimeFormat.supportedLocalesOf=NativeIntl.DateTimeFormat.supportedLocalesOf,IntlWithClock}function createTemporal(clock,getNanos){let fakeNow={instant(){return NativeTemporal.Instant.fromEpochNanoseconds(BigInt(clock.now)*1000000n+BigInt(getNanos()))},timeZoneId(){return NativeTemporal.Now.timeZoneId()},zonedDateTimeISO(timeZone){let tz=timeZone??NativeTemporal.Now.timeZoneId();return fakeNow.instant().toZonedDateTimeISO(tz)},plainDateTimeISO(timeZone){return fakeNow.zonedDateTimeISO(timeZone).toPlainDateTime()},plainDateISO(timeZone){return fakeNow.zonedDateTimeISO(timeZone).toPlainDate()},plainTimeISO(timeZone){return fakeNow.zonedDateTimeISO(timeZone).toPlainTime()}},TemporalWithClock=Object.create(Object.getPrototypeOf(NativeTemporal));return[...Object.getOwnPropertyNames(NativeTemporal),...Object.getOwnPropertySymbols(NativeTemporal)].forEach(prop=>{Object.defineProperty(TemporalWithClock,prop,Object.getOwnPropertyDescriptor(NativeTemporal,prop))}),Object.defineProperty(TemporalWithClock,"Now",{value:fakeNow,writable:!0,enumerable:!1,configurable:!0}),TemporalWithClock}function enqueueJob(clock,job){clock.jobs||=[],clock.jobs.push(job)}function runJobs(clock){if(!clock.jobs)return;let wasNearLimit=clock.isNearInfiniteLimit;for(let i=0;i<clock.jobs.length;i++){let job=clock.jobs[i];if(job.func.apply(null,job.args),checkIsNearInfiniteLimit(clock,i),clock.loopLimit&&i>clock.loopLimit)throw getInfiniteLoopError(clock,job)}wasNearLimit||resetIsNearInfiniteLimit(clock),clock.jobs=[]}class TimerHeap{constructor(){this.timers=[]}peek(){return this.timers[0]}push(timer){this.timers.push(timer),this.bubbleUp(this.timers.length-1)}pop(){if(this.timers.length===0)return;let first=this.timers[0],last=this.timers.pop();return this.timers.length>0&&(this.timers[0]=last,last.heapIndex=0,this.bubbleDown(0)),delete first.heapIndex,first}remove(timer){let index=timer.heapIndex;if(index===void 0||this.timers[index]!==timer)return!1;let last=this.timers.pop();return timer!==last&&(this.timers[index]=last,last.heapIndex=index,compareTimers(last,timer)<0?this.bubbleUp(index):this.bubbleDown(index)),delete timer.heapIndex,!0}bubbleUp(index){let timer=this.timers[index],currentIndex=index;for(;currentIndex>0;){let parentIndex=Math.floor((currentIndex-1)/2),parent=this.timers[parentIndex];if(compareTimers(timer,parent)<0)this.timers[currentIndex]=parent,parent.heapIndex=currentIndex,currentIndex=parentIndex;else break}this.timers[currentIndex]=timer,timer.heapIndex=currentIndex}bubbleDown(index){let timer=this.timers[index],currentIndex=index,halfLength=Math.floor(this.timers.length/2);for(;currentIndex<halfLength;){let leftIndex=currentIndex*2+1,rightIndex=leftIndex+1,bestChildIndex=leftIndex,bestChild=this.timers[leftIndex];if(rightIndex<this.timers.length&&compareTimers(this.timers[rightIndex],bestChild)<0&&(bestChildIndex=rightIndex,bestChild=this.timers[rightIndex]),compareTimers(bestChild,timer)<0)this.timers[currentIndex]=bestChild,bestChild.heapIndex=currentIndex,currentIndex=bestChildIndex;else break}this.timers[currentIndex]=timer,timer.heapIndex=currentIndex}}function ensureTimerState(clock){clock.timers||(clock.timers=new Map,clock.timerHeap=new TimerHeap)}function hasTimer(clock,id){return clock.timers?clock.timers.has(id):!1}function getTimer(clock,id){return clock.timers?clock.timers.get(id):void 0}function setTimer(clock,timer){ensureTimerState(clock),clock.timers.set(timer.id,timer)}function deleteTimer(clock,id){return clock.timers?clock.timers.delete(id):!1}function forEachActiveTimer(clock,callback){if(clock.timers)for(let timer of clock.timers.values())callback(timer)}function rebuildTimerHeap(clock){clock.timerHeap=new TimerHeap,forEachActiveTimer(clock,timer=>{clock.timerHeap.push(timer)})}function addTimer(clock,timer){if(timer.func===void 0)throw Error(`Callback must be provided to timer calls`);if(typeof timer.func!=`function`)throw TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${timer.func} of type ${typeof timer.func}`);for(clock.isNearInfiniteLimit&&(timer.error=Error()),timer.type=timer.immediate?`Immediate`:`Timeout`,Object.prototype.hasOwnProperty.call(timer,`delay`)&&(typeof timer.delay!=`number`&&(timer.delay=parseInt(timer.delay,10)),isNumberFinite(timer.delay)||(timer.delay=0),timer.delay=timer.delay>maxTimeout?1:timer.delay,timer.delay=Math.max(0,timer.delay)),Object.prototype.hasOwnProperty.call(timer,`interval`)&&(timer.type=`Interval`,timer.interval=timer.interval>maxTimeout?1:timer.interval),Object.prototype.hasOwnProperty.call(timer,`animation`)&&(timer.type=`AnimationFrame`,timer.animation=!0),Object.prototype.hasOwnProperty.call(timer,`requestIdleCallback`)&&(timer.delay||(timer.type=`IdleCallback`),timer.requestIdleCallback=!0),ensureTimerState(clock);hasTimer(clock,uniqueTimerId);)uniqueTimerId++,uniqueTimerId>=2**53-1&&(uniqueTimerId=idCounterStart);return timer.id=uniqueTimerId++,uniqueTimerId>=2**53-1&&(uniqueTimerId=idCounterStart),timer.order=uniqueTimerOrder++,timer.createdAt=clock.now,timer.callAt=clock.now+(parseInt(String(timer.delay))||+!!clock.duringTick),setTimer(clock,timer),clock.timerHeap.push(timer),addTimerReturnsObject?{refed:!0,ref:function(){return this.refed=!0,this},unref:function(){return this.refed=!1,this},hasRef:function(){return this.refed},refresh:function(){return timer.callAt=clock.now+(parseInt(String(timer.delay))||+!!clock.duringTick),clock.timerHeap.remove(timer),timer.order=uniqueTimerOrder++,setTimer(clock,timer),clock.timerHeap.push(timer),this},[Symbol.toPrimitive]:function(){return timer.id}}:timer.id}function compareTimers(a,b){return a.type===`IdleCallback`&&b.type!==`IdleCallback`?1:a.type!==`IdleCallback`&&b.type===`IdleCallback`||a.callAt<b.callAt?-1:a.callAt>b.callAt?1:a.immediate&&!b.immediate?-1:!a.immediate&&b.immediate?1:a.order<b.order?-1:a.order>b.order?1:a.createdAt<b.createdAt?-1:a.createdAt>b.createdAt?1:a.id<b.id?-1:+(a.id>b.id)}function firstTimerInRange(clock,from,to){if(!clock.timerHeap)return null;let timers=clock.timerHeap.timers;if(timers.length===1&&timers[0].requestIdleCallback)return timers[0];let first=clock.timerHeap.peek();if(first&&inRange(from,to,first))return first;let timer=null;for(let i=0;i<timers.length;i++)inRange(from,to,timers[i])&&(!timer||compareTimers(timer,timers[i])===1)&&(timer=timers[i]);return timer}function firstTimer(clock){return clock.timerHeap&&clock.timerHeap.peek()||null}function lastTimer(clock){if(!clock.timerHeap)return null;let timers=clock.timerHeap.timers,timer=null;for(let i=0;i<timers.length;i++)(!timer||compareTimers(timer,timers[i])===-1)&&(timer=timers[i]);return timer}function callTimer(clock,timer){typeof timer.interval==`number`?(clock.timerHeap.remove(timer),timer.callAt+=timer.interval,timer.order=uniqueTimerOrder++,clock.isNearInfiniteLimit&&(timer.error=Error()),clock.timerHeap.push(timer)):(deleteTimer(clock,timer.id),clock.timerHeap.remove(timer)),typeof timer.func==`function`&&timer.func.apply(null,timer.args)}function getClearHandler(ttype){return ttype===`IdleCallback`||ttype===`AnimationFrame`?`cancel${ttype}`:`clear${ttype}`}function getScheduleHandler(ttype){return ttype===`IdleCallback`||ttype===`AnimationFrame`?`request${ttype}`:`set${ttype}`}function createWarnOnce(){let calls=0;return function(msg){!calls++&&console.warn(msg)}}let warnOnce=createWarnOnce();function clearTimer(clock,timerId,ttype){if(!timerId)return;let id=Number(timerId);if(Number.isNaN(id)||id<idCounterStart){let handlerName=getClearHandler(ttype);if(clock.shouldClearNativeTimers===!0){let nativeHandler=clock[`_${handlerName}`];return typeof nativeHandler==`function`?nativeHandler(timerId):void 0}let stackTrace=Error().stack.split(`
|
|
207
|
+
`).slice(1).join(`
|
|
208
|
+
`);warnOnce(`FakeTimers: ${handlerName} was invoked to clear a native timer instead of one created by this library.
|
|
209
|
+
To automatically clean-up native timers, use \`shouldClearNativeTimers\`.\n${stackTrace}`)}if(hasTimer(clock,id)){let timer=getTimer(clock,id);if(timer.type===ttype||timer.type===`Timeout`&&ttype===`Interval`||timer.type===`Interval`&&ttype===`Timeout`)deleteTimer(clock,id),clock.timerHeap.remove(timer);else{let clear=getClearHandler(ttype),schedule=getScheduleHandler(timer.type);throw Error(`Cannot clear timer: timer created with ${schedule}() but cleared with ${clear}()`)}}}function hijackMethod(target,method,clock){if(clock[method].hasOwnProperty=Object.prototype.hasOwnProperty.call(target,method),clock[`_${method}`]=target[method],method===`Date`)target[method]=clock[method];else if(method===`Intl`)target[method]=clock[method];else if(method===`Temporal`)target[method]=clock[method];else if(method===`performance`){let originalPerfDescriptor=Object.getOwnPropertyDescriptor(target,method);if(originalPerfDescriptor&&originalPerfDescriptor.get&&!originalPerfDescriptor.set){Object.defineProperty(clock,`_${method}`,originalPerfDescriptor);let perfDescriptor=Object.getOwnPropertyDescriptor(clock,method);Object.defineProperty(target,method,perfDescriptor)}else target[method]=clock[method]}else target[method]=function(){return clock[method].apply(clock,arguments)},Object.defineProperties(target[method],Object.getOwnPropertyDescriptors(clock[method]));target[method].clock=clock}function doIntervalTick(clock,advanceTimeDelta){clock.tick(advanceTimeDelta)}let timers={setTimeout:_global.setTimeout,clearTimeout:_global.clearTimeout,setInterval:_global.setInterval,clearInterval:_global.clearInterval,Date:_global.Date};isPresent.setImmediate&&(timers.setImmediate=_global.setImmediate),isPresent.clearImmediate&&(timers.clearImmediate=_global.clearImmediate),isPresent.hrtime&&(timers.hrtime=_global.process.hrtime),isPresent.nextTick&&(timers.nextTick=_global.process.nextTick),isPresent.performance&&(timers.performance=_global.performance),isPresent.requestAnimationFrame&&(timers.requestAnimationFrame=_global.requestAnimationFrame),isPresent.queueMicrotask&&(timers.queueMicrotask=_global.queueMicrotask),isPresent.cancelAnimationFrame&&(timers.cancelAnimationFrame=_global.cancelAnimationFrame),isPresent.requestIdleCallback&&(timers.requestIdleCallback=_global.requestIdleCallback),isPresent.cancelIdleCallback&&(timers.cancelIdleCallback=_global.cancelIdleCallback),isPresent.Intl&&(timers.Intl=NativeIntl),isPresent.Temporal&&(timers.Temporal=NativeTemporal);let originalSetTimeout=_global.setImmediate||_global.setTimeout,originalClearInterval=_global.clearInterval,originalSetInterval=_global.setInterval;function createClock(start,loopLimit){start=Math.floor(getEpoch(start));let startTimestamp=start;loopLimit||=1e3;let nanos=0,uninstalled=!1,adjustedSystemTime=[0,0],clock={now:start,Date:createDate(),loopLimit,isNearInfiniteLimit:!1,tickMode:{mode:`manual`,counter:0,delta:void 0}};clock.Date.clock=clock;function getTimeToNextFrame(){return 16-(clock.now-startTimestamp)%16}function hrtime(prev){let millisSinceStart=clock.now-adjustedSystemTime[0]-startTimestamp,secsSinceStart=Math.floor(millisSinceStart/1e3),remainderInNanos=(millisSinceStart-secsSinceStart*1e3)*1e6+nanos-adjustedSystemTime[1];if(Array.isArray(prev)){if(prev[1]>1e9)throw TypeError(`Number of nanoseconds can't exceed a billion`);let oldSecs=prev[0],nanoDiff=remainderInNanos-prev[1],secDiff=secsSinceStart-oldSecs;return nanoDiff<0&&(nanoDiff+=1e9,--secDiff),[secDiff,nanoDiff]}return[secsSinceStart,remainderInNanos]}function fakePerformanceNow(){let hrt=hrtime();return hrt[0]*1e3+hrt[1]/1e6}isPresent.hrtimeBigint&&(hrtime.bigint=function(){let parts=hrtime();return BigInt(parts[0])*BigInt(1e9)+BigInt(parts[1])}),isPresent.Intl&&(clock.Intl=createIntl(clock),clock.Intl.clock=clock),isPresent.Temporal&&(clock.Temporal=createTemporal(clock,()=>nanos)),clock.setTickMode=function(tickModeConfig){let{mode:newMode,delta:newDelta}=tickModeConfig,{mode:oldMode,delta:oldDelta}=clock.tickMode;(newMode!==oldMode||newDelta!==oldDelta)&&(oldMode===`interval`&&originalClearInterval(clock.attachedInterval),clock.tickMode={counter:clock.tickMode.counter+1,mode:newMode,delta:newDelta},newMode===`nextAsync`?advanceUntilModeChanges():newMode===`interval`&&createIntervalTick(clock,newDelta||20))};async function advanceUntilModeChanges(){async function newMacrotask(){let channel=new MessageChannel;await new Promise(resolve=>{channel.port1.onmessage=()=>{resolve(void 0),channel.port1.close()},channel.port2.postMessage(void 0)}),channel.port1.close(),channel.port2.close(),await new Promise(resolve=>{originalSetTimeout(resolve)})}let{counter}=clock.tickMode;for(;clock.tickMode.counter===counter;){if(await newMacrotask(),clock.tickMode.counter!==counter)return;clock.next()}}function pauseAutoTickUntilFinished(promise){return clock.tickMode.mode===`nextAsync`?(clock.setTickMode({mode:`manual`}),promise.finally(()=>{uninstalled||clock.setTickMode({mode:`nextAsync`})})):promise}function getTimeToNextIdlePeriod(){let timeToNextIdlePeriod=0;return clock.countTimers()>0&&(timeToNextIdlePeriod=50),timeToNextIdlePeriod}clock.requestIdleCallback=function(func,{timeout}={}){let result=addTimer(clock,{func,args:[{didTimeout:!0,timeRemaining:getTimeToNextIdlePeriod}],delay:timeout,requestIdleCallback:!0});return Number(result)},clock.cancelIdleCallback=function(timerId){return clearTimer(clock,timerId,`IdleCallback`)},clock.setTimeout=function(func,timeout){return addTimer(clock,{func,args:Array.prototype.slice.call(arguments,2),delay:timeout})},_global.Promise!==void 0&&utilPromisify&&(clock.setTimeout[utilPromisify.custom]=function(timeout,arg){return new _global.Promise(function(resolve){addTimer(clock,{func:resolve,args:[arg],delay:timeout})})}),clock.clearTimeout=function(timerId){return clearTimer(clock,timerId,`Timeout`)},clock.nextTick=function(func){return enqueueJob(clock,{func,args:Array.prototype.slice.call(arguments,1),error:clock.isNearInfiniteLimit?Error():null})},clock.queueMicrotask=function(func){return clock.nextTick(func)},clock.setInterval=function(func,timeout){return timeout=parseInt(String(timeout),10),addTimer(clock,{func,args:Array.prototype.slice.call(arguments,2),delay:timeout,interval:timeout})},clock.clearInterval=function(timerId){return clearTimer(clock,timerId,`Interval`)},isPresent.setImmediate&&(clock.setImmediate=(function(func){return addTimer(clock,{func,args:Array.prototype.slice.call(arguments,1),immediate:!0})}),_global.Promise!==void 0&&utilPromisify&&(clock.setImmediate[utilPromisify.custom]=function(arg){return new _global.Promise(function(resolve){addTimer(clock,{func:resolve,args:[arg],immediate:!0})})}),clock.clearImmediate=function(timerId){return clearTimer(clock,timerId,`Immediate`)}),clock.countTimers=function(){return(clock.timerHeap?clock.timerHeap.timers.length:0)+(clock.jobs||[]).length},clock.requestAnimationFrame=function(func){let result=addTimer(clock,{func,delay:getTimeToNextFrame(),get args(){return[fakePerformanceNow()]},animation:!0});return Number(result)},clock.cancelAnimationFrame=function(timerId){return clearTimer(clock,timerId,`AnimationFrame`)},clock.runMicrotasks=function(){runJobs(clock)};function durationToMs(duration){let relativeTo=NativeTemporal.Instant.fromEpochMilliseconds(clock.now).toZonedDateTimeISO(NativeTemporal.Now.timeZoneId());return duration.total({unit:`millisecond`,relativeTo})}function tickValueToMs(tickValue){return typeof tickValue==`number`?tickValue:isPresent.Temporal&&typeof tickValue==`object`&&tickValue&&typeof tickValue.total==`function`?durationToMs(tickValue):parseTime(tickValue)}function createTickState(tickValue){let msFloat=tickValueToMs(tickValue),ms=Math.floor(msFloat),remainder=nanoRemainder(msFloat),nanosTotal=nanos+remainder,tickTo=clock.now+ms;if(msFloat<0)throw TypeError(`Negative ticks are not supported`);return nanosTotal>=1e6&&(tickTo+=1,nanosTotal-=1e6),{msFloat,ms,nanosTotal,tickFrom:clock.now,tickTo,previous:clock.now,timer:null,firstException:null,oldNow:null}}function applyClockChangeCompensation(state,oldNow,options){if(oldNow!==clock.now){let difference=clock.now-oldNow;state.tickFrom+=difference,state.tickTo+=difference,options&&options.includePrevious&&(state.previous+=difference)}}function runInitialJobs(state){state.oldNow=clock.now,runJobs(clock),applyClockChangeCompensation(state,state.oldNow)}function runPostLoopJobs(state){state.oldNow=clock.now,runJobs(clock),applyClockChangeCompensation(state,state.oldNow)}function selectNextTimerInRange(state){state.timer=firstTimerInRange(clock,state.previous,state.tickTo),state.previous=state.tickFrom}function runTimersInRange(state,isAsync,nextPromiseTick,compensationCheck){for(state.timer=firstTimerInRange(clock,state.tickFrom,state.tickTo);state.timer&&state.tickFrom<=state.tickTo;){if(hasTimer(clock,state.timer.id)){state.tickFrom=state.timer.callAt,clock.now=state.timer.callAt,state.oldNow=clock.now;try{runJobs(clock),callTimer(clock,state.timer)}catch(e){state.firstException=state.firstException||e}if(isAsync)return originalSetTimeout(nextPromiseTick),!0;compensationCheck()}selectNextTimerInRange(state)}return!1}function finalizeTick(state,isAsync,resolve){if(state.timer=firstTimerInRange(clock,state.tickFrom,state.tickTo),state.timer)try{clock.tick(state.tickTo-clock.now)}catch(e){state.firstException=state.firstException||e}else clock.now=state.tickTo,nanos=state.nanosTotal;if(state.firstException)throw state.firstException;if(isAsync)resolve(clock.now);else return clock.now}function doTick(tickValue,isAsync,resolve,reject){let state=createTickState(tickValue);nanos=state.nanosTotal,clock.duringTick=!0,runInitialJobs(state);let compensationCheck=function(){applyClockChangeCompensation(state,state.oldNow,{includePrevious:!0})},nextPromiseTick=isAsync&&function(){try{compensationCheck(),selectNextTimerInRange(state),doTickInner()}catch(e){reject(e)}};function doTickInner(){if(!runTimersInRange(state,isAsync,nextPromiseTick,compensationCheck))return runPostLoopJobs(state),clock.duringTick=!1,finalizeTick(state,isAsync,resolve)}return doTickInner()}clock.tick=function(tickValue){return doTick(tickValue,!1)},clock.next=function(){runJobs(clock);let timer=firstTimer(clock);if(!timer)return clock.now;clock.duringTick=!0;try{return clock.now=timer.callAt,callTimer(clock,timer),runJobs(clock),clock.now}finally{clock.duringTick=!1}};function runAsyncWithNativeTimeout(callback){return pauseAutoTickUntilFinished(new _global.Promise(function(resolve,reject){originalSetTimeout(function(){try{callback(resolve,reject)}catch(e){reject(e)}})}))}return clock.runAll=function(){runJobs(clock);for(let i=0;i<clock.loopLimit;i++){if(!clock.timers||clock.timerHeap.timers.length===0)return resetIsNearInfiniteLimit(clock),clock.now;checkIsNearInfiniteLimit(clock,i),clock.next()}let excessJob=firstTimer(clock);throw getInfiniteLoopError(clock,excessJob)},clock.runToFrame=function(){return clock.tick(getTimeToNextFrame())},clock.runToLast=function(){let timer=lastTimer(clock);return timer?clock.tick(timer.callAt-clock.now):(runJobs(clock),clock.now)},_global.Promise!==void 0&&(clock.tickAsync=function(tickValue){return runAsyncWithNativeTimeout(function(resolve,reject){doTick(tickValue,!0,resolve,reject)})},clock.nextAsync=function(){return runAsyncWithNativeTimeout(function(resolve,reject){let timer=firstTimer(clock);if(!timer){resolve(clock.now);return}let err;clock.duringTick=!0,clock.now=timer.callAt;try{callTimer(clock,timer)}catch(e){err=e}clock.duringTick=!1,originalSetTimeout(function(){err?reject(err):resolve(clock.now)})})},clock.runAllAsync=function(){let i=0;function doRun(resolve,reject){try{runJobs(clock);let numTimers;if(i<clock.loopLimit){if(!clock.timerHeap){resetIsNearInfiniteLimit(clock),resolve(clock.now);return}if(numTimers=clock.timerHeap.timers.length,numTimers===0){resetIsNearInfiniteLimit(clock),resolve(clock.now);return}checkIsNearInfiniteLimit(clock,i),clock.next(),i++,originalSetTimeout(function(){doRun(resolve,reject)});return}let excessJob=firstTimer(clock);reject(getInfiniteLoopError(clock,excessJob))}catch(e){reject(e)}}return runAsyncWithNativeTimeout(function(resolve,reject){doRun(resolve,reject)})},clock.runToLastAsync=function(){return runAsyncWithNativeTimeout(function(resolve){let timer=lastTimer(clock);if(!timer){runJobs(clock),resolve(clock.now);return}resolve(clock.tickAsync(timer.callAt-clock.now))})}),clock.reset=function(){nanos=0,clock.timers=new Map,clock.timerHeap=new TimerHeap,clock.jobs=[],clock.now=start},clock.setSystemTime=function(systemTime){let newNow=getEpoch(systemTime),difference=newNow-clock.now;adjustedSystemTime[0]+=difference,adjustedSystemTime[1]+=nanos,clock.now=newNow,nanos=0,forEachActiveTimer(clock,timer=>{timer.createdAt+=difference,timer.callAt+=difference})},clock.jump=function(tickValue){let msFloat=tickValueToMs(tickValue),ms=Math.floor(msFloat);return forEachActiveTimer(clock,timer=>{clock.now+ms>timer.callAt&&(timer.callAt=clock.now+ms)}),rebuildTimerHeap(clock),clock.tick(ms),clock.now},isPresent.performance&&(clock.performance=Object.create(null),clock.performance.now=fakePerformanceNow),isPresent.hrtime&&(clock.hrtime=hrtime),clock.uninstall=function(){if(uninstalled=!0,clock.setTickMode({mode:`manual`}),clock.methods){let method,i,l;for(i=0,l=clock.methods.length;i<l;i++){if(method=clock.methods[i],method===`hrtime`&&_global.process)_global.process.hrtime=clock._hrtime;else if(method===`nextTick`&&_global.process)_global.process.nextTick=clock._nextTick;else if(method===`performance`){let originalPerfDescriptor=Object.getOwnPropertyDescriptor(clock,`_${method}`);originalPerfDescriptor&&originalPerfDescriptor.get&&!originalPerfDescriptor.set?Object.defineProperty(_global,method,originalPerfDescriptor):originalPerfDescriptor.configurable&&(_global[method]=clock[`_${method}`])}else if(clock[method]&&clock[method].hasOwnProperty)_global[method]=clock[`_${method}`];else try{delete _global[method]}catch{}if(clock.timersModuleMethods!==void 0)for(let j=0;j<clock.timersModuleMethods.length;j++){let entry=clock.timersModuleMethods[j];timersModule[entry.methodName]=entry.original}if(clock.timersPromisesModuleMethods!==void 0)for(let j=0;j<clock.timersPromisesModuleMethods.length;j++){let entry=clock.timersPromisesModuleMethods[j];timersPromisesModule[entry.methodName]=entry.original}}clock.methods=[]}if(clock.abortListenerMap)for(let[listener,signal]of clock.abortListenerMap.entries())signal.removeEventListener(`abort`,listener),clock.abortListenerMap.delete(listener);return clock.timerHeap?clock.timerHeap.timers.slice():[]},clock}function createIntervalTick(clock,delta){let intervalTick=doIntervalTick.bind(null,clock,delta);clock.attachedInterval=originalSetInterval(intervalTick,delta)}function install(config){if(arguments.length>1||config instanceof Date||Array.isArray(config)||typeof config==`number`)throw TypeError(`FakeTimers.install called with ${String(config)} install requires an object parameter`);if(_global.Date.isFake===!0)throw TypeError(`Can't install fake timers twice on the same global object.`);config=config===void 0?{}:config,config.shouldAdvanceTime=config.shouldAdvanceTime||!1,config.advanceTimeDelta=config.advanceTimeDelta||20,config.shouldClearNativeTimers=config.shouldClearNativeTimers||!1;let hasToFake=Object.prototype.hasOwnProperty.call(config,`toFake`),hasToNotFake=Object.prototype.hasOwnProperty.call(config,`toNotFake`);if(hasToFake&&hasToNotFake)throw TypeError(`config.toFake and config.toNotFake cannot be used together`);if(config.target)throw TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function handleMissingTimer(timer){if(!config.ignoreMissingTimers)throw ReferenceError(`non-existent timers and/or objects cannot be faked: '${timer}'`)}let i,l,clock=createClock(config.now,config.loopLimit);if(clock.shouldClearNativeTimers=config.shouldClearNativeTimers,clock.abortListenerMap=new Map,hasToFake)clock.methods=config.toFake||[],clock.methods.length===0&&(clock.methods=Object.keys(timers));else if(hasToNotFake){let methodsToNotFake=config.toNotFake||[];clock.methods=Object.keys(timers).filter(method=>!methodsToNotFake.includes(method))}else clock.methods=Object.keys(timers);if(config.shouldAdvanceTime===!0&&clock.setTickMode({mode:`interval`,delta:config.advanceTimeDelta}),clock.methods.includes(`performance`)){let proto=(()=>{if(hasPerformanceConstructorPrototype)return _global.performance.constructor.prototype;if(hasPerformancePrototype)return _global.Performance.prototype})();proto?(Object.getOwnPropertyNames(proto).forEach(function(name){name!==`now`&&(clock.performance[name]=name.indexOf(`getEntries`)===0?NOOP_ARRAY:NOOP)}),clock.performance.mark=name=>new FakePerformanceEntry(name,`mark`,0,0),clock.performance.measure=name=>new FakePerformanceEntry(name,`measure`,0,100),clock.performance.timeOrigin=getEpoch(config.now)):(config.toFake||[]).includes(`performance`)&&handleMissingTimer(`performance`)}for(_global===globalObject&&timersModule&&(clock.timersModuleMethods=[]),_global===globalObject&&timersPromisesModule&&(clock.timersPromisesModuleMethods=[]),i=0,l=clock.methods.length;i<l;i++){let nameOfMethodToReplace=clock.methods[i];if(!isPresent[nameOfMethodToReplace]){handleMissingTimer(nameOfMethodToReplace);continue}if(nameOfMethodToReplace===`hrtime`?_global.process&&typeof _global.process.hrtime==`function`&&hijackMethod(_global.process,nameOfMethodToReplace,clock):nameOfMethodToReplace===`nextTick`?_global.process&&typeof _global.process.nextTick==`function`&&hijackMethod(_global.process,nameOfMethodToReplace,clock):hijackMethod(_global,nameOfMethodToReplace,clock),clock.timersModuleMethods!==void 0&&timersModule[nameOfMethodToReplace]){let original=timersModule[nameOfMethodToReplace];clock.timersModuleMethods.push({methodName:nameOfMethodToReplace,original}),timersModule[nameOfMethodToReplace]=_global[nameOfMethodToReplace]}clock.timersPromisesModuleMethods!==void 0&&(nameOfMethodToReplace===`setTimeout`?(clock.timersPromisesModuleMethods.push({methodName:`setTimeout`,original:timersPromisesModule.setTimeout}),timersPromisesModule.setTimeout=(delay,value,options={})=>new Promise((resolve,reject)=>{let abort=()=>{options.signal.removeEventListener(`abort`,abort),clock.abortListenerMap.delete(abort),clock.clearTimeout(handle),reject(options.signal.reason)},handle=clock.setTimeout(()=>{options.signal&&(options.signal.removeEventListener(`abort`,abort),clock.abortListenerMap.delete(abort)),resolve(value)},delay);options.signal&&(options.signal.aborted?abort():(options.signal.addEventListener(`abort`,abort),clock.abortListenerMap.set(abort,options.signal)))})):nameOfMethodToReplace===`setImmediate`?(clock.timersPromisesModuleMethods.push({methodName:`setImmediate`,original:timersPromisesModule.setImmediate}),timersPromisesModule.setImmediate=(value,options={})=>new Promise((resolve,reject)=>{let abort=()=>{options.signal.removeEventListener(`abort`,abort),clock.abortListenerMap.delete(abort),clock.clearImmediate(handle),reject(options.signal.reason)},handle=clock.setImmediate(()=>{options.signal&&(options.signal.removeEventListener(`abort`,abort),clock.abortListenerMap.delete(abort)),resolve(value)});options.signal&&(options.signal.aborted?abort():(options.signal.addEventListener(`abort`,abort),clock.abortListenerMap.set(abort,options.signal)))})):nameOfMethodToReplace===`setInterval`&&(clock.timersPromisesModuleMethods.push({methodName:`setInterval`,original:timersPromisesModule.setInterval}),timersPromisesModule.setInterval=(delay,value,options={})=>({[Symbol.asyncIterator]:()=>{let createResolvable=()=>{let resolve,reject,promise=new Promise((res,rej)=>{resolve=res,reject=rej});return promise.resolve=resolve,promise.reject=reject,promise},done=!1,hasThrown=!1,returnCall,nextAvailable=0,nextQueue=[],handle=clock.setInterval(()=>{nextQueue.length>0?nextQueue.shift().resolve():nextAvailable++},delay),abort=()=>{options.signal.removeEventListener(`abort`,abort),clock.abortListenerMap.delete(abort),clock.clearInterval(handle),done=!0;for(let resolvable of nextQueue)resolvable.resolve()};return options.signal&&(options.signal.aborted?done=!0:(options.signal.addEventListener(`abort`,abort),clock.abortListenerMap.set(abort,options.signal))),{next:async()=>{if(options.signal?.aborted&&!hasThrown)throw hasThrown=!0,options.signal.reason;if(done)return{done:!0,value:void 0};if(nextAvailable>0)return nextAvailable--,{done:!1,value};let resolvable=createResolvable();if(nextQueue.push(resolvable),await resolvable,returnCall&&nextQueue.length===0&&returnCall.resolve(),options.signal?.aborted&&!hasThrown)throw hasThrown=!0,options.signal.reason;return done?{done:!0,value:void 0}:{done:!1,value}},return:async()=>done?{done:!0,value:void 0}:(nextQueue.length>0&&(returnCall=createResolvable(),await returnCall),clock.clearInterval(handle),done=!0,options.signal&&(options.signal.removeEventListener(`abort`,abort),clock.abortListenerMap.delete(abort)),{done:!0,value:void 0})}}})))}return clock}return{timers,createClock,install,withGlobal}}let defaultImplementation=withGlobal(globalObject);return fakeTimersSrc.timers=defaultImplementation.timers,fakeTimersSrc.createClock=defaultImplementation.createClock,fakeTimersSrc.install=defaultImplementation.install,fakeTimersSrc.withGlobal=withGlobal,fakeTimersSrc}var fakeTimersSrcExports=requireFakeTimersSrc();const RealDate=globalThis.Date;var FakeTimers=class{_global;_clock;_fakingTime;_fakingDate;_fakeTimers;_userConfig;_now=RealDate.now;constructor({global,config}){this._userConfig=config,this._fakingDate=null,this._fakingTime=!1,this._fakeTimers=fakeTimersSrcExports.withGlobal(global),this._global=global}clearAllTimers(){this._fakingTime&&this._clock.reset()}dispose(){this.useRealTimers()}runAllTimers(){this._checkFakeTimers()&&this._clock.runAll()}async runAllTimersAsync(){this._checkFakeTimers()&&await this._clock.runAllAsync()}runOnlyPendingTimers(){this._checkFakeTimers()&&this._clock.runToLast()}async runOnlyPendingTimersAsync(){this._checkFakeTimers()&&await this._clock.runToLastAsync()}advanceTimersToNextTimer(steps=1){if(this._checkFakeTimers())for(let i=steps;i>0&&(this._clock.next(),this._clock.tick(0),this._clock.countTimers()!==0);i--);}async advanceTimersToNextTimerAsync(steps=1){if(this._checkFakeTimers())for(let i=steps;i>0&&(await this._clock.nextAsync(),this._clock.tick(0),this._clock.countTimers()!==0);i--);}advanceTimersByTime(msToRun){this._checkFakeTimers()&&this._clock.tick(msToRun)}async advanceTimersByTimeAsync(msToRun){this._checkFakeTimers()&&await this._clock.tickAsync(msToRun)}advanceTimersToNextFrame(){this._checkFakeTimers()&&this._clock.runToFrame()}runAllTicks(){this._checkFakeTimers()&&this._clock.runMicrotasks()}useRealTimers(){this._fakingDate&&=(this._clock.uninstall(),null),this._fakingTime&&=(this._clock.uninstall(),!1)}useFakeTimers(){let fakeDate=this._fakingDate||Date.now();this._fakingDate&&=(this._clock.uninstall(),null),this._fakingTime&&this._clock.uninstall();let toFake=this._userConfig?.toFake;if(isChildProcess()&&toFake?.includes(`nextTick`))throw Error(`process.nextTick cannot be mocked inside child_process`);let toNotFake=this._userConfig?.toNotFake;if(toFake===void 0&&toNotFake===void 0)toFake=Object.keys(this._fakeTimers.timers).filter(timer=>timer!==`nextTick`&&timer!==`queueMicrotask`);else if(toFake===void 0&&toNotFake!==void 0)for(let timer of[`nextTick`,`queueMicrotask`])toNotFake.includes(timer)||(toNotFake=[...toNotFake,timer]);isChildProcess()&&toNotFake&&!toNotFake.includes(`nextTick`)&&(toNotFake=[...toNotFake,`nextTick`]),this._clock=this._fakeTimers.install({now:fakeDate,...this._userConfig,...toFake&&{toFake},...toNotFake&&{toNotFake},ignoreMissingTimers:!0}),this._fakingTime=!0}reset(){if(this._checkFakeTimers()){let{now}=this._clock;this._clock.reset(),this._clock.setSystemTime(now)}}setSystemTime(now){let date=now===void 0||now instanceof Date?now:new Date(now);if(this._fakingTime)this._clock.setSystemTime(date);else{let newFakingDate=date??new Date(this.getRealSystemTime());this._fakingDate?(this._fakingDate=newFakingDate,this._clock.setSystemTime(newFakingDate)):(this._fakingDate=newFakingDate,this._clock=this._fakeTimers.install({now:newFakingDate,toFake:[`Date`,`Temporal`],ignoreMissingTimers:!0}))}}getMockedSystemTime(){return this._fakingTime?new Date(this._clock.now):this._fakingDate}getRealSystemTime(){return this._now()}getTimerCount(){return this._checkFakeTimers()?this._clock.countTimers():0}setTimerTickMode(mode,interval){if(this._checkFakeTimers()){if(mode===`manual`)this._clock.setTickMode({mode:`manual`});else if(mode===`nextTimerAsync`)this._clock.setTickMode({mode:`nextAsync`});else if(mode===`interval`)this._clock.setTickMode({mode:`interval`,delta:interval});else throw Error(`Invalid tick mode: ${mode}`)}}configure(config){this._userConfig=config}isFakeTimers(){return this._fakingTime}_checkFakeTimers(){if(!this._fakingTime)throw Error("A function to advance timers was called but the timers APIs are not mocked. Call `vi.useFakeTimers()` in the test file first.");return this._fakingTime}};const whenSymbol=Symbol.for(`$$vitest:when`);function isWhenChain(input){try{return Reflect.has(input,whenSymbol)}catch{return!1}}function when(spy,options){if(!isMockFunction(spy))throw TypeError("vi.when: the argument must be a mock function created with `vi.fn()` or `vi.spyOn()`");let behaviors=[],originalImplementation=spy.getMockImplementation();function findAction(args){let testers=[...getCustomEqualityTesters(),iterableEquality];for(let behavior of behaviors)if(equals(args,behavior.arguments,testers))return behavior.actions.findLast(action=>!(action.remaining===0&&action.called))??null;return null}spy.mockImplementation((...args)=>{let action=findAction(args);if(action===null)return(typeof options?.onUnmatched==`function`?options.onUnmatched:options?.onUnmatched===`throw`?()=>{throw Error(`vi.when: no behavior defined when called with [${args.map(arg=>stringify(arg)).join(`, `)}]`)}:originalImplementation)?.(...args);switch(--action.remaining,action.called=!0,action.type){case`return`:return action.value;case`throw`:throw action.value;case`resolve`:return Promise.resolve(action.value);case`reject`:return Promise.reject(action.value)}});function getOrCreateBehavior(args){let testers=[...getCustomEqualityTesters(),iterableEquality],behavior=behaviors.find(behavior=>equals(args,behavior.arguments,testers));return behavior===void 0&&(behavior={arguments:args,actions:[]},behaviors.push(behavior)),behavior}let output=markWhenChain({calledWith:(...args)=>{let behavior=getOrCreateBehavior(args);function appendAction(behavior,type,value,times){behavior.actions.push({type,value,times,remaining:times,called:!1})}let calledWithInstance=markWhenChain({...output,thenThrow:(value,options)=>(validateOptions(options),appendAction(behavior,`throw`,value,options?.times??1/0),calledWithInstance),thenThrowOnce:value=>(appendAction(behavior,`throw`,value,1),calledWithInstance),thenReturn:(value,options)=>(validateOptions(options),appendAction(behavior,`return`,value,options?.times??1/0),calledWithInstance),thenReturnOnce:value=>(appendAction(behavior,`return`,value,1),calledWithInstance),thenResolve:(value,options)=>(validateOptions(options),appendAction(behavior,`resolve`,value,options?.times??1/0),calledWithInstance),thenResolveOnce:value=>(appendAction(behavior,`resolve`,value,1),calledWithInstance),thenReject:(value,options)=>(validateOptions(options),appendAction(behavior,`reject`,value,options?.times??1/0),calledWithInstance),thenRejectOnce:value=>(appendAction(behavior,`reject`,value,1),calledWithInstance)});return calledWithInstance},_getDiagnostics:()=>{let pendingBehaviors=behaviors.filter(behavior=>behavior.actions.length===0||behavior.actions.some(action=>!hasBeenConsumed(action)));return{isExhausted:behaviors.length!==0&&pendingBehaviors.length===0,pendingBehaviors:pendingBehaviors.map(behavior=>`calledWith(${behavior.arguments.map(argument=>stringify(argument)).join(`, `)})${behavior.actions.length===0?` → no actions`:`\n${formatActions(behavior.actions)}`}`).join(`
|
|
210
|
+
|
|
211
|
+
`)}}});return Symbol.dispose&&(output[Symbol.dispose]=()=>{spy.mockImplementation(originalImplementation??noop$1)}),output}const whenChainMarkerOptions={};function markWhenChain(input){return Reflect.defineProperty(input,whenSymbol,whenChainMarkerOptions),input}function formatActions(actions){let lines=actions.map((action,index)=>{let method=getMethodName(action.type),left=` ${getSymbol(action)} ${method}(${stringify(action.value)}${action.times===1/0?``:`, { times: ${action.times} }`})`,unreachable=!hasBeenConsumed(action)&&actions.slice(index+1).some(later=>later.times===1/0);return{left,remaining:getRemainingLabel(action)+(unreachable?` → unreachable action`:``)}}),maxLeft=Math.max(...lines.map(line=>line.left.length));return lines.map(({left,remaining})=>`${left.padEnd(maxLeft+2)}${remaining}`).join(`
|
|
212
|
+
`)}function getMethodName(type){switch(type){case`return`:return`thenReturn`;case`resolve`:return`thenResolve`;case`throw`:return`thenThrow`;case`reject`:return`thenReject`;default:throw Error(`vi.when: "${type}" is not a known method`)}}function hasBeenConsumed(action){return action.remaining===0||action.remaining===1/0&&action.called}function getRemainingLabel(action){return hasBeenConsumed(action)?action.remaining===1/0?`exhausted`:`exhausted (${action.times} of ${action.times})`:action.remaining===1/0?`never called`:`${action.remaining} remaining (out of ${action.times})`}function getSymbol(action){return hasBeenConsumed(action)?`✓`:`✗`}function validateOptions(options){if(typeof options?.times==`number`&&options.times<=0)throw RangeError("vi.when: `times` option must be greater than 0")}function copyStackTrace$2(target,source){return source.stack!==void 0&&(target.stack=source.stack.replace(source.message,target.message)),target}function waitFor(callback,options={}){let{setTimeout,setInterval,clearTimeout,clearInterval}=getSafeTimers(),{interval=50,timeout=1e3}=typeof options==`number`?{timeout:options}:options,STACK_TRACE_ERROR=Error(`STACK_TRACE_ERROR`);return new Promise((resolve,reject)=>{let lastError,promiseStatus=`idle`,timeoutId,intervalId,onResolve=result=>{timeoutId&&clearTimeout(timeoutId),intervalId&&clearInterval(intervalId),resolve(result)},handleTimeout=()=>{intervalId&&clearInterval(intervalId);let error=lastError;error||=copyStackTrace$2(Error(`Timed out in waitFor!`),STACK_TRACE_ERROR),reject(error)},checkCallback=()=>{if(vi.isFakeTimers()&&vi.advanceTimersByTime(interval),promiseStatus!==`pending`)try{let result=callback();if(typeof result==`object`&&result&&typeof result.then==`function`){let thenable=result;promiseStatus=`pending`,thenable.then(resolvedValue=>{promiseStatus=`resolved`,onResolve(resolvedValue)},rejectedValue=>{promiseStatus=`rejected`,lastError=rejectedValue})}else return onResolve(result),!0}catch(error){lastError=error}};checkCallback()!==!0&&(timeoutId=setTimeout(handleTimeout,timeout),intervalId=setInterval(checkCallback,interval))})}function waitUntil(callback,options={}){let{setTimeout,setInterval,clearTimeout,clearInterval}=getSafeTimers(),{interval=50,timeout=1e3}=typeof options==`number`?{timeout:options}:options,STACK_TRACE_ERROR=Error(`STACK_TRACE_ERROR`);return new Promise((resolve,reject)=>{let promiseStatus=`idle`,timeoutId,intervalId,onReject=error=>{intervalId&&clearInterval(intervalId),error||=copyStackTrace$2(Error(`Timed out in waitUntil!`),STACK_TRACE_ERROR),reject(error)},onResolve=result=>{if(result)return timeoutId&&clearTimeout(timeoutId),intervalId&&clearInterval(intervalId),resolve(result),!0},checkCallback=()=>{if(vi.isFakeTimers()&&vi.advanceTimersByTime(interval),promiseStatus!==`pending`)try{let result=callback();if(typeof result==`object`&&result&&typeof result.then==`function`){let thenable=result;promiseStatus=`pending`,thenable.then(resolvedValue=>{promiseStatus=`resolved`,onResolve(resolvedValue)},rejectedValue=>{promiseStatus=`rejected`,onReject(rejectedValue)})}else return onResolve(result)}catch(error){onReject(error)}};checkCallback()!==!0&&(timeoutId=setTimeout(onReject,timeout),intervalId=setInterval(checkCallback,interval))})}function createVitest(){let _config=null,state=()=>getWorkerState(),_timers,timers=()=>_timers||=new FakeTimers({global:globalThis,config:state().config.fakeTimers}),_stubsGlobal=new Map,_stubsEnv=new Map,_envBooleans=[`PROD`,`DEV`,`SSR`],utils={useFakeTimers(config){if(isChildProcess()&&(config?.toFake?.includes(`nextTick`)||state().config?.fakeTimers?.toFake?.includes(`nextTick`)))throw Error(`vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.`);return config?timers().configure({...state().config.fakeTimers,...config}):timers().configure(state().config.fakeTimers),timers().useFakeTimers(),utils},isFakeTimers(){return timers().isFakeTimers()},useRealTimers(){return timers().useRealTimers(),utils},runOnlyPendingTimers(){return timers().runOnlyPendingTimers(),utils},async runOnlyPendingTimersAsync(){return await timers().runOnlyPendingTimersAsync(),utils},runAllTimers(){return timers().runAllTimers(),utils},async runAllTimersAsync(){return await timers().runAllTimersAsync(),utils},runAllTicks(){return timers().runAllTicks(),utils},advanceTimersByTime(ms){return timers().advanceTimersByTime(ms),utils},async advanceTimersByTimeAsync(ms){return await timers().advanceTimersByTimeAsync(ms),utils},advanceTimersToNextTimer(){return timers().advanceTimersToNextTimer(),utils},async advanceTimersToNextTimerAsync(){return await timers().advanceTimersToNextTimerAsync(),utils},advanceTimersToNextFrame(){return timers().advanceTimersToNextFrame(),utils},getTimerCount(){return timers().getTimerCount()},setSystemTime(time){return timers().setSystemTime(time),utils},getMockedSystemTime(){return timers().getMockedSystemTime()},getRealSystemTime(){return timers().getRealSystemTime()},clearAllTimers(){return timers().clearAllTimers(),utils},setTimerTickMode(mode,interval){return timers().setTimerTickMode(mode,interval),utils},spyOn,fn,when,isWhenChain,waitFor,waitUntil,defineHelper:fn=>function(...args){let result=fn.apply(this,args);if(result&&typeof result==`object`&&typeof result.then==`function`){let stackTraceError=Error(`STACK_TRACE_ERROR`);return(async function(){try{return await result}catch(error){throw error instanceof Error&&!error.stack?.includes(`__VITEST_HELPER__`)&©StackTrace$1(error,stackTraceError),error}})()}return result},hoisted(factory){return assertTypes(factory,`"vi.hoisted" factory`,[`function`]),factory()},mock(path,factory){if(typeof path!=`string`)throw TypeError(`vi.mock() expects a string path, but received a ${typeof path}`);let importer=getImporter(`mock`);_mocker().queueMock(path,importer,typeof factory==`function`?()=>factory(()=>_mocker().importActual(path,importer,_mocker().getMockContext().callstack)):factory)},unmock(path){if(typeof path!=`string`)throw TypeError(`vi.unmock() expects a string path, but received a ${typeof path}`);_mocker().queueUnmock(path,getImporter(`unmock`))},doMock(path,factory){if(typeof path!=`string`)throw TypeError(`vi.doMock() expects a string path, but received a ${typeof path}`);let importer=getImporter(`doMock`);_mocker().queueMock(path,importer,typeof factory==`function`?()=>factory(()=>_mocker().importActual(path,importer,_mocker().getMockContext().callstack)):factory);let rv={};return Symbol.dispose&&(rv[Symbol.dispose]=()=>{_mocker().queueUnmock(path,importer)}),rv},doUnmock(path){if(typeof path!=`string`)throw TypeError(`vi.doUnmock() expects a string path, but received a ${typeof path}`);let importer=getImporter(`doUnmock`);_mocker().queueUnmock(path,importer)},async importActual(path){let importer=getImporter(`importActual`);return _mocker().importActual(path,importer,_mocker().getMockContext().callstack)},async importMock(path){let importer=getImporter(`importMock`);return _mocker().importMock(path,importer)},mockObject(value,options){return _mocker().mockObject({value},void 0,options?.spy?`autospy`:`automock`).value},mocked(item,_options={}){return item},isMockFunction(fn){return isMockFunction(fn)},clearAllMocks(){return clearAllMocks(),utils},resetAllMocks(){return resetAllMocks(),utils},restoreAllMocks(){return restoreAllMocks(),utils},stubGlobal(name,value){return _stubsGlobal.has(name)||_stubsGlobal.set(name,Object.getOwnPropertyDescriptor(globalThis,name)),Object.defineProperty(globalThis,name,{value,writable:!0,configurable:!0,enumerable:!0}),utils},stubEnv(name,value){let env=state().metaEnv;return _stubsEnv.has(name)||_stubsEnv.set(name,env[name]),value===void 0?delete env[name]:env[name]=_envBooleans.includes(name)?value?`1`:``:String(value),utils},unstubAllGlobals(){return _stubsGlobal.forEach((original,name)=>{original?Object.defineProperty(globalThis,name,original):Reflect.deleteProperty(globalThis,name)}),_stubsGlobal.clear(),utils},unstubAllEnvs(){let env=state().metaEnv;return _stubsEnv.forEach((original,name)=>{original===void 0?delete env[name]:env[name]=original}),_stubsEnv.clear(),utils},resetModules(){return resetModules(state().evaluatedModules),utils},async dynamicImportSettled(){return waitForImportsToResolve()},setConfig(config){_config||={...state().config},Object.assign(state().config,config)},resetConfig(){_config&&Object.assign(state().config,_config)}};return utils}const vi=createVitest();function _mocker(){return typeof __vitest_mocker__<`u`?__vitest_mocker__:new Proxy({},{get(_,name){throw Error(`Vitest mocker was not initialized in this environment. vi.${String(name)}() is forbidden.`)}})}function getImporter(name){let stackArray=createSimpleStackTrace({stackTraceLimit:5}).split(`
|
|
213
|
+
`);return parseSingleStack(stackArray[stackArray.findLastIndex(stack=>stack.includes(` at Object.${name}`)||stack.includes(`${name}@`)||stack.includes(` at ${name} (`))+1])?.file||``}function copyStackTrace$1(target,source){return source.stack!==void 0&&(target.stack=source.stack.replace(source.message,target.message)),target}function waitNextTick(){let{setTimeout}=getSafeTimers();return new Promise(resolve=>setTimeout(resolve,0))}async function waitForImportsToResolve(){await waitNextTick();let state=getWorkerState(),promises=[],resolvingCount=state.resolvingModules.size;for(let[_,mod]of state.evaluatedModules.idToModuleMap)mod.promise&&!mod.evaluated&&promises.push(mod.promise);(promises.length||resolvingCount)&&(await Promise.allSettled(promises),await waitForImportsToResolve())}const unsupported=[`matchSnapshot`,`toMatchSnapshot`,`toMatchInlineSnapshot`,`toThrowErrorMatchingSnapshot`,`toThrowErrorMatchingInlineSnapshot`,`throws`,`Throw`,`throw`,`toThrow`,`toThrowError`];function throwWithCause(error,source){throw error.cause??=Error(`Matcher did not succeed in time.`),copyStackTrace(error,source)}function createExpectPoll(expect){return function(fn,options={}){let defaults=getWorkerState().config.expect?.poll??{},{interval=defaults.interval??50,timeout=defaults.timeout??1e3,message}=options,assertion=expect(null,message).withContext({poll:!0});fn=fn.bind(assertion),utils_exports.flag(assertion,`_poll.fn`,fn),utils_exports.flag(assertion,`_poll.timeout`,timeout),utils_exports.flag(assertion,`_poll.interval`,interval);let test=utils_exports.flag(assertion,`vitest-test`);if(!test)throw Error(`expect.poll() must be called inside a test`);let proxy=new Proxy(assertion,{get(target,key,receiver){let assertionFunction=Reflect.get(target,key,receiver);if(typeof assertionFunction!=`function`)return assertionFunction instanceof Assertion?proxy:assertionFunction;if(key===`assert`)return assertionFunction;if(typeof key==`string`&&unsupported.includes(key))throw SyntaxError(`expect.poll() is not supported in combination with .${key}(). Use vi.waitFor() if your assertion condition is unstable.`);return function(...args){let STACK_TRACE_ERROR=Error(`STACK_TRACE_ERROR`),promise=async()=>{utils_exports.flag(assertion,`_name`,key),utils_exports.flag(assertion,`error`,STACK_TRACE_ERROR);let onStart=utils_exports.flag(assertion,`_poll.onStart`),onSettled=utils_exports.flag(assertion,`_poll.onSettled`);if(await onStart?.({assertion}),Object.getOwnPropertyDescriptor(assertionFunction,`__vitest_poll_takeover__`)?.value)try{let output=await assertionFunction.call(assertion,...args);return await onSettled?.({assertion,status:`pass`}),output}catch(err){await onSettled?.({assertion,status:`fail`}),throwWithCause(err,STACK_TRACE_ERROR)}let{setTimeout,clearTimeout}=getSafeTimers(),timerId,timeoutController=new AbortController,timeoutPromise=new Promise(resolve=>{timerId=setTimeout(()=>{timeoutController.abort(),resolve()},timeout)}),lastError;try{for(;;)try{let fnResult=await raceWith(Promise.resolve().then(()=>fn({signal:timeoutController.signal})),timeoutPromise);if(!fnResult.ok){lastError??=Error(`expect.poll() function didn't resolve in time.`);break}let obj=fnResult.value;utils_exports.flag(assertion,`object`,obj);let assertionResult=await raceWith(Promise.resolve().then(()=>assertionFunction.apply(assertion,args)),timeoutPromise);if(!assertionResult.ok){lastError??=Error(`expect.poll() assertion didn't resolve in time.`);break}let output=assertionResult.value;return await onSettled?.({assertion,status:`pass`}),output}catch(err){if(lastError=err,key===`toMatchScreenshot`||!(await raceWith(delay(interval,setTimeout),timeoutPromise)).ok)break;vi.isFakeTimers()&&vi.advanceTimersByTime(interval)}}finally{clearTimeout(timerId)}lastError&&(await onSettled?.({assertion,status:`fail`}),throwWithCause(lastError,STACK_TRACE_ERROR))},awaited=!1;test.onFinished??=[],test.onFinished.push(()=>{if(!awaited){let negated=utils_exports.flag(assertion,`negate`)?`not.`:``,assertionString=`expect.${utils_exports.flag(assertion,`_poll.element`)?`element(locator)`:`poll(assertion)`}.${negated}${String(key)}()`;throw copyStackTrace(Error(`${assertionString} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:\n\nawait ${assertionString}\n`),STACK_TRACE_ERROR)}});let resultPromise,wrap=utils_exports.flag(assertion,`_poll.wrap`),start=()=>resultPromise||=wrap?wrap(promise(),STACK_TRACE_ERROR):promise();return{then(onFulfilled,onRejected){return awaited=!0,start().then(onFulfilled,onRejected)},catch(onRejected){return awaited=!0,start().catch(onRejected)},finally(onFinally){return awaited=!0,start().finally(onFinally)},[Symbol.toStringTag]:`Promise`}}}});return proxy}}function copyStackTrace(target,source){return source.stack!==void 0&&(target.stack=source.stack.replace(source.message,target.message)),target}function raceWith(promise,other){let left=promise.then(value=>({ok:!0,value}));return other?Promise.race([left,other.then(value=>({ok:!1,value}))]):left}const MockPlugin=(chai,utils)=>{utils.addMethod(chai.Assertion.prototype,`toHaveBeenExhausted`,wrapAssertion(utils,`toHaveBeenExhausted`,function(){let chain=utils.flag(this,`object`);if(!isWhenChain(chain))throw TypeError(`${utils.inspect(chain)} is not a \`vi.when\` instance`);let diagnostics=chain._getDiagnostics();this.assert(diagnostics.isExhausted,`expected all behaviors to have been exhausted, but some remain:\n\n ${diagnostics.pendingBehaviors.replaceAll(/\n(?!\n)/g,`
|
|
214
|
+
`)}`,`expected at least one behavior to remain un-exhausted, but all were`)}))};let _client;function getSnapshotClient(){return _client||=new SnapshotClient({isEqual:(received,expected)=>equals(received,expected,[iterableEquality,subsetEquality])}),_client}function getError(expected,promise){if(typeof expected!=`function`){if(!promise)throw Error(`expected must be a function, received ${typeof expected}`);return expected}try{expected()}catch(e){return e}throw Error(`snapshot function didn't throw`)}function getTestNames(test){return{filepath:test.file.filepath,name:getNames(test).slice(1).join(` > `),testId:test.id}}function getAssertionName(assertion){let name=utils_exports.flag(assertion,`_name`);if(!name)throw Error(`Assertion name is not set. This is a bug in Vitest. Please, open a new issue with reproduction.`);return name}function getTest(obj){let test=utils_exports.flag(obj,`vitest-test`);if(!test)throw Error(`'${getAssertionName(obj)}' cannot be used without test context`);if(test.fails)throw new TestSyntaxError(`'${getAssertionName(obj)}' cannot be used with 'test.fails'`);return test}function validateAssertion(assertion){if(utils_exports.flag(assertion,`negate`))throw Error(`${getAssertionName(assertion)} cannot be used with "not"`)}const SnapshotPlugin=(chai,utils)=>{for(let key of[`matchSnapshot`,`toMatchSnapshot`])utils.addMethod(chai.Assertion.prototype,key,wrapAssertion(utils,key,function(propertiesOrHint,hint){return assertMatchResult(toMatchSnapshotImpl({assertion:this,received:utils.flag(this,`object`),...normalizeArguments(propertiesOrHint,hint)}),chai.util.flag(this,`message`))}));utils.addMethod(chai.Assertion.prototype,`toMatchFileSnapshot`,function(filepath,hint){utils.flag(this,`_name`,`toMatchFileSnapshot`),validateAssertion(this);let assertPromise=toMatchFileSnapshotImpl({assertion:this,received:utils.flag(this,`object`),filepath,hint}).then(result=>assertMatchResult(result,chai.util.flag(this,`message`)));return recordAsyncExpect(getTest(this),assertPromise,createAssertionMessage(utils,this,!0),Error(`resolves`),utils.flag(this,`soft`))}),utils.addMethod(chai.Assertion.prototype,`toMatchInlineSnapshot`,wrapAssertion(utils,`toMatchInlineSnapshot`,function(propertiesOrInlineSnapshot,inlineSnapshotOrHint,hint){return assertMatchResult(toMatchSnapshotImpl({assertion:this,received:utils.flag(this,`object`),isInline:!0,...normalizeInlineArguments(propertiesOrInlineSnapshot,inlineSnapshotOrHint,hint)}),chai.util.flag(this,`message`))})),utils.addMethod(chai.Assertion.prototype,`toThrowErrorMatchingSnapshot`,wrapAssertion(utils,`toThrowErrorMatchingSnapshot`,function(propertiesOrHint,hint){validateAssertion(this);let received=utils.flag(this,`object`),promise=utils.flag(this,`promise`);return assertMatchResult(toMatchSnapshotImpl({assertion:this,received:getError(received,promise),...normalizeArguments(propertiesOrHint,hint)}),chai.util.flag(this,`message`))})),utils.addMethod(chai.Assertion.prototype,`toThrowErrorMatchingInlineSnapshot`,wrapAssertion(utils,`toThrowErrorMatchingInlineSnapshot`,function(inlineSnapshotOrHint,hint){validateAssertion(this);let received=utils.flag(this,`object`),promise=utils.flag(this,`promise`);return assertMatchResult(toMatchSnapshotImpl({assertion:this,received:getError(received,promise),isInline:!0,...normalizeInlineArguments(void 0,inlineSnapshotOrHint,hint)}),chai.util.flag(this,`message`))})),utils.addMethod(chai.expect,`addSnapshotSerializer`,addSerializer)};function normalizeArguments(propertiesOrHint,hint){return typeof propertiesOrHint==`string`?{hint:propertiesOrHint}:{properties:propertiesOrHint,hint}}function normalizeInlineArguments(propertiesOrInlineSnapshot,inlineSnapshotOrHint,hint){let inlineSnapshot;return typeof propertiesOrInlineSnapshot==`string`?(inlineSnapshot=stripSnapshotIndentation(propertiesOrInlineSnapshot),{inlineSnapshot,hint:inlineSnapshotOrHint}):(inlineSnapshotOrHint&&(inlineSnapshot=stripSnapshotIndentation(inlineSnapshotOrHint)),{properties:propertiesOrInlineSnapshot,inlineSnapshot,hint})}function toMatchSnapshotImpl(options){let{assertion}=options;validateAssertion(assertion);let assertionName=getAssertionName(assertion),test=getTest(assertion);return getSnapshotClient().match({received:options.received,properties:options.properties,message:options.hint,isInline:options.isInline,inlineSnapshot:options.inlineSnapshot,assertionName,error:utils_exports.flag(assertion,`error`),...getTestNames(test)})}async function toMatchFileSnapshotImpl(options){let{assertion}=options;validateAssertion(assertion);let testNames=getTestNames(getTest(assertion)),snapshotState=getSnapshotClient().getSnapshotState(testNames.filepath),rawSnapshotFile=await snapshotState.environment.resolveRawPath(testNames.filepath,options.filepath),rawSnapshotContent=await snapshotState.environment.readSnapshotFile(rawSnapshotFile);return getSnapshotClient().match({received:options.received,message:options.hint,rawSnapshot:{file:rawSnapshotFile,content:rawSnapshotContent??void 0},...testNames})}function assertMatchResult(result,customMessage){if(!result.pass){let errorMessage=(customMessage?`${customMessage}: `:``)+result.message();throw Object.assign(Error(errorMessage),{actual:result.actual,expected:result.expected,diffOptions:{expand:getWorkerState().config.snapshotOptions.expand}})}}use(JestExtend),use(JestChaiExpect),use(ChaiStyleAssertions),use(SnapshotPlugin),use(JestAsymmetricMatchers),use(MockPlugin);function createExpect(test){let expect$1=((value,message)=>{let{assertionCalls}=getState(expect$1);setState({assertionCalls:assertionCalls+1},expect$1);let assert=expect(value,message),_test=test||void 0;return _test?assert.withTest(_test):assert});Object.assign(expect$1,expect),Object.assign(expect$1,globalThis[ASYMMETRIC_MATCHERS_OBJECT]),expect$1.getState=()=>getState(expect$1),expect$1.setState=state=>setState(state,expect$1);let globalState=getState(globalThis[GLOBAL_EXPECT])||{};setState({...globalState,assertionCalls:0,isExpectingAssertions:!1,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return getWorkerState().filepath},currentTestName:test?test.fullTestName??``:globalState.currentTestName},expect$1),expect$1.assert=assert,expect$1.extend=matchers=>expect.extend(expect$1,matchers),expect$1.addEqualityTesters=customTesters=>addCustomEqualityTesters(customTesters),expect$1.soft=(...args)=>expect$1(...args).withContext({soft:!0}),expect$1.poll=createExpectPoll(expect$1),expect$1.unreachable=message=>{assert.fail(`expected${message?` "${message}" `:` `}not to be reached`)};function assertions(expected){let errorGen=()=>Error(`expected number of assertions to be ${expected}, but got ${expect$1.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(errorGen(),assertions),expect$1.setState({expectedAssertionsNumber:expected,expectedAssertionsNumberErrorGen:errorGen})}function hasAssertions(){let error=Error(`expected any number of assertion, but got none`);Error.captureStackTrace&&Error.captureStackTrace(error,hasAssertions),expect$1.setState({isExpectingAssertions:!0,isExpectingAssertionsError:error})}return utils_exports.addMethod(expect$1,`assertions`,assertions),utils_exports.addMethod(expect$1,`hasAssertions`,hasAssertions),expect$1.extend(customMatchers),expect$1.extend(benchMatchers),expect$1}const globalExpect=createExpect();Object.defineProperty(globalThis,GLOBAL_EXPECT,{value:globalExpect,writable:!0,configurable:!0}),globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;var NetworkFrame=class{constructor(protocol,data){this.protocol=protocol,this.data=data,this.events=new Emitter$2}protocol;data;events},NetworkFrameEvent=class extends TypedEvent$1{frame;constructor(type,frame){super(type,{}),this.frame=frame}},NetworkSource=class{emitter;constructor(){this.emitter=new Emitter$2}async queue(frame){await this.emitter.emitAsPromise(new NetworkFrameEvent(`frame`,frame))}on(type,listener,options){this.emitter.on(type,listener,options)}disable(){this.emitter.removeAllListeners()}};function shouldBypassRequest(request){return!!request.headers.get(`accept`)?.includes(`msw/passthrough`)}function isPassthroughResponse(response){return response.status===302&&response.headers.get(`x-msw-intention`)===`passthrough`}function deleteRequestPassthroughHeader(request){let acceptHeader=request.headers.get(`accept`);if(acceptHeader){let nextAcceptHeader=acceptHeader.replace(/(,\s+)?msw\/passthrough/,``);nextAcceptHeader?request.headers.set(`accept`,nextAcceptHeader):request.headers.delete(`accept`)}}var RequestEvent=class extends TypedEvent$1{requestId;request;constructor(type,data){super(type,{}),this.requestId=data.requestId,this.request=data.request}},ResponseEvent=class extends TypedEvent$1{requestId;request;response;constructor(type,data){super(type,{}),this.requestId=data.requestId,this.request=data.request,this.response=data.response}},UnhandledExceptionEvent=class extends TypedEvent$1{error;requestId;request;constructor(type,data){super(type,{}),this.error=data.error,this.requestId=data.requestId,this.request=data.request}},HttpNetworkFrame=class extends NetworkFrame{constructor(options){let id=options.id||createRequestId$2();super(`http`,{id,request:options.request})}getHandlers(controller){return controller.getHandlersByKind(`request`)}async getUnhandledMessage(){let{request}=this.data,url=new URL(request.url),publicUrl=toPublicUrl(url)+url.search,requestBody=request.body==null?null:await request.clone().text();return`intercepted a request without a matching request handler:${`
|
|
215
|
+
|
|
216
|
+
\u2022 ${request.method} ${publicUrl}
|
|
217
|
+
|
|
218
|
+
${requestBody?` \u2022 Request body: ${requestBody}
|
|
219
|
+
|
|
220
|
+
`:``}`}If you still wish to intercept this unhandled request, please create a request handler for it.
|
|
221
|
+
Read more: https://mswjs.io/docs/http/intercepting-requests`}async resolve(handlers,onUnhandledFrame,resolutionContext){let{id:requestId,request}=this.data,requestCloneForLogs=resolutionContext?.quiet?null:request.clone();if(this.events.emit(new RequestEvent(`request:start`,{requestId,request})),shouldBypassRequest(request))return this.events.emit(new RequestEvent(`request:end`,{requestId,request})),this.passthrough(),null;let[lookupError,lookupResult]=await until$1(()=>executeHandlers({requestId,request,handlers,resolutionContext:{baseUrl:resolutionContext?.baseUrl?.toString(),quiet:resolutionContext?.quiet}}));if(lookupError!=null)return this.events.emit(new UnhandledExceptionEvent(`unhandledException`,{error:lookupError,requestId,request}))||(console.error(lookupError),devUtils.error(`Encountered an unhandled exception during the handler lookup for "%s %s". Please see the original error above.`,request.method,request.url)),this.errorWith(lookupError),null;if(lookupResult==null)return this.events.emit(new RequestEvent(`request:unhandled`,{requestId,request})),await executeUnhandledFrameHandle(this,onUnhandledFrame).then(()=>this.passthrough(),error=>this.errorWith(error)),this.events.emit(new RequestEvent(`request:end`,{requestId,request})),!1;let{response,handler,parsedResult}=lookupResult;if(this.events.emit(new RequestEvent(`request:match`,{requestId,request})),response==null||isPassthroughResponse(response))return this.events.emit(new RequestEvent(`request:end`,{requestId,request})),this.passthrough(),null;let responseCloneForLogs=resolutionContext?.quiet?null:response.clone();return await storeResponseCookies(request,response),this.respondWith(response),this.events.emit(new RequestEvent(`request:end`,{requestId,request})),resolutionContext?.quiet||handler.log({request:requestCloneForLogs,response:responseCloneForLogs,parsedResult}),!0}};async function executeUnhandledFrameHandle(frame,handle){let printStrategyMessage=async strategy=>{if(strategy===`bypass`)return;let message=await frame.getUnhandledMessage();switch(strategy){case`warn`:return devUtils.warn(`Warning: %s`,message);case`error`:return devUtils.error(`Error: %s`,message)}},applyStrategy=async strategy=>{if(invariant$1.as(InternalError,strategy===`bypass`||strategy===`warn`||strategy===`error`,devUtils.formatMessage(`Failed to react to an unhandled network frame: unknown strategy "%s". Please provide one of the supported strategies ("bypass", "warn", "error") or a custom callback function as the value of the "onUnhandledRequest" option.`,strategy)),strategy!==`bypass`&&(await printStrategyMessage(strategy),strategy===`error`))return Promise.reject(new InternalError(devUtils.formatMessage(`Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.`)))};if(typeof handle==`function`)return handle({frame,defaults:{warn:printStrategyMessage.bind(null,`warn`),error:printStrategyMessage.bind(null,`error`)}});if(!(frame instanceof HttpNetworkFrame&&isCommonAssetRequest(frame.data.request)))return applyStrategy(handle)}function colorlessPromiseAll(values){let promises=[];for(let value of values)value!=null&&(typeof value==`object`||typeof value==`function`)&&typeof value.then==`function`&&promises.push(Promise.resolve(value));if(promises.length>0)return Promise.all(promises).then(()=>{})}var NetworkReadyState=(NetworkReadyState2=>(NetworkReadyState2[NetworkReadyState2.DISABLED=0]=`DISABLED`,NetworkReadyState2[NetworkReadyState2.ENABLED=1]=`ENABLED`,NetworkReadyState2))(NetworkReadyState||{});function defineNetwork(options){let readyState=0,events=new Emitter$2,disposable=new Disposable,deriveHandlersController=handlers=>handlers instanceof HandlersController?handlers:new InMemoryHandlersController(handlers||[]),resolvedOptions={...options},handlersController=deriveHandlersController(resolvedOptions.handlers);return{get readyState(){return readyState},events,configure(options2){invariant$1(readyState===0,`Failed to call "configure()" on the network: cannot configure an already enabled network.`),options2.handlers&&!Object.is(options2.handlers,resolvedOptions.handlers)&&(handlersController=deriveHandlersController(options2.handlers)),resolvedOptions={...resolvedOptions,...options2}},enable(){invariant$1(readyState===0,`Failed to call "enable" on the network: already enabled`),readyState=1;let session={active:!0};return disposable.subscriptions.push(()=>{session.active=!1}),colorlessPromiseAll(resolvedOptions.sources.map(source=>(NetworkSource.prototype.disable.call(source),source.on(`frame`,async({frame})=>{frame.events.on(`*`,event=>{session.active&&events.emit(event)});let handlers=frame.getHandlers(handlersController);await frame.resolve(handlers,resolvedOptions.onUnhandledFrame||`warn`,resolvedOptions.context)}),source.enable())))},disable(){return invariant$1(readyState===1,`Failed to call "disable" on the network: already disabled`),readyState=0,disposable.dispose(),colorlessPromiseAll(resolvedOptions.sources.map(source=>source.disable()))},use(...handlers){handlersController.use(handlers)},resetHandlers(...handlers){handlersController.reset(handlers)},restoreHandlers(){handlersController.restore()},listHandlers(){return toReadonlyArray(handlersController.currentHandlers())}}}function getGlobalSymbol$1(symbol){return globalThis[symbol]||void 0}function setGlobalSymbol$1(symbol,value){globalThis[symbol]=value}function deleteGlobalSymbol$1(symbol){delete globalThis[symbol]}let InterceptorReadyState$2=function(InterceptorReadyState$1){return InterceptorReadyState$1.INACTIVE=`INACTIVE`,InterceptorReadyState$1.APPLYING=`APPLYING`,InterceptorReadyState$1.APPLIED=`APPLIED`,InterceptorReadyState$1.DISPOSING=`DISPOSING`,InterceptorReadyState$1.DISPOSED=`DISPOSED`,InterceptorReadyState$1}({});var Interceptor$1=class{constructor(symbol){this.symbol=symbol,this.readyState=InterceptorReadyState$2.INACTIVE,this.emitter=new Emitter$1,this.subscriptions=[],this.logger=new Logger$1(symbol.description),this.emitter.setMaxListeners(0),this.logger.info(`constructing the interceptor...`)}checkEnvironment(){return!0}apply(){let logger=this.logger.extend(`apply`);if(logger.info(`applying the interceptor...`),this.readyState===InterceptorReadyState$2.APPLIED){logger.info(`intercepted already applied!`);return}if(!this.checkEnvironment()){logger.info(`the interceptor cannot be applied in this environment!`);return}this.readyState=InterceptorReadyState$2.APPLYING;let runningInstance=this.getInstance();if(runningInstance){logger.info(`found a running instance, reusing...`),this.on=(event,listener)=>(logger.info(`proxying the "%s" listener`,event),runningInstance.emitter.addListener(event,listener),this.subscriptions.push(()=>{runningInstance.emitter.removeListener(event,listener),logger.info(`removed proxied "%s" listener!`,event)}),this),this.readyState=InterceptorReadyState$2.APPLIED;return}logger.info(`no running instance found, setting up a new instance...`),this.setup(),this.setInstance(),this.readyState=InterceptorReadyState$2.APPLIED}setup(){}on(event,listener){let logger=this.logger.extend(`on`);return this.readyState===InterceptorReadyState$2.DISPOSING||this.readyState===InterceptorReadyState$2.DISPOSED?(logger.info(`cannot listen to events, already disposed!`),this):(logger.info(`adding "%s" event listener:`,event,listener),this.emitter.on(event,listener),this)}once(event,listener){return this.emitter.once(event,listener),this}off(event,listener){return this.emitter.off(event,listener),this}removeAllListeners(event){return this.emitter.removeAllListeners(event),this}dispose(){let logger=this.logger.extend(`dispose`);if(this.readyState===InterceptorReadyState$2.DISPOSED){logger.info(`cannot dispose, already disposed!`);return}if(logger.info(`disposing the interceptor...`),this.readyState=InterceptorReadyState$2.DISPOSING,!this.getInstance()){logger.info(`no interceptors running, skipping dispose...`);return}if(this.clearInstance(),logger.info(`global symbol deleted:`,getGlobalSymbol$1(this.symbol)),this.subscriptions.length>0){logger.info(`disposing of %d subscriptions...`,this.subscriptions.length);for(let dispose of this.subscriptions)dispose();this.subscriptions=[],logger.info(`disposed of all subscriptions!`,this.subscriptions.length)}this.emitter.removeAllListeners(),logger.info(`destroyed the listener!`),this.readyState=InterceptorReadyState$2.DISPOSED}getInstance(){let instance=getGlobalSymbol$1(this.symbol);return this.logger.info(`retrieved global instance:`,instance?.constructor?.name),instance}setInstance(){setGlobalSymbol$1(this.symbol,this),this.logger.info(`set global instance!`,this.symbol.description)}clearInstance(){deleteGlobalSymbol$1(this.symbol),this.logger.info(`cleared global instance!`,this.symbol.description)}};function createRequestId$1(){return Math.random().toString(16).slice(2)}function resolveWebSocketUrl$1(url){if(typeof url==`string`)return resolveWebSocketUrl$1(new URL(url,typeof location<`u`?location.href:void 0));if(url.protocol===`http:`?url.protocol=`ws:`:url.protocol===`https:`&&(url.protocol=`wss:`),url.protocol!==`ws:`&&url.protocol!==`wss:`)throw SyntaxError(`Failed to construct 'WebSocket': The URL's scheme must be either 'http', 'https', 'ws', or 'wss'. '${url.protocol}' is not allowed.`);if(url.hash!==``)throw SyntaxError(`Failed to construct 'WebSocket': The URL contains a fragment identifier ('${url.hash}'). Fragment identifiers are not allowed in WebSocket URLs.`);return url.href}async function emitAsync$1(emitter,eventName,...data){let listeners=emitter.listeners(eventName);if(listeners.length!==0)for(let listener of listeners)await listener.apply(emitter,data)}const patchesRegistry$1=new class{#replacements=new Map;applyPatch(owner,key,getNextValue){let ownerReplacements=this.#replacements.get(owner);invariant$1(!ownerReplacements?.has(key),`Failed to replace a global value at "${String(key)}": already replaced.`);let match=getDeepPropertyDescriptor$1(owner,key);if(match===void 0)return console.warn(`Failed to replace a global value at "${String(key)}": not a global value.`),()=>{};if(match.descriptor.configurable)Object.defineProperty(owner,key,{value:getNextValue(owner[key]),enumerable:!0,configurable:!0});else if(match.descriptor.writable)owner[key]=getNextValue(owner[key]);else throw Error(`Failed to patch a non-configurable non-writable property "${key.toString()}"`);let restorePatch=()=>{let currentReplacements=this.#replacements.get(owner);currentReplacements?.has(key)&&(match.owner===owner?Object.defineProperty(match.owner,key,match.descriptor):Reflect.deleteProperty(owner,key),currentReplacements.delete(key),currentReplacements.size===0&&this.#replacements.delete(owner))};return ownerReplacements?ownerReplacements.set(key,restorePatch):this.#replacements.set(owner,new Map([[key,restorePatch]])),restorePatch}restoreAllPatches(){let errors=[];for(let[,ownerReplacements]of this.#replacements)for(let[,restorePatch]of ownerReplacements)try{restorePatch()}catch(error){if(error instanceof Error)errors.push(error);else throw error}if(errors.length>0)throw AggregateError(errors,`FOO!`)}};function getDeepPropertyDescriptor$1(owner,key){let currentOwner=owner,descriptor;for(;currentOwner;){if(descriptor=Object.getOwnPropertyDescriptor(currentOwner,key),descriptor)return{owner:currentOwner,descriptor};currentOwner=Object.getPrototypeOf(currentOwner)}}function hasConfigurableGlobal$1(propertyName){let match=getDeepPropertyDescriptor$1(globalThis,propertyName);if(match===void 0)return!1;let{descriptor}=match;return typeof descriptor.get==`function`&&descriptor.get()===void 0||descriptor.get===void 0&&descriptor.value==null?!1:descriptor.set===void 0&&!descriptor.configurable?(console.error(`[MSW] Failed to apply interceptor: the global \`${propertyName}\` property is non-configurable. This is likely an issue with your environment. If you are using a framework, please open an issue about this in their repository.`),!1):!0}function bindEvent$1(target,event){return Object.defineProperties(event,{target:{value:target,enumerable:!0,writable:!0},currentTarget:{value:target,enumerable:!0,writable:!0}}),event}const kCancelable$1=Symbol(`kCancelable`),kDefaultPrevented$1=Symbol(`kDefaultPrevented`);var CancelableMessageEvent$1=class extends MessageEvent{constructor(type,init){super(type,init),this[kCancelable$1]=!!init.cancelable,this[kDefaultPrevented$1]=!1}get cancelable(){return this[kCancelable$1]}set cancelable(nextCancelable){this[kCancelable$1]=nextCancelable}get defaultPrevented(){return this[kDefaultPrevented$1]}set defaultPrevented(nextDefaultPrevented){this[kDefaultPrevented$1]=nextDefaultPrevented}preventDefault(){this.cancelable&&!this[kDefaultPrevented$1]&&(this[kDefaultPrevented$1]=!0)}},CloseEvent$1=class extends Event{constructor(type,init={}){super(type,init),this.code=init.code===void 0?0:init.code,this.reason=init.reason===void 0?``:init.reason,this.wasClean=init.wasClean!==void 0&&init.wasClean}},CancelableCloseEvent$1=class extends CloseEvent$1{constructor(type,init={}){super(type,init),this[kCancelable$1]=!!init.cancelable,this[kDefaultPrevented$1]=!1}get cancelable(){return this[kCancelable$1]}set cancelable(nextCancelable){this[kCancelable$1]=nextCancelable}get defaultPrevented(){return this[kDefaultPrevented$1]}set defaultPrevented(nextDefaultPrevented){this[kDefaultPrevented$1]=nextDefaultPrevented}preventDefault(){this.cancelable&&!this[kDefaultPrevented$1]&&(this[kDefaultPrevented$1]=!0)}};const kEmitter$1$1=Symbol(`kEmitter`),kBoundListener$1$1=Symbol(`kBoundListener`);var WebSocketClientConnection$1=class{constructor(socket,transport){this.socket=socket,this.transport=transport,this.id=createRequestId$1(),this.url=new URL(socket.url),this[kEmitter$1$1]=new EventTarget,this.transport.addEventListener(`outgoing`,event=>{let message=bindEvent$1(this.socket,new CancelableMessageEvent$1(`message`,{data:event.data,origin:event.origin,cancelable:!0}));this[kEmitter$1$1].dispatchEvent(message),message.defaultPrevented&&event.preventDefault()}),this.transport.addEventListener(`close`,event=>{this[kEmitter$1$1].dispatchEvent(bindEvent$1(this.socket,new CloseEvent$1(`close`,event)))})}addEventListener(type,listener,options){if(!Reflect.has(listener,kBoundListener$1$1)){let boundListener=listener.bind(this.socket);Object.defineProperty(listener,kBoundListener$1$1,{value:boundListener,enumerable:!1,configurable:!1})}this[kEmitter$1$1].addEventListener(type,Reflect.get(listener,kBoundListener$1$1),options)}removeEventListener(event,listener,options){this[kEmitter$1$1].removeEventListener(event,Reflect.get(listener,kBoundListener$1$1),options)}send(data){this.transport.send(data)}close(code,reason){this.transport.close(code,reason)}};const WEBSOCKET_CLOSE_CODE_RANGE_ERROR$1=`InvalidAccessError: close code out of user configurable range`,kPassthroughPromise$1=Symbol(`kPassthroughPromise`),kOnSend$1=Symbol(`kOnSend`),kClose$1=Symbol(`kClose`);var WebSocketOverride$1=class extends EventTarget{static{this.CONNECTING=0}static{this.OPEN=1}static{this.CLOSING=2}static{this.CLOSED=3}constructor(url,protocols){super(),this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this._onopen=null,this._onmessage=null,this._onerror=null,this._onclose=null,this.url=resolveWebSocketUrl$1(url),this.protocol=``,this.extensions=``,this.binaryType=`blob`,this.readyState=this.CONNECTING,this.bufferedAmount=0,this[kPassthroughPromise$1]=new DeferredPromise$2,queueMicrotask(async()=>{await this[kPassthroughPromise$1]||(this.protocol=typeof protocols==`string`?protocols:Array.isArray(protocols)&&protocols.length>0?protocols[0]:``,this.readyState===this.CONNECTING&&(this.readyState=this.OPEN,this.dispatchEvent(bindEvent$1(this,new Event(`open`)))))})}set onopen(listener){this.removeEventListener(`open`,this._onopen),this._onopen=listener,listener!==null&&this.addEventListener(`open`,listener)}get onopen(){return this._onopen}set onmessage(listener){this.removeEventListener(`message`,this._onmessage),this._onmessage=listener,listener!==null&&this.addEventListener(`message`,listener)}get onmessage(){return this._onmessage}set onerror(listener){this.removeEventListener(`error`,this._onerror),this._onerror=listener,listener!==null&&this.addEventListener(`error`,listener)}get onerror(){return this._onerror}set onclose(listener){this.removeEventListener(`close`,this._onclose),this._onclose=listener,listener!==null&&this.addEventListener(`close`,listener)}get onclose(){return this._onclose}send(data){if(this.readyState===this.CONNECTING)throw this.close(),new DOMException(`InvalidStateError`);this.readyState!==this.CLOSING&&this.readyState!==this.CLOSED&&(this.bufferedAmount+=getDataSize$1(data),queueMicrotask(()=>{this.bufferedAmount=0,this[kOnSend$1]?.(data)}))}close(code=1e3,reason){invariant$1(code,WEBSOCKET_CLOSE_CODE_RANGE_ERROR$1),invariant$1(code===1e3||code>=3e3&&code<=4999,WEBSOCKET_CLOSE_CODE_RANGE_ERROR$1),this[kClose$1](code,reason)}[kClose$1](code=1e3,reason,wasClean=!0){this.readyState!==this.CLOSING&&this.readyState!==this.CLOSED&&(this.readyState=this.CLOSING,queueMicrotask(()=>{this.readyState=this.CLOSED,this.dispatchEvent(bindEvent$1(this,new CloseEvent$1(`close`,{code,reason,wasClean}))),this._onopen=null,this._onmessage=null,this._onerror=null,this._onclose=null}))}addEventListener(type,listener,options){return super.addEventListener(type,listener,options)}removeEventListener(type,callback,options){return super.removeEventListener(type,callback,options)}};function getDataSize$1(data){return typeof data==`string`?data.length:data instanceof Blob?data.size:data.byteLength}const kEmitter$2=Symbol(`kEmitter`),kBoundListener$2=Symbol(`kBoundListener`),kSend$1=Symbol(`kSend`);var WebSocketServerConnection$1=class{constructor(client,transport,createConnection){this.client=client,this.transport=transport,this.createConnection=createConnection,this[kEmitter$2]=new EventTarget,this.mockCloseController=new AbortController,this.realCloseController=new AbortController,this.transport.addEventListener(`outgoing`,event=>{this.realWebSocket!==void 0&&queueMicrotask(()=>{event.defaultPrevented||this[kSend$1](event.data)})}),this.transport.addEventListener(`incoming`,this.handleIncomingMessage.bind(this))}get socket(){return invariant$1(this.realWebSocket,'Cannot access "socket" on the original WebSocket server object: the connection is not open. Did you forget to call `server.connect()`?'),this.realWebSocket}connect(){invariant$1(!this.realWebSocket||this.realWebSocket.readyState!==WebSocket.OPEN,`Failed to call "connect()" on the original WebSocket instance: the connection already open`);let realWebSocket=this.createConnection();realWebSocket.binaryType=this.client.binaryType,realWebSocket.addEventListener(`open`,event=>{this[kEmitter$2].dispatchEvent(bindEvent$1(this.realWebSocket,new Event(`open`,event)))},{once:!0}),realWebSocket.addEventListener(`message`,event=>{this.transport.dispatchEvent(bindEvent$1(this.realWebSocket,new MessageEvent(`incoming`,{data:event.data,origin:event.origin})))}),this.client.addEventListener(`close`,event=>{this.handleMockClose(event)},{signal:this.mockCloseController.signal}),realWebSocket.addEventListener(`close`,event=>{this.handleRealClose(event)},{signal:this.realCloseController.signal}),realWebSocket.addEventListener(`error`,()=>{let errorEvent=bindEvent$1(realWebSocket,new Event(`error`,{cancelable:!0}));this[kEmitter$2].dispatchEvent(errorEvent),errorEvent.defaultPrevented||this.client.dispatchEvent(bindEvent$1(this.client,new Event(`error`)))}),this.realWebSocket=realWebSocket}addEventListener(event,listener,options){if(!Reflect.has(listener,kBoundListener$2)){let boundListener=listener.bind(this.client);Object.defineProperty(listener,kBoundListener$2,{value:boundListener,enumerable:!1})}this[kEmitter$2].addEventListener(event,Reflect.get(listener,kBoundListener$2),options)}removeEventListener(event,listener,options){this[kEmitter$2].removeEventListener(event,Reflect.get(listener,kBoundListener$2),options)}send(data){this[kSend$1](data)}[kSend$1](data){let{realWebSocket}=this;if(invariant$1(realWebSocket,`Failed to call "server.send()" for "%s": the connection is not open. Did you forget to call "server.connect()"?`,this.client.url),realWebSocket.readyState!==WebSocket.CLOSING&&realWebSocket.readyState!==WebSocket.CLOSED){if(realWebSocket.readyState===WebSocket.CONNECTING){realWebSocket.addEventListener(`open`,()=>{realWebSocket.send(data)},{once:!0});return}realWebSocket.send(data)}}close(){let{realWebSocket}=this;invariant$1(realWebSocket,`Failed to close server connection for "%s": the connection is not open. Did you forget to call "server.connect()"?`,this.client.url),this.realCloseController.abort(),realWebSocket.readyState!==WebSocket.CLOSING&&realWebSocket.readyState!==WebSocket.CLOSED&&(realWebSocket.close(),queueMicrotask(()=>{this[kEmitter$2].dispatchEvent(bindEvent$1(this.realWebSocket,new CancelableCloseEvent$1(`close`,{code:1e3,cancelable:!0})))}))}handleIncomingMessage(event){let messageEvent=bindEvent$1(event.target,new CancelableMessageEvent$1(`message`,{data:event.data,origin:event.origin,cancelable:!0}));this[kEmitter$2].dispatchEvent(messageEvent),messageEvent.defaultPrevented||this.client.dispatchEvent(bindEvent$1(this.client,new MessageEvent(`message`,{data:event.data,origin:event.origin})))}handleMockClose(_event){this.realWebSocket&&this.realWebSocket.close()}handleRealClose(event){this.mockCloseController.abort();let closeEvent=bindEvent$1(this.realWebSocket,new CancelableCloseEvent$1(`close`,{code:event.code,reason:event.reason,wasClean:event.wasClean,cancelable:!0}));this[kEmitter$2].dispatchEvent(closeEvent),closeEvent.defaultPrevented||this.client[kClose$1](event.code,event.reason)}},WebSocketClassTransport$1=class extends EventTarget{constructor(socket){super(),this.socket=socket,this.socket.addEventListener(`close`,event=>{this.dispatchEvent(bindEvent$1(this.socket,new CloseEvent$1(`close`,event)))}),this.socket[kOnSend$1]=data=>{this.dispatchEvent(bindEvent$1(this.socket,new CancelableMessageEvent$1(`outgoing`,{data,origin:this.socket.url,cancelable:!0})))}}addEventListener(type,callback,options){return super.addEventListener(type,callback,options)}dispatchEvent(event){return super.dispatchEvent(event)}send(data){queueMicrotask(()=>{if(this.socket.readyState===this.socket.CLOSING||this.socket.readyState===this.socket.CLOSED)return;let dispatchEvent=()=>{this.socket.dispatchEvent(bindEvent$1(this.socket,new MessageEvent(`message`,{data,origin:this.socket.url})))};this.socket.readyState===this.socket.CONNECTING?this.socket.addEventListener(`open`,()=>{dispatchEvent()},{once:!0}):dispatchEvent()})}close(code,reason){this.socket[kClose$1](code,reason)}};(class WebSocketInterceptor extends Interceptor$1{static{this.symbol=Symbol.for(`websocket-interceptor`)}constructor(){super(WebSocketInterceptor.symbol)}checkEnvironment(){return hasConfigurableGlobal$1(`WebSocket`)}setup(){let logger=this.logger.extend(`setup`),WebSocketProxy=new Proxy(globalThis.WebSocket,{construct:(target,args,newTarget)=>{let[url,protocols]=args,createConnection=()=>Reflect.construct(target,args,newTarget),socket=new WebSocketOverride$1(url,protocols),transport=new WebSocketClassTransport$1(socket);return queueMicrotask(async()=>{try{let server=new WebSocketServerConnection$1(socket,transport,createConnection),hasConnectionListeners=this.emitter.listenerCount(`connection`)>0;await emitAsync$1(this.emitter,`connection`,{client:new WebSocketClientConnection$1(socket,transport),server,info:{protocols}}),hasConnectionListeners?socket[kPassthroughPromise$1].resolve(!1):(socket[kPassthroughPromise$1].resolve(!0),server.connect(),server.addEventListener(`open`,()=>{socket.dispatchEvent(bindEvent$1(socket,new Event(`open`))),server.realWebSocket&&(socket.protocol=server.realWebSocket.protocol)}))}catch(error){error instanceof Error&&(socket.dispatchEvent(new Event(`error`)),socket.readyState!==WebSocket.CLOSING&&socket.readyState!==WebSocket.CLOSED&&socket[kClose$1](1011,error.message,!1),console.error(error))}}),socket}});logger.info(`patching global WebSocket...`),this.subscriptions.push(patchesRegistry$1.applyPatch(globalThis,`WebSocket`,()=>WebSocketProxy)),logger.info(`global WebSocket patched!`,globalThis.WebSocket.name)}});var WebSocketConnectionEvent=class extends TypedEvent$1{url;protocols;constructor(type,data){super(type,{}),this.url=data.url,this.protocols=data.protocols}},UnhandledWebSocketExceptionEvent=class extends TypedEvent$1{url;protocols;error;constructor(type,data){super(type,{}),this.url=data.url,this.protocols=data.protocols,this.error=data.error}},WebSocketNetworkFrame=class extends NetworkFrame{constructor(options){super(`ws`,{connection:options.connection})}getHandlers(controller){return controller.getHandlersByKind(`websocket`)}async resolve(handlers,onUnhandledFrame,resolutionContext){let{connection}=this.data;if(this.events.emit(new WebSocketConnectionEvent(`connection`,{url:connection.client.url,protocols:connection.info.protocols})),handlers.length===0)return await executeUnhandledFrameHandle(this,onUnhandledFrame).then(()=>this.passthrough(),error=>this.errorWith(error)),!1;let hasMatchingHandlers=!1;for(let handler of handlers){let handlerConnection=await handler.run(connection,{baseUrl:resolutionContext?.baseUrl?.toString(),[kAutoConnect]:!1});if(!handlerConnection)continue;hasMatchingHandlers=!0;let removeLogger=resolutionContext?.quiet?void 0:handler.log(connection);try{handler[kConnect](handlerConnection)||removeLogger?.()}catch(error){throw this.events.emit(new UnhandledWebSocketExceptionEvent(`unhandledException`,{error,url:connection.client.url,protocols:connection.info.protocols}))||(console.error(error),devUtils.error(`Encountered an unhandled exception during the handler lookup for "%s". Please see the original error above.`,connection.client.url)),error}}return hasMatchingHandlers?!0:(await executeUnhandledFrameHandle(this,onUnhandledFrame).then(()=>this.passthrough(),error=>this.errorWith(error)),!1)}async getUnhandledMessage(){let{connection}=this.data;return`intercepted a WebSocket connection without a matching event handler:${`
|
|
222
|
+
|
|
223
|
+
\u2022 ${connection.client.url}
|
|
224
|
+
|
|
225
|
+
`}If you still wish to intercept this unhandled connection, please create an event handler for it.
|
|
226
|
+
Read more: https://mswjs.io/docs/websocket`}},InterceptorSource=class extends NetworkSource{#interceptor;#frames;constructor(options){super(),this.#interceptor=new BatchInterceptor({name:`interceptor-source`,interceptors:options.interceptors}),this.#frames=new Map}enable(){this.#interceptor.apply(),this.#interceptor.on(`request`,this.#handleRequest.bind(this)).on(`response`,this.#handleResponse.bind(this)).on(`connection`,this.#handleWebSocketConnection.bind(this))}disable(){super.disable(),this.#interceptor.dispose(),this.#frames.clear()}async#handleRequest({requestId,request,controller}){let httpFrame=new InterceptorHttpNetworkFrame({id:requestId,request,controller});this.#frames.set(requestId,httpFrame),await this.queue(httpFrame)}async#handleResponse({requestId,request,response,isMockedResponse}){let httpFrame=this.#frames.get(requestId);this.#frames.delete(requestId),httpFrame!=null&&queueMicrotask(()=>{try{httpFrame.events.emit(new ResponseEvent(isMockedResponse?`response:mocked`:`response:bypass`,{requestId,request,response}))}finally{httpFrame.events.removeAllListeners()}})}async#handleWebSocketConnection(connection){await this.queue(new InterceptorWebSocketNetworkFrame({connection}))}},InterceptorHttpNetworkFrame=class extends HttpNetworkFrame{#controller;constructor(options){super({id:options.id,request:options.request}),this.#controller=options.controller}passthrough(){deleteRequestPassthroughHeader(this.data.request)}respondWith(response){response&&this.#controller.respondWith(response)}errorWith(reason){if(reason instanceof Response)return this.respondWith(reason);throw reason instanceof InternalError&&this.#controller.errorWith(reason),reason}},InterceptorWebSocketNetworkFrame=class extends WebSocketNetworkFrame{constructor(args){super({connection:args.connection}),args.connection.client.addEventListener(`close`,()=>{this.events.removeAllListeners()},{once:!0})}errorWith(reason){if(reason instanceof Error){let{client}=this.data.connection,errorEvent=new Event(`error`);Object.defineProperty(errorEvent,"cause",{enumerable:!0,configurable:!1,value:reason}),client.socket.dispatchEvent(errorEvent)}}passthrough(){this.data.connection.server.connect()}};function fromLegacyOnUnhandledRequest(getLegacyValue){return({frame,defaults})=>{let legacyOnUnhandledRequestStrategy=getLegacyValue();if(legacyOnUnhandledRequestStrategy!=null){if(typeof legacyOnUnhandledRequestStrategy==`function`){let request=frame instanceof HttpNetworkFrame?frame.data.request:frame instanceof WebSocketNetworkFrame?new Request(frame.data.connection.client.url,{headers:{connection:`upgrade`,upgrade:`websocket`}}):null;return invariant$1(request!=null,'Failed to coerce a network frame to a legacy `onUnhandledRequest` strategy: unknown frame protocol "%s"',frame.protocol),legacyOnUnhandledRequestStrategy(request,{warning:defaults.warn,error:defaults.error})}return executeUnhandledFrameHandle(frame,legacyOnUnhandledRequestStrategy)}}}function toResponseInit(response){return{status:response.status,statusText:response.statusText,headers:Object.fromEntries(response.headers.entries())}}var POSITIONALS_EXP=/(%?)(%([sdijo]))/g;function serializePositional(positional,flag){switch(flag){case`s`:return positional;case`d`:case`i`:return Number(positional);case`j`:return JSON.stringify(positional);case`o`:{if(typeof positional==`string`)return positional;let json=JSON.stringify(positional);return json===`{}`||json===`[]`||/^\[object .+?\]$/.test(json)?positional:json}}}function format(message,...positionals){if(positionals.length===0)return message;let positionalIndex=0,formattedMessage=message.replace(POSITIONALS_EXP,(match,isEscaped,_,flag)=>{let positional=positionals[positionalIndex],value=serializePositional(positional,flag);return isEscaped?match:(positionalIndex++,value)});return positionalIndex<positionals.length&&(formattedMessage+=` ${positionals.slice(positionalIndex).join(` `)}`),formattedMessage=formattedMessage.replace(/%{2,2}/g,`%`),formattedMessage}var STACK_FRAMES_TO_IGNORE=2;function cleanErrorStack(error2){if(!error2.stack)return;let nextStack=error2.stack.split(`
|
|
227
|
+
`);nextStack.splice(1,STACK_FRAMES_TO_IGNORE),error2.stack=nextStack.join(`
|
|
228
|
+
`)}var InvariantError=class extends Error{constructor(message,...positionals){super(message),this.message=message,this.name=`Invariant Violation`,this.message=format(message,...positionals),cleanErrorStack(this)}},invariant=(predicate,message,...positionals)=>{if(!predicate)throw new InvariantError(message,...positionals)};invariant.as=(ErrorConstructor,predicate,message,...positionals)=>{if(!predicate){let formatMessage=positionals.length===0?message:format(message,...positionals),error2;try{error2=Reflect.construct(ErrorConstructor,[formatMessage])}catch{error2=ErrorConstructor(formatMessage)}throw error2}};function isNodeProcess(){if(typeof navigator<`u`&&navigator.product===`ReactNative`)return!0;if(typeof process<`u`){let type=process.type;return type===`renderer`||type===`worker`?!1:!!(process.versions&&process.versions.node)}return!1}var __defProp=Object.defineProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},colors_exports={};__export(colors_exports,{blue:()=>blue,gray:()=>gray,green:()=>green,red:()=>red,yellow:()=>yellow});function yellow(text){return`\x1B[33m${text}\x1B[0m`}function blue(text){return`\x1B[34m${text}\x1B[0m`}function gray(text){return`\x1B[90m${text}\x1B[0m`}function red(text){return`\x1B[31m${text}\x1B[0m`}function green(text){return`\x1B[32m${text}\x1B[0m`}var IS_NODE=isNodeProcess(),Logger=class{constructor(name){this.name=name,this.prefix=`[${this.name}]`;let LOGGER_NAME=getVariable(`DEBUG`),LOGGER_LEVEL=getVariable(`LOG_LEVEL`);LOGGER_NAME===`1`||LOGGER_NAME===`true`||LOGGER_NAME!==void 0&&this.name.startsWith(LOGGER_NAME)?(this.debug=isDefinedAndNotEquals(LOGGER_LEVEL,`debug`)?noop:this.debug,this.info=isDefinedAndNotEquals(LOGGER_LEVEL,`info`)?noop:this.info,this.success=isDefinedAndNotEquals(LOGGER_LEVEL,`success`)?noop:this.success,this.warning=isDefinedAndNotEquals(LOGGER_LEVEL,`warning`)?noop:this.warning,this.error=isDefinedAndNotEquals(LOGGER_LEVEL,`error`)?noop:this.error):(this.info=noop,this.success=noop,this.warning=noop,this.error=noop,this.only=noop)}prefix;extend(domain){return new Logger(`${this.name}:${domain}`)}debug(message,...positionals){this.logEntry({level:`debug`,message:gray(message),positionals,prefix:this.prefix,colors:{prefix:`gray`}})}info(message,...positionals){this.logEntry({level:`info`,message,positionals,prefix:this.prefix,colors:{prefix:`blue`}});let performance2=new PerformanceEntry;return(message2,...positionals2)=>{performance2.measure(),this.logEntry({level:`info`,message:`${message2} ${gray(`${performance2.deltaTime}ms`)}`,positionals:positionals2,prefix:this.prefix,colors:{prefix:`blue`}})}}success(message,...positionals){this.logEntry({level:`info`,message,positionals,prefix:`\u2714 ${this.prefix}`,colors:{timestamp:`green`,prefix:`green`}})}warning(message,...positionals){this.logEntry({level:`warning`,message,positionals,prefix:`\u26A0 ${this.prefix}`,colors:{timestamp:`yellow`,prefix:`yellow`}})}error(message,...positionals){this.logEntry({level:`error`,message,positionals,prefix:`\u2716 ${this.prefix}`,colors:{timestamp:`red`,prefix:`red`}})}only(callback){callback()}createEntry(level,message){return{timestamp:new Date,level,message}}logEntry(args){let{level,message,prefix,colors:customColors,positionals=[]}=args,entry=this.createEntry(level,message),timestampColor=customColors?.timestamp||`gray`,prefixColor=customColors?.prefix||`gray`,colorize={timestamp:colors_exports[timestampColor],prefix:colors_exports[prefixColor]};this.getWriter(level)([colorize.timestamp(this.formatTimestamp(entry.timestamp))].concat(prefix==null?[]:colorize.prefix(prefix),serializeInput(message)).join(` `),...positionals.map(serializeInput))}formatTimestamp(timestamp){return`${timestamp.toLocaleTimeString(`en-GB`)}:${timestamp.getMilliseconds()}`}getWriter(level){switch(level){case`debug`:case`success`:case`info`:return log;case`warning`:return warn;case`error`:return error}}},PerformanceEntry=class{startTime;endTime;deltaTime;constructor(){this.startTime=performance.now()}measure(){this.endTime=performance.now();let deltaTime=this.endTime-this.startTime;this.deltaTime=deltaTime.toFixed(2)}},noop=()=>void 0;function log(message,...positionals){if(IS_NODE){process.stdout.write(format(message,...positionals)+`
|
|
229
|
+
`);return}console.log(message,...positionals)}function warn(message,...positionals){if(IS_NODE){process.stderr.write(format(message,...positionals)+`
|
|
230
|
+
`);return}console.warn(message,...positionals)}function error(message,...positionals){if(IS_NODE){process.stderr.write(format(message,...positionals)+`
|
|
231
|
+
`);return}console.error(message,...positionals)}function getVariable(variableName){return IS_NODE?process.env[variableName]:globalThis[variableName]?.toString()}function isDefinedAndNotEquals(value,expected){return value!==void 0&&value!==expected}function serializeInput(message){return message===void 0?`undefined`:message===null?`null`:typeof message==`string`?message:typeof message==`object`?JSON.stringify(message):message.toString()}var MemoryLeakError=class extends Error{constructor(emitter,type,count){super(`Possible EventEmitter memory leak detected. ${count} ${type.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=emitter,this.type=type,this.count=count,this.name=`MaxListenersExceededWarning`}},_Emitter=class{static listenerCount(emitter,eventName){return emitter.listenerCount(eventName)}constructor(){this.events=new Map,this.maxListeners=_Emitter.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}_emitInternalEvent(internalEventName,eventName,listener){this.emit(internalEventName,eventName,listener)}_getListeners(eventName){return Array.prototype.concat.apply([],this.events.get(eventName))||[]}_removeListener(listeners,listener){let index=listeners.indexOf(listener);return index>-1&&listeners.splice(index,1),[]}_wrapOnceListener(eventName,listener){let onceListener=(...data)=>(this.removeListener(eventName,onceListener),listener.apply(this,data));return Object.defineProperty(onceListener,"name",{value:listener.name}),onceListener}setMaxListeners(maxListeners){return this.maxListeners=maxListeners,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(eventName,...data){let listeners=this._getListeners(eventName);return listeners.forEach(listener=>{listener.apply(this,data)}),listeners.length>0}addListener(eventName,listener){this._emitInternalEvent(`newListener`,eventName,listener);let nextListeners=this._getListeners(eventName).concat(listener);if(this.events.set(eventName,nextListeners),this.maxListeners>0&&this.listenerCount(eventName)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;let memoryLeakWarning=new MemoryLeakError(this,eventName,this.listenerCount(eventName));console.warn(memoryLeakWarning)}return this}on(eventName,listener){return this.addListener(eventName,listener)}once(eventName,listener){return this.addListener(eventName,this._wrapOnceListener(eventName,listener))}prependListener(eventName,listener){let listeners=this._getListeners(eventName);if(listeners.length>0){let nextListeners=[listener].concat(listeners);this.events.set(eventName,nextListeners)}else this.events.set(eventName,listeners.concat(listener));return this}prependOnceListener(eventName,listener){return this.prependListener(eventName,this._wrapOnceListener(eventName,listener))}removeListener(eventName,listener){let listeners=this._getListeners(eventName);return listeners.length>0&&(this._removeListener(listeners,listener),this.events.set(eventName,listeners),this._emitInternalEvent(`removeListener`,eventName,listener)),this}off(eventName,listener){return this.removeListener(eventName,listener)}removeAllListeners(eventName){return eventName?this.events.delete(eventName):this.events.clear(),this}listeners(eventName){return Array.from(this._getListeners(eventName))}listenerCount(eventName){return this._getListeners(eventName).length}rawListeners(eventName){return this.listeners(eventName)}},Emitter=_Emitter;Emitter.defaultMaxListeners=10;var INTERNAL_REQUEST_ID_HEADER_NAME=`x-interceptors-internal-request-id`;function getGlobalSymbol(symbol){return globalThis[symbol]||void 0}function setGlobalSymbol(symbol,value){globalThis[symbol]=value}function deleteGlobalSymbol(symbol){delete globalThis[symbol]}var InterceptorReadyState=(function(InterceptorReadyState$1){return InterceptorReadyState$1.INACTIVE=`INACTIVE`,InterceptorReadyState$1.APPLYING=`APPLYING`,InterceptorReadyState$1.APPLIED=`APPLIED`,InterceptorReadyState$1.DISPOSING=`DISPOSING`,InterceptorReadyState$1.DISPOSED=`DISPOSED`,InterceptorReadyState$1})({}),Interceptor=class{constructor(symbol){this.symbol=symbol,this.readyState=InterceptorReadyState.INACTIVE,this.emitter=new Emitter,this.subscriptions=[],this.logger=new Logger(symbol.description),this.emitter.setMaxListeners(0),this.logger.info(`constructing the interceptor...`)}checkEnvironment(){return!0}apply(){let logger=this.logger.extend(`apply`);if(logger.info(`applying the interceptor...`),this.readyState===InterceptorReadyState.APPLIED){logger.info(`intercepted already applied!`);return}if(!this.checkEnvironment()){logger.info(`the interceptor cannot be applied in this environment!`);return}this.readyState=InterceptorReadyState.APPLYING;let runningInstance=this.getInstance();if(runningInstance){logger.info(`found a running instance, reusing...`),this.on=(event,listener)=>(logger.info(`proxying the "%s" listener`,event),runningInstance.emitter.addListener(event,listener),this.subscriptions.push(()=>{runningInstance.emitter.removeListener(event,listener),logger.info(`removed proxied "%s" listener!`,event)}),this),this.readyState=InterceptorReadyState.APPLIED;return}logger.info(`no running instance found, setting up a new instance...`),this.setup(),this.setInstance(),this.readyState=InterceptorReadyState.APPLIED}setup(){}on(event,listener){let logger=this.logger.extend(`on`);return this.readyState===InterceptorReadyState.DISPOSING||this.readyState===InterceptorReadyState.DISPOSED?(logger.info(`cannot listen to events, already disposed!`),this):(logger.info(`adding "%s" event listener:`,event,listener),this.emitter.on(event,listener),this)}once(event,listener){return this.emitter.once(event,listener),this}off(event,listener){return this.emitter.off(event,listener),this}removeAllListeners(event){return this.emitter.removeAllListeners(event),this}dispose(){let logger=this.logger.extend(`dispose`);if(this.readyState===InterceptorReadyState.DISPOSED){logger.info(`cannot dispose, already disposed!`);return}if(logger.info(`disposing the interceptor...`),this.readyState=InterceptorReadyState.DISPOSING,!this.getInstance()){logger.info(`no interceptors running, skipping dispose...`);return}if(this.clearInstance(),logger.info(`global symbol deleted:`,getGlobalSymbol(this.symbol)),this.subscriptions.length>0){logger.info(`disposing of %d subscriptions...`,this.subscriptions.length);for(let dispose of this.subscriptions)dispose();this.subscriptions=[],logger.info(`disposed of all subscriptions!`,this.subscriptions.length)}this.emitter.removeAllListeners(),logger.info(`destroyed the listener!`),this.readyState=InterceptorReadyState.DISPOSED}getInstance(){let instance=getGlobalSymbol(this.symbol);return this.logger.info(`retrieved global instance:`,instance?.constructor?.name),instance}setInstance(){setGlobalSymbol(this.symbol,this),this.logger.info(`set global instance!`,this.symbol.description)}clearInstance(){deleteGlobalSymbol(this.symbol),this.logger.info(`cleared global instance!`,this.symbol.description)}};function createRequestId(){return Math.random().toString(16).slice(2)}function resolveWebSocketUrl(url){if(typeof url==`string`)return resolveWebSocketUrl(new URL(url,typeof location<`u`?location.href:void 0));if(url.protocol===`http:`?url.protocol=`ws:`:url.protocol===`https:`&&(url.protocol=`wss:`),url.protocol!==`ws:`&&url.protocol!==`wss:`)throw SyntaxError(`Failed to construct 'WebSocket': The URL's scheme must be either 'http', 'https', 'ws', or 'wss'. '${url.protocol}' is not allowed.`);if(url.hash!==``)throw SyntaxError(`Failed to construct 'WebSocket': The URL contains a fragment identifier ('${url.hash}'). Fragment identifiers are not allowed in WebSocket URLs.`);return url.href}async function emitAsync(emitter,eventName,...data){let listeners=emitter.listeners(eventName);if(listeners.length!==0)for(let listener of listeners)await listener.apply(emitter,data)}var patchesRegistry=new class{#replacements=new Map;applyPatch(owner,key,getNextValue){let ownerReplacements=this.#replacements.get(owner);invariant(!ownerReplacements?.has(key),`Failed to replace a global value at "${String(key)}": already replaced.`);let match=getDeepPropertyDescriptor(owner,key);if(match===void 0)return console.warn(`Failed to replace a global value at "${String(key)}": not a global value.`),()=>{};if(match.descriptor.configurable)Object.defineProperty(owner,key,{value:getNextValue(owner[key]),enumerable:!0,configurable:!0});else if(match.descriptor.writable)owner[key]=getNextValue(owner[key]);else throw Error(`Failed to patch a non-configurable non-writable property "${key.toString()}"`);let restorePatch=()=>{let currentReplacements=this.#replacements.get(owner);currentReplacements?.has(key)&&(match.owner===owner?Object.defineProperty(match.owner,key,match.descriptor):Reflect.deleteProperty(owner,key),currentReplacements.delete(key),currentReplacements.size===0&&this.#replacements.delete(owner))};return ownerReplacements?ownerReplacements.set(key,restorePatch):this.#replacements.set(owner,new Map([[key,restorePatch]])),restorePatch}restoreAllPatches(){let errors=[];for(let[,ownerReplacements]of this.#replacements)for(let[,restorePatch]of ownerReplacements)try{restorePatch()}catch(error2){if(error2 instanceof Error)errors.push(error2);else throw error2}if(errors.length>0)throw AggregateError(errors,`FOO!`)}};function getDeepPropertyDescriptor(owner,key){let currentOwner=owner,descriptor;for(;currentOwner;){if(descriptor=Object.getOwnPropertyDescriptor(currentOwner,key),descriptor)return{owner:currentOwner,descriptor};currentOwner=Object.getPrototypeOf(currentOwner)}}function hasConfigurableGlobal(propertyName){let match=getDeepPropertyDescriptor(globalThis,propertyName);if(match===void 0)return!1;let{descriptor}=match;return typeof descriptor.get==`function`&&descriptor.get()===void 0||descriptor.get===void 0&&descriptor.value==null?!1:descriptor.set===void 0&&!descriptor.configurable?(console.error(`[MSW] Failed to apply interceptor: the global \`${propertyName}\` property is non-configurable. This is likely an issue with your environment. If you are using a framework, please open an issue about this in their repository.`),!1):!0}function createDeferredExecutor(){let executor=(resolve,reject)=>{executor.state=`pending`,executor.resolve=data=>executor.state===`pending`?(executor.result=data,resolve(data instanceof Promise?data:Promise.resolve(data).then(value=>(executor.state=`fulfilled`,value)))):void 0,executor.reject=reason=>{if(executor.state===`pending`)return queueMicrotask(()=>{executor.state=`rejected`}),reject(executor.rejectionReason=reason)}};return executor}var DeferredPromise=class extends Promise{#executor;resolve;reject;constructor(executor=null){let deferredExecutor=createDeferredExecutor();super((originalResolve,originalReject)=>{deferredExecutor(originalResolve,originalReject),executor?.(deferredExecutor.resolve,deferredExecutor.reject)}),this.#executor=deferredExecutor,this.resolve=this.#executor.resolve,this.reject=this.#executor.reject}get state(){return this.#executor.state}get rejectionReason(){return this.#executor.rejectionReason}then(onFulfilled,onRejected){return this.#decorate(super.then(onFulfilled,onRejected))}catch(onRejected){return this.#decorate(super.catch(onRejected))}finally(onfinally){return this.#decorate(super.finally(onfinally))}#decorate(promise){return Object.defineProperties(promise,{resolve:{configurable:!0,value:this.resolve},reject:{configurable:!0,value:this.reject}})}};function bindEvent(target,event){return Object.defineProperties(event,{target:{value:target,enumerable:!0,writable:!0},currentTarget:{value:target,enumerable:!0,writable:!0}}),event}var kCancelable=Symbol(`kCancelable`),kDefaultPrevented=Symbol(`kDefaultPrevented`),CancelableMessageEvent=class extends MessageEvent{constructor(type,init){super(type,init),this[kCancelable]=!!init.cancelable,this[kDefaultPrevented]=!1}get cancelable(){return this[kCancelable]}set cancelable(nextCancelable){this[kCancelable]=nextCancelable}get defaultPrevented(){return this[kDefaultPrevented]}set defaultPrevented(nextDefaultPrevented){this[kDefaultPrevented]=nextDefaultPrevented}preventDefault(){this.cancelable&&!this[kDefaultPrevented]&&(this[kDefaultPrevented]=!0)}},CloseEvent=class extends Event{constructor(type,init={}){super(type,init),this.code=init.code===void 0?0:init.code,this.reason=init.reason===void 0?``:init.reason,this.wasClean=init.wasClean!==void 0&&init.wasClean}},CancelableCloseEvent=class extends CloseEvent{constructor(type,init={}){super(type,init),this[kCancelable]=!!init.cancelable,this[kDefaultPrevented]=!1}get cancelable(){return this[kCancelable]}set cancelable(nextCancelable){this[kCancelable]=nextCancelable}get defaultPrevented(){return this[kDefaultPrevented]}set defaultPrevented(nextDefaultPrevented){this[kDefaultPrevented]=nextDefaultPrevented}preventDefault(){this.cancelable&&!this[kDefaultPrevented]&&(this[kDefaultPrevented]=!0)}},kEmitter$1=Symbol(`kEmitter`),kBoundListener$1=Symbol(`kBoundListener`),WebSocketClientConnection=class{constructor(socket,transport){this.socket=socket,this.transport=transport,this.id=createRequestId(),this.url=new URL(socket.url),this[kEmitter$1]=new EventTarget,this.transport.addEventListener(`outgoing`,event=>{let message=bindEvent(this.socket,new CancelableMessageEvent(`message`,{data:event.data,origin:event.origin,cancelable:!0}));this[kEmitter$1].dispatchEvent(message),message.defaultPrevented&&event.preventDefault()}),this.transport.addEventListener(`close`,event=>{this[kEmitter$1].dispatchEvent(bindEvent(this.socket,new CloseEvent(`close`,event)))})}addEventListener(type,listener,options){if(!Reflect.has(listener,kBoundListener$1)){let boundListener=listener.bind(this.socket);Object.defineProperty(listener,kBoundListener$1,{value:boundListener,enumerable:!1,configurable:!1})}this[kEmitter$1].addEventListener(type,Reflect.get(listener,kBoundListener$1),options)}removeEventListener(event,listener,options){this[kEmitter$1].removeEventListener(event,Reflect.get(listener,kBoundListener$1),options)}send(data){this.transport.send(data)}close(code,reason){this.transport.close(code,reason)}},WEBSOCKET_CLOSE_CODE_RANGE_ERROR=`InvalidAccessError: close code out of user configurable range`,kPassthroughPromise=Symbol(`kPassthroughPromise`),kOnSend=Symbol(`kOnSend`),kClose=Symbol(`kClose`),WebSocketOverride=class extends EventTarget{static{this.CONNECTING=0}static{this.OPEN=1}static{this.CLOSING=2}static{this.CLOSED=3}constructor(url,protocols){super(),this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this._onopen=null,this._onmessage=null,this._onerror=null,this._onclose=null,this.url=resolveWebSocketUrl(url),this.protocol=``,this.extensions=``,this.binaryType=`blob`,this.readyState=this.CONNECTING,this.bufferedAmount=0,this[kPassthroughPromise]=new DeferredPromise,queueMicrotask(async()=>{await this[kPassthroughPromise]||(this.protocol=typeof protocols==`string`?protocols:Array.isArray(protocols)&&protocols.length>0?protocols[0]:``,this.readyState===this.CONNECTING&&(this.readyState=this.OPEN,this.dispatchEvent(bindEvent(this,new Event(`open`)))))})}set onopen(listener){this.removeEventListener(`open`,this._onopen),this._onopen=listener,listener!==null&&this.addEventListener(`open`,listener)}get onopen(){return this._onopen}set onmessage(listener){this.removeEventListener(`message`,this._onmessage),this._onmessage=listener,listener!==null&&this.addEventListener(`message`,listener)}get onmessage(){return this._onmessage}set onerror(listener){this.removeEventListener(`error`,this._onerror),this._onerror=listener,listener!==null&&this.addEventListener(`error`,listener)}get onerror(){return this._onerror}set onclose(listener){this.removeEventListener(`close`,this._onclose),this._onclose=listener,listener!==null&&this.addEventListener(`close`,listener)}get onclose(){return this._onclose}send(data){if(this.readyState===this.CONNECTING)throw this.close(),new DOMException(`InvalidStateError`);this.readyState!==this.CLOSING&&this.readyState!==this.CLOSED&&(this.bufferedAmount+=getDataSize(data),queueMicrotask(()=>{this.bufferedAmount=0,this[kOnSend]?.(data)}))}close(code=1e3,reason){invariant(code,WEBSOCKET_CLOSE_CODE_RANGE_ERROR),invariant(code===1e3||code>=3e3&&code<=4999,WEBSOCKET_CLOSE_CODE_RANGE_ERROR),this[kClose](code,reason)}[kClose](code=1e3,reason,wasClean=!0){this.readyState!==this.CLOSING&&this.readyState!==this.CLOSED&&(this.readyState=this.CLOSING,queueMicrotask(()=>{this.readyState=this.CLOSED,this.dispatchEvent(bindEvent(this,new CloseEvent(`close`,{code,reason,wasClean}))),this._onopen=null,this._onmessage=null,this._onerror=null,this._onclose=null}))}addEventListener(type,listener,options){return super.addEventListener(type,listener,options)}removeEventListener(type,callback,options){return super.removeEventListener(type,callback,options)}};function getDataSize(data){return typeof data==`string`?data.length:data instanceof Blob?data.size:data.byteLength}var kEmitter=Symbol(`kEmitter`),kBoundListener=Symbol(`kBoundListener`),kSend=Symbol(`kSend`),WebSocketServerConnection=class{constructor(client,transport,createConnection){this.client=client,this.transport=transport,this.createConnection=createConnection,this[kEmitter]=new EventTarget,this.mockCloseController=new AbortController,this.realCloseController=new AbortController,this.transport.addEventListener(`outgoing`,event=>{this.realWebSocket!==void 0&&queueMicrotask(()=>{event.defaultPrevented||this[kSend](event.data)})}),this.transport.addEventListener(`incoming`,this.handleIncomingMessage.bind(this))}get socket(){return invariant(this.realWebSocket,'Cannot access "socket" on the original WebSocket server object: the connection is not open. Did you forget to call `server.connect()`?'),this.realWebSocket}connect(){invariant(!this.realWebSocket||this.realWebSocket.readyState!==WebSocket.OPEN,`Failed to call "connect()" on the original WebSocket instance: the connection already open`);let realWebSocket=this.createConnection();realWebSocket.binaryType=this.client.binaryType,realWebSocket.addEventListener(`open`,event=>{this[kEmitter].dispatchEvent(bindEvent(this.realWebSocket,new Event(`open`,event)))},{once:!0}),realWebSocket.addEventListener(`message`,event=>{this.transport.dispatchEvent(bindEvent(this.realWebSocket,new MessageEvent(`incoming`,{data:event.data,origin:event.origin})))}),this.client.addEventListener(`close`,event=>{this.handleMockClose(event)},{signal:this.mockCloseController.signal}),realWebSocket.addEventListener(`close`,event=>{this.handleRealClose(event)},{signal:this.realCloseController.signal}),realWebSocket.addEventListener(`error`,()=>{let errorEvent=bindEvent(realWebSocket,new Event(`error`,{cancelable:!0}));this[kEmitter].dispatchEvent(errorEvent),errorEvent.defaultPrevented||this.client.dispatchEvent(bindEvent(this.client,new Event(`error`)))}),this.realWebSocket=realWebSocket}addEventListener(event,listener,options){if(!Reflect.has(listener,kBoundListener)){let boundListener=listener.bind(this.client);Object.defineProperty(listener,kBoundListener,{value:boundListener,enumerable:!1})}this[kEmitter].addEventListener(event,Reflect.get(listener,kBoundListener),options)}removeEventListener(event,listener,options){this[kEmitter].removeEventListener(event,Reflect.get(listener,kBoundListener),options)}send(data){this[kSend](data)}[kSend](data){let{realWebSocket}=this;if(invariant(realWebSocket,`Failed to call "server.send()" for "%s": the connection is not open. Did you forget to call "server.connect()"?`,this.client.url),realWebSocket.readyState!==WebSocket.CLOSING&&realWebSocket.readyState!==WebSocket.CLOSED){if(realWebSocket.readyState===WebSocket.CONNECTING){realWebSocket.addEventListener(`open`,()=>{realWebSocket.send(data)},{once:!0});return}realWebSocket.send(data)}}close(){let{realWebSocket}=this;invariant(realWebSocket,`Failed to close server connection for "%s": the connection is not open. Did you forget to call "server.connect()"?`,this.client.url),this.realCloseController.abort(),realWebSocket.readyState!==WebSocket.CLOSING&&realWebSocket.readyState!==WebSocket.CLOSED&&(realWebSocket.close(),queueMicrotask(()=>{this[kEmitter].dispatchEvent(bindEvent(this.realWebSocket,new CancelableCloseEvent(`close`,{code:1e3,cancelable:!0})))}))}handleIncomingMessage(event){let messageEvent=bindEvent(event.target,new CancelableMessageEvent(`message`,{data:event.data,origin:event.origin,cancelable:!0}));this[kEmitter].dispatchEvent(messageEvent),messageEvent.defaultPrevented||this.client.dispatchEvent(bindEvent(this.client,new MessageEvent(`message`,{data:event.data,origin:event.origin})))}handleMockClose(_event){this.realWebSocket&&this.realWebSocket.close()}handleRealClose(event){this.mockCloseController.abort();let closeEvent=bindEvent(this.realWebSocket,new CancelableCloseEvent(`close`,{code:event.code,reason:event.reason,wasClean:event.wasClean,cancelable:!0}));this[kEmitter].dispatchEvent(closeEvent),closeEvent.defaultPrevented||this.client[kClose](event.code,event.reason)}},WebSocketClassTransport=class extends EventTarget{constructor(socket){super(),this.socket=socket,this.socket.addEventListener(`close`,event=>{this.dispatchEvent(bindEvent(this.socket,new CloseEvent(`close`,event)))}),this.socket[kOnSend]=data=>{this.dispatchEvent(bindEvent(this.socket,new CancelableMessageEvent(`outgoing`,{data,origin:this.socket.url,cancelable:!0})))}}addEventListener(type,callback,options){return super.addEventListener(type,callback,options)}dispatchEvent(event){return super.dispatchEvent(event)}send(data){queueMicrotask(()=>{if(this.socket.readyState===this.socket.CLOSING||this.socket.readyState===this.socket.CLOSED)return;let dispatchEvent=()=>{this.socket.dispatchEvent(bindEvent(this.socket,new MessageEvent(`message`,{data,origin:this.socket.url})))};this.socket.readyState===this.socket.CONNECTING?this.socket.addEventListener(`open`,()=>{dispatchEvent()},{once:!0}):dispatchEvent()})}close(code,reason){this.socket[kClose](code,reason)}},WebSocketInterceptor=class WebSocketInterceptor2 extends Interceptor{static{this.symbol=Symbol.for(`websocket-interceptor`)}constructor(){super(WebSocketInterceptor2.symbol)}checkEnvironment(){return hasConfigurableGlobal(`WebSocket`)}setup(){let logger=this.logger.extend(`setup`),WebSocketProxy=new Proxy(globalThis.WebSocket,{construct:(target,args,newTarget)=>{let[url,protocols]=args,createConnection=()=>Reflect.construct(target,args,newTarget),socket=new WebSocketOverride(url,protocols),transport=new WebSocketClassTransport(socket);return queueMicrotask(async()=>{try{let server=new WebSocketServerConnection(socket,transport,createConnection),hasConnectionListeners=this.emitter.listenerCount(`connection`)>0;await emitAsync(this.emitter,`connection`,{client:new WebSocketClientConnection(socket,transport),server,info:{protocols}}),hasConnectionListeners?socket[kPassthroughPromise].resolve(!1):(socket[kPassthroughPromise].resolve(!0),server.connect(),server.addEventListener(`open`,()=>{socket.dispatchEvent(bindEvent(socket,new Event(`open`))),server.realWebSocket&&(socket.protocol=server.realWebSocket.protocol)}))}catch(error2){error2 instanceof Error&&(socket.dispatchEvent(new Event(`error`)),socket.readyState!==WebSocket.CLOSING&&socket.readyState!==WebSocket.CLOSED&&socket[kClose](1011,error2.message,!1),console.error(error2))}}),socket}});logger.info(`patching global WebSocket...`),this.subscriptions.push(patchesRegistry.applyPatch(globalThis,`WebSocket`,()=>WebSocketProxy)),logger.info(`global WebSocket patched!`,globalThis.WebSocket.name)}};function supportsServiceWorker(){return typeof navigator<`u`&&`serviceWorker`in navigator&&typeof location<`u`&&location.protocol!==`file:`}function supportsReadableStreamTransfer(){try{let stream=new ReadableStream({start:controller=>controller.close()});return new MessageChannel().port1.postMessage(stream,[stream]),!0}catch{return!1}}function createDeferredExecutor2(){let executor=((resolve,reject)=>{executor.state=`pending`,executor.resolve=data=>executor.state===`pending`?(executor.result=data,resolve(data instanceof Promise?data:Promise.resolve(data).then(value=>(executor.state=`fulfilled`,value)))):void 0,executor.reject=reason=>{if(executor.state===`pending`)return queueMicrotask(()=>{executor.state=`rejected`}),reject(executor.rejectionReason=reason)}});return executor}var DeferredPromise2=class extends Promise{#executor;resolve;reject;constructor(executor=null){let deferredExecutor=createDeferredExecutor2();super((originalResolve,originalReject)=>{deferredExecutor(originalResolve,originalReject),executor?.(deferredExecutor.resolve,deferredExecutor.reject)}),this.#executor=deferredExecutor,this.resolve=this.#executor.resolve,this.reject=this.#executor.reject}get state(){return this.#executor.state}get rejectionReason(){return this.#executor.rejectionReason}then(onFulfilled,onRejected){return this.#decorate(super.then(onFulfilled,onRejected))}catch(onRejected){return this.#decorate(super.catch(onRejected))}finally(onfinally){return this.#decorate(super.finally(onfinally))}#decorate(promise){return Object.defineProperties(promise,{resolve:{configurable:!0,value:this.resolve},reject:{configurable:!0,value:this.reject}})}},InterceptorError=class InterceptorError2 extends Error{constructor(message){super(message),this.name=`InterceptorError`,Object.setPrototypeOf(this,InterceptorError2.prototype)}},RequestController=class RequestController2{static{this.PENDING=0}static{this.PASSTHROUGH=1}static{this.RESPONSE=2}static{this.ERROR=3}constructor(request,source){this.request=request,this.source=source,this.readyState=RequestController2.PENDING,this.handled=new DeferredPromise}get#handled(){return this.handled}async passthrough(){invariant.as(InterceptorError,this.readyState===RequestController2.PENDING,`Failed to passthrough the "%s %s" request: the request has already been handled`,this.request.method,this.request.url),this.readyState=RequestController2.PASSTHROUGH,await this.source.passthrough(),this.#handled.resolve()}respondWith(response){invariant.as(InterceptorError,this.readyState===RequestController2.PENDING,`Failed to respond to the "%s %s" request with "%d %s": the request has already been handled (%d)`,this.request.method,this.request.url,response.status,response.statusText||`OK`,this.readyState),this.readyState=RequestController2.RESPONSE,this.#handled.resolve(),this.source.respondWith(response)}errorWith(reason){invariant.as(InterceptorError,this.readyState===RequestController2.PENDING,`Failed to error the "%s %s" request with "%s": the request has already been handled (%d)`,this.request.method,this.request.url,reason?.toString(),this.readyState),this.readyState=RequestController2.ERROR,this.source.errorWith(reason),this.#handled.resolve()}};function canParseUrl(url){try{return new URL(url),!0}catch{return!1}}function getValueBySymbol(symbolName,source){let symbol=Object.getOwnPropertySymbols(source).find(symbol$1=>symbol$1.description===symbolName);if(symbol)return Reflect.get(source,symbol)}var FetchRequest=class FetchRequest2 extends Request{static#resolveProperty(input,init={},key){return init[key]??(input instanceof Request?input[key]:void 0)}static isConfigurableMethod(method){return method!==`CONNECT`&&method!==`TRACE`&&method!==`TRACK`}static isMethodWithBody(method){return method!==`HEAD`&&method!==`GET`&&FetchRequest2.isConfigurableMethod(method)}static isConfigurableMode(mode){return mode!==`navigate`&&mode!==`websocket`&&mode!==`webtransport`}constructor(input,init){let method=FetchRequest2.#resolveProperty(input,init,`method`)||`GET`,safeMethod=FetchRequest2.isConfigurableMethod(method)?method:`GET`,hasExplicitBody=init!=null&&`body`in init,bodyInit=FetchRequest2.isMethodWithBody(method)?hasExplicitBody?{body:init.body}:{}:{body:void 0},mode=FetchRequest2.#resolveProperty(input,init,`mode`)??void 0,safeMode=FetchRequest2.isConfigurableMode(mode)?mode:void 0;if(super(input,{...init||{},method:safeMethod,mode:safeMode,duplex:init?.duplex??(FetchRequest2.isMethodWithBody(method)?`half`:void 0),...bodyInit}),method!==safeMethod&&this.#setInternalProperty(`method`,method),method===`CONNECT`){let url=new URL(input instanceof Request?input.url:input),authority;authority=url.protocol===`localhost:`?url.href:url.pathname.replace(/^\/+/,``),Object.defineProperty(this,"url",{get:()=>authority,enumerable:!0,configurable:!0})}mode!=null&&mode!==safeMode&&this.#setInternalProperty(`mode`,mode)}#setInternalProperty(key,value){let internalState=getValueBySymbol(`state`,this);internalState?Reflect.set(internalState,key,value):Object.defineProperty(this,key,{value,enumerable:!0,configurable:!0,writable:!1})}},kStatus=Symbol(`kStatus`),kUrl=Symbol(`kUrl`),FetchResponse=class FetchResponse2 extends Response{static{this.STATUS_CODES_WITHOUT_BODY=[101,103,204,205,304]}static{this.STATUS_CODES_WITH_REDIRECT=[301,302,303,307,308]}static isConfigurableStatusCode(status){return status>=200&&status<=599}static isRedirectResponse(status){return FetchResponse2.STATUS_CODES_WITH_REDIRECT.includes(status)}static isResponseWithBody(status){return!FetchResponse2.STATUS_CODES_WITHOUT_BODY.includes(status)}static setStatus(status,response){let internalState=getValueBySymbol(`state`,response);internalState?internalState.status=status:Object.defineProperty(response,"status",{value:status,enumerable:!0,configurable:!0,writable:!1}),Object.defineProperty(response,kStatus,{value:status,enumerable:!1})}static setUrl(url,response){if(!url||url===`about:`||!canParseUrl(url))return;let state=getValueBySymbol(`state`,response);state?state.urlList.push(new URL(url)):Object.defineProperty(response,"url",{value:url,enumerable:!0,configurable:!0,writable:!1}),Object.defineProperty(response,kUrl,{value:url,enumerable:!1})}static parseRawHeaders(rawHeaders){let headers=new Headers;for(let line=0;line<rawHeaders.length;line+=2)headers.append(rawHeaders[line],rawHeaders[line+1]);return headers}static clone(response){try{return response.clone()}catch(error2){return Response.json(error2 instanceof Error?{name:error2.name,message:error2.message,stack:error2.stack}:{},{status:500,statusText:`Unclonable Response`})}}constructor(body,init={}){let status=init.status??200,safeStatus=FetchResponse2.isConfigurableStatusCode(status)?status:200,finalBody=FetchResponse2.isResponseWithBody(status)?body:null;super(finalBody,{status:safeStatus,statusText:init.statusText,headers:init.headers}),status!==safeStatus&&FetchResponse2.setStatus(status,this),FetchResponse2.setUrl(init.url,this)}clone(){let clonedResponse=super.clone(),customStatus=Reflect.get(this,kStatus);customStatus&&FetchResponse2.setStatus(customStatus,clonedResponse);let customUrl=Reflect.get(this,kUrl);return customUrl&&FetchResponse2.setUrl(customUrl,clonedResponse),clonedResponse}},kRawRequest=Symbol(`kRawRequest`);function setRawRequest(request,rawRequest){Reflect.set(request,kRawRequest,rawRequest)}var encoder=new TextEncoder;function encodeBuffer(text){return encoder.encode(text)}function decodeBuffer(buffer,encoding){return new TextDecoder(encoding).decode(buffer)}function toArrayBuffer(array){return array.buffer.slice(array.byteOffset,array.byteOffset+array.byteLength)}async function until(callback){try{return[null,await callback().catch(error2=>{throw error2})]}catch(error2){return[error2,null]}}function getAbsoluteWorkerUrl(workerUrl){return new URL(workerUrl,location.href).href}function getWorkerByRegistration(registration,absoluteWorkerUrl,findWorker){return[registration.active,registration.installing,registration.waiting].filter(state=>state!=null).find(worker2=>findWorker(worker2.scriptURL,absoluteWorkerUrl))||null}var getWorkerInstance=async(url,options={},findWorker)=>{let absoluteWorkerUrl=getAbsoluteWorkerUrl(url),mockRegistrations=await navigator.serviceWorker.getRegistrations().then(registrations=>registrations.filter(registration=>getWorkerByRegistration(registration,absoluteWorkerUrl,findWorker)));!navigator.serviceWorker.controller&&mockRegistrations.length>0&&location.reload();let[existingRegistration]=mockRegistrations;if(existingRegistration)return existingRegistration.update(),[getWorkerByRegistration(existingRegistration,absoluteWorkerUrl,findWorker),existingRegistration];let[registrationError,registrationResult]=await until(async()=>{let registration=await navigator.serviceWorker.register(url,options);return[getWorkerByRegistration(registration,absoluteWorkerUrl,findWorker),registration]});if(registrationError){if(registrationError.message.includes(`(404)`)){let scopeUrl=new URL(options?.scope||`/`,location.href);throw Error(devUtils.formatMessage(`Failed to register a Service Worker for scope ('${scopeUrl.href}') with script ('${absoluteWorkerUrl}'): Service Worker script does not exist at the given path.
|
|
232
|
+
|
|
233
|
+
Did you forget to run "npx msw init <PUBLIC_DIR>"?
|
|
234
|
+
|
|
235
|
+
Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/init`))}throw Error(devUtils.formatMessage(`Failed to register the Service Worker:
|
|
236
|
+
|
|
237
|
+
%s`,registrationError.message))}return registrationResult},LensList=class{#list;#lens;constructor(){this.#list=[],this.#lens=new Map}get[Symbol.iterator](){return this.#list[Symbol.iterator].bind(this.#list)}entries(){return this.#lens.entries()}get(key){return this.#lens.get(key)||[]}getAll(){return this.#list.map(([,value])=>value)}append(key,value){this.#list.push([key,value]),this.#openLens(key,list=>list.push(value))}prepend(key,value){this.#list.unshift([key,value]),this.#openLens(key,list=>list.unshift(value))}delete(key,value){if(this.size===0)return!1;let values=this.#lens.get(key);if(!values)return!1;let index=values.indexOf(value);return index!==-1&&(values.splice(index,1),this.#list.splice(this.#list.findIndex(item=>item[0]===key&&item[1]===value),1),!0)}deleteAll(key){this.size!==0&&(this.#list=this.#list.filter(item=>item[0]!==key),this.#lens.delete(key))}get size(){return this.#list.length}clear(){this.size!==0&&(this.#list.length=0,this.#lens.clear())}#openLens(key,setter){setter(this.#lens.get(key)||this.#lens.set(key,[]).get(key))}},kDefaultPrevented2=Symbol(`kDefaultPrevented`),kPropagationStopped=Symbol(`kPropagationStopped`),kImmediatePropagationStopped=Symbol(`kImmediatePropagationStopped`),TypedEvent=class extends MessageEvent{[kDefaultPrevented2];[kPropagationStopped];[kImmediatePropagationStopped];constructor(...args){super(args[0],args[1]),this[kDefaultPrevented2]=!1}get defaultPrevented(){return this[kDefaultPrevented2]}preventDefault(){super.preventDefault(),this[kDefaultPrevented2]=!0}stopImmediatePropagation(){super.stopImmediatePropagation(),this[kImmediatePropagationStopped]=!0}},Emitter2=class{#listeners;#listenerOptions;#listenerAbortCleanups;#typelessListeners;#hookListeners;#hookListenerOptions;#hookListenerAbortCleanups;hooks;constructor(){this.#listeners=new LensList,this.#listenerOptions=new WeakMap,this.#listenerAbortCleanups=new WeakMap,this.#typelessListeners=new WeakSet,this.#hookListeners=new LensList,this.#hookListenerOptions=new WeakMap,this.#hookListenerAbortCleanups=new WeakMap,this.hooks={on:(hook,callback,options)=>{if(!options?.signal?.aborted){if(options?.once){let original=callback,wrapper=((...args)=>(this.#deleteHookListener(hook,wrapper),original(...args)));callback=wrapper}if(this.#hookListeners.append(hook,callback),options&&this.#hookListenerOptions.set(callback,options),options?.signal){let{signal}=options,onAbort=()=>{this.#deleteHookListener(hook,callback)};signal.addEventListener(`abort`,onAbort,{once:!0}),this.#hookListenerAbortCleanups.set(callback,()=>{signal.removeEventListener(`abort`,onAbort)})}}},removeListener:(hook,callback)=>{this.#deleteHookListener(hook,callback)}}}#deleteHookListener(hook,callback){this.#hookListeners.delete(hook,callback);let cleanup=this.#hookListenerAbortCleanups.get(callback);cleanup&&(cleanup(),this.#hookListenerAbortCleanups.delete(callback))}#deleteListener(type,listener){let removed=this.#listeners.delete(type,listener),cleanup=this.#listenerAbortCleanups.get(listener);return cleanup&&(cleanup(),this.#listenerAbortCleanups.delete(listener)),removed}on(type,listener,options){return this.#addListener(type,listener,options),this}once(type,listener,options){return this.on(type,listener,{...options||{},once:!0})}earlyOn(type,listener,options){return this.#addListener(type,listener,options,`prepend`),this}earlyOnce(type,listener,options){return this.earlyOn(type,listener,{...options||{},once:!0})}emit(event){if(this.#listeners.size===0)return!1;let hasListeners=this.listenerCount(event.type)>0,proxiedEvent=this.#proxyEvent(event);for(let listener of this.#matchListeners(event.type)){if(proxiedEvent.event[kPropagationStopped]!=null&&proxiedEvent.event[kPropagationStopped]!==this)return proxiedEvent.revoke(),!1;if(proxiedEvent.event[kImmediatePropagationStopped])break;this.#callListener(proxiedEvent.event,listener)}return proxiedEvent.revoke(),hasListeners}async emitAsPromise(event){if(this.#listeners.size===0)return[];let pendingListeners=[],proxiedEvent=this.#proxyEvent(event);for(let listener of this.#matchListeners(event.type)){if(proxiedEvent.event[kPropagationStopped]!=null&&proxiedEvent.event[kPropagationStopped]!==this)return proxiedEvent.revoke(),[];if(proxiedEvent.event[kImmediatePropagationStopped])break;let returnValue=await Promise.resolve(this.#callListener(proxiedEvent.event,listener));this.#isTypelessListener(listener)||pendingListeners.push(returnValue)}return proxiedEvent.revoke(),Promise.allSettled(pendingListeners).then(results=>results.map(result=>result.status===`fulfilled`?result.value:result.reason))}*emitAsGenerator(event){if(this.#listeners.size===0)return;let proxiedEvent=this.#proxyEvent(event);for(let listener of this.#matchListeners(event.type)){if(proxiedEvent.event[kPropagationStopped]!=null&&proxiedEvent.event[kPropagationStopped]!==this){proxiedEvent.revoke();return}if(proxiedEvent.event[kImmediatePropagationStopped])break;let returnValue=this.#callListener(proxiedEvent.event,listener);this.#isTypelessListener(listener)||(yield returnValue)}proxiedEvent.revoke()}removeListener(type,listener){let options=this.#listenerOptions.get(listener);if(this.#deleteListener(type,listener))for(let hook of this.#hookListeners.get(`removeListener`).slice())hook(type,listener,options)}removeAllListeners(type){if(type==null){for(let[listenerType,listeners$1]of this.#listeners.entries())for(;listeners$1.length>0;)this.removeListener(listenerType,listeners$1[0]);for(let[hookType,hookListener]of[...this.#hookListeners])this.#hookListenerOptions.get(hookListener)?.persist||this.#deleteHookListener(hookType,hookListener);return}let listeners=this.listeners(type);for(;listeners.length>0;)this.removeListener(type,listeners[0])}listeners(type){return type==null?this.#listeners.getAll():this.#listeners.get(type)}listenerCount(type){return type==null?this.#listeners.size:this.listeners(type).length}#addListener(type,listener,options,insertMode=`append`){if(!options?.signal?.aborted){for(let hook of this.#hookListeners.get(`newListener`).slice())hook(type,listener,options);if(type===`*`&&this.#typelessListeners.add(listener),insertMode===`prepend`?this.#listeners.prepend(type,listener):this.#listeners.append(type,listener),options&&(this.#listenerOptions.set(listener,options),options.signal)){let{signal}=options,onAbort=()=>{this.removeListener(type,listener)};signal.addEventListener(`abort`,onAbort,{once:!0}),this.#listenerAbortCleanups.set(listener,()=>{signal.removeEventListener(`abort`,onAbort)})}}}#proxyEvent(event){let{stopPropagation}=event;return event.stopPropagation=()=>{event[kPropagationStopped]=this,stopPropagation.call(event)},{event,revoke(){event.stopPropagation=stopPropagation}}}#callListener(event,listener){for(let hook of this.#hookListeners.get(`beforeEmit`).slice())if(hook(event)===!1)return;let returnValue=listener.call(this,event),options=this.#listenerOptions.get(listener);if(options?.once){let type=this.#isTypelessListener(listener)?`*`:event.type;if(this.#deleteListener(type,listener))for(let hook of this.#hookListeners.get(`removeListener`).slice())hook(type,listener,options)}return returnValue}*#matchListeners(type){let snapshot=[];for(let[key,listener]of this.#listeners)(key===`*`||key===type)&&snapshot.push(listener);yield*snapshot}#isTypelessListener(listener){return this.#typelessListeners.has(listener)}},SUPPORTS_SERVICE_WORKER=supportsServiceWorker(),WorkerEvent=class extends TypedEvent{#workerEvent;constructor(workerEvent){let type=workerEvent.data.type,data=workerEvent.data.payload;super(type,{data}),this.#workerEvent=workerEvent}get ports(){return this.#workerEvent.ports}postMessage(type,...rest){this.#workerEvent.ports[0].postMessage({type,data:rest[0]},{transfer:rest[1]})}},WorkerChannel=class extends Emitter2{#getWorker;#controller;constructor(options){super(),invariant(SUPPORTS_SERVICE_WORKER,`Failed to open a WorkerChannel: Service Worker is not supported in this environment.`),this.#getWorker=options.getWorker,this.#controller=new AbortController,navigator.serviceWorker.addEventListener(`message`,async event=>{let worker=await this.#getWorker();(event.source==null||event.source===worker)&&event.data&&isObject$2(event.data)&&`type`in event.data&&this.emit(new WorkerEvent(event))},{signal:this.#controller.signal})}postMessage(type){invariant(SUPPORTS_SERVICE_WORKER,`Failed to post message on a WorkerChannel: the Service Worker API is unavailable in this environment. This is likely an issue with MSW. Please report it on GitHub: https://github.com/mswjs/msw/issues`),this.#getWorker().then(worker=>{worker.postMessage(type)})}terminate(){this.#controller.abort(),this.removeAllListeners()}};function pruneGetRequestBody(request){if(![`HEAD`,`GET`].includes(request.method))return request.body}function deserializeRequest(serializedRequest){return new Request(serializedRequest.url,{...serializedRequest,body:pruneGetRequestBody(serializedRequest)})}function validateWorkerScope(registration){location.href.startsWith(registration.scope)||devUtils.warn(`Cannot intercept requests on this page because it's outside of the worker's scope ("${registration.scope}"). If you wish to mock API requests on this page, you must resolve this scope issue.
|
|
238
|
+
|
|
239
|
+
- (Recommended) Register the worker at the root level ("/") of your application.
|
|
240
|
+
- Set the "Service-Worker-Allowed" response header to allow out-of-scope workers.`)}function shouldInvalidateWorker(prevOptions,nextOptions){return prevOptions.findWorker!==nextOptions.findWorker||prevOptions.serviceWorker.url!==nextOptions.serviceWorker.url||JSON.stringify(prevOptions.serviceWorker.options)!==JSON.stringify(nextOptions.serviceWorker.options)}var ServiceWorkerSource=class _ServiceWorkerSource extends NetworkSource{static#current;static async from(options){return _ServiceWorkerSource.#current==null?_ServiceWorkerSource.#current=new _ServiceWorkerSource(options):shouldInvalidateWorker(_ServiceWorkerSource.#current.#options,options)&&(await _ServiceWorkerSource.#current.terminate(),_ServiceWorkerSource.#current=new _ServiceWorkerSource(options)),_ServiceWorkerSource.#current}#options;#frames;#channel;#listenerController;#clientPromise;#keepAliveInterval;#stoppedAt;workerPromise;constructor(options){super(),invariant(supportsServiceWorker(),`Failed to use Service Worker as the network source: the Service Worker API is not supported in this environment`),this.#options=options,this.#frames=new Map,this.workerPromise=new DeferredPromise2,this.#channel=new WorkerChannel({getWorker:()=>this.workerPromise.then(([worker])=>worker)})}async enable(){if(this.workerPromise.state===`fulfilled`&&this.#stoppedAt===void 0)return devUtils.warn(`Found a redundant "worker.start()" call. Note that starting the worker while mocking is already enabled will have no effect. Consider removing this "worker.start()" call.`),this.workerPromise.then(([,registration2])=>registration2);this.#stoppedAt=void 0,this.#channel.removeAllListeners(),this.#frames.clear(),this.#listenerController=new AbortController;let[worker,registration]=await this.#startWorker();if(worker.state!==`activated`){let controller=new AbortController,activationPromise=new DeferredPromise2;activationPromise.then(()=>controller.abort()),worker.addEventListener(`statechange`,()=>{worker.state===`activated`&&activationPromise.resolve()},{signal:controller.signal}),await activationPromise}this.#channel.postMessage(`MOCK_ACTIVATE`);let clientConfirmationPromise=new DeferredPromise2;return this.#clientPromise=clientConfirmationPromise,this.#channel.once(`MOCKING_ENABLED`,event=>{clientConfirmationPromise.resolve(event.data.client)}),await clientConfirmationPromise,this.#options.quiet||this.#printStartMessage(),registration}disable(){if(this.#stoppedAt!==void 0){devUtils.warn(`Found a redundant "worker.stop()" call. Notice that stopping the worker after it has already been stopped has no effect. Consider removing this "worker.stop()" call.`);return}this.#stoppedAt=Date.now(),this.#listenerController?.abort(),this.#listenerController=void 0,this.#channel.postMessage(`CLIENT_CLOSED`),this.#options.quiet||this.#printStopMessage()}async terminate(){if(this.#keepAliveInterval!=null&&(clearInterval(this.#keepAliveInterval),this.#keepAliveInterval=void 0),this.#frames.clear(),this.#channel.terminate(),this.#listenerController?.abort(),this.#listenerController=void 0,this.workerPromise.state===`fulfilled`){let[,registration]=await this.workerPromise;await registration.unregister()}_ServiceWorkerSource.#current===this&&(_ServiceWorkerSource.#current=void 0)}async#startWorker(){this.#keepAliveInterval&&clearInterval(this.#keepAliveInterval);let workerUrl=this.#options.serviceWorker.url,[worker,registration]=await getWorkerInstance(workerUrl,this.#options.serviceWorker.options,this.#options.findWorker||this.#defaultFindWorker);if(worker==null){let missingWorkerMessage=this.#options?.findWorker?devUtils.formatMessage(`Failed to locate the Service Worker registration using a custom "findWorker" predicate.
|
|
241
|
+
|
|
242
|
+
Please ensure that the custom predicate properly locates the Service Worker registration at "%s".
|
|
243
|
+
More details: https://mswjs.io/docs/api/setup-worker/start#findworker
|
|
244
|
+
`,workerUrl):devUtils.formatMessage(`Failed to locate the Service Worker registration.
|
|
245
|
+
|
|
246
|
+
This most likely means that the worker script URL "%s" cannot resolve against the actual public hostname (%s). This may happen if your application runs behind a proxy, or has a dynamic hostname.
|
|
247
|
+
|
|
248
|
+
Please consider using a custom "serviceWorker.url" option to point to the actual worker script location, or a custom "findWorker" option to resolve the Service Worker registration manually. More details: https://mswjs.io/docs/api/setup-worker/start`,workerUrl,location.host);throw Error(missingWorkerMessage)}return this.workerPromise.state===`pending`?this.workerPromise.resolve([worker,registration]):this.workerPromise=new DeferredPromise2(resolve=>{resolve([worker,registration])}),this.#channel.on(`REQUEST`,this.#handleRequest.bind(this)),this.#channel.on(`RESPONSE`,this.#handleResponse.bind(this)),window.addEventListener(`beforeunload`,()=>{worker.state!==`redundant`&&this.#channel.postMessage(`CLIENT_CLOSED`),clearInterval(this.#keepAliveInterval),window.postMessage({type:`msw/worker:stop`})},{signal:this.#listenerController?.signal}),await this.#checkWorkerIntegrity().catch(error2=>{devUtils.error(`Error while checking the worker script integrity. Please report this on GitHub (https://github.com/mswjs/msw/issues) and include the original error below.`),console.error(error2)}),this.#keepAliveInterval=window.setInterval(()=>{this.#channel.postMessage(`KEEPALIVE_REQUEST`)},5e3),this.#options.quiet||validateWorkerScope(registration),[worker,registration]}async#handleRequest(event){if(this.#stoppedAt&&event.data.interceptedAt>this.#stoppedAt)return event.postMessage(`PASSTHROUGH`);let request=deserializeRequest(event.data);RequestHandler.cache.set(request,request.clone());let frame=new ServiceWorkerHttpNetworkFrame({event,request});this.#frames.set(event.data.id,frame),await this.queue(frame)}async#handleResponse(event){let{request,response,isMockedResponse}=event.data,frame=this.#frames.get(request.id);if(response.type?.includes(`opaque`)){this.#frames.delete(request.id),frame?.events.removeAllListeners();return}if(this.#frames.delete(request.id),frame==null)return;let fetchRequest=deserializeRequest(request),fetchResponse=response.status===0?Response.error():new FetchResponse(FetchResponse.isResponseWithBody(response.status)?response.body:null,{...response,url:request.url});try{frame.events.emit(new ResponseEvent(isMockedResponse?`response:mocked`:`response:bypass`,{requestId:frame.data.id,request:fetchRequest,response:fetchResponse,isMockedResponse}))}finally{frame.events.removeAllListeners()}}#defaultFindWorker=(workerUrl,mockServiceWorkerUrl)=>workerUrl===mockServiceWorkerUrl;async#checkWorkerIntegrity(){let integrityCheckPromise=new DeferredPromise2;return this.#channel.postMessage(`INTEGRITY_CHECK_REQUEST`),this.#channel.once(`INTEGRITY_CHECK_RESPONSE`,event=>{let{checksum,packageVersion}=event.data;checksum!==`03cb67ac84128e63d7cd722a6e5b7f1e`&&devUtils.warn(`The currently registered Service Worker has been generated by a different version of MSW (${packageVersion}) and may not be fully compatible with the installed version.
|
|
249
|
+
|
|
250
|
+
It's recommended you update your worker script by running this command:
|
|
251
|
+
|
|
252
|
+
\u2022 npx msw init <PUBLIC_DIR>
|
|
253
|
+
|
|
254
|
+
You can also automate this process and make the worker script update automatically upon the library installations. Read more: https://mswjs.io/docs/cli/init.`),integrityCheckPromise.resolve()}),integrityCheckPromise}async#printStartMessage(){if(this.workerPromise.state===`rejected`)return;invariant(this.#clientPromise!=null,`[ServiceWorkerSource] Failed to print a start message: client confirmation not received`);let client=await this.#clientPromise,[worker,registration]=await this.workerPromise;console.groupCollapsed(`%c${devUtils.formatMessage(`Mocking enabled.`)}`,`color:orangered;font-weight:bold;`),console.log(`%cDocumentation: %chttps://mswjs.io/docs`,`font-weight:bold`,`font-weight:normal`),console.log(`Found an issue? https://github.com/mswjs/msw/issues`),console.log(`Worker script URL:`,worker.scriptURL),console.log(`Worker scope:`,registration.scope),client&&console.log(`Client ID: %s (%s)`,client.id,client.frameType),console.groupEnd()}#printStopMessage(){console.log(`%c${devUtils.formatMessage(`Mocking disabled.`)}`,`color:orangered;font-weight:bold;`)}},ServiceWorkerHttpNetworkFrame=class extends HttpNetworkFrame{#event;constructor(options){super({request:options.request}),this.#event=options.event}passthrough(){this.#event.postMessage(`PASSTHROUGH`)}respondWith(response){response&&this.#respondWith(response)}errorWith(reason){if(reason instanceof Response)return this.respondWith(reason);devUtils.warn(`Uncaught exception in the request handler for "%s %s". This exception has been gracefully handled as a 500 response, however, it's strongly recommended to resolve this error, as it indicates a mistake in your code. If you wish to mock an error response, please see this guide: https://mswjs.io/docs/http/mocking-responses/error-responses`,this.data.request.method,this.data.request.url);let error2=reason instanceof Error?reason:Error(reason?.toString()||`Request failure`);this.respondWith(HttpResponse.json({name:error2.name,message:error2.message,stack:error2.stack},{status:500,statusText:`Request Handler Error`}))}async#respondWith(response){let responseBody,transfer,responseInit=toResponseInit(response);supportsReadableStreamTransfer()?(responseBody=response.body,transfer=response.body==null?void 0:[response.body]):responseBody=response.body==null?null:await response.clone().arrayBuffer(),this.#event.postMessage(`MOCK_RESPONSE`,{...responseInit,body:responseBody},transfer)}},until2=async promise=>{try{return{error:null,data:await promise().catch(error2=>{throw error2})}}catch(error2){return{error:error2,data:null}}};function isObject2(value,loose=!1){return loose?Object.prototype.toString.call(value).startsWith(`[object `):Object.prototype.toString.call(value)===`[object Object]`}function isPropertyAccessible(obj,key){try{return obj[key],!0}catch{return!1}}function createServerErrorResponse(body){return new Response(JSON.stringify(body instanceof Error?{name:body.name,message:body.message,stack:body.stack}:body),{status:500,statusText:`Unhandled Exception`,headers:{"Content-Type":`application/json`}})}function isResponseError(response){return response!=null&&response instanceof Response&&isPropertyAccessible(response,`type`)&&response.type===`error`}function isResponseLike(value){return isObject2(value,!0)&&isPropertyAccessible(value,`status`)&&isPropertyAccessible(value,`statusText`)&&isPropertyAccessible(value,`bodyUsed`)}function isNodeLikeError(error2){return error2==null||!(error2 instanceof Error)?!1:`code`in error2&&`errno`in error2}async function handleRequest(options){let handleResponse=async response=>response instanceof Error?(await options.controller.errorWith(response),!0):isResponseError(response)||isResponseLike(response)?(await options.controller.respondWith(response),!0):isObject2(response)?(await options.controller.errorWith(response),!0):!1,handleResponseError=async error2=>{if(error2 instanceof InterceptorError)throw result.error;return isNodeLikeError(error2)?(await options.controller.errorWith(error2),!0):error2 instanceof Response&&await handleResponse(error2)},requestAbortPromise=new DeferredPromise,onAbort=()=>{requestAbortPromise.reject(options.request.signal?.reason)};if(options.request.signal){if(options.request.signal.aborted){await options.controller.errorWith(options.request.signal.reason);return}options.request.signal.addEventListener(`abort`,onAbort,{once:!0})}let result=await until2(async()=>{let requestListenersPromise=emitAsync(options.emitter,`request`,{requestId:options.requestId,request:options.request,controller:options.controller});await Promise.race([requestAbortPromise,requestListenersPromise,options.controller.handled])});if(options.request.signal?.removeEventListener(`abort`,onAbort),requestAbortPromise.state===`rejected`){await options.controller.errorWith(requestAbortPromise.rejectionReason);return}if(result.error){if(await handleResponseError(result.error))return;if(options.emitter.listenerCount(`unhandledException`)>0){let unhandledExceptionController=new RequestController(options.request,{passthrough(){},async respondWith(response){await handleResponse(response)},async errorWith(reason){await options.controller.errorWith(reason)}});if(await emitAsync(options.emitter,`unhandledException`,{error:result.error,request:options.request,requestId:options.requestId,controller:unhandledExceptionController}),unhandledExceptionController.readyState!==RequestController.PENDING)return}await options.controller.respondWith(createServerErrorResponse(result.error));return}return options.controller.readyState===RequestController.PENDING?await options.controller.passthrough():options.controller.handled}function createNetworkError(cause){return Object.assign(TypeError(`Failed to fetch`),{cause})}var REQUEST_BODY_HEADERS=[`content-encoding`,`content-language`,`content-location`,`content-type`,`content-length`],kRedirectCount=Symbol(`kRedirectCount`);async function followFetchRedirect(request,response){if(response.status!==303&&request.body!=null)return Promise.reject(createNetworkError());let requestUrl=new URL(request.url),locationUrl;try{locationUrl=new URL(response.headers.get(`location`),request.url)}catch(error2){return Promise.reject(createNetworkError(error2))}if(locationUrl.protocol!==`http:`&&locationUrl.protocol!==`https:`)return Promise.reject(createNetworkError(`URL scheme must be a HTTP(S) scheme`));if(Reflect.get(request,kRedirectCount)>20)return Promise.reject(createNetworkError(`redirect count exceeded`));if(Object.defineProperty(request,kRedirectCount,{value:(Reflect.get(request,kRedirectCount)||0)+1}),request.mode===`cors`&&(locationUrl.username||locationUrl.password)&&!sameOrigin(requestUrl,locationUrl))return Promise.reject(createNetworkError(`cross origin not allowed for request mode "cors"`));let requestInit={};([301,302].includes(response.status)&&request.method===`POST`||response.status===303&&![`HEAD`,`GET`].includes(request.method))&&(requestInit.method=`GET`,requestInit.body=null,REQUEST_BODY_HEADERS.forEach(headerName=>{request.headers.delete(headerName)})),sameOrigin(requestUrl,locationUrl)||(request.headers.delete(`authorization`),request.headers.delete(`proxy-authorization`),request.headers.delete(`cookie`),request.headers.delete(`host`)),requestInit.headers=request.headers;let finalResponse=await fetch(new Request(locationUrl,requestInit));return Object.defineProperty(finalResponse,"redirected",{value:!0,configurable:!0}),finalResponse}function sameOrigin(left,right){return left.origin===right.origin&&left.origin===`null`||left.protocol===right.protocol&&left.hostname===right.hostname&&left.port===right.port}var BrotliDecompressionStream=class extends TransformStream{constructor(){console.warn(`[Interceptors]: Brotli decompression of response streams is not supported in the browser`),super({transform(chunk,controller){controller.enqueue(chunk)}})}},PipelineStream=class extends TransformStream{constructor(transformStreams,...strategies){super({},...strategies);let readable=[super.readable,...transformStreams].reduce((readable$1,transform)=>readable$1.pipeThrough(transform));Object.defineProperty(this,"readable",{get(){return readable}})}};function parseContentEncoding(contentEncoding){return contentEncoding.toLowerCase().split(`,`).map(coding=>coding.trim())}function createDecompressionStream(contentEncoding){if(contentEncoding===``)return null;let codings=parseContentEncoding(contentEncoding);return codings.length===0?null:new PipelineStream(codings.reduceRight((transformers,coding)=>coding===`gzip`||coding===`x-gzip`?transformers.concat(new DecompressionStream(`gzip`)):coding===`deflate`?transformers.concat(new DecompressionStream(`deflate`)):coding===`br`?transformers.concat(new BrotliDecompressionStream):(transformers.length=0,transformers),[]))}function decompressResponse(response){if(response.body===null)return null;let decompressionStream=createDecompressionStream(response.headers.get(`content-encoding`)||``);return decompressionStream?(response.body.pipeTo(decompressionStream.writable),decompressionStream.readable):null}var FetchInterceptor=class FetchInterceptor2 extends Interceptor{static{this.symbol=Symbol.for(`fetch-interceptor`)}constructor(){super(FetchInterceptor2.symbol)}checkEnvironment(){return hasConfigurableGlobal(`fetch`)}async setup(){let logger=this.logger.extend(`setup`),pureFetch=globalThis.fetch,fetchProxy=async(input,init)=>{let requestId=createRequestId(),request=new FetchRequest(typeof input==`string`&&typeof location<`u`&&!canParseUrl(input)?new URL(input,location.href):input,init);input instanceof Request&&setRawRequest(request,input);let responsePromise=new DeferredPromise,controller=new RequestController(request,{passthrough:async()=>{this.logger.info(`request has not been handled, passthrough...`);let requestCloneForResponseEvent=request.clone(),{error:responseError,data:originalResponse}=await until2(()=>pureFetch(request));if(responseError)return responsePromise.reject(responseError);if(this.logger.info(`original fetch performed`,originalResponse),this.emitter.listenerCount(`response`)>0){this.logger.info(`emitting the "response" event...`);let responseClone=FetchResponse.clone(originalResponse);await emitAsync(this.emitter,`response`,{response:responseClone,isMockedResponse:!1,request:requestCloneForResponseEvent,requestId})}responsePromise.resolve(originalResponse)},respondWith:async rawResponse=>{if(isResponseError(rawResponse)){this.logger.info(`request has errored!`,{response:rawResponse}),responsePromise.reject(createNetworkError(rawResponse));return}this.logger.info(`received mocked response!`,{rawResponse});let response=new FetchResponse(decompressResponse(rawResponse)||rawResponse.body,{url:request.url,status:rawResponse.status,statusText:rawResponse.statusText,headers:rawResponse.headers});if(FetchResponse.isRedirectResponse(response.status)){if(request.redirect===`error`){responsePromise.reject(createNetworkError(`unexpected redirect`));return}if(request.redirect===`follow`){followFetchRedirect(request,response).then(response$1=>{responsePromise.resolve(response$1)},reason=>{responsePromise.reject(reason)});return}}this.emitter.listenerCount(`response`)>0&&(this.logger.info(`emitting the "response" event...`),await emitAsync(this.emitter,`response`,{response:FetchResponse.clone(response),isMockedResponse:!0,request,requestId})),responsePromise.resolve(response)},errorWith:reason=>{this.logger.info(`request has been aborted!`,{reason}),responsePromise.reject(reason)}});return this.logger.info(`[%s] %s`,request.method,request.url),this.logger.info(`awaiting for the mocked response...`),this.logger.info(`emitting the "request" event for %s listener(s)...`,this.emitter.listenerCount(`request`)),await handleRequest({request,requestId,emitter:this.emitter,controller}),responsePromise};logger.info(`patching global fetch...`),this.subscriptions.push(patchesRegistry.applyPatch(globalThis,`fetch`,()=>fetchProxy)),logger.info(`global fetch patched!`,globalThis.fetch.name)}};function concatArrayBuffer(left,right){let result=new Uint8Array(left.byteLength+right.byteLength);return result.set(left,0),result.set(right,left.byteLength),result}var EventPolyfill=class{constructor(type,options){this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.type=``,this.srcElement=null,this.currentTarget=null,this.eventPhase=0,this.isTrusted=!0,this.composed=!1,this.cancelable=!0,this.defaultPrevented=!1,this.bubbles=!0,this.lengthComputable=!0,this.loaded=0,this.total=0,this.cancelBubble=!1,this.returnValue=!0,this.type=type,this.target=options?.target||null,this.currentTarget=options?.currentTarget||null,this.timeStamp=Date.now()}composedPath(){return[]}initEvent(type,bubbles,cancelable){this.type=type,this.bubbles=!!bubbles,this.cancelable=!!cancelable}preventDefault(){this.defaultPrevented=!0}stopPropagation(){}stopImmediatePropagation(){}},ProgressEventPolyfill=class extends EventPolyfill{constructor(type,init){super(type),this.lengthComputable=init?.lengthComputable||!1,this.composed=init?.composed||!1,this.loaded=init?.loaded||0,this.total=init?.total||0}},SUPPORTS_PROGRESS_EVENT=typeof ProgressEvent<`u`;function createEvent(target,type,init){let progressEvents=[`error`,`progress`,`loadstart`,`loadend`,`load`,`timeout`,`abort`],ProgressEventClass=SUPPORTS_PROGRESS_EVENT?ProgressEvent:ProgressEventPolyfill;return progressEvents.includes(type)?new ProgressEventClass(type,{lengthComputable:!0,loaded:init?.loaded||0,total:init?.total||0}):new EventPolyfill(type,{target,currentTarget:target})}function findPropertySource(target,propertyName){if(!(propertyName in target))return null;if(Object.prototype.hasOwnProperty.call(target,propertyName))return target;let prototype=Reflect.getPrototypeOf(target);return prototype?findPropertySource(prototype,propertyName):null}function createProxy(target,options){return new Proxy(target,optionsToProxyHandler(options))}function optionsToProxyHandler(options){let{constructorCall,methodCall,getProperty,setProperty}=options,handler={};return constructorCall!==void 0&&(handler.construct=function(target,args,newTarget){let next=Reflect.construct.bind(null,target,args,newTarget);return constructorCall.call(newTarget,args,next)}),handler.set=function(target,propertyName,nextValue){let next=()=>{let propertySource=findPropertySource(target,propertyName)||target,ownDescriptors=Reflect.getOwnPropertyDescriptor(propertySource,propertyName);return ownDescriptors?.set===void 0?Reflect.defineProperty(propertySource,propertyName,{writable:!0,enumerable:!0,configurable:!0,value:nextValue}):(ownDescriptors.set.apply(target,[nextValue]),!0)};return setProperty===void 0?next():setProperty.call(target,[propertyName,nextValue],next)},handler.get=function(target,propertyName,receiver){let next=()=>target[propertyName],value=getProperty===void 0?next():getProperty.call(target,[propertyName,receiver],next);return typeof value==`function`?(...args)=>{let next$1=value.bind(target,...args);return methodCall===void 0?next$1():methodCall.call(target,[propertyName,args],next$1)}:value},handler}function isDomParserSupportedType(type){return[`application/xhtml+xml`,`application/xml`,`image/svg+xml`,`text/html`,`text/xml`].some(supportedType=>type.startsWith(supportedType))}function parseJson(data){try{return JSON.parse(data)}catch{return null}}function createResponse(request,body){return new FetchResponse(FetchResponse.isResponseWithBody(request.status)?body:null,{url:request.responseURL,status:request.status,statusText:request.statusText,headers:createHeadersFromXMLHttpRequestHeaders(request.getAllResponseHeaders())})}function createHeadersFromXMLHttpRequestHeaders(headersString){let headers=new Headers,lines=headersString.split(/[\r\n]+/);for(let line of lines){if(line.trim()===``)continue;let[name,...parts]=line.split(`: `),value=parts.join(`: `);headers.append(name,value)}return headers}async function getBodyByteLength(input){let explicitContentLength=input.headers.get(`content-length`);return explicitContentLength!=null&&explicitContentLength!==``?Number(explicitContentLength):(await input.arrayBuffer()).byteLength}var kIsRequestHandled=Symbol(`kIsRequestHandled`),IS_NODE2=isNodeProcess(),kFetchRequest=Symbol(`kFetchRequest`),XMLHttpRequestController=class{constructor(initialRequest,logger){this.initialRequest=initialRequest,this.logger=logger,this.method=`GET`,this.url=null,this[kIsRequestHandled]=!1,this.events=new Map,this.uploadEvents=new Map,this.requestId=createRequestId(),this.requestHeaders=new Headers,this.responseBuffer=new Uint8Array,this.request=createProxy(initialRequest,{setProperty:([propertyName,nextValue],invoke)=>{switch(propertyName){case`ontimeout`:{let eventName=propertyName.slice(2);return this.request.addEventListener(eventName,nextValue),invoke()}default:return invoke()}},methodCall:([methodName,args],invoke)=>{switch(methodName){case`open`:{let[method,url]=args;return url===void 0?(this.method=`GET`,this.url=toAbsoluteUrl(method)):(this.method=method,this.url=toAbsoluteUrl(url)),this.logger=this.logger.extend(`${this.method} ${this.url.href}`),this.logger.info(`open`,this.method,this.url.href),invoke()}case`addEventListener`:{let[eventName,listener]=args;return this.registerEvent(eventName,listener),this.logger.info(`addEventListener`,eventName,listener),invoke()}case`setRequestHeader`:{let[name,value]=args;return this.requestHeaders.set(name,value),this.logger.info(`setRequestHeader`,name,value),invoke()}case`send`:{let[body]=args;this.request.addEventListener(`load`,()=>{if(this.onResponse!==void 0){let fetchResponse=createResponse(this.request,this.request.response);this.onResponse.call(this,{response:fetchResponse,isMockedResponse:this[kIsRequestHandled],request:fetchRequest,requestId:this.requestId})}});let requestBody=typeof body==`string`?encodeBuffer(body):body,fetchRequest=this.toFetchApiRequest(requestBody);this[kFetchRequest]=fetchRequest.clone(),queueMicrotask(()=>{(this.onRequest?.call(this,{request:fetchRequest,requestId:this.requestId})||Promise.resolve()).finally(()=>{if(!this[kIsRequestHandled])return this.logger.info(`request callback settled but request has not been handled (readystate %d), performing as-is...`,this.request.readyState),IS_NODE2&&this.request.setRequestHeader(INTERNAL_REQUEST_ID_HEADER_NAME,this.requestId),invoke()})});break}default:return invoke()}}}),define(this.request,`upload`,createProxy(this.request.upload,{setProperty:([propertyName,nextValue],invoke)=>{switch(propertyName){case`onloadstart`:case`onprogress`:case`onaboart`:case`onerror`:case`onload`:case`ontimeout`:case`onloadend`:{let eventName=propertyName.slice(2);this.registerUploadEvent(eventName,nextValue)}}return invoke()},methodCall:([methodName,args],invoke)=>{if(methodName===`addEventListener`){let[eventName,listener]=args;return this.registerUploadEvent(eventName,listener),this.logger.info(`upload.addEventListener`,eventName,listener),invoke()}}}))}registerEvent(eventName,listener){let nextEvents=(this.events.get(eventName)||[]).concat(listener);this.events.set(eventName,nextEvents),this.logger.info(`registered event "%s"`,eventName,listener)}registerUploadEvent(eventName,listener){let nextEvents=(this.uploadEvents.get(eventName)||[]).concat(listener);this.uploadEvents.set(eventName,nextEvents),this.logger.info(`registered upload event "%s"`,eventName,listener)}async respondWith(response){if(this[kIsRequestHandled]=!0,this[kFetchRequest]){let totalRequestBodyLength=await getBodyByteLength(this[kFetchRequest]);this.trigger(`loadstart`,this.request.upload,{loaded:0,total:totalRequestBodyLength}),this.trigger(`progress`,this.request.upload,{loaded:totalRequestBodyLength,total:totalRequestBodyLength}),this.trigger(`load`,this.request.upload,{loaded:totalRequestBodyLength,total:totalRequestBodyLength}),this.trigger(`loadend`,this.request.upload,{loaded:totalRequestBodyLength,total:totalRequestBodyLength})}this.logger.info(`responding with a mocked response: %d %s`,response.status,response.statusText),define(this.request,`status`,response.status),define(this.request,`statusText`,response.statusText),define(this.request,`responseURL`,this.url.href),this.request.getResponseHeader=new Proxy(this.request.getResponseHeader,{apply:(_,__,args)=>{if(this.logger.info(`getResponseHeader`,args[0]),this.request.readyState<this.request.HEADERS_RECEIVED)return this.logger.info(`headers not received yet, returning null`),null;let headerValue=response.headers.get(args[0]);return this.logger.info(`resolved response header "%s" to`,args[0],headerValue),headerValue}}),this.request.getAllResponseHeaders=new Proxy(this.request.getAllResponseHeaders,{apply:()=>{if(this.logger.info(`getAllResponseHeaders`),this.request.readyState<this.request.HEADERS_RECEIVED)return this.logger.info(`headers not received yet, returning empty string`),``;let allHeaders=Array.from(response.headers.entries()).map(([headerName,headerValue])=>`${headerName}: ${headerValue}`).join(`\r
|
|
255
|
+
`);return this.logger.info(`resolved all response headers to`,allHeaders),allHeaders}}),Object.defineProperties(this.request,{response:{enumerable:!0,configurable:!1,get:()=>this.response},responseText:{enumerable:!0,configurable:!1,get:()=>this.responseText},responseXML:{enumerable:!0,configurable:!1,get:()=>this.responseXML}});let totalResponseBodyLength=await getBodyByteLength(response.clone());this.logger.info(`calculated response body length`,totalResponseBodyLength),this.trigger(`loadstart`,this.request,{loaded:0,total:totalResponseBodyLength}),this.setReadyState(this.request.HEADERS_RECEIVED),this.setReadyState(this.request.LOADING);let finalizeResponse=()=>{this.logger.info(`finalizing the mocked response...`),this.setReadyState(this.request.DONE),this.trigger(`load`,this.request,{loaded:this.responseBuffer.byteLength,total:totalResponseBodyLength}),this.trigger(`loadend`,this.request,{loaded:this.responseBuffer.byteLength,total:totalResponseBodyLength})};if(response.body){this.logger.info(`mocked response has body, streaming...`);let reader=response.body.getReader(),readNextResponseBodyChunk=async()=>{let{value,done}=await reader.read();if(done){this.logger.info(`response body stream done!`),finalizeResponse();return}value&&(this.logger.info(`read response body chunk:`,value),this.responseBuffer=concatArrayBuffer(this.responseBuffer,value),this.trigger(`progress`,this.request,{loaded:this.responseBuffer.byteLength,total:totalResponseBodyLength})),readNextResponseBodyChunk()};readNextResponseBodyChunk()}else finalizeResponse()}responseBufferToText(){return decodeBuffer(this.responseBuffer)}get response(){if(this.logger.info(`getResponse (responseType: %s)`,this.request.responseType),this.request.readyState!==this.request.DONE)return null;switch(this.request.responseType){case`json`:{let responseJson=parseJson(this.responseBufferToText());return this.logger.info(`resolved response JSON`,responseJson),responseJson}case`arraybuffer`:{let arrayBuffer=toArrayBuffer(this.responseBuffer);return this.logger.info(`resolved response ArrayBuffer`,arrayBuffer),arrayBuffer}case`blob`:{let mimeType=this.request.getResponseHeader(`Content-Type`)||`text/plain`,responseBlob=new Blob([this.responseBufferToText()],{type:mimeType});return this.logger.info(`resolved response Blob (mime type: %s)`,responseBlob,mimeType),responseBlob}default:{let responseText=this.responseBufferToText();return this.logger.info(`resolving "%s" response type as text`,this.request.responseType,responseText),responseText}}}get responseText(){if(invariant(this.request.responseType===``||this.request.responseType===`text`,`InvalidStateError: The object is in invalid state.`),this.request.readyState!==this.request.LOADING&&this.request.readyState!==this.request.DONE)return``;let responseText=this.responseBufferToText();return this.logger.info(`getResponseText: "%s"`,responseText),responseText}get responseXML(){if(invariant(this.request.responseType===``||this.request.responseType===`document`,`InvalidStateError: The object is in invalid state.`),this.request.readyState!==this.request.DONE)return null;let contentType=this.request.getResponseHeader(`Content-Type`)||``;return typeof DOMParser>`u`?(console.warn(`Cannot retrieve XMLHttpRequest response body as XML: DOMParser is not defined. You are likely using an environment that is not browser or does not polyfill browser globals correctly.`),null):isDomParserSupportedType(contentType)?new DOMParser().parseFromString(this.responseBufferToText(),contentType):null}errorWith(error2){this[kIsRequestHandled]=!0,this.logger.info(`responding with an error`),this.setReadyState(this.request.DONE),this.trigger(`error`,this.request),this.trigger(`loadend`,this.request)}setReadyState(nextReadyState){if(this.logger.info(`setReadyState: %d -> %d`,this.request.readyState,nextReadyState),this.request.readyState===nextReadyState){this.logger.info(`ready state identical, skipping transition...`);return}define(this.request,`readyState`,nextReadyState),this.logger.info(`set readyState to: %d`,nextReadyState),nextReadyState!==this.request.UNSENT&&(this.logger.info(`triggering "readystatechange" event...`),this.trigger(`readystatechange`,this.request))}trigger(eventName,target,options){let callback=target[`on${eventName}`],event=createEvent(target,eventName,options);this.logger.info(`trigger "%s"`,eventName,options||``),typeof callback==`function`&&(this.logger.info(`found a direct "%s" callback, calling...`,eventName),callback.call(target,event));let events=target instanceof XMLHttpRequestUpload?this.uploadEvents:this.events;for(let[registeredEventName,listeners]of events)registeredEventName===eventName&&(this.logger.info(`found %d listener(s) for "%s" event, calling...`,listeners.length,eventName),listeners.forEach(listener=>listener.call(target,event)))}toFetchApiRequest(body){this.logger.info(`converting request to a Fetch API Request...`);let resolvedBody=body instanceof Document?body.documentElement.innerText:body,fetchRequest=new FetchRequest(this.url.href,{method:this.method,headers:this.requestHeaders,credentials:this.request.withCredentials?`include`:`same-origin`,body:[`GET`,`HEAD`].includes(this.method.toUpperCase())?null:resolvedBody});return define(fetchRequest,`headers`,createProxy(fetchRequest.headers,{methodCall:([methodName,args],invoke)=>{switch(methodName){case`append`:case`set`:{let[headerName,headerValue]=args;this.request.setRequestHeader(headerName,headerValue);break}case`delete`:{let[headerName]=args;console.warn(`XMLHttpRequest: Cannot remove a "${headerName}" header from the Fetch API representation of the "${fetchRequest.method} ${fetchRequest.url}" request. XMLHttpRequest headers cannot be removed.`);break}}return invoke()}})),setRawRequest(fetchRequest,this.request),this.logger.info(`converted request to a Fetch API Request!`,fetchRequest),fetchRequest}};function toAbsoluteUrl(url){return typeof location>`u`?new URL(url):new URL(url.toString(),location.href)}function define(target,property,value){Reflect.defineProperty(target,property,{writable:!0,enumerable:!0,value})}function createXMLHttpRequestProxy({emitter,logger}){return new Proxy(globalThis.XMLHttpRequest,{construct(target,args,newTarget){logger.info(`constructed new XMLHttpRequest`);let originalRequest=Reflect.construct(target,args,newTarget),prototypeDescriptors=Object.getOwnPropertyDescriptors(target.prototype);for(let propertyName in prototypeDescriptors)Reflect.defineProperty(originalRequest,propertyName,prototypeDescriptors[propertyName]);let xhrRequestController=new XMLHttpRequestController(originalRequest,logger);return xhrRequestController.onRequest=async function({request,requestId}){let controller=new RequestController(request,{passthrough:()=>{this.logger.info(`no mocked response received, performing request as-is...`)},respondWith:async response=>{if(isResponseError(response)){this.errorWith(TypeError(`Network error`));return}await this.respondWith(response)},errorWith:reason=>{this.logger.info(`request errored!`,{error:reason}),reason instanceof Error&&this.errorWith(reason)}});this.logger.info(`awaiting mocked response...`),this.logger.info(`emitting the "request" event for %s listener(s)...`,emitter.listenerCount(`request`)),await handleRequest({request,requestId,controller,emitter})},xhrRequestController.onResponse=async function({response,isMockedResponse,request,requestId}){this.logger.info(`emitting the "response" event for %s listener(s)...`,emitter.listenerCount(`response`)),emitter.emit(`response`,{response,isMockedResponse,request,requestId})},xhrRequestController.request}})}var XMLHttpRequestInterceptor=class XMLHttpRequestInterceptor2 extends Interceptor{static{this.symbol=Symbol.for(`xhr-interceptor`)}constructor(){super(XMLHttpRequestInterceptor2.symbol)}checkEnvironment(){return hasConfigurableGlobal(`XMLHttpRequest`)}setup(){let logger=this.logger.extend(`setup`);logger.info(`patching global XMLHttpRequest...`),this.subscriptions.push(patchesRegistry.applyPatch(globalThis,`XMLHttpRequest`,()=>createXMLHttpRequestProxy({emitter:this.emitter,logger:this.logger}))),logger.info(`global XMLHttpRequest patched!`,globalThis.XMLHttpRequest.name)}},FallbackHttpSource=class extends InterceptorSource{constructor(options){super({interceptors:[new XMLHttpRequestInterceptor,new FetchInterceptor]}),this.options=options}options;enable(){super.enable(),this.options.quiet||this.#printStartMessage()}disable(){super.disable(),this.options.quiet||this.#printStopMessage()}#printStartMessage(){console.groupCollapsed(`%c${devUtils.formatMessage(`Mocking enabled (fallback mode).`)}`,`color:orangered;font-weight:bold;`),console.log(`%cDocumentation: %chttps://mswjs.io/docs`,`font-weight:bold`,`font-weight:normal`),console.log(`Found an issue? https://github.com/mswjs/msw/issues`),console.groupEnd()}#printStopMessage(){console.log(`%c${devUtils.formatMessage(`Mocking disabled.`)}`,`color:orangered;font-weight:bold;`)}},DEFAULT_WORKER_URL=`/mockServiceWorker.js`;function setupWorker(...handlers){invariant(!isNodeProcess(),devUtils.formatMessage("Failed to execute `setupWorker` in a non-browser environment"));let network=defineNetwork({sources:[],handlers});return{async start(options){if(options?.waitUntilReady!=null&&devUtils.warn(`The "waitUntilReady" option has been deprecated. Please remove it from this "worker.start()" call. Follow the recommended Browser integration (https://mswjs.io/docs/integrations/browser) to eliminate any race conditions between the Service Worker registration and any requests made by your application on initial render.`),network.readyState===NetworkReadyState.ENABLED){devUtils.warn(`Found a redundant "worker.start()" call. Note that starting the worker while mocking is already enabled will have no effect. Consider removing this "worker.start()" call.`);return}let httpSource=supportsServiceWorker()?await ServiceWorkerSource.from({serviceWorker:{url:options?.serviceWorker?.url?.toString()||DEFAULT_WORKER_URL,options:options?.serviceWorker?.options},findWorker:options?.findWorker,quiet:options?.quiet}):new FallbackHttpSource({quiet:options?.quiet});if(network.configure({sources:[httpSource,new InterceptorSource({interceptors:[new WebSocketInterceptor]})],onUnhandledFrame:fromLegacyOnUnhandledRequest(()=>options?.onUnhandledRequest||`warn`),context:{quiet:options?.quiet}}),await network.enable(),httpSource instanceof ServiceWorkerSource){let[,registration]=await httpSource.workerPromise;return registration}},stop(){if(network.readyState===NetworkReadyState.DISABLED){devUtils.warn(`Found a redundant "worker.stop()" call. Notice that stopping the worker after it has already been stopped has no effect. Consider removing this "worker.stop()" call.`);return}network.disable(),window.postMessage({type:`msw/worker:stop`})},events:network.events,use:network.use.bind(network),resetHandlers:network.resetHandlers.bind(network),restoreHandlers:network.restoreHandlers.bind(network),listHandlers:network.listHandlers.bind(network)}}const baseline=[http.get(`https://cloudflare.com/cdn-cgi/trace`,()=>new HttpResponse(`loc=`)),http.get(`https://m1.openfpcdn.io/fingerprintjs/:version/npm-monitoring`,()=>new HttpResponse(null,{status:204}))],worker=setupWorker(...baseline),unhandled=[],inflight=new Set,originalFetch=globalThis.fetch;async function forget(response){await Promise.allSettled([response]),inflight.delete(response)}globalThis.fetch=async(input,init)=>{let response=originalFetch(input,init);return inflight.add(response),forget(response),response};async function settleInflightFetches(){inflight.size!==0&&(await Promise.allSettled(inflight),await settleInflightFetches())}await worker.start({onUnhandledRequest:request=>{new URL(request.url).origin!==location.origin&&unhandled.push(`${request.method} ${request.url}`)},quiet:!0}),afterEach(async()=>{await settleInflightFetches(),worker.resetHandlers(...baseline);let requests=unhandled.splice(0);if(requests.length>0)throw Error(`Unhandled requests: ${requests.join(`, `)}`)});export{HttpResponse as a,http as i,vi as n,onTestFinished as r,worker as t};
|