msw 0.36.0 → 0.36.1

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.
@@ -746,18 +746,26 @@ function normalizePath(path, baseUrl) {
746
746
  */
747
747
  function coercePath(path) {
748
748
  return (path
749
- /**
750
- * Escape the protocol so that "path-to-regexp" could match
751
- * absolute URL.
752
- * @see https://github.com/pillarjs/path-to-regexp/issues/259
753
- */
754
- .replace(/^([^\/]+)(:)(?=\/\/)/g, '$1\\$2')
755
749
  /**
756
750
  * Replace wildcards ("*") with unnamed capturing groups
757
751
  * because "path-to-regexp" doesn't support wildcards.
758
752
  * Ignore path parameter' modifiers (i.e. ":name*").
759
753
  */
760
- .replace(/(?<!(^|\/|\*+):[\w]+)(\*{1,2})/g, '(.*)'));
754
+ .replace(/([:a-zA-Z_-]*)(\*{1,2})+/g, (_, parameterName, wildcard) => {
755
+ const expression = '(.*)';
756
+ if (!parameterName) {
757
+ return expression;
758
+ }
759
+ return parameterName.startsWith(':')
760
+ ? `${parameterName}${wildcard}`
761
+ : `${parameterName}${expression}`;
762
+ })
763
+ /**
764
+ * Escape the protocol so that "path-to-regexp" could match
765
+ * absolute URL.
766
+ * @see https://github.com/pillarjs/path-to-regexp/issues/259
767
+ */
768
+ .replace(/^([^\/]+)(:)(?=\/\/)/g, '$1\\$2'));
761
769
  }
762
770
  /**
763
771
  * Returns the result of matching given request URL against a mask.
@@ -2,7 +2,7 @@
2
2
  /* tslint:disable */
3
3
 
4
4
  /**
5
- * Mock Service Worker (0.36.0).
5
+ * Mock Service Worker (0.36.1).
6
6
  * @see https://github.com/mswjs/msw
7
7
  * - Please do NOT modify this file.
8
8
  * - Please do NOT serve this file on production.
package/lib/iife/index.js CHANGED
@@ -19,4 +19,4 @@ var MockServiceWorker=function(e){"use strict";var t={100:"Continue",101:"Switch
19
19
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20
20
  PERFORMANCE OF THIS SOFTWARE.
21
21
  ***************************************************************************** */
