@mgdis/stencil-helpers 3.2.0 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,21 +1,4 @@
1
- (function(u,y){typeof exports=="object"&&typeof module<"u"?y(exports):typeof define=="function"&&define.amd?define(["exports"],y):(u=typeof globalThis<"u"?globalThis:u||self,y(u.StencilHelpersModule={}))})(this,function(u){"use strict";var _r=Object.defineProperty;var We=u=>{throw TypeError(u)};var vr=(u,y,v)=>y in u?_r(u,y,{enumerable:!0,configurable:!0,writable:!0,value:v}):u[y]=v;var h=(u,y,v)=>vr(u,typeof y!="symbol"?y+"":y,v),Ze=(u,y,v)=>y.has(u)||We("Cannot "+v);var S=(u,y,v)=>(Ze(u,y,"read from private field"),v?v.call(u):y.get(u)),L=(u,y,v)=>y.has(u)?We("Cannot add the same private member more than once"):y instanceof WeakSet?y.add(u):y.set(u,v),te=(u,y,v,H)=>(Ze(u,y,"write to private field"),H?H.call(u,v):y.set(u,v),v);var T,M,Z,N,V;const y=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r>0?"-":"")+t.toLowerCase()).replace(/[^a-z0-9-]+/g,"-").replace(/--+/g,"-").replace(/(?:^-)|(?:-$)/g,""),v=(e="",t=10)=>{const r=new Uint8Array(t);crypto.getRandomValues(r);const s=Array.from(r).map(n=>n.toString(16).padStart(2,"0")).join("").slice(0,t);return e!==""?`${e}-${s}`:s},H=e=>de(e)&&/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e)!==null,He=e=>{let t;return typeof e=="string"?t=e:e&&(C(e)||Array.isArray(e))?t=JSON.stringify(e):e!=null&&typeof e!="boolean"&&(t=String(e)),t&&y(t)};class Ge{constructor(t=[]){h(this,"classes");h(this,"add",t=>{this.has(t)||this.classes.push(t)});h(this,"delete",t=>{const r=this.classes.indexOf(t);r>-1&&this.classes.splice(r,1)});h(this,"has",t=>this.classes.includes(t));h(this,"join",()=>this.classes.join(" "));this.classes=t}}const qe=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"),Be=(e,t)=>t.includes(e==null?void 0:e.tagName.toLowerCase()),Je='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button',Ke=e=>{const t=re(e),r=pe(e);return[e,...t,...r]},re=(e,t=[])=>{if(e.self!==e.top)try{const r=e.parent;return r?(t.push(r),re(r,t)):t}catch(r){return console.error("Different hosts between iframes:",r),t}return t},pe=(e,t=[])=>{if(e.frames.length>0)for(const r of Array.from(e.frames))t.push(r),pe(r,t);return t},de=e=>typeof e=="string"&&e.trim()!=="",Xe=e=>typeof e=="object"?JSON.stringify(e):`${e}`,Ye=e=>typeof e=="number"&&!Number.isNaN(e),Qe=e=>typeof e=="string"?e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g,""):e,Ve=async e=>{if(e)return e()},C=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,$e=(e,t,r)=>{const s=".";if(!C(e)||typeof t!="string")return r;const[n,...i]=t.split(s);return i.length?$e(e[n],i.join(s)):e[n]},et={FIRST:"first",NEXT:"next",PREVIOUS:"previous",LAST:"last"},ye=10;class he{constructor(t){h(this,"items",[]);h(this,"total");h(this,"top",ye);h(this,"next");h(this,"baseIndex",1);h(this,"getIndexFromCursor",(t="first",r)=>{if(!Array.isArray(this.items)||!this.items.length)return null;const n=this.items.length-this.baseIndex;let i=0,a=0;if(["previous","next"].includes(t)&&r){const f=this.items.findIndex(c=>JSON.stringify(c)===JSON.stringify(r));if(f===-1)return 0;a=f}return t==="first"?i=0:t==="last"?i=n:t==="previous"?i=JSON.stringify(this.items[a])===JSON.stringify(this.items[0])?n:a-this.baseIndex:t==="next"&&(i=JSON.stringify(this.items[a])===JSON.stringify(this.items[n])?0:a+this.baseIndex),i});if(C(t))Array.isArray(t.items)&&(this.items=t.items),typeof t.top=="number"&&(this.top=t.top),this.total=typeof t.total=="number"?t.total:this.items.length,this.next=t.next;else throw new Error("Page - init must match IPage type.")}}class tt{constructor(t,r){h(this,"items",[]);L(this,T,ye);L(this,M);L(this,Z);h(this,"getPage",(t=0,r)=>{const s=typeof r=="function"?this.items.filter(r):this.items;let n;return S(this,M)?n=S(this,M):s.length>t+S(this,T)&&(n=()=>this.getPage(t+S(this,T),r)),new he({items:s.slice(t,t+S(this,T)),total:S(this,Z),top:S(this,T),next:n})});Array.isArray(t)&&(this.items=t),r&&(["string","function"].includes(typeof r.next)||C(r.next)&&URL.canParse(r.next))&&te(this,M,r.next),typeof(r==null?void 0:r.top)=="number"&&te(this,T,r.top),typeof(r==null?void 0:r.total)=="number"&&te(this,Z,r.total)}}T=new WeakMap,M=new WeakMap,Z=new WeakMap;var G={updatable:!0,slotRelocation:!0,experimentalSlotFixes:!1},rt=Object.defineProperty,st=(e,t)=>{for(var r in t)rt(e,r,{get:t[r],enumerable:!0})},nt="http://www.w3.org/2000/svg",it="http://www.w3.org/1999/xhtml",be=(e,t)=>t in e,_e="http://www.w3.org/1999/xlink",j=typeof window<"u"?window:{},z={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,s)=>e.addEventListener(t,r,s),rel:(e,t,r,s)=>e.removeEventListener(t,r,s),ce:(e,t)=>new CustomEvent(e,t)},at=e=>e!=null&&e!==void 0,ve=e=>(e=typeof e,e==="object"||e==="function"),ot={};st(ot,{err:()=>we,map:()=>lt,ok:()=>se,unwrap:()=>ct,unwrapErr:()=>ft});var se=e=>({isOk:!0,isErr:!1,value:e}),we=e=>({isOk:!1,isErr:!0,value:e});function lt(e,t){if(e.isOk){const r=t(e.value);return r instanceof Promise?r.then(s=>se(s)):se(r)}if(e.isErr){const r=e.value;return we(r)}throw"should never get here"}var ct=e=>{if(e.isOk)return e.value;throw e.value},ft=e=>{if(e.isErr)return e.value;throw e.value},me=e=>{const t=Oe(e,"childNodes");e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"&&Se(t,e.tagName).forEach(s=>{s.nodeType===1&&s.tagName==="SLOT-FB"&&(gt(s,ne(s),!1).length?s.hidden=!0:s.hidden=!1)});let r=0;for(r=0;r<t.length;r++){const s=t[r];s.nodeType===1&&Oe(s,"childNodes").length&&me(s)}},ut=e=>{const t=[];for(let r=0;r<e.length;r++){const s=e[r]["s-nr"]||void 0;s&&s.isConnected&&t.push(s)}return t};function Se(e,t,r){let s=0,n=[],i;for(;s<e.length;s++)i=e[s],i["s-sr"]&&(!t||i["s-hn"]===t)&&r===void 0&&n.push(i),n=[...n,...Se(i.childNodes,t,r)];return n}var gt=(e,t,r=!0)=>{const s=[];(r&&e["s-sr"]||!e["s-sr"])&&s.push(e);let n=e;for(;n=n.nextSibling;)ne(n)===t&&(r||!n["s-sr"])&&s.push(n);return s},Ee=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",ne=e=>typeof e["s-sn"]=="string"?e["s-sn"]:e.nodeType===1&&e.getAttribute("slot")||void 0;function pt(e){if(e.assignedElements||e.assignedNodes||!e["s-sr"])return;const t=r=>(function(s){const n=[],i=this["s-sn"];s!=null&&s.flatten&&console.error(`
2
- Flattening is not supported for Stencil non-shadow slots.
3
- You can use \`.childNodes\` to nested slot fallback content.
4
- If you have a particular use case, please open an issue on the Stencil repo.
5
- `);const a=this["s-cr"].parentElement;return(a.__childNodes?a.childNodes:ut(a.childNodes)).forEach(c=>{i===ne(c)&&n.push(c)}),r?n.filter(c=>c.nodeType===1):n}).bind(e);e.assignedElements=t(!0),e.assignedNodes=t(!1)}function Oe(e,t){if("__"+t in e){const r=e["__"+t];return typeof r!="function"?r:r.bind(e)}else return typeof e[t]!="function"?e[t]:e[t].bind(e)}var dt=(e,t,...r)=>{let s=null,n=null,i=null,a=!1,f=!1;const c=[],l=o=>{for(let d=0;d<o.length;d++)s=o[d],Array.isArray(s)?l(s):s!=null&&typeof s!="boolean"&&((a=!ve(s))&&(s=String(s)),a&&f?c[c.length-1].$text$+=s:c.push(a?ie(null,s):s),f=a)};l(r);const p=ie(e,null);return p.$attrs$=t,c.length>0&&(p.$children$=c),p.$key$=n,p.$name$=i,p},ie=(e,t)=>{const r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return r.$attrs$=null,r.$key$=null,r.$name$=null,r},$t={},yt=e=>e&&e.$tag$===$t,Ae=(e,t,r,s,n,i,a)=>{if(r===s)return;let f=be(e,t),c=t.toLowerCase();if(t==="class"){const l=e.classList,p=xe(r);let o=xe(s);l.remove(...p.filter(d=>d&&!o.includes(d))),l.add(...o.filter(d=>d&&!p.includes(d)))}else if(t==="style"){for(const l in r)(!s||s[l]==null)&&(l.includes("-")?e.style.removeProperty(l):e.style[l]="");for(const l in s)(!r||s[l]!==r[l])&&(l.includes("-")?e.style.setProperty(l,s[l]):e.style[l]=s[l])}else if(t!=="key")if(t==="ref")s&&s(e);else if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):be(j,c)?t=c.slice(2):t=c[2]+t.slice(3),r||s){const l=t.endsWith(Te);t=t.replace(bt,""),r&&z.rel(e,t,r,l),s&&z.ael(e,t,s,l)}}else{const l=ve(s);if((f||l&&s!==null)&&!n)try{if(e.tagName.includes("-"))e[t]!==s&&(e[t]=s);else{const o=s??"";t==="list"?f=!1:(r==null||e[t]!=o)&&(typeof e.__lookupSetter__(t)=="function"?e[t]=o:e.setAttribute(t,o))}}catch{}let p=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(t=c,p=!0),s==null||s===!1?(s!==!1||e.getAttribute(t)==="")&&(p?e.removeAttributeNS(_e,t):e.removeAttribute(t)):(!f||i&4||n)&&!l&&e.nodeType===1&&(s=s===!0?"":s,p?e.setAttributeNS(_e,t,s):e.setAttribute(t,s))}},ht=/\s/,xe=e=>(typeof e=="object"&&e&&"baseVal"in e&&(e=e.baseVal),!e||typeof e!="string"?[]:e.split(ht)),Te="Capture",bt=new RegExp(Te+"$"),ae=(e,t,r,s)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,i=e&&e.$attrs$||{},a=t.$attrs$||{};for(const f of ke(Object.keys(i)))f in a||Ae(n,f,i[f],void 0,r,t.$flags$);for(const f of ke(Object.keys(a)))Ae(n,f,i[f],a[f],r,t.$flags$)};function ke(e){return e.includes("ref")?[...e.filter(t=>t!=="ref"),"ref"]:e}var q,B,F,oe=!1,J=!1,le=!1,w=!1,K=(e,t,r)=>{var s;const n=t.$children$[r];let i=0,a,f,c;if(oe||(le=!0,n.$tag$==="slot"&&(n.$flags$|=n.$children$?2:1)),n.$text$!==null)a=n.$elm$=j.document.createTextNode(n.$text$);else if(n.$flags$&1)a=n.$elm$=j.document.createTextNode(""),ae(null,n,w);else{if(w||(w=n.$tag$==="svg"),!j.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(a=n.$elm$=j.document.createElementNS(w?nt:it,!oe&&G.slotRelocation&&n.$flags$&2?"slot-fb":n.$tag$),w&&n.$tag$==="foreignObject"&&(w=!1),ae(null,n,w),at(q)&&a["s-si"]!==q&&a.classList.add(a["s-si"]=q),n.$children$)for(i=0;i<n.$children$.length;++i)f=K(e,n,i),f&&a.appendChild(f);n.$tag$==="svg"?w=!1:a.tagName==="foreignObject"&&(w=!0)}return a["s-hn"]=F,n.$flags$&3&&(a["s-sr"]=!0,a["s-cr"]=B,a["s-sn"]=n.$name$||"",a["s-rf"]=(s=n.$attrs$)==null?void 0:s.ref,pt(a),c=e&&e.$children$&&e.$children$[r],c&&c.$tag$===n.$tag$&&e.$elm$&&P(e.$elm$,!1),Ie(B,a,t.$elm$,e==null?void 0:e.$elm$)),a},P=(e,t)=>{z.$flags$|=1;const r=Array.from(e.__childNodes||e.childNodes);e["s-sr"]&&G.experimentalSlotFixes;for(let s=r.length-1;s>=0;s--){const n=r[s];n["s-hn"]!==F&&n["s-ol"]&&(R(U(n).parentNode,n,U(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,le=!0),t&&P(n,t)}z.$flags$&=-2},je=(e,t,r,s,n,i)=>{let a=e["s-cr"]&&e["s-cr"].parentNode||e,f;for(a.shadowRoot&&a.tagName===F&&(a=a.shadowRoot);n<=i;++n)s[n]&&(f=K(null,r,n),f&&(s[n].$elm$=f,R(a,f,U(t))))},Re=(e,t,r)=>{for(let s=t;s<=r;++s){const n=e[s];if(n){const i=n.$elm$;ze(n),i&&(J=!0,i["s-ol"]?i["s-ol"].remove():P(i,!0),i.remove())}}},_t=(e,t,r,s,n=!1)=>{let i=0,a=0,f=0,c=0,l=t.length-1,p=t[0],o=t[l],d=s.length-1,g=s[0],$=s[d],m,E;for(;i<=l&&a<=d;)if(p==null)p=t[++i];else if(o==null)o=t[--l];else if(g==null)g=s[++a];else if($==null)$=s[--d];else if(X(p,g,n))I(p,g,n),p=t[++i],g=s[++a];else if(X(o,$,n))I(o,$,n),o=t[--l],$=s[--d];else if(X(p,$,n))(p.$tag$==="slot"||$.$tag$==="slot")&&P(p.$elm$.parentNode,!1),I(p,$,n),R(e,p.$elm$,o.$elm$.nextSibling),p=t[++i],$=s[--d];else if(X(o,g,n))(p.$tag$==="slot"||$.$tag$==="slot")&&P(o.$elm$.parentNode,!1),I(o,g,n),R(e,o.$elm$,p.$elm$),o=t[--l],g=s[++a];else{for(f=-1,c=i;c<=l;++c)if(t[c]&&t[c].$key$!==null&&t[c].$key$===g.$key$){f=c;break}f>=0?(E=t[f],E.$tag$!==g.$tag$?m=K(t&&t[a],r,f):(I(E,g,n),t[f]=void 0,m=E.$elm$),g=s[++a]):(m=K(t&&t[a],r,a),g=s[++a]),m&&R(U(p.$elm$).parentNode,m,U(p.$elm$))}i>l?je(e,s[d+1]==null?null:s[d+1].$elm$,r,s,a,d):a>d&&Re(t,i,l)},X=(e,t,r=!1)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:r?(r&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$:!1,U=e=>e&&e["s-ol"]||e,I=(e,t,r=!1)=>{const s=t.$elm$=e.$elm$,n=e.$children$,i=t.$children$,a=t.$tag$,f=t.$text$;let c;f===null?(w=a==="svg"?!0:a==="foreignObject"?!1:w,ae(e,t,w),n!==null&&i!==null?_t(s,n,t,i,r):i!==null?(e.$text$!==null&&(s.textContent=""),je(s,null,t,i,0,i.length-1)):!r&&G.updatable&&n!==null&&Re(n,0,n.length-1),w&&a==="svg"&&(w=!1)):(c=s["s-cr"])?c.parentNode.textContent=f:e.$text$!==f&&(s.data=f)},A=[],Ne=e=>{let t,r,s;const n=e.__childNodes||e.childNodes;for(const i of n){if(i["s-sr"]&&(t=i["s-cr"])&&t.parentNode){r=t.parentNode.__childNodes||t.parentNode.childNodes;const a=i["s-sn"];for(s=r.length-1;s>=0;s--)if(t=r[s],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==i["s-hn"])if(Ee(t,a)){let f=A.find(c=>c.$nodeToRelocate$===t);J=!0,t["s-sn"]=t["s-sn"]||a,f?(f.$nodeToRelocate$["s-sh"]=i["s-hn"],f.$slotRefNode$=i):(t["s-sh"]=i["s-hn"],A.push({$slotRefNode$:i,$nodeToRelocate$:t})),t["s-sr"]&&A.map(c=>{Ee(c.$nodeToRelocate$,t["s-sn"])&&(f=A.find(l=>l.$nodeToRelocate$===t),f&&!c.$slotRefNode$&&(c.$slotRefNode$=f.$slotRefNode$))})}else A.some(f=>f.$nodeToRelocate$===t)||A.push({$nodeToRelocate$:t})}i.nodeType===1&&Ne(i)}},ze=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(ze)},R=(e,t,r)=>(typeof t["s-sn"]=="string"&&t["s-sr"]&&t["s-cr"]&&Ie(t["s-cr"],t,e,t.parentElement),e==null?void 0:e.insertBefore(t,r));function Ie(e,t,r,s){var n,i;let a;if(e&&typeof t["s-sn"]=="string"&&t["s-sr"]&&e.parentNode&&e.parentNode["s-sc"]&&(a=t["s-si"]||e.parentNode["s-sc"])){const f=t["s-sn"],c=t["s-hn"];if((n=r.classList)==null||n.add(a+"-s"),s&&((i=s.classList)!=null&&i.contains(a+"-s"))){let l=(s.__childNodes||s.childNodes)[0],p=!1;for(;l;){if(l["s-sn"]!==f&&l["s-hn"]===c&&l["s-sr"]){p=!0;break}l=l.nextSibling}p||s.classList.remove(a+"-s")}}}var vt=(e,t,r=!1)=>{var s,n,i,a,f;const c=e.$hostElement$,l=e.$cmpMeta$,p=e.$vnode$||ie(null,null),o=yt(t)?t:dt(null,null,t);if(F=c.tagName,l.$attrsToReflect$&&(o.$attrs$=o.$attrs$||{},l.$attrsToReflect$.map(([d,g])=>o.$attrs$[g]=c[d])),r&&o.$attrs$)for(const d of Object.keys(o.$attrs$))c.hasAttribute(d)&&!["key","ref","style","class"].includes(d)&&(o.$attrs$[d]=c[d]);o.$tag$=null,o.$flags$|=4,e.$vnode$=o,o.$elm$=p.$elm$=c.shadowRoot||c,q=c["s-sc"],oe=!!(l.$flags$&1)&&!(l.$flags$&128),B=c["s-cr"],J=!1,I(p,o,r);{if(z.$flags$|=1,le){Ne(o.$elm$);for(const d of A){const g=d.$nodeToRelocate$;if(!g["s-ol"]&&j.document){const $=j.document.createTextNode("");$["s-nr"]=g,R(g.parentNode,g["s-ol"]=$,g)}}for(const d of A){const g=d.$nodeToRelocate$,$=d.$slotRefNode$;if($){const m=$.parentNode;let E=$.nextSibling;{let _=(s=g["s-ol"])==null?void 0:s.previousSibling;for(;_;){let b=(n=_["s-nr"])!=null?n:null;if(b&&b["s-sn"]===g["s-sn"]&&m===(b.__parentNode||b.parentNode)){for(b=b.nextSibling;b===g||b!=null&&b["s-sr"];)b=b==null?void 0:b.nextSibling;if(!b||!b["s-nr"]){E=b;break}}_=_.previousSibling}}const ee=g.__parentNode||g.parentNode,k=g.__nextSibling||g.nextSibling;(!E&&m!==ee||k!==E)&&g!==E&&(!g["s-hn"]&&g["s-ol"]&&(g["s-hn"]=g["s-ol"].parentNode.nodeName),R(m,g,E),g.nodeType===1&&g.tagName!=="SLOT-FB"&&(g.hidden=(i=g["s-ih"])!=null?i:!1)),g&&typeof $["s-rf"]=="function"&&$["s-rf"]($)}else g.nodeType===1&&(r&&(g["s-ih"]=(a=g.hidden)!=null?a:!1),g.hidden=!0)}}J&&me(o.$elm$),z.$flags$&=-2,A.length=0}if(G.experimentalScopedSlotChanges&&l.$flags$&2){const d=o.$elm$.__childNodes||o.$elm$.childNodes;for(const g of d)g["s-hn"]!==F&&!g["s-sh"]&&(r&&g["s-ih"]==null&&(g["s-ih"]=(f=g.hidden)!=null?f:!1),g.hidden=!0)}B=void 0};const Y={content_wrap:0,ignore:[],ignore_with:"_!i-£___£%_",strict:!1,tab_size:2,tag_wrap:0,tag_wrap_width:80,trim:[]},x="__!i-£___£%__",O="!i-£___£%_",Me=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],ce=e=>/<(?:[A-Za-z]+[A-Za-z0-9]*)(?:\s+.*?)*?\/{0,1}>/.test(e)||/<(?<Element>(?:[A-Za-z]+[A-Za-z0-9]*:)?(?:[A-Za-z]+[A-Za-z0-9]*))(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e)||/<(?<Element>(?:[a-z][a-z0-9._]*:)?[a-z][a-z0-9._]*-[a-z0-9._-]+)(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e),Le=(e,t)=>{if(!e||!t)throw new Error("Both 'current' and 'updates' must be passed-in to mergeObjects()");let r;if(Array.isArray(e))r=structuredClone(e).concat(t);else if(typeof e=="object"){r={...e};for(let s of Object.keys(t))typeof t[s]!="object"?r[s]=t[s]:r[s]=Le(r[s]||{},t[s])}return r},wt=(e,t)=>Le(structuredClone(e),t),mt=e=>(e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(t,r)=>t.replace(r,s=>s.replace(/\n/g,O+"nl!").replace(/\r/g,O+"cr!").replace(/\s/g,O+"ws!"))),e),St=e=>e.replace(/\n/g,x+"nl!").replace(/\r/g,x+"cr!").replace(/\s/g,x+"ws!"),Et=e=>{const t=/\s*<([a-zA-Z0-9:-]+)[^>]*>\n\s*<\/\1>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n)|<([a-zA-Z0-9:-]+)[^>]*>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n\s*)<\/\3>/g;return e.replace(t,(r,s,n,i,a)=>{const f=n||a;if(!f)return r;const c=f.replace(/\n/g,x+"nl!").replace(/\r/g,x+"cr!").replace(/\s/g,x+"ws!");return r.replace(f,c)})},Ot=e=>{const t=/<([A-Za-z][A-Za-z0-9]*|[a-z][a-z0-9._]*-[a-z0-9._-]+)((?:\s+[A-Za-z0-9_-]+="[^"]*"|\s*[a-z]*)*)>/g;return e=e.replace(t,(r,s,n)=>r.replace(n,i=>i.replace(/</g,O+"lt!").replace(/>/g,O+"gt!"))),e},At=(e,t)=>{const r=t.ignore,s=t.ignore_with;for(let n=0;n<r.length;n++){const i=new RegExp(`<${r[n]}[^>]*>((.|
6
- )*?)</${r[n]}>`,"g");e=e.replace(i,(a,f)=>a.replace(f,c=>c.replace(/</g,"-"+s+"lt-").replace(/>/g,"-"+s+"gt-").replace(/\n/g,"-"+s+"nl-").replace(/\r/g,"-"+s+"cr-").replace(/\s/g,"-"+s+"ws-")))}return e},xt=(e,t)=>{for(let r=0;r<t.length;r++){const s=new RegExp(`(<${t[r]}[^>]*>)\\s+`,"g"),n=new RegExp(`\\s+(</${t[r]}>)`,"g");e=e.replace(s,"$1").replace(n,"$1")}return e},Tt=e=>(e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(t,r)=>t.replace(r,s=>s.replace(new RegExp(O+"nl!","g"),`
7
- `).replace(new RegExp(O+"cr!","g"),"\r").replace(new RegExp(O+"ws!","g")," "))),e),kt=e=>(e=e.replace(/.*__!i-£___£%__[a-z]{2}!.*/g,t=>t.replace(/__!i-£___£%__[a-z]{2}!/g,r=>r.replace(new RegExp(x+"nl!","g"),`
8
- `).replace(new RegExp(x+"cr!","g"),"\r").replace(new RegExp(x+"ws!","g")," "))),e),jt=e=>(e=e.replace(/<[\w:\-]+([^>]*)>/g,(t,r)=>t.replace(r,s=>s.replace(new RegExp(O+"lt!","g"),"<").replace(new RegExp(O+"gt!","g"),">"))),e),Rt=(e,t)=>{const r=t.ignore,s=t.ignore_with;for(let n=0;n<r.length;n++){const i=new RegExp(`<${r[n]}[^>]*>((.|
9
- )*?)</${r[n]}>`,"g");e=e.replace(i,(a,f)=>a.replace(f,c=>c.replace(new RegExp("-"+s+"lt-","g"),"<").replace(new RegExp("-"+s+"gt-","g"),">").replace(new RegExp("-"+s+"nl-","g"),`
10
- `).replace(new RegExp("-"+s+"cr-","g"),"\r").replace(new RegExp("-"+s+"ws-","g")," ")))}return e},Nt=e=>{var s,n;if(typeof e!="object")throw new Error("Config must be an object.");if(!(Object.hasOwn(e,"content_wrap")||Object.hasOwn(e,"ignore")||Object.hasOwn(e,"ignore_with")||Object.hasOwn(e,"strict")||Object.hasOwn(e,"tab_size")||Object.hasOwn(e,"tag_wrap")||Object.hasOwn(e,"tag_wrap_width")||Object.hasOwn(e,"trim")))return Y;let r=e.tab_size;if(r){if(typeof r!="number")throw new Error(`tab_size must be a number, not ${typeof e.tab_size}.`);if(!Number.isSafeInteger(r))throw new Error(`Tab size ${r} is not safe. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger for more info.`);if(r=Math.floor(r),r<1||r>16)throw new Error("Tab size out of range. Expecting 1 to 16.");e.tab_size=r}if(Object.hasOwn(e,"content_wrap")&&typeof e.content_wrap!="number")throw new Error(`content_wrap config must be a number, not ${typeof e.tag_wrap_width}.`);if(Object.hasOwn(e,"ignore")&&(!Array.isArray(e.ignore)||!((s=e.ignore)!=null&&s.every(i=>typeof i=="string"))))throw new Error("Ignore config must be an array of strings.");if(Object.hasOwn(e,"ignore_with")&&typeof e.ignore_with!="string")throw new Error(`Ignore_with config must be a string, not ${typeof e.ignore_with}.`);if(Object.hasOwn(e,"strict")&&typeof e.strict!="boolean")throw new Error(`Strict config must be a boolean, not ${typeof e.strict}.`);if(Object.hasOwn(e,"tag_wrap")&&typeof e.tag_wrap=="boolean"&&(console.warn("tag_wrap as a boolean is deprecated, and will not be supported in v0.9.0+. Use `tag_wrap: <number>` instead; where <number> is the max character width acceptable before wrapping attributes."),e.tag_wrap_width?e.tag_wrap=e.tag_wrap_width:e.tag_wrap=Y.tag_wrap_width),Object.hasOwn(e,"tag_wrap")&&typeof e.tag_wrap!="number")throw new Error(`tag_wrap config must be a number, not ${typeof e.tag_wrap}.`);if(Object.hasOwn(e,"tag_wrap_width")&&console.warn("tag_wrap_width is deprecated, and will not be supported in v0.9.0+. Use `tag_wrap: <number>` instead; where <number> is the max character width acceptable before wrapping attributes."),Object.hasOwn(e,"tag_wrap_width")&&typeof e.tag_wrap_width!="number")throw new Error(`tag_wrap_width config must be a number, not ${typeof e.tag_wrap_width}.`);if(Object.hasOwn(e,"trim")&&(!Array.isArray(e.trim)||!((n=e.trim)!=null&&n.every(i=>typeof i=="string"))))throw new Error("Trim config must be an array of strings.");return wt(Y,e)},zt=(e,t,r)=>{const s=e.trim().split(/\s+/);if(s.length===0||s.length===1&&s[0]==="")return"";const n=[];let i="";const a=r;s.forEach(c=>{if(c==="")return;if(c.length>=t){i!==""&&n.push(n.length===0?r+i:a+i),n.push(n.length===0?r+c:a+c),i="";return}const l=i===""?c:i+" "+c;l.length<=t?i=l:(i!==""&&n.push(n.length===0?r+i:a+i),i=c)}),i!==""&&n.push(n.length===0?r+i:a+i);const f=n.join(`
11
- `);return St(f)},It=(e,t=!0)=>t&&!ce(e)?e:e.replace(/<([a-zA-Z\-0-9:]+)[^>]*>/g,(r,s)=>Me.indexOf(s)>-1?`${r.substring(0,r.length-1)} />`.replace(/\/\s\//g,"/"):r.replace(/[\s]?\/>/g,`></${s}>`)),Mt=(e,t=!1)=>(e=e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g,(r,s)=>r.replace(s,n=>n.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\n/g,"&#10;").replace(/\r/g,"&#13;").replace(/\s/g,"&nbsp;"))),t&&(e=e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g,(r,s)=>(r=r.replace(s,n=>n.replace(/\n|\t/g,"").replace(/[a-z]+="\s*"/ig,"").replace(/>\s+</g,"><").replace(/\s+/g," ")),r=r.replace(/\s+/g," ").replace(/\s>/g,">").replace(/>\s/g,">").replace(/\s</g,"<").replace(/class=["']\s/g,n=>n.replace(/\s/g,"")).replace(/(class=.*)\s(["'])/g,"$1$2"),r))),e),Lt=(e,t=!0)=>(t&&!ce(e)||(e=Mt(e),e=e.replace(/\n|\t/g,""),e=e.replace(/>\s+</g,"><"),e=e.replace(/ {2,}/g," "),e=e.replace(/ >/g,">"),e=e.replace(/ </g,"<"),e=e.replace(/> /g,">"),e=e.replace(/<\s*\//g,"</"),e=e.replace(/ = /g,"="),e=e.replace(/([a-zA-Z0-9_-]+)=(['"])(.*?)\2/g,(r,s,n,i)=>{const a=i.trim();return`${s}=${n}${a}${n}`}),e=e.trim()),e);let Q,fe;const D={line:[]},Ct=e=>{D.line=[];let t=-1;const r=/(<[^>]+>)|([^<]+)/g;return e=e.replace(r,(s,n,i)=>(n?D.line.push({type:"tag",value:s}):i&&i.trim().length>0&&D.line.push({type:"text",value:s}),t++,`
12
- [#-# : ${t} : ${s} : #-#]
13
- `)),e},Ft=e=>(e=It(e,!1),fe.length>0&&(e=xt(e,fe)),e=Lt(e,!1),e=Ct(e),e),Pt=(e,t)=>{const r=" ".repeat(t.tab_size),s=t.tag_wrap,n=t.content_wrap;let i="";const a=[],f=/<[A-Za-z]+\b[^>]*(?:.|\n)*?\/?>/g,c=/\s{1}[A-Za-z-]+(?:=".*?")?/g;D.line.forEach((p,o)=>{let d=p.value,g=0;const $=D.line[o-1],m=($==null?void 0:$.value)??"";i+="0",o===0&&g++,d.trim().startsWith("</")&&g++,m.trim().startsWith("<!doctype")&&g++,m.trim().startsWith("<!--")&&g++,m.trim().endsWith("/>")&&g++,m.trim().startsWith("</")&&g++,($==null?void 0:$.type)==="text"&&g++;const ee=Math.max(0,i.length-g);i=i.substring(0,ee);const k=r.repeat(ee);if(Q&&d.trim().startsWith("<!--"))return;let _=d;if(p.type==="text"&&n>0&&_.length>=n)_=zt(_,n,k);else if(s>0&&_.length>s&&f.test(_)){f.lastIndex=0,c.lastIndex=0;const b=_.split(c).filter(Boolean);if(b.length>=2){const ur=_.matchAll(c),gr=k+r;let ge=k+b[0]+`
14
- `;for(const hr of ur){const br=hr[0].trim();ge+=gr+br+`
15
- `}const De=b[0].match(/<([A-Za-z_:-]+)/),pr=De?De[1]:"",dr=Me.includes(pr),$r=b[1].trim(),yr=k+(Q&&dr?" ":"");ge+=yr+$r,_=ge}else _=k+_}else _=k+_;a.push(_)});let l=a.join(`
16
- `);return s>0&&(l=mt(l)),n>0&&/\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n/.test(l)&&(l=Et(l)),l=l.replace(/<(?<Element>.+).*>[^<]*?[^><\/\s][^<]*?<\/{1}\k<Element>|<script[^>]*>\s+<\/script>|<(\w+)>\s+<\/(\w+)|<(?:([\w:\._-]+)|([\w:\._-]+)[^>]*[^\/])>\s+<\/([\w:\._-]+)>/g,p=>p.replace(/\n|\t|\s{2,}/g,"")),n>0&&(l=kt(l)),s>0&&(l=Tt(l)),Q&&(l=l.replace(/\s\/>|\/>/g,">")),l.startsWith(`
17
- `)&&(l=l.substring(1)),l.endsWith(`
18
- `)&&(l=l.substring(0,l.length-1)),l},Ut=(e,t)=>{if(!ce(e))return e;const r=t?Nt(t):Y;Q=r.strict;const s=r.ignore.length>0;return fe=r.trim,s&&(e=At(e,r)),e=Ot(e),e=Ft(e),e=Pt(e,r),e=jt(e),s&&(e=Rt(e,r)),e},Dt=(e,t,r)=>{[null,void 0,"",!1].includes(r)||["innerHTML","style",""].includes(t)||e.setAttribute(t,["object","function"].includes(typeof r)?"⚠️ Property must be set through a script or a framework-specific syntax.":r)},Ce=(e,t,r,s,n)=>{if(t&&typeof t=="string"){const i=document.createElement(t);Object.keys(r||{}).forEach(a=>{Dt(i,a,r[a])}),s==null||s.forEach(a=>{Ce(i,a.$tag$,a.$attrs$,a.$children$,a.$text$)}),r!=null&&r.innerHTML&&(i.innerHTML=r.innerHTML),e.appendChild(i)}n&&(e.innerHTML=n)},Wt=(e,t,r=[])=>{const s={};if(typeof e!="object")throw new Error("filterArgs - args isn't an object.");for(const n in e)if(!r.includes(n)){const i=e[n],a=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();(!t||!Object.keys(t).includes(n)||t[n]!==i)&&(s[a]=i)}return s},Zt=(e,t)=>{var s,n;const r=document.getElementById("storybook-root");if(r!==null)return(n=document.querySelector("[lang]"))==null||n.setAttribute("lang",((s=t.globals)==null?void 0:s.locale)||"en"),vt({$cmpMeta$:{$flags$:0,$tagName$:r.tagName},$hostElement$:r},e(t)),r.children[r.children.length-1]},Ht=({$tag$:e,$attrs$:t,$children$:r,$text$:s})=>{const n=document.createElement("div");return Ce(n,e,t,r,s),Ut(n.innerHTML,{tag_wrap:40,content_wrap:120}).replace(/="true"/g,"")},W=(e,t)=>{if(!t)return;const r=t.split("/");return`${e}${r.slice(2,r.length-1).join("-")}--docs`};class Gt{constructor(t){h(this,"jsonDoc");L(this,N,t=>this.jsonDoc.components.find(r=>r.tag===t));L(this,V,t=>{const r=t.type.replace(/"([^"]+)"/g,"$1").replace(/\s/g,"").replace(/\(.*?\)/g,s=>s.replace(/\|/g," OR ")).split("|").map(s=>s.trim().replace(/ OR /g,"|"));return t.type==="string"?{control:{type:"text"}}:t.type==="number"?{control:{type:"number"}}:t.type==="boolean"?{control:{type:"boolean"}}:t.type.startsWith("{")&&t.type.endsWith("}")?{control:{type:"object"}}:r.length>1?r.includes("string")?{control:{type:"text"}}:r.every(s=>s==null?void 0:s.includes("[]"))?{control:{type:"object"}}:(r.unshift(void 0),{control:{type:"select"},options:r}):{control:{type:"object"}}});h(this,"extractArgTypes",t=>{const r=S(this,N).call(this,t),s=r==null?void 0:r.props.reduce((p,o)=>{const{control:d,options:g}=S(this,V).call(this,o);return{...p,[o.name]:{name:o.attr||o.name,description:o.docs,type:{required:o.required},table:{category:"props",type:{summary:o.type},defaultValue:{summary:o.default}},control:d,options:g}}},{}),n=r==null?void 0:r.events.reduce((p,o)=>({...p,[o.event]:{name:o.event,description:o.docs,table:{category:"events",type:{summary:o.detail}}}}),{}),i=r==null?void 0:r.methods.reduce((p,o)=>({...p,[o.name]:{name:o.name,description:o.docs,table:{category:"methods",type:{summary:o.signature}}}}),{}),a=r==null?void 0:r.slots.reduce((p,o)=>({...p,[o.name]:{name:o.name!==""?o.name:"default",description:o.docs,table:{category:"slots",type:{summary:void 0}}}}),{}),f=r==null?void 0:r.styles.reduce((p,o)=>({...p,[o.name]:{name:o.name,description:o.docs,table:{category:"custom properties",type:{summary:void 0}}}}),{}),c=r==null?void 0:r.dependencies.reduce((p,o)=>{const d=S(this,N).call(this,o);return d?{...p,[o]:{name:o,description:`<a href="./?path=/docs/${W("",d==null?void 0:d.filePath)}">View Component Documentation</a>`,table:{category:"depends on",type:{summary:void 0}}}}:p},{}),l=r==null?void 0:r.dependents.reduce((p,o)=>{const d=S(this,N).call(this,o);return d?{...p,[o]:{name:o,description:`<a href="./?path=/docs/${W("",d==null?void 0:d.filePath)}">View Component Documentation</a>`,table:{category:"used by",type:{summary:void 0}}}}:p},{});return{...s,...n,...i,...a,...f,...c,...l}});h(this,"extractComponentDescription",t=>{const r=S(this,N).call(this,t);return(r==null?void 0:r.readme)||(r==null?void 0:r.docs)});this.jsonDoc=t}}N=new WeakMap,V=new WeakMap;const qt=(e,t)=>{if(t)return`${e}${t}`},Fe=e=>{let t=e.overview?`${e.overview}
1
+ (function(f,h){typeof exports=="object"&&typeof module<"u"?h(exports):typeof define=="function"&&define.amd?define(["exports"],h):(f=typeof globalThis<"u"?globalThis:f||self,h(f.StencilHelpersModule={}))})(this,function(f){"use strict";var Lr=Object.defineProperty;var qe=f=>{throw TypeError(f)};var Cr=(f,h,_)=>h in f?Lr(f,h,{enumerable:!0,configurable:!0,writable:!0,value:_}):f[h]=_;var y=(f,h,_)=>Cr(f,typeof h!="symbol"?h+"":h,_),Je=(f,h,_)=>h.has(f)||qe("Cannot "+_);var S=(f,h,_)=>(Je(f,h,"read from private field"),_?_.call(f):h.get(f)),F=(f,h,_)=>h.has(f)?qe("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(f):h.set(f,_),re=(f,h,_,P)=>(Je(f,h,"write to private field"),P?P.call(f,_):h.set(f,_),_);var x,M,H,N,ee;class h{constructor(t=[]){y(this,"classes");y(this,"add",t=>{this.has(t)||this.classes.push(t)});y(this,"delete",t=>{const r=this.classes.indexOf(t);r>-1&&this.classes.splice(r,1)});y(this,"has",t=>this.classes.includes(t));y(this,"join",()=>this.classes.join(" "));this.classes=t}}const _=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,P=(e,t,r)=>{const s=".";if(!_(e)||typeof t!="string")return r;const[n,...i]=t.split(s);return i.length?P(e[n],i.join(s)):e[n]},Ke=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"),he=e=>typeof e=="string"&&e.trim()!=="",Xe=e=>typeof e=="object"?JSON.stringify(e):String(e),Ye=e=>typeof e=="string"?e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g,""):e,Qe=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r>0?"-":"")+t.toLowerCase()).replace(/[^a-z0-9-]+/g,"-").replace(/--+/g,"-").replace(/(?:^-)|(?:-$)/g,""),Ve=(e="",t=10)=>{const r=new Uint8Array(t);crypto.getRandomValues(r);const s=Array.from(r).map(n=>n.toString(16).padStart(2,"0")).join("").slice(0,t);return e!==""?`${e}-${s}`:s},et=e=>he(e)&&/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e)!==null,tt=e=>{let t;return typeof e=="string"?t=e:e&&typeof e=="object"&&(_(e)||Array.isArray(e))?t=JSON.stringify(e):e!=null&&typeof e!="boolean"&&typeof e!="object"&&(t=String(e)),t&&Qe(t)},rt=async e=>{if(e)return e()},st={FIRST:"first",NEXT:"next",PREVIOUS:"previous",LAST:"last"},ye=10;class _e{constructor(t){y(this,"items",[]);y(this,"total");y(this,"top",ye);y(this,"next");y(this,"baseIndex",1);y(this,"getIndexFromCursor",(t="first",r)=>{if(!Array.isArray(this.items)||!this.items.length)return null;const n=this.items.length-this.baseIndex;let i,a=0;if(["previous","next"].includes(t)&&r){const c=this.items.findIndex(l=>JSON.stringify(l)===JSON.stringify(r));if(c===-1)return 0;a=c}return t==="first"?i=0:t==="last"?i=n:t==="previous"?i=JSON.stringify(this.items[a])===JSON.stringify(this.items[0])?n:a-this.baseIndex:t==="next"?i=JSON.stringify(this.items[a])===JSON.stringify(this.items[n])?0:a+this.baseIndex:i=0,i});if(_(t))Array.isArray(t.items)&&(this.items=t.items),typeof t.top=="number"&&(this.top=t.top),this.total=typeof t.total=="number"?t.total:this.items.length,this.next=t.next;else throw new Error("Page - init must match IPage type.")}}class nt{constructor(t,r){y(this,"items",[]);F(this,x,ye);F(this,M);F(this,H);y(this,"getPage",(t=0,r)=>{const s=typeof r=="function"?this.items.filter(r):this.items;let n;return S(this,M)?n=S(this,M):s.length>t+S(this,x)&&(n=()=>this.getPage(t+S(this,x),r)),new _e({items:s.slice(t,t+S(this,x)),total:S(this,H),top:S(this,x),next:n})});Array.isArray(t)&&(this.items=t),r&&(["string","function"].includes(typeof r.next)||_(r.next)&&URL.canParse(r.next))&&re(this,M,r.next),typeof(r==null?void 0:r.top)=="number"&&re(this,x,r.top),typeof(r==null?void 0:r.total)=="number"&&re(this,H,r.total)}}x=new WeakMap,M=new WeakMap,H=new WeakMap;const it=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,at=e=>e.toISOString().split("T")[0],ot=(e,t)=>t.includes(e==null?void 0:e.tagName.toLowerCase()),lt='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button',ct=e=>typeof e=="number"&&!Number.isNaN(e),ft=e=>{const t=se(e),r=be(e);return[e,...t,...r]},se=(e,t=[])=>{if(e.self!==e.top)try{const r=e.parent;return r?(t.push(r),se(r,t)):t}catch(r){return console.error("Different hosts between iframes:",r),t}return t},be=(e,t=[])=>{if(e.frames.length>0)for(const r of Array.from(e.frames))t.push(r),be(r,t);return t};var ut=Object.defineProperty,gt=(e,t)=>{for(var r in t)ut(e,r,{get:t[r],enumerable:!0})},pt={};gt(pt,{err:()=>ve,map:()=>dt,ok:()=>ne,unwrap:()=>$t,unwrapErr:()=>ht});var ne=e=>({isOk:!0,isErr:!1,value:e}),ve=e=>({isOk:!1,isErr:!0,value:e});function dt(e,t){if(e.isOk){const r=t(e.value);return r instanceof Promise?r.then(s=>ne(s)):ne(r)}if(e.isErr){const r=e.value;return ve(r)}throw"should never get here"}var $t=e=>{if(e.isOk)return e.value;throw e.value},ht=e=>{if(e.isErr)return e.value;throw e.value};const me=(e,t)=>{if(!t)return;const r=t.split("/");return`${e}${r.slice(2,r.length-1).join("-")}--docs`},yt=(e,t)=>{if(t)return`${e}${t}`},we=e=>{let t=e.overview?`${e.overview}
19
2
 
20
3
  `:"";const r=e.props.filter(({attr:n})=>n!==void 0);r.length&&(t+=`Attributes:
21
4
  `,t+=r.map(({attr:n,docs:i})=>`- \`${n}\`: ${i}
@@ -35,7 +18,21 @@
35
18
  `),e.slots.length&&(t+=`Slots:
36
19
  `,t+=e.slots.map(({name:n,docs:i})=>`- \`${n}\`: ${i}
37
20
  `).join(""),t+=`
38
- `),t},ue=e=>`${e.docs}
21
+ `),t},ie=e=>`${e.docs}
39
22
 
40
- Type: \`${e.type}\``,Bt=(e,t,r,s)=>({$schema:"https://json.schemastore.org/web-types",name:e,version:t,"description-markup":"markdown",contributions:{html:{elements:r.components.map(n=>{const i=W(s,n.filePath);return{name:n.tag,description:Fe(n),"doc-url":i,attributes:n.props.filter(a=>a.attr).map(a=>({name:a.attr,description:ue(a),"doc-url":i,value:{type:a.type,default:a.default,required:a.required}})),js:{properties:n.props.map(a=>({name:a.name,description:ue(a),"doc-url":i,value:{type:a.type,default:a.default,required:a.required}})),events:n.events.map(a=>({name:a.event,description:a.docs}))},css:{properties:n.styles.map(a=>({name:a.name,description:a.docs}))}}})}}}),Jt=(e,t,r)=>[{name:"Storybook",url:W(e,r)},{name:"Sources",url:qt(t,r)}],Kt=e=>{if(!e.values.some(({value:t})=>t===void 0))return e.values.map(({value:t})=>({name:t}))},Xt=(e,t,r)=>({version:1.1,tags:e.components.map(s=>{const n=Jt(t,r,s.filePath);return{name:s.tag,description:Fe(s),attributes:s.props.map(i=>({name:i.attr||i.name,description:ue(i),values:Kt(i),references:n})),references:n}}),globalAttributes:[],valueSets:[]}),Yt=e=>({version:1.1,properties:e.components.flatMap(t=>t.styles.map(r=>({name:r.name,description:r.docs})))}),Qt=e=>{const t={value:"2023",pattern:"yyyy"},r={value:"12",pattern:"mm"},s={value:"24",pattern:"dd"};return Ue([t.value,r.value,s.value].join("-"),e,{timeZone:"UTC"}).replace(t.value,t.pattern).replace(r.value,r.pattern).replace(s.value,s.pattern)},Vt=e=>e.toISOString().split("T")[0],er=(e,t,r)=>{const s=e.closest("[lang]"),n=Intl.NumberFormat.supportedLocalesOf(s==null?void 0:s.lang),i=n.length>0&&typeof n[0]=="string"?n[0]:navigator.language||r,a=i.split("-").shift();return Object.keys(t).length===0?{locale:i,messages:{lang:r}}:{locale:i,messages:t[a]||t[r]||{lang:r}}},tr=(e,t,r)=>new Intl.NumberFormat(t,{style:"currency",currency:r}).format(e),rr=(e,t,r=0)=>new Intl.NumberFormat(t,{minimumFractionDigits:r}).format(Number(e)),sr=(e,t,r=0)=>new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:r,maximumFractionDigits:r}).format(e),nr=(e,t,r,s="short",n=0)=>new Intl.NumberFormat(t,{style:"unit",unit:r,unitDisplay:s,minimumFractionDigits:n,maximumFractionDigits:n}).format(e),Pe=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,Ue=(e,t,r)=>typeof e!="string"||e===""||!Pe.test(e)?"":new Intl.DateTimeFormat(t,r).format(new Date(e)),ir=(e,t)=>r=>er(r,e,t),ar=({disconnect:e,observe:t,takeRecords:r})=>{class s{constructor(i){h(this,"disconnect",e);h(this,"observe",t);h(this,"takeRecords",r);h(this,"cb");this.cb=i}}return[window,global].forEach(n=>{Object.defineProperty(n,"MutationObserver",{writable:!0,configurable:!0,value:s})}),s},or=({disconnect:e,observe:t})=>{class r{constructor(n){h(this,"disconnect",e);h(this,"observe",t);h(this,"unobserve");h(this,"cb");this.cb=n}}return[window,global].forEach(s=>{Object.defineProperty(s,"ResizeObserver",{writable:!0,configurable:!0,value:r})}),r};class lr extends Event{constructor(){super(...arguments);h(this,"detail")}}const cr=()=>{class e extends lr{}return[window,global].forEach(t=>{Object.defineProperty(t,"SubmitEvent",{writable:!0,configurable:!0,value:e})}),e},fr=e=>{const t=r=>(setTimeout(r,1),e(),0);return[window,global].forEach(r=>{Object.defineProperty(r,"requestAnimationFrame",{writable:!0,configurable:!0,value:t})}),t};u.ClassList=Ge,u.Cursor=et,u.Page=he,u.Paginate=tt,u.StorybookPreview=Gt,u.allItemsAreString=qe,u.cleanString=Qe,u.createID=v,u.dateRegExp=Pe,u.dateToString=Vt,u.defineLocales=ir,u.filterArgs=Wt,u.focusableElements=Je,u.formatID=He,u.getLocaleDatePattern=Qt,u.getObjectValueFromKey=$e,u.getParentWindows=re,u.getStoryHTML=Ht,u.getStorybookUrl=W,u.getWindows=Ke,u.isObject=C,u.isTagName=Be,u.isValidNumber=Ye,u.isValidString=de,u.isValideID=H,u.localeCurrency=tr,u.localeDate=Ue,u.localeNumber=rr,u.localePercent=sr,u.localeUnit=nr,u.nextTick=Ve,u.setUpRequestAnimationFrameMock=fr,u.setupMutationObserverMock=ar,u.setupResizeObserverMock=or,u.setupSubmitEventMock=cr,u.stencilWrapper=Zt,u.toString=Xe,u.vsCodeCssGenerator=Yt,u.vsCodeGenerator=Xt,u.webTypesGenerator=Bt,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
23
+ Type: \`${e.type}\``,_t=(e,t,r,s)=>({$schema:"https://json.schemastore.org/web-types",name:e,version:t,"description-markup":"markdown",contributions:{html:{elements:r.components.map(n=>{const i=me(s,n.filePath);return{name:n.tag,description:we(n),"doc-url":i,attributes:n.props.filter(a=>a.attr).map(a=>({name:a.attr,description:ie(a),"doc-url":i,value:{type:a.type,default:a.default,required:a.required}})),js:{properties:n.props.map(a=>({name:a.name,description:ie(a),"doc-url":i,value:{type:a.type,default:a.default,required:a.required}})),events:n.events.map(a=>({name:a.event,description:a.docs}))},css:{properties:n.styles.map(a=>({name:a.name,description:a.docs}))}}})}}}),bt=(e,t,r)=>[{name:"Storybook",url:me(e,r)},{name:"Sources",url:yt(t,r)}],vt=e=>{if(!e.values.some(({value:t})=>t===void 0))return e.values.map(({value:t})=>({name:t}))},mt=(e,t,r)=>({version:1.1,tags:e.components.map(s=>{const n=bt(t,r,s.filePath);return{name:s.tag,description:we(s),attributes:s.props.map(i=>({name:i.attr??i.name,description:ie(i),values:vt(i),references:n})),references:n}}),globalAttributes:[],valueSets:[]}),wt=e=>({version:1.1,properties:e.components.flatMap(t=>t.styles.map(r=>({name:r.name,description:r.docs})))}),St=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,Et=e=>{const t={value:"2023",pattern:"yyyy"},r={value:"12",pattern:"mm"},s={value:"24",pattern:"dd"};return Se([t.value,r.value,s.value].join("-"),e,{timeZone:"UTC"}).replace(t.value,t.pattern).replace(r.value,r.pattern).replace(s.value,s.pattern)},Ot=(e,t,r)=>{const s=e.closest("[lang]"),n=Intl.NumberFormat.supportedLocalesOf(s==null?void 0:s.lang),i=n.length>0&&typeof n[0]=="string"?n[0]:navigator.language||r,a=i.split("-").shift();return Object.keys(t).length===0?{locale:i,messages:{lang:r}}:{locale:i,messages:t[a]||t[r]||{lang:r}}},At=(e,t,r)=>new Intl.NumberFormat(t,{style:"currency",currency:r}).format(e),kt=(e,t,r=0)=>new Intl.NumberFormat(t,{minimumFractionDigits:r}).format(Number(e)),xt=(e,t,r=0)=>new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:r,maximumFractionDigits:r}).format(e),jt=(e,t,r,s="short",n=0)=>new Intl.NumberFormat(t,{style:"unit",unit:r,unitDisplay:s,minimumFractionDigits:n,maximumFractionDigits:n}).format(e),Se=(e,t,r)=>typeof e!="string"||e===""||!St.test(e)?"":new Intl.DateTimeFormat(t,r).format(new Date(e)),Tt=(e,t)=>r=>Ot(r,e,t);var G={updatable:!0,slotRelocation:!0,experimentalSlotFixes:!1},Rt=Object.defineProperty,Nt=(e,t)=>{for(var r in t)Rt(e,r,{get:t[r],enumerable:!0})},It="http://www.w3.org/2000/svg",zt="http://www.w3.org/1999/xhtml",Ee=(e,t)=>t in e,Oe="http://www.w3.org/1999/xlink",T=typeof window<"u"?window:{},I={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,s)=>e.addEventListener(t,r,s),rel:(e,t,r,s)=>e.removeEventListener(t,r,s),ce:(e,t)=>new CustomEvent(e,t)},Mt=e=>e!=null&&e!==void 0,Ae=e=>(e=typeof e,e==="object"||e==="function"),Lt={};Nt(Lt,{err:()=>ke,map:()=>Ct,ok:()=>ae,unwrap:()=>Ft,unwrapErr:()=>Pt});var ae=e=>({isOk:!0,isErr:!1,value:e}),ke=e=>({isOk:!1,isErr:!0,value:e});function Ct(e,t){if(e.isOk){const r=t(e.value);return r instanceof Promise?r.then(s=>ae(s)):ae(r)}if(e.isErr){const r=e.value;return ke(r)}throw"should never get here"}var Ft=e=>{if(e.isOk)return e.value;throw e.value},Pt=e=>{if(e.isErr)return e.value;throw e.value},xe=e=>{const t=Re(e,"childNodes");e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"&&je(t,e.tagName).forEach(s=>{s.nodeType===1&&s.tagName==="SLOT-FB"&&(Ut(s,oe(s),!1).length?s.hidden=!0:s.hidden=!1)});let r=0;for(r=0;r<t.length;r++){const s=t[r];s.nodeType===1&&Re(s,"childNodes").length&&xe(s)}},Wt=e=>{const t=[];for(let r=0;r<e.length;r++){const s=e[r]["s-nr"]||void 0;s&&s.isConnected&&t.push(s)}return t};function je(e,t,r){let s=0,n=[],i;for(;s<e.length;s++)i=e[s],i["s-sr"]&&(!t||i["s-hn"]===t)&&r===void 0&&n.push(i),n=[...n,...je(i.childNodes,t,r)];return n}var Ut=(e,t,r=!0)=>{const s=[];(r&&e["s-sr"]||!e["s-sr"])&&s.push(e);let n=e;for(;n=n.nextSibling;)oe(n)===t&&(r||!n["s-sr"])&&s.push(n);return s},Te=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",oe=e=>typeof e["s-sn"]=="string"?e["s-sn"]:e.nodeType===1&&e.getAttribute("slot")||void 0;function Dt(e){if(e.assignedElements||e.assignedNodes||!e["s-sr"])return;const t=r=>(function(s){const n=[],i=this["s-sn"];s!=null&&s.flatten&&console.error(`
24
+ Flattening is not supported for Stencil non-shadow slots.
25
+ You can use \`.childNodes\` to nested slot fallback content.
26
+ If you have a particular use case, please open an issue on the Stencil repo.
27
+ `);const a=this["s-cr"].parentElement;return(a.__childNodes?a.childNodes:Wt(a.childNodes)).forEach(l=>{i===oe(l)&&n.push(l)}),r?n.filter(l=>l.nodeType===1):n}).bind(e);e.assignedElements=t(!0),e.assignedNodes=t(!1)}function Re(e,t){if("__"+t in e){const r=e["__"+t];return typeof r!="function"?r:r.bind(e)}else return typeof e[t]!="function"?e[t]:e[t].bind(e)}var Zt=(e,t,...r)=>{let s=null,n=null,i=null,a=!1,c=!1;const l=[],u=o=>{for(let d=0;d<o.length;d++)s=o[d],Array.isArray(s)?u(s):s!=null&&typeof s!="boolean"&&((a=!Ae(s))&&(s=String(s)),a&&c?l[l.length-1].$text$+=s:l.push(a?le(null,s):s),c=a)};u(r);const g=le(e,null);return g.$attrs$=t,l.length>0&&(g.$children$=l),g.$key$=n,g.$name$=i,g},le=(e,t)=>{const r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return r.$attrs$=null,r.$key$=null,r.$name$=null,r},Ht={},Bt=e=>e&&e.$tag$===Ht,Ne=(e,t,r,s,n,i,a)=>{if(r===s)return;let c=Ee(e,t),l=t.toLowerCase();if(t==="class"){const u=e.classList,g=Ie(r);let o=Ie(s);u.remove(...g.filter(d=>d&&!o.includes(d))),u.add(...o.filter(d=>d&&!g.includes(d)))}else if(t==="style"){for(const u in r)(!s||s[u]==null)&&(u.includes("-")?e.style.removeProperty(u):e.style[u]="");for(const u in s)(!r||s[u]!==r[u])&&(u.includes("-")?e.style.setProperty(u,s[u]):e.style[u]=s[u])}else if(t!=="key")if(t==="ref")s&&s(e);else if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):Ee(T,l)?t=l.slice(2):t=l[2]+t.slice(3),r||s){const u=t.endsWith(ze);t=t.replace(qt,""),r&&I.rel(e,t,r,u),s&&I.ael(e,t,s,u)}}else{const u=Ae(s);if((c||u&&s!==null)&&!n)try{if(e.tagName.includes("-"))e[t]!==s&&(e[t]=s);else{const o=s??"";t==="list"?c=!1:(r==null||e[t]!=o)&&(typeof e.__lookupSetter__(t)=="function"?e[t]=o:e.setAttribute(t,o))}}catch{}let g=!1;l!==(l=l.replace(/^xlink\:?/,""))&&(t=l,g=!0),s==null||s===!1?(s!==!1||e.getAttribute(t)==="")&&(g?e.removeAttributeNS(Oe,t):e.removeAttribute(t)):(!c||i&4||n)&&!u&&e.nodeType===1&&(s=s===!0?"":s,g?e.setAttributeNS(Oe,t,s):e.setAttribute(t,s))}},Gt=/\s/,Ie=e=>(typeof e=="object"&&e&&"baseVal"in e&&(e=e.baseVal),!e||typeof e!="string"?[]:e.split(Gt)),ze="Capture",qt=new RegExp(ze+"$"),ce=(e,t,r,s)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,i=e&&e.$attrs$||{},a=t.$attrs$||{};for(const c of Me(Object.keys(i)))c in a||Ne(n,c,i[c],void 0,r,t.$flags$);for(const c of Me(Object.keys(a)))Ne(n,c,i[c],a[c],r,t.$flags$)};function Me(e){return e.includes("ref")?[...e.filter(t=>t!=="ref"),"ref"]:e}var q,J,W,fe=!1,K=!1,ue=!1,m=!1,X=(e,t,r)=>{var s;const n=t.$children$[r];let i=0,a,c,l;if(fe||(ue=!0,n.$tag$==="slot"&&(n.$flags$|=n.$children$?2:1)),n.$text$!==null)a=n.$elm$=T.document.createTextNode(n.$text$);else if(n.$flags$&1)a=n.$elm$=T.document.createTextNode(""),ce(null,n,m);else{if(m||(m=n.$tag$==="svg"),!T.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(a=n.$elm$=T.document.createElementNS(m?It:zt,!fe&&G.slotRelocation&&n.$flags$&2?"slot-fb":n.$tag$),m&&n.$tag$==="foreignObject"&&(m=!1),ce(null,n,m),Mt(q)&&a["s-si"]!==q&&a.classList.add(a["s-si"]=q),n.$children$)for(i=0;i<n.$children$.length;++i)c=X(e,n,i),c&&a.appendChild(c);n.$tag$==="svg"?m=!1:a.tagName==="foreignObject"&&(m=!0)}return a["s-hn"]=W,n.$flags$&3&&(a["s-sr"]=!0,a["s-cr"]=J,a["s-sn"]=n.$name$||"",a["s-rf"]=(s=n.$attrs$)==null?void 0:s.ref,Dt(a),l=e&&e.$children$&&e.$children$[r],l&&l.$tag$===n.$tag$&&e.$elm$&&U(e.$elm$,!1),We(J,a,t.$elm$,e==null?void 0:e.$elm$)),a},U=(e,t)=>{I.$flags$|=1;const r=Array.from(e.__childNodes||e.childNodes);e["s-sr"]&&G.experimentalSlotFixes;for(let s=r.length-1;s>=0;s--){const n=r[s];n["s-hn"]!==W&&n["s-ol"]&&(R(D(n).parentNode,n,D(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,ue=!0),t&&U(n,t)}I.$flags$&=-2},Le=(e,t,r,s,n,i)=>{let a=e["s-cr"]&&e["s-cr"].parentNode||e,c;for(a.shadowRoot&&a.tagName===W&&(a=a.shadowRoot);n<=i;++n)s[n]&&(c=X(null,r,n),c&&(s[n].$elm$=c,R(a,c,D(t))))},Ce=(e,t,r)=>{for(let s=t;s<=r;++s){const n=e[s];if(n){const i=n.$elm$;Pe(n),i&&(K=!0,i["s-ol"]?i["s-ol"].remove():U(i,!0),i.remove())}}},Jt=(e,t,r,s,n=!1)=>{let i=0,a=0,c=0,l=0,u=t.length-1,g=t[0],o=t[u],d=s.length-1,p=s[0],$=s[d],E,b;for(;i<=u&&a<=d;)if(g==null)g=t[++i];else if(o==null)o=t[--u];else if(p==null)p=s[++a];else if($==null)$=s[--d];else if(Y(g,p,n))z(g,p,n),g=t[++i],p=s[++a];else if(Y(o,$,n))z(o,$,n),o=t[--u],$=s[--d];else if(Y(g,$,n))(g.$tag$==="slot"||$.$tag$==="slot")&&U(g.$elm$.parentNode,!1),z(g,$,n),R(e,g.$elm$,o.$elm$.nextSibling),g=t[++i],$=s[--d];else if(Y(o,p,n))(g.$tag$==="slot"||$.$tag$==="slot")&&U(o.$elm$.parentNode,!1),z(o,p,n),R(e,o.$elm$,g.$elm$),o=t[--u],p=s[++a];else{for(c=-1,l=i;l<=u;++l)if(t[l]&&t[l].$key$!==null&&t[l].$key$===p.$key$){c=l;break}c>=0?(b=t[c],b.$tag$!==p.$tag$?E=X(t&&t[a],r,c):(z(b,p,n),t[c]=void 0,E=b.$elm$),p=s[++a]):(E=X(t&&t[a],r,a),p=s[++a]),E&&R(D(g.$elm$).parentNode,E,D(g.$elm$))}i>u?Le(e,s[d+1]==null?null:s[d+1].$elm$,r,s,a,d):a>d&&Ce(t,i,u)},Y=(e,t,r=!1)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:r?(r&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$:!1,D=e=>e&&e["s-ol"]||e,z=(e,t,r=!1)=>{const s=t.$elm$=e.$elm$,n=e.$children$,i=t.$children$,a=t.$tag$,c=t.$text$;let l;c===null?(m=a==="svg"?!0:a==="foreignObject"?!1:m,ce(e,t,m),n!==null&&i!==null?Jt(s,n,t,i,r):i!==null?(e.$text$!==null&&(s.textContent=""),Le(s,null,t,i,0,i.length-1)):!r&&G.updatable&&n!==null&&Ce(n,0,n.length-1),m&&a==="svg"&&(m=!1)):(l=s["s-cr"])?l.parentNode.textContent=c:e.$text$!==c&&(s.data=c)},O=[],Fe=e=>{let t,r,s;const n=e.__childNodes||e.childNodes;for(const i of n){if(i["s-sr"]&&(t=i["s-cr"])&&t.parentNode){r=t.parentNode.__childNodes||t.parentNode.childNodes;const a=i["s-sn"];for(s=r.length-1;s>=0;s--)if(t=r[s],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==i["s-hn"])if(Te(t,a)){let c=O.find(l=>l.$nodeToRelocate$===t);K=!0,t["s-sn"]=t["s-sn"]||a,c?(c.$nodeToRelocate$["s-sh"]=i["s-hn"],c.$slotRefNode$=i):(t["s-sh"]=i["s-hn"],O.push({$slotRefNode$:i,$nodeToRelocate$:t})),t["s-sr"]&&O.map(l=>{Te(l.$nodeToRelocate$,t["s-sn"])&&(c=O.find(u=>u.$nodeToRelocate$===t),c&&!l.$slotRefNode$&&(l.$slotRefNode$=c.$slotRefNode$))})}else O.some(c=>c.$nodeToRelocate$===t)||O.push({$nodeToRelocate$:t})}i.nodeType===1&&Fe(i)}},Pe=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(Pe)},R=(e,t,r)=>(typeof t["s-sn"]=="string"&&t["s-sr"]&&t["s-cr"]&&We(t["s-cr"],t,e,t.parentElement),e==null?void 0:e.insertBefore(t,r));function We(e,t,r,s){var n,i;let a;if(e&&typeof t["s-sn"]=="string"&&t["s-sr"]&&e.parentNode&&e.parentNode["s-sc"]&&(a=t["s-si"]||e.parentNode["s-sc"])){const c=t["s-sn"],l=t["s-hn"];if((n=r.classList)==null||n.add(a+"-s"),s&&((i=s.classList)!=null&&i.contains(a+"-s"))){let u=(s.__childNodes||s.childNodes)[0],g=!1;for(;u;){if(u["s-sn"]!==c&&u["s-hn"]===l&&u["s-sr"]){g=!0;break}u=u.nextSibling}g||s.classList.remove(a+"-s")}}}var Kt=(e,t,r=!1)=>{var s,n,i,a,c;const l=e.$hostElement$,u=e.$cmpMeta$,g=e.$vnode$||le(null,null),o=Bt(t)?t:Zt(null,null,t);if(W=l.tagName,u.$attrsToReflect$&&(o.$attrs$=o.$attrs$||{},u.$attrsToReflect$.map(([d,p])=>o.$attrs$[p]=l[d])),r&&o.$attrs$)for(const d of Object.keys(o.$attrs$))l.hasAttribute(d)&&!["key","ref","style","class"].includes(d)&&(o.$attrs$[d]=l[d]);o.$tag$=null,o.$flags$|=4,e.$vnode$=o,o.$elm$=g.$elm$=l.shadowRoot||l,q=l["s-sc"],fe=!!(u.$flags$&1)&&!(u.$flags$&128),J=l["s-cr"],K=!1,z(g,o,r);{if(I.$flags$|=1,ue){Fe(o.$elm$);for(const d of O){const p=d.$nodeToRelocate$;if(!p["s-ol"]&&T.document){const $=T.document.createTextNode("");$["s-nr"]=p,R(p.parentNode,p["s-ol"]=$,p)}}for(const d of O){const p=d.$nodeToRelocate$,$=d.$slotRefNode$;if($){const E=$.parentNode;let b=$.nextSibling;{let B=(s=p["s-ol"])==null?void 0:s.previousSibling;for(;B;){let v=(n=B["s-nr"])!=null?n:null;if(v&&v["s-sn"]===p["s-sn"]&&E===(v.__parentNode||v.parentNode)){for(v=v.nextSibling;v===p||v!=null&&v["s-sr"];)v=v==null?void 0:v.nextSibling;if(!v||!v["s-nr"]){b=v;break}}B=B.previousSibling}}const j=p.__parentNode||p.parentNode,L=p.__nextSibling||p.nextSibling;(!b&&E!==j||L!==b)&&p!==b&&(!p["s-hn"]&&p["s-ol"]&&(p["s-hn"]=p["s-ol"].parentNode.nodeName),R(E,p,b),p.nodeType===1&&p.tagName!=="SLOT-FB"&&(p.hidden=(i=p["s-ih"])!=null?i:!1)),p&&typeof $["s-rf"]=="function"&&$["s-rf"]($)}else p.nodeType===1&&(r&&(p["s-ih"]=(a=p.hidden)!=null?a:!1),p.hidden=!0)}}K&&xe(o.$elm$),I.$flags$&=-2,O.length=0}if(G.experimentalScopedSlotChanges&&u.$flags$&2){const d=o.$elm$.__childNodes||o.$elm$.childNodes;for(const p of d)p["s-hn"]!==W&&!p["s-sh"]&&(r&&p["s-ih"]==null&&(p["s-ih"]=(c=p.hidden)!=null?c:!1),p.hidden=!0)}J=void 0};const Q={content_wrap:0,ignore:[],ignore_with:"_!i-£___£%_",strict:!1,tab_size:2,tag_wrap:0,tag_wrap_width:80,trim:[]},A="__!i-£___£%__",k="!i-£___£%_",Ue=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],ge=e=>/<(?:[A-Za-z]+[A-Za-z0-9]*)(?:\s+.*?)*?\/{0,1}>/.test(e)||/<(?<Element>(?:[A-Za-z]+[A-Za-z0-9]*:)?(?:[A-Za-z]+[A-Za-z0-9]*))(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e)||/<(?<Element>(?:[a-z][a-z0-9._]*:)?[a-z][a-z0-9._]*-[a-z0-9._-]+)(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e),De=(e,t)=>{if(!e||!t)throw new Error("Both 'current' and 'updates' must be passed-in to mergeObjects()");let r;if(Array.isArray(e))r=structuredClone(e).concat(t);else if(typeof e=="object"){r={...e};for(let s of Object.keys(t))typeof t[s]!="object"?r[s]=t[s]:r[s]=De(r[s]||{},t[s])}return r},Xt=(e,t)=>De(structuredClone(e),t),Yt=e=>(e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(t,r)=>t.replace(r,s=>s.replace(/\n/g,k+"nl!").replace(/\r/g,k+"cr!").replace(/\s/g,k+"ws!"))),e),Qt=e=>e.replace(/\n/g,A+"nl!").replace(/\r/g,A+"cr!").replace(/\s/g,A+"ws!"),Vt=e=>{const t=/\s*<([a-zA-Z0-9:-]+)[^>]*>\n\s*<\/\1>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n)|<([a-zA-Z0-9:-]+)[^>]*>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n\s*)<\/\3>/g;return e.replace(t,(r,s,n,i,a)=>{const c=n||a;if(!c)return r;const l=c.replace(/\n/g,A+"nl!").replace(/\r/g,A+"cr!").replace(/\s/g,A+"ws!");return r.replace(c,l)})},er=e=>{const t=/<([A-Za-z][A-Za-z0-9]*|[a-z][a-z0-9._]*-[a-z0-9._-]+)((?:\s+[A-Za-z0-9_-]+="[^"]*"|\s*[a-z]*)*)>/g;return e=e.replace(t,(r,s,n)=>r.replace(n,i=>i.replace(/</g,k+"lt!").replace(/>/g,k+"gt!"))),e},tr=(e,t)=>{for(let r=0;r<t.length;r++){const s=new RegExp(`(<${t[r]}[^>]*>)\\s+`,"g"),n=new RegExp(`\\s+(</${t[r]}>)`,"g");e=e.replace(s,"$1").replace(n,"$1")}return e},rr=e=>(e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(t,r)=>t.replace(r,s=>s.replace(new RegExp(k+"nl!","g"),`
28
+ `).replace(new RegExp(k+"cr!","g"),"\r").replace(new RegExp(k+"ws!","g")," "))),e),sr=e=>(e=e.replace(/.*__!i-£___£%__[a-z]{2}!.*/g,t=>t.replace(/__!i-£___£%__[a-z]{2}!/g,r=>r.replace(new RegExp(A+"nl!","g"),`
29
+ `).replace(new RegExp(A+"cr!","g"),"\r").replace(new RegExp(A+"ws!","g")," "))),e),Ze=k.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),nr=new RegExp(Ze+"lt!","g"),ir=new RegExp(Ze+"gt!","g"),ar=e=>{const t=/<([\w:\-]+)([^>]*)>/g;return e.replace(t,(r,s,n)=>{const i=n.replace(nr,"<").replace(ir,">");return`<${s}${i}>`})},or=e=>{var s,n;if(typeof e!="object")throw new Error("Config must be an object.");if(!(Object.hasOwn(e,"content_wrap")||Object.hasOwn(e,"ignore")||Object.hasOwn(e,"ignore_with")||Object.hasOwn(e,"strict")||Object.hasOwn(e,"tab_size")||Object.hasOwn(e,"tag_wrap")||Object.hasOwn(e,"tag_wrap_width")||Object.hasOwn(e,"trim")))return Q;let r=e.tab_size;if(r){if(typeof r!="number")throw new Error(`tab_size must be a number, not ${typeof e.tab_size}.`);if(!Number.isSafeInteger(r))throw new Error(`Tab size ${r} is not safe. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger for more info.`);if(r=Math.floor(r),r<1||r>16)throw new Error("Tab size out of range. Expecting 1 to 16.");e.tab_size=r}if(Object.hasOwn(e,"content_wrap")&&typeof e.content_wrap!="number")throw new Error(`content_wrap config must be a number, not ${typeof e.tag_wrap_width}.`);if(Object.hasOwn(e,"ignore")&&(!Array.isArray(e.ignore)||!((s=e.ignore)!=null&&s.every(i=>typeof i=="string"))))throw new Error("Ignore config must be an array of strings.");if(Object.hasOwn(e,"ignore_with")&&typeof e.ignore_with!="string")throw new Error(`Ignore_with config must be a string, not ${typeof e.ignore_with}.`);if(Object.hasOwn(e,"strict")&&typeof e.strict!="boolean")throw new Error(`Strict config must be a boolean, not ${typeof e.strict}.`);if(Object.hasOwn(e,"tag_wrap")&&typeof e.tag_wrap=="boolean"&&(console.warn("tag_wrap as a boolean is deprecated, and will not be supported in v0.9.0+. Use `tag_wrap: <number>` instead; where <number> is the max character width acceptable before wrapping attributes."),e.tag_wrap_width?e.tag_wrap=e.tag_wrap_width:e.tag_wrap=Q.tag_wrap_width),Object.hasOwn(e,"tag_wrap")&&typeof e.tag_wrap!="number")throw new Error(`tag_wrap config must be a number, not ${typeof e.tag_wrap}.`);if(Object.hasOwn(e,"tag_wrap_width")&&console.warn("tag_wrap_width is deprecated, and will not be supported in v0.9.0+. Use `tag_wrap: <number>` instead; where <number> is the max character width acceptable before wrapping attributes."),Object.hasOwn(e,"tag_wrap_width")&&typeof e.tag_wrap_width!="number")throw new Error(`tag_wrap_width config must be a number, not ${typeof e.tag_wrap_width}.`);if(Object.hasOwn(e,"trim")&&(!Array.isArray(e.trim)||!((n=e.trim)!=null&&n.every(i=>typeof i=="string"))))throw new Error("Trim config must be an array of strings.");return Xt(Q,e)},lr=(e,t,r)=>{const s=e.trim().split(/\s+/);if(s.length===0||s.length===1&&s[0]==="")return"";const n=[];let i="";const a=r;s.forEach(l=>{if(l==="")return;if(l.length>=t){i!==""&&n.push(n.length===0?r+i:a+i),n.push(n.length===0?r+l:a+l),i="";return}const u=i===""?l:i+" "+l;u.length<=t?i=u:(i!==""&&n.push(n.length===0?r+i:a+i),i=l)}),i!==""&&n.push(n.length===0?r+i:a+i);const c=n.join(`
30
+ `);return Qt(c)};function cr(e,t){let r=e;const s=new Map;let n=0;const i="___HTMLFY_SPECIAL_IGNORE_MARKER_";for(const a of t.ignore){const c=a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),l=new RegExp(`<${c}[^>]*>.*?</${c}>`,"gs");let u;const g=[];for(;(u=l.exec(r))!==null;){const o=`${i}${n++}___`;s.set(o,u[0]),g.push({start:u.index,end:l.lastIndex,marker:o})}for(let o=g.length-1;o>=0;o--){const d=g[o];r=r.substring(0,d.start)+d.marker+r.substring(d.end)}}return{html_with_markers:r,extracted_map:s}}function fr(e,t){let r=e;for(const[s,n]of t)r=r.split(s).join(n);return r}const ur=(e,t=!0)=>t&&!ge(e)?e:e.replace(/<([a-zA-Z\-0-9:]+)[^>]*>/g,(r,s)=>Ue.indexOf(s)>-1?`${r.substring(0,r.length-1)} />`.replace(/\/\s\//g,"/"):r.replace(/[\s]?\/>/g,`></${s}>`)),gr=(e,t=!1)=>(e=e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g,(r,s)=>r.replace(s,n=>n.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\n/g,"&#10;").replace(/\r/g,"&#13;").replace(/\s/g,"&nbsp;"))),t&&(e=e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g,(r,s)=>(r=r.replace(s,n=>n.replace(/\n|\t/g,"").replace(/[a-z]+="\s*"/ig,"").replace(/>\s+</g,"><").replace(/\s+/g," ")),r=r.replace(/\s+/g," ").replace(/\s>/g,">").replace(/>\s/g,">").replace(/\s</g,"<").replace(/class=["']\s/g,n=>n.replace(/\s/g,"")).replace(/(class=.*)\s(["'])/g,"$1$2"),r))),e),pr=(e,t=!0)=>(t&&!ge(e)||(e=gr(e),e=e.replace(/\n|\t/g,""),e=e.replace(/>\s+</g,"><"),e=e.replace(/ {2,}/g," "),e=e.replace(/ >/g,">"),e=e.replace(/ </g,"<"),e=e.replace(/> /g,">"),e=e.replace(/<\s*\//g,"</"),e=e.replace(/ = /g,"="),e=e.replace(/([a-zA-Z0-9_-]+)=(['"])(.*?)\2/g,(r,s,n,i)=>{const a=i.trim();return`${s}=${n}${a}${n}`}),e=e.trim()),e);let V,pe;const Z={line:[]};let He;const dr=e=>{Z.line=[];let t=-1;const r=/(<[^>]+>)|([^<]+)/g;return e=e.replace(r,(s,n,i)=>(n?Z.line.push({type:"tag",value:s}):i&&i.trim().length>0&&Z.line.push({type:"text",value:s}),t++,`
31
+ [#-# : ${t} : ${s} : #-#]
32
+ `)),e},$r=e=>(e=ur(e,!1),pe.length>0&&(e=tr(e,pe)),e=pr(e,!1),e=dr(e),e),hr=(e,t)=>{const r=" ".repeat(t.tab_size),s=t.tag_wrap,n=t.content_wrap,a=`-${t.ignore_with}`;let c="";const l=[],u=/<[A-Za-z]+\b[^>]*(?:.|\n)*?\/?>/g,g=/\s{1}[A-Za-z-]+(?:=".*?")?/g;Z.line.forEach((d,p)=>{let $=d.value;const E=$.startsWith(a+"lt--")||$.startsWith(a+"gt--")||$.startsWith(a+"nl--")||$.startsWith(a+"cr--")||$.startsWith(a+"ws--")||$.startsWith(a+"tab--");let b=0;const j=Z.line[p-1],L=(j==null?void 0:j.value)??"";c+="0",p===0&&b++,$.trim().startsWith("</")&&b++,L.trim().startsWith("<!doctype")&&b++,L.trim().startsWith("<!--")&&b++,L.trim().endsWith("/>")&&b++,L.trim().startsWith("</")&&b++,(j==null?void 0:j.type)==="text"&&b++;const v=Math.max(0,c.length-b);if(c=c.substring(0,v),d.type==="text"&&/^[!,;\.]/.test($))if($.length===1){l[l.length-1]=l.at(-1)+$;return}else l[l.length-1]=l.at(-1)+$.charAt(0),$=$.slice(1).trim();const C=r.repeat(v);if(E)l.push($);else{if(V&&$.trim().startsWith("<!--"))return;let w=$;if(d.type==="text"&&n>0&&w.length>=n)w=lr(w,n,C);else if(s>0&&w.length>s&&u.test(w)){u.lastIndex=0,g.lastIndex=0;const te=w.split(g).filter(Boolean);if(te.length>=2){const xr=w.matchAll(g),jr=C+r;let $e=C+te[0]+`
33
+ `;for(const zr of xr){const Mr=zr[0].trim();$e+=jr+Mr+`
34
+ `}const Ge=te[0].match(/<([A-Za-z_:-]+)/),Tr=Ge?Ge[1]:"",Rr=Ue.includes(Tr),Nr=te[1].trim(),Ir=C+(V&&Rr?" ":"");$e+=Ir+Nr,w=$e}else w=C+w}else w=C+w;l.push(w)}});let o=l.join(`
35
+ `);return s>0&&(o=Yt(o)),n>0&&/\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n/.test(o)&&(o=Vt(o)),o=o.replace(/<(?<Element>.+).*>[^<]*?[^><\/\s][^<]*?<\/{1}\k<Element>|<script[^>]*>\s+<\/script>|<(\w+)>\s+<\/(\w+)|<(?:([\w:\._-]+)|([\w:\._-]+)[^>]*[^\/])>\s+<\/([\w:\._-]+)>/g,d=>d.replace(/\n|\t|\s{2,}/g,"")),n>0&&(o=sr(o)),s>0&&(o=rr(o)),V&&(o=o.replace(/\s\/>|\/>/g,">")),o.startsWith(`
36
+ `)&&(o=o.substring(1)),o.endsWith(`
37
+ `)&&(o=o.substring(0,o.length-1)),o},yr=(e,t)=>{if(!ge(e))return e;const r=t?or(t):Q;V=r.strict;const s=r.ignore.length>0;if(pe=r.trim,s){const{html_with_markers:n,extracted_map:i}=cr(e,r);e=n,He=i}return e=er(e),e=$r(e),e=hr(e,r),e=ar(e),s&&(e=fr(e,He)),e},_r=(e,t,r)=>{[null,void 0,"",!1].includes(r)||["innerHTML","style",""].includes(t)||e.setAttribute(t,["object","function"].includes(typeof r)?"⚠️ Property must be set through a script or a framework-specific syntax.":r)},Be=(e,t,r,s,n)=>{if(t&&typeof t=="string"){const i=document.createElement(t);Object.keys(r||{}).forEach(a=>{_r(i,a,r[a])}),s==null||s.forEach(a=>{Be(i,a.$tag$,a.$attrs$,a.$children$,a.$text$)}),r!=null&&r.innerHTML&&(i.innerHTML=r.innerHTML),e.appendChild(i)}n&&(e.innerHTML=n)},br=(e,t,r=[])=>{const s={};if(typeof e!="object")throw new Error("filterArgs - args isn't an object.");for(const n in e)if(!r.includes(n)){const i=e[n],a=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();(!t||!Object.keys(t).includes(n)||t[n]!==i)&&(s[a]=i)}return s},vr=(e,t)=>{var s,n;const r=document.getElementById("storybook-root");if(r!==null)return(n=document.querySelector("[lang]"))==null||n.setAttribute("lang",((s=t.globals)==null?void 0:s.locale)||"en"),Kt({$cmpMeta$:{$flags$:0,$tagName$:r.tagName},$hostElement$:r},e(t)),r.children[r.children.length-1]},mr=({$tag$:e,$attrs$:t,$children$:r,$text$:s})=>{const n=document.createElement("div");return Be(n,e,t,r,s),yr(n.innerHTML,{tag_wrap:40,content_wrap:120}).replace(/="true"/g,"")},de=(e,t)=>{if(!t)return;const r=t.split("/");return`${e}${r.slice(2,r.length-1).join("-")}--docs`};class wr{constructor(t){y(this,"jsonDoc");F(this,N,t=>this.jsonDoc.components.find(r=>r.tag===t));F(this,ee,t=>{const r=t.type.replace(/"([^"]+)"/g,"$1").replace(/\s/g,"").replace(/\(.*?\)/g,s=>s.replace(/\|/g," OR ")).split("|").map(s=>s.trim().replace(/ OR /g,"|"));return t.type==="string"?{control:{type:"text"}}:t.type==="number"?{control:{type:"number"}}:t.type==="boolean"?{control:{type:"boolean"}}:t.type.startsWith("{")&&t.type.endsWith("}")?{control:{type:"object"}}:r.length>1?r.includes("string")?{control:{type:"text"}}:r.every(s=>s==null?void 0:s.includes("[]"))?{control:{type:"object"}}:(r.unshift(void 0),{control:{type:"select"},options:r}):{control:{type:"object"}}});y(this,"extractArgTypes",t=>{const r=S(this,N).call(this,t),s=r==null?void 0:r.props.reduce((g,o)=>{const{control:d,options:p}=S(this,ee).call(this,o);return{...g,[o.name]:{name:o.attr||o.name,description:o.docs,type:{required:o.required},table:{category:"props",type:{summary:o.type},defaultValue:{summary:o.default}},control:d,options:p}}},{}),n=r==null?void 0:r.events.reduce((g,o)=>({...g,[o.event]:{name:o.event,description:o.docs,table:{category:"events",type:{summary:o.detail}}}}),{}),i=r==null?void 0:r.methods.reduce((g,o)=>({...g,[o.name]:{name:o.name,description:o.docs,table:{category:"methods",type:{summary:o.signature}}}}),{}),a=r==null?void 0:r.slots.reduce((g,o)=>({...g,[o.name]:{name:o.name!==""?o.name:"default",description:o.docs,table:{category:"slots",type:{summary:void 0}}}}),{}),c=r==null?void 0:r.styles.reduce((g,o)=>({...g,[o.name]:{name:o.name,description:o.docs,table:{category:"custom properties",type:{summary:void 0}}}}),{}),l=r==null?void 0:r.dependencies.reduce((g,o)=>{const d=S(this,N).call(this,o);return d?{...g,[o]:{name:o,description:`<a href="./?path=/docs/${de("",d==null?void 0:d.filePath)}">View Component Documentation</a>`,table:{category:"depends on",type:{summary:void 0}}}}:g},{}),u=r==null?void 0:r.dependents.reduce((g,o)=>{const d=S(this,N).call(this,o);return d?{...g,[o]:{name:o,description:`<a href="./?path=/docs/${de("",d==null?void 0:d.filePath)}">View Component Documentation</a>`,table:{category:"used by",type:{summary:void 0}}}}:g},{});return{...s,...n,...i,...a,...c,...l,...u}});y(this,"extractComponentDescription",t=>{const r=S(this,N).call(this,t);return(r==null?void 0:r.readme)||(r==null?void 0:r.docs)});this.jsonDoc=t}}N=new WeakMap,ee=new WeakMap;const Sr=({disconnect:e,observe:t,takeRecords:r})=>{class s{constructor(i){y(this,"disconnect",e);y(this,"observe",t);y(this,"takeRecords",r);y(this,"cb");this.cb=i}}return[window,global].forEach(n=>{Object.defineProperty(n,"MutationObserver",{writable:!0,configurable:!0,value:s})}),s},Er=({disconnect:e,observe:t})=>{class r{constructor(n){y(this,"disconnect",e);y(this,"observe",t);y(this,"unobserve");y(this,"cb");this.cb=n}}return[window,global].forEach(s=>{Object.defineProperty(s,"ResizeObserver",{writable:!0,configurable:!0,value:r})}),r};class Or extends Event{constructor(){super(...arguments);y(this,"detail")}}const Ar=()=>{class e extends Or{}return[window,global].forEach(t=>{Object.defineProperty(t,"SubmitEvent",{writable:!0,configurable:!0,value:e})}),e},kr=e=>{const t=r=>(setTimeout(r,1),e(),0);return[window,global].forEach(r=>{Object.defineProperty(r,"requestAnimationFrame",{writable:!0,configurable:!0,value:t})}),t};f.ClassList=h,f.Cursor=st,f.Page=_e,f.Paginate=nt,f.StorybookPreview=wr,f.allItemsAreString=Ke,f.cleanString=Ye,f.createID=Ve,f.dateRegExp=it,f.dateToString=at,f.defineLocales=Tt,f.filterArgs=br,f.focusableElements=lt,f.formatID=tt,f.getLocaleDatePattern=Et,f.getObjectValueFromKey=P,f.getParentWindows=se,f.getStoryHTML=mr,f.getStorybookUrl=de,f.getWindows=ft,f.isObject=_,f.isTagName=ot,f.isValidNumber=ct,f.isValidString=he,f.isValideID=et,f.localeCurrency=At,f.localeDate=Se,f.localeNumber=kt,f.localePercent=xt,f.localeUnit=jt,f.nextTick=rt,f.setUpRequestAnimationFrameMock=kr,f.setupMutationObserverMock=Sr,f.setupResizeObserverMock=Er,f.setupSubmitEventMock=Ar,f.stencilWrapper=vr,f.toString=Xe,f.vsCodeCssGenerator=wt,f.vsCodeGenerator=mt,f.webTypesGenerator=_t,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
41
38
  //# sourceMappingURL=index.umd.js.map