@epa-wg/custom-element-dist 0.0.24 → 0.0.25

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.
Files changed (86) hide show
  1. package/.storybook/main.ts +21 -21
  2. package/README.md +4 -4
  3. package/coverage/coverage-final.json +6 -4
  4. package/coverage/index.html +27 -27
  5. package/coverage/src/custom-element/coverage.svg +1 -1
  6. package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
  7. package/coverage/src/custom-element/custom-element.js.html +391 -355
  8. package/coverage/src/custom-element/http-request.js.html +12 -12
  9. package/coverage/src/custom-element/index.html +23 -23
  10. package/coverage/src/custom-element/local-storage.js.html +1 -1
  11. package/coverage/src/custom-element/location-element.js/coverage.svg +1 -1
  12. package/coverage/src/custom-element/location-element.js.html +116 -47
  13. package/coverage/src/index.html +1 -1
  14. package/coverage/src/mocks/handlers.ts.html +1 -1
  15. package/coverage/src/mocks/index.html +1 -1
  16. package/coverage/src/stories/attributes.test.stories.ts.html +1 -1
  17. package/coverage/src/stories/coverage.svg +1 -1
  18. package/coverage/src/stories/css.test.stories.ts.html +1 -1
  19. package/coverage/src/stories/dom-merge.test.stories.ts.html +1 -1
  20. package/coverage/src/stories/external-template.test.stories.ts.html +1 -1
  21. package/coverage/src/stories/form.test.stories.ts.html +1 -1
  22. package/coverage/src/stories/http-request.stories.ts.html +1 -1
  23. package/coverage/src/stories/index.html +38 -8
  24. package/coverage/src/stories/local-storage.test.stories.ts.html +1 -1
  25. package/coverage/src/stories/location-element.test.stories.ts.html +1 -1
  26. package/coverage/src/stories/set-url.test.stories.ts/coverage.svg +10 -0
  27. package/coverage/src/stories/set-url.test.stories.ts.html +427 -0
  28. package/coverage/src/stories/slice-events.test.stories.ts.html +1 -1
  29. package/coverage/src/stories/slots.test.stories.ts.html +1 -1
  30. package/coverage/src/stories/testStoryBook.ts.html +12 -12
  31. package/coverage/src/stories/version-select.test.stories.ts/coverage.svg +10 -0
  32. package/coverage/src/stories/version-select.test.stories.ts.html +313 -0
  33. package/coverage/src/sum.ts.html +1 -1
  34. package/dist/{custom-element-DqtzLkTG.js → custom-element-DAe7uvIt.js} +163 -157
  35. package/dist/custom-element-DZvvhscI.cjs +53 -0
  36. package/dist/custom-element-bundle.cjs +1 -1
  37. package/dist/custom-element-bundle.js +3 -3
  38. package/dist/location-element-DRB7hCwA.cjs +1 -0
  39. package/dist/location-element-FJlONi2n.js +65 -0
  40. package/package.json +2 -2
  41. package/src/custom-element/custom-element.js +16 -4
  42. package/src/custom-element/demo/location-element.html +17 -4
  43. package/src/custom-element/demo/s.xml +31 -6
  44. package/src/custom-element/demo/s.xslt +59 -22
  45. package/src/custom-element/demo/set-url.html +141 -0
  46. package/src/custom-element/ide/customData-dce.json +56 -0
  47. package/src/custom-element/ide/web-types-dce.json +153 -110
  48. package/src/custom-element/ide/web-types-xsl.json +1 -1
  49. package/src/custom-element/index.html +1 -0
  50. package/src/custom-element/location-element.js +25 -2
  51. package/src/custom-element.test.ts +26 -26
  52. package/src/stories/set-url.test.stories.ts +114 -0
  53. package/src/stories/version-select.test.stories.ts +76 -0
  54. package/storybook-static/assets/{Color-PRSJMWNM-y4ZsI1hY.js → Color-PRSJMWNM-CRSv4C7i.js} +1 -1
  55. package/storybook-static/assets/{Configure-CyLVkwlf.js → Configure-D0qG3gR9.js} +1 -1
  56. package/storybook-static/assets/{DocsRenderer-K4EAMTCU-VRGUwRrq.js → DocsRenderer-K4EAMTCU-CG_P5zRZ.js} +2 -2
  57. package/storybook-static/assets/{WithTooltip-KJL26V4Q-xdXH9Ztt.js → WithTooltip-KJL26V4Q-CUqUi5E8.js} +1 -1
  58. package/storybook-static/assets/{attributes.test.stories-BckCcyrF.js → attributes.test.stories-W34tZdUt.js} +1 -1
  59. package/storybook-static/assets/{css.test.stories-B-QcObCF.js → css.test.stories-BZFYx1TQ.js} +1 -1
  60. package/storybook-static/assets/{custom-element-BIxkVg7K.js → custom-element-DpIq8E2p.js} +79 -79
  61. package/storybook-static/assets/{dom-merge.test.stories-CjXhjTQY.js → dom-merge.test.stories-S-7U5N3h.js} +1 -1
  62. package/storybook-static/assets/{external-template.test.stories-BBqyi0az.js → external-template.test.stories-QIO3lAFz.js} +1 -1
  63. package/storybook-static/assets/{form.test.stories-DsIo1B4n.js → form.test.stories-ClYhj9F1.js} +1 -1
  64. package/storybook-static/assets/{formatter-2WMMO6ZP-CThVcQxM.js → formatter-2WMMO6ZP-C-UiBIma.js} +1 -1
  65. package/storybook-static/assets/http-request-DNq59pnj.js +1 -0
  66. package/storybook-static/assets/{http-request.stories-sXA_Y-VM.js → http-request.stories-DCqY5s2i.js} +9 -9
  67. package/storybook-static/assets/iframe-CURpvmVV.js +2 -0
  68. package/storybook-static/assets/{index-VWixWKZ7.js → index-CKw1EbdP.js} +1 -1
  69. package/storybook-static/assets/{index-CUFHd5VD.js → index-DYpTqTNu.js} +1 -1
  70. package/storybook-static/assets/{index-DPPi9iZu.js → index-DsWii_Ep.js} +5 -5
  71. package/storybook-static/assets/{local-storage.test.stories-Cs2v3QTS.js → local-storage.test.stories-BqgYwqr-.js} +1 -1
  72. package/storybook-static/assets/location-element-hKpcXCdn.js +1 -0
  73. package/storybook-static/assets/{location-element.test.stories-WkrQDzJJ.js → location-element.test.stories-DvH1TWK4.js} +9 -9
  74. package/storybook-static/assets/{preview-p-Bwze-K.js → preview-DjDbQHPa.js} +2 -2
  75. package/storybook-static/assets/set-url.test.stories-GlJOh31I.js +81 -0
  76. package/storybook-static/assets/{slice-events.test.stories-BRBBc0JT.js → slice-events.test.stories-VoNjuPCX.js} +1 -1
  77. package/storybook-static/assets/{slots.test.stories-r-i91k3y.js → slots.test.stories-Da2j9YuO.js} +1 -1
  78. package/storybook-static/assets/{syntaxhighlighter-BP7B2CQK-OnioRcs9.js → syntaxhighlighter-BP7B2CQK-CDpEe51g.js} +1 -1
  79. package/storybook-static/assets/version-select.test.stories-DLwf-TPB.js +60 -0
  80. package/storybook-static/iframe.html +1 -1
  81. package/storybook-static/index.json +1 -1
  82. package/storybook-static/project.json +1 -1
  83. package/dist/custom-element-BDK7dcJN.cjs +0 -53
  84. package/dist/location-element-2m0gWq_d.cjs +0 -1
  85. package/dist/location-element-nA_wsqBt.js +0 -49
  86. package/storybook-static/assets/iframe-DcDTQOmA.js +0 -2