22
- function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["operations","map"]),i=V(r)||{};if(!i.query)return null;const s=V(n||"")||{},a=i.variables?function(e,t,r){const n={variables:e};for(const[e,o]of Object.entries(t)){if(!(e in r))throw new Error(`Given files do not have a key '${e}' .`);for(const t of o){const[o,...i]=t.split(".").reverse(),s=i.reverse();let a=n;for(const e of s){if(!(e in a))throw new Error(`Property '${s}' is not in operations.`);a=a[e]}a[o]=r[e]}}return n.variables}(i.variables,s,o):{};return{query:i.query,variables:a}}default:return null}}function ar(e){const t=sr(e);if(!t||!t.query)return;const{query:r,variables:n}=t,o=ir(r);if(o instanceof Error){const t=nr(e);throw new Error(Ge.formatMessage('Failed to intercept a GraphQL request to "%s %s": cannot parse query. See the error message from the parser below.\n\n%s',e.method,t,o.message))}return{operationType:o.operationType,operationName:o.operationName,variables:n}}var cr;function ur(e){return e<300?cr.Success:e<400?cr.Warning:cr.Danger}function lr(){const e=new Date;return[e.getHours(),e.getMinutes(),e.getSeconds()].map(String).map((e=>e.slice(0,2))).map((e=>e.padStart(2,"0"))).join(":")}function pr(e){return Object.assign(Object.assign({},e),{headers:e.headers.all()})}function dr(e){const t=o.objectToHeaders(e.headers);return Object.assign(Object.assign({},e),{body:it(e.body,t)})}function fr(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var o=1,i="";if("?"===e[a=r+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0==--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=e[a++]}else i+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at "+r);if(!i)throw new TypeError("Missing pattern at "+r);t.push({type:"PATTERN",index:r,value:i}),r=a}else{for(var s="",a=r+1;a<e.length;){var c=e.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;s+=e[a++]}if(!s)throw new TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:s}),r=a}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,i="[^"+vr(t.delimiter||"/#?")+"]+?",s=[],a=0,c=0,u="",l=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},p=function(e){var t=l(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},d=function(){for(var e,t="";e=l("CHAR")||l("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var f=l("CHAR"),h=l("NAME"),v=l("PATTERN");if(h||v){var m=f||"";-1===o.indexOf(m)&&(u+=m,m=""),u&&(s.push(u),u=""),s.push({name:h||a++,prefix:m,suffix:"",pattern:v||i,modifier:l("MODIFIER")||""})}else{var y=f||l("ESCAPED_CHAR");if(y)u+=y;else if(u&&(s.push(u),u=""),l("OPEN")){m=d();var g=l("NAME")||"",E=l("PATTERN")||"",b=d();p("CLOSE"),s.push({name:g||(E?a++:""),pattern:g&&!E?i:E,prefix:m,suffix:b,modifier:l("MODIFIER")||""})}else p("END")}}return s}function hr(e,t){var r=[];return function(e,t,r){void 0===r&&(r={});var n=r.decode,o=void 0===n?function(e){return e}:n;return function(r){var n=e.exec(r);if(!n)return!1;for(var i=n[0],s=n.index,a=Object.create(null),c=function(e){if(void 0===n[e])return"continue";var r=t[e-1];"*"===r.modifier||"+"===r.modifier?a[r.name]=n[e].split(r.prefix+r.suffix).map((function(e){return o(e,r)})):a[r.name]=o(n[e],r)},u=1;u<n.length;u++)c(u);return{path:i,index:s,params:a}}}(gr(e,r,t),r,t)}function vr(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function mr(e){return e&&e.sensitive?"":"i"}function yr(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,i=r.start,s=void 0===i||i,a=r.end,c=void 0===a||a,u=r.encode,l=void 0===u?function(e){return e}:u,p="["+vr(r.endsWith||"")+"]|$",d="["+vr(r.delimiter||"/#?")+"]",f=s?"^":"",h=0,v=e;h<v.length;h++){var m=v[h];if("string"==typeof m)f+=vr(l(m));else{var y=vr(l(m.prefix)),g=vr(l(m.suffix));if(m.pattern)if(t&&t.push(m),y||g)if("+"===m.modifier||"*"===m.modifier){var E="*"===m.modifier?"?":"";f+="(?:"+y+"((?:"+m.pattern+")(?:"+g+y+"(?:"+m.pattern+"))*)"+g+")"+E}else f+="(?:"+y+"("+m.pattern+")"+g+")"+m.modifier;else f+="("+m.pattern+")"+m.modifier;else f+="(?:"+y+g+")"+m.modifier}}if(c)o||(f+=d+"?"),f+=r.endsWith?"(?="+p+")":"$";else{var b=e[e.length-1],w="string"==typeof b?d.indexOf(b[b.length-1])>-1:void 0===b;o||(f+="(?:"+d+"(?="+p+"))?"),w||(f+="(?="+d+"|"+p+")")}return new RegExp(f,mr(r))}(fr(e,r),t,r)}function gr(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,o=r.exec(e.source);o;)t.push({name:o[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),o=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return gr(e,t,r).source}));return new RegExp("(?:"+n.join("|")+")",mr(r))}(e,t,r):yr(e,t,r)}!function(e){e.Success="#69AB32",e.Warning="#F0BB4B",e.Danger="#E95F5D"}(cr||(cr={}));var Er={};Object.defineProperty(Er,"__esModule",{value:!0});var br=Er.getCleanUrl=void 0;br=Er.getCleanUrl=function(e,t){return void 0===t&&(t=!0),[t&&e.origin,e.pathname].filter(Boolean).join("")};const wr=/[\?|#].*$/g;function Nr(e){return e.replace(wr,"")}function Tr(e,t){if(e instanceof RegExp)return e;return Nr(function(e,t){if(!e.startsWith("/"))return e;const r=t||"undefined"!=typeof document&&document.baseURI;return r?decodeURI(new URL(encodeURI(e),r).href):e}(e,t))}function xr(e,t,r){const n=Tr(t,r),o="string"==typeof n?function(e){return e.replace(/^([^\/]+)(:)(?=\/\/)/g,"$1\\$2").replace(/(?<!(^|\/|\*+):[\w]+)(\*{1,2})/g,"(.*)")}(n):n,i=br(e),s=hr(o,{decode:decodeURIComponent})(i);return{matches:!1!==s,params:s&&s.params||{}}}function _r(...e){return(...t)=>e.reduceRight(((e,t)=>e instanceof Promise?Promise.resolve(e).then(t):t(e)),t[0])}const Or={status:200,statusText:"OK",body:null,delay:0,once:!1},Sr=[];function Cr(e,t=Sr){return(...r)=>Ie(this,void 0,void 0,(function*(){const n=Object.assign({},Or,{headers:new o.Headers({"x-powered-by":"msw"})},e),i=[...t,...r].filter(Boolean);return i.length>0?_r(...i)(n):n}))}const Ir=Object.assign(Cr(),{once:Cr({once:!0}),networkError(e){throw new Xe(e)}}),Ar=/(node_modules)?[\/\\]lib[\/\\](umd|esm|iief|cjs)[\/\\]|^[^\/\\]*$/;const Rr={status:r,set:L,delay:Z,fetch:ne};class kr{constructor(e){this.shouldSkip=!1,this.ctx=e.ctx||Rr,this.resolver=e.resolver;const t=function(e){const t=e.stack;if(!t)return;const r=t.split("\n").slice(1).find((e=>!Ar.test(e)));if(!r)return;return r.replace(/\s*at [^()]*\(([^)]+)\)/,"$1").replace(/^@/,"")}(new Error);this.info=Object.assign(Object.assign({},e.info),{callFrame:t})}parse(e,t){return null}test(e,t){return this.predicate(e,this.parse(e,t),t)}getPublicRequest(e,t){return e}markAsSkipped(e=!0){this.shouldSkip=e}run(e,t){return Ie(this,void 0,void 0,(function*(){if(this.shouldSkip)return null;const r=this.parse(e,t);if(!this.predicate(e,r,t))return null;const n=this.getPublicRequest(e,r),o=this.wrapResolver(this.resolver),i=yield o(n,Ir,this.ctx);return this.createExecutionResult(r,n,i)}))}wrapResolver(e){return(t,r,n)=>Ie(this,void 0,void 0,(function*(){const o=this.resolverGenerator||(yield e(t,r,n));if((i=o)&&"function"==typeof i[Symbol.iterator]){const{value:e,done:t}=o[Symbol.iterator]().next(),r=yield e;return!r&&t?this.resolverGeneratorResult:(this.resolverGenerator||(this.resolverGenerator=o),this.resolverGeneratorResult=r,r)}var i;return o}))}createExecutionResult(e,t,r){return{handler:this,parsedResult:e||null,request:t,response:r||null}}}var Dr;e.RESTMethods=void 0,(Dr=e.RESTMethods||(e.RESTMethods={})).HEAD="HEAD",Dr.GET="GET",Dr.POST="POST",Dr.PUT="PUT",Dr.PATCH="PATCH",Dr.OPTIONS="OPTIONS",Dr.DELETE="DELETE";const Lr={set:L,status:r,cookie:B,body:$,text:oe,json:Y,xml:ie,delay:Z,fetch:ne};class Pr extends kr{constructor(e,t,r){super({info:{header:`${e} ${t}`,path:t,method:e},ctx:Lr,resolver:r}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:e,path:t}=this.info;if(t instanceof RegExp)return;if(Nr(t)===t)return;(function(e){return new URL(`/${e}`,"http://localhost").searchParams})(t).forEach(((e,t)=>{})),Ge.warn(`Found a redundant usage of query parameters in the request handler URL for "${e} ${t}". Please match against a path instead and access query parameters in the response resolver function using "req.url.searchParams".`)}parse(e,t){return xr(e.url,this.info.path,null==t?void 0:t.baseUrl)}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{params:t.params||{}})}predicate(e,t){return(this.info.method instanceof RegExp?this.info.method.test(e.method):st(this.info.method,e.method))&&t.matches}log(e,t){const r=nr(e),n=pr(e),o=dr(t),i=ur(t.status);console.groupCollapsed(Ge.formatMessage("%s %s %s (%c%s%c)"),lr(),e.method,r,`color:${i}`,`${t.status} ${t.statusText}`,"color:inherit"),console.log("Request",n),console.log("Handler:",{mask:this.info.path,resolver:this.resolver}),console.log("Response",o),console.groupEnd()}}function Mr(e,t){try{return e()}catch(e){null==t||t(e)}}const Fr={set:L,status:r,delay:Z,fetch:ne,data:X,extensions:W,errors:ee,cookie:B};class jr extends kr{constructor(e,t,r,n){let o=t;if(null!=(i=t)&&"object"==typeof i&&"kind"in i&&"definitions"in i){const r=or(t);if(r.operationType!==e)throw new Error(`Failed to create a GraphQL handler: provided a DocumentNode with a mismatched operation type (expected "${e}", but got "${r.operationType}").`);if(!r.operationName)throw new Error("Failed to create a GraphQL handler: provided a DocumentNode with no operation name.");o=r.operationName}var i;super({info:{header:"all"===e?`${e} (origin: ${r.toString()})`:`${e} ${o} (origin: ${r.toString()})`,operationType:e,operationName:o},ctx:Fr,resolver:n}),this.endpoint=r}parse(e){return Mr((()=>ar(e)),(e=>console.error(e.message)))}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{variables:(null==t?void 0:t.variables)||{}})}predicate(e,t){if(!t)return!1;if(!t.operationName&&"all"!==this.info.operationType){const t=nr(e);return Ge.warn(`Failed to intercept a GraphQL request at "${e.method} ${t}": anonymous GraphQL operations are not supported.\n\nConsider naming this operation or using "graphql.operation" request handler to intercept GraphQL requests regardless of their operation name/type. Read more: https://mswjs.io/docs/api/graphql/operation `),!1}const r=xr(e.url,this.endpoint),n="all"===this.info.operationType||t.operationType===this.info.operationType,o=this.info.operationName instanceof RegExp?this.info.operationName.test(t.operationName||""):t.operationName===this.info.operationName;return r.matches&&n&&o}log(e,t,r,n){const o=pr(e),i=dr(t),s=ur(t.status),a=(null==n?void 0:n.operationName)?`${null==n?void 0:n.operationType} ${null==n?void 0:n.operationName}`:`anonymous ${null==n?void 0:n.operationType}`;console.groupCollapsed(Ge.formatMessage("%s %s (%c%s%c)"),lr(),`${a}`,`color:${s}`,`${t.status} ${t.statusText}`,"color:inherit"),console.log("Request:",o),console.log("Handler:",this),console.log("Response:",i),console.groupEnd()}}function Ur(e,t,r="warn"){if("function"==typeof r)return void r(e);const n=Mr((()=>ar(e))),o=function(e){return e.reduce(((e,t)=>(t instanceof Pr&&e.rest.push(t),t instanceof jr&&e.graphql.push(t),e)),{rest:[],graphql:[]})}(t),i=n?o.graphql:o.rest,s=function(e,t,r){return t.reduce(((t,n)=>{const o=r(e,n);return t.concat([[o,n]])}),[]).sort((([e],[t])=>e-t)).filter((([e])=>e<=3)).slice(0,4).map((([,e])=>e))}(e,i,n?(a=n,(e,t)=>{if(void 0===a.operationName)return 1/0;const{operationType:r,operationName:n}=t.info,o=a.operationType===r?.5:0;return ct(a.operationName,n)-o}):(e,t)=>{const{path:r,method:n}=t.info;if(r instanceof RegExp)return 1/0;const o=st(e.method,n)?.5:0,i=nr(e);return ct(i,r)-o});var a;const c=s.length>0?function(e){return e.length>1?`Did you mean to request one of the following resources instead?\n\n${e.map((e=>` • ${e.info.header}`)).join("\n")}`:`Did you mean to request "${e[0].info.header}" instead?`}(s):"",u=nr(e),l=["captured a request without a matching request handler:",` • ${n?`${n.operationType} ${n.operationName} (${e.method} ${u})`:`${e.method} ${u}`}`,c,"If you still wish to intercept this unhandled request, please create a request handler for it.\nRead more: https://mswjs.io/docs/getting-started/mocks"].filter(Boolean).join("\n\n");switch(r){case"error":throw Ge.error("Error: %s",l),new Error('Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.');case"warn":Ge.warn("Warning: %s",l);break;case"bypass":break;default:throw new Error(Ge.formatMessage('Failed to react to an unhandled request: 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.',r))}}function qr(e,t,r,n,o){var i,s,a;return Ie(this,void 0,void 0,(function*(){if(n.emit("request:start",e),e.headers.get("x-msw-bypass"))return n.emit("request:end",e),void(null===(i=null==o?void 0:o.onBypassResponse)||void 0===i||i.call(o,e));const c=yield((e,t,r)=>Ie(void 0,void 0,void 0,(function*(){const n=t.filter((t=>t.test(e,r)));if(0===n.length)return{handler:void 0,response:void 0};const o=yield n.reduce(((t,n)=>Ie(void 0,void 0,void 0,(function*(){const o=yield t;if(null==o?void 0:o.response)return t;const i=yield n.run(e,r);return null===i||i.handler.shouldSkip?null:i.response?(i.response.once&&n.markAsSkipped(!0),i):{request:i.request,handler:i.handler,response:void 0,parsedResult:i.parsedResult}}))),Promise.resolve(null));return o?{handler:o.handler,publicRequest:o.request,parsedRequest:o.parsedResult,response:o.response}:{handler:void 0,response:void 0}})))(e,t,null==o?void 0:o.resolutionContext),{handler:u,response:l}=c;return u?l?(function(e,t){We.store.add(Object.assign(Object.assign({},e),{url:e.url.toString()}),t),We.store.persist()}(e,l),n.emit("request:match",e),new Promise((t=>{var r,i,s;const a=c,u=(null===(r=null==o?void 0:o.transformResponse)||void 0===r?void 0:r.call(o,l))||l;null===(i=null==o?void 0:o.onMockedResponse)||void 0===i||i.call(o,u,a),setTimeout((()=>{var r;null===(r=null==o?void 0:o.onMockedResponseSent)||void 0===r||r.call(o,u,a),n.emit("request:end",e),t(u)}),null!==(s=l.delay)&&void 0!==s?s:0)}))):(Ge.warn("Expected response resolver to return a mocked response Object, but got %s. The original response is going to be used instead.\n\n • %s\n %s",l,u.info.header,u.info.callFrame),n.emit("request:end",e),void(null===(a=null==o?void 0:o.onBypassResponse)||void 0===a||a.call(o,e))):(Ur(e,t,r.onUnhandledRequest),n.emit("request:unhandled",e),n.emit("request:end",e),void(null===(s=null==o?void 0:o.onBypassResponse)||void 0===s||s.call(o,e)))}))}const Hr=(e,t)=>(r,n)=>Ie(void 0,void 0,void 0,(function*(){const i=(e=>{const t=e.ports[0];return{send(e){t&&t.postMessage(e)}}})(r);try{const r=function(e){const t={id:e.id,cache:e.cache,credentials:e.credentials,method:e.method,url:new URL(e.url),referrer:e.referrer,referrerPolicy:e.referrerPolicy,redirect:e.redirect,mode:e.mode,params:{},cookies:{},integrity:e.integrity,keepalive:e.keepalive,destination:e.destination,body:at(e),bodyUsed:e.bodyUsed,headers:new o.Headers(e.headers)};return nt(t),t.body=it(t.body,t.headers),t}(n.payload);yield qr(r,e.requestHandlers,t,e.emitter,{transformResponse:e=>Object.assign(Object.assign({},e),{headers:e.headers.all()}),onBypassResponse:()=>i.send({type:"MOCK_NOT_FOUND"}),onMockedResponse(e){i.send({type:"MOCK_SUCCESS",payload:e})},onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}catch(e){if(e instanceof Xe)return i.send({type:"NETWORK_ERROR",payload:{name:e.name,message:e.message}});i.send({type:"INTERNAL_ERROR",payload:{status:500,body:JSON.stringify({errorType:e.constructor.name,message:e.message,location:e.stack})}})}}));const Br=e=>function(t,r){const n=(()=>Ie(this,void 0,void 0,(function*(){e.events.removeAllListeners(),e.workerChannel.on("REQUEST",Hr(e,t)),e.workerChannel.on("RESPONSE",function(e){return(t,r)=>{var n;const{payload:o}=r;if(null===(n=o.type)||void 0===n?void 0:n.includes("opaque"))return;const i=new Response(o.body||null,o);"msw"===i.headers.get("x-powered-by")?e.emitter.emit("response:mocked",i,o.requestId):e.emitter.emit("response:bypass",i,o.requestId)}}(e));const n=yield Ke(t.serviceWorker.url,t.serviceWorker.options,t.findWorker),[o,i]=n;if(!o){const e=(null==r?void 0:r.findWorker)?Ge.formatMessage('Failed to locate the Service Worker registration using a custom "findWorker" predicate.\n\nPlease ensure that the custom predicate properly locates the Service Worker registration at "%s".\nMore details: https://mswjs.io/docs/api/setup-worker/start#findworker\n',t.serviceWorker.url):Ge.formatMessage('Failed to locate the Service Worker registration.\n\nThis 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.\n\nPlease 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',t.serviceWorker.url,location.host);throw new Error(e)}e.worker=o,e.registration=i,e.events.addListener(window,"beforeunload",(()=>{"redundant"!==o.state&&e.workerChannel.send("CLIENT_CLOSED"),window.clearInterval(e.keepAliveInterval)}));const[s]=yield De((()=>function(e,t){return Ie(this,void 0,void 0,(function*(){e.workerChannel.send("INTEGRITY_CHECK_REQUEST");const{payload:r}=yield e.events.once("INTEGRITY_CHECK_RESPONSE");if("02f4ad4a2797f85668baf196e553d929"!==r)throw new Error(`Currently active Service Worker (${r}) is behind the latest published one (02f4ad4a2797f85668baf196e553d929).`);return t}))}(e,o)));return s&&Ge.error(`Detected outdated Service Worker: ${s.message}\n\nThe mocking is still enabled, but it's highly recommended that you update your Service Worker by running:\n\n$ npx msw init <PUBLIC_DIR>\n\nThis is necessary to ensure that the Service Worker is in sync with the library to guarantee its stability.\nIf this message still persists after updating, please report an issue: https://github.com/open-draft/msw/issues `),yield function(e,t){return Ie(this,void 0,void 0,(function*(){return e.workerChannel.send("MOCK_ACTIVATE"),e.events.once("MOCKING_ENABLED").then((()=>{Ye({quiet:t.quiet})}))}))}(e,t).catch((e=>{throw new Error(`Failed to enable mocking: ${null==e?void 0:e.message}`)})),e.keepAliveInterval=window.setInterval((()=>e.workerChannel.send("KEEPALIVE_REQUEST")),5e3),function(e,t){(null==t?void 0:t.quiet)||location.href.startsWith(e.scope)||Ge.warn(`Cannot intercept requests on this page because it's outside of the worker's scope ("${e.scope}"). If you wish to mock API requests on this page, you must resolve this scope issue.\n\n- (Recommended) Register the worker at the root level ("/") of your application.\n- Set the "Service-Worker-Allowed" response header to allow out-of-scope workers.`)}(i,e.startOptions),i})))();return t.waitUntilReady&&function(e){const t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(...r){De((()=>e)).then((()=>{window.XMLHttpRequest.prototype.send=t,this.send(...r)}))};const r=window.fetch;window.fetch=(...t)=>Ie(this,void 0,void 0,(function*(){return yield De((()=>e)),window.fetch=r,window.fetch(...t)}))}(n),n};function $r(e={}){e.quiet||console.log(`%c${Ge.formatMessage("Mocking disabled.")}`,"color:orangered;font-weight:bold;")}const Vr={serviceWorker:{url:"/mockServiceWorker.js",options:null},quiet:!1,waitUntilReady:!0,onUnhandledRequest:"warn",findWorker:(e,t)=>e===t};function Gr(e,t){return r=>(t.startOptions=function(e){return K(Vr,e||{})}(r),e(t.startOptions,r||{}))}var Kr={},Yr={};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.createInterceptor=void 0;var Xr=ce;Yr.createInterceptor=function(e){var t=new Xr.StrictEventEmitter,r=[];return{apply:function(){r=e.modules.map((function(r){return r(t,e.resolver)}))},on:function(e,r){t.addListener(e,r)},restore:function(){if(t.removeAllListeners(),0===r.length)throw new Error('Failed to restore patched modules: no patches found. Did you forget to run ".apply()"?');r.forEach((function(e){return e()}))}}};var Wr={},Jr={};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.toIsoResponse=void 0;var zr=o;Jr.toIsoResponse=function(e){return{status:e.status||200,statusText:e.statusText||"OK",headers:zr.objectToHeaders(e.headers||{}),body:e.body}};var Qr=n&&n.__assign||function(){return(Qr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Zr=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},en=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},tn=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.createRemoteResolver=Wr.createRemoteInterceptor=void 0;var rn=o,nn=Pe,on=ce,sn=Yr,an=Jr;function cn(e,t){switch(e){case"url":return new URL(t);case"headers":return new rn.Headers(t);default:return t}}Wr.createRemoteInterceptor=function(e){if(nn.invariant(process.connected,"Failed to create a remote interceptor: the current process (%s) does not have a parent. Please make sure you're spawning this process as a child process in order to use remote request interception.",process.pid),void 0===process.send)throw new Error("Failed to create a remote interceptor: the current process ("+process.pid+") does not have the IPC enabled. Please make sure you're spawning this process with the \"ipc\" stdio value set:\n\nspawn('node', ['module.js'], { stdio: ['ipc'] })");var t,r=sn.createInterceptor(Qr(Qr({},e),{resolver:function(e){var r,n=JSON.stringify(e);return null===(r=process.send)||void 0===r||r.call(process,"request:"+n),new Promise((function(r){t=function(t){if("string"==typeof t&&t.startsWith("response:"+e.id)){var n=tn(t.match(/^response:.+?:(.+)$/)||[],2)[1];if(!n)return r();var o=JSON.parse(n);return r(o)}},process.addListener("message",t)}))}}));return Qr(Qr({},r),{restore:function(){r.restore(),process.removeListener("message",t)}})},Wr.createRemoteResolver=function(e){var t=this,r=new on.StrictEventEmitter,n=function(n){return Zr(t,void 0,void 0,(function(){var t,o,i,s,a;return en(this,(function(c){switch(c.label){case 0:return"string"!=typeof n?[2]:n.startsWith("request:")?(t=tn(n.match(/^request:(.+)$/)||[],2),(o=t[1])?(i=JSON.parse(o,cn),r.emit("request",i),[4,e.resolver(i,void 0)]):[2]):[3,2];case 1:s=c.sent(),a=JSON.stringify(s),e.process.send("response:"+i.id+":"+a,(function(e){e||s&&r.emit("response",i,an.toIsoResponse(s))})),c.label=2;case 2:return[2]}}))}))},o=function(){e.process.removeListener("message",n)};return e.process.addListener("message",n),e.process.addListener("disconnect",o),e.process.addListener("error",o),e.process.addListener("exit",o),{on:function(e,t){r.addListener(e,t)}}},function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.getCleanUrl=void 0,r(Yr,e),r(Wr,e);var o=Er;Object.defineProperty(e,"getCleanUrl",{enumerable:!0,get:function(){return o.getCleanUrl}})}(Kr);var un={},ln={};Object.defineProperty(ln,"__esModule",{value:!0}),ln.uuidv4=void 0,ln.uuidv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))};var pn={exports:{}},dn=1e3,fn=60*dn,hn=60*fn,vn=24*hn,mn=7*vn,yn=365.25*vn,gn=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*yn;case"weeks":case"week":case"w":return r*mn;case"days":case"day":case"d":return r*vn;case"hours":case"hour":case"hrs":case"hr":case"h":return r*hn;case"minutes":case"minute":case"mins":case"min":case"m":return r*fn;case"seconds":case"second":case"secs":case"sec":case"s":return r*dn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=vn)return En(e,t,vn,"day");if(t>=hn)return En(e,t,hn,"hour");if(t>=fn)return En(e,t,fn,"minute");if(t>=dn)return En(e,t,dn,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=vn)return Math.round(e/vn)+"d";if(t>=hn)return Math.round(e/hn)+"h";if(t>=fn)return Math.round(e/fn)+"m";if(t>=dn)return Math.round(e/dn)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function En(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}var bn=function(e){function t(e){let n,o,i,s=null;function a(...e){if(!a.enabled)return;const r=a,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];n=i.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=gn,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t};!function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=bn(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(pn,pn.exports);var wn=n&&n.__assign||function(){return(wn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Nn=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},Tn=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(un,"__esModule",{value:!0});var xn=un.interceptFetch=void 0,_n=o,On=Jr,Sn=ln,Cn=pn.exports("fetch");function In(e){return Nn(this,void 0,void 0,(function(){var t;return Tn(this,(function(r){switch(r.label){case 0:return t={status:e.status,statusText:e.statusText,headers:_n.objectToHeaders(_n.headersToObject(e.headers))},[4,e.text()];case 1:return[2,(t.body=r.sent(),t)]}}))}))}xn=un.interceptFetch=function(e,t){var r=window.fetch;return Cn('replacing "window.fetch"...'),window.fetch=function(n,o){return Nn(void 0,void 0,void 0,(function(){var i,s,a,c,u,l,p;return Tn(this,(function(d){switch(d.label){case 0:return i=new Request(n,o),s="string"==typeof n?n:n.url,a=(null==o?void 0:o.method)||"GET",Cn("[%s] %s",a,s),p={id:Sn.uuidv4(),url:new URL(s,location.origin),method:a,headers:new _n.Headers((null==o?void 0:o.headers)||{})},[4,i.text()];case 1:return p.body=d.sent(),Cn("isomorphic request",c=p),e.emit("request",c),Cn("awaiting for the mocked response..."),[4,t(c,i)];case 2:return u=d.sent(),Cn("mocked response",u),u?(l=On.toIsoResponse(u),Cn("derived isomorphic response",l),e.emit("response",c,l),[2,new Response(u.body,wn(wn({},l),{headers:_n.flattenHeadersObject(u.headers||{})}))]):(Cn("no mocked response found, bypassing..."),[2,r(n,o).then((function(t){return Nn(void 0,void 0,void 0,(function(){var r,n,o,i;return Tn(this,(function(s){switch(s.label){case 0:return r=t.clone(),Cn("original fetch performed",r),o=(n=e).emit,i=["response",c],[4,In(r)];case 1:return o.apply(n,i.concat([s.sent()])),[2,t]}}))}))}))])}}))}))},function(){Cn("restoring modules..."),window.fetch=r}};var An={},Rn={},kn={},Dn={};function Ln(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var Pn=Ln({HTML:"text/html",isHTML:function(e){return e===Pn.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Mn=Ln({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===Mn.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Dn.freeze=Ln,Dn.MIME_TYPE=Pn,Dn.NAMESPACE=Mn;var Fn={};!function(e){var t=Dn.freeze;e.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=t({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),e.entityMap=e.HTML_ENTITIES}(Fn);var jn={},Un=Dn.NAMESPACE,qn=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Hn=new RegExp("[\\-\\.0-9"+qn.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Bn=new RegExp("^"+qn.source+Hn.source+"*(?::"+qn.source+Hn.source+"*)?$");function $n(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,$n)}function Vn(){}function Gn(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function Kn(e,t,r,n,o,i){function s(e,t,n){e in r.attributeNames&&i.fatalError("Attribute "+e+" redefined"),r.addValue(e,t,n)}for(var a,c=++t,u=0;;){var l=e.charAt(c);switch(l){case"=":if(1===u)a=e.slice(t,c),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(i.warning('attribute value must after "="'),a=e.slice(t,c)),t=c+1,!((c=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");s(a,p=e.slice(t,c).replace(/&#?\w+;/g,o),t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');s(a,p=e.slice(t,c).replace(/&#?\w+;/g,o),t),i.warning('attribute "'+a+'" missed start quot('+l+")!!"),t=c+1,u=5}break;case"/":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:u=7,r.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),0==u&&r.setTagName(e.slice(t,c)),c;case">":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=e.slice(t,c)).slice(-1)&&(r.closed=!0,p=p.slice(0,-1));case 2:2===u&&(p=a),4==u?(i.warning('attribute "'+p+'" missed quot(")!'),s(a,p.replace(/&#?\w+;/g,o),t)):(Un.isHTML(n[""])&&p.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),s(p,p,t));break;case 3:throw new Error("attribute value missed!!")}return c;case"€":l=" ";default:if(l<=" ")switch(u){case 0:r.setTagName(e.slice(t,c)),u=6;break;case 1:a=e.slice(t,c),u=2;break;case 4:var p=e.slice(t,c).replace(/&#?\w+;/g,o);i.warning('attribute "'+p+'" missed quot(")!!'),s(a,p,t);case 5:u=6}else switch(u){case 2:r.tagName,Un.isHTML(n[""])&&a.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),s(a,a,t),t=c,u=1;break;case 5:i.warning('attribute space is required"'+a+'"!!');case 6:u=1,t=c;break;case 3:u=4,t=c;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function Yn(e,t,r){for(var n=e.tagName,o=null,i=e.length;i--;){var s=e[i],a=s.qName,c=s.value;if((d=a.indexOf(":"))>0)var u=s.prefix=a.slice(0,d),l=a.slice(d+1),p="xmlns"===u&&l;else l=a,u=null,p="xmlns"===a&&"";s.localName=l,!1!==p&&(null==o&&(o={},Jn(r,r={})),r[p]=o[p]=c,s.uri=Un.XMLNS,t.startPrefixMapping(p,c))}for(i=e.length;i--;){(u=(s=e[i]).prefix)&&("xml"===u&&(s.uri=Un.XML),"xmlns"!==u&&(s.uri=r[u||""]))}var d;(d=n.indexOf(":"))>0?(u=e.prefix=n.slice(0,d),l=e.localName=n.slice(d+1)):(u=null,l=e.localName=n);var f=e.uri=r[u||""];if(t.startElement(f,l,n,e),!e.closed)return e.currentNSMap=r,e.localNSMap=o,!0;if(t.endElement(f,l,n),o)for(u in o)t.endPrefixMapping(u)}function Xn(e,t,r,n,o){if(/^(?:script|textarea)$/i.test(r)){var i=e.indexOf("</"+r+">",t),s=e.substring(t+1,i);if(/[&<]/.test(s))return/^script$/i.test(r)?(o.characters(s,0,s.length),i):(s=s.replace(/&#?\w+;/g,n),o.characters(s,0,s.length),i)}return t+1}function Wn(e,t,r,n){var o=n[r];return null==o&&((o=e.lastIndexOf("</"+r+">"))<t&&(o=e.lastIndexOf("</"+r)),n[r]=o),o<t}function Jn(e,t){for(var r in e)t[r]=e[r]}function zn(e,t,r,n){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(o=e.indexOf("--\x3e",t+4))>t?(r.comment(e,t+4,o-t-4),o+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,o-t-9),r.endCDATA(),o+3}var i=function(e,t){var r,n=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;r=o.exec(e);)if(n.push(r),r[1])return n}(e,t),s=i.length;if(s>1&&/!doctype/i.test(i[0][0])){var a=i[1][0],c=!1,u=!1;s>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],u=s>4&&i[4][0]):/^system$/i.test(i[2][0])&&(u=i[3][0]));var l=i[s-1];return r.startDTD(a,c,u),r.endDTD(),l.index+l[0].length}}return-1}function Qn(e,t,r){var n=e.indexOf("?>",t);if(n){var o=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,r.processingInstruction(o[1],o[2]),n+2):-1}return-1}function Zn(){this.attributeNames={}}$n.prototype=new Error,$n.prototype.name=$n.name,Vn.prototype={parse:function(e,t,r){var n=this.domBuilder;n.startDocument(),Jn(t,t={}),function(e,t,r,n,o){function i(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return t in r?r[t]:"#"===t.charAt(0)?i(parseInt(t.substr(1).replace("x","0x"))):(o.error("entity not found:"+e),e)}function a(t){if(t>v){var r=e.substring(v,t).replace(/&#?\w+;/g,s);d&&c(v),n.characters(r,0,t-v),v=t}}function c(t,r){for(;t>=l&&(r=p.exec(e));)u=r.index,l=u+r[0].length,d.lineNumber++;d.columnNumber=t-u+1}var u=0,l=0,p=/.*(?:\r\n?|\n)|.*$/g,d=n.locator,f=[{currentNSMap:t}],h={},v=0;for(;;){try{var m=e.indexOf("<",v);if(m<0){if(!e.substr(v).match(/^\s*$/)){var y=n.doc,g=y.createTextNode(e.substr(v));y.appendChild(g),n.currentElement=g}return}switch(m>v&&a(m),e.charAt(m+1)){case"/":var E=e.indexOf(">",m+3),b=e.substring(m+2,E).replace(/[ \t\n\r]+$/g,""),w=f.pop();E<0?(b=e.substring(m+2).replace(/[\s<].*/,""),o.error("end tag name: "+b+" is not complete:"+w.tagName),E=m+1+b.length):b.match(/\s</)&&(b=b.replace(/[\s<].*/,""),o.error("end tag name: "+b+" maybe not complete"),E=m+1+b.length);var N=w.localNSMap,T=w.tagName==b;if(T||w.tagName&&w.tagName.toLowerCase()==b.toLowerCase()){if(n.endElement(w.uri,w.localName,b),N)for(var x in N)n.endPrefixMapping(x);T||o.fatalError("end tag name: "+b+" is not match the current start tagName:"+w.tagName)}else f.push(w);E++;break;case"?":d&&c(m),E=Qn(e,m,n);break;case"!":d&&c(m),E=zn(e,m,n,o);break;default:d&&c(m);var _=new Zn,O=f[f.length-1].currentNSMap,S=(E=Kn(e,m,_,O,s,o),_.length);if(!_.closed&&Wn(e,E,_.tagName,h)&&(_.closed=!0,r.nbsp||o.warning("unclosed xml attribute")),d&&S){for(var C=Gn(d,{}),I=0;I<S;I++){var A=_[I];c(A.offset),A.locator=Gn(d,{})}n.locator=C,Yn(_,n,O)&&f.push(_),n.locator=d}else Yn(_,n,O)&&f.push(_);Un.isHTML(_.uri)&&!_.closed?E=Xn(e,E,_.tagName,s,n):E++}}catch(e){if(e instanceof $n)throw e;o.error("element parse error: "+e),E=-1}E>v?v=E:a(Math.max(m,v)+1)}}(e,t,r,n,this.errorHandler),n.endDocument()}},Zn.prototype={setTagName:function(e){if(!Bn.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!Bn.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},jn.XMLReader=Vn,jn.ParseError=$n;var eo={},to=Dn.NAMESPACE;function ro(e){return""!==e}function no(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function oo(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(ro):[]}(e);return Object.keys(t.reduce(no,{}))}function io(e,t){for(var r in e)t[r]=e[r]}function so(e,t){var r=e.prototype;if(!(r instanceof t)){function n(){}n.prototype=t.prototype,io(r,n=new n),e.prototype=r=n}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var ao={},co=ao.ELEMENT_NODE=1,uo=ao.ATTRIBUTE_NODE=2,lo=ao.TEXT_NODE=3,po=ao.CDATA_SECTION_NODE=4,fo=ao.ENTITY_REFERENCE_NODE=5,ho=ao.ENTITY_NODE=6,vo=ao.PROCESSING_INSTRUCTION_NODE=7,mo=ao.COMMENT_NODE=8,yo=ao.DOCUMENT_NODE=9,go=ao.DOCUMENT_TYPE_NODE=10,Eo=ao.DOCUMENT_FRAGMENT_NODE=11,bo=ao.NOTATION_NODE=12,wo={},No={};wo.INDEX_SIZE_ERR=(No[1]="Index size error",1),wo.DOMSTRING_SIZE_ERR=(No[2]="DOMString size error",2);var To=wo.HIERARCHY_REQUEST_ERR=(No[3]="Hierarchy request error",3);wo.WRONG_DOCUMENT_ERR=(No[4]="Wrong document",4),wo.INVALID_CHARACTER_ERR=(No[5]="Invalid character",5),wo.NO_DATA_ALLOWED_ERR=(No[6]="No data allowed",6),wo.NO_MODIFICATION_ALLOWED_ERR=(No[7]="No modification allowed",7);var xo=wo.NOT_FOUND_ERR=(No[8]="Not found",8);wo.NOT_SUPPORTED_ERR=(No[9]="Not supported",9);var _o=wo.INUSE_ATTRIBUTE_ERR=(No[10]="Attribute in use",10);function Oo(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,No[e]),this.message=No[e],Error.captureStackTrace&&Error.captureStackTrace(this,Oo);return r.code=e,t&&(this.message=this.message+": "+t),r}function So(){}function Co(e,t){this._node=e,this._refresh=t,Io(this)}function Io(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);ci(e,"length",r.length),io(r,e),e._inc=t}}function Ao(){}function Ro(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function ko(e,t,r,n){if(n?t[Ro(t,n)]=r:t[t.length++]=r,e){r.ownerElement=e;var o=e.ownerDocument;o&&(n&&Uo(o,e,n),function(e,t,r){e&&e._inc++,r.namespaceURI===to.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(o,e,r))}}function Do(e,t,r){var n=Ro(t,r);if(!(n>=0))throw Oo(xo,new Error(e.tagName+"@"+r));for(var o=t.length-1;n<o;)t[n]=t[++n];if(t.length=o,e){var i=e.ownerDocument;i&&(Uo(i,e,r),r.ownerElement=null)}}function Lo(){}function Po(){}function Mo(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function Fo(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(Fo(e,t))return!0}while(e=e.nextSibling)}function jo(){}function Uo(e,t,r,n){e&&e._inc++,r.namespaceURI===to.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function qo(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var o=t.firstChild,i=0;o;)n[i++]=o,o=o.nextSibling;n.length=i}}}function Ho(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,qo(e.ownerDocument,e),t}function Bo(e,t,r){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Eo){var o=t.firstChild;if(null==o)return t;var i=t.lastChild}else o=i=t;var s=r?r.previousSibling:e.lastChild;o.previousSibling=s,i.nextSibling=r,s?s.nextSibling=o:e.firstChild=o,null==r?e.lastChild=i:r.previousSibling=i;do{o.parentNode=e}while(o!==i&&(o=o.nextSibling));return qo(e.ownerDocument||e,e),t.nodeType==Eo&&(t.firstChild=t.lastChild=null),t}function $o(){this._nsMap={}}function Vo(){}function Go(){}function Ko(){}function Yo(){}function Xo(){}function Wo(){}function Jo(){}function zo(){}function Qo(){}function Zo(){}function ei(){}function ti(){}function ri(e,t){var r=[],n=9==this.nodeType&&this.documentElement||this,o=n.prefix,i=n.namespaceURI;if(i&&null==o&&null==(o=n.lookupPrefix(i)))var s=[{namespace:i,prefix:null}];return ii(this,r,e,t,s),r.join("")}function ni(e,t,r){var n=e.prefix||"",o=e.namespaceURI;if(!o)return!1;if("xml"===n&&o===to.XML||o===to.XMLNS)return!1;for(var i=r.length;i--;){var s=r[i];if(s.prefix===n)return s.namespace!==o}return!0}function oi(e,t,r){e.push(" ",t,'="',r.replace(/[<&"]/g,Mo),'"')}function ii(e,t,r,n,o){if(o||(o=[]),n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case co:var i=e.attributes,s=i.length,a=e.firstChild,c=e.tagName,u=c;if(!(r=to.isHTML(e.namespaceURI)||r)&&!e.prefix&&e.namespaceURI){for(var l,p=0;p<i.length;p++)if("xmlns"===i.item(p).name){l=i.item(p).value;break}if(l!==e.namespaceURI)for(var d=o.length-1;d>=0;d--){var f=o[d];if(f.namespace===e.namespaceURI){f.prefix&&(u=f.prefix+":"+c);break}}}t.push("<",u);for(var h=0;h<s;h++){"xmlns"==(v=i.item(h)).prefix?o.push({prefix:v.localName,namespace:v.value}):"xmlns"==v.nodeName&&o.push({prefix:"",namespace:v.value})}for(h=0;h<s;h++){var v,m,y;if(ni(v=i.item(h),0,o))oi(t,(m=v.prefix||"")?"xmlns:"+m:"xmlns",y=v.namespaceURI),o.push({prefix:m,namespace:y});ii(v,t,r,n,o)}if(c===u&&ni(e,0,o))oi(t,(m=e.prefix||"")?"xmlns:"+m:"xmlns",y=e.namespaceURI),o.push({prefix:m,namespace:y});if(a||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),r&&/^script$/i.test(c))for(;a;)a.data?t.push(a.data):ii(a,t,r,n,o.slice()),a=a.nextSibling;else for(;a;)ii(a,t,r,n,o.slice()),a=a.nextSibling;t.push("</",u,">")}else t.push("/>");return;case yo:case Eo:for(a=e.firstChild;a;)ii(a,t,r,n,o.slice()),a=a.nextSibling;return;case uo:return oi(t,e.name,e.value);case lo:return t.push(e.data.replace(/[<&]/g,Mo).replace(/]]>/g,"]]&gt;"));case po:return t.push("<![CDATA[",e.data,"]]>");case mo:return t.push("\x3c!--",e.data,"--\x3e");case go:var g=e.publicId,E=e.systemId;if(t.push("<!DOCTYPE ",e.name),g)t.push(" PUBLIC ",g),E&&"."!=E&&t.push(" ",E),t.push(">");else if(E&&"."!=E)t.push(" SYSTEM ",E,">");else{var b=e.internalSubset;b&&t.push(" [",b,"]"),t.push(">")}return;case vo:return t.push("<?",e.target," ",e.data,"?>");case fo:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function si(e,t,r){var n;switch(t.nodeType){case co:(n=t.cloneNode(!1)).ownerDocument=e;case Eo:break;case uo:r=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,r)for(var o=t.firstChild;o;)n.appendChild(si(e,o,r)),o=o.nextSibling;return n}function ai(e,t,r){var n=new t.constructor;for(var o in t){var i=t[o];"object"!=typeof i&&i!=n[o]&&(n[o]=i)}switch(t.childNodes&&(n.childNodes=new So),n.ownerDocument=e,n.nodeType){case co:var s=t.attributes,a=n.attributes=new Ao,c=s.length;a._ownerElement=n;for(var u=0;u<c;u++)n.setAttributeNode(ai(e,s.item(u),!0));break;case uo:r=!0}if(r)for(var l=t.firstChild;l;)n.appendChild(ai(e,l,r)),l=l.nextSibling;return n}function ci(e,t,r){e[t]=r}wo.INVALID_STATE_ERR=(No[11]="Invalid state",11),wo.SYNTAX_ERR=(No[12]="Syntax error",12),wo.INVALID_MODIFICATION_ERR=(No[13]="Invalid modification",13),wo.NAMESPACE_ERR=(No[14]="Invalid namespace",14),wo.INVALID_ACCESS_ERR=(No[15]="Invalid access",15),Oo.prototype=Error.prototype,io(wo,Oo),So.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var r=[],n=0;n<this.length;n++)ii(this[n],r,e,t);return r.join("")}},Co.prototype.item=function(e){return Io(this),this[e]},so(Co,So),Ao.prototype={length:0,item:So.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==e)return r}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new Oo(_o);var r=this.getNamedItem(e.nodeName);return ko(this._ownerElement,this,e,r),r},setNamedItemNS:function(e){var t,r=e.ownerElement;if(r&&r!=this._ownerElement)throw new Oo(_o);return t=this.getNamedItemNS(e.namespaceURI,e.localName),ko(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return Do(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return Do(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){for(var r=this.length;r--;){var n=this[r];if(n.localName==t&&n.namespaceURI==e)return n}return null}},Lo.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,r){var n=new jo;if(n.implementation=this,n.childNodes=new So,n.doctype=r||null,r&&n.appendChild(r),t){var o=n.createElementNS(e,t);n.appendChild(o)}return n},createDocumentType:function(e,t,r){var n=new Wo;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=r||"",n}},Po.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Bo(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return Ho(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return ai(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==lo&&e.nodeType==lo?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(r[n]==e)return n;t=t.nodeType==uo?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&e in r)return r[e];t=t.nodeType==uo?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},io(ao,Po),io(ao,Po.prototype),jo.prototype={nodeName:"#document",nodeType:yo,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Eo){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return null==this.documentElement&&e.nodeType==co&&(this.documentElement=e),Bo(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),Ho(this,e)},importNode:function(e,t){return si(this,e,t)},getElementById:function(e){var t=null;return Fo(this.documentElement,(function(r){if(r.nodeType==co&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=oo(e);return new Co(this,(function(r){var n=[];return t.length>0&&Fo(r.documentElement,(function(o){if(o!==r&&o.nodeType===co){var i=o.getAttribute("class");if(i){var s=e===i;if(!s){var a=oo(i);s=t.every((c=a,function(e){return c&&-1!==c.indexOf(e)}))}s&&n.push(o)}}var c})),n}))},createElement:function(e){var t=new $o;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new So,(t.attributes=new Ao)._ownerElement=t,t},createDocumentFragment:function(){var e=new Zo;return e.ownerDocument=this,e.childNodes=new So,e},createTextNode:function(e){var t=new Ko;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Yo;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Xo;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new ei;return r.ownerDocument=this,r.tagName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new Vo;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Qo;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new $o,n=t.split(":"),o=r.attributes=new Ao;return r.childNodes=new So,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,o._ownerElement=r,r},createAttributeNS:function(e,t){var r=new Vo,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},so(jo,Po),$o.prototype={nodeType:co,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Eo?this.insertBefore(e,null):function(e,t){var r=t.parentNode;if(r){var n=e.lastChild;r.removeChild(t),n=e.lastChild}return n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,qo(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new Co(this,(function(t){var r=[];return Fo(t,(function(n){n===t||n.nodeType!=co||"*"!==e&&n.tagName!=e||r.push(n)})),r}))},getElementsByTagNameNS:function(e,t){return new Co(this,(function(r){var n=[];return Fo(r,(function(o){o===r||o.nodeType!==co||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||n.push(o)})),n}))}},jo.prototype.getElementsByTagName=$o.prototype.getElementsByTagName,jo.prototype.getElementsByTagNameNS=$o.prototype.getElementsByTagNameNS,so($o,Po),Vo.prototype.nodeType=uo,so(Vo,Po),Go.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(No[To])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},so(Go,Po),Ko.prototype={nodeName:"#text",nodeType:lo,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},so(Ko,Go),Yo.prototype={nodeName:"#comment",nodeType:mo},so(Yo,Go),Xo.prototype={nodeName:"#cdata-section",nodeType:po},so(Xo,Go),Wo.prototype.nodeType=go,so(Wo,Po),Jo.prototype.nodeType=bo,so(Jo,Po),zo.prototype.nodeType=ho,so(zo,Po),Qo.prototype.nodeType=fo,so(Qo,Po),Zo.prototype.nodeName="#document-fragment",Zo.prototype.nodeType=Eo,so(Zo,Po),ei.prototype.nodeType=vo,so(ei,Po),ti.prototype.serializeToString=function(e,t,r){return ri.call(e,t,r)},Po.prototype.toString=ri;try{if(Object.defineProperty){function ui(e){switch(e.nodeType){case co:case Eo:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(ui(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(Co.prototype,"length",{get:function(){return Io(this),this.$$length}}),Object.defineProperty(Po.prototype,"textContent",{get:function(){return ui(this)},set:function(e){switch(this.nodeType){case co:case Eo:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ci=function(e,t,r){e["$$"+t]=r}}}catch(e){}eo.DocumentType=Wo,eo.DOMException=Oo,eo.DOMImplementation=Lo,eo.Element=$o,eo.Node=Po,eo.NodeList=So,eo.XMLSerializer=ti;var li=Fn,pi=Dn.NAMESPACE;function di(e){this.options=e||{locator:{}}}function fi(){this.cdata=!1}function hi(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function vi(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function mi(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function yi(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}di.prototype.parseFromString=function(e,t){var r=this.options,n=new Ei,o=r.domBuilder||new fi,i=r.errorHandler,s=r.locator,a=r.xmlns||{},c=/\/x?html?$/.test(t),u=c?li.HTML_ENTITIES:li.XML_ENTITIES;return s&&o.setDocumentLocator(s),n.errorHandler=function(e,t,r){if(!e){if(t instanceof fi)return t;e=t}var n={},o=e instanceof Function;function i(t){var i=e[t];!i&&o&&(i=2==e.length?function(r){e(t,r)}:e),n[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+vi(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),n}(i,o,s),n.domBuilder=r.domBuilder||o,c&&(a[""]=pi.HTML),a.xml=a.xml||pi.XML,e&&"string"==typeof e?n.parse(e,a,u):n.errorHandler.error("invalid doc source"),o.doc},fi.prototype={startDocument:function(){this.doc=(new wi).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,n){var o=this.doc,i=o.createElementNS(e,r||t),s=n.length;yi(this,i),this.currentElement=i,this.locator&&hi(this.locator,i);for(var a=0;a<s;a++){e=n.getURI(a);var c=n.getValue(a),u=(r=n.getQName(a),o.createAttributeNS(e,r));this.locator&&hi(n.getLocator(a),u),u.value=u.nodeValue=c,i.setAttributeNode(u)}},endElement:function(e,t,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&hi(this.locator,r),yi(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=mi.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&hi(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=mi.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&hi(this.locator,n),yi(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var o=n.createDocumentType(e,t,r);this.locator&&hi(this.locator,o),yi(this,o)}},warning:function(e){console.warn("[xmldom warning]\t"+e,vi(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,vi(this.locator))},fatalError:function(e){throw new bi(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){fi.prototype[e]=function(){return null}}));var gi=jn,Ei=gi.XMLReader,bi=gi.ParseError,wi=kn.DOMImplementation=eo.DOMImplementation;kn.XMLSerializer=eo.XMLSerializer,kn.DOMParser=di,kn.__DOMHandler=fi;var Ni={};Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.parseJson=void 0,Ni.parseJson=function(e){try{return JSON.parse(e)}catch(e){return null}};var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.bufferFrom=void 0,Ti.bufferFrom=function(e){var t=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})),r=new Uint8Array(t.length);return Array.prototype.forEach.call(t,(function(e,t){r[t]=e.charCodeAt(0)})),r};var xi={},_i={};Object.defineProperty(_i,"__esModule",{value:!0}),_i.EventPolyfill=void 0;var Oi=function(){function e(e,t){this.AT_TARGET=0,this.BUBBLING_PHASE=0,this.CAPTURING_PHASE=0,this.NONE=0,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=e,this.target=(null==t?void 0:t.target)||null,this.currentTarget=(null==t?void 0:t.currentTarget)||null,this.timeStamp=Date.now()}return e.prototype.composedPath=function(){return[]},e.prototype.initEvent=function(e,t,r){this.type=e,this.bubbles=!!t,this.cancelable=!!r},e.prototype.preventDefault=function(){this.defaultPrevented=!0},e.prototype.stopPropagation=function(){},e.prototype.stopImmediatePropagation=function(){},e}();_i.EventPolyfill=Oi;var Si={},Ci=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Si,"__esModule",{value:!0}),Si.ProgressEventPolyfill=void 0;var Ii=function(e){function t(t,r){var n=e.call(this,t)||this;return n.lengthComputable=(null==r?void 0:r.lengthComputable)||!1,n.composed=(null==r?void 0:r.composed)||!1,n.loaded=(null==r?void 0:r.loaded)||0,n.total=(null==r?void 0:r.total)||0,n}return Ci(t,e),t}(_i.EventPolyfill);Si.ProgressEventPolyfill=Ii,Object.defineProperty(xi,"__esModule",{value:!0}),xi.createEvent=void 0;var Ai=_i,Ri=Si,ki="undefined"!=typeof ProgressEvent;xi.createEvent=function(e,t,r){var n=ki?ProgressEvent:Ri.ProgressEventPolyfill;return["error","progress","loadstart","loadend","load","timeout","abort"].includes(t)?new n(t,{lengthComputable:!0,loaded:(null==r?void 0:r.loaded)||0,total:(null==r?void 0:r.total)||0}):new Ai.EventPolyfill(t,{target:e,currentTarget:e})};var Di=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},Li=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Pi=n&&n.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Mi=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.createXMLHttpRequestOverride=void 0;var Fi=Ae,ji=o,Ui=kn,qi=Ni,Hi=Jr,Bi=ln,$i=Ti,Vi=xi,Gi=pn.exports;Rn.createXMLHttpRequestOverride=function(e){var t,r=e.pureXMLHttpRequest,n=e.observer,o=e.resolver,i=Gi("XHR");return(t=function(){function e(){this._events=[],this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.onreadystatechange=null,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.url="",this.method="GET",this.readyState=this.UNSENT,this.withCredentials=!1,this.status=200,this.statusText="OK",this.data="",this.response="",this.responseType="text",this.responseText="",this.responseXML=null,this.responseURL="",this.upload=null,this.timeout=0,this._requestHeaders=new ji.Headers,this._responseHeaders=new ji.Headers}return e.prototype.setReadyState=function(e){e!==this.readyState&&(i("readyState change %d -> %d",this.readyState,e),this.readyState=e,e!==this.UNSENT&&(i("triggerring readystate change..."),this.trigger("readystatechange")))},e.prototype.trigger=function(e,t){var r,n;i('trigger "%s" (%d)',e,this.readyState),i('resolve listener for event "%s"',e);var o=this["on"+e];null==o||o.call(this,Vi.createEvent(this,e,t));try{for(var s=Pi(this._events),a=s.next();!a.done;a=s.next()){var c=a.value;c.name===e&&(i('calling mock event listener "%s" (%d)',e,this.readyState),c.listener.call(this,Vi.createEvent(this,e,t)))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return this},e.prototype.reset=function(){i("reset"),this.setReadyState(this.UNSENT),this.status=200,this.statusText="OK",this.data="",this.response=null,this.responseText=null,this.responseXML=null,this._requestHeaders=new ji.Headers,this._responseHeaders=new ji.Headers},e.prototype.open=function(e,t,r,n,o){return void 0===r&&(r=!0),Di(this,void 0,void 0,(function(){return Li(this,(function(s){return(i=Gi("XHR "+e+" "+t))("open",{method:e,url:t,async:r,user:n,password:o}),this.reset(),this.setReadyState(this.OPENED),void 0===t?(this.url=e,this.method="GET"):(this.url=t,this.method=e,this.async=r,this.user=n,this.password=o),[2]}))}))},e.prototype.send=function(e){var t,s=this;i("send %s %s",this.method,this.url),this.data=e||"";try{t=new URL(this.url)}catch(e){t=new URL(this.url,window.location.href)}i("request headers",this._requestHeaders);var a={id:Bi.uuidv4(),url:t,method:this.method,body:this.data,headers:this._requestHeaders};n.emit("request",a),i("awaiting mocked response..."),Promise.resolve(Fi.until((function(){return Di(s,void 0,void 0,(function(){return Li(this,(function(e){return[2,o(a,this)]}))}))}))).then((function(e){var t,o=Mi(e,2),c=o[0],u=o[1];if(c)return i("middleware function threw an exception!",c),s.trigger("error"),void s.abort();if(u){if(i("received mocked response",u),s.trigger("loadstart"),s.status=u.status||200,s.statusText=u.statusText||"OK",s._responseHeaders=u.headers?ji.objectToHeaders(u.headers):new ji.Headers,i("set response status",s.status,s.statusText),i("set response headers",s._responseHeaders),s.setReadyState(s.HEADERS_RECEIVED),i("response type",s.responseType),s.response=s.getResponseBody(u.body),s.responseText=u.body||"",s.responseXML=s.getResponseXML(),i("set response body",s.response),u.body&&s.response){s.setReadyState(s.LOADING);var l=$i.bufferFrom(u.body);s.trigger("progress",{loaded:l.length,total:l.length})}s.setReadyState(s.DONE),s.trigger("load"),s.trigger("loadend"),n.emit("response",a,Hi.toIsoResponse(u))}else{i("no mocked response received!");var p=new r;i("opening an original request %s %s",s.method,s.url),p.open(s.method,s.url,null===(t=s.async)||void 0===t||t,s.user,s.password),p.addEventListener("load",(function(){i('original "onload"'),s.status=p.status,s.statusText=p.statusText,s.responseURL=p.responseURL,s.responseType=p.responseType,s.response=p.response,s.responseText=p.responseText,s.responseXML=p.responseXML,i("set mock request readyState to DONE"),s.setReadyState(s.DONE),i("received original response",s.status,s.statusText),i("original response body:",s.response);var e=p.getAllResponseHeaders();i("original response headers:\n",e),s._responseHeaders=ji.stringToHeaders(e),i("original response headers (normalized)",s._responseHeaders),i("original response finished"),n.emit("response",a,{status:p.status,statusText:p.statusText,headers:s._responseHeaders,body:p.response})})),s.propagateCallbacks(p),s.propagateListeners(p),s.propagateHeaders(p,s._requestHeaders),s.async&&(p.timeout=s.timeout),i("send",s.data),p.send(s.data)}}))},e.prototype.abort=function(){i("abort"),this.readyState>this.UNSENT&&this.readyState<this.DONE&&(this.setReadyState(this.UNSENT),this.trigger("abort"))},e.prototype.dispatchEvent=function(){return!1},e.prototype.setRequestHeader=function(e,t){i('set request header "%s" to "%s"',e,t),this._requestHeaders.append(e,t)},e.prototype.getResponseHeader=function(e){if(i('get response header "%s"',e),this.readyState<this.HEADERS_RECEIVED)return i("cannot return a header: headers not received (state: %s)",this.readyState),null;var t=this._responseHeaders.get(e);return i('resolved response header "%s" to "%s"',e,t,this._responseHeaders),t},e.prototype.getAllResponseHeaders=function(){return i("get all response headers"),this.readyState<this.HEADERS_RECEIVED?(i("cannot return headers: headers not received (state: %s)",this.readyState),""):ji.headersToString(this._responseHeaders)},e.prototype.addEventListener=function(e,t){i("addEventListener",e,t),this._events.push({name:e,listener:t})},e.prototype.removeEventListener=function(e,t){i("removeEventListener",e,t),this._events=this._events.filter((function(r){return r.name!==e&&r.listener!==t}))},e.prototype.overrideMimeType=function(){},e.prototype.getResponseBody=function(e){var t=null!=e?e:"";switch(i("coerced response body to",t),this.responseType){case"json":return i("resolving response body as JSON"),qi.parseJson(t);case"blob":var r=this.getResponseHeader("content-type")||"text/plain";return i("resolving response body as Blob",{type:r}),new Blob([t],{type:r});case"arraybuffer":return i("resolving response body as ArrayBuffer"),$i.bufferFrom(t);default:return t}},e.prototype.getResponseXML=function(){var e=this.getResponseHeader("Content-Type");return"application/xml"===e||"text/xml"===e?(new Ui.DOMParser).parseFromString(this.responseText,e):null},e.prototype.propagateCallbacks=function(e){e.onabort=this.abort,e.onerror=this.onerror,e.ontimeout=this.ontimeout,e.onload=this.onload,e.onloadstart=this.onloadstart,e.onloadend=this.onloadend,e.onprogress=this.onprogress,e.onreadystatechange=this.onreadystatechange},e.prototype.propagateListeners=function(e){i("propagating request listeners (%d) to the original request",this._events.length,this._events),this._events.forEach((function(t){var r=t.name,n=t.listener;e.addEventListener(r,n)}))},e.prototype.propagateHeaders=function(e,t){i("propagating request headers to the original request",t),Object.entries(t.raw()).forEach((function(t){var r=Mi(t,2),n=r[0],o=r[1];i('setting "%s" (%s) header on the original request',n,o),e.setRequestHeader(n,o)}))},e}()).UNSENT=0,t.OPENED=1,t.HEADERS_RECEIVED=2,t.LOADING=3,t.DONE=4,t},Object.defineProperty(An,"__esModule",{value:!0});var Ki=An.interceptXMLHttpRequest=void 0,Yi=Rn,Xi=pn.exports("XHR"),Wi="undefined"==typeof window?void 0:window.XMLHttpRequest;function Ji(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}));e.headers.set("x-msw-request-id",t);const r={id:t,url:e.url,method:e.method,body:it(e.body,e.headers),headers:e.headers,cookies:{},redirect:"manual",referrer:"",keepalive:!1,cache:"default",mode:"cors",referrerPolicy:"no-referrer",integrity:"",destination:"document",bodyUsed:!1,credentials:"same-origin"},n=e.headers.get("cookie");nt(r);const o=n?P(n):{};return r.cookies=Object.assign(Object.assign({},r.cookies),o),r}function zi(e){return function(t){return Ie(this,void 0,void 0,(function*(){e.fallbackInterceptor=function(e,t){const r=Kr.createInterceptor({modules:[xn,Ki],resolver(r){return Ie(this,void 0,void 0,(function*(){return qr(Ji(r),e.requestHandlers,t,e.emitter,{transformResponse:e=>({status:e.status,statusText:e.statusText,headers:e.headers.all(),body:e.body}),onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}))}});return r.apply(),r}(e,t),Ye({message:"Mocking enabled (fallback mode).",quiet:t.quiet})}))}}Ki=An.interceptXMLHttpRequest=function(e,t){if(Wi){Xi('patching "XMLHttpRequest" module...');var r=Yi.createXMLHttpRequestOverride({pureXMLHttpRequest:Wi,observer:e,resolver:t});window.XMLHttpRequest=r}return function(){Wi&&(Xi("restoring modules..."),window.XMLHttpRequest=Wi)}};let Qi=[];function Zi(e){return(t,r)=>new Pr(e,t,r)}const es={all:Zi(/.+/),head:Zi(e.RESTMethods.HEAD),get:Zi(e.RESTMethods.GET),post:Zi(e.RESTMethods.POST),put:Zi(e.RESTMethods.PUT),delete:Zi(e.RESTMethods.DELETE),patch:Zi(e.RESTMethods.PATCH),options:Zi(e.RESTMethods.OPTIONS)};function ts(e,t){return(r,n)=>new jr(e,r,t,n)}function rs(e){return t=>new jr("all",new RegExp(".*"),e,t)}const ns={operation:rs("*"),query:ts("query","*"),mutation:ts("mutation","*")};const os=Object.assign(Object.assign({},ns),{link:function(e){return{operation:rs(e),query:ts("query",e),mutation:ts("mutation",e)}}});return e.GraphQLHandler=jr,e.RequestHandler=kr,e.RestHandler=Pr,e.cleanUrl=Nr,e.compose=_r,e.context=ae,e.createResponseComposition=Cr,e.defaultContext=Rr,e.defaultResponse=Or,e.graphql=os,e.graphqlContext=Fr,e.handleRequest=qr,e.matchRequestUrl=xr,e.parseIsomorphicRequest=Ji,e.response=Ir,e.rest=es,e.restContext=Lr,e.setupWorker=function(...e){if(e.forEach((e=>{if(Array.isArray(e))throw new Error(Ge.formatMessage('Failed to call "setupWorker" given an Array of request handlers (setupWorker([a, b])), expected to receive each handler individually: setupWorker(a, b).'))})),J.exports.isNodeProcess())throw new Error(Ge.formatMessage("Failed to execute `setupWorker` in a non-browser environment. Consider using `setupServer` for Node.js environment instead."));const t=new ce.StrictEventEmitter,r=new ce.StrictEventEmitter;!function(e,t){const r=e.emit;r._isPiped||(e.emit=function(e,...n){return t.emit(e,...n),r.call(this,e,...n)},e.emit._isPiped=!0)}(t,r);const n={startOptions:void 0,worker:null,registration:null,requestHandlers:[...e],emitter:t,workerChannel:{on(e,t){n.events.addListener(navigator.serviceWorker,"message",(r=>{if(r.source!==n.worker)return;const o=V(r.data);o&&o.type===e&&t(r,o)}))},send(e){var t;null===(t=n.worker)||void 0===t||t.postMessage(e)}},events:{addListener:(e,t,r)=>(e.addEventListener(t,r),Qi.push({eventType:t,target:e,callback:r}),()=>{e.removeEventListener(t,r)}),removeAllListeners(){for(const{target:e,eventType:t,callback:r}of Qi)e.removeEventListener(t,r);Qi=[]},once(e){const t=[];return new Promise(((r,o)=>{t.push(n.events.addListener(navigator.serviceWorker,"message",(t=>{try{const n=JSON.parse(t.data);n.type===e&&r(n)}catch(e){o(e)}})),n.events.addListener(navigator.serviceWorker,"messageerror",o))})).finally((()=>{t.forEach((e=>e()))}))}},useFallbackMode:!("serviceWorker"in navigator)||"file:"===location.protocol},o=n.useFallbackMode?zi(n):Br(n),i=n.useFallbackMode?function(e){return function(){var t,r;null===(t=e.fallbackInterceptor)||void 0===t||t.restore(),$r({quiet:null===(r=e.startOptions)||void 0===r?void 0:r.quiet})}}(n):(e=>function(){var t;e.workerChannel.send("MOCK_DEACTIVATE"),window.clearInterval(e.keepAliveInterval),$r({quiet:null===(t=e.startOptions)||void 0===t?void 0:t.quiet})})(n);return{start:Gr(o,n),stop(){n.events.removeAllListeners(),n.emitter.removeAllListeners(),r.removeAllListeners(),i()},use(...e){!function(e,...t){e.unshift(...t)}(n.requestHandlers,...e)},restoreHandlers(){n.requestHandlers.forEach((e=>{e.markAsSkipped(!1)}))},resetHandlers(...t){n.requestHandlers=function(e,...t){return t.length>0?[...t]:[...e]}(e,...t)},printHandlers(){n.requestHandlers.forEach((e=>{const{header:t,callFrame:r}=e.info,n=e.info.hasOwnProperty("operationType")?"[graphql]":"[rest]";console.groupCollapsed(`${n} ${t}`),r&&console.log(`Declaration: ${r}`),console.log("Handler:",e),e instanceof Pr&&console.log("Match:",`https://mswjs.io/repl?path=${e.info.path}`),console.groupEnd()}))},events:{on:(...e)=>r.on(...e),removeListener:(...e)=>r.removeListener(...e),removeAllListeners:(...e)=>r.removeAllListeners(...e)}}},e}({});
22
+ function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["operations","map"]),i=V(r)||{};if(!i.query)return null;const s=V(n||"")||{},a=i.variables?function(e,t,r){const n={variables:e};for(const[e,o]of Object.entries(t)){if(!(e in r))throw new Error(`Given files do not have a key '${e}' .`);for(const t of o){const[o,...i]=t.split(".").reverse(),s=i.reverse();let a=n;for(const e of s){if(!(e in a))throw new Error(`Property '${s}' is not in operations.`);a=a[e]}a[o]=r[e]}}return n.variables}(i.variables,s,o):{};return{query:i.query,variables:a}}default:return null}}function ar(e){const t=sr(e);if(!t||!t.query)return;const{query:r,variables:n}=t,o=ir(r);if(o instanceof Error){const t=nr(e);throw new Error(Ge.formatMessage('Failed to intercept a GraphQL request to "%s %s": cannot parse query. See the error message from the parser below.\n\n%s',e.method,t,o.message))}return{operationType:o.operationType,operationName:o.operationName,variables:n}}var cr;function ur(e){return e<300?cr.Success:e<400?cr.Warning:cr.Danger}function lr(){const e=new Date;return[e.getHours(),e.getMinutes(),e.getSeconds()].map(String).map((e=>e.slice(0,2))).map((e=>e.padStart(2,"0"))).join(":")}function pr(e){return Object.assign(Object.assign({},e),{headers:e.headers.all()})}function dr(e){const t=o.objectToHeaders(e.headers);return Object.assign(Object.assign({},e),{body:it(e.body,t)})}function fr(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var o=1,i="";if("?"===e[a=r+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0==--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=e[a++]}else i+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at "+r);if(!i)throw new TypeError("Missing pattern at "+r);t.push({type:"PATTERN",index:r,value:i}),r=a}else{for(var s="",a=r+1;a<e.length;){var c=e.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;s+=e[a++]}if(!s)throw new TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:s}),r=a}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,i="[^"+vr(t.delimiter||"/#?")+"]+?",s=[],a=0,c=0,u="",l=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},p=function(e){var t=l(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},d=function(){for(var e,t="";e=l("CHAR")||l("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var f=l("CHAR"),h=l("NAME"),v=l("PATTERN");if(h||v){var m=f||"";-1===o.indexOf(m)&&(u+=m,m=""),u&&(s.push(u),u=""),s.push({name:h||a++,prefix:m,suffix:"",pattern:v||i,modifier:l("MODIFIER")||""})}else{var y=f||l("ESCAPED_CHAR");if(y)u+=y;else if(u&&(s.push(u),u=""),l("OPEN")){m=d();var g=l("NAME")||"",E=l("PATTERN")||"",b=d();p("CLOSE"),s.push({name:g||(E?a++:""),pattern:g&&!E?i:E,prefix:m,suffix:b,modifier:l("MODIFIER")||""})}else p("END")}}return s}function hr(e,t){var r=[];return function(e,t,r){void 0===r&&(r={});var n=r.decode,o=void 0===n?function(e){return e}:n;return function(r){var n=e.exec(r);if(!n)return!1;for(var i=n[0],s=n.index,a=Object.create(null),c=function(e){if(void 0===n[e])return"continue";var r=t[e-1];"*"===r.modifier||"+"===r.modifier?a[r.name]=n[e].split(r.prefix+r.suffix).map((function(e){return o(e,r)})):a[r.name]=o(n[e],r)},u=1;u<n.length;u++)c(u);return{path:i,index:s,params:a}}}(gr(e,r,t),r,t)}function vr(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function mr(e){return e&&e.sensitive?"":"i"}function yr(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,i=r.start,s=void 0===i||i,a=r.end,c=void 0===a||a,u=r.encode,l=void 0===u?function(e){return e}:u,p="["+vr(r.endsWith||"")+"]|$",d="["+vr(r.delimiter||"/#?")+"]",f=s?"^":"",h=0,v=e;h<v.length;h++){var m=v[h];if("string"==typeof m)f+=vr(l(m));else{var y=vr(l(m.prefix)),g=vr(l(m.suffix));if(m.pattern)if(t&&t.push(m),y||g)if("+"===m.modifier||"*"===m.modifier){var E="*"===m.modifier?"?":"";f+="(?:"+y+"((?:"+m.pattern+")(?:"+g+y+"(?:"+m.pattern+"))*)"+g+")"+E}else f+="(?:"+y+"("+m.pattern+")"+g+")"+m.modifier;else f+="("+m.pattern+")"+m.modifier;else f+="(?:"+y+g+")"+m.modifier}}if(c)o||(f+=d+"?"),f+=r.endsWith?"(?="+p+")":"$";else{var b=e[e.length-1],w="string"==typeof b?d.indexOf(b[b.length-1])>-1:void 0===b;o||(f+="(?:"+d+"(?="+p+"))?"),w||(f+="(?="+d+"|"+p+")")}return new RegExp(f,mr(r))}(fr(e,r),t,r)}function gr(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,o=r.exec(e.source);o;)t.push({name:o[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),o=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return gr(e,t,r).source}));return new RegExp("(?:"+n.join("|")+")",mr(r))}(e,t,r):yr(e,t,r)}!function(e){e.Success="#69AB32",e.Warning="#F0BB4B",e.Danger="#E95F5D"}(cr||(cr={}));var Er={};Object.defineProperty(Er,"__esModule",{value:!0});var br=Er.getCleanUrl=void 0;br=Er.getCleanUrl=function(e,t){return void 0===t&&(t=!0),[t&&e.origin,e.pathname].filter(Boolean).join("")};const wr=/[\?|#].*$/g;function Nr(e){return e.replace(wr,"")}function Tr(e,t){if(e instanceof RegExp)return e;return Nr(function(e,t){if(!e.startsWith("/"))return e;const r=t||"undefined"!=typeof document&&document.baseURI;return r?decodeURI(new URL(encodeURI(e),r).href):e}(e,t))}function xr(e,t,r){const n=Tr(t,r),o="string"==typeof n?function(e){return e.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g,((e,t,r)=>{const n="(.*)";return t?t.startsWith(":")?`${t}${r}`:`${t}(.*)`:n})).replace(/^([^\/]+)(:)(?=\/\/)/g,"$1\\$2")}(n):n,i=br(e),s=hr(o,{decode:decodeURIComponent})(i);return{matches:!1!==s,params:s&&s.params||{}}}function _r(...e){return(...t)=>e.reduceRight(((e,t)=>e instanceof Promise?Promise.resolve(e).then(t):t(e)),t[0])}const Or={status:200,statusText:"OK",body:null,delay:0,once:!1},Sr=[];function Cr(e,t=Sr){return(...r)=>Ie(this,void 0,void 0,(function*(){const n=Object.assign({},Or,{headers:new o.Headers({"x-powered-by":"msw"})},e),i=[...t,...r].filter(Boolean);return i.length>0?_r(...i)(n):n}))}const Ir=Object.assign(Cr(),{once:Cr({once:!0}),networkError(e){throw new Xe(e)}}),Ar=/(node_modules)?[\/\\]lib[\/\\](umd|esm|iief|cjs)[\/\\]|^[^\/\\]*$/;const Rr={status:r,set:L,delay:Z,fetch:ne};class kr{constructor(e){this.shouldSkip=!1,this.ctx=e.ctx||Rr,this.resolver=e.resolver;const t=function(e){const t=e.stack;if(!t)return;const r=t.split("\n").slice(1).find((e=>!Ar.test(e)));if(!r)return;return r.replace(/\s*at [^()]*\(([^)]+)\)/,"$1").replace(/^@/,"")}(new Error);this.info=Object.assign(Object.assign({},e.info),{callFrame:t})}parse(e,t){return null}test(e,t){return this.predicate(e,this.parse(e,t),t)}getPublicRequest(e,t){return e}markAsSkipped(e=!0){this.shouldSkip=e}run(e,t){return Ie(this,void 0,void 0,(function*(){if(this.shouldSkip)return null;const r=this.parse(e,t);if(!this.predicate(e,r,t))return null;const n=this.getPublicRequest(e,r),o=this.wrapResolver(this.resolver),i=yield o(n,Ir,this.ctx);return this.createExecutionResult(r,n,i)}))}wrapResolver(e){return(t,r,n)=>Ie(this,void 0,void 0,(function*(){const o=this.resolverGenerator||(yield e(t,r,n));if((i=o)&&"function"==typeof i[Symbol.iterator]){const{value:e,done:t}=o[Symbol.iterator]().next(),r=yield e;return!r&&t?this.resolverGeneratorResult:(this.resolverGenerator||(this.resolverGenerator=o),this.resolverGeneratorResult=r,r)}var i;return o}))}createExecutionResult(e,t,r){return{handler:this,parsedResult:e||null,request:t,response:r||null}}}var Dr;e.RESTMethods=void 0,(Dr=e.RESTMethods||(e.RESTMethods={})).HEAD="HEAD",Dr.GET="GET",Dr.POST="POST",Dr.PUT="PUT",Dr.PATCH="PATCH",Dr.OPTIONS="OPTIONS",Dr.DELETE="DELETE";const Lr={set:L,status:r,cookie:B,body:$,text:oe,json:Y,xml:ie,delay:Z,fetch:ne};class Pr extends kr{constructor(e,t,r){super({info:{header:`${e} ${t}`,path:t,method:e},ctx:Lr,resolver:r}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:e,path:t}=this.info;if(t instanceof RegExp)return;if(Nr(t)===t)return;(function(e){return new URL(`/${e}`,"http://localhost").searchParams})(t).forEach(((e,t)=>{})),Ge.warn(`Found a redundant usage of query parameters in the request handler URL for "${e} ${t}". Please match against a path instead and access query parameters in the response resolver function using "req.url.searchParams".`)}parse(e,t){return xr(e.url,this.info.path,null==t?void 0:t.baseUrl)}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{params:t.params||{}})}predicate(e,t){return(this.info.method instanceof RegExp?this.info.method.test(e.method):st(this.info.method,e.method))&&t.matches}log(e,t){const r=nr(e),n=pr(e),o=dr(t),i=ur(t.status);console.groupCollapsed(Ge.formatMessage("%s %s %s (%c%s%c)"),lr(),e.method,r,`color:${i}`,`${t.status} ${t.statusText}`,"color:inherit"),console.log("Request",n),console.log("Handler:",{mask:this.info.path,resolver:this.resolver}),console.log("Response",o),console.groupEnd()}}function Mr(e,t){try{return e()}catch(e){null==t||t(e)}}const Fr={set:L,status:r,delay:Z,fetch:ne,data:X,extensions:W,errors:ee,cookie:B};class jr extends kr{constructor(e,t,r,n){let o=t;if(null!=(i=t)&&"object"==typeof i&&"kind"in i&&"definitions"in i){const r=or(t);if(r.operationType!==e)throw new Error(`Failed to create a GraphQL handler: provided a DocumentNode with a mismatched operation type (expected "${e}", but got "${r.operationType}").`);if(!r.operationName)throw new Error("Failed to create a GraphQL handler: provided a DocumentNode with no operation name.");o=r.operationName}var i;super({info:{header:"all"===e?`${e} (origin: ${r.toString()})`:`${e} ${o} (origin: ${r.toString()})`,operationType:e,operationName:o},ctx:Fr,resolver:n}),this.endpoint=r}parse(e){return Mr((()=>ar(e)),(e=>console.error(e.message)))}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{variables:(null==t?void 0:t.variables)||{}})}predicate(e,t){if(!t)return!1;if(!t.operationName&&"all"!==this.info.operationType){const t=nr(e);return Ge.warn(`Failed to intercept a GraphQL request at "${e.method} ${t}": anonymous GraphQL operations are not supported.\n\nConsider naming this operation or using "graphql.operation" request handler to intercept GraphQL requests regardless of their operation name/type. Read more: https://mswjs.io/docs/api/graphql/operation `),!1}const r=xr(e.url,this.endpoint),n="all"===this.info.operationType||t.operationType===this.info.operationType,o=this.info.operationName instanceof RegExp?this.info.operationName.test(t.operationName||""):t.operationName===this.info.operationName;return r.matches&&n&&o}log(e,t,r,n){const o=pr(e),i=dr(t),s=ur(t.status),a=(null==n?void 0:n.operationName)?`${null==n?void 0:n.operationType} ${null==n?void 0:n.operationName}`:`anonymous ${null==n?void 0:n.operationType}`;console.groupCollapsed(Ge.formatMessage("%s %s (%c%s%c)"),lr(),`${a}`,`color:${s}`,`${t.status} ${t.statusText}`,"color:inherit"),console.log("Request:",o),console.log("Handler:",this),console.log("Response:",i),console.groupEnd()}}function Ur(e,t,r="warn"){if("function"==typeof r)return void r(e);const n=Mr((()=>ar(e))),o=function(e){return e.reduce(((e,t)=>(t instanceof Pr&&e.rest.push(t),t instanceof jr&&e.graphql.push(t),e)),{rest:[],graphql:[]})}(t),i=n?o.graphql:o.rest,s=function(e,t,r){return t.reduce(((t,n)=>{const o=r(e,n);return t.concat([[o,n]])}),[]).sort((([e],[t])=>e-t)).filter((([e])=>e<=3)).slice(0,4).map((([,e])=>e))}(e,i,n?(a=n,(e,t)=>{if(void 0===a.operationName)return 1/0;const{operationType:r,operationName:n}=t.info,o=a.operationType===r?.5:0;return ct(a.operationName,n)-o}):(e,t)=>{const{path:r,method:n}=t.info;if(r instanceof RegExp)return 1/0;const o=st(e.method,n)?.5:0,i=nr(e);return ct(i,r)-o});var a;const c=s.length>0?function(e){return e.length>1?`Did you mean to request one of the following resources instead?\n\n${e.map((e=>` • ${e.info.header}`)).join("\n")}`:`Did you mean to request "${e[0].info.header}" instead?`}(s):"",u=nr(e),l=["captured a request without a matching request handler:",` • ${n?`${n.operationType} ${n.operationName} (${e.method} ${u})`:`${e.method} ${u}`}`,c,"If you still wish to intercept this unhandled request, please create a request handler for it.\nRead more: https://mswjs.io/docs/getting-started/mocks"].filter(Boolean).join("\n\n");switch(r){case"error":throw Ge.error("Error: %s",l),new Error('Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.');case"warn":Ge.warn("Warning: %s",l);break;case"bypass":break;default:throw new Error(Ge.formatMessage('Failed to react to an unhandled request: 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.',r))}}function qr(e,t,r,n,o){var i,s,a;return Ie(this,void 0,void 0,(function*(){if(n.emit("request:start",e),e.headers.get("x-msw-bypass"))return n.emit("request:end",e),void(null===(i=null==o?void 0:o.onBypassResponse)||void 0===i||i.call(o,e));const c=yield((e,t,r)=>Ie(void 0,void 0,void 0,(function*(){const n=t.filter((t=>t.test(e,r)));if(0===n.length)return{handler:void 0,response:void 0};const o=yield n.reduce(((t,n)=>Ie(void 0,void 0,void 0,(function*(){const o=yield t;if(null==o?void 0:o.response)return t;const i=yield n.run(e,r);return null===i||i.handler.shouldSkip?null:i.response?(i.response.once&&n.markAsSkipped(!0),i):{request:i.request,handler:i.handler,response:void 0,parsedResult:i.parsedResult}}))),Promise.resolve(null));return o?{handler:o.handler,publicRequest:o.request,parsedRequest:o.parsedResult,response:o.response}:{handler:void 0,response:void 0}})))(e,t,null==o?void 0:o.resolutionContext),{handler:u,response:l}=c;return u?l?(function(e,t){We.store.add(Object.assign(Object.assign({},e),{url:e.url.toString()}),t),We.store.persist()}(e,l),n.emit("request:match",e),new Promise((t=>{var r,i,s;const a=c,u=(null===(r=null==o?void 0:o.transformResponse)||void 0===r?void 0:r.call(o,l))||l;null===(i=null==o?void 0:o.onMockedResponse)||void 0===i||i.call(o,u,a),setTimeout((()=>{var r;null===(r=null==o?void 0:o.onMockedResponseSent)||void 0===r||r.call(o,u,a),n.emit("request:end",e),t(u)}),null!==(s=l.delay)&&void 0!==s?s:0)}))):(Ge.warn("Expected response resolver to return a mocked response Object, but got %s. The original response is going to be used instead.\n\n • %s\n %s",l,u.info.header,u.info.callFrame),n.emit("request:end",e),void(null===(a=null==o?void 0:o.onBypassResponse)||void 0===a||a.call(o,e))):(Ur(e,t,r.onUnhandledRequest),n.emit("request:unhandled",e),n.emit("request:end",e),void(null===(s=null==o?void 0:o.onBypassResponse)||void 0===s||s.call(o,e)))}))}const Hr=(e,t)=>(r,n)=>Ie(void 0,void 0,void 0,(function*(){const i=(e=>{const t=e.ports[0];return{send(e){t&&t.postMessage(e)}}})(r);try{const r=function(e){const t={id:e.id,cache:e.cache,credentials:e.credentials,method:e.method,url:new URL(e.url),referrer:e.referrer,referrerPolicy:e.referrerPolicy,redirect:e.redirect,mode:e.mode,params:{},cookies:{},integrity:e.integrity,keepalive:e.keepalive,destination:e.destination,body:at(e),bodyUsed:e.bodyUsed,headers:new o.Headers(e.headers)};return nt(t),t.body=it(t.body,t.headers),t}(n.payload);yield qr(r,e.requestHandlers,t,e.emitter,{transformResponse:e=>Object.assign(Object.assign({},e),{headers:e.headers.all()}),onBypassResponse:()=>i.send({type:"MOCK_NOT_FOUND"}),onMockedResponse(e){i.send({type:"MOCK_SUCCESS",payload:e})},onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}catch(e){if(e instanceof Xe)return i.send({type:"NETWORK_ERROR",payload:{name:e.name,message:e.message}});i.send({type:"INTERNAL_ERROR",payload:{status:500,body:JSON.stringify({errorType:e.constructor.name,message:e.message,location:e.stack})}})}}));const Br=e=>function(t,r){const n=(()=>Ie(this,void 0,void 0,(function*(){e.events.removeAllListeners(),e.workerChannel.on("REQUEST",Hr(e,t)),e.workerChannel.on("RESPONSE",function(e){return(t,r)=>{var n;const{payload:o}=r;if(null===(n=o.type)||void 0===n?void 0:n.includes("opaque"))return;const i=new Response(o.body||null,o);"msw"===i.headers.get("x-powered-by")?e.emitter.emit("response:mocked",i,o.requestId):e.emitter.emit("response:bypass",i,o.requestId)}}(e));const n=yield Ke(t.serviceWorker.url,t.serviceWorker.options,t.findWorker),[o,i]=n;if(!o){const e=(null==r?void 0:r.findWorker)?Ge.formatMessage('Failed to locate the Service Worker registration using a custom "findWorker" predicate.\n\nPlease ensure that the custom predicate properly locates the Service Worker registration at "%s".\nMore details: https://mswjs.io/docs/api/setup-worker/start#findworker\n',t.serviceWorker.url):Ge.formatMessage('Failed to locate the Service Worker registration.\n\nThis 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.\n\nPlease 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',t.serviceWorker.url,location.host);throw new Error(e)}e.worker=o,e.registration=i,e.events.addListener(window,"beforeunload",(()=>{"redundant"!==o.state&&e.workerChannel.send("CLIENT_CLOSED"),window.clearInterval(e.keepAliveInterval)}));const[s]=yield De((()=>function(e,t){return Ie(this,void 0,void 0,(function*(){e.workerChannel.send("INTEGRITY_CHECK_REQUEST");const{payload:r}=yield e.events.once("INTEGRITY_CHECK_RESPONSE");if("02f4ad4a2797f85668baf196e553d929"!==r)throw new Error(`Currently active Service Worker (${r}) is behind the latest published one (02f4ad4a2797f85668baf196e553d929).`);return t}))}(e,o)));return s&&Ge.error(`Detected outdated Service Worker: ${s.message}\n\nThe mocking is still enabled, but it's highly recommended that you update your Service Worker by running:\n\n$ npx msw init <PUBLIC_DIR>\n\nThis is necessary to ensure that the Service Worker is in sync with the library to guarantee its stability.\nIf this message still persists after updating, please report an issue: https://github.com/open-draft/msw/issues `),yield function(e,t){return Ie(this,void 0,void 0,(function*(){return e.workerChannel.send("MOCK_ACTIVATE"),e.events.once("MOCKING_ENABLED").then((()=>{Ye({quiet:t.quiet})}))}))}(e,t).catch((e=>{throw new Error(`Failed to enable mocking: ${null==e?void 0:e.message}`)})),e.keepAliveInterval=window.setInterval((()=>e.workerChannel.send("KEEPALIVE_REQUEST")),5e3),function(e,t){(null==t?void 0:t.quiet)||location.href.startsWith(e.scope)||Ge.warn(`Cannot intercept requests on this page because it's outside of the worker's scope ("${e.scope}"). If you wish to mock API requests on this page, you must resolve this scope issue.\n\n- (Recommended) Register the worker at the root level ("/") of your application.\n- Set the "Service-Worker-Allowed" response header to allow out-of-scope workers.`)}(i,e.startOptions),i})))();return t.waitUntilReady&&function(e){const t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(...r){De((()=>e)).then((()=>{window.XMLHttpRequest.prototype.send=t,this.send(...r)}))};const r=window.fetch;window.fetch=(...t)=>Ie(this,void 0,void 0,(function*(){return yield De((()=>e)),window.fetch=r,window.fetch(...t)}))}(n),n};function $r(e={}){e.quiet||console.log(`%c${Ge.formatMessage("Mocking disabled.")}`,"color:orangered;font-weight:bold;")}const Vr={serviceWorker:{url:"/mockServiceWorker.js",options:null},quiet:!1,waitUntilReady:!0,onUnhandledRequest:"warn",findWorker:(e,t)=>e===t};function Gr(e,t){return r=>(t.startOptions=function(e){return K(Vr,e||{})}(r),e(t.startOptions,r||{}))}var Kr={},Yr={};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.createInterceptor=void 0;var Xr=ce;Yr.createInterceptor=function(e){var t=new Xr.StrictEventEmitter,r=[];return{apply:function(){r=e.modules.map((function(r){return r(t,e.resolver)}))},on:function(e,r){t.addListener(e,r)},restore:function(){if(t.removeAllListeners(),0===r.length)throw new Error('Failed to restore patched modules: no patches found. Did you forget to run ".apply()"?');r.forEach((function(e){return e()}))}}};var Wr={},Jr={};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.toIsoResponse=void 0;var zr=o;Jr.toIsoResponse=function(e){return{status:e.status||200,statusText:e.statusText||"OK",headers:zr.objectToHeaders(e.headers||{}),body:e.body}};var Qr=n&&n.__assign||function(){return(Qr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Zr=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},en=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},tn=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.createRemoteResolver=Wr.createRemoteInterceptor=void 0;var rn=o,nn=Pe,on=ce,sn=Yr,an=Jr;function cn(e,t){switch(e){case"url":return new URL(t);case"headers":return new rn.Headers(t);default:return t}}Wr.createRemoteInterceptor=function(e){if(nn.invariant(process.connected,"Failed to create a remote interceptor: the current process (%s) does not have a parent. Please make sure you're spawning this process as a child process in order to use remote request interception.",process.pid),void 0===process.send)throw new Error("Failed to create a remote interceptor: the current process ("+process.pid+") does not have the IPC enabled. Please make sure you're spawning this process with the \"ipc\" stdio value set:\n\nspawn('node', ['module.js'], { stdio: ['ipc'] })");var t,r=sn.createInterceptor(Qr(Qr({},e),{resolver:function(e){var r,n=JSON.stringify(e);return null===(r=process.send)||void 0===r||r.call(process,"request:"+n),new Promise((function(r){t=function(t){if("string"==typeof t&&t.startsWith("response:"+e.id)){var n=tn(t.match(/^response:.+?:(.+)$/)||[],2)[1];if(!n)return r();var o=JSON.parse(n);return r(o)}},process.addListener("message",t)}))}}));return Qr(Qr({},r),{restore:function(){r.restore(),process.removeListener("message",t)}})},Wr.createRemoteResolver=function(e){var t=this,r=new on.StrictEventEmitter,n=function(n){return Zr(t,void 0,void 0,(function(){var t,o,i,s,a;return en(this,(function(c){switch(c.label){case 0:return"string"!=typeof n?[2]:n.startsWith("request:")?(t=tn(n.match(/^request:(.+)$/)||[],2),(o=t[1])?(i=JSON.parse(o,cn),r.emit("request",i),[4,e.resolver(i,void 0)]):[2]):[3,2];case 1:s=c.sent(),a=JSON.stringify(s),e.process.send("response:"+i.id+":"+a,(function(e){e||s&&r.emit("response",i,an.toIsoResponse(s))})),c.label=2;case 2:return[2]}}))}))},o=function(){e.process.removeListener("message",n)};return e.process.addListener("message",n),e.process.addListener("disconnect",o),e.process.addListener("error",o),e.process.addListener("exit",o),{on:function(e,t){r.addListener(e,t)}}},function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.getCleanUrl=void 0,r(Yr,e),r(Wr,e);var o=Er;Object.defineProperty(e,"getCleanUrl",{enumerable:!0,get:function(){return o.getCleanUrl}})}(Kr);var un={},ln={};Object.defineProperty(ln,"__esModule",{value:!0}),ln.uuidv4=void 0,ln.uuidv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))};var pn={exports:{}},dn=1e3,fn=60*dn,hn=60*fn,vn=24*hn,mn=7*vn,yn=365.25*vn,gn=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*yn;case"weeks":case"week":case"w":return r*mn;case"days":case"day":case"d":return r*vn;case"hours":case"hour":case"hrs":case"hr":case"h":return r*hn;case"minutes":case"minute":case"mins":case"min":case"m":return r*fn;case"seconds":case"second":case"secs":case"sec":case"s":return r*dn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=vn)return En(e,t,vn,"day");if(t>=hn)return En(e,t,hn,"hour");if(t>=fn)return En(e,t,fn,"minute");if(t>=dn)return En(e,t,dn,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=vn)return Math.round(e/vn)+"d";if(t>=hn)return Math.round(e/hn)+"h";if(t>=fn)return Math.round(e/fn)+"m";if(t>=dn)return Math.round(e/dn)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function En(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}var bn=function(e){function t(e){let n,o,i,s=null;function a(...e){if(!a.enabled)return;const r=a,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];n=i.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=gn,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t};!function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=bn(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(pn,pn.exports);var wn=n&&n.__assign||function(){return(wn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Nn=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},Tn=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(un,"__esModule",{value:!0});var xn=un.interceptFetch=void 0,_n=o,On=Jr,Sn=ln,Cn=pn.exports("fetch");function In(e){return Nn(this,void 0,void 0,(function(){var t;return Tn(this,(function(r){switch(r.label){case 0:return t={status:e.status,statusText:e.statusText,headers:_n.objectToHeaders(_n.headersToObject(e.headers))},[4,e.text()];case 1:return[2,(t.body=r.sent(),t)]}}))}))}xn=un.interceptFetch=function(e,t){var r=window.fetch;return Cn('replacing "window.fetch"...'),window.fetch=function(n,o){return Nn(void 0,void 0,void 0,(function(){var i,s,a,c,u,l,p;return Tn(this,(function(d){switch(d.label){case 0:return i=new Request(n,o),s="string"==typeof n?n:n.url,a=(null==o?void 0:o.method)||"GET",Cn("[%s] %s",a,s),p={id:Sn.uuidv4(),url:new URL(s,location.origin),method:a,headers:new _n.Headers((null==o?void 0:o.headers)||{})},[4,i.text()];case 1:return p.body=d.sent(),Cn("isomorphic request",c=p),e.emit("request",c),Cn("awaiting for the mocked response..."),[4,t(c,i)];case 2:return u=d.sent(),Cn("mocked response",u),u?(l=On.toIsoResponse(u),Cn("derived isomorphic response",l),e.emit("response",c,l),[2,new Response(u.body,wn(wn({},l),{headers:_n.flattenHeadersObject(u.headers||{})}))]):(Cn("no mocked response found, bypassing..."),[2,r(n,o).then((function(t){return Nn(void 0,void 0,void 0,(function(){var r,n,o,i;return Tn(this,(function(s){switch(s.label){case 0:return r=t.clone(),Cn("original fetch performed",r),o=(n=e).emit,i=["response",c],[4,In(r)];case 1:return o.apply(n,i.concat([s.sent()])),[2,t]}}))}))}))])}}))}))},function(){Cn("restoring modules..."),window.fetch=r}};var An={},Rn={},kn={},Dn={};function Ln(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var Pn=Ln({HTML:"text/html",isHTML:function(e){return e===Pn.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Mn=Ln({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===Mn.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Dn.freeze=Ln,Dn.MIME_TYPE=Pn,Dn.NAMESPACE=Mn;var Fn={};!function(e){var t=Dn.freeze;e.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=t({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),e.entityMap=e.HTML_ENTITIES}(Fn);var jn={},Un=Dn.NAMESPACE,qn=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Hn=new RegExp("[\\-\\.0-9"+qn.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Bn=new RegExp("^"+qn.source+Hn.source+"*(?::"+qn.source+Hn.source+"*)?$");function $n(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,$n)}function Vn(){}function Gn(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function Kn(e,t,r,n,o,i){function s(e,t,n){e in r.attributeNames&&i.fatalError("Attribute "+e+" redefined"),r.addValue(e,t,n)}for(var a,c=++t,u=0;;){var l=e.charAt(c);switch(l){case"=":if(1===u)a=e.slice(t,c),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(i.warning('attribute value must after "="'),a=e.slice(t,c)),t=c+1,!((c=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");s(a,p=e.slice(t,c).replace(/&#?\w+;/g,o),t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');s(a,p=e.slice(t,c).replace(/&#?\w+;/g,o),t),i.warning('attribute "'+a+'" missed start quot('+l+")!!"),t=c+1,u=5}break;case"/":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:u=7,r.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),0==u&&r.setTagName(e.slice(t,c)),c;case">":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=e.slice(t,c)).slice(-1)&&(r.closed=!0,p=p.slice(0,-1));case 2:2===u&&(p=a),4==u?(i.warning('attribute "'+p+'" missed quot(")!'),s(a,p.replace(/&#?\w+;/g,o),t)):(Un.isHTML(n[""])&&p.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),s(p,p,t));break;case 3:throw new Error("attribute value missed!!")}return c;case"€":l=" ";default:if(l<=" ")switch(u){case 0:r.setTagName(e.slice(t,c)),u=6;break;case 1:a=e.slice(t,c),u=2;break;case 4:var p=e.slice(t,c).replace(/&#?\w+;/g,o);i.warning('attribute "'+p+'" missed quot(")!!'),s(a,p,t);case 5:u=6}else switch(u){case 2:r.tagName,Un.isHTML(n[""])&&a.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),s(a,a,t),t=c,u=1;break;case 5:i.warning('attribute space is required"'+a+'"!!');case 6:u=1,t=c;break;case 3:u=4,t=c;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function Yn(e,t,r){for(var n=e.tagName,o=null,i=e.length;i--;){var s=e[i],a=s.qName,c=s.value;if((d=a.indexOf(":"))>0)var u=s.prefix=a.slice(0,d),l=a.slice(d+1),p="xmlns"===u&&l;else l=a,u=null,p="xmlns"===a&&"";s.localName=l,!1!==p&&(null==o&&(o={},Jn(r,r={})),r[p]=o[p]=c,s.uri=Un.XMLNS,t.startPrefixMapping(p,c))}for(i=e.length;i--;){(u=(s=e[i]).prefix)&&("xml"===u&&(s.uri=Un.XML),"xmlns"!==u&&(s.uri=r[u||""]))}var d;(d=n.indexOf(":"))>0?(u=e.prefix=n.slice(0,d),l=e.localName=n.slice(d+1)):(u=null,l=e.localName=n);var f=e.uri=r[u||""];if(t.startElement(f,l,n,e),!e.closed)return e.currentNSMap=r,e.localNSMap=o,!0;if(t.endElement(f,l,n),o)for(u in o)t.endPrefixMapping(u)}function Xn(e,t,r,n,o){if(/^(?:script|textarea)$/i.test(r)){var i=e.indexOf("</"+r+">",t),s=e.substring(t+1,i);if(/[&<]/.test(s))return/^script$/i.test(r)?(o.characters(s,0,s.length),i):(s=s.replace(/&#?\w+;/g,n),o.characters(s,0,s.length),i)}return t+1}function Wn(e,t,r,n){var o=n[r];return null==o&&((o=e.lastIndexOf("</"+r+">"))<t&&(o=e.lastIndexOf("</"+r)),n[r]=o),o<t}function Jn(e,t){for(var r in e)t[r]=e[r]}function zn(e,t,r,n){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(o=e.indexOf("--\x3e",t+4))>t?(r.comment(e,t+4,o-t-4),o+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,o-t-9),r.endCDATA(),o+3}var i=function(e,t){var r,n=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;r=o.exec(e);)if(n.push(r),r[1])return n}(e,t),s=i.length;if(s>1&&/!doctype/i.test(i[0][0])){var a=i[1][0],c=!1,u=!1;s>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],u=s>4&&i[4][0]):/^system$/i.test(i[2][0])&&(u=i[3][0]));var l=i[s-1];return r.startDTD(a,c,u),r.endDTD(),l.index+l[0].length}}return-1}function Qn(e,t,r){var n=e.indexOf("?>",t);if(n){var o=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,r.processingInstruction(o[1],o[2]),n+2):-1}return-1}function Zn(){this.attributeNames={}}$n.prototype=new Error,$n.prototype.name=$n.name,Vn.prototype={parse:function(e,t,r){var n=this.domBuilder;n.startDocument(),Jn(t,t={}),function(e,t,r,n,o){function i(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return t in r?r[t]:"#"===t.charAt(0)?i(parseInt(t.substr(1).replace("x","0x"))):(o.error("entity not found:"+e),e)}function a(t){if(t>v){var r=e.substring(v,t).replace(/&#?\w+;/g,s);d&&c(v),n.characters(r,0,t-v),v=t}}function c(t,r){for(;t>=l&&(r=p.exec(e));)u=r.index,l=u+r[0].length,d.lineNumber++;d.columnNumber=t-u+1}var u=0,l=0,p=/.*(?:\r\n?|\n)|.*$/g,d=n.locator,f=[{currentNSMap:t}],h={},v=0;for(;;){try{var m=e.indexOf("<",v);if(m<0){if(!e.substr(v).match(/^\s*$/)){var y=n.doc,g=y.createTextNode(e.substr(v));y.appendChild(g),n.currentElement=g}return}switch(m>v&&a(m),e.charAt(m+1)){case"/":var E=e.indexOf(">",m+3),b=e.substring(m+2,E).replace(/[ \t\n\r]+$/g,""),w=f.pop();E<0?(b=e.substring(m+2).replace(/[\s<].*/,""),o.error("end tag name: "+b+" is not complete:"+w.tagName),E=m+1+b.length):b.match(/\s</)&&(b=b.replace(/[\s<].*/,""),o.error("end tag name: "+b+" maybe not complete"),E=m+1+b.length);var N=w.localNSMap,T=w.tagName==b;if(T||w.tagName&&w.tagName.toLowerCase()==b.toLowerCase()){if(n.endElement(w.uri,w.localName,b),N)for(var x in N)n.endPrefixMapping(x);T||o.fatalError("end tag name: "+b+" is not match the current start tagName:"+w.tagName)}else f.push(w);E++;break;case"?":d&&c(m),E=Qn(e,m,n);break;case"!":d&&c(m),E=zn(e,m,n,o);break;default:d&&c(m);var _=new Zn,O=f[f.length-1].currentNSMap,S=(E=Kn(e,m,_,O,s,o),_.length);if(!_.closed&&Wn(e,E,_.tagName,h)&&(_.closed=!0,r.nbsp||o.warning("unclosed xml attribute")),d&&S){for(var C=Gn(d,{}),I=0;I<S;I++){var A=_[I];c(A.offset),A.locator=Gn(d,{})}n.locator=C,Yn(_,n,O)&&f.push(_),n.locator=d}else Yn(_,n,O)&&f.push(_);Un.isHTML(_.uri)&&!_.closed?E=Xn(e,E,_.tagName,s,n):E++}}catch(e){if(e instanceof $n)throw e;o.error("element parse error: "+e),E=-1}E>v?v=E:a(Math.max(m,v)+1)}}(e,t,r,n,this.errorHandler),n.endDocument()}},Zn.prototype={setTagName:function(e){if(!Bn.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!Bn.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},jn.XMLReader=Vn,jn.ParseError=$n;var eo={},to=Dn.NAMESPACE;function ro(e){return""!==e}function no(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function oo(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(ro):[]}(e);return Object.keys(t.reduce(no,{}))}function io(e,t){for(var r in e)t[r]=e[r]}function so(e,t){var r=e.prototype;if(!(r instanceof t)){function n(){}n.prototype=t.prototype,io(r,n=new n),e.prototype=r=n}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var ao={},co=ao.ELEMENT_NODE=1,uo=ao.ATTRIBUTE_NODE=2,lo=ao.TEXT_NODE=3,po=ao.CDATA_SECTION_NODE=4,fo=ao.ENTITY_REFERENCE_NODE=5,ho=ao.ENTITY_NODE=6,vo=ao.PROCESSING_INSTRUCTION_NODE=7,mo=ao.COMMENT_NODE=8,yo=ao.DOCUMENT_NODE=9,go=ao.DOCUMENT_TYPE_NODE=10,Eo=ao.DOCUMENT_FRAGMENT_NODE=11,bo=ao.NOTATION_NODE=12,wo={},No={};wo.INDEX_SIZE_ERR=(No[1]="Index size error",1),wo.DOMSTRING_SIZE_ERR=(No[2]="DOMString size error",2);var To=wo.HIERARCHY_REQUEST_ERR=(No[3]="Hierarchy request error",3);wo.WRONG_DOCUMENT_ERR=(No[4]="Wrong document",4),wo.INVALID_CHARACTER_ERR=(No[5]="Invalid character",5),wo.NO_DATA_ALLOWED_ERR=(No[6]="No data allowed",6),wo.NO_MODIFICATION_ALLOWED_ERR=(No[7]="No modification allowed",7);var xo=wo.NOT_FOUND_ERR=(No[8]="Not found",8);wo.NOT_SUPPORTED_ERR=(No[9]="Not supported",9);var _o=wo.INUSE_ATTRIBUTE_ERR=(No[10]="Attribute in use",10);function Oo(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,No[e]),this.message=No[e],Error.captureStackTrace&&Error.captureStackTrace(this,Oo);return r.code=e,t&&(this.message=this.message+": "+t),r}function So(){}function Co(e,t){this._node=e,this._refresh=t,Io(this)}function Io(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);ci(e,"length",r.length),io(r,e),e._inc=t}}function Ao(){}function Ro(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function ko(e,t,r,n){if(n?t[Ro(t,n)]=r:t[t.length++]=r,e){r.ownerElement=e;var o=e.ownerDocument;o&&(n&&Uo(o,e,n),function(e,t,r){e&&e._inc++,r.namespaceURI===to.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(o,e,r))}}function Do(e,t,r){var n=Ro(t,r);if(!(n>=0))throw Oo(xo,new Error(e.tagName+"@"+r));for(var o=t.length-1;n<o;)t[n]=t[++n];if(t.length=o,e){var i=e.ownerDocument;i&&(Uo(i,e,r),r.ownerElement=null)}}function Lo(){}function Po(){}function Mo(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function Fo(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(Fo(e,t))return!0}while(e=e.nextSibling)}function jo(){}function Uo(e,t,r,n){e&&e._inc++,r.namespaceURI===to.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function qo(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var o=t.firstChild,i=0;o;)n[i++]=o,o=o.nextSibling;n.length=i}}}function Ho(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,qo(e.ownerDocument,e),t}function Bo(e,t,r){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Eo){var o=t.firstChild;if(null==o)return t;var i=t.lastChild}else o=i=t;var s=r?r.previousSibling:e.lastChild;o.previousSibling=s,i.nextSibling=r,s?s.nextSibling=o:e.firstChild=o,null==r?e.lastChild=i:r.previousSibling=i;do{o.parentNode=e}while(o!==i&&(o=o.nextSibling));return qo(e.ownerDocument||e,e),t.nodeType==Eo&&(t.firstChild=t.lastChild=null),t}function $o(){this._nsMap={}}function Vo(){}function Go(){}function Ko(){}function Yo(){}function Xo(){}function Wo(){}function Jo(){}function zo(){}function Qo(){}function Zo(){}function ei(){}function ti(){}function ri(e,t){var r=[],n=9==this.nodeType&&this.documentElement||this,o=n.prefix,i=n.namespaceURI;if(i&&null==o&&null==(o=n.lookupPrefix(i)))var s=[{namespace:i,prefix:null}];return ii(this,r,e,t,s),r.join("")}function ni(e,t,r){var n=e.prefix||"",o=e.namespaceURI;if(!o)return!1;if("xml"===n&&o===to.XML||o===to.XMLNS)return!1;for(var i=r.length;i--;){var s=r[i];if(s.prefix===n)return s.namespace!==o}return!0}function oi(e,t,r){e.push(" ",t,'="',r.replace(/[<&"]/g,Mo),'"')}function ii(e,t,r,n,o){if(o||(o=[]),n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case co:var i=e.attributes,s=i.length,a=e.firstChild,c=e.tagName,u=c;if(!(r=to.isHTML(e.namespaceURI)||r)&&!e.prefix&&e.namespaceURI){for(var l,p=0;p<i.length;p++)if("xmlns"===i.item(p).name){l=i.item(p).value;break}if(l!==e.namespaceURI)for(var d=o.length-1;d>=0;d--){var f=o[d];if(f.namespace===e.namespaceURI){f.prefix&&(u=f.prefix+":"+c);break}}}t.push("<",u);for(var h=0;h<s;h++){"xmlns"==(v=i.item(h)).prefix?o.push({prefix:v.localName,namespace:v.value}):"xmlns"==v.nodeName&&o.push({prefix:"",namespace:v.value})}for(h=0;h<s;h++){var v,m,y;if(ni(v=i.item(h),0,o))oi(t,(m=v.prefix||"")?"xmlns:"+m:"xmlns",y=v.namespaceURI),o.push({prefix:m,namespace:y});ii(v,t,r,n,o)}if(c===u&&ni(e,0,o))oi(t,(m=e.prefix||"")?"xmlns:"+m:"xmlns",y=e.namespaceURI),o.push({prefix:m,namespace:y});if(a||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),r&&/^script$/i.test(c))for(;a;)a.data?t.push(a.data):ii(a,t,r,n,o.slice()),a=a.nextSibling;else for(;a;)ii(a,t,r,n,o.slice()),a=a.nextSibling;t.push("</",u,">")}else t.push("/>");return;case yo:case Eo:for(a=e.firstChild;a;)ii(a,t,r,n,o.slice()),a=a.nextSibling;return;case uo:return oi(t,e.name,e.value);case lo:return t.push(e.data.replace(/[<&]/g,Mo).replace(/]]>/g,"]]&gt;"));case po:return t.push("<![CDATA[",e.data,"]]>");case mo:return t.push("\x3c!--",e.data,"--\x3e");case go:var g=e.publicId,E=e.systemId;if(t.push("<!DOCTYPE ",e.name),g)t.push(" PUBLIC ",g),E&&"."!=E&&t.push(" ",E),t.push(">");else if(E&&"."!=E)t.push(" SYSTEM ",E,">");else{var b=e.internalSubset;b&&t.push(" [",b,"]"),t.push(">")}return;case vo:return t.push("<?",e.target," ",e.data,"?>");case fo:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function si(e,t,r){var n;switch(t.nodeType){case co:(n=t.cloneNode(!1)).ownerDocument=e;case Eo:break;case uo:r=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,r)for(var o=t.firstChild;o;)n.appendChild(si(e,o,r)),o=o.nextSibling;return n}function ai(e,t,r){var n=new t.constructor;for(var o in t){var i=t[o];"object"!=typeof i&&i!=n[o]&&(n[o]=i)}switch(t.childNodes&&(n.childNodes=new So),n.ownerDocument=e,n.nodeType){case co:var s=t.attributes,a=n.attributes=new Ao,c=s.length;a._ownerElement=n;for(var u=0;u<c;u++)n.setAttributeNode(ai(e,s.item(u),!0));break;case uo:r=!0}if(r)for(var l=t.firstChild;l;)n.appendChild(ai(e,l,r)),l=l.nextSibling;return n}function ci(e,t,r){e[t]=r}wo.INVALID_STATE_ERR=(No[11]="Invalid state",11),wo.SYNTAX_ERR=(No[12]="Syntax error",12),wo.INVALID_MODIFICATION_ERR=(No[13]="Invalid modification",13),wo.NAMESPACE_ERR=(No[14]="Invalid namespace",14),wo.INVALID_ACCESS_ERR=(No[15]="Invalid access",15),Oo.prototype=Error.prototype,io(wo,Oo),So.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var r=[],n=0;n<this.length;n++)ii(this[n],r,e,t);return r.join("")}},Co.prototype.item=function(e){return Io(this),this[e]},so(Co,So),Ao.prototype={length:0,item:So.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==e)return r}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new Oo(_o);var r=this.getNamedItem(e.nodeName);return ko(this._ownerElement,this,e,r),r},setNamedItemNS:function(e){var t,r=e.ownerElement;if(r&&r!=this._ownerElement)throw new Oo(_o);return t=this.getNamedItemNS(e.namespaceURI,e.localName),ko(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return Do(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return Do(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){for(var r=this.length;r--;){var n=this[r];if(n.localName==t&&n.namespaceURI==e)return n}return null}},Lo.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,r){var n=new jo;if(n.implementation=this,n.childNodes=new So,n.doctype=r||null,r&&n.appendChild(r),t){var o=n.createElementNS(e,t);n.appendChild(o)}return n},createDocumentType:function(e,t,r){var n=new Wo;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=r||"",n}},Po.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Bo(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return Ho(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return ai(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==lo&&e.nodeType==lo?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(r[n]==e)return n;t=t.nodeType==uo?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&e in r)return r[e];t=t.nodeType==uo?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},io(ao,Po),io(ao,Po.prototype),jo.prototype={nodeName:"#document",nodeType:yo,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Eo){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return null==this.documentElement&&e.nodeType==co&&(this.documentElement=e),Bo(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),Ho(this,e)},importNode:function(e,t){return si(this,e,t)},getElementById:function(e){var t=null;return Fo(this.documentElement,(function(r){if(r.nodeType==co&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=oo(e);return new Co(this,(function(r){var n=[];return t.length>0&&Fo(r.documentElement,(function(o){if(o!==r&&o.nodeType===co){var i=o.getAttribute("class");if(i){var s=e===i;if(!s){var a=oo(i);s=t.every((c=a,function(e){return c&&-1!==c.indexOf(e)}))}s&&n.push(o)}}var c})),n}))},createElement:function(e){var t=new $o;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new So,(t.attributes=new Ao)._ownerElement=t,t},createDocumentFragment:function(){var e=new Zo;return e.ownerDocument=this,e.childNodes=new So,e},createTextNode:function(e){var t=new Ko;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Yo;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Xo;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new ei;return r.ownerDocument=this,r.tagName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new Vo;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Qo;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new $o,n=t.split(":"),o=r.attributes=new Ao;return r.childNodes=new So,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,o._ownerElement=r,r},createAttributeNS:function(e,t){var r=new Vo,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},so(jo,Po),$o.prototype={nodeType:co,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Eo?this.insertBefore(e,null):function(e,t){var r=t.parentNode;if(r){var n=e.lastChild;r.removeChild(t),n=e.lastChild}return n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,qo(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new Co(this,(function(t){var r=[];return Fo(t,(function(n){n===t||n.nodeType!=co||"*"!==e&&n.tagName!=e||r.push(n)})),r}))},getElementsByTagNameNS:function(e,t){return new Co(this,(function(r){var n=[];return Fo(r,(function(o){o===r||o.nodeType!==co||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||n.push(o)})),n}))}},jo.prototype.getElementsByTagName=$o.prototype.getElementsByTagName,jo.prototype.getElementsByTagNameNS=$o.prototype.getElementsByTagNameNS,so($o,Po),Vo.prototype.nodeType=uo,so(Vo,Po),Go.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(No[To])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},so(Go,Po),Ko.prototype={nodeName:"#text",nodeType:lo,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},so(Ko,Go),Yo.prototype={nodeName:"#comment",nodeType:mo},so(Yo,Go),Xo.prototype={nodeName:"#cdata-section",nodeType:po},so(Xo,Go),Wo.prototype.nodeType=go,so(Wo,Po),Jo.prototype.nodeType=bo,so(Jo,Po),zo.prototype.nodeType=ho,so(zo,Po),Qo.prototype.nodeType=fo,so(Qo,Po),Zo.prototype.nodeName="#document-fragment",Zo.prototype.nodeType=Eo,so(Zo,Po),ei.prototype.nodeType=vo,so(ei,Po),ti.prototype.serializeToString=function(e,t,r){return ri.call(e,t,r)},Po.prototype.toString=ri;try{if(Object.defineProperty){function ui(e){switch(e.nodeType){case co:case Eo:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(ui(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(Co.prototype,"length",{get:function(){return Io(this),this.$$length}}),Object.defineProperty(Po.prototype,"textContent",{get:function(){return ui(this)},set:function(e){switch(this.nodeType){case co:case Eo:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ci=function(e,t,r){e["$$"+t]=r}}}catch(e){}eo.DocumentType=Wo,eo.DOMException=Oo,eo.DOMImplementation=Lo,eo.Element=$o,eo.Node=Po,eo.NodeList=So,eo.XMLSerializer=ti;var li=Fn,pi=Dn.NAMESPACE;function di(e){this.options=e||{locator:{}}}function fi(){this.cdata=!1}function hi(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function vi(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function mi(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function yi(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}di.prototype.parseFromString=function(e,t){var r=this.options,n=new Ei,o=r.domBuilder||new fi,i=r.errorHandler,s=r.locator,a=r.xmlns||{},c=/\/x?html?$/.test(t),u=c?li.HTML_ENTITIES:li.XML_ENTITIES;return s&&o.setDocumentLocator(s),n.errorHandler=function(e,t,r){if(!e){if(t instanceof fi)return t;e=t}var n={},o=e instanceof Function;function i(t){var i=e[t];!i&&o&&(i=2==e.length?function(r){e(t,r)}:e),n[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+vi(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),n}(i,o,s),n.domBuilder=r.domBuilder||o,c&&(a[""]=pi.HTML),a.xml=a.xml||pi.XML,e&&"string"==typeof e?n.parse(e,a,u):n.errorHandler.error("invalid doc source"),o.doc},fi.prototype={startDocument:function(){this.doc=(new wi).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,n){var o=this.doc,i=o.createElementNS(e,r||t),s=n.length;yi(this,i),this.currentElement=i,this.locator&&hi(this.locator,i);for(var a=0;a<s;a++){e=n.getURI(a);var c=n.getValue(a),u=(r=n.getQName(a),o.createAttributeNS(e,r));this.locator&&hi(n.getLocator(a),u),u.value=u.nodeValue=c,i.setAttributeNode(u)}},endElement:function(e,t,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&hi(this.locator,r),yi(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=mi.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&hi(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=mi.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&hi(this.locator,n),yi(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var o=n.createDocumentType(e,t,r);this.locator&&hi(this.locator,o),yi(this,o)}},warning:function(e){console.warn("[xmldom warning]\t"+e,vi(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,vi(this.locator))},fatalError:function(e){throw new bi(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){fi.prototype[e]=function(){return null}}));var gi=jn,Ei=gi.XMLReader,bi=gi.ParseError,wi=kn.DOMImplementation=eo.DOMImplementation;kn.XMLSerializer=eo.XMLSerializer,kn.DOMParser=di,kn.__DOMHandler=fi;var Ni={};Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.parseJson=void 0,Ni.parseJson=function(e){try{return JSON.parse(e)}catch(e){return null}};var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.bufferFrom=void 0,Ti.bufferFrom=function(e){var t=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})),r=new Uint8Array(t.length);return Array.prototype.forEach.call(t,(function(e,t){r[t]=e.charCodeAt(0)})),r};var xi={},_i={};Object.defineProperty(_i,"__esModule",{value:!0}),_i.EventPolyfill=void 0;var Oi=function(){function e(e,t){this.AT_TARGET=0,this.BUBBLING_PHASE=0,this.CAPTURING_PHASE=0,this.NONE=0,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=e,this.target=(null==t?void 0:t.target)||null,this.currentTarget=(null==t?void 0:t.currentTarget)||null,this.timeStamp=Date.now()}return e.prototype.composedPath=function(){return[]},e.prototype.initEvent=function(e,t,r){this.type=e,this.bubbles=!!t,this.cancelable=!!r},e.prototype.preventDefault=function(){this.defaultPrevented=!0},e.prototype.stopPropagation=function(){},e.prototype.stopImmediatePropagation=function(){},e}();_i.EventPolyfill=Oi;var Si={},Ci=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Si,"__esModule",{value:!0}),Si.ProgressEventPolyfill=void 0;var Ii=function(e){function t(t,r){var n=e.call(this,t)||this;return n.lengthComputable=(null==r?void 0:r.lengthComputable)||!1,n.composed=(null==r?void 0:r.composed)||!1,n.loaded=(null==r?void 0:r.loaded)||0,n.total=(null==r?void 0:r.total)||0,n}return Ci(t,e),t}(_i.EventPolyfill);Si.ProgressEventPolyfill=Ii,Object.defineProperty(xi,"__esModule",{value:!0}),xi.createEvent=void 0;var Ai=_i,Ri=Si,ki="undefined"!=typeof ProgressEvent;xi.createEvent=function(e,t,r){var n=ki?ProgressEvent:Ri.ProgressEventPolyfill;return["error","progress","loadstart","loadend","load","timeout","abort"].includes(t)?new n(t,{lengthComputable:!0,loaded:(null==r?void 0:r.loaded)||0,total:(null==r?void 0:r.total)||0}):new Ai.EventPolyfill(t,{target:e,currentTarget:e})};var Di=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},Li=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Pi=n&&n.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Mi=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.createXMLHttpRequestOverride=void 0;var Fi=Ae,ji=o,Ui=kn,qi=Ni,Hi=Jr,Bi=ln,$i=Ti,Vi=xi,Gi=pn.exports;Rn.createXMLHttpRequestOverride=function(e){var t,r=e.pureXMLHttpRequest,n=e.observer,o=e.resolver,i=Gi("XHR");return(t=function(){function e(){this._events=[],this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.onreadystatechange=null,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.url="",this.method="GET",this.readyState=this.UNSENT,this.withCredentials=!1,this.status=200,this.statusText="OK",this.data="",this.response="",this.responseType="text",this.responseText="",this.responseXML=null,this.responseURL="",this.upload=null,this.timeout=0,this._requestHeaders=new ji.Headers,this._responseHeaders=new ji.Headers}return e.prototype.setReadyState=function(e){e!==this.readyState&&(i("readyState change %d -> %d",this.readyState,e),this.readyState=e,e!==this.UNSENT&&(i("triggerring readystate change..."),this.trigger("readystatechange")))},e.prototype.trigger=function(e,t){var r,n;i('trigger "%s" (%d)',e,this.readyState),i('resolve listener for event "%s"',e);var o=this["on"+e];null==o||o.call(this,Vi.createEvent(this,e,t));try{for(var s=Pi(this._events),a=s.next();!a.done;a=s.next()){var c=a.value;c.name===e&&(i('calling mock event listener "%s" (%d)',e,this.readyState),c.listener.call(this,Vi.createEvent(this,e,t)))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return this},e.prototype.reset=function(){i("reset"),this.setReadyState(this.UNSENT),this.status=200,this.statusText="OK",this.data="",this.response=null,this.responseText=null,this.responseXML=null,this._requestHeaders=new ji.Headers,this._responseHeaders=new ji.Headers},e.prototype.open=function(e,t,r,n,o){return void 0===r&&(r=!0),Di(this,void 0,void 0,(function(){return Li(this,(function(s){return(i=Gi("XHR "+e+" "+t))("open",{method:e,url:t,async:r,user:n,password:o}),this.reset(),this.setReadyState(this.OPENED),void 0===t?(this.url=e,this.method="GET"):(this.url=t,this.method=e,this.async=r,this.user=n,this.password=o),[2]}))}))},e.prototype.send=function(e){var t,s=this;i("send %s %s",this.method,this.url),this.data=e||"";try{t=new URL(this.url)}catch(e){t=new URL(this.url,window.location.href)}i("request headers",this._requestHeaders);var a={id:Bi.uuidv4(),url:t,method:this.method,body:this.data,headers:this._requestHeaders};n.emit("request",a),i("awaiting mocked response..."),Promise.resolve(Fi.until((function(){return Di(s,void 0,void 0,(function(){return Li(this,(function(e){return[2,o(a,this)]}))}))}))).then((function(e){var t,o=Mi(e,2),c=o[0],u=o[1];if(c)return i("middleware function threw an exception!",c),s.trigger("error"),void s.abort();if(u){if(i("received mocked response",u),s.trigger("loadstart"),s.status=u.status||200,s.statusText=u.statusText||"OK",s._responseHeaders=u.headers?ji.objectToHeaders(u.headers):new ji.Headers,i("set response status",s.status,s.statusText),i("set response headers",s._responseHeaders),s.setReadyState(s.HEADERS_RECEIVED),i("response type",s.responseType),s.response=s.getResponseBody(u.body),s.responseText=u.body||"",s.responseXML=s.getResponseXML(),i("set response body",s.response),u.body&&s.response){s.setReadyState(s.LOADING);var l=$i.bufferFrom(u.body);s.trigger("progress",{loaded:l.length,total:l.length})}s.setReadyState(s.DONE),s.trigger("load"),s.trigger("loadend"),n.emit("response",a,Hi.toIsoResponse(u))}else{i("no mocked response received!");var p=new r;i("opening an original request %s %s",s.method,s.url),p.open(s.method,s.url,null===(t=s.async)||void 0===t||t,s.user,s.password),p.addEventListener("load",(function(){i('original "onload"'),s.status=p.status,s.statusText=p.statusText,s.responseURL=p.responseURL,s.responseType=p.responseType,s.response=p.response,s.responseText=p.responseText,s.responseXML=p.responseXML,i("set mock request readyState to DONE"),s.setReadyState(s.DONE),i("received original response",s.status,s.statusText),i("original response body:",s.response);var e=p.getAllResponseHeaders();i("original response headers:\n",e),s._responseHeaders=ji.stringToHeaders(e),i("original response headers (normalized)",s._responseHeaders),i("original response finished"),n.emit("response",a,{status:p.status,statusText:p.statusText,headers:s._responseHeaders,body:p.response})})),s.propagateCallbacks(p),s.propagateListeners(p),s.propagateHeaders(p,s._requestHeaders),s.async&&(p.timeout=s.timeout),i("send",s.data),p.send(s.data)}}))},e.prototype.abort=function(){i("abort"),this.readyState>this.UNSENT&&this.readyState<this.DONE&&(this.setReadyState(this.UNSENT),this.trigger("abort"))},e.prototype.dispatchEvent=function(){return!1},e.prototype.setRequestHeader=function(e,t){i('set request header "%s" to "%s"',e,t),this._requestHeaders.append(e,t)},e.prototype.getResponseHeader=function(e){if(i('get response header "%s"',e),this.readyState<this.HEADERS_RECEIVED)return i("cannot return a header: headers not received (state: %s)",this.readyState),null;var t=this._responseHeaders.get(e);return i('resolved response header "%s" to "%s"',e,t,this._responseHeaders),t},e.prototype.getAllResponseHeaders=function(){return i("get all response headers"),this.readyState<this.HEADERS_RECEIVED?(i("cannot return headers: headers not received (state: %s)",this.readyState),""):ji.headersToString(this._responseHeaders)},e.prototype.addEventListener=function(e,t){i("addEventListener",e,t),this._events.push({name:e,listener:t})},e.prototype.removeEventListener=function(e,t){i("removeEventListener",e,t),this._events=this._events.filter((function(r){return r.name!==e&&r.listener!==t}))},e.prototype.overrideMimeType=function(){},e.prototype.getResponseBody=function(e){var t=null!=e?e:"";switch(i("coerced response body to",t),this.responseType){case"json":return i("resolving response body as JSON"),qi.parseJson(t);case"blob":var r=this.getResponseHeader("content-type")||"text/plain";return i("resolving response body as Blob",{type:r}),new Blob([t],{type:r});case"arraybuffer":return i("resolving response body as ArrayBuffer"),$i.bufferFrom(t);default:return t}},e.prototype.getResponseXML=function(){var e=this.getResponseHeader("Content-Type");return"application/xml"===e||"text/xml"===e?(new Ui.DOMParser).parseFromString(this.responseText,e):null},e.prototype.propagateCallbacks=function(e){e.onabort=this.abort,e.onerror=this.onerror,e.ontimeout=this.ontimeout,e.onload=this.onload,e.onloadstart=this.onloadstart,e.onloadend=this.onloadend,e.onprogress=this.onprogress,e.onreadystatechange=this.onreadystatechange},e.prototype.propagateListeners=function(e){i("propagating request listeners (%d) to the original request",this._events.length,this._events),this._events.forEach((function(t){var r=t.name,n=t.listener;e.addEventListener(r,n)}))},e.prototype.propagateHeaders=function(e,t){i("propagating request headers to the original request",t),Object.entries(t.raw()).forEach((function(t){var r=Mi(t,2),n=r[0],o=r[1];i('setting "%s" (%s) header on the original request',n,o),e.setRequestHeader(n,o)}))},e}()).UNSENT=0,t.OPENED=1,t.HEADERS_RECEIVED=2,t.LOADING=3,t.DONE=4,t},Object.defineProperty(An,"__esModule",{value:!0});var Ki=An.interceptXMLHttpRequest=void 0,Yi=Rn,Xi=pn.exports("XHR"),Wi="undefined"==typeof window?void 0:window.XMLHttpRequest;function Ji(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}));e.headers.set("x-msw-request-id",t);const r={id:t,url:e.url,method:e.method,body:it(e.body,e.headers),headers:e.headers,cookies:{},redirect:"manual",referrer:"",keepalive:!1,cache:"default",mode:"cors",referrerPolicy:"no-referrer",integrity:"",destination:"document",bodyUsed:!1,credentials:"same-origin"},n=e.headers.get("cookie");nt(r);const o=n?P(n):{};return r.cookies=Object.assign(Object.assign({},r.cookies),o),r}function zi(e){return function(t){return Ie(this,void 0,void 0,(function*(){e.fallbackInterceptor=function(e,t){const r=Kr.createInterceptor({modules:[xn,Ki],resolver(r){return Ie(this,void 0,void 0,(function*(){return qr(Ji(r),e.requestHandlers,t,e.emitter,{transformResponse:e=>({status:e.status,statusText:e.statusText,headers:e.headers.all(),body:e.body}),onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}))}});return r.apply(),r}(e,t),Ye({message:"Mocking enabled (fallback mode).",quiet:t.quiet})}))}}Ki=An.interceptXMLHttpRequest=function(e,t){if(Wi){Xi('patching "XMLHttpRequest" module...');var r=Yi.createXMLHttpRequestOverride({pureXMLHttpRequest:Wi,observer:e,resolver:t});window.XMLHttpRequest=r}return function(){Wi&&(Xi("restoring modules..."),window.XMLHttpRequest=Wi)}};let Qi=[];function Zi(e){return(t,r)=>new Pr(e,t,r)}const es={all:Zi(/.+/),head:Zi(e.RESTMethods.HEAD),get:Zi(e.RESTMethods.GET),post:Zi(e.RESTMethods.POST),put:Zi(e.RESTMethods.PUT),delete:Zi(e.RESTMethods.DELETE),patch:Zi(e.RESTMethods.PATCH),options:Zi(e.RESTMethods.OPTIONS)};function ts(e,t){return(r,n)=>new jr(e,r,t,n)}function rs(e){return t=>new jr("all",new RegExp(".*"),e,t)}const ns={operation:rs("*"),query:ts("query","*"),mutation:ts("mutation","*")};const os=Object.assign(Object.assign({},ns),{link:function(e){return{operation:rs(e),query:ts("query",e),mutation:ts("mutation",e)}}});return e.GraphQLHandler=jr,e.RequestHandler=kr,e.RestHandler=Pr,e.cleanUrl=Nr,e.compose=_r,e.context=ae,e.createResponseComposition=Cr,e.defaultContext=Rr,e.defaultResponse=Or,e.graphql=os,e.graphqlContext=Fr,e.handleRequest=qr,e.matchRequestUrl=xr,e.parseIsomorphicRequest=Ji,e.response=Ir,e.rest=es,e.restContext=Lr,e.setupWorker=function(...e){if(e.forEach((e=>{if(Array.isArray(e))throw new Error(Ge.formatMessage('Failed to call "setupWorker" given an Array of request handlers (setupWorker([a, b])), expected to receive each handler individually: setupWorker(a, b).'))})),J.exports.isNodeProcess())throw new Error(Ge.formatMessage("Failed to execute `setupWorker` in a non-browser environment. Consider using `setupServer` for Node.js environment instead."));const t=new ce.StrictEventEmitter,r=new ce.StrictEventEmitter;!function(e,t){const r=e.emit;r._isPiped||(e.emit=function(e,...n){return t.emit(e,...n),r.call(this,e,...n)},e.emit._isPiped=!0)}(t,r);const n={startOptions:void 0,worker:null,registration:null,requestHandlers:[...e],emitter:t,workerChannel:{on(e,t){n.events.addListener(navigator.serviceWorker,"message",(r=>{if(r.source!==n.worker)return;const o=V(r.data);o&&o.type===e&&t(r,o)}))},send(e){var t;null===(t=n.worker)||void 0===t||t.postMessage(e)}},events:{addListener:(e,t,r)=>(e.addEventListener(t,r),Qi.push({eventType:t,target:e,callback:r}),()=>{e.removeEventListener(t,r)}),removeAllListeners(){for(const{target:e,eventType:t,callback:r}of Qi)e.removeEventListener(t,r);Qi=[]},once(e){const t=[];return new Promise(((r,o)=>{t.push(n.events.addListener(navigator.serviceWorker,"message",(t=>{try{const n=JSON.parse(t.data);n.type===e&&r(n)}catch(e){o(e)}})),n.events.addListener(navigator.serviceWorker,"messageerror",o))})).finally((()=>{t.forEach((e=>e()))}))}},useFallbackMode:!("serviceWorker"in navigator)||"file:"===location.protocol},o=n.useFallbackMode?zi(n):Br(n),i=n.useFallbackMode?function(e){return function(){var t,r;null===(t=e.fallbackInterceptor)||void 0===t||t.restore(),$r({quiet:null===(r=e.startOptions)||void 0===r?void 0:r.quiet})}}(n):(e=>function(){var t;e.workerChannel.send("MOCK_DEACTIVATE"),window.clearInterval(e.keepAliveInterval),$r({quiet:null===(t=e.startOptions)||void 0===t?void 0:t.quiet})})(n);return{start:Gr(o,n),stop(){n.events.removeAllListeners(),n.emitter.removeAllListeners(),r.removeAllListeners(),i()},use(...e){!function(e,...t){e.unshift(...t)}(n.requestHandlers,...e)},restoreHandlers(){n.requestHandlers.forEach((e=>{e.markAsSkipped(!1)}))},resetHandlers(...t){n.requestHandlers=function(e,...t){return t.length>0?[...t]:[...e]}(e,...t)},printHandlers(){n.requestHandlers.forEach((e=>{const{header:t,callFrame:r}=e.info,n=e.info.hasOwnProperty("operationType")?"[graphql]":"[rest]";console.groupCollapsed(`${n} ${t}`),r&&console.log(`Declaration: ${r}`),console.log("Handler:",e),e instanceof Pr&&console.log("Match:",`https://mswjs.io/repl?path=${e.info.path}`),console.groupEnd()}))},events:{on:(...e)=>r.on(...e),removeListener:(...e)=>r.removeListener(...e),removeAllListeners:(...e)=>r.removeAllListeners(...e)}}},e}({});
@@ -2,7 +2,7 @@
2
2
  /* tslint:disable */
3
3
 
4
4
  /**
5
- * Mock Service Worker (0.36.0).
5
+ * Mock Service Worker (0.36.1).
6
6
  * @see https://github.com/mswjs/msw
7
7
  * - Please do NOT modify this file.
8
8
  * - Please do NOT serve this file on production.
package/lib/umd/index.js CHANGED
@@ -22924,18 +22924,26 @@ Invalid value has been removed from localStorage to prevent subsequent failed pa
22924
22924
  */
22925
22925
  function coercePath(path) {
22926
22926
  return (path
22927
- /**
22928
- * Escape the protocol so that "path-to-regexp" could match
22929
- * absolute URL.
22930
- * @see https://github.com/pillarjs/path-to-regexp/issues/259
22931
- */
22932
- .replace(/^([^\/]+)(:)(?=\/\/)/g, '$1\\$2')
22933
22927
  /**
22934
22928
  * Replace wildcards ("*") with unnamed capturing groups
22935
22929
  * because "path-to-regexp" doesn't support wildcards.
22936
22930
  * Ignore path parameter' modifiers (i.e. ":name*").
22937
22931
  */
22938
- .replace(/(?<!(^|\/|\*+):[\w]+)(\*{1,2})/g, '(.*)'));
22932
+ .replace(/([:a-zA-Z_-]*)(\*{1,2})+/g, (_, parameterName, wildcard) => {
22933
+ const expression = '(.*)';
22934
+ if (!parameterName) {
22935
+ return expression;
22936
+ }
22937
+ return parameterName.startsWith(':')
22938
+ ? `${parameterName}${wildcard}`
22939
+ : `${parameterName}${expression}`;
22940
+ })
22941
+ /**
22942
+ * Escape the protocol so that "path-to-regexp" could match
22943
+ * absolute URL.
22944
+ * @see https://github.com/pillarjs/path-to-regexp/issues/259
22945
+ */
22946
+ .replace(/^([^\/]+)(:)(?=\/\/)/g, '$1\\$2'));
22939
22947
  }
22940
22948
  /**
22941
22949
  * Returns the result of matching given request URL against a mask.
@@ -2,7 +2,7 @@
2
2
  /* tslint:disable */
3
3
 
4
4
  /**
5
- * Mock Service Worker (0.36.0).
5
+ * Mock Service Worker (0.36.1).
6
6
  * @see https://github.com/mswjs/msw
7
7
  * - Please do NOT modify this file.
8
8
  * - Please do NOT serve this file on production.
@@ -5426,18 +5426,26 @@ function normalizePath(path, baseUrl) {
5426
5426
  */
5427
5427
  function coercePath(path) {
5428
5428
  return (path
5429
- /**
5430
- * Escape the protocol so that "path-to-regexp" could match
5431
- * absolute URL.
5432
- * @see https://github.com/pillarjs/path-to-regexp/issues/259
5433
- */
5434
- .replace(/^([^\/]+)(:)(?=\/\/)/g, '$1\\$2')
5435
5429
  /**
5436
5430
  * Replace wildcards ("*") with unnamed capturing groups
5437
5431
  * because "path-to-regexp" doesn't support wildcards.
5438
5432
  * Ignore path parameter' modifiers (i.e. ":name*").
5439
5433
  */
5440
- .replace(/(?<!(^|\/|\*+):[\w]+)(\*{1,2})/g, '(.*)'));
5434
+ .replace(/([:a-zA-Z_-]*)(\*{1,2})+/g, (_, parameterName, wildcard) => {
5435
+ const expression = '(.*)';
5436
+ if (!parameterName) {
5437
+ return expression;
5438
+ }
5439
+ return parameterName.startsWith(':')
5440
+ ? `${parameterName}${wildcard}`
5441
+ : `${parameterName}${expression}`;
5442
+ })
5443
+ /**
5444
+ * Escape the protocol so that "path-to-regexp" could match
5445
+ * absolute URL.
5446
+ * @see https://github.com/pillarjs/path-to-regexp/issues/259
5447
+ */
5448
+ .replace(/^([^\/]+)(:)(?=\/\/)/g, '$1\\$2'));
5441
5449
  }
5442
5450
  /**
5443
5451
  * Returns the result of matching given request URL against a mask.
package/node/lib/index.js CHANGED
@@ -7312,18 +7312,26 @@ function normalizePath(path, baseUrl) {
7312
7312
  */
7313
7313
  function coercePath(path) {
7314
7314
  return (path
7315
- /**
7316
- * Escape the protocol so that "path-to-regexp" could match
7317
- * absolute URL.
7318
- * @see https://github.com/pillarjs/path-to-regexp/issues/259
7319
- */
7320
- .replace(/^([^\/]+)(:)(?=\/\/)/g, '$1\\$2')
7321
7315
  /**
7322
7316
  * Replace wildcards ("*") with unnamed capturing groups
7323
7317
  * because "path-to-regexp" doesn't support wildcards.
7324
7318
  * Ignore path parameter' modifiers (i.e. ":name*").
7325
7319
  */
7326
- .replace(/(?<!(^|\/|\*+):[\w]+)(\*{1,2})/g, '(.*)'));
7320
+ .replace(/([:a-zA-Z_-]*)(\*{1,2})+/g, (_, parameterName, wildcard) => {
7321
+ const expression = '(.*)';
7322
+ if (!parameterName) {
7323
+ return expression;
7324
+ }
7325
+ return parameterName.startsWith(':')
7326
+ ? `${parameterName}${wildcard}`
7327
+ : `${parameterName}${expression}`;
7328
+ })
7329
+ /**
7330
+ * Escape the protocol so that "path-to-regexp" could match
7331
+ * absolute URL.
7332
+ * @see https://github.com/pillarjs/path-to-regexp/issues/259
7333
+ */
7334
+ .replace(/^([^\/]+)(:)(?=\/\/)/g, '$1\\$2'));
7327
7335
  }
7328
7336
  /**
7329
7337
  * Returns the result of matching given request URL against a mask.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "msw",
3
- "version": "0.36.0",
3
+ "version": "0.36.1",
4
4
  "description": "Seamless REST/GraphQL API mocking library for browser and Node.js.",
5
5
  "main": "lib/umd/index.js",
6
6
  "module": "lib/esm/index.js",