@@ -1,4 +1,4 @@
1
- import{w as d,e as a,u as s}from"./custom-element-BIxkVg7K.js";import"./index-CVRyq5ci.js";function p(n){return new Promise(e=>setTimeout(e,n))}function u(n){const{title:e,body:t}=n;return`
1
+ import{w as d,e as a,u as s}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.js";function p(n){return new Promise(e=>setTimeout(e,n))}function u(n){const{title:e,body:t}=n;return`
2
2
  <fieldset>
3
3
  <legend>${e}</legend>
4
4
  ${t}
@@ -1,4 +1,4 @@
1
- import{w as l,e as a}from"./custom-element-BIxkVg7K.js";import"./index-CVRyq5ci.js";function T(t){return new Promise(e=>setTimeout(e,t))}function v(t){const{title:e,body:n}=t;return`
1
+ import{w as l,e as a}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.js";function T(t){return new Promise(e=>setTimeout(e,t))}function v(t){const{title:e,body:n}=t;return`
2
2
  <fieldset>
3
3
  <legend>${e}</legend>
4
4
  ${n}
@@ -1,4 +1,4 @@
1
- import{w as i,e as n,u as e}from"./custom-element-BIxkVg7K.js";import"./index-CVRyq5ci.js";function l(a){const{title:t,body:s}=a;return`
1
+ import{w as i,e as n,u as e}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.js";function l(a){const{title:t,body:s}=a;return`
2
2
  <fieldset>
3
3
  <legend>${t}</legend>
4
4
  ${s}
@@ -1,4 +1,4 @@
1
- import{m as Xi}from"./index-DPPi9iZu.js";import"./iframe-DcDTQOmA.js";import"../sb-preview/runtime.js";import"./index-Cc7K62zD.js";import"./index-DXimoRZY.js";import"./index-DrFu-skq.js";var Qi=Object.defineProperty,cu=(e,t)=>{for(var r in t)Qi(e,r,{get:t[r],enumerable:!0})},pu=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},se=(e,t,r)=>(pu(e,t,"read from private field"),t.get(e)),Zi=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},ea=(e,t,r,n)=>(pu(e,t,"write to private field"),t.set(e,r),r),hu={};cu(hu,{languages:()=>jl,options:()=>Wl,parsers:()=>zu,printers:()=>Vl});var ta=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},O=ta,_r="string",Br="array",xr="cursor",_t="indent",Bt="align",Tr="trim",Je="group",xt="fill",Tt="if-break",Lt="indent-if-break",Lr="line-suffix",Nr="line-suffix-boundary",be="line",qr="label",Nt="break-parent",du=new Set([xr,_t,Bt,Tr,Je,xt,Tt,Lt,Lr,Nr,be,qr,Nt]);function ra(e){if(typeof e=="string")return _r;if(Array.isArray(e))return Br;if(!e)return;let{type:t}=e;if(du.has(t))return t}var Pr=ra,na=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function ua(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
1
+ import{m as Xi}from"./index-DsWii_Ep.js";import"./iframe-CURpvmVV.js";import"../sb-preview/runtime.js";import"./index-Cc7K62zD.js";import"./index-DXimoRZY.js";import"./index-DrFu-skq.js";var Qi=Object.defineProperty,cu=(e,t)=>{for(var r in t)Qi(e,r,{get:t[r],enumerable:!0})},pu=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},se=(e,t,r)=>(pu(e,t,"read from private field"),t.get(e)),Zi=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},ea=(e,t,r,n)=>(pu(e,t,"write to private field"),t.set(e,r),r),hu={};cu(hu,{languages:()=>jl,options:()=>Wl,parsers:()=>zu,printers:()=>Vl});var ta=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},O=ta,_r="string",Br="array",xr="cursor",_t="indent",Bt="align",Tr="trim",Je="group",xt="fill",Tt="if-break",Lt="indent-if-break",Lr="line-suffix",Nr="line-suffix-boundary",be="line",qr="label",Nt="break-parent",du=new Set([xr,_t,Bt,Tr,Je,xt,Tt,Lt,Lr,Nr,be,qr,Nt]);function ra(e){if(typeof e=="string")return _r;if(Array.isArray(e))return Br;if(!e)return;let{type:t}=e;if(du.has(t))return t}var Pr=ra,na=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function ua(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
2
2
  Expected it to be 'string' or 'object'.`;if(Pr(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=na([...du].map(u=>`'${u}'`));return`Unexpected doc.type '${e.type}'.
3
3
  Expected it to be ${n}.`}var ia=class extends Error{name="InvalidDocError";constructor(e){super(ua(e)),this.doc=e}},Du=ia,aa=()=>{},sa=aa;function we(e){return{type:_t,contents:e}}function fu(e,t){return{type:Bt,contents:t,n:e}}function q(e,t={}){return sa(t.expandedStates),{type:Je,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function oa(e){return fu(Number.NEGATIVE_INFINITY,e)}function la(e){return fu({type:"root"},e)}function mu(e){return{type:xt,parts:e}}function Et(e,t="",r={}){return{type:Tt,breakContents:e,flatContents:t,groupId:r.groupId}}function ca(e,t){return{type:Lt,contents:e,groupId:t.groupId,negate:t.negate}}var Qe={type:Nt},pa={type:be,hard:!0},ha={type:be,hard:!0,literal:!0},L={type:be},I={type:be,soft:!0},A=[pa,Qe],da=[ha,Qe];function Ze(e,t){let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}var Da=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},qt=Da;function Ir(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){if(r.has(i))return r.get(i);let a=u(i);return r.set(i,a),a}function u(i){switch(Pr(i)){case Br:return t(i.map(n));case xt:return t({...i,parts:i.parts.map(n)});case Tt:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case Je:{let{expandedStates:a,contents:s}=i;return a?(a=a.map(n),s=a[0]):s=n(s),t({...i,contents:s,expandedStates:a})}case Bt:case _t:case Lt:case qr:case Lr:return t({...i,contents:n(i.contents)});case _r:case xr:case Tr:case Nr:case be:case Nt:return t(i);default:throw new Du(i)}}}function fa(e){switch(Pr(e)){case xt:if(e.parts.every(t=>t===""))return"";break;case Je:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===Je&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Bt:case _t:case Lt:case Lr:if(!e.contents)return"";break;case Tt:if(!e.flatContents&&!e.breakContents)return"";break;case Br:{let t=[];for(let r of e){if(!r)continue;let[n,...u]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof qt(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...u)}return t.length===0?"":t.length===1?t[0]:t}case _r:case xr:case Tr:case Nr:case be:case qr:case Nt:break;default:throw new Du(e)}return e}function ma(e){return Ir(e,t=>fa(t))}function G(e,t=da){return Ir(e,r=>typeof r=="string"?Ze(t,r.split(`
4
4
  `)):r)}var ga=class extends Error{name="UnexpectedNodeError";constructor(e,t,r="type"){super(`Unexpected ${t} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},Ca=ga,ot="'",ln='"';function Fa(e,t){let r=t===!0||t===ot?ot:ln,n=r===ot?ln:ot,u=0,i=0;for(let a of e)a===r?u++:a===n&&i++;return u>i?n:r}var va=Fa;function ya(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var U,Ea=class{constructor(e){Zi(this,U,void 0),ea(this,U,new Set(e))}getLeadingWhitespaceCount(e){let t=se(this,U),r=0;for(let n=0;n<e.length&&t.has(e.charAt(n));n++)r++;return r}getTrailingWhitespaceCount(e){let t=se(this,U),r=0;for(let n=e.length-1;n>=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return se(this,U).has(e.charAt(0))}hasTrailingWhitespace(e){return se(this,U).has(qt(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${ya([...se(this,U)].join(""))}]+`,n=new RegExp(t?`(${r})`:r);return e.split(n)}hasWhitespaceCharacter(e){let t=se(this,U);return Array.prototype.some.call(e,r=>t.has(r))}hasNonWhitespaceCharacter(e){let t=se(this,U);return Array.prototype.some.call(e,r=>!t.has(r))}isWhitespaceOnly(e){let t=se(this,U);return Array.prototype.every.call(e,r=>t.has(r))}};U=new WeakMap;var ba=Ea,wa=[" ",`
@@ -0,0 +1 @@
1
+ const u=(c,e)=>c.getAttribute(e);class o extends HTMLElement{static observedAttributes=["value","slice","url","method","header-accept"];get requestHeaders(){const e={};return[...this.attributes].filter(t=>t.name.startsWith("header-")).map(t=>e[t.name.substring(7)]=t.value),e}get requestProps(){const e={};return[...this.attributes].filter(t=>!t.name.startsWith("header-")).filter(t=>!t.name.startsWith("slice")).map(t=>e[t.name]=t.value),e}disconnectedCallback(){this.#t?.()}connectedCallback(){setTimeout(()=>this.fetch(),0)}#e="";#t=()=>{};async fetch(){if(!this.closest("body"))return;const e=u(this,"url")||"";if(!e)return this.#t?.(),this.value={};if(this.#e===e)return;this.#e=e;const t=new AbortController;this.#t=()=>{t.abort(this.localName+" disconnected"),this.#e=""};const r={...this.requestProps,headers:this.requestHeaders},a={request:r},n=()=>this.dispatchEvent(new Event("change"));this.value=a,n();const h=await fetch(e,{...this.requestProps,signal:t.signal,headers:this.requestHeaders}),i={headers:{}};if([...h.headers].map(([s,l])=>i.headers[s]=l),"ok,status,statusText,type,url,redirected".split(",").map(s=>i[s]=h[s]),a.response=i,n(),i.headers["content-type"]?.includes("json"))try{a.data=await h.json(),n()}catch{}}attributeChangedCallback(e,t,r){e==="url"&&t!==r&&(t&&this.#t?.(),r?setTimeout(()=>this.fetch(),10):(this.value={},setTimeout(()=>this.dispatchEvent(new Event("change")),10)))}}window.customElements.define("http-request",o);
@@ -1,4 +1,4 @@
1
- import{w as U,e as w}from"./custom-element-BIxkVg7K.js";import{i as ve,d as J,s as Q,R as ye,t as ge}from"./index-DuIEV_9C.js";import"./index-CVRyq5ci.js";const we=(t,e)=>t.getAttribute(e);class xe extends HTMLElement{static observedAttributes=["value","slice","url","method","header-accept"];get requestHeaders(){const e={};return[...this.attributes].filter(r=>r.name.startsWith("header-")).map(r=>e[r.name.substring(7)]=r.value),e}get requestProps(){const e={};return[...this.attributes].filter(r=>!r.name.startsWith("header-")).filter(r=>!r.name.startsWith("slice")).map(r=>e[r.name]=r.value),e}disconnectedCallback(){this.#e?.()}connectedCallback(){setTimeout(()=>this.fetch(),0)}#t="";#e=()=>{};async fetch(){if(!this.closest("body"))return;const e=we(this,"url")||"";if(!e)return this.#e?.(),this.value={};if(this.#t===e)return;this.#t=e;const r=new AbortController;this.#e=()=>{r.abort(this.localName+" disconnected"),this.#t=""};const n={...this.requestProps,headers:this.requestHeaders},a={request:n},l=()=>this.dispatchEvent(new Event("change"));this.value=a,l();const u=await fetch(e,{...this.requestProps,signal:r.signal,headers:this.requestHeaders}),d={headers:{}};if([...u.headers].map(([s,o])=>d.headers[s]=o),"ok,status,statusText,type,url,redirected".split(",").map(s=>d[s]=u[s]),a.response=d,l(),d.headers["content-type"]?.includes("json"))try{a.data=await u.json(),l()}catch{}}attributeChangedCallback(e,r,n){e==="url"&&r!==n&&(r&&this.#e?.(),n?setTimeout(()=>this.fetch(),10):(this.value={},setTimeout(()=>this.dispatchEvent(new Event("change")),10)))}}window.customElements.define("http-request",xe);function be(){ve(typeof URL<"u",J.formatMessage(`Global "URL" class is not defined. This likely means that you're running MSW in an environment that doesn't support all Node.js standard API (e.g. React Native). If that's the case, please use an appropriate polyfill for the "URL" class, like "react-native-url-polyfill".`))}function Te(t,e){return t.toLowerCase()===e.toLowerCase()}function Ee(t){return t<300?"#69AB32":t<400?"#F0BB4B":"#E95F5D"}function Ce(){const t=new Date;return[t.getHours(),t.getMinutes(),t.getSeconds()].map(String).map(e=>e.slice(0,2)).map(e=>e.padStart(2,"0")).join(":")}async function _e(t){const r=await t.clone().text();return{url:new URL(t.url),method:t.method,headers:Object.fromEntries(t.headers.entries()),body:r}}var Pe=Object.create,ae=Object.defineProperty,qe=Object.getOwnPropertyDescriptor,se=Object.getOwnPropertyNames,ke=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty,oe=(t,e)=>function(){return e||(0,t[se(t)[0]])((e={exports:{}}).exports,e),e.exports},Oe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of se(e))!Re.call(t,a)&&a!==r&&ae(t,a,{get:()=>e[a],enumerable:!(n=qe(e,a))||n.enumerable});return t},Ae=(t,e,r)=>(r=t!=null?Pe(ke(t)):{},Oe(ae(r,"default",{value:t,enumerable:!0}),t)),Se=oe({"node_modules/statuses/codes.json"(t,e){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a Teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}}}),Be=oe({"node_modules/statuses/index.js"(t,e){var r=Se();e.exports=d,d.message=r,d.code=n(r),d.codes=a(r),d.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},d.empty={204:!0,205:!0,304:!0},d.retry={502:!0,503:!0,504:!0};function n(s){var o={};return Object.keys(s).forEach(function(f){var c=s[f],h=Number(f);o[c.toLowerCase()]=h}),o}function a(s){return Object.keys(s).map(function(i){return Number(i)})}function l(s){var o=s.toLowerCase();if(!Object.prototype.hasOwnProperty.call(d.code,o))throw new Error('invalid status message: "'+s+'"');return d.code[o]}function u(s){if(!Object.prototype.hasOwnProperty.call(d.message,s))throw new Error("invalid status code: "+s);return d.message[s]}function d(s){if(typeof s=="number")return u(s);if(typeof s!="string")throw new TypeError("code must be a number or string");var o=parseInt(s,10);return isNaN(o)?l(s):u(o)}}}),$e=Ae(Be()),ie=$e.default;/*! Bundled license information:
1
+ import{w as U,e as w}from"./custom-element-DpIq8E2p.js";import"./http-request-DNq59pnj.js";import{i as ve,d as J,s as Q,R as ye,t as ge}from"./index-DuIEV_9C.js";import"./index-CVRyq5ci.js";function we(){ve(typeof URL<"u",J.formatMessage(`Global "URL" class is not defined. This likely means that you're running MSW in an environment that doesn't support all Node.js standard API (e.g. React Native). If that's the case, please use an appropriate polyfill for the "URL" class, like "react-native-url-polyfill".`))}function xe(t,e){return t.toLowerCase()===e.toLowerCase()}function be(t){return t<300?"#69AB32":t<400?"#F0BB4B":"#E95F5D"}function Te(){const t=new Date;return[t.getHours(),t.getMinutes(),t.getSeconds()].map(String).map(e=>e.slice(0,2)).map(e=>e.padStart(2,"0")).join(":")}async function Ee(t){const r=await t.clone().text();return{url:new URL(t.url),method:t.method,headers:Object.fromEntries(t.headers.entries()),body:r}}var Ce=Object.create,ae=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,oe=Object.getOwnPropertyNames,Pe=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty,se=(t,e)=>function(){return e||(0,t[oe(t)[0]])((e={exports:{}}).exports,e),e.exports},qe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of oe(e))!ke.call(t,a)&&a!==r&&ae(t,a,{get:()=>e[a],enumerable:!(n=_e(e,a))||n.enumerable});return t},Re=(t,e,r)=>(r=t!=null?Ce(Pe(t)):{},qe(ae(r,"default",{value:t,enumerable:!0}),t)),Oe=se({"node_modules/statuses/codes.json"(t,e){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a Teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}}}),Ae=se({"node_modules/statuses/index.js"(t,e){var r=Oe();e.exports=p,p.message=r,p.code=n(r),p.codes=a(r),p.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},p.empty={204:!0,205:!0,304:!0},p.retry={502:!0,503:!0,504:!0};function n(o){var s={};return Object.keys(o).forEach(function(f){var c=o[f],m=Number(f);s[c.toLowerCase()]=m}),s}function a(o){return Object.keys(o).map(function(i){return Number(i)})}function l(o){var s=o.toLowerCase();if(!Object.prototype.hasOwnProperty.call(p.code,s))throw new Error('invalid status message: "'+o+'"');return p.code[s]}function u(o){if(!Object.prototype.hasOwnProperty.call(p.message,o))throw new Error("invalid status code: "+o);return p.message[o]}function p(o){if(typeof o=="number")return u(o);if(typeof o!="string")throw new TypeError("code must be a number or string");var s=parseInt(o,10);return isNaN(s)?l(o):u(s)}}}),Se=Re(Ae()),ie=Se.default;/*! Bundled license information:
2
2
 
3
3
  statuses/index.js:
4
4
  (*!
@@ -7,7 +7,7 @@ statuses/index.js:
7
7
  * Copyright(c) 2016 Douglas Christopher Wilson
8
8
  * MIT Licensed
9
9
  *)
10
- */const{message:De}=ie;async function Ie(t){const e=t.clone(),r=await e.text(),n=e.status||200,a=e.statusText||De[n]||"OK";return{status:n,statusText:a,headers:Object.fromEntries(e.headers.entries()),body:r}}function je(t){for(var e=[],r=0;r<t.length;){var n=t[r];if(n==="*"||n==="+"||n==="?"){e.push({type:"MODIFIER",index:r,value:t[r++]});continue}if(n==="\\"){e.push({type:"ESCAPED_CHAR",index:r++,value:t[r++]});continue}if(n==="{"){e.push({type:"OPEN",index:r,value:t[r++]});continue}if(n==="}"){e.push({type:"CLOSE",index:r,value:t[r++]});continue}if(n===":"){for(var a="",l=r+1;l<t.length;){var u=t.charCodeAt(l);if(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||u===95){a+=t[l++];continue}break}if(!a)throw new TypeError("Missing parameter name at ".concat(r));e.push({type:"NAME",index:r,value:a}),r=l;continue}if(n==="("){var d=1,s="",l=r+1;if(t[l]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(l));for(;l<t.length;){if(t[l]==="\\"){s+=t[l++]+t[l++];continue}if(t[l]===")"){if(d--,d===0){l++;break}}else if(t[l]==="("&&(d++,t[l+1]!=="?"))throw new TypeError("Capturing groups are not allowed at ".concat(l));s+=t[l++]}if(d)throw new TypeError("Unbalanced pattern at ".concat(r));if(!s)throw new TypeError("Missing pattern at ".concat(r));e.push({type:"PATTERN",index:r,value:s}),r=l;continue}e.push({type:"CHAR",index:r,value:t[r++]})}return e.push({type:"END",index:r,value:""}),e}function Ne(t,e){e===void 0&&(e={});for(var r=je(t),n=e.prefixes,a=n===void 0?"./":n,l="[^".concat(A(e.delimiter||"/#?"),"]+?"),u=[],d=0,s=0,o="",i=function(b){if(s<r.length&&r[s].type===b)return r[s++].value},f=function(b){var q=i(b);if(q!==void 0)return q;var k=r[s],z=k.type,F=k.index;throw new TypeError("Unexpected ".concat(z," at ").concat(F,", expected ").concat(b))},c=function(){for(var b="",q;q=i("CHAR")||i("ESCAPED_CHAR");)b+=q;return b};s<r.length;){var h=i("CHAR"),m=i("NAME"),p=i("PATTERN");if(m||p){var v=h||"";a.indexOf(v)===-1&&(o+=v,v=""),o&&(u.push(o),o=""),u.push({name:m||d++,prefix:v,suffix:"",pattern:p||l,modifier:i("MODIFIER")||""});continue}var y=h||i("ESCAPED_CHAR");if(y){o+=y;continue}o&&(u.push(o),o="");var x=i("OPEN");if(x){var v=c(),T=i("NAME")||"",g=i("PATTERN")||"",P=c();f("CLOSE"),u.push({name:T||(g?d++:""),pattern:T&&!g?l:g,prefix:v,suffix:P,modifier:i("MODIFIER")||""});continue}f("END")}return u}function Le(t,e){var r=[],n=le(t,r,e);return Ue(n,r,e)}function Ue(t,e,r){r===void 0&&(r={});var n=r.decode,a=n===void 0?function(l){return l}:n;return function(l){var u=t.exec(l);if(!u)return!1;for(var d=u[0],s=u.index,o=Object.create(null),i=function(c){if(u[c]===void 0)return"continue";var h=e[c-1];h.modifier==="*"||h.modifier==="+"?o[h.name]=u[c].split(h.prefix+h.suffix).map(function(m){return a(m,h)}):o[h.name]=a(u[c],h)},f=1;f<u.length;f++)i(f);return{path:d,index:s,params:o}}}function A(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function ce(t){return t&&t.sensitive?"":"i"}function He(t,e){if(!e)return t;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,a=r.exec(t.source);a;)e.push({name:a[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),a=r.exec(t.source);return t}function Me(t,e,r){var n=t.map(function(a){return le(a,e,r).source});return new RegExp("(?:".concat(n.join("|"),")"),ce(r))}function ze(t,e,r){return Fe(Ne(t,r),e,r)}function Fe(t,e,r){r===void 0&&(r={});for(var n=r.strict,a=n===void 0?!1:n,l=r.start,u=l===void 0?!0:l,d=r.end,s=d===void 0?!0:d,o=r.encode,i=o===void 0?function(F){return F}:o,f=r.delimiter,c=f===void 0?"/#?":f,h=r.endsWith,m=h===void 0?"":h,p="[".concat(A(m),"]|$"),v="[".concat(A(c),"]"),y=u?"^":"",x=0,T=t;x<T.length;x++){var g=T[x];if(typeof g=="string")y+=A(i(g));else{var P=A(i(g.prefix)),b=A(i(g.suffix));if(g.pattern)if(e&&e.push(g),P||b)if(g.modifier==="+"||g.modifier==="*"){var q=g.modifier==="*"?"?":"";y+="(?:".concat(P,"((?:").concat(g.pattern,")(?:").concat(b).concat(P,"(?:").concat(g.pattern,"))*)").concat(b,")").concat(q)}else y+="(?:".concat(P,"(").concat(g.pattern,")").concat(b,")").concat(g.modifier);else g.modifier==="+"||g.modifier==="*"?y+="((?:".concat(g.pattern,")").concat(g.modifier,")"):y+="(".concat(g.pattern,")").concat(g.modifier);else y+="(?:".concat(P).concat(b,")").concat(g.modifier)}}if(s)a||(y+="".concat(v,"?")),y+=r.endsWith?"(?=".concat(p,")"):"$";else{var k=t[t.length-1],z=typeof k=="string"?v.indexOf(k[k.length-1])>-1:k===void 0;a||(y+="(?:".concat(v,"(?=").concat(p,"))?")),z||(y+="(?=".concat(v,"|").concat(p,")"))}return new RegExp(y,ce(r))}function le(t,e,r){return t instanceof RegExp?He(t,e):Array.isArray(t)?Me(t,e,r):ze(t,e,r)}new TextEncoder;function Ve(){if(typeof navigator<"u"&&navigator.product==="ReactNative")return!0;if(typeof process<"u"){const t=process.type;return t==="renderer"||t==="worker"?!1:!!(process.versions&&process.versions.node)}return!1}var We=Object.defineProperty,Ge=(t,e)=>{for(var r in e)We(t,r,{get:e[r],enumerable:!0})},Je={};Ge(Je,{blue:()=>Qe,gray:()=>Xe,green:()=>Ye,red:()=>Ze,yellow:()=>Ke});function Ke(t){return`\x1B[33m${t}\x1B[0m`}function Qe(t){return`\x1B[34m${t}\x1B[0m`}function Xe(t){return`\x1B[90m${t}\x1B[0m`}function Ze(t){return`\x1B[31m${t}\x1B[0m`}function Ye(t){return`\x1B[32m${t}\x1B[0m`}Ve();function et(t,e=!0){return[e&&t.origin,t.pathname].filter(Boolean).join("")}const tt=/[\?|#].*$/g;function rt(t){return new URL(`/${t}`,"http://localhost").searchParams}function ue(t){return t.endsWith("?")?t:t.replace(tt,"")}function nt(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}function at(t,e){if(nt(t)||t.startsWith("*"))return t;const r=e||typeof document<"u"&&document.baseURI;return r?decodeURI(new URL(encodeURI(t),r).href):t}function st(t,e){if(t instanceof RegExp)return t;const r=at(t,e);return ue(r)}function ot(t){return t.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g,(e,r,n)=>{const a="(.*)";return r?r.startsWith(":")?`${r}${n}`:`${r}${a}`:a}).replace(/([^\/])(:)(?=\d+)/,"$1\\$2").replace(/^([^\/]+)(:)(?=\/\/)/,"$1\\$2")}function it(t,e,r){const n=st(e,r),a=typeof n=="string"?ot(n):n,l=et(t),u=Le(a,{decode:decodeURIComponent})(l),d=u&&u.params||{};return{matches:u!==!1,params:d}}var ct=Object.create,de=Object.defineProperty,lt=Object.getOwnPropertyDescriptor,pe=Object.getOwnPropertyNames,ut=Object.getPrototypeOf,dt=Object.prototype.hasOwnProperty,pt=(t,e)=>function(){return e||(0,t[pe(t)[0]])((e={exports:{}}).exports,e),e.exports},ft=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of pe(e))!dt.call(t,a)&&a!==r&&de(t,a,{get:()=>e[a],enumerable:!(n=lt(e,a))||n.enumerable});return t},ht=(t,e,r)=>(r=t!=null?ct(ut(t)):{},ft(de(r,"default",{value:t,enumerable:!0}),t)),mt=pt({"node_modules/cookie/index.js"(t){t.parse=n,t.serialize=a;var e=Object.prototype.toString,r=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function n(o,i){if(typeof o!="string")throw new TypeError("argument str must be a string");for(var f={},c=i||{},h=c.decode||l,m=0;m<o.length;){var p=o.indexOf("=",m);if(p===-1)break;var v=o.indexOf(";",m);if(v===-1)v=o.length;else if(v<p){m=o.lastIndexOf(";",p-1)+1;continue}var y=o.slice(m,p).trim();if(f[y]===void 0){var x=o.slice(p+1,v).trim();x.charCodeAt(0)===34&&(x=x.slice(1,-1)),f[y]=s(x,h)}m=v+1}return f}function a(o,i,f){var c=f||{},h=c.encode||u;if(typeof h!="function")throw new TypeError("option encode is invalid");if(!r.test(o))throw new TypeError("argument name is invalid");var m=h(i);if(m&&!r.test(m))throw new TypeError("argument val is invalid");var p=o+"="+m;if(c.maxAge!=null){var v=c.maxAge-0;if(isNaN(v)||!isFinite(v))throw new TypeError("option maxAge is invalid");p+="; Max-Age="+Math.floor(v)}if(c.domain){if(!r.test(c.domain))throw new TypeError("option domain is invalid");p+="; Domain="+c.domain}if(c.path){if(!r.test(c.path))throw new TypeError("option path is invalid");p+="; Path="+c.path}if(c.expires){var y=c.expires;if(!d(y)||isNaN(y.valueOf()))throw new TypeError("option expires is invalid");p+="; Expires="+y.toUTCString()}if(c.httpOnly&&(p+="; HttpOnly"),c.secure&&(p+="; Secure"),c.priority){var x=typeof c.priority=="string"?c.priority.toLowerCase():c.priority;switch(x){case"low":p+="; Priority=Low";break;case"medium":p+="; Priority=Medium";break;case"high":p+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(c.sameSite){var T=typeof c.sameSite=="string"?c.sameSite.toLowerCase():c.sameSite;switch(T){case!0:p+="; SameSite=Strict";break;case"lax":p+="; SameSite=Lax";break;case"strict":p+="; SameSite=Strict";break;case"none":p+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return p}function l(o){return o.indexOf("%")!==-1?decodeURIComponent(o):o}function u(o){return encodeURIComponent(o)}function d(o){return e.call(o)==="[object Date]"||o instanceof Date}function s(o,i){try{return i(o)}catch{return o}}}}),vt=ht(mt()),K=vt.default;/*! Bundled license information:
10
+ */const{message:Be}=ie;async function $e(t){const e=t.clone(),r=await e.text(),n=e.status||200,a=e.statusText||Be[n]||"OK";return{status:n,statusText:a,headers:Object.fromEntries(e.headers.entries()),body:r}}function De(t){for(var e=[],r=0;r<t.length;){var n=t[r];if(n==="*"||n==="+"||n==="?"){e.push({type:"MODIFIER",index:r,value:t[r++]});continue}if(n==="\\"){e.push({type:"ESCAPED_CHAR",index:r++,value:t[r++]});continue}if(n==="{"){e.push({type:"OPEN",index:r,value:t[r++]});continue}if(n==="}"){e.push({type:"CLOSE",index:r,value:t[r++]});continue}if(n===":"){for(var a="",l=r+1;l<t.length;){var u=t.charCodeAt(l);if(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||u===95){a+=t[l++];continue}break}if(!a)throw new TypeError("Missing parameter name at ".concat(r));e.push({type:"NAME",index:r,value:a}),r=l;continue}if(n==="("){var p=1,o="",l=r+1;if(t[l]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(l));for(;l<t.length;){if(t[l]==="\\"){o+=t[l++]+t[l++];continue}if(t[l]===")"){if(p--,p===0){l++;break}}else if(t[l]==="("&&(p++,t[l+1]!=="?"))throw new TypeError("Capturing groups are not allowed at ".concat(l));o+=t[l++]}if(p)throw new TypeError("Unbalanced pattern at ".concat(r));if(!o)throw new TypeError("Missing pattern at ".concat(r));e.push({type:"PATTERN",index:r,value:o}),r=l;continue}e.push({type:"CHAR",index:r,value:t[r++]})}return e.push({type:"END",index:r,value:""}),e}function Ie(t,e){e===void 0&&(e={});for(var r=De(t),n=e.prefixes,a=n===void 0?"./":n,l="[^".concat(A(e.delimiter||"/#?"),"]+?"),u=[],p=0,o=0,s="",i=function(b){if(o<r.length&&r[o].type===b)return r[o++].value},f=function(b){var k=i(b);if(k!==void 0)return k;var q=r[o],z=q.type,F=q.index;throw new TypeError("Unexpected ".concat(z," at ").concat(F,", expected ").concat(b))},c=function(){for(var b="",k;k=i("CHAR")||i("ESCAPED_CHAR");)b+=k;return b};o<r.length;){var m=i("CHAR"),h=i("NAME"),d=i("PATTERN");if(h||d){var v=m||"";a.indexOf(v)===-1&&(s+=v,v=""),s&&(u.push(s),s=""),u.push({name:h||p++,prefix:v,suffix:"",pattern:d||l,modifier:i("MODIFIER")||""});continue}var y=m||i("ESCAPED_CHAR");if(y){s+=y;continue}s&&(u.push(s),s="");var x=i("OPEN");if(x){var v=c(),T=i("NAME")||"",g=i("PATTERN")||"",P=c();f("CLOSE"),u.push({name:T||(g?p++:""),pattern:T&&!g?l:g,prefix:v,suffix:P,modifier:i("MODIFIER")||""});continue}f("END")}return u}function Ne(t,e){var r=[],n=le(t,r,e);return je(n,r,e)}function je(t,e,r){r===void 0&&(r={});var n=r.decode,a=n===void 0?function(l){return l}:n;return function(l){var u=t.exec(l);if(!u)return!1;for(var p=u[0],o=u.index,s=Object.create(null),i=function(c){if(u[c]===void 0)return"continue";var m=e[c-1];m.modifier==="*"||m.modifier==="+"?s[m.name]=u[c].split(m.prefix+m.suffix).map(function(h){return a(h,m)}):s[m.name]=a(u[c],m)},f=1;f<u.length;f++)i(f);return{path:p,index:o,params:s}}}function A(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function ce(t){return t&&t.sensitive?"":"i"}function Le(t,e){if(!e)return t;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,a=r.exec(t.source);a;)e.push({name:a[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),a=r.exec(t.source);return t}function Ue(t,e,r){var n=t.map(function(a){return le(a,e,r).source});return new RegExp("(?:".concat(n.join("|"),")"),ce(r))}function He(t,e,r){return Me(Ie(t,r),e,r)}function Me(t,e,r){r===void 0&&(r={});for(var n=r.strict,a=n===void 0?!1:n,l=r.start,u=l===void 0?!0:l,p=r.end,o=p===void 0?!0:p,s=r.encode,i=s===void 0?function(F){return F}:s,f=r.delimiter,c=f===void 0?"/#?":f,m=r.endsWith,h=m===void 0?"":m,d="[".concat(A(h),"]|$"),v="[".concat(A(c),"]"),y=u?"^":"",x=0,T=t;x<T.length;x++){var g=T[x];if(typeof g=="string")y+=A(i(g));else{var P=A(i(g.prefix)),b=A(i(g.suffix));if(g.pattern)if(e&&e.push(g),P||b)if(g.modifier==="+"||g.modifier==="*"){var k=g.modifier==="*"?"?":"";y+="(?:".concat(P,"((?:").concat(g.pattern,")(?:").concat(b).concat(P,"(?:").concat(g.pattern,"))*)").concat(b,")").concat(k)}else y+="(?:".concat(P,"(").concat(g.pattern,")").concat(b,")").concat(g.modifier);else g.modifier==="+"||g.modifier==="*"?y+="((?:".concat(g.pattern,")").concat(g.modifier,")"):y+="(".concat(g.pattern,")").concat(g.modifier);else y+="(?:".concat(P).concat(b,")").concat(g.modifier)}}if(o)a||(y+="".concat(v,"?")),y+=r.endsWith?"(?=".concat(d,")"):"$";else{var q=t[t.length-1],z=typeof q=="string"?v.indexOf(q[q.length-1])>-1:q===void 0;a||(y+="(?:".concat(v,"(?=").concat(d,"))?")),z||(y+="(?=".concat(v,"|").concat(d,")"))}return new RegExp(y,ce(r))}function le(t,e,r){return t instanceof RegExp?Le(t,e):Array.isArray(t)?Ue(t,e,r):He(t,e,r)}new TextEncoder;function ze(){if(typeof navigator<"u"&&navigator.product==="ReactNative")return!0;if(typeof process<"u"){const t=process.type;return t==="renderer"||t==="worker"?!1:!!(process.versions&&process.versions.node)}return!1}var Fe=Object.defineProperty,Ve=(t,e)=>{for(var r in e)Fe(t,r,{get:e[r],enumerable:!0})},We={};Ve(We,{blue:()=>Je,gray:()=>Ke,green:()=>Xe,red:()=>Qe,yellow:()=>Ge});function Ge(t){return`\x1B[33m${t}\x1B[0m`}function Je(t){return`\x1B[34m${t}\x1B[0m`}function Ke(t){return`\x1B[90m${t}\x1B[0m`}function Qe(t){return`\x1B[31m${t}\x1B[0m`}function Xe(t){return`\x1B[32m${t}\x1B[0m`}ze();function Ze(t,e=!0){return[e&&t.origin,t.pathname].filter(Boolean).join("")}const Ye=/[\?|#].*$/g;function et(t){return new URL(`/${t}`,"http://localhost").searchParams}function ue(t){return t.endsWith("?")?t:t.replace(Ye,"")}function tt(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}function rt(t,e){if(tt(t)||t.startsWith("*"))return t;const r=e||typeof document<"u"&&document.baseURI;return r?decodeURI(new URL(encodeURI(t),r).href):t}function nt(t,e){if(t instanceof RegExp)return t;const r=rt(t,e);return ue(r)}function at(t){return t.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g,(e,r,n)=>{const a="(.*)";return r?r.startsWith(":")?`${r}${n}`:`${r}${a}`:a}).replace(/([^\/])(:)(?=\d+)/,"$1\\$2").replace(/^([^\/]+)(:)(?=\/\/)/,"$1\\$2")}function ot(t,e,r){const n=nt(e,r),a=typeof n=="string"?at(n):n,l=Ze(t),u=Ne(a,{decode:decodeURIComponent})(l),p=u&&u.params||{};return{matches:u!==!1,params:p}}var st=Object.create,de=Object.defineProperty,it=Object.getOwnPropertyDescriptor,pe=Object.getOwnPropertyNames,ct=Object.getPrototypeOf,lt=Object.prototype.hasOwnProperty,ut=(t,e)=>function(){return e||(0,t[pe(t)[0]])((e={exports:{}}).exports,e),e.exports},dt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of pe(e))!lt.call(t,a)&&a!==r&&de(t,a,{get:()=>e[a],enumerable:!(n=it(e,a))||n.enumerable});return t},pt=(t,e,r)=>(r=t!=null?st(ct(t)):{},dt(de(r,"default",{value:t,enumerable:!0}),t)),ft=ut({"node_modules/cookie/index.js"(t){t.parse=n,t.serialize=a;var e=Object.prototype.toString,r=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function n(s,i){if(typeof s!="string")throw new TypeError("argument str must be a string");for(var f={},c=i||{},m=c.decode||l,h=0;h<s.length;){var d=s.indexOf("=",h);if(d===-1)break;var v=s.indexOf(";",h);if(v===-1)v=s.length;else if(v<d){h=s.lastIndexOf(";",d-1)+1;continue}var y=s.slice(h,d).trim();if(f[y]===void 0){var x=s.slice(d+1,v).trim();x.charCodeAt(0)===34&&(x=x.slice(1,-1)),f[y]=o(x,m)}h=v+1}return f}function a(s,i,f){var c=f||{},m=c.encode||u;if(typeof m!="function")throw new TypeError("option encode is invalid");if(!r.test(s))throw new TypeError("argument name is invalid");var h=m(i);if(h&&!r.test(h))throw new TypeError("argument val is invalid");var d=s+"="+h;if(c.maxAge!=null){var v=c.maxAge-0;if(isNaN(v)||!isFinite(v))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(v)}if(c.domain){if(!r.test(c.domain))throw new TypeError("option domain is invalid");d+="; Domain="+c.domain}if(c.path){if(!r.test(c.path))throw new TypeError("option path is invalid");d+="; Path="+c.path}if(c.expires){var y=c.expires;if(!p(y)||isNaN(y.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+y.toUTCString()}if(c.httpOnly&&(d+="; HttpOnly"),c.secure&&(d+="; Secure"),c.priority){var x=typeof c.priority=="string"?c.priority.toLowerCase():c.priority;switch(x){case"low":d+="; Priority=Low";break;case"medium":d+="; Priority=Medium";break;case"high":d+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(c.sameSite){var T=typeof c.sameSite=="string"?c.sameSite.toLowerCase():c.sameSite;switch(T){case!0:d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"strict":d+="; SameSite=Strict";break;case"none":d+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return d}function l(s){return s.indexOf("%")!==-1?decodeURIComponent(s):s}function u(s){return encodeURIComponent(s)}function p(s){return e.call(s)==="[object Date]"||s instanceof Date}function o(s,i){try{return i(s)}catch{return s}}}}),mt=pt(ft()),K=mt.default;/*! Bundled license information:
11
11
 
12
12
  cookie/index.js:
13
13
  (*!
@@ -16,8 +16,8 @@ cookie/index.js:
16
16
  * Copyright(c) 2015 Douglas Christopher Wilson
17
17
  * MIT Licensed
18
18
  *)
19
- */function X(){return K.parse(document.cookie)}function yt(t){if(typeof document>"u"||typeof location>"u")return{};switch(t.credentials){case"same-origin":{const e=new URL(t.url);return location.origin===e.origin?X():{}}case"include":return X();default:return{}}}function gt(t){const e=t.headers.get("cookie"),r=e?K.parse(e):{};Q.hydrate();const n=Array.from(Q.get(t)?.entries()).reduce((u,[d,{value:s}])=>Object.assign(u,{[d.trim()]:s}),{}),l={...yt(t),...n};for(const[u,d]of Object.entries(l))t.headers.append("cookie",K.serialize(u,d));return{...l,...r}}var _=(t=>(t.HEAD="HEAD",t.GET="GET",t.POST="POST",t.PUT="PUT",t.PATCH="PATCH",t.OPTIONS="OPTIONS",t.DELETE="DELETE",t))(_||{});class wt extends ye{constructor(e,r,n,a){super({info:{header:`${e} ${r}`,path:r,method:e},resolver:n,options:a}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:e,path:r}=this.info;if(r instanceof RegExp||ue(r)===r)return;rt(r).forEach((l,u)=>{}),J.warn(`Found a redundant usage of query parameters in the request handler URL for "${e} ${r}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/recipes/query-parameters`)}async parse(e){const r=new URL(e.request.url),n=it(r,this.info.path,e.resolutionContext?.baseUrl),a=gt(e.request);return{match:n,cookies:a}}predicate(e){const r=this.matchMethod(e.request.method),n=e.parsedResult.match.matches;return r&&n}matchMethod(e){return this.info.method instanceof RegExp?this.info.method.test(e):Te(this.info.method,e)}extendResolverArgs(e){return{params:e.parsedResult.match?.params||{},cookies:e.parsedResult.cookies}}async log(e){const r=ge(e.request.url),n=await _e(e.request),a=await Ie(e.response),l=Ee(a.status);console.groupCollapsed(J.formatMessage(`${Ce()} ${e.request.method} ${r} (%c${a.status} ${a.statusText}%c)`),`color:${l}`,"color:inherit"),console.log("Request",n),console.log("Handler:",this),console.log("Response",a),console.groupEnd()}}function C(t){return(e,r,n={})=>new wt(t,e,r,n)}const M={all:C(/.+/),head:C(_.HEAD),get:C(_.GET),post:C(_.POST),put:C(_.PUT),delete:C(_.DELETE),patch:C(_.PATCH),options:C(_.OPTIONS)};var xt=Object.create,fe=Object.defineProperty,bt=Object.getOwnPropertyDescriptor,he=Object.getOwnPropertyNames,Tt=Object.getPrototypeOf,Et=Object.prototype.hasOwnProperty,Ct=(t,e)=>function(){return e||(0,t[he(t)[0]])((e={exports:{}}).exports,e),e.exports},_t=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of he(e))!Et.call(t,a)&&a!==r&&fe(t,a,{get:()=>e[a],enumerable:!(n=bt(e,a))||n.enumerable});return t},Pt=(t,e,r)=>(r=t!=null?xt(Tt(t)):{},_t(!t||!t.__esModule?fe(r,"default",{value:t,enumerable:!0}):r,t)),qt=Ct({"node_modules/set-cookie-parser/lib/set-cookie.js"(t,e){var r={decodeValues:!0,map:!1,silent:!1};function n(s){return typeof s=="string"&&!!s.trim()}function a(s,o){var i=s.split(";").filter(n),f=i.shift(),c=l(f),h=c.name,m=c.value;o=o?Object.assign({},r,o):r;try{m=o.decodeValues?decodeURIComponent(m):m}catch(v){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+m+"'. Set options.decodeValues to false to disable this feature.",v)}var p={name:h,value:m};return i.forEach(function(v){var y=v.split("="),x=y.shift().trimLeft().toLowerCase(),T=y.join("=");x==="expires"?p.expires=new Date(T):x==="max-age"?p.maxAge=parseInt(T,10):x==="secure"?p.secure=!0:x==="httponly"?p.httpOnly=!0:x==="samesite"?p.sameSite=T:p[x]=T}),p}function l(s){var o="",i="",f=s.split("=");return f.length>1?(o=f.shift(),i=f.join("=")):i=s,{name:o,value:i}}function u(s,o){if(o=o?Object.assign({},r,o):r,!s)return o.map?{}:[];if(s.headers)if(typeof s.headers.getSetCookie=="function")s=s.headers.getSetCookie();else if(s.headers["set-cookie"])s=s.headers["set-cookie"];else{var i=s.headers[Object.keys(s.headers).find(function(c){return c.toLowerCase()==="set-cookie"})];!i&&s.headers.cookie&&!o.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),s=i}if(Array.isArray(s)||(s=[s]),o=o?Object.assign({},r,o):r,o.map){var f={};return s.filter(n).reduce(function(c,h){var m=a(h,o);return c[m.name]=m,c},f)}else return s.filter(n).map(function(c){return a(c,o)})}function d(s){if(Array.isArray(s))return s;if(typeof s!="string")return[];var o=[],i=0,f,c,h,m,p;function v(){for(;i<s.length&&/\s/.test(s.charAt(i));)i+=1;return i<s.length}function y(){return c=s.charAt(i),c!=="="&&c!==";"&&c!==","}for(;i<s.length;){for(f=i,p=!1;v();)if(c=s.charAt(i),c===","){for(h=i,i+=1,v(),m=i;i<s.length&&y();)i+=1;i<s.length&&s.charAt(i)==="="?(p=!0,i=m,o.push(s.substring(f,h)),f=i):i=h+1}else i+=1;(!p||i>=s.length)&&o.push(s.substring(f,s.length))}return o}e.exports=u,e.exports.parse=u,e.exports.parseString=a,e.exports.splitCookiesString=d}}),kt=Pt(qt()),Rt=/[^a-z0-9\-#$%&'*+.^_`|~]/i;function B(t){if(Rt.test(t)||t.trim()==="")throw new TypeError("Invalid character in header field name");return t.trim().toLowerCase()}var Z=[`
20
- `,"\r"," "," "],Ot=new RegExp(`(^[${Z.join("")}]|$[${Z.join("")}])`,"g");function V(t){return t.replace(Ot,"")}function $(t){if(typeof t!="string"||t.length===0)return!1;for(let e=0;e<t.length;e++){const r=t.charCodeAt(e);if(r>127||!At(r))return!1}return!0}function At(t){return![127,32,"(",")","<",">","@",",",";",":","\\",'"',"/","[","]","?","=","{","}"].includes(t)}function Y(t){if(typeof t!="string"||t.trim()!==t)return!1;for(let e=0;e<t.length;e++){const r=t.charCodeAt(e);if(r===0||r===10||r===13)return!1}return!0}var R=Symbol("normalizedHeaders"),W=Symbol("rawHeaderNames"),ee=", ",te,re,ne,St=class me{constructor(e){this[te]={},this[re]=new Map,this[ne]="Headers",["Headers","HeadersPolyfill"].includes(e?.constructor.name)||e instanceof me||typeof globalThis.Headers<"u"&&e instanceof globalThis.Headers?e.forEach((n,a)=>{this.append(a,n)},this):Array.isArray(e)?e.forEach(([r,n])=>{this.append(r,Array.isArray(n)?n.join(ee):n)}):e&&Object.getOwnPropertyNames(e).forEach(r=>{const n=e[r];this.append(r,Array.isArray(n)?n.join(ee):n)})}[(te=R,re=W,ne=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(const[e]of this.entries())yield e}*values(){for(const[,e]of this.entries())yield e}*entries(){let e=Object.keys(this[R]).sort((r,n)=>r.localeCompare(n));for(const r of e)if(r==="set-cookie")for(const n of this.getSetCookie())yield[r,n];else yield[r,this.get(r)]}has(e){if(!$(e))throw new TypeError(`Invalid header name "${e}"`);return this[R].hasOwnProperty(B(e))}get(e){if(!$(e))throw TypeError(`Invalid header name "${e}"`);return this[R][B(e)]??null}set(e,r){if(!$(e)||!Y(r))return;const n=B(e),a=V(r);this[R][n]=V(a),this[W].set(n,e)}append(e,r){if(!$(e)||!Y(r))return;const n=B(e),a=V(r);let l=this.has(n)?`${this.get(n)}, ${a}`:a;this.set(e,l)}delete(e){if(!$(e)||!this.has(e))return;const r=B(e);delete this[R][r],this[W].delete(r)}forEach(e,r){for(const[n,a]of this.entries())e.call(r,a,n,this)}getSetCookie(){const e=this.get("set-cookie");return e===null?[]:e===""?[""]:(0,kt.splitCookiesString)(e)}};const{message:Bt}=ie;function O(t={}){const e=t?.status||200,r=t?.statusText||Bt[e]||"",n=new Headers(t?.headers);return{...t,headers:n,status:e,statusText:r}}function $t(t,e){if(e.type&&Object.defineProperty(t,"type",{value:e.type,enumerable:!0,writable:!1}),typeof document<"u"){const r=St.prototype.getSetCookie.call(e.headers);for(const n of r)document.cookie=n}return t}class E extends Response{constructor(e,r){const n=O(r);super(e,n),$t(this,n)}static text(e,r){const n=O(r);return n.headers.has("Content-Type")||n.headers.set("Content-Type","text/plain"),n.headers.has("Content-Length")||n.headers.set("Content-Length",e?new Blob([e]).size.toString():"0"),new E(e,n)}static json(e,r){const n=O(r);n.headers.has("Content-Type")||n.headers.set("Content-Type","application/json");const a=JSON.stringify(e);return n.headers.has("Content-Length")||n.headers.set("Content-Length",a?new Blob([a]).size.toString():"0"),new E(a,n)}static xml(e,r){const n=O(r);return n.headers.has("Content-Type")||n.headers.set("Content-Type","text/xml"),new E(e,n)}static arrayBuffer(e,r){const n=O(r);return e&&n.headers.set("Content-Length",e.byteLength.toString()),new E(e,n)}static formData(e,r){return new E(e,O(r))}}async function Dt(t){let e;return e=t,new Promise(r=>setTimeout(r,e))}be();const G={count:1279,next:"https://pokeapi.co/api/v2/pokemon?offset=6&limit=6",previous:null,results:[{name:"bulbasaur",url:"https://pokeapi.co/api/v2/pokemon/1/"},{name:"ivysaur",url:"https://pokeapi.co/api/v2/pokemon/2/"},{name:"venusaur",url:"https://pokeapi.co/api/v2/pokemon/3/"},{name:"charmander",url:"https://pokeapi.co/api/v2/pokemon/4/"},{name:"charmeleon",url:"https://pokeapi.co/api/v2/pokemon/5/"},{name:"charizard",url:"https://pokeapi.co/api/v2/pokemon/6/"}]},H=[M.get("/pokemon",({request:t})=>{const r=new URL(t.url).searchParams.get("limit"),n=structuredClone(G);return r&&(n.results=n.results.slice(0,Number(r))),E.json(n)}),M.get("/noreturn",async()=>(await Dt(500),E.json(G))),M.get("/reflect",({request:t})=>{const e={};return[...t.headers.entries()].map(([r,n])=>e[r]="reflected-"+n),e["x-added"]="abc",E.json(G,{headers:e})}),M.get("/404",()=>new E(null,{status:404,statusText:"not found"}))],It={title:"",slice:"page",url:"/pokemon?limit=6"};function S(t){return new Promise(e=>setTimeout(e,t))}function jt({title:t,slice:e,url:r}){return`
19
+ */function X(){return K.parse(document.cookie)}function ht(t){if(typeof document>"u"||typeof location>"u")return{};switch(t.credentials){case"same-origin":{const e=new URL(t.url);return location.origin===e.origin?X():{}}case"include":return X();default:return{}}}function vt(t){const e=t.headers.get("cookie"),r=e?K.parse(e):{};Q.hydrate();const n=Array.from(Q.get(t)?.entries()).reduce((u,[p,{value:o}])=>Object.assign(u,{[p.trim()]:o}),{}),l={...ht(t),...n};for(const[u,p]of Object.entries(l))t.headers.append("cookie",K.serialize(u,p));return{...l,...r}}var _=(t=>(t.HEAD="HEAD",t.GET="GET",t.POST="POST",t.PUT="PUT",t.PATCH="PATCH",t.OPTIONS="OPTIONS",t.DELETE="DELETE",t))(_||{});class yt extends ye{constructor(e,r,n,a){super({info:{header:`${e} ${r}`,path:r,method:e},resolver:n,options:a}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:e,path:r}=this.info;if(r instanceof RegExp||ue(r)===r)return;et(r).forEach((l,u)=>{}),J.warn(`Found a redundant usage of query parameters in the request handler URL for "${e} ${r}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/recipes/query-parameters`)}async parse(e){const r=new URL(e.request.url),n=ot(r,this.info.path,e.resolutionContext?.baseUrl),a=vt(e.request);return{match:n,cookies:a}}predicate(e){const r=this.matchMethod(e.request.method),n=e.parsedResult.match.matches;return r&&n}matchMethod(e){return this.info.method instanceof RegExp?this.info.method.test(e):xe(this.info.method,e)}extendResolverArgs(e){return{params:e.parsedResult.match?.params||{},cookies:e.parsedResult.cookies}}async log(e){const r=ge(e.request.url),n=await Ee(e.request),a=await $e(e.response),l=be(a.status);console.groupCollapsed(J.formatMessage(`${Te()} ${e.request.method} ${r} (%c${a.status} ${a.statusText}%c)`),`color:${l}`,"color:inherit"),console.log("Request",n),console.log("Handler:",this),console.log("Response",a),console.groupEnd()}}function C(t){return(e,r,n={})=>new yt(t,e,r,n)}const M={all:C(/.+/),head:C(_.HEAD),get:C(_.GET),post:C(_.POST),put:C(_.PUT),delete:C(_.DELETE),patch:C(_.PATCH),options:C(_.OPTIONS)};var gt=Object.create,fe=Object.defineProperty,wt=Object.getOwnPropertyDescriptor,me=Object.getOwnPropertyNames,xt=Object.getPrototypeOf,bt=Object.prototype.hasOwnProperty,Tt=(t,e)=>function(){return e||(0,t[me(t)[0]])((e={exports:{}}).exports,e),e.exports},Et=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of me(e))!bt.call(t,a)&&a!==r&&fe(t,a,{get:()=>e[a],enumerable:!(n=wt(e,a))||n.enumerable});return t},Ct=(t,e,r)=>(r=t!=null?gt(xt(t)):{},Et(!t||!t.__esModule?fe(r,"default",{value:t,enumerable:!0}):r,t)),_t=Tt({"node_modules/set-cookie-parser/lib/set-cookie.js"(t,e){var r={decodeValues:!0,map:!1,silent:!1};function n(o){return typeof o=="string"&&!!o.trim()}function a(o,s){var i=o.split(";").filter(n),f=i.shift(),c=l(f),m=c.name,h=c.value;s=s?Object.assign({},r,s):r;try{h=s.decodeValues?decodeURIComponent(h):h}catch(v){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+h+"'. Set options.decodeValues to false to disable this feature.",v)}var d={name:m,value:h};return i.forEach(function(v){var y=v.split("="),x=y.shift().trimLeft().toLowerCase(),T=y.join("=");x==="expires"?d.expires=new Date(T):x==="max-age"?d.maxAge=parseInt(T,10):x==="secure"?d.secure=!0:x==="httponly"?d.httpOnly=!0:x==="samesite"?d.sameSite=T:d[x]=T}),d}function l(o){var s="",i="",f=o.split("=");return f.length>1?(s=f.shift(),i=f.join("=")):i=o,{name:s,value:i}}function u(o,s){if(s=s?Object.assign({},r,s):r,!o)return s.map?{}:[];if(o.headers)if(typeof o.headers.getSetCookie=="function")o=o.headers.getSetCookie();else if(o.headers["set-cookie"])o=o.headers["set-cookie"];else{var i=o.headers[Object.keys(o.headers).find(function(c){return c.toLowerCase()==="set-cookie"})];!i&&o.headers.cookie&&!s.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),o=i}if(Array.isArray(o)||(o=[o]),s=s?Object.assign({},r,s):r,s.map){var f={};return o.filter(n).reduce(function(c,m){var h=a(m,s);return c[h.name]=h,c},f)}else return o.filter(n).map(function(c){return a(c,s)})}function p(o){if(Array.isArray(o))return o;if(typeof o!="string")return[];var s=[],i=0,f,c,m,h,d;function v(){for(;i<o.length&&/\s/.test(o.charAt(i));)i+=1;return i<o.length}function y(){return c=o.charAt(i),c!=="="&&c!==";"&&c!==","}for(;i<o.length;){for(f=i,d=!1;v();)if(c=o.charAt(i),c===","){for(m=i,i+=1,v(),h=i;i<o.length&&y();)i+=1;i<o.length&&o.charAt(i)==="="?(d=!0,i=h,s.push(o.substring(f,m)),f=i):i=m+1}else i+=1;(!d||i>=o.length)&&s.push(o.substring(f,o.length))}return s}e.exports=u,e.exports.parse=u,e.exports.parseString=a,e.exports.splitCookiesString=p}}),Pt=Ct(_t()),kt=/[^a-z0-9\-#$%&'*+.^_`|~]/i;function B(t){if(kt.test(t)||t.trim()==="")throw new TypeError("Invalid character in header field name");return t.trim().toLowerCase()}var Z=[`
20
+ `,"\r"," "," "],qt=new RegExp(`(^[${Z.join("")}]|$[${Z.join("")}])`,"g");function V(t){return t.replace(qt,"")}function $(t){if(typeof t!="string"||t.length===0)return!1;for(let e=0;e<t.length;e++){const r=t.charCodeAt(e);if(r>127||!Rt(r))return!1}return!0}function Rt(t){return![127,32,"(",")","<",">","@",",",";",":","\\",'"',"/","[","]","?","=","{","}"].includes(t)}function Y(t){if(typeof t!="string"||t.trim()!==t)return!1;for(let e=0;e<t.length;e++){const r=t.charCodeAt(e);if(r===0||r===10||r===13)return!1}return!0}var R=Symbol("normalizedHeaders"),W=Symbol("rawHeaderNames"),ee=", ",te,re,ne,Ot=class he{constructor(e){this[te]={},this[re]=new Map,this[ne]="Headers",["Headers","HeadersPolyfill"].includes(e?.constructor.name)||e instanceof he||typeof globalThis.Headers<"u"&&e instanceof globalThis.Headers?e.forEach((n,a)=>{this.append(a,n)},this):Array.isArray(e)?e.forEach(([r,n])=>{this.append(r,Array.isArray(n)?n.join(ee):n)}):e&&Object.getOwnPropertyNames(e).forEach(r=>{const n=e[r];this.append(r,Array.isArray(n)?n.join(ee):n)})}[(te=R,re=W,ne=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(const[e]of this.entries())yield e}*values(){for(const[,e]of this.entries())yield e}*entries(){let e=Object.keys(this[R]).sort((r,n)=>r.localeCompare(n));for(const r of e)if(r==="set-cookie")for(const n of this.getSetCookie())yield[r,n];else yield[r,this.get(r)]}has(e){if(!$(e))throw new TypeError(`Invalid header name "${e}"`);return this[R].hasOwnProperty(B(e))}get(e){if(!$(e))throw TypeError(`Invalid header name "${e}"`);return this[R][B(e)]??null}set(e,r){if(!$(e)||!Y(r))return;const n=B(e),a=V(r);this[R][n]=V(a),this[W].set(n,e)}append(e,r){if(!$(e)||!Y(r))return;const n=B(e),a=V(r);let l=this.has(n)?`${this.get(n)}, ${a}`:a;this.set(e,l)}delete(e){if(!$(e)||!this.has(e))return;const r=B(e);delete this[R][r],this[W].delete(r)}forEach(e,r){for(const[n,a]of this.entries())e.call(r,a,n,this)}getSetCookie(){const e=this.get("set-cookie");return e===null?[]:e===""?[""]:(0,Pt.splitCookiesString)(e)}};const{message:At}=ie;function O(t={}){const e=t?.status||200,r=t?.statusText||At[e]||"",n=new Headers(t?.headers);return{...t,headers:n,status:e,statusText:r}}function St(t,e){if(e.type&&Object.defineProperty(t,"type",{value:e.type,enumerable:!0,writable:!1}),typeof document<"u"){const r=Ot.prototype.getSetCookie.call(e.headers);for(const n of r)document.cookie=n}return t}class E extends Response{constructor(e,r){const n=O(r);super(e,n),St(this,n)}static text(e,r){const n=O(r);return n.headers.has("Content-Type")||n.headers.set("Content-Type","text/plain"),n.headers.has("Content-Length")||n.headers.set("Content-Length",e?new Blob([e]).size.toString():"0"),new E(e,n)}static json(e,r){const n=O(r);n.headers.has("Content-Type")||n.headers.set("Content-Type","application/json");const a=JSON.stringify(e);return n.headers.has("Content-Length")||n.headers.set("Content-Length",a?new Blob([a]).size.toString():"0"),new E(a,n)}static xml(e,r){const n=O(r);return n.headers.has("Content-Type")||n.headers.set("Content-Type","text/xml"),new E(e,n)}static arrayBuffer(e,r){const n=O(r);return e&&n.headers.set("Content-Length",e.byteLength.toString()),new E(e,n)}static formData(e,r){return new E(e,O(r))}}async function Bt(t){let e;return e=t,new Promise(r=>setTimeout(r,e))}we();const G={count:1279,next:"https://pokeapi.co/api/v2/pokemon?offset=6&limit=6",previous:null,results:[{name:"bulbasaur",url:"https://pokeapi.co/api/v2/pokemon/1/"},{name:"ivysaur",url:"https://pokeapi.co/api/v2/pokemon/2/"},{name:"venusaur",url:"https://pokeapi.co/api/v2/pokemon/3/"},{name:"charmander",url:"https://pokeapi.co/api/v2/pokemon/4/"},{name:"charmeleon",url:"https://pokeapi.co/api/v2/pokemon/5/"},{name:"charizard",url:"https://pokeapi.co/api/v2/pokemon/6/"}]},H=[M.get("/pokemon",({request:t})=>{const r=new URL(t.url).searchParams.get("limit"),n=structuredClone(G);return r&&(n.results=n.results.slice(0,Number(r))),E.json(n)}),M.get("/noreturn",async()=>(await Bt(500),E.json(G))),M.get("/reflect",({request:t})=>{const e={};return[...t.headers.entries()].map(([r,n])=>e[r]="reflected-"+n),e["x-added"]="abc",E.json(G,{headers:e})}),M.get("/404",()=>new E(null,{status:404,statusText:"not found"}))],$t={title:"",slice:"page",url:"/pokemon?limit=6"};function S(t){return new Promise(e=>setTimeout(e,t))}function Dt({title:t,slice:e,url:r}){return`
21
21
  <fieldset>
22
22
  <legend>${t}</legend>
23
23
  <custom-element>
@@ -61,7 +61,7 @@ cookie/index.js:
61
61
  </template>
62
62
  </custom-element>
63
63
  </fieldset>
64
- `}const Nt={title:"http-request",render:t=>jt(t),renderPlay:async function(e){document.body.innerHTML=(e.render?e:Nt).render({...It,...e.args}),await new Promise(r=>setTimeout(async()=>{await e.play({canvasElement:document.body.firstElementChild}),r(0)},0))}},D={args:{title:"url and slice",url:"/pokemon?limit=4"},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(D.args.title),w(await e.findByText("bulbasaur")).toBeInTheDocument(),w(await e.findByText("Pokemon Count: 4")).toBeInTheDocument(t)},parameters:{msw:H}},I={args:{title:"url change",url:""},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(I.args.title);const r=l=>e.getByText(l),n=t.querySelector("http-request"),a=()=>n.getAttribute("url");w(r("Pokemon Count: 0")).toBeInTheDocument(),w(a()).toEqual(""),r("/pokemon").click(),await S(100),w(a()).toEqual("/pokemon"),w(r("Pokemon Count: 6")).toBeInTheDocument(),r("/pokemon?limit=6").click(),await S(100),w(a()).toEqual("/pokemon?limit=6"),w(r("Pokemon Count: 6")).toBeInTheDocument(),r("/pokemon?limit=3").click(),await S(100),w(a()).toEqual("/pokemon?limit=3"),w(r("Pokemon Count: 3")).toBeInTheDocument(),r("set blank").click(),await S(100),w(a()).toEqual(""),w(r("Pokemon Count: 0")).toBeInTheDocument()},parameters:{msw:H}},j={args:{title:"http-request with error",url:"/404"},play:async({canvasElement:t})=>{const e=U(t),r=async n=>(await e.findByTestId(n)).textContent;await e.findByText(j.args.title),await S(200),w(await r("attr-status")).to.include("404")},parameters:{msw:H}},N={args:{title:"http-request with delayed .5 seconds response",url:"/noreturn"},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(N.args.title),w(await e.findByText("request")).toBeInTheDocument(),w(e.queryByText("response")).toBe(null),w(await e.findByText("response")).toBeInTheDocument(),w(await e.findByText("bulbasaur")).toBeInTheDocument(),w(await e.findByText("Pokemon Count: 6")).toBeInTheDocument()},parameters:{msw:H}},L={args:{title:"http-request headers and response status and headers",url:"/reflect"},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(L.args.title),await S(200);const r=await e.findByTestId("section-request-attr-x-test");w(r).toBeInTheDocument(),w(r.textContent.trim()).toEqual("testing");const n=await e.findByTestId("section-response-attr-x-test");w(n).toBeInTheDocument(),w(n.textContent.trim()).toEqual("reflected-testing");const a=await e.findByTestId("section-response-attr-x-added");w(a).toBeInTheDocument(),w(a.textContent.trim()).toEqual("abc")},parameters:{msw:H},render:({url:t,title:e})=>`
64
+ `}const It={title:"http-request",render:t=>Dt(t),renderPlay:async function(e){document.body.innerHTML=(e.render?e:It).render({...$t,...e.args}),await new Promise(r=>setTimeout(async()=>{await e.play({canvasElement:document.body.firstElementChild}),r(0)},0))}},D={args:{title:"url and slice",url:"/pokemon?limit=4"},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(D.args.title),w(await e.findByText("bulbasaur")).toBeInTheDocument(),w(await e.findByText("Pokemon Count: 4")).toBeInTheDocument(t)},parameters:{msw:H}},I={args:{title:"url change",url:""},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(I.args.title);const r=l=>e.getByText(l),n=t.querySelector("http-request"),a=()=>n.getAttribute("url");w(r("Pokemon Count: 0")).toBeInTheDocument(),w(a()).toEqual(""),r("/pokemon").click(),await S(100),w(a()).toEqual("/pokemon"),w(r("Pokemon Count: 6")).toBeInTheDocument(),r("/pokemon?limit=6").click(),await S(100),w(a()).toEqual("/pokemon?limit=6"),w(r("Pokemon Count: 6")).toBeInTheDocument(),r("/pokemon?limit=3").click(),await S(100),w(a()).toEqual("/pokemon?limit=3"),w(r("Pokemon Count: 3")).toBeInTheDocument(),r("set blank").click(),await S(100),w(a()).toEqual(""),w(r("Pokemon Count: 0")).toBeInTheDocument()},parameters:{msw:H}},N={args:{title:"http-request with error",url:"/404"},play:async({canvasElement:t})=>{const e=U(t),r=async n=>(await e.findByTestId(n)).textContent;await e.findByText(N.args.title),await S(200),w(await r("attr-status")).to.include("404")},parameters:{msw:H}},j={args:{title:"http-request with delayed .5 seconds response",url:"/noreturn"},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(j.args.title),w(await e.findByText("request")).toBeInTheDocument(),w(e.queryByText("response")).toBe(null),w(await e.findByText("response")).toBeInTheDocument(),w(await e.findByText("bulbasaur")).toBeInTheDocument(),w(await e.findByText("Pokemon Count: 6")).toBeInTheDocument()},parameters:{msw:H}},L={args:{title:"http-request headers and response status and headers",url:"/reflect"},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(L.args.title),await S(200);const r=await e.findByTestId("section-request-attr-x-test");w(r).toBeInTheDocument(),w(r.textContent.trim()).toEqual("testing");const n=await e.findByTestId("section-response-attr-x-test");w(n).toBeInTheDocument(),w(n.textContent.trim()).toEqual("reflected-testing");const a=await e.findByTestId("section-response-attr-x-added");w(a).toBeInTheDocument(),w(a.textContent.trim()).toEqual("abc")},parameters:{msw:H},render:({url:t,title:e})=>`
65
65
  <fieldset>
66
66
  <legend>${e}</legend>
67
67
  <p> <b>request</b> headers are populated into dedicated <b>slice/request/headers</b></p>
@@ -170,7 +170,7 @@ from <code>${t}</code>
170
170
  parameters: {
171
171
  msw: handlers
172
172
  }
173
- }`,...I.parameters?.docs?.source}}};j.parameters={...j.parameters,docs:{...j.parameters?.docs,source:{originalSource:`{
173
+ }`,...I.parameters?.docs?.source}}};N.parameters={...N.parameters,docs:{...N.parameters?.docs,source:{originalSource:`{
174
174
  args: {
175
175
  title: 'http-request with error',
176
176
  url: '/404'
@@ -187,7 +187,7 @@ from <code>${t}</code>
187
187
  parameters: {
188
188
  msw: handlers
189
189
  }
190
- }`,...j.parameters?.docs?.source}}};N.parameters={...N.parameters,docs:{...N.parameters?.docs,source:{originalSource:`{
190
+ }`,...N.parameters?.docs?.source}}};j.parameters={...j.parameters,docs:{...j.parameters?.docs,source:{originalSource:`{
191
191
  args: {
192
192
  title: 'http-request with delayed .5 seconds response',
193
193
  url: '/noreturn'
@@ -208,7 +208,7 @@ from <code>${t}</code>
208
208
  parameters: {
209
209
  msw: handlers
210
210
  }
211
- }`,...N.parameters?.docs?.source}}};L.parameters={...L.parameters,docs:{...L.parameters?.docs,source:{originalSource:`{
211
+ }`,...j.parameters?.docs?.source}}};L.parameters={...L.parameters,docs:{...L.parameters?.docs,source:{originalSource:`{
212
212
  args: {
213
213
  title: 'http-request headers and response status and headers',
214
214
  url: '/reflect'
@@ -297,4 +297,4 @@ from <code>\${url}</code>
297
297
  <headers-demo></headers-demo>
298
298
  </fieldset>
299
299
  \`
300
- }`,...L.parameters?.docs?.source}}};const Mt=["Demo","UrlChange","Http404","LifecycleInitialized","RequestResponseHeaders"];export{D as Demo,j as Http404,N as LifecycleInitialized,L as RequestResponseHeaders,I as UrlChange,Mt as __namedExportsOrder,Nt as default};
300
+ }`,...L.parameters?.docs?.source}}};const Ht=["Demo","UrlChange","Http404","LifecycleInitialized","RequestResponseHeaders"];export{D as Demo,N as Http404,j as LifecycleInitialized,L as RequestResponseHeaders,I as UrlChange,Ht as __namedExportsOrder,It as default};
@@ -0,0 +1,2 @@
1
+ const __vite__fileDeps=["./Configure-D0qG3gR9.js","./index-DsWii_Ep.js","./index-Cc7K62zD.js","./index-DXimoRZY.js","./index-DrFu-skq.js","./index-CKw1EbdP.js","./attributes.test.stories-W34tZdUt.js","./custom-element-DpIq8E2p.js","./index-CVRyq5ci.js","./css.test.stories-BZFYx1TQ.js","./dom-merge.test.stories-S-7U5N3h.js","./external-template.test.stories-QIO3lAFz.js","./form.test.stories-ClYhj9F1.js","./http-request.stories-DCqY5s2i.js","./http-request-DNq59pnj.js","./index-DuIEV_9C.js","./local-storage.test.stories-BqgYwqr-.js","./location-element.test.stories-DvH1TWK4.js","./location-element-hKpcXCdn.js","./set-url.test.stories-GlJOh31I.js","./slice-events.test.stories-VoNjuPCX.js","./slots.test.stories-Da2j9YuO.js","./version-select.test.stories-DLwf-TPB.js","./entry-preview-DrgzXgwT.js","./lit-element-CenEXOuS.js","./entry-preview-docs-Bxv0qQWs.js","./tiny-invariant-BxWVcicq.js","./preview-TCN6m6T-.js","./preview-B63p-W8V.js","./preview-BDY5ThwJ.js","./preview-BAz7FMXc.js","./preview-BKCN0mOr.js","./preview-DRnyIGXK.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import"../sb-preview/runtime.js";(function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))a(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&a(o)}).observe(document,{childList:!0,subtree:!0});function c(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(r){if(r.ep)return;r.ep=!0;const s=c(r);fetch(r.href,s)}})();const R="modulepreload",f=function(e,_){return new URL(e,_).href},O={},t=function(_,c,a){let r=Promise.resolve();if(c&&c.length>0){const s=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),p=o?.nonce||o?.getAttribute("nonce");r=Promise.all(c.map(i=>{if(i=f(i,a),i in O)return;O[i]=!0;const m=i.endsWith(".css"),d=m?'[rel="stylesheet"]':"";if(!!a)for(let l=s.length-1;l>=0;l--){const u=s[l];if(u.href===i&&(!m||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${d}`))return;const n=document.createElement("link");if(n.rel=m?"stylesheet":R,m||(n.as="script",n.crossOrigin=""),n.href=i,p&&n.setAttribute("nonce",p),document.head.appendChild(n),m)return new Promise((l,u)=>{n.addEventListener("load",l),n.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${i}`)))})}))}return r.then(()=>_()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},{createBrowserChannel:T}=__STORYBOOK_MODULE_CHANNELS__,{addons:L}=__STORYBOOK_MODULE_PREVIEW_API__,E=T({page:"preview"});L.setChannel(E);window.__STORYBOOK_ADDONS_CHANNEL__=E;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=E);const P={"./src/stories/Configure.mdx":async()=>t(()=>import("./Configure-D0qG3gR9.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"./src/stories/attributes.test.stories.ts":async()=>t(()=>import("./attributes.test.stories-W34tZdUt.js"),__vite__mapDeps([6,7,8]),import.meta.url),"./src/stories/css.test.stories.ts":async()=>t(()=>import("./css.test.stories-BZFYx1TQ.js"),__vite__mapDeps([9,7,8]),import.meta.url),"./src/stories/dom-merge.test.stories.ts":async()=>t(()=>import("./dom-merge.test.stories-S-7U5N3h.js"),__vite__mapDeps([10,7,8]),import.meta.url),"./src/stories/external-template.test.stories.ts":async()=>t(()=>import("./external-template.test.stories-QIO3lAFz.js"),__vite__mapDeps([11,7,8]),import.meta.url),"./src/stories/form.test.stories.ts":async()=>t(()=>import("./form.test.stories-ClYhj9F1.js"),__vite__mapDeps([12,7,8]),import.meta.url),"./src/stories/http-request.stories.ts":async()=>t(()=>import("./http-request.stories-DCqY5s2i.js"),__vite__mapDeps([13,7,8,14,15]),import.meta.url),"./src/stories/local-storage.test.stories.ts":async()=>t(()=>import("./local-storage.test.stories-BqgYwqr-.js"),__vite__mapDeps([16,7,8]),import.meta.url),"./src/stories/location-element.test.stories.ts":async()=>t(()=>import("./location-element.test.stories-DvH1TWK4.js"),__vite__mapDeps([17,7,8,18]),import.meta.url),"./src/stories/set-url.test.stories.ts":async()=>t(()=>import("./set-url.test.stories-GlJOh31I.js"),__vite__mapDeps([19,7,8,18]),import.meta.url),"./src/stories/slice-events.test.stories.ts":async()=>t(()=>import("./slice-events.test.stories-VoNjuPCX.js"),__vite__mapDeps([20,7,8]),import.meta.url),"./src/stories/slots.test.stories.ts":async()=>t(()=>import("./slots.test.stories-Da2j9YuO.js"),__vite__mapDeps([21,7,8]),import.meta.url),"./src/stories/version-select.test.stories.ts":async()=>t(()=>import("./version-select.test.stories-DLwf-TPB.js"),__vite__mapDeps([22,7,8,14]),import.meta.url)};async function y(e){return P[e]()}const{composeConfigs:I,PreviewWeb:V,ClientApi:S}=__STORYBOOK_MODULE_PREVIEW_API__,D=async(e=[])=>{const _=await Promise.all([e.at(0)??t(()=>import("./entry-preview-DrgzXgwT.js"),__vite__mapDeps([23,4,24]),import.meta.url),e.at(1)??t(()=>import("./entry-preview-docs-Bxv0qQWs.js"),__vite__mapDeps([25,2,26,24]),import.meta.url),e.at(2)??t(()=>import("./preview-TCN6m6T-.js"),__vite__mapDeps([27,3]),import.meta.url),e.at(3)??t(()=>import("./preview-DjDbQHPa.js"),[],import.meta.url),e.at(4)??t(()=>import("./preview-FpHGYA1q.js"),[],import.meta.url),e.at(5)??t(()=>import("./preview-B63p-W8V.js"),__vite__mapDeps([28,4]),import.meta.url),e.at(6)??t(()=>import("./preview-B4GcaC1c.js"),[],import.meta.url),e.at(7)??t(()=>import("./preview-BDY5ThwJ.js"),__vite__mapDeps([29,26]),import.meta.url),e.at(8)??t(()=>import("./preview-BAz7FMXc.js"),__vite__mapDeps([30,4]),import.meta.url),e.at(9)??t(()=>import("./preview-4Up_z4Em.js"),[],import.meta.url),e.at(10)??t(()=>import("./preview-BKCN0mOr.js"),__vite__mapDeps([31,8]),import.meta.url),e.at(11)??t(()=>import("./preview-DRnyIGXK.js"),__vite__mapDeps([32,15]),import.meta.url)]);return I(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new V(y,D);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{t as _};
@@ -1 +1 @@
1
- import{R as e}from"./index-DPPi9iZu.js";const o={},c=e.createContext(o);function u(n){const t=e.useContext(c);return e.useMemo(function(){return typeof n=="function"?n(t):{...t,...n}},[t,n])}function a(n){let t;return n.disableParentContext?t=typeof n.components=="function"?n.components(o):n.components||o:t=u(n.components),e.createElement(c.Provider,{value:t},n.children)}export{a as M,u};
1
+ import{R as e}from"./index-DsWii_Ep.js";const o={},c=e.createContext(o);function u(n){const t=e.useContext(c);return e.useMemo(function(){return typeof n=="function"?n(t):{...t,...n}},[t,n])}function a(n){let t;return n.disableParentContext?t=typeof n.components=="function"?n.components(o):n.components||o:t=u(n.components),e.createElement(c.Provider,{value:t},n.children)}export{a as M,u};
@@ -1 +1 @@
1
- import{M,u as a}from"./index-VWixWKZ7.js";import"./index-DPPi9iZu.js";import"./iframe-DcDTQOmA.js";import"../sb-preview/runtime.js";import"./index-Cc7K62zD.js";import"./index-DXimoRZY.js";import"./index-DrFu-skq.js";export{M as MDXProvider,a as useMDXComponents};
1
+ import{M,u as a}from"./index-CKw1EbdP.js";import"./index-DsWii_Ep.js";import"./iframe-CURpvmVV.js";import"../sb-preview/runtime.js";import"./index-Cc7K62zD.js";import"./index-DXimoRZY.js";import"./index-DrFu-skq.js";export{M as MDXProvider,a as useMDXComponents};